framework7 8.0.0-beta.1 → 8.0.0-beta.2
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/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/framework7-bundle-rtl.css +87 -36
- package/framework7-bundle-rtl.min.css +4 -4
- package/framework7-bundle.css +87 -36
- package/framework7-bundle.esm.js +3 -3
- package/framework7-bundle.js +783 -433
- 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 +3 -3
- package/framework7-rtl.min.css +3 -3
- package/framework7.css +3 -3
- package/framework7.esm.js +3 -3
- package/framework7.less +3 -3
- package/framework7.min.css +3 -3
- 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 +3 -3
- 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.2
|
|
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: February 7, 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,
|
|
@@ -5821,12 +5834,16 @@
|
|
|
5821
5834
|
}
|
|
5822
5835
|
}
|
|
5823
5836
|
|
|
5824
|
-
function refreshPage() {
|
|
5837
|
+
function refreshPage(props) {
|
|
5838
|
+
if (props === void 0) {
|
|
5839
|
+
props = {};
|
|
5840
|
+
}
|
|
5825
5841
|
const router = this;
|
|
5826
5842
|
appRouterCheck(router, 'refreshPage');
|
|
5827
5843
|
return router.navigate(router.currentRoute.url, {
|
|
5828
5844
|
ignoreCache: true,
|
|
5829
|
-
reloadCurrent: true
|
|
5845
|
+
reloadCurrent: true,
|
|
5846
|
+
props
|
|
5830
5847
|
});
|
|
5831
5848
|
}
|
|
5832
5849
|
function forward(router, el, forwardOptions) {
|
|
@@ -6100,14 +6117,19 @@
|
|
|
6100
6117
|
if (((options.reloadCurrent || reloadDetail && otherDetailPageEl) && router.history.length) > 0 || options.replaceState) {
|
|
6101
6118
|
if (reloadDetail && detailsInBetweenRemoved > 0) {
|
|
6102
6119
|
router.history = router.history.slice(0, router.history.length - detailsInBetweenRemoved);
|
|
6120
|
+
router.propsHistory = router.propsHistory.slice(0, router.propsHistory.length - detailsInBetweenRemoved);
|
|
6103
6121
|
}
|
|
6104
6122
|
router.history[router.history.length - (options.reloadPrevious ? 2 : 1)] = url;
|
|
6123
|
+
router.propsHistory[router.propsHistory.length - (options.reloadPrevious ? 2 : 1)] = options.props || {};
|
|
6105
6124
|
} else if (options.reloadPrevious) {
|
|
6106
6125
|
router.history[router.history.length - 2] = url;
|
|
6126
|
+
router.propsHistory[router.propsHistory.length - 2] = options.props || {};
|
|
6107
6127
|
} else if (options.reloadAll) {
|
|
6108
6128
|
router.history = [url];
|
|
6129
|
+
router.propsHistory = [options.props || {}];
|
|
6109
6130
|
} else {
|
|
6110
6131
|
router.history.push(url);
|
|
6132
|
+
router.propsHistory.push(options.props || {});
|
|
6111
6133
|
}
|
|
6112
6134
|
}
|
|
6113
6135
|
router.saveHistory();
|
|
@@ -7176,11 +7198,13 @@
|
|
|
7176
7198
|
if (router.history.indexOf(options.route.url) >= 0) {
|
|
7177
7199
|
backIndex = router.history.length - router.history.indexOf(options.route.url) - 1;
|
|
7178
7200
|
router.history = router.history.slice(0, router.history.indexOf(options.route.url) + 2);
|
|
7201
|
+
router.propsHistory = router.propsHistory.slice(0, router.history.indexOf(options.route.url) + 2);
|
|
7179
7202
|
view.history = router.history;
|
|
7180
7203
|
} else if (router.history[[router.history.length - 2]]) {
|
|
7181
|
-
router.
|
|
7204
|
+
router.propsHistory[router.propsHistory.length - 2] = options.props || {};
|
|
7182
7205
|
} else {
|
|
7183
7206
|
router.history.unshift(router.url);
|
|
7207
|
+
router.propsHistory.unshift(options.props || {});
|
|
7184
7208
|
}
|
|
7185
7209
|
const $pageToRemove = $oldPage.prev('.page-previous');
|
|
7186
7210
|
let $navbarToRemove;
|
|
@@ -7306,11 +7330,14 @@
|
|
|
7306
7330
|
// Update History
|
|
7307
7331
|
if (options.replaceState) {
|
|
7308
7332
|
router.history[router.history.length - 1] = options.route.url;
|
|
7333
|
+
router.propsHistory[router.propsHistory.length - 1] = options.props || {};
|
|
7309
7334
|
} else {
|
|
7310
7335
|
if (router.history.length === 1) {
|
|
7311
7336
|
router.history.unshift(router.url);
|
|
7337
|
+
router.propsHistory.unshift(options.props || {});
|
|
7312
7338
|
}
|
|
7313
7339
|
router.history.pop();
|
|
7340
|
+
router.propsHistory.pop();
|
|
7314
7341
|
}
|
|
7315
7342
|
router.saveHistory();
|
|
7316
7343
|
|
|
@@ -7393,7 +7420,8 @@
|
|
|
7393
7420
|
const preloadPreviousPage = router.params.preloadPreviousPage || router.params[`${app.theme}SwipeBack`];
|
|
7394
7421
|
if (preloadPreviousPage && router.history[router.history.length - 2] && !isMaster) {
|
|
7395
7422
|
router.back(router.history[router.history.length - 2], {
|
|
7396
|
-
preload: true
|
|
7423
|
+
preload: true,
|
|
7424
|
+
props: router.propsHistory[router.propsHistory.length - 2] || {}
|
|
7397
7425
|
});
|
|
7398
7426
|
}
|
|
7399
7427
|
if (router.params.browserHistory) {
|
|
@@ -7443,6 +7471,7 @@
|
|
|
7443
7471
|
componentUrl
|
|
7444
7472
|
} = params;
|
|
7445
7473
|
if (options.route.url && router.url === options.route.url && !(options.reloadCurrent || options.reloadPrevious) && !router.params.allowDuplicateUrls) {
|
|
7474
|
+
router.allowPageChange = true;
|
|
7446
7475
|
return false;
|
|
7447
7476
|
}
|
|
7448
7477
|
if (!options.route && url) {
|
|
@@ -7505,6 +7534,7 @@
|
|
|
7505
7534
|
if (router.swipeBackActive) return router;
|
|
7506
7535
|
let navigateUrl;
|
|
7507
7536
|
let navigateOptions;
|
|
7537
|
+
let navigateProps;
|
|
7508
7538
|
let route;
|
|
7509
7539
|
if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'object') {
|
|
7510
7540
|
navigateOptions = (arguments.length <= 0 ? undefined : arguments[0]) || {};
|
|
@@ -7588,6 +7618,7 @@
|
|
|
7588
7618
|
}
|
|
7589
7619
|
router.currentRoute = previousRoute;
|
|
7590
7620
|
router.history.pop();
|
|
7621
|
+
router.propsHistory.pop();
|
|
7591
7622
|
router.saveHistory();
|
|
7592
7623
|
if (needHistoryBack && isBrokenBrowserHistory && !currentRouteWithoutBrowserHistory) {
|
|
7593
7624
|
History$1.back();
|
|
@@ -7630,7 +7661,8 @@
|
|
|
7630
7661
|
if (!navigateOptions.force && $previousPage.length && !skipMaster) {
|
|
7631
7662
|
if (router.params.browserHistory && $previousPage[0].f7Page && router.history[router.history.length - 2] !== $previousPage[0].f7Page.route.url) {
|
|
7632
7663
|
router.back(router.history[router.history.length - 2], extend$2(navigateOptions, {
|
|
7633
|
-
force: true
|
|
7664
|
+
force: true,
|
|
7665
|
+
props: router.propsHistory[router.propsHistory.length - 2] || {}
|
|
7634
7666
|
}));
|
|
7635
7667
|
return router;
|
|
7636
7668
|
}
|
|
@@ -7654,11 +7686,13 @@
|
|
|
7654
7686
|
}
|
|
7655
7687
|
if (!navigateUrl && router.history.length > 1) {
|
|
7656
7688
|
navigateUrl = router.history[router.history.length - 2];
|
|
7689
|
+
navigateProps = router.propsHistory[router.propsHistory.length - 2] || {};
|
|
7657
7690
|
}
|
|
7658
7691
|
if (skipMaster && !navigateOptions.force && router.history[router.history.length - 3]) {
|
|
7659
7692
|
return router.back(router.history[router.history.length - 3], extend$2({}, navigateOptions || {}, {
|
|
7660
7693
|
force: true,
|
|
7661
|
-
animate: false
|
|
7694
|
+
animate: false,
|
|
7695
|
+
props: router.propsHistory[router.propsHistory.length - 3] || {}
|
|
7662
7696
|
}));
|
|
7663
7697
|
}
|
|
7664
7698
|
if (skipMaster && !navigateOptions.force) {
|
|
@@ -7688,9 +7722,13 @@
|
|
|
7688
7722
|
}
|
|
7689
7723
|
const options = {};
|
|
7690
7724
|
if (route.route.options) {
|
|
7691
|
-
extend$2(options, route.route.options, navigateOptions
|
|
7725
|
+
extend$2(options, route.route.options, navigateOptions, {
|
|
7726
|
+
props: navigateProps || {}
|
|
7727
|
+
});
|
|
7692
7728
|
} else {
|
|
7693
|
-
extend$2(options, navigateOptions
|
|
7729
|
+
extend$2(options, navigateOptions, {
|
|
7730
|
+
props: navigateProps || {}
|
|
7731
|
+
});
|
|
7694
7732
|
}
|
|
7695
7733
|
options.route = route;
|
|
7696
7734
|
function resolve() {
|
|
@@ -7814,6 +7852,7 @@
|
|
|
7814
7852
|
params: view.params,
|
|
7815
7853
|
routes: view.routes,
|
|
7816
7854
|
history: view.history,
|
|
7855
|
+
propsHistory: [],
|
|
7817
7856
|
scrollHistory: view.scrollHistory,
|
|
7818
7857
|
cache: app.cache,
|
|
7819
7858
|
dynamicNavbar: app.theme === 'ios' && view.params.iosDynamicNavbar,
|
|
@@ -8807,11 +8846,11 @@
|
|
|
8807
8846
|
}
|
|
8808
8847
|
} else {
|
|
8809
8848
|
if (browserHistoryRoot && documentUrl.indexOf(browserHistoryRoot) >= 0) {
|
|
8810
|
-
documentUrl = documentUrl.
|
|
8849
|
+
documentUrl = documentUrl.substring(documentUrl.indexOf(browserHistoryRoot) + browserHistoryRoot.length);
|
|
8811
8850
|
if (documentUrl === '') documentUrl = '/';
|
|
8812
8851
|
}
|
|
8813
8852
|
if (browserHistorySeparator.length > 0 && documentUrl.indexOf(browserHistorySeparator) >= 0) {
|
|
8814
|
-
initialUrl = documentUrl.
|
|
8853
|
+
initialUrl = documentUrl.substring(documentUrl.indexOf(browserHistorySeparator) + browserHistorySeparator.length);
|
|
8815
8854
|
} else {
|
|
8816
8855
|
initialUrl = documentUrl;
|
|
8817
8856
|
}
|
|
@@ -18498,6 +18537,8 @@
|
|
|
18498
18537
|
modifyHtmlClasses = true;
|
|
18499
18538
|
}
|
|
18500
18539
|
const panel = this;
|
|
18540
|
+
// eslint-disable-next-line
|
|
18541
|
+
panel._openTransitionStarted = false;
|
|
18501
18542
|
const app = panel.app;
|
|
18502
18543
|
panel.opened = true;
|
|
18503
18544
|
app.panel.allowOpen = false;
|
|
@@ -18632,6 +18673,12 @@
|
|
|
18632
18673
|
$viewEl.add($containerEl.children('.page-content, .tabs'));
|
|
18633
18674
|
}
|
|
18634
18675
|
const transitionEndTarget = effect === 'reveal' ? $viewEl : $el;
|
|
18676
|
+
function panelTransitionStart() {
|
|
18677
|
+
transitionEndTarget.transitionStart(() => {
|
|
18678
|
+
// eslint-disable-next-line
|
|
18679
|
+
panel._openTransitionStarted = true;
|
|
18680
|
+
});
|
|
18681
|
+
}
|
|
18635
18682
|
function panelTransitionEnd() {
|
|
18636
18683
|
transitionEndTarget.transitionEnd(e => {
|
|
18637
18684
|
if ($(e.target).is(transitionEndTarget)) {
|
|
@@ -18647,6 +18694,7 @@
|
|
|
18647
18694
|
if ($backdropEl) {
|
|
18648
18695
|
$backdropEl.removeClass('not-animated');
|
|
18649
18696
|
}
|
|
18697
|
+
panelTransitionStart();
|
|
18650
18698
|
panelTransitionEnd();
|
|
18651
18699
|
$el.removeClass('panel-out not-animated').addClass('panel-in');
|
|
18652
18700
|
panel.onOpen();
|
|
@@ -18682,6 +18730,11 @@
|
|
|
18682
18730
|
$viewEl.add($containerEl.children('.page-content, .tabs'));
|
|
18683
18731
|
}
|
|
18684
18732
|
const transitionEndTarget = effect === 'reveal' ? $viewEl : $el;
|
|
18733
|
+
// eslint-disable-next-line
|
|
18734
|
+
if (!panel._openTransitionStarted) {
|
|
18735
|
+
// eslint-disable-next-line
|
|
18736
|
+
animate = false;
|
|
18737
|
+
}
|
|
18685
18738
|
function transitionEnd() {
|
|
18686
18739
|
if ($el.hasClass('panel-out')) {
|
|
18687
18740
|
panel.onClosed();
|
|
@@ -21829,7 +21882,7 @@
|
|
|
21829
21882
|
}
|
|
21830
21883
|
ss.$selectEl.trigger('change');
|
|
21831
21884
|
if (ss.params.setValueText) {
|
|
21832
|
-
ss
|
|
21885
|
+
ss.formatValueTextContent(optionText);
|
|
21833
21886
|
}
|
|
21834
21887
|
if (ss.params.closeOnSelect && ss.inputType === 'radio') {
|
|
21835
21888
|
ss.close();
|
|
@@ -21881,7 +21934,7 @@
|
|
|
21881
21934
|
ss.selectEl.value = newValue;
|
|
21882
21935
|
}
|
|
21883
21936
|
if (ss.params.setValueText) {
|
|
21884
|
-
ss
|
|
21937
|
+
ss.formatValueTextContent(optionText);
|
|
21885
21938
|
}
|
|
21886
21939
|
ss.$selectEl.trigger('change');
|
|
21887
21940
|
return ss;
|
|
@@ -21889,7 +21942,7 @@
|
|
|
21889
21942
|
unsetValue() {
|
|
21890
21943
|
const ss = this;
|
|
21891
21944
|
if (ss.params.setValueText) {
|
|
21892
|
-
ss
|
|
21945
|
+
ss.formatValueTextContent([]);
|
|
21893
21946
|
}
|
|
21894
21947
|
ss.$selectEl.find('option').each(optionEl => {
|
|
21895
21948
|
optionEl.selected = false;
|
|
@@ -21937,6 +21990,15 @@
|
|
|
21937
21990
|
$containerEl.find('.disabled').removeClass('disabled');
|
|
21938
21991
|
}
|
|
21939
21992
|
}
|
|
21993
|
+
formatValueTextContent(values) {
|
|
21994
|
+
const ss = this;
|
|
21995
|
+
const valueFormatted = ss.formatValueText(values);
|
|
21996
|
+
if (valueFormatted.includes('<') && valueFormatted.includes('>')) {
|
|
21997
|
+
ss.$valueEl.html(valueFormatted);
|
|
21998
|
+
} else {
|
|
21999
|
+
ss.$valueEl.text(valueFormatted);
|
|
22000
|
+
}
|
|
22001
|
+
}
|
|
21940
22002
|
formatValueText(values) {
|
|
21941
22003
|
const ss = this;
|
|
21942
22004
|
let textValue;
|
|
@@ -21970,7 +22032,7 @@
|
|
|
21970
22032
|
});
|
|
21971
22033
|
}
|
|
21972
22034
|
if (ss.params.setValueText) {
|
|
21973
|
-
ss
|
|
22035
|
+
ss.formatValueTextContent(valueArray);
|
|
21974
22036
|
}
|
|
21975
22037
|
}
|
|
21976
22038
|
getItemsData() {
|
|
@@ -21985,6 +22047,7 @@
|
|
|
21985
22047
|
const optionIcon = optionData.optionIcon || ss.params.optionIcon;
|
|
21986
22048
|
const optionIconIos = theme === 'ios' && (optionData.optionIconIos || ss.params.optionIconIos);
|
|
21987
22049
|
const optionIconMd = theme === 'md' && (optionData.optionIconMd || ss.params.optionIconMd);
|
|
22050
|
+
const optionInputIconPosition = optionData.inputIconPosition || ss.params.inputIconPosition || '';
|
|
21988
22051
|
const optionHasMedia = optionImage || optionIcon || optionIconIos || optionIconMd;
|
|
21989
22052
|
const optionColor = optionData.optionColor;
|
|
21990
22053
|
let optionClassName = optionData.optionClass || '';
|
|
@@ -22010,6 +22073,7 @@
|
|
|
22010
22073
|
icon: optionIcon,
|
|
22011
22074
|
iconIos: optionIconIos,
|
|
22012
22075
|
iconMd: optionIconMd,
|
|
22076
|
+
inputIconPosition: optionInputIconPosition,
|
|
22013
22077
|
color: optionColor,
|
|
22014
22078
|
className: optionClassName,
|
|
22015
22079
|
disabled: $optionEl[0].disabled,
|
|
@@ -22093,7 +22157,7 @@
|
|
|
22093
22157
|
itemHtml = $jsx$1("li", {
|
|
22094
22158
|
class: `${item.className || ''}${disabled ? ' disabled' : ''}`
|
|
22095
22159
|
}, $jsx$1("label", {
|
|
22096
|
-
class: `item-${item.inputType} item-content`
|
|
22160
|
+
class: `item-${item.inputType} ${item.inputIconPosition ? `item-${item.inputType}-icon-${item.inputIconPosition}` : ''} item-content`
|
|
22097
22161
|
}, $jsx$1("input", {
|
|
22098
22162
|
type: item.inputType,
|
|
22099
22163
|
name: item.inputName,
|
|
@@ -22411,6 +22475,7 @@
|
|
|
22411
22475
|
content: popupHtml,
|
|
22412
22476
|
push: ss.params.popupPush,
|
|
22413
22477
|
swipeToClose: ss.params.popupSwipeToClose,
|
|
22478
|
+
closeByBackdropClick: ss.params.closeByBackdropClick,
|
|
22414
22479
|
on: {
|
|
22415
22480
|
popupOpen(popup) {
|
|
22416
22481
|
ss.onOpen('popup', popup.el);
|
|
@@ -22451,6 +22516,7 @@
|
|
|
22451
22516
|
closeByOutsideClick: true,
|
|
22452
22517
|
push: ss.params.sheetPush,
|
|
22453
22518
|
swipeToClose: ss.params.sheetSwipeToClose,
|
|
22519
|
+
closeByBackdropClick: ss.params.closeByBackdropClick,
|
|
22454
22520
|
on: {
|
|
22455
22521
|
sheetOpen(sheet) {
|
|
22456
22522
|
ss.onOpen('sheet', sheet.el);
|
|
@@ -22487,6 +22553,7 @@
|
|
|
22487
22553
|
const popoverParams = {
|
|
22488
22554
|
content: popoverHtml,
|
|
22489
22555
|
targetEl: ss.$el,
|
|
22556
|
+
closeByBackdropClick: ss.params.closeByBackdropClick,
|
|
22490
22557
|
on: {
|
|
22491
22558
|
popoverOpen(popover) {
|
|
22492
22559
|
ss.onOpen('popover', popover.el);
|
|
@@ -22590,6 +22657,7 @@
|
|
|
22590
22657
|
pageBackLinkText: 'Back',
|
|
22591
22658
|
popupCloseLinkText: 'Close',
|
|
22592
22659
|
popupTabletFullscreen: false,
|
|
22660
|
+
closeByBackdropClick: true,
|
|
22593
22661
|
sheetCloseLinkText: 'Done',
|
|
22594
22662
|
searchbar: false,
|
|
22595
22663
|
searchbarPlaceholder: 'Search',
|
|
@@ -22604,6 +22672,7 @@
|
|
|
22604
22672
|
navbarColorTheme: undefined,
|
|
22605
22673
|
routableModals: false,
|
|
22606
22674
|
url: 'select/',
|
|
22675
|
+
inputIconPosition: 'start',
|
|
22607
22676
|
cssClass: '',
|
|
22608
22677
|
/*
|
|
22609
22678
|
Custom render functions
|
|
@@ -30183,11 +30252,13 @@
|
|
|
30183
30252
|
Object.keys(object).forEach(key => {
|
|
30184
30253
|
try {
|
|
30185
30254
|
object[key] = null;
|
|
30186
|
-
} catch (e) {
|
|
30255
|
+
} catch (e) {
|
|
30256
|
+
// no getter for object
|
|
30187
30257
|
}
|
|
30188
30258
|
try {
|
|
30189
30259
|
delete object[key];
|
|
30190
|
-
} catch (e) {
|
|
30260
|
+
} catch (e) {
|
|
30261
|
+
// something got wrong
|
|
30191
30262
|
}
|
|
30192
30263
|
});
|
|
30193
30264
|
}
|
|
@@ -30227,9 +30298,9 @@
|
|
|
30227
30298
|
curTransform = curStyle.transform || curStyle.webkitTransform;
|
|
30228
30299
|
if (curTransform.split(',').length > 6) {
|
|
30229
30300
|
curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');
|
|
30230
|
-
}
|
|
30301
|
+
}
|
|
30302
|
+
// Some old versions of Webkit choke when 'none' is passed; pass
|
|
30231
30303
|
// empty string instead in this case
|
|
30232
|
-
|
|
30233
30304
|
transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
|
|
30234
30305
|
} else {
|
|
30235
30306
|
transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
|
|
@@ -30237,14 +30308,18 @@
|
|
|
30237
30308
|
}
|
|
30238
30309
|
if (axis === 'x') {
|
|
30239
30310
|
// Latest Chrome and webkits Fix
|
|
30240
|
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
|
|
30241
|
-
|
|
30311
|
+
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
|
|
30312
|
+
// Crazy IE10 Matrix
|
|
30313
|
+
else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
|
|
30314
|
+
// Normal Browsers
|
|
30242
30315
|
else curTransform = parseFloat(matrix[4]);
|
|
30243
30316
|
}
|
|
30244
30317
|
if (axis === 'y') {
|
|
30245
30318
|
// Latest Chrome and webkits Fix
|
|
30246
|
-
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
|
|
30247
|
-
|
|
30319
|
+
if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
|
|
30320
|
+
// Crazy IE10 Matrix
|
|
30321
|
+
else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
|
|
30322
|
+
// Normal Browsers
|
|
30248
30323
|
else curTransform = parseFloat(matrix[5]);
|
|
30249
30324
|
}
|
|
30250
30325
|
return curTransform || 0;
|
|
@@ -30390,7 +30465,6 @@
|
|
|
30390
30465
|
const prevEls = [];
|
|
30391
30466
|
while (el.previousElementSibling) {
|
|
30392
30467
|
const prev = el.previousElementSibling; // eslint-disable-line
|
|
30393
|
-
|
|
30394
30468
|
if (selector) {
|
|
30395
30469
|
if (prev.matches(selector)) prevEls.push(prev);
|
|
30396
30470
|
} else prevEls.push(prev);
|
|
@@ -30402,7 +30476,6 @@
|
|
|
30402
30476
|
const nextEls = [];
|
|
30403
30477
|
while (el.nextElementSibling) {
|
|
30404
30478
|
const next = el.nextElementSibling; // eslint-disable-line
|
|
30405
|
-
|
|
30406
30479
|
if (selector) {
|
|
30407
30480
|
if (next.matches(selector)) nextEls.push(next);
|
|
30408
30481
|
} else nextEls.push(next);
|
|
@@ -30418,8 +30491,8 @@
|
|
|
30418
30491
|
let child = el;
|
|
30419
30492
|
let i;
|
|
30420
30493
|
if (child) {
|
|
30421
|
-
i = 0;
|
|
30422
|
-
|
|
30494
|
+
i = 0;
|
|
30495
|
+
// eslint-disable-next-line
|
|
30423
30496
|
while ((child = child.previousSibling) !== null) {
|
|
30424
30497
|
if (child.nodeType === 1) i += 1;
|
|
30425
30498
|
}
|
|
@@ -30429,9 +30502,7 @@
|
|
|
30429
30502
|
}
|
|
30430
30503
|
function elementParents(el, selector) {
|
|
30431
30504
|
const parents = []; // eslint-disable-line
|
|
30432
|
-
|
|
30433
30505
|
let parent = el.parentElement; // eslint-disable-line
|
|
30434
|
-
|
|
30435
30506
|
while (parent) {
|
|
30436
30507
|
if (selector) {
|
|
30437
30508
|
if (parent.matches(selector)) parents.push(parent);
|
|
@@ -30492,20 +30563,21 @@
|
|
|
30492
30563
|
const screenWidth = window.screen.width;
|
|
30493
30564
|
const screenHeight = window.screen.height;
|
|
30494
30565
|
const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
|
|
30495
|
-
|
|
30496
30566
|
let ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
|
|
30497
30567
|
const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
|
|
30498
30568
|
const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
|
|
30499
30569
|
const windows = platform === 'Win32';
|
|
30500
|
-
let macos = platform === 'MacIntel';
|
|
30570
|
+
let macos = platform === 'MacIntel';
|
|
30501
30571
|
|
|
30572
|
+
// iPadOs 13 fix
|
|
30502
30573
|
const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];
|
|
30503
30574
|
if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {
|
|
30504
30575
|
ipad = ua.match(/(Version)\/([\d.]+)/);
|
|
30505
30576
|
if (!ipad) ipad = [0, 1, '13_0_0'];
|
|
30506
30577
|
macos = false;
|
|
30507
|
-
}
|
|
30578
|
+
}
|
|
30508
30579
|
|
|
30580
|
+
// Android
|
|
30509
30581
|
if (android && !windows) {
|
|
30510
30582
|
device.os = 'android';
|
|
30511
30583
|
device.android = true;
|
|
@@ -30513,8 +30585,9 @@
|
|
|
30513
30585
|
if (ipad || iphone || ipod) {
|
|
30514
30586
|
device.os = 'ios';
|
|
30515
30587
|
device.ios = true;
|
|
30516
|
-
}
|
|
30588
|
+
}
|
|
30517
30589
|
|
|
30590
|
+
// Export object
|
|
30518
30591
|
return device;
|
|
30519
30592
|
}
|
|
30520
30593
|
function getDevice(overrides) {
|
|
@@ -30530,12 +30603,21 @@
|
|
|
30530
30603
|
let browser;
|
|
30531
30604
|
function calcBrowser() {
|
|
30532
30605
|
const window = getWindow();
|
|
30606
|
+
let needPerspectiveFix = false;
|
|
30533
30607
|
function isSafari() {
|
|
30534
30608
|
const ua = window.navigator.userAgent.toLowerCase();
|
|
30535
30609
|
return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;
|
|
30536
30610
|
}
|
|
30611
|
+
if (isSafari()) {
|
|
30612
|
+
const ua = String(window.navigator.userAgent);
|
|
30613
|
+
if (ua.includes('Version/')) {
|
|
30614
|
+
const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num));
|
|
30615
|
+
needPerspectiveFix = major < 16 || major === 16 && minor < 2;
|
|
30616
|
+
}
|
|
30617
|
+
}
|
|
30537
30618
|
return {
|
|
30538
|
-
isSafari: isSafari(),
|
|
30619
|
+
isSafari: needPerspectiveFix || isSafari(),
|
|
30620
|
+
needPerspectiveFix,
|
|
30539
30621
|
isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent)
|
|
30540
30622
|
};
|
|
30541
30623
|
}
|
|
@@ -30660,12 +30742,13 @@
|
|
|
30660
30742
|
for (let i = 0; i < containerParents.length; i += 1) {
|
|
30661
30743
|
attach(containerParents[i]);
|
|
30662
30744
|
}
|
|
30663
|
-
}
|
|
30664
|
-
|
|
30745
|
+
}
|
|
30746
|
+
// Observe container
|
|
30665
30747
|
attach(swiper.el, {
|
|
30666
30748
|
childList: swiper.params.observeSlideChildren
|
|
30667
|
-
});
|
|
30749
|
+
});
|
|
30668
30750
|
|
|
30751
|
+
// Observe wrapper
|
|
30669
30752
|
attach(swiper.wrapperEl, {
|
|
30670
30753
|
attributes: false
|
|
30671
30754
|
});
|
|
@@ -30686,6 +30769,7 @@
|
|
|
30686
30769
|
}
|
|
30687
30770
|
|
|
30688
30771
|
/* eslint-disable no-underscore-dangle */
|
|
30772
|
+
|
|
30689
30773
|
var eventsEmitter = {
|
|
30690
30774
|
on(events, handler, priority) {
|
|
30691
30775
|
const self = this;
|
|
@@ -30806,8 +30890,9 @@
|
|
|
30806
30890
|
}
|
|
30807
30891
|
if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {
|
|
30808
30892
|
return;
|
|
30809
|
-
}
|
|
30893
|
+
}
|
|
30810
30894
|
|
|
30895
|
+
// Subtract paddings
|
|
30811
30896
|
width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10);
|
|
30812
30897
|
height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10);
|
|
30813
30898
|
if (Number.isNaN(width)) width = 0;
|
|
@@ -30824,8 +30909,8 @@
|
|
|
30824
30909
|
function getDirectionLabel(property) {
|
|
30825
30910
|
if (swiper.isHorizontal()) {
|
|
30826
30911
|
return property;
|
|
30827
|
-
}
|
|
30828
|
-
|
|
30912
|
+
}
|
|
30913
|
+
// prettier-ignore
|
|
30829
30914
|
return {
|
|
30830
30915
|
'width': 'height',
|
|
30831
30916
|
'margin-top': 'margin-left',
|
|
@@ -30875,8 +30960,9 @@
|
|
|
30875
30960
|
if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
|
|
30876
30961
|
spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;
|
|
30877
30962
|
}
|
|
30878
|
-
swiper.virtualSize = -spaceBetween;
|
|
30963
|
+
swiper.virtualSize = -spaceBetween;
|
|
30879
30964
|
|
|
30965
|
+
// reset margins
|
|
30880
30966
|
slides.forEach(slideEl => {
|
|
30881
30967
|
if (rtl) {
|
|
30882
30968
|
slideEl.style.marginLeft = '';
|
|
@@ -30885,8 +30971,9 @@
|
|
|
30885
30971
|
}
|
|
30886
30972
|
slideEl.style.marginBottom = '';
|
|
30887
30973
|
slideEl.style.marginTop = '';
|
|
30888
|
-
});
|
|
30974
|
+
});
|
|
30889
30975
|
|
|
30976
|
+
// reset cssMode offsets
|
|
30890
30977
|
if (params.centeredSlides && params.cssMode) {
|
|
30891
30978
|
setCSSProperty(wrapperEl, '--swiper-centered-offset-before', '');
|
|
30892
30979
|
setCSSProperty(wrapperEl, '--swiper-centered-offset-after', '');
|
|
@@ -30894,8 +30981,9 @@
|
|
|
30894
30981
|
const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;
|
|
30895
30982
|
if (gridEnabled) {
|
|
30896
30983
|
swiper.grid.initSlides(slidesLength);
|
|
30897
|
-
}
|
|
30984
|
+
}
|
|
30898
30985
|
|
|
30986
|
+
// Calc slides
|
|
30899
30987
|
let slideSize;
|
|
30900
30988
|
const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {
|
|
30901
30989
|
return typeof params.breakpoints[key].slidesPerView !== 'undefined';
|
|
@@ -30987,8 +31075,9 @@
|
|
|
30987
31075
|
}
|
|
30988
31076
|
if (gridEnabled) {
|
|
30989
31077
|
swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel);
|
|
30990
|
-
}
|
|
31078
|
+
}
|
|
30991
31079
|
|
|
31080
|
+
// Remove last grid elements depending on width
|
|
30992
31081
|
if (!params.centeredSlides) {
|
|
30993
31082
|
const newSlidesGrid = [];
|
|
30994
31083
|
for (let i = 0; i < snapGrid.length; i += 1) {
|
|
@@ -31116,8 +31205,8 @@
|
|
|
31116
31205
|
return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0];
|
|
31117
31206
|
}
|
|
31118
31207
|
return swiper.slides[index];
|
|
31119
|
-
};
|
|
31120
|
-
|
|
31208
|
+
};
|
|
31209
|
+
// Find slides currently in view
|
|
31121
31210
|
if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
|
|
31122
31211
|
if (swiper.params.centeredSlides) {
|
|
31123
31212
|
(swiper.visibleSlides || []).forEach(slide => {
|
|
@@ -31132,23 +31221,27 @@
|
|
|
31132
31221
|
}
|
|
31133
31222
|
} else {
|
|
31134
31223
|
activeSlides.push(getSlideByIndex(swiper.activeIndex));
|
|
31135
|
-
}
|
|
31224
|
+
}
|
|
31136
31225
|
|
|
31226
|
+
// Find new height from highest slide in view
|
|
31137
31227
|
for (i = 0; i < activeSlides.length; i += 1) {
|
|
31138
31228
|
if (typeof activeSlides[i] !== 'undefined') {
|
|
31139
31229
|
const height = activeSlides[i].offsetHeight;
|
|
31140
31230
|
newHeight = height > newHeight ? height : newHeight;
|
|
31141
31231
|
}
|
|
31142
|
-
}
|
|
31232
|
+
}
|
|
31143
31233
|
|
|
31234
|
+
// Update Height
|
|
31144
31235
|
if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;
|
|
31145
31236
|
}
|
|
31146
31237
|
|
|
31147
31238
|
function updateSlidesOffset() {
|
|
31148
31239
|
const swiper = this;
|
|
31149
31240
|
const slides = swiper.slides;
|
|
31241
|
+
// eslint-disable-next-line
|
|
31242
|
+
const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;
|
|
31150
31243
|
for (let i = 0; i < slides.length; i += 1) {
|
|
31151
|
-
slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
|
|
31244
|
+
slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset;
|
|
31152
31245
|
}
|
|
31153
31246
|
}
|
|
31154
31247
|
|
|
@@ -31166,8 +31259,9 @@
|
|
|
31166
31259
|
if (slides.length === 0) return;
|
|
31167
31260
|
if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
|
|
31168
31261
|
let offsetCenter = -translate;
|
|
31169
|
-
if (rtl) offsetCenter = translate;
|
|
31262
|
+
if (rtl) offsetCenter = translate;
|
|
31170
31263
|
|
|
31264
|
+
// Visible Slides
|
|
31171
31265
|
slides.forEach(slideEl => {
|
|
31172
31266
|
slideEl.classList.remove(params.slideVisibleClass);
|
|
31173
31267
|
});
|
|
@@ -31197,8 +31291,8 @@
|
|
|
31197
31291
|
function updateProgress(translate) {
|
|
31198
31292
|
const swiper = this;
|
|
31199
31293
|
if (typeof translate === 'undefined') {
|
|
31200
|
-
const multiplier = swiper.rtlTranslate ? -1 : 1;
|
|
31201
|
-
|
|
31294
|
+
const multiplier = swiper.rtlTranslate ? -1 : 1;
|
|
31295
|
+
// eslint-disable-next-line
|
|
31202
31296
|
translate = swiper && swiper.translate && swiper.translate * multiplier || 0;
|
|
31203
31297
|
}
|
|
31204
31298
|
const params = swiper.params;
|
|
@@ -31217,8 +31311,12 @@
|
|
|
31217
31311
|
isEnd = true;
|
|
31218
31312
|
} else {
|
|
31219
31313
|
progress = (translate - swiper.minTranslate()) / translatesDiff;
|
|
31220
|
-
|
|
31221
|
-
|
|
31314
|
+
const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;
|
|
31315
|
+
const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;
|
|
31316
|
+
isBeginning = isBeginningRounded || progress <= 0;
|
|
31317
|
+
isEnd = isEndRounded || progress >= 1;
|
|
31318
|
+
if (isBeginningRounded) progress = 0;
|
|
31319
|
+
if (isEndRounded) progress = 1;
|
|
31222
31320
|
}
|
|
31223
31321
|
if (params.loop) {
|
|
31224
31322
|
const firstSlideIndex = elementIndex(swiper.slides.filter(el => el.getAttribute('data-swiper-slide-index') === '0')[0]);
|
|
@@ -31283,16 +31381,17 @@
|
|
|
31283
31381
|
}
|
|
31284
31382
|
if (activeSlide) {
|
|
31285
31383
|
// Active classes
|
|
31286
|
-
activeSlide.classList.add(params.slideActiveClass);
|
|
31384
|
+
activeSlide.classList.add(params.slideActiveClass);
|
|
31287
31385
|
|
|
31386
|
+
// Next Slide
|
|
31288
31387
|
let nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
|
31289
31388
|
if (params.loop && !nextSlide) {
|
|
31290
31389
|
nextSlide = slides[0];
|
|
31291
31390
|
}
|
|
31292
31391
|
if (nextSlide) {
|
|
31293
31392
|
nextSlide.classList.add(params.slideNextClass);
|
|
31294
|
-
}
|
|
31295
|
-
|
|
31393
|
+
}
|
|
31394
|
+
// Prev Slide
|
|
31296
31395
|
let prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
|
|
31297
31396
|
if (params.loop && !prevSlide === 0) {
|
|
31298
31397
|
prevSlide = slides[slides.length - 1];
|
|
@@ -31321,8 +31420,8 @@
|
|
|
31321
31420
|
} else if (translate >= slidesGrid[i]) {
|
|
31322
31421
|
activeIndex = i;
|
|
31323
31422
|
}
|
|
31324
|
-
}
|
|
31325
|
-
|
|
31423
|
+
}
|
|
31424
|
+
// Normalize slideIndex
|
|
31326
31425
|
if (params.normalizeSlideIndex) {
|
|
31327
31426
|
if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;
|
|
31328
31427
|
}
|
|
@@ -31369,8 +31468,8 @@
|
|
|
31369
31468
|
swiper.realIndex = getVirtualRealIndex(activeIndex);
|
|
31370
31469
|
}
|
|
31371
31470
|
return;
|
|
31372
|
-
}
|
|
31373
|
-
|
|
31471
|
+
}
|
|
31472
|
+
// Get real index
|
|
31374
31473
|
let realIndex;
|
|
31375
31474
|
if (swiper.virtual && params.virtual.enabled && params.loop) {
|
|
31376
31475
|
realIndex = getVirtualRealIndex(activeIndex);
|
|
@@ -31487,8 +31586,9 @@
|
|
|
31487
31586
|
wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;
|
|
31488
31587
|
}
|
|
31489
31588
|
swiper.previousTranslate = swiper.translate;
|
|
31490
|
-
swiper.translate = swiper.isHorizontal() ? x : y;
|
|
31589
|
+
swiper.translate = swiper.isHorizontal() ? x : y;
|
|
31491
31590
|
|
|
31591
|
+
// Check if we need to update progress
|
|
31492
31592
|
let newProgress;
|
|
31493
31593
|
const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
|
|
31494
31594
|
if (translatesDiff === 0) {
|
|
@@ -31534,8 +31634,9 @@
|
|
|
31534
31634
|
const minTranslate = swiper.minTranslate();
|
|
31535
31635
|
const maxTranslate = swiper.maxTranslate();
|
|
31536
31636
|
let newTranslate;
|
|
31537
|
-
if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;
|
|
31637
|
+
if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;
|
|
31538
31638
|
|
|
31639
|
+
// Update progress
|
|
31539
31640
|
swiper.updateProgress(newTranslate);
|
|
31540
31641
|
if (params.cssMode) {
|
|
31541
31642
|
const isH = swiper.isHorizontal();
|
|
@@ -31578,7 +31679,6 @@
|
|
|
31578
31679
|
if (!swiper || swiper.destroyed) return;
|
|
31579
31680
|
if (e.target !== this) return;
|
|
31580
31681
|
swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
|
31581
|
-
swiper.wrapperEl.removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);
|
|
31582
31682
|
swiper.onTranslateToWrapperTransitionEnd = null;
|
|
31583
31683
|
delete swiper.onTranslateToWrapperTransitionEnd;
|
|
31584
31684
|
if (runCallbacks) {
|
|
@@ -31587,7 +31687,6 @@
|
|
|
31587
31687
|
};
|
|
31588
31688
|
}
|
|
31589
31689
|
swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
|
|
31590
|
-
swiper.wrapperEl.addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd);
|
|
31591
31690
|
}
|
|
31592
31691
|
}
|
|
31593
31692
|
return true;
|
|
@@ -31716,8 +31815,8 @@
|
|
|
31716
31815
|
const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
|
|
31717
31816
|
let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
|
|
31718
31817
|
if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
|
|
31719
|
-
const translate = -snapGrid[snapIndex];
|
|
31720
|
-
|
|
31818
|
+
const translate = -snapGrid[snapIndex];
|
|
31819
|
+
// Normalize slideIndex
|
|
31721
31820
|
if (params.normalizeSlideIndex) {
|
|
31722
31821
|
for (let i = 0; i < slidesGrid.length; i += 1) {
|
|
31723
31822
|
const normalizedTranslate = -Math.floor(translate * 100);
|
|
@@ -31733,8 +31832,8 @@
|
|
|
31733
31832
|
slideIndex = i;
|
|
31734
31833
|
}
|
|
31735
31834
|
}
|
|
31736
|
-
}
|
|
31737
|
-
|
|
31835
|
+
}
|
|
31836
|
+
// Directions locks
|
|
31738
31837
|
if (swiper.initialized && slideIndex !== activeIndex) {
|
|
31739
31838
|
if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
|
|
31740
31839
|
return false;
|
|
@@ -31747,15 +31846,17 @@
|
|
|
31747
31846
|
}
|
|
31748
31847
|
if (slideIndex !== (previousIndex || 0) && runCallbacks) {
|
|
31749
31848
|
swiper.emit('beforeSlideChangeStart');
|
|
31750
|
-
}
|
|
31849
|
+
}
|
|
31751
31850
|
|
|
31851
|
+
// Update progress
|
|
31752
31852
|
swiper.updateProgress(translate);
|
|
31753
31853
|
let direction;
|
|
31754
|
-
if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';
|
|
31854
|
+
if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';
|
|
31755
31855
|
|
|
31856
|
+
// Update Index
|
|
31756
31857
|
if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) {
|
|
31757
|
-
swiper.updateActiveIndex(slideIndex);
|
|
31758
|
-
|
|
31858
|
+
swiper.updateActiveIndex(slideIndex);
|
|
31859
|
+
// Update Height
|
|
31759
31860
|
if (params.autoHeight) {
|
|
31760
31861
|
swiper.updateAutoHeight();
|
|
31761
31862
|
}
|
|
@@ -31823,14 +31924,12 @@
|
|
|
31823
31924
|
if (!swiper || swiper.destroyed) return;
|
|
31824
31925
|
if (e.target !== this) return;
|
|
31825
31926
|
swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
31826
|
-
swiper.wrapperEl.removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
|
31827
31927
|
swiper.onSlideToWrapperTransitionEnd = null;
|
|
31828
31928
|
delete swiper.onSlideToWrapperTransitionEnd;
|
|
31829
31929
|
swiper.transitionEnd(runCallbacks, direction);
|
|
31830
31930
|
};
|
|
31831
31931
|
}
|
|
31832
31932
|
swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
|
|
31833
|
-
swiper.wrapperEl.addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
|
|
31834
31933
|
}
|
|
31835
31934
|
return true;
|
|
31836
31935
|
}
|
|
@@ -31873,7 +31972,8 @@
|
|
|
31873
31972
|
const swiper = this;
|
|
31874
31973
|
const {
|
|
31875
31974
|
enabled,
|
|
31876
|
-
params
|
|
31975
|
+
params,
|
|
31976
|
+
animating
|
|
31877
31977
|
} = swiper;
|
|
31878
31978
|
if (!enabled) return swiper;
|
|
31879
31979
|
let perGroup = params.slidesPerGroup;
|
|
@@ -31881,9 +31981,13 @@
|
|
|
31881
31981
|
perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);
|
|
31882
31982
|
}
|
|
31883
31983
|
const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;
|
|
31984
|
+
const isVirtual = swiper.virtual && params.virtual.enabled;
|
|
31884
31985
|
if (params.loop) {
|
|
31885
|
-
|
|
31886
|
-
|
|
31986
|
+
if (animating && !isVirtual && params.loopPreventsSliding) return false;
|
|
31987
|
+
swiper.loopFix({
|
|
31988
|
+
direction: 'next'
|
|
31989
|
+
});
|
|
31990
|
+
// eslint-disable-next-line
|
|
31887
31991
|
swiper._clientLeft = swiper.wrapperEl.clientLeft;
|
|
31888
31992
|
}
|
|
31889
31993
|
if (params.rewind && swiper.isEnd) {
|
|
@@ -31906,12 +32010,17 @@
|
|
|
31906
32010
|
snapGrid,
|
|
31907
32011
|
slidesGrid,
|
|
31908
32012
|
rtlTranslate,
|
|
31909
|
-
enabled
|
|
32013
|
+
enabled,
|
|
32014
|
+
animating
|
|
31910
32015
|
} = swiper;
|
|
31911
32016
|
if (!enabled) return swiper;
|
|
32017
|
+
const isVirtual = swiper.virtual && params.virtual.enabled;
|
|
31912
32018
|
if (params.loop) {
|
|
31913
|
-
|
|
31914
|
-
|
|
32019
|
+
if (animating && !isVirtual && params.loopPreventsSliding) return false;
|
|
32020
|
+
swiper.loopFix({
|
|
32021
|
+
direction: 'prev'
|
|
32022
|
+
});
|
|
32023
|
+
// eslint-disable-next-line
|
|
31915
32024
|
swiper._clientLeft = swiper.wrapperEl.clientLeft;
|
|
31916
32025
|
}
|
|
31917
32026
|
const translate = rtlTranslate ? swiper.translate : -swiper.translate;
|
|
@@ -32058,13 +32167,22 @@
|
|
|
32058
32167
|
slides.forEach((el, index) => {
|
|
32059
32168
|
el.setAttribute('data-swiper-slide-index', index);
|
|
32060
32169
|
});
|
|
32061
|
-
swiper.loopFix(
|
|
32170
|
+
swiper.loopFix({
|
|
32171
|
+
slideRealIndex,
|
|
32172
|
+
direction: params.centeredSlides ? undefined : 'next'
|
|
32173
|
+
});
|
|
32062
32174
|
}
|
|
32063
32175
|
|
|
32064
|
-
function loopFix(
|
|
32065
|
-
|
|
32066
|
-
|
|
32067
|
-
|
|
32176
|
+
function loopFix(_temp) {
|
|
32177
|
+
let {
|
|
32178
|
+
slideRealIndex,
|
|
32179
|
+
slideTo = true,
|
|
32180
|
+
direction,
|
|
32181
|
+
setTranslate,
|
|
32182
|
+
activeSlideIndex,
|
|
32183
|
+
byController,
|
|
32184
|
+
byMousewheel
|
|
32185
|
+
} = _temp === void 0 ? {} : _temp;
|
|
32068
32186
|
const swiper = this;
|
|
32069
32187
|
if (!swiper.params.loop) return;
|
|
32070
32188
|
swiper.emit('beforeLoopFix');
|
|
@@ -32093,51 +32211,83 @@
|
|
|
32093
32211
|
return;
|
|
32094
32212
|
}
|
|
32095
32213
|
const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10));
|
|
32096
|
-
let loopedSlides = slidesPerView;
|
|
32214
|
+
let loopedSlides = params.loopedSlides || slidesPerView;
|
|
32097
32215
|
if (loopedSlides % params.slidesPerGroup !== 0) {
|
|
32098
32216
|
loopedSlides += params.slidesPerGroup - loopedSlides % params.slidesPerGroup;
|
|
32099
32217
|
}
|
|
32100
32218
|
swiper.loopedSlides = loopedSlides;
|
|
32101
32219
|
const prependSlidesIndexes = [];
|
|
32102
32220
|
const appendSlidesIndexes = [];
|
|
32103
|
-
|
|
32221
|
+
let activeIndex = swiper.activeIndex;
|
|
32222
|
+
if (typeof activeSlideIndex === 'undefined') {
|
|
32223
|
+
activeSlideIndex = elementIndex(swiper.slides.filter(el => el.classList.contains('swiper-slide-active'))[0]);
|
|
32224
|
+
} else {
|
|
32225
|
+
activeIndex = activeSlideIndex;
|
|
32226
|
+
}
|
|
32227
|
+
const isNext = direction === 'next' || !direction;
|
|
32228
|
+
const isPrev = direction === 'prev' || !direction;
|
|
32104
32229
|
let slidesPrepended = 0;
|
|
32105
|
-
let slidesAppended = 0;
|
|
32106
|
-
|
|
32230
|
+
let slidesAppended = 0;
|
|
32231
|
+
// prepend last slides before start
|
|
32107
32232
|
if (activeSlideIndex < loopedSlides) {
|
|
32108
32233
|
slidesPrepended = loopedSlides - activeSlideIndex;
|
|
32109
32234
|
for (let i = 0; i < loopedSlides - activeSlideIndex; i += 1) {
|
|
32110
32235
|
const index = i - Math.floor(i / slides.length) * slides.length;
|
|
32111
32236
|
prependSlidesIndexes.push(slides.length - index - 1);
|
|
32112
32237
|
}
|
|
32113
|
-
} else if (activeSlideIndex
|
|
32114
|
-
/* + slidesPerView */ > swiper.slides.length - loopedSlides * 2) {
|
|
32238
|
+
} else if (activeSlideIndex /* + slidesPerView */ > swiper.slides.length - loopedSlides * 2) {
|
|
32115
32239
|
slidesAppended = activeSlideIndex - (swiper.slides.length - loopedSlides * 2);
|
|
32116
32240
|
for (let i = 0; i < slidesAppended; i += 1) {
|
|
32117
32241
|
const index = i - Math.floor(i / slides.length) * slides.length;
|
|
32118
32242
|
appendSlidesIndexes.push(index);
|
|
32119
32243
|
}
|
|
32120
32244
|
}
|
|
32121
|
-
|
|
32122
|
-
|
|
32123
|
-
|
|
32124
|
-
|
|
32125
|
-
|
|
32126
|
-
|
|
32245
|
+
if (isPrev) {
|
|
32246
|
+
prependSlidesIndexes.forEach(index => {
|
|
32247
|
+
slidesEl.prepend(swiper.slides[index]);
|
|
32248
|
+
});
|
|
32249
|
+
}
|
|
32250
|
+
if (isNext) {
|
|
32251
|
+
appendSlidesIndexes.forEach(index => {
|
|
32252
|
+
slidesEl.append(swiper.slides[index]);
|
|
32253
|
+
});
|
|
32254
|
+
}
|
|
32127
32255
|
swiper.recalcSlides();
|
|
32128
32256
|
if (params.watchSlidesProgress) {
|
|
32129
32257
|
swiper.updateSlidesOffset();
|
|
32130
32258
|
}
|
|
32131
32259
|
if (slideTo) {
|
|
32132
|
-
if (prependSlidesIndexes.length > 0) {
|
|
32260
|
+
if (prependSlidesIndexes.length > 0 && isPrev) {
|
|
32133
32261
|
if (typeof slideRealIndex === 'undefined') {
|
|
32134
|
-
swiper.
|
|
32262
|
+
const currentSlideTranslate = swiper.slidesGrid[activeIndex];
|
|
32263
|
+
const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];
|
|
32264
|
+
const diff = newSlideTranslate - currentSlideTranslate;
|
|
32265
|
+
if (byMousewheel) {
|
|
32266
|
+
swiper.setTranslate(swiper.translate - diff);
|
|
32267
|
+
} else {
|
|
32268
|
+
swiper.slideTo(activeIndex + slidesPrepended, 0, false, true);
|
|
32269
|
+
if (setTranslate) {
|
|
32270
|
+
swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;
|
|
32271
|
+
}
|
|
32272
|
+
}
|
|
32135
32273
|
} else {
|
|
32136
|
-
|
|
32274
|
+
if (setTranslate) {
|
|
32275
|
+
swiper.slideToLoop(slideRealIndex, 0, false, true);
|
|
32276
|
+
}
|
|
32137
32277
|
}
|
|
32138
|
-
} else if (appendSlidesIndexes.length > 0) {
|
|
32278
|
+
} else if (appendSlidesIndexes.length > 0 && isNext) {
|
|
32139
32279
|
if (typeof slideRealIndex === 'undefined') {
|
|
32140
|
-
swiper.
|
|
32280
|
+
const currentSlideTranslate = swiper.slidesGrid[activeIndex];
|
|
32281
|
+
const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];
|
|
32282
|
+
const diff = newSlideTranslate - currentSlideTranslate;
|
|
32283
|
+
if (byMousewheel) {
|
|
32284
|
+
swiper.setTranslate(swiper.translate - diff);
|
|
32285
|
+
} else {
|
|
32286
|
+
swiper.slideTo(activeIndex - slidesAppended, 0, false, true);
|
|
32287
|
+
if (setTranslate) {
|
|
32288
|
+
swiper.touches[swiper.isHorizontal() ? 'startX' : 'startY'] += diff;
|
|
32289
|
+
}
|
|
32290
|
+
}
|
|
32141
32291
|
} else {
|
|
32142
32292
|
swiper.slideToLoop(slideRealIndex, 0, false, true);
|
|
32143
32293
|
}
|
|
@@ -32145,6 +32295,23 @@
|
|
|
32145
32295
|
}
|
|
32146
32296
|
swiper.allowSlidePrev = allowSlidePrev;
|
|
32147
32297
|
swiper.allowSlideNext = allowSlideNext;
|
|
32298
|
+
if (swiper.controller && swiper.controller.control && !byController) {
|
|
32299
|
+
const loopParams = {
|
|
32300
|
+
slideRealIndex,
|
|
32301
|
+
slideTo: false,
|
|
32302
|
+
direction,
|
|
32303
|
+
setTranslate,
|
|
32304
|
+
activeSlideIndex,
|
|
32305
|
+
byController: true
|
|
32306
|
+
};
|
|
32307
|
+
if (Array.isArray(swiper.controller.control)) {
|
|
32308
|
+
swiper.controller.control.forEach(c => {
|
|
32309
|
+
if (c.params.loop) c.loopFix(loopParams);
|
|
32310
|
+
});
|
|
32311
|
+
} else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {
|
|
32312
|
+
swiper.controller.control.loopFix(loopParams);
|
|
32313
|
+
}
|
|
32314
|
+
}
|
|
32148
32315
|
swiper.emit('loopFix');
|
|
32149
32316
|
}
|
|
32150
32317
|
|
|
@@ -32163,7 +32330,7 @@
|
|
|
32163
32330
|
newSlidesOrder[index] = slideEl;
|
|
32164
32331
|
});
|
|
32165
32332
|
slides.forEach(slideEl => {
|
|
32166
|
-
slideEl.
|
|
32333
|
+
slideEl.removeAttribute('data-swiper-slide-index');
|
|
32167
32334
|
});
|
|
32168
32335
|
newSlidesOrder.forEach(slideEl => {
|
|
32169
32336
|
slidesEl.append(slideEl);
|
|
@@ -32199,6 +32366,7 @@
|
|
|
32199
32366
|
unsetGrabCursor
|
|
32200
32367
|
};
|
|
32201
32368
|
|
|
32369
|
+
// Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd
|
|
32202
32370
|
function closestElement(selector, base) {
|
|
32203
32371
|
if (base === void 0) {
|
|
32204
32372
|
base = this;
|
|
@@ -32241,17 +32409,19 @@
|
|
|
32241
32409
|
}
|
|
32242
32410
|
if ('which' in e && e.which === 3) return;
|
|
32243
32411
|
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
|
|
32412
|
+
if (data.isTouched && data.isMoved) return;
|
|
32247
32413
|
|
|
32414
|
+
// change target el for shadow root component
|
|
32415
|
+
const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';
|
|
32416
|
+
// eslint-disable-next-line
|
|
32248
32417
|
const eventPath = event.composedPath ? event.composedPath() : event.path;
|
|
32249
32418
|
if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {
|
|
32250
32419
|
targetEl = eventPath[0];
|
|
32251
32420
|
}
|
|
32252
32421
|
const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;
|
|
32253
|
-
const isTargetShadow = !!(e.target && e.target.shadowRoot);
|
|
32422
|
+
const isTargetShadow = !!(e.target && e.target.shadowRoot);
|
|
32254
32423
|
|
|
32424
|
+
// use closestElement for shadow root element to get the actual closest for nested shadow root element
|
|
32255
32425
|
if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {
|
|
32256
32426
|
swiper.allowClick = true;
|
|
32257
32427
|
return;
|
|
@@ -32262,7 +32432,9 @@
|
|
|
32262
32432
|
touches.currentX = e.pageX;
|
|
32263
32433
|
touches.currentY = e.pageY;
|
|
32264
32434
|
const startX = touches.currentX;
|
|
32265
|
-
const startY = touches.currentY;
|
|
32435
|
+
const startY = touches.currentY;
|
|
32436
|
+
|
|
32437
|
+
// Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore
|
|
32266
32438
|
|
|
32267
32439
|
const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection;
|
|
32268
32440
|
const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold;
|
|
@@ -32345,6 +32517,8 @@
|
|
|
32345
32517
|
Object.assign(touches, {
|
|
32346
32518
|
startX: pageX,
|
|
32347
32519
|
startY: pageY,
|
|
32520
|
+
prevX: swiper.touches.currentX,
|
|
32521
|
+
prevY: swiper.touches.currentY,
|
|
32348
32522
|
currentX: pageX,
|
|
32349
32523
|
currentY: pageY
|
|
32350
32524
|
});
|
|
@@ -32414,52 +32588,95 @@
|
|
|
32414
32588
|
if (params.touchMoveStopPropagation && !params.nested) {
|
|
32415
32589
|
e.stopPropagation();
|
|
32416
32590
|
}
|
|
32591
|
+
let diff = swiper.isHorizontal() ? diffX : diffY;
|
|
32592
|
+
let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;
|
|
32593
|
+
if (params.oneWayMovement) {
|
|
32594
|
+
diff = Math.abs(diff) * (rtl ? 1 : -1);
|
|
32595
|
+
touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);
|
|
32596
|
+
}
|
|
32597
|
+
touches.diff = diff;
|
|
32598
|
+
diff *= params.touchRatio;
|
|
32599
|
+
if (rtl) {
|
|
32600
|
+
diff = -diff;
|
|
32601
|
+
touchesDiff = -touchesDiff;
|
|
32602
|
+
}
|
|
32603
|
+
const prevTouchesDirection = swiper.touchesDirection;
|
|
32604
|
+
swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
|
|
32605
|
+
swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';
|
|
32606
|
+
const isLoop = swiper.params.loop && !params.cssMode;
|
|
32417
32607
|
if (!data.isMoved) {
|
|
32418
|
-
if (
|
|
32419
|
-
swiper.loopFix(
|
|
32608
|
+
if (isLoop) {
|
|
32609
|
+
swiper.loopFix({
|
|
32610
|
+
direction: swiper.swipeDirection
|
|
32611
|
+
});
|
|
32420
32612
|
}
|
|
32421
32613
|
data.startTranslate = swiper.getTranslate();
|
|
32422
32614
|
swiper.setTransition(0);
|
|
32423
32615
|
if (swiper.animating) {
|
|
32424
|
-
|
|
32425
|
-
|
|
32426
|
-
|
|
32427
|
-
cancelable: true
|
|
32428
|
-
});
|
|
32429
|
-
swiper.wrapperEl.dispatchEvent(evt);
|
|
32616
|
+
const evt = new window.CustomEvent('transitionend', {
|
|
32617
|
+
bubbles: true,
|
|
32618
|
+
cancelable: true
|
|
32430
32619
|
});
|
|
32620
|
+
swiper.wrapperEl.dispatchEvent(evt);
|
|
32431
32621
|
}
|
|
32432
|
-
data.allowMomentumBounce = false;
|
|
32433
|
-
|
|
32622
|
+
data.allowMomentumBounce = false;
|
|
32623
|
+
// Grab Cursor
|
|
32434
32624
|
if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
|
32435
32625
|
swiper.setGrabCursor(true);
|
|
32436
32626
|
}
|
|
32437
32627
|
swiper.emit('sliderFirstMove', e);
|
|
32438
32628
|
}
|
|
32629
|
+
let loopFixed;
|
|
32630
|
+
if (data.isMoved && prevTouchesDirection !== swiper.touchesDirection && isLoop && Math.abs(diff) >= 1) {
|
|
32631
|
+
// need another loop fix
|
|
32632
|
+
swiper.loopFix({
|
|
32633
|
+
direction: swiper.swipeDirection,
|
|
32634
|
+
setTranslate: true
|
|
32635
|
+
});
|
|
32636
|
+
loopFixed = true;
|
|
32637
|
+
}
|
|
32439
32638
|
swiper.emit('sliderMove', e);
|
|
32440
32639
|
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
32640
|
data.currentTranslate = diff + data.startTranslate;
|
|
32447
32641
|
let disableParentSwiper = true;
|
|
32448
32642
|
let resistanceRatio = params.resistanceRatio;
|
|
32449
32643
|
if (params.touchReleaseOnEdges) {
|
|
32450
32644
|
resistanceRatio = 0;
|
|
32451
32645
|
}
|
|
32452
|
-
if (diff > 0
|
|
32453
|
-
|
|
32454
|
-
|
|
32455
|
-
|
|
32456
|
-
|
|
32457
|
-
|
|
32646
|
+
if (diff > 0) {
|
|
32647
|
+
if (isLoop && !loopFixed && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.size / 2 : swiper.minTranslate())) {
|
|
32648
|
+
swiper.loopFix({
|
|
32649
|
+
direction: 'prev',
|
|
32650
|
+
setTranslate: true,
|
|
32651
|
+
activeSlideIndex: 0
|
|
32652
|
+
});
|
|
32653
|
+
}
|
|
32654
|
+
if (data.currentTranslate > swiper.minTranslate()) {
|
|
32655
|
+
disableParentSwiper = false;
|
|
32656
|
+
if (params.resistance) {
|
|
32657
|
+
data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;
|
|
32658
|
+
}
|
|
32659
|
+
}
|
|
32660
|
+
} else if (diff < 0) {
|
|
32661
|
+
if (isLoop && !loopFixed && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.size / 2 : swiper.maxTranslate())) {
|
|
32662
|
+
swiper.loopFix({
|
|
32663
|
+
direction: 'next',
|
|
32664
|
+
setTranslate: true,
|
|
32665
|
+
activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))
|
|
32666
|
+
});
|
|
32667
|
+
}
|
|
32668
|
+
if (data.currentTranslate < swiper.maxTranslate()) {
|
|
32669
|
+
disableParentSwiper = false;
|
|
32670
|
+
if (params.resistance) {
|
|
32671
|
+
data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;
|
|
32672
|
+
}
|
|
32673
|
+
}
|
|
32458
32674
|
}
|
|
32459
32675
|
if (disableParentSwiper) {
|
|
32460
32676
|
e.preventedByNestedSwiper = true;
|
|
32461
|
-
}
|
|
32677
|
+
}
|
|
32462
32678
|
|
|
32679
|
+
// Directions locks
|
|
32463
32680
|
if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {
|
|
32464
32681
|
data.currentTranslate = data.startTranslate;
|
|
32465
32682
|
}
|
|
@@ -32468,8 +32685,9 @@
|
|
|
32468
32685
|
}
|
|
32469
32686
|
if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {
|
|
32470
32687
|
data.currentTranslate = data.startTranslate;
|
|
32471
|
-
}
|
|
32688
|
+
}
|
|
32472
32689
|
|
|
32690
|
+
// Threshold
|
|
32473
32691
|
if (params.threshold > 0) {
|
|
32474
32692
|
if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
|
|
32475
32693
|
if (!data.allowThresholdMove) {
|
|
@@ -32485,18 +32703,19 @@
|
|
|
32485
32703
|
return;
|
|
32486
32704
|
}
|
|
32487
32705
|
}
|
|
32488
|
-
if (!params.followFinger || params.cssMode) return;
|
|
32706
|
+
if (!params.followFinger || params.cssMode) return;
|
|
32489
32707
|
|
|
32708
|
+
// Update active index in free mode
|
|
32490
32709
|
if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {
|
|
32491
32710
|
swiper.updateActiveIndex();
|
|
32492
32711
|
swiper.updateSlidesClasses();
|
|
32493
32712
|
}
|
|
32494
32713
|
if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) {
|
|
32495
32714
|
swiper.freeMode.onTouchMove();
|
|
32496
|
-
}
|
|
32497
|
-
|
|
32498
|
-
swiper.updateProgress(data.currentTranslate);
|
|
32499
|
-
|
|
32715
|
+
}
|
|
32716
|
+
// Update progress
|
|
32717
|
+
swiper.updateProgress(data.currentTranslate);
|
|
32718
|
+
// Update translate
|
|
32500
32719
|
swiper.setTranslate(data.currentTranslate);
|
|
32501
32720
|
}
|
|
32502
32721
|
|
|
@@ -32530,15 +32749,17 @@
|
|
|
32530
32749
|
data.isMoved = false;
|
|
32531
32750
|
data.startMoving = false;
|
|
32532
32751
|
return;
|
|
32533
|
-
}
|
|
32534
|
-
|
|
32752
|
+
}
|
|
32753
|
+
// Return Grab Cursor
|
|
32535
32754
|
if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
|
|
32536
32755
|
swiper.setGrabCursor(false);
|
|
32537
|
-
}
|
|
32756
|
+
}
|
|
32538
32757
|
|
|
32758
|
+
// Time diff
|
|
32539
32759
|
const touchEndTime = now();
|
|
32540
|
-
const timeDiff = touchEndTime - data.touchStartTime;
|
|
32760
|
+
const timeDiff = touchEndTime - data.touchStartTime;
|
|
32541
32761
|
|
|
32762
|
+
// Tap, doubleTap, Click
|
|
32542
32763
|
if (swiper.allowClick) {
|
|
32543
32764
|
const pathTree = e.path || e.composedPath && e.composedPath();
|
|
32544
32765
|
swiper.updateClickedSlide(pathTree && pathTree[0] || e.target);
|
|
@@ -32574,8 +32795,9 @@
|
|
|
32574
32795
|
currentPos
|
|
32575
32796
|
});
|
|
32576
32797
|
return;
|
|
32577
|
-
}
|
|
32798
|
+
}
|
|
32578
32799
|
|
|
32800
|
+
// Find current slide
|
|
32579
32801
|
let stopIndex = 0;
|
|
32580
32802
|
let groupSize = swiper.slidesSizesGrid[0];
|
|
32581
32803
|
for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {
|
|
@@ -32598,8 +32820,8 @@
|
|
|
32598
32820
|
} else if (swiper.isEnd) {
|
|
32599
32821
|
rewindFirstIndex = 0;
|
|
32600
32822
|
}
|
|
32601
|
-
}
|
|
32602
|
-
|
|
32823
|
+
}
|
|
32824
|
+
// Find current slide size
|
|
32603
32825
|
const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
|
|
32604
32826
|
const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
|
|
32605
32827
|
if (timeDiff > params.longSwipesMs) {
|
|
@@ -32649,19 +32871,22 @@
|
|
|
32649
32871
|
params,
|
|
32650
32872
|
el
|
|
32651
32873
|
} = swiper;
|
|
32652
|
-
if (el && el.offsetWidth === 0) return;
|
|
32874
|
+
if (el && el.offsetWidth === 0) return;
|
|
32653
32875
|
|
|
32876
|
+
// Breakpoints
|
|
32654
32877
|
if (params.breakpoints) {
|
|
32655
32878
|
swiper.setBreakpoint();
|
|
32656
|
-
}
|
|
32879
|
+
}
|
|
32657
32880
|
|
|
32881
|
+
// Save locks
|
|
32658
32882
|
const {
|
|
32659
32883
|
allowSlideNext,
|
|
32660
32884
|
allowSlidePrev,
|
|
32661
32885
|
snapGrid
|
|
32662
32886
|
} = swiper;
|
|
32663
|
-
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
|
32887
|
+
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
|
32664
32888
|
|
|
32889
|
+
// Disable locks on resize
|
|
32665
32890
|
swiper.allowSlideNext = true;
|
|
32666
32891
|
swiper.allowSlidePrev = true;
|
|
32667
32892
|
swiper.updateSize();
|
|
@@ -32682,8 +32907,8 @@
|
|
|
32682
32907
|
timeout = setTimeout(() => {
|
|
32683
32908
|
swiper.autoplay.resume();
|
|
32684
32909
|
}, 500);
|
|
32685
|
-
}
|
|
32686
|
-
|
|
32910
|
+
}
|
|
32911
|
+
// Return locks after resize
|
|
32687
32912
|
swiper.allowSlidePrev = allowSlidePrev;
|
|
32688
32913
|
swiper.allowSlideNext = allowSlideNext;
|
|
32689
32914
|
if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
|
|
@@ -32716,8 +32941,8 @@
|
|
|
32716
32941
|
swiper.translate = -wrapperEl.scrollLeft;
|
|
32717
32942
|
} else {
|
|
32718
32943
|
swiper.translate = -wrapperEl.scrollTop;
|
|
32719
|
-
}
|
|
32720
|
-
|
|
32944
|
+
}
|
|
32945
|
+
// eslint-disable-next-line
|
|
32721
32946
|
if (swiper.translate === 0) swiper.translate = 0;
|
|
32722
32947
|
swiper.updateActiveIndex();
|
|
32723
32948
|
swiper.updateSlidesClasses();
|
|
@@ -32734,14 +32959,19 @@
|
|
|
32734
32959
|
swiper.emit('setTranslate', swiper.translate, false);
|
|
32735
32960
|
}
|
|
32736
32961
|
|
|
32737
|
-
|
|
32738
|
-
|
|
32962
|
+
const processLazyPreloader = (swiper, imageEl) => {
|
|
32963
|
+
if (!swiper || swiper.destroyed || !swiper.params) return;
|
|
32739
32964
|
const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;
|
|
32740
|
-
const slideEl =
|
|
32965
|
+
const slideEl = imageEl.closest(slideSelector());
|
|
32741
32966
|
if (slideEl) {
|
|
32742
32967
|
const lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);
|
|
32743
32968
|
if (lazyEl) lazyEl.remove();
|
|
32744
32969
|
}
|
|
32970
|
+
};
|
|
32971
|
+
|
|
32972
|
+
function onLoad(e) {
|
|
32973
|
+
const swiper = this;
|
|
32974
|
+
processLazyPreloader(swiper, e.target);
|
|
32745
32975
|
swiper.update();
|
|
32746
32976
|
}
|
|
32747
32977
|
|
|
@@ -32757,8 +32987,9 @@
|
|
|
32757
32987
|
} = swiper;
|
|
32758
32988
|
const capture = !!params.nested;
|
|
32759
32989
|
const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';
|
|
32760
|
-
const swiperMethod = method;
|
|
32990
|
+
const swiperMethod = method;
|
|
32761
32991
|
|
|
32992
|
+
// Touch Events
|
|
32762
32993
|
el[domMethod]('pointerdown', swiper.onTouchStart, {
|
|
32763
32994
|
passive: false
|
|
32764
32995
|
});
|
|
@@ -32777,21 +33008,24 @@
|
|
|
32777
33008
|
});
|
|
32778
33009
|
document[domMethod]('pointerleave', swiper.onTouchEnd, {
|
|
32779
33010
|
passive: true
|
|
32780
|
-
});
|
|
33011
|
+
});
|
|
32781
33012
|
|
|
33013
|
+
// Prevent Links Clicks
|
|
32782
33014
|
if (params.preventClicks || params.preventClicksPropagation) {
|
|
32783
33015
|
el[domMethod]('click', swiper.onClick, true);
|
|
32784
33016
|
}
|
|
32785
33017
|
if (params.cssMode) {
|
|
32786
33018
|
wrapperEl[domMethod]('scroll', swiper.onScroll);
|
|
32787
|
-
}
|
|
33019
|
+
}
|
|
32788
33020
|
|
|
33021
|
+
// Resize handler
|
|
32789
33022
|
if (params.updateOnWindowResize) {
|
|
32790
33023
|
swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);
|
|
32791
33024
|
} else {
|
|
32792
33025
|
swiper[swiperMethod]('observerUpdate', onResize, true);
|
|
32793
|
-
}
|
|
33026
|
+
}
|
|
32794
33027
|
|
|
33028
|
+
// Images loader
|
|
32795
33029
|
el[domMethod]('load', swiper.onLoad, {
|
|
32796
33030
|
capture: true
|
|
32797
33031
|
});
|
|
@@ -32837,8 +33071,9 @@
|
|
|
32837
33071
|
el
|
|
32838
33072
|
} = swiper;
|
|
32839
33073
|
const breakpoints = params.breakpoints;
|
|
32840
|
-
if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;
|
|
33074
|
+
if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;
|
|
32841
33075
|
|
|
33076
|
+
// Get breakpoint for window width and update parameters
|
|
32842
33077
|
const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el);
|
|
32843
33078
|
if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;
|
|
32844
33079
|
const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
|
|
@@ -32847,7 +33082,7 @@
|
|
|
32847
33082
|
const isMultiRow = isGridEnabled(swiper, breakpointParams);
|
|
32848
33083
|
const wasEnabled = params.enabled;
|
|
32849
33084
|
if (wasMultiRow && !isMultiRow) {
|
|
32850
|
-
el.classList.remove(`${params.containerModifierClass}grid
|
|
33085
|
+
el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
|
|
32851
33086
|
swiper.emitContainerClasses();
|
|
32852
33087
|
} else if (!wasMultiRow && isMultiRow) {
|
|
32853
33088
|
el.classList.add(`${params.containerModifierClass}grid`);
|
|
@@ -32855,8 +33090,9 @@
|
|
|
32855
33090
|
el.classList.add(`${params.containerModifierClass}grid-column`);
|
|
32856
33091
|
}
|
|
32857
33092
|
swiper.emitContainerClasses();
|
|
32858
|
-
}
|
|
33093
|
+
}
|
|
32859
33094
|
|
|
33095
|
+
// Toggle navigation, pagination, scrollbar
|
|
32860
33096
|
['navigation', 'pagination', 'scrollbar'].forEach(prop => {
|
|
32861
33097
|
const wasModuleEnabled = params[prop] && params[prop].enabled;
|
|
32862
33098
|
const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;
|
|
@@ -32961,8 +33197,8 @@
|
|
|
32961
33197
|
rtl,
|
|
32962
33198
|
el,
|
|
32963
33199
|
device
|
|
32964
|
-
} = swiper;
|
|
32965
|
-
|
|
33200
|
+
} = swiper;
|
|
33201
|
+
// prettier-ignore
|
|
32966
33202
|
const suffixes = prepareClasses(['initialized', params.direction, {
|
|
32967
33203
|
'free-mode': swiper.params.freeMode && params.freeMode.enabled
|
|
32968
33204
|
}, {
|
|
@@ -33040,6 +33276,7 @@
|
|
|
33040
33276
|
var defaults = {
|
|
33041
33277
|
init: true,
|
|
33042
33278
|
direction: 'horizontal',
|
|
33279
|
+
oneWayMovement: false,
|
|
33043
33280
|
touchEventsTarget: 'wrapper',
|
|
33044
33281
|
initialSlide: 0,
|
|
33045
33282
|
speed: 300,
|
|
@@ -33070,6 +33307,7 @@
|
|
|
33070
33307
|
// Effects
|
|
33071
33308
|
effect: 'slide',
|
|
33072
33309
|
// 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
|
|
33310
|
+
|
|
33073
33311
|
// Breakpoints
|
|
33074
33312
|
breakpoints: undefined,
|
|
33075
33313
|
breakpointsBase: 'window',
|
|
@@ -33121,6 +33359,8 @@
|
|
|
33121
33359
|
slideToClickedSlide: false,
|
|
33122
33360
|
// loop
|
|
33123
33361
|
loop: false,
|
|
33362
|
+
loopedSlides: null,
|
|
33363
|
+
loopPreventsSliding: true,
|
|
33124
33364
|
// rewind
|
|
33125
33365
|
rewind: false,
|
|
33126
33366
|
// Swiping/no swiping
|
|
@@ -33223,11 +33463,12 @@
|
|
|
33223
33463
|
el: containerEl
|
|
33224
33464
|
});
|
|
33225
33465
|
swipers.push(new Swiper$1(newParams));
|
|
33226
|
-
});
|
|
33227
|
-
|
|
33466
|
+
});
|
|
33467
|
+
// eslint-disable-next-line no-constructor-return
|
|
33228
33468
|
return swipers;
|
|
33229
|
-
}
|
|
33469
|
+
}
|
|
33230
33470
|
|
|
33471
|
+
// Swiper Instance
|
|
33231
33472
|
const swiper = this;
|
|
33232
33473
|
swiper.__swiper__ = true;
|
|
33233
33474
|
swiper.support = getSupport();
|
|
@@ -33252,14 +33493,17 @@
|
|
|
33252
33493
|
off: swiper.off.bind(swiper),
|
|
33253
33494
|
emit: swiper.emit.bind(swiper)
|
|
33254
33495
|
});
|
|
33255
|
-
});
|
|
33496
|
+
});
|
|
33256
33497
|
|
|
33257
|
-
|
|
33498
|
+
// Extend defaults with modules params
|
|
33499
|
+
const swiperParams = extend$1({}, defaults, allModulesParams);
|
|
33258
33500
|
|
|
33501
|
+
// Extend defaults with passed params
|
|
33259
33502
|
swiper.params = extend$1({}, swiperParams, extendedDefaults, params);
|
|
33260
33503
|
swiper.originalParams = extend$1({}, swiper.params);
|
|
33261
|
-
swiper.passedParams = extend$1({}, params);
|
|
33504
|
+
swiper.passedParams = extend$1({}, params);
|
|
33262
33505
|
|
|
33506
|
+
// add event listeners
|
|
33263
33507
|
if (swiper.params && swiper.params.on) {
|
|
33264
33508
|
Object.keys(swiper.params.on).forEach(eventName => {
|
|
33265
33509
|
swiper.on(eventName, swiper.params.on[eventName]);
|
|
@@ -33267,8 +33511,9 @@
|
|
|
33267
33511
|
}
|
|
33268
33512
|
if (swiper.params && swiper.params.onAny) {
|
|
33269
33513
|
swiper.onAny(swiper.params.onAny);
|
|
33270
|
-
}
|
|
33514
|
+
}
|
|
33271
33515
|
|
|
33516
|
+
// Extend Swiper
|
|
33272
33517
|
Object.assign(swiper, {
|
|
33273
33518
|
enabled: swiper.params.enabled,
|
|
33274
33519
|
el,
|
|
@@ -33337,13 +33582,15 @@
|
|
|
33337
33582
|
imagesToLoad: [],
|
|
33338
33583
|
imagesLoaded: 0
|
|
33339
33584
|
});
|
|
33340
|
-
swiper.emit('_swiper');
|
|
33585
|
+
swiper.emit('_swiper');
|
|
33341
33586
|
|
|
33587
|
+
// Init
|
|
33342
33588
|
if (swiper.params.init) {
|
|
33343
33589
|
swiper.init();
|
|
33344
|
-
}
|
|
33345
|
-
// eslint-disable-next-line no-constructor-return
|
|
33590
|
+
}
|
|
33346
33591
|
|
|
33592
|
+
// Return app instance
|
|
33593
|
+
// eslint-disable-next-line no-constructor-return
|
|
33347
33594
|
return swiper;
|
|
33348
33595
|
}
|
|
33349
33596
|
recalcSlides() {
|
|
@@ -33472,11 +33719,16 @@
|
|
|
33472
33719
|
const {
|
|
33473
33720
|
snapGrid,
|
|
33474
33721
|
params
|
|
33475
|
-
} = swiper;
|
|
33476
|
-
|
|
33722
|
+
} = swiper;
|
|
33723
|
+
// Breakpoints
|
|
33477
33724
|
if (params.breakpoints) {
|
|
33478
33725
|
swiper.setBreakpoint();
|
|
33479
33726
|
}
|
|
33727
|
+
[...swiper.el.querySelectorAll('[loading="lazy"]')].forEach(imageEl => {
|
|
33728
|
+
if (imageEl.complete) {
|
|
33729
|
+
processLazyPreloader(swiper, imageEl);
|
|
33730
|
+
}
|
|
33731
|
+
});
|
|
33480
33732
|
swiper.updateSize();
|
|
33481
33733
|
swiper.updateSlides();
|
|
33482
33734
|
swiper.updateProgress();
|
|
@@ -33553,8 +33805,9 @@
|
|
|
33553
33805
|
}
|
|
33554
33806
|
mount(element) {
|
|
33555
33807
|
const swiper = this;
|
|
33556
|
-
if (swiper.mounted) return true;
|
|
33808
|
+
if (swiper.mounted) return true;
|
|
33557
33809
|
|
|
33810
|
+
// Find el
|
|
33558
33811
|
let el = element || swiper.params.el;
|
|
33559
33812
|
if (typeof el === 'string') {
|
|
33560
33813
|
el = document.querySelector(el);
|
|
@@ -33571,13 +33824,13 @@
|
|
|
33571
33824
|
};
|
|
33572
33825
|
const getWrapper = () => {
|
|
33573
33826
|
if (el && el.shadowRoot && el.shadowRoot.querySelector) {
|
|
33574
|
-
const res = el.shadowRoot.querySelector(getWrapperSelector());
|
|
33575
|
-
|
|
33827
|
+
const res = el.shadowRoot.querySelector(getWrapperSelector());
|
|
33828
|
+
// Children needs to return slot items
|
|
33576
33829
|
return res;
|
|
33577
33830
|
}
|
|
33578
33831
|
return elementChildren(el, getWrapperSelector())[0];
|
|
33579
|
-
};
|
|
33580
|
-
|
|
33832
|
+
};
|
|
33833
|
+
// Find Wrapper
|
|
33581
33834
|
let wrapperEl = getWrapper();
|
|
33582
33835
|
if (!wrapperEl && swiper.params.createElements) {
|
|
33583
33836
|
wrapperEl = createElement('div', swiper.params.wrapperClass);
|
|
@@ -33603,39 +33856,58 @@
|
|
|
33603
33856
|
if (swiper.initialized) return swiper;
|
|
33604
33857
|
const mounted = swiper.mount(el);
|
|
33605
33858
|
if (mounted === false) return swiper;
|
|
33606
|
-
swiper.emit('beforeInit');
|
|
33859
|
+
swiper.emit('beforeInit');
|
|
33607
33860
|
|
|
33861
|
+
// Set breakpoint
|
|
33608
33862
|
if (swiper.params.breakpoints) {
|
|
33609
33863
|
swiper.setBreakpoint();
|
|
33610
|
-
}
|
|
33864
|
+
}
|
|
33611
33865
|
|
|
33612
|
-
|
|
33866
|
+
// Add Classes
|
|
33867
|
+
swiper.addClasses();
|
|
33613
33868
|
|
|
33614
|
-
|
|
33869
|
+
// Update size
|
|
33870
|
+
swiper.updateSize();
|
|
33615
33871
|
|
|
33872
|
+
// Update slides
|
|
33616
33873
|
swiper.updateSlides();
|
|
33617
33874
|
if (swiper.params.watchOverflow) {
|
|
33618
33875
|
swiper.checkOverflow();
|
|
33619
|
-
}
|
|
33876
|
+
}
|
|
33620
33877
|
|
|
33878
|
+
// Set Grab Cursor
|
|
33621
33879
|
if (swiper.params.grabCursor && swiper.enabled) {
|
|
33622
33880
|
swiper.setGrabCursor();
|
|
33623
|
-
}
|
|
33881
|
+
}
|
|
33624
33882
|
|
|
33883
|
+
// Slide To Initial Slide
|
|
33625
33884
|
if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {
|
|
33626
33885
|
swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);
|
|
33627
33886
|
} else {
|
|
33628
33887
|
swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);
|
|
33629
|
-
}
|
|
33888
|
+
}
|
|
33630
33889
|
|
|
33890
|
+
// Create loop
|
|
33631
33891
|
if (swiper.params.loop) {
|
|
33632
33892
|
swiper.loopCreate();
|
|
33633
|
-
}
|
|
33893
|
+
}
|
|
33634
33894
|
|
|
33635
|
-
|
|
33895
|
+
// Attach events
|
|
33896
|
+
swiper.attachEvents();
|
|
33897
|
+
[...swiper.el.querySelectorAll('[loading="lazy"]')].forEach(imageEl => {
|
|
33898
|
+
if (imageEl.complete) {
|
|
33899
|
+
processLazyPreloader(swiper, imageEl);
|
|
33900
|
+
} else {
|
|
33901
|
+
imageEl.addEventListener('load', e => {
|
|
33902
|
+
processLazyPreloader(swiper, e.target);
|
|
33903
|
+
});
|
|
33904
|
+
}
|
|
33905
|
+
});
|
|
33636
33906
|
|
|
33637
|
-
|
|
33907
|
+
// Init Flag
|
|
33908
|
+
swiper.initialized = true;
|
|
33638
33909
|
|
|
33910
|
+
// Emit
|
|
33639
33911
|
swiper.emit('init');
|
|
33640
33912
|
swiper.emit('afterInit');
|
|
33641
33913
|
return swiper;
|
|
@@ -33657,16 +33929,20 @@
|
|
|
33657
33929
|
if (typeof swiper.params === 'undefined' || swiper.destroyed) {
|
|
33658
33930
|
return null;
|
|
33659
33931
|
}
|
|
33660
|
-
swiper.emit('beforeDestroy');
|
|
33932
|
+
swiper.emit('beforeDestroy');
|
|
33661
33933
|
|
|
33662
|
-
|
|
33934
|
+
// Init Flag
|
|
33935
|
+
swiper.initialized = false;
|
|
33663
33936
|
|
|
33664
|
-
|
|
33937
|
+
// Detach events
|
|
33938
|
+
swiper.detachEvents();
|
|
33665
33939
|
|
|
33940
|
+
// Destroy loop
|
|
33666
33941
|
if (params.loop) {
|
|
33667
33942
|
swiper.loopDestroy();
|
|
33668
|
-
}
|
|
33943
|
+
}
|
|
33669
33944
|
|
|
33945
|
+
// Cleanup styles
|
|
33670
33946
|
if (cleanStyles) {
|
|
33671
33947
|
swiper.removeClasses();
|
|
33672
33948
|
el.removeAttribute('style');
|
|
@@ -33679,8 +33955,9 @@
|
|
|
33679
33955
|
});
|
|
33680
33956
|
}
|
|
33681
33957
|
}
|
|
33682
|
-
swiper.emit('destroy');
|
|
33958
|
+
swiper.emit('destroy');
|
|
33683
33959
|
|
|
33960
|
+
// Detach emitter events
|
|
33684
33961
|
Object.keys(swiper.eventsListeners).forEach(eventName => {
|
|
33685
33962
|
swiper.off(eventName);
|
|
33686
33963
|
});
|
|
@@ -33743,6 +34020,7 @@
|
|
|
33743
34020
|
}
|
|
33744
34021
|
});
|
|
33745
34022
|
let cssModeTimeout;
|
|
34023
|
+
const document = getDocument();
|
|
33746
34024
|
swiper.virtual = {
|
|
33747
34025
|
cache: {},
|
|
33748
34026
|
from: undefined,
|
|
@@ -33756,8 +34034,8 @@
|
|
|
33756
34034
|
const params = swiper.params.virtual;
|
|
33757
34035
|
if (params.cache && swiper.virtual.cache[index]) {
|
|
33758
34036
|
return swiper.virtual.cache[index];
|
|
33759
|
-
}
|
|
33760
|
-
|
|
34037
|
+
}
|
|
34038
|
+
// eslint-disable-next-line
|
|
33761
34039
|
let slideEl;
|
|
33762
34040
|
if (params.renderSlide) {
|
|
33763
34041
|
slideEl = params.renderSlide.call(swiper, slide, index);
|
|
@@ -34074,7 +34352,6 @@
|
|
|
34074
34352
|
} = swiper;
|
|
34075
34353
|
let e = event;
|
|
34076
34354
|
if (e.originalEvent) e = e.originalEvent; // jquery fix
|
|
34077
|
-
|
|
34078
34355
|
const kc = e.keyCode || e.charCode;
|
|
34079
34356
|
const pageUpDown = swiper.params.keyboard.pageUpDown;
|
|
34080
34357
|
const isPageUp = pageUpDown && kc === 33;
|
|
@@ -34082,8 +34359,8 @@
|
|
|
34082
34359
|
const isArrowLeft = kc === 37;
|
|
34083
34360
|
const isArrowRight = kc === 39;
|
|
34084
34361
|
const isArrowUp = kc === 38;
|
|
34085
|
-
const isArrowDown = kc === 40;
|
|
34086
|
-
|
|
34362
|
+
const isArrowDown = kc === 40;
|
|
34363
|
+
// Directions locks
|
|
34087
34364
|
if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) {
|
|
34088
34365
|
return false;
|
|
34089
34366
|
}
|
|
@@ -34097,8 +34374,8 @@
|
|
|
34097
34374
|
return undefined;
|
|
34098
34375
|
}
|
|
34099
34376
|
if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) {
|
|
34100
|
-
let inView = false;
|
|
34101
|
-
|
|
34377
|
+
let inView = false;
|
|
34378
|
+
// Check that swiper should be inside of visible area of window
|
|
34102
34379
|
if (elementParents(swiper.el, `.${swiper.params.slideClass}, swiper-slide`).length > 0 && elementParents(swiper.el, `.${swiper.params.slideActiveClass}`).length === 0) {
|
|
34103
34380
|
return undefined;
|
|
34104
34381
|
}
|
|
@@ -34114,7 +34391,6 @@
|
|
|
34114
34391
|
const point = swiperCoord[i];
|
|
34115
34392
|
if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) {
|
|
34116
34393
|
if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line
|
|
34117
|
-
|
|
34118
34394
|
inView = true;
|
|
34119
34395
|
}
|
|
34120
34396
|
}
|
|
@@ -34197,11 +34473,10 @@
|
|
|
34197
34473
|
const PAGE_HEIGHT = 800;
|
|
34198
34474
|
let sX = 0;
|
|
34199
34475
|
let sY = 0; // spinX, spinY
|
|
34200
|
-
|
|
34201
34476
|
let pX = 0;
|
|
34202
34477
|
let pY = 0; // pixelX, pixelY
|
|
34203
|
-
// Legacy
|
|
34204
34478
|
|
|
34479
|
+
// Legacy
|
|
34205
34480
|
if ('detail' in e) {
|
|
34206
34481
|
sY = e.detail;
|
|
34207
34482
|
}
|
|
@@ -34213,8 +34488,9 @@
|
|
|
34213
34488
|
}
|
|
34214
34489
|
if ('wheelDeltaX' in e) {
|
|
34215
34490
|
sX = -e.wheelDeltaX / 120;
|
|
34216
|
-
}
|
|
34491
|
+
}
|
|
34217
34492
|
|
|
34493
|
+
// side scrolling on FF with DOMMouseScroll
|
|
34218
34494
|
if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
|
|
34219
34495
|
sX = sY;
|
|
34220
34496
|
sY = 0;
|
|
@@ -34242,8 +34518,9 @@
|
|
|
34242
34518
|
pX *= PAGE_HEIGHT;
|
|
34243
34519
|
pY *= PAGE_HEIGHT;
|
|
34244
34520
|
}
|
|
34245
|
-
}
|
|
34521
|
+
}
|
|
34246
34522
|
|
|
34523
|
+
// Fall-back if spin cannot be determined
|
|
34247
34524
|
if (pX && !sX) {
|
|
34248
34525
|
sX = pX < 1 ? -1 : 1;
|
|
34249
34526
|
}
|
|
@@ -34273,14 +34550,16 @@
|
|
|
34273
34550
|
if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) {
|
|
34274
34551
|
// Prevent if time between scrolls is below configured threshold
|
|
34275
34552
|
return false;
|
|
34276
|
-
}
|
|
34553
|
+
}
|
|
34554
|
+
|
|
34555
|
+
// If the movement is NOT big enough and
|
|
34277
34556
|
// if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider):
|
|
34278
34557
|
// Don't go any further (avoid insignificant scroll movement).
|
|
34279
|
-
|
|
34280
34558
|
if (newEvent.delta >= 6 && now() - lastScrollTime < 60) {
|
|
34281
34559
|
// Return false as a default
|
|
34282
34560
|
return true;
|
|
34283
|
-
}
|
|
34561
|
+
}
|
|
34562
|
+
// If user is scrolling towards the end:
|
|
34284
34563
|
// If the slider hasn't hit the latest slide or
|
|
34285
34564
|
// if the slider is a loop and
|
|
34286
34565
|
// if the slider isn't moving right now:
|
|
@@ -34292,7 +34571,6 @@
|
|
|
34292
34571
|
// if the slider isn't moving right now:
|
|
34293
34572
|
// Go to prev slide and
|
|
34294
34573
|
// emit a scroll event.
|
|
34295
|
-
|
|
34296
34574
|
if (newEvent.direction < 0) {
|
|
34297
34575
|
if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
|
|
34298
34576
|
swiper.slideNext();
|
|
@@ -34301,10 +34579,10 @@
|
|
|
34301
34579
|
} else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
|
|
34302
34580
|
swiper.slidePrev();
|
|
34303
34581
|
emit('scroll', newEvent.raw);
|
|
34304
|
-
}
|
|
34305
|
-
|
|
34306
|
-
lastScrollTime = new window.Date().getTime();
|
|
34307
|
-
|
|
34582
|
+
}
|
|
34583
|
+
// If you got here is because an animation has been triggered so store the current time
|
|
34584
|
+
lastScrollTime = new window.Date().getTime();
|
|
34585
|
+
// Return false as a default
|
|
34308
34586
|
return false;
|
|
34309
34587
|
}
|
|
34310
34588
|
function releaseScroll(newEvent) {
|
|
@@ -34335,7 +34613,6 @@
|
|
|
34335
34613
|
const targetElContainsTarget = targetEl && targetEl.contains(e.target);
|
|
34336
34614
|
if (!swiper.mouseEntered && !targetElContainsTarget && !params.releaseOnEdges) return true;
|
|
34337
34615
|
if (e.originalEvent) e = e.originalEvent; // jquery fix
|
|
34338
|
-
|
|
34339
34616
|
let delta = 0;
|
|
34340
34617
|
const rtlFactor = swiper.rtlTranslate ? -1 : 1;
|
|
34341
34618
|
const data = normalize(e);
|
|
@@ -34347,18 +34624,20 @@
|
|
|
34347
34624
|
delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;
|
|
34348
34625
|
}
|
|
34349
34626
|
if (delta === 0) return true;
|
|
34350
|
-
if (params.invert) delta = -delta;
|
|
34627
|
+
if (params.invert) delta = -delta;
|
|
34351
34628
|
|
|
34629
|
+
// Get the scroll positions
|
|
34352
34630
|
let positions = swiper.getTranslate() + delta * params.sensitivity;
|
|
34353
34631
|
if (positions >= swiper.minTranslate()) positions = swiper.minTranslate();
|
|
34354
|
-
if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate();
|
|
34632
|
+
if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate();
|
|
34633
|
+
|
|
34634
|
+
// When loop is true:
|
|
34355
34635
|
// the disableParentSwiper will be true.
|
|
34356
34636
|
// When loop is false:
|
|
34357
34637
|
// if the scroll positions is not on edge,
|
|
34358
34638
|
// then the disableParentSwiper will be true.
|
|
34359
34639
|
// if the scroll on edge positions,
|
|
34360
34640
|
// then the disableParentSwiper will be false.
|
|
34361
|
-
|
|
34362
34641
|
disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate());
|
|
34363
34642
|
if (disableParentSwiper && swiper.params.nested) e.stopPropagation();
|
|
34364
34643
|
if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) {
|
|
@@ -34368,34 +34647,38 @@
|
|
|
34368
34647
|
delta: Math.abs(delta),
|
|
34369
34648
|
direction: Math.sign(delta),
|
|
34370
34649
|
raw: event
|
|
34371
|
-
};
|
|
34650
|
+
};
|
|
34372
34651
|
|
|
34652
|
+
// Keep the most recent events
|
|
34373
34653
|
if (recentWheelEvents.length >= 2) {
|
|
34374
34654
|
recentWheelEvents.shift(); // only store the last N events
|
|
34375
34655
|
}
|
|
34376
34656
|
|
|
34377
34657
|
const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined;
|
|
34378
|
-
recentWheelEvents.push(newEvent);
|
|
34658
|
+
recentWheelEvents.push(newEvent);
|
|
34659
|
+
|
|
34660
|
+
// If there is at least one previous recorded event:
|
|
34379
34661
|
// If direction has changed or
|
|
34380
34662
|
// if the scroll is quicker than the previous one:
|
|
34381
34663
|
// Animate the slider.
|
|
34382
34664
|
// Else (this is the first time the wheel is moved):
|
|
34383
34665
|
// Animate the slider.
|
|
34384
|
-
|
|
34385
34666
|
if (prevEvent) {
|
|
34386
34667
|
if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) {
|
|
34387
34668
|
animateSlider(newEvent);
|
|
34388
34669
|
}
|
|
34389
34670
|
} else {
|
|
34390
34671
|
animateSlider(newEvent);
|
|
34391
|
-
}
|
|
34392
|
-
// Return now so you don't hit the preventDefault.
|
|
34672
|
+
}
|
|
34393
34673
|
|
|
34674
|
+
// If it's time to release the scroll:
|
|
34675
|
+
// Return now so you don't hit the preventDefault.
|
|
34394
34676
|
if (releaseScroll(newEvent)) {
|
|
34395
34677
|
return true;
|
|
34396
34678
|
}
|
|
34397
34679
|
} else {
|
|
34398
34680
|
// Freemode or scrollContainer:
|
|
34681
|
+
|
|
34399
34682
|
// If we recently snapped after a momentum scroll, then ignore wheel events
|
|
34400
34683
|
// to give time for the deceleration to finish. Stop ignoring after 500 msecs
|
|
34401
34684
|
// or if it's a new scroll (larger delta or inverse sign as last event before
|
|
@@ -34408,9 +34691,6 @@
|
|
|
34408
34691
|
const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction;
|
|
34409
34692
|
if (!ignoreWheelEvents) {
|
|
34410
34693
|
lastEventBeforeSnap = undefined;
|
|
34411
|
-
if (swiper.params.loop) {
|
|
34412
|
-
swiper.loopFix();
|
|
34413
|
-
}
|
|
34414
34694
|
let position = swiper.getTranslate() + delta * params.sensitivity;
|
|
34415
34695
|
const wasBeginning = swiper.isBeginning;
|
|
34416
34696
|
const wasEnd = swiper.isEnd;
|
|
@@ -34424,6 +34704,12 @@
|
|
|
34424
34704
|
if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) {
|
|
34425
34705
|
swiper.updateSlidesClasses();
|
|
34426
34706
|
}
|
|
34707
|
+
if (swiper.params.loop) {
|
|
34708
|
+
swiper.loopFix({
|
|
34709
|
+
direction: newEvent.direction < 0 ? 'next' : 'prev',
|
|
34710
|
+
byMousewheel: true
|
|
34711
|
+
});
|
|
34712
|
+
}
|
|
34427
34713
|
if (swiper.params.freeMode.sticky) {
|
|
34428
34714
|
// When wheel scrolling starts with sticky (aka snap) enabled, then detect
|
|
34429
34715
|
// the end of a momentum scroll by storing recent (N=15?) wheel events.
|
|
@@ -34474,12 +34760,14 @@
|
|
|
34474
34760
|
swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold);
|
|
34475
34761
|
}, 500);
|
|
34476
34762
|
}
|
|
34477
|
-
}
|
|
34478
|
-
|
|
34479
|
-
if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay
|
|
34763
|
+
}
|
|
34480
34764
|
|
|
34481
|
-
|
|
34765
|
+
// Emit event
|
|
34766
|
+
if (!ignoreWheelEvents) emit('scroll', e);
|
|
34482
34767
|
|
|
34768
|
+
// Stop autoplay
|
|
34769
|
+
if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();
|
|
34770
|
+
// Return page scroll on edge positions
|
|
34483
34771
|
if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;
|
|
34484
34772
|
}
|
|
34485
34773
|
}
|
|
@@ -34588,8 +34876,9 @@
|
|
|
34588
34876
|
if (swiper.params.uniqueNavElements && typeof el === 'string' && res.length > 1 && swiper.el.querySelectorAll(el).length === 1) {
|
|
34589
34877
|
res = swiper.el.querySelector(el);
|
|
34590
34878
|
}
|
|
34591
|
-
}
|
|
34592
|
-
|
|
34879
|
+
}
|
|
34880
|
+
if (el && !res) return el;
|
|
34881
|
+
// if (Array.isArray(res) && res.length === 1) res = res[0];
|
|
34593
34882
|
return res;
|
|
34594
34883
|
}
|
|
34595
34884
|
function toggleEl(el, disabled) {
|
|
@@ -34597,7 +34886,7 @@
|
|
|
34597
34886
|
el = makeElementsArray(el);
|
|
34598
34887
|
el.forEach(subEl => {
|
|
34599
34888
|
if (subEl) {
|
|
34600
|
-
subEl.classList[disabled ? 'add' : 'remove'](params.disabledClass);
|
|
34889
|
+
subEl.classList[disabled ? 'add' : 'remove'](...params.disabledClass.split(' '));
|
|
34601
34890
|
if (subEl.tagName === 'BUTTON') subEl.disabled = disabled;
|
|
34602
34891
|
if (swiper.params.watchOverflow && swiper.enabled) {
|
|
34603
34892
|
subEl.classList[swiper.isLocked ? 'add' : 'remove'](params.lockClass);
|
|
@@ -34651,7 +34940,7 @@
|
|
|
34651
34940
|
el.addEventListener('click', dir === 'next' ? onNextClick : onPrevClick);
|
|
34652
34941
|
}
|
|
34653
34942
|
if (!swiper.enabled && el) {
|
|
34654
|
-
el.classList.add(params.lockClass);
|
|
34943
|
+
el.classList.add(...params.lockClass.split(' '));
|
|
34655
34944
|
}
|
|
34656
34945
|
};
|
|
34657
34946
|
nextEl.forEach(el => initButton(el, 'next'));
|
|
@@ -34666,7 +34955,7 @@
|
|
|
34666
34955
|
prevEl = makeElementsArray(prevEl);
|
|
34667
34956
|
const destroyButton = (el, dir) => {
|
|
34668
34957
|
el.removeEventListener('click', dir === 'next' ? onNextClick : onPrevClick);
|
|
34669
|
-
el.classList.remove(swiper.params.navigation.disabledClass);
|
|
34958
|
+
el.classList.remove(...swiper.params.navigation.disabledClass.split(' '));
|
|
34670
34959
|
};
|
|
34671
34960
|
nextEl.forEach(el => destroyButton(el, 'next'));
|
|
34672
34961
|
prevEl.forEach(el => destroyButton(el, 'prev'));
|
|
@@ -34720,12 +35009,12 @@
|
|
|
34720
35009
|
}
|
|
34721
35010
|
});
|
|
34722
35011
|
const enable = () => {
|
|
34723
|
-
swiper.el.classList.remove(swiper.params.navigation.navigationDisabledClass);
|
|
35012
|
+
swiper.el.classList.remove(...swiper.params.navigation.navigationDisabledClass.split(' '));
|
|
34724
35013
|
init();
|
|
34725
35014
|
update();
|
|
34726
35015
|
};
|
|
34727
35016
|
const disable = () => {
|
|
34728
|
-
swiper.el.classList.add(swiper.params.navigation.navigationDisabledClass);
|
|
35017
|
+
swiper.el.classList.add(...swiper.params.navigation.navigationDisabledClass.split(' '));
|
|
34729
35018
|
destroy();
|
|
34730
35019
|
};
|
|
34731
35020
|
Object.assign(swiper.navigation, {
|
|
@@ -34802,10 +35091,11 @@
|
|
|
34802
35091
|
const {
|
|
34803
35092
|
bulletActiveClass
|
|
34804
35093
|
} = swiper.params.pagination;
|
|
34805
|
-
bulletEl
|
|
35094
|
+
if (!bulletEl) return;
|
|
35095
|
+
bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];
|
|
34806
35096
|
if (bulletEl) {
|
|
34807
35097
|
bulletEl.classList.add(`${bulletActiveClass}-${position}`);
|
|
34808
|
-
bulletEl = bulletEl
|
|
35098
|
+
bulletEl = bulletEl[`${position === 'prev' ? 'previous' : 'next'}ElementSibling`];
|
|
34809
35099
|
if (bulletEl) {
|
|
34810
35100
|
bulletEl.classList.add(`${bulletActiveClass}-${position}-${position}`);
|
|
34811
35101
|
}
|
|
@@ -34828,8 +35118,8 @@
|
|
|
34828
35118
|
const params = swiper.params.pagination;
|
|
34829
35119
|
if (isPaginationDisabled()) return;
|
|
34830
35120
|
let el = swiper.pagination.el;
|
|
34831
|
-
el = makeElementsArray(el);
|
|
34832
|
-
|
|
35121
|
+
el = makeElementsArray(el);
|
|
35122
|
+
// Current/Total
|
|
34833
35123
|
let current;
|
|
34834
35124
|
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
|
|
34835
35125
|
const total = swiper.params.loop ? Math.ceil(slidesLength / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
|
|
@@ -34839,8 +35129,8 @@
|
|
|
34839
35129
|
current = swiper.snapIndex;
|
|
34840
35130
|
} else {
|
|
34841
35131
|
current = swiper.activeIndex || 0;
|
|
34842
|
-
}
|
|
34843
|
-
|
|
35132
|
+
}
|
|
35133
|
+
// Types
|
|
34844
35134
|
if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
|
|
34845
35135
|
const bullets = swiper.pagination.bullets;
|
|
34846
35136
|
let firstIndex;
|
|
@@ -35014,8 +35304,8 @@
|
|
|
35014
35304
|
}
|
|
35015
35305
|
if (!el || el.length === 0) return;
|
|
35016
35306
|
if (swiper.params.uniqueNavElements && typeof params.el === 'string' && Array.isArray(el) && el.length > 1) {
|
|
35017
|
-
el = [...swiper.el.querySelectorAll(params.el)];
|
|
35018
|
-
|
|
35307
|
+
el = [...swiper.el.querySelectorAll(params.el)];
|
|
35308
|
+
// check if it belongs to another nested Swiper
|
|
35019
35309
|
if (el.length > 1) {
|
|
35020
35310
|
el = el.filter(subEl => {
|
|
35021
35311
|
if (elementParents(subEl, '.swiper')[0] !== swiper.el) return false;
|
|
@@ -35230,13 +35520,13 @@
|
|
|
35230
35520
|
el.style.opacity = 1;
|
|
35231
35521
|
timeout = setTimeout(() => {
|
|
35232
35522
|
el.style.opacity = 0;
|
|
35233
|
-
el.style.
|
|
35523
|
+
el.style.transitionDuration = '400ms';
|
|
35234
35524
|
}, 1000);
|
|
35235
35525
|
}
|
|
35236
35526
|
}
|
|
35237
35527
|
function setTransition(duration) {
|
|
35238
35528
|
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
|
35239
|
-
swiper.scrollbar.dragEl.style.
|
|
35529
|
+
swiper.scrollbar.dragEl.style.transitionDuration = `${duration}ms`;
|
|
35240
35530
|
}
|
|
35241
35531
|
function updateSize() {
|
|
35242
35532
|
if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
|
|
@@ -35310,11 +35600,11 @@
|
|
|
35310
35600
|
dragStartPos = e.target === dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null;
|
|
35311
35601
|
e.preventDefault();
|
|
35312
35602
|
e.stopPropagation();
|
|
35313
|
-
wrapperEl.style.
|
|
35314
|
-
dragEl.style.
|
|
35603
|
+
wrapperEl.style.transitionDuration = '100ms';
|
|
35604
|
+
dragEl.style.transitionDuration = '100ms';
|
|
35315
35605
|
setDragPosition(e);
|
|
35316
35606
|
clearTimeout(dragTimeout);
|
|
35317
|
-
el.style.
|
|
35607
|
+
el.style.transitionDuration = '0ms';
|
|
35318
35608
|
if (params.hide) {
|
|
35319
35609
|
el.style.opacity = 1;
|
|
35320
35610
|
}
|
|
@@ -35335,9 +35625,9 @@
|
|
|
35335
35625
|
if (!isTouched) return;
|
|
35336
35626
|
if (e.preventDefault) e.preventDefault();else e.returnValue = false;
|
|
35337
35627
|
setDragPosition(e);
|
|
35338
|
-
wrapperEl.style.
|
|
35339
|
-
el.style.
|
|
35340
|
-
dragEl.style.
|
|
35628
|
+
wrapperEl.style.transitionDuration = '0ms';
|
|
35629
|
+
el.style.transitionDuration = '0ms';
|
|
35630
|
+
dragEl.style.transitionDuration = '0ms';
|
|
35341
35631
|
emit('scrollbarDragMove', e);
|
|
35342
35632
|
}
|
|
35343
35633
|
function onDragEnd(e) {
|
|
@@ -35353,13 +35643,13 @@
|
|
|
35353
35643
|
isTouched = false;
|
|
35354
35644
|
if (swiper.params.cssMode) {
|
|
35355
35645
|
swiper.wrapperEl.style['scroll-snap-type'] = '';
|
|
35356
|
-
wrapperEl.style.
|
|
35646
|
+
wrapperEl.style.transitionDuration = '';
|
|
35357
35647
|
}
|
|
35358
35648
|
if (params.hide) {
|
|
35359
35649
|
clearTimeout(dragTimeout);
|
|
35360
35650
|
dragTimeout = nextTick(() => {
|
|
35361
35651
|
el.style.opacity = 0;
|
|
35362
|
-
el.style.
|
|
35652
|
+
el.style.transitionDuration = '400ms';
|
|
35363
35653
|
}, 1000);
|
|
35364
35654
|
}
|
|
35365
35655
|
emit('scrollbarDragEnd', e);
|
|
@@ -35411,8 +35701,10 @@
|
|
|
35411
35701
|
if (typeof params.el === 'string' && swiper.isElement) {
|
|
35412
35702
|
el = swiper.el.shadowRoot.querySelector(params.el);
|
|
35413
35703
|
}
|
|
35414
|
-
if (!el) {
|
|
35704
|
+
if (!el && typeof params.el === 'string') {
|
|
35415
35705
|
el = document.querySelectorAll(params.el);
|
|
35706
|
+
} else if (!el) {
|
|
35707
|
+
el = params.el;
|
|
35416
35708
|
}
|
|
35417
35709
|
if (swiper.params.uniqueNavElements && typeof params.el === 'string' && el.length > 1 && swiperEl.querySelectorAll(params.el).length === 1) {
|
|
35418
35710
|
el = swiperEl.querySelector(params.el);
|
|
@@ -35523,6 +35815,7 @@
|
|
|
35523
35815
|
let y = el.getAttribute('data-swiper-parallax-y');
|
|
35524
35816
|
const scale = el.getAttribute('data-swiper-parallax-scale');
|
|
35525
35817
|
const opacity = el.getAttribute('data-swiper-parallax-opacity');
|
|
35818
|
+
const rotate = el.getAttribute('data-swiper-parallax-rotate');
|
|
35526
35819
|
if (x || y) {
|
|
35527
35820
|
x = x || '0';
|
|
35528
35821
|
y = y || '0';
|
|
@@ -35547,12 +35840,16 @@
|
|
|
35547
35840
|
const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress));
|
|
35548
35841
|
el.style.opacity = currentOpacity;
|
|
35549
35842
|
}
|
|
35550
|
-
|
|
35551
|
-
|
|
35552
|
-
} else {
|
|
35843
|
+
let transform = `translate3d(${x}, ${y}, 0px)`;
|
|
35844
|
+
if (typeof scale !== 'undefined' && scale !== null) {
|
|
35553
35845
|
const currentScale = scale - (scale - 1) * (1 - Math.abs(progress));
|
|
35554
|
-
|
|
35846
|
+
transform += ` scale(${currentScale})`;
|
|
35847
|
+
}
|
|
35848
|
+
if (rotate && typeof rotate !== 'undefined' && rotate !== null) {
|
|
35849
|
+
const currentRotate = rotate * progress * -1;
|
|
35850
|
+
transform += ` rotate(${currentRotate}deg)`;
|
|
35555
35851
|
}
|
|
35852
|
+
el.style.transform = transform;
|
|
35556
35853
|
};
|
|
35557
35854
|
const setTranslate = () => {
|
|
35558
35855
|
const {
|
|
@@ -35570,7 +35867,7 @@
|
|
|
35570
35867
|
slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1);
|
|
35571
35868
|
}
|
|
35572
35869
|
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 => {
|
|
35870
|
+
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
35871
|
setTransform(subEl, slideProgress);
|
|
35575
35872
|
});
|
|
35576
35873
|
});
|
|
@@ -35585,7 +35882,7 @@
|
|
|
35585
35882
|
el.querySelectorAll('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').forEach(parallaxEl => {
|
|
35586
35883
|
let parallaxDuration = parseInt(parallaxEl.getAttribute('data-swiper-parallax-duration'), 10) || duration;
|
|
35587
35884
|
if (duration === 0) parallaxDuration = 0;
|
|
35588
|
-
parallaxEl.style.
|
|
35885
|
+
parallaxEl.style.transitionDuration = `${parallaxDuration}ms`;
|
|
35589
35886
|
});
|
|
35590
35887
|
};
|
|
35591
35888
|
on('beforeInit', () => {
|
|
@@ -35701,8 +35998,9 @@
|
|
|
35701
35998
|
if (e.target.matches(selector)) return true;
|
|
35702
35999
|
if ([...swiper.el.querySelectorAll(selector)].filter(containerEl => containerEl.contains(e.target)).length > 0) return true;
|
|
35703
36000
|
return false;
|
|
35704
|
-
}
|
|
36001
|
+
}
|
|
35705
36002
|
|
|
36003
|
+
// Events
|
|
35706
36004
|
function onGestureStart(e) {
|
|
35707
36005
|
if (!eventWithinSlide(e)) return;
|
|
35708
36006
|
const params = swiper.params.zoom;
|
|
@@ -35803,8 +36101,8 @@
|
|
|
35803
36101
|
gesture.slideWidth = gesture.slideEl.offsetWidth;
|
|
35804
36102
|
gesture.slideHeight = gesture.slideEl.offsetHeight;
|
|
35805
36103
|
gesture.imageWrapEl.style.transitionDuration = '0ms';
|
|
35806
|
-
}
|
|
35807
|
-
|
|
36104
|
+
}
|
|
36105
|
+
// Define if we need image drag
|
|
35808
36106
|
const scaledWidth = image.width * zoom.scale;
|
|
35809
36107
|
const scaledHeight = image.height * zoom.scale;
|
|
35810
36108
|
if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;
|
|
@@ -35842,8 +36140,9 @@
|
|
|
35842
36140
|
}
|
|
35843
36141
|
if (image.currentY > image.maxY) {
|
|
35844
36142
|
image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8;
|
|
35845
|
-
}
|
|
36143
|
+
}
|
|
35846
36144
|
|
|
36145
|
+
// Velocity
|
|
35847
36146
|
if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;
|
|
35848
36147
|
if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;
|
|
35849
36148
|
if (!velocity.prevTime) velocity.prevTime = Date.now();
|
|
@@ -35871,14 +36170,16 @@
|
|
|
35871
36170
|
const momentumDistanceX = velocity.x * momentumDurationX;
|
|
35872
36171
|
const newPositionX = image.currentX + momentumDistanceX;
|
|
35873
36172
|
const momentumDistanceY = velocity.y * momentumDurationY;
|
|
35874
|
-
const newPositionY = image.currentY + momentumDistanceY;
|
|
36173
|
+
const newPositionY = image.currentY + momentumDistanceY;
|
|
35875
36174
|
|
|
36175
|
+
// Fix duration
|
|
35876
36176
|
if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);
|
|
35877
36177
|
if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);
|
|
35878
36178
|
const momentumDuration = Math.max(momentumDurationX, momentumDurationY);
|
|
35879
36179
|
image.currentX = newPositionX;
|
|
35880
|
-
image.currentY = newPositionY;
|
|
36180
|
+
image.currentY = newPositionY;
|
|
35881
36181
|
|
|
36182
|
+
// Define if we need image drag
|
|
35882
36183
|
const scaledWidth = image.width * zoom.scale;
|
|
35883
36184
|
const scaledHeight = image.height * zoom.scale;
|
|
35884
36185
|
image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0);
|
|
@@ -35962,9 +36263,14 @@
|
|
|
35962
36263
|
touchX = image.touchesStart.x;
|
|
35963
36264
|
touchY = image.touchesStart.y;
|
|
35964
36265
|
}
|
|
35965
|
-
|
|
35966
|
-
currentScale
|
|
35967
|
-
|
|
36266
|
+
const forceZoomRatio = typeof e === 'number' ? e : null;
|
|
36267
|
+
if (currentScale === 1 && forceZoomRatio) {
|
|
36268
|
+
touchX = undefined;
|
|
36269
|
+
touchY = undefined;
|
|
36270
|
+
}
|
|
36271
|
+
zoom.scale = forceZoomRatio || gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio;
|
|
36272
|
+
currentScale = forceZoomRatio || gesture.imageWrapEl.getAttribute('data-swiper-zoom') || params.maxRatio;
|
|
36273
|
+
if (e && !(currentScale === 1 && forceZoomRatio)) {
|
|
35968
36274
|
slideWidth = gesture.slideEl.offsetWidth;
|
|
35969
36275
|
slideHeight = gesture.slideEl.offsetHeight;
|
|
35970
36276
|
offsetX = elementOffset(gesture.slideEl).left + window.scrollX;
|
|
@@ -36035,8 +36341,9 @@
|
|
|
36035
36341
|
gesture.imageEl.style.transform = 'translate3d(0,0,0) scale(1)';
|
|
36036
36342
|
gesture.slideEl.classList.remove(`${params.zoomedSlideClass}`);
|
|
36037
36343
|
gesture.slideEl = undefined;
|
|
36038
|
-
}
|
|
36344
|
+
}
|
|
36039
36345
|
|
|
36346
|
+
// Toggle Zoom
|
|
36040
36347
|
function zoomToggle(e) {
|
|
36041
36348
|
const zoom = swiper.zoom;
|
|
36042
36349
|
if (zoom.scale && zoom.scale !== 1) {
|
|
@@ -36060,8 +36367,9 @@
|
|
|
36060
36367
|
passiveListener,
|
|
36061
36368
|
activeListenerWithCapture
|
|
36062
36369
|
};
|
|
36063
|
-
}
|
|
36370
|
+
}
|
|
36064
36371
|
|
|
36372
|
+
// Attach/Detach Events
|
|
36065
36373
|
function enable() {
|
|
36066
36374
|
const zoom = swiper.zoom;
|
|
36067
36375
|
if (zoom.enabled) return;
|
|
@@ -36069,14 +36377,17 @@
|
|
|
36069
36377
|
const {
|
|
36070
36378
|
passiveListener,
|
|
36071
36379
|
activeListenerWithCapture
|
|
36072
|
-
} = getListeners();
|
|
36380
|
+
} = getListeners();
|
|
36381
|
+
|
|
36382
|
+
// Scale image
|
|
36073
36383
|
|
|
36074
36384
|
swiper.wrapperEl.addEventListener('pointerdown', onGestureStart, passiveListener);
|
|
36075
36385
|
swiper.wrapperEl.addEventListener('pointermove', onGestureChange, activeListenerWithCapture);
|
|
36076
36386
|
['pointerup', 'pointercancel'].forEach(eventName => {
|
|
36077
36387
|
swiper.wrapperEl.addEventListener(eventName, onGestureEnd, passiveListener);
|
|
36078
|
-
});
|
|
36388
|
+
});
|
|
36079
36389
|
|
|
36390
|
+
// Move image
|
|
36080
36391
|
swiper.wrapperEl.addEventListener('pointermove', onTouchMove, activeListenerWithCapture);
|
|
36081
36392
|
}
|
|
36082
36393
|
function disable() {
|
|
@@ -36086,14 +36397,16 @@
|
|
|
36086
36397
|
const {
|
|
36087
36398
|
passiveListener,
|
|
36088
36399
|
activeListenerWithCapture
|
|
36089
|
-
} = getListeners();
|
|
36400
|
+
} = getListeners();
|
|
36090
36401
|
|
|
36402
|
+
// Scale image
|
|
36091
36403
|
swiper.wrapperEl.removeEventListener('pointerdown', onGestureStart, passiveListener);
|
|
36092
36404
|
swiper.wrapperEl.removeEventListener('pointermove', onGestureChange, activeListenerWithCapture);
|
|
36093
36405
|
['pointerup', 'pointercancel'].forEach(eventName => {
|
|
36094
36406
|
swiper.wrapperEl.removeEventListener(eventName, onGestureEnd, passiveListener);
|
|
36095
|
-
});
|
|
36407
|
+
});
|
|
36096
36408
|
|
|
36409
|
+
// Move image
|
|
36097
36410
|
swiper.wrapperEl.removeEventListener('pointermove', onTouchMove, activeListenerWithCapture);
|
|
36098
36411
|
}
|
|
36099
36412
|
on('init', () => {
|
|
@@ -36175,24 +36488,26 @@
|
|
|
36175
36488
|
}();
|
|
36176
36489
|
this.x = x;
|
|
36177
36490
|
this.y = y;
|
|
36178
|
-
this.lastIndex = x.length - 1;
|
|
36491
|
+
this.lastIndex = x.length - 1;
|
|
36492
|
+
// Given an x value (x2), return the expected y2 value:
|
|
36179
36493
|
// (x1,y1) is the known point before given value,
|
|
36180
36494
|
// (x3,y3) is the known point after given value.
|
|
36181
|
-
|
|
36182
36495
|
let i1;
|
|
36183
36496
|
let i3;
|
|
36184
36497
|
this.interpolate = function interpolate(x2) {
|
|
36185
|
-
if (!x2) return 0;
|
|
36498
|
+
if (!x2) return 0;
|
|
36186
36499
|
|
|
36500
|
+
// Get the indexes of x1 and x3 (the array indexes before and after given x2):
|
|
36187
36501
|
i3 = binarySearch(this.x, x2);
|
|
36188
|
-
i1 = i3 - 1;
|
|
36189
|
-
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
|
36502
|
+
i1 = i3 - 1;
|
|
36190
36503
|
|
|
36504
|
+
// We have our indexes i1 & i3, so we can calculate already:
|
|
36505
|
+
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
|
36191
36506
|
return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1];
|
|
36192
36507
|
};
|
|
36193
36508
|
return this;
|
|
36194
|
-
}
|
|
36195
|
-
|
|
36509
|
+
}
|
|
36510
|
+
// xxx: for now i will just save one spline function to to
|
|
36196
36511
|
function getInterpolateFunction(c) {
|
|
36197
36512
|
if (!swiper.controller.spline) {
|
|
36198
36513
|
swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid);
|
|
@@ -36210,9 +36525,9 @@
|
|
|
36210
36525
|
// the function does a lot of value caching for performance
|
|
36211
36526
|
const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
|
|
36212
36527
|
if (swiper.params.controller.by === 'slide') {
|
|
36213
|
-
getInterpolateFunction(c);
|
|
36528
|
+
getInterpolateFunction(c);
|
|
36529
|
+
// i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
|
|
36214
36530
|
// but it did not work out
|
|
36215
|
-
|
|
36216
36531
|
controlledTranslate = -swiper.controller.spline.interpolate(-translate);
|
|
36217
36532
|
}
|
|
36218
36533
|
if (!controlledTranslate || swiper.params.controller.by === 'container') {
|
|
@@ -36252,10 +36567,6 @@
|
|
|
36252
36567
|
}
|
|
36253
36568
|
elementTransitionEnd(c.wrapperEl, () => {
|
|
36254
36569
|
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
36570
|
c.transitionEnd();
|
|
36260
36571
|
});
|
|
36261
36572
|
}
|
|
@@ -36558,24 +36869,28 @@
|
|
|
36558
36869
|
};
|
|
36559
36870
|
const init = () => {
|
|
36560
36871
|
const params = swiper.params.a11y;
|
|
36561
|
-
swiper.el.append(liveRegion);
|
|
36872
|
+
swiper.el.append(liveRegion);
|
|
36562
36873
|
|
|
36874
|
+
// Container
|
|
36563
36875
|
const containerEl = swiper.el;
|
|
36564
36876
|
if (params.containerRoleDescriptionMessage) {
|
|
36565
36877
|
addElRoleDescription(containerEl, params.containerRoleDescriptionMessage);
|
|
36566
36878
|
}
|
|
36567
36879
|
if (params.containerMessage) {
|
|
36568
36880
|
addElLabel(containerEl, params.containerMessage);
|
|
36569
|
-
}
|
|
36881
|
+
}
|
|
36570
36882
|
|
|
36883
|
+
// Wrapper
|
|
36571
36884
|
const wrapperEl = swiper.wrapperEl;
|
|
36572
36885
|
const wrapperId = params.id || wrapperEl.getAttribute('id') || `swiper-wrapper-${getRandomNumber(16)}`;
|
|
36573
36886
|
const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';
|
|
36574
36887
|
addElId(wrapperEl, wrapperId);
|
|
36575
|
-
addElLive(wrapperEl, live);
|
|
36888
|
+
addElLive(wrapperEl, live);
|
|
36576
36889
|
|
|
36577
|
-
|
|
36890
|
+
// Slide
|
|
36891
|
+
initSlides();
|
|
36578
36892
|
|
|
36893
|
+
// Navigation
|
|
36579
36894
|
let {
|
|
36580
36895
|
nextEl,
|
|
36581
36896
|
prevEl
|
|
@@ -36587,12 +36902,17 @@
|
|
|
36587
36902
|
}
|
|
36588
36903
|
if (prevEl) {
|
|
36589
36904
|
prevEl.forEach(el => initNavEl(el, wrapperId, params.prevSlideMessage));
|
|
36590
|
-
}
|
|
36905
|
+
}
|
|
36591
36906
|
|
|
36907
|
+
// Pagination
|
|
36592
36908
|
if (hasClickablePagination()) {
|
|
36593
|
-
swiper.pagination.el.
|
|
36594
|
-
|
|
36909
|
+
const paginationEl = Array.isArray(swiper.pagination.el) ? swiper.pagination.el : [swiper.pagination.el];
|
|
36910
|
+
paginationEl.forEach(el => {
|
|
36911
|
+
el.addEventListener('keydown', onEnterOrSpaceKey);
|
|
36912
|
+
});
|
|
36913
|
+
}
|
|
36595
36914
|
|
|
36915
|
+
// Tab focus
|
|
36596
36916
|
swiper.el.addEventListener('focus', handleFocus, true);
|
|
36597
36917
|
swiper.el.addEventListener('pointerdown', handlePointerDown, true);
|
|
36598
36918
|
swiper.el.addEventListener('pointerup', handlePointerUp, true);
|
|
@@ -36610,12 +36930,17 @@
|
|
|
36610
36930
|
}
|
|
36611
36931
|
if (prevEl) {
|
|
36612
36932
|
prevEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey));
|
|
36613
|
-
}
|
|
36933
|
+
}
|
|
36614
36934
|
|
|
36935
|
+
// Pagination
|
|
36615
36936
|
if (hasClickablePagination()) {
|
|
36616
|
-
swiper.pagination.el.
|
|
36617
|
-
|
|
36937
|
+
const paginationEl = Array.isArray(swiper.pagination.el) ? swiper.pagination.el : [swiper.pagination.el];
|
|
36938
|
+
paginationEl.forEach(el => {
|
|
36939
|
+
el.removeEventListener('keydown', onEnterOrSpaceKey);
|
|
36940
|
+
});
|
|
36941
|
+
}
|
|
36618
36942
|
|
|
36943
|
+
// Tab focus
|
|
36619
36944
|
swiper.el.removeEventListener('focus', handleFocus, true);
|
|
36620
36945
|
swiper.el.removeEventListener('pointerdown', handlePointerDown, true);
|
|
36621
36946
|
swiper.el.removeEventListener('pointerup', handlePointerUp, true);
|
|
@@ -36701,9 +37026,9 @@
|
|
|
36701
37026
|
if (swiper.params.history.root.length > 0) {
|
|
36702
37027
|
let root = swiper.params.history.root;
|
|
36703
37028
|
if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1);
|
|
36704
|
-
value = `${root}/${key}
|
|
37029
|
+
value = `${root}/${key ? `${key}/` : ''}${value}`;
|
|
36705
37030
|
} else if (!location.pathname.includes(key)) {
|
|
36706
|
-
value = `${key}
|
|
37031
|
+
value = `${key ? `${key}/` : ''}${value}`;
|
|
36707
37032
|
}
|
|
36708
37033
|
if (swiper.params.history.keepQuery) {
|
|
36709
37034
|
value += location.search;
|
|
@@ -36750,7 +37075,12 @@
|
|
|
36750
37075
|
}
|
|
36751
37076
|
initialized = true;
|
|
36752
37077
|
paths = getPathValues(swiper.params.url);
|
|
36753
|
-
if (!paths.key && !paths.value)
|
|
37078
|
+
if (!paths.key && !paths.value) {
|
|
37079
|
+
if (!swiper.params.history.replaceState) {
|
|
37080
|
+
window.addEventListener('popstate', setHistoryPopState);
|
|
37081
|
+
}
|
|
37082
|
+
return;
|
|
37083
|
+
}
|
|
36754
37084
|
scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit);
|
|
36755
37085
|
if (!swiper.params.history.replaceState) {
|
|
36756
37086
|
window.addEventListener('popstate', setHistoryPopState);
|
|
@@ -36987,8 +37317,9 @@
|
|
|
36987
37317
|
requestAnimationFrame(() => {
|
|
36988
37318
|
proceed();
|
|
36989
37319
|
});
|
|
36990
|
-
}
|
|
37320
|
+
}
|
|
36991
37321
|
|
|
37322
|
+
// eslint-disable-next-line
|
|
36992
37323
|
return delay;
|
|
36993
37324
|
};
|
|
36994
37325
|
const start = () => {
|
|
@@ -37180,12 +37511,10 @@
|
|
|
37180
37511
|
slideToIndex = clickedIndex;
|
|
37181
37512
|
}
|
|
37182
37513
|
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;
|
|
37514
|
+
swiper.slideToLoop(slideToIndex);
|
|
37515
|
+
} else {
|
|
37516
|
+
swiper.slideTo(slideToIndex);
|
|
37187
37517
|
}
|
|
37188
|
-
swiper.slideTo(slideToIndex);
|
|
37189
37518
|
}
|
|
37190
37519
|
function init() {
|
|
37191
37520
|
const {
|
|
@@ -37221,8 +37550,9 @@
|
|
|
37221
37550
|
function update(initial) {
|
|
37222
37551
|
const thumbsSwiper = swiper.thumbs.swiper;
|
|
37223
37552
|
if (!thumbsSwiper || thumbsSwiper.destroyed) return;
|
|
37224
|
-
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;
|
|
37553
|
+
const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView;
|
|
37225
37554
|
|
|
37555
|
+
// Activate thumbs
|
|
37226
37556
|
let thumbsToActivate = 1;
|
|
37227
37557
|
const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass;
|
|
37228
37558
|
if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) {
|
|
@@ -37241,7 +37571,9 @@
|
|
|
37241
37571
|
}
|
|
37242
37572
|
} else {
|
|
37243
37573
|
for (let i = 0; i < thumbsToActivate; i += 1) {
|
|
37244
|
-
thumbsSwiper.slides[swiper.realIndex + i]
|
|
37574
|
+
if (thumbsSwiper.slides[swiper.realIndex + i]) {
|
|
37575
|
+
thumbsSwiper.slides[swiper.realIndex + i].classList.add(thumbActiveClass);
|
|
37576
|
+
}
|
|
37245
37577
|
}
|
|
37246
37578
|
}
|
|
37247
37579
|
const autoScrollOffset = swiper.params.thumbs.autoScrollOffset;
|
|
@@ -37251,20 +37583,8 @@
|
|
|
37251
37583
|
let newThumbsIndex;
|
|
37252
37584
|
let direction;
|
|
37253
37585
|
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
|
-
}
|
|
37586
|
+
const newThumbsSlide = thumbsSwiper.slides.filter(slideEl => slideEl.getAttribute('data-swiper-slide-index') === `${swiper.realIndex}`)[0];
|
|
37587
|
+
newThumbsIndex = thumbsSwiper.slides.indexOf(newThumbsSlide);
|
|
37268
37588
|
direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev';
|
|
37269
37589
|
} else {
|
|
37270
37590
|
newThumbsIndex = swiper.realIndex;
|
|
@@ -37280,7 +37600,8 @@
|
|
|
37280
37600
|
} else {
|
|
37281
37601
|
newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1;
|
|
37282
37602
|
}
|
|
37283
|
-
} else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {
|
|
37603
|
+
} else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) {
|
|
37604
|
+
// newThumbsIndex = newThumbsIndex - slidesPerView + 1;
|
|
37284
37605
|
}
|
|
37285
37606
|
thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined);
|
|
37286
37607
|
}
|
|
@@ -37293,24 +37614,37 @@
|
|
|
37293
37614
|
if (!thumbs || !thumbs.swiper) return;
|
|
37294
37615
|
if (typeof thumbs.swiper === 'string' || thumbs.swiper instanceof HTMLElement) {
|
|
37295
37616
|
const document = getDocument();
|
|
37296
|
-
const
|
|
37297
|
-
|
|
37298
|
-
|
|
37299
|
-
|
|
37300
|
-
const onThumbsSwiper = e => {
|
|
37301
|
-
thumbs.swiper = e.detail[0];
|
|
37302
|
-
thumbsElement.removeEventListener('init', onThumbsSwiper);
|
|
37617
|
+
const getThumbsElementAndInit = () => {
|
|
37618
|
+
const thumbsElement = typeof thumbs.swiper === 'string' ? document.querySelector(thumbs.swiper) : thumbs.swiper;
|
|
37619
|
+
if (thumbsElement && thumbsElement.swiper) {
|
|
37620
|
+
thumbs.swiper = thumbsElement.swiper;
|
|
37303
37621
|
init();
|
|
37304
37622
|
update(true);
|
|
37305
|
-
|
|
37306
|
-
|
|
37307
|
-
|
|
37308
|
-
|
|
37309
|
-
|
|
37310
|
-
|
|
37623
|
+
} else if (thumbsElement) {
|
|
37624
|
+
const onThumbsSwiper = e => {
|
|
37625
|
+
thumbs.swiper = e.detail[0];
|
|
37626
|
+
thumbsElement.removeEventListener('init', onThumbsSwiper);
|
|
37627
|
+
init();
|
|
37628
|
+
update(true);
|
|
37629
|
+
thumbs.swiper.update();
|
|
37630
|
+
swiper.update();
|
|
37631
|
+
};
|
|
37632
|
+
thumbsElement.addEventListener('init', onThumbsSwiper);
|
|
37633
|
+
}
|
|
37634
|
+
return thumbsElement;
|
|
37635
|
+
};
|
|
37636
|
+
const watchForThumbsToAppear = () => {
|
|
37637
|
+
if (swiper.destroyed) return;
|
|
37638
|
+
const thumbsElement = getThumbsElementAndInit();
|
|
37639
|
+
if (!thumbsElement) {
|
|
37640
|
+
requestAnimationFrame(watchForThumbsToAppear);
|
|
37641
|
+
}
|
|
37642
|
+
};
|
|
37643
|
+
requestAnimationFrame(watchForThumbsToAppear);
|
|
37644
|
+
} else {
|
|
37645
|
+
init();
|
|
37646
|
+
update(true);
|
|
37311
37647
|
}
|
|
37312
|
-
init();
|
|
37313
|
-
update(true);
|
|
37314
37648
|
});
|
|
37315
37649
|
on('slideChange update resize observerUpdate', () => {
|
|
37316
37650
|
update();
|
|
@@ -37365,8 +37699,8 @@
|
|
|
37365
37699
|
const {
|
|
37366
37700
|
touchEventsData: data,
|
|
37367
37701
|
touches
|
|
37368
|
-
} = swiper;
|
|
37369
|
-
|
|
37702
|
+
} = swiper;
|
|
37703
|
+
// Velocity
|
|
37370
37704
|
if (data.velocities.length === 0) {
|
|
37371
37705
|
data.velocities.push({
|
|
37372
37706
|
position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
|
|
@@ -37388,8 +37722,8 @@
|
|
|
37388
37722
|
rtlTranslate: rtl,
|
|
37389
37723
|
snapGrid,
|
|
37390
37724
|
touchEventsData: data
|
|
37391
|
-
} = swiper;
|
|
37392
|
-
|
|
37725
|
+
} = swiper;
|
|
37726
|
+
// Time diff
|
|
37393
37727
|
const touchEndTime = now();
|
|
37394
37728
|
const timeDiff = touchEndTime - data.touchStartTime;
|
|
37395
37729
|
if (currentPos < -swiper.minTranslate()) {
|
|
@@ -37414,9 +37748,9 @@
|
|
|
37414
37748
|
swiper.velocity /= 2;
|
|
37415
37749
|
if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) {
|
|
37416
37750
|
swiper.velocity = 0;
|
|
37417
|
-
}
|
|
37751
|
+
}
|
|
37752
|
+
// this implies that the user stopped moving a finger then released.
|
|
37418
37753
|
// There would be no events with distance zero, so the last event is stale.
|
|
37419
|
-
|
|
37420
37754
|
if (time > 150 || now() - lastMoveEvent.time > 300) {
|
|
37421
37755
|
swiper.velocity = 0;
|
|
37422
37756
|
}
|
|
@@ -37476,8 +37810,8 @@
|
|
|
37476
37810
|
once('transitionEnd', () => {
|
|
37477
37811
|
swiper.loopFix();
|
|
37478
37812
|
});
|
|
37479
|
-
}
|
|
37480
|
-
|
|
37813
|
+
}
|
|
37814
|
+
// Fix duration
|
|
37481
37815
|
if (swiper.velocity !== 0) {
|
|
37482
37816
|
if (rtl) {
|
|
37483
37817
|
momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
|
|
@@ -37604,8 +37938,8 @@
|
|
|
37604
37938
|
const {
|
|
37605
37939
|
rows,
|
|
37606
37940
|
fill
|
|
37607
|
-
} = swiper.params.grid;
|
|
37608
|
-
|
|
37941
|
+
} = swiper.params.grid;
|
|
37942
|
+
// Set slides order
|
|
37609
37943
|
let newSlideOrderIndex;
|
|
37610
37944
|
let column;
|
|
37611
37945
|
let row;
|
|
@@ -37693,7 +38027,7 @@
|
|
|
37693
38027
|
if (params.loop) {
|
|
37694
38028
|
swiper.loopCreate();
|
|
37695
38029
|
}
|
|
37696
|
-
if (!params.observer) {
|
|
38030
|
+
if (!params.observer || swiper.isElement) {
|
|
37697
38031
|
swiper.update();
|
|
37698
38032
|
}
|
|
37699
38033
|
}
|
|
@@ -37731,7 +38065,7 @@
|
|
|
37731
38065
|
if (params.loop) {
|
|
37732
38066
|
swiper.loopCreate();
|
|
37733
38067
|
}
|
|
37734
|
-
if (!params.observer) {
|
|
38068
|
+
if (!params.observer || swiper.isElement) {
|
|
37735
38069
|
swiper.update();
|
|
37736
38070
|
}
|
|
37737
38071
|
swiper.slideTo(newActiveIndex, 0, false);
|
|
@@ -37781,7 +38115,7 @@
|
|
|
37781
38115
|
if (params.loop) {
|
|
37782
38116
|
swiper.loopCreate();
|
|
37783
38117
|
}
|
|
37784
|
-
if (!params.observer) {
|
|
38118
|
+
if (!params.observer || swiper.isElement) {
|
|
37785
38119
|
swiper.update();
|
|
37786
38120
|
}
|
|
37787
38121
|
if (params.loop) {
|
|
@@ -37821,7 +38155,7 @@
|
|
|
37821
38155
|
if (params.loop) {
|
|
37822
38156
|
swiper.loopCreate();
|
|
37823
38157
|
}
|
|
37824
|
-
if (!params.observer) {
|
|
38158
|
+
if (!params.observer || swiper.isElement) {
|
|
37825
38159
|
swiper.update();
|
|
37826
38160
|
}
|
|
37827
38161
|
if (params.loop) {
|
|
@@ -37886,12 +38220,12 @@
|
|
|
37886
38220
|
on('transitionEnd', () => {
|
|
37887
38221
|
if (swiper.params.effect !== effect) return;
|
|
37888
38222
|
if (recreateShadows) {
|
|
37889
|
-
if (!getEffectParams || !getEffectParams().slideShadows) return;
|
|
37890
|
-
|
|
38223
|
+
if (!getEffectParams || !getEffectParams().slideShadows) return;
|
|
38224
|
+
// remove shadows
|
|
37891
38225
|
swiper.slides.forEach(slideEl => {
|
|
37892
38226
|
slideEl.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => shadowEl.remove());
|
|
37893
|
-
});
|
|
37894
|
-
|
|
38227
|
+
});
|
|
38228
|
+
// create new one
|
|
37895
38229
|
recreateShadows();
|
|
37896
38230
|
}
|
|
37897
38231
|
});
|
|
@@ -37954,14 +38288,11 @@
|
|
|
37954
38288
|
if (!swiper || swiper.destroyed) return;
|
|
37955
38289
|
eventTriggered = true;
|
|
37956
38290
|
swiper.animating = false;
|
|
37957
|
-
const
|
|
37958
|
-
|
|
37959
|
-
|
|
37960
|
-
bubbles: true,
|
|
37961
|
-
cancelable: true
|
|
37962
|
-
});
|
|
37963
|
-
swiper.wrapperEl.dispatchEvent(evt);
|
|
38291
|
+
const evt = new window.CustomEvent('transitionend', {
|
|
38292
|
+
bubbles: true,
|
|
38293
|
+
cancelable: true
|
|
37964
38294
|
});
|
|
38295
|
+
swiper.wrapperEl.dispatchEvent(evt);
|
|
37965
38296
|
});
|
|
37966
38297
|
});
|
|
37967
38298
|
}
|
|
@@ -38002,7 +38333,7 @@
|
|
|
38002
38333
|
const setTransition = duration => {
|
|
38003
38334
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38004
38335
|
transformElements.forEach(el => {
|
|
38005
|
-
el.style.
|
|
38336
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38006
38337
|
});
|
|
38007
38338
|
effectVirtualTransitionEnd({
|
|
38008
38339
|
swiper,
|
|
@@ -38155,7 +38486,7 @@
|
|
|
38155
38486
|
cubeShadowEl.style.transform = `scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`;
|
|
38156
38487
|
}
|
|
38157
38488
|
}
|
|
38158
|
-
const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0;
|
|
38489
|
+
const zFactor = (browser.isSafari || browser.isWebView) && browser.needPerspectiveFix ? -swiperSize / 2 : 0;
|
|
38159
38490
|
wrapperEl.style.transform = `translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`;
|
|
38160
38491
|
wrapperEl.style.setProperty('--swiper-cube-translate-z', `${zFactor}px`);
|
|
38161
38492
|
};
|
|
@@ -38280,9 +38611,9 @@
|
|
|
38280
38611
|
const setTransition = duration => {
|
|
38281
38612
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38282
38613
|
transformElements.forEach(el => {
|
|
38283
|
-
el.style.
|
|
38614
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38284
38615
|
el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => {
|
|
38285
|
-
shadowEl.style.
|
|
38616
|
+
shadowEl.style.transitionDuration = `${duration}ms`;
|
|
38286
38617
|
});
|
|
38287
38618
|
});
|
|
38288
38619
|
effectVirtualTransitionEnd({
|
|
@@ -38338,8 +38669,8 @@
|
|
|
38338
38669
|
const transform = swiper.translate;
|
|
38339
38670
|
const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;
|
|
38340
38671
|
const rotate = isHorizontal ? params.rotate : -params.rotate;
|
|
38341
|
-
const translate = params.depth;
|
|
38342
|
-
|
|
38672
|
+
const translate = params.depth;
|
|
38673
|
+
// Each slide offset from center
|
|
38343
38674
|
for (let i = 0, length = slides.length; i < length; i += 1) {
|
|
38344
38675
|
const slideEl = slides[i];
|
|
38345
38676
|
const slideSize = slidesSizesGrid[i];
|
|
@@ -38347,18 +38678,19 @@
|
|
|
38347
38678
|
const centerOffset = (center - slideOffset - slideSize / 2) / slideSize;
|
|
38348
38679
|
const offsetMultiplier = typeof params.modifier === 'function' ? params.modifier(centerOffset) : centerOffset * params.modifier;
|
|
38349
38680
|
let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
|
|
38350
|
-
let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
|
|
38351
|
-
|
|
38681
|
+
let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
|
|
38682
|
+
// var rotateZ = 0
|
|
38352
38683
|
let translateZ = -translate * Math.abs(offsetMultiplier);
|
|
38353
|
-
let stretch = params.stretch;
|
|
38354
|
-
|
|
38684
|
+
let stretch = params.stretch;
|
|
38685
|
+
// Allow percentage to make a relative stretch for responsive sliders
|
|
38355
38686
|
if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {
|
|
38356
38687
|
stretch = parseFloat(params.stretch) / 100 * slideSize;
|
|
38357
38688
|
}
|
|
38358
38689
|
let translateY = isHorizontal ? 0 : stretch * offsetMultiplier;
|
|
38359
38690
|
let translateX = isHorizontal ? stretch * offsetMultiplier : 0;
|
|
38360
|
-
let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier);
|
|
38691
|
+
let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier);
|
|
38361
38692
|
|
|
38693
|
+
// Fix for ultra small values
|
|
38362
38694
|
if (Math.abs(translateX) < 0.001) translateX = 0;
|
|
38363
38695
|
if (Math.abs(translateY) < 0.001) translateY = 0;
|
|
38364
38696
|
if (Math.abs(translateZ) < 0.001) translateZ = 0;
|
|
@@ -38387,9 +38719,9 @@
|
|
|
38387
38719
|
const setTransition = duration => {
|
|
38388
38720
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38389
38721
|
transformElements.forEach(el => {
|
|
38390
|
-
el.style.
|
|
38722
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38391
38723
|
el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => {
|
|
38392
|
-
shadowEl.style.
|
|
38724
|
+
shadowEl.style.transitionDuration = `${duration}ms`;
|
|
38393
38725
|
});
|
|
38394
38726
|
});
|
|
38395
38727
|
};
|
|
@@ -38479,12 +38811,12 @@
|
|
|
38479
38811
|
} else if (progress > 0) {
|
|
38480
38812
|
data = params.prev;
|
|
38481
38813
|
custom = true;
|
|
38482
|
-
}
|
|
38483
|
-
|
|
38814
|
+
}
|
|
38815
|
+
// set translate
|
|
38484
38816
|
t.forEach((value, index) => {
|
|
38485
38817
|
t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`;
|
|
38486
|
-
});
|
|
38487
|
-
|
|
38818
|
+
});
|
|
38819
|
+
// set rotates
|
|
38488
38820
|
r.forEach((value, index) => {
|
|
38489
38821
|
r[index] = data.rotate[index] * Math.abs(progress * multiplier);
|
|
38490
38822
|
});
|
|
@@ -38493,8 +38825,9 @@
|
|
|
38493
38825
|
const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`;
|
|
38494
38826
|
const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`;
|
|
38495
38827
|
const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier;
|
|
38496
|
-
const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`;
|
|
38828
|
+
const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`;
|
|
38497
38829
|
|
|
38830
|
+
// Set shadows
|
|
38498
38831
|
if (custom && data.shadow || !custom) {
|
|
38499
38832
|
let shadowEl = slideEl.querySelector('.swiper-slide-shadow');
|
|
38500
38833
|
if (!shadowEl && data.shadow) {
|
|
@@ -38516,9 +38849,9 @@
|
|
|
38516
38849
|
const setTransition = duration => {
|
|
38517
38850
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38518
38851
|
transformElements.forEach(el => {
|
|
38519
|
-
el.style.
|
|
38852
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38520
38853
|
el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => {
|
|
38521
|
-
shadowEl.style.
|
|
38854
|
+
shadowEl.style.transitionDuration = `${duration}ms`;
|
|
38522
38855
|
});
|
|
38523
38856
|
});
|
|
38524
38857
|
effectVirtualTransitionEnd({
|
|
@@ -38630,9 +38963,9 @@
|
|
|
38630
38963
|
const setTransition = duration => {
|
|
38631
38964
|
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
|
38632
38965
|
transformElements.forEach(el => {
|
|
38633
|
-
el.style.
|
|
38966
|
+
el.style.transitionDuration = `${duration}ms`;
|
|
38634
38967
|
el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => {
|
|
38635
|
-
shadowEl.style.
|
|
38968
|
+
shadowEl.style.transitionDuration = `${duration}ms`;
|
|
38636
38969
|
});
|
|
38637
38970
|
});
|
|
38638
38971
|
effectVirtualTransitionEnd({
|
|
@@ -38656,15 +38989,15 @@
|
|
|
38656
38989
|
}
|
|
38657
38990
|
|
|
38658
38991
|
/**
|
|
38659
|
-
* Swiper 9.0.
|
|
38992
|
+
* Swiper 9.0.3
|
|
38660
38993
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
38661
38994
|
* https://swiperjs.com
|
|
38662
38995
|
*
|
|
38663
|
-
* Copyright 2014-
|
|
38996
|
+
* Copyright 2014-2023 Vladimir Kharlampidi
|
|
38664
38997
|
*
|
|
38665
38998
|
* Released under the MIT License
|
|
38666
38999
|
*
|
|
38667
|
-
* Released on:
|
|
39000
|
+
* Released on: February 6, 2023
|
|
38668
39001
|
*/
|
|
38669
39002
|
|
|
38670
39003
|
// Swiper Class
|
|
@@ -38672,9 +39005,9 @@
|
|
|
38672
39005
|
Swiper$1.use(modules);
|
|
38673
39006
|
|
|
38674
39007
|
/* 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',
|
|
39008
|
+
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
39009
|
// modules
|
|
38677
|
-
'a11y', '_autoplay', '_controller', 'coverflowEffect', 'cubeEffect', 'fadeEffect', 'flipEffect', 'creativeEffect', 'cardsEffect', 'hashNavigation', 'history', 'keyboard', 'mousewheel', '_navigation', '_pagination', 'parallax', '_scrollbar', '_thumbs', 'virtual', 'zoom', 'control', '
|
|
39010
|
+
'a11y', '_autoplay', '_controller', 'coverflowEffect', 'cubeEffect', 'fadeEffect', 'flipEffect', 'creativeEffect', 'cardsEffect', 'hashNavigation', 'history', 'keyboard', 'mousewheel', '_navigation', '_pagination', 'parallax', '_scrollbar', '_thumbs', 'virtual', 'zoom', 'control', 'injectStyles', 'injectStylesUrls'];
|
|
38678
39011
|
|
|
38679
39012
|
function isObject(o) {
|
|
38680
39013
|
return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object';
|
|
@@ -38724,6 +39057,14 @@
|
|
|
38724
39057
|
}
|
|
38725
39058
|
return attrName.replace(/-[a-z]/g, l => l.toUpperCase().replace('-', ''));
|
|
38726
39059
|
}
|
|
39060
|
+
function wrapperClass(className) {
|
|
39061
|
+
if (className === void 0) {
|
|
39062
|
+
className = '';
|
|
39063
|
+
}
|
|
39064
|
+
if (!className) return 'swiper-wrapper';
|
|
39065
|
+
if (!className.includes('swiper-wrapper')) return `swiper-wrapper ${className}`;
|
|
39066
|
+
return className;
|
|
39067
|
+
}
|
|
38727
39068
|
|
|
38728
39069
|
const formatValue = val => {
|
|
38729
39070
|
if (parseFloat(val) === Number(val)) return Number(val);
|
|
@@ -38767,6 +39108,9 @@
|
|
|
38767
39108
|
if (!allowedParams.includes(name)) return;
|
|
38768
39109
|
const value = formatValue(attr.value);
|
|
38769
39110
|
if (passedParams[name] && modulesParamsList.includes(attr.name)) {
|
|
39111
|
+
if (passedParams[name].constructor !== Object) {
|
|
39112
|
+
passedParams[name] = {};
|
|
39113
|
+
}
|
|
38770
39114
|
passedParams[name].enabled = value;
|
|
38771
39115
|
} else {
|
|
38772
39116
|
passedParams[name] = value;
|
|
@@ -38816,7 +39160,7 @@
|
|
|
38816
39160
|
scrollbarEl,
|
|
38817
39161
|
paginationEl
|
|
38818
39162
|
} = _ref;
|
|
38819
|
-
const updateParams = changedParams.filter(key => key !== 'children' && key !== 'direction');
|
|
39163
|
+
const updateParams = changedParams.filter(key => key !== 'children' && key !== 'direction' && key !== 'wrapperClass');
|
|
38820
39164
|
const {
|
|
38821
39165
|
params: currentParams,
|
|
38822
39166
|
pagination,
|
|
@@ -38967,18 +39311,19 @@
|
|
|
38967
39311
|
}
|
|
38968
39312
|
|
|
38969
39313
|
/**
|
|
38970
|
-
* Swiper Custom Element 9.0.
|
|
39314
|
+
* Swiper Custom Element 9.0.3
|
|
38971
39315
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
|
38972
39316
|
* https://swiperjs.com
|
|
38973
39317
|
*
|
|
38974
|
-
* Copyright 2014-
|
|
39318
|
+
* Copyright 2014-2023 Vladimir Kharlampidi
|
|
38975
39319
|
*
|
|
38976
39320
|
* Released under the MIT License
|
|
38977
39321
|
*
|
|
38978
|
-
* Released on:
|
|
39322
|
+
* Released on: February 6, 2023
|
|
38979
39323
|
*/
|
|
38980
39324
|
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}`;
|
|
39325
|
+
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}`;
|
|
39326
|
+
let globalInjectStyles = true;
|
|
38982
39327
|
const addGlobalStyles = (preInit, swiper) => {
|
|
38983
39328
|
let globalStyles = document.querySelector('style#swiper-element-styles');
|
|
38984
39329
|
const shouldOverwrite = globalStyles && globalStyles.preInit && !preInit;
|
|
@@ -39009,20 +39354,26 @@
|
|
|
39009
39354
|
});
|
|
39010
39355
|
}
|
|
39011
39356
|
cssStyles() {
|
|
39012
|
-
return [SwiperCSS,
|
|
39357
|
+
return [globalInjectStyles ? SwiperCSS : '',
|
|
39013
39358
|
// eslint-disable-line
|
|
39014
|
-
...(this.
|
|
39359
|
+
...(this.injectStyles && Array.isArray(this.injectStyles) ? this.injectStyles : [])].join('\n');
|
|
39015
39360
|
}
|
|
39016
39361
|
cssLinks() {
|
|
39017
|
-
return this.
|
|
39362
|
+
return this.injectStylesUrls || [];
|
|
39018
39363
|
}
|
|
39019
39364
|
render() {
|
|
39020
|
-
|
|
39021
|
-
|
|
39365
|
+
if (globalInjectStyles) {
|
|
39366
|
+
// global styles
|
|
39367
|
+
addGlobalStyles(false, this);
|
|
39368
|
+
}
|
|
39369
|
+
|
|
39022
39370
|
// local styles
|
|
39023
|
-
|
|
39024
|
-
|
|
39025
|
-
|
|
39371
|
+
const localStyles = this.cssStyles();
|
|
39372
|
+
if (localStyles.length) {
|
|
39373
|
+
this.stylesEl = document.createElement('style');
|
|
39374
|
+
this.stylesEl.textContent = localStyles;
|
|
39375
|
+
this.shadowEl.appendChild(this.stylesEl);
|
|
39376
|
+
}
|
|
39026
39377
|
this.cssLinks().forEach(url => {
|
|
39027
39378
|
const linkExists = document.querySelector(`link[href="${url}"]`);
|
|
39028
39379
|
if (linkExists) return;
|
|
@@ -39173,9 +39524,17 @@
|
|
|
39173
39524
|
}
|
|
39174
39525
|
|
|
39175
39526
|
// eslint-disable-next-line
|
|
39176
|
-
const register = ()
|
|
39527
|
+
const register = function (injectStyles) {
|
|
39528
|
+
if (injectStyles === void 0) {
|
|
39529
|
+
injectStyles = true;
|
|
39530
|
+
}
|
|
39177
39531
|
if (typeof window === 'undefined') return;
|
|
39178
|
-
|
|
39532
|
+
if (!injectStyles) {
|
|
39533
|
+
globalInjectStyles = false;
|
|
39534
|
+
}
|
|
39535
|
+
if (globalInjectStyles) {
|
|
39536
|
+
addGlobalStyles(true);
|
|
39537
|
+
}
|
|
39179
39538
|
if (!window.customElements.get('swiper-container')) window.customElements.define('swiper-container', SwiperContainer);
|
|
39180
39539
|
if (!window.customElements.get('swiper-slide')) window.customElements.define('swiper-slide', SwiperSlide);
|
|
39181
39540
|
};
|
|
@@ -39281,7 +39640,7 @@
|
|
|
39281
39640
|
on: {
|
|
39282
39641
|
pageBeforeRemove(page) {
|
|
39283
39642
|
const app = this;
|
|
39284
|
-
page.$el.find('.
|
|
39643
|
+
page.$el.find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39285
39644
|
app.swiper.destroy(swiperEl);
|
|
39286
39645
|
});
|
|
39287
39646
|
},
|
|
@@ -39293,50 +39652,38 @@
|
|
|
39293
39652
|
},
|
|
39294
39653
|
pageInit(page) {
|
|
39295
39654
|
const app = this;
|
|
39296
|
-
page.$el.find('.
|
|
39655
|
+
page.$el.find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39297
39656
|
initSwiper.call(app, swiperEl);
|
|
39298
39657
|
});
|
|
39299
39658
|
},
|
|
39300
39659
|
pageReinit(page) {
|
|
39301
39660
|
const app = this;
|
|
39302
|
-
page.$el.find('.
|
|
39661
|
+
page.$el.find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39303
39662
|
const swiper = app.swiper.get(swiperEl);
|
|
39304
39663
|
if (swiper && swiper.update) swiper.update();
|
|
39305
39664
|
});
|
|
39306
39665
|
},
|
|
39307
39666
|
tabMounted(tabEl) {
|
|
39308
39667
|
const app = this;
|
|
39309
|
-
$(tabEl).find('.
|
|
39668
|
+
$(tabEl).find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39310
39669
|
initSwiper.call(app, swiperEl);
|
|
39311
39670
|
});
|
|
39312
39671
|
},
|
|
39313
39672
|
tabShow(tabEl) {
|
|
39314
39673
|
const app = this;
|
|
39315
|
-
$(tabEl).find('.
|
|
39674
|
+
$(tabEl).find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39316
39675
|
const swiper = app.swiper.get(swiperEl);
|
|
39317
39676
|
if (swiper && swiper.update) swiper.update();
|
|
39318
39677
|
});
|
|
39319
39678
|
},
|
|
39320
39679
|
tabBeforeRemove(tabEl) {
|
|
39321
39680
|
const app = this;
|
|
39322
|
-
$(tabEl).find('.
|
|
39681
|
+
$(tabEl).find('.tabs-swipeable-wrap').each(swiperEl => {
|
|
39323
39682
|
app.swiper.destroy(swiperEl);
|
|
39324
39683
|
});
|
|
39325
39684
|
}
|
|
39326
39685
|
},
|
|
39327
39686
|
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
39687
|
'tabs-swipeable-wrap': {
|
|
39341
39688
|
insert(vnode) {
|
|
39342
39689
|
const app = this;
|
|
@@ -39878,6 +40225,7 @@
|
|
|
39878
40225
|
const popupParams = {
|
|
39879
40226
|
content: popupHtml,
|
|
39880
40227
|
push: pb.params.popupPush,
|
|
40228
|
+
closeByBackdropClick: pb.params.closeByBackdropClick,
|
|
39881
40229
|
on: {
|
|
39882
40230
|
popupOpen(popup) {
|
|
39883
40231
|
pb.onOpen('popup', popup.el);
|
|
@@ -40018,6 +40366,7 @@
|
|
|
40018
40366
|
routableModals: false,
|
|
40019
40367
|
virtualSlides: true,
|
|
40020
40368
|
lazy: true,
|
|
40369
|
+
closeByBackdropClick: true,
|
|
40021
40370
|
renderNavbar: undefined,
|
|
40022
40371
|
renderToolbar: undefined,
|
|
40023
40372
|
renderCaption: undefined,
|
|
@@ -40028,6 +40377,7 @@
|
|
|
40028
40377
|
renderPopup: undefined,
|
|
40029
40378
|
renderStandalone: undefined,
|
|
40030
40379
|
swiper: {
|
|
40380
|
+
cssMode: false,
|
|
40031
40381
|
initialSlide: 0,
|
|
40032
40382
|
spaceBetween: 20,
|
|
40033
40383
|
speed: 300,
|