@anoki/fse-ui
Version:
FSE UI components library
193 lines (192 loc) • 7.24 kB
JavaScript
const z = [
"eventsPrefix",
"injectStyles",
"injectStylesUrls",
"modules",
"init",
"_direction",
"oneWayMovement",
"swiperElementNodeName",
"touchEventsTarget",
"initialSlide",
"_speed",
"cssMode",
"updateOnWindowResize",
"resizeObserver",
"nested",
"focusableElements",
"_enabled",
"_width",
"_height",
"preventInteractionOnTransition",
"userAgent",
"url",
"_edgeSwipeDetection",
"_edgeSwipeThreshold",
"_freeMode",
"_autoHeight",
"setWrapperSize",
"virtualTranslate",
"_effect",
"breakpoints",
"breakpointsBase",
"_spaceBetween",
"_slidesPerView",
"maxBackfaceHiddenSlides",
"_grid",
"_slidesPerGroup",
"_slidesPerGroupSkip",
"_slidesPerGroupAuto",
"_centeredSlides",
"_centeredSlidesBounds",
"_slidesOffsetBefore",
"_slidesOffsetAfter",
"normalizeSlideIndex",
"_centerInsufficientSlides",
"_watchOverflow",
"roundLengths",
"touchRatio",
"touchAngle",
"simulateTouch",
"_shortSwipes",
"_longSwipes",
"longSwipesRatio",
"longSwipesMs",
"_followFinger",
"allowTouchMove",
"_threshold",
"touchMoveStopPropagation",
"touchStartPreventDefault",
"touchStartForcePreventDefault",
"touchReleaseOnEdges",
"uniqueNavElements",
"_resistance",
"_resistanceRatio",
"_watchSlidesProgress",
"_grabCursor",
"preventClicks",
"preventClicksPropagation",
"_slideToClickedSlide",
"_loop",
"loopAdditionalSlides",
"loopAddBlankSlides",
"loopPreventsSliding",
"_rewind",
"_allowSlidePrev",
"_allowSlideNext",
"_swipeHandler",
"_noSwiping",
"noSwipingClass",
"noSwipingSelector",
"passiveListeners",
"containerModifierClass",
"slideClass",
"slideActiveClass",
"slideVisibleClass",
"slideFullyVisibleClass",
"slideNextClass",
"slidePrevClass",
"slideBlankClass",
"wrapperClass",
"lazyPreloaderClass",
"lazyPreloadPrevNext",
"runCallbacksOnInit",
"observer",
"observeParents",
"observeSlideChildren",
// modules
"a11y",
"_autoplay",
"_controller",
"coverflowEffect",
"cubeEffect",
"fadeEffect",
"flipEffect",
"creativeEffect",
"cardsEffect",
"hashNavigation",
"history",
"keyboard",
"mousewheel",
"_navigation",
"_pagination",
"parallax",
"_scrollbar",
"_thumbs",
"virtual",
"zoom",
"control"
];
function b(t) {
return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object" && !t.__swiper__;
}
function j(t, i) {
const r = ["__proto__", "constructor", "prototype"];
Object.keys(i).filter((e) => r.indexOf(e) < 0).forEach((e) => {
typeof t[e] > "u" ? t[e] = i[e] : b(i[e]) && b(t[e]) && Object.keys(i[e]).length > 0 ? i[e].__swiper__ ? t[e] = i[e] : j(t[e], i[e]) : t[e] = i[e];
});
}
function M(t) {
return t === void 0 && (t = {}), t.navigation && typeof t.navigation.nextEl > "u" && typeof t.navigation.prevEl > "u";
}
function B(t) {
return t === void 0 && (t = {}), t.pagination && typeof t.pagination.el > "u";
}
function I(t) {
return t === void 0 && (t = {}), t.scrollbar && typeof t.scrollbar.el > "u";
}
function L(t) {
t === void 0 && (t = "");
const i = t.split(" ").map((e) => e.trim()).filter((e) => !!e), r = [];
return i.forEach((e) => {
r.indexOf(e) < 0 && r.push(e);
}), r.join(" ");
}
function N(t) {
return t === void 0 && (t = ""), t ? t.includes("swiper-wrapper") ? t : `swiper-wrapper ${t}` : "swiper-wrapper";
}
function A(t) {
let {
swiper: i,
slides: r,
passedParams: e,
changedParams: o,
nextEl: s,
prevEl: a,
scrollbarEl: d,
paginationEl: c
} = t;
const h = o.filter((n) => n !== "children" && n !== "direction" && n !== "wrapperClass"), {
params: l,
pagination: p,
navigation: f,
scrollbar: v,
virtual: u,
thumbs: E
} = i;
let S, _, x, C, P, m, O, g;
o.includes("thumbs") && e.thumbs && e.thumbs.swiper && !e.thumbs.swiper.destroyed && l.thumbs && (!l.thumbs.swiper || l.thumbs.swiper.destroyed) && (S = !0), o.includes("controller") && e.controller && e.controller.control && l.controller && !l.controller.control && (_ = !0), o.includes("pagination") && e.pagination && (e.pagination.el || c) && (l.pagination || l.pagination === !1) && p && !p.el && (x = !0), o.includes("scrollbar") && e.scrollbar && (e.scrollbar.el || d) && (l.scrollbar || l.scrollbar === !1) && v && !v.el && (C = !0), o.includes("navigation") && e.navigation && (e.navigation.prevEl || a) && (e.navigation.nextEl || s) && (l.navigation || l.navigation === !1) && f && !f.prevEl && !f.nextEl && (P = !0);
const T = (n) => {
i[n] && (i[n].destroy(), n === "navigation" ? (i.isElement && (i[n].prevEl.remove(), i[n].nextEl.remove()), l[n].prevEl = void 0, l[n].nextEl = void 0, i[n].prevEl = void 0, i[n].nextEl = void 0) : (i.isElement && i[n].el.remove(), l[n].el = void 0, i[n].el = void 0));
};
o.includes("loop") && i.isElement && (l.loop && !e.loop ? m = !0 : !l.loop && e.loop ? O = !0 : g = !0), h.forEach((n) => {
if (b(l[n]) && b(e[n]))
Object.assign(l[n], e[n]), (n === "navigation" || n === "pagination" || n === "scrollbar") && "enabled" in e[n] && !e[n].enabled && T(n);
else {
const w = e[n];
(w === !0 || w === !1) && (n === "navigation" || n === "pagination" || n === "scrollbar") ? w === !1 && T(n) : l[n] = e[n];
}
}), h.includes("controller") && !_ && i.controller && i.controller.control && l.controller && l.controller.control && (i.controller.control = l.controller.control), o.includes("children") && r && u && l.virtual.enabled ? (u.slides = r, u.update(!0)) : o.includes("virtual") && u && l.virtual.enabled && (r && (u.slides = r), u.update(!0)), o.includes("children") && r && l.loop && (g = !0), S && E.init() && E.update(!0), _ && (i.controller.control = l.controller.control), x && (i.isElement && (!c || typeof c == "string") && (c = document.createElement("div"), c.classList.add("swiper-pagination"), c.part.add("pagination"), i.el.appendChild(c)), c && (l.pagination.el = c), p.init(), p.render(), p.update()), C && (i.isElement && (!d || typeof d == "string") && (d = document.createElement("div"), d.classList.add("swiper-scrollbar"), d.part.add("scrollbar"), i.el.appendChild(d)), d && (l.scrollbar.el = d), v.init(), v.updateSize(), v.setTranslate()), P && (i.isElement && ((!s || typeof s == "string") && (s = document.createElement("div"), s.classList.add("swiper-button-next"), s.innerHTML = i.hostEl.constructor.nextButtonSvg, s.part.add("button-next"), i.el.appendChild(s)), (!a || typeof a == "string") && (a = document.createElement("div"), a.classList.add("swiper-button-prev"), a.innerHTML = i.hostEl.constructor.prevButtonSvg, a.part.add("button-prev"), i.el.appendChild(a))), s && (l.navigation.nextEl = s), a && (l.navigation.prevEl = a), f.init(), f.update()), o.includes("allowSlideNext") && (i.allowSlideNext = e.allowSlideNext), o.includes("allowSlidePrev") && (i.allowSlidePrev = e.allowSlidePrev), o.includes("direction") && i.changeDirection(e.direction, !1), (m || g) && i.loopDestroy(), (O || g) && i.loopCreate(), i.update();
}
export {
B as a,
I as b,
L as d,
j as e,
b as i,
M as n,
z as p,
A as u,
N as w
};
//# sourceMappingURL=index.es463.js.map