Update Fix
This commit is contained in:
9
node_modules/swiper/modules/a11y-element.css
generated
vendored
Normal file
9
node_modules/swiper/modules/a11y-element.css
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/* a11y */
|
||||
.swiper .swiper-notification {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
z-index: -1000;
|
||||
}
|
||||
1
node_modules/swiper/modules/a11y-element.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/a11y-element.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper .swiper-notification{left:0;opacity:0;pointer-events:none;position:absolute;top:0;z-index:-1000}
|
||||
9
node_modules/swiper/modules/a11y.css
generated
vendored
Normal file
9
node_modules/swiper/modules/a11y.css
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/* a11y */
|
||||
.swiper .swiper-notification {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
z-index: -1000;
|
||||
}
|
||||
1
node_modules/swiper/modules/a11y.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/a11y.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper .swiper-notification{left:0;opacity:0;pointer-events:none;position:absolute;top:0;z-index:-1000}
|
||||
2
node_modules/swiper/modules/a11y.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/a11y.min.mjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/swiper/modules/a11y.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/a11y.min.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
378
node_modules/swiper/modules/a11y.mjs
generated
vendored
Normal file
378
node_modules/swiper/modules/a11y.mjs
generated
vendored
Normal file
@@ -0,0 +1,378 @@
|
||||
import { g as getDocument } from '../shared/ssr-window.esm.mjs';
|
||||
import { c as classesToSelector } from '../shared/classes-to-selector.mjs';
|
||||
import { c as createElement, j as elementIndex, m as makeElementsArray, s as setInnerHTML } from '../shared/utils.mjs';
|
||||
|
||||
function A11y({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
a11y: {
|
||||
enabled: true,
|
||||
notificationClass: 'swiper-notification',
|
||||
prevSlideMessage: 'Previous slide',
|
||||
nextSlideMessage: 'Next slide',
|
||||
firstSlideMessage: 'This is the first slide',
|
||||
lastSlideMessage: 'This is the last slide',
|
||||
paginationBulletMessage: 'Go to slide {{index}}',
|
||||
slideLabelMessage: '{{index}} / {{slidesLength}}',
|
||||
containerMessage: null,
|
||||
containerRoleDescriptionMessage: null,
|
||||
containerRole: null,
|
||||
itemRoleDescriptionMessage: null,
|
||||
slideRole: 'group',
|
||||
id: null,
|
||||
scrollOnFocus: true,
|
||||
wrapperLiveRegion: true
|
||||
}
|
||||
});
|
||||
swiper.a11y = {
|
||||
clicked: false
|
||||
};
|
||||
let liveRegion = null;
|
||||
let preventFocusHandler;
|
||||
let focusTargetSlideEl;
|
||||
let visibilityChangedTimestamp = new Date().getTime();
|
||||
function notify(message) {
|
||||
const notification = liveRegion;
|
||||
if (notification.length === 0) return;
|
||||
setInnerHTML(notification, message);
|
||||
}
|
||||
function getRandomNumber(size = 16) {
|
||||
const randomChar = () => Math.round(16 * Math.random()).toString(16);
|
||||
return 'x'.repeat(size).replace(/x/g, randomChar);
|
||||
}
|
||||
function makeElFocusable(el) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('tabIndex', '0');
|
||||
});
|
||||
}
|
||||
function makeElNotFocusable(el) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('tabIndex', '-1');
|
||||
});
|
||||
}
|
||||
function addElRole(el, role) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('role', role);
|
||||
});
|
||||
}
|
||||
function addElRoleDescription(el, description) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('aria-roledescription', description);
|
||||
});
|
||||
}
|
||||
function addElControls(el, controls) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('aria-controls', controls);
|
||||
});
|
||||
}
|
||||
function addElLabel(el, label) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('aria-label', label);
|
||||
});
|
||||
}
|
||||
function addElId(el, id) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('id', id);
|
||||
});
|
||||
}
|
||||
function addElLive(el, live) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('aria-live', live);
|
||||
});
|
||||
}
|
||||
function disableEl(el) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('aria-disabled', true);
|
||||
});
|
||||
}
|
||||
function enableEl(el) {
|
||||
el = makeElementsArray(el);
|
||||
el.forEach(subEl => {
|
||||
subEl.setAttribute('aria-disabled', false);
|
||||
});
|
||||
}
|
||||
function onEnterOrSpaceKey(e) {
|
||||
if (e.keyCode !== 13 && e.keyCode !== 32) return;
|
||||
const params = swiper.params.a11y;
|
||||
const targetEl = e.target;
|
||||
if (swiper.pagination && swiper.pagination.el && (targetEl === swiper.pagination.el || swiper.pagination.el.contains(e.target))) {
|
||||
if (!e.target.matches(classesToSelector(swiper.params.pagination.bulletClass))) return;
|
||||
}
|
||||
if (swiper.navigation && swiper.navigation.prevEl && swiper.navigation.nextEl) {
|
||||
const prevEls = makeElementsArray(swiper.navigation.prevEl);
|
||||
const nextEls = makeElementsArray(swiper.navigation.nextEl);
|
||||
if (nextEls.includes(targetEl)) {
|
||||
if (!(swiper.isEnd && !swiper.params.loop)) {
|
||||
swiper.slideNext();
|
||||
}
|
||||
if (swiper.isEnd) {
|
||||
notify(params.lastSlideMessage);
|
||||
} else {
|
||||
notify(params.nextSlideMessage);
|
||||
}
|
||||
}
|
||||
if (prevEls.includes(targetEl)) {
|
||||
if (!(swiper.isBeginning && !swiper.params.loop)) {
|
||||
swiper.slidePrev();
|
||||
}
|
||||
if (swiper.isBeginning) {
|
||||
notify(params.firstSlideMessage);
|
||||
} else {
|
||||
notify(params.prevSlideMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (swiper.pagination && targetEl.matches(classesToSelector(swiper.params.pagination.bulletClass))) {
|
||||
targetEl.click();
|
||||
}
|
||||
}
|
||||
function updateNavigation() {
|
||||
if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return;
|
||||
const {
|
||||
nextEl,
|
||||
prevEl
|
||||
} = swiper.navigation;
|
||||
if (prevEl) {
|
||||
if (swiper.isBeginning) {
|
||||
disableEl(prevEl);
|
||||
makeElNotFocusable(prevEl);
|
||||
} else {
|
||||
enableEl(prevEl);
|
||||
makeElFocusable(prevEl);
|
||||
}
|
||||
}
|
||||
if (nextEl) {
|
||||
if (swiper.isEnd) {
|
||||
disableEl(nextEl);
|
||||
makeElNotFocusable(nextEl);
|
||||
} else {
|
||||
enableEl(nextEl);
|
||||
makeElFocusable(nextEl);
|
||||
}
|
||||
}
|
||||
}
|
||||
function hasPagination() {
|
||||
return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length;
|
||||
}
|
||||
function hasClickablePagination() {
|
||||
return hasPagination() && swiper.params.pagination.clickable;
|
||||
}
|
||||
function updatePagination() {
|
||||
const params = swiper.params.a11y;
|
||||
if (!hasPagination()) return;
|
||||
swiper.pagination.bullets.forEach(bulletEl => {
|
||||
if (swiper.params.pagination.clickable) {
|
||||
makeElFocusable(bulletEl);
|
||||
if (!swiper.params.pagination.renderBullet) {
|
||||
addElRole(bulletEl, 'button');
|
||||
addElLabel(bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, elementIndex(bulletEl) + 1));
|
||||
}
|
||||
}
|
||||
if (bulletEl.matches(classesToSelector(swiper.params.pagination.bulletActiveClass))) {
|
||||
bulletEl.setAttribute('aria-current', 'true');
|
||||
} else {
|
||||
bulletEl.removeAttribute('aria-current');
|
||||
}
|
||||
});
|
||||
}
|
||||
const initNavEl = (el, wrapperId, message) => {
|
||||
makeElFocusable(el);
|
||||
if (el.tagName !== 'BUTTON') {
|
||||
addElRole(el, 'button');
|
||||
el.addEventListener('keydown', onEnterOrSpaceKey);
|
||||
}
|
||||
addElLabel(el, message);
|
||||
addElControls(el, wrapperId);
|
||||
};
|
||||
const handlePointerDown = e => {
|
||||
if (focusTargetSlideEl && focusTargetSlideEl !== e.target && !focusTargetSlideEl.contains(e.target)) {
|
||||
preventFocusHandler = true;
|
||||
}
|
||||
swiper.a11y.clicked = true;
|
||||
};
|
||||
const handlePointerUp = () => {
|
||||
preventFocusHandler = false;
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
if (!swiper.destroyed) {
|
||||
swiper.a11y.clicked = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
const onVisibilityChange = e => {
|
||||
visibilityChangedTimestamp = new Date().getTime();
|
||||
};
|
||||
const handleFocus = e => {
|
||||
if (swiper.a11y.clicked || !swiper.params.a11y.scrollOnFocus) return;
|
||||
if (new Date().getTime() - visibilityChangedTimestamp < 100) return;
|
||||
const slideEl = e.target.closest(`.${swiper.params.slideClass}, swiper-slide`);
|
||||
if (!slideEl || !swiper.slides.includes(slideEl)) return;
|
||||
focusTargetSlideEl = slideEl;
|
||||
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
||||
const isActive = (isVirtual ? parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10) : swiper.slides.indexOf(slideEl)) === swiper.activeIndex;
|
||||
const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl);
|
||||
if (isActive || isVisible) return;
|
||||
if (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) return;
|
||||
if (swiper.isHorizontal()) {
|
||||
swiper.el.scrollLeft = 0;
|
||||
} else {
|
||||
swiper.el.scrollTop = 0;
|
||||
}
|
||||
requestAnimationFrame(() => {
|
||||
if (preventFocusHandler) return;
|
||||
if (swiper.params.loop) {
|
||||
swiper.slideToLoop(swiper.getSlideIndexWhenGrid(parseInt(slideEl.getAttribute('data-swiper-slide-index'))), 0);
|
||||
} else if (isVirtual) {
|
||||
swiper.slideTo(swiper.getSlideIndexWhenGrid(parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10)), 0);
|
||||
} else {
|
||||
swiper.slideTo(swiper.getSlideIndexWhenGrid(swiper.slides.indexOf(slideEl)), 0);
|
||||
}
|
||||
preventFocusHandler = false;
|
||||
});
|
||||
};
|
||||
const initSlides = () => {
|
||||
const params = swiper.params.a11y;
|
||||
if (params.itemRoleDescriptionMessage) {
|
||||
addElRoleDescription(swiper.slides, params.itemRoleDescriptionMessage);
|
||||
}
|
||||
if (params.slideRole) {
|
||||
addElRole(swiper.slides, params.slideRole);
|
||||
}
|
||||
const slidesLength = swiper.slides.length;
|
||||
if (params.slideLabelMessage) {
|
||||
swiper.slides.forEach((slideEl, index) => {
|
||||
const slideIndex = swiper.params.loop ? parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10) : index;
|
||||
const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength);
|
||||
addElLabel(slideEl, ariaLabelMessage);
|
||||
});
|
||||
}
|
||||
};
|
||||
const init = () => {
|
||||
const params = swiper.params.a11y;
|
||||
swiper.el.append(liveRegion);
|
||||
|
||||
// Container
|
||||
const containerEl = swiper.el;
|
||||
if (params.containerRoleDescriptionMessage) {
|
||||
addElRoleDescription(containerEl, params.containerRoleDescriptionMessage);
|
||||
}
|
||||
if (params.containerMessage) {
|
||||
addElLabel(containerEl, params.containerMessage);
|
||||
}
|
||||
if (params.containerRole) {
|
||||
addElRole(containerEl, params.containerRole);
|
||||
}
|
||||
|
||||
// Wrapper
|
||||
const wrapperEl = swiper.wrapperEl;
|
||||
const wrapperId = params.id || wrapperEl.getAttribute('id') || `swiper-wrapper-${getRandomNumber(16)}`;
|
||||
addElId(wrapperEl, wrapperId);
|
||||
if (params.wrapperLiveRegion) {
|
||||
const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite';
|
||||
addElLive(wrapperEl, live);
|
||||
}
|
||||
|
||||
// Slide
|
||||
initSlides();
|
||||
|
||||
// Navigation
|
||||
let {
|
||||
nextEl,
|
||||
prevEl
|
||||
} = swiper.navigation ? swiper.navigation : {};
|
||||
nextEl = makeElementsArray(nextEl);
|
||||
prevEl = makeElementsArray(prevEl);
|
||||
if (nextEl) {
|
||||
nextEl.forEach(el => initNavEl(el, wrapperId, params.nextSlideMessage));
|
||||
}
|
||||
if (prevEl) {
|
||||
prevEl.forEach(el => initNavEl(el, wrapperId, params.prevSlideMessage));
|
||||
}
|
||||
|
||||
// Pagination
|
||||
if (hasClickablePagination()) {
|
||||
const paginationEl = makeElementsArray(swiper.pagination.el);
|
||||
paginationEl.forEach(el => {
|
||||
el.addEventListener('keydown', onEnterOrSpaceKey);
|
||||
});
|
||||
}
|
||||
|
||||
// Tab focus
|
||||
const document = getDocument();
|
||||
document.addEventListener('visibilitychange', onVisibilityChange);
|
||||
swiper.el.addEventListener('focus', handleFocus, true);
|
||||
swiper.el.addEventListener('pointerdown', handlePointerDown, true);
|
||||
swiper.el.addEventListener('pointerup', handlePointerUp, true);
|
||||
};
|
||||
function destroy() {
|
||||
if (liveRegion) liveRegion.remove();
|
||||
let {
|
||||
nextEl,
|
||||
prevEl
|
||||
} = swiper.navigation ? swiper.navigation : {};
|
||||
nextEl = makeElementsArray(nextEl);
|
||||
prevEl = makeElementsArray(prevEl);
|
||||
if (nextEl) {
|
||||
nextEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey));
|
||||
}
|
||||
if (prevEl) {
|
||||
prevEl.forEach(el => el.removeEventListener('keydown', onEnterOrSpaceKey));
|
||||
}
|
||||
|
||||
// Pagination
|
||||
if (hasClickablePagination()) {
|
||||
const paginationEl = makeElementsArray(swiper.pagination.el);
|
||||
paginationEl.forEach(el => {
|
||||
el.removeEventListener('keydown', onEnterOrSpaceKey);
|
||||
});
|
||||
}
|
||||
const document = getDocument();
|
||||
document.removeEventListener('visibilitychange', onVisibilityChange);
|
||||
// Tab focus
|
||||
if (swiper.el && typeof swiper.el !== 'string') {
|
||||
swiper.el.removeEventListener('focus', handleFocus, true);
|
||||
swiper.el.removeEventListener('pointerdown', handlePointerDown, true);
|
||||
swiper.el.removeEventListener('pointerup', handlePointerUp, true);
|
||||
}
|
||||
}
|
||||
on('beforeInit', () => {
|
||||
liveRegion = createElement('span', swiper.params.a11y.notificationClass);
|
||||
liveRegion.setAttribute('aria-live', 'assertive');
|
||||
liveRegion.setAttribute('aria-atomic', 'true');
|
||||
});
|
||||
on('afterInit', () => {
|
||||
if (!swiper.params.a11y.enabled) return;
|
||||
init();
|
||||
});
|
||||
on('slidesLengthChange snapGridLengthChange slidesGridLengthChange', () => {
|
||||
if (!swiper.params.a11y.enabled) return;
|
||||
initSlides();
|
||||
});
|
||||
on('fromEdge toEdge afterInit lock unlock', () => {
|
||||
if (!swiper.params.a11y.enabled) return;
|
||||
updateNavigation();
|
||||
});
|
||||
on('paginationUpdate', () => {
|
||||
if (!swiper.params.a11y.enabled) return;
|
||||
updatePagination();
|
||||
});
|
||||
on('destroy', () => {
|
||||
if (!swiper.params.a11y.enabled) return;
|
||||
destroy();
|
||||
});
|
||||
}
|
||||
|
||||
export { A11y as default };
|
||||
0
node_modules/swiper/modules/autoplay-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/autoplay-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/autoplay-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/autoplay-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/autoplay.css
generated
vendored
Normal file
0
node_modules/swiper/modules/autoplay.css
generated
vendored
Normal file
0
node_modules/swiper/modules/autoplay.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/autoplay.min.css
generated
vendored
Normal file
2
node_modules/swiper/modules/autoplay.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/autoplay.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{g as getDocument}from"../shared/ssr-window.esm.min.mjs";function Autoplay({swiper:e,extendParams:a,on:t,emit:n,params:i}){let r,o;e.autoplay={running:!1,paused:!1,timeLeft:0},a({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!1,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let s,l,p,u,d,y,m,c=i&&i.autoplay?i.autoplay.delay:3e3,g=i&&i.autoplay?i.autoplay.delay:3e3,v=(new Date).getTime();function T(a){e&&!e.destroyed&&e.wrapperEl&&a.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",T),m||a.detail&&a.detail.bySwiperTouchMove||O())}const f=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?l=!0:l&&(g=s,l=!1);const a=e.autoplay.paused?s:v+g-(new Date).getTime();e.autoplay.timeLeft=a,n("autoplayTimeLeft",a,a/c),o=requestAnimationFrame(()=>{f()})},w=()=>{let a=e.params.autoplay.delay;const t=(()=>{let a;if(a=e.virtual&&e.params.virtual.enabled?e.slides.find(e=>e.classList.contains("swiper-slide-active")):e.slides[e.activeIndex],!a)return;return parseInt(a.getAttribute("data-swiper-autoplay"),10)})();return!Number.isNaN(t)&&t>0&&(a=t),a},b=a=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(o),f();let t=a;void 0===t&&(t=w(),c=t,g=t),s=t;const i=e.params.speed,l=()=>{e&&!e.destroyed&&(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(i,!0,!0),n("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,i,!0,!0),n("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(i,!0,!0),n("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,i,!0,!0),n("autoplay")),e.params.cssMode&&(v=(new Date).getTime(),requestAnimationFrame(()=>{b()})))};return t>0?(clearTimeout(r),r=setTimeout(()=>{l()},t)):requestAnimationFrame(()=>{l()}),t},E=()=>{v=(new Date).getTime(),e.autoplay.running=!0,b(),n("autoplayStart")},L=()=>{e.autoplay.running=!1,clearTimeout(r),cancelAnimationFrame(o),n("autoplayStop")},D=(a,t)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(r),a||(y=!0);const i=()=>{n("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",T):O()};if(e.autoplay.paused=!0,t)return void i();const o=s||e.params.autoplay.delay;s=o-((new Date).getTime()-v),e.isEnd&&s<0&&!e.params.loop||(s<0&&(s=0),i())},O=()=>{e.isEnd&&s<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(v=(new Date).getTime(),y?(y=!1,b(s)):b(),e.autoplay.paused=!1,n("autoplayResume"))},S=()=>{if(e.destroyed||!e.autoplay.running)return;const a=getDocument();"hidden"===a.visibilityState&&(y=!0,D(!0)),"visible"===a.visibilityState&&O()},M=a=>{"mouse"===a.pointerType&&(y=!0,m=!0,e.animating||e.autoplay.paused||D(!0))},h=a=>{"mouse"===a.pointerType&&(m=!1,e.autoplay.paused&&O())};t("init",()=>{e.params.autoplay.enabled&&(e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",M),e.el.addEventListener("pointerleave",h)),getDocument().addEventListener("visibilitychange",S),E())}),t("destroy",()=>{e.el&&"string"!=typeof e.el&&(e.el.removeEventListener("pointerenter",M),e.el.removeEventListener("pointerleave",h)),getDocument().removeEventListener("visibilitychange",S),e.autoplay.running&&L()}),t("_freeModeStaticRelease",()=>{(u||y)&&O()}),t("_freeModeNoMomentumRelease",()=>{e.params.autoplay.disableOnInteraction?L():D(!0,!0)}),t("beforeTransitionStart",(a,t,n)=>{!e.destroyed&&e.autoplay.running&&(n||!e.params.autoplay.disableOnInteraction?D(!0,!0):L())}),t("sliderFirstMove",()=>{!e.destroyed&&e.autoplay.running&&(e.params.autoplay.disableOnInteraction?L():(p=!0,u=!1,y=!1,d=setTimeout(()=>{y=!0,u=!0,D(!0)},200)))}),t("touchEnd",()=>{if(!e.destroyed&&e.autoplay.running&&p){if(clearTimeout(d),clearTimeout(r),e.params.autoplay.disableOnInteraction)return u=!1,void(p=!1);u&&e.params.cssMode&&O(),u=!1,p=!1}}),t("slideChange",()=>{!e.destroyed&&e.autoplay.running&&e.autoplay.paused&&(s=w(),c=w())}),Object.assign(e.autoplay,{start:E,stop:L,pause:D,resume:O})}export{Autoplay as default};
|
||||
//# sourceMappingURL=autoplay.min.mjs.map
|
||||
1
node_modules/swiper/modules/autoplay.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/autoplay.min.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
306
node_modules/swiper/modules/autoplay.mjs
generated
vendored
Normal file
306
node_modules/swiper/modules/autoplay.mjs
generated
vendored
Normal file
@@ -0,0 +1,306 @@
|
||||
import { g as getDocument } from '../shared/ssr-window.esm.mjs';
|
||||
|
||||
/* eslint no-underscore-dangle: "off" */
|
||||
/* eslint no-use-before-define: "off" */
|
||||
function Autoplay({
|
||||
swiper,
|
||||
extendParams,
|
||||
on,
|
||||
emit,
|
||||
params
|
||||
}) {
|
||||
swiper.autoplay = {
|
||||
running: false,
|
||||
paused: false,
|
||||
timeLeft: 0
|
||||
};
|
||||
extendParams({
|
||||
autoplay: {
|
||||
enabled: false,
|
||||
delay: 3000,
|
||||
waitForTransition: true,
|
||||
disableOnInteraction: false,
|
||||
stopOnLastSlide: false,
|
||||
reverseDirection: false,
|
||||
pauseOnMouseEnter: false
|
||||
}
|
||||
});
|
||||
let timeout;
|
||||
let raf;
|
||||
let autoplayDelayTotal = params && params.autoplay ? params.autoplay.delay : 3000;
|
||||
let autoplayDelayCurrent = params && params.autoplay ? params.autoplay.delay : 3000;
|
||||
let autoplayTimeLeft;
|
||||
let autoplayStartTime = new Date().getTime();
|
||||
let wasPaused;
|
||||
let isTouched;
|
||||
let pausedByTouch;
|
||||
let touchStartTimeout;
|
||||
let pausedByInteraction;
|
||||
let pausedByPointerEnter;
|
||||
function onTransitionEnd(e) {
|
||||
if (!swiper || swiper.destroyed || !swiper.wrapperEl) return;
|
||||
if (e.target !== swiper.wrapperEl) return;
|
||||
swiper.wrapperEl.removeEventListener('transitionend', onTransitionEnd);
|
||||
if (pausedByPointerEnter || e.detail && e.detail.bySwiperTouchMove) {
|
||||
return;
|
||||
}
|
||||
resume();
|
||||
}
|
||||
const calcTimeLeft = () => {
|
||||
if (swiper.destroyed || !swiper.autoplay.running) return;
|
||||
if (swiper.autoplay.paused) {
|
||||
wasPaused = true;
|
||||
} else if (wasPaused) {
|
||||
autoplayDelayCurrent = autoplayTimeLeft;
|
||||
wasPaused = false;
|
||||
}
|
||||
const timeLeft = swiper.autoplay.paused ? autoplayTimeLeft : autoplayStartTime + autoplayDelayCurrent - new Date().getTime();
|
||||
swiper.autoplay.timeLeft = timeLeft;
|
||||
emit('autoplayTimeLeft', timeLeft, timeLeft / autoplayDelayTotal);
|
||||
raf = requestAnimationFrame(() => {
|
||||
calcTimeLeft();
|
||||
});
|
||||
};
|
||||
const getSlideDelay = () => {
|
||||
let activeSlideEl;
|
||||
if (swiper.virtual && swiper.params.virtual.enabled) {
|
||||
activeSlideEl = swiper.slides.find(slideEl => slideEl.classList.contains('swiper-slide-active'));
|
||||
} else {
|
||||
activeSlideEl = swiper.slides[swiper.activeIndex];
|
||||
}
|
||||
if (!activeSlideEl) return undefined;
|
||||
const currentSlideDelay = parseInt(activeSlideEl.getAttribute('data-swiper-autoplay'), 10);
|
||||
return currentSlideDelay;
|
||||
};
|
||||
const getTotalDelay = () => {
|
||||
let totalDelay = swiper.params.autoplay.delay;
|
||||
const currentSlideDelay = getSlideDelay();
|
||||
if (!Number.isNaN(currentSlideDelay) && currentSlideDelay > 0) {
|
||||
totalDelay = currentSlideDelay;
|
||||
}
|
||||
return totalDelay;
|
||||
};
|
||||
const run = delayForce => {
|
||||
if (swiper.destroyed || !swiper.autoplay.running) return;
|
||||
cancelAnimationFrame(raf);
|
||||
calcTimeLeft();
|
||||
let delay = delayForce;
|
||||
if (typeof delay === 'undefined') {
|
||||
delay = getTotalDelay();
|
||||
autoplayDelayTotal = delay;
|
||||
autoplayDelayCurrent = delay;
|
||||
}
|
||||
autoplayTimeLeft = delay;
|
||||
const speed = swiper.params.speed;
|
||||
const proceed = () => {
|
||||
if (!swiper || swiper.destroyed) return;
|
||||
if (swiper.params.autoplay.reverseDirection) {
|
||||
if (!swiper.isBeginning || swiper.params.loop || swiper.params.rewind) {
|
||||
swiper.slidePrev(speed, true, true);
|
||||
emit('autoplay');
|
||||
} else if (!swiper.params.autoplay.stopOnLastSlide) {
|
||||
swiper.slideTo(swiper.slides.length - 1, speed, true, true);
|
||||
emit('autoplay');
|
||||
}
|
||||
} else {
|
||||
if (!swiper.isEnd || swiper.params.loop || swiper.params.rewind) {
|
||||
swiper.slideNext(speed, true, true);
|
||||
emit('autoplay');
|
||||
} else if (!swiper.params.autoplay.stopOnLastSlide) {
|
||||
swiper.slideTo(0, speed, true, true);
|
||||
emit('autoplay');
|
||||
}
|
||||
}
|
||||
if (swiper.params.cssMode) {
|
||||
autoplayStartTime = new Date().getTime();
|
||||
requestAnimationFrame(() => {
|
||||
run();
|
||||
});
|
||||
}
|
||||
};
|
||||
if (delay > 0) {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => {
|
||||
proceed();
|
||||
}, delay);
|
||||
} else {
|
||||
requestAnimationFrame(() => {
|
||||
proceed();
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line
|
||||
return delay;
|
||||
};
|
||||
const start = () => {
|
||||
autoplayStartTime = new Date().getTime();
|
||||
swiper.autoplay.running = true;
|
||||
run();
|
||||
emit('autoplayStart');
|
||||
};
|
||||
const stop = () => {
|
||||
swiper.autoplay.running = false;
|
||||
clearTimeout(timeout);
|
||||
cancelAnimationFrame(raf);
|
||||
emit('autoplayStop');
|
||||
};
|
||||
const pause = (internal, reset) => {
|
||||
if (swiper.destroyed || !swiper.autoplay.running) return;
|
||||
clearTimeout(timeout);
|
||||
if (!internal) {
|
||||
pausedByInteraction = true;
|
||||
}
|
||||
const proceed = () => {
|
||||
emit('autoplayPause');
|
||||
if (swiper.params.autoplay.waitForTransition) {
|
||||
swiper.wrapperEl.addEventListener('transitionend', onTransitionEnd);
|
||||
} else {
|
||||
resume();
|
||||
}
|
||||
};
|
||||
swiper.autoplay.paused = true;
|
||||
if (reset) {
|
||||
proceed();
|
||||
return;
|
||||
}
|
||||
const delay = autoplayTimeLeft || swiper.params.autoplay.delay;
|
||||
autoplayTimeLeft = delay - (new Date().getTime() - autoplayStartTime);
|
||||
if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop) return;
|
||||
if (autoplayTimeLeft < 0) autoplayTimeLeft = 0;
|
||||
proceed();
|
||||
};
|
||||
const resume = () => {
|
||||
if (swiper.isEnd && autoplayTimeLeft < 0 && !swiper.params.loop || swiper.destroyed || !swiper.autoplay.running) return;
|
||||
autoplayStartTime = new Date().getTime();
|
||||
if (pausedByInteraction) {
|
||||
pausedByInteraction = false;
|
||||
run(autoplayTimeLeft);
|
||||
} else {
|
||||
run();
|
||||
}
|
||||
swiper.autoplay.paused = false;
|
||||
emit('autoplayResume');
|
||||
};
|
||||
const onVisibilityChange = () => {
|
||||
if (swiper.destroyed || !swiper.autoplay.running) return;
|
||||
const document = getDocument();
|
||||
if (document.visibilityState === 'hidden') {
|
||||
pausedByInteraction = true;
|
||||
pause(true);
|
||||
}
|
||||
if (document.visibilityState === 'visible') {
|
||||
resume();
|
||||
}
|
||||
};
|
||||
const onPointerEnter = e => {
|
||||
if (e.pointerType !== 'mouse') return;
|
||||
pausedByInteraction = true;
|
||||
pausedByPointerEnter = true;
|
||||
if (swiper.animating || swiper.autoplay.paused) return;
|
||||
pause(true);
|
||||
};
|
||||
const onPointerLeave = e => {
|
||||
if (e.pointerType !== 'mouse') return;
|
||||
pausedByPointerEnter = false;
|
||||
if (swiper.autoplay.paused) {
|
||||
resume();
|
||||
}
|
||||
};
|
||||
const attachMouseEvents = () => {
|
||||
if (swiper.params.autoplay.pauseOnMouseEnter) {
|
||||
swiper.el.addEventListener('pointerenter', onPointerEnter);
|
||||
swiper.el.addEventListener('pointerleave', onPointerLeave);
|
||||
}
|
||||
};
|
||||
const detachMouseEvents = () => {
|
||||
if (swiper.el && typeof swiper.el !== 'string') {
|
||||
swiper.el.removeEventListener('pointerenter', onPointerEnter);
|
||||
swiper.el.removeEventListener('pointerleave', onPointerLeave);
|
||||
}
|
||||
};
|
||||
const attachDocumentEvents = () => {
|
||||
const document = getDocument();
|
||||
document.addEventListener('visibilitychange', onVisibilityChange);
|
||||
};
|
||||
const detachDocumentEvents = () => {
|
||||
const document = getDocument();
|
||||
document.removeEventListener('visibilitychange', onVisibilityChange);
|
||||
};
|
||||
on('init', () => {
|
||||
if (swiper.params.autoplay.enabled) {
|
||||
attachMouseEvents();
|
||||
attachDocumentEvents();
|
||||
start();
|
||||
}
|
||||
});
|
||||
on('destroy', () => {
|
||||
detachMouseEvents();
|
||||
detachDocumentEvents();
|
||||
if (swiper.autoplay.running) {
|
||||
stop();
|
||||
}
|
||||
});
|
||||
on('_freeModeStaticRelease', () => {
|
||||
if (pausedByTouch || pausedByInteraction) {
|
||||
resume();
|
||||
}
|
||||
});
|
||||
on('_freeModeNoMomentumRelease', () => {
|
||||
if (!swiper.params.autoplay.disableOnInteraction) {
|
||||
pause(true, true);
|
||||
} else {
|
||||
stop();
|
||||
}
|
||||
});
|
||||
on('beforeTransitionStart', (_s, speed, internal) => {
|
||||
if (swiper.destroyed || !swiper.autoplay.running) return;
|
||||
if (internal || !swiper.params.autoplay.disableOnInteraction) {
|
||||
pause(true, true);
|
||||
} else {
|
||||
stop();
|
||||
}
|
||||
});
|
||||
on('sliderFirstMove', () => {
|
||||
if (swiper.destroyed || !swiper.autoplay.running) return;
|
||||
if (swiper.params.autoplay.disableOnInteraction) {
|
||||
stop();
|
||||
return;
|
||||
}
|
||||
isTouched = true;
|
||||
pausedByTouch = false;
|
||||
pausedByInteraction = false;
|
||||
touchStartTimeout = setTimeout(() => {
|
||||
pausedByInteraction = true;
|
||||
pausedByTouch = true;
|
||||
pause(true);
|
||||
}, 200);
|
||||
});
|
||||
on('touchEnd', () => {
|
||||
if (swiper.destroyed || !swiper.autoplay.running || !isTouched) return;
|
||||
clearTimeout(touchStartTimeout);
|
||||
clearTimeout(timeout);
|
||||
if (swiper.params.autoplay.disableOnInteraction) {
|
||||
pausedByTouch = false;
|
||||
isTouched = false;
|
||||
return;
|
||||
}
|
||||
if (pausedByTouch && swiper.params.cssMode) resume();
|
||||
pausedByTouch = false;
|
||||
isTouched = false;
|
||||
});
|
||||
on('slideChange', () => {
|
||||
if (swiper.destroyed || !swiper.autoplay.running) return;
|
||||
if (swiper.autoplay.paused) {
|
||||
autoplayTimeLeft = getTotalDelay();
|
||||
autoplayDelayTotal = getTotalDelay();
|
||||
}
|
||||
});
|
||||
Object.assign(swiper.autoplay, {
|
||||
start,
|
||||
stop,
|
||||
pause,
|
||||
resume
|
||||
});
|
||||
}
|
||||
|
||||
export { Autoplay as default };
|
||||
0
node_modules/swiper/modules/controller-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/controller-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/controller-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/controller-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/controller.css
generated
vendored
Normal file
0
node_modules/swiper/modules/controller.css
generated
vendored
Normal file
0
node_modules/swiper/modules/controller.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/controller.min.css
generated
vendored
Normal file
2
node_modules/swiper/modules/controller.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/controller.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{n as nextTick,o as elementTransitionEnd}from"../shared/utils.min.mjs";function Controller({swiper:t,extendParams:r,on:n}){function e(t,r){const n=function(){let t,r,n;return(e,o)=>{for(r=-1,t=e.length;t-r>1;)n=t+r>>1,e[n]<=o?r=n:t=n;return t}}();let e,o;return this.x=t,this.y=r,this.lastIndex=t.length-1,this.interpolate=function(t){return t?(o=n(this.x,t),e=o-1,(t-this.x[e])*(this.y[o]-this.y[e])/(this.x[o]-this.x[e])+this.y[e]):0},this}function o(){t.controller.control&&t.controller.spline&&(t.controller.spline=void 0,delete t.controller.spline)}r({controller:{control:void 0,inverse:!1,by:"slide"}}),t.controller={control:void 0},n("beforeInit",()=>{if("undefined"!=typeof window&&("string"==typeof t.params.controller.control||t.params.controller.control instanceof HTMLElement)){return void("string"==typeof t.params.controller.control?[...document.querySelectorAll(t.params.controller.control)]:[t.params.controller.control]).forEach(r=>{if(t.controller.control||(t.controller.control=[]),r&&r.swiper)t.controller.control.push(r.swiper);else if(r){const n=`${t.params.eventsPrefix}init`,e=o=>{t.controller.control.push(o.detail[0]),t.update(),r.removeEventListener(n,e)};r.addEventListener(n,e)}})}t.controller.control=t.params.controller.control}),n("update",()=>{o()}),n("resize",()=>{o()}),n("observerUpdate",()=>{o()}),n("setTranslate",(r,n,e)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTranslate(n,e)}),n("setTransition",(r,n,e)=>{t.controller.control&&!t.controller.control.destroyed&&t.controller.setTransition(n,e)}),Object.assign(t.controller,{setTranslate:function(r,n){const o=t.controller.control;let l,s;const i=t.constructor;function a(r){if(r.destroyed)return;const n=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function(r){t.controller.spline=t.params.loop?new e(t.slidesGrid,r.slidesGrid):new e(t.snapGrid,r.snapGrid)}(r),s=-t.controller.spline.interpolate(-n)),s&&"container"!==t.params.controller.by||(l=(r.maxTranslate()-r.minTranslate())/(t.maxTranslate()-t.minTranslate()),!Number.isNaN(l)&&Number.isFinite(l)||(l=1),s=(n-t.minTranslate())*l+r.minTranslate()),t.params.controller.inverse&&(s=r.maxTranslate()-s),r.updateProgress(s),r.setTranslate(s,t),r.updateActiveIndex(),r.updateSlidesClasses()}if(Array.isArray(o))for(let t=0;t<o.length;t+=1)o[t]!==n&&o[t]instanceof i&&a(o[t]);else o instanceof i&&n!==o&&a(o)},setTransition:function(r,n){const e=t.constructor,o=t.controller.control;let l;function s(n){n.destroyed||(n.setTransition(r,t),0!==r&&(n.transitionStart(),n.params.autoHeight&&nextTick(()=>{n.updateAutoHeight()}),elementTransitionEnd(n.wrapperEl,()=>{o&&n.transitionEnd()})))}if(Array.isArray(o))for(l=0;l<o.length;l+=1)o[l]!==n&&o[l]instanceof e&&s(o[l]);else o instanceof e&&n!==o&&s(o)}})}export{Controller as default};
|
||||
//# sourceMappingURL=controller.min.mjs.map
|
||||
1
node_modules/swiper/modules/controller.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/controller.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"controller.mjs.mjs","names":["nextTick","elementTransitionEnd","Controller","swiper","extendParams","on","LinearSpline","x","y","binarySearch","maxIndex","minIndex","guess","array","val","length","i1","i3","this","lastIndex","interpolate","x2","removeSpline","controller","control","spline","undefined","inverse","by","window","params","HTMLElement","document","querySelectorAll","forEach","controlElement","push","eventName","eventsPrefix","onControllerSwiper","e","detail","update","removeEventListener","addEventListener","_s","translate","byController","destroyed","setTranslate","duration","setTransition","Object","assign","_t","controlled","multiplier","controlledTranslate","Swiper","constructor","setControlledTranslate","c","rtlTranslate","loop","slidesGrid","snapGrid","getInterpolateFunction","maxTranslate","minTranslate","Number","isNaN","isFinite","updateProgress","updateActiveIndex","updateSlidesClasses","Array","isArray","i","setControlledTransition","transitionStart","autoHeight","updateAutoHeight","wrapperEl","transitionEnd"],"sources":["0"],"mappings":"YAAcA,cAAeC,yBAA4B,0BAGzD,SAASC,YAAWC,OAClBA,EAAMC,aACNA,EAAYC,GACZA,IAaA,SAASC,EAAaC,EAAGC,GACvB,MAAMC,EAAe,WACnB,IAAIC,EACAC,EACAC,EACJ,MAAO,CAACC,EAAOC,KAGb,IAFAH,GAAY,EACZD,EAAWG,EAAME,OACVL,EAAWC,EAAW,GAC3BC,EAAQF,EAAWC,GAAY,EAC3BE,EAAMD,IAAUE,EAClBH,EAAWC,EAEXF,EAAWE,EAGf,OAAOF,EAEX,CAjBqB,GAwBrB,IAAIM,EACAC,EAYJ,OAnBAC,KAAKX,EAAIA,EACTW,KAAKV,EAAIA,EACTU,KAAKC,UAAYZ,EAAEQ,OAAS,EAM5BG,KAAKE,YAAc,SAAqBC,GACtC,OAAKA,GAGLJ,EAAKR,EAAaS,KAAKX,EAAGc,GAC1BL,EAAKC,EAAK,GAIFI,EAAKH,KAAKX,EAAES,KAAQE,KAAKV,EAAES,GAAMC,KAAKV,EAAEQ,KAAQE,KAAKX,EAAEU,GAAMC,KAAKX,EAAES,IAAOE,KAAKV,EAAEQ,IAR1E,CASlB,EACOE,IACT,CA8EA,SAASI,IACFnB,EAAOoB,WAAWC,SACnBrB,EAAOoB,WAAWE,SACpBtB,EAAOoB,WAAWE,YAASC,SACpBvB,EAAOoB,WAAWE,OAE7B,CAtIArB,EAAa,CACXmB,WAAY,CACVC,aAASE,EACTC,SAAS,EACTC,GAAI,WAIRzB,EAAOoB,WAAa,CAClBC,aAASE,GA8HXrB,EAAG,aAAc,KACf,GAAsB,oBAAXwB,SAEiC,iBAArC1B,EAAO2B,OAAOP,WAAWC,SAAwBrB,EAAO2B,OAAOP,WAAWC,mBAAmBO,aAAc,CAgBhH,YAfoE,iBAArC5B,EAAO2B,OAAOP,WAAWC,QAAuB,IAAIQ,SAASC,iBAAiB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O9B,GAAgBQ,EAAWsB,aAAcnB,GAC7DoB,EAAwBvB,EAAWsB,SAG9BtB,aAAsBG,GAAUX,IAAiBQ,GAC1DuB,EAAwBvB,EAE5B,GAoDF,QAESrD"}
|
||||
190
node_modules/swiper/modules/controller.mjs
generated
vendored
Normal file
190
node_modules/swiper/modules/controller.mjs
generated
vendored
Normal file
@@ -0,0 +1,190 @@
|
||||
import { n as nextTick, o as elementTransitionEnd } from '../shared/utils.mjs';
|
||||
|
||||
/* eslint no-bitwise: ["error", { "allow": [">>"] }] */
|
||||
function Controller({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
controller: {
|
||||
control: undefined,
|
||||
inverse: false,
|
||||
by: 'slide' // or 'container'
|
||||
}
|
||||
});
|
||||
|
||||
swiper.controller = {
|
||||
control: undefined
|
||||
};
|
||||
function LinearSpline(x, y) {
|
||||
const binarySearch = function search() {
|
||||
let maxIndex;
|
||||
let minIndex;
|
||||
let guess;
|
||||
return (array, val) => {
|
||||
minIndex = -1;
|
||||
maxIndex = array.length;
|
||||
while (maxIndex - minIndex > 1) {
|
||||
guess = maxIndex + minIndex >> 1;
|
||||
if (array[guess] <= val) {
|
||||
minIndex = guess;
|
||||
} else {
|
||||
maxIndex = guess;
|
||||
}
|
||||
}
|
||||
return maxIndex;
|
||||
};
|
||||
}();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.lastIndex = x.length - 1;
|
||||
// Given an x value (x2), return the expected y2 value:
|
||||
// (x1,y1) is the known point before given value,
|
||||
// (x3,y3) is the known point after given value.
|
||||
let i1;
|
||||
let i3;
|
||||
this.interpolate = function interpolate(x2) {
|
||||
if (!x2) return 0;
|
||||
|
||||
// Get the indexes of x1 and x3 (the array indexes before and after given x2):
|
||||
i3 = binarySearch(this.x, x2);
|
||||
i1 = i3 - 1;
|
||||
|
||||
// We have our indexes i1 & i3, so we can calculate already:
|
||||
// y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
|
||||
return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1];
|
||||
};
|
||||
return this;
|
||||
}
|
||||
function getInterpolateFunction(c) {
|
||||
swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid);
|
||||
}
|
||||
function setTranslate(_t, byController) {
|
||||
const controlled = swiper.controller.control;
|
||||
let multiplier;
|
||||
let controlledTranslate;
|
||||
const Swiper = swiper.constructor;
|
||||
function setControlledTranslate(c) {
|
||||
if (c.destroyed) return;
|
||||
|
||||
// this will create an Interpolate function based on the snapGrids
|
||||
// x is the Grid of the scrolled scroller and y will be the controlled scroller
|
||||
// it makes sense to create this only once and recall it for the interpolation
|
||||
// the function does a lot of value caching for performance
|
||||
const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
|
||||
if (swiper.params.controller.by === 'slide') {
|
||||
getInterpolateFunction(c);
|
||||
// i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
|
||||
// but it did not work out
|
||||
controlledTranslate = -swiper.controller.spline.interpolate(-translate);
|
||||
}
|
||||
if (!controlledTranslate || swiper.params.controller.by === 'container') {
|
||||
multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
|
||||
if (Number.isNaN(multiplier) || !Number.isFinite(multiplier)) {
|
||||
multiplier = 1;
|
||||
}
|
||||
controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate();
|
||||
}
|
||||
if (swiper.params.controller.inverse) {
|
||||
controlledTranslate = c.maxTranslate() - controlledTranslate;
|
||||
}
|
||||
c.updateProgress(controlledTranslate);
|
||||
c.setTranslate(controlledTranslate, swiper);
|
||||
c.updateActiveIndex();
|
||||
c.updateSlidesClasses();
|
||||
}
|
||||
if (Array.isArray(controlled)) {
|
||||
for (let i = 0; i < controlled.length; i += 1) {
|
||||
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
||||
setControlledTranslate(controlled[i]);
|
||||
}
|
||||
}
|
||||
} else if (controlled instanceof Swiper && byController !== controlled) {
|
||||
setControlledTranslate(controlled);
|
||||
}
|
||||
}
|
||||
function setTransition(duration, byController) {
|
||||
const Swiper = swiper.constructor;
|
||||
const controlled = swiper.controller.control;
|
||||
let i;
|
||||
function setControlledTransition(c) {
|
||||
if (c.destroyed) return;
|
||||
c.setTransition(duration, swiper);
|
||||
if (duration !== 0) {
|
||||
c.transitionStart();
|
||||
if (c.params.autoHeight) {
|
||||
nextTick(() => {
|
||||
c.updateAutoHeight();
|
||||
});
|
||||
}
|
||||
elementTransitionEnd(c.wrapperEl, () => {
|
||||
if (!controlled) return;
|
||||
c.transitionEnd();
|
||||
});
|
||||
}
|
||||
}
|
||||
if (Array.isArray(controlled)) {
|
||||
for (i = 0; i < controlled.length; i += 1) {
|
||||
if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
|
||||
setControlledTransition(controlled[i]);
|
||||
}
|
||||
}
|
||||
} else if (controlled instanceof Swiper && byController !== controlled) {
|
||||
setControlledTransition(controlled);
|
||||
}
|
||||
}
|
||||
function removeSpline() {
|
||||
if (!swiper.controller.control) return;
|
||||
if (swiper.controller.spline) {
|
||||
swiper.controller.spline = undefined;
|
||||
delete swiper.controller.spline;
|
||||
}
|
||||
}
|
||||
on('beforeInit', () => {
|
||||
if (typeof window !== 'undefined' && (
|
||||
// eslint-disable-line
|
||||
typeof swiper.params.controller.control === 'string' || swiper.params.controller.control instanceof HTMLElement)) {
|
||||
const controlElements = typeof swiper.params.controller.control === 'string' ? [...document.querySelectorAll(swiper.params.controller.control)] : [swiper.params.controller.control];
|
||||
controlElements.forEach(controlElement => {
|
||||
if (!swiper.controller.control) swiper.controller.control = [];
|
||||
if (controlElement && controlElement.swiper) {
|
||||
swiper.controller.control.push(controlElement.swiper);
|
||||
} else if (controlElement) {
|
||||
const eventName = `${swiper.params.eventsPrefix}init`;
|
||||
const onControllerSwiper = e => {
|
||||
swiper.controller.control.push(e.detail[0]);
|
||||
swiper.update();
|
||||
controlElement.removeEventListener(eventName, onControllerSwiper);
|
||||
};
|
||||
controlElement.addEventListener(eventName, onControllerSwiper);
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
swiper.controller.control = swiper.params.controller.control;
|
||||
});
|
||||
on('update', () => {
|
||||
removeSpline();
|
||||
});
|
||||
on('resize', () => {
|
||||
removeSpline();
|
||||
});
|
||||
on('observerUpdate', () => {
|
||||
removeSpline();
|
||||
});
|
||||
on('setTranslate', (_s, translate, byController) => {
|
||||
if (!swiper.controller.control || swiper.controller.control.destroyed) return;
|
||||
swiper.controller.setTranslate(translate, byController);
|
||||
});
|
||||
on('setTransition', (_s, duration, byController) => {
|
||||
if (!swiper.controller.control || swiper.controller.control.destroyed) return;
|
||||
swiper.controller.setTransition(duration, byController);
|
||||
});
|
||||
Object.assign(swiper.controller, {
|
||||
setTranslate,
|
||||
setTransition
|
||||
});
|
||||
}
|
||||
|
||||
export { Controller as default };
|
||||
8
node_modules/swiper/modules/effect-cards-element.css
generated
vendored
Normal file
8
node_modules/swiper/modules/effect-cards-element.css
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
.swiper.swiper-cards {
|
||||
overflow: visible;
|
||||
}
|
||||
.swiper-cards ::slotted(swiper-slide) {
|
||||
transform-origin: center bottom;
|
||||
backface-visibility: hidden;
|
||||
overflow: hidden;
|
||||
}
|
||||
1
node_modules/swiper/modules/effect-cards-element.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-cards-element.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper.swiper-cards{overflow:visible}.swiper-cards ::slotted(swiper-slide){backface-visibility:hidden;overflow:hidden;transform-origin:center bottom}
|
||||
10
node_modules/swiper/modules/effect-cards.css
generated
vendored
Normal file
10
node_modules/swiper/modules/effect-cards.css
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
.swiper.swiper-cards {
|
||||
overflow: visible;
|
||||
}
|
||||
.swiper-cards {
|
||||
.swiper-slide {
|
||||
transform-origin: center bottom;
|
||||
backface-visibility: hidden;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
1
node_modules/swiper/modules/effect-cards.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-cards.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper.swiper-cards{overflow:visible}.swiper-cards{.swiper-slide{backface-visibility:hidden;overflow:hidden;transform-origin:center bottom}}
|
||||
2
node_modules/swiper/modules/effect-cards.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-cards.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{c as createShadow}from"../shared/create-shadow.min.mjs";import{e as effectInit}from"../shared/effect-init.min.mjs";import{e as effectTarget}from"../shared/effect-target.min.mjs";import{e as effectVirtualTransitionEnd}from"../shared/effect-virtual-transition-end.min.mjs";import{g as getSlideTransformEl}from"../shared/utils.min.mjs";function EffectCards({swiper:e,extendParams:t,on:a}){t({cardsEffect:{slideShadows:!0,rotate:!0,perSlideRotate:2,perSlideOffset:8}});effectInit({effect:"cards",swiper:e,on:a,setTranslate:()=>{const{slides:t,activeIndex:a,rtlTranslate:s}=e,r=e.params.cardsEffect,{startTranslate:i,isTouched:o}=e.touchEventsData,n=s?-e.translate:e.translate;for(let l=0;l<t.length;l+=1){const d=t[l],c=d.progress,f=Math.min(Math.max(c,-4),4);let m=d.swiperSlideOffset;e.params.centeredSlides&&!e.params.cssMode&&(e.wrapperEl.style.transform=`translateX(${e.minTranslate()}px)`),e.params.centeredSlides&&e.params.cssMode&&(m-=t[0].swiperSlideOffset);let p=e.params.cssMode?-m-e.translate:-m,h=0;const M=-100*Math.abs(f);let S=1,u=-r.perSlideRotate*f,w=r.perSlideOffset-.75*Math.abs(f);const $=e.virtual&&e.params.virtual.enabled?e.virtual.from+l:l,E=($===a||$===a-1)&&f>0&&f<1&&(o||e.params.cssMode)&&n<i,T=($===a||$===a+1)&&f<0&&f>-1&&(o||e.params.cssMode)&&n>i;if(E||T){const t=(1-Math.abs((Math.abs(f)-.5)/.5))**.5;u+=-28*f*t,S+=-.5*t,w+=96*t,h=(r.rotate||e.isHorizontal()?-25:0)*t*Math.abs(f)+"%"}if(p=f<0?`calc(${p}px ${s?"-":"+"} (${w*Math.abs(f)}%))`:f>0?`calc(${p}px ${s?"-":"+"} (-${w*Math.abs(f)}%))`:`${p}px`,!e.isHorizontal()){const e=h;h=p,p=e}const g=f<0?""+(1+(1-S)*f):""+(1-(1-S)*f),x=`\n translate3d(${p}, ${h}, ${M}px)\n rotateZ(${r.rotate?s?-u:u:0}deg)\n scale(${g})\n `;if(r.slideShadows){let e=d.querySelector(".swiper-slide-shadow");e||(e=createShadow("cards",d)),e&&(e.style.opacity=Math.min(Math.max((Math.abs(f)-.5)/.5,0),1))}d.style.zIndex=-Math.abs(Math.round(c))+t.length;effectTarget(r,d).style.transform=x}},setTransition:t=>{const a=e.slides.map(e=>getSlideTransformEl(e));a.forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow").forEach(e=>{e.style.transitionDuration=`${t}ms`})}),effectVirtualTransitionEnd({swiper:e,duration:t,transformElements:a})},perspective:()=>!0,overwriteParams:()=>({_loopSwapReset:!1,watchSlidesProgress:!0,loopAdditionalSlides:e.params.cardsEffect.rotate?3:2,centeredSlides:!0,virtualTranslate:!e.params.cssMode})})}export{EffectCards as default};
|
||||
//# sourceMappingURL=effect-cards.min.mjs.map
|
||||
1
node_modules/swiper/modules/effect-cards.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-cards.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"effect-cards.mjs.mjs","names":["createShadow","effectInit","effectTarget","effectVirtualTransitionEnd","getSlideTransformEl","EffectCards","swiper","extendParams","on","cardsEffect","slideShadows","rotate","perSlideRotate","perSlideOffset","effect","setTranslate","slides","activeIndex","rtlTranslate","rtl","params","startTranslate","isTouched","touchEventsData","currentTranslate","translate","i","length","slideEl","slideProgress","progress","Math","min","max","offset","swiperSlideOffset","centeredSlides","cssMode","wrapperEl","style","transform","minTranslate","tX","tY","tZ","abs","scale","tXAdd","slideIndex","virtual","enabled","from","isSwipeToNext","isSwipeToPrev","subProgress","isHorizontal","prevY","scaleString","shadowEl","querySelector","opacity","zIndex","round","setTransition","duration","transformElements","map","forEach","el","transitionDuration","querySelectorAll","perspective","overwriteParams","_loopSwapReset","watchSlidesProgress","loopAdditionalSlides","virtualTranslate"],"sources":["0"],"mappings":"YAAcA,iBAAoB,8CACpBC,eAAkB,4CAClBC,iBAAoB,8CACpBC,+BAAkC,8DAClCC,wBAA2B,0BAEzC,SAASC,aAAYC,OACnBA,EAAMC,aACNA,EAAYC,GACZA,IAEAD,EAAa,CACXE,YAAa,CACXC,cAAc,EACdC,QAAQ,EACRC,eAAgB,EAChBC,eAAgB,KA6FpBZ,WAAW,CACTa,OAAQ,QACRR,SACAE,KACAO,aA9FmB,KACnB,MAAMC,OACJA,EAAMC,YACNA,EACAC,aAAcC,GACZb,EACEc,EAASd,EAAOc,OAAOX,aACvBY,eACJA,EAAcC,UACdA,GACEhB,EAAOiB,gBACLC,EAAmBL,GAAOb,EAAOmB,UAAYnB,EAAOmB,UAC1D,IAAK,IAAIC,EAAI,EAAGA,EAAIV,EAAOW,OAAQD,GAAK,EAAG,CACzC,MAAME,EAAUZ,EAAOU,GACjBG,EAAgBD,EAAQE,SACxBA,EAAWC,KAAKC,IAAID,KAAKE,IAAIJ,GAAgB,GAAI,GACvD,IAAIK,EAASN,EAAQO,kBACjB7B,EAAOc,OAAOgB,iBAAmB9B,EAAOc,OAAOiB,UACjD/B,EAAOgC,UAAUC,MAAMC,UAAY,cAAclC,EAAOmC,qBAEtDnC,EAAOc,OAAOgB,gBAAkB9B,EAAOc,OAAOiB,UAChDH,GAAUlB,EAAO,GAAGmB,mBAEtB,I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,yBAClBxB,EAAOT,OAASQ,GAAOR,EAASA,EAAS,wBAC3C8C,aAIV,GAAIrC,EAAOV,aAAc,CAEvB,IAAIgD,EAAW9B,EAAQ+B,cAAc,wBAChCD,IACHA,EAAW1D,aAAa,QAAS4B,IAE/B8B,IAAUA,EAASnB,MAAMqB,QAAU7B,KAAKC,IAAID,KAAKE,KAAKF,KAAKc,IAAIf,GAAY,IAAO,GAAK,GAAI,GACjG,CACAF,EAAQW,MAAMsB,QAAU9B,KAAKc,IAAId,KAAK+B,MAAMjC,IAAkBb,EAAOW,OACpDzB,aAAakB,EAAQQ,GAC7BW,MAAMC,UAAYA,CAC7B,GAqBAuB,cAnBoBC,IACpB,MAAMC,EAAoB3D,EAAOU,OAAOkD,IAAItC,GAAWxB,oBAAoBwB,IAC3EqC,EAAkBE,QAAQC,IACxBA,EAAG7B,MAAM8B,mBAAqB,GAAGL,MACjCI,EAAGE,iBAAiB,wBAAwBH,QAAQT,IAClDA,EAASnB,MAAM8B,mBAAqB,GAAGL,UAG3C7D,2BAA2B,CACzBG,SACA0D,WACAC,uBASFM,YAAa,KAAM,EACnBC,gBAAiB,KAAM,CACrBC,gBAAgB,EAChBC,qBAAqB,EACrBC,qBAAsBrE,EAAOc,OAAOX,YAAYE,OAAS,EAAI,EAC7DyB,gBAAgB,EAChBwC,kBAAmBtE,EAAOc,OAAOiB,WAGvC,QAEShC"}
|
||||
127
node_modules/swiper/modules/effect-cards.mjs
generated
vendored
Normal file
127
node_modules/swiper/modules/effect-cards.mjs
generated
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
import { c as createShadow } from '../shared/create-shadow.mjs';
|
||||
import { e as effectInit } from '../shared/effect-init.mjs';
|
||||
import { e as effectTarget } from '../shared/effect-target.mjs';
|
||||
import { e as effectVirtualTransitionEnd } from '../shared/effect-virtual-transition-end.mjs';
|
||||
import { g as getSlideTransformEl } from '../shared/utils.mjs';
|
||||
|
||||
function EffectCards({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
cardsEffect: {
|
||||
slideShadows: true,
|
||||
rotate: true,
|
||||
perSlideRotate: 2,
|
||||
perSlideOffset: 8
|
||||
}
|
||||
});
|
||||
const setTranslate = () => {
|
||||
const {
|
||||
slides,
|
||||
activeIndex,
|
||||
rtlTranslate: rtl
|
||||
} = swiper;
|
||||
const params = swiper.params.cardsEffect;
|
||||
const {
|
||||
startTranslate,
|
||||
isTouched
|
||||
} = swiper.touchEventsData;
|
||||
const currentTranslate = rtl ? -swiper.translate : swiper.translate;
|
||||
for (let i = 0; i < slides.length; i += 1) {
|
||||
const slideEl = slides[i];
|
||||
const slideProgress = slideEl.progress;
|
||||
const progress = Math.min(Math.max(slideProgress, -4), 4);
|
||||
let offset = slideEl.swiperSlideOffset;
|
||||
if (swiper.params.centeredSlides && !swiper.params.cssMode) {
|
||||
swiper.wrapperEl.style.transform = `translateX(${swiper.minTranslate()}px)`;
|
||||
}
|
||||
if (swiper.params.centeredSlides && swiper.params.cssMode) {
|
||||
offset -= slides[0].swiperSlideOffset;
|
||||
}
|
||||
let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset;
|
||||
let tY = 0;
|
||||
const tZ = -100 * Math.abs(progress);
|
||||
let scale = 1;
|
||||
let rotate = -params.perSlideRotate * progress;
|
||||
let tXAdd = params.perSlideOffset - Math.abs(progress) * 0.75;
|
||||
const slideIndex = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.from + i : i;
|
||||
const isSwipeToNext = (slideIndex === activeIndex || slideIndex === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate;
|
||||
const isSwipeToPrev = (slideIndex === activeIndex || slideIndex === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate;
|
||||
if (isSwipeToNext || isSwipeToPrev) {
|
||||
const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5;
|
||||
rotate += -28 * progress * subProgress;
|
||||
scale += -0.5 * subProgress;
|
||||
tXAdd += 96 * subProgress;
|
||||
tY = `${(params.rotate || swiper.isHorizontal() ? -25 : 0) * subProgress * Math.abs(progress)}%`;
|
||||
}
|
||||
if (progress < 0) {
|
||||
// next
|
||||
tX = `calc(${tX}px ${rtl ? '-' : '+'} (${tXAdd * Math.abs(progress)}%))`;
|
||||
} else if (progress > 0) {
|
||||
// prev
|
||||
tX = `calc(${tX}px ${rtl ? '-' : '+'} (-${tXAdd * Math.abs(progress)}%))`;
|
||||
} else {
|
||||
tX = `${tX}px`;
|
||||
}
|
||||
if (!swiper.isHorizontal()) {
|
||||
const prevY = tY;
|
||||
tY = tX;
|
||||
tX = prevY;
|
||||
}
|
||||
const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`;
|
||||
|
||||
/* eslint-disable */
|
||||
const transform = `
|
||||
translate3d(${tX}, ${tY}, ${tZ}px)
|
||||
rotateZ(${params.rotate ? rtl ? -rotate : rotate : 0}deg)
|
||||
scale(${scaleString})
|
||||
`;
|
||||
/* eslint-enable */
|
||||
|
||||
if (params.slideShadows) {
|
||||
// Set shadows
|
||||
let shadowEl = slideEl.querySelector('.swiper-slide-shadow');
|
||||
if (!shadowEl) {
|
||||
shadowEl = createShadow('cards', slideEl);
|
||||
}
|
||||
if (shadowEl) shadowEl.style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1);
|
||||
}
|
||||
slideEl.style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;
|
||||
const targetEl = effectTarget(params, slideEl);
|
||||
targetEl.style.transform = transform;
|
||||
}
|
||||
};
|
||||
const setTransition = duration => {
|
||||
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
||||
transformElements.forEach(el => {
|
||||
el.style.transitionDuration = `${duration}ms`;
|
||||
el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => {
|
||||
shadowEl.style.transitionDuration = `${duration}ms`;
|
||||
});
|
||||
});
|
||||
effectVirtualTransitionEnd({
|
||||
swiper,
|
||||
duration,
|
||||
transformElements
|
||||
});
|
||||
};
|
||||
effectInit({
|
||||
effect: 'cards',
|
||||
swiper,
|
||||
on,
|
||||
setTranslate,
|
||||
setTransition,
|
||||
perspective: () => true,
|
||||
overwriteParams: () => ({
|
||||
_loopSwapReset: false,
|
||||
watchSlidesProgress: true,
|
||||
loopAdditionalSlides: swiper.params.cardsEffect.rotate ? 3 : 2,
|
||||
centeredSlides: true,
|
||||
virtualTranslate: !swiper.params.cssMode
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export { EffectCards as default };
|
||||
2
node_modules/swiper/modules/effect-coverflow-element.css
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-coverflow-element.css
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.swiper-coverflow {
|
||||
}
|
||||
0
node_modules/swiper/modules/effect-coverflow-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/effect-coverflow-element.min.css
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-coverflow.css
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-coverflow.css
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
.swiper-coverflow {
|
||||
}
|
||||
0
node_modules/swiper/modules/effect-coverflow.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/effect-coverflow.min.css
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-coverflow.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-coverflow.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{c as createShadow}from"../shared/create-shadow.min.mjs";import{e as effectInit}from"../shared/effect-init.min.mjs";import{e as effectTarget}from"../shared/effect-target.min.mjs";import{g as getSlideTransformEl,a as getRotateFix}from"../shared/utils.min.mjs";function EffectCoverflow({swiper:e,extendParams:t,on:s}){t({coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}});effectInit({effect:"coverflow",swiper:e,on:s,setTranslate:()=>{const{width:t,height:s,slides:r,slidesSizesGrid:a}=e,o=e.params.coverflowEffect,i=e.isHorizontal(),l=e.translate,f=i?t/2-l:s/2-l,d=i?o.rotate:-o.rotate,c=o.depth,h=getRotateFix(e);for(let e=0,t=r.length;e<t;e+=1){const t=r[e],s=a[e],l=(f-t.swiperSlideOffset-s/2)/s,n="function"==typeof o.modifier?o.modifier(l):l*o.modifier;let w=i?d*n:0,p=i?0:d*n,m=-c*Math.abs(n),g=o.stretch;"string"==typeof g&&-1!==g.indexOf("%")&&(g=parseFloat(o.stretch)/100*s);let y=i?0:g*n,S=i?g*n:0,b=1-(1-o.scale)*Math.abs(n);Math.abs(S)<.001&&(S=0),Math.abs(y)<.001&&(y=0),Math.abs(m)<.001&&(m=0),Math.abs(w)<.001&&(w=0),Math.abs(p)<.001&&(p=0),Math.abs(b)<.001&&(b=0);const u=`translate3d(${S}px,${y}px,${m}px) rotateX(${h(p)}deg) rotateY(${h(w)}deg) scale(${b})`;if(effectTarget(o,t).style.transform=u,t.style.zIndex=1-Math.abs(Math.round(n)),o.slideShadows){let e=i?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),s=i?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");e||(e=createShadow("coverflow",t,i?"left":"top")),s||(s=createShadow("coverflow",t,i?"right":"bottom")),e&&(e.style.opacity=n>0?n:0),s&&(s.style.opacity=-n>0?-n:0)}}},setTransition:t=>{e.slides.map(e=>getSlideTransformEl(e)).forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>{e.style.transitionDuration=`${t}ms`})})},perspective:()=>!0,overwriteParams:()=>({watchSlidesProgress:!0})})}export{EffectCoverflow as default};
|
||||
//# sourceMappingURL=effect-coverflow.min.mjs.map
|
||||
1
node_modules/swiper/modules/effect-coverflow.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-coverflow.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"effect-coverflow.mjs.mjs","names":["createShadow","effectInit","effectTarget","getSlideTransformEl","getRotateFix","EffectCoverflow","swiper","extendParams","on","coverflowEffect","rotate","stretch","depth","scale","modifier","slideShadows","effect","setTranslate","width","swiperWidth","height","swiperHeight","slides","slidesSizesGrid","params","isHorizontal","transform","translate","center","r","i","length","slideEl","slideSize","centerOffset","swiperSlideOffset","offsetMultiplier","rotateY","rotateX","translateZ","Math","abs","indexOf","parseFloat","translateY","translateX","slideTransform","style","zIndex","round","shadowBeforeEl","querySelector","shadowAfterEl","opacity","setTransition","duration","map","forEach","el","transitionDuration","querySelectorAll","shadowEl","perspective","overwriteParams","watchSlidesProgress"],"sources":["0"],"mappings":"YAAcA,iBAAoB,8CACpBC,eAAkB,4CAClBC,iBAAoB,8CACpBC,yBAA0BC,iBAAoB,0BAE5D,SAASC,iBAAgBC,OACvBA,EAAMC,aACNA,EAAYC,GACZA,IAEAD,EAAa,CACXE,gBAAiB,CACfC,OAAQ,GACRC,QAAS,EACTC,MAAO,IACPC,MAAO,EACPC,SAAU,EACVC,cAAc,KAwElBd,WAAW,CACTe,OAAQ,YACRV,SACAE,KACAS,aAzEmB,KACnB,MACEC,MAAOC,EACPC,OAAQC,EAAYC,OACpBA,EAAMC,gBACNA,GACEjB,EACEkB,EAASlB,EAAOkB,OAAOf,gBACvBgB,EAAenB,EAAOmB,eACtBC,EAAYpB,EAAOqB,UACnBC,EAASH,EAA4BN,EAAc,EAA1BO,EAA2CL,EAAe,EAA3BK,EACxDhB,EAASe,EAAeD,EAAOd,QAAUc,EAAOd,OAChDiB,EAAYH,EAAOZ,MACnBiB,EAAIzB,aAAaE,GAEvB,IAAK,IAAIwB,EAAI,EAAGC,EAAST,EAAOS,OAAQD,EAA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AAa,YAAagC,EAASP,EAAe,OAAS,QAEzE2B,IACHA,EAAgBpD,aAAa,YAAagC,EAASP,EAAe,QAAU,WAE1EyB,IAAgBA,EAAeH,MAAMM,QAAUjB,EAAmB,EAAIA,EAAmB,GACzFgB,IAAeA,EAAcL,MAAMM,SAAWjB,EAAmB,GAAKA,EAAmB,EAC/F,CACF,GAgBAkB,cAdoBC,IACMjD,EAAOgB,OAAOkC,IAAIxB,GAAW7B,oBAAoB6B,IACzDyB,QAAQC,IACxBA,EAAGX,MAAMY,mBAAqB,GAAGJ,MACjCG,EAAGE,iBAAiB,gHAAgHH,QAAQI,IAC1IA,EAASd,MAAMY,mBAAqB,GAAGJ,WAU3CO,YAAa,KAAM,EACnBC,gBAAiB,KAAM,CACrBC,qBAAqB,KAG3B,QAES3D"}
|
||||
103
node_modules/swiper/modules/effect-coverflow.mjs
generated
vendored
Normal file
103
node_modules/swiper/modules/effect-coverflow.mjs
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
import { c as createShadow } from '../shared/create-shadow.mjs';
|
||||
import { e as effectInit } from '../shared/effect-init.mjs';
|
||||
import { e as effectTarget } from '../shared/effect-target.mjs';
|
||||
import { g as getSlideTransformEl, a as getRotateFix } from '../shared/utils.mjs';
|
||||
|
||||
function EffectCoverflow({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
coverflowEffect: {
|
||||
rotate: 50,
|
||||
stretch: 0,
|
||||
depth: 100,
|
||||
scale: 1,
|
||||
modifier: 1,
|
||||
slideShadows: true
|
||||
}
|
||||
});
|
||||
const setTranslate = () => {
|
||||
const {
|
||||
width: swiperWidth,
|
||||
height: swiperHeight,
|
||||
slides,
|
||||
slidesSizesGrid
|
||||
} = swiper;
|
||||
const params = swiper.params.coverflowEffect;
|
||||
const isHorizontal = swiper.isHorizontal();
|
||||
const transform = swiper.translate;
|
||||
const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2;
|
||||
const rotate = isHorizontal ? params.rotate : -params.rotate;
|
||||
const translate = params.depth;
|
||||
const r = getRotateFix(swiper);
|
||||
// Each slide offset from center
|
||||
for (let i = 0, length = slides.length; i < length; i += 1) {
|
||||
const slideEl = slides[i];
|
||||
const slideSize = slidesSizesGrid[i];
|
||||
const slideOffset = slideEl.swiperSlideOffset;
|
||||
const centerOffset = (center - slideOffset - slideSize / 2) / slideSize;
|
||||
const offsetMultiplier = typeof params.modifier === 'function' ? params.modifier(centerOffset) : centerOffset * params.modifier;
|
||||
let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
|
||||
let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
|
||||
// var rotateZ = 0
|
||||
let translateZ = -translate * Math.abs(offsetMultiplier);
|
||||
let stretch = params.stretch;
|
||||
// Allow percentage to make a relative stretch for responsive sliders
|
||||
if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) {
|
||||
stretch = parseFloat(params.stretch) / 100 * slideSize;
|
||||
}
|
||||
let translateY = isHorizontal ? 0 : stretch * offsetMultiplier;
|
||||
let translateX = isHorizontal ? stretch * offsetMultiplier : 0;
|
||||
let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier);
|
||||
|
||||
// Fix for ultra small values
|
||||
if (Math.abs(translateX) < 0.001) translateX = 0;
|
||||
if (Math.abs(translateY) < 0.001) translateY = 0;
|
||||
if (Math.abs(translateZ) < 0.001) translateZ = 0;
|
||||
if (Math.abs(rotateY) < 0.001) rotateY = 0;
|
||||
if (Math.abs(rotateX) < 0.001) rotateX = 0;
|
||||
if (Math.abs(scale) < 0.001) scale = 0;
|
||||
const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${r(rotateX)}deg) rotateY(${r(rotateY)}deg) scale(${scale})`;
|
||||
const targetEl = effectTarget(params, slideEl);
|
||||
targetEl.style.transform = slideTransform;
|
||||
slideEl.style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
|
||||
if (params.slideShadows) {
|
||||
// Set shadows
|
||||
let shadowBeforeEl = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-left') : slideEl.querySelector('.swiper-slide-shadow-top');
|
||||
let shadowAfterEl = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-right') : slideEl.querySelector('.swiper-slide-shadow-bottom');
|
||||
if (!shadowBeforeEl) {
|
||||
shadowBeforeEl = createShadow('coverflow', slideEl, isHorizontal ? 'left' : 'top');
|
||||
}
|
||||
if (!shadowAfterEl) {
|
||||
shadowAfterEl = createShadow('coverflow', slideEl, isHorizontal ? 'right' : 'bottom');
|
||||
}
|
||||
if (shadowBeforeEl) shadowBeforeEl.style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
|
||||
if (shadowAfterEl) shadowAfterEl.style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
const setTransition = duration => {
|
||||
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
||||
transformElements.forEach(el => {
|
||||
el.style.transitionDuration = `${duration}ms`;
|
||||
el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => {
|
||||
shadowEl.style.transitionDuration = `${duration}ms`;
|
||||
});
|
||||
});
|
||||
};
|
||||
effectInit({
|
||||
effect: 'coverflow',
|
||||
swiper,
|
||||
on,
|
||||
setTranslate,
|
||||
setTransition,
|
||||
perspective: () => true,
|
||||
overwriteParams: () => ({
|
||||
watchSlidesProgress: true
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export { EffectCoverflow as default };
|
||||
5
node_modules/swiper/modules/effect-creative-element.css
generated
vendored
Normal file
5
node_modules/swiper/modules/effect-creative-element.css
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.swiper-creative ::slotted(swiper-slide) {
|
||||
backface-visibility: hidden;
|
||||
overflow: hidden;
|
||||
transition-property: transform, opacity, height;
|
||||
}
|
||||
1
node_modules/swiper/modules/effect-creative-element.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-creative-element.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper-creative ::slotted(swiper-slide){backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}
|
||||
7
node_modules/swiper/modules/effect-creative.css
generated
vendored
Normal file
7
node_modules/swiper/modules/effect-creative.css
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.swiper-creative {
|
||||
.swiper-slide {
|
||||
backface-visibility: hidden;
|
||||
overflow: hidden;
|
||||
transition-property: transform, opacity, height;
|
||||
}
|
||||
}
|
||||
1
node_modules/swiper/modules/effect-creative.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-creative.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper-creative{.swiper-slide{backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}}
|
||||
2
node_modules/swiper/modules/effect-creative.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-creative.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{c as createShadow}from"../shared/create-shadow.min.mjs";import{e as effectInit}from"../shared/effect-init.min.mjs";import{e as effectTarget}from"../shared/effect-target.min.mjs";import{e as effectVirtualTransitionEnd}from"../shared/effect-virtual-transition-end.min.mjs";import{g as getSlideTransformEl,a as getRotateFix}from"../shared/utils.min.mjs";function EffectCreative({swiper:e,extendParams:t,on:s}){t({creativeEffect:{limitProgress:1,shadowPerProgress:!1,progressMultiplier:1,perspective:!0,prev:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1},next:{translate:[0,0,0],rotate:[0,0,0],opacity:1,scale:1}}});const r=e=>"string"==typeof e?e:`${e}px`;effectInit({effect:"creative",swiper:e,on:s,setTranslate:()=>{const{slides:t,wrapperEl:s,slidesSizesGrid:a}=e,i=e.params.creativeEffect,{progressMultiplier:o}=i,l=e.params.centeredSlides,n=getRotateFix(e);if(l){const t=a[0]/2-e.params.slidesOffsetBefore||0;s.style.transform=`translateX(calc(50% - ${t}px))`}for(let s=0;s<t.length;s+=1){const a=t[s],c=a.progress,f=Math.min(Math.max(a.progress,-i.limitProgress),i.limitProgress);let m=f;l||(m=Math.min(Math.max(a.originalProgress,-i.limitProgress),i.limitProgress));const p=a.swiperSlideOffset,d=[e.params.cssMode?-p-e.translate:-p,0,0],g=[0,0,0];let h=!1;e.isHorizontal()||(d[1]=d[0],d[0]=0);let w={translate:[0,0,0],rotate:[0,0,0],scale:1,opacity:1};f<0?(w=i.next,h=!0):f>0&&(w=i.prev,h=!0),d.forEach((e,t)=>{d[t]=`calc(${e}px + (${r(w.translate[t])} * ${Math.abs(f*o)}))`}),g.forEach((e,t)=>{let s=w.rotate[t]*Math.abs(f*o);g[t]=s}),a.style.zIndex=-Math.abs(Math.round(c))+t.length;const y=d.join(", "),u=`rotateX(${n(g[0])}deg) rotateY(${n(g[1])}deg) rotateZ(${n(g[2])}deg)`,v=m<0?`scale(${1+(1-w.scale)*m*o})`:`scale(${1-(1-w.scale)*m*o})`,E=m<0?1+(1-w.opacity)*m*o:1-(1-w.opacity)*m*o,M=`translate3d(${y}) ${u} ${v}`;if(h&&w.shadow||!h){let e=a.querySelector(".swiper-slide-shadow");if(!e&&w.shadow&&(e=createShadow("creative",a)),e){const t=i.shadowPerProgress?f*(1/i.limitProgress):f;e.style.opacity=Math.min(Math.max(Math.abs(t),0),1)}}const $=effectTarget(i,a);$.style.transform=M,$.style.opacity=E,w.origin&&($.style.transformOrigin=w.origin)}},setTransition:t=>{const s=e.slides.map(e=>getSlideTransformEl(e));s.forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow").forEach(e=>{e.style.transitionDuration=`${t}ms`})}),effectVirtualTransitionEnd({swiper:e,duration:t,transformElements:s,allSlides:!0})},perspective:()=>e.params.creativeEffect.perspective,overwriteParams:()=>({watchSlidesProgress:!0,virtualTranslate:!e.params.cssMode})})}export{EffectCreative as default};
|
||||
//# sourceMappingURL=effect-creative.min.mjs.map
|
||||
1
node_modules/swiper/modules/effect-creative.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-creative.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"effect-creative.mjs.mjs","names":["createShadow","effectInit","effectTarget","effectVirtualTransitionEnd","getSlideTransformEl","getRotateFix","EffectCreative","swiper","extendParams","on","creativeEffect","limitProgress","shadowPerProgress","progressMultiplier","perspective","prev","translate","rotate","opacity","scale","next","getTranslateValue","value","effect","setTranslate","slides","wrapperEl","slidesSizesGrid","params","multiplier","isCenteredSlides","centeredSlides","rotateFix","margin","slidesOffsetBefore","style","transform","i","length","slideEl","slideProgress","progress","Math","min","max","originalProgress","offset","swiperSlideOffset","t","cssMode","r","custom","isHorizontal","data","forEach","index","abs","val","zIndex","round","translateString","join","rotateString","scaleString","opacityString","shadow","shadowEl","querySelector","shadowOpacity","targetEl","origin","transformOrigin","setTransition","duration","transformElements","map","el","transitionDuration","querySelectorAll","allSlides","overwriteParams","watchSlidesProgress","virtualTranslate"],"sources":["0"],"mappings":"YAAcA,iBAAoB,8CACpBC,eAAkB,4CAClBC,iBAAoB,8CACpBC,+BAAkC,8DAClCC,yBAA0BC,iBAAoB,0BAE5D,SAASC,gBAAeC,OACtBA,EAAMC,aACNA,EAAYC,GACZA,IAEAD,EAAa,CACXE,eAAgB,CACdC,cAAe,EACfC,mBAAmB,EACnBC,mBAAoB,EACpBC,aAAa,EACbC,KAAM,CACJC,UAAW,CAAC,EAAG,EAAG,GAClBC,OAAQ,CAAC,EAAG,EAAG,GACfC,QAAS,EACTC,MAAO,GAETC,KAAM,CACJJ,UAAW,CAAC,EAAG,EAAG,GAClBC,OAAQ,CAAC,EAAG,EAAG,GACfC,QAAS,EACTC,MAAO,MAIb,MAAME,EAAoBC,GACH,iBAAVA,EAA2BA,EAC/B,GAAGA,MAiGZrB,WAAW,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AqB,GAAGJ,MACjCG,EAAGE,iBAAiB,wBAAwBxB,QAAQY,IAClDA,EAAS/B,MAAM0C,mBAAqB,GAAGJ,UAG3CtE,2BAA2B,CACzBI,SACAkE,WACAC,oBACAK,WAAW,KASbjE,YAAa,IAAMP,EAAOqB,OAAOlB,eAAeI,YAChDkE,gBAAiB,KAAM,CACrBC,qBAAqB,EACrBC,kBAAmB3E,EAAOqB,OAAOqB,WAGvC,QAES3C"}
|
||||
145
node_modules/swiper/modules/effect-creative.mjs
generated
vendored
Normal file
145
node_modules/swiper/modules/effect-creative.mjs
generated
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
import { c as createShadow } from '../shared/create-shadow.mjs';
|
||||
import { e as effectInit } from '../shared/effect-init.mjs';
|
||||
import { e as effectTarget } from '../shared/effect-target.mjs';
|
||||
import { e as effectVirtualTransitionEnd } from '../shared/effect-virtual-transition-end.mjs';
|
||||
import { g as getSlideTransformEl, a as getRotateFix } from '../shared/utils.mjs';
|
||||
|
||||
function EffectCreative({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
creativeEffect: {
|
||||
limitProgress: 1,
|
||||
shadowPerProgress: false,
|
||||
progressMultiplier: 1,
|
||||
perspective: true,
|
||||
prev: {
|
||||
translate: [0, 0, 0],
|
||||
rotate: [0, 0, 0],
|
||||
opacity: 1,
|
||||
scale: 1
|
||||
},
|
||||
next: {
|
||||
translate: [0, 0, 0],
|
||||
rotate: [0, 0, 0],
|
||||
opacity: 1,
|
||||
scale: 1
|
||||
}
|
||||
}
|
||||
});
|
||||
const getTranslateValue = value => {
|
||||
if (typeof value === 'string') return value;
|
||||
return `${value}px`;
|
||||
};
|
||||
const setTranslate = () => {
|
||||
const {
|
||||
slides,
|
||||
wrapperEl,
|
||||
slidesSizesGrid
|
||||
} = swiper;
|
||||
const params = swiper.params.creativeEffect;
|
||||
const {
|
||||
progressMultiplier: multiplier
|
||||
} = params;
|
||||
const isCenteredSlides = swiper.params.centeredSlides;
|
||||
const rotateFix = getRotateFix(swiper);
|
||||
if (isCenteredSlides) {
|
||||
const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0;
|
||||
wrapperEl.style.transform = `translateX(calc(50% - ${margin}px))`;
|
||||
}
|
||||
for (let i = 0; i < slides.length; i += 1) {
|
||||
const slideEl = slides[i];
|
||||
const slideProgress = slideEl.progress;
|
||||
const progress = Math.min(Math.max(slideEl.progress, -params.limitProgress), params.limitProgress);
|
||||
let originalProgress = progress;
|
||||
if (!isCenteredSlides) {
|
||||
originalProgress = Math.min(Math.max(slideEl.originalProgress, -params.limitProgress), params.limitProgress);
|
||||
}
|
||||
const offset = slideEl.swiperSlideOffset;
|
||||
const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0];
|
||||
const r = [0, 0, 0];
|
||||
let custom = false;
|
||||
if (!swiper.isHorizontal()) {
|
||||
t[1] = t[0];
|
||||
t[0] = 0;
|
||||
}
|
||||
let data = {
|
||||
translate: [0, 0, 0],
|
||||
rotate: [0, 0, 0],
|
||||
scale: 1,
|
||||
opacity: 1
|
||||
};
|
||||
if (progress < 0) {
|
||||
data = params.next;
|
||||
custom = true;
|
||||
} else if (progress > 0) {
|
||||
data = params.prev;
|
||||
custom = true;
|
||||
}
|
||||
// set translate
|
||||
t.forEach((value, index) => {
|
||||
t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`;
|
||||
});
|
||||
// set rotates
|
||||
r.forEach((value, index) => {
|
||||
let val = data.rotate[index] * Math.abs(progress * multiplier);
|
||||
r[index] = val;
|
||||
});
|
||||
slideEl.style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length;
|
||||
const translateString = t.join(', ');
|
||||
const rotateString = `rotateX(${rotateFix(r[0])}deg) rotateY(${rotateFix(r[1])}deg) rotateZ(${rotateFix(r[2])}deg)`;
|
||||
const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`;
|
||||
const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier;
|
||||
const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`;
|
||||
|
||||
// Set shadows
|
||||
if (custom && data.shadow || !custom) {
|
||||
let shadowEl = slideEl.querySelector('.swiper-slide-shadow');
|
||||
if (!shadowEl && data.shadow) {
|
||||
shadowEl = createShadow('creative', slideEl);
|
||||
}
|
||||
if (shadowEl) {
|
||||
const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress;
|
||||
shadowEl.style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1);
|
||||
}
|
||||
}
|
||||
const targetEl = effectTarget(params, slideEl);
|
||||
targetEl.style.transform = transform;
|
||||
targetEl.style.opacity = opacityString;
|
||||
if (data.origin) {
|
||||
targetEl.style.transformOrigin = data.origin;
|
||||
}
|
||||
}
|
||||
};
|
||||
const setTransition = duration => {
|
||||
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
||||
transformElements.forEach(el => {
|
||||
el.style.transitionDuration = `${duration}ms`;
|
||||
el.querySelectorAll('.swiper-slide-shadow').forEach(shadowEl => {
|
||||
shadowEl.style.transitionDuration = `${duration}ms`;
|
||||
});
|
||||
});
|
||||
effectVirtualTransitionEnd({
|
||||
swiper,
|
||||
duration,
|
||||
transformElements,
|
||||
allSlides: true
|
||||
});
|
||||
};
|
||||
effectInit({
|
||||
effect: 'creative',
|
||||
swiper,
|
||||
on,
|
||||
setTranslate,
|
||||
setTransition,
|
||||
perspective: () => swiper.params.creativeEffect.perspective,
|
||||
overwriteParams: () => ({
|
||||
watchSlidesProgress: true,
|
||||
virtualTranslate: !swiper.params.cssMode
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export { EffectCreative as default };
|
||||
52
node_modules/swiper/modules/effect-cube-element.css
generated
vendored
Normal file
52
node_modules/swiper/modules/effect-cube-element.css
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
.swiper.swiper-cube {
|
||||
overflow: visible;
|
||||
}
|
||||
.swiper-cube ::slotted(swiper-slide) {
|
||||
pointer-events: none;
|
||||
backface-visibility: hidden;
|
||||
z-index: 1;
|
||||
visibility: hidden;
|
||||
transform-origin: 0 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.swiper-cube ::slotted(swiper-slide) ::slotted(swiper-slide) {
|
||||
pointer-events: none;
|
||||
}
|
||||
.swiper-cube.swiper-rtl ::slotted(swiper-slide) {
|
||||
transform-origin: 100% 0;
|
||||
}
|
||||
.swiper-cube ::slotted(.swiper-slide-active),
|
||||
.swiper-cube ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active) {
|
||||
pointer-events: auto;
|
||||
}
|
||||
.swiper-cube ::slotted(.swiper-slide-active),
|
||||
.swiper-cube ::slotted(.swiper-slide-next),
|
||||
.swiper-cube ::slotted(.swiper-slide-prev) {
|
||||
pointer-events: auto;
|
||||
visibility: visible;
|
||||
}
|
||||
.swiper-cube .swiper-cube-shadow {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.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-cube ::slotted(.swiper-slide-next) + ::slotted(swiper-slide) {
|
||||
pointer-events: auto;
|
||||
visibility: visible;
|
||||
}
|
||||
/* Cube slide shadows start *//* Cube slide shadows end */
|
||||
1
node_modules/swiper/modules/effect-cube-element.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-cube-element.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper.swiper-cube{overflow:visible}.swiper-cube ::slotted(swiper-slide){backface-visibility:hidden;height:100%;pointer-events:none;transform-origin:0 0;visibility:hidden;width:100%;z-index:1}.swiper-cube ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-cube.swiper-rtl ::slotted(swiper-slide){transform-origin:100% 0}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-cube ::slotted(.swiper-slide-active),.swiper-cube ::slotted(.swiper-slide-next),.swiper-cube ::slotted(.swiper-slide-prev){pointer-events:auto;visibility:visible}.swiper-cube .swiper-cube-shadow{bottom:0;height:100%;left:0;opacity:.6;position:absolute;width:100%;z-index:0}.swiper-cube .swiper-cube-shadow:before{background:#000;bottom:0;content:"";filter:blur(50px);left:0;position:absolute;right:0;top:0}.swiper-cube ::slotted(.swiper-slide-next)+::slotted(swiper-slide){pointer-events:auto;visibility:visible}
|
||||
70
node_modules/swiper/modules/effect-cube.css
generated
vendored
Normal file
70
node_modules/swiper/modules/effect-cube.css
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
.swiper.swiper-cube {
|
||||
overflow: visible;
|
||||
}
|
||||
.swiper-cube {
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
backface-visibility: hidden;
|
||||
z-index: 1;
|
||||
visibility: hidden;
|
||||
transform-origin: 0 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
&.swiper-rtl .swiper-slide {
|
||||
transform-origin: 100% 0;
|
||||
}
|
||||
.swiper-slide-active {
|
||||
&,
|
||||
& .swiper-slide-active {
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
.swiper-slide-active,
|
||||
.swiper-slide-next,
|
||||
.swiper-slide-prev {
|
||||
pointer-events: auto;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.swiper-cube-shadow {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.6;
|
||||
z-index: 0;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
background: #000;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
filter: blur(50px);
|
||||
}
|
||||
}
|
||||
}
|
||||
.swiper-cube {
|
||||
.swiper-slide-next + .swiper-slide {
|
||||
pointer-events: auto;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
/* Cube slide shadows start */
|
||||
.swiper-cube {
|
||||
.swiper-slide-shadow-cube.swiper-slide-shadow-top,
|
||||
.swiper-slide-shadow-cube.swiper-slide-shadow-bottom,
|
||||
.swiper-slide-shadow-cube.swiper-slide-shadow-left,
|
||||
.swiper-slide-shadow-cube.swiper-slide-shadow-right {
|
||||
z-index: 0;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
}
|
||||
/* Cube slide shadows end */
|
||||
1
node_modules/swiper/modules/effect-cube.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-cube.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper.swiper-cube{overflow:visible}.swiper-cube{.swiper-slide{backface-visibility:hidden;height:100%;pointer-events:none;transform-origin:0 0;visibility:hidden;width:100%;z-index:1;.swiper-slide{pointer-events:none}}&.swiper-rtl .swiper-slide{transform-origin:100% 0}.swiper-slide-active{&,& .swiper-slide-active{pointer-events:auto}}.swiper-slide-active,.swiper-slide-next,.swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube-shadow{bottom:0;height:100%;left:0;opacity:.6;position:absolute;width:100%;z-index:0;&:before{background:#000;bottom:0;content:"";filter:blur(50px);left:0;position:absolute;right:0;top:0}}}.swiper-cube{.swiper-slide-next+.swiper-slide{pointer-events:auto;visibility:visible}}.swiper-cube{.swiper-slide-shadow-cube.swiper-slide-shadow-bottom,.swiper-slide-shadow-cube.swiper-slide-shadow-left,.swiper-slide-shadow-cube.swiper-slide-shadow-right,.swiper-slide-shadow-cube.swiper-slide-shadow-top{backface-visibility:hidden;z-index:0}}
|
||||
2
node_modules/swiper/modules/effect-cube.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-cube.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{e as effectInit}from"../shared/effect-init.min.mjs";import{c as createElement,a as getRotateFix}from"../shared/utils.min.mjs";function EffectCube({swiper:e,extendParams:t,on:s}){t({cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}});const a=(e,t,s)=>{let a=s?e.querySelector(".swiper-slide-shadow-left"):e.querySelector(".swiper-slide-shadow-top"),r=s?e.querySelector(".swiper-slide-shadow-right"):e.querySelector(".swiper-slide-shadow-bottom");a||(a=createElement("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(s?"left":"top")).split(" ")),e.append(a)),r||(r=createElement("div",("swiper-slide-shadow-cube swiper-slide-shadow-"+(s?"right":"bottom")).split(" ")),e.append(r)),a&&(a.style.opacity=Math.max(-t,0)),r&&(r.style.opacity=Math.max(t,0))};effectInit({effect:"cube",swiper:e,on:s,setTranslate:()=>{const{el:t,wrapperEl:s,slides:r,width:o,height:i,rtlTranslate:l,size:d,browser:n}=e,p=getRotateFix(e),c=e.params.cubeEffect,w=e.isHorizontal(),h=e.virtual&&e.params.virtual.enabled;let f,m=0;c.shadow&&(w?(f=e.wrapperEl.querySelector(".swiper-cube-shadow"),f||(f=createElement("div","swiper-cube-shadow"),e.wrapperEl.append(f)),f.style.height=`${o}px`):(f=t.querySelector(".swiper-cube-shadow"),f||(f=createElement("div","swiper-cube-shadow"),t.append(f))));for(let e=0;e<r.length;e+=1){const t=r[e];let s=e;h&&(s=parseInt(t.getAttribute("data-swiper-slide-index"),10));let o=90*s,i=Math.floor(o/360);l&&(o=-o,i=Math.floor(-o/360));const n=Math.max(Math.min(t.progress,1),-1);let f=0,u=0,b=0;s%4==0?(f=4*-i*d,b=0):(s-1)%4==0?(f=0,b=4*-i*d):(s-2)%4==0?(f=d+4*i*d,b=d):(s-3)%4==0&&(f=-d,b=3*d+4*d*i),l&&(f=-f),w||(u=f,f=0);const x=`rotateX(${p(w?0:-o)}deg) rotateY(${p(w?o:0)}deg) translate3d(${f}px, ${u}px, ${b}px)`;n<=1&&n>-1&&(m=90*s+90*n,l&&(m=90*-s-90*n)),t.style.transform=x,c.slideShadows&&a(t,n,w)}if(s.style.transformOrigin=`50% 50% -${d/2}px`,s.style["-webkit-transform-origin"]=`50% 50% -${d/2}px`,c.shadow)if(w)f.style.transform=`translate3d(0px, ${o/2+c.shadowOffset}px, ${-o/2}px) rotateX(89.99deg) rotateZ(0deg) scale(${c.shadowScale})`;else{const e=Math.abs(m)-90*Math.floor(Math.abs(m)/90),t=1.5-(Math.sin(2*e*Math.PI/360)/2+Math.cos(2*e*Math.PI/360)/2),s=c.shadowScale,a=c.shadowScale/t,r=c.shadowOffset;f.style.transform=`scale3d(${s}, 1, ${a}) translate3d(0px, ${i/2+r}px, ${-i/2/a}px) rotateX(-89.99deg)`}const u=(n.isSafari||n.isWebView)&&n.needPerspectiveFix?-d/2:0;s.style.transform=`translate3d(0px,0,${u}px) rotateX(${p(e.isHorizontal()?0:m)}deg) rotateY(${p(e.isHorizontal()?-m:0)}deg)`,s.style.setProperty("--swiper-cube-translate-z",`${u}px`)},setTransition:t=>{const{el:s,slides:a}=e;if(a.forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>{e.style.transitionDuration=`${t}ms`})}),e.params.cubeEffect.shadow&&!e.isHorizontal()){const e=s.querySelector(".swiper-cube-shadow");e&&(e.style.transitionDuration=`${t}ms`)}},recreateShadows:()=>{const t=e.isHorizontal();e.slides.forEach(e=>{const s=Math.max(Math.min(e.progress,1),-1);a(e,s,t)})},getEffectParams:()=>e.params.cubeEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0})})}export{EffectCube as default};
|
||||
//# sourceMappingURL=effect-cube.min.mjs.map
|
||||
1
node_modules/swiper/modules/effect-cube.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-cube.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"effect-cube.mjs.mjs","names":["effectInit","createElement","getRotateFix","EffectCube","swiper","extendParams","on","cubeEffect","slideShadows","shadow","shadowOffset","shadowScale","createSlideShadows","slideEl","progress","isHorizontal","shadowBefore","querySelector","shadowAfter","split","append","style","opacity","Math","max","effect","setTranslate","el","wrapperEl","slides","width","swiperWidth","height","swiperHeight","rtlTranslate","rtl","size","swiperSize","browser","r","params","isVirtual","virtual","enabled","cubeShadowEl","wrapperRotate","i","length","slideIndex","parseInt","getAttribute","slideAngle","round","floor","min","tx","ty","tz","transform","transformOrigin","shadowAngle","abs","multiplier","sin","PI","cos","scale1","scale2","offset","zFactor","isSafari","isWebView","needPerspectiveFix","setProperty","setTransition","duration","forEach","transitionDuration","querySelectorAll","subEl","shadowEl","recreateShadows","getEffectParams","perspective","overwriteParams","slidesPerView","slidesPerGroup","watchSlidesProgress","resistanceRatio","spaceBetween","centeredSlides","virtualTranslate"],"sources":["0"],"mappings":"YAAcA,eAAkB,4CAClBC,mBAAoBC,iBAAoB,0BAEtD,SAASC,YAAWC,OAClBA,EAAMC,aACNA,EAAYC,GACZA,IAEAD,EAAa,CACXE,WAAY,CACVC,cAAc,EACdC,QAAQ,EACRC,aAAc,GACdC,YAAa,OAGjB,MAAMC,EAAqB,CAACC,EAASC,EAAUC,KAC7C,IAAIC,EAAeD,EAAeF,EAAQI,cAAc,6BAA+BJ,EAAQI,cAAc,4BACzGC,EAAcH,EAAeF,E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/swiper/modules/effect-cube.mjs
generated
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
import { e as effectInit } from '../shared/effect-init.mjs';
|
||||
import { c as createElement, a as getRotateFix } from '../shared/utils.mjs';
|
||||
|
||||
function EffectCube({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
cubeEffect: {
|
||||
slideShadows: true,
|
||||
shadow: true,
|
||||
shadowOffset: 20,
|
||||
shadowScale: 0.94
|
||||
}
|
||||
});
|
||||
const createSlideShadows = (slideEl, progress, isHorizontal) => {
|
||||
let shadowBefore = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-left') : slideEl.querySelector('.swiper-slide-shadow-top');
|
||||
let shadowAfter = isHorizontal ? slideEl.querySelector('.swiper-slide-shadow-right') : slideEl.querySelector('.swiper-slide-shadow-bottom');
|
||||
if (!shadowBefore) {
|
||||
shadowBefore = createElement('div', `swiper-slide-shadow-cube swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}`.split(' '));
|
||||
slideEl.append(shadowBefore);
|
||||
}
|
||||
if (!shadowAfter) {
|
||||
shadowAfter = createElement('div', `swiper-slide-shadow-cube swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}`.split(' '));
|
||||
slideEl.append(shadowAfter);
|
||||
}
|
||||
if (shadowBefore) shadowBefore.style.opacity = Math.max(-progress, 0);
|
||||
if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0);
|
||||
};
|
||||
const recreateShadows = () => {
|
||||
// create new ones
|
||||
const isHorizontal = swiper.isHorizontal();
|
||||
swiper.slides.forEach(slideEl => {
|
||||
const progress = Math.max(Math.min(slideEl.progress, 1), -1);
|
||||
createSlideShadows(slideEl, progress, isHorizontal);
|
||||
});
|
||||
};
|
||||
const setTranslate = () => {
|
||||
const {
|
||||
el,
|
||||
wrapperEl,
|
||||
slides,
|
||||
width: swiperWidth,
|
||||
height: swiperHeight,
|
||||
rtlTranslate: rtl,
|
||||
size: swiperSize,
|
||||
browser
|
||||
} = swiper;
|
||||
const r = getRotateFix(swiper);
|
||||
const params = swiper.params.cubeEffect;
|
||||
const isHorizontal = swiper.isHorizontal();
|
||||
const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
|
||||
let wrapperRotate = 0;
|
||||
let cubeShadowEl;
|
||||
if (params.shadow) {
|
||||
if (isHorizontal) {
|
||||
cubeShadowEl = swiper.wrapperEl.querySelector('.swiper-cube-shadow');
|
||||
if (!cubeShadowEl) {
|
||||
cubeShadowEl = createElement('div', 'swiper-cube-shadow');
|
||||
swiper.wrapperEl.append(cubeShadowEl);
|
||||
}
|
||||
cubeShadowEl.style.height = `${swiperWidth}px`;
|
||||
} else {
|
||||
cubeShadowEl = el.querySelector('.swiper-cube-shadow');
|
||||
if (!cubeShadowEl) {
|
||||
cubeShadowEl = createElement('div', 'swiper-cube-shadow');
|
||||
el.append(cubeShadowEl);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < slides.length; i += 1) {
|
||||
const slideEl = slides[i];
|
||||
let slideIndex = i;
|
||||
if (isVirtual) {
|
||||
slideIndex = parseInt(slideEl.getAttribute('data-swiper-slide-index'), 10);
|
||||
}
|
||||
let slideAngle = slideIndex * 90;
|
||||
let round = Math.floor(slideAngle / 360);
|
||||
if (rtl) {
|
||||
slideAngle = -slideAngle;
|
||||
round = Math.floor(-slideAngle / 360);
|
||||
}
|
||||
const progress = Math.max(Math.min(slideEl.progress, 1), -1);
|
||||
let tx = 0;
|
||||
let ty = 0;
|
||||
let tz = 0;
|
||||
if (slideIndex % 4 === 0) {
|
||||
tx = -round * 4 * swiperSize;
|
||||
tz = 0;
|
||||
} else if ((slideIndex - 1) % 4 === 0) {
|
||||
tx = 0;
|
||||
tz = -round * 4 * swiperSize;
|
||||
} else if ((slideIndex - 2) % 4 === 0) {
|
||||
tx = swiperSize + round * 4 * swiperSize;
|
||||
tz = swiperSize;
|
||||
} else if ((slideIndex - 3) % 4 === 0) {
|
||||
tx = -swiperSize;
|
||||
tz = 3 * swiperSize + swiperSize * 4 * round;
|
||||
}
|
||||
if (rtl) {
|
||||
tx = -tx;
|
||||
}
|
||||
if (!isHorizontal) {
|
||||
ty = tx;
|
||||
tx = 0;
|
||||
}
|
||||
const transform = `rotateX(${r(isHorizontal ? 0 : -slideAngle)}deg) rotateY(${r(isHorizontal ? slideAngle : 0)}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;
|
||||
if (progress <= 1 && progress > -1) {
|
||||
wrapperRotate = slideIndex * 90 + progress * 90;
|
||||
if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90;
|
||||
}
|
||||
slideEl.style.transform = transform;
|
||||
if (params.slideShadows) {
|
||||
createSlideShadows(slideEl, progress, isHorizontal);
|
||||
}
|
||||
}
|
||||
wrapperEl.style.transformOrigin = `50% 50% -${swiperSize / 2}px`;
|
||||
wrapperEl.style['-webkit-transform-origin'] = `50% 50% -${swiperSize / 2}px`;
|
||||
if (params.shadow) {
|
||||
if (isHorizontal) {
|
||||
cubeShadowEl.style.transform = `translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(89.99deg) rotateZ(0deg) scale(${params.shadowScale})`;
|
||||
} else {
|
||||
const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90;
|
||||
const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2);
|
||||
const scale1 = params.shadowScale;
|
||||
const scale2 = params.shadowScale / multiplier;
|
||||
const offset = params.shadowOffset;
|
||||
cubeShadowEl.style.transform = `scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-89.99deg)`;
|
||||
}
|
||||
}
|
||||
const zFactor = (browser.isSafari || browser.isWebView) && browser.needPerspectiveFix ? -swiperSize / 2 : 0;
|
||||
wrapperEl.style.transform = `translate3d(0px,0,${zFactor}px) rotateX(${r(swiper.isHorizontal() ? 0 : wrapperRotate)}deg) rotateY(${r(swiper.isHorizontal() ? -wrapperRotate : 0)}deg)`;
|
||||
wrapperEl.style.setProperty('--swiper-cube-translate-z', `${zFactor}px`);
|
||||
};
|
||||
const setTransition = duration => {
|
||||
const {
|
||||
el,
|
||||
slides
|
||||
} = swiper;
|
||||
slides.forEach(slideEl => {
|
||||
slideEl.style.transitionDuration = `${duration}ms`;
|
||||
slideEl.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(subEl => {
|
||||
subEl.style.transitionDuration = `${duration}ms`;
|
||||
});
|
||||
});
|
||||
if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
|
||||
const shadowEl = el.querySelector('.swiper-cube-shadow');
|
||||
if (shadowEl) shadowEl.style.transitionDuration = `${duration}ms`;
|
||||
}
|
||||
};
|
||||
effectInit({
|
||||
effect: 'cube',
|
||||
swiper,
|
||||
on,
|
||||
setTranslate,
|
||||
setTransition,
|
||||
recreateShadows,
|
||||
getEffectParams: () => swiper.params.cubeEffect,
|
||||
perspective: () => true,
|
||||
overwriteParams: () => ({
|
||||
slidesPerView: 1,
|
||||
slidesPerGroup: 1,
|
||||
watchSlidesProgress: true,
|
||||
resistanceRatio: 0,
|
||||
spaceBetween: 0,
|
||||
centeredSlides: false,
|
||||
virtualTranslate: true
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export { EffectCube as default };
|
||||
16
node_modules/swiper/modules/effect-fade-element.css
generated
vendored
Normal file
16
node_modules/swiper/modules/effect-fade-element.css
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
.swiper-fade.swiper-free-mode ::slotted(swiper-slide) {
|
||||
transition-timing-function: ease-out;
|
||||
}
|
||||
.swiper-fade ::slotted(swiper-slide) {
|
||||
pointer-events: none;
|
||||
transition-property: opacity;
|
||||
}
|
||||
.swiper-fade ::slotted(swiper-slide) ::slotted(swiper-slide) {
|
||||
pointer-events: none;
|
||||
}
|
||||
.swiper-fade ::slotted(.swiper-slide-active) {
|
||||
pointer-events: auto;
|
||||
}
|
||||
.swiper-fade ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active) {
|
||||
pointer-events: auto;
|
||||
}
|
||||
1
node_modules/swiper/modules/effect-fade-element.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-fade-element.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper-fade.swiper-free-mode ::slotted(swiper-slide){transition-timing-function:ease-out}.swiper-fade ::slotted(swiper-slide){pointer-events:none;transition-property:opacity}.swiper-fade ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-fade ::slotted(.swiper-slide-active){pointer-events:auto}.swiper-fade ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}
|
||||
20
node_modules/swiper/modules/effect-fade.css
generated
vendored
Normal file
20
node_modules/swiper/modules/effect-fade.css
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
.swiper-fade {
|
||||
&.swiper-free-mode {
|
||||
.swiper-slide {
|
||||
transition-timing-function: ease-out;
|
||||
}
|
||||
}
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
transition-property: opacity;
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
.swiper-slide-active {
|
||||
pointer-events: auto;
|
||||
& .swiper-slide-active {
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
node_modules/swiper/modules/effect-fade.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-fade.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper-fade{&.swiper-free-mode{.swiper-slide{transition-timing-function:ease-out}}.swiper-slide{pointer-events:none;transition-property:opacity;.swiper-slide{pointer-events:none}}.swiper-slide-active{pointer-events:auto;& .swiper-slide-active{pointer-events:auto}}}
|
||||
2
node_modules/swiper/modules/effect-fade.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-fade.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{e as effectInit}from"../shared/effect-init.min.mjs";import{e as effectTarget}from"../shared/effect-target.min.mjs";import{e as effectVirtualTransitionEnd}from"../shared/effect-virtual-transition-end.min.mjs";import{g as getSlideTransformEl}from"../shared/utils.min.mjs";function EffectFade({swiper:e,extendParams:t,on:s}){t({fadeEffect:{crossFade:!1}});effectInit({effect:"fade",swiper:e,on:s,setTranslate:()=>{const{slides:t}=e,s=e.params.fadeEffect;for(let a=0;a<t.length;a+=1){const t=e.slides[a];let r=-t.swiperSlideOffset;e.params.virtualTranslate||(r-=e.translate);let i=0;e.isHorizontal()||(i=r,r=0);const f=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(t.progress),0):1+Math.min(Math.max(t.progress,-1),0),n=effectTarget(s,t);n.style.opacity=f,n.style.transform=`translate3d(${r}px, ${i}px, 0px)`}},setTransition:t=>{const s=e.slides.map(e=>getSlideTransformEl(e));s.forEach(e=>{e.style.transitionDuration=`${t}ms`}),effectVirtualTransitionEnd({swiper:e,duration:t,transformElements:s,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}export{EffectFade as default};
|
||||
//# sourceMappingURL=effect-fade.min.mjs.map
|
||||
1
node_modules/swiper/modules/effect-fade.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-fade.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"effect-fade.mjs.mjs","names":["effectInit","effectTarget","effectVirtualTransitionEnd","getSlideTransformEl","EffectFade","swiper","extendParams","on","fadeEffect","crossFade","effect","setTranslate","slides","params","i","length","slideEl","tx","swiperSlideOffset","virtualTranslate","translate","ty","isHorizontal","slideOpacity","Math","max","abs","progress","min","targetEl","style","opacity","transform","setTransition","duration","transformElements","map","forEach","el","transitionDuration","allSlides","overwriteParams","slidesPerView","slidesPerGroup","watchSlidesProgress","spaceBetween","cssMode"],"sources":["0"],"mappings":"YAAcA,eAAkB,4CAClBC,iBAAoB,8CACpBC,+BAAkC,8DAClCC,wBAA2B,0BAEzC,SAASC,YAAWC,OAClBA,EAAMC,aACNA,EAAYC,GACZA,IAEAD,EAAa,CACXE,WAAY,CACVC,WAAW,KAoCfT,WAAW,CACTU,OAAQ,OACRL,SACAE,KACAI,aArCmB,KACnB,MAAMC,OACJA,GACEP,EACEQ,EAASR,EAAOQ,OAAOL,WAC7B,IAAK,IAAIM,EAAI,EAAGA,EAAIF,EAAOG,OAAQD,GAAK,EAAG,CACzC,MAAME,EAAUX,EAAOO,OAAOE,GAE9B,IAAIG,GADWD,EAAQE,kBAElBb,EAAOQ,OAAOM,mBAAkBF,GAAMZ,EAAOe,WAClD,IAAIC,EAAK,EACJhB,EAAOiB,iBACVD,EAAKJ,EACLA,EAAK,GAEP,MAAMM,EAAelB,EAAOQ,OAAOL,WAAWC,UAAYe,KAAKC,IAAI,EAAID,KAAKE,IAAIV,EAAQW,UAAW,GAAK,EAAIH,KAAKI,IAAIJ,KAAKC,IAAIT,EAAQW,UAAW,GAAI,GAC/IE,EAAW5B,aAAaY,EAAQG,GACtCa,EAASC,MAAMC,QAAUR,EACzBM,EAASC,MAAME,UAAY,eAAef,QAASI,WACrD,GAmBAY,cAjBoBC,IACpB,MAAMC,EAAoB9B,EAAOO,OAAOwB,IAAIpB,GAAWb,oBAAoBa,IAC3EmB,EAAkBE,QAAQC,IACxBA,EAAGR,MAAMS,mBAAqB,GAAGL,QAEnChC,2BAA2B,CACzBG,SACA6B,WACAC,oBACAK,WAAW,KASbC,gBAAiB,KAAM,CACrBC,cAAe,EACfC,eAAgB,EAChBC,qBAAqB,EACrBC,aAAc,EACd1B,kBAAmBd,EAAOQ,OAAOiC,WAGvC,QAES1C"}
|
||||
65
node_modules/swiper/modules/effect-fade.mjs
generated
vendored
Normal file
65
node_modules/swiper/modules/effect-fade.mjs
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
import { e as effectInit } from '../shared/effect-init.mjs';
|
||||
import { e as effectTarget } from '../shared/effect-target.mjs';
|
||||
import { e as effectVirtualTransitionEnd } from '../shared/effect-virtual-transition-end.mjs';
|
||||
import { g as getSlideTransformEl } from '../shared/utils.mjs';
|
||||
|
||||
function EffectFade({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
fadeEffect: {
|
||||
crossFade: false
|
||||
}
|
||||
});
|
||||
const setTranslate = () => {
|
||||
const {
|
||||
slides
|
||||
} = swiper;
|
||||
const params = swiper.params.fadeEffect;
|
||||
for (let i = 0; i < slides.length; i += 1) {
|
||||
const slideEl = swiper.slides[i];
|
||||
const offset = slideEl.swiperSlideOffset;
|
||||
let tx = -offset;
|
||||
if (!swiper.params.virtualTranslate) tx -= swiper.translate;
|
||||
let ty = 0;
|
||||
if (!swiper.isHorizontal()) {
|
||||
ty = tx;
|
||||
tx = 0;
|
||||
}
|
||||
const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(slideEl.progress), 0) : 1 + Math.min(Math.max(slideEl.progress, -1), 0);
|
||||
const targetEl = effectTarget(params, slideEl);
|
||||
targetEl.style.opacity = slideOpacity;
|
||||
targetEl.style.transform = `translate3d(${tx}px, ${ty}px, 0px)`;
|
||||
}
|
||||
};
|
||||
const setTransition = duration => {
|
||||
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
||||
transformElements.forEach(el => {
|
||||
el.style.transitionDuration = `${duration}ms`;
|
||||
});
|
||||
effectVirtualTransitionEnd({
|
||||
swiper,
|
||||
duration,
|
||||
transformElements,
|
||||
allSlides: true
|
||||
});
|
||||
};
|
||||
effectInit({
|
||||
effect: 'fade',
|
||||
swiper,
|
||||
on,
|
||||
setTranslate,
|
||||
setTransition,
|
||||
overwriteParams: () => ({
|
||||
slidesPerView: 1,
|
||||
slidesPerGroup: 1,
|
||||
watchSlidesProgress: true,
|
||||
spaceBetween: 0,
|
||||
virtualTranslate: !swiper.params.cssMode
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export { EffectFade as default };
|
||||
16
node_modules/swiper/modules/effect-flip-element.css
generated
vendored
Normal file
16
node_modules/swiper/modules/effect-flip-element.css
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
.swiper.swiper-flip {
|
||||
overflow: visible;
|
||||
}
|
||||
.swiper-flip ::slotted(swiper-slide) {
|
||||
pointer-events: none;
|
||||
backface-visibility: hidden;
|
||||
z-index: 1;
|
||||
}
|
||||
.swiper-flip ::slotted(swiper-slide) ::slotted(swiper-slide) {
|
||||
pointer-events: none;
|
||||
}
|
||||
.swiper-flip ::slotted(.swiper-slide-active),
|
||||
.swiper-flip ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active) {
|
||||
pointer-events: auto;
|
||||
}
|
||||
/* Flip slide shadows start *//* Flip slide shadows end */
|
||||
1
node_modules/swiper/modules/effect-flip-element.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-flip-element.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper.swiper-flip{overflow:visible}.swiper-flip ::slotted(swiper-slide){backface-visibility:hidden;pointer-events:none;z-index:1}.swiper-flip ::slotted(swiper-slide) ::slotted(swiper-slide){pointer-events:none}.swiper-flip ::slotted(.swiper-slide-active),.swiper-flip ::slotted(.swiper-slide-active) ::slotted(.swiper-slide-active){pointer-events:auto}
|
||||
30
node_modules/swiper/modules/effect-flip.css
generated
vendored
Normal file
30
node_modules/swiper/modules/effect-flip.css
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
.swiper.swiper-flip {
|
||||
overflow: visible;
|
||||
}
|
||||
.swiper-flip {
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
backface-visibility: hidden;
|
||||
z-index: 1;
|
||||
.swiper-slide {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
.swiper-slide-active {
|
||||
&,
|
||||
& .swiper-slide-active {
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Flip slide shadows start */
|
||||
.swiper-flip {
|
||||
.swiper-slide-shadow-flip.swiper-slide-shadow-top,
|
||||
.swiper-slide-shadow-flip.swiper-slide-shadow-bottom,
|
||||
.swiper-slide-shadow-flip.swiper-slide-shadow-left,
|
||||
.swiper-slide-shadow-flip.swiper-slide-shadow-right {
|
||||
z-index: 0;
|
||||
backface-visibility: hidden;
|
||||
}
|
||||
}
|
||||
/* Flip slide shadows end */
|
||||
1
node_modules/swiper/modules/effect-flip.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-flip.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper.swiper-flip{overflow:visible}.swiper-flip{.swiper-slide{backface-visibility:hidden;pointer-events:none;z-index:1;.swiper-slide{pointer-events:none}}.swiper-slide-active{&,& .swiper-slide-active{pointer-events:auto}}}.swiper-flip{.swiper-slide-shadow-flip.swiper-slide-shadow-bottom,.swiper-slide-shadow-flip.swiper-slide-shadow-left,.swiper-slide-shadow-flip.swiper-slide-shadow-right,.swiper-slide-shadow-flip.swiper-slide-shadow-top{backface-visibility:hidden;z-index:0}}
|
||||
2
node_modules/swiper/modules/effect-flip.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/effect-flip.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{c as createShadow}from"../shared/create-shadow.min.mjs";import{e as effectInit}from"../shared/effect-init.min.mjs";import{e as effectTarget}from"../shared/effect-target.min.mjs";import{e as effectVirtualTransitionEnd}from"../shared/effect-virtual-transition-end.min.mjs";import{g as getSlideTransformEl,a as getRotateFix}from"../shared/utils.min.mjs";function EffectFlip({swiper:e,extendParams:t,on:s}){t({flipEffect:{slideShadows:!0,limitRotation:!0}});const a=(t,s)=>{let a=e.isHorizontal()?t.querySelector(".swiper-slide-shadow-left"):t.querySelector(".swiper-slide-shadow-top"),r=e.isHorizontal()?t.querySelector(".swiper-slide-shadow-right"):t.querySelector(".swiper-slide-shadow-bottom");a||(a=createShadow("flip",t,e.isHorizontal()?"left":"top")),r||(r=createShadow("flip",t,e.isHorizontal()?"right":"bottom")),a&&(a.style.opacity=Math.max(-s,0)),r&&(r.style.opacity=Math.max(s,0))};effectInit({effect:"flip",swiper:e,on:s,setTranslate:()=>{const{slides:t,rtlTranslate:s}=e,r=e.params.flipEffect,i=getRotateFix(e);for(let o=0;o<t.length;o+=1){const l=t[o];let f=l.progress;e.params.flipEffect.limitRotation&&(f=Math.max(Math.min(l.progress,1),-1));const n=l.swiperSlideOffset;let p=-180*f,d=0,m=e.params.cssMode?-n-e.translate:-n,c=0;e.isHorizontal()?s&&(p=-p):(c=m,m=0,d=-p,p=0),l.style.zIndex=-Math.abs(Math.round(f))+t.length,r.slideShadows&&a(l,f);const h=`translate3d(${m}px, ${c}px, 0px) rotateX(${i(d)}deg) rotateY(${i(p)}deg)`;effectTarget(r,l).style.transform=h}},setTransition:t=>{const s=e.slides.map(e=>getSlideTransformEl(e));s.forEach(e=>{e.style.transitionDuration=`${t}ms`,e.querySelectorAll(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").forEach(e=>{e.style.transitionDuration=`${t}ms`})}),effectVirtualTransitionEnd({swiper:e,duration:t,transformElements:s})},recreateShadows:()=>{e.params.flipEffect,e.slides.forEach(t=>{let s=t.progress;e.params.flipEffect.limitRotation&&(s=Math.max(Math.min(t.progress,1),-1)),a(t,s)})},getEffectParams:()=>e.params.flipEffect,perspective:()=>!0,overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}export{EffectFlip as default};
|
||||
//# sourceMappingURL=effect-flip.min.mjs.map
|
||||
1
node_modules/swiper/modules/effect-flip.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/effect-flip.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"effect-flip.mjs.mjs","names":["createShadow","effectInit","effectTarget","effectVirtualTransitionEnd","getSlideTransformEl","getRotateFix","EffectFlip","swiper","extendParams","on","flipEffect","slideShadows","limitRotation","createSlideShadows","slideEl","progress","shadowBefore","isHorizontal","querySelector","shadowAfter","style","opacity","Math","max","effect","setTranslate","slides","rtlTranslate","rtl","params","rotateFix","i","length","min","offset","swiperSlideOffset","rotateY","rotateX","tx","cssMode","translate","ty","zIndex","abs","round","transform","setTransition","duration","transformElements","map","forEach","el","transitionDuration","querySelectorAll","shadowEl","recreateShadows","getEffectParams","perspective","overwriteParams","slidesPerView","slidesPerGroup","watchSlidesProgress","spaceBetween","virtualTranslate"],"sources":["0"],"mappings":"YAAcA,iBAAoB,8CACpBC,eAAkB,4CAClBC,iBAAoB,8CACpBC,+BAAkC,8DAClCC,yBAA0BC,iBAAoB,0BAE5D,SAASC,YAAWC,OAClBA,EAAMC,aACNA,EAAYC,GACZA,IAEAD,EAAa,CACXE,WAAY,CACVC,cAAc,EACdC,eAAe,KAGnB,MAAMC,EAAqB,CAACC,EAASC,KACnC,IAAIC,EAAeT,EAAOU,eAAiBH,EAAQI,cAAc,6BAA+BJ,EAAQI,cAAc,4BAClHC,EAAcZ,EAAOU,eAAiBH,EAAQI,cAAc,8BAAgCJ,EAAQI,cAAc,+BACjHF,IACHA,EAAehB,aAAa,OAAQc,EAASP,EAAOU,eAAiB,OAAS,QAE3EE,IACHA,EAAcnB,aAAa,OAAQc,EAASP,EAAOU,eAAiB,QAAU,WAE5ED,IAAcA,EAAaI,MAAMC,QAAUC,KAAKC,KAAKR,EAAU,IAC/DI,IAAaA,EAAYC,MAAMC,QAAUC,KAAKC,IAAIR,EAAU,KA+DlEd,WAAW,CACTuB,OAAQ,OACRjB,SACAE,KACAgB,aAtDmB,KACnB,MAAMC,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,SAAU,IAAK,IAEtDF,EAAmBC,EAASC,MA4D9ByC,gBAAiB,IAAMjD,EAAOsB,OAAOnB,WACrC+C,YAAa,KAAM,EACnBC,gBAAiB,KAAM,CACrBC,cAAe,EACfC,eAAgB,EAChBC,qBAAqB,EACrBC,aAAc,EACdC,kBAAmBxD,EAAOsB,OAAOU,WAGvC,QAESjC"}
|
||||
110
node_modules/swiper/modules/effect-flip.mjs
generated
vendored
Normal file
110
node_modules/swiper/modules/effect-flip.mjs
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
import { c as createShadow } from '../shared/create-shadow.mjs';
|
||||
import { e as effectInit } from '../shared/effect-init.mjs';
|
||||
import { e as effectTarget } from '../shared/effect-target.mjs';
|
||||
import { e as effectVirtualTransitionEnd } from '../shared/effect-virtual-transition-end.mjs';
|
||||
import { g as getSlideTransformEl, a as getRotateFix } from '../shared/utils.mjs';
|
||||
|
||||
function EffectFlip({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
flipEffect: {
|
||||
slideShadows: true,
|
||||
limitRotation: true
|
||||
}
|
||||
});
|
||||
const createSlideShadows = (slideEl, progress) => {
|
||||
let shadowBefore = swiper.isHorizontal() ? slideEl.querySelector('.swiper-slide-shadow-left') : slideEl.querySelector('.swiper-slide-shadow-top');
|
||||
let shadowAfter = swiper.isHorizontal() ? slideEl.querySelector('.swiper-slide-shadow-right') : slideEl.querySelector('.swiper-slide-shadow-bottom');
|
||||
if (!shadowBefore) {
|
||||
shadowBefore = createShadow('flip', slideEl, swiper.isHorizontal() ? 'left' : 'top');
|
||||
}
|
||||
if (!shadowAfter) {
|
||||
shadowAfter = createShadow('flip', slideEl, swiper.isHorizontal() ? 'right' : 'bottom');
|
||||
}
|
||||
if (shadowBefore) shadowBefore.style.opacity = Math.max(-progress, 0);
|
||||
if (shadowAfter) shadowAfter.style.opacity = Math.max(progress, 0);
|
||||
};
|
||||
const recreateShadows = () => {
|
||||
// Set shadows
|
||||
swiper.params.flipEffect;
|
||||
swiper.slides.forEach(slideEl => {
|
||||
let progress = slideEl.progress;
|
||||
if (swiper.params.flipEffect.limitRotation) {
|
||||
progress = Math.max(Math.min(slideEl.progress, 1), -1);
|
||||
}
|
||||
createSlideShadows(slideEl, progress);
|
||||
});
|
||||
};
|
||||
const setTranslate = () => {
|
||||
const {
|
||||
slides,
|
||||
rtlTranslate: rtl
|
||||
} = swiper;
|
||||
const params = swiper.params.flipEffect;
|
||||
const rotateFix = getRotateFix(swiper);
|
||||
for (let i = 0; i < slides.length; i += 1) {
|
||||
const slideEl = slides[i];
|
||||
let progress = slideEl.progress;
|
||||
if (swiper.params.flipEffect.limitRotation) {
|
||||
progress = Math.max(Math.min(slideEl.progress, 1), -1);
|
||||
}
|
||||
const offset = slideEl.swiperSlideOffset;
|
||||
const rotate = -180 * progress;
|
||||
let rotateY = rotate;
|
||||
let rotateX = 0;
|
||||
let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset;
|
||||
let ty = 0;
|
||||
if (!swiper.isHorizontal()) {
|
||||
ty = tx;
|
||||
tx = 0;
|
||||
rotateX = -rotateY;
|
||||
rotateY = 0;
|
||||
} else if (rtl) {
|
||||
rotateY = -rotateY;
|
||||
}
|
||||
slideEl.style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
|
||||
if (params.slideShadows) {
|
||||
createSlideShadows(slideEl, progress);
|
||||
}
|
||||
const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateFix(rotateX)}deg) rotateY(${rotateFix(rotateY)}deg)`;
|
||||
const targetEl = effectTarget(params, slideEl);
|
||||
targetEl.style.transform = transform;
|
||||
}
|
||||
};
|
||||
const setTransition = duration => {
|
||||
const transformElements = swiper.slides.map(slideEl => getSlideTransformEl(slideEl));
|
||||
transformElements.forEach(el => {
|
||||
el.style.transitionDuration = `${duration}ms`;
|
||||
el.querySelectorAll('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').forEach(shadowEl => {
|
||||
shadowEl.style.transitionDuration = `${duration}ms`;
|
||||
});
|
||||
});
|
||||
effectVirtualTransitionEnd({
|
||||
swiper,
|
||||
duration,
|
||||
transformElements
|
||||
});
|
||||
};
|
||||
effectInit({
|
||||
effect: 'flip',
|
||||
swiper,
|
||||
on,
|
||||
setTranslate,
|
||||
setTransition,
|
||||
recreateShadows,
|
||||
getEffectParams: () => swiper.params.flipEffect,
|
||||
perspective: () => true,
|
||||
overwriteParams: () => ({
|
||||
slidesPerView: 1,
|
||||
slidesPerGroup: 1,
|
||||
watchSlidesProgress: true,
|
||||
spaceBetween: 0,
|
||||
virtualTranslate: !swiper.params.cssMode
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
export { EffectFlip as default };
|
||||
4
node_modules/swiper/modules/free-mode-element.css
generated
vendored
Normal file
4
node_modules/swiper/modules/free-mode-element.css
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
.swiper-free-mode > .swiper-wrapper {
|
||||
transition-timing-function: ease-out;
|
||||
margin: 0 auto;
|
||||
}
|
||||
1
node_modules/swiper/modules/free-mode-element.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/free-mode-element.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper-free-mode>.swiper-wrapper{margin:0 auto;transition-timing-function:ease-out}
|
||||
4
node_modules/swiper/modules/free-mode.css
generated
vendored
Normal file
4
node_modules/swiper/modules/free-mode.css
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
.swiper-free-mode > .swiper-wrapper {
|
||||
transition-timing-function: ease-out;
|
||||
margin: 0 auto;
|
||||
}
|
||||
1
node_modules/swiper/modules/free-mode.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/free-mode.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper-free-mode>.swiper-wrapper{margin:0 auto;transition-timing-function:ease-out}
|
||||
2
node_modules/swiper/modules/free-mode.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/free-mode.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{h as now,o as elementTransitionEnd}from"../shared/utils.min.mjs";function freeMode({swiper:e,extendParams:t,emit:o,once:n}){t({freeMode:{enabled:!1,momentum:!0,momentumRatio:1,momentumBounce:!0,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:!1,minimumVelocity:.02}}),Object.assign(e,{freeMode:{onTouchStart:function(){if(e.params.cssMode)return;const t=e.getTranslate();e.setTranslate(t),e.setTransition(0),e.touchEventsData.velocities.length=0,e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})},onTouchMove:function(){if(e.params.cssMode)return;const{touchEventsData:t,touches:o}=e;0===t.velocities.length&&t.velocities.push({position:o[e.isHorizontal()?"startX":"startY"],time:t.touchStartTime}),t.velocities.push({position:o[e.isHorizontal()?"currentX":"currentY"],time:now()})},onTouchEnd:function({currentPos:t}){if(e.params.cssMode)return;const{params:s,wrapperEl:i,rtlTranslate:a,snapGrid:r,touchEventsData:l}=e,m=now()-l.touchStartTime;if(t<-e.minTranslate())e.slideTo(e.activeIndex);else if(t>-e.maxTranslate())e.slides.length<r.length?e.slideTo(r.length-1):e.slideTo(e.slides.length-1);else{if(s.freeMode.momentum){if(l.velocities.length>1){const t=l.velocities.pop(),o=l.velocities.pop(),n=t.position-o.position,i=t.time-o.time;e.velocity=n/i,e.velocity/=2,Math.abs(e.velocity)<s.freeMode.minimumVelocity&&(e.velocity=0),(i>150||now()-t.time>300)&&(e.velocity=0)}else e.velocity=0;e.velocity*=s.freeMode.momentumVelocityRatio,l.velocities.length=0;let t=1e3*s.freeMode.momentumRatio;const m=e.velocity*t;let c=e.translate+m;a&&(c=-c);let d,u=!1;const f=20*Math.abs(e.velocity)*s.freeMode.momentumBounceRatio;let p;if(c<e.maxTranslate())s.freeMode.momentumBounce?(c+e.maxTranslate()<-f&&(c=e.maxTranslate()-f),d=e.maxTranslate(),u=!0,l.allowMomentumBounce=!0):c=e.maxTranslate(),s.loop&&s.centeredSlides&&(p=!0);else if(c>e.minTranslate())s.freeMode.momentumBounce?(c-e.minTranslate()>f&&(c=e.minTranslate()+f),d=e.minTranslate(),u=!0,l.allowMomentumBounce=!0):c=e.minTranslate(),s.loop&&s.centeredSlides&&(p=!0);else if(s.freeMode.sticky){let t;for(let e=0;e<r.length;e+=1)if(r[e]>-c){t=e;break}c=Math.abs(r[t]-c)<Math.abs(r[t-1]-c)||"next"===e.swipeDirection?r[t]:r[t-1],c=-c}if(p&&n("transitionEnd",()=>{e.loopFix()}),0!==e.velocity){if(t=a?Math.abs((-c-e.translate)/e.velocity):Math.abs((c-e.translate)/e.velocity),s.freeMode.sticky){const o=Math.abs((a?-c:c)-e.translate),n=e.slidesSizesGrid[e.activeIndex];t=o<n?s.speed:o<2*n?1.5*s.speed:2.5*s.speed}}else if(s.freeMode.sticky)return void e.slideToClosest();s.freeMode.momentumBounce&&u?(e.updateProgress(d),e.setTransition(t),e.setTranslate(c),e.transitionStart(!0,e.swipeDirection),e.animating=!0,elementTransitionEnd(i,()=>{e&&!e.destroyed&&l.allowMomentumBounce&&(o("momentumBounce"),e.setTransition(s.speed),setTimeout(()=>{e.setTranslate(d),elementTransitionEnd(i,()=>{e&&!e.destroyed&&e.transitionEnd()})},0))})):e.velocity?(o("_freeModeNoMomentumRelease"),e.updateProgress(c),e.setTransition(t),e.setTranslate(c),e.transitionStart(!0,e.swipeDirection),e.animating||(e.animating=!0,elementTransitionEnd(i,()=>{e&&!e.destroyed&&e.transitionEnd()}))):e.updateProgress(c),e.updateActiveIndex(),e.updateSlidesClasses()}else{if(s.freeMode.sticky)return void e.slideToClosest();s.freeMode&&o("_freeModeNoMomentumRelease")}(!s.freeMode.momentum||m>=s.longSwipesMs)&&(o("_freeModeStaticRelease"),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses())}}}})}export{freeMode as default};
|
||||
//# sourceMappingURL=free-mode.min.mjs.map
|
||||
1
node_modules/swiper/modules/free-mode.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/free-mode.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"free-mode.mjs.mjs","names":["now","elementTransitionEnd","freeMode","swiper","extendParams","emit","once","enabled","momentum","momentumRatio","momentumBounce","momentumBounceRatio","momentumVelocityRatio","sticky","minimumVelocity","Object","assign","onTouchStart","params","cssMode","translate","getTranslate","setTranslate","setTransition","touchEventsData","velocities","length","onTouchEnd","currentPos","rtl","onTouchMove","data","touches","push","position","isHorizontal","time","touchStartTime","wrapperEl","rtlTranslate","snapGrid","timeDiff","minTranslate","slideTo","activeIndex","maxTranslate","slides","lastMoveEvent","pop","velocityEvent","distance","velocity","Math","abs","momentumDuration","momentumDistance","newPosition","afterBouncePosition","doBounce","bounceAmount","needsLoopFix","allowMomentumBounce","loop","centeredSlides","nextSlide","j","swipeDirection","loopFix","moveDistance","currentSlideSize","slidesSizesGrid","speed","slideToClosest","updateProgress","transitionStart","animating","destroyed","setTimeout","transitionEnd","updateActiveIndex","updateSlidesClasses","longSwipesMs"],"sources":["0"],"mappings":"YAAcA,SAAUC,yBAA4B,0BAEpD,SAASC,UAASC,OAChBA,EAAMC,aACNA,EAAYC,KACZA,EAAIC,KACJA,IAEAF,EAAa,CACXF,SAAU,CACRK,SAAS,EACTC,UAAU,EACVC,cAAe,EACfC,gBAAgB,EAChBC,oBAAqB,EACrBC,sBAAuB,EACvBC,QAAQ,EACRC,gBAAiB,OAgNrBC,OAAOC,OAAOb,EAAQ,CACpBD,SAAU,CACRe,aA/MJ,WACE,GAAId,EAAOe,OAAOC,QAAS,OAC3B,MAAMC,EAAYjB,EAAOkB,eACzBlB,EAAOmB,aAAaF,GACpBjB,EAAOoB,cAAc,GACrBpB,EAAOqB,gBAAgBC,WAAWC,OAAS,EAC3CvB,EAAOD,SAASyB,WAAW,CACzBC,WAAYzB,EAAO0B,IAAM1B,EAAOiB,WAAajB,EAAOiB,WAExD,E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,6BACP,GACKa,EAAOhB,SAASM,UAAYiC,GAAYvB,EAAO+D,gBAClD5E,EAAK,0BACLF,EAAOsE,iBACPtE,EAAO4E,oBACP5E,EAAO6E,sBArJT,CAuJF,IAQF,QAES9E"}
|
||||
235
node_modules/swiper/modules/free-mode.mjs
generated
vendored
Normal file
235
node_modules/swiper/modules/free-mode.mjs
generated
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
import { h as now, o as elementTransitionEnd } from '../shared/utils.mjs';
|
||||
|
||||
function freeMode({
|
||||
swiper,
|
||||
extendParams,
|
||||
emit,
|
||||
once
|
||||
}) {
|
||||
extendParams({
|
||||
freeMode: {
|
||||
enabled: false,
|
||||
momentum: true,
|
||||
momentumRatio: 1,
|
||||
momentumBounce: true,
|
||||
momentumBounceRatio: 1,
|
||||
momentumVelocityRatio: 1,
|
||||
sticky: false,
|
||||
minimumVelocity: 0.02
|
||||
}
|
||||
});
|
||||
function onTouchStart() {
|
||||
if (swiper.params.cssMode) return;
|
||||
const translate = swiper.getTranslate();
|
||||
swiper.setTranslate(translate);
|
||||
swiper.setTransition(0);
|
||||
swiper.touchEventsData.velocities.length = 0;
|
||||
swiper.freeMode.onTouchEnd({
|
||||
currentPos: swiper.rtl ? swiper.translate : -swiper.translate
|
||||
});
|
||||
}
|
||||
function onTouchMove() {
|
||||
if (swiper.params.cssMode) return;
|
||||
const {
|
||||
touchEventsData: data,
|
||||
touches
|
||||
} = swiper;
|
||||
// Velocity
|
||||
if (data.velocities.length === 0) {
|
||||
data.velocities.push({
|
||||
position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
|
||||
time: data.touchStartTime
|
||||
});
|
||||
}
|
||||
data.velocities.push({
|
||||
position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
|
||||
time: now()
|
||||
});
|
||||
}
|
||||
function onTouchEnd({
|
||||
currentPos
|
||||
}) {
|
||||
if (swiper.params.cssMode) return;
|
||||
const {
|
||||
params,
|
||||
wrapperEl,
|
||||
rtlTranslate: rtl,
|
||||
snapGrid,
|
||||
touchEventsData: data
|
||||
} = swiper;
|
||||
// Time diff
|
||||
const touchEndTime = now();
|
||||
const timeDiff = touchEndTime - data.touchStartTime;
|
||||
if (currentPos < -swiper.minTranslate()) {
|
||||
swiper.slideTo(swiper.activeIndex);
|
||||
return;
|
||||
}
|
||||
if (currentPos > -swiper.maxTranslate()) {
|
||||
if (swiper.slides.length < snapGrid.length) {
|
||||
swiper.slideTo(snapGrid.length - 1);
|
||||
} else {
|
||||
swiper.slideTo(swiper.slides.length - 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (params.freeMode.momentum) {
|
||||
if (data.velocities.length > 1) {
|
||||
const lastMoveEvent = data.velocities.pop();
|
||||
const velocityEvent = data.velocities.pop();
|
||||
const distance = lastMoveEvent.position - velocityEvent.position;
|
||||
const time = lastMoveEvent.time - velocityEvent.time;
|
||||
swiper.velocity = distance / time;
|
||||
swiper.velocity /= 2;
|
||||
if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) {
|
||||
swiper.velocity = 0;
|
||||
}
|
||||
// this implies that the user stopped moving a finger then released.
|
||||
// There would be no events with distance zero, so the last event is stale.
|
||||
if (time > 150 || now() - lastMoveEvent.time > 300) {
|
||||
swiper.velocity = 0;
|
||||
}
|
||||
} else {
|
||||
swiper.velocity = 0;
|
||||
}
|
||||
swiper.velocity *= params.freeMode.momentumVelocityRatio;
|
||||
data.velocities.length = 0;
|
||||
let momentumDuration = 1000 * params.freeMode.momentumRatio;
|
||||
const momentumDistance = swiper.velocity * momentumDuration;
|
||||
let newPosition = swiper.translate + momentumDistance;
|
||||
if (rtl) newPosition = -newPosition;
|
||||
let doBounce = false;
|
||||
let afterBouncePosition;
|
||||
const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio;
|
||||
let needsLoopFix;
|
||||
if (newPosition < swiper.maxTranslate()) {
|
||||
if (params.freeMode.momentumBounce) {
|
||||
if (newPosition + swiper.maxTranslate() < -bounceAmount) {
|
||||
newPosition = swiper.maxTranslate() - bounceAmount;
|
||||
}
|
||||
afterBouncePosition = swiper.maxTranslate();
|
||||
doBounce = true;
|
||||
data.allowMomentumBounce = true;
|
||||
} else {
|
||||
newPosition = swiper.maxTranslate();
|
||||
}
|
||||
if (params.loop && params.centeredSlides) needsLoopFix = true;
|
||||
} else if (newPosition > swiper.minTranslate()) {
|
||||
if (params.freeMode.momentumBounce) {
|
||||
if (newPosition - swiper.minTranslate() > bounceAmount) {
|
||||
newPosition = swiper.minTranslate() + bounceAmount;
|
||||
}
|
||||
afterBouncePosition = swiper.minTranslate();
|
||||
doBounce = true;
|
||||
data.allowMomentumBounce = true;
|
||||
} else {
|
||||
newPosition = swiper.minTranslate();
|
||||
}
|
||||
if (params.loop && params.centeredSlides) needsLoopFix = true;
|
||||
} else if (params.freeMode.sticky) {
|
||||
let nextSlide;
|
||||
for (let j = 0; j < snapGrid.length; j += 1) {
|
||||
if (snapGrid[j] > -newPosition) {
|
||||
nextSlide = j;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
|
||||
newPosition = snapGrid[nextSlide];
|
||||
} else {
|
||||
newPosition = snapGrid[nextSlide - 1];
|
||||
}
|
||||
newPosition = -newPosition;
|
||||
}
|
||||
if (needsLoopFix) {
|
||||
once('transitionEnd', () => {
|
||||
swiper.loopFix();
|
||||
});
|
||||
}
|
||||
// Fix duration
|
||||
if (swiper.velocity !== 0) {
|
||||
if (rtl) {
|
||||
momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
|
||||
} else {
|
||||
momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
|
||||
}
|
||||
if (params.freeMode.sticky) {
|
||||
// If freeMode.sticky is active and the user ends a swipe with a slow-velocity
|
||||
// event, then durations can be 20+ seconds to slide one (or zero!) slides.
|
||||
// It's easy to see this when simulating touch with mouse events. To fix this,
|
||||
// limit single-slide swipes to the default slide duration. This also has the
|
||||
// nice side effect of matching slide speed if the user stopped moving before
|
||||
// lifting finger or mouse vs. moving slowly before lifting the finger/mouse.
|
||||
// For faster swipes, also apply limits (albeit higher ones).
|
||||
const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate);
|
||||
const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex];
|
||||
if (moveDistance < currentSlideSize) {
|
||||
momentumDuration = params.speed;
|
||||
} else if (moveDistance < 2 * currentSlideSize) {
|
||||
momentumDuration = params.speed * 1.5;
|
||||
} else {
|
||||
momentumDuration = params.speed * 2.5;
|
||||
}
|
||||
}
|
||||
} else if (params.freeMode.sticky) {
|
||||
swiper.slideToClosest();
|
||||
return;
|
||||
}
|
||||
if (params.freeMode.momentumBounce && doBounce) {
|
||||
swiper.updateProgress(afterBouncePosition);
|
||||
swiper.setTransition(momentumDuration);
|
||||
swiper.setTranslate(newPosition);
|
||||
swiper.transitionStart(true, swiper.swipeDirection);
|
||||
swiper.animating = true;
|
||||
elementTransitionEnd(wrapperEl, () => {
|
||||
if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return;
|
||||
emit('momentumBounce');
|
||||
swiper.setTransition(params.speed);
|
||||
setTimeout(() => {
|
||||
swiper.setTranslate(afterBouncePosition);
|
||||
elementTransitionEnd(wrapperEl, () => {
|
||||
if (!swiper || swiper.destroyed) return;
|
||||
swiper.transitionEnd();
|
||||
});
|
||||
}, 0);
|
||||
});
|
||||
} else if (swiper.velocity) {
|
||||
emit('_freeModeNoMomentumRelease');
|
||||
swiper.updateProgress(newPosition);
|
||||
swiper.setTransition(momentumDuration);
|
||||
swiper.setTranslate(newPosition);
|
||||
swiper.transitionStart(true, swiper.swipeDirection);
|
||||
if (!swiper.animating) {
|
||||
swiper.animating = true;
|
||||
elementTransitionEnd(wrapperEl, () => {
|
||||
if (!swiper || swiper.destroyed) return;
|
||||
swiper.transitionEnd();
|
||||
});
|
||||
}
|
||||
} else {
|
||||
swiper.updateProgress(newPosition);
|
||||
}
|
||||
swiper.updateActiveIndex();
|
||||
swiper.updateSlidesClasses();
|
||||
} else if (params.freeMode.sticky) {
|
||||
swiper.slideToClosest();
|
||||
return;
|
||||
} else if (params.freeMode) {
|
||||
emit('_freeModeNoMomentumRelease');
|
||||
}
|
||||
if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) {
|
||||
emit('_freeModeStaticRelease');
|
||||
swiper.updateProgress();
|
||||
swiper.updateActiveIndex();
|
||||
swiper.updateSlidesClasses();
|
||||
}
|
||||
}
|
||||
Object.assign(swiper, {
|
||||
freeMode: {
|
||||
onTouchStart,
|
||||
onTouchMove,
|
||||
onTouchEnd
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export { freeMode as default };
|
||||
7
node_modules/swiper/modules/grid-element.css
generated
vendored
Normal file
7
node_modules/swiper/modules/grid-element.css
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.swiper-grid > .swiper-wrapper {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.swiper-grid-column > .swiper-wrapper {
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
}
|
||||
1
node_modules/swiper/modules/grid-element.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/grid-element.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-direction:column;flex-wrap:wrap}
|
||||
7
node_modules/swiper/modules/grid.css
generated
vendored
Normal file
7
node_modules/swiper/modules/grid.css
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.swiper-grid > .swiper-wrapper {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.swiper-grid-column > .swiper-wrapper {
|
||||
flex-wrap: wrap;
|
||||
flex-direction: column;
|
||||
}
|
||||
1
node_modules/swiper/modules/grid.min.css
generated
vendored
Normal file
1
node_modules/swiper/modules/grid.min.css
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-direction:column;flex-wrap:wrap}
|
||||
2
node_modules/swiper/modules/grid.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/grid.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
function Grid({swiper:e,extendParams:i,on:r}){let a,t,s,l;i({grid:{rows:1,fill:"column"}});const o=()=>{let i=e.params.spaceBetween;return"string"==typeof i&&i.indexOf("%")>=0?i=parseFloat(i.replace("%",""))/100*e.size:"string"==typeof i&&(i=parseFloat(i)),i};r("init",()=>{l=e.params.grid&&e.params.grid.rows>1}),r("update",()=>{const{params:i,el:r}=e,a=i.grid&&i.grid.rows>1;l&&!a?(r.classList.remove(`${i.containerModifierClass}grid`,`${i.containerModifierClass}grid-column`),s=1,e.emitContainerClasses()):!l&&a&&(r.classList.add(`${i.containerModifierClass}grid`),"column"===i.grid.fill&&r.classList.add(`${i.containerModifierClass}grid-column`),e.emitContainerClasses()),l=a}),e.grid={initSlides:i=>{const{slidesPerView:r}=e.params,{rows:l,fill:o}=e.params.grid,n=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:i.length;s=Math.floor(n/l),a=Math.floor(n/l)===n/l?n:Math.ceil(n/l)*l,"auto"!==r&&"row"===o&&(a=Math.max(a,r*l)),t=a/l},unsetSlides:()=>{e.slides&&e.slides.forEach(i=>{i.swiperSlideGridSet&&(i.style.height="",i.style[e.getDirectionLabel("margin-top")]="")})},updateSlide:(i,r,l)=>{const{slidesPerGroup:n}=e.params,d=o(),{rows:p,fill:c}=e.params.grid,g=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:l.length;let u,h,m;if("row"===c&&n>1){const e=Math.floor(i/(n*p)),t=i-p*n*e,s=0===e?n:Math.min(Math.ceil((g-e*p*n)/p),n);m=Math.floor(t/s),h=t-m*s+e*n,u=h+m*a/p,r.style.order=u}else"column"===c?(h=Math.floor(i/p),m=i-h*p,(h>s||h===s&&m===p-1)&&(m+=1,m>=p&&(m=0,h+=1))):(m=Math.floor(i/t),h=i-m*t);r.row=m,r.column=h,r.style.height=`calc((100% - ${(p-1)*d}px) / ${p})`,r.style[e.getDirectionLabel("margin-top")]=0!==m?d&&`${d}px`:"",r.swiperSlideGridSet=!0},updateWrapperSize:(i,r)=>{const{centeredSlides:t,roundLengths:s}=e.params,l=o(),{rows:n}=e.params.grid;if(e.virtualSize=(i+l)*a,e.virtualSize=Math.ceil(e.virtualSize/n)-l,e.params.cssMode||(e.wrapperEl.style[e.getDirectionLabel("width")]=`${e.virtualSize+l}px`),t){const i=[];for(let a=0;a<r.length;a+=1){let t=r[a];s&&(t=Math.floor(t)),r[a]<e.virtualSize+r[0]&&i.push(t)}r.splice(0,r.length),r.push(...i)}}}}export{Grid as default};
|
||||
//# sourceMappingURL=grid.min.mjs.map
|
||||
1
node_modules/swiper/modules/grid.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/grid.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"grid.mjs.mjs","names":["Grid","swiper","extendParams","on","slidesNumberEvenToRows","slidesPerRow","numFullColumns","wasMultiRow","grid","rows","fill","getSpaceBetween","spaceBetween","params","indexOf","parseFloat","replace","size","el","isMultiRow","classList","remove","containerModifierClass","emitContainerClasses","add","initSlides","slides","slidesPerView","slidesLength","virtual","enabled","length","Math","floor","ceil","max","unsetSlides","forEach","slide","swiperSlideGridSet","style","height","getDirectionLabel","updateSlide","i","slidesPerGroup","newSlideOrderIndex","column","row","groupIndex","slideIndexInGroup","columnsInGroup","min","order","updateWrapperSize","slideSize","snapGrid","centeredSlides","roundLengths","virtualSize","cssMode","wrapperEl","newSlidesGrid","slidesGridItem","push","splice"],"sources":["0"],"mappings":"AAAA,SAASA,MAAKC,OACZA,EAAMC,aACNA,EAAYC,GACZA,IAQA,IAAIC,EACAC,EACAC,EACAC,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GACxG0B,EAAMC,oBAAqB,GAuD3Be,kBArDwB,CAACC,EAAWC,KACpC,MAAMC,eACJA,EAAcC,aACdA,GACEzD,EAAOY,OACLD,EAAeD,KACfF,KACJA,GACER,EAAOY,OAAOL,KAMlB,GALAP,EAAO0D,aAAeJ,EAAY3C,GAAgBR,EAClDH,EAAO0D,YAAc3B,KAAKE,KAAKjC,EAAO0D,YAAclD,GAAQG,EACvDX,EAAOY,OAAO+C,UACjB3D,EAAO4D,UAAUrB,MAAMvC,EAAOyC,kBAAkB,UAAY,GAAGzC,EAAO0D,YAAc/C,OAElF6C,EAAgB,CAClB,MAAMK,EAAgB,GACtB,IAAK,IAAIlB,EAAI,EAAGA,EAAIY,EAASzB,OAAQa,GAAK,EAAG,CAC3C,IAAImB,EAAiBP,EAASZ,GAC1Bc,IAAcK,EAAiB/B,KAAKC,MAAM8B,IAC1CP,EAASZ,GAAK3C,EAAO0D,YAAcH,EAAS,IAAIM,EAAcE,KAAKD,EACzE,CACAP,EAASS,OAAO,EAAGT,EAASzB,QAC5ByB,EAASQ,QAAQF,EACnB,GAgCJ,QAES9D"}
|
||||
154
node_modules/swiper/modules/grid.mjs
generated
vendored
Normal file
154
node_modules/swiper/modules/grid.mjs
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
function Grid({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
grid: {
|
||||
rows: 1,
|
||||
fill: 'column'
|
||||
}
|
||||
});
|
||||
let slidesNumberEvenToRows;
|
||||
let slidesPerRow;
|
||||
let numFullColumns;
|
||||
let wasMultiRow;
|
||||
const getSpaceBetween = () => {
|
||||
let spaceBetween = swiper.params.spaceBetween;
|
||||
if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
|
||||
spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size;
|
||||
} else if (typeof spaceBetween === 'string') {
|
||||
spaceBetween = parseFloat(spaceBetween);
|
||||
}
|
||||
return spaceBetween;
|
||||
};
|
||||
const initSlides = slides => {
|
||||
const {
|
||||
slidesPerView
|
||||
} = swiper.params;
|
||||
const {
|
||||
rows,
|
||||
fill
|
||||
} = swiper.params.grid;
|
||||
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : slides.length;
|
||||
numFullColumns = Math.floor(slidesLength / rows);
|
||||
if (Math.floor(slidesLength / rows) === slidesLength / rows) {
|
||||
slidesNumberEvenToRows = slidesLength;
|
||||
} else {
|
||||
slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows;
|
||||
}
|
||||
if (slidesPerView !== 'auto' && fill === 'row') {
|
||||
slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows);
|
||||
}
|
||||
slidesPerRow = slidesNumberEvenToRows / rows;
|
||||
};
|
||||
const unsetSlides = () => {
|
||||
if (swiper.slides) {
|
||||
swiper.slides.forEach(slide => {
|
||||
if (slide.swiperSlideGridSet) {
|
||||
slide.style.height = '';
|
||||
slide.style[swiper.getDirectionLabel('margin-top')] = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
const updateSlide = (i, slide, slides) => {
|
||||
const {
|
||||
slidesPerGroup
|
||||
} = swiper.params;
|
||||
const spaceBetween = getSpaceBetween();
|
||||
const {
|
||||
rows,
|
||||
fill
|
||||
} = swiper.params.grid;
|
||||
const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : slides.length;
|
||||
// Set slides order
|
||||
let newSlideOrderIndex;
|
||||
let column;
|
||||
let row;
|
||||
if (fill === 'row' && slidesPerGroup > 1) {
|
||||
const groupIndex = Math.floor(i / (slidesPerGroup * rows));
|
||||
const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex;
|
||||
const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup);
|
||||
row = Math.floor(slideIndexInGroup / columnsInGroup);
|
||||
column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup;
|
||||
newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows;
|
||||
slide.style.order = newSlideOrderIndex;
|
||||
} else if (fill === 'column') {
|
||||
column = Math.floor(i / rows);
|
||||
row = i - column * rows;
|
||||
if (column > numFullColumns || column === numFullColumns && row === rows - 1) {
|
||||
row += 1;
|
||||
if (row >= rows) {
|
||||
row = 0;
|
||||
column += 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
row = Math.floor(i / slidesPerRow);
|
||||
column = i - row * slidesPerRow;
|
||||
}
|
||||
slide.row = row;
|
||||
slide.column = column;
|
||||
slide.style.height = `calc((100% - ${(rows - 1) * spaceBetween}px) / ${rows})`;
|
||||
slide.style[swiper.getDirectionLabel('margin-top')] = row !== 0 ? spaceBetween && `${spaceBetween}px` : '';
|
||||
slide.swiperSlideGridSet = true;
|
||||
};
|
||||
const updateWrapperSize = (slideSize, snapGrid) => {
|
||||
const {
|
||||
centeredSlides,
|
||||
roundLengths
|
||||
} = swiper.params;
|
||||
const spaceBetween = getSpaceBetween();
|
||||
const {
|
||||
rows
|
||||
} = swiper.params.grid;
|
||||
swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows;
|
||||
swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween;
|
||||
if (!swiper.params.cssMode) {
|
||||
swiper.wrapperEl.style[swiper.getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`;
|
||||
}
|
||||
if (centeredSlides) {
|
||||
const newSlidesGrid = [];
|
||||
for (let i = 0; i < snapGrid.length; i += 1) {
|
||||
let slidesGridItem = snapGrid[i];
|
||||
if (roundLengths) slidesGridItem = Math.floor(slidesGridItem);
|
||||
if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);
|
||||
}
|
||||
snapGrid.splice(0, snapGrid.length);
|
||||
snapGrid.push(...newSlidesGrid);
|
||||
}
|
||||
};
|
||||
const onInit = () => {
|
||||
wasMultiRow = swiper.params.grid && swiper.params.grid.rows > 1;
|
||||
};
|
||||
const onUpdate = () => {
|
||||
const {
|
||||
params,
|
||||
el
|
||||
} = swiper;
|
||||
const isMultiRow = params.grid && params.grid.rows > 1;
|
||||
if (wasMultiRow && !isMultiRow) {
|
||||
el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
|
||||
numFullColumns = 1;
|
||||
swiper.emitContainerClasses();
|
||||
} else if (!wasMultiRow && isMultiRow) {
|
||||
el.classList.add(`${params.containerModifierClass}grid`);
|
||||
if (params.grid.fill === 'column') {
|
||||
el.classList.add(`${params.containerModifierClass}grid-column`);
|
||||
}
|
||||
swiper.emitContainerClasses();
|
||||
}
|
||||
wasMultiRow = isMultiRow;
|
||||
};
|
||||
on('init', onInit);
|
||||
on('update', onUpdate);
|
||||
swiper.grid = {
|
||||
initSlides,
|
||||
unsetSlides,
|
||||
updateSlide,
|
||||
updateWrapperSize
|
||||
};
|
||||
}
|
||||
|
||||
export { Grid as default };
|
||||
0
node_modules/swiper/modules/hash-navigation-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/hash-navigation-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/hash-navigation-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/hash-navigation-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/hash-navigation.css
generated
vendored
Normal file
0
node_modules/swiper/modules/hash-navigation.css
generated
vendored
Normal file
0
node_modules/swiper/modules/hash-navigation.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/hash-navigation.min.css
generated
vendored
Normal file
2
node_modules/swiper/modules/hash-navigation.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/hash-navigation.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{g as getDocument,a as getWindow}from"../shared/ssr-window.esm.min.mjs";import{e as elementChildren}from"../shared/utils.min.mjs";function HashNavigation({swiper:a,extendParams:e,emit:t,on:s}){let i=!1;const n=getDocument(),r=getWindow();e({hashNavigation:{enabled:!1,replaceState:!1,watchState:!1,getSlideIndex(e,t){if(a.virtual&&a.params.virtual.enabled){const e=a.slides.find(a=>a.getAttribute("data-hash")===t);if(!e)return 0;return parseInt(e.getAttribute("data-swiper-slide-index"),10)}return a.getSlideIndex(elementChildren(a.slidesEl,`.${a.params.slideClass}[data-hash="${t}"], swiper-slide[data-hash="${t}"]`)[0])}}});const h=()=>{t("hashChange");const e=n.location.hash.replace("#",""),s=a.virtual&&a.params.virtual.enabled?a.slidesEl.querySelector(`[data-swiper-slide-index="${a.activeIndex}"]`):a.slides[a.activeIndex];if(e!==(s?s.getAttribute("data-hash"):"")){const t=a.params.hashNavigation.getSlideIndex(a,e);if(void 0===t||Number.isNaN(t))return;a.slideTo(t)}},d=()=>{if(!i||!a.params.hashNavigation.enabled)return;const e=a.virtual&&a.params.virtual.enabled?a.slidesEl.querySelector(`[data-swiper-slide-index="${a.activeIndex}"]`):a.slides[a.activeIndex],s=e?e.getAttribute("data-hash")||e.getAttribute("data-history"):"";a.params.hashNavigation.replaceState&&r.history&&r.history.replaceState?(r.history.replaceState(null,null,`#${s}`||""),t("hashSet")):(n.location.hash=s||"",t("hashSet"))};s("init",()=>{a.params.hashNavigation.enabled&&(()=>{if(!a.params.hashNavigation.enabled||a.params.history&&a.params.history.enabled)return;i=!0;const e=n.location.hash.replace("#","");if(e){const t=0,s=a.params.hashNavigation.getSlideIndex(a,e);a.slideTo(s||0,t,a.params.runCallbacksOnInit,!0)}a.params.hashNavigation.watchState&&r.addEventListener("hashchange",h)})()}),s("destroy",()=>{a.params.hashNavigation.enabled&&a.params.hashNavigation.watchState&&r.removeEventListener("hashchange",h)}),s("transitionEnd _freeModeNoMomentumRelease",()=>{i&&d()}),s("slideChange",()=>{i&&a.params.cssMode&&d()})}export{HashNavigation as default};
|
||||
//# sourceMappingURL=hash-navigation.min.mjs.map
|
||||
1
node_modules/swiper/modules/hash-navigation.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/hash-navigation.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"hash-navigation.mjs.mjs","names":["getDocument","getWindow","elementChildren","HashNavigation","swiper","extendParams","emit","on","initialized","document","window","hashNavigation","enabled","replaceState","watchState","getSlideIndex","_s","hash","virtual","params","slideWithHash","slides","find","slideEl","getAttribute","parseInt","slidesEl","slideClass","onHashChange","newHash","location","replace","activeSlideEl","querySelector","activeIndex","newIndex","Number","isNaN","slideTo","setHash","activeSlideHash","history","speed","index","runCallbacksOnInit","addEventListener","init","removeEventListener","cssMode"],"sources":["0"],"mappings":"YAAcA,iBAAkBC,cAAiB,+CACnCC,oBAAuB,0BAErC,SAASC,gBAAeC,OACtBA,EAAMC,aACNA,EAAYC,KACZA,EAAIC,GACJA,IAEA,IAAIC,GAAc,EAClB,MAAMC,EAAWT,cACXU,EAAST,YACfI,EAAa,CACXM,eAAgB,CACdC,SAAS,EACTC,cAAc,EACdC,YAAY,EACZ,aAAAC,CAAcC,EAAIC,GAChB,GAAIb,EAAOc,SAAWd,EAAOe,OAAOD,QAAQN,QAAS,CACnD,MAAMQ,EAAgBhB,EAAOiB,OAAOC,KAAKC,GAAWA,EAAQC,aAAa,eAAiBP,GAC1F,IAAKG,EAAe,OAAO,EAE3B,OADcK,SAASL,EAAcI,aAAa,2BAA4B,GAEhF,CACA,OAAOpB,EAAOW,cAAcb,gBAAgBE,EAAOsB,SAAU,IAAItB,EAAOe,OAAOQ,yBAAyBV,gCAAmCA,OAAU,GACvJ,KAGJ,MAAMW,EAAe,KACnBtB,EAAK,cACL,MAAMuB,EAAUpB,EAASqB,SAASb,KAAKc,QAAQ,IAAK,IAC9CC,EAAgB5B,EAAOc,SAAWd,EAAOe,OAAOD,QAAQN,QAAUR,EAAOsB,SAASO,cAAc,6BAA6B7B,EAAO8B,iBAAmB9B,EAAOiB,OAAOjB,EAAO8B,aAElL,GAAIL,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CrB,EAAG,2CAA4C,KACzCC,GACF+B,MAGJhC,EAAG,cAAe,KACZC,GAAeJ,EAAOe,OAAO6B,SAC/BT,KAGN,QAESpC"}
|
||||
92
node_modules/swiper/modules/hash-navigation.mjs
generated
vendored
Normal file
92
node_modules/swiper/modules/hash-navigation.mjs
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
import { g as getDocument, a as getWindow } from '../shared/ssr-window.esm.mjs';
|
||||
import { e as elementChildren } from '../shared/utils.mjs';
|
||||
|
||||
function HashNavigation({
|
||||
swiper,
|
||||
extendParams,
|
||||
emit,
|
||||
on
|
||||
}) {
|
||||
let initialized = false;
|
||||
const document = getDocument();
|
||||
const window = getWindow();
|
||||
extendParams({
|
||||
hashNavigation: {
|
||||
enabled: false,
|
||||
replaceState: false,
|
||||
watchState: false,
|
||||
getSlideIndex(_s, hash) {
|
||||
if (swiper.virtual && swiper.params.virtual.enabled) {
|
||||
const slideWithHash = swiper.slides.find(slideEl => slideEl.getAttribute('data-hash') === hash);
|
||||
if (!slideWithHash) return 0;
|
||||
const index = parseInt(slideWithHash.getAttribute('data-swiper-slide-index'), 10);
|
||||
return index;
|
||||
}
|
||||
return swiper.getSlideIndex(elementChildren(swiper.slidesEl, `.${swiper.params.slideClass}[data-hash="${hash}"], swiper-slide[data-hash="${hash}"]`)[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
const onHashChange = () => {
|
||||
emit('hashChange');
|
||||
const newHash = document.location.hash.replace('#', '');
|
||||
const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex];
|
||||
const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute('data-hash') : '';
|
||||
if (newHash !== activeSlideHash) {
|
||||
const newIndex = swiper.params.hashNavigation.getSlideIndex(swiper, newHash);
|
||||
if (typeof newIndex === 'undefined' || Number.isNaN(newIndex)) return;
|
||||
swiper.slideTo(newIndex);
|
||||
}
|
||||
};
|
||||
const setHash = () => {
|
||||
if (!initialized || !swiper.params.hashNavigation.enabled) return;
|
||||
const activeSlideEl = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${swiper.activeIndex}"]`) : swiper.slides[swiper.activeIndex];
|
||||
const activeSlideHash = activeSlideEl ? activeSlideEl.getAttribute('data-hash') || activeSlideEl.getAttribute('data-history') : '';
|
||||
if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {
|
||||
window.history.replaceState(null, null, `#${activeSlideHash}` || '');
|
||||
emit('hashSet');
|
||||
} else {
|
||||
document.location.hash = activeSlideHash || '';
|
||||
emit('hashSet');
|
||||
}
|
||||
};
|
||||
const init = () => {
|
||||
if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return;
|
||||
initialized = true;
|
||||
const hash = document.location.hash.replace('#', '');
|
||||
if (hash) {
|
||||
const speed = 0;
|
||||
const index = swiper.params.hashNavigation.getSlideIndex(swiper, hash);
|
||||
swiper.slideTo(index || 0, speed, swiper.params.runCallbacksOnInit, true);
|
||||
}
|
||||
if (swiper.params.hashNavigation.watchState) {
|
||||
window.addEventListener('hashchange', onHashChange);
|
||||
}
|
||||
};
|
||||
const destroy = () => {
|
||||
if (swiper.params.hashNavigation.watchState) {
|
||||
window.removeEventListener('hashchange', onHashChange);
|
||||
}
|
||||
};
|
||||
on('init', () => {
|
||||
if (swiper.params.hashNavigation.enabled) {
|
||||
init();
|
||||
}
|
||||
});
|
||||
on('destroy', () => {
|
||||
if (swiper.params.hashNavigation.enabled) {
|
||||
destroy();
|
||||
}
|
||||
});
|
||||
on('transitionEnd _freeModeNoMomentumRelease', () => {
|
||||
if (initialized) {
|
||||
setHash();
|
||||
}
|
||||
});
|
||||
on('slideChange', () => {
|
||||
if (initialized && swiper.params.cssMode) {
|
||||
setHash();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export { HashNavigation as default };
|
||||
0
node_modules/swiper/modules/history-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/history-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/history-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/history-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/history.css
generated
vendored
Normal file
0
node_modules/swiper/modules/history.css
generated
vendored
Normal file
0
node_modules/swiper/modules/history.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/history.min.css
generated
vendored
Normal file
2
node_modules/swiper/modules/history.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/history.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{a as getWindow}from"../shared/ssr-window.esm.min.mjs";function History({swiper:e,extendParams:t,on:a}){t({history:{enabled:!1,root:"",replaceState:!1,key:"slides",keepQuery:!1}});let s=!1,r={};const i=e=>e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,""),o=e=>{const t=getWindow();let a;a=e?new URL(e):t.location;const s=a.pathname.slice(1).split("/").filter(e=>""!==e),r=s.length;return{key:s[r-2],value:s[r-1]}},l=(t,a)=>{const r=getWindow();if(!s||!e.params.history.enabled)return;let o;o=e.params.url?new URL(e.params.url):r.location;const l=e.virtual&&e.params.virtual.enabled?e.slidesEl.querySelector(`[data-swiper-slide-index="${a}"]`):e.slides[a];let n=i(l.getAttribute("data-history"));if(e.params.history.root.length>0){let a=e.params.history.root;"/"===a[a.length-1]&&(a=a.slice(0,a.length-1)),n=`${a}/${t?`${t}/`:""}${n}`}else o.pathname.includes(t)||(n=`${t?`${t}/`:""}${n}`);e.params.history.keepQuery&&(n+=o.search);const p=r.history.state;p&&p.value===n||(e.params.history.replaceState?r.history.replaceState({value:n},null,n):r.history.pushState({value:n},null,n))},n=(t,a,s)=>{if(a)for(let r=0,o=e.slides.length;r<o;r+=1){const o=e.slides[r];if(i(o.getAttribute("data-history"))===a){const a=e.getSlideIndex(o);e.slideTo(a,t,s)}}else e.slideTo(0,t,s)},p=()=>{r=o(e.params.url),n(e.params.speed,r.value,!1)};a("init",()=>{e.params.history.enabled&&(()=>{const t=getWindow();if(e.params.history){if(!t.history||!t.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);s=!0,r=o(e.params.url),r.key||r.value?(n(0,r.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",p)):e.params.history.replaceState||t.addEventListener("popstate",p)}})()}),a("destroy",()=>{e.params.history.enabled&&(()=>{const t=getWindow();e.params.history.replaceState||t.removeEventListener("popstate",p)})()}),a("transitionEnd _freeModeNoMomentumRelease",()=>{s&&l(e.params.history.key,e.activeIndex)}),a("slideChange",()=>{s&&e.params.cssMode&&l(e.params.history.key,e.activeIndex)})}export{History as default};
|
||||
//# sourceMappingURL=history.min.mjs.map
|
||||
1
node_modules/swiper/modules/history.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/history.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"history.mjs.mjs","names":["getWindow","History","swiper","extendParams","on","history","enabled","root","replaceState","key","keepQuery","initialized","paths","slugify","text","toString","replace","getPathValues","urlOverride","window","location","URL","pathArray","pathname","slice","split","filter","part","total","length","value","setHistory","index","params","url","slide","virtual","slidesEl","querySelector","slides","getAttribute","includes","search","currentState","state","pushState","scrollToSlide","speed","runCallbacks","i","getSlideIndex","slideTo","setHistoryPopState","hashNavigation","runCallbacksOnInit","addEventListener","init","removeEventListener","destroy","activeIndex","cssMode"],"sources":["0"],"mappings":"YAAcA,cAAiB,mCAE/B,SAASC,SAAQC,OACfA,EAAMC,aACNA,EAAYC,GACZA,IAEAD,EAAa,CACXE,QAAS,CACPC,SAAS,EACTC,KAAM,GACNC,cAAc,EACdC,IAAK,SACLC,WAAW,KAGf,IAAIC,GAAc,EACdC,EAAQ,CAAC,EACb,MAAMC,EAAUC,GACPA,EAAKC,WAAWC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L,IAUvCM,KAGJtD,EAAG,2CAA4C,KACzCO,GACFoB,EAAW7B,EAAO+B,OAAO5B,QAAQI,IAAKP,EAAOyD,eAGjDvD,EAAG,cAAe,KACZO,GAAeT,EAAO+B,OAAO2B,SAC/B7B,EAAW7B,EAAO+B,OAAO5B,QAAQI,IAAKP,EAAOyD,cAGnD,QAES1D"}
|
||||
141
node_modules/swiper/modules/history.mjs
generated
vendored
Normal file
141
node_modules/swiper/modules/history.mjs
generated
vendored
Normal file
@@ -0,0 +1,141 @@
|
||||
import { a as getWindow } from '../shared/ssr-window.esm.mjs';
|
||||
|
||||
function History({
|
||||
swiper,
|
||||
extendParams,
|
||||
on
|
||||
}) {
|
||||
extendParams({
|
||||
history: {
|
||||
enabled: false,
|
||||
root: '',
|
||||
replaceState: false,
|
||||
key: 'slides',
|
||||
keepQuery: false
|
||||
}
|
||||
});
|
||||
let initialized = false;
|
||||
let paths = {};
|
||||
const slugify = text => {
|
||||
return text.toString().replace(/\s+/g, '-').replace(/[^\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, '');
|
||||
};
|
||||
const getPathValues = urlOverride => {
|
||||
const window = getWindow();
|
||||
let location;
|
||||
if (urlOverride) {
|
||||
location = new URL(urlOverride);
|
||||
} else {
|
||||
location = window.location;
|
||||
}
|
||||
const pathArray = location.pathname.slice(1).split('/').filter(part => part !== '');
|
||||
const total = pathArray.length;
|
||||
const key = pathArray[total - 2];
|
||||
const value = pathArray[total - 1];
|
||||
return {
|
||||
key,
|
||||
value
|
||||
};
|
||||
};
|
||||
const setHistory = (key, index) => {
|
||||
const window = getWindow();
|
||||
if (!initialized || !swiper.params.history.enabled) return;
|
||||
let location;
|
||||
if (swiper.params.url) {
|
||||
location = new URL(swiper.params.url);
|
||||
} else {
|
||||
location = window.location;
|
||||
}
|
||||
const slide = swiper.virtual && swiper.params.virtual.enabled ? swiper.slidesEl.querySelector(`[data-swiper-slide-index="${index}"]`) : swiper.slides[index];
|
||||
let value = slugify(slide.getAttribute('data-history'));
|
||||
if (swiper.params.history.root.length > 0) {
|
||||
let root = swiper.params.history.root;
|
||||
if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1);
|
||||
value = `${root}/${key ? `${key}/` : ''}${value}`;
|
||||
} else if (!location.pathname.includes(key)) {
|
||||
value = `${key ? `${key}/` : ''}${value}`;
|
||||
}
|
||||
if (swiper.params.history.keepQuery) {
|
||||
value += location.search;
|
||||
}
|
||||
const currentState = window.history.state;
|
||||
if (currentState && currentState.value === value) {
|
||||
return;
|
||||
}
|
||||
if (swiper.params.history.replaceState) {
|
||||
window.history.replaceState({
|
||||
value
|
||||
}, null, value);
|
||||
} else {
|
||||
window.history.pushState({
|
||||
value
|
||||
}, null, value);
|
||||
}
|
||||
};
|
||||
const scrollToSlide = (speed, value, runCallbacks) => {
|
||||
if (value) {
|
||||
for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
|
||||
const slide = swiper.slides[i];
|
||||
const slideHistory = slugify(slide.getAttribute('data-history'));
|
||||
if (slideHistory === value) {
|
||||
const index = swiper.getSlideIndex(slide);
|
||||
swiper.slideTo(index, speed, runCallbacks);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
swiper.slideTo(0, speed, runCallbacks);
|
||||
}
|
||||
};
|
||||
const setHistoryPopState = () => {
|
||||
paths = getPathValues(swiper.params.url);
|
||||
scrollToSlide(swiper.params.speed, paths.value, false);
|
||||
};
|
||||
const init = () => {
|
||||
const window = getWindow();
|
||||
if (!swiper.params.history) return;
|
||||
if (!window.history || !window.history.pushState) {
|
||||
swiper.params.history.enabled = false;
|
||||
swiper.params.hashNavigation.enabled = true;
|
||||
return;
|
||||
}
|
||||
initialized = true;
|
||||
paths = getPathValues(swiper.params.url);
|
||||
if (!paths.key && !paths.value) {
|
||||
if (!swiper.params.history.replaceState) {
|
||||
window.addEventListener('popstate', setHistoryPopState);
|
||||
}
|
||||
return;
|
||||
}
|
||||
scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit);
|
||||
if (!swiper.params.history.replaceState) {
|
||||
window.addEventListener('popstate', setHistoryPopState);
|
||||
}
|
||||
};
|
||||
const destroy = () => {
|
||||
const window = getWindow();
|
||||
if (!swiper.params.history.replaceState) {
|
||||
window.removeEventListener('popstate', setHistoryPopState);
|
||||
}
|
||||
};
|
||||
on('init', () => {
|
||||
if (swiper.params.history.enabled) {
|
||||
init();
|
||||
}
|
||||
});
|
||||
on('destroy', () => {
|
||||
if (swiper.params.history.enabled) {
|
||||
destroy();
|
||||
}
|
||||
});
|
||||
on('transitionEnd _freeModeNoMomentumRelease', () => {
|
||||
if (initialized) {
|
||||
setHistory(swiper.params.history.key, swiper.activeIndex);
|
||||
}
|
||||
});
|
||||
on('slideChange', () => {
|
||||
if (initialized && swiper.params.cssMode) {
|
||||
setHistory(swiper.params.history.key, swiper.activeIndex);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export { History as default };
|
||||
2
node_modules/swiper/modules/index.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/index.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export{default as Virtual}from"./virtual.min.mjs";export{default as Keyboard}from"./keyboard.min.mjs";export{default as Mousewheel}from"./mousewheel.min.mjs";export{default as Navigation}from"./navigation.min.mjs";export{default as Pagination}from"./pagination.min.mjs";export{default as Scrollbar}from"./scrollbar.min.mjs";export{default as Parallax}from"./parallax.min.mjs";export{default as Zoom}from"./zoom.min.mjs";export{default as Controller}from"./controller.min.mjs";export{default as A11y}from"./a11y.min.mjs";export{default as History}from"./history.min.mjs";export{default as HashNavigation}from"./hash-navigation.min.mjs";export{default as Autoplay}from"./autoplay.min.mjs";export{default as Thumbs}from"./thumbs.min.mjs";export{default as FreeMode}from"./free-mode.min.mjs";export{default as Grid}from"./grid.min.mjs";export{default as Manipulation}from"./manipulation.min.mjs";export{default as EffectFade}from"./effect-fade.min.mjs";export{default as EffectCube}from"./effect-cube.min.mjs";export{default as EffectFlip}from"./effect-flip.min.mjs";export{default as EffectCoverflow}from"./effect-coverflow.min.mjs";export{default as EffectCreative}from"./effect-creative.min.mjs";export{default as EffectCards}from"./effect-cards.min.mjs";
|
||||
//# sourceMappingURL=index.min.mjs.map
|
||||
1
node_modules/swiper/modules/index.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/index.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs.mjs","names":[],"sources":["0"],"mappings":"OAAQ,uBAAyB,2BACzB,wBAA0B,4BAC1B,0BAA4B,8BAC5B,0BAA4B,8BAC5B,0BAA4B,8BAC5B,yBAA2B,6BAC3B,wBAA0B,4BAC1B,oBAAsB,wBACtB,0BAA4B,8BAC5B,oBAAsB,wBACtB,uBAAyB,2BACzB,8BAAgC,mCAChC,wBAA0B,4BAC1B,sBAAwB,0BACxB,wBAA0B,6BAC1B,oBAAsB,wBACtB,4BAA8B,gCAC9B,0BAA4B,+BAC5B,0BAA4B,+BAC5B,0BAA4B,+BAC5B,+BAAiC,oCACjC,8BAAgC,mCAChC,2BAA6B"}
|
||||
23
node_modules/swiper/modules/index.mjs
generated
vendored
Normal file
23
node_modules/swiper/modules/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
export {default as Virtual} from './virtual.mjs';
|
||||
export {default as Keyboard} from './keyboard.mjs';
|
||||
export {default as Mousewheel} from './mousewheel.mjs';
|
||||
export {default as Navigation} from './navigation.mjs';
|
||||
export {default as Pagination} from './pagination.mjs';
|
||||
export {default as Scrollbar} from './scrollbar.mjs';
|
||||
export {default as Parallax} from './parallax.mjs';
|
||||
export {default as Zoom} from './zoom.mjs';
|
||||
export {default as Controller} from './controller.mjs';
|
||||
export {default as A11y} from './a11y.mjs';
|
||||
export {default as History} from './history.mjs';
|
||||
export {default as HashNavigation} from './hash-navigation.mjs';
|
||||
export {default as Autoplay} from './autoplay.mjs';
|
||||
export {default as Thumbs} from './thumbs.mjs';
|
||||
export {default as FreeMode} from './free-mode.mjs';
|
||||
export {default as Grid} from './grid.mjs';
|
||||
export {default as Manipulation} from './manipulation.mjs';
|
||||
export {default as EffectFade} from './effect-fade.mjs';
|
||||
export {default as EffectCube} from './effect-cube.mjs';
|
||||
export {default as EffectFlip} from './effect-flip.mjs';
|
||||
export {default as EffectCoverflow} from './effect-coverflow.mjs';
|
||||
export {default as EffectCreative} from './effect-creative.mjs';
|
||||
export {default as EffectCards} from './effect-cards.mjs';
|
||||
0
node_modules/swiper/modules/keyboard-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/keyboard-element.css
generated
vendored
Normal file
0
node_modules/swiper/modules/keyboard-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/keyboard-element.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/keyboard.css
generated
vendored
Normal file
0
node_modules/swiper/modules/keyboard.css
generated
vendored
Normal file
0
node_modules/swiper/modules/keyboard.min.css
generated
vendored
Normal file
0
node_modules/swiper/modules/keyboard.min.css
generated
vendored
Normal file
2
node_modules/swiper/modules/keyboard.min.mjs
generated
vendored
Normal file
2
node_modules/swiper/modules/keyboard.min.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import{g as getDocument,a as getWindow}from"../shared/ssr-window.esm.min.mjs";import{d as elementParents,f as elementOffset}from"../shared/utils.min.mjs";function Keyboard({swiper:e,extendParams:t,on:n,emit:a}){const r=getDocument(),i=getWindow();function l(t){if(!e.enabled)return;const{rtlTranslate:n}=e;let l=t;l.originalEvent&&(l=l.originalEvent);const o=l.keyCode||l.charCode,s=e.params.keyboard.pageUpDown,d=s&&33===o,f=s&&34===o,m=37===o,c=39===o,p=38===o,b=40===o;if(!e.allowSlideNext&&(e.isHorizontal()&&c||e.isVertical()&&b||f))return!1;if(!e.allowSlidePrev&&(e.isHorizontal()&&m||e.isVertical()&&p||d))return!1;if(l.shiftKey||l.altKey||l.ctrlKey||l.metaKey)return;if(r.activeElement&&(r.activeElement.isContentEditable||r.activeElement.nodeName&&("input"===r.activeElement.nodeName.toLowerCase()||"textarea"===r.activeElement.nodeName.toLowerCase())))return;if(e.params.keyboard.onlyInViewport&&(d||f||m||c||p||b)){let t=!1;if(elementParents(e.el,`.${e.params.slideClass}, swiper-slide`).length>0&&0===elementParents(e.el,`.${e.params.slideActiveClass}`).length)return;const a=e.el,r=a.clientWidth,l=a.clientHeight,o=i.innerWidth,s=i.innerHeight,d=elementOffset(a);n&&(d.left-=a.scrollLeft);const f=[[d.left,d.top],[d.left+r,d.top],[d.left,d.top+l],[d.left+r,d.top+l]];for(let e=0;e<f.length;e+=1){const n=f[e];if(n[0]>=0&&n[0]<=o&&n[1]>=0&&n[1]<=s){if(0===n[0]&&0===n[1])continue;t=!0}}if(!t)return}const u=e.params.keyboard.speed;e.isHorizontal()?((d||f||m||c)&&(l.preventDefault?l.preventDefault():l.returnValue=!1),((f||c)&&!n||(d||m)&&n)&&e.slideNext(u),((d||m)&&!n||(f||c)&&n)&&e.slidePrev(u)):((d||f||p||b)&&(l.preventDefault?l.preventDefault():l.returnValue=!1),(f||b)&&e.slideNext(u),(d||p)&&e.slidePrev(u)),a("keyPress",o)}function o(){e.keyboard.enabled||(r.addEventListener("keydown",l),e.keyboard.enabled=!0)}function s(){e.keyboard.enabled&&(r.removeEventListener("keydown",l),e.keyboard.enabled=!1)}e.keyboard={enabled:!1},t({keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0,speed:void 0}}),n("init",()=>{e.params.keyboard.enabled&&o()}),n("destroy",()=>{e.keyboard.enabled&&s()}),Object.assign(e.keyboard,{enable:o,disable:s})}export{Keyboard as default};
|
||||
//# sourceMappingURL=keyboard.min.mjs.map
|
||||
1
node_modules/swiper/modules/keyboard.min.mjs.map
generated
vendored
Normal file
1
node_modules/swiper/modules/keyboard.min.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"keyboard.mjs.mjs","names":["getDocument","getWindow","elementParents","elementOffset","Keyboard","swiper","extendParams","on","emit","document","window","handle","event","enabled","rtlTranslate","rtl","e","originalEvent","kc","keyCode","charCode","pageUpDown","params","keyboard","isPageUp","isPageDown","isArrowLeft","isArrowRight","isArrowUp","isArrowDown","allowSlideNext","isHorizontal","isVertical","allowSlidePrev","shiftKey","altKey","ctrlKey","metaKey","activeElement","isContentEditable","nodeName","toLowerCase","onlyInViewport","inView","el","slideClass","length","slideActiveClass","swiperWidth","clientWidth","swiperHeight","clientHeight","windowWidth","innerWidth","windowHeight","innerHeight","swiperOffset","left","scrollLeft","swiperCoord","top","i","point","speed","preventDefault","returnValue","slideNext","slidePrev","enable","addEventListener","disable","removeEventListener","undefined","Object","assign"],"sources":["0"],"mappings":"YAAcA,iBAAkBC,cAAiB,+CACnCC,oBAAqBC,kBAAqB,0BAGxD,SAASC,UAASC,OAChBA,EAAMC,aACNA,EAAYC,GACZA,EAAEC,KACFA,IAEA,MAAMC,EAAWT,cACXU,EAAST,YAYf,SAASU,EAAOC,GACd,IAAKP,EAAOQ,QAAS,OACrB,MACEC,aAAcC,GACZV,EACJ,IAAIW,EAAIJ,EACJI,EAAEC,gBAAeD,EAAIA,EAAEC,eAC3B,MAAMC,EAAKF,EAAEG,SAAWH,EAAEI,SACpBC,EAAahB,EAAOiB,OAAOC,SAASF,WACpCG,EAAWH,GAAqB,KAAPH,EACzBO,EAAaJ,GAAqB,KAAPH,EAC3BQ,EAAqB,KAAPR,EACdS,EAAsB,KAAPT,EACfU,EAAmB,KAAPV,EACZW,EAAqB,KAAPX,EAEpB,IAAKb,EAAOyB,iBAAmBzB,EAAO0B,gBAAkBJ,GAAgBtB,EAAO2B,cAAgBH,GAAeJ,GAC5G,OAAO,EAET,IAAKpB,EAAO4B,iBAAmB5B,EAAO0B,gBAAkBL,GAAerB,EAAO2B,cAAgBJ,GAAaJ,GACzG,OAAO,EAET,GAAIR,EAAEkB,UAAYlB,EAAEmB,QAAUnB,EAAEoB,SAAWpB,EAAEqB,QAC3C,OAEF,GAAI5B,EAAS6B,gBA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,KAAkBZ,IAAQS,GAAYE,IAAgBX,IAAKV,EAAO6D,UAAUH,KAC1FvC,GAAYE,KAAiBX,IAAQU,GAAcE,IAAiBZ,IAAKV,EAAO8D,UAAUJ,MAE3FvC,GAAYC,GAAcG,GAAaC,KACrCb,EAAEgD,eAAgBhD,EAAEgD,iBAAsBhD,EAAEiD,aAAc,IAE5DxC,GAAcI,IAAaxB,EAAO6D,UAAUH,IAC5CvC,GAAYI,IAAWvB,EAAO8D,UAAUJ,IAE9CvD,EAAK,WAAYU,EAEnB,CACA,SAASkD,IACH/D,EAAOkB,SAASV,UACpBJ,EAAS4D,iBAAiB,UAAW1D,GACrCN,EAAOkB,SAASV,SAAU,EAC5B,CACA,SAASyD,IACFjE,EAAOkB,SAASV,UACrBJ,EAAS8D,oBAAoB,UAAW5D,GACxCN,EAAOkB,SAASV,SAAU,EAC5B,CAxFAR,EAAOkB,SAAW,CAChBV,SAAS,GAEXP,EAAa,CACXiB,SAAU,CACRV,SAAS,EACT6B,gBAAgB,EAChBrB,YAAY,EACZ0C,WAAOS,KAiFXjE,EAAG,OAAQ,KACLF,EAAOiB,OAAOC,SAASV,SACzBuD,MAGJ7D,EAAG,UAAW,KACRF,EAAOkB,SAASV,SAClByD,MAGJG,OAAOC,OAAOrE,EAAOkB,SAAU,CAC7B6C,SACAE,WAEJ,QAESlE"}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user