diff --git a/html/mobile/css/animate.css b/html/mobile/css/animate.css new file mode 100644 index 0000000..60f0c96 --- /dev/null +++ b/html/mobile/css/animate.css @@ -0,0 +1,2744 @@ +@charset "UTF-8"; + + +/*! +Animate.css - http://daneden.me/animate +Licensed under the MIT license + +Copyright (c) 2013 Daniel Eden + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +.animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s; +} + +@-webkit-keyframes bounce { + 0%, 20%, 50%, 80%, 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 40% { + -webkit-transform: translateY(-30px); + transform: translateY(-30px); + } + + 60% { + -webkit-transform: translateY(-15px); + transform: translateY(-15px); + } +} + +@keyframes bounce { + 0%, 20%, 50%, 80%, 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 40% { + -webkit-transform: translateY(-30px); + -ms-transform: translateY(-30px); + transform: translateY(-30px); + } + + 60% { + -webkit-transform: translateY(-15px); + -ms-transform: translateY(-15px); + transform: translateY(-15px); + } +} + +.bounce { + -webkit-animation-name: bounce; + animation-name: bounce; +} + +@-webkit-keyframes flash { + 0%, 50%, 100% { + opacity: 1; + } + + 25%, 75% { + opacity: 0; + } +} + +@keyframes flash { + 0%, 50%, 100% { + opacity: 1; + } + + 25%, 75% { + opacity: 0; + } +} + +.flash { + -webkit-animation-name: flash; + animation-name: flash; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes pulse { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } + + 50% { + -webkit-transform: scale(1.1); + transform: scale(1.1); + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1); + } +} + +@keyframes pulse { + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + + 50% { + -webkit-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); + } + + 100% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } +} + +.pulse { + -webkit-animation-name: pulse; + animation-name: pulse; +} + +@-webkit-keyframes shake { + 0%, 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translateX(-10px); + transform: translateX(-10px); + } + + 20%, 40%, 60%, 80% { + -webkit-transform: translateX(10px); + transform: translateX(10px); + } +} + +@keyframes shake { + 0%, 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 10%, 30%, 50%, 70%, 90% { + -webkit-transform: translateX(-10px); + -ms-transform: translateX(-10px); + transform: translateX(-10px); + } + + 20%, 40%, 60%, 80% { + -webkit-transform: translateX(10px); + -ms-transform: translateX(10px); + transform: translateX(10px); + } +} + +.shake { + -webkit-animation-name: shake; + animation-name: shake; +} + +@-webkit-keyframes swing { + 20% { + -webkit-transform: rotate(15deg); + transform: rotate(15deg); + } + + 40% { + -webkit-transform: rotate(-10deg); + transform: rotate(-10deg); + } + + 60% { + -webkit-transform: rotate(5deg); + transform: rotate(5deg); + } + + 80% { + -webkit-transform: rotate(-5deg); + transform: rotate(-5deg); + } + + 100% { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + } +} + +@keyframes swing { + 20% { + -webkit-transform: rotate(15deg); + -ms-transform: rotate(15deg); + transform: rotate(15deg); + } + + 40% { + -webkit-transform: rotate(-10deg); + -ms-transform: rotate(-10deg); + transform: rotate(-10deg); + } + + 60% { + -webkit-transform: rotate(5deg); + -ms-transform: rotate(5deg); + transform: rotate(5deg); + } + + 80% { + -webkit-transform: rotate(-5deg); + -ms-transform: rotate(-5deg); + transform: rotate(-5deg); + } + + 100% { + -webkit-transform: rotate(0deg); + -ms-transform: rotate(0deg); + transform: rotate(0deg); + } +} + +.swing { + -webkit-transform-origin: top center; + -ms-transform-origin: top center; + transform-origin: top center; + -webkit-animation-name: swing; + animation-name: swing; +} + +@-webkit-keyframes tada { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } + + 10%, 20% { + -webkit-transform: scale(0.9) rotate(-3deg); + transform: scale(0.9) rotate(-3deg); + } + + 30%, 50%, 70%, 90% { + -webkit-transform: scale(1.1) rotate(3deg); + transform: scale(1.1) rotate(3deg); + } + + 40%, 60%, 80% { + -webkit-transform: scale(1.1) rotate(-3deg); + transform: scale(1.1) rotate(-3deg); + } + + 100% { + -webkit-transform: scale(1) rotate(0); + transform: scale(1) rotate(0); + } +} + +@keyframes tada { + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + + 10%, 20% { + -webkit-transform: scale(0.9) rotate(-3deg); + -ms-transform: scale(0.9) rotate(-3deg); + transform: scale(0.9) rotate(-3deg); + } + + 30%, 50%, 70%, 90% { + -webkit-transform: scale(1.1) rotate(3deg); + -ms-transform: scale(1.1) rotate(3deg); + transform: scale(1.1) rotate(3deg); + } + + 40%, 60%, 80% { + -webkit-transform: scale(1.1) rotate(-3deg); + -ms-transform: scale(1.1) rotate(-3deg); + transform: scale(1.1) rotate(-3deg); + } + + 100% { + -webkit-transform: scale(1) rotate(0); + -ms-transform: scale(1) rotate(0); + transform: scale(1) rotate(0); + } +} + +.tada { + -webkit-animation-name: tada; + animation-name: tada; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes wobble { + 0% { + -webkit-transform: translateX(0%); + transform: translateX(0%); + } + + 15% { + -webkit-transform: translateX(-25%) rotate(-5deg); + transform: translateX(-25%) rotate(-5deg); + } + + 30% { + -webkit-transform: translateX(20%) rotate(3deg); + transform: translateX(20%) rotate(3deg); + } + + 45% { + -webkit-transform: translateX(-15%) rotate(-3deg); + transform: translateX(-15%) rotate(-3deg); + } + + 60% { + -webkit-transform: translateX(10%) rotate(2deg); + transform: translateX(10%) rotate(2deg); + } + + 75% { + -webkit-transform: translateX(-5%) rotate(-1deg); + transform: translateX(-5%) rotate(-1deg); + } + + 100% { + -webkit-transform: translateX(0%); + transform: translateX(0%); + } +} + +@keyframes wobble { + 0% { + -webkit-transform: translateX(0%); + -ms-transform: translateX(0%); + transform: translateX(0%); + } + + 15% { + -webkit-transform: translateX(-25%) rotate(-5deg); + -ms-transform: translateX(-25%) rotate(-5deg); + transform: translateX(-25%) rotate(-5deg); + } + + 30% { + -webkit-transform: translateX(20%) rotate(3deg); + -ms-transform: translateX(20%) rotate(3deg); + transform: translateX(20%) rotate(3deg); + } + + 45% { + -webkit-transform: translateX(-15%) rotate(-3deg); + -ms-transform: translateX(-15%) rotate(-3deg); + transform: translateX(-15%) rotate(-3deg); + } + + 60% { + -webkit-transform: translateX(10%) rotate(2deg); + -ms-transform: translateX(10%) rotate(2deg); + transform: translateX(10%) rotate(2deg); + } + + 75% { + -webkit-transform: translateX(-5%) rotate(-1deg); + -ms-transform: translateX(-5%) rotate(-1deg); + transform: translateX(-5%) rotate(-1deg); + } + + 100% { + -webkit-transform: translateX(0%); + -ms-transform: translateX(0%); + transform: translateX(0%); + } +} + +.wobble { + -webkit-animation-name: wobble; + animation-name: wobble; +} + +@-webkit-keyframes bounceIn { + 0% { + opacity: 0; + -webkit-transform: scale(.3); + transform: scale(.3); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.05); + transform: scale(1.05); + } + + 70% { + -webkit-transform: scale(.9); + transform: scale(.9); + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1); + } +} + +@keyframes bounceIn { + 0% { + opacity: 0; + -webkit-transform: scale(.3); + -ms-transform: scale(.3); + transform: scale(.3); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.05); + -ms-transform: scale(1.05); + transform: scale(1.05); + } + + 70% { + -webkit-transform: scale(.9); + -ms-transform: scale(.9); + transform: scale(.9); + } + + 100% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } +} + +.bounceIn { + -webkit-animation-name: bounceIn; + animation-name: bounceIn; +} + +@-webkit-keyframes bounceInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(30px); + transform: translateY(30px); + } + + 80% { + -webkit-transform: translateY(-10px); + transform: translateY(-10px); + } + + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes bounceInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(30px); + -ms-transform: translateY(30px); + transform: translateY(30px); + } + + 80% { + -webkit-transform: translateY(-10px); + -ms-transform: translateY(-10px); + transform: translateY(-10px); + } + + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.bounceInDown { + -webkit-animation-name: bounceInDown; + animation-name: bounceInDown; +} + +@-webkit-keyframes bounceInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(30px); + transform: translateX(30px); + } + + 80% { + -webkit-transform: translateX(-10px); + transform: translateX(-10px); + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes bounceInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(30px); + -ms-transform: translateX(30px); + transform: translateX(30px); + } + + 80% { + -webkit-transform: translateX(-10px); + -ms-transform: translateX(-10px); + transform: translateX(-10px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.bounceInLeft { + -webkit-animation-name: bounceInLeft; + animation-name: bounceInLeft; +} + +@-webkit-keyframes bounceInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(-30px); + transform: translateX(-30px); + } + + 80% { + -webkit-transform: translateX(10px); + transform: translateX(10px); + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes bounceInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateX(-30px); + -ms-transform: translateX(-30px); + transform: translateX(-30px); + } + + 80% { + -webkit-transform: translateX(10px); + -ms-transform: translateX(10px); + transform: translateX(10px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.bounceInRight { + -webkit-animation-name: bounceInRight; + animation-name: bounceInRight; +} + +@-webkit-keyframes bounceInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(-30px); + transform: translateY(-30px); + } + + 80% { + -webkit-transform: translateY(10px); + transform: translateY(10px); + } + + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes bounceInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } + + 60% { + opacity: 1; + -webkit-transform: translateY(-30px); + -ms-transform: translateY(-30px); + transform: translateY(-30px); + } + + 80% { + -webkit-transform: translateY(10px); + -ms-transform: translateY(10px); + transform: translateY(10px); + } + + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.bounceInUp { + -webkit-animation-name: bounceInUp; + animation-name: bounceInUp; +} + +@-webkit-keyframes bounceOut { + 0% { + -webkit-transform: scale(1); + transform: scale(1); + } + + 25% { + -webkit-transform: scale(.95); + transform: scale(.95); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.1); + transform: scale(1.1); + } + + 100% { + opacity: 0; + -webkit-transform: scale(.3); + transform: scale(.3); + } +} + +@keyframes bounceOut { + 0% { + -webkit-transform: scale(1); + -ms-transform: scale(1); + transform: scale(1); + } + + 25% { + -webkit-transform: scale(.95); + -ms-transform: scale(.95); + transform: scale(.95); + } + + 50% { + opacity: 1; + -webkit-transform: scale(1.1); + -ms-transform: scale(1.1); + transform: scale(1.1); + } + + 100% { + opacity: 0; + -webkit-transform: scale(.3); + -ms-transform: scale(.3); + transform: scale(.3); + } +} + +.bounceOut { + -webkit-animation-name: bounceOut; + animation-name: bounceOut; +} + +@-webkit-keyframes bounceOutDown { + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } +} + +@keyframes bounceOutDown { + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(-20px); + -ms-transform: translateY(-20px); + transform: translateY(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } +} + +.bounceOutDown { + -webkit-animation-name: bounceOutDown; + animation-name: bounceOutDown; +} + +@-webkit-keyframes bounceOutLeft { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(20px); + transform: translateX(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +@keyframes bounceOutLeft { + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +.bounceOutLeft { + -webkit-animation-name: bounceOutLeft; + animation-name: bounceOutLeft; +} + +@-webkit-keyframes bounceOutRight { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +@keyframes bounceOutRight { + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateX(-20px); + -ms-transform: translateX(-20px); + transform: translateX(-20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +.bounceOutRight { + -webkit-animation-name: bounceOutRight; + animation-name: bounceOutRight; +} + +@-webkit-keyframes bounceOutUp { + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(20px); + transform: translateY(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +@keyframes bounceOutUp { + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 20% { + opacity: 1; + -webkit-transform: translateY(20px); + -ms-transform: translateY(20px); + transform: translateY(20px); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +.bounceOutUp { + -webkit-animation-name: bounceOutUp; + animation-name: bounceOutUp; +} + +@-webkit-keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +@keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.fadeIn { + -webkit-animation-name: fadeIn; + animation-name: fadeIn; +} + +@-webkit-keyframes fadeInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes fadeInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-20px); + -ms-transform: translateY(-20px); + transform: translateY(-20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.fadeInDown { + -webkit-animation-name: fadeInDown; + animation-name: fadeInDown; +} + +@-webkit-keyframes fadeInDownBig { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes fadeInDownBig { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.fadeInDownBig { + -webkit-animation-name: fadeInDownBig; + animation-name: fadeInDownBig; +} + +@-webkit-keyframes fadeInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes fadeInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-20px); + -ms-transform: translateX(-20px); + transform: translateX(-20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.fadeInLeft { + -webkit-animation-name: fadeInLeft; + animation-name: fadeInLeft; +} + +@-webkit-keyframes fadeInLeftBig { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes fadeInLeftBig { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.fadeInLeftBig { + -webkit-animation-name: fadeInLeftBig; + animation-name: fadeInLeftBig; +} + +@-webkit-keyframes fadeInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(20px); + transform: translateX(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes fadeInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.fadeInRight { + -webkit-animation-name: fadeInRight; + animation-name: fadeInRight; +} + +@-webkit-keyframes fadeInRightBig { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes fadeInRightBig { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.fadeInRightBig { + -webkit-animation-name: fadeInRightBig; + animation-name: fadeInRightBig; +} + +@-webkit-keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + transform: translateY(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes fadeInUp { + 0% { + opacity: 0; + -webkit-transform: translateY(20px); + -ms-transform: translateY(20px); + transform: translateY(20px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.fadeInUp { + -webkit-animation-name: fadeInUp; + animation-name: fadeInUp; +} + +@-webkit-keyframes fadeInUpBig { + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes fadeInUpBig { + 0% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } + + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.fadeInUpBig { + -webkit-animation-name: fadeInUpBig; + animation-name: fadeInUpBig; +} + +@-webkit-keyframes fadeOut { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +@keyframes fadeOut { + 0% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} + +.fadeOut { + -webkit-animation-name: fadeOut; + animation-name: fadeOut; +} + +@-webkit-keyframes fadeOutDown { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(20px); + transform: translateY(20px); + } +} + +@keyframes fadeOutDown { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(20px); + -ms-transform: translateY(20px); + transform: translateY(20px); + } +} + +.fadeOutDown { + -webkit-animation-name: fadeOutDown; + animation-name: fadeOutDown; +} + +@-webkit-keyframes fadeOutDownBig { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + transform: translateY(2000px); + } +} + +@keyframes fadeOutDownBig { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(2000px); + -ms-transform: translateY(2000px); + transform: translateY(2000px); + } +} + +.fadeOutDownBig { + -webkit-animation-name: fadeOutDownBig; + animation-name: fadeOutDownBig; +} + +@-webkit-keyframes fadeOutLeft { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-20px); + transform: translateX(-20px); + } +} + +@keyframes fadeOutLeft { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-20px); + -ms-transform: translateX(-20px); + transform: translateX(-20px); + } +} + +.fadeOutLeft { + -webkit-animation-name: fadeOutLeft; + animation-name: fadeOutLeft; +} + +@-webkit-keyframes fadeOutLeftBig { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +@keyframes fadeOutLeftBig { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +.fadeOutLeftBig { + -webkit-animation-name: fadeOutLeftBig; + animation-name: fadeOutLeftBig; +} + +@-webkit-keyframes fadeOutRight { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(20px); + transform: translateX(20px); + } +} + +@keyframes fadeOutRight { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(20px); + -ms-transform: translateX(20px); + transform: translateX(20px); + } +} + +.fadeOutRight { + -webkit-animation-name: fadeOutRight; + animation-name: fadeOutRight; +} + +@-webkit-keyframes fadeOutRightBig { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +@keyframes fadeOutRightBig { + 0% { + opacity: 1; + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +.fadeOutRightBig { + -webkit-animation-name: fadeOutRightBig; + animation-name: fadeOutRightBig; +} + +@-webkit-keyframes fadeOutUp { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-20px); + transform: translateY(-20px); + } +} + +@keyframes fadeOutUp { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-20px); + -ms-transform: translateY(-20px); + transform: translateY(-20px); + } +} + +.fadeOutUp { + -webkit-animation-name: fadeOutUp; + animation-name: fadeOutUp; +} + +@-webkit-keyframes fadeOutUpBig { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +@keyframes fadeOutUpBig { + 0% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +.fadeOutUpBig { + -webkit-animation-name: fadeOutUpBig; + animation-name: fadeOutUpBig; +} + +@-webkit-keyframes flip { + 0% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 100% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } +} + +@keyframes flip { + 0% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + -ms-transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + transform: perspective(400px) translateZ(0) rotateY(0) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 40% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + -ms-transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(170deg) scale(1); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; + } + + 50% { + -webkit-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + -ms-transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + transform: perspective(400px) translateZ(150px) rotateY(190deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 80% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + -ms-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(.95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } + + 100% { + -webkit-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + -ms-transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + transform: perspective(400px) translateZ(0) rotateY(360deg) scale(1); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + } +} + +.animated.flip { + -webkit-backface-visibility: visible; + -ms-backface-visibility: visible; + backface-visibility: visible; + -webkit-animation-name: flip; + animation-name: flip; +} + +@-webkit-keyframes flipInX { + 0% { + -webkit-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateX(-10deg); + transform: perspective(400px) rotateX(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateX(10deg); + transform: perspective(400px) rotateX(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } +} + +@keyframes flipInX { + 0% { + -webkit-transform: perspective(400px) rotateX(90deg); + -ms-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateX(-10deg); + -ms-transform: perspective(400px) rotateX(-10deg); + transform: perspective(400px) rotateX(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateX(10deg); + -ms-transform: perspective(400px) rotateX(10deg); + transform: perspective(400px) rotateX(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateX(0deg); + -ms-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } +} + +.flipInX { + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInX; + animation-name: flipInX; +} + +@-webkit-keyframes flipInY { + 0% { + -webkit-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateY(-10deg); + transform: perspective(400px) rotateY(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateY(10deg); + transform: perspective(400px) rotateY(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } +} + +@keyframes flipInY { + 0% { + -webkit-transform: perspective(400px) rotateY(90deg); + -ms-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } + + 40% { + -webkit-transform: perspective(400px) rotateY(-10deg); + -ms-transform: perspective(400px) rotateY(-10deg); + transform: perspective(400px) rotateY(-10deg); + } + + 70% { + -webkit-transform: perspective(400px) rotateY(10deg); + -ms-transform: perspective(400px) rotateY(10deg); + transform: perspective(400px) rotateY(10deg); + } + + 100% { + -webkit-transform: perspective(400px) rotateY(0deg); + -ms-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } +} + +.flipInY { + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipInY; + animation-name: flipInY; +} + +@-webkit-keyframes flipOutX { + 0% { + -webkit-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } +} + +@keyframes flipOutX { + 0% { + -webkit-transform: perspective(400px) rotateX(0deg); + -ms-transform: perspective(400px) rotateX(0deg); + transform: perspective(400px) rotateX(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotateX(90deg); + -ms-transform: perspective(400px) rotateX(90deg); + transform: perspective(400px) rotateX(90deg); + opacity: 0; + } +} + +.flipOutX { + -webkit-animation-name: flipOutX; + animation-name: flipOutX; + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; +} + +@-webkit-keyframes flipOutY { + 0% { + -webkit-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } +} + +@keyframes flipOutY { + 0% { + -webkit-transform: perspective(400px) rotateY(0deg); + -ms-transform: perspective(400px) rotateY(0deg); + transform: perspective(400px) rotateY(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: perspective(400px) rotateY(90deg); + -ms-transform: perspective(400px) rotateY(90deg); + transform: perspective(400px) rotateY(90deg); + opacity: 0; + } +} + +.flipOutY { + -webkit-backface-visibility: visible !important; + -ms-backface-visibility: visible !important; + backface-visibility: visible !important; + -webkit-animation-name: flipOutY; + animation-name: flipOutY; +} + +@-webkit-keyframes lightSpeedIn { + 0% { + -webkit-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: translateX(-20%) skewX(30deg); + transform: translateX(-20%) skewX(30deg); + opacity: 1; + } + + 80% { + -webkit-transform: translateX(0%) skewX(-15deg); + transform: translateX(0%) skewX(-15deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } +} + +@keyframes lightSpeedIn { + 0% { + -webkit-transform: translateX(100%) skewX(-30deg); + -ms-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } + + 60% { + -webkit-transform: translateX(-20%) skewX(30deg); + -ms-transform: translateX(-20%) skewX(30deg); + transform: translateX(-20%) skewX(30deg); + opacity: 1; + } + + 80% { + -webkit-transform: translateX(0%) skewX(-15deg); + -ms-transform: translateX(0%) skewX(-15deg); + transform: translateX(0%) skewX(-15deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(0%) skewX(0deg); + -ms-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } +} + +.lightSpeedIn { + -webkit-animation-name: lightSpeedIn; + animation-name: lightSpeedIn; + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out; +} + +@-webkit-keyframes lightSpeedOut { + 0% { + -webkit-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } +} + +@keyframes lightSpeedOut { + 0% { + -webkit-transform: translateX(0%) skewX(0deg); + -ms-transform: translateX(0%) skewX(0deg); + transform: translateX(0%) skewX(0deg); + opacity: 1; + } + + 100% { + -webkit-transform: translateX(100%) skewX(-30deg); + -ms-transform: translateX(100%) skewX(-30deg); + transform: translateX(100%) skewX(-30deg); + opacity: 0; + } +} + +.lightSpeedOut { + -webkit-animation-name: lightSpeedOut; + animation-name: lightSpeedOut; + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; +} + +@-webkit-keyframes rotateIn { + 0% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(-200deg); + transform: rotate(-200deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateIn { + 0% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(-200deg); + -ms-transform: rotate(-200deg); + transform: rotate(-200deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateIn { + -webkit-animation-name: rotateIn; + animation-name: rotateIn; +} + +@-webkit-keyframes rotateInDownLeft { + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateInDownLeft { + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateInDownLeft { + -webkit-animation-name: rotateInDownLeft; + animation-name: rotateInDownLeft; +} + +@-webkit-keyframes rotateInDownRight { + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateInDownRight { + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateInDownRight { + -webkit-animation-name: rotateInDownRight; + animation-name: rotateInDownRight; +} + +@-webkit-keyframes rotateInUpLeft { + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateInUpLeft { + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateInUpLeft { + -webkit-animation-name: rotateInUpLeft; + animation-name: rotateInUpLeft; +} + +@-webkit-keyframes rotateInUpRight { + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +@keyframes rotateInUpRight { + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } +} + +.rotateInUpRight { + -webkit-animation-name: rotateInUpRight; + animation-name: rotateInUpRight; +} + +@-webkit-keyframes rotateOut { + 0% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(200deg); + transform: rotate(200deg); + opacity: 0; + } +} + +@keyframes rotateOut { + 0% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: center center; + -ms-transform-origin: center center; + transform-origin: center center; + -webkit-transform: rotate(200deg); + -ms-transform: rotate(200deg); + transform: rotate(200deg); + opacity: 0; + } +} + +.rotateOut { + -webkit-animation-name: rotateOut; + animation-name: rotateOut; +} + +@-webkit-keyframes rotateOutDownLeft { + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } +} + +@keyframes rotateOutDownLeft { + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } +} + +.rotateOutDownLeft { + -webkit-animation-name: rotateOutDownLeft; + animation-name: rotateOutDownLeft; +} + +@-webkit-keyframes rotateOutDownRight { + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } +} + +@keyframes rotateOutDownRight { + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } +} + +.rotateOutDownRight { + -webkit-animation-name: rotateOutDownRight; + animation-name: rotateOutDownRight; +} + +@-webkit-keyframes rotateOutUpLeft { + 0% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } +} + +@keyframes rotateOutUpLeft { + 0% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: left bottom; + -ms-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + opacity: 0; + } +} + +.rotateOutUpLeft { + -webkit-animation-name: rotateOutUpLeft; + animation-name: rotateOutUpLeft; +} + +@-webkit-keyframes rotateOutUpRight { + 0% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } +} + +@keyframes rotateOutUpRight { + 0% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + opacity: 1; + } + + 100% { + -webkit-transform-origin: right bottom; + -ms-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + opacity: 0; + } +} + +.rotateOutUpRight { + -webkit-animation-name: rotateOutUpRight; + animation-name: rotateOutUpRight; +} + +@-webkit-keyframes slideInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 100% { + -webkit-transform: translateY(0); + transform: translateY(0); + } +} + +@keyframes slideInDown { + 0% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } + + 100% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +.slideInDown { + -webkit-animation-name: slideInDown; + animation-name: slideInDown; +} + +@-webkit-keyframes slideInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes slideInLeft { + 0% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.slideInLeft { + -webkit-animation-name: slideInLeft; + animation-name: slideInLeft; +} + +@-webkit-keyframes slideInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } + + 100% { + -webkit-transform: translateX(0); + transform: translateX(0); + } +} + +@keyframes slideInRight { + 0% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } + + 100% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } +} + +.slideInRight { + -webkit-animation-name: slideInRight; + animation-name: slideInRight; +} + +@-webkit-keyframes slideOutLeft { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +@keyframes slideOutLeft { + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(-2000px); + -ms-transform: translateX(-2000px); + transform: translateX(-2000px); + } +} + +.slideOutLeft { + -webkit-animation-name: slideOutLeft; + animation-name: slideOutLeft; +} + +@-webkit-keyframes slideOutRight { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +@keyframes slideOutRight { + 0% { + -webkit-transform: translateX(0); + -ms-transform: translateX(0); + transform: translateX(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(2000px); + -ms-transform: translateX(2000px); + transform: translateX(2000px); + } +} + +.slideOutRight { + -webkit-animation-name: slideOutRight; + animation-name: slideOutRight; +} + +@-webkit-keyframes slideOutUp { + 0% { + -webkit-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +@keyframes slideOutUp { + 0% { + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } + + 100% { + opacity: 0; + -webkit-transform: translateY(-2000px); + -ms-transform: translateY(-2000px); + transform: translateY(-2000px); + } +} + +.slideOutUp { + -webkit-animation-name: slideOutUp; + animation-name: slideOutUp; +} + +@-webkit-keyframes hinge { + 0% { + -webkit-transform: rotate(0); + transform: rotate(0); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, 60% { + -webkit-transform: rotate(80deg); + transform: rotate(80deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40% { + -webkit-transform: rotate(60deg); + transform: rotate(60deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 80% { + -webkit-transform: rotate(60deg) translateY(0); + transform: rotate(60deg) translateY(0); + opacity: 1; + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 100% { + -webkit-transform: translateY(700px); + transform: translateY(700px); + opacity: 0; + } +} + +@keyframes hinge { + 0% { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 20%, 60% { + -webkit-transform: rotate(80deg); + -ms-transform: rotate(80deg); + transform: rotate(80deg); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 40% { + -webkit-transform: rotate(60deg); + -ms-transform: rotate(60deg); + transform: rotate(60deg); + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 80% { + -webkit-transform: rotate(60deg) translateY(0); + -ms-transform: rotate(60deg) translateY(0); + transform: rotate(60deg) translateY(0); + opacity: 1; + -webkit-transform-origin: top left; + -ms-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + } + + 100% { + -webkit-transform: translateY(700px); + -ms-transform: translateY(700px); + transform: translateY(700px); + opacity: 0; + } +} + +.hinge { + -webkit-animation-name: hinge; + animation-name: hinge; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes rollIn { + 0% { + opacity: 0; + -webkit-transform: translateX(-100%) rotate(-120deg); + transform: translateX(-100%) rotate(-120deg); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } +} + +@keyframes rollIn { + 0% { + opacity: 0; + -webkit-transform: translateX(-100%) rotate(-120deg); + -ms-transform: translateX(-100%) rotate(-120deg); + transform: translateX(-100%) rotate(-120deg); + } + + 100% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + -ms-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } +} + +.rollIn { + -webkit-animation-name: rollIn; + animation-name: rollIn; +} + +/* originally authored by Nick Pettit - https://github.com/nickpettit/glide */ + +@-webkit-keyframes rollOut { + 0% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(100%) rotate(120deg); + transform: translateX(100%) rotate(120deg); + } +} + +@keyframes rollOut { + 0% { + opacity: 1; + -webkit-transform: translateX(0px) rotate(0deg); + -ms-transform: translateX(0px) rotate(0deg); + transform: translateX(0px) rotate(0deg); + } + + 100% { + opacity: 0; + -webkit-transform: translateX(100%) rotate(120deg); + -ms-transform: translateX(100%) rotate(120deg); + transform: translateX(100%) rotate(120deg); + } +} + +.rollOut { + -webkit-animation-name: rollOut; + animation-name: rollOut; +} diff --git a/html/mobile/css/common.css b/html/mobile/css/common.css new file mode 100644 index 0000000..cc9f56c --- /dev/null +++ b/html/mobile/css/common.css @@ -0,0 +1,2 @@ +@charset "utf-8"; + diff --git a/html/mobile/css/font.css b/html/mobile/css/font.css new file mode 100644 index 0000000..48dde90 --- /dev/null +++ b/html/mobile/css/font.css @@ -0,0 +1,241 @@ +@charset "utf-8"; + +/* 에스코어드림 */ +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 100; + src:url('font/S-CoreDream-1Thin.eot'); + src:url('font/S-CoreDream-1Thin.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-1Thin.woff') format('woff'), + url('font/S-CoreDream-1Thin.woff2') format('woff2'), + url('font/S-CoreDream-1Thin.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 200; + src:url('font/S-CoreDream-2ExtraLight.eot'); + src:url('font/S-CoreDream-2ExtraLight.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-2ExtraLight.woff') format('woff'), + url('font/S-CoreDream-2ExtraLight.woff2') format('woff2'), + url('font/S-CoreDream-2ExtraLight.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 300; + src:url('font/S-CoreDream-3Light.eot'); + src:url('font/S-CoreDream-3Light.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-3Light.woff') format('woff'), + url('font/S-CoreDream-3Light.woff2') format('woff2'), + url('font/S-CoreDream-3Light.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 400; + src:url('font/S-CoreDream-4Regular.eot'); + src:url('font/S-CoreDream-4Regular.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-4Regular.woff') format('woff'), + url('font/S-CoreDream-4Regular.woff2') format('woff2'), + url('font/S-CoreDream-4Regular.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 500; + src:url('font/S-CoreDream-5Medium.eot'); + src:url('font/S-CoreDream-5Medium.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-5Medium.woff') format('woff'), + url('font/S-CoreDream-5Medium.woff2') format('woff2'), + url('font/S-CoreDream-5Medium.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 600; + src:url('font/S-CoreDream-6Bold.eot'); + src:url('font/S-CoreDream-6Bold.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-6Bold.woff') format('woff'), + url('font/S-CoreDream-6Bold.woff2') format('woff2'), + url('font/S-CoreDream-6Bold.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 700; + src:url('font/S-CoreDream-7ExtraBold.eot'); + src:url('font/S-CoreDream-7ExtraBold.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-7ExtraBold.woff') format('woff'), + url('font/S-CoreDream-7ExtraBold.woff2') format('woff2'), + url('font/S-CoreDream-7ExtraBold.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 800; + src:url('font/S-CoreDream-8Heavy.eot'); + src:url('font/S-CoreDream-8Heavy.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-8Heavy.woff') format('woff'), + url('font/S-CoreDream-8Heavy.woff2') format('woff2'), + url('font/S-CoreDream-8Heavy.ttf') format('truetype'); +} + +@font-face { + font-family: 'score'; + font-style: normal; + font-weight: 900; + src:url('font/S-CoreDream-9Black.eot'); + src:url('font/S-CoreDream-9Black.eot?#iefix') format('embedded-opentype'), + url('font/S-CoreDream-9Black.woff') format('woff'), + url('font/S-CoreDream-9Black.woff2') format('woff2'), + url('font/S-CoreDream-9Black.ttf') format('truetype'); +} +/*Montserrat*/ +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Thin.ttf') format('truetype'), + font-weight:100; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-ThinItalic.ttf') format('truetype'), + font-weight:100; + font-style:italic; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Light.ttf') format('truetype'), + font-weight:200; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-LightItalic.ttf') format('truetype'), + font-weight:200; + font-style:italic; +} + +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Medium.ttf') format('truetype'), + font-weight:300; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-MediumItalic.ttf') format('truetype'), + font-weight:300; + font-style:italic; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-SemiBold.ttf') format('truetype'), + font-weight:500; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-SemiBold.ttf') format('truetype'), + font-weight:500; + font-style:italic; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Bold.ttf') format('truetype'), + font-weight:600; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-BoldItalic.ttf') format('truetype'), + font-weight:600; + font-style:italic; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-Black.ttf') format('truetype'), + font-weight:900; + font-style:normal; +} +@font-face { + font-family:"Montserrat"; + src: + url('../font/Montserrat-BlackItalic.ttf') format('truetype'), + font-weight:900; + font-style:italic; +} +/*NotoSansKR*/ +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Thin.otf') format('opentype'), + url('../font/NotoSansKR-Thin.woff') format('woff'), + url('../font/NotoSansKR-Thin.woff2') format('woff2'); + font-weight:100; + font-style:normal; +} +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Light.otf') format('opentype'), + url('../font/NotoSansKR-Light.woff') format('woff'), + url('../font/NotoSansKR-Light.woff2') format('woff2'); + font-weight:300; + font-style:normal; +} +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Regular.otf') format('opentype'), + url('../font/NotoSansKR-Regular.woff') format('woff'), + url('../font/NotoSansKR-Regular.woff2') format('woff2'); + font-weight:400; + font-style:normal; +} +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Medium.otf') format('opentype'), + url('../font/NotoSansKR-Medium.woff') format('woff'), + url('../font/NotoSansKR-Medium.woff2') format('woff2'); + font-weight:500; + font-style:normal; +} +@font-face { + font-family:"NotoSansKR"; + src: + url('../font/NotoSansKR-Bold.otf') format('opentype'), + url('../font/NotoSansKR-Bold.woff') format('woff'), + url('../font/NotoSansKR-Bold.woff2') format('woff2'); + font-weight:900; + font-style:normal; +} +/*나눔스퀘어라운드*/ +@font-face {font-family:"NanumSquareRound", 맑은고딕, Arial,sans-serif, Dotum, 돋움, "Apple SD Gothic Neo", arial;} +@font-face { + font-family: 'NanumSquareRound'; + src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_two@1.0/NanumSquareRound.woff') format('woff'); + font-weight: normal; + font-style: normal; +} diff --git a/html/mobile/css/font/Montserrat-Black.ttf b/html/mobile/css/font/Montserrat-Black.ttf new file mode 100644 index 0000000..93b8bab Binary files /dev/null and b/html/mobile/css/font/Montserrat-Black.ttf differ diff --git a/html/mobile/css/font/Montserrat-BlackItalic.ttf b/html/mobile/css/font/Montserrat-BlackItalic.ttf new file mode 100644 index 0000000..438630e Binary files /dev/null and b/html/mobile/css/font/Montserrat-BlackItalic.ttf differ diff --git a/html/mobile/css/font/Montserrat-Bold.ttf b/html/mobile/css/font/Montserrat-Bold.ttf new file mode 100644 index 0000000..55e0b1a Binary files /dev/null and b/html/mobile/css/font/Montserrat-Bold.ttf differ diff --git a/html/mobile/css/font/Montserrat-BoldItalic.ttf b/html/mobile/css/font/Montserrat-BoldItalic.ttf new file mode 100644 index 0000000..6b4541d Binary files /dev/null and b/html/mobile/css/font/Montserrat-BoldItalic.ttf differ diff --git a/html/mobile/css/font/Montserrat-ExtraBold.ttf b/html/mobile/css/font/Montserrat-ExtraBold.ttf new file mode 100644 index 0000000..7b4f267 Binary files /dev/null and b/html/mobile/css/font/Montserrat-ExtraBold.ttf differ diff --git a/html/mobile/css/font/Montserrat-ExtraBoldItalic.ttf b/html/mobile/css/font/Montserrat-ExtraBoldItalic.ttf new file mode 100644 index 0000000..66ccd46 Binary files /dev/null and b/html/mobile/css/font/Montserrat-ExtraBoldItalic.ttf differ diff --git a/html/mobile/css/font/Montserrat-ExtraLight.ttf b/html/mobile/css/font/Montserrat-ExtraLight.ttf new file mode 100644 index 0000000..532cbb5 Binary files /dev/null and b/html/mobile/css/font/Montserrat-ExtraLight.ttf differ diff --git a/html/mobile/css/font/Montserrat-ExtraLightItalic.ttf b/html/mobile/css/font/Montserrat-ExtraLightItalic.ttf new file mode 100644 index 0000000..150591a Binary files /dev/null and b/html/mobile/css/font/Montserrat-ExtraLightItalic.ttf differ diff --git a/html/mobile/css/font/Montserrat-Italic.ttf b/html/mobile/css/font/Montserrat-Italic.ttf new file mode 100644 index 0000000..be99e1c Binary files /dev/null and b/html/mobile/css/font/Montserrat-Italic.ttf differ diff --git a/html/mobile/css/font/Montserrat-Light.ttf b/html/mobile/css/font/Montserrat-Light.ttf new file mode 100644 index 0000000..2c91484 Binary files /dev/null and b/html/mobile/css/font/Montserrat-Light.ttf differ diff --git a/html/mobile/css/font/Montserrat-LightItalic.ttf b/html/mobile/css/font/Montserrat-LightItalic.ttf new file mode 100644 index 0000000..7082e03 Binary files /dev/null and b/html/mobile/css/font/Montserrat-LightItalic.ttf differ diff --git a/html/mobile/css/font/Montserrat-Medium.ttf b/html/mobile/css/font/Montserrat-Medium.ttf new file mode 100644 index 0000000..0f0fd1d Binary files /dev/null and b/html/mobile/css/font/Montserrat-Medium.ttf differ diff --git a/html/mobile/css/font/Montserrat-MediumItalic.ttf b/html/mobile/css/font/Montserrat-MediumItalic.ttf new file mode 100644 index 0000000..5bd6dd2 Binary files /dev/null and b/html/mobile/css/font/Montserrat-MediumItalic.ttf differ diff --git a/html/mobile/css/font/Montserrat-Regular.ttf b/html/mobile/css/font/Montserrat-Regular.ttf new file mode 100644 index 0000000..1cd0259 Binary files /dev/null and b/html/mobile/css/font/Montserrat-Regular.ttf differ diff --git a/html/mobile/css/font/Montserrat-SemiBold.ttf b/html/mobile/css/font/Montserrat-SemiBold.ttf new file mode 100644 index 0000000..ccaba1a Binary files /dev/null and b/html/mobile/css/font/Montserrat-SemiBold.ttf differ diff --git a/html/mobile/css/font/Montserrat-SemiBoldItalic.ttf b/html/mobile/css/font/Montserrat-SemiBoldItalic.ttf new file mode 100644 index 0000000..b8278b9 Binary files /dev/null and b/html/mobile/css/font/Montserrat-SemiBoldItalic.ttf differ diff --git a/html/mobile/css/font/Montserrat-Thin.ttf b/html/mobile/css/font/Montserrat-Thin.ttf new file mode 100644 index 0000000..a6d0321 Binary files /dev/null and b/html/mobile/css/font/Montserrat-Thin.ttf differ diff --git a/html/mobile/css/font/Montserrat-ThinItalic.ttf b/html/mobile/css/font/Montserrat-ThinItalic.ttf new file mode 100644 index 0000000..585c82b Binary files /dev/null and b/html/mobile/css/font/Montserrat-ThinItalic.ttf differ diff --git a/html/mobile/css/font/NotoSansKR-Black.otf b/html/mobile/css/font/NotoSansKR-Black.otf new file mode 100644 index 0000000..2b54d19 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Black.otf differ diff --git a/html/mobile/css/font/NotoSansKR-Black.woff b/html/mobile/css/font/NotoSansKR-Black.woff new file mode 100644 index 0000000..90ef003 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Black.woff differ diff --git a/html/mobile/css/font/NotoSansKR-Black.woff2 b/html/mobile/css/font/NotoSansKR-Black.woff2 new file mode 100644 index 0000000..8953c8f Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Black.woff2 differ diff --git a/html/mobile/css/font/NotoSansKR-Bold.otf b/html/mobile/css/font/NotoSansKR-Bold.otf new file mode 100644 index 0000000..2b78dd8 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Bold.otf differ diff --git a/html/mobile/css/font/NotoSansKR-Bold.woff b/html/mobile/css/font/NotoSansKR-Bold.woff new file mode 100644 index 0000000..74b20d4 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Bold.woff differ diff --git a/html/mobile/css/font/NotoSansKR-Bold.woff2 b/html/mobile/css/font/NotoSansKR-Bold.woff2 new file mode 100644 index 0000000..216f94d Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Bold.woff2 differ diff --git a/html/mobile/css/font/NotoSansKR-Light.otf b/html/mobile/css/font/NotoSansKR-Light.otf new file mode 100644 index 0000000..ecab31a Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Light.otf differ diff --git a/html/mobile/css/font/NotoSansKR-Light.woff b/html/mobile/css/font/NotoSansKR-Light.woff new file mode 100644 index 0000000..40aabd2 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Light.woff differ diff --git a/html/mobile/css/font/NotoSansKR-Light.woff2 b/html/mobile/css/font/NotoSansKR-Light.woff2 new file mode 100644 index 0000000..6b7cd13 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Light.woff2 differ diff --git a/html/mobile/css/font/NotoSansKR-Medium.otf b/html/mobile/css/font/NotoSansKR-Medium.otf new file mode 100644 index 0000000..371959d Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Medium.otf differ diff --git a/html/mobile/css/font/NotoSansKR-Medium.woff b/html/mobile/css/font/NotoSansKR-Medium.woff new file mode 100644 index 0000000..e15aae0 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Medium.woff differ diff --git a/html/mobile/css/font/NotoSansKR-Medium.woff2 b/html/mobile/css/font/NotoSansKR-Medium.woff2 new file mode 100644 index 0000000..b976680 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Medium.woff2 differ diff --git a/html/mobile/css/font/NotoSansKR-Regular.otf b/html/mobile/css/font/NotoSansKR-Regular.otf new file mode 100644 index 0000000..7ba76b4 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Regular.otf differ diff --git a/html/mobile/css/font/NotoSansKR-Regular.woff b/html/mobile/css/font/NotoSansKR-Regular.woff new file mode 100644 index 0000000..40fab25 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Regular.woff differ diff --git a/html/mobile/css/font/NotoSansKR-Regular.woff2 b/html/mobile/css/font/NotoSansKR-Regular.woff2 new file mode 100644 index 0000000..61d0646 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Regular.woff2 differ diff --git a/html/mobile/css/font/NotoSansKR-Thin.otf b/html/mobile/css/font/NotoSansKR-Thin.otf new file mode 100644 index 0000000..06c5662 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Thin.otf differ diff --git a/html/mobile/css/font/NotoSansKR-Thin.woff b/html/mobile/css/font/NotoSansKR-Thin.woff new file mode 100644 index 0000000..4072373 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Thin.woff differ diff --git a/html/mobile/css/font/NotoSansKR-Thin.woff2 b/html/mobile/css/font/NotoSansKR-Thin.woff2 new file mode 100644 index 0000000..7835c23 Binary files /dev/null and b/html/mobile/css/font/NotoSansKR-Thin.woff2 differ diff --git a/html/mobile/css/font/S-CoreDream-1Thin.eot b/html/mobile/css/font/S-CoreDream-1Thin.eot new file mode 100644 index 0000000..96934b6 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-1Thin.eot differ diff --git a/html/mobile/css/font/S-CoreDream-1Thin.ttf b/html/mobile/css/font/S-CoreDream-1Thin.ttf new file mode 100644 index 0000000..6a8b575 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-1Thin.ttf differ diff --git a/html/mobile/css/font/S-CoreDream-1Thin.woff b/html/mobile/css/font/S-CoreDream-1Thin.woff new file mode 100644 index 0000000..a2aefdf Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-1Thin.woff differ diff --git a/html/mobile/css/font/S-CoreDream-1Thin.woff2 b/html/mobile/css/font/S-CoreDream-1Thin.woff2 new file mode 100644 index 0000000..ac7e132 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-1Thin.woff2 differ diff --git a/html/mobile/css/font/S-CoreDream-2ExtraLight.eot b/html/mobile/css/font/S-CoreDream-2ExtraLight.eot new file mode 100644 index 0000000..ffa137b Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-2ExtraLight.eot differ diff --git a/html/mobile/css/font/S-CoreDream-2ExtraLight.ttf b/html/mobile/css/font/S-CoreDream-2ExtraLight.ttf new file mode 100644 index 0000000..19452ba Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-2ExtraLight.ttf differ diff --git a/html/mobile/css/font/S-CoreDream-2ExtraLight.woff b/html/mobile/css/font/S-CoreDream-2ExtraLight.woff new file mode 100644 index 0000000..894fbf0 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-2ExtraLight.woff differ diff --git a/html/mobile/css/font/S-CoreDream-2ExtraLight.woff2 b/html/mobile/css/font/S-CoreDream-2ExtraLight.woff2 new file mode 100644 index 0000000..cdc886f Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-2ExtraLight.woff2 differ diff --git a/html/mobile/css/font/S-CoreDream-3Light.eot b/html/mobile/css/font/S-CoreDream-3Light.eot new file mode 100644 index 0000000..2208a28 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-3Light.eot differ diff --git a/html/mobile/css/font/S-CoreDream-3Light.ttf b/html/mobile/css/font/S-CoreDream-3Light.ttf new file mode 100644 index 0000000..3c81df7 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-3Light.ttf differ diff --git a/html/mobile/css/font/S-CoreDream-3Light.woff b/html/mobile/css/font/S-CoreDream-3Light.woff new file mode 100644 index 0000000..260ecac Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-3Light.woff differ diff --git a/html/mobile/css/font/S-CoreDream-3Light.woff2 b/html/mobile/css/font/S-CoreDream-3Light.woff2 new file mode 100644 index 0000000..fa6f0aa Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-3Light.woff2 differ diff --git a/html/mobile/css/font/S-CoreDream-4Regular.eot b/html/mobile/css/font/S-CoreDream-4Regular.eot new file mode 100644 index 0000000..5c317a0 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-4Regular.eot differ diff --git a/html/mobile/css/font/S-CoreDream-4Regular.ttf b/html/mobile/css/font/S-CoreDream-4Regular.ttf new file mode 100644 index 0000000..4e592d8 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-4Regular.ttf differ diff --git a/html/mobile/css/font/S-CoreDream-4Regular.woff b/html/mobile/css/font/S-CoreDream-4Regular.woff new file mode 100644 index 0000000..1150cfc Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-4Regular.woff differ diff --git a/html/mobile/css/font/S-CoreDream-4Regular.woff2 b/html/mobile/css/font/S-CoreDream-4Regular.woff2 new file mode 100644 index 0000000..8f4b578 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-4Regular.woff2 differ diff --git a/html/mobile/css/font/S-CoreDream-5Medium.eot b/html/mobile/css/font/S-CoreDream-5Medium.eot new file mode 100644 index 0000000..f317b1c Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-5Medium.eot differ diff --git a/html/mobile/css/font/S-CoreDream-5Medium.ttf b/html/mobile/css/font/S-CoreDream-5Medium.ttf new file mode 100644 index 0000000..91eb406 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-5Medium.ttf differ diff --git a/html/mobile/css/font/S-CoreDream-5Medium.woff b/html/mobile/css/font/S-CoreDream-5Medium.woff new file mode 100644 index 0000000..53f6691 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-5Medium.woff differ diff --git a/html/mobile/css/font/S-CoreDream-5Medium.woff2 b/html/mobile/css/font/S-CoreDream-5Medium.woff2 new file mode 100644 index 0000000..7be4dcb Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-5Medium.woff2 differ diff --git a/html/mobile/css/font/S-CoreDream-6Bold.eot b/html/mobile/css/font/S-CoreDream-6Bold.eot new file mode 100644 index 0000000..47281f3 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-6Bold.eot differ diff --git a/html/mobile/css/font/S-CoreDream-6Bold.ttf b/html/mobile/css/font/S-CoreDream-6Bold.ttf new file mode 100644 index 0000000..413a51d Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-6Bold.ttf differ diff --git a/html/mobile/css/font/S-CoreDream-6Bold.woff b/html/mobile/css/font/S-CoreDream-6Bold.woff new file mode 100644 index 0000000..19f4e38 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-6Bold.woff differ diff --git a/html/mobile/css/font/S-CoreDream-6Bold.woff2 b/html/mobile/css/font/S-CoreDream-6Bold.woff2 new file mode 100644 index 0000000..8fc53a7 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-6Bold.woff2 differ diff --git a/html/mobile/css/font/S-CoreDream-7ExtraBold.eot b/html/mobile/css/font/S-CoreDream-7ExtraBold.eot new file mode 100644 index 0000000..e51d546 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-7ExtraBold.eot differ diff --git a/html/mobile/css/font/S-CoreDream-7ExtraBold.ttf b/html/mobile/css/font/S-CoreDream-7ExtraBold.ttf new file mode 100644 index 0000000..ace547d Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-7ExtraBold.ttf differ diff --git a/html/mobile/css/font/S-CoreDream-7ExtraBold.woff b/html/mobile/css/font/S-CoreDream-7ExtraBold.woff new file mode 100644 index 0000000..bb3234d Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-7ExtraBold.woff differ diff --git a/html/mobile/css/font/S-CoreDream-7ExtraBold.woff2 b/html/mobile/css/font/S-CoreDream-7ExtraBold.woff2 new file mode 100644 index 0000000..f61ffab Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-7ExtraBold.woff2 differ diff --git a/html/mobile/css/font/S-CoreDream-8Heavy.eot b/html/mobile/css/font/S-CoreDream-8Heavy.eot new file mode 100644 index 0000000..664ce19 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-8Heavy.eot differ diff --git a/html/mobile/css/font/S-CoreDream-8Heavy.ttf b/html/mobile/css/font/S-CoreDream-8Heavy.ttf new file mode 100644 index 0000000..8c0d4ca Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-8Heavy.ttf differ diff --git a/html/mobile/css/font/S-CoreDream-8Heavy.woff b/html/mobile/css/font/S-CoreDream-8Heavy.woff new file mode 100644 index 0000000..8e14f23 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-8Heavy.woff differ diff --git a/html/mobile/css/font/S-CoreDream-8Heavy.woff2 b/html/mobile/css/font/S-CoreDream-8Heavy.woff2 new file mode 100644 index 0000000..f15625b Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-8Heavy.woff2 differ diff --git a/html/mobile/css/font/S-CoreDream-9Black.eot b/html/mobile/css/font/S-CoreDream-9Black.eot new file mode 100644 index 0000000..a2bd7ec Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-9Black.eot differ diff --git a/html/mobile/css/font/S-CoreDream-9Black.ttf b/html/mobile/css/font/S-CoreDream-9Black.ttf new file mode 100644 index 0000000..0fa3610 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-9Black.ttf differ diff --git a/html/mobile/css/font/S-CoreDream-9Black.woff b/html/mobile/css/font/S-CoreDream-9Black.woff new file mode 100644 index 0000000..73205a5 Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-9Black.woff differ diff --git a/html/mobile/css/font/S-CoreDream-9Black.woff2 b/html/mobile/css/font/S-CoreDream-9Black.woff2 new file mode 100644 index 0000000..b3e0c0f Binary files /dev/null and b/html/mobile/css/font/S-CoreDream-9Black.woff2 differ diff --git a/html/mobile/css/fonts/xeicon.eot b/html/mobile/css/fonts/xeicon.eot new file mode 100644 index 0000000..658cc71 Binary files /dev/null and b/html/mobile/css/fonts/xeicon.eot differ diff --git a/html/mobile/css/fonts/xeicon.svg b/html/mobile/css/fonts/xeicon.svg new file mode 100644 index 0000000..21cee8f --- /dev/null +++ b/html/mobile/css/fonts/xeicon.svg @@ -0,0 +1,851 @@ + + + + + + +{ + "fontFamily": "xeicon", + "majorVersion": 2, + "minorVersion": 3, + "fontURL": "https://xpressengine.github.io/XEIcon/", + "copyright": "(C) NAVER http://www.navercorp.com", + "designerURL": "https://www.facebook.com/juna.junhalee", + "license": "SIL OFL 1.1, MIT License, CCL 4.0", + "licenseURL": "https://github.com/xpressengine/XEIcon", + "description": "Beautiful transformable iconic font made for the web.\nFont generated by IcoMoon.", + "designer": "Junha Lee", + "version": "Version 2.3", + "fontId": "xeicon", + "psName": "xeicon", + "subFamily": "Regular", + "fullName": "xeicon" +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/html/mobile/css/fonts/xeicon.ttf b/html/mobile/css/fonts/xeicon.ttf new file mode 100644 index 0000000..58f3248 Binary files /dev/null and b/html/mobile/css/fonts/xeicon.ttf differ diff --git a/html/mobile/css/fonts/xeicon.woff b/html/mobile/css/fonts/xeicon.woff new file mode 100644 index 0000000..71369b9 Binary files /dev/null and b/html/mobile/css/fonts/xeicon.woff differ diff --git a/html/mobile/css/fonts/xeicon.woff2 b/html/mobile/css/fonts/xeicon.woff2 new file mode 100644 index 0000000..fe8b35c Binary files /dev/null and b/html/mobile/css/fonts/xeicon.woff2 differ diff --git a/html/mobile/css/reset.css b/html/mobile/css/reset.css new file mode 100644 index 0000000..9a24a4f --- /dev/null +++ b/html/mobile/css/reset.css @@ -0,0 +1,243 @@ +@charset "utf-8"; +@import url("font.css"); +/* v2.0 | 20110126 + http://meyerweb.com/eric/tools/css/reset/ + License: none (public domain) +*/ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font-family:"Montserrat","score", 맑은고딕, Arial,sans-serif, Dotum, 돋움, "Apple SD Gothic Neo", arial; + font-style: normal; + vertical-align: baseline; +} +select, input, textarea, button{ + font-family:"Montserrat","score", 맑은고딕, Arial,sans-serif, Dotum, 돋움, "Apple SD Gothic Neo", arial; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1.4; +} +ol, ul { + list-style: none; +} +blockquote, q{ + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +*, :after, :before { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +/*margin*/ +.m-0{margin:0px !important;} +.m-10{margin:10px !important;} +.m-20{margin:20px !important;} +.m-30{margin:30px !important;} +.m-40{margin:40px !important;} +.m-50{margin:50px !important;} +.m-60{margin:60px !important;} +.m-70{margin:70px !important;} +.m-80{margin:80px !important;} +.m-90{margin:90px !important;} +.m-100{margin:100px !important;} + +.mt-0{margin-top:0px !important;} +.mt-10{margin-top:10px !important;} +.mt-20{margin-top:20px !important;} +.mt-30{margin-top:30px !important;} +.mt-40{margin-top:40px !important;} +.mt-50{margin-top:50px !important;} +.mt-60{margin-top:60px !important;} +.mt-70{margin-top:70px !important;} +.mt-80{margin-top:80px !important;} +.mt-90{margin-top:90px !important;} +.mt-100{margin-top:100px !important;} + +.mb-0{margin-bottom:0px !important;} +.mb-10{margin-bottom:10px !important;} +.mb-20{margin-bottom:20px !important;} +.mb-30{margin-bottom:30px !important;} +.mb-40{margin-bottom:40px !important;} +.mb-50{margin-bottom:50px !important;} +.mb-60{margin-bottom:60px !important;} +.mb-70{margin-bottom:70px !important;} +.mb-80{margin-bottom:80px !important;} +.mb-90{margin-bottom:90px !important;} +.mb-100{margin-bottom:100px !important;} + +.ml-0{margin-left:0px !important;} +.ml-10{margin-left:10px !important;} +.ml-20{margin-left:20px !important;} +.ml-30{margin-left:30px !important;} +.ml-40{margin-left:40px !important;} +.ml-50{margin-left:50px !important;} +.ml-60{margin-left:60px !important;} +.ml-70{margin-left:70px !important;} +.ml-80{margin-left:80px !important;} +.ml-90{margin-left:90px !important;} +.ml-100{margin-left:10px !important;} + +.mr-0{margin-right:0px !important;} +.mr-10{margin-right:10px !important;} +.mr-20{margin-right:20px !important;} +.mr-30{margin-right:30px !important;} +.mr-40{margin-right:40px !important;} +.mr-50{margin-right:50px !important;} +.mr-60{margin-right:60px !important;} +.mr-70{margin-right:70px !important;} +.mr-80{margin-right:80px !important;} +.mr-90{margin-right:90px !important;} +.mr-100{margin-right:100px !important;} + +/*padding*/ +.p-0{padding:0px !important;} +.p-10{padding:10px!important;} +.p-20{padding:20px!important;} +.p-30{padding:30px!important;} +.p-40{padding:40px!important;} +.p-50{padding:50px!important;} +.p-60{padding:60px!important;} +.p-70{padding:70px!important;} +.p-80{padding:80px!important;} +.p-90{padding:90px!important;} +.p-100{padding:100px!important;} + +.pt-0{padding-top:0px !important;} +.pt-10{padding-top:10px !important;} +.pt-20{padding-top:20px !important;} +.pt-30{padding-top:30px !important;} +.pt-40{padding-top:40px !important;} +.pt-50{padding-top:50px !important;} +.pt-60{padding-top:60px !important;} +.pt-70{padding-top:70px !important;} +.pt-80{padding-top:80px !important;} +.pt-90{padding-top:90px !important;} +.pt-100{padding-top:100px !important;} + +.pb-0{padding-bottom:0px !important;} +.pb-10{padding-bottom:10px !important;} +.pb-20{padding-bottom:20px !important;} +.pb-30{padding-bottom:30px !important;} +.pb-40{padding-bottom:40px !important;} +.pb-50{padding-bottom:50px !important;} +.pb-60{padding-bottom:60px !important;} +.pb-70{padding-bottom:70px !important;} +.pb-80{padding-bottom:80px !important;} +.pb-90{padding-bottom:90px !important;} +.pb-100{padding-bottom:100px !important;} + +.pl-0{padding-left:0px !important;} +.pl-10{padding-left:10px !important;} +.pl-20{padding-left:20px !important;} +.pl-30{padding-left:30px !important;} +.pl-40{padding-left:40px !important;} +.pl-50{padding-left:50px !important;} +.pl-60{padding-left:60px !important;} +.pl-70{padding-left:70px !important;} +.pl-80{padding-left:80px !important;} +.pl-90{padding-left:90px !important;} +.pl-100{padding-left:120px !important;} + +.pr-0{padding-right:0px !important;} +.pr-10{padding-right:10px !important;} +.pr-20{padding-right:20px !important;} +.pr-30{padding-right:30px !important;} +.pr-40{padding-right:40px !important;} +.pr-50{padding-right:50px !important;} +.pr-60{padding-right:60px !important;} +.pr-70{padding-right:70px !important;} +.pr-80{padding-right:80px !important;} +.pr-90{padding-right:90px !important;} +.pr-100{padding-right:100px !important;} + + +[class*=width_] {float:left;} +.width_100 {width:100% !important;} +.width_90 {width:90% !important;} +.width_80 {width:80% !important;} +.width_70 {width:70% !important;} +.width_60 {width:60% !important;} +.width_50 {width:50% !important;} +.width_40 {width:40% !important;} +.width_30 {width:30% !important;} +.width_20 {width:20% !important;} +.width_10 {width:10% !important;} + +.width_2n {width:50% !important;} +.width_3n {width:33.333333333% !important;} +.width_4n {width:25% !important;} +.width_5n {width:20% !important;} +.width_6n {width:16.6666666666666666667% !important;} +.width_7n {width:14.2857142857143% !important;} +.width_8n {width:12.5% !important;} +.width_9n {width:11.111111111111111111111% !important;} +.width_10n {width:10% !important;} + + +a{color:#000;text-decoration:none;cursor: pointer;} +img{vertical-align:middle;} +/* .container{width:1280px;height:100%;margin:0px auto;} */ + + +/* select { +font-family: inherit; +background: url('../img/icon/arrow_bk.png') no-repeat 90% 50%; +-webkit-appearance: none; +-moz-appearance: none; +appearance: none; +} +select::-ms-expand { + display: none; +} */ + +.on{display:block!important;} + +/* .list-txt > li {position: relative;padding-left: 14px;} +.list-txt > li:before {content: "- ";display: inline-block;position: absolute;top: 0;left: 0;} */ + +input[type=text],input[type=password], textarea { +-webkit-transition:all 0.30s ease-in-out; +-moz-transition:all 0.30s ease-in-out; +-ms-transition:all 0.30s ease-in-out; +-o-transition:all 0.30s ease-in-out; +outline:none; +} + +input[type=text]:focus,input[type=password]:focus, textarea:focus,select:focus { +-webkit-box-shadow:0 0 5px #9ed4ff; +-moz-box-shadow:0 0 5px #9ed4ff; +box-shadow:0 0 5px #9ed4ff; +border:1px solid #2290c9 !important; +} +.checkbox input {padding: 0; height: initial;width: initial;margin-bottom: 0;display: none;cursor: pointer;} +.checkbox label {position: relative;cursor: pointer;} +.checkbox label:before {content:'';-webkit-appearance: none;background-color: transparent;border: 2px solid #ccc;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0px -15px 10px -12px rgba(0, 0, 0, 0.05);padding: 8px;display: inline-block;position: relative;vertical-align: middle;cursor: pointer;margin-right:10px;margin-top: -3px;} +.checkbox input:checked + label:after {content: '';display: block;position: absolute;top: 2px;left: 6px;width: 8px;height: 14px; border:1px solid #2290c9;border-width: 0 4px 4px 0;transform: rotate(45deg);} diff --git a/html/mobile/css/swiper-bundle.css b/html/mobile/css/swiper-bundle.css new file mode 100644 index 0000000..6cf2fe7 --- /dev/null +++ b/html/mobile/css/swiper-bundle.css @@ -0,0 +1,628 @@ +/** + * Swiper 8.1.4 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * https://swiperjs.com + * + * Copyright 2014-2022 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: April 24, 2022 + */ + +@font-face { + font-family: 'swiper-icons'; + src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA'); + font-weight: 400; + font-style: normal; +} +:root { + --swiper-theme-color: #007aff; +} +.swiper { + margin-left: auto; + margin-right: auto; + position: relative; + overflow: hidden; + list-style: none; + padding: 0; + /* Fix of Webkit flickering */ + z-index: 1; +} +.swiper-vertical > .swiper-wrapper { + flex-direction: column; +} +.swiper-wrapper { + position: relative; + width: 100%; + height: 100%; + z-index: 1; + display: flex; + transition-property: transform; + box-sizing: content-box; +} +.swiper-android .swiper-slide, +.swiper-wrapper { + transform: translate3d(0px, 0, 0); +} +.swiper-pointer-events { + touch-action: pan-y; +} +.swiper-pointer-events.swiper-vertical { + touch-action: pan-x; +} +.swiper-slide { + flex-shrink: 0; + width: 100%; + height: 100%; + position: relative; + transition-property: transform; +} +.swiper-slide-invisible-blank { + visibility: hidden; +} +/* Auto Height */ +.swiper-autoheight, +.swiper-autoheight .swiper-slide { + height: auto; +} +.swiper-autoheight .swiper-wrapper { + align-items: flex-start; + transition-property: transform, height; +} +.swiper-backface-hidden .swiper-slide { + transform: translateZ(0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +/* 3D Effects */ +.swiper-3d, +.swiper-3d.swiper-css-mode .swiper-wrapper { + perspective: 1200px; +} +.swiper-3d .swiper-wrapper, +.swiper-3d .swiper-slide, +.swiper-3d .swiper-slide-shadow, +.swiper-3d .swiper-slide-shadow-left, +.swiper-3d .swiper-slide-shadow-right, +.swiper-3d .swiper-slide-shadow-top, +.swiper-3d .swiper-slide-shadow-bottom, +.swiper-3d .swiper-cube-shadow { + transform-style: preserve-3d; +} +.swiper-3d .swiper-slide-shadow, +.swiper-3d .swiper-slide-shadow-left, +.swiper-3d .swiper-slide-shadow-right, +.swiper-3d .swiper-slide-shadow-top, +.swiper-3d .swiper-slide-shadow-bottom { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 10; +} +.swiper-3d .swiper-slide-shadow { + background: rgba(0, 0, 0, 0.15); +} +.swiper-3d .swiper-slide-shadow-left { + background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-3d .swiper-slide-shadow-right { + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-3d .swiper-slide-shadow-top { + background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-3d .swiper-slide-shadow-bottom { + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +/* CSS Mode */ +.swiper-css-mode > .swiper-wrapper { + overflow: auto; + scrollbar-width: none; + /* For Firefox */ + -ms-overflow-style: none; + /* For Internet Explorer and Edge */ +} +.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar { + display: none; +} +.swiper-css-mode > .swiper-wrapper > .swiper-slide { + scroll-snap-align: start start; +} +.swiper-horizontal.swiper-css-mode > .swiper-wrapper { + scroll-snap-type: x mandatory; +} +.swiper-vertical.swiper-css-mode > .swiper-wrapper { + scroll-snap-type: y mandatory; +} +.swiper-centered > .swiper-wrapper::before { + content: ''; + flex-shrink: 0; + order: 9999; +} +.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child { + margin-inline-start: var(--swiper-centered-offset-before); +} +.swiper-centered.swiper-horizontal > .swiper-wrapper::before { + height: 100%; + min-height: 1px; + width: var(--swiper-centered-offset-after); +} +.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child { + margin-block-start: var(--swiper-centered-offset-before); +} +.swiper-centered.swiper-vertical > .swiper-wrapper::before { + width: 100%; + min-width: 1px; + height: var(--swiper-centered-offset-after); +} +.swiper-centered > .swiper-wrapper > .swiper-slide { + scroll-snap-align: center center; +} +.swiper-virtual .swiper-slide { + -webkit-backface-visibility: hidden; + transform: translateZ(0); +} +.swiper-virtual.swiper-css-mode .swiper-wrapper::after { + content: ''; + position: absolute; + left: 0; + top: 0; + pointer-events: none; +} +.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after { + height: 1px; + width: var(--swiper-virtual-size); +} +.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after { + width: 1px; + height: var(--swiper-virtual-size); +} +:root { + --swiper-navigation-size: 44px; + /* + --swiper-navigation-color: var(--swiper-theme-color); + */ +} +.swiper-button-prev, +.swiper-button-next { + position: absolute; + top: 50%; + width: calc(var(--swiper-navigation-size) / 44 * 27); + height: var(--swiper-navigation-size); + margin-top: calc(0px - (var(--swiper-navigation-size) / 2)); + z-index: 10; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + color: var(--swiper-navigation-color, var(--swiper-theme-color)); +} +.swiper-button-prev.swiper-button-disabled, +.swiper-button-next.swiper-button-disabled { + opacity: 0.35; + cursor: auto; + pointer-events: none; +} +.swiper-button-prev:after, +.swiper-button-next:after { + font-family: swiper-icons; + font-size: var(--swiper-navigation-size); + text-transform: none !important; + letter-spacing: 0; + text-transform: none; + font-variant: initial; + line-height: 1; +} +.swiper-button-prev, +.swiper-rtl .swiper-button-next { + left: 10px; + right: auto; +} +.swiper-button-prev:after, +.swiper-rtl .swiper-button-next:after { + content: 'prev'; +} +.swiper-button-next, +.swiper-rtl .swiper-button-prev { + right: 10px; + left: auto; +} +.swiper-button-next:after, +.swiper-rtl .swiper-button-prev:after { + content: 'next'; +} +.swiper-button-lock { + display: none; +} +:root { + /* + --swiper-pagination-color: var(--swiper-theme-color); + --swiper-pagination-bullet-size: 8px; + --swiper-pagination-bullet-width: 8px; + --swiper-pagination-bullet-height: 8px; + --swiper-pagination-bullet-inactive-color: #000; + --swiper-pagination-bullet-inactive-opacity: 0.2; + --swiper-pagination-bullet-opacity: 1; + --swiper-pagination-bullet-horizontal-gap: 4px; + --swiper-pagination-bullet-vertical-gap: 6px; + */ +} +.swiper-pagination { + position: absolute; + text-align: center; + transition: 300ms opacity; + transform: translate3d(0, 0, 0); + z-index: 10; +} +.swiper-pagination.swiper-pagination-hidden { + opacity: 0; +} +/* Common Styles */ +.swiper-pagination-fraction, +.swiper-pagination-custom, +.swiper-horizontal > .swiper-pagination-bullets, +.swiper-pagination-bullets.swiper-pagination-horizontal { + bottom: 10px; + left: 0; + width: 100%; +} +/* Bullets */ +.swiper-pagination-bullets-dynamic { + overflow: hidden; + font-size: 0; +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transform: scale(0.33); + position: relative; +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active { + transform: scale(1); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main { + transform: scale(1); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev { + transform: scale(0.66); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev { + transform: scale(0.33); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next { + transform: scale(0.66); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next { + transform: scale(0.33); +} +.swiper-pagination-bullet { + width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px)); + height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px)); + display: inline-block; + border-radius: 50%; + background: var(--swiper-pagination-bullet-inactive-color, #000); + opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2); +} +button.swiper-pagination-bullet { + border: none; + margin: 0; + padding: 0; + box-shadow: none; + -webkit-appearance: none; + appearance: none; +} +.swiper-pagination-clickable .swiper-pagination-bullet { + cursor: pointer; +} +.swiper-pagination-bullet:only-child { + display: none !important; +} +.swiper-pagination-bullet-active { + opacity: var(--swiper-pagination-bullet-opacity, 1); + background: var(--swiper-pagination-color, var(--swiper-theme-color)); +} +.swiper-vertical > .swiper-pagination-bullets, +.swiper-pagination-vertical.swiper-pagination-bullets { + right: 10px; + top: 50%; + transform: translate3d(0px, -50%, 0); +} +.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet, +.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet { + margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0; + display: block; +} +.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic, +.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic { + top: 50%; + transform: translateY(-50%); + width: 8px; +} +.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, +.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + display: inline-block; + transition: 200ms transform, 200ms top; +} +.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet, +.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet { + margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px); +} +.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic, +.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic { + left: 50%; + transform: translateX(-50%); + white-space: nowrap; +} +.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet, +.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transition: 200ms transform, 200ms left; +} +.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transition: 200ms transform, 200ms right; +} +/* Progress */ +.swiper-pagination-progressbar { + background: rgba(0, 0, 0, 0.25); + position: absolute; +} +.swiper-pagination-progressbar .swiper-pagination-progressbar-fill { + background: var(--swiper-pagination-color, var(--swiper-theme-color)); + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + transform: scale(0); + transform-origin: left top; +} +.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill { + transform-origin: right top; +} +.swiper-horizontal > .swiper-pagination-progressbar, +.swiper-pagination-progressbar.swiper-pagination-horizontal, +.swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, +.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite { + width: 100%; + height: 4px; + left: 0; + top: 0; +} +.swiper-vertical > .swiper-pagination-progressbar, +.swiper-pagination-progressbar.swiper-pagination-vertical, +.swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite, +.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite { + width: 4px; + height: 100%; + left: 0; + top: 0; +} +.swiper-pagination-lock { + display: none; +} +/* Scrollbar */ +.swiper-scrollbar { + border-radius: 10px; + position: relative; + -ms-touch-action: none; + background: rgba(0, 0, 0, 0.1); +} +.swiper-horizontal > .swiper-scrollbar { + position: absolute; + left: 1%; + bottom: 3px; + z-index: 50; + height: 5px; + width: 98%; +} +.swiper-vertical > .swiper-scrollbar { + position: absolute; + right: 3px; + top: 1%; + z-index: 50; + width: 5px; + height: 98%; +} +.swiper-scrollbar-drag { + height: 100%; + width: 100%; + position: relative; + background: rgba(0, 0, 0, 0.5); + border-radius: 10px; + left: 0; + top: 0; +} +.swiper-scrollbar-cursor-drag { + cursor: move; +} +.swiper-scrollbar-lock { + display: none; +} +.swiper-zoom-container { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + text-align: center; +} +.swiper-zoom-container > img, +.swiper-zoom-container > svg, +.swiper-zoom-container > canvas { + max-width: 100%; + max-height: 100%; + object-fit: contain; +} +.swiper-slide-zoomed { + cursor: move; +} +/* Preloader */ +:root { + /* + --swiper-preloader-color: var(--swiper-theme-color); + */ +} +.swiper-lazy-preloader { + width: 42px; + height: 42px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -21px; + margin-top: -21px; + z-index: 10; + transform-origin: 50%; + box-sizing: border-box; + border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color)); + border-radius: 50%; + border-top-color: transparent; +} +.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader, +.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader { + animation: swiper-preloader-spin 1s infinite linear; +} +.swiper-lazy-preloader-white { + --swiper-preloader-color: #fff; +} +.swiper-lazy-preloader-black { + --swiper-preloader-color: #000; +} +@keyframes swiper-preloader-spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +/* a11y */ +.swiper .swiper-notification { + position: absolute; + left: 0; + top: 0; + pointer-events: none; + opacity: 0; + z-index: -1000; +} +.swiper-free-mode > .swiper-wrapper { + transition-timing-function: ease-out; + margin: 0 auto; +} +.swiper-grid > .swiper-wrapper { + flex-wrap: wrap; +} +.swiper-grid-column > .swiper-wrapper { + flex-wrap: wrap; + flex-direction: column; +} +.swiper-fade.swiper-free-mode .swiper-slide { + transition-timing-function: ease-out; +} +.swiper-fade .swiper-slide { + pointer-events: none; + transition-property: opacity; +} +.swiper-fade .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-fade .swiper-slide-active, +.swiper-fade .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-cube { + overflow: visible; +} +.swiper-cube .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; + visibility: hidden; + transform-origin: 0 0; + width: 100%; + height: 100%; +} +.swiper-cube .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-cube.swiper-rtl .swiper-slide { + transform-origin: 100% 0; +} +.swiper-cube .swiper-slide-active, +.swiper-cube .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-cube .swiper-slide-active, +.swiper-cube .swiper-slide-next, +.swiper-cube .swiper-slide-prev, +.swiper-cube .swiper-slide-next + .swiper-slide { + pointer-events: auto; + visibility: visible; +} +.swiper-cube .swiper-slide-shadow-top, +.swiper-cube .swiper-slide-shadow-bottom, +.swiper-cube .swiper-slide-shadow-left, +.swiper-cube .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.swiper-cube .swiper-cube-shadow { + position: absolute; + left: 0; + bottom: 0px; + width: 100%; + height: 100%; + opacity: 0.6; + z-index: 0; +} +.swiper-cube .swiper-cube-shadow:before { + content: ''; + background: #000; + position: absolute; + left: 0; + top: 0; + bottom: 0; + right: 0; + filter: blur(50px); +} +.swiper-flip { + overflow: visible; +} +.swiper-flip .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; +} +.swiper-flip .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-flip .swiper-slide-active, +.swiper-flip .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-flip .swiper-slide-shadow-top, +.swiper-flip .swiper-slide-shadow-bottom, +.swiper-flip .swiper-slide-shadow-left, +.swiper-flip .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.swiper-creative .swiper-slide { + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + overflow: hidden; + transition-property: transform, opacity, height; +} +.swiper-cards { + overflow: visible; +} +.swiper-cards .swiper-slide { + transform-origin: center bottom; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + overflow: hidden; +} diff --git a/html/mobile/css/swiper.css b/html/mobile/css/swiper.css new file mode 100644 index 0000000..7f6e132 --- /dev/null +++ b/html/mobile/css/swiper.css @@ -0,0 +1,531 @@ +/** + * Swiper 5.3.0 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * http://swiperjs.com + * + * Copyright 2014-2020 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: January 11, 2020 + */ + +@font-face { + font-family: 'swiper-icons'; + src: url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff"); + font-weight: 400; + font-style: normal; +} +:root { + --swiper-theme-color: #007aff; +} +.swiper-container { + margin-left: auto; + margin-right: auto; + position: relative; + overflow: hidden; + list-style: none; + padding: 0; + /* Fix of Webkit flickering */ + z-index: 1; +} +.swiper-container-vertical > .swiper-wrapper { + flex-direction: column; +} +.swiper-wrapper { + position: relative; + width: 100%; + height: 100%; + z-index: 1; + display: flex; + transition-property: transform; + box-sizing: content-box; +} +.swiper-container-android .swiper-slide, +.swiper-wrapper { + transform: translate3d(0px, 0, 0); +} +.swiper-container-multirow > .swiper-wrapper { + flex-wrap: wrap; +} +.swiper-container-multirow-column > .swiper-wrapper { + flex-wrap: wrap; + flex-direction: column; +} +.swiper-container-free-mode > .swiper-wrapper { + transition-timing-function: ease-out; + margin: 0 auto; +} +.swiper-slide { + flex-shrink: 0; + width: 100%; + height: 100%; + position: relative; + transition-property: transform; +} +.swiper-slide-invisible-blank { + visibility: hidden; +} +/* Auto Height */ +.swiper-container-autoheight, +.swiper-container-autoheight .swiper-slide { + height: auto; +} +.swiper-container-autoheight .swiper-wrapper { + align-items: flex-start; + transition-property: transform, height; +} +/* 3D Effects */ +.swiper-container-3d { + perspective: 1200px; +} +.swiper-container-3d .swiper-wrapper, +.swiper-container-3d .swiper-slide, +.swiper-container-3d .swiper-slide-shadow-left, +.swiper-container-3d .swiper-slide-shadow-right, +.swiper-container-3d .swiper-slide-shadow-top, +.swiper-container-3d .swiper-slide-shadow-bottom, +.swiper-container-3d .swiper-cube-shadow { + transform-style: preserve-3d; +} +.swiper-container-3d .swiper-slide-shadow-left, +.swiper-container-3d .swiper-slide-shadow-right, +.swiper-container-3d .swiper-slide-shadow-top, +.swiper-container-3d .swiper-slide-shadow-bottom { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 10; +} +.swiper-container-3d .swiper-slide-shadow-left { + background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-container-3d .swiper-slide-shadow-right { + background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-container-3d .swiper-slide-shadow-top { + background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +.swiper-container-3d .swiper-slide-shadow-bottom { + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0)); +} +/* CSS Mode */ +.swiper-container-css-mode > .swiper-wrapper { + overflow: auto; + scrollbar-width: none; + /* For Firefox */ + -ms-overflow-style: none; + /* For Internet Explorer and Edge */ +} +.swiper-container-css-mode > .swiper-wrapper::-webkit-scrollbar { + display: none; +} +.swiper-container-css-mode > .swiper-wrapper > .swiper-slide { + scroll-snap-align: start start; +} +.swiper-container-horizontal.swiper-container-css-mode > .swiper-wrapper { + scroll-snap-type: x mandatory; +} +.swiper-container-vertical.swiper-container-css-mode > .swiper-wrapper { + scroll-snap-type: y mandatory; +} +:root { + --swiper-navigation-size: 44px; + /* + --swiper-navigation-color: var(--swiper-theme-color); + */ +} +.swiper-button-prev, +.swiper-button-next { + position: absolute; + top: 50%; + width: calc(var(--swiper-navigation-size) / 44 * 27); + height: var(--swiper-navigation-size); + margin-top: calc(-1 * var(--swiper-navigation-size) / 2); + z-index: 10; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + color: var(--swiper-navigation-color, var(--swiper-theme-color)); +} +.swiper-button-prev.swiper-button-disabled, +.swiper-button-next.swiper-button-disabled { + opacity: 0.35; + cursor: auto; + pointer-events: none; +} +.swiper-button-prev:after, +.swiper-button-next:after { + font-family: swiper-icons; + font-size: var(--swiper-navigation-size); + text-transform: none !important; + letter-spacing: 0; + text-transform: none; + font-variant: initial; +} +.swiper-button-prev, +.swiper-container-rtl .swiper-button-next { + left: 10px; + right: auto; +} +.swiper-button-prev:after, +.swiper-container-rtl .swiper-button-next:after { + content: 'prev'; +} +.swiper-button-next, +.swiper-container-rtl .swiper-button-prev { + right: 10px; + left: auto; +} +.swiper-button-next:after, +.swiper-container-rtl .swiper-button-prev:after { + content: 'next'; +} +.swiper-button-prev.swiper-button-white, +.swiper-button-next.swiper-button-white { + --swiper-navigation-color: #ffffff; +} +.swiper-button-prev.swiper-button-black, +.swiper-button-next.swiper-button-black { + --swiper-navigation-color: #000000; +} +.swiper-button-lock { + display: none; +} +:root { + /* + --swiper-pagination-color: var(--swiper-theme-color); + */ +} +.swiper-pagination { + position: absolute; + text-align: center; + transition: 300ms opacity; + transform: translate3d(0, 0, 0); + z-index: 10; +} +.swiper-pagination.swiper-pagination-hidden { + opacity: 0; +} +/* Common Styles */ +.swiper-pagination-fraction, +.swiper-pagination-custom, +.swiper-container-horizontal > .swiper-pagination-bullets { + bottom: 10px; + left: 0; + width: 100%; +} +/* Bullets */ +.swiper-pagination-bullets-dynamic { + overflow: hidden; + font-size: 0; +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transform: scale(0.33); + position: relative; +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active { + transform: scale(1); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main { + transform: scale(1); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev { + transform: scale(0.66); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev { + transform: scale(0.33); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next { + transform: scale(0.66); +} +.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next { + transform: scale(0.33); +} +.swiper-pagination-bullet { + width: 8px; + height: 8px; + display: inline-block; + border-radius: 100%; + background: #000; + opacity: 0.2; +} +button.swiper-pagination-bullet { + border: none; + margin: 0; + padding: 0; + box-shadow: none; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +.swiper-pagination-clickable .swiper-pagination-bullet { + cursor: pointer; +} +.swiper-pagination-bullet-active { + opacity: 1; + background: var(--swiper-pagination-color, var(--swiper-theme-color)); +} +.swiper-container-vertical > .swiper-pagination-bullets { + right: 10px; + top: 50%; + transform: translate3d(0px, -50%, 0); +} +.swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet { + margin: 6px 0; + display: block; +} +.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic { + top: 50%; + transform: translateY(-50%); + width: 8px; +} +.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + display: inline-block; + transition: 200ms transform, 200ms top; +} +.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet { + margin: 0 4px; +} +.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic { + left: 50%; + transform: translateX(-50%); + white-space: nowrap; +} +.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transition: 200ms transform, 200ms left; +} +.swiper-container-horizontal.swiper-container-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet { + transition: 200ms transform, 200ms right; +} +/* Progress */ +.swiper-pagination-progressbar { + background: rgba(0, 0, 0, 0.25); + position: absolute; +} +.swiper-pagination-progressbar .swiper-pagination-progressbar-fill { + background: var(--swiper-pagination-color, var(--swiper-theme-color)); + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + transform: scale(0); + transform-origin: left top; +} +.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill { + transform-origin: right top; +} +.swiper-container-horizontal > .swiper-pagination-progressbar, +.swiper-container-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite { + width: 100%; + height: 4px; + left: 0; + top: 0; +} +.swiper-container-vertical > .swiper-pagination-progressbar, +.swiper-container-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite { + width: 4px; + height: 100%; + left: 0; + top: 0; +} +.swiper-pagination-white { + --swiper-pagination-color: #ffffff; +} +.swiper-pagination-black { + --swiper-pagination-color: #000000; +} +.swiper-pagination-lock { + display: none; +} +/* Scrollbar */ +.swiper-scrollbar { + border-radius: 10px; + position: relative; + -ms-touch-action: none; + background: rgba(0, 0, 0, 0.1); +} +.swiper-container-horizontal > .swiper-scrollbar { + position: absolute; + left: 1%; + bottom: 3px; + z-index: 50; + height: 5px; + width: 98%; +} +.swiper-container-vertical > .swiper-scrollbar { + position: absolute; + right: 3px; + top: 1%; + z-index: 50; + width: 5px; + height: 98%; +} +.swiper-scrollbar-drag { + height: 100%; + width: 100%; + position: relative; + background: rgba(0, 0, 0, 0.5); + border-radius: 10px; + left: 0; + top: 0; +} +.swiper-scrollbar-cursor-drag { + cursor: move; +} +.swiper-scrollbar-lock { + display: none; +} +.swiper-zoom-container { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + text-align: center; +} +.swiper-zoom-container > img, +.swiper-zoom-container > svg, +.swiper-zoom-container > canvas { + max-width: 100%; + max-height: 100%; + object-fit: contain; +} +.swiper-slide-zoomed { + cursor: move; +} +/* Preloader */ +:root { + /* + --swiper-preloader-color: var(--swiper-theme-color); + */ +} +.swiper-lazy-preloader { + width: 42px; + height: 42px; + position: absolute; + left: 50%; + top: 50%; + margin-left: -21px; + margin-top: -21px; + z-index: 10; + transform-origin: 50%; + animation: swiper-preloader-spin 1s infinite linear; + box-sizing: border-box; + border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color)); + border-radius: 50%; + border-top-color: transparent; +} +.swiper-lazy-preloader-white { + --swiper-preloader-color: #fff; +} +.swiper-lazy-preloader-black { + --swiper-preloader-color: #000; +} +@keyframes swiper-preloader-spin { + 100% { + transform: rotate(360deg); + } +} +/* a11y */ +.swiper-container .swiper-notification { + position: absolute; + left: 0; + top: 0; + pointer-events: none; + opacity: 0; + z-index: -1000; +} +.swiper-container-fade.swiper-container-free-mode .swiper-slide { + transition-timing-function: ease-out; +} +.swiper-container-fade .swiper-slide { + pointer-events: none; + transition-property: opacity; +} +.swiper-container-fade .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-container-fade .swiper-slide-active, +.swiper-container-fade .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-container-cube { + overflow: visible; +} +.swiper-container-cube .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; + visibility: hidden; + transform-origin: 0 0; + width: 100%; + height: 100%; +} +.swiper-container-cube .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-container-cube.swiper-container-rtl .swiper-slide { + transform-origin: 100% 0; +} +.swiper-container-cube .swiper-slide-active, +.swiper-container-cube .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-container-cube .swiper-slide-active, +.swiper-container-cube .swiper-slide-next, +.swiper-container-cube .swiper-slide-prev, +.swiper-container-cube .swiper-slide-next + .swiper-slide { + pointer-events: auto; + visibility: visible; +} +.swiper-container-cube .swiper-slide-shadow-top, +.swiper-container-cube .swiper-slide-shadow-bottom, +.swiper-container-cube .swiper-slide-shadow-left, +.swiper-container-cube .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} +.swiper-container-cube .swiper-cube-shadow { + position: absolute; + left: 0; + bottom: 0px; + width: 100%; + height: 100%; + background: #000; + opacity: 0.6; + -webkit-filter: blur(50px); + filter: blur(50px); + z-index: 0; +} +.swiper-container-flip { + overflow: visible; +} +.swiper-container-flip .swiper-slide { + pointer-events: none; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + z-index: 1; +} +.swiper-container-flip .swiper-slide .swiper-slide { + pointer-events: none; +} +.swiper-container-flip .swiper-slide-active, +.swiper-container-flip .swiper-slide-active .swiper-slide-active { + pointer-events: auto; +} +.swiper-container-flip .swiper-slide-shadow-top, +.swiper-container-flip .swiper-slide-shadow-bottom, +.swiper-container-flip .swiper-slide-shadow-left, +.swiper-container-flip .swiper-slide-shadow-right { + z-index: 0; + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} diff --git a/html/mobile/css/swiper.min.css b/html/mobile/css/swiper.min.css new file mode 100644 index 0000000..16e006a --- /dev/null +++ b/html/mobile/css/swiper.min.css @@ -0,0 +1,13 @@ +/** + * Swiper 5.3.0 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * http://swiperjs.com + * + * Copyright 2014-2020 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: January 11, 2020 + */ + +@font-face{font-family:swiper-icons;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff");font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-container-multirow>.swiper-wrapper{flex-wrap:wrap}.swiper-container-multirow-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-container-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-container-3d{perspective:1200px}.swiper-container-3d .swiper-cube-shadow,.swiper-container-3d .swiper-slide,.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top,.swiper-container-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-container-3d .swiper-slide-shadow-bottom,.swiper-container-3d .swiper-slide-shadow-left,.swiper-container-3d .swiper-slide-shadow-right,.swiper-container-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-container-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-container-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-container-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-container-horizontal.swiper-container-css-mode>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-container-vertical.swiper-container-css-mode>.swiper-wrapper{scroll-snap-type:y mandatory}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(-1 * var(--swiper-navigation-size)/ 2);z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;text-transform:none;font-variant:initial}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{left:10px;right:auto}.swiper-button-prev:after,.swiper-container-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{right:10px;left:auto}.swiper-button-next:after,.swiper-container-rtl .swiper-button-prev:after{content:'next'}.swiper-button-next.swiper-button-white,.swiper-button-prev.swiper-button-white{--swiper-navigation-color:#ffffff}.swiper-button-next.swiper-button-black,.swiper-button-prev.swiper-button-black{--swiper-navigation-color:#000000}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-container-horizontal>.swiper-pagination-bullets,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:8px;height:8px;display:inline-block;border-radius:100%;background:#000;opacity:.2}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet-active{opacity:1;background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;transform:translate3d(0px,-50%,0)}.swiper-container-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:6px 0;display:block}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-container-horizontal>.swiper-pagination-progressbar,.swiper-container-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-container-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-container-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-white{--swiper-pagination-color:#ffffff}.swiper-pagination-black{--swiper-pagination-color:#000000}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-container-horizontal>.swiper-scrollbar{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-container-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;animation:swiper-preloader-spin 1s infinite linear;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{100%{transform:rotate(360deg)}}.swiper-container .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-container-fade.swiper-container-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-container-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-fade .swiper-slide-active,.swiper-container-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube{overflow:visible}.swiper-container-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-container-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-cube.swiper-container-rtl .swiper-slide{transform-origin:100% 0}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-cube .swiper-slide-active,.swiper-container-cube .swiper-slide-next,.swiper-container-cube .swiper-slide-next+.swiper-slide,.swiper-container-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-container-cube .swiper-slide-shadow-bottom,.swiper-container-cube .swiper-slide-shadow-left,.swiper-container-cube .swiper-slide-shadow-right,.swiper-container-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-container-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;background:#000;opacity:.6;-webkit-filter:blur(50px);filter:blur(50px);z-index:0}.swiper-container-flip{overflow:visible}.swiper-container-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-container-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-container-flip .swiper-slide-active,.swiper-container-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-container-flip .swiper-slide-shadow-bottom,.swiper-container-flip .swiper-slide-shadow-left,.swiper-container-flip .swiper-slide-shadow-right,.swiper-container-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden} \ No newline at end of file diff --git a/html/mobile/css/xeicon.min.css b/html/mobile/css/xeicon.min.css new file mode 100644 index 0000000..357d14b --- /dev/null +++ b/html/mobile/css/xeicon.min.css @@ -0,0 +1,4 @@ +/*! +* XEIcon 2.3.3 by @NAVER - http://xpressengine.github.io/XEIcon/ - @XEIcon +* License - http://xpressengine.github.io/XEIcon/license.html (Font: SIL OFL 1.1, CSS: MIT License) +*/@font-face{font-family:xeicon;src:url(fonts/xeicon.eot?3ka2yj);src:url(fonts/xeicon.eot?3ka2yj#iefix) format("embedded-opentype"),url(fonts/xeicon.woff2?3ka2yj) format("woff2"),url(fonts/xeicon.ttf?3ka2yj) format("truetype"),url(fonts/xeicon.woff?3ka2yj) format("woff"),url(fonts/xeicon.svg?3ka2yj#xeicon) format("svg");font-weight:400;font-style:normal}[class*=" xi-"],[class^=xi-]{font-family:xeicon!important;display:inline-block;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.xi-home:before{content:"\e900"}.xi-home-o:before{content:"\e902"}.xi-bars:before{content:"\e91c"}.xi-hamburger-back:before{content:"\eb46"}.xi-hamburger-out:before{content:"\eb45"}.xi-apps:before{content:"\e903"}.xi-ellipsis-h:before{content:"\e94a"}.xi-ellipsis-v:before{content:"\e949"}.xi-drag-vertical:before{content:"\e996"}.xi-drag-handle:before{content:"\e960"}.xi-arrow-top:before{content:"\e912"}.xi-arrow-bottom:before{content:"\e904"}.xi-arrow-left:before{content:"\e906"}.xi-arrow-right:before{content:"\e907"}.xi-arrow-up:before{content:"\e915"}.xi-arrow-down:before{content:"\e905"}.xi-long-arrow-left:before{content:"\e908"}.xi-long-arrow-right:before{content:"\e90b"}.xi-long-arrow-up:before{content:"\e909"}.xi-long-arrow-down:before{content:"\e90a"}.xi-angle-left:before{content:"\e93b"}.xi-angle-left-min:before{content:"\e93c"}.xi-angle-left-thin:before{content:"\e93d"}.xi-angle-right:before{content:"\e93e"}.xi-angle-right-min:before{content:"\e93f"}.xi-angle-right-thin:before{content:"\e940"}.xi-angle-up:before{content:"\e944"}.xi-angle-up-min:before{content:"\e945"}.xi-angle-up-thin:before{content:"\e946"}.xi-angle-down:before{content:"\e941"}.xi-angle-down-min:before{content:"\e942"}.xi-angle-down-thin:before{content:"\e943"}.xi-caret-up:before{content:"\e92f"}.xi-caret-up-min:before{content:"\e930"}.xi-caret-down:before{content:"\e935"}.xi-caret-down-min:before{content:"\e936"}.xi-caret-up-circle:before{content:"\e931"}.xi-caret-up-circle-o:before{content:"\e932"}.xi-caret-down-circle:before{content:"\e937"}.xi-caret-down-circle-o:before{content:"\e938"}.xi-caret-up-square:before{content:"\e933"}.xi-caret-up-square-o:before{content:"\e934"}.xi-caret-down-square:before{content:"\e939"}.xi-caret-down-square-o:before{content:"\e93a"}.xi-arrows-h:before{content:"\e90e"}.xi-arrows-v:before{content:"\e90f"}.xi-expand:before{content:"\e910"}.xi-compress:before{content:"\e911"}.xi-arrows:before{content:"\e90c"}.xi-arrows-alt:before{content:"\e90d"}.xi-compare-arrows:before{content:"\e947"}.xi-scroll:before{content:"\e94b"}.xi-dashboard:before{content:"\e948"}.xi-dashboard-o:before{content:"\e95e"}.xi-refresh:before{content:"\e973"}.xi-catched:before{content:"\e923"}.xi-renew:before{content:"\e977"}.xi-sync:before{content:"\e982"}.xi-eye:before{content:"\e951"}.xi-eye-o:before{content:"\e950"}.xi-eye-off:before{content:"\e953"}.xi-eye-slash:before{content:"\e953"}.xi-eye-off-o:before{content:"\e952"}.xi-eye-slash2:before{content:"\e952"}.xi-lock:before{content:"\e964"}.xi-lock-o:before{content:"\e966"}.xi-unlock:before{content:"\e965"}.xi-unlock-o:before{content:"\e967"}.xi-trash:before{content:"\e96e"}.xi-trash-o:before{content:"\e96f"}.xi-flag:before{content:"\e961"}.xi-flag-o:before{content:"\e962"}.xi-expand-square:before{content:"\e954"}.xi-compress-square:before{content:"\e955"}.xi-log-in:before{content:"\e963"}.xi-log-out:before{content:"\e972"}.xi-search:before{content:"\e97a"}.xi-magnifier:before{content:"\e97a"}.xi-zoom-in:before{content:"\e97b"}.xi-magnifier-expand:before{content:"\e97b"}.xi-zoom-out:before{content:"\e97c"}.xi-magnifier-reduce:before{content:"\e97c"}.xi-subdirectory:before{content:"\e97e"}.xi-subdirectory-arrow:before{content:"\e981"}.xi-external-link:before{content:"\e980"}.xi-cog:before{content:"\e986"}.xi-view-array:before{content:"\e983"}.xi-view-carousel:before{content:"\e984"}.xi-view-column:before{content:"\e985"}.xi-view-day:before{content:"\e98d"}.xi-view-list:before{content:"\e993"}.xi-view-module:before{content:"\e997"}.xi-view-stream:before{content:"\e99a"}.xi-wrench:before{content:"\e99b"}.xi-filter:before{content:"\e9d9"}.xi-funnel:before{content:"\e9d9"}.xi-plus:before{content:"\e913"}.xi-plus-min:before{content:"\e914"}.xi-plus-thin:before{content:"\e9c5"}.xi-minus:before{content:"\e91a"}.xi-minus-min:before{content:"\e91b"}.xi-minus-thin:before{content:"\e9c1"}.xi-close:before{content:"\e921"}.xi-close-min:before{content:"\e922"}.xi-close-thin:before{content:"\e9af"}.xi-check:before{content:"\e928"}.xi-check-min:before{content:"\e929"}.xi-check-thin:before{content:"\e92a"}.xi-plus-circle:before{content:"\e916"}.xi-plus-circle-o:before{content:"\e917"}.xi-minus-circle:before{content:"\e91d"}.xi-minus-circle-o:before{content:"\e91e"}.xi-close-circle:before{content:"\e924"}.xi-close-circle-o:before{content:"\e925"}.xi-check-circle:before{content:"\e92b"}.xi-check-circle-o:before{content:"\e92c"}.xi-plus-square:before{content:"\e918"}.xi-plus-square-o:before{content:"\e919"}.xi-minus-square:before{content:"\e91f"}.xi-minus-square-o:before{content:"\e920"}.xi-close-square:before{content:"\e926"}.xi-close-square-o:before{content:"\e927"}.xi-check-square:before{content:"\e92d"}.xi-check-box:before{content:"\e92d"}.xi-checkbox-blank:before{content:"\ea0e"}.xi-check-square-o:before{content:"\e92e"}.xi-checkbox-checked:before{content:"\e92e"}.xi-radiobox-blank:before{content:"\e9c6"}.xi-radiobox-checked:before{content:"\e9c7"}.xi-cut:before{content:"\e9b0"}.xi-label:before{content:"\e9b1"}.xi-label-o:before{content:"\e9b2"}.xi-library-add:before{content:"\e9b3"}.xi-library-bookmark:before{content:"\e9b4"}.xi-tagged-book:before{content:"\e9b4"}.xi-save:before{content:"\e9b9"}.xi-lightbulb:before{content:"\e9be"}.xi-idea:before{content:"\e9be"}.xi-lightbulb-o:before{content:"\e9bf"}.xi-link:before{content:"\e9c0"}.xi-package:before{content:"\e9c2"}.xi-archive:before{content:"\e9c2"}.xi-pen:before{content:"\e9c3"}.xi-pen-o:before{content:"\e9c4"}.xi-undo:before{content:"\e9d2"}.xi-redo:before{content:"\e9c8"}.xi-switch-off:before{content:"\e9c9"}.xi-switch-on:before{content:"\e9ca"}.xi-toggle-off:before{content:"\e9cb"}.xi-toggle-on:before{content:"\e9cd"}.xi-bookmark:before{content:"\ea1c"}.xi-bookmark-o:before{content:"\ea1d"}.xi-tag:before{content:"\ea36"}.xi-tags:before{content:"\ea37"}.xi-mail:before{content:"\ea06"}.xi-envelope:before{content:"\ea06"}.xi-social-email:before{content:"\ea06"}.xi-mail-o:before{content:"\ea07"}.xi-mail-read:before{content:"\ea08"}.xi-envelope-open:before{content:"\ea08"}.xi-mail-read-o:before{content:"\ea09"}.xi-send:before{content:"\ea0b"}.xi-paper-plane:before{content:"\ea0b"}.xi-reply:before{content:"\ea0d"}.xi-reply-all:before{content:"\ea0c"}.xi-share:before{content:"\e9fa"}.xi-share-l:before{content:"\e9fa"}.xi-share-alt:before{content:"\e9e9"}.xi-share-alt-o:before{content:"\e9ea"}.xi-call:before{content:"\e9d3"}.xi-phone:before{content:"\e9d3"}.xi-call-outgoing:before{content:"\e9d4"}.xi-call-incoming:before{content:"\e9d6"}.xi-call-reception:before{content:"\e9d6"}.xi-call-missed:before{content:"\e9d5"}.xi-comment:before{content:"\e9d7"}.xi-comment-o:before{content:"\e9d8"}.xi-forum:before{content:"\e9f0"}.xi-comments:before{content:"\e9f0"}.xi-forum-o:before{content:"\e9f1"}.xi-video-call:before{content:"\ea18"}.xi-xi-film:before{content:"\ea18"}.xi-voicemail:before{content:"\ea19"}.xi-note:before{content:"\ea1a"}.xi-note-o:before{content:"\ea1b"}.xi-at:before{content:"\ea0a"}.xi-message:before{content:"\ea14"}.xi-message-o:before{content:"\ea15"}.xi-speech:before{content:"\ea12"}.xi-speech-o:before{content:"\ea13"}.xi-user-address:before{content:"\e9f4"}.xi-profile:before{content:"\e9f2"}.xi-user-circle:before{content:"\e9f2"}.xi-profile-o:before{content:"\ea2a"}.xi-user:before{content:"\e9f3"}.xi-users:before{content:"\e9f9"}.xi-group:before{content:"\ea2e"}.xi-community:before{content:"\ea2e"}.xi-user-plus:before{content:"\e9f7"}.xi-users-plus:before{content:"\ea17"}.xi-user-o:before{content:"\e9f5"}.xi-users-o:before{content:"\ea04"}.xi-user-plus-o:before{content:"\e9f8"}.xi-star:before{content:"\ea0f"}.xi-star-o:before{content:"\ea16"}.xi-heart:before{content:"\ea10"}.xi-heart-o:before{content:"\ea11"}.xi-thumbs-up:before{content:"\ea28"}.xi-thumbs-down:before{content:"\ea29"}.xi-crown:before{content:"\e9da"}.xi-trophy:before{content:"\ea38"}.xi-emoticon-happy:before{content:"\e9dd"}.xi-happy-face:before{content:"\e9dd"}.xi-emoticon-happy-o:before{content:"\e9ed"}.xi-emoticon-smiley:before{content:"\e9e4"}.xi-smiley-face:before{content:"\e9e4"}.xi-emoticon-smiley-o:before{content:"\e9e6"}.xi-emoticon-neutral:before{content:"\e9eb"}.xi-neutral-face:before{content:"\e9eb"}.xi-emoticon-neutral-o:before{content:"\e9ec"}.xi-emoticon-bad:before{content:"\e9de"}.xi-emoticon-bad-o:before{content:"\e9df"}.xi-emoticon-sad:before{content:"\e9ee"}.xi-sad-face:before{content:"\e9ee"}.xi-emoticon-sad-o:before{content:"\e9ef"}.xi-emoticon-devil:before{content:"\e9e2"}.xi-angry-face:before{content:"\e9e2"}.xi-emoticon-devil-o:before{content:"\e9e3"}.xi-emoticon-cool:before{content:"\e9e0"}.xi-emoticon-cool-o:before{content:"\e9e1"}.xi-bell:before{content:"\e99c"}.xi-bell-o:before{content:"\e99d"}.xi-bell-off:before{content:"\e99e"}.xi-bell-slash:before{content:"\e99e"}.xi-bell-off-o:before{content:"\e99f"}.xi-alarm:before{content:"\ea1e"}.xi-alarm-o:before{content:"\ea1f"}.xi-alarm-off:before{content:"\ea20"}.xi-time:before{content:"\ea2b"}.xi-time-o:before{content:"\ea2c"}.xi-snooze:before{content:"\ea27"}.xi-calendar:before{content:"\e9a0"}.xi-calendar-add:before{content:"\e9a1"}.xi-calendar-remove:before{content:"\e9a2"}.xi-calendar-cancle:before{content:"\e9a3"}.xi-calendar-check:before{content:"\e9a4"}.xi-calendar-list:before{content:"\e9a5"}.xi-new:before{content:"\e9a8"}.xi-new-o:before{content:"\e9a9"}.xi-info:before{content:"\e9a6"}.xi-information-circle:before{content:"\e9a6"}.xi-info-o:before{content:"\e9a7"}.xi-help:before{content:"\e9ad"}.xi-unknown-circle:before{content:"\e9ad"}.xi-help-o:before{content:"\e9ac"}.xi-error:before{content:"\e9aa"}.xi-error-o:before{content:"\e9ab"}.xi-ban:before{content:"\e9ae"}.xi-slash-circle:before{content:"\e9ae"}.xi-warning:before{content:"\ea2d"}.xi-hand-paper:before{content:"\ea21"}.xi-key:before{content:"\ea22"}.xi-security:before{content:"\ea24"}.xi-shield:before{content:"\ea24"}.xi-shield-checked:before{content:"\ea25"}.xi-check-shield:before{content:"\ea25"}.xi-shield-checked-o:before{content:"\ea26"}.xi-align-justify:before{content:"\e956"}.xi-align-left:before{content:"\e957"}.xi-align-center:before{content:"\e958"}.xi-align-right:before{content:"\e959"}.xi-indent:before{content:"\e95a"}.xi-dedent:before{content:"\e95b"}.xi-list-dot:before{content:"\e95c"}.xi-list-ul:before{content:"\e95c"}.xi-list-square:before{content:"\e95d"}.xi-list-ul-square:before{content:"\e95d"}.xi-list-number:before{content:"\ea6b"}.xi-list-ol:before{content:"\ea6b"}.xi-list:before{content:"\e95f"}.xi-list-ul-l:before{content:"\e95f"}.xi-paragraph:before{content:"\e968"}.xi-bold:before{content:"\e96a"}.xi-italic:before{content:"\e96c"}.xi-strikethrough:before{content:"\e969"}.xi-underline:before{content:"\e96b"}.xi-caps:before{content:"\e96d"}.xi-text-size:before{content:"\eaba"}.xi-text-type:before{content:"\e97f"}.xi-type:before{content:"\e97f"}.xi-spellcheck:before{content:"\eaa9"}.xi-translate:before{content:"\eabc"}.xi-line-height:before{content:"\e976"}.xi-lineheight:before{content:"\e976"}.xi-font:before{content:"\ea63"}.xi-text-format:before{content:"\eab9"}.xi-text-color:before{content:"\eaaa"}.xi-color-fill:before{content:"\ea5e"}.xi-color-helper:before{content:"\ea5f"}.xi-scissors:before{content:"\e994"}.xi-document:before{content:"\e998"}.xi-form:before{content:"\e998"}.xi-palette:before{content:"\e995"}.xi-color:before{content:"\e995"}.xi-color-dropper:before{content:"\e97d"}.xi-eye-dropper:before{content:"\e97d"}.xi-eraser:before{content:"\e970"}.xi-eraser-o:before{content:"\e971"}.xi-sort-asc:before{content:"\e974"}.xi-lineheight-plus:before{content:"\e974"}.xi-sort-desc:before{content:"\e975"}.xi-lineheight-minus:before{content:"\e975"}.xi-rotate-right:before{content:"\e978"}.xi-rotate-left:before{content:"\e979"}.xi-layout:before{content:"\e988"}.xi-layout-top:before{content:"\e988"}.xi-layout-o:before{content:"\e98e"}.xi-layout-full:before{content:"\e989"}.xi-layout-full-o:before{content:"\e98f"}.xi-layout-snb:before{content:"\e98a"}.xi-layout-top-left:before{content:"\e98a"}.xi-layout-snb-o:before{content:"\e990"}.xi-layout-aside:before{content:"\e98b"}.xi-layout-top-right:before{content:"\e98b"}.xi-layout-aside-o:before{content:"\e991"}.xi-layout-column:before{content:"\e98c"}.xi-layout-top-three:before{content:"\e98c"}.xi-layout-column-o:before{content:"\e992"}.xi-crop:before{content:"\e999"}.xi-border-color:before{content:"\ea39"}.xi-line-style:before{content:"\ea66"}.xi-line-weight:before{content:"\ea67"}.xi-border-all:before{content:"\e987"}.xi-border-bottom:before{content:"\ea32"}.xi-border-clear:before{content:"\ea33"}.xi-border-horizontal:before{content:"\ea45"}.xi-border-inner:before{content:"\ea46"}.xi-border-left:before{content:"\ea49"}.xi-border-outer:before{content:"\ea4f"}.xi-border-right:before{content:"\ea51"}.xi-border-style:before{content:"\ea52"}.xi-border-top:before{content:"\ea54"}.xi-border-vertical:before{content:"\ea5c"}.xi-valign-top:before{content:"\eabf"}.xi-valign-bottom:before{content:"\eabd"}.xi-valign-center:before{content:"\eabe"}.xi-code:before{content:"\ea5d"}.xi-emoticon:before{content:"\ea62"}.xi-emoji:before{content:"\ea62"}.xi-face:before{content:"\ea62"}.xi-link-insert:before{content:"\ea6a"}.xi-link-l:before{content:"\ea6a"}.xi-link-broken:before{content:"\ea68"}.xi-unlink:before{content:"\ea68"}.xi-omega:before{content:"\ea6c"}.xi-opacity:before{content:"\ea6d"}.xi-overscan:before{content:"\ea78"}.xi-paperclip:before{content:"\ea7f"}.xi-transform:before{content:"\eabb"}.xi-power-off:before{content:"\e94c"}.xi-esc:before{content:"\e94f"}.xi-command:before{content:"\e94e"}.xi-alt:before{content:"\e94d"}.xi-tab:before{content:"\eaf8"}.xi-backspace:before{content:"\eac4"}.xi-capslock:before{content:"\ead6"}.xi-watch:before{content:"\e9b5"}.xi-mouse:before{content:"\e9b6"}.xi-sdcard:before{content:"\e9b7"}.xi-usb-drive:before{content:"\e9b8"}.xi-diskette:before{content:"\e9ba"}.xi-print:before{content:"\e9bb"}.xi-social-print:before{content:"\e9bb"}.xi-fax:before{content:"\e9bc"}.xi-webcam:before{content:"\e9cc"}.xi-projector:before{content:"\e9ce"}.xi-presentation:before{content:"\e9cf"}.xi-plug:before{content:"\e9d0"}.xi-speaker:before{content:"\ea60"}.xi-airplay:before{content:"\eac0"}.xi-alarm-clock:before{content:"\eac1"}.xi-alarm-clock-o:before{content:"\eac2"}.xi-alarm-clock-off:before{content:"\eac3"}.xi-battery:before{content:"\eac5"}.xi-battery-full:before{content:"\eac5"}.xi-battery-o:before{content:"\ead0"}.xi-battery-min:before{content:"\ead0"}.xi-battery-10:before{content:"\eac6"}.xi-battery-20:before{content:"\eac7"}.xi-battery-30:before{content:"\eac8"}.xi-battery-40:before{content:"\eac9"}.xi-battery-50:before{content:"\eacb"}.xi-battery-60:before{content:"\eacc"}.xi-battery-70:before{content:"\eacd"}.xi-battery-80:before{content:"\eace"}.xi-battery-90:before{content:"\eacf"}.xi-bluetooth:before{content:"\ead1"}.xi-bluetooth-off:before{content:"\ead2"}.xi-bluetooth-on:before{content:"\ead3"}.xi-bluetooth-search:before{content:"\ead4"}.xi-brightness:before{content:"\ead5"}.xi-clock:before{content:"\ead7"}.xi-clock-o:before{content:"\ead8"}.xi-contrast:before{content:"\ead9"}.xi-desktop:before{content:"\eada"}.xi-monitor:before{content:"\eada"}.xi-laptop:before{content:"\eae9"}.xi-devices:before{content:"\eadb"}.xi-tablet:before{content:"\eaf9"}.xi-mobile:before{content:"\eaed"}.xi-tv:before{content:"\eafb"}.xi-enter:before{content:"\eadc"}.xi-flashlight:before{content:"\eadd"}.xi-flashlight-off:before{content:"\eade"}.xi-flight-off:before{content:"\eadf"}.xi-flight-on:before{content:"\eae0"}.xi-gamepad:before{content:"\eae1"}.xi-gps:before{content:"\eae2"}.xi-gps-none:before{content:"\eae3"}.xi-gps-off:before{content:"\eae4"}.xi-hdd:before{content:"\eae5"}.xi-hdmi:before{content:"\eae6"}.xi-keyboard:before{content:"\eae7"}.xi-keyboard-o:before{content:"\eae8"}.xi-space-bar:before{content:"\eaf7"}.xi-lock-rotation:before{content:"\eaea"}.xi-chip:before{content:"\eaeb"}.xi-chip-o:before{content:"\eaec"}.xi-mouse-pointer:before{content:"\eaee"}.xi-router:before{content:"\eaef"}.xi-wifi-router:before{content:"\eaef"}.xi-router-o:before{content:"\eaf0"}.xi-signal:before{content:"\eaf1"}.xi-signal-1:before{content:"\eaf2"}.xi-signal-2:before{content:"\eaf3"}.xi-signal-3:before{content:"\eaf4"}.xi-signal-4:before{content:"\eaf5"}.xi-signal-none:before{content:"\eaf6"}.xi-touch:before{content:"\eafa"}.xi-usb:before{content:"\eafc"}.xi-wifi:before{content:"\eafd"}.xi-wifi-signal:before{content:"\eafd"}.xi-wifi-signal-mid:before{content:"\eafe"}.xi-wifi-signal-min:before{content:"\eaff"}.xi-wifi-signal-off:before{content:"\eb00"}.xi-chart-bar:before{content:"\e901"}.xi-book:before{content:"\ea34"}.xi-book-o:before{content:"\ea35"}.xi-play:before{content:"\ea3e"}.xi-caret-right:before{content:"\ea3e"}.xi-play-circle:before{content:"\ea40"}.xi-play-circle-o:before{content:"\ea3f"}.xi-pause-circle:before{content:"\ea3d"}.xi-pause-circle-o:before{content:"\ea3c"}.xi-pause:before{content:"\ea3b"}.xi-stop:before{content:"\ea41"}.xi-recording-stop:before{content:"\eb24"}.xi-recording:before{content:"\eb21"}.xi-record:before{content:"\eb21"}.xi-eject:before{content:"\ea42"}.xi-step-backward:before{content:"\ea43"}.xi-step-forward:before{content:"\ea44"}.xi-backward:before{content:"\ea47"}.xi-forward:before{content:"\ea48"}.xi-fast-backward:before{content:"\eb08"}.xi-fast-forward:before{content:"\eb07"}.xi-camera:before{content:"\ea4b"}.xi-camera-o:before{content:"\ea4a"}.xi-videocam:before{content:"\ea4d"}.xi-video-camera:before{content:"\ea4d"}.xi-videocam-o:before{content:"\ea4c"}.xi-image:before{content:"\ea50"}.xi-image-o:before{content:"\ea4e"}.xi-microphone-o:before{content:"\ea56"}.xi-microphone:before{content:"\ea57"}.xi-microphone-off:before{content:"\ea58"}.xi-microphone-slash:before{content:"\ea58"}.xi-volume-mute:before{content:"\ea59"}.xi-volume:before{content:"\ea59"}.xi-volume-down:before{content:"\ea5a"}.xi-volume-min:before{content:"\ea5a"}.xi-volume-up:before{content:"\ea5b"}.xi-volume-max:before{content:"\ea5b"}.xi-volume-off:before{content:"\eb39"}.xi-volume-slash:before{content:"\eb39"}.xi-album:before{content:"\ea61"}.xi-record-play:before{content:"\ea61"}.xi-cd-r:before{content:"\ea61"}.xi-headset:before{content:"\ea64"}.xi-music:before{content:"\ea65"}.xi-chart-pyramid:before{content:"\ea69"}.xi-chart-bar-square:before{content:"\eb01"}.xi-chart-line:before{content:"\eb02"}.xi-chart-pie:before{content:"\eb03"}.xi-chart-pie-o:before{content:"\eb04"}.xi-equalizer:before{content:"\eb05"}.xi-volume-bar:before{content:"\eb05"}.xi-equalizer-thin:before{content:"\ea55"}.xi-exposure:before{content:"\eb06"}.xi-flash:before{content:"\eb09"}.xi-flash-off:before{content:"\eb0a"}.xi-focus-center:before{content:"\eb0b"}.xi-focus-frame:before{content:"\eb0c"}.xi-focus-weak:before{content:"\eb11"}.xi-paper:before{content:"\eb1e"}.xi-paper-o:before{content:"\eb1f"}.xi-library-books:before{content:"\eb14"}.xi-library-books-o:before{content:"\eb16"}.xi-library-image:before{content:"\eb17"}.xi-library-image-o:before{content:"\eb18"}.xi-library-music:before{content:"\eb19"}.xi-library-video:before{content:"\eb1a"}.xi-movie:before{content:"\eb1b"}.xi-movie-o:before{content:"\eb1c"}.xi-pacman:before{content:"\eb1d"}.xi-radio:before{content:"\eb20"}.xi-repeat:before{content:"\eb25"}.xi-repeat-one:before{content:"\eb26"}.xi-shuffle:before{content:"\eb27"}.xi-timer:before{content:"\eb29"}.xi-timer-o:before{content:"\eb2a"}.xi-timer-off-o:before{content:"\eb2f"}.xi-timer-sand:before{content:"\eb30"}.xi-sandwatch-min:before{content:"\eb30"}.xi-timer-sand-o:before{content:"\eb31"}.xi-trending-flat:before{content:"\eb36"}.xi-trending-down:before{content:"\eb33"}.xi-decline:before{content:"\eb33"}.xi-trending-up:before{content:"\eb37"}.xi-rise:before{content:"\eb37"}.xi-tune:before{content:"\eb38"}.xi-map:before{content:"\eb22"}.xi-map-folding:before{content:"\eb22"}.xi-map-o:before{content:"\eb23"}.xi-my-location:before{content:"\eb5d"}.xi-location-arrow:before{content:"\eb58"}.xi-woman:before{content:"\ea2f"}.xi-man:before{content:"\ea30"}.xi-toilet:before{content:"\ea31"}.xi-pregnant-woman:before{content:"\eb61"}.xi-maternity:before{content:"\eb61"}.xi-walk:before{content:"\eb6d"}.xi-walking:before{content:"\eb6d"}.xi-run:before{content:"\eb63"}.xi-wheelchair:before{content:"\eb6e"}.xi-glass:before{content:"\eb28"}.xi-market:before{content:"\eb2b"}.xi-shopping-bag:before{content:"\eb2b"}.xi-pharmacy:before{content:"\eb2c"}.xi-laundry:before{content:"\eb2e"}.xi-florist:before{content:"\eb32"}.xi-hlz:before{content:"\eb34"}.xi-park:before{content:"\eb35"}.xi-airplane:before{content:"\eb3a"}.xi-all:before{content:"\eb3b"}.xi-flight-takeoff:before{content:"\eb3c"}.xi-flight:before{content:"\eb3c"}.xi-flight-land:before{content:"\eb3d"}.xi-bank:before{content:"\eb3e"}.xi-bank-o:before{content:"\eb3e"}.xi-beach:before{content:"\eb3f"}.xi-bicycle:before{content:"\eb40"}.xi-building:before{content:"\eb41"}.xi-bus:before{content:"\eb42"}.xi-business:before{content:"\eb43"}.xi-cafe:before{content:"\eb44"}.xi-cake:before{content:"\eb47"}.xi-car:before{content:"\eb48"}.xi-church:before{content:"\eb49"}.xi-city:before{content:"\eb4a"}.xi-compass:before{content:"\eb4b"}.xi-compass-o:before{content:"\eb4c"}.xi-convenience-store:before{content:"\eb4d"}.xi-directions:before{content:"\eb4e"}.xi-factory:before{content:"\eb4f"}.xi-fitness-center:before{content:"\eb50"}.xi-garden:before{content:"\eb51"}.xi-gas-station:before{content:"\eb52"}.xi-golf:before{content:"\eb53"}.xi-hand-pointing:before{content:"\eb54"}.xi-hospital:before{content:"\eb55"}.xi-hotel:before{content:"\eb56"}.xi-library:before{content:"\eb57"}.xi-maker:before{content:"\eb59"}.xi-marker-circle:before{content:"\eb59"}.xi-marker-plus:before{content:"\eb5b"}.xi-maker-drop:before{content:"\eb5f"}.xi-map-marker:before{content:"\eb5f"}.xi-marker-check:before{content:"\eb5a"}.xi-motorcycle:before{content:"\eb5c"}.xi-navigation:before{content:"\eb5e"}.xi-pool:before{content:"\eb60"}.xi-restaurant:before{content:"\eb62"}.xi-school:before{content:"\eb64"}.xi-ship:before{content:"\eb65"}.xi-spa:before{content:"\eb66"}.xi-stroller:before{content:"\eb67"}.xi-subway:before{content:"\eb68"}.xi-taxi:before{content:"\eb69"}.xi-theater:before{content:"\eb6a"}.xi-film:before{content:"\eb6a"}.xi-traffic:before{content:"\eb6b"}.xi-train:before{content:"\eb6c"}.xi-cart:before{content:"\eb6f"}.xi-cart-o:before{content:"\e9fb"}.xi-cart-add:before{content:"\e9fc"}.xi-cart-remove:before{content:"\e9fd"}.xi-basket:before{content:"\e9fe"}.xi-box:before{content:"\ea01"}.xi-fragile:before{content:"\ea02"}.xi-coupon:before{content:"\ea03"}.xi-shop:before{content:"\ea05"}.xi-gift:before{content:"\eb70"}.xi-present:before{content:"\eb70"}.xi-gift-o:before{content:"\ea3a"}.xi-exchange:before{content:"\ea53"}.xi-barter:before{content:"\ea53"}.xi-yuan:before{content:"\ea6e"}.xi-won:before{content:"\ea6f"}.xi-yen:before{content:"\ea70"}.xi-pound:before{content:"\ea71"}.xi-euro:before{content:"\ea72"}.xi-rial:before{content:"\ea73"}.xi-dollar:before{content:"\ea74"}.xi-peso:before{content:"\ea75"}.xi-rupee:before{content:"\ea76"}.xi-credit-card:before{content:"\ea77"}.xi-money:before{content:"\ea79"}.xi-piggy-bank:before{content:"\ea7a"}.xi-strongbox:before{content:"\ea7b"}.xi-briefcase:before{content:"\ea7c"}.xi-percent:before{content:"\ea7d"}.xi-calculator:before{content:"\ea7e"}.xi-medicine:before{content:"\eb2d"}.xi-receipt:before{content:"\eb71"}.xi-truck:before{content:"\eb72"}.xi-wallet:before{content:"\eb73"}.xi-file:before{content:"\ea94"}.xi-file-o:before{content:"\ea80"}.xi-file-add:before{content:"\ea95"}.xi-file-add-o:before{content:"\ea81"}.xi-file-remove:before{content:"\ea96"}.xi-file-remove-o:before{content:"\ea82"}.xi-file-text:before{content:"\ea97"}.xi-file-text-o:before{content:"\ea83"}.xi-documents:before{content:"\ea98"}.xi-stack-paper:before{content:"\ea98"}.xi-documents-o:before{content:"\ea84"}.xi-file-image:before{content:"\ea99"}.xi-file-image-o:before{content:"\ea85"}.xi-file-video:before{content:"\ea9a"}.xi-file-video-o:before{content:"\ea86"}.xi-file-music:before{content:"\ea9b"}.xi-file-music-o:before{content:"\ea87"}.xi-file-code:before{content:"\ea9c"}.xi-file-code-o:before{content:"\ea88"}.xi-file-zip:before{content:"\ea9d"}.xi-file-zip-o:before{content:"\ea89"}.xi-file-upload:before{content:"\ea9e"}.xi-file-upload-o:before{content:"\ea8a"}.xi-file-download:before{content:"\ea9f"}.xi-file-download-o:before{content:"\ea8b"}.xi-file-check:before{content:"\eaa0"}.xi-file-check-o:before{content:"\ea8c"}.xi-folder:before{content:"\eaa1"}.xi-folder-o:before{content:"\ea8d"}.xi-folder-open:before{content:"\eaa8"}.xi-folder-shared:before{content:"\eb7d"}.xi-folder-zip:before{content:"\eaa7"}.xi-folder-zip-o:before{content:"\ea93"}.xi-folder-add:before{content:"\eaa2"}.xi-folder-add-o:before{content:"\ea8e"}.xi-folder-remove:before{content:"\eaa3"}.xi-folder-remove-o:before{content:"\ea8f"}.xi-folder-check:before{content:"\eaa4"}.xi-folder-check-o:before{content:"\ea90"}.xi-folder-upload:before{content:"\eaa5"}.xi-folder-upload-o:before{content:"\ea91"}.xi-folder-download:before{content:"\eaa6"}.xi-folder-download-o:before{content:"\ea92"}.xi-attachment:before{content:"\eb74"}.xi-cloud:before{content:"\eb75"}.xi-cloud-o:before{content:"\eb78"}.xi-cloud-off:before{content:"\eb79"}.xi-cloud-upload:before{content:"\eb7a"}.xi-cloud-upload-o:before{content:"\eb7b"}.xi-cloud-download:before{content:"\eb76"}.xi-cloud-download-o:before{content:"\eb77"}.xi-upload:before{content:"\eb7e"}.xi-download:before{content:"\eb7c"}.xi-globus:before{content:"\e9d1"}.xi-browser:before{content:"\e9db"}.xi-browser-text:before{content:"\e9dc"}.xi-rss-square:before{content:"\e9e5"}.xi-central-signal:before{content:"\e9e7"}.xi-central-router:before{content:"\e9e8"}.xi-antenna:before{content:"\e9f6"}.xi-barcode:before{content:"\e9ff"}.xi-qr-code:before{content:"\ea00"}.xi-accessibility:before{content:"\eb7f"}.xi-branch:before{content:"\eb80"}.xi-fork:before{content:"\eb85"}.xi-code-fork:before{content:"\eb85"}.xi-pull-requests:before{content:"\eb92"}.xi-merge:before{content:"\eb8b"}.xi-log:before{content:"\eb8a"}.xi-bug:before{content:"\eb81"}.xi-cookie:before{content:"\eb82"}.xi-fingerprint:before{content:"\eb84"}.xi-css3:before{content:"\eb83"}.xi-html5:before{content:"\eb86"}.xi-javascript:before{content:"\eb87"}.xi-csharp:before{content:"\eb88"}.xi-php:before{content:"\eb91"}.xi-python:before{content:"\eb94"}.xi-milestone:before{content:"\eb8c"}.xi-network-company:before{content:"\eb8d"}.xi-network-folder:before{content:"\eb8e"}.xi-network-home:before{content:"\eb8f"}.xi-home-network:before{content:"\eb8f"}.xi-network-public:before{content:"\eb90"}.xi-cloud-network:before{content:"\eb90"}.xi-puzzle:before{content:"\eb93"}.xi-rss:before{content:"\eb95"}.xi-social-rssfeed:before{content:"\eb95"}.xi-server:before{content:"\eb96"}.xi-network-server:before{content:"\eb97"}.xi-sitemap:before{content:"\eb98"}.xi-sitemap-o:before{content:"\eb99"}.xi-spinner-1:before{content:"\ec33"}.xi-spinner-2:before{content:"\ec34"}.xi-spinner-3:before{content:"\ec35"}.xi-spinner-4:before{content:"\ec36"}.xi-spinner-5:before{content:"\ec37"}.xi-full-moon:before{content:"\eb0d"}.xi-fullmoon:before{content:"\eb0d"}.xi-half-moon:before{content:"\eb0e"}.xi-halfmoon:before{content:"\eb0e"}.xi-crescent:before{content:"\eb9b"}.xi-moon:before{content:"\eb0f"}.xi-night:before{content:"\eb10"}.xi-snow-crystal:before{content:"\eb15"}.xi-snow:before{content:"\eb15"}.xi-cloudy:before{content:"\eb9c"}.xi-fog:before{content:"\eb9d"}.xi-foggy:before{content:"\eb9e"}.xi-lightning:before{content:"\eb9f"}.xi-partly-cloudy:before{content:"\eba0"}.xi-pouring:before{content:"\eba1"}.xi-rain:before{content:"\eba1"}.xi-snowy:before{content:"\eba2"}.xi-heavy-snow:before{content:"\eba2"}.xi-sun:before{content:"\eba3"}.xi-sun-o:before{content:"\eba4"}.xi-sunset:before{content:"\eba5"}.xi-sunset-down:before{content:"\eba6"}.xi-sunset-up:before{content:"\eba7"}.xi-thermometer:before{content:"\eba8"}.xi-tint:before{content:"\eba9"}.xi-humidity:before{content:"\eba9"}.xi-tint-o:before{content:"\ebaa"}.xi-tornado:before{content:"\ebab"}.xi-umbrella:before{content:"\ebac"}.xi-umbrella-o:before{content:"\ebad"}.xi-windy:before{content:"\ebae"}.xi-wind:before{content:"\ebae"}.xi-windy-variant:before{content:"\ebaf"}.xi-windsock:before{content:"\eb13"}.xi-cc-cc:before{content:"\eaad"}.xi-cc-by:before{content:"\eaae"}.xi-cc-sa:before{content:"\eaaf"}.xi-cc-nd:before{content:"\eab0"}.xi-cc-nc:before{content:"\eab1"}.xi-cc-nc-eu:before{content:"\eab2"}.xi-cc-nc-jp:before{content:"\eab3"}.xi-cc-remix:before{content:"\eab4"}.xi-cc-pd:before{content:"\eab5"}.xi-cc-sampling:before{content:"\eab6"}.xi-cc-zero:before{content:"\eab7"}.xi-cc-share:before{content:"\eab8"}.xi-copyleft:before{content:"\ebb0"}.xi-copyright:before{content:"\ebb1"}.xi-registered:before{content:"\eaab"}.xi-trademark:before{content:"\eaac"}.xi-500px:before{content:"\ebb2"}.xi-adobe:before{content:"\ebb3"}.xi-amazon:before{content:"\ebb4"}.xi-android:before{content:"\ebb5"}.xi-apple:before{content:"\ebb6"}.xi-beats:before{content:"\ebb7"}.xi-behance:before{content:"\ebb8"}.xi-bing:before{content:"\ebb9"}.xi-bitbucket:before{content:"\ebba"}.xi-blackberry:before{content:"\ebbb"}.xi-blogger:before{content:"\ebbc"}.xi-cc-amex:before{content:"\ebbe"}.xi-cc-discover:before{content:"\ebbf"}.xi-cc-mastercard:before{content:"\ebc0"}.xi-cc-paypal:before{content:"\ebc1"}.xi-cc-stripe:before{content:"\ebc2"}.xi-cc-visa:before{content:"\ebc3"}.xi-chrome:before{content:"\ebc5"}.xi-codepen:before{content:"\ebc6"}.xi-connectdevelop:before{content:"\ebc7"}.xi-d2:before{content:"\ebc8"}.xi-dashcube:before{content:"\ebc9"}.xi-delicious:before{content:"\ebca"}.xi-deviantart:before{content:"\ebcb"}.xi-digg:before{content:"\ebcc"}.xi-disqus:before{content:"\ebcd"}.xi-dribbble:before{content:"\ebce"}.xi-dropbox:before{content:"\ebcf"}.xi-drupal:before{content:"\ebd0"}.xi-edge:before{content:"\ebd1"}.xi-evernote:before{content:"\ebd2"}.xi-facebook:before{content:"\ebd3"}.xi-facebook-messenger:before{content:"\ebd4"}.xi-facebook-official:before{content:"\ebd5"}.xi-feedly:before{content:"\ebd6"}.xi-firefox:before{content:"\ebd7"}.xi-flickr:before{content:"\eaca"}.xi-flickr-square:before{content:"\ebd8"}.xi-foursquare:before{content:"\ebd9"}.xi-ghost:before{content:"\ebda"}.xi-git:before{content:"\ebdb"}.xi-git-symbol:before{content:"\ebdc"}.xi-github:before{content:"\ebdd"}.xi-github-alt:before{content:"\ebde"}.xi-gmail:before{content:"\ebdf"}.xi-google:before{content:"\ebe0"}.xi-google-play:before{content:"\ebe1"}.xi-google-plus:before{content:"\ebe2"}.xi-google-wallet:before{content:"\ebe3"}.xi-gratipay:before{content:"\ebe4"}.xi-hangouts:before{content:"\ebe5"}.xi-hunie:before{content:"\ebe6"}.xi-illustrator:before{content:"\ebe7"}.xi-illustrator-circle:before{content:"\ebe8"}.xi-instagram:before{content:"\ebe9"}.xi-internet-explorer:before{content:"\ebea"}.xi-jira:before{content:"\ebeb"}.xi-joomla:before{content:"\ebec"}.xi-jsfiddle:before{content:"\ebed"}.xi-kakaostory:before{content:"\ebef"}.xi-kakaotalk:before{content:"\ebee"}.xi-kickstarter:before{content:"\ebf0"}.xi-laravel:before{content:"\eb89"}.xi-line:before{content:"\ebf1"}.xi-line-messenger:before{content:"\ebf2"}.xi-linkedin:before{content:"\ebf3"}.xi-linkedin-square:before{content:"\ebf4"}.xi-linux:before{content:"\ebf5"}.xi-magento:before{content:"\ebf6"}.xi-maxcdn:before{content:"\ebf7"}.xi-medium:before{content:"\ebf8"}.xi-naver:before{content:"\ebf9"}.xi-naver-square:before{content:"\ebfa"}.xi-office:before{content:"\ebfb"}.xi-opencart:before{content:"\ebfc"}.xi-opera:before{content:"\ebfd"}.xi-oscommerce:before{content:"\ebfe"}.xi-path:before{content:"\ebff"}.xi-paypal:before{content:"\ec00"}.xi-photoshop:before{content:"\ec01"}.xi-photoshop-circle:before{content:"\ec02"}.xi-pinterest:before{content:"\ec03"}.xi-pinterest-p:before{content:"\ec04"}.xi-pocket:before{content:"\ec05"}.xi-qq:before{content:"\ec06"}.xi-quicktime:before{content:"\ec07"}.xi-reddit:before{content:"\ec08"}.xi-renren:before{content:"\ec09"}.xi-safari:before{content:"\ec0a"}.xi-sellsy:before{content:"\ec0b"}.xi-silverstripe:before{content:"\ebbd"}.xi-simplybuilt:before{content:"\ec0c"}.xi-sketch:before{content:"\ec0d"}.xi-skype:before{content:"\ec0e"}.xi-slack:before{content:"\ec0f"}.xi-slideshare:before{content:"\ec10"}.xi-soundcloud:before{content:"\ec11"}.xi-spotify:before{content:"\ec12"}.xi-stack-exchange:before{content:"\ec13"}.xi-stack-overflow:before{content:"\ec14"}.xi-steam:before{content:"\ec15"}.xi-steam-square:before{content:"\ec16"}.xi-stumbleupon:before{content:"\ec17"}.xi-stumbleupon-circle:before{content:"\ec18"}.xi-telegram:before{content:"\ec19"}.xi-tencent-weibo:before{content:"\ec1a"}.xi-trello:before{content:"\ec1b"}.xi-tumblr:before{content:"\ec1c"}.xi-tumblr-square:before{content:"\ec1d"}.xi-twich:before{content:"\ec1e"}.xi-twitter:before{content:"\ec1f"}.xi-ubercart:before{content:"\ec20"}.xi-ubuntu:before{content:"\ec21"}.xi-ubuntu-circle:before{content:"\ec22"}.xi-vimeo:before{content:"\ec23"}.xi-vine:before{content:"\ec24"}.xi-vk:before{content:"\ec25"}.xi-wechat:before{content:"\ec26"}.xi-whatsapp:before{content:"\ec27"}.xi-wikipedia:before{content:"\ec28"}.xi-windows:before{content:"\ec29"}.xi-wordpress:before{content:"\ec2a"}.xi-wordpress-official:before{content:"\ec2b"}.xi-xe:before{content:"\ec2c"}.xi-xing:before{content:"\ec2d"}.xi-xpressengine:before{content:"\ec2e"}.xi-yahoo:before{content:"\ec2f"}.xi-yelp:before{content:"\ec30"}.xi-youtube:before{content:"\ec31"}.xi-youtube-play:before{content:"\ec32"}.xi-x{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.xi-2x{font-size:2em}.xi-3x{font-size:3em}.xi-4x{font-size:4em}.xi-5x{font-size:5em}.xi-spin{-webkit-animation:xi-spin 2s infinite linear;animation:xi-spin 2s infinite linear}@-webkit-keyframes xi-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes xi-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.xi-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.xi-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);transform:rotate(180deg)}.xi-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);transform:rotate(270deg)}.xi-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0);-webkit-transform:scale(-1,1);transform:scale(-1,1)}.xi-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:scale(1,-1);transform:scale(1,-1)}:root .xi-flip-horizontal,:root .xi-flip-vertical,:root .xi-rotate-180,:root .xi-rotate-270,:root .xi-rotate-90{-webkit-filter:none;filter:none}.xi-fw{width:1.28571em;text-align:center}.xi-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.xi-ul>li{position:relative}.xi-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.xi-li.xi-lg{left:-1.85714em}.xi-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right;margin-right:.3em}.pull-left{float:left;margin-right:.3em} \ No newline at end of file diff --git a/html/mobile/include/footer.html b/html/mobile/include/footer.html new file mode 100644 index 0000000..e22a852 --- /dev/null +++ b/html/mobile/include/footer.html @@ -0,0 +1,18 @@ +
+ +
diff --git a/html/mobile/include/header.html b/html/mobile/include/header.html new file mode 100644 index 0000000..a5d77ee --- /dev/null +++ b/html/mobile/include/header.html @@ -0,0 +1,85 @@ + + +
+

팔네트웍스

+ +
본문 바로가기
+ +
+ + + + + +
+
\ No newline at end of file diff --git a/html/mobile/index.html b/html/mobile/index.html new file mode 100644 index 0000000..9193fc8 --- /dev/null +++ b/html/mobile/index.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +PAL Networks + + + + + + + + + + + +
+ddd +
+ + + + + + + + + + diff --git a/html/mobile/js/common.js b/html/mobile/js/common.js new file mode 100644 index 0000000..d1d9869 --- /dev/null +++ b/html/mobile/js/common.js @@ -0,0 +1,307 @@ + +$(function(){ + new WOW().init(); + AOS.init(); + + //$('[data-aos]').each(function(){ $(this).addClass("aos-init"); }); + new fullpage('#fullpage', { + licenseKey: '13F1F552-6ACE43B7-95262729-9E0B4778', + //options here + anchors:['home', 'works', 'mobility','skills', 'news'], + autoScrolling:true, + scrollHorizontally: true, + navigation:true, + navigationPosition:'right', + scrollBar: true, + afterLoad: function(origin, destination) { + if(destination.index === 0) { + $('.topBtn').css('display','none'); + } + + if(destination.anchor === 'skills' || destination.anchor === 'news') { + $('.gnb_1da').css('color', '#000'); + $('.wh_logo').css('display', 'none'); + $('.color_logo').css('display', 'block'); + $('#hd').on('mouseenter', function () { + $('.wh_logo').css('display', 'block'); + $('.color_logo').css('display', 'none'); + }); + $('#hd').on('mouseleave', function () { + $('.wh_logo').css('display', 'none'); + $('.color_logo').css('display', 'block'); + $('.gnb_1da').css('color', '#000'); + }); + } else { + $('.gnb_1da').css('color', '#fff'); + } + }, + onLeave: function(origin, destination){ + new WOW().init(); + console.log(destination) + if(destination.anchor === 'skills' || destination.anchor === 'news') { + $('.gnb_1da').css('color', '#fff'); + } else { + $('.gnb_1da').css('color', '#fff'); + $('.wh_logo').css('display', 'block'); + $('.color_logo').css('display', 'none'); + $('#hd').on('mouseenter', function () { + $('.wh_logo').css('display', 'block'); + $('.color_logo').css('display', 'none'); + }); + $('#hd').on('mouseleave', function () { + $('.wh_logo').css('display', 'block'); + $('.color_logo').css('display', 'none'); + $('.gnb_1da').css('color', '#fff'); + }); + } + }, + }); + + //methods + $.fn.fullpage.setAllowScrolling(false); +}); + + +$(function(){ + new Swiper('.swiper-container'); + const swiper = new Swiper('.swiper-container', { + //기본 셋팅 + //방향 셋팅 vertical 수직, horizontal 수평 설정이 없으면 수평 + direction: 'horizontal', + //한번에 보여지는 페이지 숫자 + slidesPerView: 4, + //페이지와 페이지 사이의 간격 + spaceBetween: 100, + //드레그 기능 true 사용가능 false 사용불가 + debugger: true, + //마우스 휠기능 true 사용가능 false 사용불가 + mousewheel: false, + //반복 기능 true 사용가능 false 사용불가 + loop: true, + //선택된 슬라이드를 중심으로 true 사용가능 false 사용불가 + centeredSlides: true, + // 페이지 전환효과 slidesPerView효과와 같이 사용 불가 + // effect: 'fade', + //자동 스크를링 + autoplay: { + //시간 1000 이 1초 + delay: 2500, + disableOnInteraction: false, + }, + //페이징 + pagination: { + //페이지 기능 + el: '.swiper-pagination', + //클릭 가능여부 + clickable: true, + }, + //방향표 + navigation: { + //다음페이지 설정 + nextEl: '.swiper-button-next', + //이전페이지 설정 + prevEl: '.swiper-button-prev', + }, + }); + +}); + + +$(function(){ + + "use strict"; + + var canvas = document.getElementById('canvas'), + ctx = canvas.getContext('2d'), + w = canvas.width = window.innerWidth, + h = canvas.height = window.innerHeight, + + hue = 217, + stars = [], + count = 0, + maxStars = 1000; + + // Thanks @jackrugile for the performance tip! https://codepen.io/jackrugile/pen/BjBGoM + // Cache gradient + var canvas2 = document.createElement('canvas'), + ctx2 = canvas2.getContext('2d'); + canvas2.width = 100; + canvas2.height = 100; + var half = canvas2.width/2, + gradient2 = ctx2.createRadialGradient(half, half, 0, half, half, half); + gradient2.addColorStop(0.025, '#fff'); + gradient2.addColorStop(0.1, 'hsl(' + hue + ', 61%, 33%)'); + gradient2.addColorStop(0.25, 'hsl(' + hue + ', 64%, 6%)'); + gradient2.addColorStop(1, 'transparent'); + + ctx2.fillStyle = gradient2; + ctx2.beginPath(); + ctx2.arc(half, half, half, 0, Math.PI * 2); + ctx2.fill(); + + // End cache + + function random(min, max) { + if (arguments.length < 2) { + max = min; + min = 0; + } + + if (min > max) { + var hold = max; + max = min; + min = hold; + } + + return Math.floor(Math.random() * (max - min + 1)) + min; + } + + function maxOrbit(x,y) { + var max = Math.max(x,y), + diameter = Math.round(Math.sqrt(max*max + max*max)); + return diameter/2; + } + + var Star = function() { + + this.orbitRadius = random(maxOrbit(w,h)); + this.radius = random(60, this.orbitRadius) / 12; + this.orbitX = w / 2; + this.orbitY = h / 2; + this.timePassed = random(0, maxStars); + this.speed = random(this.orbitRadius) / 1000000; + this.alpha = random(2, 10) / 10; + + count++; + stars[count] = this; + } + + Star.prototype.draw = function() { + var x = Math.sin(this.timePassed) * this.orbitRadius + this.orbitX, + y = Math.cos(this.timePassed) * this.orbitRadius + this.orbitY, + twinkle = random(10); + + if (twinkle === 1 && this.alpha > 0) { + this.alpha -= 0.05; + } else if (twinkle === 2 && this.alpha < 1) { + this.alpha += 0.05; + } + + ctx.globalAlpha = this.alpha; + ctx.drawImage(canvas2, x - this.radius / 2, y - this.radius / 2, this.radius, this.radius); + this.timePassed += this.speed; + } + + for (var i = 0; i < maxStars; i++) { + new Star(); + } + + function animation() { + ctx.globalCompositeOperation = 'source-over'; + ctx.globalAlpha = 0.8; + ctx.fillStyle = 'hsla(' + hue + ', 64%, 6%, 1)'; + ctx.fillRect(0, 0, w, h) + + ctx.globalCompositeOperation = 'lighter'; + for (var i = 1, l = stars.length; i < l; i++) { + stars[i].draw(); + }; + + window.requestAnimationFrame(animation); + } + + animation(); + + +}); + +$(function() { + $('.topBtn').css('display','none'); + $(window).scroll(function() { if ($(this).scrollTop() > 300) { + $('.topBtn').fadeIn(); + } else { + $('.topBtn').fadeOut(); + } + }); + $('.topBtn').click(function(){ + $('html, body').animate({scrollTop:0},300); + }); +}); + + +$(function(){ + new Swiper('.swiper-container-history'); + const swiper = new Swiper('.swiper-container-history', { + //기본 셋팅 + direction: 'horizontal', + slidesPerView: 1, // 슬라이드를 한번에 3개를 보여준다 + slidesPerGroup :1, // 그룹으로 묶을 수, slidesPerView 와 같은 값을 지정하는게 좋음 + spaceBetween: 100, // 슬라이드간 padding 값 30px 씩 떨어뜨려줌 + + // 그룹수가 맞지 않을 경우 빈칸으로 메우기 + // 3개가 나와야 되는데 1개만 있다면 2개는 빈칸으로 채워서 3개를 만듬 + loopFillGroupWithBlank : true, + + loop: true, + autoplay: false, + //방향표 + navigation: { + //다음페이지 설정 + nextEl: '.swiper-button-next', + //이전페이지 설정 + prevEl: '.swiper-button-prev', + }, + }); + +}); + +$(function(){ + $('ul.tabs li').click(function(){ + var tab_id = $(this).attr('data-tab'); + + $('ul.tabs li').removeClass('current'); + $('.tab-content').removeClass('current'); + + $(this).addClass('current'); + $("#"+tab_id).addClass('current'); + AOS.refresh(); + }) +}); + +$(function(){ + new Swiper('.swiper-container-work'); + const swiper = new Swiper('.swiper-container-work', { + //기본 셋팅 + //방향 셋팅 vertical 수직, horizontal 수평 설정이 없으면 수평 + direction: 'horizontal', + //한번에 보여지는 페이지 숫자 + slidesPerView: 3, + //페이지와 페이지 사이의 간격 + spaceBetween: 10, + //드레그 기능 true 사용가능 false 사용불가 + debugger: true, + //마우스 휠기능 true 사용가능 false 사용불가 + mousewheel: false, + //반복 기능 true 사용가능 false 사용불가 + loop: true, + //선택된 슬라이드를 중심으로 true 사용가능 false 사용불가 + centeredSlides: true, + // 페이지 전환효과 slidesPerView효과와 같이 사용 불가 + // effect: 'fade', + //자동 스크를링 + speed : 1000, // 슬라이드 속도 2초 + autoplay: { + //시간 1000 이 1초 + delay: 3000, + disableOnInteraction: false, + }, + //방향표 + navigation: { + //다음페이지 설정 + nextEl: '.swiper-button-next', + //이전페이지 설정 + prevEl: '.swiper-button-prev', + }, + }); + +}); \ No newline at end of file diff --git a/html/mobile/js/jquery-3.6.0.min.js b/html/mobile/js/jquery-3.6.0.min.js new file mode 100644 index 0000000..c4c6022 --- /dev/null +++ b/html/mobile/js/jquery-3.6.0.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 { + if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject$1(src[key]) && isObject$1(target[key]) && Object.keys(src[key]).length > 0) { + extend$1(target[key], src[key]); + } + }); + } + + const ssrDocument = { + body: {}, + + addEventListener() {}, + + removeEventListener() {}, + + activeElement: { + blur() {}, + + nodeName: '' + }, + + querySelector() { + return null; + }, + + querySelectorAll() { + return []; + }, + + getElementById() { + return null; + }, + + createEvent() { + return { + initEvent() {} + + }; + }, + + createElement() { + return { + children: [], + childNodes: [], + style: {}, + + setAttribute() {}, + + getElementsByTagName() { + return []; + } + + }; + }, + + createElementNS() { + return {}; + }, + + importNode() { + return null; + }, + + location: { + hash: '', + host: '', + hostname: '', + href: '', + origin: '', + pathname: '', + protocol: '', + search: '' + } + }; + + function getDocument() { + const doc = typeof document !== 'undefined' ? document : {}; + extend$1(doc, ssrDocument); + return doc; + } + + const ssrWindow = { + document: ssrDocument, + navigator: { + userAgent: '' + }, + location: { + hash: '', + host: '', + hostname: '', + href: '', + origin: '', + pathname: '', + protocol: '', + search: '' + }, + history: { + replaceState() {}, + + pushState() {}, + + go() {}, + + back() {} + + }, + CustomEvent: function CustomEvent() { + return this; + }, + + addEventListener() {}, + + removeEventListener() {}, + + getComputedStyle() { + return { + getPropertyValue() { + return ''; + } + + }; + }, + + Image() {}, + + Date() {}, + + screen: {}, + + setTimeout() {}, + + clearTimeout() {}, + + matchMedia() { + return {}; + }, + + requestAnimationFrame(callback) { + if (typeof setTimeout === 'undefined') { + callback(); + return null; + } + + return setTimeout(callback, 0); + }, + + cancelAnimationFrame(id) { + if (typeof setTimeout === 'undefined') { + return; + } + + clearTimeout(id); + } + + }; + + function getWindow() { + const win = typeof window !== 'undefined' ? window : {}; + extend$1(win, ssrWindow); + return win; + } + + /** + * Dom7 4.0.4 + * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API + * https://framework7.io/docs/dom7.html + * + * Copyright 2022, Vladimir Kharlampidi + * + * Licensed under MIT + * + * Released on: January 11, 2022 + */ + /* eslint-disable no-proto */ + + function makeReactive(obj) { + const proto = obj.__proto__; + Object.defineProperty(obj, '__proto__', { + get() { + return proto; + }, + + set(value) { + proto.__proto__ = value; + } + + }); + } + + class Dom7 extends Array { + constructor(items) { + if (typeof items === 'number') { + super(items); + } else { + super(...(items || [])); + makeReactive(this); + } + } + + } + + function arrayFlat(arr) { + if (arr === void 0) { + arr = []; + } + + const res = []; + arr.forEach(el => { + if (Array.isArray(el)) { + res.push(...arrayFlat(el)); + } else { + res.push(el); + } + }); + return res; + } + + function arrayFilter(arr, callback) { + return Array.prototype.filter.call(arr, callback); + } + + function arrayUnique(arr) { + const uniqueArray = []; + + for (let i = 0; i < arr.length; i += 1) { + if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]); + } + + return uniqueArray; + } + + + function qsa(selector, context) { + if (typeof selector !== 'string') { + return [selector]; + } + + const a = []; + const res = context.querySelectorAll(selector); + + for (let i = 0; i < res.length; i += 1) { + a.push(res[i]); + } + + return a; + } + + function $(selector, context) { + const window = getWindow(); + const document = getDocument(); + let arr = []; + + if (!context && selector instanceof Dom7) { + return selector; + } + + if (!selector) { + return new Dom7(arr); + } + + if (typeof selector === 'string') { + const html = selector.trim(); + + if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) { + let toCreate = 'div'; + if (html.indexOf(' c.split(' '))); + this.forEach(el => { + el.classList.add(...classNames); + }); + return this; + } + + function removeClass() { + for (var _len2 = arguments.length, classes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + classes[_key2] = arguments[_key2]; + } + + const classNames = arrayFlat(classes.map(c => c.split(' '))); + this.forEach(el => { + el.classList.remove(...classNames); + }); + return this; + } + + function toggleClass() { + for (var _len3 = arguments.length, classes = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { + classes[_key3] = arguments[_key3]; + } + + const classNames = arrayFlat(classes.map(c => c.split(' '))); + this.forEach(el => { + classNames.forEach(className => { + el.classList.toggle(className); + }); + }); + } + + function hasClass() { + for (var _len4 = arguments.length, classes = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { + classes[_key4] = arguments[_key4]; + } + + const classNames = arrayFlat(classes.map(c => c.split(' '))); + return arrayFilter(this, el => { + return classNames.filter(className => el.classList.contains(className)).length > 0; + }).length > 0; + } + + function attr(attrs, value) { + if (arguments.length === 1 && typeof attrs === 'string') { + // Get attr + if (this[0]) return this[0].getAttribute(attrs); + return undefined; + } // Set attrs + + + for (let i = 0; i < this.length; i += 1) { + if (arguments.length === 2) { + // String + this[i].setAttribute(attrs, value); + } else { + // Object + for (const attrName in attrs) { + this[i][attrName] = attrs[attrName]; + this[i].setAttribute(attrName, attrs[attrName]); + } + } + } + + return this; + } + + function removeAttr(attr) { + for (let i = 0; i < this.length; i += 1) { + this[i].removeAttribute(attr); + } + + return this; + } + + function transform(transform) { + for (let i = 0; i < this.length; i += 1) { + this[i].style.transform = transform; + } + + return this; + } + + function transition$1(duration) { + for (let i = 0; i < this.length; i += 1) { + this[i].style.transitionDuration = typeof duration !== 'string' ? `${duration}ms` : duration; + } + + return this; + } + + function on() { + for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { + args[_key5] = arguments[_key5]; + } + + let [eventType, targetSelector, listener, capture] = args; + + if (typeof args[1] === 'function') { + [eventType, listener, capture] = args; + targetSelector = undefined; + } + + if (!capture) capture = false; + + function handleLiveEvent(e) { + const target = e.target; + if (!target) return; + const eventData = e.target.dom7EventData || []; + + if (eventData.indexOf(e) < 0) { + eventData.unshift(e); + } + + if ($(target).is(targetSelector)) listener.apply(target, eventData);else { + const parents = $(target).parents(); // eslint-disable-line + + for (let k = 0; k < parents.length; k += 1) { + if ($(parents[k]).is(targetSelector)) listener.apply(parents[k], eventData); + } + } + } + + function handleEvent(e) { + const eventData = e && e.target ? e.target.dom7EventData || [] : []; + + if (eventData.indexOf(e) < 0) { + eventData.unshift(e); + } + + listener.apply(this, eventData); + } + + const events = eventType.split(' '); + let j; + + for (let i = 0; i < this.length; i += 1) { + const el = this[i]; + + if (!targetSelector) { + for (j = 0; j < events.length; j += 1) { + const event = events[j]; + if (!el.dom7Listeners) el.dom7Listeners = {}; + if (!el.dom7Listeners[event]) el.dom7Listeners[event] = []; + el.dom7Listeners[event].push({ + listener, + proxyListener: handleEvent + }); + el.addEventListener(event, handleEvent, capture); + } + } else { + // Live events + for (j = 0; j < events.length; j += 1) { + const event = events[j]; + if (!el.dom7LiveListeners) el.dom7LiveListeners = {}; + if (!el.dom7LiveListeners[event]) el.dom7LiveListeners[event] = []; + el.dom7LiveListeners[event].push({ + listener, + proxyListener: handleLiveEvent + }); + el.addEventListener(event, handleLiveEvent, capture); + } + } + } + + return this; + } + + function off() { + for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { + args[_key6] = arguments[_key6]; + } + + let [eventType, targetSelector, listener, capture] = args; + + if (typeof args[1] === 'function') { + [eventType, listener, capture] = args; + targetSelector = undefined; + } + + if (!capture) capture = false; + const events = eventType.split(' '); + + for (let i = 0; i < events.length; i += 1) { + const event = events[i]; + + for (let j = 0; j < this.length; j += 1) { + const el = this[j]; + let handlers; + + if (!targetSelector && el.dom7Listeners) { + handlers = el.dom7Listeners[event]; + } else if (targetSelector && el.dom7LiveListeners) { + handlers = el.dom7LiveListeners[event]; + } + + if (handlers && handlers.length) { + for (let k = handlers.length - 1; k >= 0; k -= 1) { + const handler = handlers[k]; + + if (listener && handler.listener === listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } else if (!listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } + } + } + } + } + + return this; + } + + function trigger() { + const window = getWindow(); + + for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { + args[_key9] = arguments[_key9]; + } + + const events = args[0].split(' '); + const eventData = args[1]; + + for (let i = 0; i < events.length; i += 1) { + const event = events[i]; + + for (let j = 0; j < this.length; j += 1) { + const el = this[j]; + + if (window.CustomEvent) { + const evt = new window.CustomEvent(event, { + detail: eventData, + bubbles: true, + cancelable: true + }); + el.dom7EventData = args.filter((data, dataIndex) => dataIndex > 0); + el.dispatchEvent(evt); + el.dom7EventData = []; + delete el.dom7EventData; + } + } + } + + return this; + } + + function transitionEnd$1(callback) { + const dom = this; + + function fireCallBack(e) { + if (e.target !== this) return; + callback.call(this, e); + dom.off('transitionend', fireCallBack); + } + + if (callback) { + dom.on('transitionend', fireCallBack); + } + + return this; + } + + function outerWidth(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + const styles = this.styles(); + return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left')); + } + + return this[0].offsetWidth; + } + + return null; + } + + function outerHeight(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + const styles = this.styles(); + return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom')); + } + + return this[0].offsetHeight; + } + + return null; + } + + function offset() { + if (this.length > 0) { + const window = getWindow(); + const document = getDocument(); + const el = this[0]; + const box = el.getBoundingClientRect(); + const body = document.body; + const clientTop = el.clientTop || body.clientTop || 0; + const clientLeft = el.clientLeft || body.clientLeft || 0; + const scrollTop = el === window ? window.scrollY : el.scrollTop; + const scrollLeft = el === window ? window.scrollX : el.scrollLeft; + return { + top: box.top + scrollTop - clientTop, + left: box.left + scrollLeft - clientLeft + }; + } + + return null; + } + + function styles() { + const window = getWindow(); + if (this[0]) return window.getComputedStyle(this[0], null); + return {}; + } + + function css(props, value) { + const window = getWindow(); + let i; + + if (arguments.length === 1) { + if (typeof props === 'string') { + // .css('width') + if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(props); + } else { + // .css({ width: '100px' }) + for (i = 0; i < this.length; i += 1) { + for (const prop in props) { + this[i].style[prop] = props[prop]; + } + } + + return this; + } + } + + if (arguments.length === 2 && typeof props === 'string') { + // .css('width', '100px') + for (i = 0; i < this.length; i += 1) { + this[i].style[props] = value; + } + + return this; + } + + return this; + } + + function each(callback) { + if (!callback) return this; + this.forEach((el, index) => { + callback.apply(el, [el, index]); + }); + return this; + } + + function filter(callback) { + const result = arrayFilter(this, callback); + return $(result); + } + + function html(html) { + if (typeof html === 'undefined') { + return this[0] ? this[0].innerHTML : null; + } + + for (let i = 0; i < this.length; i += 1) { + this[i].innerHTML = html; + } + + return this; + } + + function text(text) { + if (typeof text === 'undefined') { + return this[0] ? this[0].textContent.trim() : null; + } + + for (let i = 0; i < this.length; i += 1) { + this[i].textContent = text; + } + + return this; + } + + function is(selector) { + const window = getWindow(); + const document = getDocument(); + const el = this[0]; + let compareWith; + let i; + if (!el || typeof selector === 'undefined') return false; + + if (typeof selector === 'string') { + if (el.matches) return el.matches(selector); + if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector); + if (el.msMatchesSelector) return el.msMatchesSelector(selector); + compareWith = $(selector); + + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) return true; + } + + return false; + } + + if (selector === document) { + return el === document; + } + + if (selector === window) { + return el === window; + } + + if (selector.nodeType || selector instanceof Dom7) { + compareWith = selector.nodeType ? [selector] : selector; + + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) return true; + } + + return false; + } + + return false; + } + + function index() { + let child = this[0]; + let i; + + if (child) { + i = 0; // eslint-disable-next-line + + while ((child = child.previousSibling) !== null) { + if (child.nodeType === 1) i += 1; + } + + return i; + } + + return undefined; + } + + function eq(index) { + if (typeof index === 'undefined') return this; + const length = this.length; + + if (index > length - 1) { + return $([]); + } + + if (index < 0) { + const returnIndex = length + index; + if (returnIndex < 0) return $([]); + return $([this[returnIndex]]); + } + + return $([this[index]]); + } + + function append() { + let newChild; + const document = getDocument(); + + for (let k = 0; k < arguments.length; k += 1) { + newChild = k < 0 || arguments.length <= k ? undefined : arguments[k]; + + for (let i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + const tempDiv = document.createElement('div'); + tempDiv.innerHTML = newChild; + + while (tempDiv.firstChild) { + this[i].appendChild(tempDiv.firstChild); + } + } else if (newChild instanceof Dom7) { + for (let j = 0; j < newChild.length; j += 1) { + this[i].appendChild(newChild[j]); + } + } else { + this[i].appendChild(newChild); + } + } + } + + return this; + } + + function prepend(newChild) { + const document = getDocument(); + let i; + let j; + + for (i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + const tempDiv = document.createElement('div'); + tempDiv.innerHTML = newChild; + + for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { + this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); + } + } else if (newChild instanceof Dom7) { + for (j = 0; j < newChild.length; j += 1) { + this[i].insertBefore(newChild[j], this[i].childNodes[0]); + } + } else { + this[i].insertBefore(newChild, this[i].childNodes[0]); + } + } + + return this; + } + + function next(selector) { + if (this.length > 0) { + if (selector) { + if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { + return $([this[0].nextElementSibling]); + } + + return $([]); + } + + if (this[0].nextElementSibling) return $([this[0].nextElementSibling]); + return $([]); + } + + return $([]); + } + + function nextAll(selector) { + const nextEls = []; + let el = this[0]; + if (!el) return $([]); + + while (el.nextElementSibling) { + const next = el.nextElementSibling; // eslint-disable-line + + if (selector) { + if ($(next).is(selector)) nextEls.push(next); + } else nextEls.push(next); + + el = next; + } + + return $(nextEls); + } + + function prev(selector) { + if (this.length > 0) { + const el = this[0]; + + if (selector) { + if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { + return $([el.previousElementSibling]); + } + + return $([]); + } + + if (el.previousElementSibling) return $([el.previousElementSibling]); + return $([]); + } + + return $([]); + } + + function prevAll(selector) { + const prevEls = []; + let el = this[0]; + if (!el) return $([]); + + while (el.previousElementSibling) { + const prev = el.previousElementSibling; // eslint-disable-line + + if (selector) { + if ($(prev).is(selector)) prevEls.push(prev); + } else prevEls.push(prev); + + el = prev; + } + + return $(prevEls); + } + + function parent(selector) { + const parents = []; // eslint-disable-line + + for (let i = 0; i < this.length; i += 1) { + if (this[i].parentNode !== null) { + if (selector) { + if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode); + } else { + parents.push(this[i].parentNode); + } + } + } + + return $(parents); + } + + function parents(selector) { + const parents = []; // eslint-disable-line + + for (let i = 0; i < this.length; i += 1) { + let parent = this[i].parentNode; // eslint-disable-line + + while (parent) { + if (selector) { + if ($(parent).is(selector)) parents.push(parent); + } else { + parents.push(parent); + } + + parent = parent.parentNode; + } + } + + return $(parents); + } + + function closest(selector) { + let closest = this; // eslint-disable-line + + if (typeof selector === 'undefined') { + return $([]); + } + + if (!closest.is(selector)) { + closest = closest.parents(selector).eq(0); + } + + return closest; + } + + function find(selector) { + const foundElements = []; + + for (let i = 0; i < this.length; i += 1) { + const found = this[i].querySelectorAll(selector); + + for (let j = 0; j < found.length; j += 1) { + foundElements.push(found[j]); + } + } + + return $(foundElements); + } + + function children(selector) { + const children = []; // eslint-disable-line + + for (let i = 0; i < this.length; i += 1) { + const childNodes = this[i].children; + + for (let j = 0; j < childNodes.length; j += 1) { + if (!selector || $(childNodes[j]).is(selector)) { + children.push(childNodes[j]); + } + } + } + + return $(children); + } + + function remove() { + for (let i = 0; i < this.length; i += 1) { + if (this[i].parentNode) this[i].parentNode.removeChild(this[i]); + } + + return this; + } + + const Methods = { + addClass, + removeClass, + hasClass, + toggleClass, + attr, + removeAttr, + transform, + transition: transition$1, + on, + off, + trigger, + transitionEnd: transitionEnd$1, + outerWidth, + outerHeight, + styles, + offset, + css, + each, + html, + text, + is, + index, + eq, + append, + prepend, + next, + nextAll, + prev, + prevAll, + parent, + parents, + closest, + find, + children, + filter, + remove + }; + Object.keys(Methods).forEach(methodName => { + Object.defineProperty($.fn, methodName, { + value: Methods[methodName], + writable: true + }); + }); + + function deleteProps(obj) { + const object = obj; + Object.keys(object).forEach(key => { + try { + object[key] = null; + } catch (e) {// no getter for object + } + + try { + delete object[key]; + } catch (e) {// something got wrong + } + }); + } + + function nextTick(callback, delay) { + if (delay === void 0) { + delay = 0; + } + + return setTimeout(callback, delay); + } + + function now() { + return Date.now(); + } + + function getComputedStyle$1(el) { + const window = getWindow(); + let style; + + if (window.getComputedStyle) { + style = window.getComputedStyle(el, null); + } + + if (!style && el.currentStyle) { + style = el.currentStyle; + } + + if (!style) { + style = el.style; + } + + return style; + } + + function getTranslate(el, axis) { + if (axis === void 0) { + axis = 'x'; + } + + const window = getWindow(); + let matrix; + let curTransform; + let transformMatrix; + const curStyle = getComputedStyle$1(el); + + if (window.WebKitCSSMatrix) { + curTransform = curStyle.transform || curStyle.webkitTransform; + + if (curTransform.split(',').length > 6) { + curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', '); + } // Some old versions of Webkit choke when 'none' is passed; pass + // empty string instead in this case + + + transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); + } else { + transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); + matrix = transformMatrix.toString().split(','); + } + + if (axis === 'x') { + // Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41; // Crazy IE10 Matrix + else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); // Normal Browsers + else curTransform = parseFloat(matrix[4]); + } + + if (axis === 'y') { + // Latest Chrome and webkits Fix + if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42; // Crazy IE10 Matrix + else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); // Normal Browsers + else curTransform = parseFloat(matrix[5]); + } + + return curTransform || 0; + } + + function isObject(o) { + return typeof o === 'object' && o !== null && o.constructor && Object.prototype.toString.call(o).slice(8, -1) === 'Object'; + } + + function isNode(node) { + // eslint-disable-next-line + if (typeof window !== 'undefined' && typeof window.HTMLElement !== 'undefined') { + return node instanceof HTMLElement; + } + + return node && (node.nodeType === 1 || node.nodeType === 11); + } + + function extend() { + const to = Object(arguments.length <= 0 ? undefined : arguments[0]); + const noExtend = ['__proto__', 'constructor', 'prototype']; + + for (let i = 1; i < arguments.length; i += 1) { + const nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i]; + + if (nextSource !== undefined && nextSource !== null && !isNode(nextSource)) { + const keysArray = Object.keys(Object(nextSource)).filter(key => noExtend.indexOf(key) < 0); + + for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { + const nextKey = keysArray[nextIndex]; + const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + + if (desc !== undefined && desc.enumerable) { + if (isObject(to[nextKey]) && isObject(nextSource[nextKey])) { + if (nextSource[nextKey].__swiper__) { + to[nextKey] = nextSource[nextKey]; + } else { + extend(to[nextKey], nextSource[nextKey]); + } + } else if (!isObject(to[nextKey]) && isObject(nextSource[nextKey])) { + to[nextKey] = {}; + + if (nextSource[nextKey].__swiper__) { + to[nextKey] = nextSource[nextKey]; + } else { + extend(to[nextKey], nextSource[nextKey]); + } + } else { + to[nextKey] = nextSource[nextKey]; + } + } + } + } + } + + return to; + } + + function setCSSProperty(el, varName, varValue) { + el.style.setProperty(varName, varValue); + } + + function animateCSSModeScroll(_ref) { + let { + swiper, + targetPosition, + side + } = _ref; + const window = getWindow(); + const startPosition = -swiper.translate; + let startTime = null; + let time; + const duration = swiper.params.speed; + swiper.wrapperEl.style.scrollSnapType = 'none'; + window.cancelAnimationFrame(swiper.cssModeFrameID); + const dir = targetPosition > startPosition ? 'next' : 'prev'; + + const isOutOfBound = (current, target) => { + return dir === 'next' && current >= target || dir === 'prev' && current <= target; + }; + + const animate = () => { + time = new Date().getTime(); + + if (startTime === null) { + startTime = time; + } + + const progress = Math.max(Math.min((time - startTime) / duration, 1), 0); + const easeProgress = 0.5 - Math.cos(progress * Math.PI) / 2; + let currentPosition = startPosition + easeProgress * (targetPosition - startPosition); + + if (isOutOfBound(currentPosition, targetPosition)) { + currentPosition = targetPosition; + } + + swiper.wrapperEl.scrollTo({ + [side]: currentPosition + }); + + if (isOutOfBound(currentPosition, targetPosition)) { + swiper.wrapperEl.style.overflow = 'hidden'; + swiper.wrapperEl.style.scrollSnapType = ''; + setTimeout(() => { + swiper.wrapperEl.style.overflow = ''; + swiper.wrapperEl.scrollTo({ + [side]: currentPosition + }); + }); + window.cancelAnimationFrame(swiper.cssModeFrameID); + return; + } + + swiper.cssModeFrameID = window.requestAnimationFrame(animate); + }; + + animate(); + } + + let support; + + function calcSupport() { + const window = getWindow(); + const document = getDocument(); + return { + smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style, + touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch), + passiveListener: function checkPassiveListener() { + let supportsPassive = false; + + try { + const opts = Object.defineProperty({}, 'passive', { + // eslint-disable-next-line + get() { + supportsPassive = true; + } + + }); + window.addEventListener('testPassiveListener', null, opts); + } catch (e) {// No support + } + + return supportsPassive; + }(), + gestures: function checkGestures() { + return 'ongesturestart' in window; + }() + }; + } + + function getSupport() { + if (!support) { + support = calcSupport(); + } + + return support; + } + + let deviceCached; + + function calcDevice(_temp) { + let { + userAgent + } = _temp === void 0 ? {} : _temp; + const support = getSupport(); + const window = getWindow(); + const platform = window.navigator.platform; + const ua = userAgent || window.navigator.userAgent; + const device = { + ios: false, + android: false + }; + const screenWidth = window.screen.width; + const screenHeight = window.screen.height; + const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line + + let ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + const windows = platform === 'Win32'; + let macos = platform === 'MacIntel'; // iPadOs 13 fix + + const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810']; + + if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) { + ipad = ua.match(/(Version)\/([\d.]+)/); + if (!ipad) ipad = [0, 1, '13_0_0']; + macos = false; + } // Android + + + if (android && !windows) { + device.os = 'android'; + device.android = true; + } + + if (ipad || iphone || ipod) { + device.os = 'ios'; + device.ios = true; + } // Export object + + + return device; + } + + function getDevice(overrides) { + if (overrides === void 0) { + overrides = {}; + } + + if (!deviceCached) { + deviceCached = calcDevice(overrides); + } + + return deviceCached; + } + + let browser; + + function calcBrowser() { + const window = getWindow(); + + function isSafari() { + const ua = window.navigator.userAgent.toLowerCase(); + return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0; + } + + return { + isSafari: isSafari(), + isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent) + }; + } + + function getBrowser() { + if (!browser) { + browser = calcBrowser(); + } + + return browser; + } + + function Resize(_ref) { + let { + swiper, + on, + emit + } = _ref; + const window = getWindow(); + let observer = null; + let animationFrame = null; + + const resizeHandler = () => { + if (!swiper || swiper.destroyed || !swiper.initialized) return; + emit('beforeResize'); + emit('resize'); + }; + + const createObserver = () => { + if (!swiper || swiper.destroyed || !swiper.initialized) return; + observer = new ResizeObserver(entries => { + animationFrame = window.requestAnimationFrame(() => { + const { + width, + height + } = swiper; + let newWidth = width; + let newHeight = height; + entries.forEach(_ref2 => { + let { + contentBoxSize, + contentRect, + target + } = _ref2; + if (target && target !== swiper.el) return; + newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize; + newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize; + }); + + if (newWidth !== width || newHeight !== height) { + resizeHandler(); + } + }); + }); + observer.observe(swiper.el); + }; + + const removeObserver = () => { + if (animationFrame) { + window.cancelAnimationFrame(animationFrame); + } + + if (observer && observer.unobserve && swiper.el) { + observer.unobserve(swiper.el); + observer = null; + } + }; + + const orientationChangeHandler = () => { + if (!swiper || swiper.destroyed || !swiper.initialized) return; + emit('orientationchange'); + }; + + on('init', () => { + if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') { + createObserver(); + return; + } + + window.addEventListener('resize', resizeHandler); + window.addEventListener('orientationchange', orientationChangeHandler); + }); + on('destroy', () => { + removeObserver(); + window.removeEventListener('resize', resizeHandler); + window.removeEventListener('orientationchange', orientationChangeHandler); + }); + } + + function Observer(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const observers = []; + const window = getWindow(); + + const attach = function (target, options) { + if (options === void 0) { + options = {}; + } + + const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver; + const observer = new ObserverFunc(mutations => { + // The observerUpdate event should only be triggered + // once despite the number of mutations. Additional + // triggers are redundant and are very costly + if (mutations.length === 1) { + emit('observerUpdate', mutations[0]); + return; + } + + const observerUpdate = function observerUpdate() { + emit('observerUpdate', mutations[0]); + }; + + if (window.requestAnimationFrame) { + window.requestAnimationFrame(observerUpdate); + } else { + window.setTimeout(observerUpdate, 0); + } + }); + observer.observe(target, { + attributes: typeof options.attributes === 'undefined' ? true : options.attributes, + childList: typeof options.childList === 'undefined' ? true : options.childList, + characterData: typeof options.characterData === 'undefined' ? true : options.characterData + }); + observers.push(observer); + }; + + const init = () => { + if (!swiper.params.observer) return; + + if (swiper.params.observeParents) { + const containerParents = swiper.$el.parents(); + + for (let i = 0; i < containerParents.length; i += 1) { + attach(containerParents[i]); + } + } // Observe container + + + attach(swiper.$el[0], { + childList: swiper.params.observeSlideChildren + }); // Observe wrapper + + attach(swiper.$wrapperEl[0], { + attributes: false + }); + }; + + const destroy = () => { + observers.forEach(observer => { + observer.disconnect(); + }); + observers.splice(0, observers.length); + }; + + extendParams({ + observer: false, + observeParents: false, + observeSlideChildren: false + }); + on('init', init); + on('destroy', destroy); + } + + /* eslint-disable no-underscore-dangle */ + var eventsEmitter = { + on(events, handler, priority) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (typeof handler !== 'function') return self; + const method = priority ? 'unshift' : 'push'; + events.split(' ').forEach(event => { + if (!self.eventsListeners[event]) self.eventsListeners[event] = []; + self.eventsListeners[event][method](handler); + }); + return self; + }, + + once(events, handler, priority) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (typeof handler !== 'function') return self; + + function onceHandler() { + self.off(events, onceHandler); + + if (onceHandler.__emitterProxy) { + delete onceHandler.__emitterProxy; + } + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + handler.apply(self, args); + } + + onceHandler.__emitterProxy = handler; + return self.on(events, onceHandler, priority); + }, + + onAny(handler, priority) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (typeof handler !== 'function') return self; + const method = priority ? 'unshift' : 'push'; + + if (self.eventsAnyListeners.indexOf(handler) < 0) { + self.eventsAnyListeners[method](handler); + } + + return self; + }, + + offAny(handler) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (!self.eventsAnyListeners) return self; + const index = self.eventsAnyListeners.indexOf(handler); + + if (index >= 0) { + self.eventsAnyListeners.splice(index, 1); + } + + return self; + }, + + off(events, handler) { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (!self.eventsListeners) return self; + events.split(' ').forEach(event => { + if (typeof handler === 'undefined') { + self.eventsListeners[event] = []; + } else if (self.eventsListeners[event]) { + self.eventsListeners[event].forEach((eventHandler, index) => { + if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) { + self.eventsListeners[event].splice(index, 1); + } + }); + } + }); + return self; + }, + + emit() { + const self = this; + if (!self.eventsListeners || self.destroyed) return self; + if (!self.eventsListeners) return self; + let events; + let data; + let context; + + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + + if (typeof args[0] === 'string' || Array.isArray(args[0])) { + events = args[0]; + data = args.slice(1, args.length); + context = self; + } else { + events = args[0].events; + data = args[0].data; + context = args[0].context || self; + } + + data.unshift(context); + const eventsArray = Array.isArray(events) ? events : events.split(' '); + eventsArray.forEach(event => { + if (self.eventsAnyListeners && self.eventsAnyListeners.length) { + self.eventsAnyListeners.forEach(eventHandler => { + eventHandler.apply(context, [event, ...data]); + }); + } + + if (self.eventsListeners && self.eventsListeners[event]) { + self.eventsListeners[event].forEach(eventHandler => { + eventHandler.apply(context, data); + }); + } + }); + return self; + } + + }; + + function updateSize() { + const swiper = this; + let width; + let height; + const $el = swiper.$el; + + if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) { + width = swiper.params.width; + } else { + width = $el[0].clientWidth; + } + + if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) { + height = swiper.params.height; + } else { + height = $el[0].clientHeight; + } + + if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) { + return; + } // Subtract paddings + + + width = width - parseInt($el.css('padding-left') || 0, 10) - parseInt($el.css('padding-right') || 0, 10); + height = height - parseInt($el.css('padding-top') || 0, 10) - parseInt($el.css('padding-bottom') || 0, 10); + if (Number.isNaN(width)) width = 0; + if (Number.isNaN(height)) height = 0; + Object.assign(swiper, { + width, + height, + size: swiper.isHorizontal() ? width : height + }); + } + + function updateSlides() { + const swiper = this; + + function getDirectionLabel(property) { + if (swiper.isHorizontal()) { + return property; + } // prettier-ignore + + + return { + 'width': 'height', + 'margin-top': 'margin-left', + 'margin-bottom ': 'margin-right', + 'margin-left': 'margin-top', + 'margin-right': 'margin-bottom', + 'padding-left': 'padding-top', + 'padding-right': 'padding-bottom', + 'marginRight': 'marginBottom' + }[property]; + } + + function getDirectionPropertyValue(node, label) { + return parseFloat(node.getPropertyValue(getDirectionLabel(label)) || 0); + } + + const params = swiper.params; + const { + $wrapperEl, + size: swiperSize, + rtlTranslate: rtl, + wrongRTL + } = swiper; + const isVirtual = swiper.virtual && params.virtual.enabled; + const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; + const slides = $wrapperEl.children(`.${swiper.params.slideClass}`); + const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; + let snapGrid = []; + const slidesGrid = []; + const slidesSizesGrid = []; + let offsetBefore = params.slidesOffsetBefore; + + if (typeof offsetBefore === 'function') { + offsetBefore = params.slidesOffsetBefore.call(swiper); + } + + let offsetAfter = params.slidesOffsetAfter; + + if (typeof offsetAfter === 'function') { + offsetAfter = params.slidesOffsetAfter.call(swiper); + } + + const previousSnapGridLength = swiper.snapGrid.length; + const previousSlidesGridLength = swiper.slidesGrid.length; + let spaceBetween = params.spaceBetween; + let slidePosition = -offsetBefore; + let prevSlideSize = 0; + let index = 0; + + if (typeof swiperSize === 'undefined') { + return; + } + + if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { + spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize; + } + + swiper.virtualSize = -spaceBetween; // reset margins + + if (rtl) slides.css({ + marginLeft: '', + marginBottom: '', + marginTop: '' + });else slides.css({ + marginRight: '', + marginBottom: '', + marginTop: '' + }); // reset cssMode offsets + + if (params.centeredSlides && params.cssMode) { + setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', ''); + setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', ''); + } + + const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid; + + if (gridEnabled) { + swiper.grid.initSlides(slidesLength); + } // Calc slides + + + let slideSize; + const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => { + return typeof params.breakpoints[key].slidesPerView !== 'undefined'; + }).length > 0; + + for (let i = 0; i < slidesLength; i += 1) { + slideSize = 0; + const slide = slides.eq(i); + + if (gridEnabled) { + swiper.grid.updateSlide(i, slide, slidesLength, getDirectionLabel); + } + + if (slide.css('display') === 'none') continue; // eslint-disable-line + + if (params.slidesPerView === 'auto') { + if (shouldResetSlideSize) { + slides[i].style[getDirectionLabel('width')] = ``; + } + + const slideStyles = getComputedStyle(slide[0]); + const currentTransform = slide[0].style.transform; + const currentWebKitTransform = slide[0].style.webkitTransform; + + if (currentTransform) { + slide[0].style.transform = 'none'; + } + + if (currentWebKitTransform) { + slide[0].style.webkitTransform = 'none'; + } + + if (params.roundLengths) { + slideSize = swiper.isHorizontal() ? slide.outerWidth(true) : slide.outerHeight(true); + } else { + // eslint-disable-next-line + const width = getDirectionPropertyValue(slideStyles, 'width'); + const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left'); + const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right'); + const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left'); + const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right'); + const boxSizing = slideStyles.getPropertyValue('box-sizing'); + + if (boxSizing && boxSizing === 'border-box') { + slideSize = width + marginLeft + marginRight; + } else { + const { + clientWidth, + offsetWidth + } = slide[0]; + slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth); + } + } + + if (currentTransform) { + slide[0].style.transform = currentTransform; + } + + if (currentWebKitTransform) { + slide[0].style.webkitTransform = currentWebKitTransform; + } + + if (params.roundLengths) slideSize = Math.floor(slideSize); + } else { + slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView; + if (params.roundLengths) slideSize = Math.floor(slideSize); + + if (slides[i]) { + slides[i].style[getDirectionLabel('width')] = `${slideSize}px`; + } + } + + if (slides[i]) { + slides[i].swiperSlideSize = slideSize; + } + + slidesSizesGrid.push(slideSize); + + if (params.centeredSlides) { + slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; + if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; + if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; + if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; + if (params.roundLengths) slidePosition = Math.floor(slidePosition); + if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition); + slidesGrid.push(slidePosition); + } else { + if (params.roundLengths) slidePosition = Math.floor(slidePosition); + if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition); + slidesGrid.push(slidePosition); + slidePosition = slidePosition + slideSize + spaceBetween; + } + + swiper.virtualSize += slideSize + spaceBetween; + prevSlideSize = slideSize; + index += 1; + } + + swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; + + if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { + $wrapperEl.css({ + width: `${swiper.virtualSize + params.spaceBetween}px` + }); + } + + if (params.setWrapperSize) { + $wrapperEl.css({ + [getDirectionLabel('width')]: `${swiper.virtualSize + params.spaceBetween}px` + }); + } + + if (gridEnabled) { + swiper.grid.updateWrapperSize(slideSize, snapGrid, getDirectionLabel); + } // Remove last grid elements depending on width + + + if (!params.centeredSlides) { + const newSlidesGrid = []; + + for (let i = 0; i < snapGrid.length; i += 1) { + let slidesGridItem = snapGrid[i]; + if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem); + + if (snapGrid[i] <= swiper.virtualSize - swiperSize) { + newSlidesGrid.push(slidesGridItem); + } + } + + snapGrid = newSlidesGrid; + + if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { + snapGrid.push(swiper.virtualSize - swiperSize); + } + } + + if (snapGrid.length === 0) snapGrid = [0]; + + if (params.spaceBetween !== 0) { + const key = swiper.isHorizontal() && rtl ? 'marginLeft' : getDirectionLabel('marginRight'); + slides.filter((_, slideIndex) => { + if (!params.cssMode) return true; + + if (slideIndex === slides.length - 1) { + return false; + } + + return true; + }).css({ + [key]: `${spaceBetween}px` + }); + } + + if (params.centeredSlides && params.centeredSlidesBounds) { + let allSlidesSize = 0; + slidesSizesGrid.forEach(slideSizeValue => { + allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); + }); + allSlidesSize -= params.spaceBetween; + const maxSnap = allSlidesSize - swiperSize; + snapGrid = snapGrid.map(snap => { + if (snap < 0) return -offsetBefore; + if (snap > maxSnap) return maxSnap + offsetAfter; + return snap; + }); + } + + if (params.centerInsufficientSlides) { + let allSlidesSize = 0; + slidesSizesGrid.forEach(slideSizeValue => { + allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); + }); + allSlidesSize -= params.spaceBetween; + + if (allSlidesSize < swiperSize) { + const allSlidesOffset = (swiperSize - allSlidesSize) / 2; + snapGrid.forEach((snap, snapIndex) => { + snapGrid[snapIndex] = snap - allSlidesOffset; + }); + slidesGrid.forEach((snap, snapIndex) => { + slidesGrid[snapIndex] = snap + allSlidesOffset; + }); + } + } + + Object.assign(swiper, { + slides, + snapGrid, + slidesGrid, + slidesSizesGrid + }); + + if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) { + setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`); + setCSSProperty(swiper.wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`); + const addToSnapGrid = -swiper.snapGrid[0]; + const addToSlidesGrid = -swiper.slidesGrid[0]; + swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid); + swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid); + } + + if (slidesLength !== previousSlidesLength) { + swiper.emit('slidesLengthChange'); + } + + if (snapGrid.length !== previousSnapGridLength) { + if (swiper.params.watchOverflow) swiper.checkOverflow(); + swiper.emit('snapGridLengthChange'); + } + + if (slidesGrid.length !== previousSlidesGridLength) { + swiper.emit('slidesGridLengthChange'); + } + + if (params.watchSlidesProgress) { + swiper.updateSlidesOffset(); + } + + if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) { + const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`; + const hasClassBackfaceClassAdded = swiper.$el.hasClass(backFaceHiddenClass); + + if (slidesLength <= params.maxBackfaceHiddenSlides) { + if (!hasClassBackfaceClassAdded) swiper.$el.addClass(backFaceHiddenClass); + } else if (hasClassBackfaceClassAdded) { + swiper.$el.removeClass(backFaceHiddenClass); + } + } + } + + function updateAutoHeight(speed) { + const swiper = this; + const activeSlides = []; + const isVirtual = swiper.virtual && swiper.params.virtual.enabled; + let newHeight = 0; + let i; + + if (typeof speed === 'number') { + swiper.setTransition(speed); + } else if (speed === true) { + swiper.setTransition(swiper.params.speed); + } + + const getSlideByIndex = index => { + if (isVirtual) { + return swiper.slides.filter(el => parseInt(el.getAttribute('data-swiper-slide-index'), 10) === index)[0]; + } + + return swiper.slides.eq(index)[0]; + }; // Find slides currently in view + + + if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { + if (swiper.params.centeredSlides) { + swiper.visibleSlides.each(slide => { + activeSlides.push(slide); + }); + } else { + for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { + const index = swiper.activeIndex + i; + if (index > swiper.slides.length && !isVirtual) break; + activeSlides.push(getSlideByIndex(index)); + } + } + } else { + activeSlides.push(getSlideByIndex(swiper.activeIndex)); + } // Find new height from highest slide in view + + + for (i = 0; i < activeSlides.length; i += 1) { + if (typeof activeSlides[i] !== 'undefined') { + const height = activeSlides[i].offsetHeight; + newHeight = height > newHeight ? height : newHeight; + } + } // Update Height + + + if (newHeight || newHeight === 0) swiper.$wrapperEl.css('height', `${newHeight}px`); + } + + function updateSlidesOffset() { + const swiper = this; + const slides = swiper.slides; + + for (let i = 0; i < slides.length; i += 1) { + slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop; + } + } + + function updateSlidesProgress(translate) { + if (translate === void 0) { + translate = this && this.translate || 0; + } + + const swiper = this; + const params = swiper.params; + const { + slides, + rtlTranslate: rtl, + snapGrid + } = swiper; + if (slides.length === 0) return; + if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset(); + let offsetCenter = -translate; + if (rtl) offsetCenter = translate; // Visible Slides + + slides.removeClass(params.slideVisibleClass); + swiper.visibleSlidesIndexes = []; + swiper.visibleSlides = []; + + for (let i = 0; i < slides.length; i += 1) { + const slide = slides[i]; + let slideOffset = slide.swiperSlideOffset; + + if (params.cssMode && params.centeredSlides) { + slideOffset -= slides[0].swiperSlideOffset; + } + + const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); + const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + params.spaceBetween); + const slideBefore = -(offsetCenter - slideOffset); + const slideAfter = slideBefore + swiper.slidesSizesGrid[i]; + const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size; + + if (isVisible) { + swiper.visibleSlides.push(slide); + swiper.visibleSlidesIndexes.push(i); + slides.eq(i).addClass(params.slideVisibleClass); + } + + slide.progress = rtl ? -slideProgress : slideProgress; + slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress; + } + + swiper.visibleSlides = $(swiper.visibleSlides); + } + + function updateProgress(translate) { + const swiper = this; + + if (typeof translate === 'undefined') { + const multiplier = swiper.rtlTranslate ? -1 : 1; // eslint-disable-next-line + + translate = swiper && swiper.translate && swiper.translate * multiplier || 0; + } + + const params = swiper.params; + const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + let { + progress, + isBeginning, + isEnd + } = swiper; + const wasBeginning = isBeginning; + const wasEnd = isEnd; + + if (translatesDiff === 0) { + progress = 0; + isBeginning = true; + isEnd = true; + } else { + progress = (translate - swiper.minTranslate()) / translatesDiff; + isBeginning = progress <= 0; + isEnd = progress >= 1; + } + + Object.assign(swiper, { + progress, + isBeginning, + isEnd + }); + if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate); + + if (isBeginning && !wasBeginning) { + swiper.emit('reachBeginning toEdge'); + } + + if (isEnd && !wasEnd) { + swiper.emit('reachEnd toEdge'); + } + + if (wasBeginning && !isBeginning || wasEnd && !isEnd) { + swiper.emit('fromEdge'); + } + + swiper.emit('progress', progress); + } + + function updateSlidesClasses() { + const swiper = this; + const { + slides, + params, + $wrapperEl, + activeIndex, + realIndex + } = swiper; + const isVirtual = swiper.virtual && params.virtual.enabled; + slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`); + let activeSlide; + + if (isVirtual) { + activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`); + } else { + activeSlide = slides.eq(activeIndex); + } // Active classes + + + activeSlide.addClass(params.slideActiveClass); + + if (params.loop) { + // Duplicate to all looped slides + if (activeSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); + } else { + $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`).addClass(params.slideDuplicateActiveClass); + } + } // Next Slide + + + let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass); + + if (params.loop && nextSlide.length === 0) { + nextSlide = slides.eq(0); + nextSlide.addClass(params.slideNextClass); + } // Prev Slide + + + let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass); + + if (params.loop && prevSlide.length === 0) { + prevSlide = slides.eq(-1); + prevSlide.addClass(params.slidePrevClass); + } + + if (params.loop) { + // Duplicate to all looped slides + if (nextSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicateNextClass); + } else { + $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicateNextClass); + } + + if (prevSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl.children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicatePrevClass); + } else { + $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`).addClass(params.slideDuplicatePrevClass); + } + } + + swiper.emitSlidesClasses(); + } + + function updateActiveIndex(newActiveIndex) { + const swiper = this; + const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; + const { + slidesGrid, + snapGrid, + params, + activeIndex: previousIndex, + realIndex: previousRealIndex, + snapIndex: previousSnapIndex + } = swiper; + let activeIndex = newActiveIndex; + let snapIndex; + + if (typeof activeIndex === 'undefined') { + for (let i = 0; i < slidesGrid.length; i += 1) { + if (typeof slidesGrid[i + 1] !== 'undefined') { + if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) { + activeIndex = i; + } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { + activeIndex = i + 1; + } + } else if (translate >= slidesGrid[i]) { + activeIndex = i; + } + } // Normalize slideIndex + + + if (params.normalizeSlideIndex) { + if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0; + } + } + + if (snapGrid.indexOf(translate) >= 0) { + snapIndex = snapGrid.indexOf(translate); + } else { + const skip = Math.min(params.slidesPerGroupSkip, activeIndex); + snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); + } + + if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; + + if (activeIndex === previousIndex) { + if (snapIndex !== previousSnapIndex) { + swiper.snapIndex = snapIndex; + swiper.emit('snapIndexChange'); + } + + return; + } // Get real index + + + const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10); + Object.assign(swiper, { + snapIndex, + realIndex, + previousIndex, + activeIndex + }); + swiper.emit('activeIndexChange'); + swiper.emit('snapIndexChange'); + + if (previousRealIndex !== realIndex) { + swiper.emit('realIndexChange'); + } + + if (swiper.initialized || swiper.params.runCallbacksOnInit) { + swiper.emit('slideChange'); + } + } + + function updateClickedSlide(e) { + const swiper = this; + const params = swiper.params; + const slide = $(e).closest(`.${params.slideClass}`)[0]; + let slideFound = false; + let slideIndex; + + if (slide) { + for (let i = 0; i < swiper.slides.length; i += 1) { + if (swiper.slides[i] === slide) { + slideFound = true; + slideIndex = i; + break; + } + } + } + + if (slide && slideFound) { + swiper.clickedSlide = slide; + + if (swiper.virtual && swiper.params.virtual.enabled) { + swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10); + } else { + swiper.clickedIndex = slideIndex; + } + } else { + swiper.clickedSlide = undefined; + swiper.clickedIndex = undefined; + return; + } + + if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { + swiper.slideToClickedSlide(); + } + } + + var update = { + updateSize, + updateSlides, + updateAutoHeight, + updateSlidesOffset, + updateSlidesProgress, + updateProgress, + updateSlidesClasses, + updateActiveIndex, + updateClickedSlide + }; + + function getSwiperTranslate(axis) { + if (axis === void 0) { + axis = this.isHorizontal() ? 'x' : 'y'; + } + + const swiper = this; + const { + params, + rtlTranslate: rtl, + translate, + $wrapperEl + } = swiper; + + if (params.virtualTranslate) { + return rtl ? -translate : translate; + } + + if (params.cssMode) { + return translate; + } + + let currentTranslate = getTranslate($wrapperEl[0], axis); + if (rtl) currentTranslate = -currentTranslate; + return currentTranslate || 0; + } + + function setTranslate(translate, byController) { + const swiper = this; + const { + rtlTranslate: rtl, + params, + $wrapperEl, + wrapperEl, + progress + } = swiper; + let x = 0; + let y = 0; + const z = 0; + + if (swiper.isHorizontal()) { + x = rtl ? -translate : translate; + } else { + y = translate; + } + + if (params.roundLengths) { + x = Math.floor(x); + y = Math.floor(y); + } + + if (params.cssMode) { + wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y; + } else if (!params.virtualTranslate) { + $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`); + } + + swiper.previousTranslate = swiper.translate; + swiper.translate = swiper.isHorizontal() ? x : y; // Check if we need to update progress + + let newProgress; + const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + + if (translatesDiff === 0) { + newProgress = 0; + } else { + newProgress = (translate - swiper.minTranslate()) / translatesDiff; + } + + if (newProgress !== progress) { + swiper.updateProgress(translate); + } + + swiper.emit('setTranslate', swiper.translate, byController); + } + + function minTranslate() { + return -this.snapGrid[0]; + } + + function maxTranslate() { + return -this.snapGrid[this.snapGrid.length - 1]; + } + + function translateTo(translate, speed, runCallbacks, translateBounds, internal) { + if (translate === void 0) { + translate = 0; + } + + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + if (translateBounds === void 0) { + translateBounds = true; + } + + const swiper = this; + const { + params, + wrapperEl + } = swiper; + + if (swiper.animating && params.preventInteractionOnTransition) { + return false; + } + + const minTranslate = swiper.minTranslate(); + const maxTranslate = swiper.maxTranslate(); + let newTranslate; + if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; // Update progress + + swiper.updateProgress(newTranslate); + + if (params.cssMode) { + const isH = swiper.isHorizontal(); + + if (speed === 0) { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; + } else { + if (!swiper.support.smoothScroll) { + animateCSSModeScroll({ + swiper, + targetPosition: -newTranslate, + side: isH ? 'left' : 'top' + }); + return true; + } + + wrapperEl.scrollTo({ + [isH ? 'left' : 'top']: -newTranslate, + behavior: 'smooth' + }); + } + + return true; + } + + if (speed === 0) { + swiper.setTransition(0); + swiper.setTranslate(newTranslate); + + if (runCallbacks) { + swiper.emit('beforeTransitionStart', speed, internal); + swiper.emit('transitionEnd'); + } + } else { + swiper.setTransition(speed); + swiper.setTranslate(newTranslate); + + if (runCallbacks) { + swiper.emit('beforeTransitionStart', speed, internal); + swiper.emit('transitionStart'); + } + + if (!swiper.animating) { + swiper.animating = true; + + if (!swiper.onTranslateToWrapperTransitionEnd) { + swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) { + if (!swiper || swiper.destroyed) return; + if (e.target !== this) return; + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); + swiper.onTranslateToWrapperTransitionEnd = null; + delete swiper.onTranslateToWrapperTransitionEnd; + + if (runCallbacks) { + swiper.emit('transitionEnd'); + } + }; + } + + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); + } + } + + return true; + } + + var translate = { + getTranslate: getSwiperTranslate, + setTranslate, + minTranslate, + maxTranslate, + translateTo + }; + + function setTransition(duration, byController) { + const swiper = this; + + if (!swiper.params.cssMode) { + swiper.$wrapperEl.transition(duration); + } + + swiper.emit('setTransition', duration, byController); + } + + function transitionEmit(_ref) { + let { + swiper, + runCallbacks, + direction, + step + } = _ref; + const { + activeIndex, + previousIndex + } = swiper; + let dir = direction; + + if (!dir) { + if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset'; + } + + swiper.emit(`transition${step}`); + + if (runCallbacks && activeIndex !== previousIndex) { + if (dir === 'reset') { + swiper.emit(`slideResetTransition${step}`); + return; + } + + swiper.emit(`slideChangeTransition${step}`); + + if (dir === 'next') { + swiper.emit(`slideNextTransition${step}`); + } else { + swiper.emit(`slidePrevTransition${step}`); + } + } + } + + function transitionStart(runCallbacks, direction) { + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + const { + params + } = swiper; + if (params.cssMode) return; + + if (params.autoHeight) { + swiper.updateAutoHeight(); + } + + transitionEmit({ + swiper, + runCallbacks, + direction, + step: 'Start' + }); + } + + function transitionEnd(runCallbacks, direction) { + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + const { + params + } = swiper; + swiper.animating = false; + if (params.cssMode) return; + swiper.setTransition(0); + transitionEmit({ + swiper, + runCallbacks, + direction, + step: 'End' + }); + } + + var transition = { + setTransition, + transitionStart, + transitionEnd + }; + + function slideTo(index, speed, runCallbacks, internal, initial) { + if (index === void 0) { + index = 0; + } + + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + if (typeof index !== 'number' && typeof index !== 'string') { + throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof index}] given.`); + } + + if (typeof index === 'string') { + /** + * The `index` argument converted from `string` to `number`. + * @type {number} + */ + const indexAsNumber = parseInt(index, 10); + /** + * Determines whether the `index` argument is a valid `number` + * after being converted from the `string` type. + * @type {boolean} + */ + + const isValidNumber = isFinite(indexAsNumber); + + if (!isValidNumber) { + throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${index}] given.`); + } // Knowing that the converted `index` is a valid number, + // we can update the original argument's value. + + + index = indexAsNumber; + } + + const swiper = this; + let slideIndex = index; + if (slideIndex < 0) slideIndex = 0; + const { + params, + snapGrid, + slidesGrid, + previousIndex, + activeIndex, + rtlTranslate: rtl, + wrapperEl, + enabled + } = swiper; + + if (swiper.animating && params.preventInteractionOnTransition || !enabled && !internal && !initial) { + return false; + } + + const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); + let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); + if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; + + if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) { + swiper.emit('beforeSlideChangeStart'); + } + + const translate = -snapGrid[snapIndex]; // Update progress + + swiper.updateProgress(translate); // Normalize slideIndex + + if (params.normalizeSlideIndex) { + for (let i = 0; i < slidesGrid.length; i += 1) { + const normalizedTranslate = -Math.floor(translate * 100); + const normalizedGrid = Math.floor(slidesGrid[i] * 100); + const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100); + + if (typeof slidesGrid[i + 1] !== 'undefined') { + if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) { + slideIndex = i; + } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) { + slideIndex = i + 1; + } + } else if (normalizedTranslate >= normalizedGrid) { + slideIndex = i; + } + } + } // Directions locks + + + if (swiper.initialized && slideIndex !== activeIndex) { + if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) { + return false; + } + + if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { + if ((activeIndex || 0) !== slideIndex) return false; + } + } + + let direction; + if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; // Update Index + + if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) { + swiper.updateActiveIndex(slideIndex); // Update Height + + if (params.autoHeight) { + swiper.updateAutoHeight(); + } + + swiper.updateSlidesClasses(); + + if (params.effect !== 'slide') { + swiper.setTranslate(translate); + } + + if (direction !== 'reset') { + swiper.transitionStart(runCallbacks, direction); + swiper.transitionEnd(runCallbacks, direction); + } + + return false; + } + + if (params.cssMode) { + const isH = swiper.isHorizontal(); + const t = rtl ? translate : -translate; + + if (speed === 0) { + const isVirtual = swiper.virtual && swiper.params.virtual.enabled; + + if (isVirtual) { + swiper.wrapperEl.style.scrollSnapType = 'none'; + swiper._immediateVirtual = true; + } + + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; + + if (isVirtual) { + requestAnimationFrame(() => { + swiper.wrapperEl.style.scrollSnapType = ''; + swiper._swiperImmediateVirtual = false; + }); + } + } else { + if (!swiper.support.smoothScroll) { + animateCSSModeScroll({ + swiper, + targetPosition: t, + side: isH ? 'left' : 'top' + }); + return true; + } + + wrapperEl.scrollTo({ + [isH ? 'left' : 'top']: t, + behavior: 'smooth' + }); + } + + return true; + } + + swiper.setTransition(speed); + swiper.setTranslate(translate); + swiper.updateActiveIndex(slideIndex); + swiper.updateSlidesClasses(); + swiper.emit('beforeTransitionStart', speed, internal); + swiper.transitionStart(runCallbacks, direction); + + if (speed === 0) { + swiper.transitionEnd(runCallbacks, direction); + } else if (!swiper.animating) { + swiper.animating = true; + + if (!swiper.onSlideToWrapperTransitionEnd) { + swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) { + if (!swiper || swiper.destroyed) return; + if (e.target !== this) return; + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); + swiper.onSlideToWrapperTransitionEnd = null; + delete swiper.onSlideToWrapperTransitionEnd; + swiper.transitionEnd(runCallbacks, direction); + }; + } + + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); + } + + return true; + } + + function slideToLoop(index, speed, runCallbacks, internal) { + if (index === void 0) { + index = 0; + } + + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + let newIndex = index; + + if (swiper.params.loop) { + newIndex += swiper.loopedSlides; + } + + return swiper.slideTo(newIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideNext(speed, runCallbacks, internal) { + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + const { + animating, + enabled, + params + } = swiper; + if (!enabled) return swiper; + let perGroup = params.slidesPerGroup; + + if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { + perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1); + } + + const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup; + + if (params.loop) { + if (animating && params.loopPreventsSlide) return false; + swiper.loopFix(); // eslint-disable-next-line + + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + } + + if (params.rewind && swiper.isEnd) { + return swiper.slideTo(0, speed, runCallbacks, internal); + } + + return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slidePrev(speed, runCallbacks, internal) { + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + const { + params, + animating, + snapGrid, + slidesGrid, + rtlTranslate, + enabled + } = swiper; + if (!enabled) return swiper; + + if (params.loop) { + if (animating && params.loopPreventsSlide) return false; + swiper.loopFix(); // eslint-disable-next-line + + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + } + + const translate = rtlTranslate ? swiper.translate : -swiper.translate; + + function normalize(val) { + if (val < 0) return -Math.floor(Math.abs(val)); + return Math.floor(val); + } + + const normalizedTranslate = normalize(translate); + const normalizedSnapGrid = snapGrid.map(val => normalize(val)); + let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; + + if (typeof prevSnap === 'undefined' && params.cssMode) { + let prevSnapIndex; + snapGrid.forEach((snap, snapIndex) => { + if (normalizedTranslate >= snap) { + // prevSnap = snap; + prevSnapIndex = snapIndex; + } + }); + + if (typeof prevSnapIndex !== 'undefined') { + prevSnap = snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex]; + } + } + + let prevIndex = 0; + + if (typeof prevSnap !== 'undefined') { + prevIndex = slidesGrid.indexOf(prevSnap); + if (prevIndex < 0) prevIndex = swiper.activeIndex - 1; + + if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) { + prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1; + prevIndex = Math.max(prevIndex, 0); + } + } + + if (params.rewind && swiper.isBeginning) { + const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; + return swiper.slideTo(lastIndex, speed, runCallbacks, internal); + } + + return swiper.slideTo(prevIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideReset(speed, runCallbacks, internal) { + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + const swiper = this; + return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideToClosest(speed, runCallbacks, internal, threshold) { + if (speed === void 0) { + speed = this.params.speed; + } + + if (runCallbacks === void 0) { + runCallbacks = true; + } + + if (threshold === void 0) { + threshold = 0.5; + } + + const swiper = this; + let index = swiper.activeIndex; + const skip = Math.min(swiper.params.slidesPerGroupSkip, index); + const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); + const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; + + if (translate >= swiper.snapGrid[snapIndex]) { + // The current translate is on or after the current snap index, so the choice + // is between the current index and the one after it. + const currentSnap = swiper.snapGrid[snapIndex]; + const nextSnap = swiper.snapGrid[snapIndex + 1]; + + if (translate - currentSnap > (nextSnap - currentSnap) * threshold) { + index += swiper.params.slidesPerGroup; + } + } else { + // The current translate is before the current snap index, so the choice + // is between the current index and the one before it. + const prevSnap = swiper.snapGrid[snapIndex - 1]; + const currentSnap = swiper.snapGrid[snapIndex]; + + if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) { + index -= swiper.params.slidesPerGroup; + } + } + + index = Math.max(index, 0); + index = Math.min(index, swiper.slidesGrid.length - 1); + return swiper.slideTo(index, speed, runCallbacks, internal); + } + + function slideToClickedSlide() { + const swiper = this; + const { + params, + $wrapperEl + } = swiper; + const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; + let slideToIndex = swiper.clickedIndex; + let realIndex; + + if (params.loop) { + if (swiper.animating) return; + realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10); + + if (params.centeredSlides) { + if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) { + swiper.loopFix(); + slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); + nextTick(() => { + swiper.slideTo(slideToIndex); + }); + } else { + swiper.slideTo(slideToIndex); + } + } else if (slideToIndex > swiper.slides.length - slidesPerView) { + swiper.loopFix(); + slideToIndex = $wrapperEl.children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`).eq(0).index(); + nextTick(() => { + swiper.slideTo(slideToIndex); + }); + } else { + swiper.slideTo(slideToIndex); + } + } else { + swiper.slideTo(slideToIndex); + } + } + + var slide = { + slideTo, + slideToLoop, + slideNext, + slidePrev, + slideReset, + slideToClosest, + slideToClickedSlide + }; + + function loopCreate() { + const swiper = this; + const document = getDocument(); + const { + params, + $wrapperEl + } = swiper; // Remove duplicated slides + + const $selector = $wrapperEl.children().length > 0 ? $($wrapperEl.children()[0].parentNode) : $wrapperEl; + $selector.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove(); + let slides = $selector.children(`.${params.slideClass}`); + + if (params.loopFillGroupWithBlank) { + const blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup; + + if (blankSlidesNum !== params.slidesPerGroup) { + for (let i = 0; i < blankSlidesNum; i += 1) { + const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`); + $selector.append(blankNode); + } + + slides = $selector.children(`.${params.slideClass}`); + } + } + + if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length; + swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10)); + swiper.loopedSlides += params.loopAdditionalSlides; + + if (swiper.loopedSlides > slides.length) { + swiper.loopedSlides = slides.length; + } + + const prependSlides = []; + const appendSlides = []; + slides.each((el, index) => { + const slide = $(el); + + if (index < swiper.loopedSlides) { + appendSlides.push(el); + } + + if (index < slides.length && index >= slides.length - swiper.loopedSlides) { + prependSlides.push(el); + } + + slide.attr('data-swiper-slide-index', index); + }); + + for (let i = 0; i < appendSlides.length; i += 1) { + $selector.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); + } + + for (let i = prependSlides.length - 1; i >= 0; i -= 1) { + $selector.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass)); + } + } + + function loopFix() { + const swiper = this; + swiper.emit('beforeLoopFix'); + const { + activeIndex, + slides, + loopedSlides, + allowSlidePrev, + allowSlideNext, + snapGrid, + rtlTranslate: rtl + } = swiper; + let newIndex; + swiper.allowSlidePrev = true; + swiper.allowSlideNext = true; + const snapTranslate = -snapGrid[activeIndex]; + const diff = snapTranslate - swiper.getTranslate(); // Fix For Negative Oversliding + + if (activeIndex < loopedSlides) { + newIndex = slides.length - loopedSlides * 3 + activeIndex; + newIndex += loopedSlides; + const slideChanged = swiper.slideTo(newIndex, 0, false, true); + + if (slideChanged && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } + } else if (activeIndex >= slides.length - loopedSlides) { + // Fix For Positive Oversliding + newIndex = -slides.length + activeIndex + loopedSlides; + newIndex += loopedSlides; + const slideChanged = swiper.slideTo(newIndex, 0, false, true); + + if (slideChanged && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } + } + + swiper.allowSlidePrev = allowSlidePrev; + swiper.allowSlideNext = allowSlideNext; + swiper.emit('loopFix'); + } + + function loopDestroy() { + const swiper = this; + const { + $wrapperEl, + params, + slides + } = swiper; + $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass},.${params.slideClass}.${params.slideBlankClass}`).remove(); + slides.removeAttr('data-swiper-slide-index'); + } + + var loop = { + loopCreate, + loopFix, + loopDestroy + }; + + function setGrabCursor(moving) { + const swiper = this; + if (swiper.support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return; + const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl; + el.style.cursor = 'move'; + el.style.cursor = moving ? 'grabbing' : 'grab'; + } + + function unsetGrabCursor() { + const swiper = this; + + if (swiper.support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) { + return; + } + + swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = ''; + } + + var grabCursor = { + setGrabCursor, + unsetGrabCursor + }; + + function closestElement(selector, base) { + if (base === void 0) { + base = this; + } + + function __closestFrom(el) { + if (!el || el === getDocument() || el === getWindow()) return null; + if (el.assignedSlot) el = el.assignedSlot; + const found = el.closest(selector); + return found || __closestFrom(el.getRootNode().host); + } + + return __closestFrom(base); + } + + function onTouchStart(event) { + const swiper = this; + const document = getDocument(); + const window = getWindow(); + const data = swiper.touchEventsData; + const { + params, + touches, + enabled + } = swiper; + if (!enabled) return; + + if (swiper.animating && params.preventInteractionOnTransition) { + return; + } + + if (!swiper.animating && params.cssMode && params.loop) { + swiper.loopFix(); + } + + let e = event; + if (e.originalEvent) e = e.originalEvent; + let $targetEl = $(e.target); + + if (params.touchEventsTarget === 'wrapper') { + if (!$targetEl.closest(swiper.wrapperEl).length) return; + } + + data.isTouchEvent = e.type === 'touchstart'; + if (!data.isTouchEvent && 'which' in e && e.which === 3) return; + if (!data.isTouchEvent && 'button' in e && e.button > 0) return; + if (data.isTouched && data.isMoved) return; // change target el for shadow root component + + const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== ''; + + if (swipingClassHasValue && e.target && e.target.shadowRoot && event.path && event.path[0]) { + $targetEl = $(event.path[0]); + } + + const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`; + const isTargetShadow = !!(e.target && e.target.shadowRoot); // use closestElement for shadow root element to get the actual closest for nested shadow root element + + if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, e.target) : $targetEl.closest(noSwipingSelector)[0])) { + swiper.allowClick = true; + return; + } + + if (params.swipeHandler) { + if (!$targetEl.closest(params.swipeHandler)[0]) return; + } + + touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + const startX = touches.currentX; + const startY = touches.currentY; // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore + + const edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; + const edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; + + if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) { + if (edgeSwipeDetection === 'prevent') { + event.preventDefault(); + } else { + return; + } + } + + Object.assign(data, { + isTouched: true, + isMoved: false, + allowTouchCallbacks: true, + isScrolling: undefined, + startMoving: undefined + }); + touches.startX = startX; + touches.startY = startY; + data.touchStartTime = now(); + swiper.allowClick = true; + swiper.updateSize(); + swiper.swipeDirection = undefined; + if (params.threshold > 0) data.allowThresholdMove = false; + + if (e.type !== 'touchstart') { + let preventDefault = true; + + if ($targetEl.is(data.focusableElements)) { + preventDefault = false; + + if ($targetEl[0].nodeName === 'SELECT') { + data.isTouched = false; + } + } + + if (document.activeElement && $(document.activeElement).is(data.focusableElements) && document.activeElement !== $targetEl[0]) { + document.activeElement.blur(); + } + + const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; + + if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !$targetEl[0].isContentEditable) { + e.preventDefault(); + } + } + + if (swiper.params.freeMode && swiper.params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) { + swiper.freeMode.onTouchStart(); + } + + swiper.emit('touchStart', e); + } + + function onTouchMove(event) { + const document = getDocument(); + const swiper = this; + const data = swiper.touchEventsData; + const { + params, + touches, + rtlTranslate: rtl, + enabled + } = swiper; + if (!enabled) return; + let e = event; + if (e.originalEvent) e = e.originalEvent; + + if (!data.isTouched) { + if (data.startMoving && data.isScrolling) { + swiper.emit('touchMoveOpposite', e); + } + + return; + } + + if (data.isTouchEvent && e.type !== 'touchmove') return; + const targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]); + const pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX; + const pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY; + + if (e.preventedByNestedSwiper) { + touches.startX = pageX; + touches.startY = pageY; + return; + } + + if (!swiper.allowTouchMove) { + if (!$(e.target).is(data.focusableElements)) { + swiper.allowClick = false; + } + + if (data.isTouched) { + Object.assign(touches, { + startX: pageX, + startY: pageY, + currentX: pageX, + currentY: pageY + }); + data.touchStartTime = now(); + } + + return; + } + + if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) { + if (swiper.isVertical()) { + // Vertical + if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) { + data.isTouched = false; + data.isMoved = false; + return; + } + } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) { + return; + } + } + + if (data.isTouchEvent && document.activeElement) { + if (e.target === document.activeElement && $(e.target).is(data.focusableElements)) { + data.isMoved = true; + swiper.allowClick = false; + return; + } + } + + if (data.allowTouchCallbacks) { + swiper.emit('touchMove', e); + } + + if (e.targetTouches && e.targetTouches.length > 1) return; + touches.currentX = pageX; + touches.currentY = pageY; + const diffX = touches.currentX - touches.startX; + const diffY = touches.currentY - touches.startY; + if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return; + + if (typeof data.isScrolling === 'undefined') { + let touchAngle; + + if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) { + data.isScrolling = false; + } else { + // eslint-disable-next-line + if (diffX * diffX + diffY * diffY >= 25) { + touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI; + data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle; + } + } + } + + if (data.isScrolling) { + swiper.emit('touchMoveOpposite', e); + } + + if (typeof data.startMoving === 'undefined') { + if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { + data.startMoving = true; + } + } + + if (data.isScrolling) { + data.isTouched = false; + return; + } + + if (!data.startMoving) { + return; + } + + swiper.allowClick = false; + + if (!params.cssMode && e.cancelable) { + e.preventDefault(); + } + + if (params.touchMoveStopPropagation && !params.nested) { + e.stopPropagation(); + } + + if (!data.isMoved) { + if (params.loop && !params.cssMode) { + swiper.loopFix(); + } + + data.startTranslate = swiper.getTranslate(); + swiper.setTransition(0); + + if (swiper.animating) { + swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend'); + } + + data.allowMomentumBounce = false; // Grab Cursor + + if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { + swiper.setGrabCursor(true); + } + + swiper.emit('sliderFirstMove', e); + } + + swiper.emit('sliderMove', e); + data.isMoved = true; + let diff = swiper.isHorizontal() ? diffX : diffY; + touches.diff = diff; + diff *= params.touchRatio; + if (rtl) diff = -diff; + swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; + data.currentTranslate = diff + data.startTranslate; + let disableParentSwiper = true; + let resistanceRatio = params.resistanceRatio; + + if (params.touchReleaseOnEdges) { + resistanceRatio = 0; + } + + if (diff > 0 && data.currentTranslate > swiper.minTranslate()) { + disableParentSwiper = false; + if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio; + } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) { + disableParentSwiper = false; + if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio; + } + + if (disableParentSwiper) { + e.preventedByNestedSwiper = true; + } // Directions locks + + + if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) { + data.currentTranslate = data.startTranslate; + } + + if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) { + data.currentTranslate = data.startTranslate; + } + + if (!swiper.allowSlidePrev && !swiper.allowSlideNext) { + data.currentTranslate = data.startTranslate; + } // Threshold + + + if (params.threshold > 0) { + if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { + if (!data.allowThresholdMove) { + data.allowThresholdMove = true; + touches.startX = touches.currentX; + touches.startY = touches.currentY; + data.currentTranslate = data.startTranslate; + touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; + return; + } + } else { + data.currentTranslate = data.startTranslate; + return; + } + } + + if (!params.followFinger || params.cssMode) return; // Update active index in free mode + + if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) { + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + + if (swiper.params.freeMode && params.freeMode.enabled && swiper.freeMode) { + swiper.freeMode.onTouchMove(); + } // Update progress + + + swiper.updateProgress(data.currentTranslate); // Update translate + + swiper.setTranslate(data.currentTranslate); + } + + function onTouchEnd(event) { + const swiper = this; + const data = swiper.touchEventsData; + const { + params, + touches, + rtlTranslate: rtl, + slidesGrid, + enabled + } = swiper; + if (!enabled) return; + let e = event; + if (e.originalEvent) e = e.originalEvent; + + if (data.allowTouchCallbacks) { + swiper.emit('touchEnd', e); + } + + data.allowTouchCallbacks = false; + + if (!data.isTouched) { + if (data.isMoved && params.grabCursor) { + swiper.setGrabCursor(false); + } + + data.isMoved = false; + data.startMoving = false; + return; + } // Return Grab Cursor + + + if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { + swiper.setGrabCursor(false); + } // Time diff + + + const touchEndTime = now(); + const timeDiff = touchEndTime - data.touchStartTime; // Tap, doubleTap, Click + + if (swiper.allowClick) { + const pathTree = e.path || e.composedPath && e.composedPath(); + swiper.updateClickedSlide(pathTree && pathTree[0] || e.target); + swiper.emit('tap click', e); + + if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) { + swiper.emit('doubleTap doubleClick', e); + } + } + + data.lastClickTime = now(); + nextTick(() => { + if (!swiper.destroyed) swiper.allowClick = true; + }); + + if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) { + data.isTouched = false; + data.isMoved = false; + data.startMoving = false; + return; + } + + data.isTouched = false; + data.isMoved = false; + data.startMoving = false; + let currentPos; + + if (params.followFinger) { + currentPos = rtl ? swiper.translate : -swiper.translate; + } else { + currentPos = -data.currentTranslate; + } + + if (params.cssMode) { + return; + } + + if (swiper.params.freeMode && params.freeMode.enabled) { + swiper.freeMode.onTouchEnd({ + currentPos + }); + return; + } // Find current slide + + + let stopIndex = 0; + let groupSize = swiper.slidesSizesGrid[0]; + + for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) { + const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; + + if (typeof slidesGrid[i + increment] !== 'undefined') { + if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) { + stopIndex = i; + groupSize = slidesGrid[i + increment] - slidesGrid[i]; + } + } else if (currentPos >= slidesGrid[i]) { + stopIndex = i; + groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; + } + } + + let rewindFirstIndex = null; + let rewindLastIndex = null; + + if (params.rewind) { + if (swiper.isBeginning) { + rewindLastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1; + } else if (swiper.isEnd) { + rewindFirstIndex = 0; + } + } // Find current slide size + + + const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; + const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; + + if (timeDiff > params.longSwipesMs) { + // Long touches + if (!params.longSwipes) { + swiper.slideTo(swiper.activeIndex); + return; + } + + if (swiper.swipeDirection === 'next') { + if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex); + } + + if (swiper.swipeDirection === 'prev') { + if (ratio > 1 - params.longSwipesRatio) { + swiper.slideTo(stopIndex + increment); + } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) { + swiper.slideTo(rewindLastIndex); + } else { + swiper.slideTo(stopIndex); + } + } + } else { + // Short swipes + if (!params.shortSwipes) { + swiper.slideTo(swiper.activeIndex); + return; + } + + const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); + + if (!isNavButtonTarget) { + if (swiper.swipeDirection === 'next') { + swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment); + } + + if (swiper.swipeDirection === 'prev') { + swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex); + } + } else if (e.target === swiper.navigation.nextEl) { + swiper.slideTo(stopIndex + increment); + } else { + swiper.slideTo(stopIndex); + } + } + } + + function onResize() { + const swiper = this; + const { + params, + el + } = swiper; + if (el && el.offsetWidth === 0) return; // Breakpoints + + if (params.breakpoints) { + swiper.setBreakpoint(); + } // Save locks + + + const { + allowSlideNext, + allowSlidePrev, + snapGrid + } = swiper; // Disable locks on resize + + swiper.allowSlideNext = true; + swiper.allowSlidePrev = true; + swiper.updateSize(); + swiper.updateSlides(); + swiper.updateSlidesClasses(); + + if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) { + swiper.slideTo(swiper.slides.length - 1, 0, false, true); + } else { + swiper.slideTo(swiper.activeIndex, 0, false, true); + } + + if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { + swiper.autoplay.run(); + } // Return locks after resize + + + swiper.allowSlidePrev = allowSlidePrev; + swiper.allowSlideNext = allowSlideNext; + + if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { + swiper.checkOverflow(); + } + } + + function onClick(e) { + const swiper = this; + if (!swiper.enabled) return; + + if (!swiper.allowClick) { + if (swiper.params.preventClicks) e.preventDefault(); + + if (swiper.params.preventClicksPropagation && swiper.animating) { + e.stopPropagation(); + e.stopImmediatePropagation(); + } + } + } + + function onScroll() { + const swiper = this; + const { + wrapperEl, + rtlTranslate, + enabled + } = swiper; + if (!enabled) return; + swiper.previousTranslate = swiper.translate; + + if (swiper.isHorizontal()) { + swiper.translate = -wrapperEl.scrollLeft; + } else { + swiper.translate = -wrapperEl.scrollTop; + } // eslint-disable-next-line + + + if (swiper.translate === 0) swiper.translate = 0; + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + let newProgress; + const translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + + if (translatesDiff === 0) { + newProgress = 0; + } else { + newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff; + } + + if (newProgress !== swiper.progress) { + swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate); + } + + swiper.emit('setTranslate', swiper.translate, false); + } + + let dummyEventAttached = false; + + function dummyEventListener() {} + + const events = (swiper, method) => { + const document = getDocument(); + const { + params, + touchEvents, + el, + wrapperEl, + device, + support + } = swiper; + const capture = !!params.nested; + const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; + const swiperMethod = method; // Touch Events + + if (!support.touch) { + el[domMethod](touchEvents.start, swiper.onTouchStart, false); + document[domMethod](touchEvents.move, swiper.onTouchMove, capture); + document[domMethod](touchEvents.end, swiper.onTouchEnd, false); + } else { + const passiveListener = touchEvents.start === 'touchstart' && support.passiveListener && params.passiveListeners ? { + passive: true, + capture: false + } : false; + el[domMethod](touchEvents.start, swiper.onTouchStart, passiveListener); + el[domMethod](touchEvents.move, swiper.onTouchMove, support.passiveListener ? { + passive: false, + capture + } : capture); + el[domMethod](touchEvents.end, swiper.onTouchEnd, passiveListener); + + if (touchEvents.cancel) { + el[domMethod](touchEvents.cancel, swiper.onTouchEnd, passiveListener); + } + } // Prevent Links Clicks + + + if (params.preventClicks || params.preventClicksPropagation) { + el[domMethod]('click', swiper.onClick, true); + } + + if (params.cssMode) { + wrapperEl[domMethod]('scroll', swiper.onScroll); + } // Resize handler + + + if (params.updateOnWindowResize) { + swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true); + } else { + swiper[swiperMethod]('observerUpdate', onResize, true); + } + }; + + function attachEvents() { + const swiper = this; + const document = getDocument(); + const { + params, + support + } = swiper; + swiper.onTouchStart = onTouchStart.bind(swiper); + swiper.onTouchMove = onTouchMove.bind(swiper); + swiper.onTouchEnd = onTouchEnd.bind(swiper); + + if (params.cssMode) { + swiper.onScroll = onScroll.bind(swiper); + } + + swiper.onClick = onClick.bind(swiper); + + if (support.touch && !dummyEventAttached) { + document.addEventListener('touchstart', dummyEventListener); + dummyEventAttached = true; + } + + events(swiper, 'on'); + } + + function detachEvents() { + const swiper = this; + events(swiper, 'off'); + } + + var events$1 = { + attachEvents, + detachEvents + }; + + const isGridEnabled = (swiper, params) => { + return swiper.grid && params.grid && params.grid.rows > 1; + }; + + function setBreakpoint() { + const swiper = this; + const { + activeIndex, + initialized, + loopedSlides = 0, + params, + $el + } = swiper; + const breakpoints = params.breakpoints; + if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; // Get breakpoint for window width and update parameters + + const breakpoint = swiper.getBreakpoint(breakpoints, swiper.params.breakpointsBase, swiper.el); + if (!breakpoint || swiper.currentBreakpoint === breakpoint) return; + const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined; + const breakpointParams = breakpointOnlyParams || swiper.originalParams; + const wasMultiRow = isGridEnabled(swiper, params); + const isMultiRow = isGridEnabled(swiper, breakpointParams); + const wasEnabled = params.enabled; + + if (wasMultiRow && !isMultiRow) { + $el.removeClass(`${params.containerModifierClass}grid ${params.containerModifierClass}grid-column`); + swiper.emitContainerClasses(); + } else if (!wasMultiRow && isMultiRow) { + $el.addClass(`${params.containerModifierClass}grid`); + + if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') { + $el.addClass(`${params.containerModifierClass}grid-column`); + } + + swiper.emitContainerClasses(); + } + + const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; + const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); + + if (directionChanged && initialized) { + swiper.changeDirection(); + } + + extend(swiper.params, breakpointParams); + const isEnabled = swiper.params.enabled; + Object.assign(swiper, { + allowTouchMove: swiper.params.allowTouchMove, + allowSlideNext: swiper.params.allowSlideNext, + allowSlidePrev: swiper.params.allowSlidePrev + }); + + if (wasEnabled && !isEnabled) { + swiper.disable(); + } else if (!wasEnabled && isEnabled) { + swiper.enable(); + } + + swiper.currentBreakpoint = breakpoint; + swiper.emit('_beforeBreakpoint', breakpointParams); + + if (needsReLoop && initialized) { + swiper.loopDestroy(); + swiper.loopCreate(); + swiper.updateSlides(); + swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false); + } + + swiper.emit('breakpoint', breakpointParams); + } + + function getBreakpoint(breakpoints, base, containerEl) { + if (base === void 0) { + base = 'window'; + } + + if (!breakpoints || base === 'container' && !containerEl) return undefined; + let breakpoint = false; + const window = getWindow(); + const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight; + const points = Object.keys(breakpoints).map(point => { + if (typeof point === 'string' && point.indexOf('@') === 0) { + const minRatio = parseFloat(point.substr(1)); + const value = currentHeight * minRatio; + return { + value, + point + }; + } + + return { + value: point, + point + }; + }); + points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10)); + + for (let i = 0; i < points.length; i += 1) { + const { + point, + value + } = points[i]; + + if (base === 'window') { + if (window.matchMedia(`(min-width: ${value}px)`).matches) { + breakpoint = point; + } + } else if (value <= containerEl.clientWidth) { + breakpoint = point; + } + } + + return breakpoint || 'max'; + } + + var breakpoints = { + setBreakpoint, + getBreakpoint + }; + + function prepareClasses(entries, prefix) { + const resultClasses = []; + entries.forEach(item => { + if (typeof item === 'object') { + Object.keys(item).forEach(classNames => { + if (item[classNames]) { + resultClasses.push(prefix + classNames); + } + }); + } else if (typeof item === 'string') { + resultClasses.push(prefix + item); + } + }); + return resultClasses; + } + + function addClasses() { + const swiper = this; + const { + classNames, + params, + rtl, + $el, + device, + support + } = swiper; // prettier-ignore + + const suffixes = prepareClasses(['initialized', params.direction, { + 'pointer-events': !support.touch + }, { + 'free-mode': swiper.params.freeMode && params.freeMode.enabled + }, { + 'autoheight': params.autoHeight + }, { + 'rtl': rtl + }, { + 'grid': params.grid && params.grid.rows > 1 + }, { + 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column' + }, { + 'android': device.android + }, { + 'ios': device.ios + }, { + 'css-mode': params.cssMode + }, { + 'centered': params.cssMode && params.centeredSlides + }, { + 'watch-progress': params.watchSlidesProgress + }], params.containerModifierClass); + classNames.push(...suffixes); + $el.addClass([...classNames].join(' ')); + swiper.emitContainerClasses(); + } + + function removeClasses() { + const swiper = this; + const { + $el, + classNames + } = swiper; + $el.removeClass(classNames.join(' ')); + swiper.emitContainerClasses(); + } + + var classes = { + addClasses, + removeClasses + }; + + function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) { + const window = getWindow(); + let image; + + function onReady() { + if (callback) callback(); + } + + const isPicture = $(imageEl).parent('picture')[0]; + + if (!isPicture && (!imageEl.complete || !checkForComplete)) { + if (src) { + image = new window.Image(); + image.onload = onReady; + image.onerror = onReady; + + if (sizes) { + image.sizes = sizes; + } + + if (srcset) { + image.srcset = srcset; + } + + if (src) { + image.src = src; + } + } else { + onReady(); + } + } else { + // image already loaded... + onReady(); + } + } + + function preloadImages() { + const swiper = this; + swiper.imagesToLoad = swiper.$el.find('img'); + + function onReady() { + if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return; + if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1; + + if (swiper.imagesLoaded === swiper.imagesToLoad.length) { + if (swiper.params.updateOnImagesReady) swiper.update(); + swiper.emit('imagesReady'); + } + } + + for (let i = 0; i < swiper.imagesToLoad.length; i += 1) { + const imageEl = swiper.imagesToLoad[i]; + swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady); + } + } + + var images = { + loadImage, + preloadImages + }; + + function checkOverflow() { + const swiper = this; + const { + isLocked: wasLocked, + params + } = swiper; + const { + slidesOffsetBefore + } = params; + + if (slidesOffsetBefore) { + const lastSlideIndex = swiper.slides.length - 1; + const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2; + swiper.isLocked = swiper.size > lastSlideRightEdge; + } else { + swiper.isLocked = swiper.snapGrid.length === 1; + } + + if (params.allowSlideNext === true) { + swiper.allowSlideNext = !swiper.isLocked; + } + + if (params.allowSlidePrev === true) { + swiper.allowSlidePrev = !swiper.isLocked; + } + + if (wasLocked && wasLocked !== swiper.isLocked) { + swiper.isEnd = false; + } + + if (wasLocked !== swiper.isLocked) { + swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); + } + } + + var checkOverflow$1 = { + checkOverflow + }; + + var defaults = { + init: true, + direction: 'horizontal', + touchEventsTarget: 'wrapper', + initialSlide: 0, + speed: 300, + cssMode: false, + updateOnWindowResize: true, + resizeObserver: true, + nested: false, + createElements: false, + enabled: true, + focusableElements: 'input, select, option, textarea, button, video, label', + // Overrides + width: null, + height: null, + // + preventInteractionOnTransition: false, + // ssr + userAgent: null, + url: null, + // To support iOS's swipe-to-go-back gesture (when being used in-app). + edgeSwipeDetection: false, + edgeSwipeThreshold: 20, + // Autoheight + autoHeight: false, + // Set wrapper width + setWrapperSize: false, + // Virtual Translate + virtualTranslate: false, + // Effects + effect: 'slide', + // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' + // Breakpoints + breakpoints: undefined, + breakpointsBase: 'window', + // Slides grid + spaceBetween: 0, + slidesPerView: 1, + slidesPerGroup: 1, + slidesPerGroupSkip: 0, + slidesPerGroupAuto: false, + centeredSlides: false, + centeredSlidesBounds: false, + slidesOffsetBefore: 0, + // in px + slidesOffsetAfter: 0, + // in px + normalizeSlideIndex: true, + centerInsufficientSlides: false, + // Disable swiper and hide navigation when container not overflow + watchOverflow: true, + // Round length + roundLengths: false, + // Touches + touchRatio: 1, + touchAngle: 45, + simulateTouch: true, + shortSwipes: true, + longSwipes: true, + longSwipesRatio: 0.5, + longSwipesMs: 300, + followFinger: true, + allowTouchMove: true, + threshold: 0, + touchMoveStopPropagation: false, + touchStartPreventDefault: true, + touchStartForcePreventDefault: false, + touchReleaseOnEdges: false, + // Unique Navigation Elements + uniqueNavElements: true, + // Resistance + resistance: true, + resistanceRatio: 0.85, + // Progress + watchSlidesProgress: false, + // Cursor + grabCursor: false, + // Clicks + preventClicks: true, + preventClicksPropagation: true, + slideToClickedSlide: false, + // Images + preloadImages: true, + updateOnImagesReady: true, + // loop + loop: false, + loopAdditionalSlides: 0, + loopedSlides: null, + loopFillGroupWithBlank: false, + loopPreventsSlide: true, + // rewind + rewind: false, + // Swiping/no swiping + allowSlidePrev: true, + allowSlideNext: true, + swipeHandler: null, + // '.swipe-handler', + noSwiping: true, + noSwipingClass: 'swiper-no-swiping', + noSwipingSelector: null, + // Passive Listeners + passiveListeners: true, + maxBackfaceHiddenSlides: 10, + // NS + containerModifierClass: 'swiper-', + // NEW + slideClass: 'swiper-slide', + slideBlankClass: 'swiper-slide-invisible-blank', + slideActiveClass: 'swiper-slide-active', + slideDuplicateActiveClass: 'swiper-slide-duplicate-active', + slideVisibleClass: 'swiper-slide-visible', + slideDuplicateClass: 'swiper-slide-duplicate', + slideNextClass: 'swiper-slide-next', + slideDuplicateNextClass: 'swiper-slide-duplicate-next', + slidePrevClass: 'swiper-slide-prev', + slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', + wrapperClass: 'swiper-wrapper', + // Callbacks + runCallbacksOnInit: true, + // Internals + _emitClasses: false + }; + + function moduleExtendParams(params, allModulesParams) { + return function extendParams(obj) { + if (obj === void 0) { + obj = {}; + } + + const moduleParamName = Object.keys(obj)[0]; + const moduleParams = obj[moduleParamName]; + + if (typeof moduleParams !== 'object' || moduleParams === null) { + extend(allModulesParams, obj); + return; + } + + if (['navigation', 'pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] === true) { + params[moduleParamName] = { + auto: true + }; + } + + if (!(moduleParamName in params && 'enabled' in moduleParams)) { + extend(allModulesParams, obj); + return; + } + + if (params[moduleParamName] === true) { + params[moduleParamName] = { + enabled: true + }; + } + + if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) { + params[moduleParamName].enabled = true; + } + + if (!params[moduleParamName]) params[moduleParamName] = { + enabled: false + }; + extend(allModulesParams, obj); + }; + } + + /* eslint no-param-reassign: "off" */ + const prototypes = { + eventsEmitter, + update, + translate, + transition, + slide, + loop, + grabCursor, + events: events$1, + breakpoints, + checkOverflow: checkOverflow$1, + classes, + images + }; + const extendedDefaults = {}; + + class Swiper { + constructor() { + let el; + let params; + + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') { + params = args[0]; + } else { + [el, params] = args; + } + + if (!params) params = {}; + params = extend({}, params); + if (el && !params.el) params.el = el; + + if (params.el && $(params.el).length > 1) { + const swipers = []; + $(params.el).each(containerEl => { + const newParams = extend({}, params, { + el: containerEl + }); + swipers.push(new Swiper(newParams)); + }); + return swipers; + } // Swiper Instance + + + const swiper = this; + swiper.__swiper__ = true; + swiper.support = getSupport(); + swiper.device = getDevice({ + userAgent: params.userAgent + }); + swiper.browser = getBrowser(); + swiper.eventsListeners = {}; + swiper.eventsAnyListeners = []; + swiper.modules = [...swiper.__modules__]; + + if (params.modules && Array.isArray(params.modules)) { + swiper.modules.push(...params.modules); + } + + const allModulesParams = {}; + swiper.modules.forEach(mod => { + mod({ + swiper, + extendParams: moduleExtendParams(params, allModulesParams), + on: swiper.on.bind(swiper), + once: swiper.once.bind(swiper), + off: swiper.off.bind(swiper), + emit: swiper.emit.bind(swiper) + }); + }); // Extend defaults with modules params + + const swiperParams = extend({}, defaults, allModulesParams); // Extend defaults with passed params + + swiper.params = extend({}, swiperParams, extendedDefaults, params); + swiper.originalParams = extend({}, swiper.params); + swiper.passedParams = extend({}, params); // add event listeners + + if (swiper.params && swiper.params.on) { + Object.keys(swiper.params.on).forEach(eventName => { + swiper.on(eventName, swiper.params.on[eventName]); + }); + } + + if (swiper.params && swiper.params.onAny) { + swiper.onAny(swiper.params.onAny); + } // Save Dom lib + + + swiper.$ = $; // Extend Swiper + + Object.assign(swiper, { + enabled: swiper.params.enabled, + el, + // Classes + classNames: [], + // Slides + slides: $(), + slidesGrid: [], + snapGrid: [], + slidesSizesGrid: [], + + // isDirection + isHorizontal() { + return swiper.params.direction === 'horizontal'; + }, + + isVertical() { + return swiper.params.direction === 'vertical'; + }, + + // Indexes + activeIndex: 0, + realIndex: 0, + // + isBeginning: true, + isEnd: false, + // Props + translate: 0, + previousTranslate: 0, + progress: 0, + velocity: 0, + animating: false, + // Locks + allowSlideNext: swiper.params.allowSlideNext, + allowSlidePrev: swiper.params.allowSlidePrev, + // Touch Events + touchEvents: function touchEvents() { + const touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel']; + const desktop = ['pointerdown', 'pointermove', 'pointerup']; + swiper.touchEventsTouch = { + start: touch[0], + move: touch[1], + end: touch[2], + cancel: touch[3] + }; + swiper.touchEventsDesktop = { + start: desktop[0], + move: desktop[1], + end: desktop[2] + }; + return swiper.support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop; + }(), + touchEventsData: { + isTouched: undefined, + isMoved: undefined, + allowTouchCallbacks: undefined, + touchStartTime: undefined, + isScrolling: undefined, + currentTranslate: undefined, + startTranslate: undefined, + allowThresholdMove: undefined, + // Form elements to match + focusableElements: swiper.params.focusableElements, + // Last click time + lastClickTime: now(), + clickTimeout: undefined, + // Velocities + velocities: [], + allowMomentumBounce: undefined, + isTouchEvent: undefined, + startMoving: undefined + }, + // Clicks + allowClick: true, + // Touches + allowTouchMove: swiper.params.allowTouchMove, + touches: { + startX: 0, + startY: 0, + currentX: 0, + currentY: 0, + diff: 0 + }, + // Images + imagesToLoad: [], + imagesLoaded: 0 + }); + swiper.emit('_swiper'); // Init + + if (swiper.params.init) { + swiper.init(); + } // Return app instance + + + return swiper; + } + + enable() { + const swiper = this; + if (swiper.enabled) return; + swiper.enabled = true; + + if (swiper.params.grabCursor) { + swiper.setGrabCursor(); + } + + swiper.emit('enable'); + } + + disable() { + const swiper = this; + if (!swiper.enabled) return; + swiper.enabled = false; + + if (swiper.params.grabCursor) { + swiper.unsetGrabCursor(); + } + + swiper.emit('disable'); + } + + setProgress(progress, speed) { + const swiper = this; + progress = Math.min(Math.max(progress, 0), 1); + const min = swiper.minTranslate(); + const max = swiper.maxTranslate(); + const current = (max - min) * progress + min; + swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + + emitContainerClasses() { + const swiper = this; + if (!swiper.params._emitClasses || !swiper.el) return; + const cls = swiper.el.className.split(' ').filter(className => { + return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0; + }); + swiper.emit('_containerClasses', cls.join(' ')); + } + + getSlideClasses(slideEl) { + const swiper = this; + if (swiper.destroyed) return ''; + return slideEl.className.split(' ').filter(className => { + return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0; + }).join(' '); + } + + emitSlidesClasses() { + const swiper = this; + if (!swiper.params._emitClasses || !swiper.el) return; + const updates = []; + swiper.slides.each(slideEl => { + const classNames = swiper.getSlideClasses(slideEl); + updates.push({ + slideEl, + classNames + }); + swiper.emit('_slideClass', slideEl, classNames); + }); + swiper.emit('_slideClasses', updates); + } + + slidesPerViewDynamic(view, exact) { + if (view === void 0) { + view = 'current'; + } + + if (exact === void 0) { + exact = false; + } + + const swiper = this; + const { + params, + slides, + slidesGrid, + slidesSizesGrid, + size: swiperSize, + activeIndex + } = swiper; + let spv = 1; + + if (params.centeredSlides) { + let slideSize = slides[activeIndex].swiperSlideSize; + let breakLoop; + + for (let i = activeIndex + 1; i < slides.length; i += 1) { + if (slides[i] && !breakLoop) { + slideSize += slides[i].swiperSlideSize; + spv += 1; + if (slideSize > swiperSize) breakLoop = true; + } + } + + for (let i = activeIndex - 1; i >= 0; i -= 1) { + if (slides[i] && !breakLoop) { + slideSize += slides[i].swiperSlideSize; + spv += 1; + if (slideSize > swiperSize) breakLoop = true; + } + } + } else { + // eslint-disable-next-line + if (view === 'current') { + for (let i = activeIndex + 1; i < slides.length; i += 1) { + const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize; + + if (slideInView) { + spv += 1; + } + } + } else { + // previous + for (let i = activeIndex - 1; i >= 0; i -= 1) { + const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize; + + if (slideInView) { + spv += 1; + } + } + } + } + + return spv; + } + + update() { + const swiper = this; + if (!swiper || swiper.destroyed) return; + const { + snapGrid, + params + } = swiper; // Breakpoints + + if (params.breakpoints) { + swiper.setBreakpoint(); + } + + swiper.updateSize(); + swiper.updateSlides(); + swiper.updateProgress(); + swiper.updateSlidesClasses(); + + function setTranslate() { + const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; + const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); + swiper.setTranslate(newTranslate); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + + let translated; + + if (swiper.params.freeMode && swiper.params.freeMode.enabled) { + setTranslate(); + + if (swiper.params.autoHeight) { + swiper.updateAutoHeight(); + } + } else { + if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { + translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true); + } else { + translated = swiper.slideTo(swiper.activeIndex, 0, false, true); + } + + if (!translated) { + setTranslate(); + } + } + + if (params.watchOverflow && snapGrid !== swiper.snapGrid) { + swiper.checkOverflow(); + } + + swiper.emit('update'); + } + + changeDirection(newDirection, needUpdate) { + if (needUpdate === void 0) { + needUpdate = true; + } + + const swiper = this; + const currentDirection = swiper.params.direction; + + if (!newDirection) { + // eslint-disable-next-line + newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal'; + } + + if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') { + return swiper; + } + + swiper.$el.removeClass(`${swiper.params.containerModifierClass}${currentDirection}`).addClass(`${swiper.params.containerModifierClass}${newDirection}`); + swiper.emitContainerClasses(); + swiper.params.direction = newDirection; + swiper.slides.each(slideEl => { + if (newDirection === 'vertical') { + slideEl.style.width = ''; + } else { + slideEl.style.height = ''; + } + }); + swiper.emit('changeDirection'); + if (needUpdate) swiper.update(); + return swiper; + } + + mount(el) { + const swiper = this; + if (swiper.mounted) return true; // Find el + + const $el = $(el || swiper.params.el); + el = $el[0]; + + if (!el) { + return false; + } + + el.swiper = swiper; + + const getWrapperSelector = () => { + return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`; + }; + + const getWrapper = () => { + if (el && el.shadowRoot && el.shadowRoot.querySelector) { + const res = $(el.shadowRoot.querySelector(getWrapperSelector())); // Children needs to return slot items + + res.children = options => $el.children(options); + + return res; + } + + return $el.children(getWrapperSelector()); + }; // Find Wrapper + + + let $wrapperEl = getWrapper(); + + if ($wrapperEl.length === 0 && swiper.params.createElements) { + const document = getDocument(); + const wrapper = document.createElement('div'); + $wrapperEl = $(wrapper); + wrapper.className = swiper.params.wrapperClass; + $el.append(wrapper); + $el.children(`.${swiper.params.slideClass}`).each(slideEl => { + $wrapperEl.append(slideEl); + }); + } + + Object.assign(swiper, { + $el, + el, + $wrapperEl, + wrapperEl: $wrapperEl[0], + mounted: true, + // RTL + rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl', + rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), + wrongRTL: $wrapperEl.css('display') === '-webkit-box' + }); + return true; + } + + init(el) { + const swiper = this; + if (swiper.initialized) return swiper; + const mounted = swiper.mount(el); + if (mounted === false) return swiper; + swiper.emit('beforeInit'); // Set breakpoint + + if (swiper.params.breakpoints) { + swiper.setBreakpoint(); + } // Add Classes + + + swiper.addClasses(); // Create loop + + if (swiper.params.loop) { + swiper.loopCreate(); + } // Update size + + + swiper.updateSize(); // Update slides + + swiper.updateSlides(); + + if (swiper.params.watchOverflow) { + swiper.checkOverflow(); + } // Set Grab Cursor + + + if (swiper.params.grabCursor && swiper.enabled) { + swiper.setGrabCursor(); + } + + if (swiper.params.preloadImages) { + swiper.preloadImages(); + } // Slide To Initial Slide + + + if (swiper.params.loop) { + swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit, false, true); + } else { + swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true); + } // Attach events + + + swiper.attachEvents(); // Init Flag + + swiper.initialized = true; // Emit + + swiper.emit('init'); + swiper.emit('afterInit'); + return swiper; + } + + destroy(deleteInstance, cleanStyles) { + if (deleteInstance === void 0) { + deleteInstance = true; + } + + if (cleanStyles === void 0) { + cleanStyles = true; + } + + const swiper = this; + const { + params, + $el, + $wrapperEl, + slides + } = swiper; + + if (typeof swiper.params === 'undefined' || swiper.destroyed) { + return null; + } + + swiper.emit('beforeDestroy'); // Init Flag + + swiper.initialized = false; // Detach events + + swiper.detachEvents(); // Destroy loop + + if (params.loop) { + swiper.loopDestroy(); + } // Cleanup styles + + + if (cleanStyles) { + swiper.removeClasses(); + $el.removeAttr('style'); + $wrapperEl.removeAttr('style'); + + if (slides && slides.length) { + slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index'); + } + } + + swiper.emit('destroy'); // Detach emitter events + + Object.keys(swiper.eventsListeners).forEach(eventName => { + swiper.off(eventName); + }); + + if (deleteInstance !== false) { + swiper.$el[0].swiper = null; + deleteProps(swiper); + } + + swiper.destroyed = true; + return null; + } + + static extendDefaults(newDefaults) { + extend(extendedDefaults, newDefaults); + } + + static get extendedDefaults() { + return extendedDefaults; + } + + static get defaults() { + return defaults; + } + + static installModule(mod) { + if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = []; + const modules = Swiper.prototype.__modules__; + + if (typeof mod === 'function' && modules.indexOf(mod) < 0) { + modules.push(mod); + } + } + + static use(module) { + if (Array.isArray(module)) { + module.forEach(m => Swiper.installModule(m)); + return Swiper; + } + + Swiper.installModule(module); + return Swiper; + } + + } + + Object.keys(prototypes).forEach(prototypeGroup => { + Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => { + Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; + }); + }); + Swiper.use([Resize, Observer]); + + function Virtual(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + extendParams({ + virtual: { + enabled: false, + slides: [], + cache: true, + renderSlide: null, + renderExternal: null, + renderExternalUpdate: true, + addSlidesBefore: 0, + addSlidesAfter: 0 + } + }); + let cssModeTimeout; + swiper.virtual = { + cache: {}, + from: undefined, + to: undefined, + slides: [], + offset: 0, + slidesGrid: [] + }; + + function renderSlide(slide, index) { + const params = swiper.params.virtual; + + if (params.cache && swiper.virtual.cache[index]) { + return swiper.virtual.cache[index]; + } + + const $slideEl = params.renderSlide ? $(params.renderSlide.call(swiper, slide, index)) : $(`
${slide}
`); + if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index); + if (params.cache) swiper.virtual.cache[index] = $slideEl; + return $slideEl; + } + + function update(force) { + const { + slidesPerView, + slidesPerGroup, + centeredSlides + } = swiper.params; + const { + addSlidesBefore, + addSlidesAfter + } = swiper.params.virtual; + const { + from: previousFrom, + to: previousTo, + slides, + slidesGrid: previousSlidesGrid, + offset: previousOffset + } = swiper.virtual; + + if (!swiper.params.cssMode) { + swiper.updateActiveIndex(); + } + + const activeIndex = swiper.activeIndex || 0; + let offsetProp; + if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top'; + let slidesAfter; + let slidesBefore; + + if (centeredSlides) { + slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter; + slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore; + } else { + slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesAfter; + slidesBefore = slidesPerGroup + addSlidesBefore; + } + + const from = Math.max((activeIndex || 0) - slidesBefore, 0); + const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1); + const offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); + Object.assign(swiper.virtual, { + from, + to, + offset, + slidesGrid: swiper.slidesGrid + }); + + function onRendered() { + swiper.updateSlides(); + swiper.updateProgress(); + swiper.updateSlidesClasses(); + + if (swiper.lazy && swiper.params.lazy.enabled) { + swiper.lazy.load(); + } + + emit('virtualUpdate'); + } + + if (previousFrom === from && previousTo === to && !force) { + if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) { + swiper.slides.css(offsetProp, `${offset}px`); + } + + swiper.updateProgress(); + emit('virtualUpdate'); + return; + } + + if (swiper.params.virtual.renderExternal) { + swiper.params.virtual.renderExternal.call(swiper, { + offset, + from, + to, + slides: function getSlides() { + const slidesToRender = []; + + for (let i = from; i <= to; i += 1) { + slidesToRender.push(slides[i]); + } + + return slidesToRender; + }() + }); + + if (swiper.params.virtual.renderExternalUpdate) { + onRendered(); + } else { + emit('virtualUpdate'); + } + + return; + } + + const prependIndexes = []; + const appendIndexes = []; + + if (force) { + swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove(); + } else { + for (let i = previousFrom; i <= previousTo; i += 1) { + if (i < from || i > to) { + swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove(); + } + } + } + + for (let i = 0; i < slides.length; i += 1) { + if (i >= from && i <= to) { + if (typeof previousTo === 'undefined' || force) { + appendIndexes.push(i); + } else { + if (i > previousTo) appendIndexes.push(i); + if (i < previousFrom) prependIndexes.push(i); + } + } + } + + appendIndexes.forEach(index => { + swiper.$wrapperEl.append(renderSlide(slides[index], index)); + }); + prependIndexes.sort((a, b) => b - a).forEach(index => { + swiper.$wrapperEl.prepend(renderSlide(slides[index], index)); + }); + swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset}px`); + onRendered(); + } + + function appendSlide(slides) { + if (typeof slides === 'object' && 'length' in slides) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) swiper.virtual.slides.push(slides[i]); + } + } else { + swiper.virtual.slides.push(slides); + } + + update(true); + } + + function prependSlide(slides) { + const activeIndex = swiper.activeIndex; + let newActiveIndex = activeIndex + 1; + let numberOfNewSlides = 1; + + if (Array.isArray(slides)) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) swiper.virtual.slides.unshift(slides[i]); + } + + newActiveIndex = activeIndex + slides.length; + numberOfNewSlides = slides.length; + } else { + swiper.virtual.slides.unshift(slides); + } + + if (swiper.params.virtual.cache) { + const cache = swiper.virtual.cache; + const newCache = {}; + Object.keys(cache).forEach(cachedIndex => { + const $cachedEl = cache[cachedIndex]; + const cachedElIndex = $cachedEl.attr('data-swiper-slide-index'); + + if (cachedElIndex) { + $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + numberOfNewSlides); + } + + newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl; + }); + swiper.virtual.cache = newCache; + } + + update(true); + swiper.slideTo(newActiveIndex, 0); + } + + function removeSlide(slidesIndexes) { + if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return; + let activeIndex = swiper.activeIndex; + + if (Array.isArray(slidesIndexes)) { + for (let i = slidesIndexes.length - 1; i >= 0; i -= 1) { + swiper.virtual.slides.splice(slidesIndexes[i], 1); + + if (swiper.params.virtual.cache) { + delete swiper.virtual.cache[slidesIndexes[i]]; + } + + if (slidesIndexes[i] < activeIndex) activeIndex -= 1; + activeIndex = Math.max(activeIndex, 0); + } + } else { + swiper.virtual.slides.splice(slidesIndexes, 1); + + if (swiper.params.virtual.cache) { + delete swiper.virtual.cache[slidesIndexes]; + } + + if (slidesIndexes < activeIndex) activeIndex -= 1; + activeIndex = Math.max(activeIndex, 0); + } + + update(true); + swiper.slideTo(activeIndex, 0); + } + + function removeAllSlides() { + swiper.virtual.slides = []; + + if (swiper.params.virtual.cache) { + swiper.virtual.cache = {}; + } + + update(true); + swiper.slideTo(0, 0); + } + + on('beforeInit', () => { + if (!swiper.params.virtual.enabled) return; + swiper.virtual.slides = swiper.params.virtual.slides; + swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`); + swiper.params.watchSlidesProgress = true; + swiper.originalParams.watchSlidesProgress = true; + + if (!swiper.params.initialSlide) { + update(); + } + }); + on('setTranslate', () => { + if (!swiper.params.virtual.enabled) return; + + if (swiper.params.cssMode && !swiper._immediateVirtual) { + clearTimeout(cssModeTimeout); + cssModeTimeout = setTimeout(() => { + update(); + }, 100); + } else { + update(); + } + }); + on('init update resize', () => { + if (!swiper.params.virtual.enabled) return; + + if (swiper.params.cssMode) { + setCSSProperty(swiper.wrapperEl, '--swiper-virtual-size', `${swiper.virtualSize}px`); + } + }); + Object.assign(swiper.virtual, { + appendSlide, + prependSlide, + removeSlide, + removeAllSlides, + update + }); + } + + /* eslint-disable consistent-return */ + function Keyboard(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const document = getDocument(); + const window = getWindow(); + swiper.keyboard = { + enabled: false + }; + extendParams({ + keyboard: { + enabled: false, + onlyInViewport: true, + pageUpDown: true + } + }); + + function handle(event) { + if (!swiper.enabled) return; + const { + rtlTranslate: rtl + } = swiper; + let e = event; + if (e.originalEvent) e = e.originalEvent; // jquery fix + + const kc = e.keyCode || e.charCode; + const pageUpDown = swiper.params.keyboard.pageUpDown; + const isPageUp = pageUpDown && kc === 33; + const isPageDown = pageUpDown && kc === 34; + const isArrowLeft = kc === 37; + const isArrowRight = kc === 39; + const isArrowUp = kc === 38; + const isArrowDown = kc === 40; // Directions locks + + if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) { + return false; + } + + if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) { + return false; + } + + if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { + return undefined; + } + + if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) { + return undefined; + } + + if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) { + let inView = false; // Check that swiper should be inside of visible area of window + + if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) { + return undefined; + } + + const $el = swiper.$el; + const swiperWidth = $el[0].clientWidth; + const swiperHeight = $el[0].clientHeight; + const windowWidth = window.innerWidth; + const windowHeight = window.innerHeight; + const swiperOffset = swiper.$el.offset(); + if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; + const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiperWidth, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiperHeight], [swiperOffset.left + swiperWidth, swiperOffset.top + swiperHeight]]; + + for (let i = 0; i < swiperCoord.length; i += 1) { + const point = swiperCoord[i]; + + if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) { + if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line + + inView = true; + } + } + + if (!inView) return undefined; + } + + if (swiper.isHorizontal()) { + if (isPageUp || isPageDown || isArrowLeft || isArrowRight) { + if (e.preventDefault) e.preventDefault();else e.returnValue = false; + } + + if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext(); + if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev(); + } else { + if (isPageUp || isPageDown || isArrowUp || isArrowDown) { + if (e.preventDefault) e.preventDefault();else e.returnValue = false; + } + + if (isPageDown || isArrowDown) swiper.slideNext(); + if (isPageUp || isArrowUp) swiper.slidePrev(); + } + + emit('keyPress', kc); + return undefined; + } + + function enable() { + if (swiper.keyboard.enabled) return; + $(document).on('keydown', handle); + swiper.keyboard.enabled = true; + } + + function disable() { + if (!swiper.keyboard.enabled) return; + $(document).off('keydown', handle); + swiper.keyboard.enabled = false; + } + + on('init', () => { + if (swiper.params.keyboard.enabled) { + enable(); + } + }); + on('destroy', () => { + if (swiper.keyboard.enabled) { + disable(); + } + }); + Object.assign(swiper.keyboard, { + enable, + disable + }); + } + + /* eslint-disable consistent-return */ + function Mousewheel(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const window = getWindow(); + extendParams({ + mousewheel: { + enabled: false, + releaseOnEdges: false, + invert: false, + forceToAxis: false, + sensitivity: 1, + eventsTarget: 'container', + thresholdDelta: null, + thresholdTime: null + } + }); + swiper.mousewheel = { + enabled: false + }; + let timeout; + let lastScrollTime = now(); + let lastEventBeforeSnap; + const recentWheelEvents = []; + + function normalize(e) { + // Reasonable defaults + const PIXEL_STEP = 10; + const LINE_HEIGHT = 40; + const PAGE_HEIGHT = 800; + let sX = 0; + let sY = 0; // spinX, spinY + + let pX = 0; + let pY = 0; // pixelX, pixelY + // Legacy + + if ('detail' in e) { + sY = e.detail; + } + + if ('wheelDelta' in e) { + sY = -e.wheelDelta / 120; + } + + if ('wheelDeltaY' in e) { + sY = -e.wheelDeltaY / 120; + } + + if ('wheelDeltaX' in e) { + sX = -e.wheelDeltaX / 120; + } // side scrolling on FF with DOMMouseScroll + + + if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { + sX = sY; + sY = 0; + } + + pX = sX * PIXEL_STEP; + pY = sY * PIXEL_STEP; + + if ('deltaY' in e) { + pY = e.deltaY; + } + + if ('deltaX' in e) { + pX = e.deltaX; + } + + if (e.shiftKey && !pX) { + // if user scrolls with shift he wants horizontal scroll + pX = pY; + pY = 0; + } + + if ((pX || pY) && e.deltaMode) { + if (e.deltaMode === 1) { + // delta in LINE units + pX *= LINE_HEIGHT; + pY *= LINE_HEIGHT; + } else { + // delta in PAGE units + pX *= PAGE_HEIGHT; + pY *= PAGE_HEIGHT; + } + } // Fall-back if spin cannot be determined + + + if (pX && !sX) { + sX = pX < 1 ? -1 : 1; + } + + if (pY && !sY) { + sY = pY < 1 ? -1 : 1; + } + + return { + spinX: sX, + spinY: sY, + pixelX: pX, + pixelY: pY + }; + } + + function handleMouseEnter() { + if (!swiper.enabled) return; + swiper.mouseEntered = true; + } + + function handleMouseLeave() { + if (!swiper.enabled) return; + swiper.mouseEntered = false; + } + + function animateSlider(newEvent) { + if (swiper.params.mousewheel.thresholdDelta && newEvent.delta < swiper.params.mousewheel.thresholdDelta) { + // Prevent if delta of wheel scroll delta is below configured threshold + return false; + } + + if (swiper.params.mousewheel.thresholdTime && now() - lastScrollTime < swiper.params.mousewheel.thresholdTime) { + // Prevent if time between scrolls is below configured threshold + return false; + } // If the movement is NOT big enough and + // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider): + // Don't go any further (avoid insignificant scroll movement). + + + if (newEvent.delta >= 6 && now() - lastScrollTime < 60) { + // Return false as a default + return true; + } // If user is scrolling towards the end: + // If the slider hasn't hit the latest slide or + // if the slider is a loop and + // if the slider isn't moving right now: + // Go to next slide and + // emit a scroll event. + // Else (the user is scrolling towards the beginning) and + // if the slider hasn't hit the first slide or + // if the slider is a loop and + // if the slider isn't moving right now: + // Go to prev slide and + // emit a scroll event. + + + if (newEvent.direction < 0) { + if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { + swiper.slideNext(); + emit('scroll', newEvent.raw); + } + } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { + swiper.slidePrev(); + emit('scroll', newEvent.raw); + } // If you got here is because an animation has been triggered so store the current time + + + lastScrollTime = new window.Date().getTime(); // Return false as a default + + return false; + } + + function releaseScroll(newEvent) { + const params = swiper.params.mousewheel; + + if (newEvent.direction < 0) { + if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) { + // Return true to animate scroll on edges + return true; + } + } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) { + // Return true to animate scroll on edges + return true; + } + + return false; + } + + function handle(event) { + let e = event; + let disableParentSwiper = true; + if (!swiper.enabled) return; + const params = swiper.params.mousewheel; + + if (swiper.params.cssMode) { + e.preventDefault(); + } + + let target = swiper.$el; + + if (swiper.params.mousewheel.eventsTarget !== 'container') { + target = $(swiper.params.mousewheel.eventsTarget); + } + + if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true; + if (e.originalEvent) e = e.originalEvent; // jquery fix + + let delta = 0; + const rtlFactor = swiper.rtlTranslate ? -1 : 1; + const data = normalize(e); + + if (params.forceToAxis) { + if (swiper.isHorizontal()) { + if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true; + } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true; + } else { + delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; + } + + if (delta === 0) return true; + if (params.invert) delta = -delta; // Get the scroll positions + + let positions = swiper.getTranslate() + delta * params.sensitivity; + if (positions >= swiper.minTranslate()) positions = swiper.minTranslate(); + if (positions <= swiper.maxTranslate()) positions = swiper.maxTranslate(); // When loop is true: + // the disableParentSwiper will be true. + // When loop is false: + // if the scroll positions is not on edge, + // then the disableParentSwiper will be true. + // if the scroll on edge positions, + // then the disableParentSwiper will be false. + + disableParentSwiper = swiper.params.loop ? true : !(positions === swiper.minTranslate() || positions === swiper.maxTranslate()); + if (disableParentSwiper && swiper.params.nested) e.stopPropagation(); + + if (!swiper.params.freeMode || !swiper.params.freeMode.enabled) { + // Register the new event in a variable which stores the relevant data + const newEvent = { + time: now(), + delta: Math.abs(delta), + direction: Math.sign(delta), + raw: event + }; // Keep the most recent events + + if (recentWheelEvents.length >= 2) { + recentWheelEvents.shift(); // only store the last N events + } + + const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; + recentWheelEvents.push(newEvent); // If there is at least one previous recorded event: + // If direction has changed or + // if the scroll is quicker than the previous one: + // Animate the slider. + // Else (this is the first time the wheel is moved): + // Animate the slider. + + if (prevEvent) { + if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) { + animateSlider(newEvent); + } + } else { + animateSlider(newEvent); + } // If it's time to release the scroll: + // Return now so you don't hit the preventDefault. + + + if (releaseScroll(newEvent)) { + return true; + } + } else { + // Freemode or scrollContainer: + // If we recently snapped after a momentum scroll, then ignore wheel events + // to give time for the deceleration to finish. Stop ignoring after 500 msecs + // or if it's a new scroll (larger delta or inverse sign as last event before + // an end-of-momentum snap). + const newEvent = { + time: now(), + delta: Math.abs(delta), + direction: Math.sign(delta) + }; + const ignoreWheelEvents = lastEventBeforeSnap && newEvent.time < lastEventBeforeSnap.time + 500 && newEvent.delta <= lastEventBeforeSnap.delta && newEvent.direction === lastEventBeforeSnap.direction; + + if (!ignoreWheelEvents) { + lastEventBeforeSnap = undefined; + + if (swiper.params.loop) { + swiper.loopFix(); + } + + let position = swiper.getTranslate() + delta * params.sensitivity; + const wasBeginning = swiper.isBeginning; + const wasEnd = swiper.isEnd; + if (position >= swiper.minTranslate()) position = swiper.minTranslate(); + if (position <= swiper.maxTranslate()) position = swiper.maxTranslate(); + swiper.setTransition(0); + swiper.setTranslate(position); + swiper.updateProgress(); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + + if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) { + swiper.updateSlidesClasses(); + } + + if (swiper.params.freeMode.sticky) { + // When wheel scrolling starts with sticky (aka snap) enabled, then detect + // the end of a momentum scroll by storing recent (N=15?) wheel events. + // 1. do all N events have decreasing or same (absolute value) delta? + // 2. did all N events arrive in the last M (M=500?) msecs? + // 3. does the earliest event have an (absolute value) delta that's + // at least P (P=1?) larger than the most recent event's delta? + // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels? + // If 1-4 are "yes" then we're near the end of a momentum scroll deceleration. + // Snap immediately and ignore remaining wheel events in this scroll. + // See comment above for "remaining wheel events in this scroll" determination. + // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event. + clearTimeout(timeout); + timeout = undefined; + + if (recentWheelEvents.length >= 15) { + recentWheelEvents.shift(); // only store the last N events + } + + const prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; + const firstEvent = recentWheelEvents[0]; + recentWheelEvents.push(newEvent); + + if (prevEvent && (newEvent.delta > prevEvent.delta || newEvent.direction !== prevEvent.direction)) { + // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log. + recentWheelEvents.splice(0); + } else if (recentWheelEvents.length >= 15 && newEvent.time - firstEvent.time < 500 && firstEvent.delta - newEvent.delta >= 1 && newEvent.delta <= 6) { + // We're at the end of the deceleration of a momentum scroll, so there's no need + // to wait for more events. Snap ASAP on the next tick. + // Also, because there's some remaining momentum we'll bias the snap in the + // direction of the ongoing scroll because it's better UX for the scroll to snap + // in the same direction as the scroll instead of reversing to snap. Therefore, + // if it's already scrolled more than 20% in the current direction, keep going. + const snapToThreshold = delta > 0 ? 0.8 : 0.2; + lastEventBeforeSnap = newEvent; + recentWheelEvents.splice(0); + timeout = nextTick(() => { + swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); + }, 0); // no delay; move on next tick + } + + if (!timeout) { + // if we get here, then we haven't detected the end of a momentum scroll, so + // we'll consider a scroll "complete" when there haven't been any wheel events + // for 500ms. + timeout = nextTick(() => { + const snapToThreshold = 0.5; + lastEventBeforeSnap = newEvent; + recentWheelEvents.splice(0); + swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); + }, 500); + } + } // Emit event + + + if (!ignoreWheelEvents) emit('scroll', e); // Stop autoplay + + if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); // Return page scroll on edge positions + + if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true; + } + } + + if (e.preventDefault) e.preventDefault();else e.returnValue = false; + return false; + } + + function events(method) { + let target = swiper.$el; + + if (swiper.params.mousewheel.eventsTarget !== 'container') { + target = $(swiper.params.mousewheel.eventsTarget); + } + + target[method]('mouseenter', handleMouseEnter); + target[method]('mouseleave', handleMouseLeave); + target[method]('wheel', handle); + } + + function enable() { + if (swiper.params.cssMode) { + swiper.wrapperEl.removeEventListener('wheel', handle); + return true; + } + + if (swiper.mousewheel.enabled) return false; + events('on'); + swiper.mousewheel.enabled = true; + return true; + } + + function disable() { + if (swiper.params.cssMode) { + swiper.wrapperEl.addEventListener(event, handle); + return true; + } + + if (!swiper.mousewheel.enabled) return false; + events('off'); + swiper.mousewheel.enabled = false; + return true; + } + + on('init', () => { + if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) { + disable(); + } + + if (swiper.params.mousewheel.enabled) enable(); + }); + on('destroy', () => { + if (swiper.params.cssMode) { + enable(); + } + + if (swiper.mousewheel.enabled) disable(); + }); + Object.assign(swiper.mousewheel, { + enable, + disable + }); + } + + function createElementIfNotDefined(swiper, originalParams, params, checkProps) { + const document = getDocument(); + + if (swiper.params.createElements) { + Object.keys(checkProps).forEach(key => { + if (!params[key] && params.auto === true) { + let element = swiper.$el.children(`.${checkProps[key]}`)[0]; + + if (!element) { + element = document.createElement('div'); + element.className = checkProps[key]; + swiper.$el.append(element); + } + + params[key] = element; + originalParams[key] = element; + } + }); + } + + return params; + } + + function Navigation(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + extendParams({ + navigation: { + nextEl: null, + prevEl: null, + hideOnClick: false, + disabledClass: 'swiper-button-disabled', + hiddenClass: 'swiper-button-hidden', + lockClass: 'swiper-button-lock' + } + }); + swiper.navigation = { + nextEl: null, + $nextEl: null, + prevEl: null, + $prevEl: null + }; + + function getEl(el) { + let $el; + + if (el) { + $el = $(el); + + if (swiper.params.uniqueNavElements && typeof el === 'string' && $el.length > 1 && swiper.$el.find(el).length === 1) { + $el = swiper.$el.find(el); + } + } + + return $el; + } + + function toggleEl($el, disabled) { + const params = swiper.params.navigation; + + if ($el && $el.length > 0) { + $el[disabled ? 'addClass' : 'removeClass'](params.disabledClass); + if ($el[0] && $el[0].tagName === 'BUTTON') $el[0].disabled = disabled; + + if (swiper.params.watchOverflow && swiper.enabled) { + $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + } + } + } + + function update() { + // Update Navigation Buttons + if (swiper.params.loop) return; + const { + $nextEl, + $prevEl + } = swiper.navigation; + toggleEl($prevEl, swiper.isBeginning && !swiper.params.rewind); + toggleEl($nextEl, swiper.isEnd && !swiper.params.rewind); + } + + function onPrevClick(e) { + e.preventDefault(); + if (swiper.isBeginning && !swiper.params.loop && !swiper.params.rewind) return; + swiper.slidePrev(); + } + + function onNextClick(e) { + e.preventDefault(); + if (swiper.isEnd && !swiper.params.loop && !swiper.params.rewind) return; + swiper.slideNext(); + } + + function init() { + const params = swiper.params.navigation; + swiper.params.navigation = createElementIfNotDefined(swiper, swiper.originalParams.navigation, swiper.params.navigation, { + nextEl: 'swiper-button-next', + prevEl: 'swiper-button-prev' + }); + if (!(params.nextEl || params.prevEl)) return; + const $nextEl = getEl(params.nextEl); + const $prevEl = getEl(params.prevEl); + + if ($nextEl && $nextEl.length > 0) { + $nextEl.on('click', onNextClick); + } + + if ($prevEl && $prevEl.length > 0) { + $prevEl.on('click', onPrevClick); + } + + Object.assign(swiper.navigation, { + $nextEl, + nextEl: $nextEl && $nextEl[0], + $prevEl, + prevEl: $prevEl && $prevEl[0] + }); + + if (!swiper.enabled) { + if ($nextEl) $nextEl.addClass(params.lockClass); + if ($prevEl) $prevEl.addClass(params.lockClass); + } + } + + function destroy() { + const { + $nextEl, + $prevEl + } = swiper.navigation; + + if ($nextEl && $nextEl.length) { + $nextEl.off('click', onNextClick); + $nextEl.removeClass(swiper.params.navigation.disabledClass); + } + + if ($prevEl && $prevEl.length) { + $prevEl.off('click', onPrevClick); + $prevEl.removeClass(swiper.params.navigation.disabledClass); + } + } + + on('init', () => { + init(); + update(); + }); + on('toEdge fromEdge lock unlock', () => { + update(); + }); + on('destroy', () => { + destroy(); + }); + on('enable disable', () => { + const { + $nextEl, + $prevEl + } = swiper.navigation; + + if ($nextEl) { + $nextEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass); + } + + if ($prevEl) { + $prevEl[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.navigation.lockClass); + } + }); + on('click', (_s, e) => { + const { + $nextEl, + $prevEl + } = swiper.navigation; + const targetEl = e.target; + + if (swiper.params.navigation.hideOnClick && !$(targetEl).is($prevEl) && !$(targetEl).is($nextEl)) { + if (swiper.pagination && swiper.params.pagination && swiper.params.pagination.clickable && (swiper.pagination.el === targetEl || swiper.pagination.el.contains(targetEl))) return; + let isHidden; + + if ($nextEl) { + isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass); + } else if ($prevEl) { + isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass); + } + + if (isHidden === true) { + emit('navigationShow'); + } else { + emit('navigationHide'); + } + + if ($nextEl) { + $nextEl.toggleClass(swiper.params.navigation.hiddenClass); + } + + if ($prevEl) { + $prevEl.toggleClass(swiper.params.navigation.hiddenClass); + } + } + }); + Object.assign(swiper.navigation, { + update, + init, + destroy + }); + } + + function classesToSelector(classes) { + if (classes === void 0) { + classes = ''; + } + + return `.${classes.trim().replace(/([\.:!\/])/g, '\\$1') // eslint-disable-line + .replace(/ /g, '.')}`; + } + + function Pagination(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const pfx = 'swiper-pagination'; + extendParams({ + pagination: { + el: null, + bulletElement: 'span', + clickable: false, + hideOnClick: false, + renderBullet: null, + renderProgressbar: null, + renderFraction: null, + renderCustom: null, + progressbarOpposite: false, + type: 'bullets', + // 'bullets' or 'progressbar' or 'fraction' or 'custom' + dynamicBullets: false, + dynamicMainBullets: 1, + formatFractionCurrent: number => number, + formatFractionTotal: number => number, + bulletClass: `${pfx}-bullet`, + bulletActiveClass: `${pfx}-bullet-active`, + modifierClass: `${pfx}-`, + currentClass: `${pfx}-current`, + totalClass: `${pfx}-total`, + hiddenClass: `${pfx}-hidden`, + progressbarFillClass: `${pfx}-progressbar-fill`, + progressbarOppositeClass: `${pfx}-progressbar-opposite`, + clickableClass: `${pfx}-clickable`, + lockClass: `${pfx}-lock`, + horizontalClass: `${pfx}-horizontal`, + verticalClass: `${pfx}-vertical` + } + }); + swiper.pagination = { + el: null, + $el: null, + bullets: [] + }; + let bulletSize; + let dynamicBulletIndex = 0; + + function isPaginationDisabled() { + return !swiper.params.pagination.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0; + } + + function setSideBullets($bulletEl, position) { + const { + bulletActiveClass + } = swiper.params.pagination; + $bulletEl[position]().addClass(`${bulletActiveClass}-${position}`)[position]().addClass(`${bulletActiveClass}-${position}-${position}`); + } + + function update() { + // Render || Update Pagination bullets/items + const rtl = swiper.rtl; + const params = swiper.params.pagination; + if (isPaginationDisabled()) return; + const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; + const $el = swiper.pagination.$el; // Current/Total + + let current; + const total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; + + if (swiper.params.loop) { + current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup); + + if (current > slidesLength - 1 - swiper.loopedSlides * 2) { + current -= slidesLength - swiper.loopedSlides * 2; + } + + if (current > total - 1) current -= total; + if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current; + } else if (typeof swiper.snapIndex !== 'undefined') { + current = swiper.snapIndex; + } else { + current = swiper.activeIndex || 0; + } // Types + + + if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { + const bullets = swiper.pagination.bullets; + let firstIndex; + let lastIndex; + let midIndex; + + if (params.dynamicBullets) { + bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true); + $el.css(swiper.isHorizontal() ? 'width' : 'height', `${bulletSize * (params.dynamicMainBullets + 4)}px`); + + if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) { + dynamicBulletIndex += current - (swiper.previousIndex - swiper.loopedSlides || 0); + + if (dynamicBulletIndex > params.dynamicMainBullets - 1) { + dynamicBulletIndex = params.dynamicMainBullets - 1; + } else if (dynamicBulletIndex < 0) { + dynamicBulletIndex = 0; + } + } + + firstIndex = Math.max(current - dynamicBulletIndex, 0); + lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); + midIndex = (lastIndex + firstIndex) / 2; + } + + bullets.removeClass(['', '-next', '-next-next', '-prev', '-prev-prev', '-main'].map(suffix => `${params.bulletActiveClass}${suffix}`).join(' ')); + + if ($el.length > 1) { + bullets.each(bullet => { + const $bullet = $(bullet); + const bulletIndex = $bullet.index(); + + if (bulletIndex === current) { + $bullet.addClass(params.bulletActiveClass); + } + + if (params.dynamicBullets) { + if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { + $bullet.addClass(`${params.bulletActiveClass}-main`); + } + + if (bulletIndex === firstIndex) { + setSideBullets($bullet, 'prev'); + } + + if (bulletIndex === lastIndex) { + setSideBullets($bullet, 'next'); + } + } + }); + } else { + const $bullet = bullets.eq(current); + const bulletIndex = $bullet.index(); + $bullet.addClass(params.bulletActiveClass); + + if (params.dynamicBullets) { + const $firstDisplayedBullet = bullets.eq(firstIndex); + const $lastDisplayedBullet = bullets.eq(lastIndex); + + for (let i = firstIndex; i <= lastIndex; i += 1) { + bullets.eq(i).addClass(`${params.bulletActiveClass}-main`); + } + + if (swiper.params.loop) { + if (bulletIndex >= bullets.length) { + for (let i = params.dynamicMainBullets; i >= 0; i -= 1) { + bullets.eq(bullets.length - i).addClass(`${params.bulletActiveClass}-main`); + } + + bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(`${params.bulletActiveClass}-prev`); + } else { + setSideBullets($firstDisplayedBullet, 'prev'); + setSideBullets($lastDisplayedBullet, 'next'); + } + } else { + setSideBullets($firstDisplayedBullet, 'prev'); + setSideBullets($lastDisplayedBullet, 'next'); + } + } + } + + if (params.dynamicBullets) { + const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); + const bulletsOffset = (bulletSize * dynamicBulletsLength - bulletSize) / 2 - midIndex * bulletSize; + const offsetProp = rtl ? 'right' : 'left'; + bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`); + } + } + + if (params.type === 'fraction') { + $el.find(classesToSelector(params.currentClass)).text(params.formatFractionCurrent(current + 1)); + $el.find(classesToSelector(params.totalClass)).text(params.formatFractionTotal(total)); + } + + if (params.type === 'progressbar') { + let progressbarDirection; + + if (params.progressbarOpposite) { + progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; + } else { + progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; + } + + const scale = (current + 1) / total; + let scaleX = 1; + let scaleY = 1; + + if (progressbarDirection === 'horizontal') { + scaleX = scale; + } else { + scaleY = scale; + } + + $el.find(classesToSelector(params.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed); + } + + if (params.type === 'custom' && params.renderCustom) { + $el.html(params.renderCustom(swiper, current + 1, total)); + emit('paginationRender', $el[0]); + } else { + emit('paginationUpdate', $el[0]); + } + + if (swiper.params.watchOverflow && swiper.enabled) { + $el[swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + } + } + + function render() { + // Render Container + const params = swiper.params.pagination; + if (isPaginationDisabled()) return; + const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; + const $el = swiper.pagination.$el; + let paginationHTML = ''; + + if (params.type === 'bullets') { + let numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; + + if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.loop && numberOfBullets > slidesLength) { + numberOfBullets = slidesLength; + } + + for (let i = 0; i < numberOfBullets; i += 1) { + if (params.renderBullet) { + paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); + } else { + paginationHTML += `<${params.bulletElement} class="${params.bulletClass}">`; + } + } + + $el.html(paginationHTML); + swiper.pagination.bullets = $el.find(classesToSelector(params.bulletClass)); + } + + if (params.type === 'fraction') { + if (params.renderFraction) { + paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); + } else { + paginationHTML = `` + ' / ' + ``; + } + + $el.html(paginationHTML); + } + + if (params.type === 'progressbar') { + if (params.renderProgressbar) { + paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); + } else { + paginationHTML = ``; + } + + $el.html(paginationHTML); + } + + if (params.type !== 'custom') { + emit('paginationRender', swiper.pagination.$el[0]); + } + } + + function init() { + swiper.params.pagination = createElementIfNotDefined(swiper, swiper.originalParams.pagination, swiper.params.pagination, { + el: 'swiper-pagination' + }); + const params = swiper.params.pagination; + if (!params.el) return; + let $el = $(params.el); + if ($el.length === 0) return; + + if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) { + $el = swiper.$el.find(params.el); // check if it belongs to another nested Swiper + + if ($el.length > 1) { + $el = $el.filter(el => { + if ($(el).parents('.swiper')[0] !== swiper.el) return false; + return true; + }); + } + } + + if (params.type === 'bullets' && params.clickable) { + $el.addClass(params.clickableClass); + } + + $el.addClass(params.modifierClass + params.type); + $el.addClass(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); + + if (params.type === 'bullets' && params.dynamicBullets) { + $el.addClass(`${params.modifierClass}${params.type}-dynamic`); + dynamicBulletIndex = 0; + + if (params.dynamicMainBullets < 1) { + params.dynamicMainBullets = 1; + } + } + + if (params.type === 'progressbar' && params.progressbarOpposite) { + $el.addClass(params.progressbarOppositeClass); + } + + if (params.clickable) { + $el.on('click', classesToSelector(params.bulletClass), function onClick(e) { + e.preventDefault(); + let index = $(this).index() * swiper.params.slidesPerGroup; + if (swiper.params.loop) index += swiper.loopedSlides; + swiper.slideTo(index); + }); + } + + Object.assign(swiper.pagination, { + $el, + el: $el[0] + }); + + if (!swiper.enabled) { + $el.addClass(params.lockClass); + } + } + + function destroy() { + const params = swiper.params.pagination; + if (isPaginationDisabled()) return; + const $el = swiper.pagination.$el; + $el.removeClass(params.hiddenClass); + $el.removeClass(params.modifierClass + params.type); + $el.removeClass(swiper.isHorizontal() ? params.horizontalClass : params.verticalClass); + if (swiper.pagination.bullets && swiper.pagination.bullets.removeClass) swiper.pagination.bullets.removeClass(params.bulletActiveClass); + + if (params.clickable) { + $el.off('click', classesToSelector(params.bulletClass)); + } + } + + on('init', () => { + init(); + render(); + update(); + }); + on('activeIndexChange', () => { + if (swiper.params.loop) { + update(); + } else if (typeof swiper.snapIndex === 'undefined') { + update(); + } + }); + on('snapIndexChange', () => { + if (!swiper.params.loop) { + update(); + } + }); + on('slidesLengthChange', () => { + if (swiper.params.loop) { + render(); + update(); + } + }); + on('snapGridLengthChange', () => { + if (!swiper.params.loop) { + render(); + update(); + } + }); + on('destroy', () => { + destroy(); + }); + on('enable disable', () => { + const { + $el + } = swiper.pagination; + + if ($el) { + $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.pagination.lockClass); + } + }); + on('lock unlock', () => { + update(); + }); + on('click', (_s, e) => { + const targetEl = e.target; + const { + $el + } = swiper.pagination; + + if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && $el.length > 0 && !$(targetEl).hasClass(swiper.params.pagination.bulletClass)) { + if (swiper.navigation && (swiper.navigation.nextEl && targetEl === swiper.navigation.nextEl || swiper.navigation.prevEl && targetEl === swiper.navigation.prevEl)) return; + const isHidden = $el.hasClass(swiper.params.pagination.hiddenClass); + + if (isHidden === true) { + emit('paginationShow'); + } else { + emit('paginationHide'); + } + + $el.toggleClass(swiper.params.pagination.hiddenClass); + } + }); + Object.assign(swiper.pagination, { + render, + update, + init, + destroy + }); + } + + function Scrollbar(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const document = getDocument(); + let isTouched = false; + let timeout = null; + let dragTimeout = null; + let dragStartPos; + let dragSize; + let trackSize; + let divider; + extendParams({ + scrollbar: { + el: null, + dragSize: 'auto', + hide: false, + draggable: false, + snapOnRelease: true, + lockClass: 'swiper-scrollbar-lock', + dragClass: 'swiper-scrollbar-drag' + } + }); + swiper.scrollbar = { + el: null, + dragEl: null, + $el: null, + $dragEl: null + }; + + function setTranslate() { + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; + const { + scrollbar, + rtlTranslate: rtl, + progress + } = swiper; + const { + $dragEl, + $el + } = scrollbar; + const params = swiper.params.scrollbar; + let newSize = dragSize; + let newPos = (trackSize - dragSize) * progress; + + if (rtl) { + newPos = -newPos; + + if (newPos > 0) { + newSize = dragSize - newPos; + newPos = 0; + } else if (-newPos + dragSize > trackSize) { + newSize = trackSize + newPos; + } + } else if (newPos < 0) { + newSize = dragSize + newPos; + newPos = 0; + } else if (newPos + dragSize > trackSize) { + newSize = trackSize - newPos; + } + + if (swiper.isHorizontal()) { + $dragEl.transform(`translate3d(${newPos}px, 0, 0)`); + $dragEl[0].style.width = `${newSize}px`; + } else { + $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`); + $dragEl[0].style.height = `${newSize}px`; + } + + if (params.hide) { + clearTimeout(timeout); + $el[0].style.opacity = 1; + timeout = setTimeout(() => { + $el[0].style.opacity = 0; + $el.transition(400); + }, 1000); + } + } + + function setTransition(duration) { + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; + swiper.scrollbar.$dragEl.transition(duration); + } + + function updateSize() { + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; + const { + scrollbar + } = swiper; + const { + $dragEl, + $el + } = scrollbar; + $dragEl[0].style.width = ''; + $dragEl[0].style.height = ''; + trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight; + divider = swiper.size / (swiper.virtualSize + swiper.params.slidesOffsetBefore - (swiper.params.centeredSlides ? swiper.snapGrid[0] : 0)); + + if (swiper.params.scrollbar.dragSize === 'auto') { + dragSize = trackSize * divider; + } else { + dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); + } + + if (swiper.isHorizontal()) { + $dragEl[0].style.width = `${dragSize}px`; + } else { + $dragEl[0].style.height = `${dragSize}px`; + } + + if (divider >= 1) { + $el[0].style.display = 'none'; + } else { + $el[0].style.display = ''; + } + + if (swiper.params.scrollbar.hide) { + $el[0].style.opacity = 0; + } + + if (swiper.params.watchOverflow && swiper.enabled) { + scrollbar.$el[swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass); + } + } + + function getPointerPosition(e) { + if (swiper.isHorizontal()) { + return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX; + } + + return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY; + } + + function setDragPosition(e) { + const { + scrollbar, + rtlTranslate: rtl + } = swiper; + const { + $el + } = scrollbar; + let positionRatio; + positionRatio = (getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize); + positionRatio = Math.max(Math.min(positionRatio, 1), 0); + + if (rtl) { + positionRatio = 1 - positionRatio; + } + + const position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio; + swiper.updateProgress(position); + swiper.setTranslate(position); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + + function onDragStart(e) { + const params = swiper.params.scrollbar; + const { + scrollbar, + $wrapperEl + } = swiper; + const { + $el, + $dragEl + } = scrollbar; + isTouched = true; + dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null; + e.preventDefault(); + e.stopPropagation(); + $wrapperEl.transition(100); + $dragEl.transition(100); + setDragPosition(e); + clearTimeout(dragTimeout); + $el.transition(0); + + if (params.hide) { + $el.css('opacity', 1); + } + + if (swiper.params.cssMode) { + swiper.$wrapperEl.css('scroll-snap-type', 'none'); + } + + emit('scrollbarDragStart', e); + } + + function onDragMove(e) { + const { + scrollbar, + $wrapperEl + } = swiper; + const { + $el, + $dragEl + } = scrollbar; + if (!isTouched) return; + if (e.preventDefault) e.preventDefault();else e.returnValue = false; + setDragPosition(e); + $wrapperEl.transition(0); + $el.transition(0); + $dragEl.transition(0); + emit('scrollbarDragMove', e); + } + + function onDragEnd(e) { + const params = swiper.params.scrollbar; + const { + scrollbar, + $wrapperEl + } = swiper; + const { + $el + } = scrollbar; + if (!isTouched) return; + isTouched = false; + + if (swiper.params.cssMode) { + swiper.$wrapperEl.css('scroll-snap-type', ''); + $wrapperEl.transition(''); + } + + if (params.hide) { + clearTimeout(dragTimeout); + dragTimeout = nextTick(() => { + $el.css('opacity', 0); + $el.transition(400); + }, 1000); + } + + emit('scrollbarDragEnd', e); + + if (params.snapOnRelease) { + swiper.slideToClosest(); + } + } + + function events(method) { + const { + scrollbar, + touchEventsTouch, + touchEventsDesktop, + params, + support + } = swiper; + const $el = scrollbar.$el; + const target = $el[0]; + const activeListener = support.passiveListener && params.passiveListeners ? { + passive: false, + capture: false + } : false; + const passiveListener = support.passiveListener && params.passiveListeners ? { + passive: true, + capture: false + } : false; + if (!target) return; + const eventMethod = method === 'on' ? 'addEventListener' : 'removeEventListener'; + + if (!support.touch) { + target[eventMethod](touchEventsDesktop.start, onDragStart, activeListener); + document[eventMethod](touchEventsDesktop.move, onDragMove, activeListener); + document[eventMethod](touchEventsDesktop.end, onDragEnd, passiveListener); + } else { + target[eventMethod](touchEventsTouch.start, onDragStart, activeListener); + target[eventMethod](touchEventsTouch.move, onDragMove, activeListener); + target[eventMethod](touchEventsTouch.end, onDragEnd, passiveListener); + } + } + + function enableDraggable() { + if (!swiper.params.scrollbar.el) return; + events('on'); + } + + function disableDraggable() { + if (!swiper.params.scrollbar.el) return; + events('off'); + } + + function init() { + const { + scrollbar, + $el: $swiperEl + } = swiper; + swiper.params.scrollbar = createElementIfNotDefined(swiper, swiper.originalParams.scrollbar, swiper.params.scrollbar, { + el: 'swiper-scrollbar' + }); + const params = swiper.params.scrollbar; + if (!params.el) return; + let $el = $(params.el); + + if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) { + $el = $swiperEl.find(params.el); + } + + let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`); + + if ($dragEl.length === 0) { + $dragEl = $(`
`); + $el.append($dragEl); + } + + Object.assign(scrollbar, { + $el, + el: $el[0], + $dragEl, + dragEl: $dragEl[0] + }); + + if (params.draggable) { + enableDraggable(); + } + + if ($el) { + $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass); + } + } + + function destroy() { + disableDraggable(); + } + + on('init', () => { + init(); + updateSize(); + setTranslate(); + }); + on('update resize observerUpdate lock unlock', () => { + updateSize(); + }); + on('setTranslate', () => { + setTranslate(); + }); + on('setTransition', (_s, duration) => { + setTransition(duration); + }); + on('enable disable', () => { + const { + $el + } = swiper.scrollbar; + + if ($el) { + $el[swiper.enabled ? 'removeClass' : 'addClass'](swiper.params.scrollbar.lockClass); + } + }); + on('destroy', () => { + destroy(); + }); + Object.assign(swiper.scrollbar, { + updateSize, + setTranslate, + init, + destroy + }); + } + + function Parallax(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + parallax: { + enabled: false + } + }); + + const setTransform = (el, progress) => { + const { + rtl + } = swiper; + const $el = $(el); + const rtlFactor = rtl ? -1 : 1; + const p = $el.attr('data-swiper-parallax') || '0'; + let x = $el.attr('data-swiper-parallax-x'); + let y = $el.attr('data-swiper-parallax-y'); + const scale = $el.attr('data-swiper-parallax-scale'); + const opacity = $el.attr('data-swiper-parallax-opacity'); + + if (x || y) { + x = x || '0'; + y = y || '0'; + } else if (swiper.isHorizontal()) { + x = p; + y = '0'; + } else { + y = p; + x = '0'; + } + + if (x.indexOf('%') >= 0) { + x = `${parseInt(x, 10) * progress * rtlFactor}%`; + } else { + x = `${x * progress * rtlFactor}px`; + } + + if (y.indexOf('%') >= 0) { + y = `${parseInt(y, 10) * progress}%`; + } else { + y = `${y * progress}px`; + } + + if (typeof opacity !== 'undefined' && opacity !== null) { + const currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress)); + $el[0].style.opacity = currentOpacity; + } + + if (typeof scale === 'undefined' || scale === null) { + $el.transform(`translate3d(${x}, ${y}, 0px)`); + } else { + const currentScale = scale - (scale - 1) * (1 - Math.abs(progress)); + $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`); + } + }; + + const setTranslate = () => { + const { + $el, + slides, + progress, + snapGrid + } = swiper; + $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => { + setTransform(el, progress); + }); + slides.each((slideEl, slideIndex) => { + let slideProgress = slideEl.progress; + + if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { + slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1); + } + + slideProgress = Math.min(Math.max(slideProgress, -1), 1); + $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(el => { + setTransform(el, slideProgress); + }); + }); + }; + + const setTransition = function (duration) { + if (duration === void 0) { + duration = swiper.params.speed; + } + + const { + $el + } = swiper; + $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(parallaxEl => { + const $parallaxEl = $(parallaxEl); + let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration; + if (duration === 0) parallaxDuration = 0; + $parallaxEl.transition(parallaxDuration); + }); + }; + + on('beforeInit', () => { + if (!swiper.params.parallax.enabled) return; + swiper.params.watchSlidesProgress = true; + swiper.originalParams.watchSlidesProgress = true; + }); + on('init', () => { + if (!swiper.params.parallax.enabled) return; + setTranslate(); + }); + on('setTranslate', () => { + if (!swiper.params.parallax.enabled) return; + setTranslate(); + }); + on('setTransition', (_swiper, duration) => { + if (!swiper.params.parallax.enabled) return; + setTransition(duration); + }); + } + + function Zoom(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + const window = getWindow(); + extendParams({ + zoom: { + enabled: false, + maxRatio: 3, + minRatio: 1, + toggle: true, + containerClass: 'swiper-zoom-container', + zoomedSlideClass: 'swiper-slide-zoomed' + } + }); + swiper.zoom = { + enabled: false + }; + let currentScale = 1; + let isScaling = false; + let gesturesEnabled; + let fakeGestureTouched; + let fakeGestureMoved; + const gesture = { + $slideEl: undefined, + slideWidth: undefined, + slideHeight: undefined, + $imageEl: undefined, + $imageWrapEl: undefined, + maxRatio: 3 + }; + const image = { + isTouched: undefined, + isMoved: undefined, + currentX: undefined, + currentY: undefined, + minX: undefined, + minY: undefined, + maxX: undefined, + maxY: undefined, + width: undefined, + height: undefined, + startX: undefined, + startY: undefined, + touchesStart: {}, + touchesCurrent: {} + }; + const velocity = { + x: undefined, + y: undefined, + prevPositionX: undefined, + prevPositionY: undefined, + prevTime: undefined + }; + let scale = 1; + Object.defineProperty(swiper.zoom, 'scale', { + get() { + return scale; + }, + + set(value) { + if (scale !== value) { + const imageEl = gesture.$imageEl ? gesture.$imageEl[0] : undefined; + const slideEl = gesture.$slideEl ? gesture.$slideEl[0] : undefined; + emit('zoomChange', value, imageEl, slideEl); + } + + scale = value; + } + + }); + + function getDistanceBetweenTouches(e) { + if (e.targetTouches.length < 2) return 1; + const x1 = e.targetTouches[0].pageX; + const y1 = e.targetTouches[0].pageY; + const x2 = e.targetTouches[1].pageX; + const y2 = e.targetTouches[1].pageY; + const distance = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2); + return distance; + } // Events + + + function onGestureStart(e) { + const support = swiper.support; + const params = swiper.params.zoom; + fakeGestureTouched = false; + fakeGestureMoved = false; + + if (!support.gestures) { + if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) { + return; + } + + fakeGestureTouched = true; + gesture.scaleStart = getDistanceBetweenTouches(e); + } + + if (!gesture.$slideEl || !gesture.$slideEl.length) { + gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`); + if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); + gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); + gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); + gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + + if (gesture.$imageWrapEl.length === 0) { + gesture.$imageEl = undefined; + return; + } + } + + if (gesture.$imageEl) { + gesture.$imageEl.transition(0); + } + + isScaling = true; + } + + function onGestureChange(e) { + const support = swiper.support; + const params = swiper.params.zoom; + const zoom = swiper.zoom; + + if (!support.gestures) { + if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) { + return; + } + + fakeGestureMoved = true; + gesture.scaleMove = getDistanceBetweenTouches(e); + } + + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { + if (e.type === 'gesturechange') onGestureStart(e); + return; + } + + if (support.gestures) { + zoom.scale = e.scale * currentScale; + } else { + zoom.scale = gesture.scaleMove / gesture.scaleStart * currentScale; + } + + if (zoom.scale > gesture.maxRatio) { + zoom.scale = gesture.maxRatio - 1 + (zoom.scale - gesture.maxRatio + 1) ** 0.5; + } + + if (zoom.scale < params.minRatio) { + zoom.scale = params.minRatio + 1 - (params.minRatio - zoom.scale + 1) ** 0.5; + } + + gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`); + } + + function onGestureEnd(e) { + const device = swiper.device; + const support = swiper.support; + const params = swiper.params.zoom; + const zoom = swiper.zoom; + + if (!support.gestures) { + if (!fakeGestureTouched || !fakeGestureMoved) { + return; + } + + if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !device.android) { + return; + } + + fakeGestureTouched = false; + fakeGestureMoved = false; + } + + if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; + zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); + gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`); + currentScale = zoom.scale; + isScaling = false; + if (zoom.scale === 1) gesture.$slideEl = undefined; + } + + function onTouchStart(e) { + const device = swiper.device; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; + if (image.isTouched) return; + if (device.android && e.cancelable) e.preventDefault(); + image.isTouched = true; + image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + } + + function onTouchMove(e) { + const zoom = swiper.zoom; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; + swiper.allowClick = false; + if (!image.isTouched || !gesture.$slideEl) return; + + if (!image.isMoved) { + image.width = gesture.$imageEl[0].offsetWidth; + image.height = gesture.$imageEl[0].offsetHeight; + image.startX = getTranslate(gesture.$imageWrapEl[0], 'x') || 0; + image.startY = getTranslate(gesture.$imageWrapEl[0], 'y') || 0; + gesture.slideWidth = gesture.$slideEl[0].offsetWidth; + gesture.slideHeight = gesture.$slideEl[0].offsetHeight; + gesture.$imageWrapEl.transition(0); + } // Define if we need image drag + + + const scaledWidth = image.width * zoom.scale; + const scaledHeight = image.height * zoom.scale; + if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return; + image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); + image.maxX = -image.minX; + image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); + image.maxY = -image.minY; + image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + + if (!image.isMoved && !isScaling) { + if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) { + image.isTouched = false; + return; + } + + if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) { + image.isTouched = false; + return; + } + } + + if (e.cancelable) { + e.preventDefault(); + } + + e.stopPropagation(); + image.isMoved = true; + image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX; + image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY; + + if (image.currentX < image.minX) { + image.currentX = image.minX + 1 - (image.minX - image.currentX + 1) ** 0.8; + } + + if (image.currentX > image.maxX) { + image.currentX = image.maxX - 1 + (image.currentX - image.maxX + 1) ** 0.8; + } + + if (image.currentY < image.minY) { + image.currentY = image.minY + 1 - (image.minY - image.currentY + 1) ** 0.8; + } + + if (image.currentY > image.maxY) { + image.currentY = image.maxY - 1 + (image.currentY - image.maxY + 1) ** 0.8; + } // Velocity + + + if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x; + if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y; + if (!velocity.prevTime) velocity.prevTime = Date.now(); + velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; + velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; + if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0; + if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0; + velocity.prevPositionX = image.touchesCurrent.x; + velocity.prevPositionY = image.touchesCurrent.y; + velocity.prevTime = Date.now(); + gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); + } + + function onTouchEnd() { + const zoom = swiper.zoom; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; + + if (!image.isTouched || !image.isMoved) { + image.isTouched = false; + image.isMoved = false; + return; + } + + image.isTouched = false; + image.isMoved = false; + let momentumDurationX = 300; + let momentumDurationY = 300; + const momentumDistanceX = velocity.x * momentumDurationX; + const newPositionX = image.currentX + momentumDistanceX; + const momentumDistanceY = velocity.y * momentumDurationY; + const newPositionY = image.currentY + momentumDistanceY; // Fix duration + + if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); + if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); + const momentumDuration = Math.max(momentumDurationX, momentumDurationY); + image.currentX = newPositionX; + image.currentY = newPositionY; // Define if we need image drag + + const scaledWidth = image.width * zoom.scale; + const scaledHeight = image.height * zoom.scale; + image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); + image.maxX = -image.minX; + image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); + image.maxY = -image.minY; + image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); + image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); + gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`); + } + + function onTransitionEnd() { + const zoom = swiper.zoom; + + if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) { + if (gesture.$imageEl) { + gesture.$imageEl.transform('translate3d(0,0,0) scale(1)'); + } + + if (gesture.$imageWrapEl) { + gesture.$imageWrapEl.transform('translate3d(0,0,0)'); + } + + zoom.scale = 1; + currentScale = 1; + gesture.$slideEl = undefined; + gesture.$imageEl = undefined; + gesture.$imageWrapEl = undefined; + } + } + + function zoomIn(e) { + const zoom = swiper.zoom; + const params = swiper.params.zoom; + + if (!gesture.$slideEl) { + if (e && e.target) { + gesture.$slideEl = $(e.target).closest(`.${swiper.params.slideClass}`); + } + + if (!gesture.$slideEl) { + if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { + gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`); + } else { + gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); + } + } + + gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); + gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); + } + + if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return; + + if (swiper.params.cssMode) { + swiper.wrapperEl.style.overflow = 'hidden'; + swiper.wrapperEl.style.touchAction = 'none'; + } + + gesture.$slideEl.addClass(`${params.zoomedSlideClass}`); + let touchX; + let touchY; + let offsetX; + let offsetY; + let diffX; + let diffY; + let translateX; + let translateY; + let imageWidth; + let imageHeight; + let scaledWidth; + let scaledHeight; + let translateMinX; + let translateMinY; + let translateMaxX; + let translateMaxY; + let slideWidth; + let slideHeight; + + if (typeof image.touchesStart.x === 'undefined' && e) { + touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; + touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; + } else { + touchX = image.touchesStart.x; + touchY = image.touchesStart.y; + } + + zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + + if (e) { + slideWidth = gesture.$slideEl[0].offsetWidth; + slideHeight = gesture.$slideEl[0].offsetHeight; + offsetX = gesture.$slideEl.offset().left + window.scrollX; + offsetY = gesture.$slideEl.offset().top + window.scrollY; + diffX = offsetX + slideWidth / 2 - touchX; + diffY = offsetY + slideHeight / 2 - touchY; + imageWidth = gesture.$imageEl[0].offsetWidth; + imageHeight = gesture.$imageEl[0].offsetHeight; + scaledWidth = imageWidth * zoom.scale; + scaledHeight = imageHeight * zoom.scale; + translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0); + translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0); + translateMaxX = -translateMinX; + translateMaxY = -translateMinY; + translateX = diffX * zoom.scale; + translateY = diffY * zoom.scale; + + if (translateX < translateMinX) { + translateX = translateMinX; + } + + if (translateX > translateMaxX) { + translateX = translateMaxX; + } + + if (translateY < translateMinY) { + translateY = translateMinY; + } + + if (translateY > translateMaxY) { + translateY = translateMaxY; + } + } else { + translateX = 0; + translateY = 0; + } + + gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`); + gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`); + } + + function zoomOut() { + const zoom = swiper.zoom; + const params = swiper.params.zoom; + + if (!gesture.$slideEl) { + if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { + gesture.$slideEl = swiper.$wrapperEl.children(`.${swiper.params.slideActiveClass}`); + } else { + gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); + } + + gesture.$imageEl = gesture.$slideEl.find(`.${params.containerClass}`).eq(0).find('picture, img, svg, canvas, .swiper-zoom-target').eq(0); + gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`); + } + + if (!gesture.$imageEl || gesture.$imageEl.length === 0 || !gesture.$imageWrapEl || gesture.$imageWrapEl.length === 0) return; + + if (swiper.params.cssMode) { + swiper.wrapperEl.style.overflow = ''; + swiper.wrapperEl.style.touchAction = ''; + } + + zoom.scale = 1; + currentScale = 1; + gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)'); + gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)'); + gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`); + gesture.$slideEl = undefined; + } // Toggle Zoom + + + function zoomToggle(e) { + const zoom = swiper.zoom; + + if (zoom.scale && zoom.scale !== 1) { + // Zoom Out + zoomOut(); + } else { + // Zoom In + zoomIn(e); + } + } + + function getListeners() { + const support = swiper.support; + const passiveListener = swiper.touchEvents.start === 'touchstart' && support.passiveListener && swiper.params.passiveListeners ? { + passive: true, + capture: false + } : false; + const activeListenerWithCapture = support.passiveListener ? { + passive: false, + capture: true + } : true; + return { + passiveListener, + activeListenerWithCapture + }; + } + + function getSlideSelector() { + return `.${swiper.params.slideClass}`; + } + + function toggleGestures(method) { + const { + passiveListener + } = getListeners(); + const slideSelector = getSlideSelector(); + swiper.$wrapperEl[method]('gesturestart', slideSelector, onGestureStart, passiveListener); + swiper.$wrapperEl[method]('gesturechange', slideSelector, onGestureChange, passiveListener); + swiper.$wrapperEl[method]('gestureend', slideSelector, onGestureEnd, passiveListener); + } + + function enableGestures() { + if (gesturesEnabled) return; + gesturesEnabled = true; + toggleGestures('on'); + } + + function disableGestures() { + if (!gesturesEnabled) return; + gesturesEnabled = false; + toggleGestures('off'); + } // Attach/Detach Events + + + function enable() { + const zoom = swiper.zoom; + if (zoom.enabled) return; + zoom.enabled = true; + const support = swiper.support; + const { + passiveListener, + activeListenerWithCapture + } = getListeners(); + const slideSelector = getSlideSelector(); // Scale image + + if (support.gestures) { + swiper.$wrapperEl.on(swiper.touchEvents.start, enableGestures, passiveListener); + swiper.$wrapperEl.on(swiper.touchEvents.end, disableGestures, passiveListener); + } else if (swiper.touchEvents.start === 'touchstart') { + swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener); + swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture); + swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener); + + if (swiper.touchEvents.cancel) { + swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener); + } + } // Move image + + + swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture); + } + + function disable() { + const zoom = swiper.zoom; + if (!zoom.enabled) return; + const support = swiper.support; + zoom.enabled = false; + const { + passiveListener, + activeListenerWithCapture + } = getListeners(); + const slideSelector = getSlideSelector(); // Scale image + + if (support.gestures) { + swiper.$wrapperEl.off(swiper.touchEvents.start, enableGestures, passiveListener); + swiper.$wrapperEl.off(swiper.touchEvents.end, disableGestures, passiveListener); + } else if (swiper.touchEvents.start === 'touchstart') { + swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, onGestureStart, passiveListener); + swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, onGestureChange, activeListenerWithCapture); + swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, onGestureEnd, passiveListener); + + if (swiper.touchEvents.cancel) { + swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, onGestureEnd, passiveListener); + } + } // Move image + + + swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, onTouchMove, activeListenerWithCapture); + } + + on('init', () => { + if (swiper.params.zoom.enabled) { + enable(); + } + }); + on('destroy', () => { + disable(); + }); + on('touchStart', (_s, e) => { + if (!swiper.zoom.enabled) return; + onTouchStart(e); + }); + on('touchEnd', (_s, e) => { + if (!swiper.zoom.enabled) return; + onTouchEnd(); + }); + on('doubleTap', (_s, e) => { + if (!swiper.animating && swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { + zoomToggle(e); + } + }); + on('transitionEnd', () => { + if (swiper.zoom.enabled && swiper.params.zoom.enabled) { + onTransitionEnd(); + } + }); + on('slideChange', () => { + if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) { + onTransitionEnd(); + } + }); + Object.assign(swiper.zoom, { + enable, + disable, + in: zoomIn, + out: zoomOut, + toggle: zoomToggle + }); + } + + function Lazy(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + extendParams({ + lazy: { + checkInView: false, + enabled: false, + loadPrevNext: false, + loadPrevNextAmount: 1, + loadOnTransitionStart: false, + scrollingElement: '', + elementClass: 'swiper-lazy', + loadingClass: 'swiper-lazy-loading', + loadedClass: 'swiper-lazy-loaded', + preloaderClass: 'swiper-lazy-preloader' + } + }); + swiper.lazy = {}; + let scrollHandlerAttached = false; + let initialImageLoaded = false; + + function loadInSlide(index, loadInDuplicate) { + if (loadInDuplicate === void 0) { + loadInDuplicate = true; + } + + const params = swiper.params.lazy; + if (typeof index === 'undefined') return; + if (swiper.slides.length === 0) return; + const isVirtual = swiper.virtual && swiper.params.virtual.enabled; + const $slideEl = isVirtual ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index}"]`) : swiper.slides.eq(index); + const $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`); + + if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) { + $images.push($slideEl[0]); + } + + if ($images.length === 0) return; + $images.each(imageEl => { + const $imageEl = $(imageEl); + $imageEl.addClass(params.loadingClass); + const background = $imageEl.attr('data-background'); + const src = $imageEl.attr('data-src'); + const srcset = $imageEl.attr('data-srcset'); + const sizes = $imageEl.attr('data-sizes'); + const $pictureEl = $imageEl.parent('picture'); + swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, () => { + if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return; + + if (background) { + $imageEl.css('background-image', `url("${background}")`); + $imageEl.removeAttr('data-background'); + } else { + if (srcset) { + $imageEl.attr('srcset', srcset); + $imageEl.removeAttr('data-srcset'); + } + + if (sizes) { + $imageEl.attr('sizes', sizes); + $imageEl.removeAttr('data-sizes'); + } + + if ($pictureEl.length) { + $pictureEl.children('source').each(sourceEl => { + const $source = $(sourceEl); + + if ($source.attr('data-srcset')) { + $source.attr('srcset', $source.attr('data-srcset')); + $source.removeAttr('data-srcset'); + } + }); + } + + if (src) { + $imageEl.attr('src', src); + $imageEl.removeAttr('data-src'); + } + } + + $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass); + $slideEl.find(`.${params.preloaderClass}`).remove(); + + if (swiper.params.loop && loadInDuplicate) { + const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index'); + + if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) { + const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`); + loadInSlide(originalSlide.index(), false); + } else { + const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`); + loadInSlide(duplicatedSlide.index(), false); + } + } + + emit('lazyImageReady', $slideEl[0], $imageEl[0]); + + if (swiper.params.autoHeight) { + swiper.updateAutoHeight(); + } + }); + emit('lazyImageLoad', $slideEl[0], $imageEl[0]); + }); + } + + function load() { + const { + $wrapperEl, + params: swiperParams, + slides, + activeIndex + } = swiper; + const isVirtual = swiper.virtual && swiperParams.virtual.enabled; + const params = swiperParams.lazy; + let slidesPerView = swiperParams.slidesPerView; + + if (slidesPerView === 'auto') { + slidesPerView = 0; + } + + function slideExist(index) { + if (isVirtual) { + if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index}"]`).length) { + return true; + } + } else if (slides[index]) return true; + + return false; + } + + function slideIndex(slideEl) { + if (isVirtual) { + return $(slideEl).attr('data-swiper-slide-index'); + } + + return $(slideEl).index(); + } + + if (!initialImageLoaded) initialImageLoaded = true; + + if (swiper.params.watchSlidesProgress) { + $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each(slideEl => { + const index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index(); + loadInSlide(index); + }); + } else if (slidesPerView > 1) { + for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) { + if (slideExist(i)) loadInSlide(i); + } + } else { + loadInSlide(activeIndex); + } + + if (params.loadPrevNext) { + if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) { + const amount = params.loadPrevNextAmount; + const spv = slidesPerView; + const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length); + const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); // Next Slides + + for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) { + if (slideExist(i)) loadInSlide(i); + } // Prev Slides + + + for (let i = minIndex; i < activeIndex; i += 1) { + if (slideExist(i)) loadInSlide(i); + } + } else { + const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`); + if (nextSlide.length > 0) loadInSlide(slideIndex(nextSlide)); + const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`); + if (prevSlide.length > 0) loadInSlide(slideIndex(prevSlide)); + } + } + } + + function checkInViewOnLoad() { + const window = getWindow(); + if (!swiper || swiper.destroyed) return; + const $scrollElement = swiper.params.lazy.scrollingElement ? $(swiper.params.lazy.scrollingElement) : $(window); + const isWindow = $scrollElement[0] === window; + const scrollElementWidth = isWindow ? window.innerWidth : $scrollElement[0].offsetWidth; + const scrollElementHeight = isWindow ? window.innerHeight : $scrollElement[0].offsetHeight; + const swiperOffset = swiper.$el.offset(); + const { + rtlTranslate: rtl + } = swiper; + let inView = false; + if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; + const swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]]; + + for (let i = 0; i < swiperCoord.length; i += 1) { + const point = swiperCoord[i]; + + if (point[0] >= 0 && point[0] <= scrollElementWidth && point[1] >= 0 && point[1] <= scrollElementHeight) { + if (point[0] === 0 && point[1] === 0) continue; // eslint-disable-line + + inView = true; + } + } + + const passiveListener = swiper.touchEvents.start === 'touchstart' && swiper.support.passiveListener && swiper.params.passiveListeners ? { + passive: true, + capture: false + } : false; + + if (inView) { + load(); + $scrollElement.off('scroll', checkInViewOnLoad, passiveListener); + } else if (!scrollHandlerAttached) { + scrollHandlerAttached = true; + $scrollElement.on('scroll', checkInViewOnLoad, passiveListener); + } + } + + on('beforeInit', () => { + if (swiper.params.lazy.enabled && swiper.params.preloadImages) { + swiper.params.preloadImages = false; + } + }); + on('init', () => { + if (swiper.params.lazy.enabled) { + if (swiper.params.lazy.checkInView) { + checkInViewOnLoad(); + } else { + load(); + } + } + }); + on('scroll', () => { + if (swiper.params.freeMode && swiper.params.freeMode.enabled && !swiper.params.freeMode.sticky) { + load(); + } + }); + on('scrollbarDragMove resize _freeModeNoMomentumRelease', () => { + if (swiper.params.lazy.enabled) { + if (swiper.params.lazy.checkInView) { + checkInViewOnLoad(); + } else { + load(); + } + } + }); + on('transitionStart', () => { + if (swiper.params.lazy.enabled) { + if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !initialImageLoaded) { + if (swiper.params.lazy.checkInView) { + checkInViewOnLoad(); + } else { + load(); + } + } + } + }); + on('transitionEnd', () => { + if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) { + if (swiper.params.lazy.checkInView) { + checkInViewOnLoad(); + } else { + load(); + } + } + }); + on('slideChange', () => { + const { + lazy, + cssMode, + watchSlidesProgress, + touchReleaseOnEdges, + resistanceRatio + } = swiper.params; + + if (lazy.enabled && (cssMode || watchSlidesProgress && (touchReleaseOnEdges || resistanceRatio === 0))) { + load(); + } + }); + Object.assign(swiper.lazy, { + load, + loadInSlide + }); + } + + /* eslint no-bitwise: ["error", { "allow": [">>"] }] */ + function Controller(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + controller: { + control: undefined, + inverse: false, + by: 'slide' // or 'container' + + } + }); + swiper.controller = { + control: undefined + }; + + function LinearSpline(x, y) { + const binarySearch = function search() { + let maxIndex; + let minIndex; + let guess; + return (array, val) => { + minIndex = -1; + maxIndex = array.length; + + while (maxIndex - minIndex > 1) { + guess = maxIndex + minIndex >> 1; + + if (array[guess] <= val) { + minIndex = guess; + } else { + maxIndex = guess; + } + } + + return maxIndex; + }; + }(); + + this.x = x; + this.y = y; + this.lastIndex = x.length - 1; // Given an x value (x2), return the expected y2 value: + // (x1,y1) is the known point before given value, + // (x3,y3) is the known point after given value. + + let i1; + let i3; + + this.interpolate = function interpolate(x2) { + if (!x2) return 0; // Get the indexes of x1 and x3 (the array indexes before and after given x2): + + i3 = binarySearch(this.x, x2); + i1 = i3 - 1; // We have our indexes i1 & i3, so we can calculate already: + // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 + + return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1]; + }; + + return this; + } // xxx: for now i will just save one spline function to to + + + function getInterpolateFunction(c) { + if (!swiper.controller.spline) { + swiper.controller.spline = swiper.params.loop ? new LinearSpline(swiper.slidesGrid, c.slidesGrid) : new LinearSpline(swiper.snapGrid, c.snapGrid); + } + } + + function setTranslate(_t, byController) { + const controlled = swiper.controller.control; + let multiplier; + let controlledTranslate; + const Swiper = swiper.constructor; + + function setControlledTranslate(c) { + // this will create an Interpolate function based on the snapGrids + // x is the Grid of the scrolled scroller and y will be the controlled scroller + // it makes sense to create this only once and recall it for the interpolation + // the function does a lot of value caching for performance + const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; + + if (swiper.params.controller.by === 'slide') { + getInterpolateFunction(c); // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid + // but it did not work out + + controlledTranslate = -swiper.controller.spline.interpolate(-translate); + } + + if (!controlledTranslate || swiper.params.controller.by === 'container') { + multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); + controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate(); + } + + if (swiper.params.controller.inverse) { + controlledTranslate = c.maxTranslate() - controlledTranslate; + } + + c.updateProgress(controlledTranslate); + c.setTranslate(controlledTranslate, swiper); + c.updateActiveIndex(); + c.updateSlidesClasses(); + } + + if (Array.isArray(controlled)) { + for (let i = 0; i < controlled.length; i += 1) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTranslate(controlled[i]); + } + } + } else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTranslate(controlled); + } + } + + function setTransition(duration, byController) { + const Swiper = swiper.constructor; + const controlled = swiper.controller.control; + let i; + + function setControlledTransition(c) { + c.setTransition(duration, swiper); + + if (duration !== 0) { + c.transitionStart(); + + if (c.params.autoHeight) { + nextTick(() => { + c.updateAutoHeight(); + }); + } + + c.$wrapperEl.transitionEnd(() => { + if (!controlled) return; + + if (c.params.loop && swiper.params.controller.by === 'slide') { + c.loopFix(); + } + + c.transitionEnd(); + }); + } + } + + if (Array.isArray(controlled)) { + for (i = 0; i < controlled.length; i += 1) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTransition(controlled[i]); + } + } + } else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTransition(controlled); + } + } + + function removeSpline() { + if (!swiper.controller.control) return; + + if (swiper.controller.spline) { + swiper.controller.spline = undefined; + delete swiper.controller.spline; + } + } + + on('beforeInit', () => { + swiper.controller.control = swiper.params.controller.control; + }); + on('update', () => { + removeSpline(); + }); + on('resize', () => { + removeSpline(); + }); + on('observerUpdate', () => { + removeSpline(); + }); + on('setTranslate', (_s, translate, byController) => { + if (!swiper.controller.control) return; + swiper.controller.setTranslate(translate, byController); + }); + on('setTransition', (_s, duration, byController) => { + if (!swiper.controller.control) return; + swiper.controller.setTransition(duration, byController); + }); + Object.assign(swiper.controller, { + setTranslate, + setTransition + }); + } + + function A11y(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + a11y: { + enabled: true, + notificationClass: 'swiper-notification', + prevSlideMessage: 'Previous slide', + nextSlideMessage: 'Next slide', + firstSlideMessage: 'This is the first slide', + lastSlideMessage: 'This is the last slide', + paginationBulletMessage: 'Go to slide {{index}}', + slideLabelMessage: '{{index}} / {{slidesLength}}', + containerMessage: null, + containerRoleDescriptionMessage: null, + itemRoleDescriptionMessage: null, + slideRole: 'group', + id: null + } + }); + let liveRegion = null; + + function notify(message) { + const notification = liveRegion; + if (notification.length === 0) return; + notification.html(''); + notification.html(message); + } + + function getRandomNumber(size) { + if (size === void 0) { + size = 16; + } + + const randomChar = () => Math.round(16 * Math.random()).toString(16); + + return 'x'.repeat(size).replace(/x/g, randomChar); + } + + function makeElFocusable($el) { + $el.attr('tabIndex', '0'); + } + + function makeElNotFocusable($el) { + $el.attr('tabIndex', '-1'); + } + + function addElRole($el, role) { + $el.attr('role', role); + } + + function addElRoleDescription($el, description) { + $el.attr('aria-roledescription', description); + } + + function addElControls($el, controls) { + $el.attr('aria-controls', controls); + } + + function addElLabel($el, label) { + $el.attr('aria-label', label); + } + + function addElId($el, id) { + $el.attr('id', id); + } + + function addElLive($el, live) { + $el.attr('aria-live', live); + } + + function disableEl($el) { + $el.attr('aria-disabled', true); + } + + function enableEl($el) { + $el.attr('aria-disabled', false); + } + + function onEnterOrSpaceKey(e) { + if (e.keyCode !== 13 && e.keyCode !== 32) return; + const params = swiper.params.a11y; + const $targetEl = $(e.target); + + if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) { + if (!(swiper.isEnd && !swiper.params.loop)) { + swiper.slideNext(); + } + + if (swiper.isEnd) { + notify(params.lastSlideMessage); + } else { + notify(params.nextSlideMessage); + } + } + + if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) { + if (!(swiper.isBeginning && !swiper.params.loop)) { + swiper.slidePrev(); + } + + if (swiper.isBeginning) { + notify(params.firstSlideMessage); + } else { + notify(params.prevSlideMessage); + } + } + + if (swiper.pagination && $targetEl.is(classesToSelector(swiper.params.pagination.bulletClass))) { + $targetEl[0].click(); + } + } + + function updateNavigation() { + if (swiper.params.loop || swiper.params.rewind || !swiper.navigation) return; + const { + $nextEl, + $prevEl + } = swiper.navigation; + + if ($prevEl && $prevEl.length > 0) { + if (swiper.isBeginning) { + disableEl($prevEl); + makeElNotFocusable($prevEl); + } else { + enableEl($prevEl); + makeElFocusable($prevEl); + } + } + + if ($nextEl && $nextEl.length > 0) { + if (swiper.isEnd) { + disableEl($nextEl); + makeElNotFocusable($nextEl); + } else { + enableEl($nextEl); + makeElFocusable($nextEl); + } + } + } + + function hasPagination() { + return swiper.pagination && swiper.pagination.bullets && swiper.pagination.bullets.length; + } + + function hasClickablePagination() { + return hasPagination() && swiper.params.pagination.clickable; + } + + function updatePagination() { + const params = swiper.params.a11y; + if (!hasPagination()) return; + swiper.pagination.bullets.each(bulletEl => { + const $bulletEl = $(bulletEl); + + if (swiper.params.pagination.clickable) { + makeElFocusable($bulletEl); + + if (!swiper.params.pagination.renderBullet) { + addElRole($bulletEl, 'button'); + addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1)); + } + } + + if ($bulletEl.is(`.${swiper.params.pagination.bulletActiveClass}`)) { + $bulletEl.attr('aria-current', 'true'); + } else { + $bulletEl.removeAttr('aria-current'); + } + }); + } + + const initNavEl = ($el, wrapperId, message) => { + makeElFocusable($el); + + if ($el[0].tagName !== 'BUTTON') { + addElRole($el, 'button'); + $el.on('keydown', onEnterOrSpaceKey); + } + + addElLabel($el, message); + addElControls($el, wrapperId); + }; + + const handleFocus = e => { + const slideEl = e.target.closest(`.${swiper.params.slideClass}`); + if (!slideEl || !swiper.slides.includes(slideEl)) return; + const isActive = swiper.slides.indexOf(slideEl) === swiper.activeIndex; + const isVisible = swiper.params.watchSlidesProgress && swiper.visibleSlides && swiper.visibleSlides.includes(slideEl); + if (isActive || isVisible) return; + swiper.slideTo(swiper.slides.indexOf(slideEl), 0); + }; + + function init() { + const params = swiper.params.a11y; + swiper.$el.append(liveRegion); // Container + + const $containerEl = swiper.$el; + + if (params.containerRoleDescriptionMessage) { + addElRoleDescription($containerEl, params.containerRoleDescriptionMessage); + } + + if (params.containerMessage) { + addElLabel($containerEl, params.containerMessage); + } // Wrapper + + + const $wrapperEl = swiper.$wrapperEl; + const wrapperId = params.id || $wrapperEl.attr('id') || `swiper-wrapper-${getRandomNumber(16)}`; + const live = swiper.params.autoplay && swiper.params.autoplay.enabled ? 'off' : 'polite'; + addElId($wrapperEl, wrapperId); + addElLive($wrapperEl, live); // Slide + + if (params.itemRoleDescriptionMessage) { + addElRoleDescription($(swiper.slides), params.itemRoleDescriptionMessage); + } + + addElRole($(swiper.slides), params.slideRole); + const slidesLength = swiper.params.loop ? swiper.slides.filter(el => !el.classList.contains(swiper.params.slideDuplicateClass)).length : swiper.slides.length; + swiper.slides.each((slideEl, index) => { + const $slideEl = $(slideEl); + const slideIndex = swiper.params.loop ? parseInt($slideEl.attr('data-swiper-slide-index'), 10) : index; + const ariaLabelMessage = params.slideLabelMessage.replace(/\{\{index\}\}/, slideIndex + 1).replace(/\{\{slidesLength\}\}/, slidesLength); + addElLabel($slideEl, ariaLabelMessage); + }); // Navigation + + let $nextEl; + let $prevEl; + + if (swiper.navigation && swiper.navigation.$nextEl) { + $nextEl = swiper.navigation.$nextEl; + } + + if (swiper.navigation && swiper.navigation.$prevEl) { + $prevEl = swiper.navigation.$prevEl; + } + + if ($nextEl && $nextEl.length) { + initNavEl($nextEl, wrapperId, params.nextSlideMessage); + } + + if ($prevEl && $prevEl.length) { + initNavEl($prevEl, wrapperId, params.prevSlideMessage); + } // Pagination + + + if (hasClickablePagination()) { + swiper.pagination.$el.on('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey); + } // Tab focus + + + swiper.$el.on('focus', handleFocus, true); + } + + function destroy() { + if (liveRegion && liveRegion.length > 0) liveRegion.remove(); + let $nextEl; + let $prevEl; + + if (swiper.navigation && swiper.navigation.$nextEl) { + $nextEl = swiper.navigation.$nextEl; + } + + if (swiper.navigation && swiper.navigation.$prevEl) { + $prevEl = swiper.navigation.$prevEl; + } + + if ($nextEl) { + $nextEl.off('keydown', onEnterOrSpaceKey); + } + + if ($prevEl) { + $prevEl.off('keydown', onEnterOrSpaceKey); + } // Pagination + + + if (hasClickablePagination()) { + swiper.pagination.$el.off('keydown', classesToSelector(swiper.params.pagination.bulletClass), onEnterOrSpaceKey); + } // Tab focus + + + swiper.$el.off('focus', handleFocus, true); + } + + on('beforeInit', () => { + liveRegion = $(``); + }); + on('afterInit', () => { + if (!swiper.params.a11y.enabled) return; + init(); + }); + on('fromEdge toEdge afterInit lock unlock', () => { + if (!swiper.params.a11y.enabled) return; + updateNavigation(); + }); + on('paginationUpdate', () => { + if (!swiper.params.a11y.enabled) return; + updatePagination(); + }); + on('destroy', () => { + if (!swiper.params.a11y.enabled) return; + destroy(); + }); + } + + function History(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + history: { + enabled: false, + root: '', + replaceState: false, + key: 'slides' + } + }); + let initialized = false; + let paths = {}; + + const slugify = text => { + return text.toString().replace(/\s+/g, '-').replace(/[^\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, ''); + }; + + const getPathValues = urlOverride => { + const window = getWindow(); + let location; + + if (urlOverride) { + location = new URL(urlOverride); + } else { + location = window.location; + } + + const pathArray = location.pathname.slice(1).split('/').filter(part => part !== ''); + const total = pathArray.length; + const key = pathArray[total - 2]; + const value = pathArray[total - 1]; + return { + key, + value + }; + }; + + const setHistory = (key, index) => { + const window = getWindow(); + if (!initialized || !swiper.params.history.enabled) return; + let location; + + if (swiper.params.url) { + location = new URL(swiper.params.url); + } else { + location = window.location; + } + + const slide = swiper.slides.eq(index); + let value = slugify(slide.attr('data-history')); + + if (swiper.params.history.root.length > 0) { + let root = swiper.params.history.root; + if (root[root.length - 1] === '/') root = root.slice(0, root.length - 1); + value = `${root}/${key}/${value}`; + } else if (!location.pathname.includes(key)) { + value = `${key}/${value}`; + } + + const currentState = window.history.state; + + if (currentState && currentState.value === value) { + return; + } + + if (swiper.params.history.replaceState) { + window.history.replaceState({ + value + }, null, value); + } else { + window.history.pushState({ + value + }, null, value); + } + }; + + const scrollToSlide = (speed, value, runCallbacks) => { + if (value) { + for (let i = 0, length = swiper.slides.length; i < length; i += 1) { + const slide = swiper.slides.eq(i); + const slideHistory = slugify(slide.attr('data-history')); + + if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) { + const index = slide.index(); + swiper.slideTo(index, speed, runCallbacks); + } + } + } else { + swiper.slideTo(0, speed, runCallbacks); + } + }; + + const setHistoryPopState = () => { + paths = getPathValues(swiper.params.url); + scrollToSlide(swiper.params.speed, swiper.paths.value, false); + }; + + const init = () => { + const window = getWindow(); + if (!swiper.params.history) return; + + if (!window.history || !window.history.pushState) { + swiper.params.history.enabled = false; + swiper.params.hashNavigation.enabled = true; + return; + } + + initialized = true; + paths = getPathValues(swiper.params.url); + if (!paths.key && !paths.value) return; + scrollToSlide(0, paths.value, swiper.params.runCallbacksOnInit); + + if (!swiper.params.history.replaceState) { + window.addEventListener('popstate', setHistoryPopState); + } + }; + + const destroy = () => { + const window = getWindow(); + + if (!swiper.params.history.replaceState) { + window.removeEventListener('popstate', setHistoryPopState); + } + }; + + on('init', () => { + if (swiper.params.history.enabled) { + init(); + } + }); + on('destroy', () => { + if (swiper.params.history.enabled) { + destroy(); + } + }); + on('transitionEnd _freeModeNoMomentumRelease', () => { + if (initialized) { + setHistory(swiper.params.history.key, swiper.activeIndex); + } + }); + on('slideChange', () => { + if (initialized && swiper.params.cssMode) { + setHistory(swiper.params.history.key, swiper.activeIndex); + } + }); + } + + function HashNavigation(_ref) { + let { + swiper, + extendParams, + emit, + on + } = _ref; + let initialized = false; + const document = getDocument(); + const window = getWindow(); + extendParams({ + hashNavigation: { + enabled: false, + replaceState: false, + watchState: false + } + }); + + const onHashChange = () => { + emit('hashChange'); + const newHash = document.location.hash.replace('#', ''); + const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash'); + + if (newHash !== activeSlideHash) { + const newIndex = swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index(); + if (typeof newIndex === 'undefined') return; + swiper.slideTo(newIndex); + } + }; + + const setHash = () => { + if (!initialized || !swiper.params.hashNavigation.enabled) return; + + if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) { + window.history.replaceState(null, null, `#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''); + emit('hashSet'); + } else { + const slide = swiper.slides.eq(swiper.activeIndex); + const hash = slide.attr('data-hash') || slide.attr('data-history'); + document.location.hash = hash || ''; + emit('hashSet'); + } + }; + + const init = () => { + if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return; + initialized = true; + const hash = document.location.hash.replace('#', ''); + + if (hash) { + const speed = 0; + + for (let i = 0, length = swiper.slides.length; i < length; i += 1) { + const slide = swiper.slides.eq(i); + const slideHash = slide.attr('data-hash') || slide.attr('data-history'); + + if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) { + const index = slide.index(); + swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true); + } + } + } + + if (swiper.params.hashNavigation.watchState) { + $(window).on('hashchange', onHashChange); + } + }; + + const destroy = () => { + if (swiper.params.hashNavigation.watchState) { + $(window).off('hashchange', onHashChange); + } + }; + + on('init', () => { + if (swiper.params.hashNavigation.enabled) { + init(); + } + }); + on('destroy', () => { + if (swiper.params.hashNavigation.enabled) { + destroy(); + } + }); + on('transitionEnd _freeModeNoMomentumRelease', () => { + if (initialized) { + setHash(); + } + }); + on('slideChange', () => { + if (initialized && swiper.params.cssMode) { + setHash(); + } + }); + } + + /* eslint no-underscore-dangle: "off" */ + function Autoplay(_ref) { + let { + swiper, + extendParams, + on, + emit + } = _ref; + let timeout; + swiper.autoplay = { + running: false, + paused: false + }; + extendParams({ + autoplay: { + enabled: false, + delay: 3000, + waitForTransition: true, + disableOnInteraction: true, + stopOnLastSlide: false, + reverseDirection: false, + pauseOnMouseEnter: false + } + }); + + function run() { + const $activeSlideEl = swiper.slides.eq(swiper.activeIndex); + let delay = swiper.params.autoplay.delay; + + if ($activeSlideEl.attr('data-swiper-autoplay')) { + delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay; + } + + clearTimeout(timeout); + timeout = nextTick(() => { + let autoplayResult; + + if (swiper.params.autoplay.reverseDirection) { + if (swiper.params.loop) { + swiper.loopFix(); + autoplayResult = swiper.slidePrev(swiper.params.speed, true, true); + emit('autoplay'); + } else if (!swiper.isBeginning) { + autoplayResult = swiper.slidePrev(swiper.params.speed, true, true); + emit('autoplay'); + } else if (!swiper.params.autoplay.stopOnLastSlide) { + autoplayResult = swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true); + emit('autoplay'); + } else { + stop(); + } + } else if (swiper.params.loop) { + swiper.loopFix(); + autoplayResult = swiper.slideNext(swiper.params.speed, true, true); + emit('autoplay'); + } else if (!swiper.isEnd) { + autoplayResult = swiper.slideNext(swiper.params.speed, true, true); + emit('autoplay'); + } else if (!swiper.params.autoplay.stopOnLastSlide) { + autoplayResult = swiper.slideTo(0, swiper.params.speed, true, true); + emit('autoplay'); + } else { + stop(); + } + + if (swiper.params.cssMode && swiper.autoplay.running) run();else if (autoplayResult === false) { + run(); + } + }, delay); + } + + function start() { + if (typeof timeout !== 'undefined') return false; + if (swiper.autoplay.running) return false; + swiper.autoplay.running = true; + emit('autoplayStart'); + run(); + return true; + } + + function stop() { + if (!swiper.autoplay.running) return false; + if (typeof timeout === 'undefined') return false; + + if (timeout) { + clearTimeout(timeout); + timeout = undefined; + } + + swiper.autoplay.running = false; + emit('autoplayStop'); + return true; + } + + function pause(speed) { + if (!swiper.autoplay.running) return; + if (swiper.autoplay.paused) return; + if (timeout) clearTimeout(timeout); + swiper.autoplay.paused = true; + + if (speed === 0 || !swiper.params.autoplay.waitForTransition) { + swiper.autoplay.paused = false; + run(); + } else { + ['transitionend', 'webkitTransitionEnd'].forEach(event => { + swiper.$wrapperEl[0].addEventListener(event, onTransitionEnd); + }); + } + } + + function onVisibilityChange() { + const document = getDocument(); + + if (document.visibilityState === 'hidden' && swiper.autoplay.running) { + pause(); + } + + if (document.visibilityState === 'visible' && swiper.autoplay.paused) { + run(); + swiper.autoplay.paused = false; + } + } + + function onTransitionEnd(e) { + if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return; + if (e.target !== swiper.$wrapperEl[0]) return; + ['transitionend', 'webkitTransitionEnd'].forEach(event => { + swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd); + }); + swiper.autoplay.paused = false; + + if (!swiper.autoplay.running) { + stop(); + } else { + run(); + } + } + + function onMouseEnter() { + if (swiper.params.autoplay.disableOnInteraction) { + stop(); + } else { + emit('autoplayPause'); + pause(); + } + + ['transitionend', 'webkitTransitionEnd'].forEach(event => { + swiper.$wrapperEl[0].removeEventListener(event, onTransitionEnd); + }); + } + + function onMouseLeave() { + if (swiper.params.autoplay.disableOnInteraction) { + return; + } + + swiper.autoplay.paused = false; + emit('autoplayResume'); + run(); + } + + function attachMouseEvents() { + if (swiper.params.autoplay.pauseOnMouseEnter) { + swiper.$el.on('mouseenter', onMouseEnter); + swiper.$el.on('mouseleave', onMouseLeave); + } + } + + function detachMouseEvents() { + swiper.$el.off('mouseenter', onMouseEnter); + swiper.$el.off('mouseleave', onMouseLeave); + } + + on('init', () => { + if (swiper.params.autoplay.enabled) { + start(); + const document = getDocument(); + document.addEventListener('visibilitychange', onVisibilityChange); + attachMouseEvents(); + } + }); + on('beforeTransitionStart', (_s, speed, internal) => { + if (swiper.autoplay.running) { + if (internal || !swiper.params.autoplay.disableOnInteraction) { + swiper.autoplay.pause(speed); + } else { + stop(); + } + } + }); + on('sliderFirstMove', () => { + if (swiper.autoplay.running) { + if (swiper.params.autoplay.disableOnInteraction) { + stop(); + } else { + pause(); + } + } + }); + on('touchEnd', () => { + if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) { + run(); + } + }); + on('destroy', () => { + detachMouseEvents(); + + if (swiper.autoplay.running) { + stop(); + } + + const document = getDocument(); + document.removeEventListener('visibilitychange', onVisibilityChange); + }); + Object.assign(swiper.autoplay, { + pause, + run, + start, + stop + }); + } + + function Thumb(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + thumbs: { + swiper: null, + multipleActiveThumbs: true, + autoScrollOffset: 0, + slideThumbActiveClass: 'swiper-slide-thumb-active', + thumbsContainerClass: 'swiper-thumbs' + } + }); + let initialized = false; + let swiperCreated = false; + swiper.thumbs = { + swiper: null + }; + + function onThumbClick() { + const thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper || thumbsSwiper.destroyed) return; + const clickedIndex = thumbsSwiper.clickedIndex; + const clickedSlide = thumbsSwiper.clickedSlide; + if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return; + if (typeof clickedIndex === 'undefined' || clickedIndex === null) return; + let slideToIndex; + + if (thumbsSwiper.params.loop) { + slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10); + } else { + slideToIndex = clickedIndex; + } + + if (swiper.params.loop) { + let currentIndex = swiper.activeIndex; + + if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) { + swiper.loopFix(); // eslint-disable-next-line + + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + currentIndex = swiper.activeIndex; + } + + const prevIndex = swiper.slides.eq(currentIndex).prevAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index(); + const nextIndex = swiper.slides.eq(currentIndex).nextAll(`[data-swiper-slide-index="${slideToIndex}"]`).eq(0).index(); + if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex; + } + + swiper.slideTo(slideToIndex); + } + + function init() { + const { + thumbs: thumbsParams + } = swiper.params; + if (initialized) return false; + initialized = true; + const SwiperClass = swiper.constructor; + + if (thumbsParams.swiper instanceof SwiperClass) { + swiper.thumbs.swiper = thumbsParams.swiper; + Object.assign(swiper.thumbs.swiper.originalParams, { + watchSlidesProgress: true, + slideToClickedSlide: false + }); + Object.assign(swiper.thumbs.swiper.params, { + watchSlidesProgress: true, + slideToClickedSlide: false + }); + } else if (isObject(thumbsParams.swiper)) { + const thumbsSwiperParams = Object.assign({}, thumbsParams.swiper); + Object.assign(thumbsSwiperParams, { + watchSlidesProgress: true, + slideToClickedSlide: false + }); + swiper.thumbs.swiper = new SwiperClass(thumbsSwiperParams); + swiperCreated = true; + } + + swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass); + swiper.thumbs.swiper.on('tap', onThumbClick); + return true; + } + + function update(initial) { + const thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper || thumbsSwiper.destroyed) return; + const slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView; + const autoScrollOffset = swiper.params.thumbs.autoScrollOffset; + const useOffset = autoScrollOffset && !thumbsSwiper.params.loop; + + if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) { + let currentThumbsIndex = thumbsSwiper.activeIndex; + let newThumbsIndex; + let direction; + + if (thumbsSwiper.params.loop) { + if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) { + thumbsSwiper.loopFix(); // eslint-disable-next-line + + thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft; + currentThumbsIndex = thumbsSwiper.activeIndex; + } // Find actual thumbs index to slide to + + + const prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index(); + const nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(`[data-swiper-slide-index="${swiper.realIndex}"]`).eq(0).index(); + + if (typeof prevThumbsIndex === 'undefined') { + newThumbsIndex = nextThumbsIndex; + } else if (typeof nextThumbsIndex === 'undefined') { + newThumbsIndex = prevThumbsIndex; + } else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) { + newThumbsIndex = thumbsSwiper.params.slidesPerGroup > 1 ? nextThumbsIndex : currentThumbsIndex; + } else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) { + newThumbsIndex = nextThumbsIndex; + } else { + newThumbsIndex = prevThumbsIndex; + } + + direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev'; + } else { + newThumbsIndex = swiper.realIndex; + direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev'; + } + + if (useOffset) { + newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset; + } + + if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) { + if (thumbsSwiper.params.centeredSlides) { + if (newThumbsIndex > currentThumbsIndex) { + newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; + } else { + newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; + } + } else if (newThumbsIndex > currentThumbsIndex && thumbsSwiper.params.slidesPerGroup === 1) ; + + thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); + } + } // Activate thumbs + + + let thumbsToActivate = 1; + const thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; + + if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { + thumbsToActivate = swiper.params.slidesPerView; + } + + if (!swiper.params.thumbs.multipleActiveThumbs) { + thumbsToActivate = 1; + } + + thumbsToActivate = Math.floor(thumbsToActivate); + thumbsSwiper.slides.removeClass(thumbActiveClass); + + if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) { + for (let i = 0; i < thumbsToActivate; i += 1) { + thumbsSwiper.$wrapperEl.children(`[data-swiper-slide-index="${swiper.realIndex + i}"]`).addClass(thumbActiveClass); + } + } else { + for (let i = 0; i < thumbsToActivate; i += 1) { + thumbsSwiper.slides.eq(swiper.realIndex + i).addClass(thumbActiveClass); + } + } + } + + on('beforeInit', () => { + const { + thumbs + } = swiper.params; + if (!thumbs || !thumbs.swiper) return; + init(); + update(true); + }); + on('slideChange update resize observerUpdate', () => { + update(); + }); + on('setTransition', (_s, duration) => { + const thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper || thumbsSwiper.destroyed) return; + thumbsSwiper.setTransition(duration); + }); + on('beforeDestroy', () => { + const thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper || thumbsSwiper.destroyed) return; + + if (swiperCreated) { + thumbsSwiper.destroy(); + } + }); + Object.assign(swiper.thumbs, { + init, + update + }); + } + + function freeMode(_ref) { + let { + swiper, + extendParams, + emit, + once + } = _ref; + extendParams({ + freeMode: { + enabled: false, + momentum: true, + momentumRatio: 1, + momentumBounce: true, + momentumBounceRatio: 1, + momentumVelocityRatio: 1, + sticky: false, + minimumVelocity: 0.02 + } + }); + + function onTouchStart() { + const translate = swiper.getTranslate(); + swiper.setTranslate(translate); + swiper.setTransition(0); + swiper.touchEventsData.velocities.length = 0; + swiper.freeMode.onTouchEnd({ + currentPos: swiper.rtl ? swiper.translate : -swiper.translate + }); + } + + function onTouchMove() { + const { + touchEventsData: data, + touches + } = swiper; // Velocity + + if (data.velocities.length === 0) { + data.velocities.push({ + position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], + time: data.touchStartTime + }); + } + + data.velocities.push({ + position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], + time: now() + }); + } + + function onTouchEnd(_ref2) { + let { + currentPos + } = _ref2; + const { + params, + $wrapperEl, + rtlTranslate: rtl, + snapGrid, + touchEventsData: data + } = swiper; // Time diff + + const touchEndTime = now(); + const timeDiff = touchEndTime - data.touchStartTime; + + if (currentPos < -swiper.minTranslate()) { + swiper.slideTo(swiper.activeIndex); + return; + } + + if (currentPos > -swiper.maxTranslate()) { + if (swiper.slides.length < snapGrid.length) { + swiper.slideTo(snapGrid.length - 1); + } else { + swiper.slideTo(swiper.slides.length - 1); + } + + return; + } + + if (params.freeMode.momentum) { + if (data.velocities.length > 1) { + const lastMoveEvent = data.velocities.pop(); + const velocityEvent = data.velocities.pop(); + const distance = lastMoveEvent.position - velocityEvent.position; + const time = lastMoveEvent.time - velocityEvent.time; + swiper.velocity = distance / time; + swiper.velocity /= 2; + + if (Math.abs(swiper.velocity) < params.freeMode.minimumVelocity) { + swiper.velocity = 0; + } // this implies that the user stopped moving a finger then released. + // There would be no events with distance zero, so the last event is stale. + + + if (time > 150 || now() - lastMoveEvent.time > 300) { + swiper.velocity = 0; + } + } else { + swiper.velocity = 0; + } + + swiper.velocity *= params.freeMode.momentumVelocityRatio; + data.velocities.length = 0; + let momentumDuration = 1000 * params.freeMode.momentumRatio; + const momentumDistance = swiper.velocity * momentumDuration; + let newPosition = swiper.translate + momentumDistance; + if (rtl) newPosition = -newPosition; + let doBounce = false; + let afterBouncePosition; + const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeMode.momentumBounceRatio; + let needsLoopFix; + + if (newPosition < swiper.maxTranslate()) { + if (params.freeMode.momentumBounce) { + if (newPosition + swiper.maxTranslate() < -bounceAmount) { + newPosition = swiper.maxTranslate() - bounceAmount; + } + + afterBouncePosition = swiper.maxTranslate(); + doBounce = true; + data.allowMomentumBounce = true; + } else { + newPosition = swiper.maxTranslate(); + } + + if (params.loop && params.centeredSlides) needsLoopFix = true; + } else if (newPosition > swiper.minTranslate()) { + if (params.freeMode.momentumBounce) { + if (newPosition - swiper.minTranslate() > bounceAmount) { + newPosition = swiper.minTranslate() + bounceAmount; + } + + afterBouncePosition = swiper.minTranslate(); + doBounce = true; + data.allowMomentumBounce = true; + } else { + newPosition = swiper.minTranslate(); + } + + if (params.loop && params.centeredSlides) needsLoopFix = true; + } else if (params.freeMode.sticky) { + let nextSlide; + + for (let j = 0; j < snapGrid.length; j += 1) { + if (snapGrid[j] > -newPosition) { + nextSlide = j; + break; + } + } + + if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { + newPosition = snapGrid[nextSlide]; + } else { + newPosition = snapGrid[nextSlide - 1]; + } + + newPosition = -newPosition; + } + + if (needsLoopFix) { + once('transitionEnd', () => { + swiper.loopFix(); + }); + } // Fix duration + + + if (swiper.velocity !== 0) { + if (rtl) { + momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); + } else { + momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); + } + + if (params.freeMode.sticky) { + // If freeMode.sticky is active and the user ends a swipe with a slow-velocity + // event, then durations can be 20+ seconds to slide one (or zero!) slides. + // It's easy to see this when simulating touch with mouse events. To fix this, + // limit single-slide swipes to the default slide duration. This also has the + // nice side effect of matching slide speed if the user stopped moving before + // lifting finger or mouse vs. moving slowly before lifting the finger/mouse. + // For faster swipes, also apply limits (albeit higher ones). + const moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate); + const currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex]; + + if (moveDistance < currentSlideSize) { + momentumDuration = params.speed; + } else if (moveDistance < 2 * currentSlideSize) { + momentumDuration = params.speed * 1.5; + } else { + momentumDuration = params.speed * 2.5; + } + } + } else if (params.freeMode.sticky) { + swiper.slideToClosest(); + return; + } + + if (params.freeMode.momentumBounce && doBounce) { + swiper.updateProgress(afterBouncePosition); + swiper.setTransition(momentumDuration); + swiper.setTranslate(newPosition); + swiper.transitionStart(true, swiper.swipeDirection); + swiper.animating = true; + $wrapperEl.transitionEnd(() => { + if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return; + emit('momentumBounce'); + swiper.setTransition(params.speed); + setTimeout(() => { + swiper.setTranslate(afterBouncePosition); + $wrapperEl.transitionEnd(() => { + if (!swiper || swiper.destroyed) return; + swiper.transitionEnd(); + }); + }, 0); + }); + } else if (swiper.velocity) { + emit('_freeModeNoMomentumRelease'); + swiper.updateProgress(newPosition); + swiper.setTransition(momentumDuration); + swiper.setTranslate(newPosition); + swiper.transitionStart(true, swiper.swipeDirection); + + if (!swiper.animating) { + swiper.animating = true; + $wrapperEl.transitionEnd(() => { + if (!swiper || swiper.destroyed) return; + swiper.transitionEnd(); + }); + } + } else { + swiper.updateProgress(newPosition); + } + + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } else if (params.freeMode.sticky) { + swiper.slideToClosest(); + return; + } else if (params.freeMode) { + emit('_freeModeNoMomentumRelease'); + } + + if (!params.freeMode.momentum || timeDiff >= params.longSwipesMs) { + swiper.updateProgress(); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + } + + Object.assign(swiper, { + freeMode: { + onTouchStart, + onTouchMove, + onTouchEnd + } + }); + } + + function Grid(_ref) { + let { + swiper, + extendParams + } = _ref; + extendParams({ + grid: { + rows: 1, + fill: 'column' + } + }); + let slidesNumberEvenToRows; + let slidesPerRow; + let numFullColumns; + + const initSlides = slidesLength => { + const { + slidesPerView + } = swiper.params; + const { + rows, + fill + } = swiper.params.grid; + slidesPerRow = slidesNumberEvenToRows / rows; + numFullColumns = Math.floor(slidesLength / rows); + + if (Math.floor(slidesLength / rows) === slidesLength / rows) { + slidesNumberEvenToRows = slidesLength; + } else { + slidesNumberEvenToRows = Math.ceil(slidesLength / rows) * rows; + } + + if (slidesPerView !== 'auto' && fill === 'row') { + slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, slidesPerView * rows); + } + }; + + const updateSlide = (i, slide, slidesLength, getDirectionLabel) => { + const { + slidesPerGroup, + spaceBetween + } = swiper.params; + const { + rows, + fill + } = swiper.params.grid; // Set slides order + + let newSlideOrderIndex; + let column; + let row; + + if (fill === 'row' && slidesPerGroup > 1) { + const groupIndex = Math.floor(i / (slidesPerGroup * rows)); + const slideIndexInGroup = i - rows * slidesPerGroup * groupIndex; + const columnsInGroup = groupIndex === 0 ? slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * rows * slidesPerGroup) / rows), slidesPerGroup); + row = Math.floor(slideIndexInGroup / columnsInGroup); + column = slideIndexInGroup - row * columnsInGroup + groupIndex * slidesPerGroup; + newSlideOrderIndex = column + row * slidesNumberEvenToRows / rows; + slide.css({ + '-webkit-order': newSlideOrderIndex, + order: newSlideOrderIndex + }); + } else if (fill === 'column') { + column = Math.floor(i / rows); + row = i - column * rows; + + if (column > numFullColumns || column === numFullColumns && row === rows - 1) { + row += 1; + + if (row >= rows) { + row = 0; + column += 1; + } + } + } else { + row = Math.floor(i / slidesPerRow); + column = i - row * slidesPerRow; + } + + slide.css(getDirectionLabel('margin-top'), row !== 0 ? spaceBetween && `${spaceBetween}px` : ''); + }; + + const updateWrapperSize = (slideSize, snapGrid, getDirectionLabel) => { + const { + spaceBetween, + centeredSlides, + roundLengths + } = swiper.params; + const { + rows + } = swiper.params.grid; + swiper.virtualSize = (slideSize + spaceBetween) * slidesNumberEvenToRows; + swiper.virtualSize = Math.ceil(swiper.virtualSize / rows) - spaceBetween; + swiper.$wrapperEl.css({ + [getDirectionLabel('width')]: `${swiper.virtualSize + spaceBetween}px` + }); + + if (centeredSlides) { + snapGrid.splice(0, snapGrid.length); + const newSlidesGrid = []; + + for (let i = 0; i < snapGrid.length; i += 1) { + let slidesGridItem = snapGrid[i]; + if (roundLengths) slidesGridItem = Math.floor(slidesGridItem); + if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem); + } + + snapGrid.push(...newSlidesGrid); + } + }; + + swiper.grid = { + initSlides, + updateSlide, + updateWrapperSize + }; + } + + function appendSlide(slides) { + const swiper = this; + const { + $wrapperEl, + params + } = swiper; + + if (params.loop) { + swiper.loopDestroy(); + } + + if (typeof slides === 'object' && 'length' in slides) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) $wrapperEl.append(slides[i]); + } + } else { + $wrapperEl.append(slides); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!params.observer) { + swiper.update(); + } + } + + function prependSlide(slides) { + const swiper = this; + const { + params, + $wrapperEl, + activeIndex + } = swiper; + + if (params.loop) { + swiper.loopDestroy(); + } + + let newActiveIndex = activeIndex + 1; + + if (typeof slides === 'object' && 'length' in slides) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) $wrapperEl.prepend(slides[i]); + } + + newActiveIndex = activeIndex + slides.length; + } else { + $wrapperEl.prepend(slides); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!params.observer) { + swiper.update(); + } + + swiper.slideTo(newActiveIndex, 0, false); + } + + function addSlide(index, slides) { + const swiper = this; + const { + $wrapperEl, + params, + activeIndex + } = swiper; + let activeIndexBuffer = activeIndex; + + if (params.loop) { + activeIndexBuffer -= swiper.loopedSlides; + swiper.loopDestroy(); + swiper.slides = $wrapperEl.children(`.${params.slideClass}`); + } + + const baseLength = swiper.slides.length; + + if (index <= 0) { + swiper.prependSlide(slides); + return; + } + + if (index >= baseLength) { + swiper.appendSlide(slides); + return; + } + + let newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer; + const slidesBuffer = []; + + for (let i = baseLength - 1; i >= index; i -= 1) { + const currentSlide = swiper.slides.eq(i); + currentSlide.remove(); + slidesBuffer.unshift(currentSlide); + } + + if (typeof slides === 'object' && 'length' in slides) { + for (let i = 0; i < slides.length; i += 1) { + if (slides[i]) $wrapperEl.append(slides[i]); + } + + newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer; + } else { + $wrapperEl.append(slides); + } + + for (let i = 0; i < slidesBuffer.length; i += 1) { + $wrapperEl.append(slidesBuffer[i]); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!params.observer) { + swiper.update(); + } + + if (params.loop) { + swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); + } else { + swiper.slideTo(newActiveIndex, 0, false); + } + } + + function removeSlide(slidesIndexes) { + const swiper = this; + const { + params, + $wrapperEl, + activeIndex + } = swiper; + let activeIndexBuffer = activeIndex; + + if (params.loop) { + activeIndexBuffer -= swiper.loopedSlides; + swiper.loopDestroy(); + swiper.slides = $wrapperEl.children(`.${params.slideClass}`); + } + + let newActiveIndex = activeIndexBuffer; + let indexToRemove; + + if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) { + for (let i = 0; i < slidesIndexes.length; i += 1) { + indexToRemove = slidesIndexes[i]; + if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); + if (indexToRemove < newActiveIndex) newActiveIndex -= 1; + } + + newActiveIndex = Math.max(newActiveIndex, 0); + } else { + indexToRemove = slidesIndexes; + if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); + if (indexToRemove < newActiveIndex) newActiveIndex -= 1; + newActiveIndex = Math.max(newActiveIndex, 0); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!params.observer) { + swiper.update(); + } + + if (params.loop) { + swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); + } else { + swiper.slideTo(newActiveIndex, 0, false); + } + } + + function removeAllSlides() { + const swiper = this; + const slidesIndexes = []; + + for (let i = 0; i < swiper.slides.length; i += 1) { + slidesIndexes.push(i); + } + + swiper.removeSlide(slidesIndexes); + } + + function Manipulation(_ref) { + let { + swiper + } = _ref; + Object.assign(swiper, { + appendSlide: appendSlide.bind(swiper), + prependSlide: prependSlide.bind(swiper), + addSlide: addSlide.bind(swiper), + removeSlide: removeSlide.bind(swiper), + removeAllSlides: removeAllSlides.bind(swiper) + }); + } + + function effectInit(params) { + const { + effect, + swiper, + on, + setTranslate, + setTransition, + overwriteParams, + perspective, + recreateShadows, + getEffectParams + } = params; + on('beforeInit', () => { + if (swiper.params.effect !== effect) return; + swiper.classNames.push(`${swiper.params.containerModifierClass}${effect}`); + + if (perspective && perspective()) { + swiper.classNames.push(`${swiper.params.containerModifierClass}3d`); + } + + const overwriteParamsResult = overwriteParams ? overwriteParams() : {}; + Object.assign(swiper.params, overwriteParamsResult); + Object.assign(swiper.originalParams, overwriteParamsResult); + }); + on('setTranslate', () => { + if (swiper.params.effect !== effect) return; + setTranslate(); + }); + on('setTransition', (_s, duration) => { + if (swiper.params.effect !== effect) return; + setTransition(duration); + }); + on('transitionEnd', () => { + if (swiper.params.effect !== effect) return; + + if (recreateShadows) { + if (!getEffectParams || !getEffectParams().slideShadows) return; // remove shadows + + swiper.slides.each(slideEl => { + const $slideEl = swiper.$(slideEl); + $slideEl.find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').remove(); + }); // create new one + + recreateShadows(); + } + }); + let requireUpdateOnVirtual; + on('virtualUpdate', () => { + if (swiper.params.effect !== effect) return; + + if (!swiper.slides.length) { + requireUpdateOnVirtual = true; + } + + requestAnimationFrame(() => { + if (requireUpdateOnVirtual && swiper.slides && swiper.slides.length) { + setTranslate(); + requireUpdateOnVirtual = false; + } + }); + }); + } + + function effectTarget(effectParams, $slideEl) { + if (effectParams.transformEl) { + return $slideEl.find(effectParams.transformEl).css({ + 'backface-visibility': 'hidden', + '-webkit-backface-visibility': 'hidden' + }); + } + + return $slideEl; + } + + function effectVirtualTransitionEnd(_ref) { + let { + swiper, + duration, + transformEl, + allSlides + } = _ref; + const { + slides, + activeIndex, + $wrapperEl + } = swiper; + + if (swiper.params.virtualTranslate && duration !== 0) { + let eventTriggered = false; + let $transitionEndTarget; + + if (allSlides) { + $transitionEndTarget = transformEl ? slides.find(transformEl) : slides; + } else { + $transitionEndTarget = transformEl ? slides.eq(activeIndex).find(transformEl) : slides.eq(activeIndex); + } + + $transitionEndTarget.transitionEnd(() => { + if (eventTriggered) return; + if (!swiper || swiper.destroyed) return; + eventTriggered = true; + swiper.animating = false; + const triggerEvents = ['webkitTransitionEnd', 'transitionend']; + + for (let i = 0; i < triggerEvents.length; i += 1) { + $wrapperEl.trigger(triggerEvents[i]); + } + }); + } + } + + function EffectFade(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + fadeEffect: { + crossFade: false, + transformEl: null + } + }); + + const setTranslate = () => { + const { + slides + } = swiper; + const params = swiper.params.fadeEffect; + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = swiper.slides.eq(i); + const offset = $slideEl[0].swiperSlideOffset; + let tx = -offset; + if (!swiper.params.virtualTranslate) tx -= swiper.translate; + let ty = 0; + + if (!swiper.isHorizontal()) { + ty = tx; + tx = 0; + } + + const slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs($slideEl[0].progress), 0) : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0); + const $targetEl = effectTarget(params, $slideEl); + $targetEl.css({ + opacity: slideOpacity + }).transform(`translate3d(${tx}px, ${ty}px, 0px)`); + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.fadeEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration); + effectVirtualTransitionEnd({ + swiper, + duration, + transformEl, + allSlides: true + }); + }; + + effectInit({ + effect: 'fade', + swiper, + on, + setTranslate, + setTransition, + overwriteParams: () => ({ + slidesPerView: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + spaceBetween: 0, + virtualTranslate: !swiper.params.cssMode + }) + }); + } + + function EffectCube(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + cubeEffect: { + slideShadows: true, + shadow: true, + shadowOffset: 20, + shadowScale: 0.94 + } + }); + + const createSlideShadows = ($slideEl, progress, isHorizontal) => { + let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + + if (shadowBefore.length === 0) { + shadowBefore = $(`
`); + $slideEl.append(shadowBefore); + } + + if (shadowAfter.length === 0) { + shadowAfter = $(`
`); + $slideEl.append(shadowAfter); + } + + if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); + if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); + }; + + const recreateShadows = () => { + // create new ones + const isHorizontal = swiper.isHorizontal(); + swiper.slides.each(slideEl => { + const progress = Math.max(Math.min(slideEl.progress, 1), -1); + createSlideShadows($(slideEl), progress, isHorizontal); + }); + }; + + const setTranslate = () => { + const { + $el, + $wrapperEl, + slides, + width: swiperWidth, + height: swiperHeight, + rtlTranslate: rtl, + size: swiperSize, + browser + } = swiper; + const params = swiper.params.cubeEffect; + const isHorizontal = swiper.isHorizontal(); + const isVirtual = swiper.virtual && swiper.params.virtual.enabled; + let wrapperRotate = 0; + let $cubeShadowEl; + + if (params.shadow) { + if (isHorizontal) { + $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow'); + + if ($cubeShadowEl.length === 0) { + $cubeShadowEl = $('
'); + $wrapperEl.append($cubeShadowEl); + } + + $cubeShadowEl.css({ + height: `${swiperWidth}px` + }); + } else { + $cubeShadowEl = $el.find('.swiper-cube-shadow'); + + if ($cubeShadowEl.length === 0) { + $cubeShadowEl = $('
'); + $el.append($cubeShadowEl); + } + } + } + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = slides.eq(i); + let slideIndex = i; + + if (isVirtual) { + slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10); + } + + let slideAngle = slideIndex * 90; + let round = Math.floor(slideAngle / 360); + + if (rtl) { + slideAngle = -slideAngle; + round = Math.floor(-slideAngle / 360); + } + + const progress = Math.max(Math.min($slideEl[0].progress, 1), -1); + let tx = 0; + let ty = 0; + let tz = 0; + + if (slideIndex % 4 === 0) { + tx = -round * 4 * swiperSize; + tz = 0; + } else if ((slideIndex - 1) % 4 === 0) { + tx = 0; + tz = -round * 4 * swiperSize; + } else if ((slideIndex - 2) % 4 === 0) { + tx = swiperSize + round * 4 * swiperSize; + tz = swiperSize; + } else if ((slideIndex - 3) % 4 === 0) { + tx = -swiperSize; + tz = 3 * swiperSize + swiperSize * 4 * round; + } + + if (rtl) { + tx = -tx; + } + + if (!isHorizontal) { + ty = tx; + tx = 0; + } + + const transform = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`; + + if (progress <= 1 && progress > -1) { + wrapperRotate = slideIndex * 90 + progress * 90; + if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90; + } + + $slideEl.transform(transform); + + if (params.slideShadows) { + createSlideShadows($slideEl, progress, isHorizontal); + } + } + + $wrapperEl.css({ + '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`, + 'transform-origin': `50% 50% -${swiperSize / 2}px` + }); + + if (params.shadow) { + if (isHorizontal) { + $cubeShadowEl.transform(`translate3d(0px, ${swiperWidth / 2 + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`); + } else { + const shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; + const multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); + const scale1 = params.shadowScale; + const scale2 = params.shadowScale / multiplier; + const offset = params.shadowOffset; + $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${swiperHeight / 2 + offset}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`); + } + } + + const zFactor = browser.isSafari || browser.isWebView ? -swiperSize / 2 : 0; + $wrapperEl.transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`); + $wrapperEl[0].style.setProperty('--swiper-cube-translate-z', `${zFactor}px`); + }; + + const setTransition = duration => { + const { + $el, + slides + } = swiper; + slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + + if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { + $el.find('.swiper-cube-shadow').transition(duration); + } + }; + + effectInit({ + effect: 'cube', + swiper, + on, + setTranslate, + setTransition, + recreateShadows, + getEffectParams: () => swiper.params.cubeEffect, + perspective: () => true, + overwriteParams: () => ({ + slidesPerView: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + resistanceRatio: 0, + spaceBetween: 0, + centeredSlides: false, + virtualTranslate: true + }) + }); + } + + function createShadow(params, $slideEl, side) { + const shadowClass = `swiper-slide-shadow${side ? `-${side}` : ''}`; + const $shadowContainer = params.transformEl ? $slideEl.find(params.transformEl) : $slideEl; + let $shadowEl = $shadowContainer.children(`.${shadowClass}`); + + if (!$shadowEl.length) { + $shadowEl = $(`
`); + $shadowContainer.append($shadowEl); + } + + return $shadowEl; + } + + function EffectFlip(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + flipEffect: { + slideShadows: true, + limitRotation: true, + transformEl: null + } + }); + + const createSlideShadows = ($slideEl, progress, params) => { + let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + + if (shadowBefore.length === 0) { + shadowBefore = createShadow(params, $slideEl, swiper.isHorizontal() ? 'left' : 'top'); + } + + if (shadowAfter.length === 0) { + shadowAfter = createShadow(params, $slideEl, swiper.isHorizontal() ? 'right' : 'bottom'); + } + + if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); + if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); + }; + + const recreateShadows = () => { + // Set shadows + const params = swiper.params.flipEffect; + swiper.slides.each(slideEl => { + const $slideEl = $(slideEl); + let progress = $slideEl[0].progress; + + if (swiper.params.flipEffect.limitRotation) { + progress = Math.max(Math.min(slideEl.progress, 1), -1); + } + + createSlideShadows($slideEl, progress, params); + }); + }; + + const setTranslate = () => { + const { + slides, + rtlTranslate: rtl + } = swiper; + const params = swiper.params.flipEffect; + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = slides.eq(i); + let progress = $slideEl[0].progress; + + if (swiper.params.flipEffect.limitRotation) { + progress = Math.max(Math.min($slideEl[0].progress, 1), -1); + } + + const offset = $slideEl[0].swiperSlideOffset; + const rotate = -180 * progress; + let rotateY = rotate; + let rotateX = 0; + let tx = swiper.params.cssMode ? -offset - swiper.translate : -offset; + let ty = 0; + + if (!swiper.isHorizontal()) { + ty = tx; + tx = 0; + rotateX = -rotateY; + rotateY = 0; + } else if (rtl) { + rotateY = -rotateY; + } + + $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length; + + if (params.slideShadows) { + createSlideShadows($slideEl, progress, params); + } + + const transform = `translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`; + const $targetEl = effectTarget(params, $slideEl); + $targetEl.transform(transform); + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.flipEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + effectVirtualTransitionEnd({ + swiper, + duration, + transformEl + }); + }; + + effectInit({ + effect: 'flip', + swiper, + on, + setTranslate, + setTransition, + recreateShadows, + getEffectParams: () => swiper.params.flipEffect, + perspective: () => true, + overwriteParams: () => ({ + slidesPerView: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + spaceBetween: 0, + virtualTranslate: !swiper.params.cssMode + }) + }); + } + + function EffectCoverflow(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + coverflowEffect: { + rotate: 50, + stretch: 0, + depth: 100, + scale: 1, + modifier: 1, + slideShadows: true, + transformEl: null + } + }); + + const setTranslate = () => { + const { + width: swiperWidth, + height: swiperHeight, + slides, + slidesSizesGrid + } = swiper; + const params = swiper.params.coverflowEffect; + const isHorizontal = swiper.isHorizontal(); + const transform = swiper.translate; + const center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2; + const rotate = isHorizontal ? params.rotate : -params.rotate; + const translate = params.depth; // Each slide offset from center + + for (let i = 0, length = slides.length; i < length; i += 1) { + const $slideEl = slides.eq(i); + const slideSize = slidesSizesGrid[i]; + const slideOffset = $slideEl[0].swiperSlideOffset; + const centerOffset = (center - slideOffset - slideSize / 2) / slideSize; + const offsetMultiplier = typeof params.modifier === 'function' ? params.modifier(centerOffset) : centerOffset * params.modifier; + let rotateY = isHorizontal ? rotate * offsetMultiplier : 0; + let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; // var rotateZ = 0 + + let translateZ = -translate * Math.abs(offsetMultiplier); + let stretch = params.stretch; // Allow percentage to make a relative stretch for responsive sliders + + if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) { + stretch = parseFloat(params.stretch) / 100 * slideSize; + } + + let translateY = isHorizontal ? 0 : stretch * offsetMultiplier; + let translateX = isHorizontal ? stretch * offsetMultiplier : 0; + let scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); // Fix for ultra small values + + if (Math.abs(translateX) < 0.001) translateX = 0; + if (Math.abs(translateY) < 0.001) translateY = 0; + if (Math.abs(translateZ) < 0.001) translateZ = 0; + if (Math.abs(rotateY) < 0.001) rotateY = 0; + if (Math.abs(rotateX) < 0.001) rotateX = 0; + if (Math.abs(scale) < 0.001) scale = 0; + const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg) scale(${scale})`; + const $targetEl = effectTarget(params, $slideEl); + $targetEl.transform(slideTransform); + $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; + + if (params.slideShadows) { + // Set shadows + let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + + if ($shadowBeforeEl.length === 0) { + $shadowBeforeEl = createShadow(params, $slideEl, isHorizontal ? 'left' : 'top'); + } + + if ($shadowAfterEl.length === 0) { + $shadowAfterEl = createShadow(params, $slideEl, isHorizontal ? 'right' : 'bottom'); + } + + if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; + if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0; + } + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.coverflowEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); + }; + + effectInit({ + effect: 'coverflow', + swiper, + on, + setTranslate, + setTransition, + perspective: () => true, + overwriteParams: () => ({ + watchSlidesProgress: true + }) + }); + } + + function EffectCreative(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + creativeEffect: { + transformEl: null, + limitProgress: 1, + shadowPerProgress: false, + progressMultiplier: 1, + perspective: true, + prev: { + translate: [0, 0, 0], + rotate: [0, 0, 0], + opacity: 1, + scale: 1 + }, + next: { + translate: [0, 0, 0], + rotate: [0, 0, 0], + opacity: 1, + scale: 1 + } + } + }); + + const getTranslateValue = value => { + if (typeof value === 'string') return value; + return `${value}px`; + }; + + const setTranslate = () => { + const { + slides, + $wrapperEl, + slidesSizesGrid + } = swiper; + const params = swiper.params.creativeEffect; + const { + progressMultiplier: multiplier + } = params; + const isCenteredSlides = swiper.params.centeredSlides; + + if (isCenteredSlides) { + const margin = slidesSizesGrid[0] / 2 - swiper.params.slidesOffsetBefore || 0; + $wrapperEl.transform(`translateX(calc(50% - ${margin}px))`); + } + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = slides.eq(i); + const slideProgress = $slideEl[0].progress; + const progress = Math.min(Math.max($slideEl[0].progress, -params.limitProgress), params.limitProgress); + let originalProgress = progress; + + if (!isCenteredSlides) { + originalProgress = Math.min(Math.max($slideEl[0].originalProgress, -params.limitProgress), params.limitProgress); + } + + const offset = $slideEl[0].swiperSlideOffset; + const t = [swiper.params.cssMode ? -offset - swiper.translate : -offset, 0, 0]; + const r = [0, 0, 0]; + let custom = false; + + if (!swiper.isHorizontal()) { + t[1] = t[0]; + t[0] = 0; + } + + let data = { + translate: [0, 0, 0], + rotate: [0, 0, 0], + scale: 1, + opacity: 1 + }; + + if (progress < 0) { + data = params.next; + custom = true; + } else if (progress > 0) { + data = params.prev; + custom = true; + } // set translate + + + t.forEach((value, index) => { + t[index] = `calc(${value}px + (${getTranslateValue(data.translate[index])} * ${Math.abs(progress * multiplier)}))`; + }); // set rotates + + r.forEach((value, index) => { + r[index] = data.rotate[index] * Math.abs(progress * multiplier); + }); + $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; + const translateString = t.join(', '); + const rotateString = `rotateX(${r[0]}deg) rotateY(${r[1]}deg) rotateZ(${r[2]}deg)`; + const scaleString = originalProgress < 0 ? `scale(${1 + (1 - data.scale) * originalProgress * multiplier})` : `scale(${1 - (1 - data.scale) * originalProgress * multiplier})`; + const opacityString = originalProgress < 0 ? 1 + (1 - data.opacity) * originalProgress * multiplier : 1 - (1 - data.opacity) * originalProgress * multiplier; + const transform = `translate3d(${translateString}) ${rotateString} ${scaleString}`; // Set shadows + + if (custom && data.shadow || !custom) { + let $shadowEl = $slideEl.children('.swiper-slide-shadow'); + + if ($shadowEl.length === 0 && data.shadow) { + $shadowEl = createShadow(params, $slideEl); + } + + if ($shadowEl.length) { + const shadowOpacity = params.shadowPerProgress ? progress * (1 / params.limitProgress) : progress; + $shadowEl[0].style.opacity = Math.min(Math.max(Math.abs(shadowOpacity), 0), 1); + } + } + + const $targetEl = effectTarget(params, $slideEl); + $targetEl.transform(transform).css({ + opacity: opacityString + }); + + if (data.origin) { + $targetEl.css('transform-origin', data.origin); + } + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.creativeEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration); + effectVirtualTransitionEnd({ + swiper, + duration, + transformEl, + allSlides: true + }); + }; + + effectInit({ + effect: 'creative', + swiper, + on, + setTranslate, + setTransition, + perspective: () => swiper.params.creativeEffect.perspective, + overwriteParams: () => ({ + watchSlidesProgress: true, + virtualTranslate: !swiper.params.cssMode + }) + }); + } + + function EffectCards(_ref) { + let { + swiper, + extendParams, + on + } = _ref; + extendParams({ + cardsEffect: { + slideShadows: true, + transformEl: null, + rotate: true + } + }); + + const setTranslate = () => { + const { + slides, + activeIndex + } = swiper; + const params = swiper.params.cardsEffect; + const { + startTranslate, + isTouched + } = swiper.touchEventsData; + const currentTranslate = swiper.translate; + + for (let i = 0; i < slides.length; i += 1) { + const $slideEl = slides.eq(i); + const slideProgress = $slideEl[0].progress; + const progress = Math.min(Math.max(slideProgress, -4), 4); + let offset = $slideEl[0].swiperSlideOffset; + + if (swiper.params.centeredSlides && !swiper.params.cssMode) { + swiper.$wrapperEl.transform(`translateX(${swiper.minTranslate()}px)`); + } + + if (swiper.params.centeredSlides && swiper.params.cssMode) { + offset -= slides[0].swiperSlideOffset; + } + + let tX = swiper.params.cssMode ? -offset - swiper.translate : -offset; + let tY = 0; + const tZ = -100 * Math.abs(progress); + let scale = 1; + let rotate = -2 * progress; + let tXAdd = 8 - Math.abs(progress) * 0.75; + const slideIndex = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.from + i : i; + const isSwipeToNext = (slideIndex === activeIndex || slideIndex === activeIndex - 1) && progress > 0 && progress < 1 && (isTouched || swiper.params.cssMode) && currentTranslate < startTranslate; + const isSwipeToPrev = (slideIndex === activeIndex || slideIndex === activeIndex + 1) && progress < 0 && progress > -1 && (isTouched || swiper.params.cssMode) && currentTranslate > startTranslate; + + if (isSwipeToNext || isSwipeToPrev) { + const subProgress = (1 - Math.abs((Math.abs(progress) - 0.5) / 0.5)) ** 0.5; + rotate += -28 * progress * subProgress; + scale += -0.5 * subProgress; + tXAdd += 96 * subProgress; + tY = `${-25 * subProgress * Math.abs(progress)}%`; + } + + if (progress < 0) { + // next + tX = `calc(${tX}px + (${tXAdd * Math.abs(progress)}%))`; + } else if (progress > 0) { + // prev + tX = `calc(${tX}px + (-${tXAdd * Math.abs(progress)}%))`; + } else { + tX = `${tX}px`; + } + + if (!swiper.isHorizontal()) { + const prevY = tY; + tY = tX; + tX = prevY; + } + + const scaleString = progress < 0 ? `${1 + (1 - scale) * progress}` : `${1 - (1 - scale) * progress}`; + const transform = ` + translate3d(${tX}, ${tY}, ${tZ}px) + rotateZ(${params.rotate ? rotate : 0}deg) + scale(${scaleString}) + `; + + if (params.slideShadows) { + // Set shadows + let $shadowEl = $slideEl.find('.swiper-slide-shadow'); + + if ($shadowEl.length === 0) { + $shadowEl = createShadow(params, $slideEl); + } + + if ($shadowEl.length) $shadowEl[0].style.opacity = Math.min(Math.max((Math.abs(progress) - 0.5) / 0.5, 0), 1); + } + + $slideEl[0].style.zIndex = -Math.abs(Math.round(slideProgress)) + slides.length; + const $targetEl = effectTarget(params, $slideEl); + $targetEl.transform(transform); + } + }; + + const setTransition = duration => { + const { + transformEl + } = swiper.params.cardsEffect; + const $transitionElements = transformEl ? swiper.slides.find(transformEl) : swiper.slides; + $transitionElements.transition(duration).find('.swiper-slide-shadow').transition(duration); + effectVirtualTransitionEnd({ + swiper, + duration, + transformEl + }); + }; + + effectInit({ + effect: 'cards', + swiper, + on, + setTranslate, + setTransition, + perspective: () => true, + overwriteParams: () => ({ + watchSlidesProgress: true, + virtualTranslate: !swiper.params.cssMode + }) + }); + } + + // Swiper Class + const modules = [Virtual, Keyboard, Mousewheel, Navigation, Pagination, Scrollbar, Parallax, Zoom, Lazy, Controller, A11y, History, HashNavigation, Autoplay, Thumb, freeMode, Grid, Manipulation, EffectFade, EffectCube, EffectFlip, EffectCoverflow, EffectCreative, EffectCards]; + Swiper.use(modules); + + return Swiper; + +})); +//# sourceMappingURL=swiper-bundle.js.map diff --git a/html/mobile/js/swiper.js b/html/mobile/js/swiper.js new file mode 100644 index 0000000..19a19fc --- /dev/null +++ b/html/mobile/js/swiper.js @@ -0,0 +1,8647 @@ +/** + * Swiper 5.3.0 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * http://swiperjs.com + * + * Copyright 2014-2020 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: January 11, 2020 + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.Swiper = factory()); +}(this, function () { 'use strict'; + + /** + * SSR Window 1.0.1 + * Better handling for window object in SSR environment + * https://github.com/nolimits4web/ssr-window + * + * Copyright 2018, Vladimir Kharlampidi + * + * Licensed under MIT + * + * Released on: July 18, 2018 + */ + var doc = (typeof document === 'undefined') ? { + body: {}, + addEventListener: function addEventListener() {}, + removeEventListener: function removeEventListener() {}, + activeElement: { + blur: function blur() {}, + nodeName: '', + }, + querySelector: function querySelector() { + return null; + }, + querySelectorAll: function querySelectorAll() { + return []; + }, + getElementById: function getElementById() { + return null; + }, + createEvent: function createEvent() { + return { + initEvent: function initEvent() {}, + }; + }, + createElement: function createElement() { + return { + children: [], + childNodes: [], + style: {}, + setAttribute: function setAttribute() {}, + getElementsByTagName: function getElementsByTagName() { + return []; + }, + }; + }, + location: { hash: '' }, + } : document; // eslint-disable-line + + var win = (typeof window === 'undefined') ? { + document: doc, + navigator: { + userAgent: '', + }, + location: {}, + history: {}, + CustomEvent: function CustomEvent() { + return this; + }, + addEventListener: function addEventListener() {}, + removeEventListener: function removeEventListener() {}, + getComputedStyle: function getComputedStyle() { + return { + getPropertyValue: function getPropertyValue() { + return ''; + }, + }; + }, + Image: function Image() {}, + Date: function Date() {}, + screen: {}, + setTimeout: function setTimeout() {}, + clearTimeout: function clearTimeout() {}, + } : window; // eslint-disable-line + + /** + * Dom7 2.1.3 + * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API + * http://framework7.io/docs/dom.html + * + * Copyright 2019, Vladimir Kharlampidi + * The iDangero.us + * http://www.idangero.us/ + * + * Licensed under MIT + * + * Released on: February 11, 2019 + */ + + var Dom7 = function Dom7(arr) { + var self = this; + // Create array-like object + for (var i = 0; i < arr.length; i += 1) { + self[i] = arr[i]; + } + self.length = arr.length; + // Return collection with methods + return this; + }; + + function $(selector, context) { + var arr = []; + var i = 0; + if (selector && !context) { + if (selector instanceof Dom7) { + return selector; + } + } + if (selector) { + // String + if (typeof selector === 'string') { + var els; + var tempParent; + var html = selector.trim(); + if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) { + var toCreate = 'div'; + if (html.indexOf(':~]/)) { + // Pure ID selector + els = [doc.getElementById(selector.trim().split('#')[1])]; + } else { + // Other selectors + els = (context || doc).querySelectorAll(selector.trim()); + } + for (i = 0; i < els.length; i += 1) { + if (els[i]) { arr.push(els[i]); } + } + } + } else if (selector.nodeType || selector === win || selector === doc) { + // Node/element + arr.push(selector); + } else if (selector.length > 0 && selector[0].nodeType) { + // Array of elements or instance of Dom + for (i = 0; i < selector.length; i += 1) { + arr.push(selector[i]); + } + } + } + return new Dom7(arr); + } + + $.fn = Dom7.prototype; + $.Class = Dom7; + $.Dom7 = Dom7; + + function unique(arr) { + var uniqueArray = []; + for (var i = 0; i < arr.length; i += 1) { + if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); } + } + return uniqueArray; + } + + // Classes and attributes + function addClass(className) { + if (typeof className === 'undefined') { + return this; + } + var classes = className.split(' '); + for (var i = 0; i < classes.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.add(classes[i]); } + } + } + return this; + } + function removeClass(className) { + var classes = className.split(' '); + for (var i = 0; i < classes.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.remove(classes[i]); } + } + } + return this; + } + function hasClass(className) { + if (!this[0]) { return false; } + return this[0].classList.contains(className); + } + function toggleClass(className) { + var classes = className.split(' '); + for (var i = 0; i < classes.length; i += 1) { + for (var j = 0; j < this.length; j += 1) { + if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') { this[j].classList.toggle(classes[i]); } + } + } + return this; + } + function attr(attrs, value) { + var arguments$1 = arguments; + + if (arguments.length === 1 && typeof attrs === 'string') { + // Get attr + if (this[0]) { return this[0].getAttribute(attrs); } + return undefined; + } + + // Set attrs + for (var i = 0; i < this.length; i += 1) { + if (arguments$1.length === 2) { + // String + this[i].setAttribute(attrs, value); + } else { + // Object + // eslint-disable-next-line + for (var attrName in attrs) { + this[i][attrName] = attrs[attrName]; + this[i].setAttribute(attrName, attrs[attrName]); + } + } + } + return this; + } + // eslint-disable-next-line + function removeAttr(attr) { + for (var i = 0; i < this.length; i += 1) { + this[i].removeAttribute(attr); + } + return this; + } + function data(key, value) { + var el; + if (typeof value === 'undefined') { + el = this[0]; + // Get value + if (el) { + if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) { + return el.dom7ElementDataStorage[key]; + } + + var dataKey = el.getAttribute(("data-" + key)); + if (dataKey) { + return dataKey; + } + return undefined; + } + return undefined; + } + + // Set value + for (var i = 0; i < this.length; i += 1) { + el = this[i]; + if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; } + el.dom7ElementDataStorage[key] = value; + } + return this; + } + // Transforms + // eslint-disable-next-line + function transform(transform) { + for (var i = 0; i < this.length; i += 1) { + var elStyle = this[i].style; + elStyle.webkitTransform = transform; + elStyle.transform = transform; + } + return this; + } + function transition(duration) { + if (typeof duration !== 'string') { + duration = duration + "ms"; // eslint-disable-line + } + for (var i = 0; i < this.length; i += 1) { + var elStyle = this[i].style; + elStyle.webkitTransitionDuration = duration; + elStyle.transitionDuration = duration; + } + return this; + } + // Events + function on() { + var assign; + + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + var eventType = args[0]; + var targetSelector = args[1]; + var listener = args[2]; + var capture = args[3]; + if (typeof args[1] === 'function') { + (assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]); + targetSelector = undefined; + } + if (!capture) { capture = false; } + + function handleLiveEvent(e) { + var target = e.target; + if (!target) { return; } + var eventData = e.target.dom7EventData || []; + if (eventData.indexOf(e) < 0) { + eventData.unshift(e); + } + if ($(target).is(targetSelector)) { listener.apply(target, eventData); } + else { + var parents = $(target).parents(); // eslint-disable-line + for (var k = 0; k < parents.length; k += 1) { + if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); } + } + } + } + function handleEvent(e) { + var eventData = e && e.target ? e.target.dom7EventData || [] : []; + if (eventData.indexOf(e) < 0) { + eventData.unshift(e); + } + listener.apply(this, eventData); + } + var events = eventType.split(' '); + var j; + for (var i = 0; i < this.length; i += 1) { + var el = this[i]; + if (!targetSelector) { + for (j = 0; j < events.length; j += 1) { + var event = events[j]; + if (!el.dom7Listeners) { el.dom7Listeners = {}; } + if (!el.dom7Listeners[event]) { el.dom7Listeners[event] = []; } + el.dom7Listeners[event].push({ + listener: listener, + proxyListener: handleEvent, + }); + el.addEventListener(event, handleEvent, capture); + } + } else { + // Live events + for (j = 0; j < events.length; j += 1) { + var event$1 = events[j]; + if (!el.dom7LiveListeners) { el.dom7LiveListeners = {}; } + if (!el.dom7LiveListeners[event$1]) { el.dom7LiveListeners[event$1] = []; } + el.dom7LiveListeners[event$1].push({ + listener: listener, + proxyListener: handleLiveEvent, + }); + el.addEventListener(event$1, handleLiveEvent, capture); + } + } + } + return this; + } + function off() { + var assign; + + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + var eventType = args[0]; + var targetSelector = args[1]; + var listener = args[2]; + var capture = args[3]; + if (typeof args[1] === 'function') { + (assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]); + targetSelector = undefined; + } + if (!capture) { capture = false; } + + var events = eventType.split(' '); + for (var i = 0; i < events.length; i += 1) { + var event = events[i]; + for (var j = 0; j < this.length; j += 1) { + var el = this[j]; + var handlers = (void 0); + if (!targetSelector && el.dom7Listeners) { + handlers = el.dom7Listeners[event]; + } else if (targetSelector && el.dom7LiveListeners) { + handlers = el.dom7LiveListeners[event]; + } + if (handlers && handlers.length) { + for (var k = handlers.length - 1; k >= 0; k -= 1) { + var handler = handlers[k]; + if (listener && handler.listener === listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } else if (!listener) { + el.removeEventListener(event, handler.proxyListener, capture); + handlers.splice(k, 1); + } + } + } + } + } + return this; + } + function trigger() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var events = args[0].split(' '); + var eventData = args[1]; + for (var i = 0; i < events.length; i += 1) { + var event = events[i]; + for (var j = 0; j < this.length; j += 1) { + var el = this[j]; + var evt = (void 0); + try { + evt = new win.CustomEvent(event, { + detail: eventData, + bubbles: true, + cancelable: true, + }); + } catch (e) { + evt = doc.createEvent('Event'); + evt.initEvent(event, true, true); + evt.detail = eventData; + } + // eslint-disable-next-line + el.dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; }); + el.dispatchEvent(evt); + el.dom7EventData = []; + delete el.dom7EventData; + } + } + return this; + } + function transitionEnd(callback) { + var events = ['webkitTransitionEnd', 'transitionend']; + var dom = this; + var i; + function fireCallBack(e) { + /* jshint validthis:true */ + if (e.target !== this) { return; } + callback.call(this, e); + for (i = 0; i < events.length; i += 1) { + dom.off(events[i], fireCallBack); + } + } + if (callback) { + for (i = 0; i < events.length; i += 1) { + dom.on(events[i], fireCallBack); + } + } + return this; + } + function outerWidth(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + // eslint-disable-next-line + var styles = this.styles(); + return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left')); + } + return this[0].offsetWidth; + } + return null; + } + function outerHeight(includeMargins) { + if (this.length > 0) { + if (includeMargins) { + // eslint-disable-next-line + var styles = this.styles(); + return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom')); + } + return this[0].offsetHeight; + } + return null; + } + function offset() { + if (this.length > 0) { + var el = this[0]; + var box = el.getBoundingClientRect(); + var body = doc.body; + var clientTop = el.clientTop || body.clientTop || 0; + var clientLeft = el.clientLeft || body.clientLeft || 0; + var scrollTop = el === win ? win.scrollY : el.scrollTop; + var scrollLeft = el === win ? win.scrollX : el.scrollLeft; + return { + top: (box.top + scrollTop) - clientTop, + left: (box.left + scrollLeft) - clientLeft, + }; + } + + return null; + } + function styles() { + if (this[0]) { return win.getComputedStyle(this[0], null); } + return {}; + } + function css(props, value) { + var i; + if (arguments.length === 1) { + if (typeof props === 'string') { + if (this[0]) { return win.getComputedStyle(this[0], null).getPropertyValue(props); } + } else { + for (i = 0; i < this.length; i += 1) { + // eslint-disable-next-line + for (var prop in props) { + this[i].style[prop] = props[prop]; + } + } + return this; + } + } + if (arguments.length === 2 && typeof props === 'string') { + for (i = 0; i < this.length; i += 1) { + this[i].style[props] = value; + } + return this; + } + return this; + } + // Iterate over the collection passing elements to `callback` + function each(callback) { + // Don't bother continuing without a callback + if (!callback) { return this; } + // Iterate over the current collection + for (var i = 0; i < this.length; i += 1) { + // If the callback returns false + if (callback.call(this[i], i, this[i]) === false) { + // End the loop early + return this; + } + } + // Return `this` to allow chained DOM operations + return this; + } + function filter(callback) { + var matchedItems = []; + var dom = this; + for (var i = 0; i < dom.length; i += 1) { + if (callback.call(dom[i], i, dom[i])) { matchedItems.push(dom[i]); } + } + return new Dom7(matchedItems); + } + // eslint-disable-next-line + function html(html) { + if (typeof html === 'undefined') { + return this[0] ? this[0].innerHTML : undefined; + } + + for (var i = 0; i < this.length; i += 1) { + this[i].innerHTML = html; + } + return this; + } + // eslint-disable-next-line + function text(text) { + if (typeof text === 'undefined') { + if (this[0]) { + return this[0].textContent.trim(); + } + return null; + } + + for (var i = 0; i < this.length; i += 1) { + this[i].textContent = text; + } + return this; + } + function is(selector) { + var el = this[0]; + var compareWith; + var i; + if (!el || typeof selector === 'undefined') { return false; } + if (typeof selector === 'string') { + if (el.matches) { return el.matches(selector); } + else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); } + else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); } + + compareWith = $(selector); + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) { return true; } + } + return false; + } else if (selector === doc) { return el === doc; } + else if (selector === win) { return el === win; } + + if (selector.nodeType || selector instanceof Dom7) { + compareWith = selector.nodeType ? [selector] : selector; + for (i = 0; i < compareWith.length; i += 1) { + if (compareWith[i] === el) { return true; } + } + return false; + } + return false; + } + function index() { + var child = this[0]; + var i; + if (child) { + i = 0; + // eslint-disable-next-line + while ((child = child.previousSibling) !== null) { + if (child.nodeType === 1) { i += 1; } + } + return i; + } + return undefined; + } + // eslint-disable-next-line + function eq(index) { + if (typeof index === 'undefined') { return this; } + var length = this.length; + var returnIndex; + if (index > length - 1) { + return new Dom7([]); + } + if (index < 0) { + returnIndex = length + index; + if (returnIndex < 0) { return new Dom7([]); } + return new Dom7([this[returnIndex]]); + } + return new Dom7([this[index]]); + } + function append() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var newChild; + + for (var k = 0; k < args.length; k += 1) { + newChild = args[k]; + for (var i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + var tempDiv = doc.createElement('div'); + tempDiv.innerHTML = newChild; + while (tempDiv.firstChild) { + this[i].appendChild(tempDiv.firstChild); + } + } else if (newChild instanceof Dom7) { + for (var j = 0; j < newChild.length; j += 1) { + this[i].appendChild(newChild[j]); + } + } else { + this[i].appendChild(newChild); + } + } + } + + return this; + } + function prepend(newChild) { + var i; + var j; + for (i = 0; i < this.length; i += 1) { + if (typeof newChild === 'string') { + var tempDiv = doc.createElement('div'); + tempDiv.innerHTML = newChild; + for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { + this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); + } + } else if (newChild instanceof Dom7) { + for (j = 0; j < newChild.length; j += 1) { + this[i].insertBefore(newChild[j], this[i].childNodes[0]); + } + } else { + this[i].insertBefore(newChild, this[i].childNodes[0]); + } + } + return this; + } + function next(selector) { + if (this.length > 0) { + if (selector) { + if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { + return new Dom7([this[0].nextElementSibling]); + } + return new Dom7([]); + } + + if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); } + return new Dom7([]); + } + return new Dom7([]); + } + function nextAll(selector) { + var nextEls = []; + var el = this[0]; + if (!el) { return new Dom7([]); } + while (el.nextElementSibling) { + var next = el.nextElementSibling; // eslint-disable-line + if (selector) { + if ($(next).is(selector)) { nextEls.push(next); } + } else { nextEls.push(next); } + el = next; + } + return new Dom7(nextEls); + } + function prev(selector) { + if (this.length > 0) { + var el = this[0]; + if (selector) { + if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { + return new Dom7([el.previousElementSibling]); + } + return new Dom7([]); + } + + if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); } + return new Dom7([]); + } + return new Dom7([]); + } + function prevAll(selector) { + var prevEls = []; + var el = this[0]; + if (!el) { return new Dom7([]); } + while (el.previousElementSibling) { + var prev = el.previousElementSibling; // eslint-disable-line + if (selector) { + if ($(prev).is(selector)) { prevEls.push(prev); } + } else { prevEls.push(prev); } + el = prev; + } + return new Dom7(prevEls); + } + function parent(selector) { + var parents = []; // eslint-disable-line + for (var i = 0; i < this.length; i += 1) { + if (this[i].parentNode !== null) { + if (selector) { + if ($(this[i].parentNode).is(selector)) { parents.push(this[i].parentNode); } + } else { + parents.push(this[i].parentNode); + } + } + } + return $(unique(parents)); + } + function parents(selector) { + var parents = []; // eslint-disable-line + for (var i = 0; i < this.length; i += 1) { + var parent = this[i].parentNode; // eslint-disable-line + while (parent) { + if (selector) { + if ($(parent).is(selector)) { parents.push(parent); } + } else { + parents.push(parent); + } + parent = parent.parentNode; + } + } + return $(unique(parents)); + } + function closest(selector) { + var closest = this; // eslint-disable-line + if (typeof selector === 'undefined') { + return new Dom7([]); + } + if (!closest.is(selector)) { + closest = closest.parents(selector).eq(0); + } + return closest; + } + function find(selector) { + var foundElements = []; + for (var i = 0; i < this.length; i += 1) { + var found = this[i].querySelectorAll(selector); + for (var j = 0; j < found.length; j += 1) { + foundElements.push(found[j]); + } + } + return new Dom7(foundElements); + } + function children(selector) { + var children = []; // eslint-disable-line + for (var i = 0; i < this.length; i += 1) { + var childNodes = this[i].childNodes; + + for (var j = 0; j < childNodes.length; j += 1) { + if (!selector) { + if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); } + } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) { + children.push(childNodes[j]); + } + } + } + return new Dom7(unique(children)); + } + function remove() { + for (var i = 0; i < this.length; i += 1) { + if (this[i].parentNode) { this[i].parentNode.removeChild(this[i]); } + } + return this; + } + function add() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var dom = this; + var i; + var j; + for (i = 0; i < args.length; i += 1) { + var toAdd = $(args[i]); + for (j = 0; j < toAdd.length; j += 1) { + dom[dom.length] = toAdd[j]; + dom.length += 1; + } + } + return dom; + } + + var Methods = { + addClass: addClass, + removeClass: removeClass, + hasClass: hasClass, + toggleClass: toggleClass, + attr: attr, + removeAttr: removeAttr, + data: data, + transform: transform, + transition: transition, + on: on, + off: off, + trigger: trigger, + transitionEnd: transitionEnd, + outerWidth: outerWidth, + outerHeight: outerHeight, + offset: offset, + css: css, + each: each, + html: html, + text: text, + is: is, + index: index, + eq: eq, + append: append, + prepend: prepend, + next: next, + nextAll: nextAll, + prev: prev, + prevAll: prevAll, + parent: parent, + parents: parents, + closest: closest, + find: find, + children: children, + filter: filter, + remove: remove, + add: add, + styles: styles, + }; + + Object.keys(Methods).forEach(function (methodName) { + $.fn[methodName] = $.fn[methodName] || Methods[methodName]; + }); + + var Utils = { + deleteProps: function deleteProps(obj) { + var object = obj; + Object.keys(object).forEach(function (key) { + try { + object[key] = null; + } catch (e) { + // no getter for object + } + try { + delete object[key]; + } catch (e) { + // something got wrong + } + }); + }, + nextTick: function nextTick(callback, delay) { + if ( delay === void 0 ) delay = 0; + + return setTimeout(callback, delay); + }, + now: function now() { + return Date.now(); + }, + getTranslate: function getTranslate(el, axis) { + if ( axis === void 0 ) axis = 'x'; + + var matrix; + var curTransform; + var transformMatrix; + + var curStyle = win.getComputedStyle(el, null); + + if (win.WebKitCSSMatrix) { + curTransform = curStyle.transform || curStyle.webkitTransform; + if (curTransform.split(',').length > 6) { + curTransform = curTransform.split(', ').map(function (a) { return a.replace(',', '.'); }).join(', '); + } + // Some old versions of Webkit choke when 'none' is passed; pass + // empty string instead in this case + transformMatrix = new win.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); + } else { + transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); + matrix = transformMatrix.toString().split(','); + } + + if (axis === 'x') { + // Latest Chrome and webkits Fix + if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m41; } + // Crazy IE10 Matrix + else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); } + // Normal Browsers + else { curTransform = parseFloat(matrix[4]); } + } + if (axis === 'y') { + // Latest Chrome and webkits Fix + if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m42; } + // Crazy IE10 Matrix + else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); } + // Normal Browsers + else { curTransform = parseFloat(matrix[5]); } + } + return curTransform || 0; + }, + parseUrlQuery: function parseUrlQuery(url) { + var query = {}; + var urlToParse = url || win.location.href; + var i; + var params; + var param; + var length; + if (typeof urlToParse === 'string' && urlToParse.length) { + urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : ''; + params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; }); + length = params.length; + + for (i = 0; i < length; i += 1) { + param = params[i].replace(/#\S+/g, '').split('='); + query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || ''; + } + } + return query; + }, + isObject: function isObject(o) { + return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object; + }, + extend: function extend() { + var args = [], len$1 = arguments.length; + while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ]; + + var to = Object(args[0]); + for (var i = 1; i < args.length; i += 1) { + var nextSource = args[i]; + if (nextSource !== undefined && nextSource !== null) { + var keysArray = Object.keys(Object(nextSource)); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { + var nextKey = keysArray[nextIndex]; + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) { + if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) { + Utils.extend(to[nextKey], nextSource[nextKey]); + } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) { + to[nextKey] = {}; + Utils.extend(to[nextKey], nextSource[nextKey]); + } else { + to[nextKey] = nextSource[nextKey]; + } + } + } + } + } + return to; + }, + }; + + var Support = (function Support() { + return { + touch: (win.Modernizr && win.Modernizr.touch === true) || (function checkTouch() { + return !!((win.navigator.maxTouchPoints > 0) || ('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch)); + }()), + + pointerEvents: !!win.PointerEvent && ('maxTouchPoints' in win.navigator) && win.navigator.maxTouchPoints > 0, + + observer: (function checkObserver() { + return ('MutationObserver' in win || 'WebkitMutationObserver' in win); + }()), + + passiveListener: (function checkPassiveListener() { + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + // eslint-disable-next-line + get: function get() { + supportsPassive = true; + }, + }); + win.addEventListener('testPassiveListener', null, opts); + } catch (e) { + // No support + } + return supportsPassive; + }()), + + gestures: (function checkGestures() { + return 'ongesturestart' in win; + }()), + }; + }()); + + var SwiperClass = function SwiperClass(params) { + if ( params === void 0 ) params = {}; + + var self = this; + self.params = params; + + // Events + self.eventsListeners = {}; + + if (self.params && self.params.on) { + Object.keys(self.params.on).forEach(function (eventName) { + self.on(eventName, self.params.on[eventName]); + }); + } + }; + + var staticAccessors = { components: { configurable: true } }; + + SwiperClass.prototype.on = function on (events, handler, priority) { + var self = this; + if (typeof handler !== 'function') { return self; } + var method = priority ? 'unshift' : 'push'; + events.split(' ').forEach(function (event) { + if (!self.eventsListeners[event]) { self.eventsListeners[event] = []; } + self.eventsListeners[event][method](handler); + }); + return self; + }; + + SwiperClass.prototype.once = function once (events, handler, priority) { + var self = this; + if (typeof handler !== 'function') { return self; } + function onceHandler() { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + self.off(events, onceHandler); + if (onceHandler.f7proxy) { + delete onceHandler.f7proxy; + } + handler.apply(self, args); + } + onceHandler.f7proxy = handler; + return self.on(events, onceHandler, priority); + }; + + SwiperClass.prototype.off = function off (events, handler) { + var self = this; + if (!self.eventsListeners) { return self; } + events.split(' ').forEach(function (event) { + if (typeof handler === 'undefined') { + self.eventsListeners[event] = []; + } else if (self.eventsListeners[event] && self.eventsListeners[event].length) { + self.eventsListeners[event].forEach(function (eventHandler, index) { + if (eventHandler === handler || (eventHandler.f7proxy && eventHandler.f7proxy === handler)) { + self.eventsListeners[event].splice(index, 1); + } + }); + } + }); + return self; + }; + + SwiperClass.prototype.emit = function emit () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + + var self = this; + if (!self.eventsListeners) { return self; } + var events; + var data; + var context; + if (typeof args[0] === 'string' || Array.isArray(args[0])) { + events = args[0]; + data = args.slice(1, args.length); + context = self; + } else { + events = args[0].events; + data = args[0].data; + context = args[0].context || self; + } + var eventsArray = Array.isArray(events) ? events : events.split(' '); + eventsArray.forEach(function (event) { + if (self.eventsListeners && self.eventsListeners[event]) { + var handlers = []; + self.eventsListeners[event].forEach(function (eventHandler) { + handlers.push(eventHandler); + }); + handlers.forEach(function (eventHandler) { + eventHandler.apply(context, data); + }); + } + }); + return self; + }; + + SwiperClass.prototype.useModulesParams = function useModulesParams (instanceParams) { + var instance = this; + if (!instance.modules) { return; } + Object.keys(instance.modules).forEach(function (moduleName) { + var module = instance.modules[moduleName]; + // Extend params + if (module.params) { + Utils.extend(instanceParams, module.params); + } + }); + }; + + SwiperClass.prototype.useModules = function useModules (modulesParams) { + if ( modulesParams === void 0 ) modulesParams = {}; + + var instance = this; + if (!instance.modules) { return; } + Object.keys(instance.modules).forEach(function (moduleName) { + var module = instance.modules[moduleName]; + var moduleParams = modulesParams[moduleName] || {}; + // Extend instance methods and props + if (module.instance) { + Object.keys(module.instance).forEach(function (modulePropName) { + var moduleProp = module.instance[modulePropName]; + if (typeof moduleProp === 'function') { + instance[modulePropName] = moduleProp.bind(instance); + } else { + instance[modulePropName] = moduleProp; + } + }); + } + // Add event listeners + if (module.on && instance.on) { + Object.keys(module.on).forEach(function (moduleEventName) { + instance.on(moduleEventName, module.on[moduleEventName]); + }); + } + + // Module create callback + if (module.create) { + module.create.bind(instance)(moduleParams); + } + }); + }; + + staticAccessors.components.set = function (components) { + var Class = this; + if (!Class.use) { return; } + Class.use(components); + }; + + SwiperClass.installModule = function installModule (module) { + var params = [], len = arguments.length - 1; + while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ]; + + var Class = this; + if (!Class.prototype.modules) { Class.prototype.modules = {}; } + var name = module.name || (((Object.keys(Class.prototype.modules).length) + "_" + (Utils.now()))); + Class.prototype.modules[name] = module; + // Prototype + if (module.proto) { + Object.keys(module.proto).forEach(function (key) { + Class.prototype[key] = module.proto[key]; + }); + } + // Class + if (module.static) { + Object.keys(module.static).forEach(function (key) { + Class[key] = module.static[key]; + }); + } + // Callback + if (module.install) { + module.install.apply(Class, params); + } + return Class; + }; + + SwiperClass.use = function use (module) { + var params = [], len = arguments.length - 1; + while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ]; + + var Class = this; + if (Array.isArray(module)) { + module.forEach(function (m) { return Class.installModule(m); }); + return Class; + } + return Class.installModule.apply(Class, [ module ].concat( params )); + }; + + Object.defineProperties( SwiperClass, staticAccessors ); + + function updateSize () { + var swiper = this; + var width; + var height; + var $el = swiper.$el; + if (typeof swiper.params.width !== 'undefined') { + width = swiper.params.width; + } else { + width = $el[0].clientWidth; + } + if (typeof swiper.params.height !== 'undefined') { + height = swiper.params.height; + } else { + height = $el[0].clientHeight; + } + if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) { + return; + } + + // Subtract paddings + width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10); + height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10); + + Utils.extend(swiper, { + width: width, + height: height, + size: swiper.isHorizontal() ? width : height, + }); + } + + function updateSlides () { + var swiper = this; + var params = swiper.params; + + var $wrapperEl = swiper.$wrapperEl; + var swiperSize = swiper.size; + var rtl = swiper.rtlTranslate; + var wrongRTL = swiper.wrongRTL; + var isVirtual = swiper.virtual && params.virtual.enabled; + var previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; + var slides = $wrapperEl.children(("." + (swiper.params.slideClass))); + var slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; + var snapGrid = []; + var slidesGrid = []; + var slidesSizesGrid = []; + + function slidesForMargin(slideIndex) { + if (!params.cssMode) { return true; } + if (slideIndex === slides.length - 1) { + return false; + } + return true; + } + + var offsetBefore = params.slidesOffsetBefore; + if (typeof offsetBefore === 'function') { + offsetBefore = params.slidesOffsetBefore.call(swiper); + } + + var offsetAfter = params.slidesOffsetAfter; + if (typeof offsetAfter === 'function') { + offsetAfter = params.slidesOffsetAfter.call(swiper); + } + + var previousSnapGridLength = swiper.snapGrid.length; + var previousSlidesGridLength = swiper.snapGrid.length; + + var spaceBetween = params.spaceBetween; + var slidePosition = -offsetBefore; + var prevSlideSize = 0; + var index = 0; + if (typeof swiperSize === 'undefined') { + return; + } + if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { + spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize; + } + + swiper.virtualSize = -spaceBetween; + + // reset margins + if (rtl) { slides.css({ marginLeft: '', marginTop: '' }); } + else { slides.css({ marginRight: '', marginBottom: '' }); } + + var slidesNumberEvenToRows; + if (params.slidesPerColumn > 1) { + if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) { + slidesNumberEvenToRows = slidesLength; + } else { + slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn; + } + if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') { + slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn); + } + } + + // Calc slides + var slideSize; + var slidesPerColumn = params.slidesPerColumn; + var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn; + var numFullColumns = Math.floor(slidesLength / params.slidesPerColumn); + for (var i = 0; i < slidesLength; i += 1) { + slideSize = 0; + var slide = slides.eq(i); + if (params.slidesPerColumn > 1) { + // Set slides order + var newSlideOrderIndex = (void 0); + var column = (void 0); + var row = (void 0); + if (params.slidesPerColumnFill === 'row' && params.slidesPerGroup > 1) { + var groupIndex = Math.floor(i / (params.slidesPerGroup * params.slidesPerColumn)); + var slideIndexInGroup = i - params.slidesPerColumn * params.slidesPerGroup * groupIndex; + var columnsInGroup = groupIndex === 0 + ? params.slidesPerGroup + : Math.min(Math.ceil((slidesLength - groupIndex * slidesPerColumn * params.slidesPerGroup) / slidesPerColumn), params.slidesPerGroup); + row = Math.floor(slideIndexInGroup / columnsInGroup); + column = (slideIndexInGroup - row * columnsInGroup) + groupIndex * params.slidesPerGroup; + + newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn); + slide + .css({ + '-webkit-box-ordinal-group': newSlideOrderIndex, + '-moz-box-ordinal-group': newSlideOrderIndex, + '-ms-flex-order': newSlideOrderIndex, + '-webkit-order': newSlideOrderIndex, + order: newSlideOrderIndex, + }); + } else if (params.slidesPerColumnFill === 'column') { + column = Math.floor(i / slidesPerColumn); + row = i - (column * slidesPerColumn); + if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) { + row += 1; + if (row >= slidesPerColumn) { + row = 0; + column += 1; + } + } + } else { + row = Math.floor(i / slidesPerRow); + column = i - (row * slidesPerRow); + } + slide.css( + ("margin-" + (swiper.isHorizontal() ? 'top' : 'left')), + (row !== 0 && params.spaceBetween) && (((params.spaceBetween) + "px")) + ); + } + if (slide.css('display') === 'none') { continue; } // eslint-disable-line + + if (params.slidesPerView === 'auto') { + var slideStyles = win.getComputedStyle(slide[0], null); + var currentTransform = slide[0].style.transform; + var currentWebKitTransform = slide[0].style.webkitTransform; + if (currentTransform) { + slide[0].style.transform = 'none'; + } + if (currentWebKitTransform) { + slide[0].style.webkitTransform = 'none'; + } + if (params.roundLengths) { + slideSize = swiper.isHorizontal() + ? slide.outerWidth(true) + : slide.outerHeight(true); + } else { + // eslint-disable-next-line + if (swiper.isHorizontal()) { + var width = parseFloat(slideStyles.getPropertyValue('width')); + var paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left')); + var paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right')); + var marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left')); + var marginRight = parseFloat(slideStyles.getPropertyValue('margin-right')); + var boxSizing = slideStyles.getPropertyValue('box-sizing'); + if (boxSizing && boxSizing === 'border-box') { + slideSize = width + marginLeft + marginRight; + } else { + slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight; + } + } else { + var height = parseFloat(slideStyles.getPropertyValue('height')); + var paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top')); + var paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom')); + var marginTop = parseFloat(slideStyles.getPropertyValue('margin-top')); + var marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom')); + var boxSizing$1 = slideStyles.getPropertyValue('box-sizing'); + if (boxSizing$1 && boxSizing$1 === 'border-box') { + slideSize = height + marginTop + marginBottom; + } else { + slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom; + } + } + } + if (currentTransform) { + slide[0].style.transform = currentTransform; + } + if (currentWebKitTransform) { + slide[0].style.webkitTransform = currentWebKitTransform; + } + if (params.roundLengths) { slideSize = Math.floor(slideSize); } + } else { + slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView; + if (params.roundLengths) { slideSize = Math.floor(slideSize); } + + if (slides[i]) { + if (swiper.isHorizontal()) { + slides[i].style.width = slideSize + "px"; + } else { + slides[i].style.height = slideSize + "px"; + } + } + } + if (slides[i]) { + slides[i].swiperSlideSize = slideSize; + } + slidesSizesGrid.push(slideSize); + + + if (params.centeredSlides) { + slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween; + if (prevSlideSize === 0 && i !== 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; } + if (i === 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; } + if (Math.abs(slidePosition) < 1 / 1000) { slidePosition = 0; } + if (params.roundLengths) { slidePosition = Math.floor(slidePosition); } + if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); } + slidesGrid.push(slidePosition); + } else { + if (params.roundLengths) { slidePosition = Math.floor(slidePosition); } + if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) { snapGrid.push(slidePosition); } + slidesGrid.push(slidePosition); + slidePosition = slidePosition + slideSize + spaceBetween; + } + + swiper.virtualSize += slideSize + spaceBetween; + + prevSlideSize = slideSize; + + index += 1; + } + swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; + var newSlidesGrid; + + if ( + rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { + $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); + } + if (params.setWrapperSize) { + if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); } + else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); } + } + + if (params.slidesPerColumn > 1) { + swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows; + swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween; + if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); } + else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); } + if (params.centeredSlides) { + newSlidesGrid = []; + for (var i$1 = 0; i$1 < snapGrid.length; i$1 += 1) { + var slidesGridItem = snapGrid[i$1]; + if (params.roundLengths) { slidesGridItem = Math.floor(slidesGridItem); } + if (snapGrid[i$1] < swiper.virtualSize + snapGrid[0]) { newSlidesGrid.push(slidesGridItem); } + } + snapGrid = newSlidesGrid; + } + } + + // Remove last grid elements depending on width + if (!params.centeredSlides) { + newSlidesGrid = []; + for (var i$2 = 0; i$2 < snapGrid.length; i$2 += 1) { + var slidesGridItem$1 = snapGrid[i$2]; + if (params.roundLengths) { slidesGridItem$1 = Math.floor(slidesGridItem$1); } + if (snapGrid[i$2] <= swiper.virtualSize - swiperSize) { + newSlidesGrid.push(slidesGridItem$1); + } + } + snapGrid = newSlidesGrid; + if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { + snapGrid.push(swiper.virtualSize - swiperSize); + } + } + if (snapGrid.length === 0) { snapGrid = [0]; } + + if (params.spaceBetween !== 0) { + if (swiper.isHorizontal()) { + if (rtl) { slides.filter(slidesForMargin).css({ marginLeft: (spaceBetween + "px") }); } + else { slides.filter(slidesForMargin).css({ marginRight: (spaceBetween + "px") }); } + } else { slides.filter(slidesForMargin).css({ marginBottom: (spaceBetween + "px") }); } + } + + if (params.centeredSlides && params.centeredSlidesBounds) { + var allSlidesSize = 0; + slidesSizesGrid.forEach(function (slideSizeValue) { + allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); + }); + allSlidesSize -= params.spaceBetween; + var maxSnap = allSlidesSize - swiperSize; + snapGrid = snapGrid.map(function (snap) { + if (snap < 0) { return -offsetBefore; } + if (snap > maxSnap) { return maxSnap + offsetAfter; } + return snap; + }); + } + + if (params.centerInsufficientSlides) { + var allSlidesSize$1 = 0; + slidesSizesGrid.forEach(function (slideSizeValue) { + allSlidesSize$1 += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); + }); + allSlidesSize$1 -= params.spaceBetween; + if (allSlidesSize$1 < swiperSize) { + var allSlidesOffset = (swiperSize - allSlidesSize$1) / 2; + snapGrid.forEach(function (snap, snapIndex) { + snapGrid[snapIndex] = snap - allSlidesOffset; + }); + slidesGrid.forEach(function (snap, snapIndex) { + slidesGrid[snapIndex] = snap + allSlidesOffset; + }); + } + } + + Utils.extend(swiper, { + slides: slides, + snapGrid: snapGrid, + slidesGrid: slidesGrid, + slidesSizesGrid: slidesSizesGrid, + }); + + if (slidesLength !== previousSlidesLength) { + swiper.emit('slidesLengthChange'); + } + if (snapGrid.length !== previousSnapGridLength) { + if (swiper.params.watchOverflow) { swiper.checkOverflow(); } + swiper.emit('snapGridLengthChange'); + } + if (slidesGrid.length !== previousSlidesGridLength) { + swiper.emit('slidesGridLengthChange'); + } + + if (params.watchSlidesProgress || params.watchSlidesVisibility) { + swiper.updateSlidesOffset(); + } + } + + function updateAutoHeight (speed) { + var swiper = this; + var activeSlides = []; + var newHeight = 0; + var i; + if (typeof speed === 'number') { + swiper.setTransition(speed); + } else if (speed === true) { + swiper.setTransition(swiper.params.speed); + } + // Find slides currently in view + if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { + for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { + var index = swiper.activeIndex + i; + if (index > swiper.slides.length) { break; } + activeSlides.push(swiper.slides.eq(index)[0]); + } + } else { + activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]); + } + + // Find new height from highest slide in view + for (i = 0; i < activeSlides.length; i += 1) { + if (typeof activeSlides[i] !== 'undefined') { + var height = activeSlides[i].offsetHeight; + newHeight = height > newHeight ? height : newHeight; + } + } + + // Update Height + if (newHeight) { swiper.$wrapperEl.css('height', (newHeight + "px")); } + } + + function updateSlidesOffset () { + var swiper = this; + var slides = swiper.slides; + for (var i = 0; i < slides.length; i += 1) { + slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop; + } + } + + function updateSlidesProgress (translate) { + if ( translate === void 0 ) translate = (this && this.translate) || 0; + + var swiper = this; + var params = swiper.params; + + var slides = swiper.slides; + var rtl = swiper.rtlTranslate; + + if (slides.length === 0) { return; } + if (typeof slides[0].swiperSlideOffset === 'undefined') { swiper.updateSlidesOffset(); } + + var offsetCenter = -translate; + if (rtl) { offsetCenter = translate; } + + // Visible Slides + slides.removeClass(params.slideVisibleClass); + + swiper.visibleSlidesIndexes = []; + swiper.visibleSlides = []; + + for (var i = 0; i < slides.length; i += 1) { + var slide = slides[i]; + var slideProgress = ( + (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset + ) / (slide.swiperSlideSize + params.spaceBetween); + if (params.watchSlidesVisibility) { + var slideBefore = -(offsetCenter - slide.swiperSlideOffset); + var slideAfter = slideBefore + swiper.slidesSizesGrid[i]; + var isVisible = (slideBefore >= 0 && slideBefore < swiper.size - 1) + || (slideAfter > 1 && slideAfter <= swiper.size) + || (slideBefore <= 0 && slideAfter >= swiper.size); + if (isVisible) { + swiper.visibleSlides.push(slide); + swiper.visibleSlidesIndexes.push(i); + slides.eq(i).addClass(params.slideVisibleClass); + } + } + slide.progress = rtl ? -slideProgress : slideProgress; + } + swiper.visibleSlides = $(swiper.visibleSlides); + } + + function updateProgress (translate) { + var swiper = this; + if (typeof translate === 'undefined') { + var multiplier = swiper.rtlTranslate ? -1 : 1; + // eslint-disable-next-line + translate = (swiper && swiper.translate && (swiper.translate * multiplier)) || 0; + } + var params = swiper.params; + var translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + var progress = swiper.progress; + var isBeginning = swiper.isBeginning; + var isEnd = swiper.isEnd; + var wasBeginning = isBeginning; + var wasEnd = isEnd; + if (translatesDiff === 0) { + progress = 0; + isBeginning = true; + isEnd = true; + } else { + progress = (translate - swiper.minTranslate()) / (translatesDiff); + isBeginning = progress <= 0; + isEnd = progress >= 1; + } + Utils.extend(swiper, { + progress: progress, + isBeginning: isBeginning, + isEnd: isEnd, + }); + + if (params.watchSlidesProgress || params.watchSlidesVisibility) { swiper.updateSlidesProgress(translate); } + + if (isBeginning && !wasBeginning) { + swiper.emit('reachBeginning toEdge'); + } + if (isEnd && !wasEnd) { + swiper.emit('reachEnd toEdge'); + } + if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) { + swiper.emit('fromEdge'); + } + + swiper.emit('progress', progress); + } + + function updateSlidesClasses () { + var swiper = this; + + var slides = swiper.slides; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + var activeIndex = swiper.activeIndex; + var realIndex = swiper.realIndex; + var isVirtual = swiper.virtual && params.virtual.enabled; + + slides.removeClass(((params.slideActiveClass) + " " + (params.slideNextClass) + " " + (params.slidePrevClass) + " " + (params.slideDuplicateActiveClass) + " " + (params.slideDuplicateNextClass) + " " + (params.slideDuplicatePrevClass))); + + var activeSlide; + if (isVirtual) { + activeSlide = swiper.$wrapperEl.find(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + activeIndex + "\"]")); + } else { + activeSlide = slides.eq(activeIndex); + } + + // Active classes + activeSlide.addClass(params.slideActiveClass); + + if (params.loop) { + // Duplicate to all looped slides + if (activeSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl + .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + realIndex + "\"]")) + .addClass(params.slideDuplicateActiveClass); + } else { + $wrapperEl + .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]")) + .addClass(params.slideDuplicateActiveClass); + } + } + // Next Slide + var nextSlide = activeSlide.nextAll(("." + (params.slideClass))).eq(0).addClass(params.slideNextClass); + if (params.loop && nextSlide.length === 0) { + nextSlide = slides.eq(0); + nextSlide.addClass(params.slideNextClass); + } + // Prev Slide + var prevSlide = activeSlide.prevAll(("." + (params.slideClass))).eq(0).addClass(params.slidePrevClass); + if (params.loop && prevSlide.length === 0) { + prevSlide = slides.eq(-1); + prevSlide.addClass(params.slidePrevClass); + } + if (params.loop) { + // Duplicate to all looped slides + if (nextSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl + .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]")) + .addClass(params.slideDuplicateNextClass); + } else { + $wrapperEl + .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]")) + .addClass(params.slideDuplicateNextClass); + } + if (prevSlide.hasClass(params.slideDuplicateClass)) { + $wrapperEl + .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]")) + .addClass(params.slideDuplicatePrevClass); + } else { + $wrapperEl + .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]")) + .addClass(params.slideDuplicatePrevClass); + } + } + } + + function updateActiveIndex (newActiveIndex) { + var swiper = this; + var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; + var slidesGrid = swiper.slidesGrid; + var snapGrid = swiper.snapGrid; + var params = swiper.params; + var previousIndex = swiper.activeIndex; + var previousRealIndex = swiper.realIndex; + var previousSnapIndex = swiper.snapIndex; + var activeIndex = newActiveIndex; + var snapIndex; + if (typeof activeIndex === 'undefined') { + for (var i = 0; i < slidesGrid.length; i += 1) { + if (typeof slidesGrid[i + 1] !== 'undefined') { + if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) { + activeIndex = i; + } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { + activeIndex = i + 1; + } + } else if (translate >= slidesGrid[i]) { + activeIndex = i; + } + } + // Normalize slideIndex + if (params.normalizeSlideIndex) { + if (activeIndex < 0 || typeof activeIndex === 'undefined') { activeIndex = 0; } + } + } + if (snapGrid.indexOf(translate) >= 0) { + snapIndex = snapGrid.indexOf(translate); + } else { + var skip = Math.min(params.slidesPerGroupSkip, activeIndex); + snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); + } + if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; } + if (activeIndex === previousIndex) { + if (snapIndex !== previousSnapIndex) { + swiper.snapIndex = snapIndex; + swiper.emit('snapIndexChange'); + } + return; + } + + // Get real index + var realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10); + + Utils.extend(swiper, { + snapIndex: snapIndex, + realIndex: realIndex, + previousIndex: previousIndex, + activeIndex: activeIndex, + }); + swiper.emit('activeIndexChange'); + swiper.emit('snapIndexChange'); + if (previousRealIndex !== realIndex) { + swiper.emit('realIndexChange'); + } + if (swiper.initialized || swiper.runCallbacksOnInit) { + swiper.emit('slideChange'); + } + } + + function updateClickedSlide (e) { + var swiper = this; + var params = swiper.params; + var slide = $(e.target).closest(("." + (params.slideClass)))[0]; + var slideFound = false; + if (slide) { + for (var i = 0; i < swiper.slides.length; i += 1) { + if (swiper.slides[i] === slide) { slideFound = true; } + } + } + + if (slide && slideFound) { + swiper.clickedSlide = slide; + if (swiper.virtual && swiper.params.virtual.enabled) { + swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10); + } else { + swiper.clickedIndex = $(slide).index(); + } + } else { + swiper.clickedSlide = undefined; + swiper.clickedIndex = undefined; + return; + } + if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { + swiper.slideToClickedSlide(); + } + } + + var update = { + updateSize: updateSize, + updateSlides: updateSlides, + updateAutoHeight: updateAutoHeight, + updateSlidesOffset: updateSlidesOffset, + updateSlidesProgress: updateSlidesProgress, + updateProgress: updateProgress, + updateSlidesClasses: updateSlidesClasses, + updateActiveIndex: updateActiveIndex, + updateClickedSlide: updateClickedSlide, + }; + + function getTranslate (axis) { + if ( axis === void 0 ) axis = this.isHorizontal() ? 'x' : 'y'; + + var swiper = this; + + var params = swiper.params; + var rtl = swiper.rtlTranslate; + var translate = swiper.translate; + var $wrapperEl = swiper.$wrapperEl; + + if (params.virtualTranslate) { + return rtl ? -translate : translate; + } + if (params.cssMode) { + return translate; + } + + var currentTranslate = Utils.getTranslate($wrapperEl[0], axis); + if (rtl) { currentTranslate = -currentTranslate; } + + return currentTranslate || 0; + } + + function setTranslate (translate, byController) { + var swiper = this; + var rtl = swiper.rtlTranslate; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + var wrapperEl = swiper.wrapperEl; + var progress = swiper.progress; + var x = 0; + var y = 0; + var z = 0; + + if (swiper.isHorizontal()) { + x = rtl ? -translate : translate; + } else { + y = translate; + } + + if (params.roundLengths) { + x = Math.floor(x); + y = Math.floor(y); + } + + if (params.cssMode) { + wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y; + } else if (!params.virtualTranslate) { + $wrapperEl.transform(("translate3d(" + x + "px, " + y + "px, " + z + "px)")); + } + swiper.previousTranslate = swiper.translate; + swiper.translate = swiper.isHorizontal() ? x : y; + + // Check if we need to update progress + var newProgress; + var translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + if (translatesDiff === 0) { + newProgress = 0; + } else { + newProgress = (translate - swiper.minTranslate()) / (translatesDiff); + } + if (newProgress !== progress) { + swiper.updateProgress(translate); + } + + swiper.emit('setTranslate', swiper.translate, byController); + } + + function minTranslate () { + return (-this.snapGrid[0]); + } + + function maxTranslate () { + return (-this.snapGrid[this.snapGrid.length - 1]); + } + + function translateTo (translate, speed, runCallbacks, translateBounds, internal) { + var obj; + + if ( translate === void 0 ) translate = 0; + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + if ( translateBounds === void 0 ) translateBounds = true; + var swiper = this; + + var params = swiper.params; + var wrapperEl = swiper.wrapperEl; + + if (swiper.animating && params.preventInteractionOnTransition) { + return false; + } + + var minTranslate = swiper.minTranslate(); + var maxTranslate = swiper.maxTranslate(); + var newTranslate; + if (translateBounds && translate > minTranslate) { newTranslate = minTranslate; } + else if (translateBounds && translate < maxTranslate) { newTranslate = maxTranslate; } + else { newTranslate = translate; } + + // Update progress + swiper.updateProgress(newTranslate); + + if (params.cssMode) { + var isH = swiper.isHorizontal(); + if (speed === 0) { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; + } else { + // eslint-disable-next-line + if (wrapperEl.scrollTo) { + wrapperEl.scrollTo(( obj = {}, obj[isH ? 'left' : 'top'] = -newTranslate, obj.behavior = 'smooth', obj )); + } else { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; + } + } + return true; + } + + if (speed === 0) { + swiper.setTransition(0); + swiper.setTranslate(newTranslate); + if (runCallbacks) { + swiper.emit('beforeTransitionStart', speed, internal); + swiper.emit('transitionEnd'); + } + } else { + swiper.setTransition(speed); + swiper.setTranslate(newTranslate); + if (runCallbacks) { + swiper.emit('beforeTransitionStart', speed, internal); + swiper.emit('transitionStart'); + } + if (!swiper.animating) { + swiper.animating = true; + if (!swiper.onTranslateToWrapperTransitionEnd) { + swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) { + if (!swiper || swiper.destroyed) { return; } + if (e.target !== this) { return; } + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); + swiper.onTranslateToWrapperTransitionEnd = null; + delete swiper.onTranslateToWrapperTransitionEnd; + if (runCallbacks) { + swiper.emit('transitionEnd'); + } + }; + } + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); + } + } + + return true; + } + + var translate = { + getTranslate: getTranslate, + setTranslate: setTranslate, + minTranslate: minTranslate, + maxTranslate: maxTranslate, + translateTo: translateTo, + }; + + function setTransition (duration, byController) { + var swiper = this; + + if (!swiper.params.cssMode) { + swiper.$wrapperEl.transition(duration); + } + + swiper.emit('setTransition', duration, byController); + } + + function transitionStart (runCallbacks, direction) { + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var activeIndex = swiper.activeIndex; + var params = swiper.params; + var previousIndex = swiper.previousIndex; + if (params.cssMode) { return; } + if (params.autoHeight) { + swiper.updateAutoHeight(); + } + + var dir = direction; + if (!dir) { + if (activeIndex > previousIndex) { dir = 'next'; } + else if (activeIndex < previousIndex) { dir = 'prev'; } + else { dir = 'reset'; } + } + + swiper.emit('transitionStart'); + + if (runCallbacks && activeIndex !== previousIndex) { + if (dir === 'reset') { + swiper.emit('slideResetTransitionStart'); + return; + } + swiper.emit('slideChangeTransitionStart'); + if (dir === 'next') { + swiper.emit('slideNextTransitionStart'); + } else { + swiper.emit('slidePrevTransitionStart'); + } + } + } + + function transitionEnd$1 (runCallbacks, direction) { + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var activeIndex = swiper.activeIndex; + var previousIndex = swiper.previousIndex; + var params = swiper.params; + swiper.animating = false; + if (params.cssMode) { return; } + swiper.setTransition(0); + + var dir = direction; + if (!dir) { + if (activeIndex > previousIndex) { dir = 'next'; } + else if (activeIndex < previousIndex) { dir = 'prev'; } + else { dir = 'reset'; } + } + + swiper.emit('transitionEnd'); + + if (runCallbacks && activeIndex !== previousIndex) { + if (dir === 'reset') { + swiper.emit('slideResetTransitionEnd'); + return; + } + swiper.emit('slideChangeTransitionEnd'); + if (dir === 'next') { + swiper.emit('slideNextTransitionEnd'); + } else { + swiper.emit('slidePrevTransitionEnd'); + } + } + } + + var transition$1 = { + setTransition: setTransition, + transitionStart: transitionStart, + transitionEnd: transitionEnd$1, + }; + + function slideTo (index, speed, runCallbacks, internal) { + var obj; + + if ( index === void 0 ) index = 0; + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + var swiper = this; + var slideIndex = index; + if (slideIndex < 0) { slideIndex = 0; } + + var params = swiper.params; + var snapGrid = swiper.snapGrid; + var slidesGrid = swiper.slidesGrid; + var previousIndex = swiper.previousIndex; + var activeIndex = swiper.activeIndex; + var rtl = swiper.rtlTranslate; + var wrapperEl = swiper.wrapperEl; + if (swiper.animating && params.preventInteractionOnTransition) { + return false; + } + + var skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); + var snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); + if (snapIndex >= slidesGrid.length) { snapIndex = slidesGrid.length - 1; } + + if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) { + swiper.emit('beforeSlideChangeStart'); + } + + var translate = -snapGrid[snapIndex]; + + // Update progress + swiper.updateProgress(translate); + + // Normalize slideIndex + if (params.normalizeSlideIndex) { + for (var i = 0; i < slidesGrid.length; i += 1) { + if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) { + slideIndex = i; + } + } + } + // Directions locks + if (swiper.initialized && slideIndex !== activeIndex) { + if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) { + return false; + } + if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { + if ((activeIndex || 0) !== slideIndex) { return false; } + } + } + + var direction; + if (slideIndex > activeIndex) { direction = 'next'; } + else if (slideIndex < activeIndex) { direction = 'prev'; } + else { direction = 'reset'; } + + + // Update Index + if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) { + swiper.updateActiveIndex(slideIndex); + // Update Height + if (params.autoHeight) { + swiper.updateAutoHeight(); + } + swiper.updateSlidesClasses(); + if (params.effect !== 'slide') { + swiper.setTranslate(translate); + } + if (direction !== 'reset') { + swiper.transitionStart(runCallbacks, direction); + swiper.transitionEnd(runCallbacks, direction); + } + return false; + } + if (params.cssMode) { + var isH = swiper.isHorizontal(); + if (speed === 0) { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -translate; + } else { + // eslint-disable-next-line + if (wrapperEl.scrollTo) { + wrapperEl.scrollTo(( obj = {}, obj[isH ? 'left' : 'top'] = -translate, obj.behavior = 'smooth', obj )); + } else { + wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -translate; + } + } + return true; + } + + if (speed === 0) { + swiper.setTransition(0); + swiper.setTranslate(translate); + swiper.updateActiveIndex(slideIndex); + swiper.updateSlidesClasses(); + swiper.emit('beforeTransitionStart', speed, internal); + swiper.transitionStart(runCallbacks, direction); + swiper.transitionEnd(runCallbacks, direction); + } else { + swiper.setTransition(speed); + swiper.setTranslate(translate); + swiper.updateActiveIndex(slideIndex); + swiper.updateSlidesClasses(); + swiper.emit('beforeTransitionStart', speed, internal); + swiper.transitionStart(runCallbacks, direction); + if (!swiper.animating) { + swiper.animating = true; + if (!swiper.onSlideToWrapperTransitionEnd) { + swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) { + if (!swiper || swiper.destroyed) { return; } + if (e.target !== this) { return; } + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); + swiper.onSlideToWrapperTransitionEnd = null; + delete swiper.onSlideToWrapperTransitionEnd; + swiper.transitionEnd(runCallbacks, direction); + }; + } + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); + } + } + + return true; + } + + function slideToLoop (index, speed, runCallbacks, internal) { + if ( index === void 0 ) index = 0; + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var newIndex = index; + if (swiper.params.loop) { + newIndex += swiper.loopedSlides; + } + + return swiper.slideTo(newIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideNext (speed, runCallbacks, internal) { + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var params = swiper.params; + var animating = swiper.animating; + var increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup; + if (params.loop) { + if (animating) { return false; } + swiper.loopFix(); + // eslint-disable-next-line + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + } + return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slidePrev (speed, runCallbacks, internal) { + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + var params = swiper.params; + var animating = swiper.animating; + var snapGrid = swiper.snapGrid; + var slidesGrid = swiper.slidesGrid; + var rtlTranslate = swiper.rtlTranslate; + + if (params.loop) { + if (animating) { return false; } + swiper.loopFix(); + // eslint-disable-next-line + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + } + var translate = rtlTranslate ? swiper.translate : -swiper.translate; + function normalize(val) { + if (val < 0) { return -Math.floor(Math.abs(val)); } + return Math.floor(val); + } + var normalizedTranslate = normalize(translate); + var normalizedSnapGrid = snapGrid.map(function (val) { return normalize(val); }); + var normalizedSlidesGrid = slidesGrid.map(function (val) { return normalize(val); }); + + var currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)]; + var prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; + if (typeof prevSnap === 'undefined' && params.cssMode) { + snapGrid.forEach(function (snap) { + if (!prevSnap && normalizedTranslate >= snap) { prevSnap = snap; } + }); + } + var prevIndex; + if (typeof prevSnap !== 'undefined') { + prevIndex = slidesGrid.indexOf(prevSnap); + if (prevIndex < 0) { prevIndex = swiper.activeIndex - 1; } + } + return swiper.slideTo(prevIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideReset (speed, runCallbacks, internal) { + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + + var swiper = this; + return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); + } + + /* eslint no-unused-vars: "off" */ + function slideToClosest (speed, runCallbacks, internal, threshold) { + if ( speed === void 0 ) speed = this.params.speed; + if ( runCallbacks === void 0 ) runCallbacks = true; + if ( threshold === void 0 ) threshold = 0.5; + + var swiper = this; + var index = swiper.activeIndex; + var skip = Math.min(swiper.params.slidesPerGroupSkip, index); + var snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); + + var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; + + if (translate >= swiper.snapGrid[snapIndex]) { + // The current translate is on or after the current snap index, so the choice + // is between the current index and the one after it. + var currentSnap = swiper.snapGrid[snapIndex]; + var nextSnap = swiper.snapGrid[snapIndex + 1]; + if ((translate - currentSnap) > (nextSnap - currentSnap) * threshold) { + index += swiper.params.slidesPerGroup; + } + } else { + // The current translate is before the current snap index, so the choice + // is between the current index and the one before it. + var prevSnap = swiper.snapGrid[snapIndex - 1]; + var currentSnap$1 = swiper.snapGrid[snapIndex]; + if ((translate - prevSnap) <= (currentSnap$1 - prevSnap) * threshold) { + index -= swiper.params.slidesPerGroup; + } + } + index = Math.max(index, 0); + index = Math.min(index, swiper.slidesGrid.length - 1); + + return swiper.slideTo(index, speed, runCallbacks, internal); + } + + function slideToClickedSlide () { + var swiper = this; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + + var slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; + var slideToIndex = swiper.clickedIndex; + var realIndex; + if (params.loop) { + if (swiper.animating) { return; } + realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10); + if (params.centeredSlides) { + if ( + (slideToIndex < swiper.loopedSlides - (slidesPerView / 2)) + || (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2)) + ) { + swiper.loopFix(); + slideToIndex = $wrapperEl + .children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")")) + .eq(0) + .index(); + + Utils.nextTick(function () { + swiper.slideTo(slideToIndex); + }); + } else { + swiper.slideTo(slideToIndex); + } + } else if (slideToIndex > swiper.slides.length - slidesPerView) { + swiper.loopFix(); + slideToIndex = $wrapperEl + .children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")")) + .eq(0) + .index(); + + Utils.nextTick(function () { + swiper.slideTo(slideToIndex); + }); + } else { + swiper.slideTo(slideToIndex); + } + } else { + swiper.slideTo(slideToIndex); + } + } + + var slide = { + slideTo: slideTo, + slideToLoop: slideToLoop, + slideNext: slideNext, + slidePrev: slidePrev, + slideReset: slideReset, + slideToClosest: slideToClosest, + slideToClickedSlide: slideToClickedSlide, + }; + + function loopCreate () { + var swiper = this; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + // Remove duplicated slides + $wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass))).remove(); + + var slides = $wrapperEl.children(("." + (params.slideClass))); + + if (params.loopFillGroupWithBlank) { + var blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup); + if (blankSlidesNum !== params.slidesPerGroup) { + for (var i = 0; i < blankSlidesNum; i += 1) { + var blankNode = $(doc.createElement('div')).addClass(((params.slideClass) + " " + (params.slideBlankClass))); + $wrapperEl.append(blankNode); + } + slides = $wrapperEl.children(("." + (params.slideClass))); + } + } + + if (params.slidesPerView === 'auto' && !params.loopedSlides) { params.loopedSlides = slides.length; } + + swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10)); + swiper.loopedSlides += params.loopAdditionalSlides; + if (swiper.loopedSlides > slides.length) { + swiper.loopedSlides = slides.length; + } + + var prependSlides = []; + var appendSlides = []; + slides.each(function (index, el) { + var slide = $(el); + if (index < swiper.loopedSlides) { appendSlides.push(el); } + if (index < slides.length && index >= slides.length - swiper.loopedSlides) { prependSlides.push(el); } + slide.attr('data-swiper-slide-index', index); + }); + for (var i$1 = 0; i$1 < appendSlides.length; i$1 += 1) { + $wrapperEl.append($(appendSlides[i$1].cloneNode(true)).addClass(params.slideDuplicateClass)); + } + for (var i$2 = prependSlides.length - 1; i$2 >= 0; i$2 -= 1) { + $wrapperEl.prepend($(prependSlides[i$2].cloneNode(true)).addClass(params.slideDuplicateClass)); + } + } + + function loopFix () { + var swiper = this; + + swiper.emit('beforeLoopFix'); + + var activeIndex = swiper.activeIndex; + var slides = swiper.slides; + var loopedSlides = swiper.loopedSlides; + var allowSlidePrev = swiper.allowSlidePrev; + var allowSlideNext = swiper.allowSlideNext; + var snapGrid = swiper.snapGrid; + var rtl = swiper.rtlTranslate; + var newIndex; + swiper.allowSlidePrev = true; + swiper.allowSlideNext = true; + + var snapTranslate = -snapGrid[activeIndex]; + var diff = snapTranslate - swiper.getTranslate(); + + // Fix For Negative Oversliding + if (activeIndex < loopedSlides) { + newIndex = (slides.length - (loopedSlides * 3)) + activeIndex; + newIndex += loopedSlides; + var slideChanged = swiper.slideTo(newIndex, 0, false, true); + if (slideChanged && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } + } else if (activeIndex >= slides.length - loopedSlides) { + // Fix For Positive Oversliding + newIndex = -slides.length + activeIndex + loopedSlides; + newIndex += loopedSlides; + var slideChanged$1 = swiper.slideTo(newIndex, 0, false, true); + if (slideChanged$1 && diff !== 0) { + swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); + } + } + swiper.allowSlidePrev = allowSlidePrev; + swiper.allowSlideNext = allowSlideNext; + + swiper.emit('loopFix'); + } + + function loopDestroy () { + var swiper = this; + var $wrapperEl = swiper.$wrapperEl; + var params = swiper.params; + var slides = swiper.slides; + $wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + ",." + (params.slideClass) + "." + (params.slideBlankClass))).remove(); + slides.removeAttr('data-swiper-slide-index'); + } + + var loop = { + loopCreate: loopCreate, + loopFix: loopFix, + loopDestroy: loopDestroy, + }; + + function setGrabCursor (moving) { + var swiper = this; + if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) { return; } + var el = swiper.el; + el.style.cursor = 'move'; + el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab'; + el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab'; + el.style.cursor = moving ? 'grabbing' : 'grab'; + } + + function unsetGrabCursor () { + var swiper = this; + if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked) || swiper.params.cssMode) { return; } + swiper.el.style.cursor = ''; + } + + var grabCursor = { + setGrabCursor: setGrabCursor, + unsetGrabCursor: unsetGrabCursor, + }; + + function appendSlide (slides) { + var swiper = this; + var $wrapperEl = swiper.$wrapperEl; + var params = swiper.params; + if (params.loop) { + swiper.loopDestroy(); + } + if (typeof slides === 'object' && 'length' in slides) { + for (var i = 0; i < slides.length; i += 1) { + if (slides[i]) { $wrapperEl.append(slides[i]); } + } + } else { + $wrapperEl.append(slides); + } + if (params.loop) { + swiper.loopCreate(); + } + if (!(params.observer && Support.observer)) { + swiper.update(); + } + } + + function prependSlide (slides) { + var swiper = this; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + var activeIndex = swiper.activeIndex; + + if (params.loop) { + swiper.loopDestroy(); + } + var newActiveIndex = activeIndex + 1; + if (typeof slides === 'object' && 'length' in slides) { + for (var i = 0; i < slides.length; i += 1) { + if (slides[i]) { $wrapperEl.prepend(slides[i]); } + } + newActiveIndex = activeIndex + slides.length; + } else { + $wrapperEl.prepend(slides); + } + if (params.loop) { + swiper.loopCreate(); + } + if (!(params.observer && Support.observer)) { + swiper.update(); + } + swiper.slideTo(newActiveIndex, 0, false); + } + + function addSlide (index, slides) { + var swiper = this; + var $wrapperEl = swiper.$wrapperEl; + var params = swiper.params; + var activeIndex = swiper.activeIndex; + var activeIndexBuffer = activeIndex; + if (params.loop) { + activeIndexBuffer -= swiper.loopedSlides; + swiper.loopDestroy(); + swiper.slides = $wrapperEl.children(("." + (params.slideClass))); + } + var baseLength = swiper.slides.length; + if (index <= 0) { + swiper.prependSlide(slides); + return; + } + if (index >= baseLength) { + swiper.appendSlide(slides); + return; + } + var newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer; + + var slidesBuffer = []; + for (var i = baseLength - 1; i >= index; i -= 1) { + var currentSlide = swiper.slides.eq(i); + currentSlide.remove(); + slidesBuffer.unshift(currentSlide); + } + + if (typeof slides === 'object' && 'length' in slides) { + for (var i$1 = 0; i$1 < slides.length; i$1 += 1) { + if (slides[i$1]) { $wrapperEl.append(slides[i$1]); } + } + newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer; + } else { + $wrapperEl.append(slides); + } + + for (var i$2 = 0; i$2 < slidesBuffer.length; i$2 += 1) { + $wrapperEl.append(slidesBuffer[i$2]); + } + + if (params.loop) { + swiper.loopCreate(); + } + if (!(params.observer && Support.observer)) { + swiper.update(); + } + if (params.loop) { + swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); + } else { + swiper.slideTo(newActiveIndex, 0, false); + } + } + + function removeSlide (slidesIndexes) { + var swiper = this; + var params = swiper.params; + var $wrapperEl = swiper.$wrapperEl; + var activeIndex = swiper.activeIndex; + + var activeIndexBuffer = activeIndex; + if (params.loop) { + activeIndexBuffer -= swiper.loopedSlides; + swiper.loopDestroy(); + swiper.slides = $wrapperEl.children(("." + (params.slideClass))); + } + var newActiveIndex = activeIndexBuffer; + var indexToRemove; + + if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) { + for (var i = 0; i < slidesIndexes.length; i += 1) { + indexToRemove = slidesIndexes[i]; + if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); } + if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; } + } + newActiveIndex = Math.max(newActiveIndex, 0); + } else { + indexToRemove = slidesIndexes; + if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); } + if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; } + newActiveIndex = Math.max(newActiveIndex, 0); + } + + if (params.loop) { + swiper.loopCreate(); + } + + if (!(params.observer && Support.observer)) { + swiper.update(); + } + if (params.loop) { + swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); + } else { + swiper.slideTo(newActiveIndex, 0, false); + } + } + + function removeAllSlides () { + var swiper = this; + + var slidesIndexes = []; + for (var i = 0; i < swiper.slides.length; i += 1) { + slidesIndexes.push(i); + } + swiper.removeSlide(slidesIndexes); + } + + var manipulation = { + appendSlide: appendSlide, + prependSlide: prependSlide, + addSlide: addSlide, + removeSlide: removeSlide, + removeAllSlides: removeAllSlides, + }; + + var Device = (function Device() { + var platform = win.navigator.platform; + var ua = win.navigator.userAgent; + + var device = { + ios: false, + android: false, + androidChrome: false, + desktop: false, + iphone: false, + ipod: false, + ipad: false, + edge: false, + ie: false, + firefox: false, + macos: false, + windows: false, + cordova: !!(win.cordova || win.phonegap), + phonegap: !!(win.cordova || win.phonegap), + electron: false, + }; + + var screenWidth = win.screen.width; + var screenHeight = win.screen.height; + + var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line + var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); + var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); + var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); + var ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0; + var edge = ua.indexOf('Edge/') >= 0; + var firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0; + var windows = platform === 'Win32'; + var electron = ua.toLowerCase().indexOf('electron') >= 0; + var macos = platform === 'MacIntel'; + + // iPadOs 13 fix + if (!ipad + && macos + && Support.touch + && ( + (screenWidth === 1024 && screenHeight === 1366) // Pro 12.9 + || (screenWidth === 834 && screenHeight === 1194) // Pro 11 + || (screenWidth === 834 && screenHeight === 1112) // Pro 10.5 + || (screenWidth === 768 && screenHeight === 1024) // other + ) + ) { + ipad = ua.match(/(Version)\/([\d.]+)/); + macos = false; + } + + device.ie = ie; + device.edge = edge; + device.firefox = firefox; + + // Android + if (android && !windows) { + device.os = 'android'; + device.osVersion = android[2]; + device.android = true; + device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0; + } + if (ipad || iphone || ipod) { + device.os = 'ios'; + device.ios = true; + } + // iOS + if (iphone && !ipod) { + device.osVersion = iphone[2].replace(/_/g, '.'); + device.iphone = true; + } + if (ipad) { + device.osVersion = ipad[2].replace(/_/g, '.'); + device.ipad = true; + } + if (ipod) { + device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null; + device.ipod = true; + } + // iOS 8+ changed UA + if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) { + if (device.osVersion.split('.')[0] === '10') { + device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0]; + } + } + + // Webview + device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || win.navigator.standalone)) + || (win.matchMedia && win.matchMedia('(display-mode: standalone)').matches); + device.webview = device.webView; + device.standalone = device.webView; + + // Desktop + device.desktop = !(device.ios || device.android) || electron; + if (device.desktop) { + device.electron = electron; + device.macos = macos; + device.windows = windows; + if (device.macos) { + device.os = 'macos'; + } + if (device.windows) { + device.os = 'windows'; + } + } + + // Pixel Ratio + device.pixelRatio = win.devicePixelRatio || 1; + + // Export object + return device; + }()); + + function onTouchStart (event) { + var swiper = this; + var data = swiper.touchEventsData; + var params = swiper.params; + var touches = swiper.touches; + + if (swiper.animating && params.preventInteractionOnTransition) { + return; + } + var e = event; + if (e.originalEvent) { e = e.originalEvent; } + var $targetEl = $(e.target); + + if (params.touchEventsTarget === 'wrapper') { + if (!$targetEl.closest(swiper.wrapperEl).length) { return; } + } + data.isTouchEvent = e.type === 'touchstart'; + if (!data.isTouchEvent && 'which' in e && e.which === 3) { return; } + if (!data.isTouchEvent && 'button' in e && e.button > 0) { return; } + if (data.isTouched && data.isMoved) { return; } + if (params.noSwiping && $targetEl.closest(params.noSwipingSelector ? params.noSwipingSelector : ("." + (params.noSwipingClass)))[0]) { + swiper.allowClick = true; + return; + } + if (params.swipeHandler) { + if (!$targetEl.closest(params.swipeHandler)[0]) { return; } + } + + touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + var startX = touches.currentX; + var startY = touches.currentY; + + // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore + + var edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; + var edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; + if ( + edgeSwipeDetection + && ((startX <= edgeSwipeThreshold) + || (startX >= win.screen.width - edgeSwipeThreshold)) + ) { + return; + } + + Utils.extend(data, { + isTouched: true, + isMoved: false, + allowTouchCallbacks: true, + isScrolling: undefined, + startMoving: undefined, + }); + + touches.startX = startX; + touches.startY = startY; + data.touchStartTime = Utils.now(); + swiper.allowClick = true; + swiper.updateSize(); + swiper.swipeDirection = undefined; + if (params.threshold > 0) { data.allowThresholdMove = false; } + if (e.type !== 'touchstart') { + var preventDefault = true; + if ($targetEl.is(data.formElements)) { preventDefault = false; } + if ( + doc.activeElement + && $(doc.activeElement).is(data.formElements) + && doc.activeElement !== $targetEl[0] + ) { + doc.activeElement.blur(); + } + + var shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; + if (params.touchStartForcePreventDefault || shouldPreventDefault) { + e.preventDefault(); + } + } + swiper.emit('touchStart', e); + } + + function onTouchMove (event) { + var swiper = this; + var data = swiper.touchEventsData; + var params = swiper.params; + var touches = swiper.touches; + var rtl = swiper.rtlTranslate; + var e = event; + if (e.originalEvent) { e = e.originalEvent; } + if (!data.isTouched) { + if (data.startMoving && data.isScrolling) { + swiper.emit('touchMoveOpposite', e); + } + return; + } + if (data.isTouchEvent && e.type === 'mousemove') { return; } + var targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]); + var pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX; + var pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY; + if (e.preventedByNestedSwiper) { + touches.startX = pageX; + touches.startY = pageY; + return; + } + if (!swiper.allowTouchMove) { + // isMoved = true; + swiper.allowClick = false; + if (data.isTouched) { + Utils.extend(touches, { + startX: pageX, + startY: pageY, + currentX: pageX, + currentY: pageY, + }); + data.touchStartTime = Utils.now(); + } + return; + } + if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) { + if (swiper.isVertical()) { + // Vertical + if ( + (pageY < touches.startY && swiper.translate <= swiper.maxTranslate()) + || (pageY > touches.startY && swiper.translate >= swiper.minTranslate()) + ) { + data.isTouched = false; + data.isMoved = false; + return; + } + } else if ( + (pageX < touches.startX && swiper.translate <= swiper.maxTranslate()) + || (pageX > touches.startX && swiper.translate >= swiper.minTranslate()) + ) { + return; + } + } + if (data.isTouchEvent && doc.activeElement) { + if (e.target === doc.activeElement && $(e.target).is(data.formElements)) { + data.isMoved = true; + swiper.allowClick = false; + return; + } + } + if (data.allowTouchCallbacks) { + swiper.emit('touchMove', e); + } + if (e.targetTouches && e.targetTouches.length > 1) { return; } + + touches.currentX = pageX; + touches.currentY = pageY; + + var diffX = touches.currentX - touches.startX; + var diffY = touches.currentY - touches.startY; + if (swiper.params.threshold && Math.sqrt((Math.pow( diffX, 2 )) + (Math.pow( diffY, 2 ))) < swiper.params.threshold) { return; } + + if (typeof data.isScrolling === 'undefined') { + var touchAngle; + if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) { + data.isScrolling = false; + } else { + // eslint-disable-next-line + if ((diffX * diffX) + (diffY * diffY) >= 25) { + touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI; + data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle); + } + } + } + if (data.isScrolling) { + swiper.emit('touchMoveOpposite', e); + } + if (typeof data.startMoving === 'undefined') { + if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { + data.startMoving = true; + } + } + if (data.isScrolling) { + data.isTouched = false; + return; + } + if (!data.startMoving) { + return; + } + swiper.allowClick = false; + if (!params.cssMode) { + e.preventDefault(); + } + if (params.touchMoveStopPropagation && !params.nested) { + e.stopPropagation(); + } + + if (!data.isMoved) { + if (params.loop) { + swiper.loopFix(); + } + data.startTranslate = swiper.getTranslate(); + swiper.setTransition(0); + if (swiper.animating) { + swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend'); + } + data.allowMomentumBounce = false; + // Grab Cursor + if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { + swiper.setGrabCursor(true); + } + swiper.emit('sliderFirstMove', e); + } + swiper.emit('sliderMove', e); + data.isMoved = true; + + var diff = swiper.isHorizontal() ? diffX : diffY; + touches.diff = diff; + + diff *= params.touchRatio; + if (rtl) { diff = -diff; } + + swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; + data.currentTranslate = diff + data.startTranslate; + + var disableParentSwiper = true; + var resistanceRatio = params.resistanceRatio; + if (params.touchReleaseOnEdges) { + resistanceRatio = 0; + } + if ((diff > 0 && data.currentTranslate > swiper.minTranslate())) { + disableParentSwiper = false; + if (params.resistance) { data.currentTranslate = (swiper.minTranslate() - 1) + (Math.pow( (-swiper.minTranslate() + data.startTranslate + diff), resistanceRatio )); } + } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) { + disableParentSwiper = false; + if (params.resistance) { data.currentTranslate = (swiper.maxTranslate() + 1) - (Math.pow( (swiper.maxTranslate() - data.startTranslate - diff), resistanceRatio )); } + } + + if (disableParentSwiper) { + e.preventedByNestedSwiper = true; + } + + // Directions locks + if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) { + data.currentTranslate = data.startTranslate; + } + if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) { + data.currentTranslate = data.startTranslate; + } + + + // Threshold + if (params.threshold > 0) { + if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { + if (!data.allowThresholdMove) { + data.allowThresholdMove = true; + touches.startX = touches.currentX; + touches.startY = touches.currentY; + data.currentTranslate = data.startTranslate; + touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; + return; + } + } else { + data.currentTranslate = data.startTranslate; + return; + } + } + + if (!params.followFinger || params.cssMode) { return; } + + // Update active index in free mode + if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) { + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + if (params.freeMode) { + // Velocity + if (data.velocities.length === 0) { + data.velocities.push({ + position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], + time: data.touchStartTime, + }); + } + data.velocities.push({ + position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], + time: Utils.now(), + }); + } + // Update progress + swiper.updateProgress(data.currentTranslate); + // Update translate + swiper.setTranslate(data.currentTranslate); + } + + function onTouchEnd (event) { + var swiper = this; + var data = swiper.touchEventsData; + + var params = swiper.params; + var touches = swiper.touches; + var rtl = swiper.rtlTranslate; + var $wrapperEl = swiper.$wrapperEl; + var slidesGrid = swiper.slidesGrid; + var snapGrid = swiper.snapGrid; + var e = event; + if (e.originalEvent) { e = e.originalEvent; } + if (data.allowTouchCallbacks) { + swiper.emit('touchEnd', e); + } + data.allowTouchCallbacks = false; + if (!data.isTouched) { + if (data.isMoved && params.grabCursor) { + swiper.setGrabCursor(false); + } + data.isMoved = false; + data.startMoving = false; + return; + } + // Return Grab Cursor + if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { + swiper.setGrabCursor(false); + } + + // Time diff + var touchEndTime = Utils.now(); + var timeDiff = touchEndTime - data.touchStartTime; + + // Tap, doubleTap, Click + if (swiper.allowClick) { + swiper.updateClickedSlide(e); + swiper.emit('tap click', e); + if (timeDiff < 300 && (touchEndTime - data.lastClickTime) < 300) { + swiper.emit('doubleTap doubleClick', e); + } + } + + data.lastClickTime = Utils.now(); + Utils.nextTick(function () { + if (!swiper.destroyed) { swiper.allowClick = true; } + }); + + if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) { + data.isTouched = false; + data.isMoved = false; + data.startMoving = false; + return; + } + data.isTouched = false; + data.isMoved = false; + data.startMoving = false; + + var currentPos; + if (params.followFinger) { + currentPos = rtl ? swiper.translate : -swiper.translate; + } else { + currentPos = -data.currentTranslate; + } + + if (params.cssMode) { + return; + } + + if (params.freeMode) { + if (currentPos < -swiper.minTranslate()) { + swiper.slideTo(swiper.activeIndex); + return; + } + if (currentPos > -swiper.maxTranslate()) { + if (swiper.slides.length < snapGrid.length) { + swiper.slideTo(snapGrid.length - 1); + } else { + swiper.slideTo(swiper.slides.length - 1); + } + return; + } + + if (params.freeModeMomentum) { + if (data.velocities.length > 1) { + var lastMoveEvent = data.velocities.pop(); + var velocityEvent = data.velocities.pop(); + + var distance = lastMoveEvent.position - velocityEvent.position; + var time = lastMoveEvent.time - velocityEvent.time; + swiper.velocity = distance / time; + swiper.velocity /= 2; + if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) { + swiper.velocity = 0; + } + // this implies that the user stopped moving a finger then released. + // There would be no events with distance zero, so the last event is stale. + if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) { + swiper.velocity = 0; + } + } else { + swiper.velocity = 0; + } + swiper.velocity *= params.freeModeMomentumVelocityRatio; + + data.velocities.length = 0; + var momentumDuration = 1000 * params.freeModeMomentumRatio; + var momentumDistance = swiper.velocity * momentumDuration; + + var newPosition = swiper.translate + momentumDistance; + if (rtl) { newPosition = -newPosition; } + + var doBounce = false; + var afterBouncePosition; + var bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio; + var needsLoopFix; + if (newPosition < swiper.maxTranslate()) { + if (params.freeModeMomentumBounce) { + if (newPosition + swiper.maxTranslate() < -bounceAmount) { + newPosition = swiper.maxTranslate() - bounceAmount; + } + afterBouncePosition = swiper.maxTranslate(); + doBounce = true; + data.allowMomentumBounce = true; + } else { + newPosition = swiper.maxTranslate(); + } + if (params.loop && params.centeredSlides) { needsLoopFix = true; } + } else if (newPosition > swiper.minTranslate()) { + if (params.freeModeMomentumBounce) { + if (newPosition - swiper.minTranslate() > bounceAmount) { + newPosition = swiper.minTranslate() + bounceAmount; + } + afterBouncePosition = swiper.minTranslate(); + doBounce = true; + data.allowMomentumBounce = true; + } else { + newPosition = swiper.minTranslate(); + } + if (params.loop && params.centeredSlides) { needsLoopFix = true; } + } else if (params.freeModeSticky) { + var nextSlide; + for (var j = 0; j < snapGrid.length; j += 1) { + if (snapGrid[j] > -newPosition) { + nextSlide = j; + break; + } + } + + if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { + newPosition = snapGrid[nextSlide]; + } else { + newPosition = snapGrid[nextSlide - 1]; + } + newPosition = -newPosition; + } + if (needsLoopFix) { + swiper.once('transitionEnd', function () { + swiper.loopFix(); + }); + } + // Fix duration + if (swiper.velocity !== 0) { + if (rtl) { + momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); + } else { + momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); + } + if (params.freeModeSticky) { + // If freeModeSticky is active and the user ends a swipe with a slow-velocity + // event, then durations can be 20+ seconds to slide one (or zero!) slides. + // It's easy to see this when simulating touch with mouse events. To fix this, + // limit single-slide swipes to the default slide duration. This also has the + // nice side effect of matching slide speed if the user stopped moving before + // lifting finger or mouse vs. moving slowly before lifting the finger/mouse. + // For faster swipes, also apply limits (albeit higher ones). + var moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate); + var currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex]; + if (moveDistance < currentSlideSize) { + momentumDuration = params.speed; + } else if (moveDistance < 2 * currentSlideSize) { + momentumDuration = params.speed * 1.5; + } else { + momentumDuration = params.speed * 2.5; + } + } + } else if (params.freeModeSticky) { + swiper.slideToClosest(); + return; + } + + if (params.freeModeMomentumBounce && doBounce) { + swiper.updateProgress(afterBouncePosition); + swiper.setTransition(momentumDuration); + swiper.setTranslate(newPosition); + swiper.transitionStart(true, swiper.swipeDirection); + swiper.animating = true; + $wrapperEl.transitionEnd(function () { + if (!swiper || swiper.destroyed || !data.allowMomentumBounce) { return; } + swiper.emit('momentumBounce'); + + swiper.setTransition(params.speed); + swiper.setTranslate(afterBouncePosition); + $wrapperEl.transitionEnd(function () { + if (!swiper || swiper.destroyed) { return; } + swiper.transitionEnd(); + }); + }); + } else if (swiper.velocity) { + swiper.updateProgress(newPosition); + swiper.setTransition(momentumDuration); + swiper.setTranslate(newPosition); + swiper.transitionStart(true, swiper.swipeDirection); + if (!swiper.animating) { + swiper.animating = true; + $wrapperEl.transitionEnd(function () { + if (!swiper || swiper.destroyed) { return; } + swiper.transitionEnd(); + }); + } + } else { + swiper.updateProgress(newPosition); + } + + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } else if (params.freeModeSticky) { + swiper.slideToClosest(); + return; + } + + if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) { + swiper.updateProgress(); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + return; + } + + // Find current slide + var stopIndex = 0; + var groupSize = swiper.slidesSizesGrid[0]; + for (var i = 0; i < slidesGrid.length; i += (i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup)) { + var increment$1 = (i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup); + if (typeof slidesGrid[i + increment$1] !== 'undefined') { + if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment$1]) { + stopIndex = i; + groupSize = slidesGrid[i + increment$1] - slidesGrid[i]; + } + } else if (currentPos >= slidesGrid[i]) { + stopIndex = i; + groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; + } + } + + // Find current slide size + var ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; + var increment = (stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup); + + if (timeDiff > params.longSwipesMs) { + // Long touches + if (!params.longSwipes) { + swiper.slideTo(swiper.activeIndex); + return; + } + if (swiper.swipeDirection === 'next') { + if (ratio >= params.longSwipesRatio) { swiper.slideTo(stopIndex + increment); } + else { swiper.slideTo(stopIndex); } + } + if (swiper.swipeDirection === 'prev') { + if (ratio > (1 - params.longSwipesRatio)) { swiper.slideTo(stopIndex + increment); } + else { swiper.slideTo(stopIndex); } + } + } else { + // Short swipes + if (!params.shortSwipes) { + swiper.slideTo(swiper.activeIndex); + return; + } + var isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); + if (!isNavButtonTarget) { + if (swiper.swipeDirection === 'next') { + swiper.slideTo(stopIndex + increment); + } + if (swiper.swipeDirection === 'prev') { + swiper.slideTo(stopIndex); + } + } else if (e.target === swiper.navigation.nextEl) { + swiper.slideTo(stopIndex + increment); + } else { + swiper.slideTo(stopIndex); + } + } + } + + function onResize () { + var swiper = this; + + var params = swiper.params; + var el = swiper.el; + + if (el && el.offsetWidth === 0) { return; } + + // Breakpoints + if (params.breakpoints) { + swiper.setBreakpoint(); + } + + // Save locks + var allowSlideNext = swiper.allowSlideNext; + var allowSlidePrev = swiper.allowSlidePrev; + var snapGrid = swiper.snapGrid; + + // Disable locks on resize + swiper.allowSlideNext = true; + swiper.allowSlidePrev = true; + + swiper.updateSize(); + swiper.updateSlides(); + + swiper.updateSlidesClasses(); + if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { + swiper.slideTo(swiper.slides.length - 1, 0, false, true); + } else { + swiper.slideTo(swiper.activeIndex, 0, false, true); + } + + if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { + swiper.autoplay.run(); + } + // Return locks after resize + swiper.allowSlidePrev = allowSlidePrev; + swiper.allowSlideNext = allowSlideNext; + + if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { + swiper.checkOverflow(); + } + } + + function onClick (e) { + var swiper = this; + if (!swiper.allowClick) { + if (swiper.params.preventClicks) { e.preventDefault(); } + if (swiper.params.preventClicksPropagation && swiper.animating) { + e.stopPropagation(); + e.stopImmediatePropagation(); + } + } + } + + function onScroll () { + var swiper = this; + var wrapperEl = swiper.wrapperEl; + swiper.previousTranslate = swiper.translate; + swiper.translate = swiper.isHorizontal() ? -wrapperEl.scrollLeft : -wrapperEl.scrollTop; + // eslint-disable-next-line + if (swiper.translate === -0) { swiper.translate = 0; } + + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + + var newProgress; + var translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); + if (translatesDiff === 0) { + newProgress = 0; + } else { + newProgress = (swiper.translate - swiper.minTranslate()) / (translatesDiff); + } + if (newProgress !== swiper.progress) { + swiper.updateProgress(swiper.translate); + } + + swiper.emit('setTranslate', swiper.translate, false); + } + + var dummyEventAttached = false; + function dummyEventListener() {} + + function attachEvents() { + var swiper = this; + var params = swiper.params; + var touchEvents = swiper.touchEvents; + var el = swiper.el; + var wrapperEl = swiper.wrapperEl; + + swiper.onTouchStart = onTouchStart.bind(swiper); + swiper.onTouchMove = onTouchMove.bind(swiper); + swiper.onTouchEnd = onTouchEnd.bind(swiper); + if (params.cssMode) { + swiper.onScroll = onScroll.bind(swiper); + } + + swiper.onClick = onClick.bind(swiper); + + var capture = !!params.nested; + + // Touch Events + if (!Support.touch && Support.pointerEvents) { + el.addEventListener(touchEvents.start, swiper.onTouchStart, false); + doc.addEventListener(touchEvents.move, swiper.onTouchMove, capture); + doc.addEventListener(touchEvents.end, swiper.onTouchEnd, false); + } else { + if (Support.touch) { + var passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; + el.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener); + el.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture: capture } : capture); + el.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener); + if (touchEvents.cancel) { + el.addEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener); + } + if (!dummyEventAttached) { + doc.addEventListener('touchstart', dummyEventListener); + dummyEventAttached = true; + } + } + if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { + el.addEventListener('mousedown', swiper.onTouchStart, false); + doc.addEventListener('mousemove', swiper.onTouchMove, capture); + doc.addEventListener('mouseup', swiper.onTouchEnd, false); + } + } + // Prevent Links Clicks + if (params.preventClicks || params.preventClicksPropagation) { + el.addEventListener('click', swiper.onClick, true); + } + if (params.cssMode) { + wrapperEl.addEventListener('scroll', swiper.onScroll); + } + + // Resize handler + if (params.updateOnWindowResize) { + swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true); + } else { + swiper.on('observerUpdate', onResize, true); + } + } + + function detachEvents() { + var swiper = this; + + var params = swiper.params; + var touchEvents = swiper.touchEvents; + var el = swiper.el; + var wrapperEl = swiper.wrapperEl; + + var capture = !!params.nested; + + // Touch Events + if (!Support.touch && Support.pointerEvents) { + el.removeEventListener(touchEvents.start, swiper.onTouchStart, false); + doc.removeEventListener(touchEvents.move, swiper.onTouchMove, capture); + doc.removeEventListener(touchEvents.end, swiper.onTouchEnd, false); + } else { + if (Support.touch) { + var passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; + el.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener); + el.removeEventListener(touchEvents.move, swiper.onTouchMove, capture); + el.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener); + if (touchEvents.cancel) { + el.removeEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener); + } + } + if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) { + el.removeEventListener('mousedown', swiper.onTouchStart, false); + doc.removeEventListener('mousemove', swiper.onTouchMove, capture); + doc.removeEventListener('mouseup', swiper.onTouchEnd, false); + } + } + // Prevent Links Clicks + if (params.preventClicks || params.preventClicksPropagation) { + el.removeEventListener('click', swiper.onClick, true); + } + + if (params.cssMode) { + wrapperEl.removeEventListener('scroll', swiper.onScroll); + } + + // Resize handler + swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize); + } + + var events = { + attachEvents: attachEvents, + detachEvents: detachEvents, + }; + + function setBreakpoint () { + var swiper = this; + var activeIndex = swiper.activeIndex; + var initialized = swiper.initialized; + var loopedSlides = swiper.loopedSlides; if ( loopedSlides === void 0 ) loopedSlides = 0; + var params = swiper.params; + var $el = swiper.$el; + var breakpoints = params.breakpoints; + if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) { return; } + + // Get breakpoint for window width and update parameters + var breakpoint = swiper.getBreakpoint(breakpoints); + + if (breakpoint && swiper.currentBreakpoint !== breakpoint) { + var breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined; + if (breakpointOnlyParams) { + ['slidesPerView', 'spaceBetween', 'slidesPerGroup', 'slidesPerGroupSkip', 'slidesPerColumn'].forEach(function (param) { + var paramValue = breakpointOnlyParams[param]; + if (typeof paramValue === 'undefined') { return; } + if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) { + breakpointOnlyParams[param] = 'auto'; + } else if (param === 'slidesPerView') { + breakpointOnlyParams[param] = parseFloat(paramValue); + } else { + breakpointOnlyParams[param] = parseInt(paramValue, 10); + } + }); + } + + var breakpointParams = breakpointOnlyParams || swiper.originalParams; + var wasMultiRow = params.slidesPerColumn > 1; + var isMultiRow = breakpointParams.slidesPerColumn > 1; + if (wasMultiRow && !isMultiRow) { + $el.removeClass(((params.containerModifierClass) + "multirow " + (params.containerModifierClass) + "multirow-column")); + } else if (!wasMultiRow && isMultiRow) { + $el.addClass(((params.containerModifierClass) + "multirow")); + if (breakpointParams.slidesPerColumnFill === 'column') { + $el.addClass(((params.containerModifierClass) + "multirow-column")); + } + } + + var directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; + var needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); + + if (directionChanged && initialized) { + swiper.changeDirection(); + } + + Utils.extend(swiper.params, breakpointParams); + + Utils.extend(swiper, { + allowTouchMove: swiper.params.allowTouchMove, + allowSlideNext: swiper.params.allowSlideNext, + allowSlidePrev: swiper.params.allowSlidePrev, + }); + + swiper.currentBreakpoint = breakpoint; + + if (needsReLoop && initialized) { + swiper.loopDestroy(); + swiper.loopCreate(); + swiper.updateSlides(); + swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false); + } + + swiper.emit('breakpoint', breakpointParams); + } + } + + function getBreakpoint (breakpoints) { + // Get breakpoint for window width + if (!breakpoints) { return undefined; } + var breakpoint = false; + + var points = Object.keys(breakpoints).map(function (point) { + if (typeof point === 'string' && point.startsWith('@')) { + var minRatio = parseFloat(point.substr(1)); + var value = win.innerHeight * minRatio; + return { value: value, point: point }; + } + return { value: point, point: point }; + }); + + points.sort(function (a, b) { return parseInt(a.value, 10) - parseInt(b.value, 10); }); + for (var i = 0; i < points.length; i += 1) { + var ref = points[i]; + var point = ref.point; + var value = ref.value; + if (value <= win.innerWidth) { + breakpoint = point; + } + } + return breakpoint || 'max'; + } + + var breakpoints = { setBreakpoint: setBreakpoint, getBreakpoint: getBreakpoint }; + + function addClasses () { + var swiper = this; + var classNames = swiper.classNames; + var params = swiper.params; + var rtl = swiper.rtl; + var $el = swiper.$el; + var suffixes = []; + + suffixes.push('initialized'); + suffixes.push(params.direction); + + if (params.freeMode) { + suffixes.push('free-mode'); + } + if (params.autoHeight) { + suffixes.push('autoheight'); + } + if (rtl) { + suffixes.push('rtl'); + } + if (params.slidesPerColumn > 1) { + suffixes.push('multirow'); + if (params.slidesPerColumnFill === 'column') { + suffixes.push('multirow-column'); + } + } + if (Device.android) { + suffixes.push('android'); + } + if (Device.ios) { + suffixes.push('ios'); + } + + if (params.cssMode) { + suffixes.push('css-mode'); + } + + suffixes.forEach(function (suffix) { + classNames.push(params.containerModifierClass + suffix); + }); + + $el.addClass(classNames.join(' ')); + } + + function removeClasses () { + var swiper = this; + var $el = swiper.$el; + var classNames = swiper.classNames; + + $el.removeClass(classNames.join(' ')); + } + + var classes = { addClasses: addClasses, removeClasses: removeClasses }; + + function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) { + var image; + function onReady() { + if (callback) { callback(); } + } + if (!imageEl.complete || !checkForComplete) { + if (src) { + image = new win.Image(); + image.onload = onReady; + image.onerror = onReady; + if (sizes) { + image.sizes = sizes; + } + if (srcset) { + image.srcset = srcset; + } + if (src) { + image.src = src; + } + } else { + onReady(); + } + } else { + // image already loaded... + onReady(); + } + } + + function preloadImages () { + var swiper = this; + swiper.imagesToLoad = swiper.$el.find('img'); + function onReady() { + if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) { return; } + if (swiper.imagesLoaded !== undefined) { swiper.imagesLoaded += 1; } + if (swiper.imagesLoaded === swiper.imagesToLoad.length) { + if (swiper.params.updateOnImagesReady) { swiper.update(); } + swiper.emit('imagesReady'); + } + } + for (var i = 0; i < swiper.imagesToLoad.length; i += 1) { + var imageEl = swiper.imagesToLoad[i]; + swiper.loadImage( + imageEl, + imageEl.currentSrc || imageEl.getAttribute('src'), + imageEl.srcset || imageEl.getAttribute('srcset'), + imageEl.sizes || imageEl.getAttribute('sizes'), + true, + onReady + ); + } + } + + var images = { + loadImage: loadImage, + preloadImages: preloadImages, + }; + + function checkOverflow() { + var swiper = this; + var params = swiper.params; + var wasLocked = swiper.isLocked; + var lastSlidePosition = swiper.slides.length > 0 && (params.slidesOffsetBefore + (params.spaceBetween * (swiper.slides.length - 1)) + ((swiper.slides[0]).offsetWidth) * swiper.slides.length); + + if (params.slidesOffsetBefore && params.slidesOffsetAfter && lastSlidePosition) { + swiper.isLocked = lastSlidePosition <= swiper.size; + } else { + swiper.isLocked = swiper.snapGrid.length === 1; + } + + swiper.allowSlideNext = !swiper.isLocked; + swiper.allowSlidePrev = !swiper.isLocked; + + // events + if (wasLocked !== swiper.isLocked) { swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); } + + if (wasLocked && wasLocked !== swiper.isLocked) { + swiper.isEnd = false; + swiper.navigation.update(); + } + } + + var checkOverflow$1 = { checkOverflow: checkOverflow }; + + var defaults = { + init: true, + direction: 'horizontal', + touchEventsTarget: 'container', + initialSlide: 0, + speed: 300, + cssMode: false, + updateOnWindowResize: true, + // + preventInteractionOnTransition: false, + + // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView). + edgeSwipeDetection: false, + edgeSwipeThreshold: 20, + + // Free mode + freeMode: false, + freeModeMomentum: true, + freeModeMomentumRatio: 1, + freeModeMomentumBounce: true, + freeModeMomentumBounceRatio: 1, + freeModeMomentumVelocityRatio: 1, + freeModeSticky: false, + freeModeMinimumVelocity: 0.02, + + // Autoheight + autoHeight: false, + + // Set wrapper width + setWrapperSize: false, + + // Virtual Translate + virtualTranslate: false, + + // Effects + effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' + + // Breakpoints + breakpoints: undefined, + + // Slides grid + spaceBetween: 0, + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerColumnFill: 'column', + slidesPerGroup: 1, + slidesPerGroupSkip: 0, + centeredSlides: false, + centeredSlidesBounds: false, + slidesOffsetBefore: 0, // in px + slidesOffsetAfter: 0, // in px + normalizeSlideIndex: true, + centerInsufficientSlides: false, + + // Disable swiper and hide navigation when container not overflow + watchOverflow: false, + + // Round length + roundLengths: false, + + // Touches + touchRatio: 1, + touchAngle: 45, + simulateTouch: true, + shortSwipes: true, + longSwipes: true, + longSwipesRatio: 0.5, + longSwipesMs: 300, + followFinger: true, + allowTouchMove: true, + threshold: 0, + touchMoveStopPropagation: false, + touchStartPreventDefault: true, + touchStartForcePreventDefault: false, + touchReleaseOnEdges: false, + + // Unique Navigation Elements + uniqueNavElements: true, + + // Resistance + resistance: true, + resistanceRatio: 0.85, + + // Progress + watchSlidesProgress: false, + watchSlidesVisibility: false, + + // Cursor + grabCursor: false, + + // Clicks + preventClicks: true, + preventClicksPropagation: true, + slideToClickedSlide: false, + + // Images + preloadImages: true, + updateOnImagesReady: true, + + // loop + loop: false, + loopAdditionalSlides: 0, + loopedSlides: null, + loopFillGroupWithBlank: false, + + // Swiping/no swiping + allowSlidePrev: true, + allowSlideNext: true, + swipeHandler: null, // '.swipe-handler', + noSwiping: true, + noSwipingClass: 'swiper-no-swiping', + noSwipingSelector: null, + + // Passive Listeners + passiveListeners: true, + + // NS + containerModifierClass: 'swiper-container-', // NEW + slideClass: 'swiper-slide', + slideBlankClass: 'swiper-slide-invisible-blank', + slideActiveClass: 'swiper-slide-active', + slideDuplicateActiveClass: 'swiper-slide-duplicate-active', + slideVisibleClass: 'swiper-slide-visible', + slideDuplicateClass: 'swiper-slide-duplicate', + slideNextClass: 'swiper-slide-next', + slideDuplicateNextClass: 'swiper-slide-duplicate-next', + slidePrevClass: 'swiper-slide-prev', + slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', + wrapperClass: 'swiper-wrapper', + + // Callbacks + runCallbacksOnInit: true, + }; + + /* eslint no-param-reassign: "off" */ + + var prototypes = { + update: update, + translate: translate, + transition: transition$1, + slide: slide, + loop: loop, + grabCursor: grabCursor, + manipulation: manipulation, + events: events, + breakpoints: breakpoints, + checkOverflow: checkOverflow$1, + classes: classes, + images: images, + }; + + var extendedDefaults = {}; + + var Swiper = /*@__PURE__*/(function (SwiperClass) { + function Swiper() { + var assign; + + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; + var el; + var params; + if (args.length === 1 && args[0].constructor && args[0].constructor === Object) { + params = args[0]; + } else { + (assign = args, el = assign[0], params = assign[1]); + } + if (!params) { params = {}; } + + params = Utils.extend({}, params); + if (el && !params.el) { params.el = el; } + + SwiperClass.call(this, params); + + Object.keys(prototypes).forEach(function (prototypeGroup) { + Object.keys(prototypes[prototypeGroup]).forEach(function (protoMethod) { + if (!Swiper.prototype[protoMethod]) { + Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; + } + }); + }); + + // Swiper Instance + var swiper = this; + if (typeof swiper.modules === 'undefined') { + swiper.modules = {}; + } + Object.keys(swiper.modules).forEach(function (moduleName) { + var module = swiper.modules[moduleName]; + if (module.params) { + var moduleParamName = Object.keys(module.params)[0]; + var moduleParams = module.params[moduleParamName]; + if (typeof moduleParams !== 'object' || moduleParams === null) { return; } + if (!(moduleParamName in params && 'enabled' in moduleParams)) { return; } + if (params[moduleParamName] === true) { + params[moduleParamName] = { enabled: true }; + } + if ( + typeof params[moduleParamName] === 'object' + && !('enabled' in params[moduleParamName]) + ) { + params[moduleParamName].enabled = true; + } + if (!params[moduleParamName]) { params[moduleParamName] = { enabled: false }; } + } + }); + + // Extend defaults with modules params + var swiperParams = Utils.extend({}, defaults); + swiper.useModulesParams(swiperParams); + + // Extend defaults with passed params + swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params); + swiper.originalParams = Utils.extend({}, swiper.params); + swiper.passedParams = Utils.extend({}, params); + + // Save Dom lib + swiper.$ = $; + + // Find el + var $el = $(swiper.params.el); + el = $el[0]; + + if (!el) { + return undefined; + } + + if ($el.length > 1) { + var swipers = []; + $el.each(function (index, containerEl) { + var newParams = Utils.extend({}, params, { el: containerEl }); + swipers.push(new Swiper(newParams)); + }); + return swipers; + } + + el.swiper = swiper; + $el.data('swiper', swiper); + + // Find Wrapper + var $wrapperEl; + if (el && el.shadowRoot && el.shadowRoot.querySelector) { + $wrapperEl = $(el.shadowRoot.querySelector(("." + (swiper.params.wrapperClass)))); + // Children needs to return slot items + $wrapperEl.children = function (options) { return $el.children(options); }; + } else { + $wrapperEl = $el.children(("." + (swiper.params.wrapperClass))); + } + // Extend Swiper + Utils.extend(swiper, { + $el: $el, + el: el, + $wrapperEl: $wrapperEl, + wrapperEl: $wrapperEl[0], + + // Classes + classNames: [], + + // Slides + slides: $(), + slidesGrid: [], + snapGrid: [], + slidesSizesGrid: [], + + // isDirection + isHorizontal: function isHorizontal() { + return swiper.params.direction === 'horizontal'; + }, + isVertical: function isVertical() { + return swiper.params.direction === 'vertical'; + }, + // RTL + rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), + rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), + wrongRTL: $wrapperEl.css('display') === '-webkit-box', + + // Indexes + activeIndex: 0, + realIndex: 0, + + // + isBeginning: true, + isEnd: false, + + // Props + translate: 0, + previousTranslate: 0, + progress: 0, + velocity: 0, + animating: false, + + // Locks + allowSlideNext: swiper.params.allowSlideNext, + allowSlidePrev: swiper.params.allowSlidePrev, + + // Touch Events + touchEvents: (function touchEvents() { + var touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel']; + var desktop = ['mousedown', 'mousemove', 'mouseup']; + if (Support.pointerEvents) { + desktop = ['pointerdown', 'pointermove', 'pointerup']; + } + swiper.touchEventsTouch = { + start: touch[0], + move: touch[1], + end: touch[2], + cancel: touch[3], + }; + swiper.touchEventsDesktop = { + start: desktop[0], + move: desktop[1], + end: desktop[2], + }; + return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop; + }()), + touchEventsData: { + isTouched: undefined, + isMoved: undefined, + allowTouchCallbacks: undefined, + touchStartTime: undefined, + isScrolling: undefined, + currentTranslate: undefined, + startTranslate: undefined, + allowThresholdMove: undefined, + // Form elements to match + formElements: 'input, select, option, textarea, button, video', + // Last click time + lastClickTime: Utils.now(), + clickTimeout: undefined, + // Velocities + velocities: [], + allowMomentumBounce: undefined, + isTouchEvent: undefined, + startMoving: undefined, + }, + + // Clicks + allowClick: true, + + // Touches + allowTouchMove: swiper.params.allowTouchMove, + + touches: { + startX: 0, + startY: 0, + currentX: 0, + currentY: 0, + diff: 0, + }, + + // Images + imagesToLoad: [], + imagesLoaded: 0, + + }); + + // Install Modules + swiper.useModules(); + + // Init + if (swiper.params.init) { + swiper.init(); + } + + // Return app instance + return swiper; + } + + if ( SwiperClass ) Swiper.__proto__ = SwiperClass; + Swiper.prototype = Object.create( SwiperClass && SwiperClass.prototype ); + Swiper.prototype.constructor = Swiper; + + var staticAccessors = { extendedDefaults: { configurable: true },defaults: { configurable: true },Class: { configurable: true },$: { configurable: true } }; + + Swiper.prototype.slidesPerViewDynamic = function slidesPerViewDynamic () { + var swiper = this; + var params = swiper.params; + var slides = swiper.slides; + var slidesGrid = swiper.slidesGrid; + var swiperSize = swiper.size; + var activeIndex = swiper.activeIndex; + var spv = 1; + if (params.centeredSlides) { + var slideSize = slides[activeIndex].swiperSlideSize; + var breakLoop; + for (var i = activeIndex + 1; i < slides.length; i += 1) { + if (slides[i] && !breakLoop) { + slideSize += slides[i].swiperSlideSize; + spv += 1; + if (slideSize > swiperSize) { breakLoop = true; } + } + } + for (var i$1 = activeIndex - 1; i$1 >= 0; i$1 -= 1) { + if (slides[i$1] && !breakLoop) { + slideSize += slides[i$1].swiperSlideSize; + spv += 1; + if (slideSize > swiperSize) { breakLoop = true; } + } + } + } else { + for (var i$2 = activeIndex + 1; i$2 < slides.length; i$2 += 1) { + if (slidesGrid[i$2] - slidesGrid[activeIndex] < swiperSize) { + spv += 1; + } + } + } + return spv; + }; + + Swiper.prototype.update = function update () { + var swiper = this; + if (!swiper || swiper.destroyed) { return; } + var snapGrid = swiper.snapGrid; + var params = swiper.params; + // Breakpoints + if (params.breakpoints) { + swiper.setBreakpoint(); + } + swiper.updateSize(); + swiper.updateSlides(); + swiper.updateProgress(); + swiper.updateSlidesClasses(); + + function setTranslate() { + var translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; + var newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); + swiper.setTranslate(newTranslate); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + } + var translated; + if (swiper.params.freeMode) { + setTranslate(); + if (swiper.params.autoHeight) { + swiper.updateAutoHeight(); + } + } else { + if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { + translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true); + } else { + translated = swiper.slideTo(swiper.activeIndex, 0, false, true); + } + if (!translated) { + setTranslate(); + } + } + if (params.watchOverflow && snapGrid !== swiper.snapGrid) { + swiper.checkOverflow(); + } + swiper.emit('update'); + }; + + Swiper.prototype.changeDirection = function changeDirection (newDirection, needUpdate) { + if ( needUpdate === void 0 ) needUpdate = true; + + var swiper = this; + var currentDirection = swiper.params.direction; + if (!newDirection) { + // eslint-disable-next-line + newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal'; + } + if ((newDirection === currentDirection) || (newDirection !== 'horizontal' && newDirection !== 'vertical')) { + return swiper; + } + + swiper.$el + .removeClass(("" + (swiper.params.containerModifierClass) + currentDirection)) + .addClass(("" + (swiper.params.containerModifierClass) + newDirection)); + + swiper.params.direction = newDirection; + + swiper.slides.each(function (slideIndex, slideEl) { + if (newDirection === 'vertical') { + slideEl.style.width = ''; + } else { + slideEl.style.height = ''; + } + }); + + swiper.emit('changeDirection'); + if (needUpdate) { swiper.update(); } + + return swiper; + }; + + Swiper.prototype.init = function init () { + var swiper = this; + if (swiper.initialized) { return; } + + swiper.emit('beforeInit'); + + // Set breakpoint + if (swiper.params.breakpoints) { + swiper.setBreakpoint(); + } + + // Add Classes + swiper.addClasses(); + + // Create loop + if (swiper.params.loop) { + swiper.loopCreate(); + } + + // Update size + swiper.updateSize(); + + // Update slides + swiper.updateSlides(); + + if (swiper.params.watchOverflow) { + swiper.checkOverflow(); + } + + // Set Grab Cursor + if (swiper.params.grabCursor) { + swiper.setGrabCursor(); + } + + if (swiper.params.preloadImages) { + swiper.preloadImages(); + } + + // Slide To Initial Slide + if (swiper.params.loop) { + swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit); + } else { + swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit); + } + + // Attach events + swiper.attachEvents(); + + // Init Flag + swiper.initialized = true; + + // Emit + swiper.emit('init'); + }; + + Swiper.prototype.destroy = function destroy (deleteInstance, cleanStyles) { + if ( deleteInstance === void 0 ) deleteInstance = true; + if ( cleanStyles === void 0 ) cleanStyles = true; + + var swiper = this; + var params = swiper.params; + var $el = swiper.$el; + var $wrapperEl = swiper.$wrapperEl; + var slides = swiper.slides; + + if (typeof swiper.params === 'undefined' || swiper.destroyed) { + return null; + } + + swiper.emit('beforeDestroy'); + + // Init Flag + swiper.initialized = false; + + // Detach events + swiper.detachEvents(); + + // Destroy loop + if (params.loop) { + swiper.loopDestroy(); + } + + // Cleanup styles + if (cleanStyles) { + swiper.removeClasses(); + $el.removeAttr('style'); + $wrapperEl.removeAttr('style'); + if (slides && slides.length) { + slides + .removeClass([ + params.slideVisibleClass, + params.slideActiveClass, + params.slideNextClass, + params.slidePrevClass ].join(' ')) + .removeAttr('style') + .removeAttr('data-swiper-slide-index'); + } + } + + swiper.emit('destroy'); + + // Detach emitter events + Object.keys(swiper.eventsListeners).forEach(function (eventName) { + swiper.off(eventName); + }); + + if (deleteInstance !== false) { + swiper.$el[0].swiper = null; + swiper.$el.data('swiper', null); + Utils.deleteProps(swiper); + } + swiper.destroyed = true; + + return null; + }; + + Swiper.extendDefaults = function extendDefaults (newDefaults) { + Utils.extend(extendedDefaults, newDefaults); + }; + + staticAccessors.extendedDefaults.get = function () { + return extendedDefaults; + }; + + staticAccessors.defaults.get = function () { + return defaults; + }; + + staticAccessors.Class.get = function () { + return SwiperClass; + }; + + staticAccessors.$.get = function () { + return $; + }; + + Object.defineProperties( Swiper, staticAccessors ); + + return Swiper; + }(SwiperClass)); + + var Device$1 = { + name: 'device', + proto: { + device: Device, + }, + static: { + device: Device, + }, + }; + + var Support$1 = { + name: 'support', + proto: { + support: Support, + }, + static: { + support: Support, + }, + }; + + var Browser = (function Browser() { + function isSafari() { + var ua = win.navigator.userAgent.toLowerCase(); + return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0); + } + return { + isEdge: !!win.navigator.userAgent.match(/Edge/g), + isSafari: isSafari(), + isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(win.navigator.userAgent), + }; + }()); + + var Browser$1 = { + name: 'browser', + proto: { + browser: Browser, + }, + static: { + browser: Browser, + }, + }; + + var Resize = { + name: 'resize', + create: function create() { + var swiper = this; + Utils.extend(swiper, { + resize: { + resizeHandler: function resizeHandler() { + if (!swiper || swiper.destroyed || !swiper.initialized) { return; } + swiper.emit('beforeResize'); + swiper.emit('resize'); + }, + orientationChangeHandler: function orientationChangeHandler() { + if (!swiper || swiper.destroyed || !swiper.initialized) { return; } + swiper.emit('orientationchange'); + }, + }, + }); + }, + on: { + init: function init() { + var swiper = this; + // Emit resize + win.addEventListener('resize', swiper.resize.resizeHandler); + + // Emit orientationchange + win.addEventListener('orientationchange', swiper.resize.orientationChangeHandler); + }, + destroy: function destroy() { + var swiper = this; + win.removeEventListener('resize', swiper.resize.resizeHandler); + win.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler); + }, + }, + }; + + var Observer = { + func: win.MutationObserver || win.WebkitMutationObserver, + attach: function attach(target, options) { + if ( options === void 0 ) options = {}; + + var swiper = this; + + var ObserverFunc = Observer.func; + var observer = new ObserverFunc(function (mutations) { + // The observerUpdate event should only be triggered + // once despite the number of mutations. Additional + // triggers are redundant and are very costly + if (mutations.length === 1) { + swiper.emit('observerUpdate', mutations[0]); + return; + } + var observerUpdate = function observerUpdate() { + swiper.emit('observerUpdate', mutations[0]); + }; + + if (win.requestAnimationFrame) { + win.requestAnimationFrame(observerUpdate); + } else { + win.setTimeout(observerUpdate, 0); + } + }); + + observer.observe(target, { + attributes: typeof options.attributes === 'undefined' ? true : options.attributes, + childList: typeof options.childList === 'undefined' ? true : options.childList, + characterData: typeof options.characterData === 'undefined' ? true : options.characterData, + }); + + swiper.observer.observers.push(observer); + }, + init: function init() { + var swiper = this; + if (!Support.observer || !swiper.params.observer) { return; } + if (swiper.params.observeParents) { + var containerParents = swiper.$el.parents(); + for (var i = 0; i < containerParents.length; i += 1) { + swiper.observer.attach(containerParents[i]); + } + } + // Observe container + swiper.observer.attach(swiper.$el[0], { childList: swiper.params.observeSlideChildren }); + + // Observe wrapper + swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false }); + }, + destroy: function destroy() { + var swiper = this; + swiper.observer.observers.forEach(function (observer) { + observer.disconnect(); + }); + swiper.observer.observers = []; + }, + }; + + var Observer$1 = { + name: 'observer', + params: { + observer: false, + observeParents: false, + observeSlideChildren: false, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + observer: { + init: Observer.init.bind(swiper), + attach: Observer.attach.bind(swiper), + destroy: Observer.destroy.bind(swiper), + observers: [], + }, + }); + }, + on: { + init: function init() { + var swiper = this; + swiper.observer.init(); + }, + destroy: function destroy() { + var swiper = this; + swiper.observer.destroy(); + }, + }, + }; + + var Virtual = { + update: function update(force) { + var swiper = this; + var ref = swiper.params; + var slidesPerView = ref.slidesPerView; + var slidesPerGroup = ref.slidesPerGroup; + var centeredSlides = ref.centeredSlides; + var ref$1 = swiper.params.virtual; + var addSlidesBefore = ref$1.addSlidesBefore; + var addSlidesAfter = ref$1.addSlidesAfter; + var ref$2 = swiper.virtual; + var previousFrom = ref$2.from; + var previousTo = ref$2.to; + var slides = ref$2.slides; + var previousSlidesGrid = ref$2.slidesGrid; + var renderSlide = ref$2.renderSlide; + var previousOffset = ref$2.offset; + swiper.updateActiveIndex(); + var activeIndex = swiper.activeIndex || 0; + + var offsetProp; + if (swiper.rtlTranslate) { offsetProp = 'right'; } + else { offsetProp = swiper.isHorizontal() ? 'left' : 'top'; } + + var slidesAfter; + var slidesBefore; + if (centeredSlides) { + slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore; + slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter; + } else { + slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore; + slidesBefore = slidesPerGroup + addSlidesAfter; + } + var from = Math.max((activeIndex || 0) - slidesBefore, 0); + var to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1); + var offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); + + Utils.extend(swiper.virtual, { + from: from, + to: to, + offset: offset, + slidesGrid: swiper.slidesGrid, + }); + + function onRendered() { + swiper.updateSlides(); + swiper.updateProgress(); + swiper.updateSlidesClasses(); + if (swiper.lazy && swiper.params.lazy.enabled) { + swiper.lazy.load(); + } + } + + if (previousFrom === from && previousTo === to && !force) { + if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) { + swiper.slides.css(offsetProp, (offset + "px")); + } + swiper.updateProgress(); + return; + } + if (swiper.params.virtual.renderExternal) { + swiper.params.virtual.renderExternal.call(swiper, { + offset: offset, + from: from, + to: to, + slides: (function getSlides() { + var slidesToRender = []; + for (var i = from; i <= to; i += 1) { + slidesToRender.push(slides[i]); + } + return slidesToRender; + }()), + }); + onRendered(); + return; + } + var prependIndexes = []; + var appendIndexes = []; + if (force) { + swiper.$wrapperEl.find(("." + (swiper.params.slideClass))).remove(); + } else { + for (var i = previousFrom; i <= previousTo; i += 1) { + if (i < from || i > to) { + swiper.$wrapperEl.find(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + i + "\"]")).remove(); + } + } + } + for (var i$1 = 0; i$1 < slides.length; i$1 += 1) { + if (i$1 >= from && i$1 <= to) { + if (typeof previousTo === 'undefined' || force) { + appendIndexes.push(i$1); + } else { + if (i$1 > previousTo) { appendIndexes.push(i$1); } + if (i$1 < previousFrom) { prependIndexes.push(i$1); } + } + } + } + appendIndexes.forEach(function (index) { + swiper.$wrapperEl.append(renderSlide(slides[index], index)); + }); + prependIndexes.sort(function (a, b) { return b - a; }).forEach(function (index) { + swiper.$wrapperEl.prepend(renderSlide(slides[index], index)); + }); + swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, (offset + "px")); + onRendered(); + }, + renderSlide: function renderSlide(slide, index) { + var swiper = this; + var params = swiper.params.virtual; + if (params.cache && swiper.virtual.cache[index]) { + return swiper.virtual.cache[index]; + } + var $slideEl = params.renderSlide + ? $(params.renderSlide.call(swiper, slide, index)) + : $(("
" + slide + "
")); + if (!$slideEl.attr('data-swiper-slide-index')) { $slideEl.attr('data-swiper-slide-index', index); } + if (params.cache) { swiper.virtual.cache[index] = $slideEl; } + return $slideEl; + }, + appendSlide: function appendSlide(slides) { + var swiper = this; + if (typeof slides === 'object' && 'length' in slides) { + for (var i = 0; i < slides.length; i += 1) { + if (slides[i]) { swiper.virtual.slides.push(slides[i]); } + } + } else { + swiper.virtual.slides.push(slides); + } + swiper.virtual.update(true); + }, + prependSlide: function prependSlide(slides) { + var swiper = this; + var activeIndex = swiper.activeIndex; + var newActiveIndex = activeIndex + 1; + var numberOfNewSlides = 1; + + if (Array.isArray(slides)) { + for (var i = 0; i < slides.length; i += 1) { + if (slides[i]) { swiper.virtual.slides.unshift(slides[i]); } + } + newActiveIndex = activeIndex + slides.length; + numberOfNewSlides = slides.length; + } else { + swiper.virtual.slides.unshift(slides); + } + if (swiper.params.virtual.cache) { + var cache = swiper.virtual.cache; + var newCache = {}; + Object.keys(cache).forEach(function (cachedIndex) { + var $cachedEl = cache[cachedIndex]; + var cachedElIndex = $cachedEl.attr('data-swiper-slide-index'); + if (cachedElIndex) { + $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + 1); + } + newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl; + }); + swiper.virtual.cache = newCache; + } + swiper.virtual.update(true); + swiper.slideTo(newActiveIndex, 0); + }, + removeSlide: function removeSlide(slidesIndexes) { + var swiper = this; + if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) { return; } + var activeIndex = swiper.activeIndex; + if (Array.isArray(slidesIndexes)) { + for (var i = slidesIndexes.length - 1; i >= 0; i -= 1) { + swiper.virtual.slides.splice(slidesIndexes[i], 1); + if (swiper.params.virtual.cache) { + delete swiper.virtual.cache[slidesIndexes[i]]; + } + if (slidesIndexes[i] < activeIndex) { activeIndex -= 1; } + activeIndex = Math.max(activeIndex, 0); + } + } else { + swiper.virtual.slides.splice(slidesIndexes, 1); + if (swiper.params.virtual.cache) { + delete swiper.virtual.cache[slidesIndexes]; + } + if (slidesIndexes < activeIndex) { activeIndex -= 1; } + activeIndex = Math.max(activeIndex, 0); + } + swiper.virtual.update(true); + swiper.slideTo(activeIndex, 0); + }, + removeAllSlides: function removeAllSlides() { + var swiper = this; + swiper.virtual.slides = []; + if (swiper.params.virtual.cache) { + swiper.virtual.cache = {}; + } + swiper.virtual.update(true); + swiper.slideTo(0, 0); + }, + }; + + var Virtual$1 = { + name: 'virtual', + params: { + virtual: { + enabled: false, + slides: [], + cache: true, + renderSlide: null, + renderExternal: null, + addSlidesBefore: 0, + addSlidesAfter: 0, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + virtual: { + update: Virtual.update.bind(swiper), + appendSlide: Virtual.appendSlide.bind(swiper), + prependSlide: Virtual.prependSlide.bind(swiper), + removeSlide: Virtual.removeSlide.bind(swiper), + removeAllSlides: Virtual.removeAllSlides.bind(swiper), + renderSlide: Virtual.renderSlide.bind(swiper), + slides: swiper.params.virtual.slides, + cache: {}, + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (!swiper.params.virtual.enabled) { return; } + swiper.classNames.push(((swiper.params.containerModifierClass) + "virtual")); + var overwriteParams = { + watchSlidesProgress: true, + }; + Utils.extend(swiper.params, overwriteParams); + Utils.extend(swiper.originalParams, overwriteParams); + + if (!swiper.params.initialSlide) { + swiper.virtual.update(); + } + }, + setTranslate: function setTranslate() { + var swiper = this; + if (!swiper.params.virtual.enabled) { return; } + swiper.virtual.update(); + }, + }, + }; + + var Keyboard = { + handle: function handle(event) { + var swiper = this; + var rtl = swiper.rtlTranslate; + var e = event; + if (e.originalEvent) { e = e.originalEvent; } // jquery fix + var kc = e.keyCode || e.charCode; + // Directions locks + if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40) || kc === 34)) { + return false; + } + if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38) || kc === 33)) { + return false; + } + if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { + return undefined; + } + if (doc.activeElement && doc.activeElement.nodeName && (doc.activeElement.nodeName.toLowerCase() === 'input' || doc.activeElement.nodeName.toLowerCase() === 'textarea')) { + return undefined; + } + if (swiper.params.keyboard.onlyInViewport && (kc === 33 || kc === 34 || kc === 37 || kc === 39 || kc === 38 || kc === 40)) { + var inView = false; + // Check that swiper should be inside of visible area of window + if (swiper.$el.parents(("." + (swiper.params.slideClass))).length > 0 && swiper.$el.parents(("." + (swiper.params.slideActiveClass))).length === 0) { + return undefined; + } + var windowWidth = win.innerWidth; + var windowHeight = win.innerHeight; + var swiperOffset = swiper.$el.offset(); + if (rtl) { swiperOffset.left -= swiper.$el[0].scrollLeft; } + var swiperCoord = [ + [swiperOffset.left, swiperOffset.top], + [swiperOffset.left + swiper.width, swiperOffset.top], + [swiperOffset.left, swiperOffset.top + swiper.height], + [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height] ]; + for (var i = 0; i < swiperCoord.length; i += 1) { + var point = swiperCoord[i]; + if ( + point[0] >= 0 && point[0] <= windowWidth + && point[1] >= 0 && point[1] <= windowHeight + ) { + inView = true; + } + } + if (!inView) { return undefined; } + } + if (swiper.isHorizontal()) { + if (kc === 33 || kc === 34 || kc === 37 || kc === 39) { + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + } + if (((kc === 34 || kc === 39) && !rtl) || ((kc === 33 || kc === 37) && rtl)) { swiper.slideNext(); } + if (((kc === 33 || kc === 37) && !rtl) || ((kc === 34 || kc === 39) && rtl)) { swiper.slidePrev(); } + } else { + if (kc === 33 || kc === 34 || kc === 38 || kc === 40) { + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + } + if (kc === 34 || kc === 40) { swiper.slideNext(); } + if (kc === 33 || kc === 38) { swiper.slidePrev(); } + } + swiper.emit('keyPress', kc); + return undefined; + }, + enable: function enable() { + var swiper = this; + if (swiper.keyboard.enabled) { return; } + $(doc).on('keydown', swiper.keyboard.handle); + swiper.keyboard.enabled = true; + }, + disable: function disable() { + var swiper = this; + if (!swiper.keyboard.enabled) { return; } + $(doc).off('keydown', swiper.keyboard.handle); + swiper.keyboard.enabled = false; + }, + }; + + var Keyboard$1 = { + name: 'keyboard', + params: { + keyboard: { + enabled: false, + onlyInViewport: true, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + keyboard: { + enabled: false, + enable: Keyboard.enable.bind(swiper), + disable: Keyboard.disable.bind(swiper), + handle: Keyboard.handle.bind(swiper), + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.keyboard.enabled) { + swiper.keyboard.enable(); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.keyboard.enabled) { + swiper.keyboard.disable(); + } + }, + }, + }; + + function isEventSupported() { + var eventName = 'onwheel'; + var isSupported = eventName in doc; + + if (!isSupported) { + var element = doc.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported + && doc.implementation + && doc.implementation.hasFeature + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + && doc.implementation.hasFeature('', '') !== true + ) { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = doc.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; + } + var Mousewheel = { + lastScrollTime: Utils.now(), + lastEventBeforeSnap: undefined, + recentWheelEvents: [], + event: function event() { + if (win.navigator.userAgent.indexOf('firefox') > -1) { return 'DOMMouseScroll'; } + return isEventSupported() ? 'wheel' : 'mousewheel'; + }, + normalize: function normalize(e) { + // Reasonable defaults + var PIXEL_STEP = 10; + var LINE_HEIGHT = 40; + var PAGE_HEIGHT = 800; + + var sX = 0; + var sY = 0; // spinX, spinY + var pX = 0; + var pY = 0; // pixelX, pixelY + + // Legacy + if ('detail' in e) { + sY = e.detail; + } + if ('wheelDelta' in e) { + sY = -e.wheelDelta / 120; + } + if ('wheelDeltaY' in e) { + sY = -e.wheelDeltaY / 120; + } + if ('wheelDeltaX' in e) { + sX = -e.wheelDeltaX / 120; + } + + // side scrolling on FF with DOMMouseScroll + if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { + sX = sY; + sY = 0; + } + + pX = sX * PIXEL_STEP; + pY = sY * PIXEL_STEP; + + if ('deltaY' in e) { + pY = e.deltaY; + } + if ('deltaX' in e) { + pX = e.deltaX; + } + + if (e.shiftKey && !pX) { // if user scrolls with shift he wants horizontal scroll + pX = pY; + pY = 0; + } + + if ((pX || pY) && e.deltaMode) { + if (e.deltaMode === 1) { // delta in LINE units + pX *= LINE_HEIGHT; + pY *= LINE_HEIGHT; + } else { // delta in PAGE units + pX *= PAGE_HEIGHT; + pY *= PAGE_HEIGHT; + } + } + + // Fall-back if spin cannot be determined + if (pX && !sX) { + sX = (pX < 1) ? -1 : 1; + } + if (pY && !sY) { + sY = (pY < 1) ? -1 : 1; + } + + return { + spinX: sX, + spinY: sY, + pixelX: pX, + pixelY: pY, + }; + }, + handleMouseEnter: function handleMouseEnter() { + var swiper = this; + swiper.mouseEntered = true; + }, + handleMouseLeave: function handleMouseLeave() { + var swiper = this; + swiper.mouseEntered = false; + }, + handle: function handle(event) { + var e = event; + var swiper = this; + var params = swiper.params.mousewheel; + + if (swiper.params.cssMode) { + e.preventDefault(); + } + + var target = swiper.$el; + if (swiper.params.mousewheel.eventsTarged !== 'container') { + target = $(swiper.params.mousewheel.eventsTarged); + } + if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) { return true; } + + if (e.originalEvent) { e = e.originalEvent; } // jquery fix + var delta = 0; + var rtlFactor = swiper.rtlTranslate ? -1 : 1; + + var data = Mousewheel.normalize(e); + + if (params.forceToAxis) { + if (swiper.isHorizontal()) { + if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) { delta = data.pixelX * rtlFactor; } + else { return true; } + } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) { delta = data.pixelY; } + else { return true; } + } else { + delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; + } + + if (delta === 0) { return true; } + + if (params.invert) { delta = -delta; } + + if (!swiper.params.freeMode) { + // Register the new event in a variable which stores the relevant data + var newEvent = { + time: Utils.now(), + delta: Math.abs(delta), + direction: Math.sign(delta), + raw: event, + }; + + // Keep the most recent events + var recentWheelEvents = swiper.mousewheel.recentWheelEvents; + if (recentWheelEvents.length >= 2) { + recentWheelEvents.shift(); // only store the last N events + } + var prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; + recentWheelEvents.push(newEvent); + + // If there is at least one previous recorded event: + // If direction has changed or + // if the scroll is quicker than the previous one: + // Animate the slider. + // Else (this is the first time the wheel is moved): + // Animate the slider. + if (prevEvent) { + if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta) { + swiper.mousewheel.animateSlider(newEvent); + } + } else { + swiper.mousewheel.animateSlider(newEvent); + } + + // If it's time to release the scroll: + // Return now so you don't hit the preventDefault. + if (swiper.mousewheel.releaseScroll(newEvent)) { + return true; + } + } else { + // Freemode or scrollContainer: + + // If we recently snapped after a momentum scroll, then ignore wheel events + // to give time for the deceleration to finish. Stop ignoring after 500 msecs + // or if it's a new scroll (larger delta or inverse sign as last event before + // an end-of-momentum snap). + var newEvent$1 = { time: Utils.now(), delta: Math.abs(delta), direction: Math.sign(delta) }; + var ref = swiper.mousewheel; + var lastEventBeforeSnap = ref.lastEventBeforeSnap; + var ignoreWheelEvents = lastEventBeforeSnap + && newEvent$1.time < lastEventBeforeSnap.time + 500 + && newEvent$1.delta <= lastEventBeforeSnap.delta + && newEvent$1.direction === lastEventBeforeSnap.direction; + if (!ignoreWheelEvents) { + swiper.mousewheel.lastEventBeforeSnap = undefined; + + if (swiper.params.loop) { + swiper.loopFix(); + } + var position = swiper.getTranslate() + (delta * params.sensitivity); + var wasBeginning = swiper.isBeginning; + var wasEnd = swiper.isEnd; + + if (position >= swiper.minTranslate()) { position = swiper.minTranslate(); } + if (position <= swiper.maxTranslate()) { position = swiper.maxTranslate(); } + + swiper.setTransition(0); + swiper.setTranslate(position); + swiper.updateProgress(); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + + if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) { + swiper.updateSlidesClasses(); + } + + if (swiper.params.freeModeSticky) { + // When wheel scrolling starts with sticky (aka snap) enabled, then detect + // the end of a momentum scroll by storing recent (N=15?) wheel events. + // 1. do all N events have decreasing or same (absolute value) delta? + // 2. did all N events arrive in the last M (M=500?) msecs? + // 3. does the earliest event have an (absolute value) delta that's + // at least P (P=1?) larger than the most recent event's delta? + // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels? + // If 1-4 are "yes" then we're near the end of a momuntum scroll deceleration. + // Snap immediately and ignore remaining wheel events in this scroll. + // See comment above for "remaining wheel events in this scroll" determination. + // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event. + clearTimeout(swiper.mousewheel.timeout); + swiper.mousewheel.timeout = undefined; + var recentWheelEvents$1 = swiper.mousewheel.recentWheelEvents; + if (recentWheelEvents$1.length >= 15) { + recentWheelEvents$1.shift(); // only store the last N events + } + var prevEvent$1 = recentWheelEvents$1.length ? recentWheelEvents$1[recentWheelEvents$1.length - 1] : undefined; + var firstEvent = recentWheelEvents$1[0]; + recentWheelEvents$1.push(newEvent$1); + if (prevEvent$1 && (newEvent$1.delta > prevEvent$1.delta || newEvent$1.direction !== prevEvent$1.direction)) { + // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log. + recentWheelEvents$1.splice(0); + } else if (recentWheelEvents$1.length >= 15 + && newEvent$1.time - firstEvent.time < 500 + && firstEvent.delta - newEvent$1.delta >= 1 + && newEvent$1.delta <= 6 + ) { + // We're at the end of the deceleration of a momentum scroll, so there's no need + // to wait for more events. Snap ASAP on the next tick. + // Also, because there's some remaining momentum we'll bias the snap in the + // direction of the ongoing scroll because it's better UX for the scroll to snap + // in the same direction as the scroll instead of reversing to snap. Therefore, + // if it's already scrolled more than 20% in the current direction, keep going. + var snapToThreshold = delta > 0 ? 0.8 : 0.2; + swiper.mousewheel.lastEventBeforeSnap = newEvent$1; + recentWheelEvents$1.splice(0); + swiper.mousewheel.timeout = Utils.nextTick(function () { + swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); + }, 0); // no delay; move on next tick + } + if (!swiper.mousewheel.timeout) { + // if we get here, then we haven't detected the end of a momentum scroll, so + // we'll consider a scroll "complete" when there haven't been any wheel events + // for 500ms. + swiper.mousewheel.timeout = Utils.nextTick(function () { + var snapToThreshold = 0.5; + swiper.mousewheel.lastEventBeforeSnap = newEvent$1; + recentWheelEvents$1.splice(0); + swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); + }, 500); + } + } + + // Emit event + if (!ignoreWheelEvents) { swiper.emit('scroll', e); } + + // Stop autoplay + if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) { swiper.autoplay.stop(); } + // Return page scroll on edge positions + if (position === swiper.minTranslate() || position === swiper.maxTranslate()) { return true; } + } + } + + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + return false; + }, + animateSlider: function animateSlider(newEvent) { + var swiper = this; + // If the movement is NOT big enough and + // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider): + // Don't go any further (avoid insignificant scroll movement). + if (newEvent.delta >= 6 && Utils.now() - swiper.mousewheel.lastScrollTime < 60) { + // Return false as a default + return true; + } + // If user is scrolling towards the end: + // If the slider hasn't hit the latest slide or + // if the slider is a loop and + // if the slider isn't moving right now: + // Go to next slide and + // emit a scroll event. + // Else (the user is scrolling towards the beginning) and + // if the slider hasn't hit the first slide or + // if the slider is a loop and + // if the slider isn't moving right now: + // Go to prev slide and + // emit a scroll event. + if (newEvent.direction < 0) { + if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { + swiper.slideNext(); + swiper.emit('scroll', newEvent.raw); + } + } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { + swiper.slidePrev(); + swiper.emit('scroll', newEvent.raw); + } + // If you got here is because an animation has been triggered so store the current time + swiper.mousewheel.lastScrollTime = (new win.Date()).getTime(); + // Return false as a default + return false; + }, + releaseScroll: function releaseScroll(newEvent) { + var swiper = this; + var params = swiper.params.mousewheel; + if (newEvent.direction < 0) { + if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) { + // Return true to animate scroll on edges + return true; + } + } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) { + // Return true to animate scroll on edges + return true; + } + return false; + }, + enable: function enable() { + var swiper = this; + var event = Mousewheel.event(); + if (swiper.params.cssMode) { + swiper.wrapperEl.removeEventListener(event, swiper.mousewheel.handle); + return true; + } + if (!event) { return false; } + if (swiper.mousewheel.enabled) { return false; } + var target = swiper.$el; + if (swiper.params.mousewheel.eventsTarged !== 'container') { + target = $(swiper.params.mousewheel.eventsTarged); + } + target.on('mouseenter', swiper.mousewheel.handleMouseEnter); + target.on('mouseleave', swiper.mousewheel.handleMouseLeave); + target.on(event, swiper.mousewheel.handle); + swiper.mousewheel.enabled = true; + return true; + }, + disable: function disable() { + var swiper = this; + var event = Mousewheel.event(); + if (swiper.params.cssMode) { + swiper.wrapperEl.addEventListener(event, swiper.mousewheel.handle); + return true; + } + if (!event) { return false; } + if (!swiper.mousewheel.enabled) { return false; } + var target = swiper.$el; + if (swiper.params.mousewheel.eventsTarged !== 'container') { + target = $(swiper.params.mousewheel.eventsTarged); + } + target.off(event, swiper.mousewheel.handle); + swiper.mousewheel.enabled = false; + return true; + }, + }; + + var Mousewheel$1 = { + name: 'mousewheel', + params: { + mousewheel: { + enabled: false, + releaseOnEdges: false, + invert: false, + forceToAxis: false, + sensitivity: 1, + eventsTarged: 'container', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + mousewheel: { + enabled: false, + enable: Mousewheel.enable.bind(swiper), + disable: Mousewheel.disable.bind(swiper), + handle: Mousewheel.handle.bind(swiper), + handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper), + handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper), + animateSlider: Mousewheel.animateSlider.bind(swiper), + releaseScroll: Mousewheel.releaseScroll.bind(swiper), + lastScrollTime: Utils.now(), + lastEventBeforeSnap: undefined, + recentWheelEvents: [], + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) { + swiper.mousewheel.disable(); + } + if (swiper.params.mousewheel.enabled) { swiper.mousewheel.enable(); } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.params.cssMode) { + swiper.mousewheel.enable(); + } + if (swiper.mousewheel.enabled) { swiper.mousewheel.disable(); } + }, + }, + }; + + var Navigation = { + update: function update() { + // Update Navigation Buttons + var swiper = this; + var params = swiper.params.navigation; + + if (swiper.params.loop) { return; } + var ref = swiper.navigation; + var $nextEl = ref.$nextEl; + var $prevEl = ref.$prevEl; + + if ($prevEl && $prevEl.length > 0) { + if (swiper.isBeginning) { + $prevEl.addClass(params.disabledClass); + } else { + $prevEl.removeClass(params.disabledClass); + } + $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + } + if ($nextEl && $nextEl.length > 0) { + if (swiper.isEnd) { + $nextEl.addClass(params.disabledClass); + } else { + $nextEl.removeClass(params.disabledClass); + } + $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + } + }, + onPrevClick: function onPrevClick(e) { + var swiper = this; + e.preventDefault(); + if (swiper.isBeginning && !swiper.params.loop) { return; } + swiper.slidePrev(); + }, + onNextClick: function onNextClick(e) { + var swiper = this; + e.preventDefault(); + if (swiper.isEnd && !swiper.params.loop) { return; } + swiper.slideNext(); + }, + init: function init() { + var swiper = this; + var params = swiper.params.navigation; + if (!(params.nextEl || params.prevEl)) { return; } + + var $nextEl; + var $prevEl; + if (params.nextEl) { + $nextEl = $(params.nextEl); + if ( + swiper.params.uniqueNavElements + && typeof params.nextEl === 'string' + && $nextEl.length > 1 + && swiper.$el.find(params.nextEl).length === 1 + ) { + $nextEl = swiper.$el.find(params.nextEl); + } + } + if (params.prevEl) { + $prevEl = $(params.prevEl); + if ( + swiper.params.uniqueNavElements + && typeof params.prevEl === 'string' + && $prevEl.length > 1 + && swiper.$el.find(params.prevEl).length === 1 + ) { + $prevEl = swiper.$el.find(params.prevEl); + } + } + + if ($nextEl && $nextEl.length > 0) { + $nextEl.on('click', swiper.navigation.onNextClick); + } + if ($prevEl && $prevEl.length > 0) { + $prevEl.on('click', swiper.navigation.onPrevClick); + } + + Utils.extend(swiper.navigation, { + $nextEl: $nextEl, + nextEl: $nextEl && $nextEl[0], + $prevEl: $prevEl, + prevEl: $prevEl && $prevEl[0], + }); + }, + destroy: function destroy() { + var swiper = this; + var ref = swiper.navigation; + var $nextEl = ref.$nextEl; + var $prevEl = ref.$prevEl; + if ($nextEl && $nextEl.length) { + $nextEl.off('click', swiper.navigation.onNextClick); + $nextEl.removeClass(swiper.params.navigation.disabledClass); + } + if ($prevEl && $prevEl.length) { + $prevEl.off('click', swiper.navigation.onPrevClick); + $prevEl.removeClass(swiper.params.navigation.disabledClass); + } + }, + }; + + var Navigation$1 = { + name: 'navigation', + params: { + navigation: { + nextEl: null, + prevEl: null, + + hideOnClick: false, + disabledClass: 'swiper-button-disabled', + hiddenClass: 'swiper-button-hidden', + lockClass: 'swiper-button-lock', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + navigation: { + init: Navigation.init.bind(swiper), + update: Navigation.update.bind(swiper), + destroy: Navigation.destroy.bind(swiper), + onNextClick: Navigation.onNextClick.bind(swiper), + onPrevClick: Navigation.onPrevClick.bind(swiper), + }, + }); + }, + on: { + init: function init() { + var swiper = this; + swiper.navigation.init(); + swiper.navigation.update(); + }, + toEdge: function toEdge() { + var swiper = this; + swiper.navigation.update(); + }, + fromEdge: function fromEdge() { + var swiper = this; + swiper.navigation.update(); + }, + destroy: function destroy() { + var swiper = this; + swiper.navigation.destroy(); + }, + click: function click(e) { + var swiper = this; + var ref = swiper.navigation; + var $nextEl = ref.$nextEl; + var $prevEl = ref.$prevEl; + if ( + swiper.params.navigation.hideOnClick + && !$(e.target).is($prevEl) + && !$(e.target).is($nextEl) + ) { + var isHidden; + if ($nextEl) { + isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass); + } else if ($prevEl) { + isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass); + } + if (isHidden === true) { + swiper.emit('navigationShow', swiper); + } else { + swiper.emit('navigationHide', swiper); + } + if ($nextEl) { + $nextEl.toggleClass(swiper.params.navigation.hiddenClass); + } + if ($prevEl) { + $prevEl.toggleClass(swiper.params.navigation.hiddenClass); + } + } + }, + }, + }; + + var Pagination = { + update: function update() { + // Render || Update Pagination bullets/items + var swiper = this; + var rtl = swiper.rtl; + var params = swiper.params.pagination; + if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; } + var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; + var $el = swiper.pagination.$el; + // Current/Total + var current; + var total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; + if (swiper.params.loop) { + current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup); + if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) { + current -= (slidesLength - (swiper.loopedSlides * 2)); + } + if (current > total - 1) { current -= total; } + if (current < 0 && swiper.params.paginationType !== 'bullets') { current = total + current; } + } else if (typeof swiper.snapIndex !== 'undefined') { + current = swiper.snapIndex; + } else { + current = swiper.activeIndex || 0; + } + // Types + if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { + var bullets = swiper.pagination.bullets; + var firstIndex; + var lastIndex; + var midIndex; + if (params.dynamicBullets) { + swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true); + $el.css(swiper.isHorizontal() ? 'width' : 'height', ((swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)) + "px")); + if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) { + swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex); + if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) { + swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1; + } else if (swiper.pagination.dynamicBulletIndex < 0) { + swiper.pagination.dynamicBulletIndex = 0; + } + } + firstIndex = current - swiper.pagination.dynamicBulletIndex; + lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); + midIndex = (lastIndex + firstIndex) / 2; + } + bullets.removeClass(((params.bulletActiveClass) + " " + (params.bulletActiveClass) + "-next " + (params.bulletActiveClass) + "-next-next " + (params.bulletActiveClass) + "-prev " + (params.bulletActiveClass) + "-prev-prev " + (params.bulletActiveClass) + "-main")); + if ($el.length > 1) { + bullets.each(function (index, bullet) { + var $bullet = $(bullet); + var bulletIndex = $bullet.index(); + if (bulletIndex === current) { + $bullet.addClass(params.bulletActiveClass); + } + if (params.dynamicBullets) { + if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { + $bullet.addClass(((params.bulletActiveClass) + "-main")); + } + if (bulletIndex === firstIndex) { + $bullet + .prev() + .addClass(((params.bulletActiveClass) + "-prev")) + .prev() + .addClass(((params.bulletActiveClass) + "-prev-prev")); + } + if (bulletIndex === lastIndex) { + $bullet + .next() + .addClass(((params.bulletActiveClass) + "-next")) + .next() + .addClass(((params.bulletActiveClass) + "-next-next")); + } + } + }); + } else { + var $bullet = bullets.eq(current); + var bulletIndex = $bullet.index(); + $bullet.addClass(params.bulletActiveClass); + if (params.dynamicBullets) { + var $firstDisplayedBullet = bullets.eq(firstIndex); + var $lastDisplayedBullet = bullets.eq(lastIndex); + for (var i = firstIndex; i <= lastIndex; i += 1) { + bullets.eq(i).addClass(((params.bulletActiveClass) + "-main")); + } + if (swiper.params.loop) { + if (bulletIndex >= bullets.length - params.dynamicMainBullets) { + for (var i$1 = params.dynamicMainBullets; i$1 >= 0; i$1 -= 1) { + bullets.eq(bullets.length - i$1).addClass(((params.bulletActiveClass) + "-main")); + } + bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass(((params.bulletActiveClass) + "-prev")); + } else { + $firstDisplayedBullet + .prev() + .addClass(((params.bulletActiveClass) + "-prev")) + .prev() + .addClass(((params.bulletActiveClass) + "-prev-prev")); + $lastDisplayedBullet + .next() + .addClass(((params.bulletActiveClass) + "-next")) + .next() + .addClass(((params.bulletActiveClass) + "-next-next")); + } + } else { + $firstDisplayedBullet + .prev() + .addClass(((params.bulletActiveClass) + "-prev")) + .prev() + .addClass(((params.bulletActiveClass) + "-prev-prev")); + $lastDisplayedBullet + .next() + .addClass(((params.bulletActiveClass) + "-next")) + .next() + .addClass(((params.bulletActiveClass) + "-next-next")); + } + } + } + if (params.dynamicBullets) { + var dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); + var bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize); + var offsetProp = rtl ? 'right' : 'left'; + bullets.css(swiper.isHorizontal() ? offsetProp : 'top', (bulletsOffset + "px")); + } + } + if (params.type === 'fraction') { + $el.find(("." + (params.currentClass))).text(params.formatFractionCurrent(current + 1)); + $el.find(("." + (params.totalClass))).text(params.formatFractionTotal(total)); + } + if (params.type === 'progressbar') { + var progressbarDirection; + if (params.progressbarOpposite) { + progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; + } else { + progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; + } + var scale = (current + 1) / total; + var scaleX = 1; + var scaleY = 1; + if (progressbarDirection === 'horizontal') { + scaleX = scale; + } else { + scaleY = scale; + } + $el.find(("." + (params.progressbarFillClass))).transform(("translate3d(0,0,0) scaleX(" + scaleX + ") scaleY(" + scaleY + ")")).transition(swiper.params.speed); + } + if (params.type === 'custom' && params.renderCustom) { + $el.html(params.renderCustom(swiper, current + 1, total)); + swiper.emit('paginationRender', swiper, $el[0]); + } else { + swiper.emit('paginationUpdate', swiper, $el[0]); + } + $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); + }, + render: function render() { + // Render Container + var swiper = this; + var params = swiper.params.pagination; + if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; } + var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; + + var $el = swiper.pagination.$el; + var paginationHTML = ''; + if (params.type === 'bullets') { + var numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; + for (var i = 0; i < numberOfBullets; i += 1) { + if (params.renderBullet) { + paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); + } else { + paginationHTML += "<" + (params.bulletElement) + " class=\"" + (params.bulletClass) + "\">"; + } + } + $el.html(paginationHTML); + swiper.pagination.bullets = $el.find(("." + (params.bulletClass))); + } + if (params.type === 'fraction') { + if (params.renderFraction) { + paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); + } else { + paginationHTML = "" + + ' / ' + + ""; + } + $el.html(paginationHTML); + } + if (params.type === 'progressbar') { + if (params.renderProgressbar) { + paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); + } else { + paginationHTML = ""; + } + $el.html(paginationHTML); + } + if (params.type !== 'custom') { + swiper.emit('paginationRender', swiper.pagination.$el[0]); + } + }, + init: function init() { + var swiper = this; + var params = swiper.params.pagination; + if (!params.el) { return; } + + var $el = $(params.el); + if ($el.length === 0) { return; } + + if ( + swiper.params.uniqueNavElements + && typeof params.el === 'string' + && $el.length > 1 + && swiper.$el.find(params.el).length === 1 + ) { + $el = swiper.$el.find(params.el); + } + + if (params.type === 'bullets' && params.clickable) { + $el.addClass(params.clickableClass); + } + + $el.addClass(params.modifierClass + params.type); + + if (params.type === 'bullets' && params.dynamicBullets) { + $el.addClass(("" + (params.modifierClass) + (params.type) + "-dynamic")); + swiper.pagination.dynamicBulletIndex = 0; + if (params.dynamicMainBullets < 1) { + params.dynamicMainBullets = 1; + } + } + if (params.type === 'progressbar' && params.progressbarOpposite) { + $el.addClass(params.progressbarOppositeClass); + } + + if (params.clickable) { + $el.on('click', ("." + (params.bulletClass)), function onClick(e) { + e.preventDefault(); + var index = $(this).index() * swiper.params.slidesPerGroup; + if (swiper.params.loop) { index += swiper.loopedSlides; } + swiper.slideTo(index); + }); + } + + Utils.extend(swiper.pagination, { + $el: $el, + el: $el[0], + }); + }, + destroy: function destroy() { + var swiper = this; + var params = swiper.params.pagination; + if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; } + var $el = swiper.pagination.$el; + + $el.removeClass(params.hiddenClass); + $el.removeClass(params.modifierClass + params.type); + if (swiper.pagination.bullets) { swiper.pagination.bullets.removeClass(params.bulletActiveClass); } + if (params.clickable) { + $el.off('click', ("." + (params.bulletClass))); + } + }, + }; + + var Pagination$1 = { + name: 'pagination', + params: { + pagination: { + el: null, + bulletElement: 'span', + clickable: false, + hideOnClick: false, + renderBullet: null, + renderProgressbar: null, + renderFraction: null, + renderCustom: null, + progressbarOpposite: false, + type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom' + dynamicBullets: false, + dynamicMainBullets: 1, + formatFractionCurrent: function (number) { return number; }, + formatFractionTotal: function (number) { return number; }, + bulletClass: 'swiper-pagination-bullet', + bulletActiveClass: 'swiper-pagination-bullet-active', + modifierClass: 'swiper-pagination-', // NEW + currentClass: 'swiper-pagination-current', + totalClass: 'swiper-pagination-total', + hiddenClass: 'swiper-pagination-hidden', + progressbarFillClass: 'swiper-pagination-progressbar-fill', + progressbarOppositeClass: 'swiper-pagination-progressbar-opposite', + clickableClass: 'swiper-pagination-clickable', // NEW + lockClass: 'swiper-pagination-lock', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + pagination: { + init: Pagination.init.bind(swiper), + render: Pagination.render.bind(swiper), + update: Pagination.update.bind(swiper), + destroy: Pagination.destroy.bind(swiper), + dynamicBulletIndex: 0, + }, + }); + }, + on: { + init: function init() { + var swiper = this; + swiper.pagination.init(); + swiper.pagination.render(); + swiper.pagination.update(); + }, + activeIndexChange: function activeIndexChange() { + var swiper = this; + if (swiper.params.loop) { + swiper.pagination.update(); + } else if (typeof swiper.snapIndex === 'undefined') { + swiper.pagination.update(); + } + }, + snapIndexChange: function snapIndexChange() { + var swiper = this; + if (!swiper.params.loop) { + swiper.pagination.update(); + } + }, + slidesLengthChange: function slidesLengthChange() { + var swiper = this; + if (swiper.params.loop) { + swiper.pagination.render(); + swiper.pagination.update(); + } + }, + snapGridLengthChange: function snapGridLengthChange() { + var swiper = this; + if (!swiper.params.loop) { + swiper.pagination.render(); + swiper.pagination.update(); + } + }, + destroy: function destroy() { + var swiper = this; + swiper.pagination.destroy(); + }, + click: function click(e) { + var swiper = this; + if ( + swiper.params.pagination.el + && swiper.params.pagination.hideOnClick + && swiper.pagination.$el.length > 0 + && !$(e.target).hasClass(swiper.params.pagination.bulletClass) + ) { + var isHidden = swiper.pagination.$el.hasClass(swiper.params.pagination.hiddenClass); + if (isHidden === true) { + swiper.emit('paginationShow', swiper); + } else { + swiper.emit('paginationHide', swiper); + } + swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass); + } + }, + }, + }; + + var Scrollbar = { + setTranslate: function setTranslate() { + var swiper = this; + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; } + var scrollbar = swiper.scrollbar; + var rtl = swiper.rtlTranslate; + var progress = swiper.progress; + var dragSize = scrollbar.dragSize; + var trackSize = scrollbar.trackSize; + var $dragEl = scrollbar.$dragEl; + var $el = scrollbar.$el; + var params = swiper.params.scrollbar; + + var newSize = dragSize; + var newPos = (trackSize - dragSize) * progress; + if (rtl) { + newPos = -newPos; + if (newPos > 0) { + newSize = dragSize - newPos; + newPos = 0; + } else if (-newPos + dragSize > trackSize) { + newSize = trackSize + newPos; + } + } else if (newPos < 0) { + newSize = dragSize + newPos; + newPos = 0; + } else if (newPos + dragSize > trackSize) { + newSize = trackSize - newPos; + } + if (swiper.isHorizontal()) { + $dragEl.transform(("translate3d(" + newPos + "px, 0, 0)")); + $dragEl[0].style.width = newSize + "px"; + } else { + $dragEl.transform(("translate3d(0px, " + newPos + "px, 0)")); + $dragEl[0].style.height = newSize + "px"; + } + if (params.hide) { + clearTimeout(swiper.scrollbar.timeout); + $el[0].style.opacity = 1; + swiper.scrollbar.timeout = setTimeout(function () { + $el[0].style.opacity = 0; + $el.transition(400); + }, 1000); + } + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; } + swiper.scrollbar.$dragEl.transition(duration); + }, + updateSize: function updateSize() { + var swiper = this; + if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; } + + var scrollbar = swiper.scrollbar; + var $dragEl = scrollbar.$dragEl; + var $el = scrollbar.$el; + + $dragEl[0].style.width = ''; + $dragEl[0].style.height = ''; + var trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight; + + var divider = swiper.size / swiper.virtualSize; + var moveDivider = divider * (trackSize / swiper.size); + var dragSize; + if (swiper.params.scrollbar.dragSize === 'auto') { + dragSize = trackSize * divider; + } else { + dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); + } + + if (swiper.isHorizontal()) { + $dragEl[0].style.width = dragSize + "px"; + } else { + $dragEl[0].style.height = dragSize + "px"; + } + + if (divider >= 1) { + $el[0].style.display = 'none'; + } else { + $el[0].style.display = ''; + } + if (swiper.params.scrollbar.hide) { + $el[0].style.opacity = 0; + } + Utils.extend(scrollbar, { + trackSize: trackSize, + divider: divider, + moveDivider: moveDivider, + dragSize: dragSize, + }); + scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass); + }, + getPointerPosition: function getPointerPosition(e) { + var swiper = this; + if (swiper.isHorizontal()) { + return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientX : e.clientX); + } + return ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].clientY : e.clientY); + }, + setDragPosition: function setDragPosition(e) { + var swiper = this; + var scrollbar = swiper.scrollbar; + var rtl = swiper.rtlTranslate; + var $el = scrollbar.$el; + var dragSize = scrollbar.dragSize; + var trackSize = scrollbar.trackSize; + var dragStartPos = scrollbar.dragStartPos; + + var positionRatio; + positionRatio = ((scrollbar.getPointerPosition(e)) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] + - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize); + positionRatio = Math.max(Math.min(positionRatio, 1), 0); + if (rtl) { + positionRatio = 1 - positionRatio; + } + + var position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio); + + swiper.updateProgress(position); + swiper.setTranslate(position); + swiper.updateActiveIndex(); + swiper.updateSlidesClasses(); + }, + onDragStart: function onDragStart(e) { + var swiper = this; + var params = swiper.params.scrollbar; + var scrollbar = swiper.scrollbar; + var $wrapperEl = swiper.$wrapperEl; + var $el = scrollbar.$el; + var $dragEl = scrollbar.$dragEl; + swiper.scrollbar.isTouched = true; + swiper.scrollbar.dragStartPos = (e.target === $dragEl[0] || e.target === $dragEl) + ? scrollbar.getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null; + e.preventDefault(); + e.stopPropagation(); + + $wrapperEl.transition(100); + $dragEl.transition(100); + scrollbar.setDragPosition(e); + + clearTimeout(swiper.scrollbar.dragTimeout); + + $el.transition(0); + if (params.hide) { + $el.css('opacity', 1); + } + if (swiper.params.cssMode) { + swiper.$wrapperEl.css('scroll-snap-type', 'none'); + } + swiper.emit('scrollbarDragStart', e); + }, + onDragMove: function onDragMove(e) { + var swiper = this; + var scrollbar = swiper.scrollbar; + var $wrapperEl = swiper.$wrapperEl; + var $el = scrollbar.$el; + var $dragEl = scrollbar.$dragEl; + + if (!swiper.scrollbar.isTouched) { return; } + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + scrollbar.setDragPosition(e); + $wrapperEl.transition(0); + $el.transition(0); + $dragEl.transition(0); + swiper.emit('scrollbarDragMove', e); + }, + onDragEnd: function onDragEnd(e) { + var swiper = this; + + var params = swiper.params.scrollbar; + var scrollbar = swiper.scrollbar; + var $wrapperEl = swiper.$wrapperEl; + var $el = scrollbar.$el; + + if (!swiper.scrollbar.isTouched) { return; } + swiper.scrollbar.isTouched = false; + if (swiper.params.cssMode) { + swiper.$wrapperEl.css('scroll-snap-type', ''); + $wrapperEl.transition(''); + } + if (params.hide) { + clearTimeout(swiper.scrollbar.dragTimeout); + swiper.scrollbar.dragTimeout = Utils.nextTick(function () { + $el.css('opacity', 0); + $el.transition(400); + }, 1000); + } + swiper.emit('scrollbarDragEnd', e); + if (params.snapOnRelease) { + swiper.slideToClosest(); + } + }, + enableDraggable: function enableDraggable() { + var swiper = this; + if (!swiper.params.scrollbar.el) { return; } + var scrollbar = swiper.scrollbar; + var touchEventsTouch = swiper.touchEventsTouch; + var touchEventsDesktop = swiper.touchEventsDesktop; + var params = swiper.params; + var $el = scrollbar.$el; + var target = $el[0]; + var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false; + var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; + if (!Support.touch) { + target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); + doc.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); + doc.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); + } else { + target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener); + target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener); + target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener); + } + }, + disableDraggable: function disableDraggable() { + var swiper = this; + if (!swiper.params.scrollbar.el) { return; } + var scrollbar = swiper.scrollbar; + var touchEventsTouch = swiper.touchEventsTouch; + var touchEventsDesktop = swiper.touchEventsDesktop; + var params = swiper.params; + var $el = scrollbar.$el; + var target = $el[0]; + var activeListener = Support.passiveListener && params.passiveListeners ? { passive: false, capture: false } : false; + var passiveListener = Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false; + if (!Support.touch) { + target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); + doc.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); + doc.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); + } else { + target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener); + target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener); + target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener); + } + }, + init: function init() { + var swiper = this; + if (!swiper.params.scrollbar.el) { return; } + var scrollbar = swiper.scrollbar; + var $swiperEl = swiper.$el; + var params = swiper.params.scrollbar; + + var $el = $(params.el); + if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) { + $el = $swiperEl.find(params.el); + } + + var $dragEl = $el.find(("." + (swiper.params.scrollbar.dragClass))); + if ($dragEl.length === 0) { + $dragEl = $(("
")); + $el.append($dragEl); + } + + Utils.extend(scrollbar, { + $el: $el, + el: $el[0], + $dragEl: $dragEl, + dragEl: $dragEl[0], + }); + + if (params.draggable) { + scrollbar.enableDraggable(); + } + }, + destroy: function destroy() { + var swiper = this; + swiper.scrollbar.disableDraggable(); + }, + }; + + var Scrollbar$1 = { + name: 'scrollbar', + params: { + scrollbar: { + el: null, + dragSize: 'auto', + hide: false, + draggable: false, + snapOnRelease: true, + lockClass: 'swiper-scrollbar-lock', + dragClass: 'swiper-scrollbar-drag', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + scrollbar: { + init: Scrollbar.init.bind(swiper), + destroy: Scrollbar.destroy.bind(swiper), + updateSize: Scrollbar.updateSize.bind(swiper), + setTranslate: Scrollbar.setTranslate.bind(swiper), + setTransition: Scrollbar.setTransition.bind(swiper), + enableDraggable: Scrollbar.enableDraggable.bind(swiper), + disableDraggable: Scrollbar.disableDraggable.bind(swiper), + setDragPosition: Scrollbar.setDragPosition.bind(swiper), + getPointerPosition: Scrollbar.getPointerPosition.bind(swiper), + onDragStart: Scrollbar.onDragStart.bind(swiper), + onDragMove: Scrollbar.onDragMove.bind(swiper), + onDragEnd: Scrollbar.onDragEnd.bind(swiper), + isTouched: false, + timeout: null, + dragTimeout: null, + }, + }); + }, + on: { + init: function init() { + var swiper = this; + swiper.scrollbar.init(); + swiper.scrollbar.updateSize(); + swiper.scrollbar.setTranslate(); + }, + update: function update() { + var swiper = this; + swiper.scrollbar.updateSize(); + }, + resize: function resize() { + var swiper = this; + swiper.scrollbar.updateSize(); + }, + observerUpdate: function observerUpdate() { + var swiper = this; + swiper.scrollbar.updateSize(); + }, + setTranslate: function setTranslate() { + var swiper = this; + swiper.scrollbar.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + swiper.scrollbar.setTransition(duration); + }, + destroy: function destroy() { + var swiper = this; + swiper.scrollbar.destroy(); + }, + }, + }; + + var Parallax = { + setTransform: function setTransform(el, progress) { + var swiper = this; + var rtl = swiper.rtl; + + var $el = $(el); + var rtlFactor = rtl ? -1 : 1; + + var p = $el.attr('data-swiper-parallax') || '0'; + var x = $el.attr('data-swiper-parallax-x'); + var y = $el.attr('data-swiper-parallax-y'); + var scale = $el.attr('data-swiper-parallax-scale'); + var opacity = $el.attr('data-swiper-parallax-opacity'); + + if (x || y) { + x = x || '0'; + y = y || '0'; + } else if (swiper.isHorizontal()) { + x = p; + y = '0'; + } else { + y = p; + x = '0'; + } + + if ((x).indexOf('%') >= 0) { + x = (parseInt(x, 10) * progress * rtlFactor) + "%"; + } else { + x = (x * progress * rtlFactor) + "px"; + } + if ((y).indexOf('%') >= 0) { + y = (parseInt(y, 10) * progress) + "%"; + } else { + y = (y * progress) + "px"; + } + + if (typeof opacity !== 'undefined' && opacity !== null) { + var currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress))); + $el[0].style.opacity = currentOpacity; + } + if (typeof scale === 'undefined' || scale === null) { + $el.transform(("translate3d(" + x + ", " + y + ", 0px)")); + } else { + var currentScale = scale - ((scale - 1) * (1 - Math.abs(progress))); + $el.transform(("translate3d(" + x + ", " + y + ", 0px) scale(" + currentScale + ")")); + } + }, + setTranslate: function setTranslate() { + var swiper = this; + var $el = swiper.$el; + var slides = swiper.slides; + var progress = swiper.progress; + var snapGrid = swiper.snapGrid; + $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]') + .each(function (index, el) { + swiper.parallax.setTransform(el, progress); + }); + slides.each(function (slideIndex, slideEl) { + var slideProgress = slideEl.progress; + if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { + slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1)); + } + slideProgress = Math.min(Math.max(slideProgress, -1), 1); + $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]') + .each(function (index, el) { + swiper.parallax.setTransform(el, slideProgress); + }); + }); + }, + setTransition: function setTransition(duration) { + if ( duration === void 0 ) duration = this.params.speed; + + var swiper = this; + var $el = swiper.$el; + $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]') + .each(function (index, parallaxEl) { + var $parallaxEl = $(parallaxEl); + var parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration; + if (duration === 0) { parallaxDuration = 0; } + $parallaxEl.transition(parallaxDuration); + }); + }, + }; + + var Parallax$1 = { + name: 'parallax', + params: { + parallax: { + enabled: false, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + parallax: { + setTransform: Parallax.setTransform.bind(swiper), + setTranslate: Parallax.setTranslate.bind(swiper), + setTransition: Parallax.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (!swiper.params.parallax.enabled) { return; } + swiper.params.watchSlidesProgress = true; + swiper.originalParams.watchSlidesProgress = true; + }, + init: function init() { + var swiper = this; + if (!swiper.params.parallax.enabled) { return; } + swiper.parallax.setTranslate(); + }, + setTranslate: function setTranslate() { + var swiper = this; + if (!swiper.params.parallax.enabled) { return; } + swiper.parallax.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (!swiper.params.parallax.enabled) { return; } + swiper.parallax.setTransition(duration); + }, + }, + }; + + var Zoom = { + // Calc Scale From Multi-touches + getDistanceBetweenTouches: function getDistanceBetweenTouches(e) { + if (e.targetTouches.length < 2) { return 1; } + var x1 = e.targetTouches[0].pageX; + var y1 = e.targetTouches[0].pageY; + var x2 = e.targetTouches[1].pageX; + var y2 = e.targetTouches[1].pageY; + var distance = Math.sqrt((Math.pow( (x2 - x1), 2 )) + (Math.pow( (y2 - y1), 2 ))); + return distance; + }, + // Events + onGestureStart: function onGestureStart(e) { + var swiper = this; + var params = swiper.params.zoom; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + zoom.fakeGestureTouched = false; + zoom.fakeGestureMoved = false; + if (!Support.gestures) { + if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) { + return; + } + zoom.fakeGestureTouched = true; + gesture.scaleStart = Zoom.getDistanceBetweenTouches(e); + } + if (!gesture.$slideEl || !gesture.$slideEl.length) { + gesture.$slideEl = $(e.target).closest('.swiper-slide'); + if (gesture.$slideEl.length === 0) { gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); } + gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); + gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass))); + gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + if (gesture.$imageWrapEl.length === 0) { + gesture.$imageEl = undefined; + return; + } + } + gesture.$imageEl.transition(0); + swiper.zoom.isScaling = true; + }, + onGestureChange: function onGestureChange(e) { + var swiper = this; + var params = swiper.params.zoom; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + if (!Support.gestures) { + if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) { + return; + } + zoom.fakeGestureMoved = true; + gesture.scaleMove = Zoom.getDistanceBetweenTouches(e); + } + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + if (Support.gestures) { + zoom.scale = e.scale * zoom.currentScale; + } else { + zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale; + } + if (zoom.scale > gesture.maxRatio) { + zoom.scale = (gesture.maxRatio - 1) + (Math.pow( ((zoom.scale - gesture.maxRatio) + 1), 0.5 )); + } + if (zoom.scale < params.minRatio) { + zoom.scale = (params.minRatio + 1) - (Math.pow( ((params.minRatio - zoom.scale) + 1), 0.5 )); + } + gesture.$imageEl.transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")")); + }, + onGestureEnd: function onGestureEnd(e) { + var swiper = this; + var params = swiper.params.zoom; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + if (!Support.gestures) { + if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) { + return; + } + if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) { + return; + } + zoom.fakeGestureTouched = false; + zoom.fakeGestureMoved = false; + } + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); + gesture.$imageEl.transition(swiper.params.speed).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")")); + zoom.currentScale = zoom.scale; + zoom.isScaling = false; + if (zoom.scale === 1) { gesture.$slideEl = undefined; } + }, + onTouchStart: function onTouchStart(e) { + var swiper = this; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + var image = zoom.image; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + if (image.isTouched) { return; } + if (Device.android) { e.preventDefault(); } + image.isTouched = true; + image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; + image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; + }, + onTouchMove: function onTouchMove(e) { + var swiper = this; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + var image = zoom.image; + var velocity = zoom.velocity; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + swiper.allowClick = false; + if (!image.isTouched || !gesture.$slideEl) { return; } + + if (!image.isMoved) { + image.width = gesture.$imageEl[0].offsetWidth; + image.height = gesture.$imageEl[0].offsetHeight; + image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0; + image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0; + gesture.slideWidth = gesture.$slideEl[0].offsetWidth; + gesture.slideHeight = gesture.$slideEl[0].offsetHeight; + gesture.$imageWrapEl.transition(0); + if (swiper.rtl) { + image.startX = -image.startX; + image.startY = -image.startY; + } + } + // Define if we need image drag + var scaledWidth = image.width * zoom.scale; + var scaledHeight = image.height * zoom.scale; + + if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) { return; } + + image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0); + image.maxX = -image.minX; + image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0); + image.maxY = -image.minY; + + image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; + image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; + + if (!image.isMoved && !zoom.isScaling) { + if ( + swiper.isHorizontal() + && ( + (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x) + || (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x) + ) + ) { + image.isTouched = false; + return; + } if ( + !swiper.isHorizontal() + && ( + (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y) + || (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y) + ) + ) { + image.isTouched = false; + return; + } + } + e.preventDefault(); + e.stopPropagation(); + + image.isMoved = true; + image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX; + image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY; + + if (image.currentX < image.minX) { + image.currentX = (image.minX + 1) - (Math.pow( ((image.minX - image.currentX) + 1), 0.8 )); + } + if (image.currentX > image.maxX) { + image.currentX = (image.maxX - 1) + (Math.pow( ((image.currentX - image.maxX) + 1), 0.8 )); + } + + if (image.currentY < image.minY) { + image.currentY = (image.minY + 1) - (Math.pow( ((image.minY - image.currentY) + 1), 0.8 )); + } + if (image.currentY > image.maxY) { + image.currentY = (image.maxY - 1) + (Math.pow( ((image.currentY - image.maxY) + 1), 0.8 )); + } + + // Velocity + if (!velocity.prevPositionX) { velocity.prevPositionX = image.touchesCurrent.x; } + if (!velocity.prevPositionY) { velocity.prevPositionY = image.touchesCurrent.y; } + if (!velocity.prevTime) { velocity.prevTime = Date.now(); } + velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; + velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; + if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) { velocity.x = 0; } + if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) { velocity.y = 0; } + velocity.prevPositionX = image.touchesCurrent.x; + velocity.prevPositionY = image.touchesCurrent.y; + velocity.prevTime = Date.now(); + + gesture.$imageWrapEl.transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)")); + }, + onTouchEnd: function onTouchEnd() { + var swiper = this; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + var image = zoom.image; + var velocity = zoom.velocity; + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + if (!image.isTouched || !image.isMoved) { + image.isTouched = false; + image.isMoved = false; + return; + } + image.isTouched = false; + image.isMoved = false; + var momentumDurationX = 300; + var momentumDurationY = 300; + var momentumDistanceX = velocity.x * momentumDurationX; + var newPositionX = image.currentX + momentumDistanceX; + var momentumDistanceY = velocity.y * momentumDurationY; + var newPositionY = image.currentY + momentumDistanceY; + + // Fix duration + if (velocity.x !== 0) { momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); } + if (velocity.y !== 0) { momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); } + var momentumDuration = Math.max(momentumDurationX, momentumDurationY); + + image.currentX = newPositionX; + image.currentY = newPositionY; + + // Define if we need image drag + var scaledWidth = image.width * zoom.scale; + var scaledHeight = image.height * zoom.scale; + image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0); + image.maxX = -image.minX; + image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0); + image.maxY = -image.minY; + image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); + image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); + + gesture.$imageWrapEl.transition(momentumDuration).transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)")); + }, + onTransitionEnd: function onTransitionEnd() { + var swiper = this; + var zoom = swiper.zoom; + var gesture = zoom.gesture; + if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) { + gesture.$imageEl.transform('translate3d(0,0,0) scale(1)'); + gesture.$imageWrapEl.transform('translate3d(0,0,0)'); + + zoom.scale = 1; + zoom.currentScale = 1; + + gesture.$slideEl = undefined; + gesture.$imageEl = undefined; + gesture.$imageWrapEl = undefined; + } + }, + // Toggle Zoom + toggle: function toggle(e) { + var swiper = this; + var zoom = swiper.zoom; + + if (zoom.scale && zoom.scale !== 1) { + // Zoom Out + zoom.out(); + } else { + // Zoom In + zoom.in(e); + } + }, + in: function in$1(e) { + var swiper = this; + + var zoom = swiper.zoom; + var params = swiper.params.zoom; + var gesture = zoom.gesture; + var image = zoom.image; + + if (!gesture.$slideEl) { + gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex); + gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); + gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass))); + } + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + + gesture.$slideEl.addClass(("" + (params.zoomedSlideClass))); + + var touchX; + var touchY; + var offsetX; + var offsetY; + var diffX; + var diffY; + var translateX; + var translateY; + var imageWidth; + var imageHeight; + var scaledWidth; + var scaledHeight; + var translateMinX; + var translateMinY; + var translateMaxX; + var translateMaxY; + var slideWidth; + var slideHeight; + + if (typeof image.touchesStart.x === 'undefined' && e) { + touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; + touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; + } else { + touchX = image.touchesStart.x; + touchY = image.touchesStart.y; + } + + zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; + if (e) { + slideWidth = gesture.$slideEl[0].offsetWidth; + slideHeight = gesture.$slideEl[0].offsetHeight; + offsetX = gesture.$slideEl.offset().left; + offsetY = gesture.$slideEl.offset().top; + diffX = (offsetX + (slideWidth / 2)) - touchX; + diffY = (offsetY + (slideHeight / 2)) - touchY; + + imageWidth = gesture.$imageEl[0].offsetWidth; + imageHeight = gesture.$imageEl[0].offsetHeight; + scaledWidth = imageWidth * zoom.scale; + scaledHeight = imageHeight * zoom.scale; + + translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0); + translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0); + translateMaxX = -translateMinX; + translateMaxY = -translateMinY; + + translateX = diffX * zoom.scale; + translateY = diffY * zoom.scale; + + if (translateX < translateMinX) { + translateX = translateMinX; + } + if (translateX > translateMaxX) { + translateX = translateMaxX; + } + + if (translateY < translateMinY) { + translateY = translateMinY; + } + if (translateY > translateMaxY) { + translateY = translateMaxY; + } + } else { + translateX = 0; + translateY = 0; + } + gesture.$imageWrapEl.transition(300).transform(("translate3d(" + translateX + "px, " + translateY + "px,0)")); + gesture.$imageEl.transition(300).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")")); + }, + out: function out() { + var swiper = this; + + var zoom = swiper.zoom; + var params = swiper.params.zoom; + var gesture = zoom.gesture; + + if (!gesture.$slideEl) { + gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex); + gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas'); + gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass))); + } + if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; } + + zoom.scale = 1; + zoom.currentScale = 1; + gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)'); + gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)'); + gesture.$slideEl.removeClass(("" + (params.zoomedSlideClass))); + gesture.$slideEl = undefined; + }, + // Attach/Detach Events + enable: function enable() { + var swiper = this; + var zoom = swiper.zoom; + if (zoom.enabled) { return; } + zoom.enabled = true; + + var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false; + var activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true; + + // Scale image + if (Support.gestures) { + swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener); + swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener); + swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener); + } else if (swiper.touchEvents.start === 'touchstart') { + swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener); + swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, activeListenerWithCapture); + swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener); + if (swiper.touchEvents.cancel) { + swiper.$wrapperEl.on(swiper.touchEvents.cancel, '.swiper-slide', zoom.onGestureEnd, passiveListener); + } + } + + // Move image + swiper.$wrapperEl.on(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove, activeListenerWithCapture); + }, + disable: function disable() { + var swiper = this; + var zoom = swiper.zoom; + if (!zoom.enabled) { return; } + + swiper.zoom.enabled = false; + + var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false; + var activeListenerWithCapture = Support.passiveListener ? { passive: false, capture: true } : true; + + // Scale image + if (Support.gestures) { + swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener); + swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener); + swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener); + } else if (swiper.touchEvents.start === 'touchstart') { + swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener); + swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, activeListenerWithCapture); + swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener); + if (swiper.touchEvents.cancel) { + swiper.$wrapperEl.off(swiper.touchEvents.cancel, '.swiper-slide', zoom.onGestureEnd, passiveListener); + } + } + + // Move image + swiper.$wrapperEl.off(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove, activeListenerWithCapture); + }, + }; + + var Zoom$1 = { + name: 'zoom', + params: { + zoom: { + enabled: false, + maxRatio: 3, + minRatio: 1, + toggle: true, + containerClass: 'swiper-zoom-container', + zoomedSlideClass: 'swiper-slide-zoomed', + }, + }, + create: function create() { + var swiper = this; + var zoom = { + enabled: false, + scale: 1, + currentScale: 1, + isScaling: false, + gesture: { + $slideEl: undefined, + slideWidth: undefined, + slideHeight: undefined, + $imageEl: undefined, + $imageWrapEl: undefined, + maxRatio: 3, + }, + image: { + isTouched: undefined, + isMoved: undefined, + currentX: undefined, + currentY: undefined, + minX: undefined, + minY: undefined, + maxX: undefined, + maxY: undefined, + width: undefined, + height: undefined, + startX: undefined, + startY: undefined, + touchesStart: {}, + touchesCurrent: {}, + }, + velocity: { + x: undefined, + y: undefined, + prevPositionX: undefined, + prevPositionY: undefined, + prevTime: undefined, + }, + }; + + ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach(function (methodName) { + zoom[methodName] = Zoom[methodName].bind(swiper); + }); + Utils.extend(swiper, { + zoom: zoom, + }); + + var scale = 1; + Object.defineProperty(swiper.zoom, 'scale', { + get: function get() { + return scale; + }, + set: function set(value) { + if (scale !== value) { + var imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined; + var slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined; + swiper.emit('zoomChange', value, imageEl, slideEl); + } + scale = value; + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.zoom.enabled) { + swiper.zoom.enable(); + } + }, + destroy: function destroy() { + var swiper = this; + swiper.zoom.disable(); + }, + touchStart: function touchStart(e) { + var swiper = this; + if (!swiper.zoom.enabled) { return; } + swiper.zoom.onTouchStart(e); + }, + touchEnd: function touchEnd(e) { + var swiper = this; + if (!swiper.zoom.enabled) { return; } + swiper.zoom.onTouchEnd(e); + }, + doubleTap: function doubleTap(e) { + var swiper = this; + if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { + swiper.zoom.toggle(e); + } + }, + transitionEnd: function transitionEnd() { + var swiper = this; + if (swiper.zoom.enabled && swiper.params.zoom.enabled) { + swiper.zoom.onTransitionEnd(); + } + }, + slideChange: function slideChange() { + var swiper = this; + if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) { + swiper.zoom.onTransitionEnd(); + } + }, + }, + }; + + var Lazy = { + loadInSlide: function loadInSlide(index, loadInDuplicate) { + if ( loadInDuplicate === void 0 ) loadInDuplicate = true; + + var swiper = this; + var params = swiper.params.lazy; + if (typeof index === 'undefined') { return; } + if (swiper.slides.length === 0) { return; } + var isVirtual = swiper.virtual && swiper.params.virtual.enabled; + + var $slideEl = isVirtual + ? swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")) + : swiper.slides.eq(index); + + var $images = $slideEl.find(("." + (params.elementClass) + ":not(." + (params.loadedClass) + "):not(." + (params.loadingClass) + ")")); + if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) { + $images = $images.add($slideEl[0]); + } + if ($images.length === 0) { return; } + + $images.each(function (imageIndex, imageEl) { + var $imageEl = $(imageEl); + $imageEl.addClass(params.loadingClass); + + var background = $imageEl.attr('data-background'); + var src = $imageEl.attr('data-src'); + var srcset = $imageEl.attr('data-srcset'); + var sizes = $imageEl.attr('data-sizes'); + + swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, function () { + if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) { return; } + if (background) { + $imageEl.css('background-image', ("url(\"" + background + "\")")); + $imageEl.removeAttr('data-background'); + } else { + if (srcset) { + $imageEl.attr('srcset', srcset); + $imageEl.removeAttr('data-srcset'); + } + if (sizes) { + $imageEl.attr('sizes', sizes); + $imageEl.removeAttr('data-sizes'); + } + if (src) { + $imageEl.attr('src', src); + $imageEl.removeAttr('data-src'); + } + } + + $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass); + $slideEl.find(("." + (params.preloaderClass))).remove(); + if (swiper.params.loop && loadInDuplicate) { + var slideOriginalIndex = $slideEl.attr('data-swiper-slide-index'); + if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) { + var originalSlide = swiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]:not(." + (swiper.params.slideDuplicateClass) + ")")); + swiper.lazy.loadInSlide(originalSlide.index(), false); + } else { + var duplicatedSlide = swiper.$wrapperEl.children(("." + (swiper.params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]")); + swiper.lazy.loadInSlide(duplicatedSlide.index(), false); + } + } + swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]); + }); + + swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]); + }); + }, + load: function load() { + var swiper = this; + var $wrapperEl = swiper.$wrapperEl; + var swiperParams = swiper.params; + var slides = swiper.slides; + var activeIndex = swiper.activeIndex; + var isVirtual = swiper.virtual && swiperParams.virtual.enabled; + var params = swiperParams.lazy; + + var slidesPerView = swiperParams.slidesPerView; + if (slidesPerView === 'auto') { + slidesPerView = 0; + } + + function slideExist(index) { + if (isVirtual) { + if ($wrapperEl.children(("." + (swiperParams.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")).length) { + return true; + } + } else if (slides[index]) { return true; } + return false; + } + function slideIndex(slideEl) { + if (isVirtual) { + return $(slideEl).attr('data-swiper-slide-index'); + } + return $(slideEl).index(); + } + + if (!swiper.lazy.initialImageLoaded) { swiper.lazy.initialImageLoaded = true; } + if (swiper.params.watchSlidesVisibility) { + $wrapperEl.children(("." + (swiperParams.slideVisibleClass))).each(function (elIndex, slideEl) { + var index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index(); + swiper.lazy.loadInSlide(index); + }); + } else if (slidesPerView > 1) { + for (var i = activeIndex; i < activeIndex + slidesPerView; i += 1) { + if (slideExist(i)) { swiper.lazy.loadInSlide(i); } + } + } else { + swiper.lazy.loadInSlide(activeIndex); + } + if (params.loadPrevNext) { + if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) { + var amount = params.loadPrevNextAmount; + var spv = slidesPerView; + var maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length); + var minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); + // Next Slides + for (var i$1 = activeIndex + slidesPerView; i$1 < maxIndex; i$1 += 1) { + if (slideExist(i$1)) { swiper.lazy.loadInSlide(i$1); } + } + // Prev Slides + for (var i$2 = minIndex; i$2 < activeIndex; i$2 += 1) { + if (slideExist(i$2)) { swiper.lazy.loadInSlide(i$2); } + } + } else { + var nextSlide = $wrapperEl.children(("." + (swiperParams.slideNextClass))); + if (nextSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(nextSlide)); } + + var prevSlide = $wrapperEl.children(("." + (swiperParams.slidePrevClass))); + if (prevSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(prevSlide)); } + } + } + }, + }; + + var Lazy$1 = { + name: 'lazy', + params: { + lazy: { + enabled: false, + loadPrevNext: false, + loadPrevNextAmount: 1, + loadOnTransitionStart: false, + + elementClass: 'swiper-lazy', + loadingClass: 'swiper-lazy-loading', + loadedClass: 'swiper-lazy-loaded', + preloaderClass: 'swiper-lazy-preloader', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + lazy: { + initialImageLoaded: false, + load: Lazy.load.bind(swiper), + loadInSlide: Lazy.loadInSlide.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.lazy.enabled && swiper.params.preloadImages) { + swiper.params.preloadImages = false; + } + }, + init: function init() { + var swiper = this; + if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) { + swiper.lazy.load(); + } + }, + scroll: function scroll() { + var swiper = this; + if (swiper.params.freeMode && !swiper.params.freeModeSticky) { + swiper.lazy.load(); + } + }, + resize: function resize() { + var swiper = this; + if (swiper.params.lazy.enabled) { + swiper.lazy.load(); + } + }, + scrollbarDragMove: function scrollbarDragMove() { + var swiper = this; + if (swiper.params.lazy.enabled) { + swiper.lazy.load(); + } + }, + transitionStart: function transitionStart() { + var swiper = this; + if (swiper.params.lazy.enabled) { + if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) { + swiper.lazy.load(); + } + } + }, + transitionEnd: function transitionEnd() { + var swiper = this; + if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) { + swiper.lazy.load(); + } + }, + slideChange: function slideChange() { + var swiper = this; + if (swiper.params.lazy.enabled && swiper.params.cssMode) { + swiper.lazy.load(); + } + }, + }, + }; + + /* eslint no-bitwise: ["error", { "allow": [">>"] }] */ + + var Controller = { + LinearSpline: function LinearSpline(x, y) { + var binarySearch = (function search() { + var maxIndex; + var minIndex; + var guess; + return function (array, val) { + minIndex = -1; + maxIndex = array.length; + while (maxIndex - minIndex > 1) { + guess = maxIndex + minIndex >> 1; + if (array[guess] <= val) { + minIndex = guess; + } else { + maxIndex = guess; + } + } + return maxIndex; + }; + }()); + this.x = x; + this.y = y; + this.lastIndex = x.length - 1; + // Given an x value (x2), return the expected y2 value: + // (x1,y1) is the known point before given value, + // (x3,y3) is the known point after given value. + var i1; + var i3; + + this.interpolate = function interpolate(x2) { + if (!x2) { return 0; } + + // Get the indexes of x1 and x3 (the array indexes before and after given x2): + i3 = binarySearch(this.x, x2); + i1 = i3 - 1; + + // We have our indexes i1 & i3, so we can calculate already: + // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 + return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1]; + }; + return this; + }, + // xxx: for now i will just save one spline function to to + getInterpolateFunction: function getInterpolateFunction(c) { + var swiper = this; + if (!swiper.controller.spline) { + swiper.controller.spline = swiper.params.loop + ? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid) + : new Controller.LinearSpline(swiper.snapGrid, c.snapGrid); + } + }, + setTranslate: function setTranslate(setTranslate$1, byController) { + var swiper = this; + var controlled = swiper.controller.control; + var multiplier; + var controlledTranslate; + function setControlledTranslate(c) { + // this will create an Interpolate function based on the snapGrids + // x is the Grid of the scrolled scroller and y will be the controlled scroller + // it makes sense to create this only once and recall it for the interpolation + // the function does a lot of value caching for performance + var translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; + if (swiper.params.controller.by === 'slide') { + swiper.controller.getInterpolateFunction(c); + // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid + // but it did not work out + controlledTranslate = -swiper.controller.spline.interpolate(-translate); + } + + if (!controlledTranslate || swiper.params.controller.by === 'container') { + multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); + controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate(); + } + + if (swiper.params.controller.inverse) { + controlledTranslate = c.maxTranslate() - controlledTranslate; + } + c.updateProgress(controlledTranslate); + c.setTranslate(controlledTranslate, swiper); + c.updateActiveIndex(); + c.updateSlidesClasses(); + } + if (Array.isArray(controlled)) { + for (var i = 0; i < controlled.length; i += 1) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTranslate(controlled[i]); + } + } + } else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTranslate(controlled); + } + }, + setTransition: function setTransition(duration, byController) { + var swiper = this; + var controlled = swiper.controller.control; + var i; + function setControlledTransition(c) { + c.setTransition(duration, swiper); + if (duration !== 0) { + c.transitionStart(); + if (c.params.autoHeight) { + Utils.nextTick(function () { + c.updateAutoHeight(); + }); + } + c.$wrapperEl.transitionEnd(function () { + if (!controlled) { return; } + if (c.params.loop && swiper.params.controller.by === 'slide') { + c.loopFix(); + } + c.transitionEnd(); + }); + } + } + if (Array.isArray(controlled)) { + for (i = 0; i < controlled.length; i += 1) { + if (controlled[i] !== byController && controlled[i] instanceof Swiper) { + setControlledTransition(controlled[i]); + } + } + } else if (controlled instanceof Swiper && byController !== controlled) { + setControlledTransition(controlled); + } + }, + }; + var Controller$1 = { + name: 'controller', + params: { + controller: { + control: undefined, + inverse: false, + by: 'slide', // or 'container' + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + controller: { + control: swiper.params.controller.control, + getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper), + setTranslate: Controller.setTranslate.bind(swiper), + setTransition: Controller.setTransition.bind(swiper), + }, + }); + }, + on: { + update: function update() { + var swiper = this; + if (!swiper.controller.control) { return; } + if (swiper.controller.spline) { + swiper.controller.spline = undefined; + delete swiper.controller.spline; + } + }, + resize: function resize() { + var swiper = this; + if (!swiper.controller.control) { return; } + if (swiper.controller.spline) { + swiper.controller.spline = undefined; + delete swiper.controller.spline; + } + }, + observerUpdate: function observerUpdate() { + var swiper = this; + if (!swiper.controller.control) { return; } + if (swiper.controller.spline) { + swiper.controller.spline = undefined; + delete swiper.controller.spline; + } + }, + setTranslate: function setTranslate(translate, byController) { + var swiper = this; + if (!swiper.controller.control) { return; } + swiper.controller.setTranslate(translate, byController); + }, + setTransition: function setTransition(duration, byController) { + var swiper = this; + if (!swiper.controller.control) { return; } + swiper.controller.setTransition(duration, byController); + }, + }, + }; + + var a11y = { + makeElFocusable: function makeElFocusable($el) { + $el.attr('tabIndex', '0'); + return $el; + }, + addElRole: function addElRole($el, role) { + $el.attr('role', role); + return $el; + }, + addElLabel: function addElLabel($el, label) { + $el.attr('aria-label', label); + return $el; + }, + disableEl: function disableEl($el) { + $el.attr('aria-disabled', true); + return $el; + }, + enableEl: function enableEl($el) { + $el.attr('aria-disabled', false); + return $el; + }, + onEnterKey: function onEnterKey(e) { + var swiper = this; + var params = swiper.params.a11y; + if (e.keyCode !== 13) { return; } + var $targetEl = $(e.target); + if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) { + if (!(swiper.isEnd && !swiper.params.loop)) { + swiper.slideNext(); + } + if (swiper.isEnd) { + swiper.a11y.notify(params.lastSlideMessage); + } else { + swiper.a11y.notify(params.nextSlideMessage); + } + } + if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) { + if (!(swiper.isBeginning && !swiper.params.loop)) { + swiper.slidePrev(); + } + if (swiper.isBeginning) { + swiper.a11y.notify(params.firstSlideMessage); + } else { + swiper.a11y.notify(params.prevSlideMessage); + } + } + if (swiper.pagination && $targetEl.is(("." + (swiper.params.pagination.bulletClass)))) { + $targetEl[0].click(); + } + }, + notify: function notify(message) { + var swiper = this; + var notification = swiper.a11y.liveRegion; + if (notification.length === 0) { return; } + notification.html(''); + notification.html(message); + }, + updateNavigation: function updateNavigation() { + var swiper = this; + + if (swiper.params.loop || !swiper.navigation) { return; } + var ref = swiper.navigation; + var $nextEl = ref.$nextEl; + var $prevEl = ref.$prevEl; + + if ($prevEl && $prevEl.length > 0) { + if (swiper.isBeginning) { + swiper.a11y.disableEl($prevEl); + } else { + swiper.a11y.enableEl($prevEl); + } + } + if ($nextEl && $nextEl.length > 0) { + if (swiper.isEnd) { + swiper.a11y.disableEl($nextEl); + } else { + swiper.a11y.enableEl($nextEl); + } + } + }, + updatePagination: function updatePagination() { + var swiper = this; + var params = swiper.params.a11y; + if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { + swiper.pagination.bullets.each(function (bulletIndex, bulletEl) { + var $bulletEl = $(bulletEl); + swiper.a11y.makeElFocusable($bulletEl); + swiper.a11y.addElRole($bulletEl, 'button'); + swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1)); + }); + } + }, + init: function init() { + var swiper = this; + + swiper.$el.append(swiper.a11y.liveRegion); + + // Navigation + var params = swiper.params.a11y; + var $nextEl; + var $prevEl; + if (swiper.navigation && swiper.navigation.$nextEl) { + $nextEl = swiper.navigation.$nextEl; + } + if (swiper.navigation && swiper.navigation.$prevEl) { + $prevEl = swiper.navigation.$prevEl; + } + if ($nextEl) { + swiper.a11y.makeElFocusable($nextEl); + swiper.a11y.addElRole($nextEl, 'button'); + swiper.a11y.addElLabel($nextEl, params.nextSlideMessage); + $nextEl.on('keydown', swiper.a11y.onEnterKey); + } + if ($prevEl) { + swiper.a11y.makeElFocusable($prevEl); + swiper.a11y.addElRole($prevEl, 'button'); + swiper.a11y.addElLabel($prevEl, params.prevSlideMessage); + $prevEl.on('keydown', swiper.a11y.onEnterKey); + } + + // Pagination + if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { + swiper.pagination.$el.on('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) { swiper.a11y.liveRegion.remove(); } + + var $nextEl; + var $prevEl; + if (swiper.navigation && swiper.navigation.$nextEl) { + $nextEl = swiper.navigation.$nextEl; + } + if (swiper.navigation && swiper.navigation.$prevEl) { + $prevEl = swiper.navigation.$prevEl; + } + if ($nextEl) { + $nextEl.off('keydown', swiper.a11y.onEnterKey); + } + if ($prevEl) { + $prevEl.off('keydown', swiper.a11y.onEnterKey); + } + + // Pagination + if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { + swiper.pagination.$el.off('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey); + } + }, + }; + var A11y = { + name: 'a11y', + params: { + a11y: { + enabled: true, + notificationClass: 'swiper-notification', + prevSlideMessage: 'Previous slide', + nextSlideMessage: 'Next slide', + firstSlideMessage: 'This is the first slide', + lastSlideMessage: 'This is the last slide', + paginationBulletMessage: 'Go to slide {{index}}', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + a11y: { + liveRegion: $(("")), + }, + }); + Object.keys(a11y).forEach(function (methodName) { + swiper.a11y[methodName] = a11y[methodName].bind(swiper); + }); + }, + on: { + init: function init() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.init(); + swiper.a11y.updateNavigation(); + }, + toEdge: function toEdge() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.updateNavigation(); + }, + fromEdge: function fromEdge() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.updateNavigation(); + }, + paginationUpdate: function paginationUpdate() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.updatePagination(); + }, + destroy: function destroy() { + var swiper = this; + if (!swiper.params.a11y.enabled) { return; } + swiper.a11y.destroy(); + }, + }, + }; + + var History = { + init: function init() { + var swiper = this; + if (!swiper.params.history) { return; } + if (!win.history || !win.history.pushState) { + swiper.params.history.enabled = false; + swiper.params.hashNavigation.enabled = true; + return; + } + var history = swiper.history; + history.initialized = true; + history.paths = History.getPathValues(); + if (!history.paths.key && !history.paths.value) { return; } + history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit); + if (!swiper.params.history.replaceState) { + win.addEventListener('popstate', swiper.history.setHistoryPopState); + } + }, + destroy: function destroy() { + var swiper = this; + if (!swiper.params.history.replaceState) { + win.removeEventListener('popstate', swiper.history.setHistoryPopState); + } + }, + setHistoryPopState: function setHistoryPopState() { + var swiper = this; + swiper.history.paths = History.getPathValues(); + swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false); + }, + getPathValues: function getPathValues() { + var pathArray = win.location.pathname.slice(1).split('/').filter(function (part) { return part !== ''; }); + var total = pathArray.length; + var key = pathArray[total - 2]; + var value = pathArray[total - 1]; + return { key: key, value: value }; + }, + setHistory: function setHistory(key, index) { + var swiper = this; + if (!swiper.history.initialized || !swiper.params.history.enabled) { return; } + var slide = swiper.slides.eq(index); + var value = History.slugify(slide.attr('data-history')); + if (!win.location.pathname.includes(key)) { + value = key + "/" + value; + } + var currentState = win.history.state; + if (currentState && currentState.value === value) { + return; + } + if (swiper.params.history.replaceState) { + win.history.replaceState({ value: value }, null, value); + } else { + win.history.pushState({ value: value }, null, value); + } + }, + slugify: function slugify(text) { + return text.toString() + .replace(/\s+/g, '-') + .replace(/[^\w-]+/g, '') + .replace(/--+/g, '-') + .replace(/^-+/, '') + .replace(/-+$/, ''); + }, + scrollToSlide: function scrollToSlide(speed, value, runCallbacks) { + var swiper = this; + if (value) { + for (var i = 0, length = swiper.slides.length; i < length; i += 1) { + var slide = swiper.slides.eq(i); + var slideHistory = History.slugify(slide.attr('data-history')); + if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) { + var index = slide.index(); + swiper.slideTo(index, speed, runCallbacks); + } + } + } else { + swiper.slideTo(0, speed, runCallbacks); + } + }, + }; + + var History$1 = { + name: 'history', + params: { + history: { + enabled: false, + replaceState: false, + key: 'slides', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + history: { + init: History.init.bind(swiper), + setHistory: History.setHistory.bind(swiper), + setHistoryPopState: History.setHistoryPopState.bind(swiper), + scrollToSlide: History.scrollToSlide.bind(swiper), + destroy: History.destroy.bind(swiper), + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.history.enabled) { + swiper.history.init(); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.params.history.enabled) { + swiper.history.destroy(); + } + }, + transitionEnd: function transitionEnd() { + var swiper = this; + if (swiper.history.initialized) { + swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex); + } + }, + slideChange: function slideChange() { + var swiper = this; + if (swiper.history.initialized && swiper.params.cssMode) { + swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex); + } + }, + }, + }; + + var HashNavigation = { + onHashCange: function onHashCange() { + var swiper = this; + var newHash = doc.location.hash.replace('#', ''); + var activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash'); + if (newHash !== activeSlideHash) { + var newIndex = swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-hash=\"" + newHash + "\"]")).index(); + if (typeof newIndex === 'undefined') { return; } + swiper.slideTo(newIndex); + } + }, + setHash: function setHash() { + var swiper = this; + if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) { return; } + if (swiper.params.hashNavigation.replaceState && win.history && win.history.replaceState) { + win.history.replaceState(null, null, (("#" + (swiper.slides.eq(swiper.activeIndex).attr('data-hash'))) || '')); + } else { + var slide = swiper.slides.eq(swiper.activeIndex); + var hash = slide.attr('data-hash') || slide.attr('data-history'); + doc.location.hash = hash || ''; + } + }, + init: function init() { + var swiper = this; + if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) { return; } + swiper.hashNavigation.initialized = true; + var hash = doc.location.hash.replace('#', ''); + if (hash) { + var speed = 0; + for (var i = 0, length = swiper.slides.length; i < length; i += 1) { + var slide = swiper.slides.eq(i); + var slideHash = slide.attr('data-hash') || slide.attr('data-history'); + if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) { + var index = slide.index(); + swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true); + } + } + } + if (swiper.params.hashNavigation.watchState) { + $(win).on('hashchange', swiper.hashNavigation.onHashCange); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.params.hashNavigation.watchState) { + $(win).off('hashchange', swiper.hashNavigation.onHashCange); + } + }, + }; + var HashNavigation$1 = { + name: 'hash-navigation', + params: { + hashNavigation: { + enabled: false, + replaceState: false, + watchState: false, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + hashNavigation: { + initialized: false, + init: HashNavigation.init.bind(swiper), + destroy: HashNavigation.destroy.bind(swiper), + setHash: HashNavigation.setHash.bind(swiper), + onHashCange: HashNavigation.onHashCange.bind(swiper), + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.hashNavigation.enabled) { + swiper.hashNavigation.init(); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.params.hashNavigation.enabled) { + swiper.hashNavigation.destroy(); + } + }, + transitionEnd: function transitionEnd() { + var swiper = this; + if (swiper.hashNavigation.initialized) { + swiper.hashNavigation.setHash(); + } + }, + slideChange: function slideChange() { + var swiper = this; + if (swiper.hashNavigation.initialized && swiper.params.cssMode) { + swiper.hashNavigation.setHash(); + } + }, + }, + }; + + /* eslint no-underscore-dangle: "off" */ + + var Autoplay = { + run: function run() { + var swiper = this; + var $activeSlideEl = swiper.slides.eq(swiper.activeIndex); + var delay = swiper.params.autoplay.delay; + if ($activeSlideEl.attr('data-swiper-autoplay')) { + delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay; + } + clearTimeout(swiper.autoplay.timeout); + swiper.autoplay.timeout = Utils.nextTick(function () { + if (swiper.params.autoplay.reverseDirection) { + if (swiper.params.loop) { + swiper.loopFix(); + swiper.slidePrev(swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else if (!swiper.isBeginning) { + swiper.slidePrev(swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else if (!swiper.params.autoplay.stopOnLastSlide) { + swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else { + swiper.autoplay.stop(); + } + } else if (swiper.params.loop) { + swiper.loopFix(); + swiper.slideNext(swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else if (!swiper.isEnd) { + swiper.slideNext(swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else if (!swiper.params.autoplay.stopOnLastSlide) { + swiper.slideTo(0, swiper.params.speed, true, true); + swiper.emit('autoplay'); + } else { + swiper.autoplay.stop(); + } + if (swiper.params.cssMode && swiper.autoplay.running) { swiper.autoplay.run(); } + }, delay); + }, + start: function start() { + var swiper = this; + if (typeof swiper.autoplay.timeout !== 'undefined') { return false; } + if (swiper.autoplay.running) { return false; } + swiper.autoplay.running = true; + swiper.emit('autoplayStart'); + swiper.autoplay.run(); + return true; + }, + stop: function stop() { + var swiper = this; + if (!swiper.autoplay.running) { return false; } + if (typeof swiper.autoplay.timeout === 'undefined') { return false; } + + if (swiper.autoplay.timeout) { + clearTimeout(swiper.autoplay.timeout); + swiper.autoplay.timeout = undefined; + } + swiper.autoplay.running = false; + swiper.emit('autoplayStop'); + return true; + }, + pause: function pause(speed) { + var swiper = this; + if (!swiper.autoplay.running) { return; } + if (swiper.autoplay.paused) { return; } + if (swiper.autoplay.timeout) { clearTimeout(swiper.autoplay.timeout); } + swiper.autoplay.paused = true; + if (speed === 0 || !swiper.params.autoplay.waitForTransition) { + swiper.autoplay.paused = false; + swiper.autoplay.run(); + } else { + swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd); + swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd); + } + }, + }; + + var Autoplay$1 = { + name: 'autoplay', + params: { + autoplay: { + enabled: false, + delay: 3000, + waitForTransition: true, + disableOnInteraction: true, + stopOnLastSlide: false, + reverseDirection: false, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + autoplay: { + running: false, + paused: false, + run: Autoplay.run.bind(swiper), + start: Autoplay.start.bind(swiper), + stop: Autoplay.stop.bind(swiper), + pause: Autoplay.pause.bind(swiper), + onVisibilityChange: function onVisibilityChange() { + if (document.visibilityState === 'hidden' && swiper.autoplay.running) { + swiper.autoplay.pause(); + } + if (document.visibilityState === 'visible' && swiper.autoplay.paused) { + swiper.autoplay.run(); + swiper.autoplay.paused = false; + } + }, + onTransitionEnd: function onTransitionEnd(e) { + if (!swiper || swiper.destroyed || !swiper.$wrapperEl) { return; } + if (e.target !== this) { return; } + swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd); + swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd); + swiper.autoplay.paused = false; + if (!swiper.autoplay.running) { + swiper.autoplay.stop(); + } else { + swiper.autoplay.run(); + } + }, + }, + }); + }, + on: { + init: function init() { + var swiper = this; + if (swiper.params.autoplay.enabled) { + swiper.autoplay.start(); + document.addEventListener('visibilitychange', swiper.autoplay.onVisibilityChange); + } + }, + beforeTransitionStart: function beforeTransitionStart(speed, internal) { + var swiper = this; + if (swiper.autoplay.running) { + if (internal || !swiper.params.autoplay.disableOnInteraction) { + swiper.autoplay.pause(speed); + } else { + swiper.autoplay.stop(); + } + } + }, + sliderFirstMove: function sliderFirstMove() { + var swiper = this; + if (swiper.autoplay.running) { + if (swiper.params.autoplay.disableOnInteraction) { + swiper.autoplay.stop(); + } else { + swiper.autoplay.pause(); + } + } + }, + touchEnd: function touchEnd() { + var swiper = this; + if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) { + swiper.autoplay.run(); + } + }, + destroy: function destroy() { + var swiper = this; + if (swiper.autoplay.running) { + swiper.autoplay.stop(); + } + document.removeEventListener('visibilitychange', swiper.autoplay.onVisibilityChange); + }, + }, + }; + + var Fade = { + setTranslate: function setTranslate() { + var swiper = this; + var slides = swiper.slides; + for (var i = 0; i < slides.length; i += 1) { + var $slideEl = swiper.slides.eq(i); + var offset = $slideEl[0].swiperSlideOffset; + var tx = -offset; + if (!swiper.params.virtualTranslate) { tx -= swiper.translate; } + var ty = 0; + if (!swiper.isHorizontal()) { + ty = tx; + tx = 0; + } + var slideOpacity = swiper.params.fadeEffect.crossFade + ? Math.max(1 - Math.abs($slideEl[0].progress), 0) + : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0); + $slideEl + .css({ + opacity: slideOpacity, + }) + .transform(("translate3d(" + tx + "px, " + ty + "px, 0px)")); + } + }, + setTransition: function setTransition(duration) { + var swiper = this; + var slides = swiper.slides; + var $wrapperEl = swiper.$wrapperEl; + slides.transition(duration); + if (swiper.params.virtualTranslate && duration !== 0) { + var eventTriggered = false; + slides.transitionEnd(function () { + if (eventTriggered) { return; } + if (!swiper || swiper.destroyed) { return; } + eventTriggered = true; + swiper.animating = false; + var triggerEvents = ['webkitTransitionEnd', 'transitionend']; + for (var i = 0; i < triggerEvents.length; i += 1) { + $wrapperEl.trigger(triggerEvents[i]); + } + }); + } + }, + }; + + var EffectFade = { + name: 'effect-fade', + params: { + fadeEffect: { + crossFade: false, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + fadeEffect: { + setTranslate: Fade.setTranslate.bind(swiper), + setTransition: Fade.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.effect !== 'fade') { return; } + swiper.classNames.push(((swiper.params.containerModifierClass) + "fade")); + var overwriteParams = { + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + spaceBetween: 0, + virtualTranslate: true, + }; + Utils.extend(swiper.params, overwriteParams); + Utils.extend(swiper.originalParams, overwriteParams); + }, + setTranslate: function setTranslate() { + var swiper = this; + if (swiper.params.effect !== 'fade') { return; } + swiper.fadeEffect.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (swiper.params.effect !== 'fade') { return; } + swiper.fadeEffect.setTransition(duration); + }, + }, + }; + + var Cube = { + setTranslate: function setTranslate() { + var swiper = this; + var $el = swiper.$el; + var $wrapperEl = swiper.$wrapperEl; + var slides = swiper.slides; + var swiperWidth = swiper.width; + var swiperHeight = swiper.height; + var rtl = swiper.rtlTranslate; + var swiperSize = swiper.size; + var params = swiper.params.cubeEffect; + var isHorizontal = swiper.isHorizontal(); + var isVirtual = swiper.virtual && swiper.params.virtual.enabled; + var wrapperRotate = 0; + var $cubeShadowEl; + if (params.shadow) { + if (isHorizontal) { + $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow'); + if ($cubeShadowEl.length === 0) { + $cubeShadowEl = $('
'); + $wrapperEl.append($cubeShadowEl); + } + $cubeShadowEl.css({ height: (swiperWidth + "px") }); + } else { + $cubeShadowEl = $el.find('.swiper-cube-shadow'); + if ($cubeShadowEl.length === 0) { + $cubeShadowEl = $('
'); + $el.append($cubeShadowEl); + } + } + } + for (var i = 0; i < slides.length; i += 1) { + var $slideEl = slides.eq(i); + var slideIndex = i; + if (isVirtual) { + slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10); + } + var slideAngle = slideIndex * 90; + var round = Math.floor(slideAngle / 360); + if (rtl) { + slideAngle = -slideAngle; + round = Math.floor(-slideAngle / 360); + } + var progress = Math.max(Math.min($slideEl[0].progress, 1), -1); + var tx = 0; + var ty = 0; + var tz = 0; + if (slideIndex % 4 === 0) { + tx = -round * 4 * swiperSize; + tz = 0; + } else if ((slideIndex - 1) % 4 === 0) { + tx = 0; + tz = -round * 4 * swiperSize; + } else if ((slideIndex - 2) % 4 === 0) { + tx = swiperSize + (round * 4 * swiperSize); + tz = swiperSize; + } else if ((slideIndex - 3) % 4 === 0) { + tx = -swiperSize; + tz = (3 * swiperSize) + (swiperSize * 4 * round); + } + if (rtl) { + tx = -tx; + } + + if (!isHorizontal) { + ty = tx; + tx = 0; + } + + var transform = "rotateX(" + (isHorizontal ? 0 : -slideAngle) + "deg) rotateY(" + (isHorizontal ? slideAngle : 0) + "deg) translate3d(" + tx + "px, " + ty + "px, " + tz + "px)"; + if (progress <= 1 && progress > -1) { + wrapperRotate = (slideIndex * 90) + (progress * 90); + if (rtl) { wrapperRotate = (-slideIndex * 90) - (progress * 90); } + } + $slideEl.transform(transform); + if (params.slideShadows) { + // Set shadows + var shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + var shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $(("
")); + $slideEl.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $(("
")); + $slideEl.append(shadowAfter); + } + if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); } + if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); } + } + } + $wrapperEl.css({ + '-webkit-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), + '-moz-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), + '-ms-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), + 'transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"), + }); + + if (params.shadow) { + if (isHorizontal) { + $cubeShadowEl.transform(("translate3d(0px, " + ((swiperWidth / 2) + params.shadowOffset) + "px, " + (-swiperWidth / 2) + "px) rotateX(90deg) rotateZ(0deg) scale(" + (params.shadowScale) + ")")); + } else { + var shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90); + var multiplier = 1.5 - ( + (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2) + + (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2) + ); + var scale1 = params.shadowScale; + var scale2 = params.shadowScale / multiplier; + var offset = params.shadowOffset; + $cubeShadowEl.transform(("scale3d(" + scale1 + ", 1, " + scale2 + ") translate3d(0px, " + ((swiperHeight / 2) + offset) + "px, " + (-swiperHeight / 2 / scale2) + "px) rotateX(-90deg)")); + } + } + var zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0; + $wrapperEl + .transform(("translate3d(0px,0," + zFactor + "px) rotateX(" + (swiper.isHorizontal() ? 0 : wrapperRotate) + "deg) rotateY(" + (swiper.isHorizontal() ? -wrapperRotate : 0) + "deg)")); + }, + setTransition: function setTransition(duration) { + var swiper = this; + var $el = swiper.$el; + var slides = swiper.slides; + slides + .transition(duration) + .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') + .transition(duration); + if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { + $el.find('.swiper-cube-shadow').transition(duration); + } + }, + }; + + var EffectCube = { + name: 'effect-cube', + params: { + cubeEffect: { + slideShadows: true, + shadow: true, + shadowOffset: 20, + shadowScale: 0.94, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + cubeEffect: { + setTranslate: Cube.setTranslate.bind(swiper), + setTransition: Cube.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.effect !== 'cube') { return; } + swiper.classNames.push(((swiper.params.containerModifierClass) + "cube")); + swiper.classNames.push(((swiper.params.containerModifierClass) + "3d")); + var overwriteParams = { + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + resistanceRatio: 0, + spaceBetween: 0, + centeredSlides: false, + virtualTranslate: true, + }; + Utils.extend(swiper.params, overwriteParams); + Utils.extend(swiper.originalParams, overwriteParams); + }, + setTranslate: function setTranslate() { + var swiper = this; + if (swiper.params.effect !== 'cube') { return; } + swiper.cubeEffect.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (swiper.params.effect !== 'cube') { return; } + swiper.cubeEffect.setTransition(duration); + }, + }, + }; + + var Flip = { + setTranslate: function setTranslate() { + var swiper = this; + var slides = swiper.slides; + var rtl = swiper.rtlTranslate; + for (var i = 0; i < slides.length; i += 1) { + var $slideEl = slides.eq(i); + var progress = $slideEl[0].progress; + if (swiper.params.flipEffect.limitRotation) { + progress = Math.max(Math.min($slideEl[0].progress, 1), -1); + } + var offset = $slideEl[0].swiperSlideOffset; + var rotate = -180 * progress; + var rotateY = rotate; + var rotateX = 0; + var tx = -offset; + var ty = 0; + if (!swiper.isHorizontal()) { + ty = tx; + tx = 0; + rotateX = -rotateY; + rotateY = 0; + } else if (rtl) { + rotateY = -rotateY; + } + + $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length; + + if (swiper.params.flipEffect.slideShadows) { + // Set shadows + var shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + var shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + if (shadowBefore.length === 0) { + shadowBefore = $(("
")); + $slideEl.append(shadowBefore); + } + if (shadowAfter.length === 0) { + shadowAfter = $(("
")); + $slideEl.append(shadowAfter); + } + if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); } + if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); } + } + $slideEl + .transform(("translate3d(" + tx + "px, " + ty + "px, 0px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)")); + } + }, + setTransition: function setTransition(duration) { + var swiper = this; + var slides = swiper.slides; + var activeIndex = swiper.activeIndex; + var $wrapperEl = swiper.$wrapperEl; + slides + .transition(duration) + .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') + .transition(duration); + if (swiper.params.virtualTranslate && duration !== 0) { + var eventTriggered = false; + // eslint-disable-next-line + slides.eq(activeIndex).transitionEnd(function onTransitionEnd() { + if (eventTriggered) { return; } + if (!swiper || swiper.destroyed) { return; } + // if (!$(this).hasClass(swiper.params.slideActiveClass)) return; + eventTriggered = true; + swiper.animating = false; + var triggerEvents = ['webkitTransitionEnd', 'transitionend']; + for (var i = 0; i < triggerEvents.length; i += 1) { + $wrapperEl.trigger(triggerEvents[i]); + } + }); + } + }, + }; + + var EffectFlip = { + name: 'effect-flip', + params: { + flipEffect: { + slideShadows: true, + limitRotation: true, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + flipEffect: { + setTranslate: Flip.setTranslate.bind(swiper), + setTransition: Flip.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.effect !== 'flip') { return; } + swiper.classNames.push(((swiper.params.containerModifierClass) + "flip")); + swiper.classNames.push(((swiper.params.containerModifierClass) + "3d")); + var overwriteParams = { + slidesPerView: 1, + slidesPerColumn: 1, + slidesPerGroup: 1, + watchSlidesProgress: true, + spaceBetween: 0, + virtualTranslate: true, + }; + Utils.extend(swiper.params, overwriteParams); + Utils.extend(swiper.originalParams, overwriteParams); + }, + setTranslate: function setTranslate() { + var swiper = this; + if (swiper.params.effect !== 'flip') { return; } + swiper.flipEffect.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (swiper.params.effect !== 'flip') { return; } + swiper.flipEffect.setTransition(duration); + }, + }, + }; + + var Coverflow = { + setTranslate: function setTranslate() { + var swiper = this; + var swiperWidth = swiper.width; + var swiperHeight = swiper.height; + var slides = swiper.slides; + var $wrapperEl = swiper.$wrapperEl; + var slidesSizesGrid = swiper.slidesSizesGrid; + var params = swiper.params.coverflowEffect; + var isHorizontal = swiper.isHorizontal(); + var transform = swiper.translate; + var center = isHorizontal ? -transform + (swiperWidth / 2) : -transform + (swiperHeight / 2); + var rotate = isHorizontal ? params.rotate : -params.rotate; + var translate = params.depth; + // Each slide offset from center + for (var i = 0, length = slides.length; i < length; i += 1) { + var $slideEl = slides.eq(i); + var slideSize = slidesSizesGrid[i]; + var slideOffset = $slideEl[0].swiperSlideOffset; + var offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier; + + var rotateY = isHorizontal ? rotate * offsetMultiplier : 0; + var rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; + // var rotateZ = 0 + var translateZ = -translate * Math.abs(offsetMultiplier); + + var translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier); + var translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0; + + // Fix for ultra small values + if (Math.abs(translateX) < 0.001) { translateX = 0; } + if (Math.abs(translateY) < 0.001) { translateY = 0; } + if (Math.abs(translateZ) < 0.001) { translateZ = 0; } + if (Math.abs(rotateY) < 0.001) { rotateY = 0; } + if (Math.abs(rotateX) < 0.001) { rotateX = 0; } + + var slideTransform = "translate3d(" + translateX + "px," + translateY + "px," + translateZ + "px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)"; + + $slideEl.transform(slideTransform); + $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; + if (params.slideShadows) { + // Set shadows + var $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); + var $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); + if ($shadowBeforeEl.length === 0) { + $shadowBeforeEl = $(("
")); + $slideEl.append($shadowBeforeEl); + } + if ($shadowAfterEl.length === 0) { + $shadowAfterEl = $(("
")); + $slideEl.append($shadowAfterEl); + } + if ($shadowBeforeEl.length) { $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; } + if ($shadowAfterEl.length) { $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; } + } + } + + // Set correct perspective for IE10 + if (Support.pointerEvents || Support.prefixedPointerEvents) { + var ws = $wrapperEl[0].style; + ws.perspectiveOrigin = center + "px 50%"; + } + }, + setTransition: function setTransition(duration) { + var swiper = this; + swiper.slides + .transition(duration) + .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left') + .transition(duration); + }, + }; + + var EffectCoverflow = { + name: 'effect-coverflow', + params: { + coverflowEffect: { + rotate: 50, + stretch: 0, + depth: 100, + modifier: 1, + slideShadows: true, + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + coverflowEffect: { + setTranslate: Coverflow.setTranslate.bind(swiper), + setTransition: Coverflow.setTransition.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + if (swiper.params.effect !== 'coverflow') { return; } + + swiper.classNames.push(((swiper.params.containerModifierClass) + "coverflow")); + swiper.classNames.push(((swiper.params.containerModifierClass) + "3d")); + + swiper.params.watchSlidesProgress = true; + swiper.originalParams.watchSlidesProgress = true; + }, + setTranslate: function setTranslate() { + var swiper = this; + if (swiper.params.effect !== 'coverflow') { return; } + swiper.coverflowEffect.setTranslate(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + if (swiper.params.effect !== 'coverflow') { return; } + swiper.coverflowEffect.setTransition(duration); + }, + }, + }; + + var Thumbs = { + init: function init() { + var swiper = this; + var ref = swiper.params; + var thumbsParams = ref.thumbs; + var SwiperClass = swiper.constructor; + if (thumbsParams.swiper instanceof SwiperClass) { + swiper.thumbs.swiper = thumbsParams.swiper; + Utils.extend(swiper.thumbs.swiper.originalParams, { + watchSlidesProgress: true, + slideToClickedSlide: false, + }); + Utils.extend(swiper.thumbs.swiper.params, { + watchSlidesProgress: true, + slideToClickedSlide: false, + }); + } else if (Utils.isObject(thumbsParams.swiper)) { + swiper.thumbs.swiper = new SwiperClass(Utils.extend({}, thumbsParams.swiper, { + watchSlidesVisibility: true, + watchSlidesProgress: true, + slideToClickedSlide: false, + })); + swiper.thumbs.swiperCreated = true; + } + swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass); + swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick); + }, + onThumbClick: function onThumbClick() { + var swiper = this; + var thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper) { return; } + var clickedIndex = thumbsSwiper.clickedIndex; + var clickedSlide = thumbsSwiper.clickedSlide; + if (clickedSlide && $(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) { return; } + if (typeof clickedIndex === 'undefined' || clickedIndex === null) { return; } + var slideToIndex; + if (thumbsSwiper.params.loop) { + slideToIndex = parseInt($(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10); + } else { + slideToIndex = clickedIndex; + } + if (swiper.params.loop) { + var currentIndex = swiper.activeIndex; + if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) { + swiper.loopFix(); + // eslint-disable-next-line + swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; + currentIndex = swiper.activeIndex; + } + var prevIndex = swiper.slides.eq(currentIndex).prevAll(("[data-swiper-slide-index=\"" + slideToIndex + "\"]")).eq(0).index(); + var nextIndex = swiper.slides.eq(currentIndex).nextAll(("[data-swiper-slide-index=\"" + slideToIndex + "\"]")).eq(0).index(); + if (typeof prevIndex === 'undefined') { slideToIndex = nextIndex; } + else if (typeof nextIndex === 'undefined') { slideToIndex = prevIndex; } + else if (nextIndex - currentIndex < currentIndex - prevIndex) { slideToIndex = nextIndex; } + else { slideToIndex = prevIndex; } + } + swiper.slideTo(slideToIndex); + }, + update: function update(initial) { + var swiper = this; + var thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper) { return; } + + var slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' + ? thumbsSwiper.slidesPerViewDynamic() + : thumbsSwiper.params.slidesPerView; + + if (swiper.realIndex !== thumbsSwiper.realIndex) { + var currentThumbsIndex = thumbsSwiper.activeIndex; + var newThumbsIndex; + if (thumbsSwiper.params.loop) { + if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) { + thumbsSwiper.loopFix(); + // eslint-disable-next-line + thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft; + currentThumbsIndex = thumbsSwiper.activeIndex; + } + // Find actual thumbs index to slide to + var prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll(("[data-swiper-slide-index=\"" + (swiper.realIndex) + "\"]")).eq(0).index(); + var nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll(("[data-swiper-slide-index=\"" + (swiper.realIndex) + "\"]")).eq(0).index(); + if (typeof prevThumbsIndex === 'undefined') { newThumbsIndex = nextThumbsIndex; } + else if (typeof nextThumbsIndex === 'undefined') { newThumbsIndex = prevThumbsIndex; } + else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) { newThumbsIndex = currentThumbsIndex; } + else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) { newThumbsIndex = nextThumbsIndex; } + else { newThumbsIndex = prevThumbsIndex; } + } else { + newThumbsIndex = swiper.realIndex; + } + if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) { + if (thumbsSwiper.params.centeredSlides) { + if (newThumbsIndex > currentThumbsIndex) { + newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; + } else { + newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; + } + } else if (newThumbsIndex > currentThumbsIndex) { + newThumbsIndex = newThumbsIndex - slidesPerView + 1; + } + thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); + } + } + + // Activate thumbs + var thumbsToActivate = 1; + var thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; + + if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { + thumbsToActivate = swiper.params.slidesPerView; + } + + if (!swiper.params.thumbs.multipleActiveThumbs) { + thumbsToActivate = 1; + } + + thumbsToActivate = Math.floor(thumbsToActivate); + + thumbsSwiper.slides.removeClass(thumbActiveClass); + if (thumbsSwiper.params.loop || (thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled)) { + for (var i = 0; i < thumbsToActivate; i += 1) { + thumbsSwiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + (swiper.realIndex + i) + "\"]")).addClass(thumbActiveClass); + } + } else { + for (var i$1 = 0; i$1 < thumbsToActivate; i$1 += 1) { + thumbsSwiper.slides.eq(swiper.realIndex + i$1).addClass(thumbActiveClass); + } + } + }, + }; + var Thumbs$1 = { + name: 'thumbs', + params: { + thumbs: { + multipleActiveThumbs: true, + swiper: null, + slideThumbActiveClass: 'swiper-slide-thumb-active', + thumbsContainerClass: 'swiper-container-thumbs', + }, + }, + create: function create() { + var swiper = this; + Utils.extend(swiper, { + thumbs: { + swiper: null, + init: Thumbs.init.bind(swiper), + update: Thumbs.update.bind(swiper), + onThumbClick: Thumbs.onThumbClick.bind(swiper), + }, + }); + }, + on: { + beforeInit: function beforeInit() { + var swiper = this; + var ref = swiper.params; + var thumbs = ref.thumbs; + if (!thumbs || !thumbs.swiper) { return; } + swiper.thumbs.init(); + swiper.thumbs.update(true); + }, + slideChange: function slideChange() { + var swiper = this; + if (!swiper.thumbs.swiper) { return; } + swiper.thumbs.update(); + }, + update: function update() { + var swiper = this; + if (!swiper.thumbs.swiper) { return; } + swiper.thumbs.update(); + }, + resize: function resize() { + var swiper = this; + if (!swiper.thumbs.swiper) { return; } + swiper.thumbs.update(); + }, + observerUpdate: function observerUpdate() { + var swiper = this; + if (!swiper.thumbs.swiper) { return; } + swiper.thumbs.update(); + }, + setTransition: function setTransition(duration) { + var swiper = this; + var thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper) { return; } + thumbsSwiper.setTransition(duration); + }, + beforeDestroy: function beforeDestroy() { + var swiper = this; + var thumbsSwiper = swiper.thumbs.swiper; + if (!thumbsSwiper) { return; } + if (swiper.thumbs.swiperCreated && thumbsSwiper) { + thumbsSwiper.destroy(); + } + }, + }, + }; + + // Swiper Class + + var components = [ + Device$1, + Support$1, + Browser$1, + Resize, + Observer$1, + Virtual$1, + Keyboard$1, + Mousewheel$1, + Navigation$1, + Pagination$1, + Scrollbar$1, + Parallax$1, + Zoom$1, + Lazy$1, + Controller$1, + A11y, + History$1, + HashNavigation$1, + Autoplay$1, + EffectFade, + EffectCube, + EffectFlip, + EffectCoverflow, + Thumbs$1 + ]; + + if (typeof Swiper.use === 'undefined') { + Swiper.use = Swiper.Class.use; + Swiper.installModule = Swiper.Class.installModule; + } + + Swiper.use(components); + + return Swiper; + +})); +//# sourceMappingURL=swiper.js.map diff --git a/html/mobile/js/swiper.min.js b/html/mobile/js/swiper.min.js new file mode 100644 index 0000000..4754a3d --- /dev/null +++ b/html/mobile/js/swiper.min.js @@ -0,0 +1,14 @@ +/** + * Swiper 5.3.0 + * Most modern mobile touch slider and framework with hardware accelerated transitions + * http://swiperjs.com + * + * Copyright 2014-2020 Vladimir Kharlampidi + * + * Released under the MIT License + * + * Released on: January 11, 2020 + */ + +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Swiper=t()}(this,(function(){"use strict";var e="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,t="undefined"==typeof window?{document:e,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,i=function(e){for(var t=0;t=0&&d.indexOf(">")>=0){var h="div";for(0===d.indexOf(":~]/)?(a||e).querySelectorAll(s.trim()):[e.getElementById(s.trim().split("#")[1])],n=0;n0&&s[0].nodeType)for(n=0;n=0;u-=1){var v=c[u];r&&v.listener===r?(p.removeEventListener(d,v.proxyListener,n),c.splice(u,1)):r&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===r?(p.removeEventListener(d,v.proxyListener,n),c.splice(u,1)):r||(p.removeEventListener(d,v.proxyListener,n),c.splice(u,1))}}return this},trigger:function(){for(var i=[],s=arguments.length;s--;)i[s]=arguments[s];for(var a=i[0].split(" "),r=i[1],n=0;n0})),d.dispatchEvent(h),d.dom7EventData=[],delete d.dom7EventData}return this},transitionEnd:function(e){var t,i=["webkitTransitionEnd","transitionend"],s=this;function a(r){if(r.target===this)for(e.call(this,r),t=0;t0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){var i=this[0],s=i.getBoundingClientRect(),a=e.body,r=i.clientTop||a.clientTop||0,n=i.clientLeft||a.clientLeft||0,o=i===t?t.scrollY:i.scrollTop,l=i===t?t.scrollX:i.scrollLeft;return{top:s.top+o-r,left:s.left+l-n}}return null},css:function(e,i){var s;if(1===arguments.length){if("string"!=typeof e){for(s=0;ss-1?[]:e<0?(t=s+e)<0?[]:[this[t]]:[this[e]])},append:function(){for(var t,s=[],a=arguments.length;a--;)s[a]=arguments[a];for(var r=0;r=0;a-=1)this[s].insertBefore(r.childNodes[a],this[s].childNodes[0])}else if(t instanceof i)for(a=0;a0?e?this[0].nextElementSibling&&s(this[0].nextElementSibling).is(e)?new i([this[0].nextElementSibling]):new i([]):this[0].nextElementSibling?new i([this[0].nextElementSibling]):new i([]):new i([])},nextAll:function(e){var t=[],a=this[0];if(!a)return new i([]);for(;a.nextElementSibling;){var r=a.nextElementSibling;e?s(r).is(e)&&t.push(r):t.push(r),a=r}return new i(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&s(t.previousElementSibling).is(e)?new i([t.previousElementSibling]):new i([]):t.previousElementSibling?new i([t.previousElementSibling]):new i([])}return new i([])},prevAll:function(e){var t=[],a=this[0];if(!a)return new i([]);for(;a.previousElementSibling;){var r=a.previousElementSibling;e?s(r).is(e)&&t.push(r):t.push(r),a=r}return new i(t)},parent:function(e){for(var t=[],i=0;i6&&(a=a.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),r=new t.WebKitCSSMatrix("none"===a?"":a)):s=(r=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===i&&(a=t.WebKitCSSMatrix?r.m41:16===s.length?parseFloat(s[12]):parseFloat(s[4])),"y"===i&&(a=t.WebKitCSSMatrix?r.m42:16===s.length?parseFloat(s[13]):parseFloat(s[5])),a||0},parseUrlQuery:function(e){var i,s,a,r,n={},o=e||t.location.href;if("string"==typeof o&&o.length)for(r=(s=(o=o.indexOf("?")>-1?o.replace(/\S*\?/,""):"").split("&").filter((function(e){return""!==e}))).length,i=0;i0||"ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch),pointerEvents:!!t.PointerEvent&&"maxTouchPoints"in t.navigator&&t.navigator.maxTouchPoints>0,observer:"MutationObserver"in t||"WebkitMutationObserver"in t,passiveListener:function(){var e=!1;try{var i=Object.defineProperty({},"passive",{get:function(){e=!0}});t.addEventListener("testPassiveListener",null,i)}catch(e){}return e}(),gestures:"ongesturestart"in t},l=function(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach((function(e){t.on(e,t.params.on[e])}))},d={components:{configurable:!0}};l.prototype.on=function(e,t,i){var s=this;if("function"!=typeof t)return s;var a=i?"unshift":"push";return e.split(" ").forEach((function(e){s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][a](t)})),s},l.prototype.once=function(e,t,i){var s=this;if("function"!=typeof t)return s;function a(){for(var i=[],r=arguments.length;r--;)i[r]=arguments[r];s.off(e,a),a.f7proxy&&delete a.f7proxy,t.apply(s,i)}return a.f7proxy=t,s.on(e,a,i)},l.prototype.off=function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].length&&i.eventsListeners[e].forEach((function(s,a){(s===t||s.f7proxy&&s.f7proxy===t)&&i.eventsListeners[e].splice(a,1)}))})),i):i},l.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var i,s,a,r=this;if(!r.eventsListeners)return r;"string"==typeof e[0]||Array.isArray(e[0])?(i=e[0],s=e.slice(1,e.length),a=r):(i=e[0].events,s=e[0].data,a=e[0].context||r);var n=Array.isArray(i)?i:i.split(" ");return n.forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var t=[];r.eventsListeners[e].forEach((function(e){t.push(e)})),t.forEach((function(e){e.apply(a,s)}))}})),r},l.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var s=t.modules[i];s.params&&n.extend(e,s.params)}))},l.prototype.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var s=t.modules[i],a=e[i]||{};s.instance&&Object.keys(s.instance).forEach((function(e){var i=s.instance[e];t[e]="function"==typeof i?i.bind(t):i})),s.on&&t.on&&Object.keys(s.on).forEach((function(e){t.on(e,s.on[e])})),s.create&&s.create.bind(t)(a)}))},d.components.set=function(e){this.use&&this.use(e)},l.installModule=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var s=this;s.prototype.modules||(s.prototype.modules={});var a=e.name||Object.keys(s.prototype.modules).length+"_"+n.now();return s.prototype.modules[a]=e,e.proto&&Object.keys(e.proto).forEach((function(t){s.prototype[t]=e.proto[t]})),e.static&&Object.keys(e.static).forEach((function(t){s[t]=e.static[t]})),e.install&&e.install.apply(s,t),s},l.use=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var s=this;return Array.isArray(e)?(e.forEach((function(e){return s.installModule(e)})),s):s.installModule.apply(s,[e].concat(t))},Object.defineProperties(l,d);var h={updateSize:function(){var e,t,i=this.$el;e=void 0!==this.params.width?this.params.width:i[0].clientWidth,t=void 0!==this.params.height?this.params.height:i[0].clientHeight,0===e&&this.isHorizontal()||0===t&&this.isVertical()||(e=e-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),t=t-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),n.extend(this,{width:e,height:t,size:this.isHorizontal()?e:t}))},updateSlides:function(){var e=this.params,i=this.$wrapperEl,s=this.size,a=this.rtlTranslate,r=this.wrongRTL,o=this.virtual&&e.virtual.enabled,l=o?this.virtual.slides.length:this.slides.length,d=i.children("."+this.params.slideClass),h=o?this.virtual.slides.length:d.length,p=[],c=[],u=[];function v(t){return!e.cssMode||t!==d.length-1}var f=e.slidesOffsetBefore;"function"==typeof f&&(f=e.slidesOffsetBefore.call(this));var m=e.slidesOffsetAfter;"function"==typeof m&&(m=e.slidesOffsetAfter.call(this));var g=this.snapGrid.length,b=this.snapGrid.length,w=e.spaceBetween,y=-f,x=0,T=0;if(void 0!==s){var E,S;"string"==typeof w&&w.indexOf("%")>=0&&(w=parseFloat(w.replace("%",""))/100*s),this.virtualSize=-w,a?d.css({marginLeft:"",marginTop:""}):d.css({marginRight:"",marginBottom:""}),e.slidesPerColumn>1&&(E=Math.floor(h/e.slidesPerColumn)===h/this.params.slidesPerColumn?h:Math.ceil(h/e.slidesPerColumn)*e.slidesPerColumn,"auto"!==e.slidesPerView&&"row"===e.slidesPerColumnFill&&(E=Math.max(E,e.slidesPerView*e.slidesPerColumn)));for(var C,M=e.slidesPerColumn,P=E/M,z=Math.floor(h/e.slidesPerColumn),k=0;k1){var L=void 0,I=void 0,D=void 0;if("row"===e.slidesPerColumnFill&&e.slidesPerGroup>1){var O=Math.floor(k/(e.slidesPerGroup*e.slidesPerColumn)),A=k-e.slidesPerColumn*e.slidesPerGroup*O,G=0===O?e.slidesPerGroup:Math.min(Math.ceil((h-O*M*e.slidesPerGroup)/M),e.slidesPerGroup);L=(I=A-(D=Math.floor(A/G))*G+O*e.slidesPerGroup)+D*E/M,$.css({"-webkit-box-ordinal-group":L,"-moz-box-ordinal-group":L,"-ms-flex-order":L,"-webkit-order":L,order:L})}else"column"===e.slidesPerColumnFill?(D=k-(I=Math.floor(k/M))*M,(I>z||I===z&&D===M-1)&&(D+=1)>=M&&(D=0,I+=1)):I=k-(D=Math.floor(k/P))*P;$.css("margin-"+(this.isHorizontal()?"top":"left"),0!==D&&e.spaceBetween&&e.spaceBetween+"px")}if("none"!==$.css("display")){if("auto"===e.slidesPerView){var B=t.getComputedStyle($[0],null),H=$[0].style.transform,N=$[0].style.webkitTransform;if(H&&($[0].style.transform="none"),N&&($[0].style.webkitTransform="none"),e.roundLengths)S=this.isHorizontal()?$.outerWidth(!0):$.outerHeight(!0);else if(this.isHorizontal()){var X=parseFloat(B.getPropertyValue("width")),V=parseFloat(B.getPropertyValue("padding-left")),Y=parseFloat(B.getPropertyValue("padding-right")),F=parseFloat(B.getPropertyValue("margin-left")),W=parseFloat(B.getPropertyValue("margin-right")),R=B.getPropertyValue("box-sizing");S=R&&"border-box"===R?X+F+W:X+V+Y+F+W}else{var q=parseFloat(B.getPropertyValue("height")),j=parseFloat(B.getPropertyValue("padding-top")),K=parseFloat(B.getPropertyValue("padding-bottom")),U=parseFloat(B.getPropertyValue("margin-top")),_=parseFloat(B.getPropertyValue("margin-bottom")),Z=B.getPropertyValue("box-sizing");S=Z&&"border-box"===Z?q+U+_:q+j+K+U+_}H&&($[0].style.transform=H),N&&($[0].style.webkitTransform=N),e.roundLengths&&(S=Math.floor(S))}else S=(s-(e.slidesPerView-1)*w)/e.slidesPerView,e.roundLengths&&(S=Math.floor(S)),d[k]&&(this.isHorizontal()?d[k].style.width=S+"px":d[k].style.height=S+"px");d[k]&&(d[k].swiperSlideSize=S),u.push(S),e.centeredSlides?(y=y+S/2+x/2+w,0===x&&0!==k&&(y=y-s/2-w),0===k&&(y=y-s/2-w),Math.abs(y)<.001&&(y=0),e.roundLengths&&(y=Math.floor(y)),T%e.slidesPerGroup==0&&p.push(y),c.push(y)):(e.roundLengths&&(y=Math.floor(y)),(T-Math.min(this.params.slidesPerGroupSkip,T))%this.params.slidesPerGroup==0&&p.push(y),c.push(y),y=y+S+w),this.virtualSize+=S+w,x=S,T+=1}}if(this.virtualSize=Math.max(this.virtualSize,s)+m,a&&r&&("slide"===e.effect||"coverflow"===e.effect)&&i.css({width:this.virtualSize+e.spaceBetween+"px"}),e.setWrapperSize&&(this.isHorizontal()?i.css({width:this.virtualSize+e.spaceBetween+"px"}):i.css({height:this.virtualSize+e.spaceBetween+"px"})),e.slidesPerColumn>1&&(this.virtualSize=(S+e.spaceBetween)*E,this.virtualSize=Math.ceil(this.virtualSize/e.slidesPerColumn)-e.spaceBetween,this.isHorizontal()?i.css({width:this.virtualSize+e.spaceBetween+"px"}):i.css({height:this.virtualSize+e.spaceBetween+"px"}),e.centeredSlides)){C=[];for(var Q=0;Q1&&p.push(this.virtualSize-s)}if(0===p.length&&(p=[0]),0!==e.spaceBetween&&(this.isHorizontal()?a?d.filter(v).css({marginLeft:w+"px"}):d.filter(v).css({marginRight:w+"px"}):d.filter(v).css({marginBottom:w+"px"})),e.centeredSlides&&e.centeredSlidesBounds){var ie=0;u.forEach((function(t){ie+=t+(e.spaceBetween?e.spaceBetween:0)}));var se=(ie-=e.spaceBetween)-s;p=p.map((function(e){return e<0?-f:e>se?se+m:e}))}if(e.centerInsufficientSlides){var ae=0;if(u.forEach((function(t){ae+=t+(e.spaceBetween?e.spaceBetween:0)})),(ae-=e.spaceBetween)1)for(t=0;tthis.slides.length)break;i.push(this.slides.eq(a)[0])}else i.push(this.slides.eq(this.activeIndex)[0]);for(t=0;ts?r:s}s&&this.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t=0&&d1&&h<=this.size||d<=0&&h>=this.size)&&(this.visibleSlides.push(o),this.visibleSlidesIndexes.push(n),i.eq(n).addClass(t.slideVisibleClass))}o.progress=a?-l:l}this.visibleSlides=s(this.visibleSlides)}},updateProgress:function(e){if(void 0===e){var t=this.rtlTranslate?-1:1;e=this&&this.translate&&this.translate*t||0}var i=this.params,s=this.maxTranslate()-this.minTranslate(),a=this.progress,r=this.isBeginning,o=this.isEnd,l=r,d=o;0===s?(a=0,r=!0,o=!0):(r=(a=(e-this.minTranslate())/s)<=0,o=a>=1),n.extend(this,{progress:a,isBeginning:r,isEnd:o}),(i.watchSlidesProgress||i.watchSlidesVisibility)&&this.updateSlidesProgress(e),r&&!l&&this.emit("reachBeginning toEdge"),o&&!d&&this.emit("reachEnd toEdge"),(l&&!r||d&&!o)&&this.emit("fromEdge"),this.emit("progress",a)},updateSlidesClasses:function(){var e,t=this.slides,i=this.params,s=this.$wrapperEl,a=this.activeIndex,r=this.realIndex,n=this.virtual&&i.virtual.enabled;t.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=n?this.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+a+'"]'):t.eq(a)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass));var o=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===o.length&&(o=t.eq(0)).addClass(i.slideNextClass);var l=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===l.length&&(l=t.eq(-1)).addClass(i.slidePrevClass),i.loop&&(o.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t,i=this.rtlTranslate?this.translate:-this.translate,s=this.slidesGrid,a=this.snapGrid,r=this.params,o=this.activeIndex,l=this.realIndex,d=this.snapIndex,h=e;if(void 0===h){for(var p=0;p=s[p]&&i=s[p]&&i=s[p]&&(h=p);r.normalizeSlideIndex&&(h<0||void 0===h)&&(h=0)}if(a.indexOf(i)>=0)t=a.indexOf(i);else{var c=Math.min(r.slidesPerGroupSkip,h);t=c+Math.floor((h-c)/r.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),h!==o){var u=parseInt(this.slides.eq(h).attr("data-swiper-slide-index")||h,10);n.extend(this,{snapIndex:t,realIndex:u,previousIndex:o,activeIndex:h}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),l!==u&&this.emit("realIndexChange"),(this.initialized||this.runCallbacksOnInit)&&this.emit("slideChange")}else t!==d&&(this.snapIndex=t,this.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this.params,i=s(e.target).closest("."+t.slideClass)[0],a=!1;if(i)for(var r=0;rh?h:s&&ea?"next":is?"next":i=d.length&&(f=d.length-1),(p||o.initialSlide||0)===(h||0)&&i&&r.emit("beforeSlideChangeStart");var m,g=-l[f];if(r.updateProgress(g),o.normalizeSlideIndex)for(var b=0;b=Math.floor(100*d[b])&&(n=b);if(r.initialized&&n!==p){if(!r.allowSlideNext&&gr.translate&&g>r.maxTranslate()&&(p||0)!==n)return!1}if(m=n>p?"next":n=e&&(c=e)})),void 0!==c&&(d=n.indexOf(c))<0&&(d=this.activeIndex-1),this.slideTo(d,e,t,i)},slideReset:function(e,t,i){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,i)},slideToClosest:function(e,t,i,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===s&&(s=.5);var a=this.activeIndex,r=Math.min(this.params.slidesPerGroupSkip,a),n=r+Math.floor((a-r)/this.params.slidesPerGroup),o=this.rtlTranslate?this.translate:-this.translate;if(o>=this.snapGrid[n]){var l=this.snapGrid[n];o-l>(this.snapGrid[n+1]-l)*s&&(a+=this.params.slidesPerGroup)}else{var d=this.snapGrid[n-1];o-d<=(this.snapGrid[n]-d)*s&&(a-=this.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,this.slidesGrid.length-1),this.slideTo(a,e,t,i)},slideToClickedSlide:function(){var e,t=this,i=t.params,a=t.$wrapperEl,r="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,o=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(s(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?ot.slides.length-t.loopedSlides+r/2?(t.loopFix(),o=a.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),n.nextTick((function(){t.slideTo(o)}))):t.slideTo(o):o>t.slides.length-r?(t.loopFix(),o=a.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),n.nextTick((function(){t.slideTo(o)}))):t.slideTo(o)}else t.slideTo(o)}};var v={loopCreate:function(){var t=this,i=t.params,a=t.$wrapperEl;a.children("."+i.slideClass+"."+i.slideDuplicateClass).remove();var r=a.children("."+i.slideClass);if(i.loopFillGroupWithBlank){var n=i.slidesPerGroup-r.length%i.slidesPerGroup;if(n!==i.slidesPerGroup){for(var o=0;or.length&&(t.loopedSlides=r.length);var d=[],h=[];r.each((function(e,i){var a=s(i);e=r.length-t.loopedSlides&&d.push(i),a.attr("data-swiper-slide-index",e)}));for(var p=0;p=0;c-=1)a.prepend(s(d[c].cloneNode(!0)).addClass(i.slideDuplicateClass))},loopFix:function(){this.emit("beforeLoopFix");var e,t=this.activeIndex,i=this.slides,s=this.loopedSlides,a=this.allowSlidePrev,r=this.allowSlideNext,n=this.snapGrid,o=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var l=-n[t]-this.getTranslate();if(t=i.length-s){e=-i.length+t+s,e+=s,this.slideTo(e,0,!1,!0)&&0!==l&&this.setTranslate((o?-this.translate:this.translate)-l)}this.allowSlidePrev=a,this.allowSlideNext=r,this.emit("loopFix")},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,i=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}};var f={setGrabCursor:function(e){if(!(o.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||this.params.cssMode)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){o.touch||this.params.watchOverflow&&this.isLocked||this.params.cssMode||(this.el.style.cursor="")}};var m,g,b,w,y,x,T,E,S,C,M,P,z,k,$,L={appendSlide:function(e){var t=this.$wrapperEl,i=this.params;if(i.loop&&this.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s=r)this.appendSlide(t);else{for(var n=a>e?a+1:a,l=[],d=r-1;d>=e;d-=1){var h=this.slides.eq(d);h.remove(),l.unshift(h)}if("object"==typeof t&&"length"in t){for(var p=0;pe?a+t.length:a}else i.append(t);for(var c=0;c=0||g.indexOf("Trident/")>=0,M=g.indexOf("Edge/")>=0,P=g.indexOf("Gecko/")>=0&&g.indexOf("Firefox/")>=0,z="Win32"===m,k=g.toLowerCase().indexOf("electron")>=0,$="MacIntel"===m,!T&&$&&o.touch&&(1024===w&&1366===y||834===w&&1194===y||834===w&&1112===y||768===w&&1024===y)&&(T=g.match(/(Version)\/([\d.]+)/),$=!1),b.ie=C,b.edge=M,b.firefox=P,x&&!z&&(b.os="android",b.osVersion=x[2],b.android=!0,b.androidChrome=g.toLowerCase().indexOf("chrome")>=0),(T||S||E)&&(b.os="ios",b.ios=!0),S&&!E&&(b.osVersion=S[2].replace(/_/g,"."),b.iphone=!0),T&&(b.osVersion=T[2].replace(/_/g,"."),b.ipad=!0),E&&(b.osVersion=E[3]?E[3].replace(/_/g,"."):null,b.ipod=!0),b.ios&&b.osVersion&&g.indexOf("Version/")>=0&&"10"===b.osVersion.split(".")[0]&&(b.osVersion=g.toLowerCase().split("version/")[1].split(" ")[0]),b.webView=!(!(S||T||E)||!g.match(/.*AppleWebKit(?!.*Safari)/i)&&!t.navigator.standalone)||t.matchMedia&&t.matchMedia("(display-mode: standalone)").matches,b.webview=b.webView,b.standalone=b.webView,b.desktop=!(b.ios||b.android)||k,b.desktop&&(b.electron=k,b.macos=$,b.windows=z,b.macos&&(b.os="macos"),b.windows&&(b.os="windows")),b.pixelRatio=t.devicePixelRatio||1,b);function D(i){var a=this.touchEventsData,r=this.params,o=this.touches;if(!this.animating||!r.preventInteractionOnTransition){var l=i;l.originalEvent&&(l=l.originalEvent);var d=s(l.target);if(("wrapper"!==r.touchEventsTarget||d.closest(this.wrapperEl).length)&&(a.isTouchEvent="touchstart"===l.type,(a.isTouchEvent||!("which"in l)||3!==l.which)&&!(!a.isTouchEvent&&"button"in l&&l.button>0||a.isTouched&&a.isMoved)))if(r.noSwiping&&d.closest(r.noSwipingSelector?r.noSwipingSelector:"."+r.noSwipingClass)[0])this.allowClick=!0;else if(!r.swipeHandler||d.closest(r.swipeHandler)[0]){o.currentX="touchstart"===l.type?l.targetTouches[0].pageX:l.pageX,o.currentY="touchstart"===l.type?l.targetTouches[0].pageY:l.pageY;var h=o.currentX,p=o.currentY,c=r.edgeSwipeDetection||r.iOSEdgeSwipeDetection,u=r.edgeSwipeThreshold||r.iOSEdgeSwipeThreshold;if(!c||!(h<=u||h>=t.screen.width-u)){if(n.extend(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=h,o.startY=p,a.touchStartTime=n.now(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1),"touchstart"!==l.type){var v=!0;d.is(a.formElements)&&(v=!1),e.activeElement&&s(e.activeElement).is(a.formElements)&&e.activeElement!==d[0]&&e.activeElement.blur();var f=v&&this.allowTouchMove&&r.touchStartPreventDefault;(r.touchStartForcePreventDefault||f)&&l.preventDefault()}this.emit("touchStart",l)}}}}function O(t){var i=this.touchEventsData,a=this.params,r=this.touches,o=this.rtlTranslate,l=t;if(l.originalEvent&&(l=l.originalEvent),i.isTouched){if(!i.isTouchEvent||"mousemove"!==l.type){var d="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),h="touchmove"===l.type?d.pageX:l.pageX,p="touchmove"===l.type?d.pageY:l.pageY;if(l.preventedByNestedSwiper)return r.startX=h,void(r.startY=p);if(!this.allowTouchMove)return this.allowClick=!1,void(i.isTouched&&(n.extend(r,{startX:h,startY:p,currentX:h,currentY:p}),i.touchStartTime=n.now()));if(i.isTouchEvent&&a.touchReleaseOnEdges&&!a.loop)if(this.isVertical()){if(pr.startY&&this.translate>=this.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(hr.startX&&this.translate>=this.minTranslate())return;if(i.isTouchEvent&&e.activeElement&&l.target===e.activeElement&&s(l.target).is(i.formElements))return i.isMoved=!0,void(this.allowClick=!1);if(i.allowTouchCallbacks&&this.emit("touchMove",l),!(l.targetTouches&&l.targetTouches.length>1)){r.currentX=h,r.currentY=p;var c=r.currentX-r.startX,u=r.currentY-r.startY;if(!(this.params.threshold&&Math.sqrt(Math.pow(c,2)+Math.pow(u,2))=25&&(v=180*Math.atan2(Math.abs(u),Math.abs(c))/Math.PI,i.isScrolling=this.isHorizontal()?v>a.touchAngle:90-v>a.touchAngle);if(i.isScrolling&&this.emit("touchMoveOpposite",l),void 0===i.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else if(i.startMoving){this.allowClick=!1,a.cssMode||l.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&l.stopPropagation(),i.isMoved||(a.loop&&this.loopFix(),i.startTranslate=this.getTranslate(),this.setTransition(0),this.animating&&this.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!a.grabCursor||!0!==this.allowSlideNext&&!0!==this.allowSlidePrev||this.setGrabCursor(!0),this.emit("sliderFirstMove",l)),this.emit("sliderMove",l),i.isMoved=!0;var f=this.isHorizontal()?c:u;r.diff=f,f*=a.touchRatio,o&&(f=-f),this.swipeDirection=f>0?"prev":"next",i.currentTranslate=f+i.startTranslate;var m=!0,g=a.resistanceRatio;if(a.touchReleaseOnEdges&&(g=0),f>0&&i.currentTranslate>this.minTranslate()?(m=!1,a.resistance&&(i.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+i.startTranslate+f,g))):f<0&&i.currentTranslatei.startTranslate&&(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(f)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,i.currentTranslate=i.startTranslate,void(r.diff=this.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}a.followFinger&&!a.cssMode&&((a.freeMode||a.watchSlidesProgress||a.watchSlidesVisibility)&&(this.updateActiveIndex(),this.updateSlidesClasses()),a.freeMode&&(0===i.velocities.length&&i.velocities.push({position:r[this.isHorizontal()?"startX":"startY"],time:i.touchStartTime}),i.velocities.push({position:r[this.isHorizontal()?"currentX":"currentY"],time:n.now()})),this.updateProgress(i.currentTranslate),this.setTranslate(i.currentTranslate))}}}}}else i.startMoving&&i.isScrolling&&this.emit("touchMoveOpposite",l)}function A(e){var t=this,i=t.touchEventsData,s=t.params,a=t.touches,r=t.rtlTranslate,o=t.$wrapperEl,l=t.slidesGrid,d=t.snapGrid,h=e;if(h.originalEvent&&(h=h.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",h),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var p,c=n.now(),u=c-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(h),t.emit("tap click",h),u<300&&c-i.lastClickTime<300&&t.emit("doubleTap doubleClick",h)),i.lastClickTime=n.now(),n.nextTick((function(){t.destroyed||(t.allowClick=!0)})),!i.isTouched||!i.isMoved||!t.swipeDirection||0===a.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,p=s.followFinger?r?t.translate:-t.translate:-i.currentTranslate,!s.cssMode)if(s.freeMode){if(p<-t.minTranslate())return void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return void(t.slides.length1){var v=i.velocities.pop(),f=i.velocities.pop(),m=v.position-f.position,g=v.time-f.time;t.velocity=m/g,t.velocity/=2,Math.abs(t.velocity)150||n.now()-v.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=s.freeModeMomentumVelocityRatio,i.velocities.length=0;var b=1e3*s.freeModeMomentumRatio,w=t.velocity*b,y=t.translate+w;r&&(y=-y);var x,T,E=!1,S=20*Math.abs(t.velocity)*s.freeModeMomentumBounceRatio;if(yt.minTranslate())s.freeModeMomentumBounce?(y-t.minTranslate()>S&&(y=t.minTranslate()+S),x=t.minTranslate(),E=!0,i.allowMomentumBounce=!0):y=t.minTranslate(),s.loop&&s.centeredSlides&&(T=!0);else if(s.freeModeSticky){for(var C,M=0;M-y){C=M;break}y=-(y=Math.abs(d[C]-y)=s.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var k=0,$=t.slidesSizesGrid[0],L=0;L=l[L]&&p=l[L]&&(k=L,$=l[l.length-1]-l[l.length-2])}var D=(p-l[k])/$,O=ks.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(D>=s.longSwipesRatio?t.slideTo(k+O):t.slideTo(k)),"prev"===t.swipeDirection&&(D>1-s.longSwipesRatio?t.slideTo(k+O):t.slideTo(k))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(h.target===t.navigation.nextEl||h.target===t.navigation.prevEl)?h.target===t.navigation.nextEl?t.slideTo(k+O):t.slideTo(k):("next"===t.swipeDirection&&t.slideTo(k+O),"prev"===t.swipeDirection&&t.slideTo(k))}}}function G(){var e=this.params,t=this.el;if(!t||0!==t.offsetWidth){e.breakpoints&&this.setBreakpoint();var i=this.allowSlideNext,s=this.allowSlidePrev,a=this.snapGrid;this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),this.updateSlidesClasses(),("auto"===e.slidesPerView||e.slidesPerView>1)&&this.isEnd&&!this.params.centeredSlides?this.slideTo(this.slides.length-1,0,!1,!0):this.slideTo(this.activeIndex,0,!1,!0),this.autoplay&&this.autoplay.running&&this.autoplay.paused&&this.autoplay.run(),this.allowSlidePrev=s,this.allowSlideNext=i,this.params.watchOverflow&&a!==this.snapGrid&&this.checkOverflow()}}function B(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function H(){var e=this.wrapperEl;this.previousTranslate=this.translate,this.translate=this.isHorizontal()?-e.scrollLeft:-e.scrollTop,-0===this.translate&&(this.translate=0),this.updateActiveIndex(),this.updateSlidesClasses();var t=this.maxTranslate()-this.minTranslate();(0===t?0:(this.translate-this.minTranslate())/t)!==this.progress&&this.updateProgress(this.translate),this.emit("setTranslate",this.translate,!1)}var N=!1;function X(){}var V={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0},Y={update:h,translate:p,transition:c,slide:u,loop:v,grabCursor:f,manipulation:L,events:{attachEvents:function(){var t=this.params,i=this.touchEvents,s=this.el,a=this.wrapperEl;this.onTouchStart=D.bind(this),this.onTouchMove=O.bind(this),this.onTouchEnd=A.bind(this),t.cssMode&&(this.onScroll=H.bind(this)),this.onClick=B.bind(this);var r=!!t.nested;if(!o.touch&&o.pointerEvents)s.addEventListener(i.start,this.onTouchStart,!1),e.addEventListener(i.move,this.onTouchMove,r),e.addEventListener(i.end,this.onTouchEnd,!1);else{if(o.touch){var n=!("touchstart"!==i.start||!o.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.addEventListener(i.start,this.onTouchStart,n),s.addEventListener(i.move,this.onTouchMove,o.passiveListener?{passive:!1,capture:r}:r),s.addEventListener(i.end,this.onTouchEnd,n),i.cancel&&s.addEventListener(i.cancel,this.onTouchEnd,n),N||(e.addEventListener("touchstart",X),N=!0)}(t.simulateTouch&&!I.ios&&!I.android||t.simulateTouch&&!o.touch&&I.ios)&&(s.addEventListener("mousedown",this.onTouchStart,!1),e.addEventListener("mousemove",this.onTouchMove,r),e.addEventListener("mouseup",this.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.addEventListener("click",this.onClick,!0),t.cssMode&&a.addEventListener("scroll",this.onScroll),t.updateOnWindowResize?this.on(I.ios||I.android?"resize orientationchange observerUpdate":"resize observerUpdate",G,!0):this.on("observerUpdate",G,!0)},detachEvents:function(){var t=this.params,i=this.touchEvents,s=this.el,a=this.wrapperEl,r=!!t.nested;if(!o.touch&&o.pointerEvents)s.removeEventListener(i.start,this.onTouchStart,!1),e.removeEventListener(i.move,this.onTouchMove,r),e.removeEventListener(i.end,this.onTouchEnd,!1);else{if(o.touch){var n=!("onTouchStart"!==i.start||!o.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};s.removeEventListener(i.start,this.onTouchStart,n),s.removeEventListener(i.move,this.onTouchMove,r),s.removeEventListener(i.end,this.onTouchEnd,n),i.cancel&&s.removeEventListener(i.cancel,this.onTouchEnd,n)}(t.simulateTouch&&!I.ios&&!I.android||t.simulateTouch&&!o.touch&&I.ios)&&(s.removeEventListener("mousedown",this.onTouchStart,!1),e.removeEventListener("mousemove",this.onTouchMove,r),e.removeEventListener("mouseup",this.onTouchEnd,!1))}(t.preventClicks||t.preventClicksPropagation)&&s.removeEventListener("click",this.onClick,!0),t.cssMode&&a.removeEventListener("scroll",this.onScroll),this.off(I.ios||I.android?"resize orientationchange observerUpdate":"resize observerUpdate",G)}},breakpoints:{setBreakpoint:function(){var e=this.activeIndex,t=this.initialized,i=this.loopedSlides;void 0===i&&(i=0);var s=this.params,a=this.$el,r=s.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var o=this.getBreakpoint(r);if(o&&this.currentBreakpoint!==o){var l=o in r?r[o]:void 0;l&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(e){var t=l[e];void 0!==t&&(l[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}));var d=l||this.originalParams,h=s.slidesPerColumn>1,p=d.slidesPerColumn>1;h&&!p?a.removeClass(s.containerModifierClass+"multirow "+s.containerModifierClass+"multirow-column"):!h&&p&&(a.addClass(s.containerModifierClass+"multirow"),"column"===d.slidesPerColumnFill&&a.addClass(s.containerModifierClass+"multirow-column"));var c=d.direction&&d.direction!==s.direction,u=s.loop&&(d.slidesPerView!==s.slidesPerView||c);c&&t&&this.changeDirection(),n.extend(this.params,d),n.extend(this,{allowTouchMove:this.params.allowTouchMove,allowSlideNext:this.params.allowSlideNext,allowSlidePrev:this.params.allowSlidePrev}),this.currentBreakpoint=o,u&&t&&(this.loopDestroy(),this.loopCreate(),this.updateSlides(),this.slideTo(e-i+this.loopedSlides,0,!1)),this.emit("breakpoint",d)}}},getBreakpoint:function(e){if(e){var i=!1,s=Object.keys(e).map((function(e){if("string"==typeof e&&e.startsWith("@")){var i=parseFloat(e.substr(1));return{value:t.innerHeight*i,point:e}}return{value:e,point:e}}));s.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var a=0;a0&&e.slidesOffsetBefore+e.spaceBetween*(this.slides.length-1)+this.slides[0].offsetWidth*this.slides.length;e.slidesOffsetBefore&&e.slidesOffsetAfter&&i?this.isLocked=i<=this.size:this.isLocked=1===this.snapGrid.length,this.allowSlideNext=!this.isLocked,this.allowSlidePrev=!this.isLocked,t!==this.isLocked&&this.emit(this.isLocked?"lock":"unlock"),t&&t!==this.isLocked&&(this.isEnd=!1,this.navigation.update())}},classes:{addClasses:function(){var e=this.classNames,t=this.params,i=this.rtl,s=this.$el,a=[];a.push("initialized"),a.push(t.direction),t.freeMode&&a.push("free-mode"),t.autoHeight&&a.push("autoheight"),i&&a.push("rtl"),t.slidesPerColumn>1&&(a.push("multirow"),"column"===t.slidesPerColumnFill&&a.push("multirow-column")),I.android&&a.push("android"),I.ios&&a.push("ios"),t.cssMode&&a.push("css-mode"),a.forEach((function(i){e.push(t.containerModifierClass+i)})),s.addClass(e.join(" "))},removeClasses:function(){var e=this.$el,t=this.classNames;e.removeClass(t.join(" "))}},images:{loadImage:function(e,i,s,a,r,n){var o;function l(){n&&n()}e.complete&&r?l():i?((o=new t.Image).onload=l,o.onerror=l,a&&(o.sizes=a),s&&(o.srcset=s),i&&(o.src=i)):l()},preloadImages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var i=0;i1){var u=[];return c.each((function(e,i){var s=n.extend({},r,{el:i});u.push(new t(s))})),u}var v,f,m;return a.swiper=h,c.data("swiper",h),a&&a.shadowRoot&&a.shadowRoot.querySelector?(v=s(a.shadowRoot.querySelector("."+h.params.wrapperClass))).children=function(e){return c.children(e)}:v=c.children("."+h.params.wrapperClass),n.extend(h,{$el:c,el:a,$wrapperEl:v,wrapperEl:v[0],classNames:[],slides:s(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===h.params.direction},isVertical:function(){return"vertical"===h.params.direction},rtl:"rtl"===a.dir.toLowerCase()||"rtl"===c.css("direction"),rtlTranslate:"horizontal"===h.params.direction&&("rtl"===a.dir.toLowerCase()||"rtl"===c.css("direction")),wrongRTL:"-webkit-box"===v.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:h.params.allowSlideNext,allowSlidePrev:h.params.allowSlidePrev,touchEvents:(f=["touchstart","touchmove","touchend","touchcancel"],m=["mousedown","mousemove","mouseup"],o.pointerEvents&&(m=["pointerdown","pointermove","pointerup"]),h.touchEventsTouch={start:f[0],move:f[1],end:f[2],cancel:f[3]},h.touchEventsDesktop={start:m[0],move:m[1],end:m[2]},o.touch||!h.params.simulateTouch?h.touchEventsTouch:h.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video",lastClickTime:n.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:h.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),h.useModules(),h.params.init&&h.init(),h}}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return t.prototype.slidesPerViewDynamic=function(){var e=this.params,t=this.slides,i=this.slidesGrid,s=this.size,a=this.activeIndex,r=1;if(e.centeredSlides){for(var n,o=t[a].swiperSlideSize,l=a+1;ls&&(n=!0));for(var d=a-1;d>=0;d-=1)t[d]&&!n&&(r+=1,(o+=t[d].swiperSlideSize)>s&&(n=!0))}else for(var h=a+1;h1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||s(),i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function s(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},t.prototype.changeDirection=function(e,t){void 0===t&&(t=!0);var i=this.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e?this:(this.$el.removeClass(""+this.params.containerModifierClass+i).addClass(""+this.params.containerModifierClass+e),this.params.direction=e,this.slides.each((function(t,i){"vertical"===e?i.style.width="":i.style.height=""})),this.emit("changeDirection"),t&&this.update(),this)},t.prototype.init=function(){this.initialized||(this.emit("beforeInit"),this.params.breakpoints&&this.setBreakpoint(),this.addClasses(),this.params.loop&&this.loopCreate(),this.updateSize(),this.updateSlides(),this.params.watchOverflow&&this.checkOverflow(),this.params.grabCursor&&this.setGrabCursor(),this.params.preloadImages&&this.preloadImages(),this.params.loop?this.slideTo(this.params.initialSlide+this.loopedSlides,0,this.params.runCallbacksOnInit):this.slideTo(this.params.initialSlide,0,this.params.runCallbacksOnInit),this.attachEvents(),this.initialized=!0,this.emit("init"))},t.prototype.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i=this,s=i.params,a=i.$el,r=i.$wrapperEl,o=i.slides;return void 0===i.params||i.destroyed?null:(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),a.removeAttr("style"),r.removeAttr("style"),o&&o.length&&o.removeClass([s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((function(e){i.off(e)})),!1!==e&&(i.$el[0].swiper=null,i.$el.data("swiper",null),n.deleteProps(i)),i.destroyed=!0,null)},t.extendDefaults=function(e){n.extend(F,e)},i.extendedDefaults.get=function(){return F},i.defaults.get=function(){return V},i.Class.get=function(){return e},i.$.get=function(){return s},Object.defineProperties(t,i),t}(l),R={name:"device",proto:{device:I},static:{device:I}},q={name:"support",proto:{support:o},static:{support:o}},j={isEdge:!!t.navigator.userAgent.match(/Edge/g),isSafari:function(){var e=t.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)},K={name:"browser",proto:{browser:j},static:{browser:j}},U={name:"resize",create:function(){var e=this;n.extend(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){t.addEventListener("resize",this.resize.resizeHandler),t.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy:function(){t.removeEventListener("resize",this.resize.resizeHandler),t.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}},_={func:t.MutationObserver||t.WebkitMutationObserver,attach:function(e,i){void 0===i&&(i={});var s=this,a=new(0,_.func)((function(e){if(1!==e.length){var i=function(){s.emit("observerUpdate",e[0])};t.requestAnimationFrame?t.requestAnimationFrame(i):t.setTimeout(i,0)}else s.emit("observerUpdate",e[0])}));a.observe(e,{attributes:void 0===i.attributes||i.attributes,childList:void 0===i.childList||i.childList,characterData:void 0===i.characterData||i.characterData}),s.observer.observers.push(a)},init:function(){if(o.observer&&this.params.observer){if(this.params.observeParents)for(var e=this.$el.parents(),t=0;tT)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+P+'"]').remove();for(var z=0;z=x&&z<=T&&(void 0===c||e?M.push(z):(z>c&&M.push(z),z'+e+"");return a.attr("data-swiper-slide-index")||a.attr("data-swiper-slide-index",t),i.cache&&(this.virtual.cache[t]=a),a},appendSlide:function(e){if("object"==typeof e&&"length"in e)for(var t=0;t=0;i-=1)this.virtual.slides.splice(e[i],1),this.params.virtual.cache&&delete this.virtual.cache[e[i]],e[i]0&&0===this.$el.parents("."+this.params.slideActiveClass).length)return;var o=t.innerWidth,l=t.innerHeight,d=this.$el.offset();s&&(d.left-=this.$el[0].scrollLeft);for(var h=[[d.left,d.top],[d.left+this.width,d.top],[d.left,d.top+this.height],[d.left+this.width,d.top+this.height]],p=0;p=0&&c[0]<=o&&c[1]>=0&&c[1]<=l&&(n=!0)}if(!n)return}this.isHorizontal()?(33!==r&&34!==r&&37!==r&&39!==r||(a.preventDefault?a.preventDefault():a.returnValue=!1),(34!==r&&39!==r||s)&&(33!==r&&37!==r||!s)||this.slideNext(),(33!==r&&37!==r||s)&&(34!==r&&39!==r||!s)||this.slidePrev()):(33!==r&&34!==r&&38!==r&&40!==r||(a.preventDefault?a.preventDefault():a.returnValue=!1),34!==r&&40!==r||this.slideNext(),33!==r&&38!==r||this.slidePrev()),this.emit("keyPress",r)}},enable:function(){this.keyboard.enabled||(s(e).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&&(s(e).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},te={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create:function(){n.extend(this,{keyboard:{enabled:!1,enable:ee.enable.bind(this),disable:ee.disable.bind(this),handle:ee.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}};var ie={lastScrollTime:n.now(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return t.navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var t="onwheel"in e;if(!t){var i=e.createElement("div");i.setAttribute("onwheel","return;"),t="function"==typeof i.onwheel}return!t&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(t=e.implementation.hasFeature("Events.wheel","3.0")),t}()?"wheel":"mousewheel"},normalize:function(e){var t=0,i=0,s=0,a=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),s=10*t,a=10*i,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(s=e.deltaX),e.shiftKey&&!s&&(s=a,a=0),(s||a)&&e.deltaMode&&(1===e.deltaMode?(s*=40,a*=40):(s*=800,a*=800)),s&&!t&&(t=s<1?-1:1),a&&!i&&(i=a<1?-1:1),{spinX:t,spinY:i,pixelX:s,pixelY:a}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,i=this,a=i.params.mousewheel;i.params.cssMode&&t.preventDefault();var r=i.$el;if("container"!==i.params.mousewheel.eventsTarged&&(r=s(i.params.mousewheel.eventsTarged)),!i.mouseEntered&&!r[0].contains(t.target)&&!a.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var o=0,l=i.rtlTranslate?-1:1,d=ie.normalize(t);if(a.forceToAxis)if(i.isHorizontal()){if(!(Math.abs(d.pixelX)>Math.abs(d.pixelY)))return!0;o=d.pixelX*l}else{if(!(Math.abs(d.pixelY)>Math.abs(d.pixelX)))return!0;o=d.pixelY}else o=Math.abs(d.pixelX)>Math.abs(d.pixelY)?-d.pixelX*l:-d.pixelY;if(0===o)return!0;if(a.invert&&(o=-o),i.params.freeMode){var h={time:n.now(),delta:Math.abs(o),direction:Math.sign(o)},p=i.mousewheel.lastEventBeforeSnap,c=p&&h.time=i.minTranslate()&&(u=i.minTranslate()),u<=i.maxTranslate()&&(u=i.maxTranslate()),i.setTransition(0),i.setTranslate(u),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!v&&i.isBeginning||!f&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky){clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var m=i.mousewheel.recentWheelEvents;m.length>=15&&m.shift();var g=m.length?m[m.length-1]:void 0,b=m[0];if(m.push(h),g&&(h.delta>g.delta||h.direction!==g.direction))m.splice(0);else if(m.length>=15&&h.time-b.time<500&&b.delta-h.delta>=1&&h.delta<=6){var w=o>0?.8:.2;i.mousewheel.lastEventBeforeSnap=h,m.splice(0),i.mousewheel.timeout=n.nextTick((function(){i.slideToClosest(i.params.speed,!0,void 0,w)}),0)}i.mousewheel.timeout||(i.mousewheel.timeout=n.nextTick((function(){i.mousewheel.lastEventBeforeSnap=h,m.splice(0),i.slideToClosest(i.params.speed,!0,void 0,.5)}),500))}if(c||i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),u===i.minTranslate()||u===i.maxTranslate())return!0}}else{var y={time:n.now(),delta:Math.abs(o),direction:Math.sign(o),raw:e},x=i.mousewheel.recentWheelEvents;x.length>=2&&x.shift();var T=x.length?x[x.length-1]:void 0;if(x.push(y),T?(y.direction!==T.direction||y.delta>T.delta)&&i.mousewheel.animateSlider(y):i.mousewheel.animateSlider(y),i.mousewheel.releaseScroll(y))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},animateSlider:function(e){return e.delta>=6&&n.now()-this.mousewheel.lastScrollTime<60||(e.direction<0?this.isEnd&&!this.params.loop||this.animating||(this.slideNext(),this.emit("scroll",e.raw)):this.isBeginning&&!this.params.loop||this.animating||(this.slidePrev(),this.emit("scroll",e.raw)),this.mousewheel.lastScrollTime=(new t.Date).getTime(),!1)},releaseScroll:function(e){var t=this.params.mousewheel;if(e.direction<0){if(this.isEnd&&!this.params.loop&&t.releaseOnEdges)return!0}else if(this.isBeginning&&!this.params.loop&&t.releaseOnEdges)return!0;return!1},enable:function(){var e=ie.event();if(this.params.cssMode)return this.wrapperEl.removeEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(t=s(this.params.mousewheel.eventsTarged)),t.on("mouseenter",this.mousewheel.handleMouseEnter),t.on("mouseleave",this.mousewheel.handleMouseLeave),t.on(e,this.mousewheel.handle),this.mousewheel.enabled=!0,!0},disable:function(){var e=ie.event();if(this.params.cssMode)return this.wrapperEl.addEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(!this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(t=s(this.params.mousewheel.eventsTarged)),t.off(e,this.mousewheel.handle),this.mousewheel.enabled=!1,!0}},se={update:function(){var e=this.params.navigation;if(!this.params.loop){var t=this.navigation,i=t.$nextEl,s=t.$prevEl;s&&s.length>0&&(this.isBeginning?s.addClass(e.disabledClass):s.removeClass(e.disabledClass),s[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass)),i&&i.length>0&&(this.isEnd?i.addClass(e.disabledClass):i.removeClass(e.disabledClass),i[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass))}},onPrevClick:function(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick:function(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init:function(){var e,t,i=this.params.navigation;(i.nextEl||i.prevEl)&&(i.nextEl&&(e=s(i.nextEl),this.params.uniqueNavElements&&"string"==typeof i.nextEl&&e.length>1&&1===this.$el.find(i.nextEl).length&&(e=this.$el.find(i.nextEl))),i.prevEl&&(t=s(i.prevEl),this.params.uniqueNavElements&&"string"==typeof i.prevEl&&t.length>1&&1===this.$el.find(i.prevEl).length&&(t=this.$el.find(i.prevEl))),e&&e.length>0&&e.on("click",this.navigation.onNextClick),t&&t.length>0&&t.on("click",this.navigation.onPrevClick),n.extend(this.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this.navigation,t=e.$nextEl,i=e.$prevEl;t&&t.length&&(t.off("click",this.navigation.onNextClick),t.removeClass(this.params.navigation.disabledClass)),i&&i.length&&(i.off("click",this.navigation.onPrevClick),i.removeClass(this.params.navigation.disabledClass))}},ae={update:function(){var e=this.rtl,t=this.params.pagination;if(t.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var i,a=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,r=this.pagination.$el,n=this.params.loop?Math.ceil((a-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length;if(this.params.loop?((i=Math.ceil((this.activeIndex-this.loopedSlides)/this.params.slidesPerGroup))>a-1-2*this.loopedSlides&&(i-=a-2*this.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==this.params.paginationType&&(i=n+i)):i=void 0!==this.snapIndex?this.snapIndex:this.activeIndex||0,"bullets"===t.type&&this.pagination.bullets&&this.pagination.bullets.length>0){var o,l,d,h=this.pagination.bullets;if(t.dynamicBullets&&(this.pagination.bulletSize=h.eq(0)[this.isHorizontal()?"outerWidth":"outerHeight"](!0),r.css(this.isHorizontal()?"width":"height",this.pagination.bulletSize*(t.dynamicMainBullets+4)+"px"),t.dynamicMainBullets>1&&void 0!==this.previousIndex&&(this.pagination.dynamicBulletIndex+=i-this.previousIndex,this.pagination.dynamicBulletIndex>t.dynamicMainBullets-1?this.pagination.dynamicBulletIndex=t.dynamicMainBullets-1:this.pagination.dynamicBulletIndex<0&&(this.pagination.dynamicBulletIndex=0)),o=i-this.pagination.dynamicBulletIndex,d=((l=o+(Math.min(h.length,t.dynamicMainBullets)-1))+o)/2),h.removeClass(t.bulletActiveClass+" "+t.bulletActiveClass+"-next "+t.bulletActiveClass+"-next-next "+t.bulletActiveClass+"-prev "+t.bulletActiveClass+"-prev-prev "+t.bulletActiveClass+"-main"),r.length>1)h.each((function(e,a){var r=s(a),n=r.index();n===i&&r.addClass(t.bulletActiveClass),t.dynamicBullets&&(n>=o&&n<=l&&r.addClass(t.bulletActiveClass+"-main"),n===o&&r.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),n===l&&r.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next"))}));else{var p=h.eq(i),c=p.index();if(p.addClass(t.bulletActiveClass),t.dynamicBullets){for(var u=h.eq(o),v=h.eq(l),f=o;f<=l;f+=1)h.eq(f).addClass(t.bulletActiveClass+"-main");if(this.params.loop)if(c>=h.length-t.dynamicMainBullets){for(var m=t.dynamicMainBullets;m>=0;m-=1)h.eq(h.length-m).addClass(t.bulletActiveClass+"-main");h.eq(h.length-t.dynamicMainBullets-1).addClass(t.bulletActiveClass+"-prev")}else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),v.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next");else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),v.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next")}}if(t.dynamicBullets){var g=Math.min(h.length,t.dynamicMainBullets+4),b=(this.pagination.bulletSize*g-this.pagination.bulletSize)/2-d*this.pagination.bulletSize,w=e?"right":"left";h.css(this.isHorizontal()?w:"top",b+"px")}}if("fraction"===t.type&&(r.find("."+t.currentClass).text(t.formatFractionCurrent(i+1)),r.find("."+t.totalClass).text(t.formatFractionTotal(n))),"progressbar"===t.type){var y;y=t.progressbarOpposite?this.isHorizontal()?"vertical":"horizontal":this.isHorizontal()?"horizontal":"vertical";var x=(i+1)/n,T=1,E=1;"horizontal"===y?T=x:E=x,r.find("."+t.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+T+") scaleY("+E+")").transition(this.params.speed)}"custom"===t.type&&t.renderCustom?(r.html(t.renderCustom(this,i+1,n)),this.emit("paginationRender",this,r[0])):this.emit("paginationUpdate",this,r[0]),r[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](t.lockClass)}},render:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,i=this.pagination.$el,s="";if("bullets"===e.type){for(var a=this.params.loop?Math.ceil((t-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length,r=0;r";i.html(s),this.pagination.bullets=i.find("."+e.bulletClass)}"fraction"===e.type&&(s=e.renderFraction?e.renderFraction.call(this,e.currentClass,e.totalClass):' / ',i.html(s)),"progressbar"===e.type&&(s=e.renderProgressbar?e.renderProgressbar.call(this,e.progressbarFillClass):'',i.html(s)),"custom"!==e.type&&this.emit("paginationRender",this.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var i=s(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&i.length>1&&1===e.$el.find(t.el).length&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click","."+t.bulletClass,(function(t){t.preventDefault();var i=s(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)})),n.extend(e.pagination,{$el:i,el:i[0]}))}},destroy:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.pagination.$el;t.removeClass(e.hiddenClass),t.removeClass(e.modifierClass+e.type),this.pagination.bullets&&this.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&t.off("click","."+e.bulletClass)}}},re={setTranslate:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=this.rtlTranslate,i=this.progress,s=e.dragSize,a=e.trackSize,r=e.$dragEl,n=e.$el,o=this.params.scrollbar,l=s,d=(a-s)*i;t?(d=-d)>0?(l=s-d,d=0):-d+s>a&&(l=a+d):d<0?(l=s+d,d=0):d+s>a&&(l=a-d),this.isHorizontal()?(r.transform("translate3d("+d+"px, 0, 0)"),r[0].style.width=l+"px"):(r.transform("translate3d(0px, "+d+"px, 0)"),r[0].style.height=l+"px"),o.hide&&(clearTimeout(this.scrollbar.timeout),n[0].style.opacity=1,this.scrollbar.timeout=setTimeout((function(){n[0].style.opacity=0,n.transition(400)}),1e3))}},setTransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=e.$dragEl,i=e.$el;t[0].style.width="",t[0].style.height="";var s,a=this.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,r=this.size/this.virtualSize,o=r*(a/this.size);s="auto"===this.params.scrollbar.dragSize?a*r:parseInt(this.params.scrollbar.dragSize,10),this.isHorizontal()?t[0].style.width=s+"px":t[0].style.height=s+"px",i[0].style.display=r>=1?"none":"",this.params.scrollbar.hide&&(i[0].style.opacity=0),n.extend(e,{trackSize:a,divider:r,moveDivider:o,dragSize:s}),e.$el[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](this.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,i=this.scrollbar,s=this.rtlTranslate,a=i.$el,r=i.dragSize,n=i.trackSize,o=i.dragStartPos;t=(i.getPointerPosition(e)-a.offset()[this.isHorizontal()?"left":"top"]-(null!==o?o:r/2))/(n-r),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var l=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*t;this.updateProgress(l),this.setTranslate(l),this.updateActiveIndex(),this.updateSlidesClasses()},onDragStart:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el,r=i.$dragEl;this.scrollbar.isTouched=!0,this.scrollbar.dragStartPos=e.target===r[0]||e.target===r?i.getPointerPosition(e)-e.target.getBoundingClientRect()[this.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),r.transition(100),i.setDragPosition(e),clearTimeout(this.scrollbar.dragTimeout),a.transition(0),t.hide&&a.css("opacity",1),this.params.cssMode&&this.$wrapperEl.css("scroll-snap-type","none"),this.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this.scrollbar,i=this.$wrapperEl,s=t.$el,a=t.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),i.transition(0),s.transition(0),a.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el;this.scrollbar.isTouched&&(this.scrollbar.isTouched=!1,this.params.cssMode&&(this.$wrapperEl.css("scroll-snap-type",""),s.transition("")),t.hide&&(clearTimeout(this.scrollbar.dragTimeout),this.scrollbar.dragTimeout=n.nextTick((function(){a.css("opacity",0),a.transition(400)}),1e3)),this.emit("scrollbarDragEnd",e),t.snapOnRelease&&this.slideToClosest())},enableDraggable:function(){if(this.params.scrollbar.el){var t=this.scrollbar,i=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,r=t.$el[0],n=!(!o.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},l=!(!o.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};o.touch?(r.addEventListener(i.start,this.scrollbar.onDragStart,n),r.addEventListener(i.move,this.scrollbar.onDragMove,n),r.addEventListener(i.end,this.scrollbar.onDragEnd,l)):(r.addEventListener(s.start,this.scrollbar.onDragStart,n),e.addEventListener(s.move,this.scrollbar.onDragMove,n),e.addEventListener(s.end,this.scrollbar.onDragEnd,l))}},disableDraggable:function(){if(this.params.scrollbar.el){var t=this.scrollbar,i=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,r=t.$el[0],n=!(!o.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},l=!(!o.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};o.touch?(r.removeEventListener(i.start,this.scrollbar.onDragStart,n),r.removeEventListener(i.move,this.scrollbar.onDragMove,n),r.removeEventListener(i.end,this.scrollbar.onDragEnd,l)):(r.removeEventListener(s.start,this.scrollbar.onDragStart,n),e.removeEventListener(s.move,this.scrollbar.onDragMove,n),e.removeEventListener(s.end,this.scrollbar.onDragEnd,l))}},init:function(){if(this.params.scrollbar.el){var e=this.scrollbar,t=this.$el,i=this.params.scrollbar,a=s(i.el);this.params.uniqueNavElements&&"string"==typeof i.el&&a.length>1&&1===t.find(i.el).length&&(a=t.find(i.el));var r=a.find("."+this.params.scrollbar.dragClass);0===r.length&&(r=s('
'),a.append(r)),n.extend(e,{$el:a,el:a[0],$dragEl:r,dragEl:r[0]}),i.draggable&&e.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},ne={setTransform:function(e,t){var i=this.rtl,a=s(e),r=i?-1:1,n=a.attr("data-swiper-parallax")||"0",o=a.attr("data-swiper-parallax-x"),l=a.attr("data-swiper-parallax-y"),d=a.attr("data-swiper-parallax-scale"),h=a.attr("data-swiper-parallax-opacity");if(o||l?(o=o||"0",l=l||"0"):this.isHorizontal()?(o=n,l="0"):(l=n,o="0"),o=o.indexOf("%")>=0?parseInt(o,10)*t*r+"%":o*t*r+"px",l=l.indexOf("%")>=0?parseInt(l,10)*t+"%":l*t+"px",null!=h){var p=h-(h-1)*(1-Math.abs(t));a[0].style.opacity=p}if(null==d)a.transform("translate3d("+o+", "+l+", 0px)");else{var c=d-(d-1)*(1-Math.abs(t));a.transform("translate3d("+o+", "+l+", 0px) scale("+c+")")}},setTranslate:function(){var e=this,t=e.$el,i=e.slides,a=e.progress,r=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,a)})),i.each((function(t,i){var n=i.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(n+=Math.ceil(t/2)-a*(r.length-1)),n=Math.min(Math.max(n,-1),1),s(i).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,n)}))}))},setTransition:function(e){void 0===e&&(e=this.params.speed);this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){var a=s(i),r=parseInt(a.attr("data-swiper-parallax-duration"),10)||e;0===e&&(r=0),a.transition(r)}))}},oe={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,a=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-t,2)+Math.pow(a-i,2))},onGestureStart:function(e){var t=this.params.zoom,i=this.zoom,a=i.gesture;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!o.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,a.scaleStart=oe.getDistanceBetweenTouches(e)}a.$slideEl&&a.$slideEl.length||(a.$slideEl=s(e.target).closest(".swiper-slide"),0===a.$slideEl.length&&(a.$slideEl=this.slides.eq(this.activeIndex)),a.$imageEl=a.$slideEl.find("img, svg, canvas"),a.$imageWrapEl=a.$imageEl.parent("."+t.containerClass),a.maxRatio=a.$imageWrapEl.attr("data-swiper-zoom")||t.maxRatio,0!==a.$imageWrapEl.length)?(a.$imageEl.transition(0),this.zoom.isScaling=!0):a.$imageEl=void 0},onGestureChange:function(e){var t=this.params.zoom,i=this.zoom,s=i.gesture;if(!o.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;i.fakeGestureMoved=!0,s.scaleMove=oe.getDistanceBetweenTouches(e)}s.$imageEl&&0!==s.$imageEl.length&&(o.gestures?i.scale=e.scale*i.currentScale:i.scale=s.scaleMove/s.scaleStart*i.currentScale,i.scale>s.maxRatio&&(i.scale=s.maxRatio-1+Math.pow(i.scale-s.maxRatio+1,.5)),i.scales.touchesStart.x))return void(s.isTouched=!1);if(!this.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.ys.touchesStart.y))return void(s.isTouched=!1)}e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentXs.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentYs.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),a.prevPositionX||(a.prevPositionX=s.touchesCurrent.x),a.prevPositionY||(a.prevPositionY=s.touchesCurrent.y),a.prevTime||(a.prevTime=Date.now()),a.x=(s.touchesCurrent.x-a.prevPositionX)/(Date.now()-a.prevTime)/2,a.y=(s.touchesCurrent.y-a.prevPositionY)/(Date.now()-a.prevTime)/2,Math.abs(s.touchesCurrent.x-a.prevPositionX)<2&&(a.x=0),Math.abs(s.touchesCurrent.y-a.prevPositionY)<2&&(a.y=0),a.prevPositionX=s.touchesCurrent.x,a.prevPositionY=s.touchesCurrent.y,a.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,i=e.image,s=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!i.isTouched||!i.isMoved)return i.isTouched=!1,void(i.isMoved=!1);i.isTouched=!1,i.isMoved=!1;var a=300,r=300,n=s.x*a,o=i.currentX+n,l=s.y*r,d=i.currentY+l;0!==s.x&&(a=Math.abs((o-i.currentX)/s.x)),0!==s.y&&(r=Math.abs((d-i.currentY)/s.y));var h=Math.max(a,r);i.currentX=o,i.currentY=d;var p=i.width*e.scale,c=i.height*e.scale;i.minX=Math.min(t.slideWidth/2-p/2,0),i.maxX=-i.minX,i.minY=Math.min(t.slideHeight/2-c/2,0),i.maxY=-i.minY,i.currentX=Math.max(Math.min(i.currentX,i.maxX),i.minX),i.currentY=Math.max(Math.min(i.currentY,i.maxY),i.minY),t.$imageWrapEl.transition(h).transform("translate3d("+i.currentX+"px, "+i.currentY+"px,0)")}},onTransitionEnd:function(){var e=this.zoom,t=e.gesture;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl.transform("translate3d(0,0,0) scale(1)"),t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,i,a,r,n,o,l,d,h,p,c,u,v,f,m,g,b=this.zoom,w=this.params.zoom,y=b.gesture,x=b.image;(y.$slideEl||(y.$slideEl=this.clickedSlide?s(this.clickedSlide):this.slides.eq(this.activeIndex),y.$imageEl=y.$slideEl.find("img, svg, canvas"),y.$imageWrapEl=y.$imageEl.parent("."+w.containerClass)),y.$imageEl&&0!==y.$imageEl.length)&&(y.$slideEl.addClass(""+w.zoomedSlideClass),void 0===x.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,i="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=x.touchesStart.x,i=x.touchesStart.y),b.scale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,b.currentScale=y.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(m=y.$slideEl[0].offsetWidth,g=y.$slideEl[0].offsetHeight,a=y.$slideEl.offset().left+m/2-t,r=y.$slideEl.offset().top+g/2-i,l=y.$imageEl[0].offsetWidth,d=y.$imageEl[0].offsetHeight,h=l*b.scale,p=d*b.scale,v=-(c=Math.min(m/2-h/2,0)),f=-(u=Math.min(g/2-p/2,0)),(n=a*b.scale)v&&(n=v),(o=r*b.scale)f&&(o=f)):(n=0,o=0),y.$imageWrapEl.transition(300).transform("translate3d("+n+"px, "+o+"px,0)"),y.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+b.scale+")"))},out:function(){var e=this.zoom,t=this.params.zoom,i=e.gesture;i.$slideEl||(i.$slideEl=this.clickedSlide?s(this.clickedSlide):this.slides.eq(this.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas"),i.$imageWrapEl=i.$imageEl.parent("."+t.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(e.scale=1,e.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+t.zoomedSlideClass),i.$slideEl=void 0)},enable:function(){var e=this.zoom;if(!e.enabled){e.enabled=!0;var t=!("touchstart"!==this.touchEvents.start||!o.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1},i=!o.passiveListener||{passive:!1,capture:!0};o.gestures?(this.$wrapperEl.on("gesturestart",".swiper-slide",e.onGestureStart,t),this.$wrapperEl.on("gesturechange",".swiper-slide",e.onGestureChange,t),this.$wrapperEl.on("gestureend",".swiper-slide",e.onGestureEnd,t)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.on(this.touchEvents.start,".swiper-slide",e.onGestureStart,t),this.$wrapperEl.on(this.touchEvents.move,".swiper-slide",e.onGestureChange,i),this.$wrapperEl.on(this.touchEvents.end,".swiper-slide",e.onGestureEnd,t),this.touchEvents.cancel&&this.$wrapperEl.on(this.touchEvents.cancel,".swiper-slide",e.onGestureEnd,t)),this.$wrapperEl.on(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove,i)}},disable:function(){var e=this.zoom;if(e.enabled){this.zoom.enabled=!1;var t=!("touchstart"!==this.touchEvents.start||!o.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1},i=!o.passiveListener||{passive:!1,capture:!0};o.gestures?(this.$wrapperEl.off("gesturestart",".swiper-slide",e.onGestureStart,t),this.$wrapperEl.off("gesturechange",".swiper-slide",e.onGestureChange,t),this.$wrapperEl.off("gestureend",".swiper-slide",e.onGestureEnd,t)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.off(this.touchEvents.start,".swiper-slide",e.onGestureStart,t),this.$wrapperEl.off(this.touchEvents.move,".swiper-slide",e.onGestureChange,i),this.$wrapperEl.off(this.touchEvents.end,".swiper-slide",e.onGestureEnd,t),this.touchEvents.cancel&&this.$wrapperEl.off(this.touchEvents.cancel,".swiper-slide",e.onGestureEnd,t)),this.$wrapperEl.off(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove,i)}}},le={loadInSlide:function(e,t){void 0===t&&(t=!0);var i=this,a=i.params.lazy;if(void 0!==e&&0!==i.slides.length){var r=i.virtual&&i.params.virtual.enabled?i.$wrapperEl.children("."+i.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),n=r.find("."+a.elementClass+":not(."+a.loadedClass+"):not(."+a.loadingClass+")");!r.hasClass(a.elementClass)||r.hasClass(a.loadedClass)||r.hasClass(a.loadingClass)||(n=n.add(r[0])),0!==n.length&&n.each((function(e,n){var o=s(n);o.addClass(a.loadingClass);var l=o.attr("data-background"),d=o.attr("data-src"),h=o.attr("data-srcset"),p=o.attr("data-sizes");i.loadImage(o[0],d||l,h,p,!1,(function(){if(null!=i&&i&&(!i||i.params)&&!i.destroyed){if(l?(o.css("background-image",'url("'+l+'")'),o.removeAttr("data-background")):(h&&(o.attr("srcset",h),o.removeAttr("data-srcset")),p&&(o.attr("sizes",p),o.removeAttr("data-sizes")),d&&(o.attr("src",d),o.removeAttr("data-src"))),o.addClass(a.loadedClass).removeClass(a.loadingClass),r.find("."+a.preloaderClass).remove(),i.params.loop&&t){var e=r.attr("data-swiper-slide-index");if(r.hasClass(i.params.slideDuplicateClass)){var s=i.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideDuplicateClass+")");i.lazy.loadInSlide(s.index(),!1)}else{var n=i.$wrapperEl.children("."+i.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadInSlide(n.index(),!1)}}i.emit("lazyImageReady",r[0],o[0])}})),i.emit("lazyImageLoad",r[0],o[0])}))}},load:function(){var e=this,t=e.$wrapperEl,i=e.params,a=e.slides,r=e.activeIndex,n=e.virtual&&i.virtual.enabled,o=i.lazy,l=i.slidesPerView;function d(e){if(n){if(t.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(a[e])return!0;return!1}function h(e){return n?s(e).attr("data-swiper-slide-index"):s(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+i.slideVisibleClass).each((function(t,i){var a=n?s(i).attr("data-swiper-slide-index"):s(i).index();e.lazy.loadInSlide(a)}));else if(l>1)for(var p=r;p1||o.loadPrevNextAmount&&o.loadPrevNextAmount>1){for(var c=o.loadPrevNextAmount,u=l,v=Math.min(r+u+Math.max(c,u),a.length),f=Math.max(r-Math.max(u,c),0),m=r+l;m0&&e.lazy.loadInSlide(h(b));var w=t.children("."+i.slidePrevClass);w.length>0&&e.lazy.loadInSlide(h(w))}}},de={LinearSpline:function(e,t){var i,s,a,r,n,o=function(e,t){for(s=-1,i=e.length;i-s>1;)e[a=i+s>>1]<=t?s=a:i=a;return i};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=o(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){this.controller.spline||(this.controller.spline=this.params.loop?new de.LinearSpline(this.slidesGrid,e.slidesGrid):new de.LinearSpline(this.snapGrid,e.snapGrid))},setTranslate:function(e,t){var i,s,a=this,r=a.controller.control;function n(e){var t=a.rtlTranslate?-a.translate:a.translate;"slide"===a.params.controller.by&&(a.controller.getInterpolateFunction(e),s=-a.controller.spline.interpolate(-t)),s&&"container"!==a.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(a.maxTranslate()-a.minTranslate()),s=(t-a.minTranslate())*i+e.minTranslate()),a.params.controller.inverse&&(s=e.maxTranslate()-s),e.updateProgress(s),e.setTranslate(s,a),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o0&&(this.isBeginning?this.a11y.disableEl(i):this.a11y.enableEl(i)),t&&t.length>0&&(this.isEnd?this.a11y.disableEl(t):this.a11y.enableEl(t))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(i,a){var r=s(a);e.a11y.makeElFocusable(r),e.a11y.addElRole(r,"button"),e.a11y.addElLabel(r,t.paginationBulletMessage.replace(/{{index}}/,r.index()+1))}))},init:function(){this.$el.append(this.a11y.liveRegion);var e,t,i=this.params.a11y;this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&(this.a11y.makeElFocusable(e),this.a11y.addElRole(e,"button"),this.a11y.addElLabel(e,i.nextSlideMessage),e.on("keydown",this.a11y.onEnterKey)),t&&(this.a11y.makeElFocusable(t),this.a11y.addElRole(t,"button"),this.a11y.addElLabel(t,i.prevSlideMessage),t.on("keydown",this.a11y.onEnterKey)),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.on("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)},destroy:function(){var e,t;this.a11y.liveRegion&&this.a11y.liveRegion.length>0&&this.a11y.liveRegion.remove(),this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&e.off("keydown",this.a11y.onEnterKey),t&&t.off("keydown",this.a11y.onEnterKey),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.off("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)}},pe={init:function(){if(this.params.history){if(!t.history||!t.history.pushState)return this.params.history.enabled=!1,void(this.params.hashNavigation.enabled=!0);var e=this.history;e.initialized=!0,e.paths=pe.getPathValues(),(e.paths.key||e.paths.value)&&(e.scrollToSlide(0,e.paths.value,this.params.runCallbacksOnInit),this.params.history.replaceState||t.addEventListener("popstate",this.history.setHistoryPopState))}},destroy:function(){this.params.history.replaceState||t.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=pe.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(){var e=t.location.pathname.slice(1).split("/").filter((function(e){return""!==e})),i=e.length;return{key:e[i-2],value:e[i-1]}},setHistory:function(e,i){if(this.history.initialized&&this.params.history.enabled){var s=this.slides.eq(i),a=pe.slugify(s.attr("data-history"));t.location.pathname.includes(e)||(a=e+"/"+a);var r=t.history.state;r&&r.value===a||(this.params.history.replaceState?t.history.replaceState({value:a},null,a):t.history.pushState({value:a},null,a))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,i){if(t)for(var s=0,a=this.slides.length;s'),i.append(e)),e.css({height:r+"px"})):0===(e=t.find(".swiper-cube-shadow")).length&&(e=s('
'),t.append(e)));for(var u=0;u-1&&(c=90*f+90*b,o&&(c=90*-f-90*b)),v.transform(T),d.slideShadows){var E=h?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=h?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===E.length&&(E=s('
'),v.append(E)),0===S.length&&(S=s('
'),v.append(S)),E.length&&(E[0].style.opacity=Math.max(-b,0)),S.length&&(S[0].style.opacity=Math.max(b,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),d.shadow)if(h)e.transform("translate3d(0px, "+(r/2+d.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+d.shadowScale+")");else{var C=Math.abs(c)-90*Math.floor(Math.abs(c)/90),M=1.5-(Math.sin(2*C*Math.PI/360)/2+Math.cos(2*C*Math.PI/360)/2),P=d.shadowScale,z=d.shadowScale/M,k=d.shadowOffset;e.transform("scale3d("+P+", 1, "+z+") translate3d(0px, "+(n/2+k)+"px, "+-n/2/z+"px) rotateX(-90deg)")}var $=j.isSafari||j.isUiWebView?-l/2:0;i.transform("translate3d(0px,0,"+$+"px) rotateX("+(this.isHorizontal()?0:c)+"deg) rotateY("+(this.isHorizontal()?-c:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},me={setTranslate:function(){for(var e=this.slides,t=this.rtlTranslate,i=0;i'),a.append(h)),0===p.length&&(p=s('
'),a.append(p)),h.length&&(h[0].style.opacity=Math.max(-r,0)),p.length&&(p[0].style.opacity=Math.max(r,0))}a.transform("translate3d("+l+"px, "+d+"px, 0px) rotateX("+o+"deg) rotateY("+n+"deg)")}},setTransition:function(e){var t=this,i=t.slides,s=t.activeIndex,a=t.$wrapperEl;if(i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var r=!1;i.eq(s).transitionEnd((function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i'),f.append(S)),0===C.length&&(C=s('
'),f.append(C)),S.length&&(S[0].style.opacity=g>0?g:0),C.length&&(C[0].style.opacity=-g>0?-g:0)}}(o.pointerEvents||o.prefixedPointerEvents)&&(a[0].style.perspectiveOrigin=h+"px 50%")},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},be={init:function(){var e=this.params.thumbs,t=this.constructor;e.swiper instanceof t?(this.thumbs.swiper=e.swiper,n.extend(this.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),n.extend(this.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):n.isObject(e.swiper)&&(this.thumbs.swiper=new t(n.extend({},e.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),this.thumbs.swiperCreated=!0),this.thumbs.swiper.$el.addClass(this.params.thumbs.thumbsContainerClass),this.thumbs.swiper.on("tap",this.thumbs.onThumbClick)},onThumbClick:function(){var e=this.thumbs.swiper;if(e){var t=e.clickedIndex,i=e.clickedSlide;if(!(i&&s(i).hasClass(this.params.thumbs.slideThumbActiveClass)||null==t)){var a;if(a=e.params.loop?parseInt(s(e.clickedSlide).attr("data-swiper-slide-index"),10):t,this.params.loop){var r=this.activeIndex;this.slides.eq(r).hasClass(this.params.slideDuplicateClass)&&(this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft,r=this.activeIndex);var n=this.slides.eq(r).prevAll('[data-swiper-slide-index="'+a+'"]').eq(0).index(),o=this.slides.eq(r).nextAll('[data-swiper-slide-index="'+a+'"]').eq(0).index();a=void 0===n?o:void 0===o?n:o-ra?s-Math.floor(i/2)+1:s+Math.floor(i/2)-1:s>a&&(s=s-i+1),t.slideTo(s,e?0:void 0))}var o=1,l=this.params.thumbs.slideThumbActiveClass;if(this.params.slidesPerView>1&&!this.params.centeredSlides&&(o=this.params.slidesPerView),this.params.thumbs.multipleActiveThumbs||(o=1),o=Math.floor(o),t.slides.removeClass(l),t.params.loop||t.params.virtual&&t.params.virtual.enabled)for(var d=0;d0&&!s(e.target).hasClass(this.params.pagination.bulletClass)&&(!0===this.pagination.$el.hasClass(this.params.pagination.hiddenClass)?this.emit("paginationShow",this):this.emit("paginationHide",this),this.pagination.$el.toggleClass(this.params.pagination.hiddenClass))}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){n.extend(this,{scrollbar:{init:re.init.bind(this),destroy:re.destroy.bind(this),updateSize:re.updateSize.bind(this),setTranslate:re.setTranslate.bind(this),setTransition:re.setTransition.bind(this),enableDraggable:re.enableDraggable.bind(this),disableDraggable:re.disableDraggable.bind(this),setDragPosition:re.setDragPosition.bind(this),getPointerPosition:re.getPointerPosition.bind(this),onDragStart:re.onDragStart.bind(this),onDragMove:re.onDragMove.bind(this),onDragEnd:re.onDragEnd.bind(this),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update:function(){this.scrollbar.updateSize()},resize:function(){this.scrollbar.updateSize()},observerUpdate:function(){this.scrollbar.updateSize()},setTranslate:function(){this.scrollbar.setTranslate()},setTransition:function(e){this.scrollbar.setTransition(e)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){n.extend(this,{parallax:{setTransform:ne.setTransform.bind(this),setTranslate:ne.setTranslate.bind(this),setTransition:ne.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},init:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTranslate:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTransition:function(e){this.params.parallax.enabled&&this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach((function(i){t[i]=oe[i].bind(e)})),n.extend(e,{zoom:t});var i=1;Object.defineProperty(e.zoom,"scale",{get:function(){return i},set:function(t){if(i!==t){var s=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,a=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,s,a)}i=t}})},on:{init:function(){this.params.zoom.enabled&&this.zoom.enable()},destroy:function(){this.zoom.disable()},touchStart:function(e){this.zoom.enabled&&this.zoom.onTouchStart(e)},touchEnd:function(e){this.zoom.enabled&&this.zoom.onTouchEnd(e)},doubleTap:function(e){this.params.zoom.enabled&&this.zoom.enabled&&this.params.zoom.toggle&&this.zoom.toggle(e)},transitionEnd:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.zoom.onTransitionEnd()},slideChange:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.params.cssMode&&this.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){n.extend(this,{lazy:{initialImageLoaded:!1,load:le.load.bind(this),loadInSlide:le.loadInSlide.bind(this)}})},on:{beforeInit:function(){this.params.lazy.enabled&&this.params.preloadImages&&(this.params.preloadImages=!1)},init:function(){this.params.lazy.enabled&&!this.params.loop&&0===this.params.initialSlide&&this.lazy.load()},scroll:function(){this.params.freeMode&&!this.params.freeModeSticky&&this.lazy.load()},resize:function(){this.params.lazy.enabled&&this.lazy.load()},scrollbarDragMove:function(){this.params.lazy.enabled&&this.lazy.load()},transitionStart:function(){this.params.lazy.enabled&&(this.params.lazy.loadOnTransitionStart||!this.params.lazy.loadOnTransitionStart&&!this.lazy.initialImageLoaded)&&this.lazy.load()},transitionEnd:function(){this.params.lazy.enabled&&!this.params.lazy.loadOnTransitionStart&&this.lazy.load()},slideChange:function(){this.params.lazy.enabled&&this.params.cssMode&&this.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){n.extend(this,{controller:{control:this.params.controller.control,getInterpolateFunction:de.getInterpolateFunction.bind(this),setTranslate:de.setTranslate.bind(this),setTransition:de.setTransition.bind(this)}})},on:{update:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},resize:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},observerUpdate:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},setTranslate:function(e,t){this.controller.control&&this.controller.setTranslate(e,t)},setTransition:function(e,t){this.controller.control&&this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){var e=this;n.extend(e,{a11y:{liveRegion:s('')}}),Object.keys(he).forEach((function(t){e.a11y[t]=he[t].bind(e)}))},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){n.extend(this,{history:{init:pe.init.bind(this),setHistory:pe.setHistory.bind(this),setHistoryPopState:pe.setHistoryPopState.bind(this),scrollToSlide:pe.scrollToSlide.bind(this),destroy:pe.destroy.bind(this)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionEnd:function(){this.history.initialized&&this.history.setHistory(this.params.history.key,this.activeIndex)},slideChange:function(){this.history.initialized&&this.params.cssMode&&this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){n.extend(this,{hashNavigation:{initialized:!1,init:ce.init.bind(this),destroy:ce.destroy.bind(this),setHash:ce.setHash.bind(this),onHashCange:ce.onHashCange.bind(this)}})},on:{init:function(){this.params.hashNavigation.enabled&&this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&&this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&&this.hashNavigation.setHash()},slideChange:function(){this.hashNavigation.initialized&&this.params.cssMode&&this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var e=this;n.extend(e,{autoplay:{running:!1,paused:!1,run:ue.run.bind(e),start:ue.start.bind(e),stop:ue.stop.bind(e),pause:ue.pause.bind(e),onVisibilityChange:function(){"hidden"===document.visibilityState&&e.autoplay.running&&e.autoplay.pause(),"visible"===document.visibilityState&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},onTransitionEnd:function(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===this&&(e.$wrapperEl[0].removeEventListener("transitionend",e.autoplay.onTransitionEnd),e.$wrapperEl[0].removeEventListener("webkitTransitionEnd",e.autoplay.onTransitionEnd),e.autoplay.paused=!1,e.autoplay.running?e.autoplay.run():e.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&(this.autoplay.start(),document.addEventListener("visibilitychange",this.autoplay.onVisibilityChange))},beforeTransitionStart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},touchEnd:function(){this.params.cssMode&&this.autoplay.paused&&!this.params.autoplay.disableOnInteraction&&this.autoplay.run()},destroy:function(){this.autoplay.running&&this.autoplay.stop(),document.removeEventListener("visibilitychange",this.autoplay.onVisibilityChange)}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){n.extend(this,{fadeEffect:{setTranslate:ve.setTranslate.bind(this),setTransition:ve.setTransition.bind(this)}})},on:{beforeInit:function(){if("fade"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"fade");var e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};n.extend(this.params,e),n.extend(this.originalParams,e)}},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){n.extend(this,{cubeEffect:{setTranslate:fe.setTranslate.bind(this),setTransition:fe.setTransition.bind(this)}})},on:{beforeInit:function(){if("cube"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"cube"),this.classNames.push(this.params.containerModifierClass+"3d");var e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};n.extend(this.params,e),n.extend(this.originalParams,e)}},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){n.extend(this,{flipEffect:{setTranslate:me.setTranslate.bind(this),setTransition:me.setTransition.bind(this)}})},on:{beforeInit:function(){if("flip"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"flip"),this.classNames.push(this.params.containerModifierClass+"3d");var e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};n.extend(this.params,e),n.extend(this.originalParams,e)}},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0}},create:function(){n.extend(this,{coverflowEffect:{setTranslate:ge.setTranslate.bind(this),setTransition:ge.setTransition.bind(this)}})},on:{beforeInit:function(){"coverflow"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"coverflow"),this.classNames.push(this.params.containerModifierClass+"3d"),this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{multipleActiveThumbs:!0,swiper:null,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){n.extend(this,{thumbs:{swiper:null,init:be.init.bind(this),update:be.update.bind(this),onThumbClick:be.onThumbClick.bind(this)}})},on:{beforeInit:function(){var e=this.params.thumbs;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate:function(){this.thumbs.swiper&&this.thumbs.update()},setTransition:function(e){var t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];return void 0===W.use&&(W.use=W.Class.use,W.installModule=W.Class.installModule),W.use(we),W})); +//# sourceMappingURL=swiper.min.js.map \ No newline at end of file