1let windowHeight = $(window).outerHeight(); 2let windowWidth = $(window).outerWidth(); 3const headerEl = $("#header"); 4let st = window.scrollY; 5let isScrollDown = false; 6let isTwTablet = windowWidth < 1280; 7let isTwMobile = windowWidth < 1024; 8 9$(document).ready(function () { 10 windowWidth = $(window).outerWidth(); 11 windowHeight = $(window).outerHeight(); 12 isTwTablet = windowWidth < 1280; 13 isTwMobile = windowWidth < 1024; 14 isLandScape = windowHeight / windowWidth <= 1; 15 16 handleAosInit(); 17 initRootBase(); 18 19 setTimeout(() => { 20 initRootBase(); 21 }, 500); 22 23 if ($(".product-option__field").length > 0) { 24 $(".action_button").addClass("disabled"); 25 } 26 27 const optionNode = document.getElementById("totalProducts"); 28 29 if (optionNode) { 30 const config = { childList: true, subtree: true }; 31 let optionNodes = []; 32 33 const callback = function (mutationsList, observer) { 34 mutationsList.forEach((mutation) => { 35 if (mutation.type === "childList") { 36 mutation.addedNodes.forEach((addedNode) => { 37 if (addedNode.nodeType === 1 && $(addedNode).hasClass("option_product")) { 38 optionNodes = [...optionNodes, addedNode]; 39 } 40 }); 41 42 mutation.removedNodes.forEach((removedNode) => { 43 if (removedNode.nodeType === 1 && $(removedNode).hasClass("option_product")) { 44 optionNodes = optionNodes.filter((node) => node !== removedNode); 45 } 46 }); 47 if ($(".product-option__field").length > 0) { 48 if (optionNodes.length > 0) { 49 $(".action_button").removeClass("disabled"); 50 } else { 51 $(".action_button").addClass("disabled"); 52 } 53 } 54 $(".quantity").removeAttr("style"); 55 $(".quantity_opt").each(function () { 56 if ($(this).closest(".quantity").length == 0) { 57 $(this).parent().addClass("quantity"); 58 } 59 }); 60 $(".quantity") 61 .contents() 62 .each(function () { 63 if (this.nodeType === Node.TEXT_NODE) { 64 this.nodeValue = this.nodeValue.replace(/\u00A0/g, ""); 65 } 66 }); 67 } 68 }); 69 }; 70 71 const observer = new MutationObserver(callback); 72 observer.observe(optionNode, config); 73 74 $(document).on("click", "#fixedActionButton, .detail-top-btns__wrap", function (e) { 75 if ($(".action_button").hasClass("disabled") && $(e.target).hasClass("productAction__toggle") == false) { 76 alert("íì ìµì ì ì íí´ì£¼ì¸ì."); 77 } 78 }); 79 } 80 81 $(document).on("click", ".btn-history-back", function (e) { 82 e.preventDefault(); 83 if (document.referrer !== "") { 84 window.history.back(); 85 } else { 86 window.location.href = "/"; 87 } 88 }); 89}); 90 91window.addEventListener("resize", function () { 92 if (windowWidth !== $(window).outerWidth()) { 93 initRootBase(); 94 } 95 windowWidth = $(window).outerWidth(); 96 windowHeight = $(window).outerHeight(); 97 isTwTablet = windowWidth < 1280; 98 isTwMobile = windowWidth < 1024; 99 isLandScape = windowHeight / windowWidth <= 1; 100}); 101 102let rootBase = {}; 103function initRootBase() { 104 const baseHeightEl = document.createElement("div"); 105 baseHeightEl.style.height = "100vh"; 106 baseHeightEl.style.position = "absolute"; 107 baseHeightEl.style.top = "0"; 108 baseHeightEl.style.left = "0"; 109 document.body.appendChild(baseHeightEl); 110 111 const bh = baseHeightEl.offsetHeight; 112 document.body.removeChild(baseHeightEl); 113 document.documentElement.style.setProperty("--base-height", bh + "px"); 114 115 const basePadding = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--base-padding")); 116
117 const hh = $("#header").outerHeight(); 118 if (!rootBase.headerHeight) { 119 document.documentElement.style.setProperty("--header-height", hh + "px"); 120 } 121 122 const fh = $("#footer").outerHeight(); 123 document.documentElement.style.setProperty("--footer-height", fh + "px"); 124 125 const gutter = isTwTablet ? 10 : 20; 126 document.documentElement.style.setProperty("--gutter", `${gutter}px`); 127 128 const wideContent = 1820; 129 document.documentElement.style.setProperty("--wide-wrapper", wideContent + "px"); 130 131 const narrowContent = 1514; 132 document.documentElement.style.setProperty("--narrow-wrapper", narrowContent + "px"); 133 134 const narrowPadding = $(window).outerWidth() - narrowContent >= basePadding * 2 ? $(window).outerWidth() - narrowContent : basePadding * 2; 135 document.documentElement.style.setProperty("--narrow-padding", narrowPadding / 2 + "px"); 136 137 const widePadding = $(window).outerWidth() - wideContent >= basePadding * 2 ? $(window).outerWidth() - wideContent : basePadding * 2; 138 document.documentElement.style.setProperty("--wide-padding", widePadding / 2 + "px"); 139 140 const maxWidth = $(window).outerWidth() < wideContent ? $(window).outerWidth() - 40 : wideContent; 141 const columnCount = isTwTablet ? 6 : 12; 142 const containerWidth = maxWidth - gutter * (columnCount - 1); 143 144 const topBannerHeight = $(".top-banner").length > 0 ? $(".top-banner").outerHeight() : 0; 145 document.documentElement.style.setProperty("--top-banner-height", topBannerHeight + "px"); 146 147 const detailThumbHeight = $(".product-thumb").length > 0 ? $(".product-thumb").outerHeight() : 0; 148 document.documentElement.style.setProperty("--detail-thumb-height", detailThumbHeight + "px"); 149 150 for (let i = 1; i <= columnCount; i++) { 151 const columnWidth = (containerWidth / columnCount) * i + gutter * (i - 1); 152 document.documentElement.style.setProperty(`--column-${i}`, `${columnWidth}px`); 153 } 154 155 rootBase = { 156 basePadding: basePadding, 157 baseHeight: bh, 158 footerHeight: fh, 159 headerHeight: !rootBase.headerHeight ? hh : rootBase.headerHeight, 160 wideContent: wideContent, 161 narrowContent: narrowContent, 162 narrowPadding: narrowPadding, 163 widePadding: widePadding, 164 topBannerHeight: topBannerHeight, 165 detailThumbHeight: detailThumbHeight, 166 }; 167 // console.log(rootBase); 168} 169 170initRootBase(); 171 172function getTrackPosition(scrollPosition, el) { 173 const trackStart = el.offset().top; 174 const trackHeight = el.outerHeight(); 175 const trackEnd = trackStart + trackHeight; 176 const position = ((scrollPosition - trackStart) / trackHeight) * 100; 177 const per = position < 0 ? 0 : position > 100 ? 100 : position; 178 const px = scrollPosition - trackStart; 179 const isCurrent = scrollPosition >= trackStart - 5 && scrollPosition < trackEnd - 5; 180 181 return { 182 trackStart: trackStart, 183 trackHeight: trackHeight, 184 trackEnd: trackEnd, 185 position: position, 186 per: per, 187 px: px, 188 wh: windowHeight, 189 isCurrent: isCurrent, 190 el: el, 191 }; 192} 193 194let tempTimer = {}; 195 196function handleAosInit() { 197 const aosEl = $(".aos"); 198 const triggerGap = aosEl.hasClass("aos--quarter") ? windowHeight / 4 : 80; 199 const stBtm = st + $(window).outerHeight(); 200 const startTrigger = stBtm - triggerGap; 201 202 aosEl.each(function (index) { 203 const elPosition = getTrackPosition(st, $(this)); 204 const thisData = $(this).data(); 205 const thisDelay = thisData.delay ? thisData.delay : 0; 206 207 if (startTrigger >= elPosition.trackStart) { 208 if (!tempTimer[index + 1000]) { 209 tempTimer[index + 1000] = setTimeout(() => { 210 if (thisData.animation) { 211 $(this).css({ 212 animationDuration: thisData.duration + "ms", 213 animationName: thisData.animation, 214 animationFillMode: "forwards", 215 }); 216 } 217 $(this).addClass("action"); 218 }, thisDelay); 219 } 220 } else if (stBtm < elPosition.trackStart) { 221 if (tempTimer[index + 1000]) { 222 clearTimeout(tempTimer[index + 1000]); 223 delete tempTimer[index + 1000]; 224 } 225 $(this).removeAttr("style"); 226 $(this).removeClass("action"); 227 } 228 }); 229} 230 231$(window).scroll(function () { 232 st = $(window).scrollTop(); 233 handleAosInit(); 234 235 if (st > rootBase.headerHeight) { 236 headerEl.addClass("fixed"); 237 } else { 238 headerEl.removeClass("fixed"); 239 } 240}); 241 242//pc ì¼ë cart-total ì¤í¬ë¡¤ì ì¤ë¥¸ìª½ ê³ ì ì¤í¬ë¦½í¸ 243function handleScrollEvent() { 244 var cartEl = document.querySelector(".cart-container .cart-total"); 245 if (cartEl) { 246 var marginNum = 120; 247 248 if (window.innerWidth >= 1024) { 249 var scrollPosition = window.scrollY - marginNum; 250 var divElement = document.querySelector(".cart-container"); 251 252 if (divElement) { 253 var divY = divElement.getBoundingClientRect().top; 254 var divHeight = divElement.offsetHeight - marginNum;
255 var cul = Math.ceil(scrollPosition + divY - marginNum); 256 257 if (scrollPosition > cul) { 258 if (divHeight > scrollPosition) { 259 cartEl.style.top = scrollPosition - cul + "px"; 260 } else { 261 cartEl.style.top = divHeight - cul + "px"; 262 } 263 } else { 264 cartEl.style.top = ""; 265 } 266 } 267 } else { 268 cartEl.style.top = ""; 269 } 270 } 271} 272 273handleScrollEvent(); 274 275window.addEventListener("scroll", handleScrollEvent); 276window.addEventListener("resize", handleScrollEvent); 277 278$(document).ready(function () { 279 $(document).on('click', '.gnb__item.has-sub .gnb__link', function (e) { 280 e.preventDefault(); 281 const thisItem = $(this).closest('.gnb__item'); 282 if ($(thisItem).hasClass('open')) { 283 $(thisItem).removeClass('open'); 284 $('.header').removeClass('bg'); 285 } else { 286 $('.gnb__item').removeClass('open'); 287 $(thisItem).addClass('open'); 288 $('.header').addClass('bg'); 289 } 290 }); 291 292 $(document).on('click', '.gnb-mobile__item.has-sub .gnb-mobile__link', function (e) { 293 e.preventDefault(); 294 const thisItem = $(this).closest('.gnb-mobile__item'); 295 const thisChild = thisItem.find('.gnb-mobile-sub'); 296 if ($(thisItem).hasClass('open')) { 297 $(thisItem).removeClass('open'); 298 thisChild.slideUp(300); 299 } else { 300 $('.gnb-mobile__item').removeClass('open'); 301 $('.gnb-mobile-sub').slideUp(300); 302 $(thisItem).addClass('open'); 303 thisChild.slideDown(300); 304 } 305 }); 306 307 $(document).on('click', '.btn-menu', function () { 308 const isOpen = $('.header').hasClass('open'); 309 if (isOpen) { 310 $('.header').removeClass('open'); 311 } else { 312 $('.header').addClass('open'); 313 } 314 }); 315 316 $(document).on('click', function (e) { 317 if ($(e.target).closest('.gnb-mobile, .btn-menu').length == 0) { 318 $('.header').removeClass('open'); 319 } 320 }); 321 322 $(document).on('click', function (e) { 323 if ($(e.target).closest('.header').length == 0) { 324 $('.gnb__item').removeClass('open'); 325 $('.header').removeClass('bg'); 326 if ($('.header-search').is(':visible')) { 327 $('.header-search').slideUp(function () { 328 $(this).removeClass('show').css('display', ''); 329 }); 330 } 331 } 332 }); 333 334 $('.header-search input[type="text"]#keyword').attr('placeholder', 'Search'); 335 $('#search').attr('placeholder', 'Search'); 336 337 $(document).on('click', '.gnb__link--search', function (e) { 338 e.preventDefault(); 339 $('.gnb__item').removeClass('open'); 340 if (!$('.header-search').is(':visible')) { 341 $('.header-search').addClass('show').css('display', 'flex').hide().slideDown(300); 342 $('.header').addClass('bg'); 343 } else { 344 $('.header-search').slideUp(300, function () { 345 $(this).removeClass('show').css('display', ''); 346 $('.header').removeClass('bg'); 347 }); 348 } 349 }); 350 351 handleProductItemInit(); 352 setMarquee(); 353 handleResponseBg(); 354 355 $(document).on('click', '.page-btn--top', function (e) { 356 e.preventDefault(); 357 $('html, body').animate({ scrollTop: 0 }, 300); 358 }); 359 360 handleThemeInit(); 361 362 $(document).on('click', '.board-search__btn', function () { 363 const searchParams = new URLSearchParams(window.location.search); 364 const keyword = $('.board-search__form #search').val(); 365 searchParams.set('board_sort', ''); 366 searchParams.set('search_date', 'all'); 367 searchParams.set('search_key', 'subject'); 368 searchParams.set('search', keyword); 369 window.location.search = searchParams.toString(); 370 }); 371 372 $(document).on('keypress', '.board-search__form #search', function (e) { 373 if (e.which == 13) { 374 e.preventDefault(); 375 const searchParams = new URLSearchParams(window.location.search);
376 const keyword = $(this).val(); 377 searchParams.set('board_sort', ''); 378 searchParams.set('search_date', 'all'); 379 searchParams.set('search_key', 'subject'); 380 searchParams.set('search', keyword); 381 window.location.search = searchParams.toString(); 382 } 383 }); 384 385 $('.tab-section-btn').click(function (e) { 386 e.preventDefault(); 387 var tabId = $(this).data('tab'); 388 $('.tab-section-btn').removeClass('current'); 389 $(this).addClass('current'); 390 $('.tab-section').removeClass('current'); 391 $('#' + tabId).addClass('current'); 392 }); 393 394 $(document).on('click', '.top-banner__btn-close', function () { 395 $('.top-banner').remove(); 396 handleTopBanner(); 397 }); 398 399 setTimeout(() => { 400 $('input#member_id').attr('placeholder', 'ID'); 401 $('input#member_passwd').attr('placeholder', 'PASSWORD'); 402 }, 300); 403}); 404 405function handleTopBanner() { 406 const topBannerHeight = $('.top-banner').length > 0 ? $('.top-banner').outerHeight() : 0; 407 document.documentElement.style.setProperty('--top-banner-height', topBannerHeight + 'px'); 408 rootBase.topBannerHeight = topBannerHeight; 409} 410 411function handleProductItemInit() { 412 $('.prd-item').each(function () { 413 const name = $(this).find('[class*="__name"]'); 414 const nameChild = name.children(); 415 name.removeAttr('style'); 416 nameChild.removeAttr('style'); 417 setProductItemSaleRate($(this)); 418 }); 419 // handleMainPrdSliderClone(); 420} 421 422function setProductItemSaleRate(item) { 423 const priceDc = item.find('[class*="__price-dc"]'); 424 const priceOrigin = item.find('[class*="__price-origin"]'); 425 const priceNormal = item.find('[class*="__price-normal"]'); 426 const dcRateSpan = item.find('[class*="__dcrate"]').find('span'); 427 const salePrice = item.find('.price-sale'); 428 const saleText = item.find('.price-sale-text'); 429 const saleInfo = item.find('.price-sale-rate'); 430 431 const priceDepth = item.find('[class*="__price-dc"] > span > span > span').text().length > 0; 432 433 const priceEl = !priceDepth ? item.find('[class*="__price-dc"] > span') : item.find('[class*="__price-dc"] > span > span'); 434 const discountEl = !priceDepth ? item.find('[class*="__price-dc"] > span > span') : item.find('[class*="__price-dc"] > span > span > span'); 435 436 const priceText = priceEl 437 .contents() 438 .filter(function () { 439 return this.nodeType === 3; 440 }) 441 .text() 442 .trim() 443 .replace('ì', ''); 444 445 const discountText = discountEl.text().trim().replace('ìµë ', '').split('%%'); 446 447 if (discountText) { 448 const dcPrice = parseFloat(priceText.replace(/[^0-9.-]+/g, '')); 449 const normalPrice = parseFloat(priceOrigin.text().replace(/[^0-9.-]+/g, '')); 450 if (!priceText) { 451 const normalPriceText = priceNormal.find('span').text().trim().replace('ì', ''); 452 const normalPriceValue = parseFloat(normalPriceText.replace(/[^0-9.-]+/g, '')); 453 if (!isNaN(normalPriceValue) && !isNaN(normalPrice) && normalPrice > 0) { 454 const discountRate = Math.round(((normalPrice - normalPriceValue) / normalPrice) * 100); 455 if (discountRate > 0) { 456 dcRateSpan.text(discountRate); 457 dcRateSpan.parent().css('display', 'block'); 458 } else { 459 dcRateSpan.parent().remove(); 460 } 461 } 462 } else if (!isNaN(dcPrice) && !isNaN(normalPrice) && normalPrice > 0) { 463 const discountRate = Math.round(((normalPrice - dcPrice) / normalPrice) * 100); 464 if (discountRate > 0) { 465 dcRateSpan.text(discountRate); 466 dcRateSpan.parent().css('display', 'block'); 467 } else { 468 dcRateSpan.parent().remove(); 469 } 470 } 471 salePrice.text(priceText); 472 saleText.text(discountText[0]); 473 saleInfo.text('ì¶ê° ' + discountText[1]); 474 priceDc.remove(); 475 } 476} 477 478function setMarquee() { 479 $('.marquee').each(function () { 480 const marqueeContent = $(this).find('p'); 481 for (let i = 0; i < 8; i++) { 482 marqueeContent.clone().appendTo($(this)); 483 } 484 }); 485 $('.marquee p').css({ 486 animation: 'marquee 5s linear infinite', 487 }); 488} 489 490function handleThemeInit() { 491 if ($('.theme-header').length > 0) { 492 const headerTheme = $('.theme-header').data().theme; 493 const headerThemeMobile = $('.theme-header').data().themeM; 494 if (headerTheme === 'dark') { 495 $('.header').addClass('dark'); 496 } 497 if (isTwTablet && headerThemeMobile) { 498 $('.header').removeClass('dark light').addClass(headerThemeMobile); 499 } 500 } 501} 502 503function handleResponseBg() { 504 $('.rsp-bg').each(function () { 505 const bgPc = $(this).data().bgPc; 506 const bgMo = $(this).data().bgMo; 507 const BgUrl = !isTwMobile ? bgPc : bgMo; 508 $(this).css('background-image', `url(${BgUrl})`); 509 510 if ($(this).data().pcColor) { 511 const pcColor = $(this).data().pcColor; 512 const moColor = $(this).data().moColor; 513 const colorClass = !isTwMobile ? pcColor : moColor; 514 $(this).find('.key-slider__copy').addClass(colorClass); 515 516 const btnEl = $(this).find('.btn-box-angle'); 517 if (btnEl.length > 0) { 518 if (colorClass === 'dark') { 519 btnEl.removeClass('btn-box-angle--color-white'); 520 } else { 521 btnEl.addClass('btn-box-angle--color-white'); 522 } 523 } 524 } 525 }); 526} 527 528$(window).resize(function () { 529 handleResponseBg(); 530 handleThemeInit(); 531}); 532 533// $("#NAVER_CHECKOUT_STYLE").remove(); 534 535$(document).ready(function () { 536 var keyvisualSliderLength = $(".key-slider .key-slider__item").length; 537 if (keyvisualSliderLength > 1) { 538 var keyvisualSlider = new Swiper(".key-slider .key-slider__slider", { 539 slidesPerView: "auto", 540 loop: true, 541 slideActiveClass: "active", 542 slideDuplicateActiveClass: "active", 543 slidePrevClass: "prev", 544 slideNextClass: "next", 545 slideDuplicatePrevClass: "prev", 546 slideDuplicateNextClass: "next", 547 centeredSlides: true, 548 observeParents: true, 549 observer: true, 550 speed: 600,
551 autoplay: { 552 delay: 3000, 553 disableOnInteraction: false, 554 }, 555 slideToClickedSlide: true, 556 // ë¤ë¹ê²ì´ì 557 navigation: { 558 nextEl: ".key-slider .nav-next", 559 prevEl: ".key-slider .nav-prev", 560 }, 561 // ë¶ë¦¿ 562 pagination: { 563 el: ".key-slider .dots", 564 type: "bullets", 565 bulletActiveClass: "current", 566 clickable: true, 567 }, 568 on: { 569 init: function () { 570 $(".key-slider .nav").css("display", "flex"); 571 }, 572 }, 573 // í°ì¹ ë°©ì§ 574 simulateTouch: true, 575 allowTouchMove: true, 576 hashNavigation: false, 577 }); 578 } 579 580 const mainBestProductTotal = $(".main-product--best .main-product__item").length; 581 var mainBestProductSlider = new Swiper(".main-product--best .main-product__slider", { 582 slidesPerView: "auto", 583 loop: true, 584 slideActiveClass: "active", 585 slideDuplicateActiveClass: "active", 586 slidePrevClass: "prev", 587 slideNextClass: "next", 588 slideDuplicatePrevClass: "prev", 589 slideDuplicateNextClass: "next", 590 centeredSlides: true, 591 observeParents: true, 592 observer: true, 593 speed: 600, 594 autoplay: { 595 delay: 3000, 596 disableOnInteraction: false, 597 }, 598 slideToClickedSlide: true, 599 // ë¤ë¹ê²ì´ì 600 navigation: { 601 nextEl: ".sec-main-best .main-product-nav .nav-next", 602 prevEl: ".sec-main-best .main-product-nav .nav-prev", 603 }, 604 // í°ì¹ ë°©ì§ 605 simulateTouch: true, 606 allowTouchMove: true, 607 hashNavigation: false, 608 on: { 609 slideChange: function () { 610 const formattedTotal = mainBestProductTotal < 10 ? "0" + mainBestProductTotal : mainBestProductTotal; 611 $(".sec-main-best .main-product-fraction__total").text(formattedTotal); 612 const currentIndex = this.realIndex + 1; 613 const formattedIndex = currentIndex < 10 ? "0" + currentIndex : currentIndex; 614 $(".sec-main-best .main-product-fraction__current").text(formattedIndex); 615 }, 616 }, 617 breakpoints: { 618 300: { 619 spaceBetween: 20, 620 }, 621 1025: { 622 spaceBetween: 100, 623 }, 624 }, 625 }); 626 mainBestProductSlider.autoplay.stop(); 627 628 const mainNewProductTotal = $(".main-product--new .main-product__item").length; 629 var mainNewProductSlider = new Swiper(".main-product--new .main-product__slider", { 630 slidesPerView: "auto", 631 loop: true, 632 slideActiveClass: "active", 633 slideDuplicateActiveClass: "active", 634 slidePrevClass: "prev", 635 slideNextClass: "next", 636 slideDuplicatePrevClass: "prev", 637 slideDuplicateNextClass: "next", 638 centeredSlides: true, 639 observeParents: true, 640 observer: true, 641 speed: 600, 642 autoplay: { 643 delay: 3000, 644 disableOnInteraction: false, 645 }, 646 slideToClickedSlide: true, 647 // ë¤ë¹ê²ì´ì 648 navigation: { 649 nextEl: ".sec-main-new .main-product-nav .nav-next", 650 prevEl: ".sec-main-new .main-product-nav .nav-prev", 651 }, 652 // í°ì¹ ë°©ì§ 653 simulateTouch: true, 654 allowTouchMove: true, 655 hashNavigation: false, 656 on: { 657 slideChange: function () { 658 const formattedTotal = mainNewProductTotal < 10 ? "0" + mainNewProductTotal : mainNewProductTotal; 659 $(".sec-main-new .main-product-fraction__total").text(formattedTotal); 660 const currentIndex = this.realIndex + 1; 661 const formattedIndex = currentIndex < 10 ? "0" + currentIndex : currentIndex; 662 $(".sec-main-new .main-product-fraction__current").text(formattedIndex); 663 }, 664 }, 665 breakpoints: { 666 300: { 667 spaceBetween: 100, 668 }, 669 }, 670 }); 671 mainNewProductSlider.autoplay.stop(); 672 673 var mainRevieTextSlide = new Swiper(".main-review-text .main-review-text__slider", { 674 slidesPerView: "auto", 675 loop: true, 676 slideActiveClass: "active", 677 slideDuplicateActiveClass: "active", 678 slidePrevClass: "prev", 679 slideNextClass: "next", 680 slideDuplicatePrevClass: "prev", 681 slideDuplicateNextClass: "next", 682 centeredSlides: true, 683 observeParents: true, 684 observer: true, 685 speed: 1200, 686 direction: "vertical", 687 slideToClickedSlide: true, 688 // í°ì¹ ë°©ì§ 689 simulateTouch: false, 690 allowTouchMove: false, 691 hashNavigation: false, 692 }); 693 var mainRevieImgSlide = new Swiper(".main-review-img .main-review-img__slider", { 694 slidesPerView: "auto", 695 loop: true, 696 slideActiveClass: "active", 697 slideDuplicateActiveClass: "active", 698 slidePrevClass: "prev", 699 slideNextClass: "next", 700 slideDuplicatePrevClass: "prev", 701 slideDuplicateNextClass: "next", 702 centeredSlides: true, 703 observeParents: true, 704 observer: true, 705 speed: 1200, 706 707 direction: "vertical", 708 slideToClickedSlide: true, 709 // í°ì¹ ë°©ì§ 710 simulateTouch: true, 711 allowTouchMove: true, 712 hashNavigation: false, 713 mousewheel: { 714 invert: false, 715 }, 716 // ë¶ë¦¿ 717 pagination: { 718 el: ".sec-main-review__col .slider-dots", 719 type: "bullets", 720 bulletActiveClass: "current", 721 clickable: true, 722 }, 723 breakpoints: { 724 300: { 725 spaceBetween: 20, 726 }, 727 }, 728 }); 729 730 mainRevieTextSlide.controller.control = mainRevieImgSlide; 731 mainRevieImgSlide.controller.control = mainRevieTextSlide; 732 733 var mainBannerSlider = new Swiper(".main-banner .main-banner__slider", { 734 slidesPerView: "auto", 735 loop: true, 736 slideActiveClass: "active", 737 slideDuplicateActiveClass: "du_active", 738 slidePrevClass: "prev", 739 slideNextClass: "next", 740 slideDuplicatePrevClass: "prev", 741 slideDuplicateNextClass: "next", 742 centeredSlides: true, 743 observeParents: true, 744 observer: true, 745 speed: 600,
746 autoplay: { 747 delay: 3000, 748 disableOnInteraction: false, 749 }, 750 // ë¶ë¦¿ 751 pagination: { 752 el: ".main-banner .dots", 753 type: "bullets", 754 bulletActiveClass: "current", 755 clickable: true, 756 }, 757 // í°ì¹ ë°©ì§ 758 simulateTouch: true, 759 allowTouchMove: true, 760 hashNavigation: false, 761 }); 762 763 var propducDetailThumbLength = $(".product-thumb .product-thumb__item").length; 764 if (propducDetailThumbLength > 1) { 765 var productDetailThumbSlider = new Swiper(".product-thumb .product-thumb__slider", { 766 slidesPerView: "auto", 767 loop: true, 768 slideActiveClass: "active", 769 slideDuplicateActiveClass: "active", 770 slidePrevClass: "prev", 771 slideNextClass: "next", 772 slideDuplicatePrevClass: "prev", 773 slideDuplicateNextClass: "next", 774 centeredSlides: true, 775 observeParents: true, 776 observer: true, 777 speed: 600, 778 autoplay: { 779 delay: 3000, 780 disableOnInteraction: false, 781 }, 782 // autoHeight: true, 783 // ë¶ë¦¿ 784 pagination: { 785 el: ".product-thumb .dots", 786 type: "bullets", 787 bulletActiveClass: "current", 788 clickable: true, 789 }, 790 // í°ì¹ ë°©ì§ 791 simulateTouch: true, 792 allowTouchMove: true, 793 hashNavigation: false, 794 breakpoints: { 795 300: { 796 spaceBetween: 1, 797 }, 798 }, 799 }); 800 } 801}); 802 803$(document).ready(function () { 804 var urlParams = new URLSearchParams(window.location.search); 805 var paramPage = urlParams.get("page"); 806 var paramBoardSort = urlParams.get("board_sort"); 807 var paramSearch = urlParams.get("search"); 808 var paramSearchDate = urlParams.get("search_date"); 809 var paramSearchKey = urlParams.get("search_key"); 810 var paramCategoryNo = urlParams.get("category_no"); 811 812 function updateHrefWithParams(href) { 813 if (href) { 814 var newHref = new URL(href, window.location.origin); 815 if (paramPage) newHref.searchParams.set("page", paramPage); 816 if (paramBoardSort) newHref.searchParams.set("board_sort", paramBoardSort); 817 if (paramSearch) newHref.searchParams.set("search", paramSearch); 818 if (paramSearchDate) newHref.searchParams.set("search_date", paramSearchDate); 819 if (paramSearchKey) newHref.searchParams.set("search_key", paramSearchKey); 820 if (paramCategoryNo) newHref.searchParams.set("category_no", paramCategoryNo); 821 return newHref.toString(); 822 } 823 return href; 824 } 825 826 if (paramPage || paramBoardSort || paramSearch || paramSearchDate || paramSearchKey || paramCategoryNo) { 827 $(".board-table__item a").each(function () { 828 var href = $(this).attr("href"); 829 $(this).attr("href", updateHrefWithParams(href)); 830 }); 831 } 832 833 var btnBoardList = $(".btn-board-list"); 834 var btnHref = btnBoardList.attr("href"); 835 var previousUrl = document.referrer; 836 837 if (previousUrl) { 838 previousPath = new URL(previousUrl).pathname; 839 var isSameOrigin = new URL(previousUrl).origin === window.location.origin; 840 if (isSameOrigin) { 841 btnHref = previousPath; 842 } 843 } 844 if ((paramPage || paramBoardSort || paramSearch || paramSearchDate || paramSearchKey || paramCategoryNo) && btnBoardList.length) { 845 btnBoardList.attr("href", updateHrefWithParams(btnHref)); 846 } else { 847 btnBoardList.attr("href", btnHref); 848 } 849}); 850 851/** 852 * Swiper 8.4.7 853 * Most modern mobile touch slider and framework with hardware accelerated transitions 854 * https://swiperjs.com 855 * 856 * Copyright 2014-2023 Vladimir Kharlampidi 857 * 858 * Released under the MIT License 859 * 860 * Released on: January 30, 2023 861 */ 862 863!(function (e, t) { 864 "object" == typeof exports && "undefined" != typeof module 865 ? (module.exports = t()) 866 : "function" == typeof define && define.amd 867 ? define(t) 868 : ((e = "undefined" != typeof globalThis ? globalThis : e || self).Swiper = t()); 869})(this, function () { 870 "use strict"; 871 function e(e) { 872 return null !== e && "object" == typeof e && "constructor" in e && e.constructor === Object; 873 } 874 function t(s, a) { 875 void 0 === s && (s = {}), 876 void 0 === a && (a = {}),
877 Object.keys(a).forEach((i) => { 878 void 0 === s[i] ? (s[i] = a[i]) : e(a[i]) && e(s[i]) && Object.keys(a[i]).length > 0 && t(s[i], a[i]); 879 }); 880 } 881 const s = { 882 body: {}, 883 addEventListener() {}, 884 removeEventListener() {}, 885 activeElement: { blur() {}, nodeName: "" }, 886 querySelector: () => null, 887 querySelectorAll: () => [], 888 getElementById: () => null, 889 createEvent: () => ({ initEvent() {} }), 890 createElement: () => ({ children: [], childNodes: [], style: {}, setAttribute() {}, getElementsByTagName: () => [] }), 891 createElementNS: () => ({}), 892 importNode: () => null, 893 location: { hash: "", host: "", hostname: "", href: "", origin: "", pathname: "", protocol: "", search: "" }, 894 }; 895 function a() { 896 const e = "undefined" != typeof document ? document : {}; 897 return t(e, s), e; 898 } 899 const i = { 900 document: s, 901 navigator: { userAgent: "" }, 902 location: { hash: "", host: "", hostname: "", href: "", origin: "", pathname: "", protocol: "", search: "" }, 903 history: { replaceState() {}, pushState() {}, go() {}, back() {} }, 904 CustomEvent: function () { 905 return this; 906 }, 907 addEventListener() {}, 908 removeEventListener() {}, 909 getComputedStyle: () => ({ getPropertyValue: () => "" }), 910 Image() {}, 911 Date() {}, 912 screen: {}, 913 setTimeout() {}, 914 clearTimeout() {}, 915 matchMedia: () => ({}), 916 requestAnimationFrame: (e) => ("undefined" == typeof setTimeout ? (e(), null) : setTimeout(e, 0)), 917 cancelAnimationFrame(e) { 918 "undefined" != typeof setTimeout && clearTimeout(e); 919 }, 920 }; 921 function r() { 922 const e = "undefined" != typeof window ? window : {}; 923 return t(e, i), e; 924 } 925 class n extends Array { 926 constructor(e) { 927 "number" == typeof e 928 ? super(e) 929 : (super(...(e || [])), 930 (function (e) { 931 const t = e.__proto__; 932 Object.defineProperty(e, "__proto__", { 933 get: () => t, 934 set(e) { 935 t.__proto__ = e; 936 }, 937 }); 938 })(this)); 939 } 940 } 941 function l(e) { 942 void 0 === e && (e = []); 943 const t = []; 944 return ( 945 e.forEach((e) => { 946 Array.isArray(e) ? t.push(...l(e)) : t.push(e); 947 }), 948 t 949 ); 950 } 951 function o(e, t) { 952 return Array.prototype.filter.call(e, t); 953 } 954 function d(e, t) { 955 const s = r(), 956 i = a(); 957 let l = []; 958 if (!t && e instanceof n) return e; 959 if (!e) return new n(l); 960 if ("string" == typeof e) { 961 const s = e.trim(); 962 if (s.indexOf("<") >= 0 && s.indexOf(">") >= 0) { 963 let e = "div"; 964 0 === s.indexOf("<li") && (e = "ul"), 965 0 === s.indexOf("<tr") && (e = "tbody"), 966 (0 !== s.indexOf("<td") && 0 !== s.indexOf("<th")) || (e = "tr"), 967 0 === s.indexOf("<tbody") && (e = "table"), 968 0 === s.indexOf("<option") && (e = "select"); 969 const t = i.createElement(e); 970 t.innerHTML = s; 971 for (let e = 0; e < t.childNodes.length; e += 1) l.push(t.childNodes[e]); 972 } else 973 l = (function (e, t) { 974 if ("string" != typeof e) return [e]; 975 const s = [], 976 a = t.querySelectorAll(e); 977 for (let e = 0; e < a.length; e += 1) s.push(a[e]); 978 return s; 979 })(e.trim(), t || i); 980 } else if (e.nodeType || e === s || e === i) l.push(e); 981 else if (Array.isArray(e)) { 982 if (e instanceof n) return e; 983 l = e; 984 } 985 return new n( 986 (function (e) { 987 const t = []; 988 for (let s = 0; s < e.length; s += 1) -1 === t.indexOf(e[s]) && t.push(e[s]); 989 return t; 990 })(l) 991 ); 992 } 993 d.fn = n.prototype; 994 const c = { 995 addClass: function () { 996 for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++) t[s] = arguments[s]; 997 const a = l(t.map((e) => e.split(" "))); 998 return ( 999 this.forEach((e) => { 1000 e.classList.add(...a); 1001 }), 1002 this 1003 ); 1004 }, 1005 removeClass: function () { 1006 for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++) t[s] = arguments[s]; 1007 const a = l(t.map((e) => e.split(" "))); 1008 return ( 1009 this.forEach((e) => { 1010 e.classList.remove(...a); 1011 }), 1012 this 1013 ); 1014 }, 1015 hasClass: function () { 1016 for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++) t[s] = arguments[s]; 1017 const a = l(t.map((e) => e.split(" "))); 1018 return o(this, (e) => a.filter((t) => e.classList.contains(t)).length > 0).length > 0; 1019 }, 1020 toggleClass: function () { 1021 for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++) t[s] = arguments[s]; 1022 const a = l(t.map((e) => e.split(" "))); 1023 this.forEach((e) => { 1024 a.forEach((t) => { 1025 e.classList.toggle(t); 1026 }); 1027 }); 1028 }, 1029 attr: function (e, t) { 1030 if (1 === arguments.length && "string" == typeof e) return this[0] ? this[0].getAttribute(e) : void 0; 1031 for (let s = 0; s < this.length; s += 1) 1032 if (2 === arguments.length) this[s].setAttribute(e, t); 1033 else for (const t in e) (this[s][t] = e[t]), this[s].setAttribute(t, e[t]); 1034 return this; 1035 }, 1036 removeAttr: function (e) { 1037 for (let t = 0; t < this.length; t += 1) this[t].removeAttribute(e); 1038 return this; 1039 }, 1040 transform: function (e) { 1041 for (let t = 0; t < this.length; t += 1) this[t].style.transform = e; 1042 return this; 1043 }, 1044 transition: function (e) { 1045 for (let t = 0; t < this.length; t += 1) this[t].style.transitionDuration = "string" != typeof e ? `${e}ms` : e; 1046 return this; 1047 }, 1048 on: function () { 1049 for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++) t[s] = arguments[s]; 1050 let [a, i, r, n] = t; 1051 function l(e) { 1052 const t = e.target; 1053 if (!t) return; 1054 const s = e.target.dom7EventData || []; 1055 if ((s.indexOf(e) < 0 && s.unshift(e), d(t).is(i))) r.apply(t, s); 1056 else { 1057 const e = d(t).parents(); 1058 for (let t = 0; t < e.length; t += 1) d(e[t]).is(i) && r.apply(e[t], s); 1059 } 1060 } 1061 function o(e) { 1062 const t = (e && e.target && e.target.dom7EventData) || []; 1063 t.indexOf(e) < 0 && t.unshift(e), r.apply(this, t); 1064 } 1065 "function" == typeof t[1] && (([a, r, n] = t), (i = void 0)), n || (n = !1); 1066 const c = a.split(" "); 1067 let p; 1068 for (let e = 0; e < this.length; e += 1) { 1069 const t = this[e]; 1070 if (i) 1071 for (p = 0; p < c.length; p += 1) { 1072 const e = c[p]; 1073 t.dom7LiveListeners || (t.dom7LiveListeners = {}), 1074 t.dom7LiveListeners[e] || (t.dom7LiveListeners[e] = []), 1075 t.dom7LiveListeners[e].push({ listener: r, proxyListener: l }), 1076 t.addEventListener(e, l, n); 1077 } 1078 else 1079 for (p = 0; p < c.length; p += 1) { 1080 const e = c[p]; 1081 t.dom7Listeners || (t.dom7Listeners = {}), 1082 t.dom7Listeners[e] || (t.dom7Listeners[e] = []), 1083 t.dom7Listeners[e].push({ listener: r, proxyListener: o }), 1084 t.addEventListener(e, o, n); 1085 } 1086 } 1087 return this; 1088 }, 1089 off: function () { 1090 for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++) t[s] = arguments[s]; 1091 let [a, i, r, n] = t; 1092 "function" == typeof t[1] && (([a, r, n] = t), (i = void 0)), n || (n = !1); 1093 const l = a.split(" "); 1094 for (let e = 0; e < l.length; e += 1) { 1095 const t = l[e]; 1096 for (let e = 0; e < this.length; e += 1) { 1097 const s = this[e]; 1098 let a; 1099 if ((!i && s.dom7Listeners ? (a = s.dom7Listeners[t]) : i && s.dom7LiveListeners && (a = s.dom7LiveListeners[t]), a && a.length)) 1100 for (let e = a.length - 1; e >= 0; e -= 1) { 1101 const i = a[e]; 1102 (r && i.listener === r) || (r && i.listener && i.listener.dom7proxy && i.listener.dom7proxy === r) 1103 ? (s.removeEventListener(t, i.proxyListener, n), a.splice(e, 1)) 1104 : r || (s.removeEventListener(t, i.proxyListener, n), a.splice(e, 1)); 1105 } 1106 } 1107 } 1108 return this; 1109 }, 1110 trigger: function () { 1111 const e = r(); 1112 for (var t = arguments.length, s = new Array(t), a = 0; a < t; a++) s[a] = arguments[a]; 1113 const i = s[0].split(" "), 1114 n = s[1]; 1115 for (let t = 0; t < i.length; t += 1) { 1116 const a = i[t]; 1117 for (let t = 0; t < this.length; t += 1) { 1118 const i = this[t]; 1119 if (e.CustomEvent) { 1120 const t = new e.CustomEvent(a, { detail: n, bubbles: !0, cancelable: !0 }); 1121 (i.dom7EventData = s.filter((e, t) => t > 0)), i.dispatchEvent(t), (i.dom7EventData = []), delete i.dom7EventData; 1122 } 1123 } 1124 } 1125 return this; 1126 }, 1127 transitionEnd: function (e) { 1128 const t = this; 1129 return ( 1130 e && 1131 t.on("transitionend", function s(a) { 1132 a.target === this && (e.call(this, a), t.off("transitionend", s)); 1133 }), 1134 this 1135 ); 1136 }, 1137 outerWidth: function (e) { 1138 if (this.length > 0) { 1139 if (e) { 1140 const e = this.styles(); 1141 return this[0].offsetWidth + parseFloat(e.getPropertyValue("margin-right")) + parseFloat(e.getPropertyValue("margin-left")); 1142 } 1143 return this[0].offsetWidth; 1144 } 1145 return null; 1146 }, 1147 outerHeight: function (e) { 1148 if (this.length > 0) { 1149 if (e) { 1150 const e = this.styles(); 1151 return this[0].offsetHeight + parseFloat(e.getPropertyValue("margin-top")) + parseFloat(e.getPropertyValue("margin-bottom")); 1152 } 1153 return this[0].offsetHeight; 1154 } 1155 return null; 1156 }, 1157 styles: function () { 1158 const e = r(); 1159 return this[0] ? e.getComputedStyle(this[0], null) : {}; 1160 }, 1161 offset: function () { 1162 if (this.length > 0) { 1163 const e = r(), 1164 t = a(), 1165 s = this[0], 1166 i = s.getBoundingClientRect(), 1167 n = t.body, 1168 l = s.clientTop || n.clientTop || 0, 1169 o = s.clientLeft || n.clientLeft || 0, 1170 d = s === e ? e.scrollY : s.scrollTop, 1171 c = s === e ? e.scrollX : s.scrollLeft; 1172 return { top: i.top + d - l, left: i.left + c - o }; 1173 } 1174 return null; 1175 }, 1176 css: function (e, t) { 1177 const s = r(); 1178 let a; 1179 if (1 === arguments.length) { 1180 if ("string" != typeof e) { 1181 for (a = 0; a < this.length; a += 1) for (const t in e) this[a].style[t] = e[t]; 1182 return this; 1183 } 1184 if (this[0]) return s.getComputedStyle(this[0], null).getPropertyValue(e); 1185 } 1186 if (2 === arguments.length && "string" == typeof e) { 1187 for (a = 0; a < this.length; a += 1) this[a].style[e] = t; 1188 return this; 1189 } 1190 return this; 1191 }, 1192 each: function (e) { 1193 return e 1194 ? (this.forEach((t, s) => { 1195 e.apply(t, [t, s]); 1196 }), 1197 this) 1198 : this; 1199 }, 1200 html: function (e) { 1201 if (void 0 === e) return this[0] ? this[0].innerHTML : null; 1202 for (let t = 0; t < this.length; t += 1) this[t].innerHTML = e; 1203 return this; 1204 }, 1205 text: function (e) { 1206 if (void 0 === e) return this[0] ? this[0].textContent.trim() : null; 1207 for (let t = 0; t < this.length; t += 1) this[t].textContent = e; 1208 return this; 1209 }, 1210 is: function (e) { 1211 const t = r(), 1212 s = a(), 1213 i = this[0]; 1214 let l, o; 1215 if (!i || void 0 === e) return !1; 1216 if ("string" == typeof e) { 1217 if (i.matches) return i.matches(e); 1218 if (i.webkitMatchesSelector) return i.webkitMatchesSelector(e); 1219 if (i.msMatchesSelector) return i.msMatchesSelector(e); 1220 for (l = d(e), o = 0; o < l.length; o += 1) if (l[o] === i) return !0; 1221 return !1; 1222 } 1223 if (e === s) return i === s; 1224 if (e === t) return i === t; 1225 if (e.nodeType || e instanceof n) { 1226 for (l = e.nodeType ? [e] : e, o = 0; o < l.length; o += 1) if (l[o] === i) return !0; 1227 return !1; 1228 } 1229 return !1; 1230 }, 1231 index: function () { 1232 let e, 1233 t = this[0]; 1234 if (t) { 1235 for (e = 0; null !== (t = t.previousSibling); ) 1 === t.nodeType && (e += 1); 1236 return e; 1237 } 1238 }, 1239 eq: function (e) { 1240 if (void 0 === e) return this; 1241 const t = this.length; 1242 if (e > t - 1) return d([]); 1243 if (e < 0) { 1244 const s = t + e; 1245 return d(s < 0 ? [] : [this[s]]); 1246 } 1247 return d([this[e]]); 1248 }, 1249 append: function () { 1250 let e; 1251 const t = a(); 1252 for (let s = 0; s < arguments.length; s += 1) { 1253 e = s < 0 || arguments.length <= s ? void 0 : arguments[s]; 1254 for (let s = 0; s < this.length; s += 1) 1255 if ("string" == typeof e) { 1256 const a = t.createElement("div"); 1257 for (a.innerHTML = e; a.firstChild; ) this[s].appendChild(a.firstChild); 1258 } else if (e instanceof n) for (let t = 0; t < e.length; t += 1) this[s].appendChild(e[t]); 1259 else this[s].appendChild(e); 1260 } 1261 return this; 1262 }, 1263 prepend: function (e) { 1264 const t = a(); 1265 let s, i; 1266 for (s = 0; s < this.length; s += 1) 1267 if ("string" == typeof e) { 1268 const a = t.createElement("div"); 1269 for (a.innerHTML = e, i = a.childNodes.length - 1; i >= 0; i -= 1) this[s].insertBefore(a.childNodes[i], this[s].childNodes[0]); 1270 } else if (e instanceof n) for (i = 0; i < e.length; i += 1) this[s].insertBefore(e[i], this[s].childNodes[0]); 1271 else this[s].insertBefore(e, this[s].childNodes[0]); 1272 return this; 1273 }, 1274 next: function (e) { 1275 return
1275 this.length > 0 1276 ? e 1277 ? this[0].nextElementSibling && d(this[0].nextElementSibling).is(e) 1278 ? d([this[0].nextElementSibling]) 1279 : d([]) 1280 : this[0].nextElementSibling 1281 ? d([this[0].nextElementSibling]) 1282 : d([]) 1283 : d([]); 1284 }, 1285 nextAll: function (e) { 1286 const t = []; 1287 let s = this[0]; 1288 if (!s) return d([]); 1289 for (; s.nextElementSibling; ) { 1290 const a = s.nextElementSibling; 1291 e ? d(a).is(e) && t.push(a) : t.push(a), (s = a); 1292 } 1293 return d(t); 1294 }, 1295 prev: function (e) { 1296 if (this.length > 0) { 1297 const t = this[0]; 1298 return e ? (t.previousElementSibling && d(t.previousElementSibling).is(e) ? d([t.previousElementSibling]) : d([])) : t.previousElementSibling ? d([t.previousElementSibling]) : d([]); 1299 } 1300 return d([]); 1301 }, 1302 prevAll: function (e) { 1303 const t = []; 1304 let s = this[0]; 1305 if (!s) return d([]); 1306 for (; s.previousElementSibling; ) { 1307 const a = s.previousElementSibling; 1308 e ? d(a).is(e) && t.push(a) : t.push(a), (s = a); 1309 } 1310 return d(t); 1311 }, 1312 parent: function (e) { 1313 const t = []; 1314 for (let s = 0; s < this.length; s += 1) null !== this[s].parentNode && (e ? d(this[s].parentNode).is(e) && t.push(this[s].parentNode) : t.push(this[s].parentNode)); 1315 return d(t); 1316 }, 1317 parents: function (e) { 1318 const t = []; 1319 for (let s = 0; s < this.length; s += 1) { 1320 let a = this[s].parentNode; 1321 for (; a; ) e ? d(a).is(e) && t.push(a) : t.push(a), (a = a.parentNode); 1322 } 1323 return d(t); 1324 }, 1325 closest: function (e) { 1326 let t = this; 1327 return void 0 === e ? d([]) : (t.is(e) || (t = t.parents(e).eq(0)), t); 1328 }, 1329 find: function (e) { 1330 const t = []; 1331 for (let s = 0; s < this.length; s += 1) { 1332 const a = this[s].querySelectorAll(e); 1333 for (let e = 0; e < a.length; e += 1) t.push(a[e]); 1334 } 1335 return d(t); 1336 }, 1337 children: function (e) { 1338 const t = []; 1339 for (let s = 0; s < this.length; s += 1) { 1340 const a = this[s].children; 1341 for (let s = 0; s < a.length; s += 1) (e && !d(a[s]).is(e)) || t.push(a[s]); 1342 } 1343 return d(t); 1344 }, 1345 filter: function (e) { 1346 return d(o(this, e)); 1347 }, 1348 remove: function () { 1349 for (let e = 0; e < this.length; e += 1) this[e].parentNode && this[e].parentNode.removeChild(this[e]); 1350 return this; 1351 }, 1352 }; 1353 function p(e, t) { 1354 return void 0 === t && (t = 0), setTimeout(e, t); 1355 } 1356 function u() { 1357 return Date.now(); 1358 } 1359 function h(e, t) { 1360 void 0 === t && (t = "x"); 1361 const s = r(); 1362 let a, i, n; 1363 const l = (function (e) { 1364 const t = r(); 1365 let s; 1366 return t.getComputedStyle && (s = t.getComputedStyle(e, null)), !s && e.currentStyle && (s = e.currentStyle), s || (s = e.style), s; 1367 })(e); 1368 return ( 1369 s.WebKitCSSMatrix 1370 ? ((i = l.transform || l.webkitTransform), 1371 i.split(",").length > 6 && 1372 (i = i 1373 .split(", ") 1374 .map((e) => e.replace(",", ".")) 1375 .join(", ")), 1376 (n = new s.WebKitCSSMatrix("none" === i ? "" : i))) 1377 : ((n = l.MozTransform || l.OTransform || l.MsTransform || l.msTransform || l.transform || l.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,")), 1378 (a = n.toString().split(","))), 1379 "x" === t && (i = s.WebKitCSSMatrix ? n.m41 : 16 === a.length ? parseFloat(a[12]) : parseFloat(a[4])), 1380 "y" === t && (i = s.WebKitCSSMatrix ? n.m42 : 16 === a.length ? parseFloat(a[13]) : parseFloat(a[5])), 1381 i || 0 1382 ); 1383 } 1384 function m(e) { 1385 return "object" == typeof e && null !== e && e.constructor && "Object" === Object.prototype.toString.call(e).slice(8, -1); 1386 } 1387 function f(e) { 1388 return "undefined" != typeof window && void 0 !== window.HTMLElement ? e instanceof HTMLElement : e && (1 === e.nodeType || 11 === e.nodeType); 1389 } 1390 function g() { 1391 const e = Object(arguments.length <= 0 ? void 0 : arguments[0]), 1392 t = ["__proto__", "constructor", "prototype"]; 1393 for (let s = 1; s < arguments.length; s += 1) { 1394 const a = s < 0 || arguments.length <= s ? void 0 : arguments[s]; 1395 if (null != a && !f(a)) { 1396 const s = Object.keys(Object(a)).filter((e) => t.indexOf(e) < 0); 1397 for (let t = 0, i = s.length; t < i; t += 1) { 1398 const i = s[t], 1399 r = Object.getOwnPropertyDescriptor(a, i); 1400 void 0 !== r && 1401 r.enumerable && 1402 (m(e[i]) && m(a[i]) ? (a[i].__swiper__ ? (e[i] = a[i]) : g(e[i], a[i])) : !m(e[i]) && m(a[i]) ? ((e[i] = {}), a[i].__swiper__ ? (e[i] = a[i]) : g(e[i], a[i])) : (e[i] = a[i])); 1403 } 1404 } 1405 } 1406 return e; 1407 } 1408 function v(e, t, s) { 1409 e.style.setProperty(t, s); 1410 } 1411 function w(e) { 1412 let { swiper: t, targetPosition: s, side: a } = e; 1413 const i = r(), 1414 n = -t.translate; 1415 let l, 1416 o = null; 1417 const d = t.params.speed; 1418 (t.wrapperEl.style.scrollSnapType = "none"), i.cancelAnimationFrame(t.cssModeFrameID); 1419 const c = s > n ? "next" : "prev", 1420 p = (e, t) => ("next" === c && e >= t) || ("prev" === c && e <= t), 1421 u = () => { 1422 (l = new Date().getTime()), null === o && (o = l); 1423 const e = Math.max(Math.min((l - o) / d, 1), 0), 1424 r = 0.5 - Math.cos(e * Math.PI) / 2; 1425 let c = n + r * (s - n); 1426 if ((p(c, s) && (c = s), t.wrapperEl.scrollTo({ [a]: c }), p(c, s))) 1427 return ( 1428 (t.wrapperEl.style.overflow = "hidden"), 1429 (t.wrapperEl.style.scrollSnapType = ""), 1430 setTimeout(() => { 1431 (t.wrapperEl.style.overflow = ""), t.wrapperEl.scrollTo({ [a]: c }); 1432 }), 1433 void i.cancelAnimationFrame(t.cssModeFrameID) 1434 ); 1435 t.cssModeFrameID = i.requestAnimationFrame(u); 1436 }; 1437 u(); 1438 } 1439 let b, x, y; 1440 function E() { 1441 return ( 1442 b || 1443 (b = (function () { 1444 const e = r(), 1445 t = a(); 1446 return { 1447 smoothScroll: t.documentElement && "scrollBehavior" in t.documentElement.style, 1448 touch: !!("ontouchstart" in e || (e.DocumentTouch && t instanceof e.DocumentTouch)), 1449 passiveListener: (function () { 1450 let t = !1; 1451 try { 1452 const s = Object.defineProperty({}, "passive", { 1453 get() { 1454 t = !0; 1455 }, 1456 }); 1457 e.addEventListener("testPassiveListener", null, s); 1458 } catch (e) {} 1459 return t; 1460 })(), 1461 gestures: "ongesturestart" in e, 1462 }; 1463 })()), 1464 b 1465 ); 1466 } 1467 function C(e) { 1468 return ( 1469 void 0 === e && (e = {}), 1470 x || 1471 (x = (function (e) { 1472 let { userAgent: t } = void 0 === e ? {} : e; 1473 const s = E(), 1474 a = r(), 1475 i = a.navigator.platform, 1476 n = t || a.navigator.userAgent, 1477 l = { ios: !1, android: !1 }, 1478 o = a.screen.width, 1479 d = a.screen.height, 1480 c = n.match(/(Android);?[\s\/]+([\d.]+)?/); 1481 let p = n.match(/(iPad).*OS\s([\d_]+)/); 1482 const u = n.match(/(iPod)(.*OS\s([\d_]+))?/), 1483 h = !p && n.match(/(iPhone\sOS|iOS)\s([\d_]+)/), 1484 m = "Win32" === i; 1485 let f = "MacIntel" === i; 1486 return ( 1487 !p && 1488 f && 1489 s.touch && 1490 ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"].indexOf(`${o}x${d}`) >= 1491 0 && 1492 ((p = n.match(/(Version)\/([\d.]+)/)), p || (p = [0, 1, "13_0_0"]), (f = !1)), 1493 c && !m && ((l.os = "android"), (l.android = !0)), 1494 (p || h || u) && ((l.os = "ios"), (l.ios = !0)), 1495 l 1496 ); 1497 })(e)), 1498 x 1499 ); 1500 } 1501 function T() { 1502 return ( 1503 y || 1504 (y = (function () { 1505 const e = r(); 1506 return { 1507 isSafari: (function () { 1508 const t = e.navigator.userAgent.toLowerCase(); 1509 return t.indexOf("safari") >= 0 && t.indexOf("chrome") < 0 && t.indexOf("android") < 0; 1510 })(), 1511 isWebView: /(iPhone|iPod|iPad).*AppleWeb
1511Kit(?!.*Safari)/i.test(e.navigator.userAgent), 1512 }; 1513 })()), 1514 y 1515 ); 1516 } 1517 Object.keys(c).forEach((e) => { 1518 Object.defineProperty(d.fn, e, { value: c[e], writable: !0 }); 1519 }); 1520 var $ = { 1521 on(e, t, s) { 1522 const a = this; 1523 if (!a.eventsListeners || a.destroyed) return a; 1524 if ("function" != typeof t) return a; 1525 const i = s ? "unshift" : "push"; 1526 return ( 1527 e.split(" ").forEach((e) => { 1528 a.eventsListeners[e] || (a.eventsListeners[e] = []), a.eventsListeners[e][i](t); 1529 }), 1530 a 1531 ); 1532 }, 1533 once(e, t, s) { 1534 const a = this; 1535 if (!a.eventsListeners || a.destroyed) return a; 1536 if ("function" != typeof t) return a; 1537 function i() { 1538 a.off(e, i), i.__emitterProxy && delete i.__emitterProxy; 1539 for (var s = arguments.length, r = new Array(s), n = 0; n < s; n++) r[n] = arguments[n]; 1540 t.apply(a, r); 1541 } 1542 return (i.__emitterProxy = t), a.on(e, i, s); 1543 }, 1544 onAny(e, t) { 1545 const s = this; 1546 if (!s.eventsListeners || s.destroyed) return s; 1547 if ("function" != typeof e) return s; 1548 const a = t ? "unshift" : "push"; 1549 return s.eventsAnyListeners.indexOf(e) < 0 && s.eventsAnyListeners[a](e), s; 1550 }, 1551 offAny(e) { 1552 const t = this; 1553 if (!t.eventsListeners || t.destroyed) return t; 1554 if (!t.eventsAnyListeners) return t; 1555 const s = t.eventsAnyListeners.indexOf(e); 1556 return s >= 0 && t.eventsAnyListeners.splice(s, 1), t; 1557 }, 1558 off(e, t) { 1559 const s = this; 1560 return !s.eventsListeners || s.destroyed 1561 ? s 1562 : s.eventsListeners 1563 ? (e.split(" ").forEach((e) => { 1564 void 0 === t 1565 ? (s.eventsListeners[e] = []) 1566 : s.eventsListeners[e] && 1567 s.eventsListeners[e].forEach((a, i) => { 1568 (a === t || (a.__emitterProxy && a.__emitterProxy === t)) && s.eventsListeners[e].splice(i, 1); 1569 }); 1570 }), 1571 s) 1572 : s; 1573 }, 1574 emit() { 1575 const e = this; 1576 if (!e.eventsListeners || e.destroyed) return e; 1577 if (!e.eventsListeners) return e; 1578 let t, s, a; 1579 for (var i = arguments.length, r = new Array(i), n = 0; n < i; n++) r[n] = arguments[n]; 1580 "string" == typeof r[0] || Array.isArray(r[0]) ? ((t = r[0]), (s = r.slice(1, r.length)), (a = e)) : ((t = r[0].events), (s = r[0].data), (a = r[0].context || e)), s.unshift(a); 1581 return ( 1582 (Array.isArray(t) ? t : t.split(" ")).forEach((t) => { 1583 e.eventsAnyListeners && 1584 e.eventsAnyListeners.length && 1585 e.eventsAnyListeners.forEach((e) => { 1586 e.apply(a, [t, ...s]); 1587 }), 1588 e.eventsListeners && 1589 e.eventsListeners[t] && 1590 e.eventsListeners[t].forEach((e) => { 1591 e.apply(a, s); 1592 }); 1593 }), 1594 e 1595 ); 1596 }, 1597 }; 1598 var S = { 1599 updateSize: function () { 1600 const e = this; 1601 let t, s; 1602 const a = e.$el; 1603 (t = void 0 !== e.params.width && null !== e.params.width ? e.params.width : a[0].clientWidth), 1604 (s = void 0 !== e.params.height && null !== e.params.height ? e.params.height : a[0].clientHeight), 1605 (0 === t && e.isHorizontal()) || 1606 (0 === s && e.isVertical()) || 1607 ((t = t - parseInt(a.css("padding-left") || 0, 10) - parseInt(a.css("padding-right") || 0, 10)), 1608 (s = s - parseInt(a.css("padding-top") || 0, 10) - parseInt(a.css("padding-bottom") || 0, 10)), 1609 Number.isNaN(t) && (t = 0), 1610 Number.isNaN(s) && (s = 0), 1611 Object.assign(e, { width: t, height: s, size: e.isHorizontal() ? t : s })); 1612 }, 1613 updateSlides: function () { 1614 const e = this; 1615 function t(t) { 1616 return e.isHorizontal() 1617 ? t 1618 : { 1619 width: "height", 1620 "margin-top": "margin-left", 1621 "margin-bottom ": "margin-right", 1622 "margin-left": "margin-top", 1623 "margin-right": "margin-bottom", 1624 "padding-left": "padding-top", 1625 "padding-right": "padding-bottom", 1626 marginRight: "marginBottom", 1627 }[t]; 1628 } 1629 function s(e, s) { 1630 return parseFloat(e.getPropertyValue(t(s)) || 0); 1631 } 1632 const a = e.params, 1633 { $wrapperEl: i, size: r, rtlTranslate: n, wrongRTL: l } = e, 1634 o = e.virtual && a.virtual.enabled, 1635 d = o ? e.virtual.slides.length : e.slides.length, 1636 c = i.children(`.${e.params.slideClass}`), 1637 p = o ? e.virtual.slides.length : c.length; 1638 let u = []; 1639 const h = [], 1640 m = []; 1641 let f = a.slidesOffsetBefore; 1642 "function" == typeof f && (f = a.slidesOffsetBefore.call(e)); 1643 let g = a.slidesOffsetAfter; 1644 "function" == typeof g && (g = a.slidesOffsetAfter.call(e)); 1645 const w = e.snapGrid.length, 1646 b = e.slidesGrid.length; 1647 let x = a.spaceBetween, 1648 y = -f, 1649 E = 0, 1650 C = 0; 1651 if (void 0 === r) return; 1652 "string" == typeof x && x.indexOf("%") >= 0 && (x = (parseFloat(x.replace("%", "")) / 100) * r), 1653 (e.virtualSize = -x), 1654 n ? c.css({ marginLeft: "", marginBottom: "", marginTop: "" }) : c.css({ marginRight: "", marginBottom: "", marginTop: "" }), 1655 a.centeredSlides && a.cssMode && (v(e.wrapperEl, "--swiper-centered-offset-before", ""), v(e.wrapperEl, "--swiper-centered-offset-after", "")); 1656 const T = a.grid && a.grid.rows > 1 && e.grid; 1657 let $; 1658 T && e.grid.initSlides(p); 1659 const S = "auto" === a.slidesPerView && a.breakpoints && Object.keys(a.breakpoints).filter((e) => void 0 !== a.breakpoints[e].slidesPerView).length > 0; 1660 for (let i = 0; i < p; i += 1) { 1661 $ = 0; 1662 const n = c.eq(i); 1663 if ((T && e.grid.updateSlide(i, n, p, t), "none" !== n.css("display"))) { 1664 if ("auto" === a.slidesPerView) { 1665 S && (c[i].style[t("width")] = ""); 1666 const r = getComputedStyle(n[0]), 1667 l = n[0].style.transform, 1668 o = n[0].style.webkitTransform; 1669 if ((l && (n[0].style.transform = "none"), o && (n[0].style.webkitTransform = "none"), a.roundLengths)) $ = e.isHorizontal() ? n.outerWidth(!0) : n.outerHeight(!0); 1670 else { 1671 const e = s(r, "width"), 1672 t = s(r, "padding-left"), 1673 a = s(r, "padding-right"), 1674 i = s(r, "margin-left"), 1675 l = s(r, "margin-right"), 1676 o = r.getPropertyValue("box-sizing"); 1677 if (o && "border-box" === o) $ = e + i + l; 1678 else {
1679 const { clientWidth: s, offsetWidth: r } = n[0]; 1680 $ = e + t + a + i + l + (r - s); 1681 } 1682 } 1683 l && (n[0].style.transform = l), o && (n[0].style.webkitTransform = o), a.roundLengths && ($ = Math.floor($)); 1684 } else ($ = (r - (a.slidesPerView - 1) * x) / a.slidesPerView), a.roundLengths && ($ = Math.floor($)), c[i] && (c[i].style[t("width")] = `${$}px`); 1685 c[i] && (c[i].swiperSlideSize = $), 1686 m.push($), 1687 a.centeredSlides 1688 ? ((y = y + $ / 2 + E / 2 + x), 1689 0 === E && 0 !== i && (y = y - r / 2 - x), 1690 0 === i && (y = y - r / 2 - x), 1691 Math.abs(y) < 0.001 && (y = 0), 1692 a.roundLengths && (y = Math.floor(y)), 1693 C % a.slidesPerGroup == 0 && u.push(y), 1694 h.push(y)) 1695 : (a.roundLengths && (y = Math.floor(y)), (C - Math.min(e.params.slidesPerGroupSkip, C)) % e.params.slidesPerGroup == 0 && u.push(y), h.push(y), (y = y + $ + x)), 1696 (e.virtualSize += $ + x), 1697 (E = $), 1698 (C += 1); 1699 } 1700 } 1701 if ( 1702 ((e.virtualSize = Math.max(e.virtualSize, r) + g), 1703 n && l && ("slide" === a.effect || "coverflow" === a.effect) && i.css({ width: `${e.virtualSize + a.spaceBetween}px` }), 1704 a.setWrapperSize && i.css({ [t("width")]: `${e.virtualSize + a.spaceBetween}px` }), 1705 T && e.grid.updateWrapperSize($, u, t), 1706 !a.centeredSlides) 1707 ) { 1708 const t = []; 1709 for (let s = 0; s < u.length; s += 1) { 1710 let i = u[s]; 1711 a.roundLengths && (i = Math.floor(i)), u[s] <= e.virtualSize - r && t.push(i); 1712 } 1713 (u = t), Math.floor(e.virtualSize - r) - Math.floor(u[u.length - 1]) > 1 && u.push(e.virtualSize - r); 1714 } 1715 if ((0 === u.length && (u = [0]), 0 !== a.spaceBetween)) { 1716 const s = e.isHorizontal() && n ? "marginLeft" : t("marginRight"); 1717 c.filter((e, t) => !a.cssMode || t !== c.length - 1).css({ [s]: `${x}px` }); 1718 } 1719 if (a.centeredSlides && a.centeredSlidesBounds) { 1720 let e = 0; 1721 m.forEach((t) => { 1722 e += t + (a.spaceBetween ? a.spaceBetween : 0); 1723 }), 1724 (e -= a.spaceBetween); 1725 const t = e - r; 1726 u = u.map((e) => (e < 0 ? -f : e > t ? t + g : e)); 1727 } 1728 if (a.centerInsufficientSlides) { 1729 let e = 0; 1730 if ( 1731 (m.forEach((t) => { 1732 e += t + (a.spaceBetween ? a.spaceBetween : 0); 1733 }), 1734 (e -= a.spaceBetween), 1735 e < r) 1736 ) { 1737 const t = (r - e) / 2; 1738 u.forEach((e, s) => { 1739 u[s] = e - t; 1740 }), 1741 h.forEach((e, s) => { 1742 h[s] = e + t; 1743 }); 1744 } 1745 } 1746 if ((Object.assign(e, { slides: c, snapGrid: u, slidesGrid: h, slidesSizesGrid: m }), a.centeredSlides && a.cssMode && !a.centeredSlidesBounds)) { 1747 v(e.wrapperEl, "--swiper-centered-offset-before", -u[0] + "px"), v(e.wrapperEl, "--swiper-centered-offset-after", e.size / 2 - m[m.length - 1] / 2 + "px"); 1748 const t = -e.snapGrid[0], 1749 s = -e.slidesGrid[0]; 1750 (e.snapGrid = e.snapGrid.map((e) => e + t)), (e.slidesGrid = e.slidesGrid.map((e) => e + s)); 1751 } 1752 if ( 1753 (p !== d && e.emit("slidesLengthChange"), 1754 u.length !== w && (e.params.watchOverflow && e.checkOverflow(), e.emit("snapGridLengthChange")), 1755 h.length !== b && e.emit("slidesGridLengthChange"), 1756 a.watchSlidesProgress && e.updateSlidesOffset(), 1757 !(o || a.cssMode || ("slide" !== a.effect && "fade" !== a.effect))) 1758 ) { 1759 const t = `${a.containerModifierClass}backface-hidden`, 1760 s = e.$el.hasClass(t); 1761 p <= a.maxBackfaceHiddenSlides ? s || e.$el.addClass(t) : s && e.$el.removeClass(t); 1762 } 1763 }, 1764 updateAutoHeight: function (e) { 1765 const t = this, 1766 s = [], 1767 a = t.virtual && t.params.virtual.enabled; 1768 let i, 1769 r = 0; 1770 "number" == typeof e ? t.setTransition(e) : !0 === e && t.setTransition(t.params.speed); 1771 const n = (e) => (a ? t.slides.filter((t) => parseInt(t.getAttribute("data-swiper-slide-index"), 10) === e)[0] : t.slides.eq(e)[0]); 1772 if ("auto" !== t.params.slidesPerView && t.params.slidesPerView > 1) 1773 if (t.params.centeredSlides) 1774 (t.visibleSlides || d([])).each((e) => { 1775 s.push(e); 1776 }); 1777 else 1778 for (i = 0;
1778 i < Math.ceil(t.params.slidesPerView); i += 1) { 1779 const e = t.activeIndex + i; 1780 if (e > t.slides.length && !a) break; 1781 s.push(n(e)); 1782 } 1783 else s.push(n(t.activeIndex)); 1784 for (i = 0; i < s.length; i += 1) 1785 if (void 0 !== s[i]) { 1786 const e = s[i].offsetHeight; 1787 r = e > r ? e : r; 1788 } 1789 (r || 0 === r) && t.$wrapperEl.css("height", `${r}px`); 1790 }, 1791 updateSlidesOffset: function () { 1792 const e = this, 1793 t = e.slides; 1794 for (let s = 0; s < t.length; s += 1) t[s].swiperSlideOffset = e.isHorizontal() ? t[s].offsetLeft : t[s].offsetTop; 1795 }, 1796 updateSlidesProgress: function (e) { 1797 void 0 === e && (e = (this && this.translate) || 0); 1798 const t = this, 1799 s = t.params, 1800 { slides: a, rtlTranslate: i, snapGrid: r } = t; 1801 if (0 === a.length) return; 1802 void 0 === a[0].swiperSlideOffset && t.updateSlidesOffset(); 1803 let n = -e; 1804 i && (n = e), a.removeClass(s.slideVisibleClass), (t.visibleSlidesIndexes = []), (t.visibleSlides = []); 1805 for (let e = 0; e < a.length; e += 1) { 1806 const l = a[e]; 1807 let o = l.swiperSlideOffset; 1808 s.cssMode && s.centeredSlides && (o -= a[0].swiperSlideOffset); 1809 const d = (n + (s.centeredSlides ? t.minTranslate() : 0) - o) / (l.swiperSlideSize + s.spaceBetween), 1810 c = (n - r[0] + (s.centeredSlides ? t.minTranslate() : 0) - o) / (l.swiperSlideSize + s.spaceBetween), 1811 p = -(n - o), 1812 u = p + t.slidesSizesGrid[e]; 1813 ((p >= 0 && p < t.size - 1) || (u > 1 && u <= t.size) || (p <= 0 && u >= t.size)) && (t.visibleSlides.push(l), t.visibleSlidesIndexes.push(e), a.eq(e).addClass(s.slideVisibleClass)), 1814 (l.progress = i ? -d : d), 1815 (l.originalProgress = i ? -c : c); 1816 } 1817 t.visibleSlides = d(t.visibleSlides); 1818 }, 1819 updateProgress: function (e) { 1820 const t = this; 1821 if (void 0 === e) { 1822 const s = t.rtlTranslate ? -1 : 1; 1823 e = (t && t.translate && t.translate * s) || 0; 1824 } 1825 const s = t.params, 1826 a = t.maxTranslate() - t.minTranslate(); 1827 let { progress: i, isBeginning: r, isEnd: n } = t; 1828 const l = r, 1829 o = n; 1830 0 === a ? ((i = 0), (r = !0), (n = !0)) : ((i = (e - t.minTranslate()) / a), (r = i <= 0), (n = i >= 1)), 1831 Object.assign(t, { progress: i, isBeginning: r, isEnd: n }), 1832 (s.watchSlidesProgress || (s.centeredSlides && s.autoHeight)) && t.updateSlidesProgress(e), 1833 r && !l && t.emit("reachBeginning toEdge"), 1834 n && !o && t.emit("reachEnd toEdge"), 1835 ((l && !r) || (o && !n)) && t.emit("fromEdge"), 1836 t.emit("progress", i); 1837 }, 1838 updateSlidesClasses: function () { 1839 const e = this, 1840 { slides: t, params: s, $wrapperEl: a, activeIndex: i, realIndex: r } = e, 1841 n = e.virtual && s.virtual.enabled; 1842 let l; 1843 t.removeClass(`${s.slideActiveClass} ${s.slideNextClass} ${s.slidePrevClass} ${s.slideDuplicateActiveClass} ${s.slideDuplicateNextClass} ${s.slideDuplicatePrevClass}`), 1844 (l = n ? e.$wrapperEl.find(`.${s.slideClass}[data-swiper-slide-index="${i}"]`) : t.eq(i)), 1845 l.addClass(s.slideActiveClass), 1846 s.loop && 1847 (l.hasClass(s.slideDuplicateClass) 1848 ? a.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${r}"]`).addClass(s.slideDuplicateActiveClass) 1849 : a.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${r}"]`).addClass(s.slideDuplicateActiveClass)); 1850 let o = l.nextAll(`.${s.slideClass}`).eq(0).addClass(s.slideNextClass); 1851 s.loop && 0 === o.length && ((o = t.eq(0)), o.addClass(s.slideNextClass)); 1852 let d = l.prevAll(`.${s.slideClass}`).eq(0).addClass(s.slidePrevClass); 1853 s.loop && 0 === d.length && ((d = t.eq(-1)), d.addClass(s.slidePrevClass)), 1854 s.loop && 1855 (o.hasClass(s.slideDuplicateClass) 1856 ? a.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${o.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass) 1857 : a.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${o.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass), 1858 d.hasClass(s.slideDuplicateClass) 1859 ? a.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass) 1860 : a.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass)), 1861 e.emitSlidesClasses(); 1862 }, 1863 updateActiveIndex: function (e) { 1864 const t = this, 1865 s = t.rtlTranslate ? t.translate : -t.translate, 1866 { slidesGrid: a, snapGrid: i, params: r, activeIndex: n, realIndex: l, snapIndex: o } = t; 1867 let d, 1868 c = e; 1869 if (void 0 === c) { 1870 for (let e = 0; e < a.length; e += 1) 1871 void 0 !== a[e + 1] ? (s >= a[e] && s < a[e + 1] - (a[e + 1] - a[e]) / 2 ? (c = e) : s >= a[e] && s < a[e + 1] && (c = e + 1)) : s >= a[e] && (c = e);
1872 r.normalizeSlideIndex && (c < 0 || void 0 === c) && (c = 0); 1873 } 1874 if (i.indexOf(s) >= 0) d = i.indexOf(s); 1875 else { 1876 const e = Math.min(r.slidesPerGroupSkip, c); 1877 d = e + Math.floor((c - e) / r.slidesPerGroup); 1878 } 1879 if ((d >= i.length && (d = i.length - 1), c === n)) return void (d !== o && ((t.snapIndex = d), t.emit("snapIndexChange"))); 1880 const p = parseInt(t.slides.eq(c).attr("data-swiper-slide-index") || c, 10); 1881 Object.assign(t, { snapIndex: d, realIndex: p, previousIndex: n, activeIndex: c }), 1882 t.emit("activeIndexChange"), 1883 t.emit("snapIndexChange"), 1884 l !== p && t.emit("realIndexChange"), 1885 (t.initialized || t.params.runCallbacksOnInit) && t.emit("slideChange"); 1886 }, 1887 updateClickedSlide: function (e) { 1888 const t = this, 1889 s = t.params, 1890 a = d(e).closest(`.${s.slideClass}`)[0]; 1891 let i, 1892 r = !1; 1893 if (a) 1894 for (let e = 0; e < t.slides.length; e += 1) 1895 if (t.slides[e] === a) { 1896 (r = !0), (i = e); 1897 break; 1898 } 1899 if (!a || !r) return (t.clickedSlide = void 0), void (t.clickedIndex = void 0); 1900 (t.clickedSlide = a), 1901 t.virtual && t.params.virtual.enabled ? (t.clickedIndex = parseInt(d(a).attr("data-swiper-slide-index"), 10)) : (t.clickedIndex = i), 1902 s.slideToClickedSlide && void 0 !== t.clickedIndex && t.clickedIndex !== t.activeIndex && t.slideToClickedSlide(); 1903 }, 1904 }; 1905 var M = { 1906 getTranslate: function (e) { 1907 void 0 === e && (e = this.isHorizontal() ? "x" : "y"); 1908 const { params: t, rtlTranslate: s, translate: a, $wrapperEl: i } = this; 1909 if (t.virtualTranslate) return s ? -a : a; 1910 if (t.cssMode) return a; 1911 let r = h(i[0], e); 1912 return s && (r = -r), r || 0; 1913 }, 1914 setTranslate: function (e, t) { 1915 const s = this, 1916 { rtlTranslate: a, params: i, $wrapperEl: r, wrapperEl: n, progress: l } = s; 1917 let o, 1918 d = 0, 1919 c = 0; 1920 s.isHorizontal() ? (d = a ? -e : e) : (c = e), 1921 i.roundLengths && ((d = Math.floor(d)), (c = Math.floor(c))), 1922 i.cssMode ? (n[s.isHorizontal() ? "scrollLeft" : "scrollTop"] = s.isHorizontal() ? -d : -c) : i.virtualTranslate || r.transform(`translate3d(${d}px, ${c}px, 0px)`), 1923 (s.previousTranslate = s.translate), 1924 (s.translate = s.isHorizontal() ? d : c); 1925 const p = s.maxTranslate() - s.minTranslate(); 1926 (o = 0 === p ? 0 : (e - s.minTranslate()) / p), o !== l && s.updateProgress(e), s.emit("setTranslate", s.translate, t); 1927 }, 1928 minTranslate: function () { 1929 return -this.snapGrid[0]; 1930 }, 1931 maxTranslate: function () { 1932 return -this.snapGrid[this.snapGrid.length - 1]; 1933 }, 1934 translateTo: function (e, t, s, a, i) { 1935 void 0 === e && (e = 0), void 0 === t && (t = this.params.speed), void 0 === s && (s = !0), void 0 === a && (a = !0); 1936 const r = this, 1937 { params: n, wrapperEl: l } = r; 1938 if (r.animating && n.preventInteractionOnTransition) return !1; 1939 const o = r.minTranslate(), 1940 d = r.maxTranslate(); 1941 let c; 1942 if (((c = a && e > o ? o : a && e < d ? d : e), r.updateProgress(c), n.cssMode)) { 1943 const e = r.isHorizontal(); 1944 if (0 === t) l[e ? "scrollLeft" : "scrollTop"] = -c; 1945 else { 1946 if (!r.support.smoothScroll) return w({ swiper: r, targetPosition: -c, side: e ? "left" : "top" }), !0; 1947 l.scrollTo({ [e ? "left" : "top"]: -c, behavior: "smooth" }); 1948 } 1949 return !0; 1950 } 1951 return ( 1952 0 === t 1953 ? (r.setTransition(0), r.setTranslate(c), s && (r.emit("beforeTransitionStart", t, i), r.emit("transitionEnd"))) 1954 : (r.setTransition(t), 1955 r.setTranslate(c), 1956 s && (r.emit("beforeTransitionStart", t, i), r.emit("transitionStart")), 1957 r.animating || 1958 ((r.animating = !0), 1959 r.onTranslateToWrapperTransitionEnd || 1960 (r.onTranslateToWrapperTransitionEnd = function (e) { 1961 r && 1962 !r.destroyed && 1963 e.target === this && 1964 (r.$wrapperEl[0].removeEventListener("transitionend", r.onTranslateToWrapperTransitionEnd), 1965 r.$wrapperEl[0].removeEventListener("webkitTransitionEnd", r.onTranslateToWrapperTransitionEnd), 1966 (r.onTranslateToWrapperTransitionEnd = null),
1967 delete r.onTranslateToWrapperTransitionEnd, 1968 s && r.emit("transitionEnd")); 1969 }), 1970 r.$wrapperEl[0].addEventListener("transitionend", r.onTranslateToWrapperTransitionEnd), 1971 r.$wrapperEl[0].addEventListener("webkitTransitionEnd", r.onTranslateToWrapperTransitionEnd))), 1972 !0 1973 ); 1974 }, 1975 }; 1976 function P(e) { 1977 let { swiper: t, runCallbacks: s, direction: a, step: i } = e; 1978 const { activeIndex: r, previousIndex: n } = t; 1979 let l = a; 1980 if ((l || (l = r > n ? "next" : r < n ? "prev" : "reset"), t.emit(`transition${i}`), s && r !== n)) { 1981 if ("reset" === l) return void t.emit(`slideResetTransition${i}`); 1982 t.emit(`slideChangeTransition${i}`), "next" === l ? t.emit(`slideNextTransition${i}`) : t.emit(`slidePrevTransition${i}`); 1983 } 1984 } 1985 var k = { 1986 slideTo: function (e, t, s, a, i) { 1987 if ((void 0 === e && (e = 0), void 0 === t && (t = this.params.speed), void 0 === s && (s = !0), "number" != typeof e && "string" != typeof e)) 1988 throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof e}] given.`); 1989 if ("string" == typeof e) { 1990 const t = parseInt(e, 10); 1991 if (!isFinite(t)) throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`); 1992 e = t; 1993 } 1994 const r = this; 1995 let n = e; 1996 n < 0 && (n = 0); 1997 const { params: l, snapGrid: o, slidesGrid: d, previousIndex: c, activeIndex: p, rtlTranslate: u, wrapperEl: h, enabled: m } = r; 1998 if ((r.animating && l.preventInteractionOnTransition) || (!m && !a && !i)) return !1; 1999 const f = Math.min(r.params.slidesPerGroupSkip, n); 2000 let g = f + Math.floor((n - f) / r.params.slidesPerGroup); 2001 g >= o.length && (g = o.length - 1); 2002 const v = -o[g]; 2003 if (l.normalizeSlideIndex) 2004 for (let e = 0; e < d.length; e += 1) { 2005 const t = -Math.floor(100 * v), 2006 s = Math.floor(100 * d[e]), 2007 a = Math.floor(100 * d[e + 1]); 2008 void 0 !== d[e + 1] ? (t >= s && t < a - (a - s) / 2 ? (n = e) : t >= s && t < a && (n = e + 1)) : t >= s && (n = e); 2009 } 2010 if (r.initialized && n !== p) { 2011 if (!r.allowSlideNext && v < r.translate && v < r.minTranslate()) return !1; 2012 if (!r.allowSlidePrev && v > r.translate && v > r.maxTranslate() && (p || 0) !== n) return !1; 2013 } 2014 let b; 2015 if ((n !== (c || 0) && s && r.emit("beforeSlideChangeStart"), r.updateProgress(v), (b = n > p ? "next" : n < p ? "prev" : "reset"), (u && -v === r.translate) || (!u && v === r.translate))) 2016 return ( 2017 r.updateActiveIndex(n), 2018 l.autoHeight && r.updateAutoHeight(), 2019 r.updateSlidesClasses(), 2020 "slide" !== l.effect && r.setTranslate(v), 2021 "reset" !== b && (r.transitionStart(s, b), r.transitionEnd(s, b)), 2022 !1 2023 ); 2024 if (l.cssMode) { 2025 const e = r.isHorizontal(), 2026 s = u ? v : -v; 2027 if (0 === t) { 2028 const t = r.virtual && r.params.virtual.enabled; 2029 t && ((r.wrapperEl.style.scrollSnapType = "none"), (r._immediateVirtual = !0)), 2030 (h[e ? "scrollLeft" : "scrollTop"] = s), 2031 t && 2032 requestAnimationFrame(() => { 2033 (r.wrapperEl.style.scrollSnapType = ""), (r._swiperImmediateVirtual = !1); 2034 }); 2035 } else { 2036 if (!r.support.smoothScroll) return w({ swiper: r, targetPosition: s, side: e ? "left" : "top" }), !0;
2037 h.scrollTo({ [e ? "left" : "top"]: s, behavior: "smooth" }); 2038 } 2039 return !0; 2040 } 2041 return ( 2042 r.setTransition(t), 2043 r.setTranslate(v), 2044 r.updateActiveIndex(n), 2045 r.updateSlidesClasses(), 2046 r.emit("beforeTransitionStart", t, a), 2047 r.transitionStart(s, b), 2048 0 === t 2049 ? r.transitionEnd(s, b) 2050 : r.animating || 2051 ((r.animating = !0), 2052 r.onSlideToWrapperTransitionEnd || 2053 (r.onSlideToWrapperTransitionEnd = function (e) { 2054 r && 2055 !r.destroyed && 2056 e.target === this && 2057 (r.$wrapperEl[0].removeEventListener("transitionend", r.onSlideToWrapperTransitionEnd), 2058 r.$wrapperEl[0].removeEventListener("webkitTransitionEnd", r.onSlideToWrapperTransitionEnd), 2059 (r.onSlideToWrapperTransitionEnd = null), 2060 delete r.onSlideToWrapperTransitionEnd, 2061 r.transitionEnd(s, b)); 2062 }), 2063 r.$wrapperEl[0].addEventListener("transitionend", r.onSlideToWrapperTransitionEnd), 2064 r.$wrapperEl[0].addEventListener("webkitTransitionEnd", r.onSlideToWrapperTransitionEnd)), 2065 !0 2066 ); 2067 }, 2068 slideToLoop: function (e, t, s, a) { 2069 if ((void 0 === e && (e = 0), void 0 === t && (t = this.params.speed), void 0 === s && (s = !0), "string" == typeof e)) { 2070 const t = parseInt(e, 10); 2071 if (!isFinite(t)) throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`); 2072 e = t; 2073 } 2074 const i = this; 2075 let r = e; 2076 return i.params.loop && (r += i.loopedSlides), i.slideTo(r, t, s, a); 2077 }, 2078 slideNext: function (e, t, s) { 2079 void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); 2080 const a = this, 2081 { animating: i, enabled: r, params: n } = a; 2082 if (!r) return a; 2083 let l = n.slidesPerGroup; 2084 "auto" === n.slidesPerView && 1 === n.slidesPerGroup && n.slidesPerGroupAuto && (l = Math.max(a.slidesPerViewDynamic("current", !0), 1)); 2085 const o = a.activeIndex < n.slidesPerGroupSkip ? 1 : l; 2086 if (n.loop) { 2087 if (i && n.loopPreventsSlide) return !1; 2088 a.loopFix(), (a._clientLeft = a.$wrapperEl[0].clientLeft); 2089 } 2090 return n.rewind && a.isEnd ? a.slideTo(0, e, t, s) : a.slideTo(a.activeIndex + o, e, t, s); 2091 }, 2092 slidePrev: function (e, t, s) { 2093 void 0 === e && (e = this.params.speed), void 0 === t && (t = !0); 2094 const a = this, 2095 { params: i, animating: r, snapGrid: n, slidesGrid: l, rtlTranslate: o, enabled: d } = a; 2096 if (!d) return a; 2097 if (i.loop) { 2098 if (r && i.loopPreventsSlide) return !1; 2099 a.loopFix(), (a._clientLeft = a.$wrapperEl[0].clientLeft); 2100 } 2101 function c(e) { 2102 return e < 0 ? -Math.floor(Math.abs(e)) : Math.floor(e); 2103 } 2104 const p = c(o ? a.translate : -a.translate), 2105 u = n.map((e) => c(e)); 2106 let h = n[u.indexOf(p) - 1]; 2107 if (void 0 === h && i.cssMode) { 2108 let e; 2109 n.forEach((t, s) => { 2110 p >= t && (e = s); 2111 }), 2112 void 0 !== e && (h = n[e > 0 ? e - 1 : e]); 2113 } 2114 let m = 0; 2115 if ( 2116 (void 0 !== h && 2117 ((m = l.indexOf(h)), 2118 m < 0 && (m = a.activeIndex - 1), 2119 "auto" === i.slidesPerView && 1 === i.slidesPerGroup && i.slidesPerGroupAuto && ((m = m - a.slidesPerViewDynamic("previous", !0) + 1), (m = Math.max(m, 0)))), 2120 i.rewind && a.isBeginning) 2121 ) { 2122 const i = a.params.virtual && a.params.virtual.enabled && a.virtual ? a.virtual.slides.length - 1 : a.slides.length - 1; 2123 return a.slideTo(i, e, t, s); 2124 } 2125 return a.slideTo(m, e, t, s); 2126 }, 2127 slideReset: function (e, t, s) { 2128 return void 0 === e && (e = this.params.speed), void 0 === t && (t = !0), this.slideTo(this.activeIndex, e, t, s); 2129 }, 2130 slideToClosest: function (e, t, s, a) { 2131 void 0 === e && (e = this.params.speed), void 0 === t && (t = !0), void 0 === a && (a = 0.5); 2132 const i = this; 2133 let r = i.activeIndex; 2134 const n = Math.min(i.params.slidesPerGroupSkip, r), 2135 l = n + Math.floor((r - n) / i.params.slidesPerGroup), 2136 o = i.rtlTranslate ? i.translate : -i.translate; 2137 if (o >= i.snapGrid[l]) { 2138 const e = i.snapGrid[l]; 2139 o - e > (i.snapGrid[l + 1] - e) * a && (r += i.params.slidesPerGroup); 2140 } else { 2141 const e = i.snapGrid[l - 1]; 2142 o - e <= (i.snapGrid[l] - e) * a && (r -= i.params.slidesPerGroup); 2143 } 2144 return (r = Math.max(r, 0)), (r = Math.min(r, i.slidesGrid.length - 1)), i.slideTo(r, e, t, s); 2145 }, 2146 slideToClickedSlide: function () { 2147 const e = this, 2148 { params: t, $wrapperEl: s } = e, 2149 a = "auto" === t.slidesPerView ? e.slidesPerViewDynamic() : t.slidesPerView; 2150 let i, 2151 r = e.clickedIndex; 2152 if (t.loop) { 2153 if (e.animating) return; 2154 (i = parseInt(d(e.clickedSlide).attr("data-swiper-slide-index"), 10)), 2155 t.centeredSlides 2156 ? r < e.loopedSlides - a / 2 || r > e.slides.length - e.loopedSlides + a / 2 2157 ? (e.loopFix(), 2158 (r = s.children(`.${t.slideClass}[data-swiper-slide-index="${i}"]:not(.${t.slideDuplicateClass})`).eq(0).index()), 2159 p(() => { 2160 e.slideTo(r); 2161 })) 2162 : e.slideTo(r) 2163 : r > e.slides.length - a 2164 ? (e.loopFix(), 2165 (r = s.children(`.${t.slideClass}[data-swiper-slide-index="${i}"]:not(.${t.slideDuplicateClass})`).eq(0).index()), 2166 p(() => { 2167 e.slideTo(r); 2168 })) 2169 : e.slideTo(r); 2170 } else e.slideTo(r); 2171 }, 2172 }; 2173 var z = { 2174 loopCreate: function () { 2175 const e = this, 2176 t = a(), 2177 { params: s, $wrapperEl: i } = e, 2178 r = i.children().length > 0 ? d(i.children()[0].parentNode) : i; 2179 r.children(`.${s.slideClass}.${s.slideDuplicateClass}`).remove(); 2180 let n = r.children(`.${s.slideClass}`); 2181 if (s.loopFillGroupWithBlank) { 2182 const e = s.slidesPerGroup - (n.length % s.slidesPerGroup); 2183 if (e !== s.slidesPerGroup) { 2184 for (let a = 0; a < e; a += 1) { 2185 const e = d(t.createElement("div")).addClass(`${s.slideClass} ${s.slideBlankClass}`); 2186 r.append(e); 2187 } 2188 n = r.children(`.${s.slideClass}`); 2189 } 2190 } 2191 "auto" !== s.slidesPerView || s.loopedSlides || (s.loopedSlides = n.length), 2192 (e.loopedSlides = Math.ceil(parseFloat(s.loopedSlides || s.slidesPerView, 10))), 2193 (e.loopedSlides += s.loopAdditionalSlides), 2194 e.loopedSlides > n.length && e.params.loopedSlidesLimit && (e.loopedSlides = n.length); 2195 const l = [], 2196 o = []; 2197 n.each((e, t) => { 2198 d(e).attr("data-swiper-slide-index", t); 2199 }); 2200 for (let t = 0; t < e.loopedSlides; t += 1) { 2201 const e = t - Math.floor(t / n.length) * n.length; 2202 o.push(n.eq(e)[0]), l.unshift(n.eq(n.length - e - 1)[0]); 2203 } 2204 for (let e = 0; e < o.length; e += 1) r.append(d(o[e].cloneNode(!0)).addClass(s.slideDuplicateClass)); 2205 for (let e = l.length - 1; e >= 0; e -= 1) r.prepend(d(l[e].cloneNode(!0)).addClass(s.slideDuplicateClass)); 2206 }, 2207 loopFix: function () { 2208 const e = this; 2209 e.emit("beforeLoopFix"); 2210 const { activeIndex: t, slides: s, loopedSlides: a, allowSlidePrev: i, allowSlideNext: r, snapGrid: n, rtlTranslate: l } = e; 2211 let o; 2212 (e.allowSlidePrev = !0), (e.allowSlideNext = !0); 2213 const d = -n[t] - e.getTranslate(); 2214 if (t < a) { 2215 (o = s.length - 3 * a + t), (o += a); 2216 e.slideTo(o, 0, !1, !0) && 0 !== d && e.setTranslate((l ? -e.translate : e.translate) - d); 2217 } else if (t >= s.length - a) { 2218 (o = -s.length + t + a), (o += a); 2219 e.slideTo(o, 0, !1, !0) && 0 !== d && e.setTranslate((l ? -e.translate : e.translate) - d); 2220 } 2221 (e.allowSlidePrev = i), (e.allowSlideNext = r), e.emit("loopFix"); 2222 }, 2223 loopDestroy: function () { 2224 const { $wrapperEl: e, params: t, slides: s } = this; 2225 e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(), s.removeAttr("data-swiper-slide-index"); 2226 }, 2227 }; 2228 function L(e) { 2229 const t = this, 2230 s = a(), 2231 i = r(), 2232 n = t.touchEventsData, 2233 { params: l, touches: o, enabled: c } = t; 2234 if (!c) return; 2235 if (t.animating && l.preventInteractionOnTransition) return; 2236 !t.animating && l.cssMode && l.loop && t.loopFix(); 2237 let p = e; 2238 p.originalEvent && (p = p.originalEvent); 2239 let h = d(p.target); 2240 if ("wrapper" === l.touchEventsTarget && !h.closest(t.wrapperEl).length) return; 2241 if (((n.isTouchEvent = "touchstart" === p.type), !n.isTouchEvent && "which" in p && 3 === p.which)) return; 2242 if (!n.isTouchEvent && "button" in p && p.button > 0) return; 2243 if (n.isTouched && n.isMoved) return; 2244 const m = !!l.noSwipingClass && "" !== l.noSwipingClass, 2245 f = e.composedPath ? e.composedPath() : e.path; 2246 m && p.target && p.target.shadowRoot && f && (h = d(f[0])); 2247 const g = l.noSwipingSelector ? l.noSwipingSelector : `.${l.noSwipingClass}`, 2248 v = !(!p.target || !p.target.shadowRoot); 2249 if ( 2250 l.noSwiping && 2251 (v 2252 ? (function (e, t) { 2253 return ( 2254 void 0 === t && (t = this), 2255 (function t(s) { 2256 if (!s || s === a() || s === r()) return null; 2257 s.assignedSlot && (s = s.assignedSlot); 2258 const i = s.closest(e); 2259 return i || s.getRootNode ? i || t(s.getRootNode().host) : null; 2260 })(t) 2261 ); 2262 })(g, h[0]) 2263 : h.closest(g)[0]) 2264 ) 2265 return void (t.allowClick = !0); 2266 if (l.swipeHandler && !h.closest(l.swipeHandler)[0]) return; 2267 (o.currentX = "touchstart" === p.type ? p.targetTouches[0].pageX : p.pageX), (o.currentY = "touchstart" === p.type ? p.targetTouches[0].pageY : p.pageY); 2268 const w = o.currentX, 2269 b = o.currentY, 2270 x = l.edgeSwipeDetection || l.iOSEdgeSwipeDetection, 2271 y = l.edgeSwipeThreshold || l.iOSEdgeSwipeThreshold; 2272 if (x && (w <= y || w >= i.innerWidth - y)) { 2273 if ("prevent" !== x) return; 2274 e.preventDefault(); 2275 } 2276 if ( 2277 (Object.assign(n, { isTouched: !0, isMoved: !1, allowTouchCallbacks: !0, isScrolling: void 0, startMoving: void 0 }), 2278 (o.startX = w), 2279 (o.startY = b), 2280 (n.touchStartTime = u()), 2281 (t.allowClick = !0), 2282 t.updateSize(), 2283 (t.swipeDirection = void 0), 2284 l.threshold > 0 && (n.allowThresholdMove = !1), 2285 "touchstart" !== p.type) 2286 ) { 2287 let e = !0; 2288 h.is(n.focusableElements) && ((e = !1), "SELECT" === h[0].nodeName && (n.isTouched = !1)), 2289 s.activeElement && d(s.activeElement).is(n.focusableElements) && s.activeElement !== h[0] && s.activeElement.blur(); 2290 const a = e && t.allowTouchMove && l.touchStartPreventDefault; 2291 (!l.touchStartForcePreventDefault && !a) || h[0].isContentEditable || p.preventDefault(); 2292 } 2293 t.params.freeMode && t.params.freeMode.enabled && t.freeMode && t.animating && !l.cssMode && t.freeMode.onTouchStart(), t.emit("touchStart", p); 2294 } 2295 function O(e) { 2296 const t = a(), 2297 s = this, 2298 i = s.touchEventsData, 2299 { params: r, touches: n, rtlTranslate: l, enabled: o } = s; 2300 if (!o) return; 2301 let c = e; 2302 if ((c.originalEvent && (c = c.originalEvent), !i.isTouched)) return void (i.startMoving && i.isScrolling && s.emit("touchMoveOpposite", c)); 2303 if (i.isTouchEvent && "touchmove" !== c.type) return; 2304 const p = "touchmove" === c.type && c.targetTouches && (c.targetTouches[0] || c.changedTouches[0]), 2305 h = "touchmove" === c.type ? p.pageX : c.pageX, 2306 m = "touchmove" === c.type ? p.pageY : c.pageY; 2307 if (c.preventedByNestedSwiper) return (n.startX = h), void (n.startY = m); 2308 if (!s.allowTouchMove) 2309 return d(c.target).is(i.focusableElements) || (s.allowClick = !1), void (i.isTouched && (Object.assign(n, { startX: h, startY: m, currentX: h, currentY: m }), (i.touchStartTime = u()))); 2310 if (i.isTouchEvent && r.touchReleaseOnEdges && !r.loop) 2311 if (s.isVertical()) { 2312 if ((m < n.startY && s.translate <= s.maxTranslate()) || (m > n.startY && s.translate >= s.minTranslate())) return (i.isTouched = !1), void (i.isMoved = !1); 2313 } else if ((h < n.startX && s.translate <= s.maxTranslate()) || (h > n.startX && s.translate >= s.minTranslate())) return; 2314 if (i.isTouchEvent && t.activeElement && c.target === t.activeElement && d(c.target).is(i.focusableElements)) return (i.isMoved = !0), void (s.allowClick = !1); 2315 if ((i.allowTouchCallbacks && s.emit("touchMove", c), c.targetTouches && c.targetTouches.length > 1)) return; 2316 (n.currentX = h), (n.currentY = m); 2317 const f = n.currentX - n.startX, 2318 g = n.currentY - n.startY; 2319 if (s.params.threshold && Math.sqrt(f ** 2 + g ** 2) < s.params.threshold) return; 2320 if (void 0 === i.isScrolling) { 2321 let e; 2322 (s.isHorizontal() && n.currentY === n.startY) || (s.isVertical() && n.currentX === n.startX) 2323 ? (i.isScrolling = !1) 2324 : f * f + g * g >= 25 && ((e = (180 * Math.atan2(Math.abs(g), Math.abs(f))) / Math.PI), (i.isScrolling = s.isHorizontal() ? e > r.touchAngle : 90 - e > r.touchAngle)); 2325 } 2326 if ((i.isScrolling && s.emit("touchMoveOpposite", c), void 0 === i.startMoving && ((n.currentX === n.startX && n.currentY === n.startY) || (i.startMoving = !0)), i.isScrolling)) 2327 return void (i.isTouched = !1); 2328 if (!i.startMoving) return; 2329 (s.allowClick = !1), 2330 !r.cssMode && c.cancelable && c.preventDefault(), 2331 r.touchMoveStopPropagation && !r.nested && c.stopPropagation(), 2332 i.isMoved || 2333 (r.loop && !r.cssMode && s.loopFix(), 2334 (i.startTranslate = s.getTranslate()), 2335 s.setTransition(0), 2336 s.animating && s.$wrapperEl.trigger("webkitTransitionEnd transitionend"), 2337 (i.allowMomentumBounce = !1), 2338 !r.grabCursor || (!0 !== s.allowSlideNext && !0 !== s.allowSlidePrev) || s.setGrabCursor(!0), 2339 s.emit("sliderFirstMove", c)
2339), 2340 s.emit("sliderMove", c), 2341 (i.isMoved = !0); 2342 let v = s.isHorizontal() ? f : g; 2343 (n.diff = v), (v *= r.touchRatio), l && (v = -v), (s.swipeDirection = v > 0 ? "prev" : "next"), (i.currentTranslate = v + i.startTranslate); 2344 let w = !0, 2345 b = r.resistanceRatio; 2346 if ( 2347 (r.touchReleaseOnEdges && (b = 0), 2348 v > 0 && i.currentTranslate > s.minTranslate() 2349 ? ((w = !1), r.resistance && (i.currentTranslate = s.minTranslate() - 1 + (-s.minTranslate() + i.startTranslate + v) ** b)) 2350 : v < 0 && i.currentTranslate < s.maxTranslate() && ((w = !1), r.resistance && (i.currentTranslate = s.maxTranslate() + 1 - (s.maxTranslate() - i.startTranslate - v) ** b)), 2351 w && (c.preventedByNestedSwiper = !0), 2352 !s.allowSlideNext && "next" === s.swipeDirection && i.currentTranslate < i.startTranslate && (i.currentTranslate = i.startTranslate), 2353 !s.allowSlidePrev && "prev" === s.swipeDirection && i.currentTranslate > i.startTranslate && (i.currentTranslate = i.startTranslate), 2354 s.allowSlidePrev || s.allowSlideNext || (i.currentTranslate = i.startTranslate), 2355 r.threshold > 0) 2356 ) { 2357 if (!(Math.abs(v) > r.threshold || i.allowThresholdMove)) return void (i.currentTranslate = i.startTranslate); 2358 if (!i.allowThresholdMove) 2359 return ( 2360 (i.allowThresholdMove = !0), 2361 (n.startX = n.currentX), 2362 (n.startY = n.currentY), 2363 (i.currentTranslate = i.startTranslate), 2364 void (n.diff = s.isHorizontal() ? n.currentX - n.startX : n.currentY - n.startY) 2365 ); 2366 } 2367 r.followFinger && 2368 !r.cssMode && 2369 (((r.freeMode && r.freeMode.enabled && s.freeMode) || r.watchSlidesProgress) && (s.updateActiveIndex(), s.updateSlidesClasses()), 2370 s.params.freeMode && r.freeMode.enabled && s.freeMode && s.freeMode.onTouchMove(), 2371 s.updateProgress(i.currentTranslate), 2372 s.setTranslate(i.currentTranslate)); 2373 } 2374 function I(e) { 2375 const t = this, 2376 s = t.touchEventsData, 2377 { params: a, touches: i, rtlTranslate: r, slidesGrid: n, enabled: l } = t; 2378 if (!l) return; 2379 let o = e; 2380 if ((o.originalEvent && (o = o.originalEvent), s.allowTouchCallbacks && t.emit("touchEnd", o), (s.allowTouchCallbacks = !1), !s.isTouched)) 2381 return s.isMoved && a.grabCursor && t.setGrabCursor(!1), (s.isMoved = !1), void (s.startMoving = !1); 2382 a.grabCursor && s.isMoved && s.isTouched && (!0 === t.allowSlideNext || !0 === t.allowSlidePrev) && t.setGrabCursor(!1); 2383 const d = u(), 2384 c = d - s.touchStartTime; 2385 if (t.allowClick) { 2386 const e = o.path || (o.composedPath && o.composedPath()); 2387 t.updateClickedSlide((e && e[0]) || o.target), t.emit("tap click", o), c < 300 && d - s.lastClickTime < 300 && t.emit("doubleTap doubleClick", o); 2388 } 2389 if ( 2390 ((s.lastClickTime = u()), 2391 p(() => { 2392 t.destroyed || (t.allowClick = !0); 2393 }), 2394 !s.isTouched || !s.isMoved || !t.swipeDirection || 0 === i.diff || s.currentTranslate === s.startTranslate) 2395 ) 2396 return (s.isTouched = !1), (s.isMoved = !1), void (s.startMoving = !1); 2397 let h; 2398 if (((s.isTouched = !1), (s.isMoved = !1), (s.startMoving = !1), (h = a.followFinger ? (r ? t.translate : -t.translate) : -s.currentTranslate), a.cssMode)) return; 2399 if (t.params.freeMode && a.freeMode.enabled) return void t.freeMode.onTouchEnd({ currentPos: h }); 2400 let m = 0, 2401 f = t.slidesSizesGrid[0]; 2402 for (let e = 0; e < n.length; e += e < a.slidesPerGroupSkip ? 1 : a.slidesPerGroup) { 2403 const t = e < a.slidesPerGroupSkip - 1 ? 1 : a.slidesPerGroup; 2404 void 0 !== n[e + t] ? h >= n[e] && h < n[e + t] && ((m = e), (f = n[e + t] - n[e])) : h >= n[e] && ((m = e), (f = n[n.length - 1] - n[n.length - 2])); 2405 } 2406 let g = null, 2407 v = null; 2408 a.rewind && (t.isBeginning ? (v = t.params.virtual && t.params.virtual.enabled && t.virtual ? t.virtual.slides.length - 1 : t.slides.length - 1) : t.isEnd && (g = 0)); 2409 const w = (h - n[m]) / f, 2410 b = m < a.slidesPerGroupSkip - 1 ? 1 : a.slidesPerGroup; 2411 if (c > a.longSwipesMs) { 2412 if (!a.longSwipes) return void t.slideTo(t.activeIndex); 2413 "next" === t.swipeDirection && (w >= a.longSwipesRatio ? t.slideTo(a.rewind && t.isEnd ? g : m + b) : t.slideTo(m)), 2414 "prev" === t.swipeDirection && (w > 1 - a.longSwipesRatio ? t.slideTo(m + b) : null !== v && w < 0 && Math.abs(w) > a.longSwipesRatio ? t.slideTo(v) : t.slideTo(m)); 2415 } else { 2416 if (!a.shortSwipes) return void t.slideTo(t.activeIndex);
2417 t.navigation && (o.target === t.navigation.nextEl || o.target === t.navigation.prevEl) 2418 ? o.target === t.navigation.nextEl 2419 ? t.slideTo(m + b) 2420 : t.slideTo(m) 2421 : ("next" === t.swipeDirection && t.slideTo(null !== g ? g : m + b), "prev" === t.swipeDirection && t.slideTo(null !== v ? v : m)); 2422 } 2423 } 2424 function A() { 2425 const e = this, 2426 { params: t, el: s } = e; 2427 if (s && 0 === s.offsetWidth) return; 2428 t.breakpoints && e.setBreakpoint(); 2429 const { allowSlideNext: a, allowSlidePrev: i, snapGrid: r } = e; 2430 (e.allowSlideNext = !0), 2431 (e.allowSlidePrev = !0), 2432 e.updateSize(), 2433 e.updateSlides(), 2434 e.updateSlidesClasses(), 2435 ("auto" === t.slidesPerView || t.slidesPerView > 1) && e.isEnd && !e.isBeginning && !e.params.centeredSlides 2436 ? e.slideTo(e.slides.length - 1, 0, !1, !0) 2437 : e.slideTo(e.activeIndex, 0, !1, !0), 2438 e.autoplay && e.autoplay.running && e.autoplay.paused && e.autoplay.run(), 2439 (e.allowSlidePrev = i), 2440 (e.allowSlideNext = a), 2441 e.params.watchOverflow && r !== e.snapGrid && e.checkOverflow(); 2442 } 2443 function D(e) { 2444 const t = this; 2445 t.enabled && (t.allowClick || (t.params.preventClicks && e.preventDefault(), t.params.preventClicksPropagation && t.animating && (e.stopPropagation(), e.stopImmediatePropagation()))); 2446 } 2447 function G() { 2448 const e = this, 2449 { wrapperEl: t, rtlTranslate: s, enabled: a } = e; 2450 if (!a) return; 2451 let i; 2452 (e.previousTranslate = e.translate), 2453 e.isHorizontal() ? (e.translate = -t.scrollLeft) : (e.translate = -t.scrollTop), 2454 0 === e.translate && (e.translate = 0), 2455 e.updateActiveIndex(), 2456 e.updateSlidesClasses(); 2457 const r = e.maxTranslate() - e.minTranslate(); 2458 (i = 0 === r ? 0 : (e.translate - e.minTranslate()) / r), i !== e.progress && e.updateProgress(s ? -e.translate : e.translate), e.emit("setTranslate", e.translate, !1); 2459 } 2460 let N = !1; 2461 function B() {} 2462 const H = (e, t) => { 2463 const s = a(), 2464 { params: i, touchEvents: r, el: n, wrapperEl: l, device: o, support: d } = e, 2465 c = !!i.nested, 2466 p = "on" === t ? "addEventListener" : "removeEventListener", 2467 u = t; 2468 if (d.touch) { 2469 const t = !("touchstart" !== r.start || !d.passiveListener || !i.passiveListeners) && { passive: !0, capture: !1 }; 2470 n[p](r.start, e.onTouchStart, t), 2471 n[p](r.move, e.onTouchMove, d.passiveListener ? { passive: !1, capture: c } : c), 2472 n[p](r.end, e.onTouchEnd, t), 2473 r.cancel && n[p](r.cancel, e.onTouchEnd, t); 2474 } else n[p](r.start, e.onTouchStart, !1), s[p](r.move, e.onTouchMove, c), s[p](r.end, e.onTouchEnd, !1); 2475 (i.preventClicks || i.preventClicksPropagation) && n[p]("click", e.onClick, !0), 2476 i.cssMode && l[p]("scroll", e.onScroll), 2477 i.updateOnWindowResize ? e[u](o.ios || o.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", A, !0) : e[u]("observerUpdate", A, !0); 2478 }; 2479 var X = { 2480 attachEvents: function () { 2481 const e = this, 2482 t = a(), 2483 { params: s, support: i } = e; 2484 (e.onTouchStart = L.bind(e)), 2485 (e.onTouchMove = O.bind(e)), 2486 (e.onTouchEnd = I.bind(e)), 2487 s.cssMode && (e.onScroll = G.bind(e)), 2488 (e.onClick = D.bind(e)), 2489 i.touch && !N && (t.addEventListener("touchstart", B), (N = !0)), 2490 H(e, "on"); 2491 }, 2492 detachEvents: function () { 2493 H(this, "off"); 2494 }, 2495 }; 2496 const Y = (e, t) => e.grid && t.grid && t.grid.rows > 1; 2497 var R = { 2498 addClasses: function () { 2499 const e = this, 2500 { classNames: t, params: s, rtl: a, $el: i, device: r, support: n } = e, 2501 l = (function (e, t) { 2502 const s = []; 2503 return ( 2504 e.forEach((e) => { 2505 "object" == typeof e 2506 ? Object.keys(e).forEach((a) => { 2507 e[a] && s.push(t + a); 2508 }) 2509 : "string" == typeof e && s.push(t + e); 2510 }), 2511 s 2512 ); 2513 })( 2514 [ 2515 "initialized", 2516 s.direction, 2517 { "pointer-events": !n.touch }, 2518 { "free-mode": e.params.freeMode && s.freeMode.enabled }, 2519 { autoheight: s.autoHeight }, 2520 { rtl: a }, 2521 { grid: s.grid && s.grid.rows > 1 }, 2522 { "grid-column": s.grid && s.grid.rows > 1 && "column" === s.grid.fill }, 2523 { android: r.android }, 2524 { ios: r.ios }, 2525 { "css-mode": s.cssMode }, 2526 { centered: s.cssMode && s.centeredSlides }, 2527 { "watch-progress": s.watchSlidesProgress }, 2528 ], 2529 s.containerModifierClass 2530 ); 2531 t.push(...l), i.addClass([...t].join(" ")), e.emitContainerClasses(); 2532 }, 2533 removeClasses: function () { 2534 const { $el: e, classNames: t } = this; 2535 e.removeClass(t.join(" ")), this.emitContainerClasses(); 2536 }, 2537 }; 2538 var W = { 2539 init: !0, 2540 direction: "horizontal", 2541 touchEventsTarget: "wrapper", 2542 initialSlide: 0, 2543 speed: 300, 2544 cssMode: !1, 2545 updateOnWindowResize: !0, 2546 resizeObserver: !0, 2547 nested: !1, 2548 createElements: !1, 2549 enabled: !0, 2550 focusableElements: "input, select, option, textarea, button, video, label", 2551 width: null, 2552 height: null, 2553 preventInteractionOnTransition: !1, 2554 userAgent: null, 2555 url: null, 2556 edgeSwipeDetection: !1, 2557 edgeSwipeThreshold: 20, 2558 autoHeight: !1, 2559 setWrapperSize: !1, 2560 virtualTranslate: !1, 2561 effect: "slide", 2562 breakpoints: void 0, 2563 breakpointsBase: "window", 2564 spaceBetween: 0, 2565 slidesPerView: 1, 2566 slidesPerGroup: 1, 2567 slidesPerGroupSkip: 0, 2568 slidesPerGroupAuto: !1, 2569 centeredSlides: !1,
2570 centeredSlidesBounds: !1, 2571 slidesOffsetBefore: 0, 2572 slidesOffsetAfter: 0, 2573 normalizeSlideIndex: !0, 2574 centerInsufficientSlides: !1, 2575 watchOverflow: !0, 2576 roundLengths: !1, 2577 touchRatio: 1, 2578 touchAngle: 45, 2579 simulateTouch: !0, 2580 shortSwipes: !0, 2581 longSwipes: !0, 2582 longSwipesRatio: 0.5, 2583 longSwipesMs: 300, 2584 followFinger: !0, 2585 allowTouchMove: !0, 2586 threshold: 0, 2587 touchMoveStopPropagation: !1, 2588 touchStartPreventDefault: !0, 2589 touchStartForcePreventDefault: !1, 2590 touchReleaseOnEdges: !1, 2591 uniqueNavElements: !0, 2592 resistance: !0, 2593 resistanceRatio: 0.85, 2594 watchSlidesProgress: !1, 2595 grabCursor: !1, 2596 preventClicks: !0, 2597 preventClicksPropagation: !0, 2598 slideToClickedSlide: !1, 2599 preloadImages: !0, 2600 updateOnImagesReady: !0, 2601 loop: !1, 2602 loopAdditionalSlides: 0, 2603 loopedSlides: null, 2604 loopedSlidesLimit: !0, 2605 loopFillGroupWithBlank: !1, 2606 loopPreventsSlide: !0, 2607 rewind: !1, 2608 allowSlidePrev: !0, 2609 allowSlideNext: !0, 2610 swipeHandler: null, 2611 noSwiping: !0, 2612 noSwipingClass: "swiper-no-swiping", 2613 noSwipingSelector: null, 2614 passiveListeners: !0, 2615 maxBackfaceHiddenSlides: 10, 2616 containerModifierClass: "swiper-", 2617 slideClass: "swiper-slide", 2618 slideBlankClass: "swiper-slide-invisible-blank", 2619 slideActiveClass: "swiper-slide-active", 2620 slideDuplicateActiveClass: "swiper-slide-duplicate-active", 2621 slideVisibleClass: "swiper-slide-visible", 2622 slideDuplicateClass: "swiper-slide-duplicate", 2623 slideNextClass: "swiper-slide-next", 2624 slideDuplicateNextClass: "swiper-slide-duplicate-next", 2625 slidePrevClass: "swiper-slide-prev", 2626 slideDuplicatePrevClass: "swiper-slide-duplicate-prev", 2627 wrapperClass: "swiper-wrapper", 2628 runCallbacksOnInit: !0, 2629 _emitClasses: !1, 2630 }; 2631 function q(e, t) { 2632 return function (s) { 2633 void 0 === s && (s = {}); 2634 const a = Object.keys(s)[0], 2635 i = s[a]; 2636 "object" == typeof i && null !== i 2637 ? (["navigation", "pagination", "scrollbar"].indexOf(a) >= 0 && !0 === e[a] && (e[a] = { auto: !0 }), 2638 a in e && "enabled" in i 2639 ? (!0 === e[a] && (e[a] = { enabled: !0 }), "object" != typeof e[a] || "enabled" in e[a] || (e[a].enabled = !0), e[a] || (e[a] = { enabled: !1 }), g(t, s)) 2640 : g(t, s)) 2641 : g(t, s); 2642 }; 2643 } 2644 const j = { 2645 eventsEmitter: $, 2646 update: S, 2647 translate: M, 2648 transition: { 2649 setTransition: function (e, t) { 2650 const s = this; 2651 s.params.cssMode || s.$wrapperEl.transition(e), s.emit("setTransition", e, t); 2652 }, 2653 transitionStart: function (e, t) { 2654 void 0 === e && (e = !0); 2655 const s = this, 2656 { params: a } = s; 2657 a.cssMode || (a.autoHeight && s.updateAutoHeight(), P({ swiper: s, runCallbacks: e, direction: t, step: "Start" })); 2658 }, 2659 transitionEnd: function (e, t) { 2660 void 0 === e && (e = !0); 2661 const s = this, 2662 { params: a } = s; 2663 (s.animating = !1), a.cssMode || (s.setTransition(0), P({ swiper: s, runCallbacks: e, direction: t, step: "End" })); 2664 }, 2665 }, 2666 slide: k, 2667 loop: z, 2668 grabCursor: { 2669 setGrabCursor: function (e) { 2670 const t = this; 2671 if (t.support.touch || !t.params.simulateTouch || (t.params.watchOverflow && t.isLocked) || t.params.cssMode) return; 2672 const s = "container" === t.params.touchEventsTarget ? t.el : t.wrapperEl; 2673 (s.style.cursor = "move"), (s.style.cursor = e ? "grabbing" : "grab"); 2674 }, 2675 unsetGrabCursor: function () { 2676 const e = this; 2677 e.support.touch || (e.params.watchOverflow && e.isLocked) || e.params.cssMode || (e["container" === e.params.touchEventsTarget ? "el" : "wrapperEl"].style.cursor = ""); 2678 }, 2679 }, 2680 events: X, 2681 breakpoints: { 2682 setBreakpoint: function () { 2683 const e = this, 2684 { activeIndex: t, initialized: s, loopedSlides: a = 0, params: i, $el: r } = e, 2685 n = i.breakpoints; 2686 if (!n || (n && 0 === Object.keys(n).length)) return;
2687 const l = e.getBreakpoint(n, e.params.breakpointsBase, e.el); 2688 if (!l || e.currentBreakpoint === l) return; 2689 const o = (l in n ? n[l] : void 0) || e.originalParams, 2690 d = Y(e, i), 2691 c = Y(e, o), 2692 p = i.enabled; 2693 d && !c 2694 ? (r.removeClass(`${i.containerModifierClass}grid ${i.containerModifierClass}grid-column`), e.emitContainerClasses()) 2695 : !d && 2696 c && 2697 (r.addClass(`${i.containerModifierClass}grid`), 2698 ((o.grid.fill && "column" === o.grid.fill) || (!o.grid.fill && "column" === i.grid.fill)) && r.addClass(`${i.containerModifierClass}grid-column`), 2699 e.emitContainerClasses()), 2700 ["navigation", "pagination", "scrollbar"].forEach((t) => { 2701 const s = i[t] && i[t].enabled, 2702 a = o[t] && o[t].enabled; 2703 s && !a && e[t].disable(), !s && a && e[t].enable(); 2704 }); 2705 const u = o.direction && o.direction !== i.direction, 2706 h = i.loop && (o.slidesPerView !== i.slidesPerView || u); 2707 u && s && e.changeDirection(), g(e.params, o); 2708 const m = e.params.enabled; 2709 Object.assign(e, { allowTouchMove: e.params.allowTouchMove, allowSlideNext: e.params.allowSlideNext, allowSlidePrev: e.params.allowSlidePrev }), 2710 p && !m ? e.disable() : !p && m && e.enable(), 2711 (e.currentBreakpoint = l), 2712 e.emit("_beforeBreakpoint", o), 2713 h && s && (e.loopDestroy(), e.loopCreate(), e.updateSlides(), e.slideTo(t - a + e.loopedSlides, 0, !1)), 2714 e.emit("breakpoint", o); 2715 }, 2716 getBreakpoint: function (e, t, s) { 2717 if ((void 0 === t && (t = "window"), !e || ("container" === t && !s))) return; 2718 let a = !1; 2719 const i = r(), 2720 n = "window" === t ? i.innerHeight : s.clientHeight, 2721 l = Object.keys(e).map((e) => { 2722 if ("string" == typeof e && 0 === e.indexOf("@")) { 2723 const t = parseFloat(e.substr(1)); 2724 return { value: n * t, point: e }; 2725 } 2726 return { value: e, point: e }; 2727 }); 2728 l.sort((e, t) => parseInt(e.value, 10) - parseInt(t.value, 10)); 2729 for (let e = 0; e < l.length; e += 1) { 2730 const { point: r, value: n } = l[e]; 2731 "window" === t ? i.matchMedia(`(min-width: ${n}px)`).matches && (a = r) : n <= s.clientWidth && (a = r); 2732 } 2733 return a || "max"; 2734 }, 2735 }, 2736 checkOverflow: { 2737 checkOverflow: function () { 2738 const e = this, 2739 { isLocked: t, params: s } = e, 2740 { slidesOffsetBefore: a } = s; 2741 if (a) { 2742 const t = e.slides.length - 1, 2743 s = e.slidesGrid[t] + e.slidesSizesGrid[t] + 2 * a; 2744 e.isLocked = e.size > s; 2745 } else e.isLocked = 1 === e.snapGrid.length; 2746 !0 === s.allowSlideNext && (e.allowSlideNext = !e.isLocked), 2747 !0 === s.allowSlidePrev && (e.allowSlidePrev = !e.isLocked), 2748 t && t !== e.isLocked && (e.isEnd = !1), 2749 t !== e.isLocked && e.emit(e.isLocked ? "lock" : "unlock"); 2750 }, 2751 }, 2752 classes: R, 2753 images: { 2754 loadImage: function (e, t, s, a, i, n) { 2755 const l = r(); 2756 let o; 2757 function c() { 2758 n && n(); 2759 } 2760 d(e).parent("picture")[0] || (e.complete && i) ? c() : t ? ((o = new l.Image()), (o.onload = c), (o.onerror = c), a && (o.sizes = a), s && (o.srcset = s), t && (o.src = t)) : c(); 2761 }, 2762 preloadImages: function () { 2763 const e = this; 2764 function t() { 2765 null != e && 2766 e && 2767 !e.destroyed && 2768 (void 0 !== e.imagesLoaded && (e.imagesLoaded += 1), e.imagesLoaded === e.imagesToLoad.length && (e.params.updateOnImagesReady && e.update(
2768), e.emit("imagesReady"))); 2769 } 2770 e.imagesToLoad = e.$el.find("img"); 2771 for (let s = 0; s < e.imagesToLoad.length; s += 1) { 2772 const a = e.imagesToLoad[s]; 2773 e.loadImage(a, a.currentSrc || a.getAttribute("src"), a.srcset || a.getAttribute("srcset"), a.sizes || a.getAttribute("sizes"), !0, t); 2774 } 2775 }, 2776 }, 2777 }, 2778 _ = {}; 2779 class V { 2780 constructor() { 2781 let e, t; 2782 for (var s = arguments.length, a = new Array(s), i = 0; i < s; i++) a[i] = arguments[i]; 2783 if ( 2784 (1 === a.length && a[0].constructor && "Object" === Object.prototype.toString.call(a[0]).slice(8, -1) ? (t = a[0]) : ([e, t] = a), 2785 t || (t = {}), 2786 (t = g({}, t)), 2787 e && !t.el && (t.el = e), 2788 t.el && d(t.el).length > 1) 2789 ) { 2790 const e = []; 2791 return ( 2792 d(t.el).each((s) => { 2793 const a = g({}, t, { el: s }); 2794 e.push(new V(a)); 2795 }), 2796 e 2797 ); 2798 } 2799 const r = this; 2800 (r.__swiper__ = !0), 2801 (r.support = E()), 2802 (r.device = C({ userAgent: t.userAgent })),
2803 (r.browser = T()), 2804 (r.eventsListeners = {}), 2805 (r.eventsAnyListeners = []), 2806 (r.modules = [...r.__modules__]), 2807 t.modules && Array.isArray(t.modules) && r.modules.push(...t.modules); 2808 const n = {}; 2809 r.modules.forEach((e) => { 2810 e({ swiper: r, extendParams: q(t, n), on: r.on.bind(r), once: r.once.bind(r), off: r.off.bind(r), emit: r.emit.bind(r) }); 2811 }); 2812 const l = g({}, W, n); 2813 return ( 2814 (r.params = g({}, l, _, t)), 2815 (r.originalParams = g({}, r.params)), 2816 (r.passedParams = g({}, t)), 2817 r.params && 2818 r.params.on && 2819 Object.keys(r.params.on).forEach((e) => { 2820 r.on(e, r.params.on[e]); 2821 }), 2822 r.params && r.params.onAny && r.onAny(r.params.onAny), 2823 (r.$ = d), 2824 Object.assign(r, { 2825 enabled: r.params.enabled, 2826 el: e, 2827 classNames: [], 2828 slides: d(), 2829 slidesGrid: [], 2830 snapGrid: [], 2831 slidesSizesGrid: [], 2832 isHorizontal: () => "horizontal" === r.params.direction, 2833 isVertical: () => "vertical" === r.params.direction, 2834 activeIndex: 0, 2835 realIndex: 0, 2836 isBeginning: !0, 2837 isEnd: !1, 2838 translate: 0, 2839 previousTranslate: 0, 2840 progress: 0, 2841 velocity: 0, 2842 animating: !1, 2843 allowSlideNext: r.params.allowSlideNext, 2844 allowSlidePrev: r.params.allowSlidePrev, 2845 touchEvents: (function () { 2846 const e = ["touchstart", "touchmove", "touchend", "touchcancel"], 2847 t = ["pointerdown", "pointermove", "pointerup"]; 2848 return ( 2849 (r.touchEventsTouch = { start: e[0], move: e[1], end: e[2], cancel: e[3] }), 2850 (r.touchEventsDesktop = { start: t[0], move: t[1], end: t[2] }), 2851 r.support.touch || !r.params.simulateTouch ? r.touchEventsTouch : r.touchEventsDesktop 2852 ); 2853 })(), 2854 touchEventsData: { 2855 isTouched: void 0, 2856 isMoved: void 0, 2857 allowTouchCallbacks: void 0, 2858 touchStartTime: void 0, 2859 isScrolling: void 0, 2860 currentTranslate: void 0, 2861 startTranslate: void 0, 2862 allowThresholdMove: void 0, 2863 focusableElements: r.params.focusableElements, 2864 lastClickTime: u(), 2865 clickTimeout: void 0, 2866 velocities: [], 2867 allowMomentumBounce: void 0, 2868 isTouchEvent: void 0, 2869 startMoving: void 0, 2870 }, 2871 allowClick: !0, 2872 allowTouchMove: r.params.allowTouchMove, 2873 touches: { startX: 0, startY: 0, currentX: 0, currentY: 0, diff: 0 }, 2874 imagesToLoad: [], 2875 imagesLoaded: 0, 2876 }), 2877 r.emit("_swiper"), 2878 r.params.init && r.init(), 2879 r 2880 ); 2881 } 2882 enable() { 2883 const e = this; 2884 e.enabled || ((e.enabled = !0), e.params.grabCursor && e.setGrabCursor(), e.emit("enable")); 2885 } 2886 disable() { 2887 const e = this; 2888 e.enabled && ((e.enabled = !1), e.params.grabCursor && e.unsetGrabCursor(), e.emit("disable")); 2889 } 2890 setProgress(e, t) { 2891 const s = this; 2892 e = Math.min(Math.max(e, 0), 1); 2893 const a = s.minTranslate(), 2894 i = (s.maxTranslate() - a) * e + a; 2895 s.translateTo(i, void 0 === t ? 0 : t), s.updateActiveIndex(), s.updateSlidesClasses(); 2896 } 2897 emitContainerClasses() { 2898 const e = this; 2899 if (!e.params._emitClasses || !e.el) return; 2900 const t = e.el.className.split(" ").filter((t) => 0 === t.indexOf("swiper") || 0 === t.indexOf(e.params.containerModifierClass)); 2901 e.emit("_containerClasses", t.join(" ")); 2902 } 2903 getSlideClasses(e) { 2904 const t = this; 2905 return t.destroyed 2906 ? "" 2907 : e.className 2908 .split(" ") 2909 .filter((e) => 0 === e.indexOf("swiper-slide") || 0 === e.indexOf(t.params.slideClass)) 2910 .join(" "); 2911 } 2912 emitSlidesClasses() { 2913 const e = this; 2914 if (!e.params._emitClasses || !e.el) return; 2915 const t = []; 2916 e.slides.each((s) => { 2917 const a = e.getSlideClasses(s); 2918 t.push({ slideEl: s, classNames: a }), e.emit("_slideClass", s, a); 2919 }), 2920 e.emit("_slideClasses", t); 2921 } 2922 slidesPerViewDynamic(e, t) { 2923 void 0 === e && (e = "current"), void 0 === t && (t = !1); 2924 const { params: s, slides: a, slidesGrid: i, slidesSizesGrid: r, size: n, activeIndex: l } = this; 2925 let o = 1; 2926 if (s.centeredSlides) { 2927 let e, 2928 t = a[l].swiperSlideSize; 2929 for (let s = l + 1; s < a.length; s += 1) a[s] && !e && ((t += a[s].swiperSlideSize), (o += 1), t > n && (e = !0)); 2930 for (let s = l - 1; s >= 0; s -= 1) a[s] && !e && ((t += a[s].swiperSlideSize), (o += 1), t > n && (e = !0)); 2931 } else if ("current" === e) 2932 for (let e = l + 1; e < a.length; e += 1) { 2933 (t ? i[e] + r[e] - i[l] < n : i[e] - i[l] < n) && (o += 1); 2934 } 2935 else 2936 for (let e = l - 1; e >= 0; e -= 1) { 2937 i[l] - i[e] < n && (o += 1); 2938 } 2939 return o; 2940 } 2941 update() { 2942 const e = this; 2943 if (!e || e.destroyed) return; 2944 const { snapGrid: t, params: s } = e; 2945 function a() { 2946 const t = e.rtlTranslate ? -1 * e.translate : e.translate, 2947 s = Math.min(Math.max(t, e.maxTranslate()), e.minTranslate()); 2948 e.setTranslate(s), e.updateActiveIndex(), e.updateSlidesClasses(); 2949 } 2950 let i; 2951 s.breakpoints && e.setBreakpoint(), 2952 e.updateSize(), 2953 e.updateSlides(), 2954 e.updateProgress(), 2955 e.updateSlidesClasses(), 2956 e.params.freeMode && e.params.freeMode.enabled 2957 ? (a(), e.params.autoHeight && e.updateAutoHeight()) 2958 : ((i = 2959 ("auto" === e.params.slidesPerView || e.params.slidesPerView > 1) && e.isEnd && !e.params.centeredSlides 2960 ? e.slideTo(e.slides.length - 1, 0, !1, !0) 2961 : e.slideTo(e.activeIndex, 0, !1, !0)), 2962 i || a()), 2963 s.watchOverflow && t !== e.snapGrid && e.checkOverflow(), 2964 e.emit("update"); 2965 } 2966 changeDirection(e, t) { 2967 void 0 === t && (t = !0); 2968 const s = this, 2969 a = s.params.direction; 2970 return ( 2971 e || (e = "horizontal" === a ? "vertical" : "horizontal"), 2972 e === a || 2973 ("horizontal" !== e && "vertical" !== e) || 2974 (s.$el.removeClass(`${s.params.containerModifierClass}${a}`).addClass(`${s.params.containerModifierClass}${e}`), 2975 s.emitContainerClasses(), 2976 (s.params.direction = e), 2977 s.slides.each((t) => { 2978 "vertical" === e ? (t.style.width = "") : (t.style.height = ""); 2979 }), 2980 s.emit("changeDirection"), 2981 t && s.update()), 2982 s 2983 ); 2984 } 2985 changeLanguageDirection(e) { 2986 const t = this; 2987 (t.rtl && "rtl" === e) || 2988 (!t.rtl && "ltr" === e) || 2989 ((t.rtl = "rtl" === e), 2990 (t.rtlTranslate = "horizontal" === t.params.direction && t.rtl), 2991 t.rtl ? (t.$el.addClass(`${t.params.containerModifierClass}rtl`), (t.el.dir = "rtl")) : (t.$el.removeClass(`${t.params.containerModifierClass}rtl`), (t.el.dir = "ltr")),
2992 t.update()); 2993 } 2994 mount(e) { 2995 const t = this; 2996 if (t.mounted) return !0; 2997 const s = d(e || t.params.el); 2998 if (!(e = s[0])) return !1; 2999 e.swiper = t; 3000 const i = () => `.${(t.params.wrapperClass || "").trim().split(" ").join(".")}`; 3001 let r = (() => { 3002 if (e && e.shadowRoot && e.shadowRoot.querySelector) { 3003 const t = d(e.shadowRoot.querySelector(i())); 3004 return (t.children = (e) => s.children(e)), t; 3005 } 3006 return s.children ? s.children(i()) : d(s).children(i()); 3007 })(); 3008 if (0 === r.length && t.params.createElements) { 3009 const e = a().createElement("div"); 3010 (r = d(e)), 3011 (e.className = t.params.wrapperClass), 3012 s.append(e), 3013 s.children(`.${t.params.slideClass}`).each((e) => { 3014 r.append(e); 3015 }); 3016 } 3017 return ( 3018 Object.assign(t, { 3019 $el: s, 3020 el: e, 3021 $wrapperEl: r, 3022 wrapperEl: r[0], 3023 mounted: !0, 3024 rtl: "rtl" === e.dir.toLowerCase() || "rtl" === s.css("direction"), 3025 rtlTranslate: "horizontal" === t.params.direction && ("rtl" === e.dir.toLowerCase() || "rtl" === s.css("direction")), 3026 wrongRTL: "-webkit-box" === r.css("display"), 3027 }), 3028 !0 3029 ); 3030 } 3031 init(e) { 3032 const t = this; 3033 if (t.initialized) return t; 3034 return ( 3035 !1 === t.mount(e) || 3036 (t.emit("beforeInit"), 3037 t.params.breakpoints && t.setBreakpoint(), 3038 t.addClasses(), 3039 t.params.loop && t.loopCreate(), 3040 t.updateSize(), 3041 t.updateSlides(), 3042 t.params.watchOverflow && t.checkOverflow(), 3043 t.params.grabCursor && t.enabled && t.setGrabCursor(), 3044 t.params.preloadImages && t.preloadImages(), 3045 t.params.loop 3046 ? t.slideTo(t.params.initialSlide + t.loopedSlides, 0, t.params.runCallbacksOnInit, !1, !0) 3047 : t.slideTo(t.params.initialSlide, 0, t.params.runCallbacksOnInit, !1, !0), 3048 t.attachEvents(), 3049 (t.initialized = !0), 3050 t.emit("init"), 3051 t.emit("afterInit")), 3052 t 3053 ); 3054 } 3055 destroy(e, t) { 3056 void 0 === e && (e = !0), void 0 === t && (t = !0); 3057 const s = this, 3058 { params: a, $el: i, $wrapperEl: r, slides: n } = s; 3059 return ( 3060 void 0 === s.params || 3061 s.destroyed || 3062 (s.emit("beforeDestroy"), 3063 (s.initialized = !1), 3064 s.detachEvents(), 3065 a.loop && s.loopDestroy(), 3066 t && 3067 (s.removeClasses(), 3068 i.removeAttr("style"), 3069 r.removeAttr("style"), 3070 n && 3071 n.length && 3072 n.removeClass([a.slideVisibleClass, a.slideActiveClass, a.slideNextClass, a.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")), 3073 s.emit("destroy"), 3074 Object.keys(s.eventsListeners).forEach((e) => { 3075 s.off(e); 3076 }), 3077 !1 !== e && 3078 ((s.$el[0].swiper = null), 3079 (function (e) { 3080 const t = e; 3081 Object.keys(t).forEach((e) => { 3082 try { 3083 t[e] = null; 3084 } catch (e) {} 3085 try { 3086 delete t[e]; 3087 } catch (e) {} 3088 }); 3089 })(s)), 3090 (s.destroyed = !0)), 3091 null 3092 ); 3093 } 3094 static extendDefaults(e) { 3095 g(_, e); 3096 } 3097 static get extendedDefaults() { 3098 return _; 3099 } 3100 static get defaults() { 3101 return W; 3102 } 3103 static installModule(e) { 3104 V.prototype.__modules__ || (V.prototype.__modules__ = []); 3105 const t = V.prototype.__modules__; 3106 "function" == typeof e && t.indexOf(e) < 0 && t.push(e); 3107 } 3108 static use(e) { 3109 return Array.isArray(e) ? (e.forEach((e) => V.installModule(e)), V) : (V.installModule(e), V); 3110 } 3111 } 3112 function F(e, t, s, i) { 3113 const r = a(); 3114 return ( 3115 e.params.createElements &&
3116 Object.keys(i).forEach((a) => { 3117 if (!s[a] && !0 === s.auto) { 3118 let n = e.$el.children(`.${i[a]}`)[0]; 3119 n || ((n = r.createElement("div")), (n.className = i[a]), e.$el.append(n)), (s[a] = n), (t[a] = n); 3120 } 3121 }), 3122 s 3123 ); 3124 } 3125 function U(e) { 3126 return ( 3127 void 0 === e && (e = ""), 3128 `.${e 3129 .trim() 3130 .replace(/([\.:!\/])/g, "\\$1") 3131 .replace(/ /g, ".")}` 3132 ); 3133 } 3134 function K(e) { 3135 const t = this, 3136 { $wrapperEl: s, params: a } = t; 3137 if ((a.loop && t.loopDestroy(), "object" == typeof e && "length" in e)) for (let t = 0; t < e.length; t += 1) e[t] && s.append(e[t]); 3138 else s.append(e); 3139 a.loop && t.loopCreate(), a.observer || t.update(); 3140 } 3141 function Z(e) { 3142 const t = this, 3143 { params: s, $wrapperEl: a, activeIndex: i } = t; 3144 s.loop && t.loopDestroy(); 3145 let r = i + 1; 3146 if ("object" == typeof e && "length" in e) { 3147 for (let t = 0; t < e.length; t += 1) e[t] && a.prepend(e[t]); 3148 r = i + e.length; 3149 } else a.prepend(e); 3150 s.loop && t.loopCreate(), s.observer || t.update(), t.slideTo(r, 0, !1); 3151 } 3152 function Q(e, t) { 3153 const s = this, 3154 { $wrapperEl: a, params: i, activeIndex: r } = s; 3155 let n = r; 3156 i.loop && ((n -= s.loopedSlides), s.loopDestroy(), (s.slides = a.children(`.${i.slideClass}`))); 3157 const l = s.slides.length; 3158 if (e <= 0) return void s.prependSlide(t); 3159 if (e >= l) return void s.appendSlide(t); 3160 let o = n > e ? n + 1 : n; 3161 const d = []; 3162 for (let t = l - 1; t >= e; t -= 1) { 3163 const e = s.slides.eq(t); 3164 e.remove(), d.unshift(e); 3165 } 3166 if ("object" == typeof t && "length" in t) { 3167 for (let e = 0; e < t.length; e += 1) t[e] && a.append(t[e]); 3168 o = n > e ? n + t.length : n; 3169 } else a.append(t); 3170 for (let e = 0; e < d.length; e += 1) a.append(d[e]); 3171 i.loop && s.loopCreate(), i.observer || s.update(), i.loop ? s.slideTo(o + s.loopedSlides, 0, !1) : s.slideTo(o, 0, !1); 3172 } 3173 function J(e) { 3174 const t = this, 3175 { params: s, $wrapperEl: a, activeIndex: i } = t; 3176 let r = i; 3177 s.loop && ((r -= t.loopedSlides), t.loopDestroy(), (t.slides = a.children(`.${s.slideClass}`))); 3178 let n, 3179 l = r; 3180 if ("object" == typeof e && "length" in e) { 3181 for (let s = 0; s < e.length; s += 1) (n = e[s]), t.slides[n] && t.slides.eq(n).remove(), n < l && (l -= 1); 3182 l = Math.max(l, 0); 3183 } else (n = e), t.slides[n] && t.slides.eq(n).remove(), n < l && (l -= 1), (l = Math.max(l, 0)); 3184 s.loop && t.loopCreate(), s.observer || t.update(), s.loop ? t.slideTo(l + t.loopedSlides, 0, !1) : t.slideTo(l, 0, !1); 3185 } 3186 function ee() { 3187 const e = this, 3188 t = []; 3189 for (let s = 0; s < e.slides.length; s += 1) t.push(s); 3190 e.removeSlide(t); 3191 } 3192 function te(e) { 3193 const { effect: t, swiper: s, on: a, setTranslate: i, setTransition: r, overwriteParams: n, perspective: l, recreateShadows: o, getEffectParams: d } = e; 3194 let c; 3195 a("beforeInit", () => { 3196 if (s.params.effect !== t) return; 3197 s.classNames.push(`${s.params.containerModifierClass}${t}`), l && l() && s.classNames.push(`${s.params.containerModifierClass}3d`); 3198 const e = n ? n() : {}; 3199 Object.assign(s.params, e), Object.assign(s.originalParams, e); 3200 }), 3201 a("setTranslate", () => { 3202 s.params.effect === t && i(); 3203 }), 3204 a("setTransition", (e, a) => { 3205 s.params.effect === t && r(a); 3206 }), 3207 a("transitionEnd", () => { 3208 if (s.params.effect === t && o) { 3209 if (!d || !d().slideShadows) return; 3210 s.slides.each((e) => { 3211 s.$(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").remove(); 3212 }), 3213 o(); 3214 } 3215 }), 3216 a("virtualUpdate", () => { 3217 s.params.effect === t && 3218 (s.slides.length || (c = !0), 3219 requestAnimationFrame(() => { 3220 c && s.slides && s.slides.length && (i(), (c = !1)); 3221 })); 3222 }); 3223 } 3224 function se(e, t) { 3225 return e.transformEl ? t.find(e.transformEl).css({ "backface-visibility": "hidden", "-webkit-backface-visibility": "hidden" }) : t; 3226 } 3227 function ae(e) { 3228 let { swiper: t, duration: s, transformEl: a, allSlides: i } = e; 3229 const { slides: r, activeIndex: n, $wrapperEl: l } = t; 3230 if (t.params.virtualTranslate && 0 !== s) { 3231 let e, 3232 s = !1; 3233 (e = i ? (a ? r.find(a) : r) : a ? r.eq(n).find(a) : r.eq(n)), 3234 e.transitionEnd(() => { 3235 if (s) return; 3236 if (!t || t.destroyed) return; 3237 (s = !0), (t.animating = !1); 3238 const e = ["webkitTransitionEnd", "transitionend"]; 3239 for (let t = 0; t < e.length; t += 1) l.trigger(e[t]); 3240 }); 3241 } 3242 } 3243 function ie(e, t, s) { 3244 const a = "swiper-slide-shadow" + (s ? `-${s}` : ""), 3245 i = e.transformEl ? t.find(e.transformEl) : t; 3246 let r = i.children(`.${a}`); 3247 return r.length || ((r = d(`<div class="swiper-slide-shadow${s ? `-${s}` : ""}"></div>`)), i.append(r)), r; 3248 }
3249 Object.keys(j).forEach((e) => { 3250 Object.keys(j[e]).forEach((t) => { 3251 V.prototype[t] = j[e][t]; 3252 }); 3253 }), 3254 V.use([ 3255 function (e) { 3256 let { swiper: t, on: s, emit: a } = e; 3257 const i = r(); 3258 let n = null, 3259 l = null; 3260 const o = () => { 3261 t && !t.destroyed && t.initialized && (a("beforeResize"), a("resize")); 3262 }, 3263 d = () => { 3264 t && !t.destroyed && t.initialized && a("orientationchange"); 3265 }; 3266 s("init", () => { 3267 t.params.resizeObserver && void 0 !== i.ResizeObserver 3268 ? t && 3269 !t.destroyed && 3270 t.initialized && 3271 ((n = new ResizeObserver((e) => { 3272 l = i.requestAnimationFrame(() => { 3273 const { width: s, height: a } = t; 3274 let i = s, 3275 r = a; 3276 e.forEach((e) => { 3277 let { contentBoxSize: s, contentRect: a, target: n } = e; 3278 (n && n !== t.el) || ((i = a ? a.width : (s[0] || s).inlineSize), (r = a ? a.height : (s[0] || s).blockSize)); 3279 }), 3280 (i === s && r === a) || o(); 3281 }); 3282 })), 3283 n.observe(t.el)) 3284 : (i.addEventListener("resize", o), i.addEventListener("orientationchange", d)); 3285 }), 3286 s("destroy", () => { 3287 l && i.cancelAnimationFrame(l), n && n.unobserve && t.el && (n.unobserve(t.el), (n = null)), i.removeEventListener("resize", o), i.removeEventListener("orientationchange", d); 3288 }); 3289 }, 3290 function (e) { 3291 let { swiper: t, extendParams: s, on: a, emit: i } = e; 3292 const n = [], 3293 l = r(), 3294 o = function (e, t) { 3295 void 0 === t && (t = {}); 3296 const s = new (l.MutationObserver || l.WebkitMutationObserver)((e) => { 3297 if (1 === e.length) return void i("observerUpdate", e[0]); 3298 const t = function () { 3299 i("observerUpdate", e[0]); 3300 }; 3301 l.requestAnimationFrame ? l.requestAnimationFrame(t) : l.setTimeout(t, 0); 3302 }); 3303 s.observe(e, { 3304 attributes: void 0 === t.attributes || t.attributes, 3305 childList: void 0 === t.childList || t.childList, 3306 characterData: void 0 === t.characterData || t.characterData, 3307 }), 3308 n.push(s); 3309 }; 3310 s({ observer: !1, observeParents: !1, observeSlideChildren: !1 }), 3311 a("init", () => { 3312 if (t.params.observer) { 3313 if (t.params.observeParents) { 3314 const e = t.$el.parents(); 3315 for (let t = 0; t < e.length; t += 1) o(e[t]); 3316 } 3317 o(t.$el[0], { childList: t.params.observeSlideChildren }), o(t.$wrapperEl[0], { attributes: !1 }); 3318 } 3319 }), 3320 a("destroy", () => { 3321 n.forEach((e) => { 3322 e.disconnect(); 3323 }), 3324 n.splice(0, n.length); 3325 }); 3326 }, 3327 ]); 3328 const re = [ 3329 function (e) { 3330 let t, 3331 { swiper: s, extendParams: a, on: i, emit: r } = e; 3332 function n(e, t) { 3333 const a = s.params.virtual; 3334 if (a.cache && s.virtual.cache[t]) return s.virtual.cache[t]; 3335 const i = a.renderSlide ? d(a.renderSlide.call(s, e, t)) : d(`<div class="${s.params.slideClass}" data-swiper-slide-index="${t}">${e}</div>`); 3336 return i.attr("data-swiper-slide-index") || i.attr("data-swiper-slide-index", t), a.cache && (s.virtual.cache[t] = i), i; 3337 } 3338 function l(e) { 3339 const { slidesPerView: t, slidesPerGroup: a, centeredSlides: i } = s.params, 3340 { addSlidesBefore: l, addSlidesAfter: o } = s.params.virtual, 3341 { from: d, to: c, slides: p, slidesGrid: u, offset: h } = s.virtual; 3342 s.params.cssMode || s.updateActiveIndex(); 3343 const m = s.activeIndex || 0; 3344 let f, g, v; 3345 (f = s.rtlTranslate ? "right" : s.isHorizontal() ? "left" : "top"), i ? ((g = Math.floor(t / 2) + a + o), (v = Math.floor(t / 2) + a + l)) : ((g = t + (a - 1) + o), (v = a + l)); 3346 const w = Math.max((m || 0) - v, 0), 3347 b = Math.min((m || 0) + g, p.length - 1), 3348 x = (s.slidesGrid[w] || 0) - (s.slidesGrid[0] || 0); 3349 function y() { 3350 s.updateSlides(), s.updateProgress(), s.updateSlidesClasses(), s.lazy && s.params.lazy.enabled && s.lazy.load(), r("virtualUpdate"); 3351 } 3352 if ((Object.assign(s.virtual, { from: w, to: b, offset: x, slidesGrid: s.slidesGrid }), d === w && c === b && !e)) 3353 return s.slidesGrid !== u && x !== h && s.slides.css(f, `${x}px`), s.updateProgress(), void r("virtualUpdate"); 3354 if (s.params.virtual.renderExternal) 3355 return ( 3356 s.params.virtual.renderExternal.call(s, { 3357 offset: x, 3358 from: w, 3359 to: b, 3360 slides: (function () { 3361 const e = []; 3362 for (let t = w; t <= b; t += 1) e.push(p[t]); 3363 return e; 3364 })(), 3365 }), 3366 void (s.params.virtual.renderExternalUpdate ? y() : r("virtualUpdate")) 3367 ); 3368 const E = [], 3369 C = []; 3370 if (e) s.$wrapperEl.find(`.${s.params.slideClass}`).remove(); 3371 else for (let e = d; e <= c; e += 1) (e < w || e > b) && s.$wrapperEl.find(`.${s.params.slideClass}[data-swiper-slide-index="${e}"]`).remove(); 3372 for (let t = 0; t < p.length; t += 1) t >= w && t <= b && (void 0 === c || e ? C.push(t) : (t > c && C.push(t), t < d && E.push(t)));
3373 C.forEach((e) => { 3374 s.$wrapperEl.append(n(p[e], e)); 3375 }), 3376 E.sort((e, t) => t - e).forEach((e) => { 3377 s.$wrapperEl.prepend(n(p[e], e)); 3378 }), 3379 s.$wrapperEl.children(".swiper-slide").css(f, `${x}px`), 3380 y(); 3381 } 3382 a({ virtual: { enabled: !1, slides: [], cache: !0, renderSlide: null, renderExternal: null, renderExternalUpdate: !0, addSlidesBefore: 0, addSlidesAfter: 0 } }), 3383 (s.virtual = { cache: {}, from: void 0, to: void 0, slides: [], offset: 0, slidesGrid: [] }), 3384 i("beforeInit", () => { 3385 s.params.virtual.enabled && 3386 ((s.virtual.slides = s.params.virtual.slides), 3387 s.classNames.push(`${s.params.containerModifierClass}virtual`), 3388 (s.params.watchSlidesProgress = !0), 3389 (s.originalParams.watchSlidesProgress = !0), 3390 s.params.initialSlide || l()); 3391 }), 3392 i("setTranslate", () => { 3393 s.params.virtual.enabled && 3394 (s.params.cssMode && !s._immediateVirtual 3395 ? (clearTimeout(t), 3396 (t = setTimeout(() => { 3397 l(); 3398 }, 100))) 3399 : l()); 3400 }), 3401 i("init update resize", () => { 3402 s.params.virtual.enabled && s.params.cssMode && v(s.wrapperEl, "--swiper-virtual-size", `${s.virtualSize}px`); 3403 }), 3404 Object.assign(s.virtual, { 3405 appendSlide: function (e) { 3406 if ("object" == typeof e && "length" in e) for (let t = 0; t < e.length; t += 1) e[t] && s.virtual.slides.push(e[t]); 3407 else s.virtual.slides.push(e); 3408 l(!0); 3409 }, 3410 prependSlide: function (e) { 3411 const t = s.activeIndex; 3412 let a = t + 1, 3413 i = 1; 3414 if (Array.isArray(e)) { 3415 for (let t = 0; t < e.length; t += 1) e[t] && s.virtual.slides.unshift(e[t]); 3416 (a = t + e.length), (i = e.length); 3417 } else s.virtual.slides.unshift(e); 3418 if (s.params.virtual.cache) { 3419 const e = s.virtual.cache, 3420 t = {}; 3421 Object.keys(e).forEach((s) => { 3422 const a = e[s], 3423 r = a.attr("data-swiper-slide-index"); 3424 r && a.attr("data-swiper-slide-index", parseInt(r, 10) + i), (t[parseInt(s, 10) + i] = a); 3425 }), 3426 (s.virtual.cache = t); 3427 } 3428 l(!0), s.slideTo(a, 0); 3429 }, 3430 removeSlide: function (e) { 3431 if (null == e) return; 3432 let t = s.activeIndex; 3433 if (Array.isArray(e)) 3434 for (let a = e.length - 1; a >= 0; a -= 1) 3435 s.virtual.slides.splice(e[a], 1), s.params.virtual.cache && delete s.virtual.cache[e[a]], e[a] < t && (t -= 1), (t = Math.max(t, 0)); 3436 else s.virtual.slides.splice(e, 1), s.params.virtual.cache && delete s.virtual.cache[e], e < t && (t -= 1), (t = Math.max(t, 0)); 3437 l(!0), s.slideTo(t, 0); 3438 }, 3439 removeAllSlides: function () { 3440 (s.virtual.slides = []), s.params.virtual.cache && (s.virtual.cache = {}), l(!0), s.slideTo(0, 0); 3441 }, 3442 update: l, 3443 }); 3444 }, 3445 function (e) { 3446 let { swiper: t, extendParams: s, on: i, emit: n } = e; 3447 const l = a(), 3448 o = r(); 3449 function c(e) { 3450 if (!t.enabled) return; 3451 const { rtlTranslate: s } = t; 3452 let a = e; 3453 a.originalEvent && (a = a.originalEvent); 3454 const i = a.keyCode || a.charCode, 3455 r = t.params.keyboard.pageUpDown, 3456 d = r && 33 === i, 3457 c = r && 34 === i, 3458 p = 37 === i, 3459 u = 39 === i, 3460 h = 38 === i, 3461 m = 40 === i; 3462 if (!t.allowSlideNext && ((t.isHorizontal() && u) || (t.isVertical() && m) || c)) return !1; 3463 if (!t.allowSlidePrev && ((t.isHorizontal() && p) || (t.isVertical() && h) || d)) return !1; 3464 if ( 3465 !( 3466 a.shiftKey || 3467 a.altKey || 3468 a.ctrlKey || 3469 a.metaKey || 3470 (l.activeElement && l.activeElement.nodeName && ("input" === l.activeElement.nodeName.toLowerCase() || "textarea" === l.activeElement.nodeName.toLowerCase())) 3471 ) 3472 ) { 3473 if (t.params.keyboard.onlyInViewport && (d || c || p || u || h || m)) { 3474 let e = !1; 3475 if (t.$el.parents(`.${t.params.slideClass}`).length > 0 && 0 === t.$el.parents(`.${t.params.slideActiveClass}`).length) return; 3476 const a = t.$el, 3477 i = a[0].clientWidth, 3478 r = a[0].clientHeight, 3479 n = o.innerWidth, 3480 l = o.innerHeight, 3481 d = t.$el.offset(); 3482 s && (d.left -= t.$el[0].scrollLeft); 3483 const c = [ 3484 [d.left, d.top], 3485 [d.left + i, d.top], 3486 [d.left, d.top + r], 3487 [d.left + i, d.top + r], 3488 ]; 3489 for (let t = 0; t < c.length; t += 1) { 3490 const s = c[t]; 3491 if (s[0] >= 0 && s[0] <= n && s[1] >= 0 && s[1] <= l) { 3492 if (0 === s[0] && 0 === s[1]) continue; 3493 e = !0; 3494 } 3495 } 3496 if (!e) return; 3497 } 3498 t.isHorizontal() 3499 ? ((d || c || p || u) && (a.preventDefault ? a.preventDefault() : (a.returnValue = !1)), 3500 (((c || u) && !s) || ((d || p) && s)) && t.slideNext(), 3501 (((d || p) && !s) || ((c || u) && s)) && t.slidePrev()) 3502 : ((d || c || h || m) && (a.preventDefault ? a.preventDefault() : (a.returnValue = !1)), (c || m) && t.slideNext(), (d || h) && t.slidePrev()), 3503 n("keyPress", i); 3504 } 3505 } 3506 function p() { 3507 t.keyboard.enabled || (d(l).on("keydown", c), (t.keyboard.enabled = !0)); 3508 } 3509 function u() { 3510 t.keyboard.enabled && (d(l).off("keydown", c), (t.keyboard.enabled = !1)); 3511 } 3512 (t.keyboard = { enabled: !1 }), 3513 s({ keyboard: { enabled: !1, onlyInViewport: !0, pageUpDown: !0 } }), 3514 i("init", () => { 3515 t.params.keyboard.enabled && p(); 3516 }), 3517 i("destroy", () => { 3518 t.keyboard.enabled && u(); 3519 }), 3520 Object.assign(t.keyboard, { enable: p, disable: u }); 3521 }, 3522 function (e) { 3523 let { swiper: t, extendParams: s, on: a, emit: i } = e; 3524 const n = r(); 3525 let l; 3526 s({ mousewheel: { enabled: !1, releaseOnEdges: !1, invert: !1, forceToAxis: !1, sensitivity: 1, eventsTarget: "container", thresholdDelta: null, thresholdTime: null } }), 3527 (t.mousewheel = { enabled: !1 }); 3528 let o, 3529 c = u(); 3530 const h = []; 3531 function m() { 3532 t.enabled && (t.mouseEntered = !0); 3533 } 3534 function f() { 3535 t.enabled && (t.mouseEntered = !1); 3536 } 3537 function g(e) { 3538 return ( 3539 !(t.params.mousewheel.thresholdDelta && e.delta < t.params.mousewheel.thresholdDelta) && 3540 !(t.params.mousewheel.thresholdTime && u() - c < t.params.mousewheel.thresholdTime) && 3541 ((e.delta >= 6 && u() - c < 60) || 3542 (e.direction < 0 3543 ? (t.isEnd && !t.params.loop) || t.animating || (t.slideNext(), i("scroll", e.raw)) 3544 : (t.isBeginning && !t.params.loop) || t.animating || (t.slidePrev(), i("scroll", e.raw)), 3545 (c = new n.Date().getTime()), 3546 !1)) 3547 ); 3548 } 3549 function v(e) { 3550 let s = e, 3551 a = !0; 3552 if (!t.enabled) return; 3553 const r = t.params.mousewheel; 3554 t.params.cssMode && s.preventDefault(); 3555 let n = t.$el; 3556 if (("container" !== t.params.mousewheel.eventsTarget && (n = d(t.params.mousewheel.eventsTarget)), !t.mouseEntered && !n[0].contains(s.target) && !r.releaseOnEdges)) return !0; 3557 s.originalEvent && (s = s.originalEvent); 3558 let c = 0; 3559 const m = t.rtlTranslate ? -1 : 1, 3560 f = (function (e) { 3561 let t = 0, 3562 s = 0, 3563 a = 0, 3564 i = 0; 3565 return ( 3566 "detail" in e && (s = e.detail), 3567 "wheelDelta" in e && (s = -e.wheelDelta / 120), 3568 "wheelDeltaY" in e && (s = -e.wheelDeltaY / 120), 3569 "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), 3570 "axis" in e && e.axis === e.HORIZONTAL_AXIS && ((t = s), (s = 0)), 3571 (a = 10 * t), 3572 (i = 10 * s), 3573 "deltaY" in e && (i = e.deltaY), 3574 "deltaX" in e && (a = e.deltaX), 3575 e.shiftKey && !a && ((a = i), (i = 0)), 3576 (a || i) && e.deltaMode && (1 === e.deltaMode ? ((a *= 40), (i *= 40)) : ((a *= 800), (i *= 800))), 3577 a && !t && (t = a < 1 ? -1 : 1), 3578 i && !s && (s = i < 1 ? -1 : 1), 3579 { spinX: t, spinY: s, pixelX: a, pixelY: i } 3580 ); 3581 })(s); 3582 if (r.forceToAxis) 3583 if (t.isHorizontal()) { 3584 if (!(Math.abs(f.pixelX) > Math.abs(f.pixelY))) return !0; 3585 c = -f.pixelX * m; 3586 } else { 3587 if (!(Math.abs(f.pixelY) > Math.abs(f.pixelX))) return !0; 3588 c = -f.pixelY; 3589 } 3590 else c = Math.abs(f.pixelX) > Math.abs(f.pixelY) ? -f.pixelX * m : -f.pixelY; 3591 if (0 === c) return !0; 3592 r.invert && (c = -c); 3593 let v = t.getTranslate() + c * r.sensitivity; 3594 if ( 3595 (v >= t.minTranslate() && (v = t.minTranslate()), 3596 v <= t.maxTranslate() && (v = t.maxTranslate()), 3597 (a = !!t.params.loop || !(v === t.minTranslate() || v === t.maxTranslate())), 3598 a && t.params.nested && s.stopPropagation(), 3599 t.params.freeMode && t.params.freeMode.enabled) 3600 ) { 3601 const e = { time: u(), delta: Math.abs(c), direction: Math.sign(c) }, 3602 a = o && e.time < o.time + 500 && e.delta <= o.delta && e.direction === o.direction; 3603 if (!a) { 3604 (o = void 0), t.params.loop && t.loopFix(); 3605 let n = t.getTranslate() + c * r.sensitivity; 3606 const d = t.isBeginning, 3607 u = t.isEnd; 3608 if ( 3609 (n >= t.minTranslate() && (n = t.minTranslate()), 3610 n <= t.maxTranslate() && (n = t.maxTranslate()), 3611 t.setTransition(0), 3612 t.setTranslate(n), 3613 t.updateProgress(), 3614 t.updateActiveIndex(), 3615 t.updateSlidesClasses(), 3616 ((!d && t.isBeginning) || (!u && t.isEnd)) && t.updateSlidesClasses(), 3617 t.params.freeMode.sticky) 3618 ) { 3619 clearTimeout(l), (l = void 0), h.length >= 15 && h.shift(); 3620 const s = h.length ? h[h.length - 1] : void 0, 3621 a = h[0]; 3622 if ((h.push(e), s && (e.delta > s.delta || e.direction !== s.direction))) h.splice(0); 3623 else if (h.length >= 15 && e.time - a.time < 500 && a.delta - e.delta >= 1 && e.delta <= 6) { 3624 const s = c > 0 ? 0.8 : 0.2; 3625 (o = e), 3626 h.splice(0), 3627 (l = p(() => { 3628 t.slideToClosest(t.params.speed, !0, void 0, s); 3629 }, 0)); 3630 } 3631 l || 3632 (l = p(() => { 3633 (o = e), h.splice(0), t.slideToClosest(t.params.speed, !0, void 0, 0.5); 3634 }, 500)); 3635 } 3636 if ((a || i("scroll", s), t.params.autoplay && t.params.autoplayDisableOnInteraction && t.autoplay.stop(), n === t.minTranslate() || n === t.maxTranslate())) return !0; 3637 } 3638 } else { 3639 const s = { time: u(), delta: Math.abs(c), direction: Math.sign(c), raw: e }; 3640 h.length >= 2 && h.shift(); 3641 const a = h.length ? h[h.length - 1] : void 0; 3642 if ( 3643 (h.push(s), 3644 a ? (s.direction !== a.direction || s.delta > a.delta || s.time > a.time + 150) && g(s) : g(s), 3645 (function (e) { 3646 const s = t.params.mousewheel; 3647 if (e.direction < 0) { 3648 if (t.isEnd && !t.params.loop && s.releaseOnEdges) return !0; 3649 } else if (t.isBeginning && !t.params.loop && s.releaseOnEdges) return !0; 3650 return !1; 3651 })(s)) 3652 ) 3653 return !0; 3654 } 3655 return s.preventDefault ? s.preventDefault() : (s.returnValue = !1), !1; 3656 } 3657 function w(e) { 3658 let s = t.$el; 3659 "container" !== t.params.mousewheel.eventsTarget && (s = d(t.params.mousewheel.eventsTarget)), s[e]("mouseenter", m), s[e]("mouseleave", f), s[e]("wheel", v); 3660 } 3661 function b() { 3662 return t.params.cssMode ? (t.wrapperEl.removeEventListener("wheel", v), !0) : !t.mousewheel.enabled && (w("on"), (t.mousewheel.enabled = !0), !0); 3663 } 3664 function x() { 3665 return t.params.cssMode ? (t.wrapperEl.addEventListener(event, v), !0) : !!t.mousewheel.enabled && (w("off"), (t.mousewheel.enabled = !1), !0); 3666 } 3667 a("init", () => { 3668 !t.params.mousewheel.enabled && t.params.cssMode && x(), t.params.mousewheel.enabled && b(); 3669 }), 3670 a("destroy", () => { 3671 t.params.cssMode && b(), t.mousewheel.enabled && x(); 3672 }), 3673
3673 Object.assign(t.mousewheel, { enable: b, disable: x }); 3674 }, 3675 function (e) { 3676 let { swiper: t, extendParams: s, on: a, emit: i } = e; 3677 function r(e) { 3678 let s; 3679 return e && ((s = d(e)), t.params.uniqueNavElements && "string" == typeof e && s.length > 1 && 1 === t.$el.find(e).length && (s = t.$el.find(e))), s; 3680 } 3681 function n(e, s) { 3682 const a = t.params.navigation; 3683 e && 3684 e.length > 0 && 3685 (e[s ? "addClass" : "removeClass"](a.disabledClass), 3686 e[0] && "BUTTON" === e[0].tagName && (e[0].disabled = s), 3687 t.params.watchOverflow && t.enabled && e[t.isLocked ? "addClass" : "removeClass"](a.lockClass)); 3688 } 3689 function l() { 3690 if (t.params.loop) return; 3691 const { $nextEl: e, $prevEl: s } = t.navigation; 3692 n(s, t.isBeginning && !t.params.rewind), n(e, t.isEnd && !t.params.rewind); 3693 } 3694 function o(e) { 3695 e.preventDefault(), (!t.isBeginning || t.params.loop || t.params.rewind) && (t.slidePrev(), i("navigationPrev")); 3696 } 3697 function c(e) { 3698 e.preventDefault(), (!t.isEnd || t.params.loop || t.params.rewind) && (t.slideNext(), i("navigationNext")); 3699 } 3700 function p() { 3701 const e = t.params.navigation; 3702 if (((t.params.navigation = F(t, t.originalParams.navigation, t.params.navigation, { nextEl: "swiper-button-next", prevEl: "swiper-button-prev" })), !e.nextEl && !e.prevEl)) return; 3703 const s = r(e.nextEl), 3704 a = r(e.prevEl); 3705 s && s.length > 0 && s.on("click", c), 3706 a && a.length > 0 && a.on("click", o), 3707 Object.assign(t.navigation, { $nextEl: s, nextEl: s && s[0], $prevEl: a, prevEl: a && a[0] }), 3708 t.enabled || (s && s.addClass(e.lockClass), a && a.addClass(e.lockClass)); 3709 } 3710 function u() { 3711 const { $nextEl: e, $prevEl: s } = t.navigation; 3712 e && e.length && (e.off("click", c), e.removeClass(t.params.navigation.disabledClass)), s && s.length && (s.off("click", o), s.removeClass(t.params.navigation.disabledClass)); 3713 } 3714 s({ 3715 navigation: { 3716 nextEl: null, 3717 prevEl: null, 3718 hideOnClick: !1, 3719 disabledClass: "swiper-button-disabled", 3720 hiddenClass: "swiper-button-hidden", 3721 lockClass: "swiper-button-lock", 3722 navigationDisabledClass: "swiper-navigation-disabled", 3723 }, 3724 }), 3725 (t.navigation = { nextEl: null, $nextEl: null, prevEl: null, $prevEl: null }), 3726 a("init", () => { 3727 !1 === t.params.navigation.enabled ? h() : (p(), l()); 3728 }), 3729 a("toEdge fromEdge lock unlock", () => { 3730 l(); 3731 }), 3732 a("destroy", () => { 3733 u(); 3734 }), 3735 a("enable disable", () => { 3736 const { $nextEl: e, $prevEl: s } = t.navigation; 3737 e && e[t.enabled ? "removeClass" : "addClass"](t.params.navigation.lockClass), s && s[t.enabled ? "removeClass" : "addClass"](t.params.navigation.lockClass); 3738 }), 3739 a("click", (e, s) => { 3740 const { $nextEl: a, $prevEl: r } = t.navigation, 3741 n = s.target; 3742 if (t.params.navigation.hideOnClick && !d(n).is(r) && !d(n).is(a)) { 3743 if (t.pagination && t.params.pagination && t.params.pagination.clickable && (t.pagination.el === n || t.pagination.el.contains(n))) return; 3744 let e; 3745 a ? (e = a.hasClass(t.params.navigation.hiddenClass)) : r && (e = r.hasClass(t.params.navigation.hiddenClass)), 3746 i(!0 === e ? "navigationShow" : "navigationHide"), 3747 a && a.toggleClass(t.params.navigation.hiddenClass), 3748 r && r.toggleClass(t.params.navigation.hiddenClass); 3749 } 3750 }); 3751 const h = () => { 3752 t.$el.addClass(t.params.navigation.navigationDisabledClass), u(); 3753 }; 3754 Object.assign(t.navigation, { 3755 enable: () => { 3756 t.$el.removeClass(t.params.navigation.navigationDisabledClass), p(), l(); 3757 }, 3758 disable: h, 3759 update: l, 3760 init: p, 3761 destroy: u, 3762 }); 3763 }, 3764 function (e) { 3765 let { swiper: t, extendParams: s, on: a, emit: i } = e; 3766 const r = "swiper-pagination"; 3767 let n; 3768 s({ 3769 pagination: { 3770 el: null, 3771 bulletElement: "span", 3772 clickable: !1, 3773 hideOnClick: !1, 3774 renderBullet: null, 3775 renderProgressbar: null, 3776 renderFraction: null, 3777 renderCustom: null, 3778 progressbarOpposite: !1, 3779 type: "bullets", 3780 dynamicBullets: !1, 3781 dynamicMainBullets: 1, 3782 formatFractionCurrent: (e) => e, 3783 formatFractionTotal: (e) => e, 3784 bulletClass: `${r}-bullet`, 3785 bulletActiveClass: `${r}-bullet-active`, 3786 modifierClass: `${r}-`, 3787 currentClass: `${r}-current`, 3788 totalClass: `${r}-total`, 3789 hiddenClass: `${r}-hidden`, 3790 progressbarFillClass: `${r}-progressbar-fill`, 3791 progressbarOppositeClass: `${r}-progressbar-opposite`, 3792 clickableClass: `${r}-clickable`, 3793 lockClass: `${r}-lock`, 3794 horizontalClass: `${r}-horizontal`, 3795 verticalClass: `${r}-vertical`, 3796 paginationDisabledClass: `${r}-disabled`, 3797 }, 3798 }), 3799 (t.pagination = { el: null, $el: null, bullets: [] }); 3800 let l = 0; 3801 function o() { 3802 return !t.params.pagination.el || !t.pagination.el || !t.pagination.$el || 0 === t.pagination.$el.length; 3803 } 3804 function c(e, s) { 3805 const { bulletActiveClass: a } = t.params.pagination; 3806 e[s]().addClass(`${a}-${s}`)[s]().addClass(`${a}-${s}-${s}`); 3807 } 3808 function p() { 3809 const e = t.rtl, 3810 s = t.params.pagination; 3811 if (o()) return; 3812 const a = t.virtual && t.params.virtual.enabled ? t.virtual.slides.length : t.slides.length, 3813 r = t.pagination.$el; 3814 let p; 3815 const u = t.params.loop ? Math.ceil((a - 2 * t.loopedSlides) / t.params.slidesPerGroup) : t.snapGrid.length; 3816 if ( 3817 (t.params.loop 3818 ? ((p = Math.ceil((t.activeIndex - t.loopedSlides) / t.params.slidesPerGroup)), 3819 p > a - 1 - 2 * t.loopedSlides && (p -= a - 2 * t.loopedSlides), 3820 p > u - 1 && (p -= u), 3821 p < 0 && "bullets" !== t.params.paginationType && (p = u + p)) 3822 : (p = void 0 !== t.snapIndex ? t.snapIndex : t.activeIndex || 0), 3823 "bullets" === s.type && t.pagination.bullets && t.pagination.bullets.length > 0) 3824 ) { 3825 const a = t.pagination.bullets; 3826 let i, o, u; 3827 if ( 3828 (s.dynamicBullets && 3829 ((n = a.eq(0)[t.isHorizontal() ? "outerWidth" : "outerHeight"](!0)), 3830 r.css(t.isHorizontal() ? "width" : "height", n * (s.dynamicMainBullets + 4) + "px"), 3831 s.dynamicMainBullets > 1 && 3832 void 0 !== t.previousIndex && 3833 ((l += p - (t.previousIndex - t.loopedSlides || 0)), l > s.dynamicMainBullets - 1 ? (l = s.dynamicMainBullets - 1) : l < 0 && (l = 0)), 3834 (i = Math.max(p - l, 0)), 3835 (o = i + (Math.min(a.length, s.dynamicMainBullets) - 1)), 3836 (u = (o + i) / 2)), 3837 a.removeClass(["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((e) => `${s.bulletActiveClass}${e}`).join(" ")), 3838 r.length > 1) 3839 ) 3840 a.each((e) => { 3841 const t = d(e), 3842 a = t.index(); 3843 a === p && t.addClass(s.bulletActiveClass), 3844 s.dynamicBullets && (a >= i && a <= o && t.addClass(`${s.bulletActiveClass}-main`), a === i && c(t, "prev"), a === o && c(t, "next")); 3845 }); 3846 else { 3847 const e = a.eq(p), 3848 r = e.index(); 3849 if ((e.addClass(s.bulletActiveClass), s.dynamicBullets)) { 3850 const e = a.eq(i), 3851 n = a.eq(o); 3852 for (let e = i; e <= o; e += 1) a.eq(e).addClass(`${s.bulletActiveClass}-main`); 3853 if (t.params.loop) 3854 if (r >= a.length) { 3855 for (let e = s.dynamicMainBullets; e >= 0; e -= 1) a.eq(a.length - e).addClass(`${s.bulletActiveClass}-main`); 3856 a.eq(a.length - s.dynamicMainBullets - 1).addClass(`${s.bulletActiveClass}-prev`); 3857 } else c(e, "prev"), c(n, "next"); 3858 else c(e, "prev"), c(n, "next"); 3859 } 3860 } 3861 if (s.dynamicBullets) { 3862 const i = Math.min(a.length, s.dynamicMainBullets + 4), 3863 r = (n * i - n) / 2 - u * n, 3864 l = e ? "right" : "left"; 3865 a.css(t.isHorizontal() ? l : "top", `${r}px`); 3866 } 3867 } 3868 if (("fraction" === s.type && (r.find(U(s.currentClass)).text(s.formatFractionCurrent(p + 1)), r.find(U(s.totalClass)).text(s.formatFractionTotal(u))), "progressbar" === s.type)) { 3869 let e; 3870 e = s.progressbarOpposite ? (t.isHorizontal() ? "vertical" : "horizontal") : t.isHorizontal() ? "horizontal" : "vertical"; 3871 const a = (p + 1) / u; 3872 let i = 1, 3873 n = 1; 3874 "horizontal" === e ? (i = a) : (n = a), r.find(U(s.progressbarFillClass)).transform(`translate3d(0,
38740,0) scaleX(${i}) scaleY(${n})`).transition(t.params.speed); 3875 } 3876 "custom" === s.type && s.renderCustom ? (r.html(s.renderCustom(t, p + 1, u)), i("paginationRender", r[0])) : i("paginationUpdate", r[0]), 3877 t.params.watchOverflow && t.enabled && r[t.isLocked ? "addClass" : "removeClass"](s.lockClass); 3878 } 3879 function u() { 3880 const e = t.params.pagination; 3881 if (o()) return; 3882 const s = t.virtual && t.params.virtual.enabled ? t.virtual.slides.length : t.slides.length, 3883 a = t.pagination.$el; 3884 let r = ""; 3885 if ("bullets" === e.type) { 3886 let i = t.params.loop ? Math.ceil((s - 2 * t.loopedSlides) / t.params.slidesPerGroup) : t.snapGrid.length; 3887 t.params.freeMode && t.params.freeMode.enabled && !t.params.loop && i > s && (i = s); 3888 for (let s = 0; s < i; s += 1) e.renderBullet ? (r += e.renderBullet.call(t, s, e.bulletClass)) : (r += `<${e.bulletElement} class="${e.bulletClass}"></${e.bulletElement}>`); 3889 a.html(r), (t.pagination.bullets = a.find(U(e.bulletClass))); 3890 } 3891 "fraction" === e.type && 3892 ((r = e.renderFraction ? e.renderFraction.call(t, e.currentClass, e.totalClass) : `<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`), a.html(r)), 3893 "progressbar" === e.type && ((r = e.renderProgressbar ? e.renderProgressbar.call(t, e.progressbarFillClass) : `<span class="${e.progressbarFillClass}"></span>`), a.html(r)), 3894 "custom" !== e.type && i("paginationRender", t.pagination.$el[0]); 3895 } 3896 function h() { 3897 t.params.pagination = F(t, t.originalParams.pagination, t.params.pagination, { el: "swiper-pagination" }); 3898 const e = t.params.pagination; 3899 if (!e.el) return; 3900 let s = d(e.el); 3901 0 !== s.length && 3902 (t.params.uniqueNavElements && "string" == typeof e.el && s.length > 1 && ((s = t.$el.find(e.el)), s.length > 1 && (s = s.filter((e) => d(e).parents(".swiper")[0] === t.el))), 3903 "bullets" === e.type && e.clickable && s.addClass(e.clickableClass), 3904 s.addClass(e.modifierClass + e.type), 3905 s.addClass(t.isHorizontal() ? e.horizontalClass : e.verticalClass), 3906 "bullets" === e.type && e.dynamicBullets && (s.addClass(`${e.modifierClass}${e.type}-dynamic`), (l = 0), e.dynamicMainBullets < 1 && (e.dynamicMainBullets = 1)), 3907 "progressbar" === e.type && e.progressbarOpposite && s.addClass(e.progressbarOppositeClass), 3908 e.clickable && 3909 s.on("click", U(e.bulletClass), function (e) { 3910 e.preventDefault(); 3911 let s = d(this).index() * t.params.slidesPerGroup; 3912 t.params.loop && (s += t.loopedSlides), t.slideTo(s); 3913 }), 3914 Object.assign(t.pagination, { $el: s, el: s[0] }), 3915 t.enabled || s.addClass(e.lockClass)); 3916 } 3917 function m() { 3918 const e = t.params.pagination; 3919 if (o()) return; 3920 const s = t.pagination.$el; 3921 s.removeClass(e.hiddenClass), 3922 s.removeClass(e.modifierClass + e.type), 3923 s.removeClass(t.isHorizontal() ? e.horizontalClass : e.verticalClass), 3924 t.pagination.bullets && t.pagination.bullets.removeClass && t.pagination.bullets.removeClass(e.bulletActiveClass), 3925 e.clickable && s.off("click", U(e.bulletClass)); 3926 } 3927 a("init", () => { 3928 !1 === t.params.pagination.enabled ? f() : (h(), u(), p()); 3929 }), 3930 a("activeIndexChange", () => { 3931 (t.params.loop || void 0 === t.snapIndex) && p(); 3932 }), 3933 a("snapIndexChange", () => { 3934 t.params.loop || p(); 3935 }), 3936 a("slidesLengthChange", () => { 3937 t.params.loop && (u(), p()); 3938 }), 3939 a("snapGridLengthChange", () => { 3940 t.params.loop || (u(), p()); 3941 }), 3942 a("destroy", () => { 3943 m(); 3944 }), 3945 a("enable disable", () => { 3946 const { $el: e } = t.pagination; 3947 e && e[t.enabled ? "removeClass" : "addClass"](t.params.pagination.lockClass); 3948 }), 3949 a("lock unlock", () => { 3950 p(); 3951 }), 3952 a("click", (e, s) => { 3953 const a = s.target, 3954 { $el: r } = t.pagination; 3955 if (t.params.pagination.el && t.params.pagination.hideOnClick && r && r.length > 0 && !d(a).hasClass(t.params.pagination.bulletClass)) { 3956 if (t.navigation && ((t.navigation.nextEl && a === t.navigation.nextEl) || (t.navigation.prevEl && a === t.navigation.prevEl))) return; 3957 const e = r.hasClass(t.params.pagination.hiddenClass); 3958 i(!0 === e ? "paginationShow" : "paginationHide"), r.toggleClass(t.params.pagination.hiddenClass); 3959 } 3960 }); 3961 const f = () => { 3962 t.$el.addClass(t.params.pagination.paginationDisabledClass), t.pagination.$el && t.pagination.$el.addClass(t.params.pagination.paginationDisabledClass), m(); 3963 }; 3964 Object.assign(t.pagination, { 3965 enable: () => { 3966 t.$el.removeClass(t.params.pagination.paginationDisabledClass), t.pagination.$el && t.pagination.$el.removeClass(t.params.pagination.paginationDisabledClass), h(), u(), p(); 3967 }, 3968 disable: f, 3969 render: u, 3970 update: p, 3971 init: h, 3972 destroy: m, 3973 }); 3974 }, 3975 function (e) { 3976 let { swiper: t, extendParams: s, on: i, emit: r }
3976 = e; 3977 const n = a(); 3978 let l, 3979 o, 3980 c, 3981 u, 3982 h = !1, 3983 m = null, 3984 f = null; 3985 function g() { 3986 if (!t.params.scrollbar.el || !t.scrollbar.el) return; 3987 const { scrollbar: e, rtlTranslate: s, progress: a } = t, 3988 { $dragEl: i, $el: r } = e, 3989 n = t.params.scrollbar; 3990 let l = o, 3991 d = (c - o) * a; 3992 s ? ((d = -d), d > 0 ? ((l = o - d), (d = 0)) : -d + o > c && (l = c + d)) : d < 0 ? ((l = o + d), (d = 0)) : d + o > c && (l = c - d), 3993 t.isHorizontal() ? (i.transform(`translate3d(${d}px, 0, 0)`), (i[0].style.width = `${l}px`)) : (i.transform(`translate3d(0px, ${d}px, 0)`), (i[0].style.height = `${l}px`)), 3994 n.hide && 3995 (clearTimeout(m), 3996 (r[0].style.opacity = 1), 3997 (m = setTimeout(() => { 3998 (r[0].style.opacity = 0), r.transition(400); 3999 }, 1e3))); 4000 } 4001 function v() { 4002 if (!t.params.scrollbar.el || !t.scrollbar.el) return; 4003 const { scrollbar: e } = t, 4004 { $dragEl: s, $el: a } = e; 4005 (s[0].style.width = ""), 4006 (s[0].style.height = ""), 4007 (c = t.isHorizontal() ? a[0].offsetWidth : a[0].offsetHeight), 4008 (u = t.size / (t.virtualSize + t.params.slidesOffsetBefore - (t.params.centeredSlides ? t.snapGrid[0] : 0))), 4009 (o = "auto" === t.params.scrollbar.dragSize ? c * u : parseInt(t.params.scrollbar.dragSize, 10)), 4010 t.isHorizontal() ? (s[0].style.width = `${o}px`) : (s[0].style.height = `${o}px`), 4011 (a[0].style.display = u >= 1 ? "none" : ""), 4012 t.params.scrollbar.hide && (a[0].style.opacity = 0), 4013 t.params.watchOverflow && t.enabled && e.$el[t.isLocked ? "addClass" : "removeClass"](t.params.scrollbar.lockClass); 4014 } 4015 function w(e) { 4016 return t.isHorizontal() 4017 ? "touchstart" === e.type || "touchmove" === e.type 4018 ? e.targetTouches[0].clientX 4019 : e.clientX 4020 : "touchstart" === e.type || "touchmove" === e.type 4021 ? e.targetTouches[0].clientY 4022 : e.clientY; 4023 } 4024 function b(e) { 4025 const { scrollbar: s, rtlTranslate: a } = t, 4026 { $el: i } = s; 4027 let r; 4028 (r = (w(e) - i.offset()[t.isHorizontal() ? "left" : "top"] - (null !== l ? l : o / 2)) / (c - o)), (r = Math.max(Math.min(r, 1), 0)), a && (r = 1 - r); 4029 const n = t.minTranslate() + (t.maxTranslate() - t.minTranslate()) * r; 4030 t.updateProgress(n), t.setTranslate(n), t.updateActiveIndex(), t.updateSlidesClasses(); 4031 } 4032 function x(e) { 4033 const s = t.params.scrollbar, 4034 { scrollbar: a, $wrapperEl: i } = t, 4035 { $el: n, $dragEl: o } = a; 4036 (h = !0), 4037 (l = e.target === o[0] || e.target === o ? w(e) - e.target.getBoundingClientRect()[t.isHorizontal() ? "left" : "top"] : null),
4038 e.preventDefault(), 4039 e.stopPropagation(), 4040 i.transition(100), 4041 o.transition(100), 4042 b(e), 4043 clearTimeout(f), 4044 n.transition(0), 4045 s.hide && n.css("opacity", 1), 4046 t.params.cssMode && t.$wrapperEl.css("scroll-snap-type", "none"), 4047 r("scrollbarDragStart", e); 4048 } 4049 function y(e) { 4050 const { scrollbar: s, $wrapperEl: a } = t, 4051 { $el: i, $dragEl: n } = s; 4052 h && (e.preventDefault ? e.preventDefault() : (e.returnValue = !1), b(e), a.transition(0), i.transition(0), n.transition(0), r("scrollbarDragMove", e)); 4053 } 4054 function E(e) { 4055 const s = t.params.scrollbar, 4056 { scrollbar: a, $wrapperEl: i } = t, 4057 { $el: n } = a; 4058 h && 4059 ((h = !1), 4060 t.params.cssMode && (t.$wrapperEl.css("scroll-snap-type", ""), i.transition("")), 4061 s.hide && 4062 (clearTimeout(f), 4063 (f = p(() => { 4064 n.css("opacity", 0), n.transition(400); 4065 }, 1e3))), 4066 r("scrollbarDragEnd", e), 4067 s.snapOnRelease && t.slideToClosest()); 4068 } 4069 function C(e) { 4070 const { scrollbar: s, touchEventsTouch: a, touchEventsDesktop: i, params: r, support: l } = t, 4071 o = s.$el; 4072 if (!o) return; 4073 const d = o[0], 4074 c = !(!l.passiveListener || !r.passiveListeners) && { passive: !1, capture: !1 }, 4075 p = !(!l.passiveListener || !r.passiveListeners) && { passive: !0, capture: !1 }; 4076 if (!d) return; 4077 const u = "on" === e ? "addEventListener" : "removeEventListener"; 4078 l.touch ? (d[u](a.start, x, c), d[u](a.move, y, c), d[u](a.end, E, p)) : (d[u](i.start, x, c), n[u](i.move, y, c), n[u](i.end, E, p)); 4079 } 4080 function T() { 4081 const { scrollbar: e, $el: s } = t; 4082 t.params.scrollbar = F(t, t.originalParams.scrollbar, t.params.scrollbar, { el: "swiper-scrollbar" }); 4083 const a = t.params.scrollbar; 4084 if (!a.el) return; 4085 let i = d(a.el); 4086 t.params.uniqueNavElements && "string" == typeof a.el && i.length > 1 && 1 === s.find(a.el).length && (i = s.find(a.el)), 4087 i.addClass(t.isHorizontal() ? a.horizontalClass : a.verticalClass); 4088 let r = i.find(`.${t.params.scrollbar.dragClass}`); 4089 0 === r.length && ((r = d(`<div class="${t.params.scrollbar.dragClass}"></div>`)), i.append(r)), 4090 Object.assign(e, { $el: i, el: i[0], $dragEl: r, dragEl: r[0] }), 4091 a.draggable && t.params.scrollbar.el && t.scrollbar.el && C("on"), 4092 i && i[t.enabled ? "removeClass" : "addClass"](t.params.scrollbar.lockClass); 4093 } 4094 function $() { 4095 const e = t.params.scrollbar, 4096 s = t.scrollbar.$el; 4097 s && s.removeClass(t.isHorizontal() ? e.horizontalClass : e.verticalClass), t.params.scrollbar.el && t.scrollbar.el && C("off"); 4098 } 4099 s({ 4100 scrollbar: { 4101 el: null, 4102 dragSize: "auto", 4103 hide: !1, 4104 draggable: !1, 4105 snapOnRelease: !0, 4106 lockClass: "swiper-scrollbar-lock", 4107 dragClass: "swiper-scrollbar-drag", 4108 scrollbarDisabledClass: "swiper-scrollbar-disabled", 4109 horizontalClass: "swiper-scrollbar-horizontal", 4110 verticalClass: "swiper-scrollbar-vertical", 4111 }, 4112 }), 4113 (t.scrollbar = { el: null, dragEl: null, $el: null, $dragEl: null }), 4114 i("init", () => { 4115 !1 === t.params.scrollbar.enabled ? S() : (T(), v(), g()); 4116 }), 4117 i("update resize observerUpdate lock unlock", () => { 4118 v(); 4119 }), 4120 i("setTranslate", () => { 4121 g(); 4122 }), 4123 i("setTransition", (e, s) => { 4124 !(function (e) { 4125 t.params.scrollbar.el && t.scrollbar.el && t.scrollbar.$dragEl.transition(e); 4126 })(s); 4127 }), 4128 i("enable disable", () => { 4129 const { $el: e } = t.scrollbar; 4130 e && e[t.enabled ? "removeClass" : "addClass"](t.params.scrollbar.lockClass); 4131 }), 4132 i("destroy", () => { 4133 $(); 4134 }); 4135 const S = () => { 4136 t.$el.addClass(t.params.scrollbar.scrollbarDisabledClass), t.scrollbar.$el && t.scrollbar.$el.addClass(t.params.scrollbar.scrollbarDisabledClass), $(); 4137 }; 4138 Object.assign(t.scrollbar, { 4139 enable: () => { 4140 t.$el.removeClass(t.params.scrollbar.scrollbarDisabledClass), t.scrollbar.$el && t.scrollbar.$el.removeClass(t.params.scrollbar.scrollbarDisabledClass), T(), v(), g(); 4141 }, 4142 disable: S, 4143 updateSize: v, 4144 setTranslate: g, 4145 init: T, 4146 destroy: $, 4147 }); 4148 }, 4149 function (e) { 4150 let { swiper: t, extendParams: s, on: a } = e; 4151 s({ parallax: { enabled: !1 } }); 4152 const i = (e, s) => { 4153 const { rtl: a } = t, 4154 i = d(e), 4155 r = a ? -1 : 1, 4156 n = i.attr("data-swiper-parallax") || "0"; 4157 let l = i.attr("data-swiper-parallax-x"), 4158 o = i.attr("data-swiper-parallax-y"); 4159 const c = i.attr("data-swiper-parallax-scale"), 4160 p = i.attr("data-swiper-parallax-opacity"); 4161 if ( 4162 (l || o ? ((l = l || "0"), (o = o || "0")) : t.isHorizontal() ? ((l = n), (o = "0")) : ((o = n), (l = "0")), 4163 (l = l.indexOf("%") >= 0 ? parseInt(l, 10) * s * r + "%" : l * s * r + "px"), 4164 (o = o.indexOf("%") >= 0 ? parseInt(o, 10) * s + "%" : o * s + "px"), 4165 null != p) 4166 ) { 4167 const e = p - (p - 1) * (1 - Math.abs(s)); 4168 i[0].style.opacity = e; 4169 } 4170 if (null == c) i.transform(`translate3d(${l}, ${o}, 0px)`); 4171 else { 4172 const e = c - (c - 1) * (1 - Math.abs(s)); 4173 i.transform(`translate3d(${l}, ${o}, 0px) scale(${e})`); 4174 } 4175 }, 4176 r = () => { 4177 const { $el: e, slides: s, progress: a, snapGrid: r } = t; 4178 e.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((e) => { 4179 i(e, a); 4180 }), 4181 s.each((e, s) => { 4182 let n = e.progress; 4183 t.params.slidesPerGroup > 1 && "auto" !== t.params.slidesPerView && (n += Math.ceil(s / 2) - a * (r.length - 1)), 4184 (n = Math.min(Math.max(n, -1), 1)), 4185 d(e) 4186 .find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]") 4187 .each((e) => { 4188 i(e, n); 4189 }); 4190 }); 4191 }; 4192 a("beforeInit", () => { 4193 t.params.parallax.enabled && ((t.params.watchSlidesProgress = !0), (t.originalParams.watchSlidesProgress = !0)); 4194 }), 4195 a("init", () => { 4196 t.params.parallax.enabled && r(); 4197 }), 4198 a("setTranslate", () => { 4199 t.params.parallax.enabled && r(); 4200 }), 4201 a("setTransition", (e, s) => { 4202 t.params.parallax.enabled && 4203 (function (e) { 4204 void 0 === e && (e = t.params.speed); 4205 const { $el: s } = t; 4206 s.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((t) => { 4207 const s = d(t); 4208 let a = parseInt(s.attr("data-swiper-parallax-duration"), 10) || e; 4209 0 === e && (a = 0), s.transition(a); 4210 }); 4211 })(s); 4212 }); 4213 }, 4214 function (e) { 4215 let { swiper: t, extendParams: s, on: a, emit: i } = e; 4216 const n = r(); 4217 s({ zoom: { enabled: !1, maxRatio: 3, minRatio: 1, toggle: !0, containerClass: "swiper-zoom-container", zoomedSlideClass: "swiper-slide-zoomed" } }), (t.zoom = { enabled: !1 }); 4218 let l, 4219 o, 4220 c, 4221 p = 1, 4222 u = !1; 4223 const m = { $slideEl: void 0, slideWidth: void 0, slideHeight: void 0, $imageEl: void 0, $imageWrapEl: void 0, maxRatio: 3 }, 4224 f = { 4225 isTouched: void 0, 4226 isMoved: void 0, 4227 currentX: void 0, 4228 currentY: void 0, 4229 minX: void 0, 4230 minY: void 0, 4231 maxX: void 0, 4232 maxY: void 0, 4233 width: void 0, 4234 height: void 0, 4235 startX: void 0, 4236 startY: void 0, 4237 touchesStart: {}, 4238 touchesCurrent: {}, 4239 }, 4240 g = { x: void 0, y: void 0, prevPositionX: void 0, prevPositionY: void 0, prevTime: void 0 }; 4241 let v = 1; 4242 function w(e) { 4243 if (e.targetTouches.length < 2) return 1; 4244 const t = e.targetTouches[0].pageX, 4245 s = e.targetTouches[0].pageY, 4246 a = e.targetTouches[1].pageX, 4247 i = e.targetTouches[1].pageY; 4248 return Math.sqrt((a - t) ** 2 + (i - s) ** 2); 4249 } 4250 function b(e) { 4251 const s = t.support, 4252 a = t.params.zoom; 4253 if (((o = !1), (c = !1), !s.gestures)) { 4254 if ("touchstart" !== e.type || ("touchstart" === e.type && e.targetTouches.length < 2)) return; 4255 (o = !0), (m.scaleStart = w(e)); 4256 } 4257 (m.$slideEl && m.$slideEl.length) || 4258 ((m.$slideEl = d(e.target).closest(`.${t.params.slideClass}`)), 4259 0 === m.$slideEl.length && (m.$slideEl = t.slides.eq(t.activeIndex)), 4260 (m.$imageEl = m.$slideEl.find(`.${a.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0)), 4261 (m.$imageWrapEl = m.$imageEl.parent(`.${a.containerClass}`)), 4262 (m.maxRatio = m.$imageWrapEl.attr("data-swiper-zoom") || a.maxRatio), 4263 0 !== m.$imageWrapEl.length) 4264 ? (m.$imageEl && m.$imageEl.transition(0), (u = !0)) 4265 : (m.$imageEl = void 0); 4266 } 4267 function x(e) { 4268 const s = t.support, 4269 a = t.params.zoom, 4270 i = t.zoom; 4271 if (!s.gestures) { 4272 if ("touchmove" !== e.type || ("touchmove" === e.type && e.targetTouches.length < 2)) return; 4273 (c = !0), (m.scaleMove = w(e)); 4274 } 4275 m.$imageEl && 0 !== m.$imageEl.length 4276 ? (s.gestures ? (i.scale = e.scale * p) : (i.scale = (m.scaleMove / m.scaleStart) * p), 4277 i.scale > m.maxRatio && (i.scale = m.maxRatio - 1 + (i.scale - m.maxRatio + 1) ** 0.5), 4278 i.scale < a.minRatio && (i.scale = a.minRatio + 1 - (a.minRatio - i.scale + 1) ** 0.5),
4279 m.$imageEl.transform(`translate3d(0,0,0) scale(${i.scale})`)) 4280 : "gesturechange" === e.type && b(e); 4281 } 4282 function y(e) { 4283 const s = t.device, 4284 a = t.support, 4285 i = t.params.zoom, 4286 r = t.zoom; 4287 if (!a.gestures) { 4288 if (!o || !c) return; 4289 if ("touchend" !== e.type || ("touchend" === e.type && e.changedTouches.length < 2 && !s.android)) return; 4290 (o = !1), (c = !1); 4291 } 4292 m.$imageEl && 4293 0 !== m.$imageEl.length && 4294 ((r.scale = Math.max(Math.min(r.scale, m.maxRatio), i.minRatio)), 4295 m.$imageEl.transition(t.params.speed).transform(`translate3d(0,0,0) scale(${r.scale})`), 4296 (p = r.scale), 4297 (u = !1), 4298 1 === r.scale && (m.$slideEl = void 0)); 4299 } 4300 function E(e) { 4301 const s = t.zoom; 4302 if (!m.$imageEl || 0 === m.$imageEl.length) return; 4303 if (((t.allowClick = !1), !f.isTouched || !m.$slideEl)) return; 4304 f.isMoved || 4305 ((f.width = m.$imageEl[0].offsetWidth), 4306 (f.height = m.$imageEl[0].offsetHeight), 4307 (f.startX = h(m.$imageWrapEl[0], "x") || 0), 4308 (f.startY = h(m.$imageWrapEl[0], "y") || 0), 4309 (m.slideWidth = m.$slideEl[0].offsetWidth), 4310 (m.slideHeight = m.$slideEl[0].offsetHeight), 4311 m.$imageWrapEl.transition(0)); 4312 const a = f.width * s.scale, 4313 i = f.height * s.scale; 4314 if (!(a < m.slideWidth && i < m.slideHeight)) { 4315 if ( 4316 ((f.minX = Math.min(m.slideWidth / 2 - a / 2, 0)), 4317 (f.maxX = -f.minX), 4318 (f.minY = Math.min(m.slideHeight / 2 - i / 2, 0)), 4319 (f.maxY = -f.minY), 4320 (f.touchesCurrent.x = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX), 4321 (f.touchesCurrent.y = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY), 4322 !f.isMoved && !u) 4323 ) { 4324 if ( 4325 t.isHorizontal() && 4326 ((Math.floor(f.minX) === Math.floor(f.startX) && f.touchesCurrent.x < f.touchesStart.x) || 4327 (Math.floor(f.maxX) === Math.floor(f.startX) && f.touchesCurrent.x > f.touchesStart.x)) 4328 ) 4329 return void (f.isTouched = !1); 4330 if ( 4331 !t.isHorizontal() && 4332 ((Math.floor(f.minY) === Math.floor(f.startY) && f.touchesCurrent.y < f.touchesStart.y) || 4333 (Math.floor(f.maxY) === Math.floor(f.startY) && f.touchesCurrent.y > f.touchesStart.y)) 4334 ) 4335 return void (f.isTouched = !1); 4336 } 4337 e.cancelable && e.preventDefault(), 4338 e.stopPropagation(), 4339 (f.isMoved = !0), 4340 (f.currentX = f.touchesCurrent.x - f.touchesStart.x + f.startX), 4341 (f.currentY = f.touchesCurrent.y - f.touchesStart.y + f.startY), 4342 f.currentX < f.minX && (f.currentX = f.minX + 1 - (f.minX - f.currentX + 1) ** 0.8), 4343 f.currentX > f.maxX && (f.currentX = f.maxX - 1 + (f.currentX - f.maxX + 1) ** 0.8), 4344 f.currentY < f.minY && (f.currentY = f.minY + 1 - (f.minY - f.currentY + 1) ** 0.8), 4345 f.currentY > f.maxY && (f.currentY = f.maxY - 1 + (f.currentY - f.maxY + 1) ** 0.8), 4346 g.prevPositionX || (g.prevPositionX = f.touchesCurrent.x), 4347 g.prevPositionY || (g.prevPositionY = f.touchesCurrent.y), 4348 g.prevTime || (g.prevTime = Date.now()), 4349 (g.x = (f.touchesCurrent.x - g.prevPositionX) / (Date.now() - g.prevTime) / 2), 4350 (g.y = (f.touchesCurrent.y - g.prevPositionY) / (Date.now() - g.prevTime) / 2), 4351 Math.abs(f.touchesCurrent.x - g.prevPositionX) < 2 && (g.x = 0), 4352 Math.abs(f.touchesCurrent.y - g.prevPositionY) < 2 && (g.y = 0), 4353 (g.prevPositionX = f.touchesCurrent.x), 4354 (g.prevPositionY = f.touchesCurrent.y), 4355 (g.prevTime = Date.now()), 4356 m.$imageWrapEl.transform(`translate3d(${f.currentX}px, ${f.currentY}px,0)`); 4357 } 4358 } 4359 function C() { 4360 const e = t.zoom; 4361 m.$slideEl && 4362 t.previousIndex !== t.activeIndex && 4363 (m.$imageEl && m.$imageEl.transform("translate3d(0,
43630,0) scale(1)"), 4364 m.$imageWrapEl && m.$imageWrapEl.transform("translate3d(0,0,0)"), 4365 (e.scale = 1), 4366 (p = 1), 4367 (m.$slideEl = void 0), 4368 (m.$imageEl = void 0), 4369 (m.$imageWrapEl = void 0)); 4370 } 4371 function T(e) { 4372 const s = t.zoom, 4373 a = t.params.zoom; 4374 if ( 4375 (m.$slideEl || 4376 (e && e.target && (m.$slideEl = d(e.target).closest(`.${t.params.slideClass}`)), 4377 m.$slideEl || 4378 (t.params.virtual && t.params.virtual.enabled && t.virtual 4379 ? (m.$slideEl = t.$wrapperEl.children(`.${t.params.slideActiveClass}`)) 4380 : (m.$slideEl = t.slides.eq(t.activeIndex))), 4381 (m.$imageEl = m.$slideEl.find(`.${a.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0)), 4382 (m.$imageWrapEl = m.$imageEl.parent(`.${a.containerClass}`))), 4383 !m.$imageEl || 0 === m.$imageEl.length || !m.$imageWrapEl || 0 === m.$imageWrapEl.length) 4384 ) 4385 return; 4386 let i, r, l, o, c, u, h, g, v, w, b, x, y, E, C, T, $, S; 4387 t.params.cssMode && ((t.wrapperEl.style.overflow = "hidden"), (t.wrapperEl.style.touchAction = "none")), 4388 m.$slideEl.addClass(`${a.zoomedSlideClass}`), 4389 void 0 === f.touchesStart.x && e 4390 ? ((i = "touchend" === e.type ? e.changedTouches[0].pageX : e.pageX), (r = "touchend" === e.type ? e.changedTouches[0].pageY : e.pageY)) 4391 : ((i = f.touchesStart.x), (r = f.touchesStart.y)), 4392 (s.scale = m.$imageWrapEl.attr("data-swiper-zoom") || a.maxRatio), 4393 (p = m.$imageWrapEl.attr("data-swiper-zoom") || a.maxRatio), 4394 e 4395 ? (($ = m.$slideEl[0].offsetWidth), 4396 (S = m.$slideEl[0].offsetHeight), 4397 (l = m.$slideEl.offset().left + n.scrollX), 4398 (o = m.$slideEl.offset().top + n.scrollY), 4399 (c = l + $ / 2 - i), 4400 (u = o + S / 2 - r), 4401 (v = m.$imageEl[0].offsetWidth), 4402 (w = m.$imageEl[0].offsetHeight), 4403 (b = v * s.scale), 4404 (x = w * s.scale), 4405 (y = Math.min($ / 2 - b / 2, 0)), 4406 (E = Math.min(S / 2 - x / 2, 0)), 4407 (C = -y), 4408 (T = -E),
4409 (h = c * s.scale), 4410 (g = u * s.scale), 4411 h < y && (h = y), 4412 h > C && (h = C), 4413 g < E && (g = E), 4414 g > T && (g = T)) 4415 : ((h = 0), (g = 0)), 4416 m.$imageWrapEl.transition(300).transform(`translate3d(${h}px, ${g}px,0)`), 4417 m.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${s.scale})`); 4418 } 4419 function $() { 4420 const e = t.zoom, 4421 s = t.params.zoom; 4422 m.$slideEl || 4423 (t.params.virtual && t.params.virtual.enabled && t.virtual ? (m.$slideEl = t.$wrapperEl.children(`.${t.params.slideActiveClass}`)) : (m.$slideEl = t.slides.eq(t.activeIndex)), 4424 (m.$imageEl = m.$slideEl.find(`.${s.containerClass}`).eq(0).find("picture, img, svg, canvas, .swiper-zoom-target").eq(0)), 4425 (m.$imageWrapEl = m.$imageEl.parent(`.${s.containerClass}`))), 4426 m.$imageEl && 4427 0 !== m.$imageEl.length && 4428 m.$imageWrapEl && 4429 0 !== m.$imageWrapEl.length && 4430 (t.params.cssMode && ((t.wrapperEl.style.overflow = ""), (t.wrapperEl.style.touchAction = "")), 4431 (e.scale = 1), 4432 (p = 1), 4433 m.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"), 4434 m.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"), 4435 m.$slideEl.removeClass(`${s.zoomedSlideClass}`), 4436 (m.$slideEl = void 0)); 4437 } 4438 function S(e) { 4439 const s = t.zoom; 4440 s.scale && 1 !== s.scale ? $() : T(e); 4441 } 4442 function M() { 4443 const e = t.support; 4444 return { 4445 passiveListener: !("touchstart" !== t.touchEvents.start || !e.passiveListener || !t.params.passiveListeners) && { passive: !0, capture: !1 }, 4446 activeListenerWithCapture: !e.passiveListener || { passive: !1, capture: !0 },
4447 }; 4448 } 4449 function P() { 4450 return `.${t.params.slideClass}`; 4451 } 4452 function k(e) { 4453 const { passiveListener: s } = M(), 4454 a = P(); 4455 t.$wrapperEl[e]("gesturestart", a, b, s), t.$wrapperEl[e]("gesturechange", a, x, s), t.$wrapperEl[e]("gestureend", a, y, s); 4456 } 4457 function z() { 4458 l || ((l = !0), k("on")); 4459 } 4460 function L() { 4461 l && ((l = !1), k("off")); 4462 } 4463 function O() { 4464 const e = t.zoom; 4465 if (e.enabled) return; 4466 e.enabled = !0; 4467 const s = t.support, 4468 { passiveListener: a, activeListenerWithCapture: i } = M(), 4469 r = P(); 4470 s.gestures 4471 ? (t.$wrapperEl.on(t.touchEvents.start, z, a), t.$wrapperEl.on(t.touchEvents.end, L, a)) 4472 : "touchstart" === t.touchEvents.start && 4473 (t.$wrapperEl.on(t.touchEvents.start, r, b, a), 4474 t.$wrapperEl.on(t.touchEvents.move, r, x, i), 4475 t.$wrapperEl.on(t.touchEvents.end, r, y, a), 4476 t.touchEvents.cancel && t.$wrapperEl.on(t.touchEvents.cancel, r, y, a)), 4477 t.$wrapperEl.on(t.touchEvents.move, `.${t.params.zoom.containerClass}`, E, i); 4478 } 4479 function I() { 4480 const e = t.zoom; 4481 if (!e.enabled) return; 4482 const s = t.support; 4483 e.enabled = !1; 4484 const { passiveListener: a, activeListenerWithCapture: i } = M(), 4485 r = P(); 4486 s.gestures 4487 ? (t.$wrapperEl.off(t.touchEvents.start, z, a), t.$wrapperEl.off(t.touchEvents.end, L, a)) 4488 : "touchstart" === t.touchEvents.start && 4489 (t.$wrapperEl.off(t.touchEvents.start, r, b, a), 4490 t.$wrapperEl.off(t.touchEvents.move, r, x, i), 4491 t.$wrapperEl.off(t.touchEvents.end, r, y, a), 4492 t.touchEvents.cancel && t.$wrapperEl.off(t.touchEvents.cancel, r, y, a)), 4493 t.$wrapperEl.off(t.touchEvents.move, `.${t.params.zoom.containerClass}`, E, i); 4494 } 4495 Object.defineProperty(t.zoom, "scale", { 4496 get: () => v, 4497 set(e) { 4498 if (v !== e) { 4499 const t = m.$imageEl ? m.$imageEl[0] : void 0, 4500 s = m.$slideEl ? m.$slideEl[0] : void 0; 4501 i("zoomChange", e, t, s); 4502 } 4503 v = e; 4504 }, 4505 }), 4506 a("init", () => { 4507 t.params.zoom.enabled && O(); 4508 }), 4509 a("destroy", () => { 4510 I(); 4511 }), 4512 a("touchStart", (e, s) => { 4513 t.zoom.enabled && 4514 (function (e) { 4515 const s = t.device; 4516 m.$imageEl && 4517 0 !== m.$imageEl.length && 4518 (f.isTouched || 4519 (s.android && e.cancelable && e.preventDefault(), 4520 (f.isTouched = !0), 4521 (f.touchesStart.x = "touchstart" === e.type ? e.targetTouches[0].pageX : e.pageX), 4522 (f.touchesStart.y = "touchstart" === e.type ? e.targetTouches[0].pageY : e.pageY))); 4523 })(s); 4524 }), 4525 a("touchEnd", (e, s) => { 4526 t.zoom.enabled && 4527 (function () { 4528 const e = t.zoom; 4529 if (!m.$imageEl || 0 === m.$imageEl.length) return; 4530 if (!f.isTouched || !f.isMoved) return (f.isTouched = !1), void (f.isMoved = !1); 4531 (f.isTouched = !1), (f.isMoved = !1); 4532 let s = 300, 4533 a = 300; 4534 const i = g.x * s, 4535 r = f.currentX + i, 4536 n = g.y * a, 4537 l = f.currentY + n; 4538 0 !== g.x && (s = Math.abs((r - f.currentX) / g.x)), 0 !== g.y && (a = Math.abs((l - f.currentY) / g.y)); 4539 const o = Math.max(s, a); 4540 (f.currentX = r), (f.currentY = l); 4541 const d = f.width * e.scale, 4542 c = f.height * e.scale; 4543 (f.minX = Math.min(m.slideWidth / 2 - d / 2, 0)), 4544 (f.maxX = -f.minX), 4545 (f.minY = Math.min(m.slideHeight / 2 - c / 2, 0)), 4546 (f.maxY = -f.minY), 4547 (f.currentX = Math.max(Math.min(f.currentX, f.maxX), f.minX)), 4548 (f.currentY = Math.max(Math.min(f.currentY, f.maxY), f.minY)), 4549 m.$imageWrapEl.transition(o).transform(`translate3d(${f.currentX}px, ${f.currentY}px,0)`); 4550 })(); 4551 }), 4552 a("doubleTap", (e, s) => { 4553 !t.animating && t.params.zoom.enabled && t.zoom.enabled && t.params.zoom.toggle && S(s); 4554 }), 4555 a("transitionEnd", () => { 4556 t.zoom.enabled && t.params.zoom.enabled && C(); 4557 }), 4558 a("slideChange", () => { 4559 t.zoom.enabled && t.params.zoom.enabled && t.params.cssMode && C(); 4560 }), 4561 Object.assign(t.zoom, { enable: O, disable: I, in: T, out: $, toggle: S }); 4562 }, 4563 function (e) { 4564 let { swiper: t, extendParams: s, on: a, emit: i } = e; 4565 s({ 4566 lazy: { 4567 checkInView: !1, 4568 enabled: !1, 4569 loadPrevNext: !1, 4570 loadPrevNextAmount: 1, 4571 loadOnTransitionStart: !1, 4572 scrollingElement: "", 4573 elementClass: "swiper-lazy", 4574 loadingClass: "swiper-lazy-loading", 4575 loadedClass: "swiper-lazy-loaded", 4576 preloaderClass: "swiper-lazy-preloader", 4577 }, 4578 }), 4579 (t.lazy = {}); 4580 let n = !1, 4581 l = !1; 4582 function o(e, s) { 4583 void 0 === s && (s = !0); 4584 const a = t.params.lazy; 4585 if (void 0 === e) return; 4586 if (0 === t.slides.length) return; 4587 const r = t.virtual && t.params.virtual.enabled ? t.$wrapperEl.children(`.${t.params.slideClass}[data-swiper-slide-index="${e}
4587"]`) : t.slides.eq(e), 4588 n = r.find(`.${a.elementClass}:not(.${a.loadedClass}):not(.${a.loadingClass})`); 4589 !r.hasClass(a.elementClass) || r.hasClass(a.loadedClass) || r.hasClass(a.loadingClass) || n.push(r[0]), 4590 0 !== n.length && 4591 n.each((e) => { 4592 const n = d(e); 4593 n.addClass(a.loadingClass); 4594 const l = n.attr("data-background"), 4595 c = n.attr("data-src"), 4596 p = n.attr("data-srcset"), 4597 u = n.attr("data-sizes"), 4598 h = n.parent("picture"); 4599 t.loadImage(n[0], c || l, p, u, !1, () => { 4600 if (null != t && t && (!t || t.params) && !t.destroyed) { 4601 if ( 4602 (l 4603 ? (n.css("background-image", `url("${l}")`), n.removeAttr("data-background")) 4604 : (p && (n.attr("srcset", p), n.removeAttr("data-srcset")), 4605 u && (n.attr("sizes", u), n.removeAttr("data-sizes")), 4606 h.length && 4607 h.children("source").each((e) => { 4608 const t = d(e); 4609 t.attr("data-srcset") && (t.attr("srcset", t.attr("data-srcset")), t.removeAttr("data-srcset")); 4610 }), 4611 c && (n.attr("src", c), n.removeAttr("data-src"))), 4612 n.addClass(a.loadedClass).removeClass(a.loadingClass), 4613 r.find(`.${a.preloaderClass}`).remove(), 4614 t.params.loop && s) 4615 ) { 4616 const e = r.attr("data-swiper-slide-index"); 4617 if (r.hasClass(t.params.slideDuplicateClass)) { 4618 o(t.$wrapperEl.children(`[data-swiper-slide-index="${e}"]:not(.${t.params.slideDuplicateClass})`).index(), !1); 4619 } else { 4620 o(t.$wrapperEl.children(`.${t.params.slideDuplicateClass}[data-swiper-slide-index="${e}"]`).index(), !1); 4621 } 4622 } 4623 i("lazyImageReady", r[0], n[0]), t.params.autoHeight && t.updateAutoHeight(); 4624 } 4625 }), 4626 i("lazyImageLoad", r[0], n[0]); 4627 }); 4628 } 4629 function c() { 4630 const { $wrapperEl: e, params: s, slides: a, activeIndex: i } = t, 4631 r = t.virtual && s.virtual.enabled, 4632 n = s.lazy; 4633 let c = s.slidesPerView; 4634 function p(t) { 4635 if (r) { 4636 if (e.children(`.${s.slideClass}[data-swiper-slide-index="${t}"]`).length) return !0; 4637 } else if (a[t]) return !0; 4638 return !1; 4639 } 4640 function u(e) { 4641 return r ? d(e).attr("data-swiper-slide-index") : d(e).index(); 4642 } 4643 if (("auto" === c && (c = 0), l || (l = !0), t.params.watchSlidesProgress)) 4644 e.children(`.${s.slideVisibleClass}`).each((e) => { 4645 o(r ? d(e).attr("data-swiper-slide-index") : d(e).index()); 4646 }); 4647 else if (c > 1) for (let e = i; e < i + c; e += 1) p(e) && o(e); 4648 else o(i); 4649 if (n.loadPrevNext) 4650 if (c > 1 || (n.loadPrevNextAmount && n.loadPrevNextAmount > 1)) { 4651 const e = n.loadPrevNextAmount,
4652 t = Math.ceil(c), 4653 s = Math.min(i + t + Math.max(e, t), a.length), 4654 r = Math.max(i - Math.max(t, e), 0); 4655 for (let e = i + t; e < s; e += 1) p(e) && o(e); 4656 for (let e = r; e < i; e += 1) p(e) && o(e); 4657 } else { 4658 const t = e.children(`.${s.slideNextClass}`); 4659 t.length > 0 && o(u(t)); 4660 const a = e.children(`.${s.slidePrevClass}`); 4661 a.length > 0 && o(u(a)); 4662 } 4663 } 4664 function p() { 4665 const e = r(); 4666 if (!t || t.destroyed) return; 4667 const s = t.params.lazy.scrollingElement ? d(t.params.lazy.scrollingElement) : d(e), 4668 a = s[0] === e, 4669 i = a ? e.innerWidth : s[0].offsetWidth, 4670 l = a ? e.innerHeight : s[0].offsetHeight, 4671 o = t.$el.offset(), 4672 { rtlTranslate: u } = t; 4673 let h = !1; 4674 u && (o.left -= t.$el[0].scrollLeft); 4675 const m = [ 4676 [o.left, o.top], 4677 [o.left + t.width, o.top], 4678 [o.left, o.top + t.height], 4679 [o.left + t.width, o.top + t.height], 4680 ]; 4681 for (let e = 0; e < m.length; e += 1) { 4682 const t = m[e]; 4683 if (t[0] >= 0 && t[0] <= i && t[1] >= 0 && t[1] <= l) { 4684 if (0 === t[0] && 0 === t[1]) continue; 4685 h = !0; 4686 } 4687 } 4688 const f = !("touchstart" !== t.touchEvents.start || !t.support.passiveListener || !t.params.passiveListeners) && { passive: !0, capture: !1 }; 4689 h ? (c(), s.off("scroll", p, f)) : n || ((n = !0), s.on("scroll", p, f)); 4690 } 4691 a("beforeInit", () => { 4692 t.params.lazy.enabled && t.params.preloadImages && (t.params.preloadImages = !1); 4693 }), 4694 a("init", () => { 4695 t.params.lazy.enabled && (t.params.lazy.checkInView ? p() : c()); 4696 }), 4697 a("scroll", () => { 4698 t.params.freeMode && t.params.freeMode.enabled && !t.params.freeMode.sticky && c(); 4699 }), 4700 a("scrollbarDragMove resize _freeModeNoMomentumRelease", () => { 4701 t.params.lazy.enabled && (t.params.lazy.checkInView ? p() : c()); 4702 }), 4703 a("transitionStart", () => { 4704 t.params.lazy.enabled && (t.params.lazy.loadOnTransitionStart || (!t.params.lazy.loadOnTransitionStart && !l)) && (t.params.lazy.checkInView ? p() : c()); 4705 }), 4706 a("transitionEnd", () => { 4707 t.params.lazy.enabled && !t.params.lazy.loadOnTransitionStart && (t.params.lazy.checkInView ? p() : c()); 4708 }), 4709 a("slideChange", () => { 4710 const { lazy: e, cssMode: s, watchSlidesProgress: a, touchReleaseOnEdges: i, resistanceRatio: r } = t.params; 4711 e.enabled && (s || (a && (i || 0 === r))) && c(); 4712 }), 4713 a("destroy", () => { 4714 t.$el && t.$el.find(`.${t.params.lazy.loadingClass}`).removeClass(t.params.lazy.loadingClass); 4715 }), 4716 Object.assign(t.lazy, { load: c, loadInSlide: o }); 4717 }, 4718 function (e) { 4719 let { swiper: t, extendParams: s, on: a } = e; 4720 function i(e, t) { 4721 const s = (function () { 4722 let e, t, s; 4723 return (a, i) => { 4724 for (t = -1, e = a.length; e - t > 1; ) (s = (e + t) >> 1), a[s] <= i ? (t = s) : (e = s); 4725 return e; 4726 }; 4727 })(); 4728 let a, i; 4729 return ( 4730 (this.x = e), 4731 (this.y = t), 4732 (this.lastIndex = e.length - 1), 4733 (this.interpolate = function (e) { 4734 return e ? ((i = s(this.x, e)), (a = i - 1), ((e - this.x[a]) * (this.y[i] - this.y[a])) / (this.x[i] - this.x[a]) + this.y[a]) : 0; 4735 }), 4736 this 4737 ); 4738 } 4739 function r() { 4740 t.controller.control && t.controller.spline && ((t.controller.spline = void 0), delete t.controller.spline); 4741 } 4742 s({ controller: { control: void 0, inverse: !1, by: "slide" } }), 4743 (t.controller = { control: void 0 }), 4744 a("beforeInit", () => { 4745 t.controller.control = t.params.controller.control; 4746 }), 4747 a("update", () => { 4748 r(); 4749 }), 4750 a("resize", () => { 4751 r(); 4752 }), 4753 a("observerUpdate", () => { 4754 r(); 4755 }), 4756 a("setTranslate", (e, s, a) => { 4757 t.controller.control && t.controller.setTranslate(s, a); 4758 }), 4759 a("setTransition", (e, s, a) => { 4760 t.controller.control && t.controller.setTransition(s, a); 4761 }), 4762 Object.assign(t.controller, { 4763 setTranslate: function (e, s) { 4764 const a = t.controller.control; 4765 let r, n; 4766 const l = t.constructor; 4767 function o(e) { 4768 const s = t.rtlTranslate ? -t.translate : t.translate; 4769 "slide" === t.params.controller.by && 4770 (!(function (e) { 4771 t.controller.spline || (t.controller.spline = t.params.loop ? new i(t.slidesGrid, e.slidesGrid) : new i(t.snapGrid, e.snapGrid)); 4772 })(e), 4773 (n = -t.controller.spline.interpolate(-s))), 4774 (n && "container" !== t.params.controller.by) || 4775 ((r = (e.maxTranslate() - e.minTranslate()) / (t.maxTranslate() - t.minTranslate())), (n = (s - t.minTranslate()) * r + e.minTranslate())), 4776 t.params.controller.inverse && (n = e.maxTranslate() - n), 4777 e.updateProgress(n), 4778 e.setTranslate(n, t), 4779 e.updateActiveIndex(), 4780 e.updateSlidesClasses(); 4781 } 4782 if (Array.isArray(a)) for (let e = 0; e < a.length; e += 1) a[e] !== s && a[e] instanceof l && o(a[e]); 4783 else a instanceof l && s !== a && o(a); 4784 }, 4785 setTransition: function (e, s) { 4786 const a = t.constructor, 4787 i = t.controller.control; 4788 let r; 4789 function n(s) { 4790 s.setTransition(e, t), 4791 0 !== e && 4792 (s.transitionStart(), 4793 s.params.autoHeight && 4794 p(() => { 4795 s.updateAutoHeight(); 4796 }), 4797 s.$wrapperEl.transitionEnd(() => { 4798 i && (s.params.loop && "slide" === t.params.controller.by && s.loopFix(), s.transitionEnd()); 4799 })); 4800 } 4801 if (Array.isArray(i)) for (r = 0; r < i.length; r += 1) i[r] !== s && i[r] instanceof a && n(i[r]); 4802 else i instanceof a && s !== i && n(i); 4803 }, 4804 }); 4805 }, 4806 function (e) { 4807 let { swiper: t, extendParams: s, on: a } = e; 4808 s({ 4809 a11y: { 4810 enabled: !0, 4811 notificationClass: "swiper-notification", 4812 prevSlideMessage: "Previous slide", 4813 nextSlideMessage: "Next slide", 4814 firstSlideMessage: "This is the first slide", 4815 lastSlideMessage: "This is the last slide", 4816 paginationBulletMessage: "Go to slide {{index}}", 4817 slideLabelMessage: "{{index}} / {{slidesLength}}", 4818 containerMessage: null, 4819 containerRoleDescriptionMessage: null, 4820 itemRoleDescriptionMessage: null, 4821 slideRole: "group", 4822 id: null, 4823 }, 4824 }), 4825 (t.a11y = { clicked: !1 }); 4826 let i = null; 4827 function r(e) { 4828 const t = i; 4829 0 !== t.length && (t.html(""), t.html(e)); 4830 } 4831 function n(e) { 4832 e.attr("tabIndex", "0"); 4833 } 4834 function l(e) { 4835 e.attr("tabIndex", "-1"); 4836 } 4837 function o(e, t) { 4838 e.attr("role", t); 4839 } 4840 function c(e, t) { 4841 e.attr("aria-roledescription", t); 4842 } 4843 function p(e, t) { 4844 e.attr("aria-label", t); 4845 } 4846 function u(e) { 4847 e.attr("aria-disabled", !0); 4848 } 4849 function h(e) { 4850 e.attr("aria-disabled", !1); 4851 } 4852 function m(e) { 4853 if (13 !== e.keyCode && 32 !== e.keyCode) return; 4854 const s = t.params.a11y, 4855 a = d(e.target); 4856 t.navigation && t.navigation.$nextEl && a.is(t.navigation.$nextEl) && ((t.isEnd && !t.params.loop) || t.slideNext(), t.isEnd ? r(s.lastSlideMessage) : r(s.nextSlideMessage)), 4857 t.navigation && 4858 t.navigation.$prevEl && 4859 a.is(t.navigation.$prevEl) && 4860 ((t.isBeginning && !t.params.loop) || t.slidePrev(), t.isBeginning ? r(s.firstSlideMessage) : r(s.prevSlideMessage)), 4861 t.pagination && a.is(U(t.params.pagination.bulletClass)) && a[0].click(); 4862 } 4863 function f() { 4864 return t.pagination && t.pagination.bullets && t.pagination.bullets.length; 4865 } 4866 function g() { 4867 return f() && t.params.pagination.clickable; 4868 } 4869 const v = (e, t, s) => { 4870 n(e), 4871 "BUTTON" !== e[0].tagName && (o(e, "button"), e.on("key
4871down", m)), 4872 p(e, s), 4873 (function (e, t) { 4874 e.attr("aria-controls", t); 4875 })(e, t); 4876 }, 4877 w = () => { 4878 t.a11y.clicked = !0; 4879 }, 4880 b = () => { 4881 requestAnimationFrame(() => { 4882 requestAnimationFrame(() => { 4883 t.destroyed || (t.a11y.clicked = !1); 4884 }); 4885 }); 4886 }, 4887 x = (e) => { 4888 if (t.a11y.clicked) return; 4889 const s = e.target.closest(`.${t.params.slideClass}`); 4890 if (!s || !t.slides.includes(s)) return; 4891 const a = t.slides.indexOf(s) === t.activeIndex, 4892 i = t.params.watchSlidesProgress && t.visibleSlides && t.visibleSlides.includes(s); 4893 a || i || (e.sourceCapabilities && e.sourceCapabilities.firesTouchEvents) || (t.isHorizontal() ? (t.el.scrollLeft = 0) : (t.el.scrollTop = 0), t.slideTo(t.slides.indexOf(s), 0)); 4894 }, 4895 y = () => { 4896 const e = t.params.a11y; 4897 e.itemRoleDescriptionMessage && c(d(t.slides), e.itemRoleDescriptionMessage), e.slideRole && o(d(t.slides), e.slideRole); 4898 const s = t.params.loop ? t.slides.filter((e) => !e.classList.contains(t.params.slideDuplicateClass)).length : t.slides.length; 4899 e.slideLabelMessage && 4900 t.slides.each((a, i) => { 4901 const r = d(a), 4902 n = t.params.loop ? parseInt(r.attr("data-swiper-slide-index"), 10) : i; 4903 p(r, e.slideLabelMessage.replace(/\{\{index\}\}/, n + 1).replace(/\{\{slidesLength\}\}/, s)); 4904 }); 4905 }, 4906 E = () => { 4907 const e = t.params.a11y; 4908 t.$el.append(i); 4909 const s = t.$el; 4910 e.containerRoleDescriptionMessage && c(s, e.containerRoleDescriptionMessage), e.containerMessage && p(s, e.containerMessage); 4911 const a = t.$wrapperEl, 4912 r = e.id || a.attr("id") || `swiper-wrapper-${((n = 16), void 0 === n && (n = 16), "x".repeat(n).replace(/x/g, () => Math.round(16 * Math.random()).toString(16)))}`; 4913 var n; 4914 const l = t.params.autoplay && t.params.autoplay.enabled ? "off" : "polite"; 4915 var o; 4916 let d, u; 4917 (o = r), 4918 a.attr("id", o), 4919 (function (e, t) { 4920 e.attr("aria-live", t); 4921 })(a, l), 4922 y(), 4923 t.navigation && t.navigation.$nextEl && (d = t.navigation.$nextEl), 4924 t.navigation && t.navigation.$prevEl && (u = t.navigation.$prevEl), 4925 d && d.length && v(d, r, e.nextSlideMessage), 4926 u && u.length && v(u, r, e.prevSlideMessage), 4927 g() && t.pagination.$el.on("keydown", U(t.params.pagination.bulletClass), m), 4928 t.$el.on("focus", x, !0), 4929 t.$el.on("pointerdown", w, !0), 4930 t.$el.on("pointerup", b, !0); 4931 }; 4932 a("beforeInit", () => { 4933 i = d(`<span class="${t.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`); 4934 }), 4935 a("afterInit", () => { 4936 t.params.a11y.enabled && E(); 4937 }), 4938 a("slidesLengthChange snapGridLengthChange slidesGridLengthChange", () => { 4939 t.params.a11y.enabled && y(); 4940 }), 4941 a("fromEdge toEdge afterInit lock unlock", () => { 4942 t.params.a11y.enabled && 4943 (function () { 4944 if (t.params.loop || t.params.rewind || !t.navigation) return; 4945 const { $nextEl: e, $prevEl: s } = t.navigation; 4946 s && s.length > 0 && (t.isBeginning ? (u(s), l(s)) : (h(s), n(s))), e && e.length > 0 && (t.isEnd ? (u(e), l(e)) : (h(e), n(e))); 4947 })(); 4948 }), 4949 a("paginationUpdate", () => { 4950 t.params.a11y.enabled && 4951 (function () { 4952 const e = t.params.a11y; 4953 f() && 4954 t.pagination.bullets.each((s) => { 4955 const a = d(s); 4956 t.params.pagination.clickable && 4957 (n(a), t.params.pagination.renderBullet || (o(a, "button"), p(a, e.paginationBulletMessage.replace(/\{\{index\}\}/, a.index() + 1)))), 4958 a.is(`.${t.params.pagination.bulletActiveClass}`) ? a.attr("aria-current", "true") : a.removeAttr("aria-current"); 4959 }); 4960 })(); 4961 }), 4962 a("destroy", () => { 4963 t.params.a11y.enabled && 4964 (function () { 4965 let e, s; 4966 i && i.length > 0 && i.remove(), 4967 t.navigation && t.navigation.$nextEl && (e = t.navigation.$nextEl), 4968 t.navigation && t.navigation.$prevEl && (s = t.navigation.$prevEl), 4969 e && e.off("keydown", m), 4970 s && s.off("keydown", m), 4971 g() && t.pagination.$el.off("keydown", U(t.params.pagination.bulletClass), m), 4972 t.$el.off("focus", x, !0), 4973 t.$el.off("pointerdown", w, !0), 4974 t.$el.off("pointerup", b, !0); 4975 })(); 4976 }); 4977 }, 4978 function (e) { 4979 let { swiper: t, extendParams: s, on: a } = e; 4980 s({ history: { enabled: !1, root: "", replaceState: !1, key: "slides", keepQuery: !1 } }); 4981 let i = !1, 4982 n = {}; 4983 const l = (e) => 4984 e 4985 .toString() 4986 .replace(/\s+/g, "-") 4987 .replace(/[^\w-]+/g, "") 4988 .replace(/--+/g, "-") 4989 .replace(/^-+/, "") 4990 .replace(/-+$/, ""), 4991 o = (e) => { 4992 const t = r(); 4993 let s; 4994 s = e ? new URL(e) : t.location; 4995 const a = s.pathname 4996 .slice(1) 4997 .split("/") 4998 .filter((e) => "" !== e), 4999 i = a.length; 5000 return { key: a[i - 2], value: a[i - 1] }; 5001 }, 5002 d = (e, s) => { 5003 const a = r(); 5004 if (!i || !t.params.history.enabled) return; 5005 let n; 5006 n = t.params.url ? new URL(t.params.url) : a.location; 5007 const o = t.slides.eq(s); 5008 let d = l(o.attr("data-history")); 5009 if (t.params.history.root.length > 0) { 5010 let s = t.params.history.root; 5011 "/" === s[s.length - 1] && (s = s.slice(0, s.length - 1)), (d = `${s}/${e}/${d}`); 5012 } else n.pathname.includes(e) || (d = `${e}/${d}
5012`); 5013 t.params.history.keepQuery && (d += n.search); 5014 const c = a.history.state; 5015 (c && c.value === d) || (t.params.history.replaceState ? a.history.replaceState({ value: d }, null, d) : a.history.pushState({ value: d }, null, d)); 5016 }, 5017 c = (e, s, a) => { 5018 if (s) 5019 for (let i = 0, r = t.slides.length; i < r; i += 1) { 5020 const r = t.slides.eq(i); 5021 if (l(r.attr("data-history")) === s && !r.hasClass(t.params.slideDuplicateClass)) { 5022 const s = r.index(); 5023 t.slideTo(s, e, a); 5024 } 5025 } 5026 else t.slideTo(0, e, a); 5027 }, 5028 p = () => { 5029 (n = o(t.params.url)), c(t.params.speed, n.value, !1); 5030 }; 5031 a("init", () => { 5032 t.params.history.enabled && 5033 (() => { 5034 const e = r(); 5035 if (t.params.history) { 5036 if (!e.history || !e.history.pushState) return (t.params.history.enabled = !1), void (t.params.hashNavigation.enabled = !0); 5037 (i = !0), (n = o(t.params.url)), (n.key || n.value) && (c(0, n.value, t.params.runCallbacksOnInit), t.params.history.replaceState || e.addEventListener("popstate", p)); 5038 } 5039 })(); 5040 }), 5041 a("destroy", () => { 5042 t.params.history.enabled && 5043 (() => { 5044 const e = r(); 5045 t.params.history.replaceState || e.removeEventListener("popstate", p); 5046 })(); 5047 }), 5048 a("transitionEnd _freeModeNoMomentumRelease", () => { 5049 i && d(t.params.history.key, t.activeIndex); 5050 }), 5051 a("slideChange", () => { 5052 i && t.params.cssMode && d(t.params.history.key, t.activeIndex); 5053 }); 5054 }, 5055 function (e) { 5056 let { swiper: t, extendParams: s, emit: i, on: n } = e, 5057 l = !1; 5058 const o = a(), 5059 c = r(); 5060 s({ hashNavigation: { enabled: !1, replaceState: !1, watchState: !1 } }); 5061 const p = () => { 5062 i("hashChange"); 5063 const e = o.location.hash.replace("#", ""); 5064 if (e !== t.slides.eq(t.activeIndex).attr("data-hash")) { 5065 const s = t.$wrapperEl.children(`.${t.params.slideClass}[data-hash="${e}"]`).index(); 5066 if (void 0 === s) return; 5067 t.slideTo(s); 5068 } 5069 }, 5070 u = () => { 5071 if (l && t.params.hashNavigation.enabled) 5072 if (t.params.hashNavigation.replaceState && c.history && c.history.replaceState) 5073 c.history.replaceState(null, null, `#${t.slides.eq(t.activeIndex).attr("data-hash")}` || ""), i("hashSet"); 5074 else { 5075 const e = t.slides.eq(t.activeIndex), 5076 s = e.attr("data-hash") || e.attr("data-history"); 5077 (o.location.hash = s || ""), i("hashSet"); 5078 } 5079 }; 5080 n("init", () => { 5081 t.params.hashNavigation.enabled && 5082 (() => { 5083 if (!t.params.hashNavigation.enabled || (t.params.history && t.params.history.enabled)) return; 5084 l = !0; 5085 const e = o.location.hash.replace("#", ""); 5086 if (e) { 5087 const s = 0; 5088 for (let a = 0, i = t.slides.length; a < i; a += 1) { 5089 const i = t.slides.eq(a); 5090 if ((i.attr("data-hash") || i.attr("data-history")) === e && !i.hasClass(t.params.slideDuplicateClass)) { 5091 const e = i.index(); 5092 t.slideTo(e, s, t.params.runCallbacksOnInit, !0); 5093 } 5094 } 5095 } 5096 t.params.hashNavigation.watchState && d(c).on("hashchange", p); 5097 })(); 5098 }), 5099 n("destroy", () => { 5100 t.params.hashNavigation.enabled && t.params.hashNavigation.watchState && d(c).off("hashchange", p); 5101 }), 5102 n("transitionEnd _freeModeNoMomentumRelease", () => { 5103 l && u(); 5104 }), 5105 n("slideChange", () => { 5106 l && t.params.cssMode && u(); 5107 }); 5108 }, 5109 function (e) { 5110 let t, 5111 { swiper: s, extendParams: i, on: r, emit: n } = e; 5112 function l() { 5113 if (!s.size) return (s.autoplay.running = !1), void (s.autoplay.paused = !1); 5114 const e = s.slides.eq(s.activeIndex); 5115 let a = s.params.autoplay.delay; 5116 e.attr("data-swiper-autoplay") && (a = e.attr("data-swiper-autoplay") || s.params.autoplay.delay), 5117 clearTimeout(t), 5118 (t = p(() => { 5119 let e; 5120 s.params.autoplay.reverseDirection 5121 ? s.params.loop 5122 ? (s.loopFix(), (e = s.slidePrev(s.params.speed, !0, !0)), n("autoplay")) 5123 : s.isBeginning 5124 ? s.params.autoplay.stopOnLastSlide 5125 ? d() 5126 : ((e = s.slideTo(s.slides.length - 1, s.params.speed, !0, !0)), n("autoplay")) 5127 : ((e = s.slidePrev(s.params.speed, !0, !0)), n("autoplay")) 5128 : s.params.loop 5129 ? (s.loopFix(), (e = s.slideNext(s.params.speed, !0, !0)), n("autoplay")) 5130 : s.isEnd 5131 ? s.params.autoplay.stopOnLastSlide 5132 ? d() 5133 : ((e = s.slideTo(0, s.params.speed, !0, !0)), n("autoplay")) 5134 : ((e = s.slideNext(s.params.speed, !0, !0)), n("autoplay")), 5135 ((s.params.cssMode && s.autoplay.running) || !1 === e) && l(); 5136 }, a)); 5137 } 5138 function o() { 5139 return void 0 === t && !s.autoplay.running && ((s.autoplay.running = !0), n("autoplayStart"), l(), !0); 5140 } 5141 function d() { 5142 return !!s.autoplay.running && void 0 !== t && (t && (clearTimeout(t), (t = void 0)), (s.autoplay.running = !1), n("autoplayStop"), !0); 5143 } 5144 function c(e) { 5145 s.autoplay.running && 5146 (s.autoplay.paused || 5147 (t && clearTimeout(t), 5148 (s.autoplay.paused = !0), 5149 0 !== e && s.params.autoplay.waitForTransition 5150 ? ["transitionend", "webkitTransitionEnd"].forEach((e) => { 5151 s.$wrapperEl[0].addEventListener(e, h); 5152 }) 5153 : ((s.autoplay.paused = !1), l()))); 5154 } 5155 function u() { 5156 const e = a(); 5157 "hidden" === e.visibilityState && s.autoplay.running && c(), "visible" === e.visibilityState && s.autoplay.paused && (l(), (s.autoplay.paused = !1)); 5158 } 5159 function h(e) { 5160 s && 5161 !s.destroyed && 5162 s.$wrapperEl && 5163 e.target === s.$wrapperEl[0] && 5164 (["transitionend", "webkitTransitionEnd"].forEach((e) => { 5165 s.$wrapperEl[0].removeEventListener(e, h); 5166 }), 5167 (s.autoplay.paused = !1), 5168 s.autoplay.running ? l() : d()); 5169 } 5170 function m() { 5171 s.params.autoplay.disableOnInteraction ? d() : (n("autoplayPause"), c()), 5172 ["transitionend", "webkitTransitionEnd"].forEach((e) => { 5173 s.$wrapperEl[0].removeEventListener(e, h); 5174 }); 5175 } 5176 function f() { 5177 s.params.autoplay.disableOnInteraction || ((s.autoplay.paused = !1), n("autoplayResume"), l()); 5178 } 5179 (s.autoplay = { running: !1, paused: !1 }), 5180 i({ autoplay: { enabled: !1, delay: 3e3, waitForTransition: !0, disableOnInteraction: !0, stopOnLastSlide: !1, reverseDirection: !1, pauseOnMouseEnter: !1 } }), 5181 r("init", () => { 5182 if (s.params.autoplay.enabled) { 5183 o(); 5184 a().addEventListener("visibilitychange", u), s.params.autoplay.pauseOnMouseEnter && (s.$el.on("mouseenter", m), s.$el.on("mouseleave", f)); 5185 } 5186 }), 5187 r("beforeTransitionStart", (e, t, a) => { 5188 s.autoplay.running && (a || !s.params.autoplay.disableOnInteraction ? s.autoplay.pause(t) : d()); 5189 }), 5190 r("sliderFirstMove", () => { 5191 s.autoplay.running && (s.params.autoplay.disableOnInteraction ? d() : c()); 5192 }), 5193 r("touchEnd", () => { 5194 s.params.cssMode && s.autoplay.paused && !s.params.autoplay.disableOnInteraction && l(); 5195 }), 5196 r("destroy", () => { 5197 s.$el.off("mouseenter", m), s.$el.off("mouseleave", f), s.autoplay.running && d(); 5198 a().removeEventListener("visibilitychange", u); 5199 }), 5200 Object.assign(s.autoplay, { pause: c, run: l, start: o, stop: d }); 5201 }, 5202 function (e) { 5203 let { swiper: t, extendParams: s, on: a } = e; 5204 s({ thumbs: { swiper: null, multipleActiveThumbs: !0, autoScrollOffset: 0, slideThumbActiveClass: "swiper-slide-thumb-active", thumbsContainerClass: "swiper-thumbs" } }); 5205 let i = !1, 5206 r = !1; 5207 function n() { 5208 const e = t.thumbs.swiper; 5209 if (!e || e.destroyed) return; 5210 const s = e.clickedIndex, 5211 a = e.clickedSlide;
5212 if (a && d(a).hasClass(t.params.thumbs.slideThumbActiveClass)) return; 5213 if (null == s) return; 5214 let i; 5215 if (((i = e.params.loop ? parseInt(d(e.clickedSlide).attr("data-swiper-slide-index"), 10) : s), t.params.loop)) { 5216 let e = t.activeIndex; 5217 t.slides.eq(e).hasClass(t.params.slideDuplicateClass) && (t.loopFix(), (t._clientLeft = t.$wrapperEl[0].clientLeft), (e = t.activeIndex)); 5218 const s = t.slides.eq(e).prevAll(`[data-swiper-slide-index="${i}"]`).eq(0).index(), 5219 a = t.slides.eq(e).nextAll(`[data-swiper-slide-index="${i}"]`).eq(0).index(); 5220 i = void 0 === s ? a : void 0 === a ? s : a - e < e - s ? a : s; 5221 } 5222 t.slideTo(i); 5223 } 5224 function l() { 5225 const { thumbs: e } = t.params; 5226 if (i) return !1; 5227 i = !0; 5228 const s = t.constructor; 5229 if (e.swiper instanceof s) 5230 (t.thumbs.swiper = e.swiper), 5231 Object.assign(t.thumbs.swiper.originalParams, { watchSlidesProgress: !0, slideToClickedSlide: !1 }), 5232 Object.assign(t.thumbs.swiper.params, { watchSlidesProgress: !0, slideToClickedSlide: !1 }); 5233 else if (m(e.swiper)) { 5234 const a = Object.assign({}, e.swiper); 5235 Object.assign(a, { watchSlidesProgress: !0, slideToClickedSlide: !1 }), (t.thumbs.swiper = new s(a)), (r = !0); 5236 } 5237 return t.thumbs.swiper.$el.addClass(t.params.thumbs.thumbsContainerClass), t.thumbs.swiper.on("tap", n), !0; 5238 } 5239 function o(e) { 5240 const s = t.thumbs.swiper; 5241 if (!s || s.destroyed) return; 5242 const a = "auto" === s.params.slidesPerView ? s.slidesPerViewDynamic() : s.params.slidesPerView; 5243 let i = 1; 5244 const r = t.params.thumbs.slideThumbActiveClass; 5245 if ( 5246 (t.params.slidesPerView > 1 && !t.params.centeredSlides && (i = t.params.slidesPerView), 5247 t.params.thumbs.multipleActiveThumbs || (i = 1), 5248 (i = Math.floor(i)), 5249 s.slides.removeClass(r), 5250 s.params.loop || (s.params.virtual && s.params.virtual.enabled)) 5251 ) 5252 for (let e = 0; e < i; e += 1) s.$wrapperEl.children(`[data-swiper-slide-index="${t.realIndex + e}"]`).addClass(r); 5253 else for (let e = 0; e < i; e += 1) s.slides.eq(t.realIndex + e).addClass(r); 5254 const n = t.params.thumbs.autoScrollOffset, 5255 l = n && !s.params.loop; 5256 if (t.realIndex !== s.realIndex || l) { 5257 let i, 5258 r, 5259 o = s.activeIndex; 5260 if (s.params.loop) { 5261 s.slides.eq(o).hasClass(s.params.slideDuplicateClass) && (s.loopFix(), (s._clientLeft = s.$wrapperEl[0].clientLeft), (o = s.activeIndex)); 5262 const e = s.slides.eq(o).prevAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index(), 5263 a = s.slides.eq(o).nextAll(`[data-swiper-slide-index="${t.realIndex}"]`).eq(0).index(); 5264 (i = void 0 === e ? a : void 0 === a ? e : a - o == o - e ? (s.params.slidesPerGroup > 1 ? a : o) : a - o < o - e ? a : e), 5265 (r = t.activeIndex > t.previousIndex ? "next" : "prev"); 5266 } else (i = t.realIndex), (r = i > t.previousIndex ? "next" : "prev"); 5267 l && (i += "next" === r ? n : -1 * n), 5268 s.visibleSlidesIndexes && 5269 s.visibleSlidesIndexes.indexOf(i) < 0 && 5270 (s.params.centeredSlides ? (i = i > o ? i - Math.floor(a / 2) + 1 : i + Math.floor(a / 2) - 1) : i > o && s.params.slidesPerGroup, s.slideTo(i, e ? 0 : void 0)); 5271 } 5272 } 5273 (t.thumbs = { swiper: null }), 5274 a("beforeInit", () => { 5275 const { thumbs: e } = t.params; 5276 e && e.swiper && (l(), o(!0)); 5277 }), 5278 a("slideChange update resize observerUpdate", () => { 5279 o(); 5280 }), 5281 a("setTransition", (e, s) => { 5282 const a = t.thumbs.swiper; 5283 a && !a.destroyed && a.setTransition(s); 5284 }), 5285 a("beforeDestroy", () => { 5286 const e = t.thumbs.swiper; 5287 e && !e.destroyed && r && e.destroy(); 5288 }), 5289 Object.assign(t.thumbs, { init: l, update: o }); 5290 }, 5291 function (e) { 5292 let { swiper: t, extendParams: s, emit: a, once: i } = e; 5293 s({ freeMode: { enabled: !1, momentum: !0, momentumRatio: 1, momentumBounce: !0, momentumBounceRatio: 1, momentumVelocityRatio: 1, sticky: !1, minimumVelocity: 0.02 } }), 5294 Object.assign(t, { 5295 freeMode: { 5296 onTouchStart: function () { 5297 const e = t.getTranslate(); 5298 t.setTranslate(e), t.setTransition(0), (t.touchEventsData.velocities.length = 0), t.freeMode.onTouchEnd({ currentPos: t.rtl ? t.translate : -t.translate }); 5299 }, 5300 onTouchMove: function () { 5301 const { touchEventsData: e, touches: s } = t; 5302 0 === e.velocities.length && e.velocities.push({ position: s[t.isHorizontal() ? "startX" : "startY"], time: e.touchStartTime }), 5303 e.velocities.push({ position: s[t.isHorizontal() ? "currentX" : "currentY"], time: u() }); 5304 }, 5305 onTouchEnd: function (e) { 5306 let { currentPos: s } = e; 5307 const { params: r, $wrapperEl: n, rtlTranslate: l, snapGrid: o, touchEventsData: d } = t, 5308 c = u() - d.touchStartTime; 5309 if (s < -t.minTranslate()) t.slideTo(t.activeIndex); 5310 else if (s > -t.maxTranslate()) t.slides.length < o.length ? t.slideTo(o.length - 1) : t.slideTo(t.slides.length - 1); 5311 else { 5312 if (r.freeMode.momentum) { 5313 if (d.velocities.length > 1) { 5314 const e = d.velocities.pop(), 5315 s = d.velocities.pop(), 5316 a = e.position - s.position, 5317 i = e.time - s.time; 5318 (t.velocity = a / i), 5319 (t.velocity /= 2), 5320 Math.abs(t.velocity) < r.freeMode.minimumVelocity && (t.velocity = 0), 5321 (i > 150 || u() - e.time > 300) && (t.velocity = 0); 5322 } else t.velocity = 0; 5323 (t.velocity *= r.freeMode.momentumVelocityRatio), (d.velocities.length = 0); 5324 let e = 1e3 * r.freeMode.momentumRatio; 5325 const s = t.velocity * e; 5326 let c = t.translate + s; 5327 l && (c = -c); 5328 let p, 5329 h = !1; 5330 const m = 20 * Math.abs(t.velocity) * r.freeMode.momentumBounceRatio; 5331 let f; 5332 if (c < t.maxTranslate()) 5333 r.freeMode.momentumBounce 5334 ? (c + t.maxTranslate() < -m && (c = t.maxTranslate() - m), (p = t.maxTranslate()), (h = !0), (d.allowMomentumBounce = !0)) 5335 : (c = t.maxTranslate()), 5336 r.loop && r.centeredSlides && (f = !0); 5337 else if (c > t.minTranslate()) 5338 r.freeMode.momentumBounce 5339 ? (c - t.minTranslate() > m && (c = t.minTranslate() + m), (p = t.minTranslate()), (h = !0), (d.allowMomentumBounce = !0)) 5340 : (c = t.minTranslate()), 5341 r.loop && r.centeredSlides && (f = !0); 5342 else if (r.freeMode.sticky) { 5343 let e; 5344 for (let t = 0; t < o.length; t += 1) 5345 if (o[t] > -c) { 5346 e = t; 5347 break; 5348 } 5349 (c = Math.abs(o[e] - c) < Math.abs(o[e - 1] - c) || "next" === t.swipeDirection ? o[e] : o[e - 1]), (c = -c); 5350 } 5351 if ( 5352 (f && 5353 i("transitionEnd", () => { 5354 t.loopFix(); 5355 }), 5356 0 !== t.velocity) 5357 ) { 5358 if (((e = l ? Math.abs((-c - t.translate) / t.velocity) : Math.abs((c - t.translate) / t.velocity)), r.freeMode.sticky)) { 5359 const s = Math.abs((l ? -c : c) - t.translate), 5360 a = t.slidesSizesGrid[t.activeIndex]; 5361 e = s < a ? r.speed : s < 2 * a ? 1.5 * r.speed : 2.5 * r.speed; 5362 } 5363 } else if (r.freeMode.sticky) return void t.slideToClosest(); 5364 r.freeMode.momentumBounce && h 5365 ? (t.updateProgress(p), 5366 t.setTransition(e), 5367 t.setTranslate(c), 5368 t.transitionStart(!0, t.swipeDirection), 5369 (t.animating = !0), 5370 n.transitionEnd(() => { 5371 t && 5372 !t.destroyed && 5373 d.allowMomentumBounce && 5374 (a("momentumBounce"), 5375 t.setTransition(r.speed), 5376 setTimeout(() => { 5377 t.setTranslate(p), 5378 n.transitionEnd(() => { 5379 t && !t.destroyed && t.transitionEnd(); 5380 }); 5381 }, 0)); 5382 })) 5383 : t.velocity 5384 ? (a("_freeModeNoMomentumRelease"), 5385 t.updateProgress(c), 5386 t.setTransition(e), 5387 t.setTranslate(c), 5388 t.transitionStart(!0, t.swipeDirection), 5389 t.animating || 5390 ((t.animating = !0), 5391 n.transitionEnd(() => { 5392 t && !t.destroyed && t.transitionEnd(); 5393 }))) 5394 : t.updateProgress(c), 5395 t.updateActiveIndex(), 5396 t.updateSlidesClasses(); 5397 } else { 5398 if (r.freeMode.sticky) return void t.slideToClosest(); 5399 r.freeMode && a("_freeModeNoMomentumRelease"); 5400 } 5401 (!r.freeMode.momentum || c >= r.longSwipesMs) && (t.updateProgress(), t.updateActiveIndex(), t.updateSlidesClasses()); 5402 } 5403 }, 5404 }, 5405 }); 5406 }, 5407 function (e) { 5408 let t, 5409 s, 5410 a, 5411 { swiper: i, extendParams: r } = e; 5412 r({ grid: { rows: 1, fill: "column" } }), 5413 (i.grid = { 5414 initSlides: (e) => { 5415 const { slidesPerView: r } = i.params, 5416 { rows: n, fill: l } = i.params.grid; 5417 (s = t / n), (a = Math.floor(e / n)), (t = Math.floor(e / n) === e / n ? e : Math.
5417ceil(e / n) * n), "auto" !== r && "row" === l && (t = Math.max(t, r * n)); 5418 }, 5419 updateSlide: (e, r, n, l) => { 5420 const { slidesPerGroup: o, spaceBetween: d } = i.params, 5421 { rows: c, fill: p } = i.params.grid; 5422 let u, h, m; 5423 if ("row" === p && o > 1) { 5424 const s = Math.floor(e / (o * c)), 5425 a = e - c * o * s, 5426 i = 0 === s ? o : Math.min(Math.ceil((n - s * c * o) / c), o); 5427 (m = Math.floor(a / i)), (h = a - m * i + s * o), (u = h + (m * t) / c), r.css({ "-webkit-order": u, order: u }); 5428 } else 5429 "column" === p 5430 ? ((h = Math.floor(e / c)), (m = e - h * c), (h > a || (h === a && m === c - 1)) && ((m += 1), m >= c && ((m = 0), (h += 1)))) 5431 : ((m = Math.floor(e / s)), (h = e - m * s)); 5432 r.css(l("margin-top"), 0 !== m ? d && `${d}px` : ""); 5433 }, 5434 updateWrapperSize: (e, s, a) => { 5435 const { spaceBetween: r, centeredSlides: n, roundLengths: l } = i.params, 5436 { rows: o } = i.params.grid; 5437 if (((i.virtualSize = (e + r) * t), (i.virtualSize = Math.ceil(i.virtualSize / o) - r), i.$wrapperEl.css({ [a("width")]: `${i.virtualSize + r}px` }), n)) { 5438 s.splice(0, s.length); 5439 const e = []; 5440 for (let t = 0; t < s.length; t += 1) { 5441 let a = s[t]; 5442 l && (a = Math.floor(a)), s[t] < i.virtualSize + s[0] && e.push(a); 5443 } 5444 s.push(...e); 5445 } 5446 }, 5447 }); 5448 }, 5449 function (e) { 5450 let { swiper: t } = e; 5451 Object.assign(t, { appendSlide: K.bind(t), prependSlide: Z.bind(t), addSlide: Q.bind(t), removeSlide: J.bind(t), removeAllSlides: ee.bind(t) }); 5452 }, 5453 function (e) { 5454 let { swiper: t, extendParams: s, on: a } = e; 5455 s({ fadeEffect: { crossFade: !1, transformEl: null } }), 5456 te({ 5457 effect: "fade", 5458 swiper: t, 5459 on: a, 5460 setTranslate: () => { 5461 const { slides: e } = t, 5462 s = t.params.fadeEffect; 5463 for (let a = 0; a < e.length; a += 1) { 5464 const e = t.slides.eq(a); 5465 let i = -e[0].swiperSlideOffset; 5466 t.params.virtualTranslate || (i -= t.translate); 5467 let r = 0; 5468 t.isHorizontal() || ((r = i), (i = 0)); 5469 const n = t.params.fadeEffect.crossFade ? Math.max(1 - Math.abs(e[0].progress), 0) : 1 + Math.min(Math.max(e[0].progress, -1), 0); 5470 se(s, e).css({ opacity: n }).transform(`translate3d(${i}px, ${r}px, 0px)`); 5471 } 5472 }, 5473 setTransition: (e) => { 5474 const { transformEl: s } = t.params.fadeEffect; 5475 (s ? t.slides.find(s) : t.slides).transition(e), ae({ swiper: t, duration: e, transformEl: s, allSlides: !0 }); 5476 }, 5477 overwriteParams: () => ({ slidesPerView: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !t.params.cssMode }), 5478 }); 5479 }, 5480 function (e) { 5481 let { swiper: t, extendParams: s, on: a } = e; 5482 s({ cubeEffect: { slideShadows: !0, shadow: !0, shadowOffset: 20, shadowScale: 0.94 } }); 5483 const i = (e, t, s) => { 5484 let a = s ? e.find(".swiper-slide-shadow-left") : e.find(".swiper-slide-shadow-top"), 5485 i = s ? e.find(".swiper-slide-shadow-right") : e.find(".swiper-slide-shadow-bottom"); 5486 0 === a.length && ((a = d(`<div class="swiper-slide-shadow-${s ? "left" : "top"}"></div>`)), e.append(a)), 5487 0 === i.length && ((i = d(`<div class="swiper-slide-shadow-${s ? "right" : "bottom"}"></div>`)), e.append(i)), 5488 a.length && (a[0].style.opacity = Math.max(-t, 0)), 5489 i.length && (i[0].style.opacity = Math.max(t, 0)); 5490 }; 5491 te({ 5492 effect: "cube", 5493 swiper: t, 5494 on: a, 5495 setTranslate: () => { 5496 const { $el: e, $wrapperEl: s, slides: a, width: r, height: n, rtlTranslate: l, size: o, browser: c } = t, 5497 p = t.params.cubeEffect, 5498 u = t.isHorizontal(), 5499 h = t.virtual && t.params.virtual.enabled; 5500 let m, 5501 f = 0; 5502 p.shadow && 5503 (u 5504 ? ((m = s.find(".swiper-cube-shadow")), 0 === m.length && ((m = d('<div class="swiper-cube-shadow"></div>')), s.append(m)), m.css({ height: `${r}px` })) 5505 : ((m = e.find(".swiper-cube-shadow")), 0 === m.length && ((m = d('<div class="swiper-cube-shadow"></div>')), e.append(m)))); 5506 for (let e = 0; e < a.length; e += 1) { 5507 const t = a.eq(e); 5508 let s = e; 5509 h && (s = parseInt(t.attr("data-swiper-slide-index"), 10)); 5510 let r = 90 * s, 5511 n = Math.floor(r / 360); 5512 l && ((r = -r), (n = Math.floor(-r / 360))); 5513 const d = Math.max(Math.min(t[0].progress, 1), -1); 5514 let c = 0, 5515 m = 0, 5516 g = 0; 5517 s % 4 == 0 5518 ? ((c = 4 * -n * o), (g = 0)) 5519 : (s - 1) % 4 == 0 5520 ? ((c = 0), (g = 4 * -n * o)) 5521 : (s - 2) % 4 == 0 5522 ? ((c = o + 4 * n * o), (g = o)) 5523 : (s - 3) % 4 == 0 && ((c = -o), (g = 3 * o + 4 * o * n)), 5524 l && (c = -c), 5525 u || ((m = c), (c = 0)); 5526 const v = `rotateX(${u ? 0 : -r}deg) rotateY(${u ? r : 0}deg) translate3d(${c}
5526px, ${m}px, ${g}px)`; 5527 d <= 1 && d > -1 && ((f = 90 * s + 90 * d), l && (f = 90 * -s - 90 * d)), t.transform(v), p.slideShadows && i(t, d, u); 5528 } 5529 if ((s.css({ "-webkit-transform-origin": `50% 50% -${o / 2}px`, "transform-origin": `50% 50% -${o / 2}px` }), p.shadow)) 5530 if (u) m.transform(`translate3d(0px, ${r / 2 + p.shadowOffset}px, ${-r / 2}px) rotateX(90deg) rotateZ(0deg) scale(${p.shadowScale})`); 5531 else { 5532 const e = Math.abs(f) - 90 * Math.floor(Math.abs(f) / 90), 5533 t = 1.5 - (Math.sin((2 * e * Math.PI) / 360) / 2 + Math.cos((2 * e * Math.PI) / 360) / 2), 5534 s = p.shadowScale, 5535 a = p.shadowScale / t, 5536 i = p.shadowOffset; 5537 m.transform(`scale3d(${s}, 1, ${a}) translate3d(0px, ${n / 2 + i}px, ${-n / 2 / a}px) rotateX(-90deg)`); 5538 } 5539 const g = c.isSafari || c.isWebView ? -o / 2 : 0; 5540 s.transform(`translate3d(0px,0,${g}px) rotateX(${t.isHorizontal() ? 0 : f}deg) rotateY(${t.isHorizontal() ? -f : 0}deg)`), 5541 s[0].style.setProperty("--swiper-cube-translate-z", `${g}px`); 5542 }, 5543 setTransition: (e) => { 5544 const { $el: s, slides: a } = t; 5545 a.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), 5546 t.params.cubeEffect.shadow && !t.isHorizontal() && s.find(".swiper-cube-shadow").transition(e); 5547 }, 5548 recreateShadows: () => { 5549 const e = t.isHorizontal(); 5550 t.slides.each((t) => { 5551 const s = Math.max(Math.min(t.progress, 1), -1); 5552 i(d(t), s, e); 5553 }); 5554 }, 5555 getEffectParams: () => t.params.cubeEffect, 5556 perspective: () => !0, 5557 overwriteParams: () => ({ slidesPerView: 1, slidesPerGroup: 1, watchSlidesProgress: !0, resistanceRatio: 0, spaceBetween: 0, centeredSlides: !1, virtualTranslate: !0 }), 5558 }); 5559 }, 5560 function (e) { 5561 let { swiper: t, extendParams: s, on: a } = e; 5562 s({ flipEffect: { slideShadows: !0, limitRotation: !0, transformEl: null } }); 5563 const i = (e, s, a) => { 5564 let i = t.isHorizontal() ? e.find(".swiper-slide-shadow-left") : e.find(".swiper-slide-shadow-top"), 5565 r = t.isHorizontal() ? e.find(".swiper-slide-shadow-right") : e.find(".swiper-slide-shadow-bottom"); 5566 0 === i.length && (i = ie(a, e, t.isHorizontal() ? "left" : "top")), 5567 0 === r.length && (r = ie(a, e, t.isHorizontal() ? "right" : "bottom")), 5568 i.length && (i[0].style.opacity = Math.max(-s, 0)), 5569 r.length && (r[0].style.opacity = Math.max(s, 0)); 5570 }; 5571 te({ 5572 effect: "flip", 5573 swiper: t, 5574 on: a, 5575 setTranslate: () => { 5576 const { slides: e, rtlTranslate: s } = t, 5577 a = t.params.flipEffect; 5578 for (let r = 0; r < e.length; r += 1) { 5579 const n = e.eq(r); 5580 let l = n[0].progress; 5581 t.params.flipEffect.limitRotation && (l = Math.max(Math.min(n[0].progress, 1), -1)); 5582 const o = n[0].swiperSlideOffset; 5583 let d = -180 * l, 5584 c = 0, 5585 p = t.params.cssMode ? -o - t.translate : -o, 5586 u = 0; 5587 t.isHorizontal() ? s && (d = -d) : ((u = p), (p = 0), (c = -d), (d = 0)), (n[0].style.zIndex = -Math.abs(Math.round(l)) + e.length), a.slideShadows && i(n, l, a); 5588 const h = `translate3d(${p}px, ${u}
5588px, 0px) rotateX(${c}deg) rotateY(${d}deg)`; 5589 se(a, n).transform(h); 5590 } 5591 }, 5592 setTransition: (e) => { 5593 const { transformEl: s } = t.params.flipEffect; 5594 (s ? t.slides.find(s) : t.slides).transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), 5595 ae({ swiper: t, duration: e, transformEl: s }); 5596 }, 5597 recreateShadows: () => { 5598 const e = t.params.flipEffect; 5599 t.slides.each((s) => { 5600 const a = d(s); 5601 let r = a[0].progress; 5602 t.params.flipEffect.limitRotation && (r = Math.max(Math.min(s.progress, 1), -1)), i(a, r, e); 5603 }); 5604 }, 5605 getEffectParams: () => t.params.flipEffect, 5606 perspective: () => !0, 5607 overwriteParams: () => ({ slidesPerView: 1, slidesPerGroup: 1, watchSlidesProgress: !0, spaceBetween: 0, virtualTranslate: !t.params.cssMode }), 5608 }); 5609 }, 5610 function (e) { 5611 let { swiper: t, extendParams: s, on: a } = e; 5612 s({ coverflowEffect: { rotate: 50, stretch: 0, depth: 100, scale: 1, modifier: 1, slideShadows: !0, transformEl: null } }), 5613 te({ 5614 effect: "coverflow", 5615 swiper: t, 5616 on: a, 5617 setTranslate: () => { 5618 const { width: e, height: s, slides: a, slidesSizesGrid: i } = t, 5619 r = t.params.coverflowEffect, 5620 n = t.isHorizontal(), 5621 l = t.translate, 5622 o = n ? e / 2 - l : s / 2 - l, 5623 d = n ? r.rotate : -r.rotate, 5624 c = r.depth; 5625 for (let e = 0, t = a.length; e < t; e += 1) { 5626 const t = a.eq(e), 5627 s = i[e], 5628 l = (o - t[0].swiperSlideOffset - s / 2) / s, 5629 p = "function" == typeof r.modifier ? r.modifier(l) : l * r.modifier; 5630 let u = n ? d * p : 0, 5631 h = n ? 0 : d * p, 5632 m = -c * Math.abs(p), 5633 f = r.stretch; 5634 "string" == typeof f && -1 !== f.indexOf("%") && (f = (parseFloat(r.stretch) / 100) * s); 5635 let g = n ? 0 : f * p, 5636 v = n ? f * p : 0, 5637 w = 1 - (1 - r.scale) * Math.abs(p); 5638 Math.abs(v) < 0.001 && (v = 0), 5639 Math.abs(g) < 0.001 && (g = 0), 5640 Math.abs(m) < 0.001 && (m = 0), 5641 Math.abs(u) < 0.001 && (u = 0), 5642 Math.abs(h) < 0.001 && (h = 0), 5643 Math.abs(w) < 0.001 && (w = 0); 5644 const b = `translate3d(${v}px,${g}px,${m}px) rotateX(${h}deg) rotateY(${u}deg) scale(${w})`; 5645 if ((se(r, t).transform(b), (t[0].style.zIndex = 1 - Math.abs(Math.round(p))), r.slideShadows)) { 5646 let e = n ? t.find(".swiper-slide-shadow-left") : t.find(".swiper-slide-shadow-top"), 5647 s = n ? t.find(".swiper-slide-shadow-right") : t.find(".swiper-slide-shadow-bottom"); 5648 0 === e.length && (e = ie(r, t, n ? "left" : "top")), 5649 0 === s.length && (s = ie(r, t, n ? "right" : "bottom")), 5650 e.length && (e[0].style.opacity = p > 0 ? p : 0), 5651 s.length && (s[0].style.opacity = -p > 0 ? -p : 0); 5652 } 5653 } 5654 }, 5655 setTransition: (e) => { 5656 const { transformEl: s } = t.params.coverflowEffect; 5657 (s ? t.slides.find(s) : t.slides) 5658 .transition(e) 5659 .find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left") 5660 .transition(e); 5661 }, 5662 perspective: () => !0, 5663 overwriteParams: () => ({ watchSlidesProgress: !0 }), 5664 }); 5665 }, 5666 function (e) { 5667 let { swiper: t, extendParams: s, on: a } = e; 5668 s({ 5669 creativeEffect: { 5670 transformEl: null, 5671 limitProgress: 1, 5672 shadowPerProgress: !1, 5673 progressMultiplier: 1, 5674 perspective: !0, 5675 prev: { translate: [0, 0, 0], rotate: [0, 0, 0], opacity: 1, scale: 1 }, 5676 next: { translate: [0, 0, 0], rotate: [0, 0, 0], opacity: 1, scale: 1 }, 5677 }, 5678 }); 5679 const i = (e) => ("string" == typeof e ? e : `${e}px`); 5680 te({ 5681 effect: "creative", 5682 swiper: t, 5683 on: a, 5684 setTranslate: () => { 5685 const { slides: e, $wrapperEl: s, slidesSizesGrid: a } = t, 5686 r = t.params.creativeEffect, 5687 { progressMultiplier: n } = r, 5688 l = t.params.centeredSlides; 5689 if (l) { 5690 const e = a[0] / 2 - t.params.slidesOffsetBefore || 0; 5691 s.transform(`translateX(calc(50% - ${e}px))`); 5692 } 5693 for (let s = 0; s < e.length; s += 1) { 5694 const a = e.eq(s), 5695 o = a[0].progress, 5696 d = Math.min(Math.max(a[0].progress, -r.limitProgress), r.limitProgress); 5697 let c = d; 5698 l || (c = Math.min(Math.max(a[0].originalProgress, -r.limitProgress), r.limitProgress)); 5699 const p = a[0].swiperSlideOffset, 5700 u = [t.params.cssMode ? -p - t.translate : -p, 0, 0], 5701 h = [0, 0, 0]; 5702 let m = !1; 5703 t.isHorizontal() || ((u[1] = u[0]), (u[0] = 0)); 5704 let f = { translate: [0, 0, 0], rotate: [0, 0, 0], scale: 1, opacity: 1 }; 5705 d < 0 ? ((f = r.next), (m = !0)) : d > 0 && ((f = r.prev), (m = !0)), 5706 u.forEach((e, t) => { 5707 u[t] = `calc(${e}px + (${i(f.translate[t])} * ${Math.abs(d * n)}))`; 5708 }), 5709 h.forEach((e, t) => { 5710 h[t] = f.rotate[t] * Math.abs(d * n); 5711 }), 5712 (a[0].style.zIndex = -Math.abs(Math.round(o)) + e.length); 5713 const g = u.join(", "), 5714 v = `rotateX(${h[0]}deg) rotateY(${h[1]}deg) rotateZ(${h[2]}deg)`, 5715 w = c < 0 ? `scale(${1 + (1 - f.scale) * c * n})` : `scale(${1 - (1 - f.scale) * c * n})`, 5716 b = c < 0 ? 1 + (1 - f.opacity) * c * n : 1 - (1 - f.opacity) * c * n, 5717 x = `translate3d(${g}) ${v} ${w}`; 5718 if ((m && f.shadow) || !m) { 5719 let e = a.children(".swiper-slide-shadow"); 5720 if ((0 === e.length && f.shadow && (e = ie(r, a)), e.length)) { 5721 const t = r.shadowPerProgress ? d * (1 / r.limitProgress) : d; 5722 e[0].style.opacity = Math.min(Math.max(Math.abs(t), 0), 1); 5723 } 5724 } 5725 const y = se(r, a); 5726 y.transform(x).css({ opacity: b }), f.origin && y.css("transform-origin", f.origin); 5727 } 5728 }, 5729 setTransition: (e) => { 5730 const { transformEl: s } = t.params.creativeEffect; 5731 (s ? t.slides.find(s) : t.slides).transition(e).find(".swiper-slide-shadow").transition(e), ae({ swiper: t, duration: e, transformEl: s, allSlides: !0 }); 5732 }, 5733 perspective: () => t.params.creativeEffect.perspective, 5734 overwriteParams: () => ({ watchSlidesProgress: !0, virtualTranslate: !t.params.cssMode }), 5735 }); 5736 }, 5737 function (e) { 5738 let { swiper: t, extendParams: s, on: a } = e; 5739 s({ cardsEffect: { slideShadows: !0, transformEl: null, rotate: !0, perSlideRotate: 2, perSlideOffset: 8 } }), 5740 te({ 5741 effect: "cards", 5742 swiper: t, 5743 on: a, 5744 setTranslate: () => { 5745 const { slides: e, activeIndex: s } = t, 5746 a = t.params.cardsEffect, 5747 { startTranslate: i, isTouched: r } = t.touchEventsData, 5748 n = t.translate; 5749 for (let l = 0; l < e.length; l += 1) { 5750 const o = e.eq(l), 5751 d = o[0].progress, 5752 c = Math.min(Math.max(d, -4), 4); 5753 let p = o[0].swiperSlideOffset; 5754 t.params.centeredSlides && !t.params.cssMode && t.$wrapperEl.transform(`translateX(${t.minTranslate()}px)`), 5755 t.params.centeredSlides && t.params.cssMode && (p -= e[0].swiperSlideOffset); 5756 let u = t.params.cssMode ? -p - t.translate : -p, 5757 h = 0; 5758 const m = -100 * Math.abs(c); 5759 let f = 1, 5760 g = -a.perSlideRotate * c, 5761 v = a.perSlideOffset - 0.75 * Math.abs(c); 5762 const w = t.virtual && t.params.virtual.enabled ? t.virtual.from + l : l, 5763 b = (w === s || w === s - 1) && c > 0 && c < 1 && (r || t.params.cssMode) && n < i, 5764 x = (w === s || w === s + 1) && c < 0 && c > -1 && (r || t.params.cssMode) && n > i; 5765 if (b || x) { 5766 const e = (1 - Math.abs((Math.abs(c) - 0.5) / 0.5)) ** 0.5; 5767 (g += -28 * c * e), (f += -0.5 * e), (v += 96 * e), (h = -25 * e * Math.abs(c) + "%"); 5768 } 5769 if (((u = c < 0 ? `calc(${u}px + (${v * Math.abs(c)}%))` : c > 0 ? `calc(${u}px + (-${v * Math.abs(c)}%))` : `${u}px`), !t.isHorizontal())) { 5770 const e = h; 5771 (h = u), (u = e); 5772 } 5773 const y = c < 0 ? "" + (1 + (1 - f) * c) : "" + (1 - (1 - f) * c), 5774 E = `\n translate3d(${u}, ${h}, ${m}px)\n rotateZ(${a.rotate ? g : 0}deg)\n scale(${y})\n `; 5775 if (a.slideShadows) { 5776 let e = o.find(".swiper-slide-shadow"); 5777 0 === e.length && (e = ie(a, o)), e.length && (e[0].style.opacity = Math.min(Math.max((Math.abs(c) - 0.5) / 0.5, 0), 1)); 5778 } 5779 o[0].style.zIndex = -Math.abs(Math.round(d)) + e.length; 5780 se(a, o).transform(E); 5781 } 5782 }, 5783 setTransition: (e) => { 5784 const { transformEl: s } = t.params.cardsEffect; 5785 (s ? t.slides.find(s) : t.slides).transition(e).find(".swiper-slide-shadow").transition(e), ae({ swiper: t, duration: e, transformEl: s }); 5786 }, 5787 perspective: () => !0, 5788 overwriteParams: () => ({ watchSlidesProgress: !0, virtualTranslate: !t.params.cssMode }), 5789 }); 5790 }, 5791 ]; 5792 return V.use(re), V; 5793}); 5794//# sourceMappingURL=swiper-bundle.min.js.map 5795 5796/** 5797 * ì¹´í ê³ ë¦¬ ë§ì°ì¤ ì¤ë² ì´ë¯¸ì§ 5798 * ì¹´í ê³ ë¦¬ ë,ì¤,ì,íìë¶ë¥ê¹ì§ ì¶ë ¥ - ì¸ë¡í 5799 * 210827 ìì í ìì 5800 */ 5801 5802$(document).ready(function () { 5803 var methods = { 5804 aCategory: [], 5805 aSubCategory: {}, 5806 5807 get: function () { 5808 $.ajax({ 5809 url: "/exec/front/Product/SubCategory", 5810 dataType: "json", 5811 success: function (aData) { 5812 if (aData == null || aData == "undefined") return; 5813 for (var i = 0; i < aData.length; i++) { 5814 var sParentCateNo = aData[i].parent_cate_no; 5815 5816 if (!methods.aSubCategory[sParentCateNo]) { 5817 methods.aSubCategory[sParentCateNo] = []; 5818 } 5819 5820 methods.aSubCategory[sParentCateNo].push(aData[i]); 5821 } 5822 }, 5823 }); 5824 }, 5825 5826 getParam: function (sUrl, sKey) { 5827 var aUrl = sUrl.split("?"); 5828 var sQueryString = aUrl[1]; 5829 var aParam = {}; 5830
5831 if (sQueryString) { 5832 var aFields = sQueryString.split("&"); 5833 var aField = []; 5834 for (var i = 0; i < aFields.length; i++) { 5835 aField = aFields[i].split("="); 5836 aParam[aField[0]] = aField[1]; 5837 } 5838 } 5839 return sKey ? aParam[sKey] : aParam; 5840 }, 5841 5842 getParamSeo: function (sUrl) { 5843 var aUrl = EC_ROUTE.getCleanUrl(sUrl).split("/"); 5844 return aUrl[3] ? aUrl[3] : null; 5845 }, 5846 5847 show: function (overNode, iCateNo) { 5848 var oParentNode = overNode; 5849 var aHtml = []; 5850 var sMyCateList = localStorage.getItem("myCateList"); 5851 // if (methods.aSubCategory[iCateNo] != undefined) { 5852 // aHtml.push('<ul class="sub-category">'); 5853 // $(methods.aSubCategory[iCateNo]).each(function() { 5854 // var sNextParentNo = this.cate_no; 5855 // var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 5856 // if (methods.aSubCategory[sNextParentNo] == undefined) { 5857 // aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 5858 // var sHref = '/product/list.html'+this.param; 5859 // } else { 5860 // aHtml.push('<li id="cate'+this.cate_no+'">'); 5861 // var sHref = '#none'; 5862 // } 5863 // aHtml.push('<a href="/product/list.html'+this.param+'" class="view" cate="'+this.param+'" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" onmouseover="subMenuon(this);" data-i18n-new>'+this.name+'</a>'); 5864 5865 // if (methods.aSubCategory[sNextParentNo] != undefined) { 5866 // aHtml.push('<ul class="sub-category-middle">'); 5867 // $(methods.aSubCategory[sNextParentNo]).each(function() { 5868 // var sNextParentNo2 = this.cate_no; 5869 // var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 5870 // if (methods.aSubCategory[sNextParentNo2] == undefined) { 5871 // aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 5872 // var sHref = '/product/list.html'+this.param; 5873 // } else { 5874 // aHtml.push('<li id="cate'+this.cate_no+'">'); 5875 // var sHref = '#none'; 5876 // } 5877 // aHtml.push('<a href="/product/list.html'+this.param+'" class="view" cate="'+this.param+'" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" onmouseover="subMenuon(this);" data-i18n-new>'+this.name+'</a>'); 5878 5879 // if (methods.aSubCategory[sNextParentNo2] != undefined) { 5880 // aHtml.push('<ul class="sub-category-child">'); 5881 5882 // $(methods.aSubCategory[sNextParentNo2]).each(function() { 5883 // aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 5884 // var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 5885 // aHtml.push('<a href="/product/list.html'+this.param+'" class="view" cate="'+this.param+'" onmouseover="subMenuon(this);" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>'); 5886 // aHtml.push('</li>'); 5887 // }); 5888 // aHtml.push('</ul>'); 5889 // } 5890 5891 // aHtml.push('</li>'); 5892 // }); 5893 // aHtml.push('</ul>'); 5894 // } 5895 // aHtml.push('</li>'); 5896 // }); 5897 // aHtml.push('</ul>'); 5898 // } 5899 $(oParentNode).append(aHtml.join("")); 5900 // if (window.i18nextCafe24) { 5901 // i18nextCafe24.translate('data-i18n-new'); 5902 // } 5903 }, 5904 5905 close: function () { 5906 $(".sub-category").remove(); 5907 }, 5908 }; 5909 5910 methods.get(); 5911 5912 $("#header .xans-layout-category li") 5913 .mouseenter(function (e) { 5914 var $this = $(this).addClass("on"), 5915 iCateNo = Number(methods.getParam($this.find("a").attr("href"), "cate_no")); 5916 5917 if (!iCateNo) { 5918 iCateNo = Number(methods.getParamSeo($this.find("a").attr("href"))); 5919 } 5920 5921 if (!iCateNo) { 5922 return; 5923 } 5924 5925 methods.show($this, iCateNo); 5926 }) 5927 .mouseleave(function (e) { 5928 $(this).removeClass("on"); 5929 5930 methods.close(); 5931 }); 5932}); 5933 5934function subMenuon(obj) { 5935 $(obj).parent().find("li").removeClass("on"); 5936 $(obj).parent().addClass("on"); 5937 $(obj).parent().siblings().removeClass("on"); 5938} 5939 5940var aCategory = []; 5941$(function(){ 5942 var methods = { 5943 aCategory : [], 5944 aSubCategory : {}, 5945 get: function() { 5946 $.ajax({ 5947 url : '/exec/front/Product/SubCategory', 5948 dataType: 'json', 5949 success: function(aData) { 5950 if (aData == null || aData == 'undefined') { 5951 methods.checkSub(); 5952 return; 5953 } 5954 for (var i=0; i<aData.length; i++) 5955 { 5956 var sParentCateNo = aData[i].parent_cate_no; 5957 var sCateNo = aData[i].cate_no; 5958 if (!methods.aSubCategory[sParentCateNo]) { 5959 methods.aSubCategory[sParentCateNo] = []; 5960 } 5961 if (!aCategory[sCateNo]) { 5962 aCategory[sCateNo] = []; 5963 } 5964 methods.aSubCategory[sParentCateNo].push( aData[i] ); 5965 aCategory[sCateNo] = aData[i]; 5966 } 5967 methods.checkSub(); 5968 } 5969 }); 5970 }, 5971 getParam: function(sUrl, sKey) { 5972 if (typeof sUrl !== 'string') return; 5973 var aUrl = sUrl.split('?'); 5974 var sQueryString = aUrl[1]; 5975 var aParam = {};
5976 if (sQueryString) { 5977 var aFields = sQueryString.split("&"); 5978 var aField = []; 5979 for (var i=0; i<aFields.length; i++) { 5980 aField = aFields[i].split('='); 5981 aParam[aField[0]] = aField[1]; 5982 } 5983 } 5984 return sKey ? aParam[sKey] : aParam; 5985 }, 5986 5987 show: function(overNode, iCateNo) { 5988 var oParentNode = overNode; 5989 var aHtml = []; 5990 var sMyCateList = localStorage.getItem("myCateList"); 5991 if (methods.aSubCategory[iCateNo] != undefined) { 5992 aHtml.push('<ul class="slideSubMenu">'); 5993 $(methods.aSubCategory[iCateNo]).each(function() { 5994 var sNextParentNo = this.cate_no; 5995 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 5996 if (methods.aSubCategory[sNextParentNo] == undefined) { 5997 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 5998 var sHref = '/product/list.html'+this.param; 5999 } else { 6000 aHtml.push('<li id="cate'+this.cate_no+'">'); 6001 var sHref = '#none'; 6002 } 6003 aHtml.push('<a href="/product/list.html'+this.param+'" class="view" cate="'+this.param+'" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>'); 6004 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="'+sHref+'"'+this.param+'" onclick="subMenuEvent(this);" class="cate">ìí보기</a>'); 6005 6006 if (methods.aSubCategory[sNextParentNo] != undefined) { 6007 aHtml.push('<ul>'); 6008 $(methods.aSubCategory[sNextParentNo]).each(function() { 6009 var sNextParentNo2 = this.cate_no; 6010 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 6011 if (methods.aSubCategory[sNextParentNo2] == undefined) { 6012 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 6013 var sHref = '/product/list.html'+this.param; 6014 } else { 6015 aHtml.push('<li id="cate'+this.cate_no+'">'); 6016 var sHref = '#none'; 6017 } 6018 aHtml.push('<a href="/product/list.html'+this.param+'" class="view" cate="'+this.param+'" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>'); 6019 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="'+sHref+'"'+this.param+'" onclick="subMenuEvent(this);" class="cate">ìí보기</a>'); 6020 6021 if (methods.aSubCategory[sNextParentNo2] != undefined) { 6022 aHtml.push('<ul>'); 6023 6024 $(methods.aSubCategory[sNextParentNo2]).each(function() { 6025 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 6026 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 6027 aHtml.push('<a href="/product/list.html'+this.param+'" class="view" cate="'+this.param+'" onclick="subMenuEvent(this);" data-i18n="LIST.PRD_CATE_NO_'+this.cate_no+'" data-i18n-new>'+this.name+'</a>'); 6028 aHtml.push('</li>'); 6029 }); 6030 aHtml.push('</ul>'); 6031 } 6032 aHtml.push('</li>'); 6033 }); 6034 aHtml.push('</ul>'); 6035 } 6036 aHtml.push('</li>'); 6037 }); 6038 aHtml.push('</ul>'); 6039 } 6040 $(oParentNode).append(aHtml.join('')); 6041 if (window.i18nextCafe24) { 6042 i18nextCafe24.translate('data-i18n-new'); 6043 } 6044 }, 6045 close: function() { 6046 $('.slideSubMenu').remove(); 6047 }, 6048 checkSub: function() { 6049 $('.cate').each(function(){ 6050 var sParam = $(this).attr('cate'); 6051 if (!sParam) return; 6052 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 6053 var result = methods.aSubCategory[iCateNo]; 6054 if (result == undefined) { 6055 if ($(this).closest('#slideProjectList').length) { 6056 var sHref = '/product/project.html'+sParam; 6057 } else { 6058 var sHref = '/product/list.html'+sParam; 6059 } 6060 6061 $(this).attr('href', sHref); 6062 $(this).parent().attr('class', 'noChild'); 6063 } 6064 }); 6065 } 6066 }; 6067 6068 methods.get(); 6069 6070 $('#slideCateList li > a.cate').on('click', function(e) { 6071 var sParam = $(this).attr('cate'); 6072 if (!sParam) return; 6073 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 6074 var hasClass = $(this).parent().hasClass('selected'); 6075 6076 if(hasClass) { 6077 methods.close(); 6078 $(this).parent().removeClass('selected'); 6079 } else { 6080 if (!iCateNo) return; 6081 $('#aside #slideCateList li').removeClass('selected'); 6082 $(this).parent().addClass('selected'); 6083 methods.close(); 6084 methods.show(this.parentNode, iCateNo); 6085 } 6086 e.preventDefault(); 6087 }); 6088 6089 /* 모ë°ì¼ ì¬ë¼ì´ëë° ì¹´í ê³ ë¦¬ ì¤ë¶ë¥ì²´í¬ */ 6090 jQuery('#slide_add_category li').each(function(){ 6091 if( jQuery(this).children('ul').length == 0 ){ 6092 jQuery(this).addClass('noChild'); 6093 } else { 6094 jQuery(this).append('<a href="#none" class="cate">ìí보기</a>'); 6095 } 6096 }); 6097 6098 /* 모ë°ì¼ ì¬ë¼ì´ëë° ì¹´í ê³ ë¦¬ */ 6099 $('#aside ul a.cate').on('click', function(e){ 6100 var sParam = $(this).attr('cate'); 6101 if(sParam) return; 6102 6103 $(this).parent().find('li').removeClass('selected'); 6104 $('#slideCateList .categoryList li').removeClass('selected'); 6105 $(this).parent().toggleClass('selected'); 6106 6107 if (!$(this).parent('li').hasClass('noChild')){ 6108 e.preventDefault(); 6109 } 6110 }); 6111 6112 /* ì¬ë¼ì´ë ê³ ê°ì¼í° í ê¸ */ 6113 jQuery('#aside .navigation-menu__board .icoCategory').click(function() { 6114 var target = jQuery(this).parents('#aside .navigation-menu__board'); 6115 if(target.find('.categoryList').css("display") == "none"){ 6116 target.find('.categoryList').show(); 6117 }else{ 6118 target.find('.categoryList').hide(); 6119 } 6120 6121 jQuery(this).parents('.title').toggleClass('selected'); 6122 }); 6123 6124 $('#slideCateList h2').on('click', function() { 6125 var oParentId = $(this).parent().attr('id'); 6126 if (oParentId == 'slideCateList' || oParentId == 'slideMultishopList' || oParentId == 'slideProjectList') { 6127 ($(this).attr('class') == 'selected') ? $(this).next().hide() : $(this).next().show(); 6128 } 6129 $(this).toggleClass('selected'); 6130 }); 6131
6132 $('#slideProjectList .icoCategory').on('click', function() { 6133 var target = $(this).parents('#slideProjectList'); 6134 if(target.find('.categoryList').css("display") == "none"){ 6135 target.find('.categoryList').show(); 6136 }else{ 6137 target.find('.categoryList').hide(); 6138 } 6139 6140 $(this).parents('.title').toggleClass('selected'); 6141 }); 6142 6143}); 6144function subMenuEvent(obj) { 6145 $(obj).parent().find('li').removeClass('selected'); 6146 $(obj).parent().toggleClass('selected'); 6147} 6148 6149function checkInArray(sBookmarkList, iCateNo) { 6150 if (sBookmarkList == null) return false; 6151 var aBookmarkList = sBookmarkList.split("|"); 6152 for (var i = 0; i < aBookmarkList.length; i++) { 6153 if (aBookmarkList[i] == iCateNo) { 6154 return true; 6155 } 6156 } 6157 return false; 6158} 6159// 210812 ìì íìì 6160EC$(function($) { 6161 var filter = "win16|win32|win64|mac|macintel"; 6162 var device = "pc"; 6163 if (navigator.platform) { 6164 if (filter.indexOf(navigator.platform.toLowerCase()) < 0) { 6165 device = "mobile"; 6166 } 6167 } 6168 6169 /** 6170 * ìíìì¸, ìí íë보기(íì ) - ìë¹ìê° í ì¸íì */ 6171 var oPriceInfoEl = $('#ec-product-price-info'); 6172 if (oPriceInfoEl.length > 0) { 6173 var salePriceEl = $('#span_product_price_text'); 6174 percentageCul(oPriceInfoEl, salePriceEl); 6175 } 6176 6177 /** 6178 * ìí목ë¡/ë©ì¸ì§ì´ - ìë¹ìê° í ì¸íì*/ 6179 function sale_percent() { 6180 var mainEl = $("#contents"); 6181 if (mainEl.length > 0) { 6182 var productListEl = $('.xans-product-listmain, .xans-product-listrecommend, .xans-product-listnew, .xans-product-listnormal, .xans-search-result'); 6183 for (var i = 0; i < productListEl.length; i++) { 6184 var prdListEl = productListEl.eq(i).find('.prdList > li'); 6185 for (var j = 0; j < prdListEl.length; j++) { 6186 var priceEl = prdListEl.eq(j).find('.description'), 6187 salePriceEl = priceEl.parent().find('.thumbnail'); 6188 if (device == "mobile") { 6189 salePriceEl = priceEl.parent().find('.thumbnail'); 6190 } 6191 percentageCul(priceEl, salePriceEl); 6192 6193 } 6194 } 6195 } 6196 } 6197 6198 function percentageCul(target, salePriceEl) { 6199 var iCustomPrice = parseInt(target.attr('ec-data-custom').replace(/[^0-9]/g,"")); 6200 var iPrice = parseInt(target.attr('ec-data-price').replace(/[^0-9]/g,"")); 6201 var sDisplayAmount = 'p', // p:í ì¸ì¨, w:í ì¸ê¸ì¡ 6202 iOfftoFixed = 0, // í ì¸ì¨ ììì ì릿ì 6203 sSaleText = '', 6204 regexp = /B(?=(d{3})+(?!d))/g; 6205 6206 if (iCustomPrice > 0 && iPrice > 0 && iPrice != iCustomPrice) { 6207 if (sDisplayAmount == 'p') { 6208 sSaleText = (((iCustomPrice - iPrice) / iCustomPrice) * 100).toFixed(iOfftoFixed) + '%'; 6209 } else if (sDisplayAmount == 'w') { 6210 sSaleText = parseInt(iCustomPrice - iPrice).toString().replace(regexp, ',') + 'ì OFF'; 6211 } 6212 salePriceEl.append("<div class='sale_box'>" + sSaleText + "</div>"); 6213 } 6214 } 6215 6216 /* ìí í ì¸ì¨ ì¤í */ 6217 setTimeout(function(){ 6218 sale_percent(); 6219 }, 300); 6220 6221 /* [ë보기] ë²í¼ í´ë¦ì ìíë¡ë©ëê³ 0.6ì´í ì¬ê³ì° - ìì í */ 6222 jQuery(".btnMore").click( function( ){ 6223 setTimeout(function(){ 6224 sale_percent(); 6225 }, 600); 6226 }); 6227}); 6228/** 6229 * hasClass 6230 */ 6231function hasClass(element, className){ 6232 return (' ' + element.className + ' ').indexOf(' ' + className+ ' ') > -1; 6233}; 6234 6235/** 6236 * toggle 6237 */ 6238function toggleClassAll(element, handler, className){ 6239 var _handler = document.querySelector(handler); 6240 document.querySelectorAll(handler).forEach(function(item){ 6241 item.addEventListener('click', function(){ 6242 var _element = item.parentNode; 6243 if ( hasClass( _element, className ) ) { 6244 _element.classList.remove( className ); 6245 } else { 6246 _element.classList.add( className ); 6247 } 6248 }) 6249 }) 6250}; 6251 6252/** 6253 * findElements 6254 */ 6255function findElements(element, findElement){ 6256 var resultElements = []; 6257 document.querySelectorAll(element).forEach(function(item){ 6258 var findElementList = item.querySelectorAll(findElement); 6259 findElementList = Array.prototype.slice.call(findElementList); 6260 resultElements = resultElements.concat(findElementList); 6261 }) 6262 return resultElements; 6263}; 6264 6265/** 6266 * setAttributeAl 6267 */ 6268function setAttributeAll(elements, name, value){
6269 elements.forEach(function(item){ 6270 item.setAttribute(name, value); 6271 }) 6272}; 6273 6274/** 6275 * tooltip 6276 */ 6277function setTooltipEvent(){ 6278 var input = findElements('.eTooltip', 'input'); 6279 input.forEach(function(item){ 6280 item.addEventListener('focusin', function(event){ 6281 var targetName = returnTargetName(event.target); 6282 targetName.nextElementSibling.style.display = 'block' 6283 }); 6284 item.addEventListener('focusout', function(event){ 6285 var targetName = returnTargetName(event.target); 6286 targetName.nextElementSibling.style.display = 'none' 6287 }); 6288 }); 6289} 6290 6291/** 6292 * tooltip input focus 6293 */ 6294function returnTargetName(_this){ 6295 var ePlacename = _this.parentElement.getAttribute("class"); 6296 var targetName; 6297 if(ePlacename == "ePlaceholder"){ //ePlaceholder supported 6298 targetName = _this.parentElement; 6299 }else{ 6300 targetName = _this; 6301 } 6302 return targetName; 6303} 6304 6305/** 6306 * window load 6307 */ 6308window.addEventListener('load', function(){ 6309 if (document.querySelector('.eTooltip')){ 6310 setAttributeAll(findElements('.eTooltip', '.btnClose'),'tabIndex','-1'); 6311 setTooltipEvent(); 6312 } 6313 if (document.querySelector('div.eToggle')){ 6314 toggleClassAll(false, 'div.eToggle .title', 'selected'); 6315 } 6316}); 6317window.addEventListener("load", function () { 6318 // bottomNav(); 6319 // fixedHeader(); 6320 handleNav(); 6321 //quickGoTop(); ì¬ì©ìí¨ 210805 ìì í ìì 6322 searchLayer(); 6323 //toggleClass('.xans-layout-info.info__customer', '.xans-layout-info.info__customer .toggle', 'selected'); ì¬ì©ìí¨ 210805 ìì í ìì 6324 //topBanner(); ì¬ì©ìí¨ 210804 ìì í ìì 6325 handleScroll(); 6326}); 6327 6328function handleScroll() { 6329 var scrollPosition = 0; 6330 var ticking = false; 6331 var quickMenu = document.querySelector("#quick"); 6332 var scrollY = window.scrollY || window.pageYOffset; 6333 //setQuickScrollEvent(scrollY, quickMenu); ì¬ì©ìí¨ 210805 ìì í ìì 6334 window.addEventListener("scroll", function (e) { 6335 scrollPosition = window.scrollY || window.pageYOffset; 6336 if (ticking) return; 6337 window.requestAnimationFrame(function () { 6338 // fixedHeader(); 6339 //setQuickScrollEvent(scrollPosition, quickMenu) ì¬ì©ìí¨ 210805 ìì í ìì 6340 ticking = false; 6341 }); 6342 ticking = true; 6343 }); 6344} 6345 6346function toggleClass(element, handler, className) { 6347 var _handler = document.querySelector(handler); 6348 var _element = document.querySelector(element); 6349 6350 _handler.addEventListener("click", function () { 6351 if (_element.classList.contains(className)) { 6352 _element.classList.remove(className); 6353 } else { 6354 _element.classList.add(className); 6355 } 6356 }); 6357} 6358 6359// function fixedHeader() { 6360// // 210804 ìì í ìì 6361// var header = document.getElementById("header"); 6362// var fixed_margin = document.getElementById("contents"); 6363// var scrollY = window.pageYOffset || document.documentElement.scrollTop; 6364// var header_height = document.getElementById("header").scrollHeight + "px"; 6365 6366// if (scrollY > header.offsetTop) { 6367// header.classList.add("fixed"); 6368// fixed_margin.style.marginTop = header_height; 6369// } else { 6370// header.classList.remove("fixed"); 6371// fixed_margin.style.marginTop = "0px"; 6372// } 6373// } 6374 6375function handleNav() { 6376 var btnNavs = document.querySelectorAll(".eNavFold"); 6377 var dimmed = document.querySelector("#layoutDimmed"); 6378 var elements = document.getElementsByClassName("test"); 6379 btnNavs.forEach(function (btnNav) { 6380 btnNav.addEventListener("click", function () { 6381 document.body.classList.add("expand"); 6382 }); 6383 }); 6384 6385 handleDimmed(dimmed, document.body, "expand"); 6386} 6387 6388function searchLayer() { 6389 var btnSearchs = document.querySelectorAll(".eSearch"); 6390 btnSearchs.forEach(function (btnSearch) { 6391 btnSearch.addEventListener("click", function () { 6392 document.body.classList.add("searchExpand"); 6393 var input = document.querySelector("#keyword"); 6394 //input.focus(); 6395 }); 6396 }); 6397 var dimmed = document.querySelector("#layoutDimmed"); 6398 handleDimmed(dimmed, document.body, "searchExpand"); 6399} 6400 6401function handleDimmed(target, element, className) { 6402 target.addEventListener("click", function () { 6403 element.classList.remove(className); 6404 }); 6405} 6406 6407function bottomScroll() { 6408 var lastScrollTop = 0; 6409 var delta = 5; 6410 var fixBox = document.querySelector(".bottom-nav__top"); 6411 var fixBoxHeight = fixBox.offsetHeight; 6412 var didScroll; 6413 6414 window.onscroll = function (e) { 6415 didScroll = true; 6416 }; 6417 6418 setInterval(function () { 6419 if (didScroll) { 6420 hasScrolled(); 6421 didScroll = false;
6422 } 6423 }, 250); 6424 6425 function hasScrolled() { 6426 var nowScrollTop = window.scrollY; 6427 if (Math.abs(lastScrollTop - nowScrollTop) <= delta) { 6428 return; 6429 } 6430 if (nowScrollTop > lastScrollTop && nowScrollTop > fixBoxHeight) { 6431 //Scroll down 6432 var scrollTop = window.scrollTop(); 6433 var innerHeight = window.innerHeight(); 6434 var scrollHeight = $("body").prop("scrollHeight"); 6435 if (scrollTop + innerHeight >= scrollHeight) { 6436 fixBox.classList.add("bottom-nav--hide"); 6437 return true; 6438 } 6439 } else { 6440 if (nowScrollTop + window.innerHeight < document.body.offsetHeight) { 6441 //Scroll up 6442 fixBox.classList.remove("bottom-nav--hide"); 6443 } 6444 } 6445 lastScrollTop = nowScrollTop; 6446 } 6447} 6448 6449function bottomNav() { 6450 var lastScrollTop = 0; 6451 var fixedButton = document.getElementById("orderFixArea"); 6452 if (fixedButton) { 6453 document.body.classList.add("button--fixed"); 6454 } 6455 6456 window.addEventListener("scroll", function () { 6457 var scroll = window.pageYOffset || document.documentElement.scrollTop; 6458 var nav = document.querySelector(".bottom-nav"); 6459 if (scroll > lastScrollTop) { 6460 nav.classList.add("bottom-nav--hide"); 6461 } else { 6462 nav.classList.remove("bottom-nav--hide"); 6463 } 6464 // scroll bottom 6465 if (scroll === document.body.scrollHeight - document.documentElement.offsetHeight) { 6466 nav.classList.remove("bottom-nav--hide"); 6467 } 6468 lastScrollTop = scroll <= 0 ? 0 : scroll; 6469 6470 // top button 6471 var currentScrollPercentage = getCurrentScrollPercentage(); 6472 }); 6473} 6474 6475function getOffset(element) { 6476 if (!element.getClientRects().length) { 6477 return { top: 0, left: 0 }; 6478 } 6479 6480 var rect = element.getBoundingClientRect(); 6481 var win = element.ownerDocument.defaultView; 6482 return { 6483 top: rect.top + win.pageYOffset, 6484 left: rect.left + win.pageXOffset, 6485 }; 6486} 6487 6488function getQuickPosition() { 6489 var role = document.querySelector("meta[name='path_role']").getAttribute("content"); 6490 if (role === "MAIN") { 6491 return getMainQuickPosition(); 6492 } else { 6493 return getSubQuickPosition(); 6494 } 6495} 6496 6497function getMainQuickPosition() { 6498 var quickMenu = document.querySelector("#quick"); 6499 var collection = document.querySelector(".collection"); 6500 var snsItem = document.querySelector(".snsItem"); 6501 6502 var mainTopSpace = 115; 6503 var mainFooterSpace = 34; 6504 6505 var top = collection.offsetTop + collection.clientHeight + mainTopSpace; 6506 var footTop = getOffset(snsItem).top + mainFooterSpace; 6507 var maxY = footTop - quickMenu.offsetHeight; 6508 6509 return [top, maxY]; 6510} 6511 6512function getSubQuickPosition() { 6513 var quickMenu = document.querySelector("#quick"); 6514 var footer = document.querySelector("#footer"); 6515 6516 var footerSpace = 60; 6517 var top = 284; 6518 var footTop = getOffset(footer).top; 6519 var maxY = footTop - quickMenu.offsetHeight - footerSpace; 6520 6521 return [top, maxY]; 6522} 6523 6524function setQuickScrollEvent(y, quick) { 6525 var header = document.querySelector("#header"); 6526 var position = getQuickPosition(); 6527 var scrollY = y; 6528 if (scrollY >= position[0] - header.offsetHeight) { 6529 if (scrollY < position[1]) { 6530 quick.classList.add("fixed"); 6531 quick.removeAttribute("style"); 6532 } else { 6533 quick.classList.remove("fixed"); 6534 quick.style.position = "absolute"; 6535 quick.style.top = position[1] + "px"; 6536 } 6537 } else { 6538 quick.style.top = position[0] + "px"; 6539 quick.classList.remove("fixed"); 6540 } 6541} 6542 6543function topBanner() { 6544 var banner = document.querySelector("#topBanner"); 6545 if (!banner) return; 6546} 6547 6548function getCurrentScrollPercentage() { 6549 return ((window.scrollY + window.innerHeight) / document.body.clientHeight) * 100; 6550} 6551 6552jQuery(document).ready(function () { 6553 /* ì¹´í ê³ ë¦¬ê° ëëì¼ë ëë¨¸ì§ ì¨ê¹ 6554 jQuery("#header .inner .top_nav_box .top_category").each(function(){ 6555 var top_category_length = jQuery(' > ul > li',this).length; 6556 if ( top_category_length > 20 ) { 6557 jQuery(this).append('<div class="cate_more"></div>'); 6558 } 6559 jQuery(' > ul > li:lt(20)',this).show(); 6560 }); */ 6561 6562 /* ì¹´í ê³ ë¦¬ê° ëëì¼ë ì´ìì¼ë ì¶ë ¥ë²í¼ 6563 jQuery("#header .inner .top_nav_box .top_category .cate_more").click(function() { 6564 var cate_more_on = jQuery(this).hasClass('on'); 6565 if ( cate_more_on == false ) { 6566 jQuery('#header .inner .top_nav_box .top_category > ul > li').show(); 6567 jQuery('#header .inner .top_nav_box .top_category .cate_more').addClass("on"); 6568 } else { 6569 jQuery('#header .inner .top_nav_box .top_category .cate_more').removeClass("on"); 6570 jQuery('#header .inner .top_nav_box .top_category > ul > li').hide(); 6571 jQuery('#header .inner .top_nav_box .top_category > ul > li:lt(20)').show(); 6572 } 6573 }); */ 6574 6575 /* ìµìë¨ë°°ë í루ëì ë«ê¸° - ìì í */ 6576 jQuery(".main_top_banner .top_banner_box_inner .top_banner_close .icon").bind("click", function () { 6577 if (jQuery("#top_banner_box_cloase").is(":checked")) { 6578 jQuery(".main_top_banner").slideUp("fast");
6579 setCookiem("top_banner_cookie", "top_banner_cookie", 1); 6580 } else { 6581 jQuery(".main_top_banner").slideUp("fast"); 6582 } 6583 }); 6584 var main_top_banner_diplay = jQuery(".main_top_banner").attr("data-ez-display"); 6585 if (!getCookiem("top_banner_cookie") && main_top_banner_diplay == "visible") { 6586 jQuery(".main_top_banner").slideDown("fast"); 6587 } 6588 6589 /* ìµìë¨ë°°ë ë«ê¸°ë²í¼ ììì ëì´ ìì */ 6590 if (jQuery(".top_banner_close").css("display") == "none") { 6591 jQuery(".main_top_banner").addClass("close_none"); 6592 if (main_top_banner_diplay == "visible") { 6593 jQuery(".main_top_banner").slideDown("fast"); 6594 } 6595 } 6596 6597 /* ìë¨ ê³ ê°ì¼í° - ìì í */ 6598 jQuery("#header .inner .toparea .toparea_state .toparea_state_board").click(function () { 6599 var theme_cl = jQuery(this).attr("class"); 6600 jQuery(this).toggleClass("on"); 6601 }); 6602 6603 /* ë¡ê·¸ì¸í¼ placeholder ì¶ê° - ìì í */ 6604 if (jQuery(".xans-member-login").val() != undefined) { 6605 jQuery("#member_passwd").attr("placeholder", "ë¹ë°ë²í¸"); 6606 } 6607 6608 /* ë¹íì 주문조ííì´ì§ placeholder ì¶ê° - ìì í */ 6609 setTimeout(function () { 6610 if (jQuery(".xans-myshop-orderhistorynologin").val() != undefined) { 6611 jQuery("#order_name").attr("placeholder", "주문ìëª "); 6612 jQuery("#order_id").attr("placeholder", "주문ë²í¸(íì´í(-) í¬í¨)"); 6613 jQuery("#order_password").attr("placeholder", "ë¹íì주문 ë¹ë°ë²í¸"); 6614 } 6615 }, 100); 6616 6617 /* ê²ìíì´ì§ ì¸íë°ì¤ìì í ì¤í¸ ìì - ìì í */ 6618 jQuery("#ec-product-searchdata-searchkeyword_form") 6619 .find("button.btnDelete") 6620 .bind("click", function () { 6621 jQuery("#ec-product-searchdata-keyword").val("").focus(); 6622 }); 6623 6624 /* ê²ìíì´ì§ ì ë ¬ í ì¤í¸ ë³ê²½ */ 6625 jQuery("#order_by").each(function () { 6626 jQuery("option:first-child", this).text("- ì ë ¬ë°©ì -"); 6627 }); 6628 6629 /* ë©í°ìµ ììê²½ì° ì¨ê¹ */ 6630 jQuery(".xans-layout-multishoplist").each(function () { 6631 var multishoplist_count = jQuery("li", this).length; 6632 if (multishoplist_count == 1) { 6633 jQuery(this).hide(); 6634 } 6635 }); 6636 6637 /* íë¨ ìì¤í¬ë¡ ì¬ì©íë©´ ì¶ë ¥ */ 6638 jQuery("#footer .inner .bt_escrow").each(function () { 6639 var bt_escrow = jQuery(this).attr("data-ez-escrow"); 6640 if (!bt_escrow == "") { 6641 var bt_escrow_name = jQuery("a img[data-ez-escrow-id=" + bt_escrow + "]", this).addClass("on"); 6642 jQuery(this).css("display", "flex"); 6643 } 6644 }); 6645 6646 /* ë¡ê·¸ì¸íì´ì§ SNS ì¬ì©íë©´ ì¶ë ¥ */ 6647 jQuery(".xans-member-login .login__sns .wrap_sns_log a").each(function () { 6648 var wrap_sns_log = jQuery(this).hasClass("displaynone"); 6649 if (wrap_sns_log == false) { 6650 jQuery(".xans-member-login .login__sns").css("display", "block"); 6651 } 6652 }); 6653 6654 /* 기íì ë ì´ììë³ê²½ì ë°ë¥¸ íê²ê³ ì ìì¹ ë³ê²½ */ 6655 // var header_height = document.getElementById("header").scrollHeight; 6656 // jQuery(".xans-project-list h3 span").css("top", -header_height + 30); 6657 6658 /* 모ë°ì¼ìì ì¼ííë ì´ì */ 6659 jQuery("#shoppQbtn").click(function () { 6660 if (jQuery("#searchContent.xans-product-searchdata").is(":hidden")) { 6661 jQuery("#searchContent.xans-product-searchdata").slideDown("normal"); 6662 jQuery(this).text("ìì¸ê²ì ë«ê¸°"); 6663 jQuery(this).css("margin-top", "0"); 6664 } else { 6665 jQuery("#searchContent.xans-product-searchdata").slideUp("normal"); 6666 jQuery(this).text("ìì¸ê²ì"); 6667 } 6668 }); 6669 6670 /* 모ë°ì¼ìì ì¼ííë ì´ì ììì ë²í¼ ì¨ê¹ */ 6671 jQuery("#searchContent").each(function () {
6672 var prdCount_count = jQuery("#ec-searchdata-area", this).length; 6673 if (prdCount_count == "0") { 6674 jQuery("#shoppQbtn").hide(); 6675 } 6676 }); 6677 6678 /* ë§ì´íì´ì§ ëìê²ìê¸ ììë ë©ìì§ íì */ 6679 jQuery(".xans-myshop-boardpackage").each(function () { 6680 var boardlist = jQuery(".xans-myshop-boardlist table", this).length; 6681 if (boardlist == "0") { 6682 jQuery(".myshop_boardlist_empty").css("display", "flex"); 6683 } 6684 }); 6685 6686 /* ë보기 í´ë¦ì */ 6687 jQuery(".btnMore").click(function () { 6688 setTimeout(function () { 6689 ifmore(); 6690 }, 600); 6691 }); 6692 setTimeout(function () { 6693 ifmore(); 6694 }, 300); 6695 6696 /* ìë¨ ì¹´í ê³ ë¦¬ ë³ê²½ ê°ì§ */ 6697 top_category(); // ìë¨ì¹´í ê³ ë¦¬ 6698 observeTopCategory(); // ìë¨ì¹´í ê³ ë¦¬ ë³ê²½ ê°ì§ 6699}); 6700 6701/* ìë¨ ì¹´í ê³ ë¦¬ ë³ê²½ ê°ì§ */ 6702function observeTopCategory() { 6703 var targetNode = jQuery("#header .xans-layout-category > ul")[0]; 6704 6705 // MutationObserver ì¸ì¤í´ì¤ ìì± 6706 var observer = new MutationObserver(function (mutationsList, observer) { 6707 // ë³ê²½ ê°ì§ë ê²½ì° ìë¨ì¹´í ê³ ë¦¬ ì¤í 6708 top_category(); 6709 }); 6710 6711 // ìë¨ ì¹´í ê³ ë¦¬ê° ìë ê²½ì° ë³ê²½ ê°ì§ 6712 if (targetNode) { 6713 observer.observe(targetNode, { childList: true, subtree: true }); 6714 } 6715} 6716 6717/* ìë¨ ì¹´í ê³ ë¦¬ */ 6718function top_category() { 6719 /* ìë¨ì¹´í ê³ ë¦¬ */ 6720 jQuery("#header .top_category li") 6721 .mouseenter(function (e) { 6722 var $this = jQuery(this).addClass("on"); 6723 }) 6724 .mouseleave(function (e) { 6725 jQuery(this).removeClass("on"); 6726 }); 6727 6728 /* ìë¨ì¹´í ê³ ë¦¬ ì¤ë¶ë¥ì²´í¬ */ 6729 jQuery("#header .top_category ul.sub_cate01 li").each(function () { 6730 if (jQuery(this).children("ul").length == 0) { 6731 jQuery(this).addClass("noChild"); 6732 } 6733 }); 6734} 6735 6736/* ìµìë¨ë°°ë ì¿ í¤ ì¤í¬ë¦½í¸ - ìì í */ 6737function setCookiem(cookie_name, cookie_value, expire_date) { 6738 var today = new Date(); 6739 var expire = new Date(); 6740 expire.setTime(today.getTime() + 3600000 * 24 * expire_date); 6741 cookies = cookie_name + "=" + cookie_value + "; path=/;"; 6742 if (expire_date != 0) cookies += "expires=" + expire.toGMTString(); 6743 document.cookie = cookies; 6744} 6745 6746function delCookiem(cookie_name) { 6747 var _today = new Date(); 6748 var value = ""; 6749 _today.setDate(_today.getDate() - 1); 6750 document.cookie = cookie_name + "=" + value + "; path=/;" + "; expires=" + _today.toGMTString(); 6751} 6752 6753function getCookiem(name) { 6754 lims = document.cookie; 6755 var index = lims.indexOf(name + "="); 6756 if (index == -1) { 6757 return null; 6758 } 6759 index = lims.indexOf("=", index) + 1; // first character 6760 var endstr = lims.indexOf(";", index); 6761 if (endstr == -1) { 6762 endstr = lims.length; // last character 6763 } 6764 return unescape(lims.substring(index, endstr)); 6765} 6766 6767/* ë보기 í´ë¦ì */ 6768function ifmore() { 6769 /* ìí ì¸ë¤ì¼ ê´ì¬ìí ì¶ë ¥ & ì¨ê¹ */ 6770 setTimeout(function () { 6771 jQuery(".ec-base-product .prdList .icon__box .wish").each(function () { 6772 var isstatus = jQuery(this).children("img").attr("icon_status"); 6773 if (isstatus == "on") { 6774 jQuery(this).addClass("on"); 6775 } 6776 }); 6777 jQuery(".ec-base-product .prdList .icon__box .wish").click(function () { 6778 var isstatus = jQuery(this).children("img").attr("icon_status"); 6779 if (isstatus == "off") { 6780 jQuery(this).addClass("on"); 6781 } else { 6782 jQuery(this).removeClass("on"); 6783 } 6784 }); 6785 }, 200); 6786 jQuery(".ec-base-product .prdList > li").each(function () { 6787 /* ìíì§ì´ ì¥ë°êµ¬ë ì¬ì©ìí ì ì¨ê¹ */ 6788 if (jQuery(".icon__box .cart > .ec-admin-icon", this).length == 1) { 6789 } else { 6790 jQuery(".icon__box .cart", this).hide(); 6791 } 6792 /* ìíì§ì´ ìµì 미리보기 ì¬ì©ìí ì ì¨ê¹ */ 6793 if (jQuery(".icon__box .option > a", this).length == 1) { 6794 } else { 6795 jQuery(".icon__box .option", this).hide(); 6796 } 6797 /* ìíì§ì´ ê´ì¬ìí ì¬ì©ìí ì ì¨ê¹ */ 6798 if (jQuery(".icon__box .wish > .ec-product-listwishicon", this).length == 1) { 6799 } else { 6800 jQuery(".icon__box .wish", this).hide(); 6801 } 6802 }); 6803} 6804 6805//window popup script 6806function winPop(url) {
6807 window.open(url, "popup", "width=300,height=300,left=10,top=10,resizable=no,scrollbars=no"); 6808} 6809/** 6810 * document.location.href split 6811 * return array Param 6812 */ 6813function getQueryString(sKey) 6814{ 6815 var sQueryString = document.location.search.substring(1); 6816 var aParam = {}; 6817 6818 if (sQueryString) { 6819 var aFields = sQueryString.split("&"); 6820 var aField = []; 6821 for(var i=0; i<aFields.length; i++){ 6822 aField = aFields[i].split('='); 6823 aParam[aField[0]] = aField[1]; 6824 } 6825 } 6826 6827 aParam.page = aParam.page ? aParam.page : 1; 6828 return sKey ? aParam[sKey] : aParam; 6829}; 6830 6831/** 6832 * 구매ë²í¼ 6833*/ 6834var globalBuyBtnScrollFunc = function() { 6835 // 구매ë²í¼ ê´ë ¨ë³ì 6836 var sFixId = $('#orderFixItem').length > 0 ? 'orderFixItem' : 'fixedActionButton', 6837 $area = $('#orderFixArea'), 6838 $item = $('#' + sFixId + '').not($area); 6839 6840 $(window).scroll(function(){ 6841 try { 6842 // 구매ë²í¼ ê´ë ¨ë³ì 6843 var iCurrentHeightPos = $(this).scrollTop() + $(this).height(), 6844 iButtonHeightPos = $item.offset().top; 6845 6846 if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) { 6847 if (iButtonHeightPos < $(this).scrollTop() - $item.height()) { 6848 $area.fadeIn('fast'); 6849 } else { 6850 $area.hide(); 6851 } 6852 } else { 6853 $area.fadeIn('fast'); 6854 } 6855 } catch(e) { } 6856 }); 6857}; 6858 6859$(function(){ 6860 // tab 6861 $.eTab = function(ul) { 6862 $(ul).find('a').on('click', function() { 6863 var _li = $(this).parent('li').addClass('selected').siblings().removeClass('selected'), 6864 _target = $(this).attr('href'), 6865 _siblings = '.' + $(_target).attr('class'); 6866 $(_target).show().siblings(_siblings).hide(); 6867 return false 6868 }); 6869 } 6870 if ( window.call_eTab ) { 6871 call_eTab(); 6872 }; 6873 globalBuyBtnScrollFunc(); 6874}); 6875/** 6876 * Webcomponentì ìëª ì£¼ê¸°ì ë¹ì·íê² ì¹ì ì 컨í¸ë¡¤ í ì ììµëë¤. 6877 */ 6878(function () { 6879 var base = { 6880 version: '1.0.0', 6881 component: {}, 6882 ready: false, 6883 register: register, 6884 connect: connect, 6885 change: change, 6886 disconnect: disconnect, 6887 } 6888 6889 try { 6890 polyfill(); 6891 init(); 6892 } catch (e) { 6893 6894 } 6895 6896 function init() { 6897 try { 6898 _init(); 6899 } catch (e) { 6900 console.error(e); 6901 } 6902 } 6903 6904 function _run(name, section, fn, type) { 6905 var handlers = this.component[name]; 6906 if (handlers) { 6907 for (var j = 0; j < handlers.length; j++) { 6908 if (handlers[j][fn]) { 6909 handlers[j][fn](section, type); 6910 } 6911 } 6912 } 6913 } 6914 6915 function connect(name, section, type) { 6916 return _run.call(this, name, section, 'connect', type) 6917 } 6918 6919 function change(name, section, type) { 6920 return _run.call(this, name, section, 'change', type) 6921 } 6922 6923 function disconnect(name, section, type) { 6924 return _run.call(this, name, section, 'disconnect', type) 6925 } 6926 6927 /** 6928 * ì¹ì ì ë¼ì´íì¬ì´í´ ê´ë¦¬ 기ë¥ì ë±ë¡í©ëë¤. 6929 * @param {string} name ì¹ì ì´ë¦ 6930 * @param {function | object} init ì´ê¸°íì í¸ì¶ í¨ì ëë í¨ìëª©ë¡ 6931 * @returns void 6932 */ 6933 function register(name, init) { 6934 var handler = _register.call(this, name, (init.init || init)(), arguments); 6935 if (EZST.ready) { 6936 var sections = document.querySelectorAll('[data-ez-module="' + name + '"]'); 6937 for (var i = 0; i < sections.length; i++) { 6938 if (handler.init) { 6939 handler.init(sections[i]); 6940 } 6941 if (handler.connect) { 6942 handler.connect(sections[i]); 6943 } 6944 } 6945 } 6946 } 6947 6948 function _init() { 6949 window.addEventListener('DOMContentLoaded', function (ev) { 6950 EZST.ready = true; 6951 for (var k in EZST.component) { 6952 var sections = document.querySelectorAll('[data-ez-module="' + k + '"]'); 6953 for (var i = 0; i < sections.length; i++) { 6954 var handlers = EZST.component[k]; 6955 for (var j = 0; j < handlers.length; j++) { 6956 if (handlers[j].init) { 6957 handlers[j].init(sections[i]); 6958 } 6959 if (handlers[j].connect) { 6960 handlers[j].connect(sections[i]); 6961 } 6962 } 6963 } 6964 } 6965 }); 6966 6967 window.EZST = Object.assign(window.EZST || {}, base, { 6968 status: ('EZST' in window) ? 1 : 0, 6969 }); 6970 6971 _prepare();
6972 _setViewType(); 6973 _cleanup() 6974 } 6975 6976 function _setViewType() { 6977 try { 6978 var mq = window.matchMedia("(max-width: 1024px)"); 6979 mq.addEventListener('change', function (ev) { 6980 _changeViewType(ev.target); 6981 6982 }, false); 6983 _changeViewType(mq); 6984 } catch (e) { 6985 6986 } 6987 } 6988 function _changeViewType(mq) { 6989 document.documentElement.classList.toggle('ez-view-type-mobile', mq.matches); 6990 } 6991 6992 function _cleanup() { 6993 window.addEventListener('DOMContentLoaded', function (ev) { 6994 var props = document.documentElement.querySelectorAll('ez-prop,script[type="text/ez-prop"]'); 6995 for (var i = 0; i < props.length; i++) { 6996 props[i].parentNode && props[i].parentNode.removeChild(props[i]); 6997 } 6998 }); 6999 } 7000 7001 function _prepare() { 7002 if (EZST.q && EZST.q.length) { 7003 for (var i = 0; i < EZST.q.length; i++) { 7004 _register.apply(EZST, EZST.q[i]); 7005 } 7006 delete EZST.q; 7007 } 7008 } 7009 7010 function _register(name, init, raw) { 7011 var handler = { 7012 // init: function (section) { }, 7013 // disconnect: function (section) { }, 7014 // changed: function (section) { }, 7015 // connect: function (section) { }, 7016 }; 7017 Object.assign(handler, (init && init.constructor === Object) ? init : (raw[1].constructor === Object) ? raw[1] : {}); 7018 if (!this.component[name]) { 7019 this.component[name] = []; 7020 } 7021 this.component[name].push(handler); 7022 return handler; 7023 } 7024 7025 function polyfill() { 7026 if (typeof Object.assign != "function") { 7027 Object.defineProperty(Object, "assign", { 7028 value: function assign(target, varArgs) { 7029 "use strict"; 7030 if (target == null) { 7031 throw new TypeError("Cannot convert undefined or null to object"); 7032 } 7033 var to = Object(target); 7034 for (var index = 1; index < arguments.length; index++) { 7035 var nextSource = arguments[index]; 7036 if (nextSource != null) { 7037 for (var nextKey in nextSource) { 7038 if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { 7039 to[nextKey] = nextSource[nextKey]; 7040 } 7041 } 7042 } 7043 } 7044 return to; 7045 }, 7046 writable: true, 7047 configurable: true 7048 }); 7049 } 7050 } 7051})(); 7052 7053$(function(){ 7054 if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { 7055 var sShippingCountryCode4Cookie = 'shippingCountryCode'; 7056 var bShippingCountryProc = false; 7057 7058 // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 7059 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { 7060 $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); 7061 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptioncountry').hide(); 7062 } else { 7063 $('.thumb .xans-layout-multishoplistitem').hide(); 7064 var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); 7065 if (typeof(aShippingCountryCode) != 'undefined' && aS
7065hippingCountryCode != null && aShippingCountryCode.length > 2) { 7066 var sShippingCountryValue = aShippingCountryCode[2]; 7067 } 7068 7069 // query stringì¼ë¡ ëì´ ì¨ ë°°ì¡êµê° ê°ì´ ìë¤ë©´, ê·¸ ê°ì ì ì©í¨ 7070 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); 7071 7072 if (aHrefCountryValue.length == 2) { 7073 var sShippingCountryValue = aHrefCountryValue[1]; 7074 } 7075 7076 // ë©ì¸ íì´ì§ìì êµê°ì íì ìí ê²½ì°, ê·¸ ì¸ì íì´ì§ìì ì í ë ê°ì´ ì ëì¤ë íì ì²ë¦¬ 7077 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { 7078 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 7079 7080 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 7081 $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 7082 } 7083 } 7084 if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { 7085 sShippingCountryValue = sShippingCountryValue.split("#")[0]; 7086 var bShippingCountryProc = true; 7087 7088 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 7089 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 7090 var expires = new Date(); 7091 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 7092 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 7093 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 7094 $("#f_country").val(sShippingCountryValue).change(); 7095 } 7096 } 7097 } 7098 // ì¸ì´ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 7099 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { 7100 $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); 7101 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption .xans-layout-multishoplistmultioptionlanguage').hide(); 7102 } else { 7103 $('.thumb .xans-layout-multishoplistitem').hide(); 7104 } 7105 7106 // ë°°ì¡êµê° ë° ì¸ì´ ì¤ì ì´ ë ë¤ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 7107 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { 7108 $(".xans-layout-multishopshipping").hide(); 7109 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioption').hide(); 7110 } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // ë°°ì¡êµê° ê°ì ì²ë¦¬í ì ì´ ìê³ , ë©ì¸íë©´ì¼ ëë§ ì í ë ì´ì´ë¥¼ ëì 7111 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); 7112 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 7113 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 7114 // ë°°ì¡êµê° ì íì ì¬ì©í´ì¼ ë ì´ì´ë¥¼ ë³´ì´ê² í¨ 7115 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { 7116 $(".xans-layout-multishopshipping").show(); 7117 } 7118 } 7119 7120 $(".xans-layout-multishopshipping .btnClose").on("click", function() { 7121 $(".xans-layout-multishopshipping").hide(); 7122 }); 7123 7124 $(".xans-layout-multishopshipping .ec-base-button a").on("click", function() { 7125 var expires = new Date(); 7126 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 7127 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 7128 7129 // ëë©ì¸ 문ì ë¡ ì¿ í¤ë¡ ë°°ì¡êµê° ì¤ì ì´ ì ëë ê²½ì°ë¥¼ ìí´ query stringì¼ë¡ ë°°ì¡êµê° ê°
7129ì ëê¹ 7130 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 7131 7132 location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; 7133 }); 7134 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a").on("click", function() { 7135 $(".xans-layout-multishopshipping").show(); 7136 }); 7137 } 7138});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.