Visual Portfolio, Photo Gallery & Post Grid - Version 1.5.0

Version Description

Download this release

Release Info

Developer nko
Plugin Icon 128x128 Visual Portfolio, Photo Gallery & Post Grid
Version 1.5.0
Comparing to
See all releases

Code changes from version 1.4.3 to 1.5.0

assets/admin/css/style.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 1.4.3
4
  * Author : nK https://nkdev.info
5
- */.dashicons-visual-portfolio,.dashicons-visual-portfolio-gray,.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon.svg");background-repeat:no-repeat;background-position:center center;background-size:15px;opacity:.6}.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon-mce.svg");opacity:1}.menu-top.current .dashicons-visual-portfolio,.menu-top:hover .dashicons-visual-portfolio,.wp-has-current-submenu .dashicons-visual-portfolio{opacity:1}.dashicons-visual-portfolio-gray,.mce-i-visual-portfolio-gray{background-image:url("../images/icon-gray.svg")}.vc_element-icon[data-is-container="true"].icon-visual-portfolio,.vc_element-icon.icon-visual-portfolio{background-position:50% 50%}.vc_element-icon.icon-visual-portfolio,.vc_control-visual-portfolio{position:relative;overflow:hidden;background-image:url("../images/icon-vc.png");background-position:50% 50%;background-size:cover;border-radius:3px}.vc_add-element-container .icon-visual-portfolio{position:absolute}.vc_control-visual-portfolio{display:inline-block;width:18px;height:18px;margin:0 2px;cursor:pointer}.vc_controls-row .vc_control-visual-portfolio{float:right;margin:4px}.vc_control-visual-portfolio-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.vp-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-sizing:border-box;box-sizing:border-box;margin-right:-15px;margin-left:-15px}.vp-col-1,.vp-col-2,.vp-col-3,.vp-col-4,.vp-col-5,.vp-col-6,.vp-col-7,.vp-col-8,.vp-col-9,.vp-col-10,.vp-col-11,.vp-col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:15px;padding-left:15px}.vp-col-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.vp-col-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.vp-col-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.vp-col-4{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.vp-col-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.vp-col-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.vp-col-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.vp-col-8{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.vp-col-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.vp-col-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.vp-col-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.vp-col-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix .vp-control-html{margin-bottom:0}.post-type-vp_lists.post-php,.post-type-vp_lists.post-new-php{background-color:#edeff0}.post-type-vp_lists.post-php #wpcontent,.post-type-vp_lists.post-new-php #wpcontent{padding-left:0}.post-type-vp_lists.post-php .wrap,.post-type-vp_lists.post-new-php .wrap{margin:0}.post-type-vp_lists.post-php #poststuff,.post-type-vp_lists.post-new-php #poststuff{padding-top:0}.post-type-vp_lists.post-php #wpfooter,.post-type-vp_lists.post-new-php #wpfooter{display:none}.post-type-vp_lists.post-php #wpbody-content,.post-type-vp_lists.post-new-php #wpbody-content{padding-bottom:0}.post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{position:fixed;top:0;right:300px;bottom:0;width:300px;overflow:auto;-webkit-overflow-scrolling:touch}html.wp-toolbar .post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,html.wp-toolbar .post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{top:32px}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{position:relative;top:auto;right:auto;bottom:auto;width:100%;margin-right:0}}.post-type-vp_lists.post-php #postbox-container-2,.post-type-vp_lists.post-new-php #postbox-container-2{position:absolute;top:0;right:0;bottom:0;left:0;width:calc(100% - 300px);min-height:calc(100vh - 32px);overflow:auto;-webkit-overflow-scrolling:touch}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php #postbox-container-2,.post-type-vp_lists.post-new-php #postbox-container-2{right:0;bottom:auto;width:100%}}.post-type-vp_lists.post-php .columns-2 #side-sortables,.post-type-vp_lists.post-new-php .columns-2 #side-sortables{width:auto}.post-type-vp_lists.post-php .notice,.post-type-vp_lists.post-new-php .notice{margin:0;margin-right:300px;margin-bottom:1px}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php .notice,.post-type-vp_lists.post-new-php .notice{margin-right:0}}.post-type-vp_lists.post-php #poststuff .postbox,.post-type-vp_lists.post-new-php #poststuff .postbox{margin-bottom:0;border-color:#e2e4e7;border-top:0;border-right:0}.post-type-vp_lists.post-php #poststuff .postbox>h2,.post-type-vp_lists.post-new-php #poststuff .postbox>h2{padding:15px;border-bottom:none}.post-type-vp_lists.post-php #poststuff .postbox>.handlediv,.post-type-vp_lists.post-new-php #poststuff .postbox>.handlediv{height:50px}.post-type-vp_lists.post-php #poststuff .postbox>.inside,.post-type-vp_lists.post-new-php #poststuff .postbox>.inside{padding:15px;padding-top:0}.vp-control{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:19px}.vp-control>label{width:100%;margin-bottom:5px}.vp-control>.vp-control-description{width:100%;margin:2px 0 5px;font-size:13px;font-style:italic;color:#666}.vp-control.vp-control-checkbox,.vp-control.vp-control-toggle{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.vp-control.vp-control-checkbox>label,.vp-control.vp-control-toggle>label{margin-bottom:0}.vp-control.vp-control-textarea textarea{width:100%}.vp-image-picker{display:none}.vp-image-picker,.vp-image-picker *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-image-picker+ul.thumbnails.image_picker_selector li{margin:0 10px 10px 0}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail{padding:0;cursor:pointer;border:none}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail img{display:block;border:2px solid transparent}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail.selected{background-color:transparent}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail.selected img{border-color:#0073aa}.vp-image-picker+ul.thumbnails.image_picker_selector .group_title{padding-top:5px;padding-left:5px;font-weight:500}.vp-control-range [type="number"]{width:50px;margin-left:10px}.vp-control-range [type="range"]{-webkit-box-flex:1;-ms-flex:1;flex:1;width:100%;padding:0;margin-left:10px;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vp-control-range [type="range"]::-webkit-slider-thumb{-webkit-box-sizing:border-box;box-sizing:border-box;width:18px;height:18px;margin-top:-7px;cursor:pointer;background:#555d66;background-clip:padding-box;border:4px solid transparent;border-radius:50%;-webkit-appearance:none;appearance:none}.vp-control-range [type="range"]::-moz-range-thumb{box-sizing:border-box;width:18px;height:18px;cursor:pointer;background:#555d66;background-clip:padding-box;border:4px solid transparent;border-radius:50%}.vp-control-range [type="range"]::-ms-thumb{box-sizing:border-box;width:14px;height:14px;margin-top:0;cursor:pointer;background:#555d66;background-clip:padding-box;border:2px solid transparent;border-radius:50%}.vp-control-range [type="range"]:focus{outline:none}.vp-control-range [type="range"]:focus::-webkit-slider-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;-webkit-box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]:focus::-moz-range-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]:focus::-ms-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]::-webkit-slider-runnable-track{height:3px;margin-top:-4px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.vp-control-range [type="range"]::-moz-range-track{height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.vp-control-range [type="range"]::-ms-track{height:3px;margin-top:-4px;color:transparent;cursor:pointer;background:#e2e4e7;border-color:transparent;border-radius:1.5px}.vp-control-toggle,.vp-control-toggle *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-control-toggle .vp-toggle{position:relative}.vp-control-toggle .vp-toggle .vp-toggle__track{content:"";display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;width:36px;height:18px;vertical-align:top;background-color:#fff;border:2px solid #6c7781;border-radius:9px;-webkit-transition:background .2s ease;transition:background .2s ease}.vp-control-toggle .vp-toggle .vp-toggle__track::after{content:"";position:absolute;display:block;top:50%;right:5px;width:3px;height:3px;margin-top:-3px;border:1.5px solid #6c7781;border-radius:3px}.vp-control-toggle .vp-toggle:hover .vp-toggle__track{background-color:#e2e4e7}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__track{background-color:#33b3db;border:2px solid #33b3db}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__track::after{top:50%;right:auto;left:8px;width:0;height:5px;margin-top:-3px;border:0;border-right:2px solid #fff;border-radius:0}.vp-control-toggle .vp-toggle .vp-toggle__thumb{position:absolute;display:block;top:4px;left:4px;width:10px;height:10px;background-color:#6c7781;border:5px solid #6c7781;border-radius:50%;-webkit-transition:-webkit-transform .1s ease;transition:-webkit-transform .1s ease;transition:transform .1s ease;transition:transform .1s ease, -webkit-transform .1s ease}.vp-control-toggle .vp-toggle [type="checkbox"]:focus ~ .vp-toggle__track{-webkit-box-shadow:0 0 0 2px #fff, 0 0 0 3px #6c7781;box-shadow:0 0 0 2px #fff, 0 0 0 3px #6c7781}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__thumb{background-color:#fff;border-width:0;-webkit-transform:translateX(18px);transform:translateX(18px)}.vp-control-toggle .vp-toggle [type="checkbox"]{position:absolute;top:0;left:0;width:100%;height:100%;padding:0;margin:0;opacity:0;z-index:1}.vp-control-image-dropdown{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;padding:5px 7px;cursor:pointer;background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.07);box-shadow:inset 0 1px 2px rgba(0,0,0,0.07)}.vp-control-image-dropdown,.vp-control-image-dropdown *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-control-image-dropdown::before{content:"";position:absolute;display:block;top:50%;right:6px;width:0;height:0;margin-top:-2px;border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px}.vp-control-image-dropdown.active::before{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.vp-control-image-dropdown .vp-control-image-dropdown__preview{display:block;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:32px}.vp-control-image-dropdown .vp-control-image-dropdown__preview img{display:block;width:100%;height:auto}.vp-control-image-dropdown .vp-control-image-dropdown__title{-webkit-box-flex:1;-ms-flex:1;flex:1;padding-left:10px}.vp-control-image-dropdown .vp-control-image-dropdown__content{position:absolute;display:none;top:100%;left:0;width:100%;max-width:285px;margin-top:7px;margin-left:-1px;cursor:default;background-color:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);z-index:1}.vp-control-image-dropdown .vp-control-image-dropdown__content>div{width:100%;max-height:250px;padding:4px;overflow:auto}.vp-control-image-dropdown .vp-control-image-dropdown__content::before{content:"";position:absolute;display:block;top:-5px;left:10px;width:0;height:0;border-right:5px solid transparent;border-bottom:5px solid #e5e5e5;border-left:5px solid transparent}.vp-control-image-dropdown .vp-control-image-dropdown__content::after{content:"";position:absolute;display:block;top:-7px;right:0;left:0;height:7px}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector,.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector .group>ul{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li{display:block;-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;float:none;max-width:25%;margin:0}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li.group,.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li.group_title{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail{padding:3px}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li img{width:100%;height:auto}.vp-control-image-dropdown.active .vp-control-image-dropdown__content{display:block}.vp-oembed-preview{position:relative;width:100%;padding-top:56.25%;color:#a2a2a2;background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-oembed-preview::after{content:"\f126";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;vertical-align:top;z-index:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vp-oembed-preview>iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.vp-portfolio__thumbnail{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;border-radius:3px}.vp-portfolio__thumbnail img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.vp-portfolio__thumbnail:empty{background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-portfolio__thumbnail:empty,.vp-portfolio__thumbnail:empty:hover,.vp-portfolio__thumbnail:empty:active,.vp-portfolio__thumbnail:empty:focus{color:#a2a2a2}.vp-portfolio__thumbnail:empty::after{content:"\f128";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-list-table th.column-portfolio_post_thumbs{width:70px}.wp-list-table th.column-vp_lists_post_shortcode{width:250px}@media screen and (max-width: 782px){.wp-list-table th.column-portfolio_post_thumbs{display:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs{float:left;width:70px !important;min-width:70px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs::before{content:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-title{overflow:hidden;clear:right}}.vp-portfolio-list .vp-portfolio-list__icon span{display:block;width:120px;height:120px;margin:0 auto;margin-top:60px;background-size:105px}.vp-portfolio-list .vp-portfolio-list__text{text-align:center}.vp-portfolio-list .vp-portfolio-list__text p{margin-top:30px;margin-bottom:30px;font-size:15px;font-weight:500;color:#8e8e8e}.vp-portfolio-list .vp-portfolio-list__text .button-hero{display:inline-block}.vp_list_preview{padding:0 12px;margin-right:-12px;margin-left:-12px}.vp_list_preview iframe{width:100%;min-height:120px;-webkit-transition:height .3s;transition:height .3s}.vp-content-source{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-right:9px;padding-left:9px;margin-right:-15px;margin-left:-15px}.vp-content-source .vp-content-source__item{position:relative;width:70px;height:50px;padding:12px;margin:0 5px;color:#6c7781;text-align:center;cursor:pointer;border:1px solid transparent;border-radius:3px}.vp-content-source .vp-content-source__item.active,.vp-content-source .vp-content-source__item:hover{color:#555;background-color:#ecf0f4}.vp-content-source .vp-content-source__item.active{color:#fff;background-color:#6c7781;border-color:#6c7781}.vp-content-source .vp-content-source__item .vp-content-source__item-icon>span{width:24px;height:24px;margin-top:2px;font-size:24px}.vp-content-source .vp-content-source__item .vp-content-source__item-title{position:absolute;top:58%;right:8px;left:8px;font-weight:500}.vp-content-source .vp-content-source__item-content{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:100%}.vp-content-source .vp-content-source__item-content>div{position:relative;display:none;padding:0 15px;padding-bottom:1px;margin-top:12px;margin-right:-9px;margin-bottom:-14px;margin-left:-9px;overflow:hidden;background-color:#f9f9fa;border-top:1px solid #eee}.vp-content-source .vp-content-source__item-content>div:empty{display:none !important}.vp-content-source .vp-content-source__item-content>div.active{display:block}.vp-select2{width:100%}.vp-select2+.select2{width:100%}.post-attributes-label+.vp-select2+.select2{margin-top:5px}.vp-select2+.select2 ul,.vp-select2+.select2 li{margin-bottom:0}.vp-select2+.select2 .select2-selection{border:1px solid #ddd;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.07);box-shadow:inset 0 1px 2px rgba(0,0,0,0.07)}.vp-select2+.select2.select2-container--open .select2-selection{outline:none}.vp-select2+.select2 .select2-selection--multiple{min-height:27px}.vp-select2+.select2 .select2-selection--multiple .select2-selection__choice{padding:3px 8px;margin-top:3px;color:#fff;background-color:#6c7781;border-color:#6c7781}.vp-select2+.select2 .select2-selection--multiple .select2-selection__choice__remove{float:right;margin-right:0;margin-left:3px;color:inherit;opacity:.5}.select2-vp-container ul,.select2-vp-container li{margin-bottom:0}.select2-vp-container .select2-dropdown{border-color:#ddd}.select2-vp-container .select2-search--dropdown .select2-search__field{padding:3px 4px;border:1px solid #ddd;outline:none;-webkit-box-shadow:none;box-shadow:none}.select2-vp-container .select2-results__option[aria-selected="true"]{background-color:#efeeee}.select2-vp-container .select2-results__option--highlighted[aria-selected]{background-color:#33b3db}.vp-select2-ajax__result{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.vp-select2-ajax__result .vp-select2-ajax__result-img{position:relative;-webkit-box-flex:0;-ms-flex:0 0 35px;flex:0 0 35px;background-color:rgba(0,0,0,0.1);background-position:center center;background-size:cover;border-radius:3px}.vp-select2-ajax__result .vp-select2-ajax__result-img::after{content:"";display:block;width:100%;padding-top:100%}.vp-select2-ajax__result .vp-select2-ajax__result-data{padding-left:10px}.vp-select2-ajax__result .vp-select2-ajax__result-title{font-size:16px;font-weight:500;line-height:1}.vp-select2-ajax__result .vp-select2-ajax__result-post-type{font-size:12px;opacity:.5}.vp-control-gallery .vp-control-gallery-additional-data{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;top:0;right:-350px;bottom:0;width:350px;padding:15px 13px;overflow:auto;background-color:#fff;border-left:1px solid #eaeaea;-webkit-transition:.15s right;transition:.15s right}.vp-control-gallery .vp-control-gallery-additional-data.active{right:0}.vp-control-gallery .vp-control-gallery-additional-data.active+.vp-control-gallery-items{margin-right:335px}@media (max-width: 910px){.vp-control-gallery .vp-control-gallery-additional-data{position:relative;display:none;right:0;width:120%;height:auto;margin-bottom:30px;border:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data.active{display:block}.vp-control-gallery .vp-control-gallery-additional-data.active+.vp-control-gallery-items{margin-right:-15px}}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview{display:-webkit-box;display:-ms-flexbox;display:flex;padding:15px 13px;margin:-15px -13px;margin-bottom:15px;border-bottom:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-image{margin-right:15px}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-image img{display:block;width:70px;border-radius:3px;-webkit-box-shadow:0 0 0 1px #fff, 0 0 0 2px #eaeaea;box-shadow:0 0 0 1px #fff, 0 0 0 2px #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-size{color:#8f9498}.vp-control-gallery .vp-control-gallery-items{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-line-pack:start;align-content:flex-start;width:120%;height:325px;padding:7px;margin:-12px;margin-bottom:-25px;overflow:auto;-webkit-transition:.15s margin-right;transition:.15s margin-right}.vp-control-gallery .vp-control-gallery-items::after{content:"";display:block;width:100%}.vp-control-gallery .vp-control-gallery-items>div{position:relative;display:block;width:calc(12.5% - 10px);margin:5px;cursor:move;cursor:-webkit-grab;cursor:grab;border-radius:3px}@media (max-width: 1350px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(14.22% - 10px)}}@media (max-width: 1250px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(16.66% - 10px)}}@media (max-width: 1100px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(25% - 10px)}}.vp-control-gallery .vp-control-gallery-items>div::after{content:"";display:block;padding-top:100%}.vp-control-gallery .vp-control-gallery-items>div.sortable-ghost{opacity:.4}.vp-control-gallery .vp-control-gallery-items>div img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;border-radius:3px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img .vp-control-gallery-items-remove{position:absolute;top:-5px;right:-5px;width:20px;height:20px;color:#fff;cursor:pointer;visibility:hidden;background-color:#dc3232;border-radius:50%;opacity:0;-webkit-transition:.15s visibility, .15s opacity;transition:.15s visibility, .15s opacity}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img .vp-control-gallery-items-remove span{width:20px;height:20px;font-size:10px;line-height:20px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img:hover .vp-control-gallery-items-remove{visibility:visible;opacity:1}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img.active{-webkit-box-shadow:0 0 0 1px #fff, 0 0 0 4px #33b3db;box-shadow:0 0 0 1px #fff, 0 0 0 4px #33b3db}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;color:#6c7781;text-align:center;cursor:pointer;background-color:#fff;border:1px solid #ccd3da;border-radius:3px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add>span{position:absolute;top:50%;left:50%;width:24px;height:24px;margin-top:-12px;margin-left:-12px;line-height:24px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add:hover{color:#555;background-color:#f7f7f7}.vp-input{width:100%}.post-type-vp_lists .CodeMirror{width:100%;text-align:left;border:1px solid #ddd}.post-type-vp_lists .CodeMirror .CodeMirror-matchingbracket{color:inherit;background:rgba(255,150,0,0.3)}.post-type-vp_lists [class*="CodeMirror-lint-message"],.post-type-vp_lists .CodeMirror-lint-marker-multiple,.post-type-vp_lists [class*="CodeMirror-lint-marker"]{background-image:none}.post-type-vp_lists .CodeMirror-lint-marker-error,.post-type-vp_lists .CodeMirror-lint-marker-warning{cursor:help}.post-type-vp_lists .CodeMirror-lint-marker-multiple{position:absolute;top:0}.post-type-vp_lists [class*="CodeMirror-lint-marker"]::before{position:relative;top:-2px;font:400 18px/1 dashicons}.post-type-vp_lists [class*="CodeMirror-lint-message"]::before{position:absolute;left:16px;font:400 16px/1 dashicons}.post-type-vp_lists .CodeMirror-lint-message-error,.post-type-vp_lists .CodeMirror-lint-message-warning{padding:3px 12px 3px 28px;margin:5px 0 2px;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}.post-type-vp_lists .CodeMirror-lint-message-warning{background-color:#fff8e5;border-left:4px solid #ffb900}.post-type-vp_lists .CodeMirror-lint-message-warning::before,.post-type-vp_lists .CodeMirror-lint-marker-warning::before{content:"\f534";color:#f6a306}.post-type-vp_lists .CodeMirror-lint-message-error{background-color:#fbeaea;border-left:4px solid #dc3232}.post-type-vp_lists .CodeMirror-lint-message-error::before,.post-type-vp_lists .CodeMirror-lint-marker-error::before{content:"\f153";color:#dc3232}.post-type-vp_lists .CodeMirror-lint-tooltip{background:0 0;border:none;border-radius:0;direction:ltr}@media (max-width: 850px){.vp-steps__right,.vp-steps__step{float:none;width:100%}}
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 1.5.0
4
  * Author : nK https://nkdev.info
5
+ */.dashicons-visual-portfolio,.dashicons-visual-portfolio-gray,.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon.svg");background-repeat:no-repeat;background-position:center center;background-size:15px;opacity:.6}.mce-widget .mce-i-visual-portfolio{background-image:url("../images/icon-mce.svg");opacity:1}.menu-top.current .dashicons-visual-portfolio,.menu-top:hover .dashicons-visual-portfolio,.wp-has-current-submenu .dashicons-visual-portfolio{opacity:1}.dashicons-visual-portfolio-gray,.mce-i-visual-portfolio-gray{background-image:url("../images/icon-gray.svg")}.vc_element-icon[data-is-container="true"].icon-visual-portfolio,.vc_element-icon.icon-visual-portfolio{background-position:50% 50%}.vc_element-icon.icon-visual-portfolio,.vc_control-visual-portfolio{position:relative;overflow:hidden;background-image:url("../images/icon-vc.png");background-position:50% 50%;background-size:cover;border-radius:3px}.vc_add-element-container .icon-visual-portfolio{position:absolute}.vc_control-visual-portfolio{display:inline-block;width:18px;height:18px;margin:0 2px;cursor:pointer}.vc_controls-row .vc_control-visual-portfolio{float:right;margin:4px}.vc_control-visual-portfolio-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.vp-row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-sizing:border-box;box-sizing:border-box;margin-right:-15px;margin-left:-15px}.vp-col-1,.vp-col-2,.vp-col-3,.vp-col-4,.vp-col-5,.vp-col-6,.vp-col-7,.vp-col-8,.vp-col-9,.vp-col-10,.vp-col-11,.vp-col-12{-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-webkit-box-sizing:border-box;box-sizing:border-box;padding-right:15px;padding-left:15px}.vp-col-1{-ms-flex-preferred-size:8.33333%;flex-basis:8.33333%;max-width:8.33333%}.vp-col-2{-ms-flex-preferred-size:16.66667%;flex-basis:16.66667%;max-width:16.66667%}.vp-col-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.vp-col-4{-ms-flex-preferred-size:33.33333%;flex-basis:33.33333%;max-width:33.33333%}.vp-col-5{-ms-flex-preferred-size:41.66667%;flex-basis:41.66667%;max-width:41.66667%}.vp-col-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.vp-col-7{-ms-flex-preferred-size:58.33333%;flex-basis:58.33333%;max-width:58.33333%}.vp-col-8{-ms-flex-preferred-size:66.66667%;flex-basis:66.66667%;max-width:66.66667%}.vp-col-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.vp-col-10{-ms-flex-preferred-size:83.33333%;flex-basis:83.33333%;max-width:83.33333%}.vp-col-11{-ms-flex-preferred-size:91.66667%;flex-basis:91.66667%;max-width:91.66667%}.vp-col-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.vp-col-clearfix .vp-control-html{margin-bottom:0}.post-type-vp_lists.post-php,.post-type-vp_lists.post-new-php{background-color:#edeff0}.post-type-vp_lists.post-php #wpcontent,.post-type-vp_lists.post-new-php #wpcontent{padding-left:0}.post-type-vp_lists.post-php .wrap,.post-type-vp_lists.post-new-php .wrap{margin:0}.post-type-vp_lists.post-php #poststuff,.post-type-vp_lists.post-new-php #poststuff{padding-top:0}.post-type-vp_lists.post-php #wpfooter,.post-type-vp_lists.post-new-php #wpfooter{display:none}.post-type-vp_lists.post-php #wpbody-content,.post-type-vp_lists.post-new-php #wpbody-content{padding-bottom:0}.post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{position:fixed;top:0;right:300px;bottom:0;width:300px;overflow:auto;-webkit-overflow-scrolling:touch}html.wp-toolbar .post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,html.wp-toolbar .post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{top:32px}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php #post-body.columns-2 #postbox-container-1,.post-type-vp_lists.post-new-php #post-body.columns-2 #postbox-container-1{position:relative;top:auto;right:auto;bottom:auto;width:100%;margin-right:0}}.post-type-vp_lists.post-php #postbox-container-2,.post-type-vp_lists.post-new-php #postbox-container-2{position:absolute;top:0;right:0;bottom:0;left:0;width:calc(100% - 300px);min-height:calc(100vh - 32px);overflow:auto;-webkit-overflow-scrolling:touch}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php #postbox-container-2,.post-type-vp_lists.post-new-php #postbox-container-2{right:0;bottom:auto;width:100%}}.post-type-vp_lists.post-php .columns-2 #side-sortables,.post-type-vp_lists.post-new-php .columns-2 #side-sortables{width:auto}.post-type-vp_lists.post-php .notice,.post-type-vp_lists.post-new-php .notice{margin:0;margin-right:300px;margin-bottom:1px}@media only screen and (max-width: 850px){.post-type-vp_lists.post-php .notice,.post-type-vp_lists.post-new-php .notice{margin-right:0}}.post-type-vp_lists.post-php #poststuff .postbox,.post-type-vp_lists.post-new-php #poststuff .postbox{margin-bottom:0;border-color:#e2e4e7;border-top:0;border-right:0}.post-type-vp_lists.post-php #poststuff .postbox>h2,.post-type-vp_lists.post-new-php #poststuff .postbox>h2{padding:15px;border-bottom:none}.post-type-vp_lists.post-php #poststuff .postbox>.handlediv,.post-type-vp_lists.post-new-php #poststuff .postbox>.handlediv{height:50px}.post-type-vp_lists.post-php #poststuff .postbox>.inside,.post-type-vp_lists.post-new-php #poststuff .postbox>.inside{padding:15px;padding-top:0}.vp-control{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:19px}.vp-control>label{width:100%;margin-bottom:5px}.vp-control>.vp-control-description{width:100%;margin:2px 0 5px;font-size:13px;font-style:italic;color:#666}.vp-control.vp-control-checkbox,.vp-control.vp-control-toggle{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.vp-control.vp-control-checkbox>label,.vp-control.vp-control-toggle>label{margin-bottom:0}.vp-control.vp-control-textarea textarea{width:100%}.vp-image-picker{display:none}.vp-image-picker,.vp-image-picker *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-image-picker+ul.thumbnails.image_picker_selector li{margin:0 10px 10px 0}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail{padding:0;cursor:pointer;border:none}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail img{display:block;border:2px solid transparent}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail.selected{background-color:transparent}.vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail.selected img{border-color:#0073aa}.vp-image-picker+ul.thumbnails.image_picker_selector .group_title{padding-top:5px;padding-left:5px;font-weight:500}.vp-control-range [type="number"]{width:50px;margin-left:10px}.vp-control-range [type="range"]{-webkit-box-flex:1;-ms-flex:1;flex:1;width:100%;padding:0;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vp-control-range [type="range"]::-webkit-slider-thumb{-webkit-box-sizing:border-box;box-sizing:border-box;width:18px;height:18px;margin-top:-7px;cursor:pointer;background:#555d66;background-clip:padding-box;border:4px solid transparent;border-radius:50%;-webkit-appearance:none;appearance:none}.vp-control-range [type="range"]::-moz-range-thumb{box-sizing:border-box;width:18px;height:18px;cursor:pointer;background:#555d66;background-clip:padding-box;border:4px solid transparent;border-radius:50%}.vp-control-range [type="range"]::-ms-thumb{box-sizing:border-box;width:14px;height:14px;margin-top:0;cursor:pointer;background:#555d66;background-clip:padding-box;border:2px solid transparent;border-radius:50%}.vp-control-range [type="range"]:focus{outline:none}.vp-control-range [type="range"]:focus::-webkit-slider-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;-webkit-box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]:focus::-moz-range-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]:focus::-ms-thumb{color:#191e23;background-color:#fff;outline:2px solid transparent;outline-offset:-2px;box-shadow:inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff}.vp-control-range [type="range"]::-webkit-slider-runnable-track{height:3px;margin-top:-4px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.vp-control-range [type="range"]::-moz-range-track{height:3px;cursor:pointer;background:#e2e4e7;border-radius:1.5px}.vp-control-range [type="range"]::-ms-track{height:3px;margin-top:-4px;color:transparent;cursor:pointer;background:#e2e4e7;border-color:transparent;border-radius:1.5px}.vp-control-toggle,.vp-control-toggle *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-control-toggle .vp-toggle{position:relative}.vp-control-toggle .vp-toggle .vp-toggle__track{content:"";display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;width:36px;height:18px;vertical-align:top;background-color:#fff;border:2px solid #6c7781;border-radius:9px;-webkit-transition:background .2s ease;transition:background .2s ease}.vp-control-toggle .vp-toggle .vp-toggle__track::after{content:"";position:absolute;display:block;top:50%;right:5px;width:3px;height:3px;margin-top:-3px;border:1.5px solid #6c7781;border-radius:3px}.vp-control-toggle .vp-toggle:hover .vp-toggle__track{background-color:#e2e4e7}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__track{background-color:#33b3db;border:2px solid #33b3db}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__track::after{top:50%;right:auto;left:8px;width:0;height:5px;margin-top:-3px;border:0;border-right:2px solid #fff;border-radius:0}.vp-control-toggle .vp-toggle .vp-toggle__thumb{position:absolute;display:block;top:4px;left:4px;width:10px;height:10px;background-color:#6c7781;border:5px solid #6c7781;border-radius:50%;-webkit-transition:-webkit-transform .1s ease;transition:-webkit-transform .1s ease;transition:transform .1s ease;transition:transform .1s ease, -webkit-transform .1s ease}.vp-control-toggle .vp-toggle [type="checkbox"]:focus ~ .vp-toggle__track{-webkit-box-shadow:0 0 0 2px #fff, 0 0 0 3px #6c7781;box-shadow:0 0 0 2px #fff, 0 0 0 3px #6c7781}.vp-control-toggle .vp-toggle [type="checkbox"]:checked ~ .vp-toggle__thumb{background-color:#fff;border-width:0;-webkit-transform:translateX(18px);transform:translateX(18px)}.vp-control-toggle .vp-toggle [type="checkbox"]{position:absolute;top:0;left:0;width:100%;height:100%;padding:0;margin:0;opacity:0;z-index:1}.vp-control-image-dropdown{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;padding:5px 7px;cursor:pointer;background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.07);box-shadow:inset 0 1px 2px rgba(0,0,0,0.07)}.vp-control-image-dropdown,.vp-control-image-dropdown *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-control-image-dropdown::before{content:"";position:absolute;display:block;top:50%;right:6px;width:0;height:0;margin-top:-2px;border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px}.vp-control-image-dropdown.active::before{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.vp-control-image-dropdown .vp-control-image-dropdown__preview{display:block;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;width:32px}.vp-control-image-dropdown .vp-control-image-dropdown__preview img{display:block;width:100%;height:auto}.vp-control-image-dropdown .vp-control-image-dropdown__title{-webkit-box-flex:1;-ms-flex:1;flex:1;padding-left:10px}.vp-control-image-dropdown .vp-control-image-dropdown__content{position:absolute;display:none;top:100%;left:0;width:100%;max-width:285px;margin-top:7px;margin-left:-1px;cursor:default;background-color:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);z-index:1}.vp-control-image-dropdown .vp-control-image-dropdown__content>div{width:100%;max-height:250px;padding:4px;overflow:auto}.vp-control-image-dropdown .vp-control-image-dropdown__content::before{content:"";position:absolute;display:block;top:-5px;left:10px;width:0;height:0;border-right:5px solid transparent;border-bottom:5px solid #e5e5e5;border-left:5px solid transparent}.vp-control-image-dropdown .vp-control-image-dropdown__content::after{content:"";position:absolute;display:block;top:-7px;right:0;left:0;height:7px}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector,.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector .group>ul{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li{display:block;-webkit-box-flex:0;-ms-flex:0 0 25%;flex:0 0 25%;float:none;max-width:25%;margin:0}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li.group,.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li.group_title{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li .thumbnail{padding:3px}.vp-control-image-dropdown .vp-control-image-dropdown__content .vp-image-picker+ul.thumbnails.image_picker_selector li img{width:100%;height:auto}.vp-control-image-dropdown.active .vp-control-image-dropdown__content{display:block}.vp-oembed-preview{position:relative;width:100%;padding-top:56.25%;color:#a2a2a2;background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-oembed-preview::after{content:"\f126";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;vertical-align:top;z-index:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.vp-oembed-preview>iframe{position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.vp-portfolio__thumbnail{position:relative;display:block;max-width:70px;padding-top:100%;overflow:hidden;border-radius:3px}.vp-portfolio__thumbnail img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.vp-portfolio__thumbnail:empty{background-color:#f1f1f1;border:1px solid #e8e8e8}.vp-portfolio__thumbnail:empty,.vp-portfolio__thumbnail:empty:hover,.vp-portfolio__thumbnail:empty:active,.vp-portfolio__thumbnail:empty:focus{color:#a2a2a2}.vp-portfolio__thumbnail:empty::after{content:"\f128";position:absolute;display:block;top:50%;left:50%;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:dashicons;font-size:20px;font-style:normal;font-weight:400;line-height:1;text-align:center;text-decoration:inherit;vertical-align:top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.wp-list-table th.column-portfolio_post_thumbs{width:70px}.wp-list-table th.column-vp_lists_post_shortcode{width:250px}@media screen and (max-width: 782px){.wp-list-table th.column-portfolio_post_thumbs{display:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs{float:left;width:70px !important;min-width:70px}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-portfolio_post_thumbs::before{content:none}.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-title{overflow:hidden;clear:right}}.vp-portfolio-list .vp-portfolio-list__icon span{display:block;width:120px;height:120px;margin:0 auto;margin-top:60px;background-size:105px}.vp-portfolio-list .vp-portfolio-list__text{text-align:center}.vp-portfolio-list .vp-portfolio-list__text p{margin-top:30px;margin-bottom:30px;font-size:15px;font-weight:500;color:#8e8e8e}.vp-portfolio-list .vp-portfolio-list__text .button-hero{display:inline-block}.vp_list_preview{padding:0 12px;margin-right:-12px;margin-left:-12px}.vp_list_preview iframe{width:100%;min-height:120px;-webkit-transition:height .3s;transition:height .3s}.vp-content-source{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-right:9px;padding-left:9px;margin-right:-15px;margin-left:-15px}.vp-content-source .vp-content-source__item{position:relative;width:70px;height:50px;padding:12px;margin:0 5px;color:#6c7781;text-align:center;cursor:pointer;border:1px solid transparent;border-radius:3px}.vp-content-source .vp-content-source__item.active,.vp-content-source .vp-content-source__item:hover{color:#555;background-color:#ecf0f4}.vp-content-source .vp-content-source__item.active{color:#fff;background-color:#6c7781;border-color:#6c7781}.vp-content-source .vp-content-source__item .vp-content-source__item-icon>span{width:24px;height:24px;margin-top:2px;font-size:24px}.vp-content-source .vp-content-source__item .vp-content-source__item-title{position:absolute;top:58%;right:8px;left:8px;font-weight:500}.vp-content-source .vp-content-source__item-content{-webkit-box-flex:1;-ms-flex:1;flex:1;min-width:100%}.vp-content-source .vp-content-source__item-content>div{position:relative;display:none;padding:0 15px;padding-bottom:1px;margin-top:12px;margin-right:-9px;margin-bottom:-14px;margin-left:-9px;overflow:hidden;background-color:#f9f9fa;border-top:1px solid #eee}.vp-content-source .vp-content-source__item-content>div:empty{display:none !important}.vp-content-source .vp-content-source__item-content>div.active{display:block}.vp-select2{width:100%}.vp-select2+.select2{width:100%}.post-attributes-label+.vp-select2+.select2{margin-top:5px}.vp-select2+.select2 ul,.vp-select2+.select2 li{margin-bottom:0}.vp-select2+.select2 .select2-selection{border:1px solid #ddd;border-radius:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.07);box-shadow:inset 0 1px 2px rgba(0,0,0,0.07)}.vp-select2+.select2.select2-container--open .select2-selection{outline:none}.vp-select2+.select2 .select2-selection--multiple{min-height:27px}.vp-select2+.select2 .select2-selection--multiple .select2-selection__choice{padding:3px 8px;margin-top:3px;color:#fff;background-color:#6c7781;border-color:#6c7781}.vp-select2+.select2 .select2-selection--multiple .select2-selection__choice__remove{float:right;margin-right:0;margin-left:3px;color:inherit;opacity:.5}.select2-vp-container ul,.select2-vp-container li{margin-bottom:0}.select2-vp-container .select2-dropdown{border-color:#ddd}.select2-vp-container .select2-search--dropdown .select2-search__field{padding:3px 4px;border:1px solid #ddd;outline:none;-webkit-box-shadow:none;box-shadow:none}.select2-vp-container .select2-results__option[aria-selected="true"]{background-color:#efeeee}.select2-vp-container .select2-results__option--highlighted[aria-selected]{background-color:#33b3db}.vp-select2-ajax__result{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap}.vp-select2-ajax__result .vp-select2-ajax__result-img{position:relative;-webkit-box-flex:0;-ms-flex:0 0 35px;flex:0 0 35px;background-color:rgba(0,0,0,0.1);background-position:center center;background-size:cover;border-radius:3px}.vp-select2-ajax__result .vp-select2-ajax__result-img::after{content:"";display:block;width:100%;padding-top:100%}.vp-select2-ajax__result .vp-select2-ajax__result-data{padding-left:10px}.vp-select2-ajax__result .vp-select2-ajax__result-title{font-size:16px;font-weight:500;line-height:1}.vp-select2-ajax__result .vp-select2-ajax__result-post-type{font-size:12px;opacity:.5}.vp-control-gallery .vp-control-gallery-additional-data{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;top:0;right:-350px;bottom:0;width:350px;padding:15px 13px;overflow:auto;background-color:#fff;border-left:1px solid #eaeaea;-webkit-transition:.15s right;transition:.15s right}.vp-control-gallery .vp-control-gallery-additional-data.active{right:0}.vp-control-gallery .vp-control-gallery-additional-data.active+.vp-control-gallery-items{margin-right:335px}@media (max-width: 910px){.vp-control-gallery .vp-control-gallery-additional-data{position:relative;display:none;right:0;width:120%;height:auto;margin-bottom:30px;border:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data.active{display:block}.vp-control-gallery .vp-control-gallery-additional-data.active+.vp-control-gallery-items{margin-right:-15px}}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview{display:-webkit-box;display:-ms-flexbox;display:flex;padding:15px 13px;margin:-15px -13px;margin-bottom:15px;border-bottom:1px solid #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-image{margin-right:15px}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-image img{display:block;width:70px;border-radius:3px;-webkit-box-shadow:0 0 0 1px #fff, 0 0 0 2px #eaeaea;box-shadow:0 0 0 1px #fff, 0 0 0 2px #eaeaea}.vp-control-gallery .vp-control-gallery-additional-data .vp-control-gallery-additional-data-preview .vp-control-gallery-additional-data-preview-size{color:#8f9498}.vp-control-gallery .vp-control-gallery-items{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-line-pack:start;align-content:flex-start;width:120%;height:325px;padding:7px;margin:-12px;margin-bottom:-25px;overflow:auto;-webkit-transition:.15s margin-right;transition:.15s margin-right}.vp-control-gallery .vp-control-gallery-items::after{content:"";display:block;width:100%}.vp-control-gallery .vp-control-gallery-items>div{position:relative;display:block;width:calc(12.5% - 10px);margin:5px;cursor:move;cursor:-webkit-grab;cursor:grab;border-radius:3px}@media (max-width: 1350px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(14.22% - 10px)}}@media (max-width: 1250px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(16.66% - 10px)}}@media (max-width: 1100px){.vp-control-gallery .vp-control-gallery-items>div{width:calc(25% - 10px)}}.vp-control-gallery .vp-control-gallery-items>div::after{content:"";display:block;padding-top:100%}.vp-control-gallery .vp-control-gallery-items>div.sortable-ghost{opacity:.4}.vp-control-gallery .vp-control-gallery-items>div img{position:absolute;display:block;top:0;left:0;width:100%;height:100%;border-radius:3px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img .vp-control-gallery-items-remove{position:absolute;top:-5px;right:-5px;width:20px;height:20px;color:#fff;cursor:pointer;visibility:hidden;background-color:#dc3232;border-radius:50%;opacity:0;-webkit-transition:.15s visibility, .15s opacity;transition:.15s visibility, .15s opacity}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img .vp-control-gallery-items-remove span{width:20px;height:20px;font-size:10px;line-height:20px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img:hover .vp-control-gallery-items-remove{visibility:visible;opacity:1}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-img.active{-webkit-box-shadow:0 0 0 1px #fff, 0 0 0 4px #33b3db;box-shadow:0 0 0 1px #fff, 0 0 0 4px #33b3db}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;color:#6c7781;text-align:center;cursor:pointer;background-color:#fff;border:1px solid #ccd3da;border-radius:3px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add>span{position:absolute;top:50%;left:50%;width:24px;height:24px;margin-top:-12px;margin-left:-12px;line-height:24px}.vp-control-gallery .vp-control-gallery-items>.vp-control-gallery-items-add:hover{color:#555;background-color:#f7f7f7}.vp-input{width:100%}.post-type-vp_lists .CodeMirror{width:100%;text-align:left;border:1px solid #ddd}.post-type-vp_lists .CodeMirror .CodeMirror-matchingbracket{color:inherit;background:rgba(255,150,0,0.3)}.post-type-vp_lists [class*="CodeMirror-lint-message"],.post-type-vp_lists .CodeMirror-lint-marker-multiple,.post-type-vp_lists [class*="CodeMirror-lint-marker"]{background-image:none}.post-type-vp_lists .CodeMirror-lint-marker-error,.post-type-vp_lists .CodeMirror-lint-marker-warning{cursor:help}.post-type-vp_lists .CodeMirror-lint-marker-multiple{position:absolute;top:0}.post-type-vp_lists [class*="CodeMirror-lint-marker"]::before{position:relative;top:-2px;font:400 18px/1 dashicons}.post-type-vp_lists [class*="CodeMirror-lint-message"]::before{position:absolute;left:16px;font:400 16px/1 dashicons}.post-type-vp_lists .CodeMirror-lint-message-error,.post-type-vp_lists .CodeMirror-lint-message-warning{padding:3px 12px 3px 28px;margin:5px 0 2px;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1)}.post-type-vp_lists .CodeMirror-lint-message-warning{background-color:#fff8e5;border-left:4px solid #ffb900}.post-type-vp_lists .CodeMirror-lint-message-warning::before,.post-type-vp_lists .CodeMirror-lint-marker-warning::before{content:"\f534";color:#f6a306}.post-type-vp_lists .CodeMirror-lint-message-error{background-color:#fbeaea;border-left:4px solid #dc3232}.post-type-vp_lists .CodeMirror-lint-message-error::before,.post-type-vp_lists .CodeMirror-lint-marker-error::before{content:"\f153";color:#dc3232}.post-type-vp_lists .CodeMirror-lint-tooltip{background:0 0;border:none;border-radius:0;direction:ltr}@media (max-width: 850px){.vp-steps__right,.vp-steps__step{float:none;width:100%}}
assets/admin/images/icon-gray.svg CHANGED
@@ -1,13 +1,13 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
2
- <defs>
3
- <style>
4
- .cls-1 {
5
- fill: #bbbbbb;
6
- }
7
- </style>
8
- </defs>
9
- <rect id="BR" class="cls-1" y="6" width="7" height="9"/>
10
- <rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
11
- <rect id="TR" class="cls-1" width="7" height="5"/>
12
- <rect id="TL" class="cls-1" x="8" width="7" height="9"/>
13
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
2
+ <defs>
3
+ <style>
4
+ .cls-1 {
5
+ fill: #bbbbbb;
6
+ }
7
+ </style>
8
+ </defs>
9
+ <rect id="BR" class="cls-1" y="6" width="7" height="9"/>
10
+ <rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
11
+ <rect id="TR" class="cls-1" width="7" height="5"/>
12
+ <rect id="TL" class="cls-1" x="8" width="7" height="9"/>
13
+ </svg>
assets/admin/images/icon-mce.svg CHANGED
@@ -1,13 +1,13 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
2
- <defs>
3
- <style>
4
- .cls-1 {
5
- fill: #555d66;
6
- }
7
- </style>
8
- </defs>
9
- <rect id="BR" class="cls-1" y="6" width="7" height="9"/>
10
- <rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
11
- <rect id="TR" class="cls-1" width="7" height="5"/>
12
- <rect id="TL" class="cls-1" x="8" width="7" height="9"/>
13
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15">
2
+ <defs>
3
+ <style>
4
+ .cls-1 {
5
+ fill: #555d66;
6
+ }
7
+ </style>
8
+ </defs>
9
+ <rect id="BR" class="cls-1" y="6" width="7" height="9"/>
10
+ <rect id="BL" class="cls-1" x="8" y="10" width="7" height="5"/>
11
+ <rect id="TR" class="cls-1" width="7" height="5"/>
12
+ <rect id="TL" class="cls-1" x="8" width="7" height="9"/>
13
+ </svg>
assets/admin/js/mce-dropdown.min.js CHANGED
@@ -1,6 +1,6 @@
1
  !function(t){function i(n){if(o[n])return o[n].exports;var e=o[n]={i:n,l:!1,exports:{}};return t[n].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var o={};i.m=t,i.c=o,i.d=function(t,o,n){i.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(o,"a",o),o},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=5)}({5:function(t,i,o){t.exports=o(6)},6:function(t,i){/*!
2
  * Name : Visual Portfolio
3
- * Version : 1.4.3
4
  * Author : nK https://nkdev.info
5
  */
6
  var o=window,n=o.tinymce,e=o.VPTinyMCEOptions;if(void 0!==e&&e.length){var u=[{text:"",value:""}];Object.keys(e).forEach(function(t){u.push({text:e[t].title,value:e[t].id})}),n.create("tinymce.plugins.visual_portfolio",{init:function(t){t.addButton("visual_portfolio",{type:"listbox",title:"Visual Portfolio",icon:"visual-portfolio",classes:"visual-portfolio-btn",onclick:function(){this.menu&&this.menu.$el.find(".mce-first").hide()},onselect:function(){this.value()&&t.insertContent('[visual_portfolio id="'+this.value()+'"]'),this.value("")},values:u,value:""})}}),n.PluginManager.add("visual_portfolio",n.plugins.visual_portfolio)}}});
1
  !function(t){function i(n){if(o[n])return o[n].exports;var e=o[n]={i:n,l:!1,exports:{}};return t[n].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var o={};i.m=t,i.c=o,i.d=function(t,o,n){i.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(o,"a",o),o},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=5)}({5:function(t,i,o){t.exports=o(6)},6:function(t,i){/*!
2
  * Name : Visual Portfolio
3
+ * Version : 1.5.0
4
  * Author : nK https://nkdev.info
5
  */
6
  var o=window,n=o.tinymce,e=o.VPTinyMCEOptions;if(void 0!==e&&e.length){var u=[{text:"",value:""}];Object.keys(e).forEach(function(t){u.push({text:e[t].title,value:e[t].id})}),n.create("tinymce.plugins.visual_portfolio",{init:function(t){t.addButton("visual_portfolio",{type:"listbox",title:"Visual Portfolio",icon:"visual-portfolio",classes:"visual-portfolio-btn",onclick:function(){this.menu&&this.menu.$el.find(".mce-first").hide()},onselect:function(){this.value()&&t.insertContent('[visual_portfolio id="'+this.value()+'"]'),this.value("")},values:u,value:""})}}),n.PluginManager.add("visual_portfolio",n.plugins.visual_portfolio)}}});
assets/admin/js/script.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(n){if(a[n])return a[n].exports;var i=a[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var a={};t.m=e,t.c=a,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}({10:function(e,t){function a(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}function n(){h[_.is(":checked")?"show":"hide"]()}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=jQuery,r=window,l=r.ajaxurl,c=r.VPAdminVariables,s=r.Tooltip,d=r.CodeMirror,p=r.emmetCodeMirror,v=o("body"),m=o(window),u=o('form[name="post"]'),f=o('[name="post_type"]'),g=o("#postID").val();v.on("focus",'[name="vp_list_shortcode"], [name="vp_filter_shortcode"]',function(){this.select()}),v.on("click",".vp-onclick-selection",function(){window.getSelection().selectAllChildren(this)});var h=o("#vp_format_video"),_=o("#post-format-video");h.length&&_.length&&(n(),v.on("change","[name=post_format]",function(){n()}));var y=null,b=void 0;v.on("change input",'.vp-input[name="video_url"]',function(){null!==y&&y.abort();var e=o(this);e.next(".vp-oembed-preview").html(""),clearTimeout(b),b=setTimeout(function(){y=o.ajax({url:l,method:"GET",dataType:"json",data:{action:"vp_find_oembed",q:e.val(),nonce:c.nonce},complete:function(t){var a=t.responseJSON;a&&void 0!==a.html&&e.next(".vp-oembed-preview").html(a.html)}})},250)}),void 0!==s&&o('[data-hint]:not([data-hint=""]):not([data-hint="false"])').each(function(){var e=o(this);new s(this,{placement:e.attr("data-hint-place")||"top",title:e.attr("data-hint"),container:o("body")[0],boundariesElement:"viewport"})}),function(){function e(e,t){var a=e.find('[data-image-id="'+t+'"]'),n={id:t};return a.find("[data-additional]").each(function(){var e=o(this),t=e.attr("data-additional");if(n[t]=e.html(),"true"===e.attr("data-to-json"))try{n[t]=JSON.parse(n[t])}catch(e){n[t]=""}}),n}function t(e,t){var a=e.find('[data-image-id="'+t+'"]'),n={};return a.find("[data-meta]").each(function(){n[o(this).attr("data-meta")]=o(this).html()}),n}function n(t){var a=[];t.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img").each(function(){a.push(e(t,o(this).attr("data-image-id")))});var n=JSON.stringify(a),i=t.children("textarea");n!==i.val()&&i.val(n).change()}function r(n,i){var r=n.children("textarea").attr("name"),l=n.children(".vp-control-gallery-additional-data"),c=l.children(".vp-control-gallery-additional-data-preview"),s=n.children(".vp-control-gallery-items").find('.vp-control-gallery-items-img[data-image-id="'+i+'"]'),d=e(n,i),p=t(n,i);d&&Object.keys(d).forEach(function(t){var i=l.find('[name="'+r+"_additional_"+t+'"], [name="'+r+"_additional_"+t+'[]"]').val(d[t]||"");if(i.hasClass("vp-select2")){if(i.hasClass("vp-select2-tags")){var c=[],s=[];n.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img").each(function(){var i=e(n,o(this).attr("data-image-id"));i&&void 0!==i[t]&&i[t]&&(c=[].concat(a(new Set([].concat(a(c),a(i[t]))))))}),c.forEach(function(e){s.push(new window.Option(e,e,!1,!1))}),i.html(s.length?s:""),i.val(void 0!==d[t]&&d[t]?d[t]:"")}i.trigger("change")}}),c.find(".vp-control-gallery-additional-data-preview-image img").attr("src",s.children("img").attr("src")||""),c.find(".vp-control-gallery-additional-data-preview-name").html(p.filename),c.find(".vp-control-gallery-additional-data-preview-size").html(p.width+"x"+p.height+" ("+p.filesizeHumanReadable+")"),c.find(".vp-control-gallery-additional-data-preview-edit a").attr("href",p.editLink.replace("&amp;","&")),s.siblings().removeClass("active"),s.addClass("active"),l.addClass("active"),S=T.find(".vp-control-gallery-additional-data.active").length}function s(e,t){if(L&&(t=!1,L=!1),c&&c.css_editor_error_notice){var a=!1;if(1===e.length?a=c.css_editor_error_notice.singular.replace("%d","1"):e.length>1&&(a=c.css_editor_error_notice.plural.replace("%d",String(e.length))),a){var n=z.prev("#vp_custom_css_notice");if(n.length||t||(n=o('<div class="notice notice-error inline" id="vp_custom_css_notice"></div>'),z.before(n)),!n.length)return;var i='<p class="notification-message">'+a+'</p><p><input id="vp_custom_css_notice_prevent" type="checkbox"><label for="vp_custom_css_notice_prevent">'+c.css_editor_error_checkbox+"</label></p>";n.html(i)}else z.prev("#vp_custom_css_notice").remove()}}if("vp_lists"===f.val()&&u.length){var h=o(".vp-content-source"),_=h.find('[name="vp_content_source"]');h.on("click",".vp-content-source__item",function(){var e=o(this).attr("data-content");h.find('[data-content="'+e+'"]').addClass("active").siblings().removeClass("active"),_.val(e).change()}),h.children('[data-content="'+_.val()+'"]').click(),o.fn.conditionize&&u.conditionize(),o(".vp-control-range").each(function(){var e=o(this).find("input"),t=e.filter('[type="hidden"]');e.on("change input",function(a){e.val(o(this).val()),t.trigger("vp-fake-"+a.type)})}),o.fn.wpColorPicker&&o(".vp-color-picker").each(function(){function e(e){if(a)return void(a=!1);clearTimeout(t),t=setTimeout(function(){o(e.target).change()},300)}var t=void 0,a=!0;o(this).data("change",e).wpColorPicker()}),o.fn.imagepicker&&o(".vp-image-picker").imagepicker();var y=o(".vp_list_preview iframe"),b=!1,w=!1,k=o('<form target="vp_list_preview_iframe" method="post" style="display: none">').attr("action",y.attr("src")).insertAfter(u);o.fn.iFrameResize&&y.iFrameResize({interval:10});var C=void 0;u.on("change input vp-fake-change vp-fake-input",'[name*="vp_"]',function(e){var t=o(this);if(!t.closest(".vp-no-reload").length){var a={name:t.attr("name"),value:t.is("[type=checkbox], [type=radio]")?t.is(":checked"):t.val(),reload:"change"===e.type||"vp-fake-change"===e.type,jQuery:w,$portfolio:b},n=k.find('[name="'+a.name+'"]');n.length||(n=o('<input type="hidden" name="'+a.name+'" />').appendTo(k)),n.attr("value",a.value),m.trigger("vp-preview-change",a),!a.reload&&b||(clearTimeout(C),C=setTimeout(function(){w=!1,b=!1,k.submit()},400))}}),y.on("load",function(){w=this.contentWindow.jQuery,b=w(".vp-portfolio")}),m.on("vp-preview-change",function(e,t){if(t.$portfolio)switch(t.name){case"vp_layout":case"vp_tiles_type":case"vp_masonry_columns":case"vp_items_gap":var a=t.name;a=a.substring(3),a=a.replace("_","-"),t.$portfolio.attr("data-vp-"+a,t.value),t.$portfolio.vpf("init"),t.reload=!1;break;case"vp_filter_align":t.$portfolio.find(".vp-filter").removeClass("vp-filter__align-center vp-filter__align-left vp-filter__align-right").addClass("vp-filter__align-"+t.value),t.reload=!1;break;case"vp_pagination_align":t.$portfolio.find(".vp-pagination").removeClass("vp-pagination__align-center vp-pagination__align-left vp-pagination__align-right").addClass("vp-pagination__align-"+t.value),t.reload=!1;break;case"vp_custom_css":var n=t.$portfolio.closest("html"),i="vp-custom-css-"+g+"-inline-css",o=n.find("#"+i);o.length||(o=t.jQuery('<style id="'+i+'">'),n.find("body").prepend(o)),o.html(t.value),t.reload=!1;break;case"vp_list_name":case"vp_stretch":t.reload=!1}}),v.on("click",".vp-control-image-dropdown",function(e){o(e.target).closest(".vp-control-image-dropdown__content").length||o(this).toggleClass("active")}),v.on("mousedown",function(e){var t=o(e.target).closest(".vp-control-image-dropdown");o(".vp-control-image-dropdown.active").each(function(){this!==t[0]&&o(this).removeClass("active")})}),v.on("change",".vp-control-image-dropdown .vp-image-picker",function(){var e=o(this),t=e.data("picker");if(t){var a=t.select.find('option[value="'+t.select.val()+'"]'),n=a.parent("optgroup"),i=e.closest(".vp-control-image-dropdown"),r=a.attr("data-img-src");i.length&&(i.children(".vp-control-image-dropdown__preview").html('<img src="'+r+'" alt="">'),n.length&&i.children(".vp-control-image-dropdown__title").html(n.attr("label")))}});var x=o('[name="vp_list_name"]'),j=o('[name="post_title"]');x.length&&j.length&&(x.on("input",function(){j.val()!==x.val()&&j.val(x.val()).change()}),j.on("input",function(){x.val(j.val())})),o.fn.select2&&o(".vp-select2").each(function(){var e=o(this),t={width:"100%",minimumResultsForSearch:e.hasClass("vp-select2-nosearch")?-1:1,tags:e.hasClass("vp-select2-tags")},a=!!e.attr("data-post-type")&&o(e.attr("data-post-type"));e.closest(".vp-select2-posts-ajax").length&&(t=o.extend({minimumInputLength:1,ajax:{url:l,dataType:"json",delay:250,data:function(e){return{action:"vp_find_posts",q:e.term,post_type:!!a&&a.val(),nonce:c.nonce}},processResults:function(e){return{results:!(!e||!e.length)&&e}},cache:!0},escapeMarkup:function(e){return e},templateResult:function(e){if(e.loading)return e.text;var t="";e.title&&(t=e.title);var a="";e.post_type&&(a=e.post_type);var n="";return e.img&&(n="style=\"background-image: url('"+e.img+"');\""),'<div class="vp-select2-ajax__result"><div class="vp-select2-ajax__result-img" '+n+'></div><div class="vp-select2-ajax__result-data"><div class="vp-select2-ajax__result-title">'+t+'</div><div class="vp-select2-ajax__result-post-type">'+a+"</div></div></div>"},templateSelection:function(e){return e.title||e.text}},t)),e.closest(".vp-select2-taxonomies-ajax").length&&(t=o.extend({minimumInputLength:1,ajax:{url:l,dataType:"json",delay:250,data:function(e){return{action:"vp_find_taxonomies",q:e.term,post_type:!!a&&a.val(),nonce:c.nonce}},processResults:function(e){var t=[];return e&&Object.keys(e).forEach(function(a){t.push({text:a,children:e[a]})}),{results:t}},cache:!0}},t)),e.select2(t).data("select2").$dropdown.addClass("select2-vp-container")});var T=o(".vp-control-gallery"),S=0;if(o.fn.sortable&&(T.each(function(){var e=o(this),t=e.children(".vp-control-gallery-items-default");e.children(".vp-control-gallery-items").sortable({animation:150,draggable:".vp-control-gallery-items-img",onUpdate:function(){n(e)}}),e.on("click",".vp-control-gallery-items-remove",function(t){t.preventDefault(),o(this).parent().remove(),n(e)}),e.on("click",".vp-control-gallery-items-add",function(a){a.preventDefault();var i=e.data("wp-frame");return i?void i.open():wp.media?(i=wp.media({title:"Select or Upload Images",button:{text:"Use this images"},multiple:!0,library:{type:"image"}}),e.data("wp-frame",i),i.on("select",function(){var a=i.state().get("selection").models;a&&a.length&&(a.forEach(function(a){var n=a.changed.url;a.changed.sizes&&a.changed.sizes.thumbnail&&(n=a.changed.sizes.thumbnail.url);var i=t.children().clone();i.attr("data-image-id",a.id),i.children("img").attr("src",n),i.find('[data-meta="width"]').html(a.changed.width),i.find('[data-meta="height"]').html(a.changed.height),i.find('[data-meta="filename"]').html(a.changed.filename),i.find('[data-meta="editLink"]').html(a.changed.editLink),i.find('[data-meta="filesizeHumanReadable"]').html(a.changed.filesizeHumanReadable),e.find(".vp-control-gallery-items-add").before(i)}),n(e))}),void i.open()):void console.error("Can't access wp.media object.")}),e.on("click",".vp-control-gallery-items-img",function(t){t.preventDefault(),r(e,o(this).attr("data-image-id"))});var a=void 0;e.on("change input",".vp-control-gallery-additional-data [name]",function(){clearTimeout(a),a=setTimeout(function(){var t=e.children(".vp-control-gallery-additional-data"),a=e.children("textarea").attr("name"),r=e.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img.active").attr("data-image-id");if(r){var l=e.children(".vp-control-gallery-items").find('[data-image-id="'+r+'"]');t.find('[name*="'+a+'_additional_"]').each(function(){var e=o(this).attr("name").replace(a+"_additional_","").replace("[]",""),t=o(this).val()||"";"object"===(void 0===t?"undefined":i(t))&&(t=JSON.stringify(t)),l.find('[data-additional="'+e+'"]').html(t||"")}),n(e)}},200)})}),T.length)){var E=T.children(".vp-control-gallery-additional-data");o(document).on("mousedown",function(e){if(S){var t=e.target;o(t).closest(".vp-control-gallery-additional-data, .vp-control-gallery-items-img, .select2-vp-container").length||(E.removeClass("active"),T.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img.active").removeClass("active"),S=T.find(".vp-control-gallery-additional-data.active").length)}})}var z=o('[name="vp_custom_css"]'),A=!1,L=!0;if(void 0!==d&&z.length){if(c&&c.classnames){var O=d.hint.css;d.hint.css=function(e){var t=e.getCursor(),a=O(e)||{from:t,to:e.getCursor(),list:[]},n=e.getTokenAt(t);return"top"===n.state.state&&0===n.string.indexOf(".")&&(a={from:d.Pos(t.line,n.start),to:d.Pos(t.line,n.end),list:[]},c.classnames.forEach(function(e){-1!==e.indexOf(n.string)&&a.list.push(e)})),a}}var $=d.fromTextArea(z[0],{mode:"css",theme:"eclipse",indentUnit:4,autoCloseTags:!0,autoCloseBrackets:!0,matchBrackets:!0,foldGutter:!0,lint:{options:{errors:!0,"box-model":!0,"display-property-grouping":!0,"duplicate-properties":!0,"known-properties":!0,"outline-none":!0},onUpdateLinting:function(e,t,a){var n=[];e.forEach(function(e){"error"===e.severity&&n.push(e)}),a.vcLintErrors=n,A||s(a.vcLintErrors,!0)}},lineNumbers:!0,lineWrapping:!0,scrollPastEnd:!0,emmet_active:!0,emmet:!0,styleActiveLine:!0,continueComments:!0,scrollbarStyle:"simple",extraKeys:{"Ctrl-Space":"autocomplete","Ctrl-/":"toggleComment","Cmd-/":"toggleComment","Alt-F":"findPersistent"},gutters:["CodeMirror-lint-markers","CodeMirror-linenumbers","CodeMirror-foldgutter"]});p($),z.data("CodeMirrorInstance",$),$.on("change",function(){$.save(),z.change()}),$.on("keyup",function(e,t){var a=/^[a-zA-Z]$/.test(t.key);if(!e.state.completionActive||!a){var n=e.getTokenAt(e.getCursor());if("string"!==n.type&&"comment"!==n.type){var i=e.doc.getLine(e.doc.getCursor().line).substr(0,e.doc.getCursor().ch);(a||":"===t.key||" "===t.key&&/:\s+$/.test(i))&&e.showHint({completeSingle:!1})}}})}var M=!1;v.on("click","#publish:not(.disabled)",function(e){if(M=!0,!A){var t=o(this),a=z.length&&z.data("CodeMirrorInstance");a&&a.vcLintErrors&&a.vcLintErrors.length&&(e.preventDefault(),t.addClass("disabled button-disabled button-primary-disabled"),setTimeout(function(){t.removeClass("disabled button-disabled button-primary-disabled")},1500),s(a.vcLintErrors,!1),o("html,body").animate({scrollTop:o("#vp_custom_css").offset().top-100},300),a.focus(),a.setCursor(a.vcLintErrors[0].from.line))}});var P=u.serialize();o(window).on("beforeunload",function(){return M?void(M=!1):P!==u.serialize()}),v.on("change","#vp_custom_css_notice_prevent",function(){A=!0,o(this).closest(".notice").slideUp()})}}()},9:function(e,t,a){e.exports=a(10)}});
1
+ !function(e){function t(n){if(a[n])return a[n].exports;var i=a[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var a={};t.m=e,t.c=a,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}({10:function(e,t){function a(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}function n(){h[_.is(":checked")?"show":"hide"]()}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=jQuery,r=window,l=r.ajaxurl,c=r.VPAdminVariables,s=r.Tooltip,d=r.CodeMirror,p=r.emmetCodeMirror,v=o("body"),m=o(window),u=o('form[name="post"]'),f=o('[name="post_type"]'),g=o("#postID").val();v.on("focus",'[name="vp_list_shortcode"], [name="vp_filter_shortcode"]',function(){this.select()}),v.on("click",".vp-onclick-selection",function(){window.getSelection().selectAllChildren(this)});var h=o("#vp_format_video"),_=o("#post-format-video");h.length&&_.length&&(n(),v.on("change","[name=post_format]",function(){n()}));var y=null,b=void 0;v.on("change input",'.vp-input[name="video_url"]',function(){null!==y&&y.abort();var e=o(this);e.next(".vp-oembed-preview").html(""),clearTimeout(b),b=setTimeout(function(){y=o.ajax({url:l,method:"GET",dataType:"json",data:{action:"vp_find_oembed",q:e.val(),nonce:c.nonce},complete:function(t){var a=t.responseJSON;a&&void 0!==a.html&&e.next(".vp-oembed-preview").html(a.html)}})},250)}),void 0!==s&&o('[data-hint]:not([data-hint=""]):not([data-hint="false"])').each(function(){var e=o(this);new s(this,{placement:e.attr("data-hint-place")||"top",title:e.attr("data-hint"),container:o("body")[0],boundariesElement:"viewport"})}),function(){function e(e,t){var a=e.find('[data-image-id="'+t+'"]'),n={id:t};return a.find("[data-additional]").each(function(){var e=o(this),t=e.attr("data-additional");if(n[t]=e.html(),"true"===e.attr("data-to-json"))try{n[t]=JSON.parse(n[t])}catch(e){n[t]=""}}),n}function t(e,t){var a=e.find('[data-image-id="'+t+'"]'),n={};return a.find("[data-meta]").each(function(){n[o(this).attr("data-meta")]=o(this).html()}),n}function n(t){var a=[];t.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img").each(function(){a.push(e(t,o(this).attr("data-image-id")))});var n=JSON.stringify(a),i=t.children("textarea");n!==i.val()&&i.val(n).change()}function r(n,i){var r=n.children("textarea").attr("name"),l=n.children(".vp-control-gallery-additional-data"),c=l.children(".vp-control-gallery-additional-data-preview"),s=n.children(".vp-control-gallery-items").find('.vp-control-gallery-items-img[data-image-id="'+i+'"]'),d=e(n,i),p=t(n,i);d&&Object.keys(d).forEach(function(t){var i=l.find('[name="'+r+"_additional_"+t+'"], [name="'+r+"_additional_"+t+'[]"]').val(d[t]||"");if(i.hasClass("vp-select2")){if(i.hasClass("vp-select2-tags")){var c=[],s=[];n.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img").each(function(){var i=e(n,o(this).attr("data-image-id"));i&&void 0!==i[t]&&i[t]&&(c=[].concat(a(new Set([].concat(a(c),a(i[t]))))))}),c.forEach(function(e){s.push(new window.Option(e,e,!1,!1))}),i.html(s.length?s:""),i.val(void 0!==d[t]&&d[t]?d[t]:"")}i.trigger("change")}}),c.find(".vp-control-gallery-additional-data-preview-image img").attr("src",s.children("img").attr("src")||""),c.find(".vp-control-gallery-additional-data-preview-name").html(p.filename),c.find(".vp-control-gallery-additional-data-preview-size").html(p.width+"x"+p.height+" ("+p.filesizeHumanReadable+")"),c.find(".vp-control-gallery-additional-data-preview-edit a").attr("href",p.editLink.replace("&amp;","&")),s.siblings().removeClass("active"),s.addClass("active"),l.addClass("active"),S=T.find(".vp-control-gallery-additional-data.active").length}function s(e,t){if(L&&(t=!1,L=!1),c&&c.css_editor_error_notice){var a=!1;if(1===e.length?a=c.css_editor_error_notice.singular.replace("%d","1"):e.length>1&&(a=c.css_editor_error_notice.plural.replace("%d",String(e.length))),a){var n=z.prev("#vp_custom_css_notice");if(n.length||t||(n=o('<div class="notice notice-error inline" id="vp_custom_css_notice"></div>'),z.before(n)),!n.length)return;var i='<p class="notification-message">'+a+'</p><p><input id="vp_custom_css_notice_prevent" type="checkbox"><label for="vp_custom_css_notice_prevent">'+c.css_editor_error_checkbox+"</label></p>";n.html(i)}else z.prev("#vp_custom_css_notice").remove()}}if("vp_lists"===f.val()&&u.length){var h=o(".vp-content-source"),_=h.find('[name="vp_content_source"]');h.on("click",".vp-content-source__item",function(){var e=o(this).attr("data-content");h.find('[data-content="'+e+'"]').addClass("active").siblings().removeClass("active"),_.val(e).change()}),h.children('[data-content="'+_.val()+'"]').click(),o.fn.conditionize&&u.conditionize(),o(".vp-control-range").each(function(){var e=o(this).find("input"),t=e.filter('[type="hidden"]');e.on("change input",function(a){e.val(o(this).val()),t.trigger("vp-fake-"+a.type)})}),o.fn.wpColorPicker&&o(".vp-color-picker").each(function(){function e(e){if(a)return void(a=!1);clearTimeout(t),t=setTimeout(function(){o(e.target).change()},300)}var t=void 0,a=!0;o(this).data("change",e).wpColorPicker()}),o.fn.imagepicker&&o(".vp-image-picker").imagepicker();var y=o(".vp_list_preview iframe"),b=!1,w=!1,k=o('<form target="vp_list_preview_iframe" method="post" style="display: none">').attr("action",y.attr("src")).insertAfter(u);o.fn.iFrameResize&&y.iFrameResize({interval:10});var C=void 0;u.on("change input vp-fake-change vp-fake-input",'[name*="vp_"]',function(e){var t=o(this);if(!t.closest(".vp-no-reload").length){var a={name:t.attr("name"),value:t.is("[type=checkbox], [type=radio]")?t.is(":checked"):t.val(),reload:"change"===e.type||"vp-fake-change"===e.type,jQuery:w,$portfolio:b},n=k.find('[name="'+a.name+'"]');n.length||(n=o('<input type="hidden" name="'+a.name+'" />').appendTo(k)),n.attr("value",a.value),m.trigger("vp-preview-change",a),!a.reload&&b||(clearTimeout(C),C=setTimeout(function(){w=!1,b=!1,k.submit()},400))}}),y.on("load",function(){w=this.contentWindow.jQuery,b=w(".vp-portfolio")}),m.on("vp-preview-change",function(e,t){if(t.$portfolio)switch(t.name){case"vp_layout":case"vp_tiles_type":case"vp_masonry_columns":case"vp_items_gap":var a=t.name;a=a.substring(3),a=a.replace("_","-"),t.$portfolio.attr("data-vp-"+a,t.value),t.$portfolio.vpf("init"),t.reload=!1;break;case"vp_filter_align":t.$portfolio.find(".vp-filter").removeClass("vp-filter__align-center vp-filter__align-left vp-filter__align-right").addClass("vp-filter__align-"+t.value),t.reload=!1;break;case"vp_pagination_align":t.$portfolio.find(".vp-pagination").removeClass("vp-pagination__align-center vp-pagination__align-left vp-pagination__align-right").addClass("vp-pagination__align-"+t.value),t.reload=!1;break;case"vp_custom_css":var n=t.$portfolio.closest("html"),i="vp-custom-css-"+g+"-inline-css",o=n.find("#"+i);o.length||(o=t.jQuery('<style id="'+i+'">'),n.find("body").prepend(o)),o.html(t.value),t.reload=!1;break;case"vp_list_name":case"vp_stretch":t.reload=!1}}),v.on("click",".vp-control-image-dropdown",function(e){o(e.target).closest(".vp-control-image-dropdown__content").length||o(this).toggleClass("active")}),v.on("mousedown",function(e){var t=o(e.target).closest(".vp-control-image-dropdown");o(".vp-control-image-dropdown.active").each(function(){this!==t[0]&&o(this).removeClass("active")})}),v.on("change",".vp-control-image-dropdown .vp-image-picker",function(){var e=o(this),t=e.data("picker");if(t){var a=t.select.find('option[value="'+t.select.val()+'"]'),n=a.parent("optgroup"),i=e.closest(".vp-control-image-dropdown"),r=a.attr("data-img-src");i.length&&(i.children(".vp-control-image-dropdown__preview").html('<img src="'+r+'" alt="">'),n.length&&i.children(".vp-control-image-dropdown__title").html(n.attr("label")))}});var x=o('[name="vp_list_name"]'),j=o('[name="post_title"]');x.length&&j.length&&(x.on("input",function(){j.val()!==x.val()&&j.val(x.val()).change()}),j.on("input",function(){x.val(j.val())})),o.fn.select2&&o(".vp-select2").each(function(){var e=o(this),t={width:"100%",minimumResultsForSearch:e.hasClass("vp-select2-nosearch")?-1:1,tags:e.hasClass("vp-select2-tags")},a=!!e.attr("data-post-type")&&o(e.attr("data-post-type"));e.closest(".vp-select2-posts-ajax").length&&(t=o.extend({minimumInputLength:1,ajax:{url:l,dataType:"json",delay:250,data:function(e){return{action:"vp_find_posts",q:e.term,post_type:!!a&&a.val(),nonce:c.nonce}},processResults:function(e){return{results:!(!e||!e.length)&&e}},cache:!0},escapeMarkup:function(e){return e},templateResult:function(e){if(e.loading)return e.text;var t="";e.title&&(t=e.title);var a="";e.post_type&&(a=e.post_type);var n="";return e.img&&(n="style=\"background-image: url('"+e.img+"');\""),'<div class="vp-select2-ajax__result"><div class="vp-select2-ajax__result-img" '+n+'></div><div class="vp-select2-ajax__result-data"><div class="vp-select2-ajax__result-title">'+t+'</div><div class="vp-select2-ajax__result-post-type">'+a+"</div></div></div>"},templateSelection:function(e){return e.title||e.text}},t)),e.closest(".vp-select2-taxonomies-ajax").length&&(t=o.extend({minimumInputLength:1,ajax:{url:l,dataType:"json",delay:250,data:function(e){return{action:"vp_find_taxonomies",q:e.term,post_type:!!a&&a.val(),nonce:c.nonce}},processResults:function(e){var t=[];return e&&Object.keys(e).forEach(function(a){t.push({text:a,children:e[a]})}),{results:t}},cache:!0}},t)),e.select2(t).data("select2").$dropdown.addClass("select2-vp-container")});var T=o(".vp-control-gallery"),S=0;if(o.fn.sortable&&(T.each(function(){var e=o(this),t=e.children(".vp-control-gallery-items-default");e.children(".vp-control-gallery-items").sortable({animation:150,draggable:".vp-control-gallery-items-img",onUpdate:function(){n(e)}}),e.on("click",".vp-control-gallery-items-remove",function(t){t.preventDefault(),o(this).parent().remove(),n(e)}),e.on("click",".vp-control-gallery-items-add",function(a){a.preventDefault();var i=e.data("wp-frame");return i?void i.open():wp.media?(i=wp.media({title:"Select or Upload Images",button:{text:"Use this images"},multiple:!0,library:{type:"image"}}),e.data("wp-frame",i),i.on("select",function(){var a=i.state().get("selection").models;a&&a.length&&(a.forEach(function(a){var n=a.changed.url;a.changed.sizes&&a.changed.sizes.thumbnail&&(n=a.changed.sizes.thumbnail.url);var i=t.children().clone();i.attr("data-image-id",a.id),i.children("img").attr("src",n),i.find('[data-meta="width"]').html(a.changed.width),i.find('[data-meta="height"]').html(a.changed.height),i.find('[data-meta="filename"]').html(a.changed.filename),i.find('[data-meta="editLink"]').html(a.changed.editLink),i.find('[data-meta="filesizeHumanReadable"]').html(a.changed.filesizeHumanReadable),e.find(".vp-control-gallery-items-add").before(i)}),n(e))}),void i.open()):void console.error("Can't access wp.media object.")}),e.on("click",".vp-control-gallery-items-img",function(t){t.preventDefault(),r(e,o(this).attr("data-image-id"))});var a=void 0;e.on("change input",".vp-control-gallery-additional-data [name]",function(){clearTimeout(a),a=setTimeout(function(){var t=e.children(".vp-control-gallery-additional-data"),a=e.children("textarea").attr("name"),r=e.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img.active").attr("data-image-id");if(r){var l=e.children(".vp-control-gallery-items").find('[data-image-id="'+r+'"]');t.find('[name*="'+a+'_additional_"]').each(function(){var e=o(this).attr("name").replace(a+"_additional_","").replace("[]",""),t=o(this).val()||"";"object"===(void 0===t?"undefined":i(t))&&(t=JSON.stringify(t)),l.find('[data-additional="'+e+'"]').html(t||"")}),n(e)}},200)})}),T.length)){var E=T.children(".vp-control-gallery-additional-data");o(document).on("mousedown",function(e){if(S){var t=e.target;o(t).closest(".vp-control-gallery-additional-data, .vp-control-gallery-items-img, .select2-vp-container").length||(E.removeClass("active"),T.children(".vp-control-gallery-items").find(".vp-control-gallery-items-img.active").removeClass("active"),S=T.find(".vp-control-gallery-additional-data.active").length)}})}var z=o('[name="vp_custom_css"]'),A=!1,L=!0;if(void 0!==d&&z.length){if(c&&c.classnames){var O=d.hint.css;d.hint.css=function(e){var t=e.getCursor(),a=O(e)||{from:t,to:e.getCursor(),list:[]},n=e.getTokenAt(t);return"top"===n.state.state&&0===n.string.indexOf(".")&&(a={from:d.Pos(t.line,n.start),to:d.Pos(t.line,n.end),list:[]},c.classnames.forEach(function(e){-1!==e.indexOf(n.string)&&a.list.push(e)})),a}}var $=d.fromTextArea(z[0],{mode:"css",theme:"eclipse",indentUnit:4,autoCloseTags:!0,autoCloseBrackets:!0,matchBrackets:!0,foldGutter:!0,lint:{options:{errors:!0,"box-model":!0,"display-property-grouping":!0,"duplicate-properties":!0,"known-properties":!0,"outline-none":!0},onUpdateLinting:function(e,t,a){var n=[];e.forEach(function(e){"error"===e.severity&&n.push(e)}),a.vcLintErrors=n,A||s(a.vcLintErrors,!0)}},lineNumbers:!0,lineWrapping:!0,scrollPastEnd:!0,emmet_active:!0,emmet:!0,styleActiveLine:!0,continueComments:!0,scrollbarStyle:"simple",extraKeys:{"Ctrl-Space":"autocomplete","Ctrl-/":"toggleComment","Cmd-/":"toggleComment","Alt-F":"findPersistent"},gutters:["CodeMirror-lint-markers","CodeMirror-linenumbers","CodeMirror-foldgutter"]});p($),z.data("CodeMirrorInstance",$),$.on("change",function(){$.save(),z.change()}),$.on("keyup",function(e,t){var a=/^[a-zA-Z]$/.test(t.key);if(!e.state.completionActive||!a){var n=e.getTokenAt(e.getCursor());if("string"!==n.type&&"comment"!==n.type){var i=e.doc.getLine(e.doc.getCursor().line).substr(0,e.doc.getCursor().ch);(a||":"===t.key||" "===t.key&&/:\s+$/.test(i))&&e.showHint({completeSingle:!1})}}})}var M=!1;v.on("click","#publish:not(.disabled)",function(e){if(M=!0,!A){var t=o(this),a=z.length&&z.data("CodeMirrorInstance");a&&a.vcLintErrors&&a.vcLintErrors.length&&(e.preventDefault(),t.addClass("disabled button-disabled button-primary-disabled"),setTimeout(function(){t.removeClass("disabled button-disabled button-primary-disabled")},1500),s(a.vcLintErrors,!1),o("html,body").animate({scrollTop:o("#vp_custom_css").offset().top-100},300),a.focus(),a.setCursor(a.vcLintErrors[0].from.line))}});var P=u.serialize();o(window).on("beforeunload",function(){return M?void(M=!1):P!==u.serialize()||void 0}),v.on("change","#vp_custom_css_notice_prevent",function(){A=!0,o(this).closest(".notice").slideUp()})}}()},9:function(e,t,a){e.exports=a(10)}});
assets/admin/js/vc-frontend.min.js CHANGED
@@ -2,7 +2,7 @@
2
  * Additional js for frontend VC
3
  *
4
  * Name : Visual Portfolio
5
- * Version : 1.4.3
6
  * Author : nK https://nkdev.info
7
  */
8
  var t=window,o=t.vc;jQuery(function(){void 0!==o&&o.events.on("shortcodes:add shortcodeView:updated",function(e){if("visual_portfolio"===e.settings.base){var n=o.$frame[0].contentWindow,t=!!n&&n.jQuery;if(t){var r=t(e.view.el).children(".vp-portfolio");r.length&&void 0!==r.vpf&&r.vpf()}}})})}});
2
  * Additional js for frontend VC
3
  *
4
  * Name : Visual Portfolio
5
+ * Version : 1.5.0
6
  * Author : nK https://nkdev.info
7
  */
8
  var t=window,o=t.vc;jQuery(function(){void 0!==o&&o.events.on("shortcodes:add shortcodeView:updated",function(e){if("visual_portfolio"===e.settings.base){var n=o.$frame[0].contentWindow,t=!!n&&n.jQuery;if(t){var r=t(e.view.el).children(".vp-portfolio");r.length&&void 0!==r.vpf&&r.vpf()}}})})}});
assets/css/style.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /*!
2
  * Name : Visual Portfolio
3
- * Version : 1.4.3
4
  * Author : nK https://nkdev.info
5
- */.vp-portfolio{position:relative;min-height:114px}.vp-portfolio,.vp-portfolio *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-portfolio__items{-webkit-transition:.3s height ease-in-out;transition:.3s height ease-in-out}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__pagination-wrap{visibility:hidden;opacity:0;-webkit-transition:.7s opacity, .7s visibility;transition:.7s opacity, .7s visibility}.vp-portfolio__item-wrap{position:relative;float:left;width:33.333%}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a{display:block;width:100%;height:auto}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:.7s opacity, .7s visibility;transition:.7s opacity, .7s visibility}.vp-portfolio__preloader{position:absolute;left:50%;width:23px;height:24px;margin-top:45px;margin-left:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;left:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){left:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;left:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}[data-vp-layout="tiles"] .vp-portfolio__item-img img,[data-vp-layout="tiles"] .vp-portfolio__item-img{position:absolute;top:0;right:0;bottom:0;left:0}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap::before{content:"";display:block;margin-top:56%}[data-vp-layout="tiles"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:50% 50%;object-position:50% 50%;font-family:"object-fit: cover; object-position: 50% 50%;"}[data-vp-layout="justified"] .vp-portfolio__items{-webkit-transition:.2s height ease-in-out;transition:.2s height ease-in-out}[data-vp-layout="justified"] .vp-portfolio__item-wrap{float:left;top:0;left:0;-webkit-transition:.2s transform ease-in-out, .2s width ease-in-out, .2s height ease-in-out;transition:.2s transform ease-in-out, .2s width ease-in-out, .2s height ease-in-out}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__filter-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__pagination-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;right:0;bottom:0;left:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__filter-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__pagination-wrap{opacity:.5}.vp-portfolio__item-popup{display:none}.vp-pswp{z-index:100000}.vp-pswp .pswp__caption{background-color:rgba(0,0,0,0.75)}.vp-pswp .pswp__caption>div{max-width:600px;font-size:12px;color:#fff}.vp-pswp .pswp__caption a{color:inherit}.vp-pswp .pswp__caption a:hover{opacity:.8}.vp-pswp .pswp__caption .vp-portfolio__item-meta-title{margin-top:0;margin-bottom:3px;font-size:14px;color:inherit}.vp-pswp .pswp__caption .vp-portfolio__item-meta-title a{text-decoration:none}.vp-pswp .pswp__preloader{position:absolute;right:0;bottom:0;z-index:1}.vp-pswp .vp-pswp-video{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;max-width:1920px;height:100%;margin:0 auto;line-height:0;text-align:left;vertical-align:middle;z-index:1045}.vp-pswp .vp-pswp-video>div{position:relative;width:100%;height:0;padding-bottom:56.25%}.vp-pswp .vp-pswp-video>div iframe{position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.vp-pswp .vp-pswp-video>div video{width:100% !important;height:auto !important;margin:0}
1
  /*!
2
  * Name : Visual Portfolio
3
+ * Version : 1.5.0
4
  * Author : nK https://nkdev.info
5
+ */.vp-portfolio{position:relative;min-height:114px}.vp-portfolio,.vp-portfolio *{-webkit-box-sizing:border-box;box-sizing:border-box}.vp-portfolio__items{-webkit-transition:.3s height ease-in-out, .3s transform ease-in-out;transition:.3s height ease-in-out, .3s transform ease-in-out}.vp-portfolio::after,.vp-portfolio__items::after{content:"";display:block;clear:both}.vp-portfolio__items-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__pagination-wrap,.vp-portfolio__item{position:relative;overflow:hidden}.vp-portfolio__items-wrap,.vp-portfolio__filter-wrap,.vp-portfolio__pagination-wrap{visibility:hidden;opacity:0;-webkit-transition:.7s opacity, .7s visibility;transition:.7s opacity, .7s visibility}.vp-portfolio__item-wrap{position:relative;float:left;width:33.333%}.vp-portfolio__item .vp-portfolio__item-img img,.vp-portfolio__item .vp-portfolio__item-img a{display:block;width:100%;height:auto}.vp-portfolio__preloader-wrap{visibility:visible;opacity:1;-webkit-transition:.7s opacity, .7s visibility;transition:.7s opacity, .7s visibility}.vp-portfolio__preloader{position:absolute;left:50%;width:23px;height:24px;margin-top:45px;margin-left:-11px;-webkit-animation:vp-preloader 2s linear infinite;animation:vp-preloader 2s linear infinite}.vp-portfolio__preloader span{position:absolute;display:block;top:0;left:0;width:10px;height:7px;background-color:#8a8a8a}.vp-portfolio__preloader span:nth-of-type(1){height:14px}.vp-portfolio__preloader span:nth-of-type(2){left:12px}.vp-portfolio__preloader span:nth-of-type(3){top:16px}.vp-portfolio__preloader span:nth-of-type(4){top:9px;left:12px;height:14px}@-webkit-keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}@keyframes vp-preloader{0%,100%{opacity:.5}40%,60%{opacity:1}}[data-vp-layout="tiles"] .vp-portfolio__item-img img,[data-vp-layout="tiles"] .vp-portfolio__item-img{position:absolute;top:0;right:0;bottom:0;left:0}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="tiles"] .vp-portfolio__item-img-wrap::before{content:"";display:block;margin-top:56%}[data-vp-layout="tiles"] .vp-portfolio__item-img img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:50% 50%;object-position:50% 50%;font-family:"object-fit: cover; object-position: 50% 50%;"}[data-vp-layout="justified"] .vp-portfolio__items{-webkit-transition:.2s height ease-in-out;transition:.2s height ease-in-out}[data-vp-layout="justified"] .vp-portfolio__item-wrap{float:left;top:0;left:0;-webkit-transition:.2s transform ease-in-out, .2s width ease-in-out, .2s height ease-in-out;transition:.2s transform ease-in-out, .2s width ease-in-out, .2s height ease-in-out}[data-vp-layout="slider"] .vp-portfolio__item-wrap{float:none;width:auto}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap{position:relative;display:block;overflow:hidden}[data-vp-layout="slider"] .vp-portfolio__item-img-wrap::before{content:"";display:block}[data-vp-layout="slider"] .vp-portfolio__item-img img{-o-object-fit:cover;object-fit:cover;-o-object-position:50% 50%;object-position:50% 50%;font-family:"object-fit: cover; object-position: 50% 50%;"}[data-vp-layout="slider"] .vp-portfolio__items-arrow{position:absolute;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;top:50%;width:40px;height:40px;margin-top:-20px;color:#6c7781;cursor:pointer;background-color:#fff;border-radius:50%;-webkit-box-shadow:0 2px 15px 2px rgba(0,0,0,0.05);box-shadow:0 2px 15px 2px rgba(0,0,0,0.05);opacity:.5;-webkit-transition:.2s opacity ease-in-out;transition:.2s opacity ease-in-out;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-arrow::after{content:"";position:absolute;display:block;top:-10px;right:-10px;bottom:-10px;left:-10px}[data-vp-layout="slider"] .vp-portfolio__items-arrow:hover{opacity:1}[data-vp-layout="slider"] .vp-portfolio__items-arrow-prev{left:10px}[data-vp-layout="slider"] .vp-portfolio__items-arrow-next{right:10px}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap{padding-bottom:25px}[data-vp-layout="slider"][data-vp-slider-bullets="true"] .vp-portfolio__items-wrap .vp-portfolio__items-arrow{margin-top:-32.5px}[data-vp-layout="slider"] .vp-portfolio__items-bullets{position:absolute;margin-bottom:-15px;text-align:center;z-index:1}[data-vp-layout="slider"] .vp-portfolio__items-bullets.swiper-pagination-bullets-dynamic{margin-bottom:-7px}[data-vp-layout="slider"] .vp-portfolio__items-bullets>span{position:relative;cursor:pointer;background-color:#6c7781;opacity:.2;-webkit-transition:.15s opacity ease-in-out;transition:.15s opacity ease-in-out}[data-vp-layout="slider"] .vp-portfolio__items-bullets>span:hover{opacity:.5}[data-vp-layout="slider"] .vp-portfolio__items-bullets>span.swiper-pagination-bullet-active{opacity:1}[data-vp-layout="slider"] .vp-portfolio__items-bullets>span::after{content:"";position:absolute;display:block;top:-4px;right:-4px;bottom:-4px;left:-4px}.vp-portfolio.vp-portfolio__ready{min-height:initial}.vp-portfolio.vp-portfolio__ready .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__filter-wrap,.vp-portfolio.vp-portfolio__ready .vp-portfolio__pagination-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap{visibility:hidden;opacity:0}.vp-portfolio.vp-portfolio__ready .vp-portfolio__preloader-wrap .vp-portfolio__preloader{-webkit-animation:none;animation:none}.vp-single-filter.vp-single-filter__ready .vp-portfolio__filter-wrap{visibility:visible;opacity:1}.vp-portfolio.vp-portfolio__loading::before{content:"";position:absolute;display:block;top:0;right:0;bottom:0;left:0;z-index:1}.vp-portfolio.vp-portfolio__loading .vp-portfolio__items-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__filter-wrap,.vp-portfolio.vp-portfolio__loading .vp-portfolio__pagination-wrap{opacity:.5}.vp-portfolio__item-popup{display:none}.vp-pswp{z-index:100000}.vp-pswp .pswp__caption{background-color:rgba(0,0,0,0.75)}.vp-pswp .pswp__caption>div{max-width:600px;font-size:12px;color:#fff}.vp-pswp .pswp__caption a{color:inherit}.vp-pswp .pswp__caption a:hover{opacity:.8}.vp-pswp .pswp__caption .vp-portfolio__item-meta-title{margin-top:0;margin-bottom:3px;font-size:14px;color:inherit}.vp-pswp .pswp__caption .vp-portfolio__item-meta-title a{text-decoration:none}.vp-pswp .pswp__preloader{position:absolute;right:0;bottom:0;z-index:1}.vp-pswp .vp-pswp-video{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;max-width:1920px;height:100%;margin:0 auto;line-height:0;text-align:left;vertical-align:middle;z-index:1045}.vp-pswp .vp-pswp-video>div{position:relative;width:100%;height:0;padding-bottom:56.25%}.vp-pswp .vp-pswp-video>div iframe{position:absolute;top:0;left:0;width:100%;height:100%;margin:0}.vp-pswp .vp-pswp-video>div video{width:100% !important;height:auto !important;margin:0}
assets/js/script-preview.min.js CHANGED
@@ -1,6 +1,6 @@
1
  !function(t){function e(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var o={};e.m=t,e.c=o,e.d=function(t,o,n){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=1)}([,function(t,e,o){t.exports=o(2)},function(t,e){/*!
2
  * Name : Visual Portfolio
3
- * Version : 1.4.3
4
  * Author : nK https://nkdev.info
5
  */
6
  !function(t){var e=t("#vp_preview > .vp-portfolio");e.on("click",".vp-portfolio__item, .vp-portfolio__item a",function(t){t.preventDefault(),t.stopPropagation()}),window.iFrameResizer={heightCalculationMethod:function(){return e.outerHeight(!0)}}}(jQuery)}]);
1
  !function(t){function e(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var o={};e.m=t,e.c=o,e.d=function(t,o,n){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=1)}([,function(t,e,o){t.exports=o(2)},function(t,e){/*!
2
  * Name : Visual Portfolio
3
+ * Version : 1.5.0
4
  * Author : nK https://nkdev.info
5
  */
6
  !function(t){var e=t("#vp_preview > .vp-portfolio");e.on("click",".vp-portfolio__item, .vp-portfolio__item a",function(t){t.preventDefault(),t.stopPropagation()}),window.iFrameResizer={heightCalculationMethod:function(){return e.outerHeight(!0)}}}(jQuery)}]);
assets/js/script.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){function e(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([,,,function(t,e,i){t.exports=i(4)},function(t,e){function i(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(){y=m.width(),_=m.height()}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}(),a=jQuery,p=window,l=p.VPData,d=p.objectFitImages,v=p.PhotoSwipe,f=p.PhotoSwipeUI_Default,u=l.__,c=l.settingsPopupGallery,m=a(window),y=0,_=0;s(),m.on("resize load orientationchange",s),void 0!==d&&d();var h=function(){function t(e,i){o(this,t);var s=this;s.$item=e;for(var n=e[0].className.split(/\s+/),r=0;r<n.length;r++)n[r]&&/^vp-uid-/.test(n[r])&&(s.uid=n[r].replace(/^vp-uid-/,"")),n[r]&&/^vp-id-/.test(n[r])&&(s.id=n[r].replace(/^vp-id-/,""));if(!s.uid)return void console.error(u.couldnt_retrieve_vp);s.$items_wrap=e.find(".vp-portfolio__items"),s.$pagination=e.find(".vp-portfolio__pagination-wrap"),s.$filter=e.find(".vp-portfolio__filter-wrap"),s.id&&(s.$filter=s.$filter.add(".vp-single-filter.vp-id-"+s.id+" .vp-portfolio__filter-wrap")),s.userOptions=i,s.firstRun=!0,s.init()}return r(t,[{key:"emitEvent",value:function(t,e){e=e?[this].concat(e):[this],this.$item.trigger(t+".vpf.vpf-uid-"+this.uid,e)}},{key:"init",value:function(){var t=this;t.firstRun||t.destroy(),t.destroyed=!1,t.initOptions(),t.initEvents(),t.initLayout(),t.initCustomColors(),t.initPhotoswipe(),t.$items_wrap.imagesLoaded(function(){t.$item.addClass("vp-portfolio__ready"),t.id&&a(".vp-single-filter.vp-id-"+t.id).addClass("vp-single-filter__ready"),t.initIsotope(),t.initFjGallery(),t.emitEvent("imagesLoaded")}),t.emitEvent("init"),t.firstRun=!1}},{key:"destroy",value:function(){var t=this;t.$item.removeClass("vp-portfolio__ready"),t.id&&a(".vp-single-filter.vp-id-"+t.id).removeClass("vp-single-filter__ready"),t.destroyEvents(),t.removeStyle(),t.renderStyle(),t.destroyPhotoswipe(),t.destroyIsotope(),t.destroyFjGallery(),t.emitEvent("destroy"),t.destroyed=!0}},{key:"addStyle",value:function(t,e,i){i=i||"";var o=this,s=o.uid;o.stylesList||(o.stylesList={}),void 0===o.stylesList[s]&&(o.stylesList[s]={}),void 0===o.stylesList[s][i]&&(o.stylesList[s][i]={}),void 0===o.stylesList[s][i][t]&&(o.stylesList[s][i][t]={}),o.stylesList[s][i][t]=a.extend(o.stylesList[s][i][t],e),o.emitEvent("addStyle",[t,e,i,o.stylesList])}},{key:"removeStyle",value:function(t,e,i){i=i||"";var o=this,s=o.uid;o.stylesList||(o.stylesList={}),void 0===o.stylesList[s]||t||(o.stylesList[s]={}),void 0!==o.stylesList[s]&&void 0!==o.stylesList[s][i]&&void 0!==o.stylesList[s][i][t]&&t&&delete o.stylesList[s][i][t],o.emitEvent("removeStyle",[t,e,o.stylesList])}},{key:"renderStyle",value:function(){var t=this,e=t.uid,i="";t.stylesList||(t.stylesList={}),void 0!==t.stylesList[e]&&Object.keys(t.stylesList[e]).forEach(function(o){o&&(i+="@media "+o+" {"),Object.keys(t.stylesList[e][o]).forEach(function(s){i+=".vp-uid-"+e+" "+s+" {",Object.keys(t.stylesList[e][o][s]).forEach(function(n){i+=n+":"+t.stylesList[e][o][s][n]+";"}),i+="}"}),o&&(i+="}")});var o=a("#vp-style-"+e);o.length||(o=a("<style>").attr("id","vp-style-"+e).appendTo("head")),o.html(i),t.emitEvent("renderStyle",[i,t.stylesList,o])}},{key:"firstToLowerCase",value:function(t){return t.substr(0,1).toLowerCase()+t.substr(1)}},{key:"initOptions",value:function(t){var e=this;e.defaults={layout:"tile",itemsGap:0,tilesType:"3|1,1|",masonryColumns:3,justifiedRowHeight:250,justifiedRowHeightTolerance:.25,pagination:"load-more"},t&&(e.userOptions=t);var i=e.$item[0].dataset,o={};Object.keys(i).forEach(function(t){t&&"vp"===t.substring(0,2)&&(o[e.firstToLowerCase(t.substring(2))]=i[t])}),e.options=a.extend({},e.defaults,o,e.userOptions),e.emitEvent("initOptions")}},{key:"isCrossLine",value:function(t,e,i,o){var s=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),n=(o.x-i.x)*(e.y-i.y)-(o.y-i.y)*(e.x-i.x),r=(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x),a=(e.x-t.x)*(o.y-t.y)-(e.y-t.y)*(o.x-t.x);return s*n<=0&&r*a<=0}},{key:"initEvents",value:function(){function t(){var t=i.$item[0].getBoundingClientRect(),e=t.left,o=y-t.right,s=parseFloat(i.$item.css("margin-left")||0),n=parseFloat(i.$item.css("margin-right")||0);i.$item.css({"margin-left":s-e,"margin-right":n-o})}function e(){var t=i.$item[0].getBoundingClientRect();t.bottom>0&&t.bottom-r<=_&&i.loadNewItems(i.options.nextPageUrl,!1,function(){e()})}var i=this,o=".vpf.vpf-uid-"+i.uid;if(i.$item.hasClass("vp-portfolio__stretch")&&(m.on("load"+o+" resize"+o+" orientationchange"+o,function(){t()}),t()),"fly"===i.options.itemsStyle){var s={};m.on("mousemove"+o,function(t){s={x:t.clientX,y:t.clientY}}),i.$item.on("mouseenter"+o+" mouseleave"+o,".vp-portfolio__item",function(t){var e=a(this),o=e[0].getBoundingClientRect(),n=e.find(".vp-portfolio__item-overlay"),r="mouseenter"===t.type,p="0%",l="0%",d={x:t.clientX,y:t.clientY},v=i.isCrossLine({x:o.left,y:o.top},{x:o.left+o.width,y:o.top},d,s),f=i.isCrossLine({x:o.left,y:o.top+o.height},{x:o.left+o.width,y:o.top+o.height},d,s),u=i.isCrossLine({x:o.left,y:o.top},{x:o.left,y:o.top+o.height},d,s),c=i.isCrossLine({x:o.left+o.width,y:o.top},{x:o.left+o.width,y:o.top+o.height},d,s);if(!(v||f||u||c)){var m=(o.width/2-d.x+o.left)/(o.width/2),y=(o.height/2-d.y+o.top)/(o.height/2);Math.abs(m)>Math.abs(y)?m>0?u=!0:c=!0:y>0?v=!0:f=!0}v?l="-10"+l:f?l="10"+l:u?p="-10"+p:c&&(p="10"+p),r&&(n.css({transition:"none",transform:"translateX("+p+") translateY("+l+") translateZ(0)"}),n[0].offsetHeight),n.css({transition:".2s transform ease-in-out",transform:"translateX("+(r?"0%":p)+") translateY("+(r?"0%":l)+") translateZ(0)"})})}i.$filter.on("click"+o,".vp-filter .vp-filter__item a",function(t){t.preventDefault();var e=a(this);i.loading||e.closest(".vp-filter__item").addClass("vp-filter__item-active").siblings().removeClass("vp-filter__item-active"),i.loadNewItems(e.attr("href"),!0)}),i.$item.on("click"+o,".vp-pagination .vp-pagination__item a",function(t){t.preventDefault();var e=a(this);e.hasClass("vp-pagination__no-more")&&"paged"!==i.options.pagination||i.loadNewItems(e.attr("href"),"paged"===i.options.pagination)}),i.$item.on("click"+o,".vp-portfolio__items .vp-portfolio__item-meta-category a",function(t){t.preventDefault(),t.stopPropagation(),i.loadNewItems(a(this).attr("href"),!0)});var n=void 0,r=250;"infinite"===i.options.pagination&&(m.on("load"+o+" scroll"+o+" resize"+o+" orientationchange"+o,function(){clearTimeout(n),n=setTimeout(function(){e()},60)}),e()),i.emitEvent("initEvents")}},{key:"destroyEvents",value:function(){var t=this,e=".vpf.vpf-uid-"+t.uid;t.$item.off(e),t.$filter.off(e),m.off(e),t.emitEvent("destroyEvents")}},{key:"getTilesSettings",value:function(){var t=this,e=t.options.tilesType.split(/[:|]/);return void 0===e[e.length-1]||e[e.length-1]||e.pop(),e}},{key:"initLayout",value:function(){var t=this,e=[576,768,992,1200];if(t.options.layout)switch(t.options.layout){case"tiles":var i=t.getTilesSettings(),o=parseInt(i[0],10)||1;if(i.shift(),t.addStyle(".vp-portfolio__item-wrap",{width:100/o+"%"}),i&&i.length)for(var s=0;s<i.length;s++){var n=i[s].split(","),r=parseFloat(n[0])||1,a=parseFloat(n[1])||1,p=".vp-portfolio__item-wrap";i.length>1&&(p+=":nth-of-type("+i.length+"n+"+(s+1)+")"),r&&1!==r&&t.addStyle(p,{width:100*r/o+"%"}),t.addStyle(p+" .vp-portfolio__item-img-wrap:before",{"margin-top":100*a+"%"})}for(var l=o;l>0;l--)void 0!==e[l-1]&&(t.addStyle(".vp-portfolio__item-wrap",{width:100/l+"%"},"screen and (max-width: "+e[l-1]+"px)"),t.addStyle(".vp-portfolio__item-wrap:nth-of-type(n)",{width:100/l+"%"},"screen and (max-width: "+e[l-1]+"px)"));break;case"masonry":t.addStyle(".vp-portfolio__item-wrap",{width:100/t.options.masonryColumns+"%"});for(var d=t.options.masonryColumns;d>0;d--)void 0!==e[d-1]&&t.addStyle(".vp-portfolio__item-wrap",{width:100/d+"%"},"screen and (max-width: "+e[d-1]+"px)")}var v=parseInt(t.options.itemsGap,10);if(v&&("tiles"===t.options.layout||"masonry"===t.options.layout)){t.addStyle(".vp-portfolio__items",{"margin-left":"-"+v+"px","margin-top":"-"+v+"px"});var f=v+"px";t.addStyle(".vp-portfolio__item-wrap .vp-portfolio__item",{"margin-left":f,"margin-top":f}),"tiles"===t.options.layout&&(t.addStyle(".vp-portfolio__item-wrap .vp-portfolio__item-img-wrap",{"margin-left":"-"+f,"margin-top":"-"+f}),t.addStyle(".vp-portfolio__item-wrap .vp-portfolio__item-img",{left:f,top:f}))}t.renderStyle(),t.emitEvent("initLayout")}},{key:"initCustomColors",value:function(){var t=this;t.$item.find("[data-vp-bg-color]").each(function(){var e=a(this).attr("data-vp-bg-color");t.addStyle('[data-vp-bg-color="'+e+'"]',{"background-color":e+" !important"})}),t.$item.find("[data-vp-text-color]").each(function(){var e=a(this).attr("data-vp-text-color");t.addStyle('[data-vp-text-color="'+e+'"]',{color:e+" !important"})}),t.renderStyle(),t.emitEvent("initCustomColors")}},{key:"initIsotope",value:function(t){var e=this;"tiles"!==e.options.layout&&"masonry"!==e.options.layout||(e.$items_wrap.isotope(t||{itemSelector:".vp-portfolio__item-wrap",layoutMode:"masonry",transitionDuration:"0.3s",percentPosition:!0}),e.emitEvent("initIsotope",[t]))}},{key:"destroyIsotope",value:function(){var t=this;t.$items_wrap.data("isotope")&&(t.$items_wrap.isotope("destroy"),t.emitEvent("destroyIsotope"))}},{key:"initFjGallery",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this;"justified"===i.options.layout&&(i.$items_wrap.fjGallery(!1!==t?t:{gutter:parseFloat(i.options.itemsGap)||0,rowHeight:parseFloat(i.options.justifiedRowHeight)||200,rowHeightTolerance:parseFloat(i.options.justifiedRowHeightTolerance)||0,itemSelector:".vp-portfolio__item-wrap",imageSelector:".vp-portfolio__item-img img"},e),i.emitEvent("initFjGallery"))}},{key:"destroyFjGallery",value:function(){var t=this;t.$items_wrap.fjGallery&&(t.$items_wrap.fjGallery("destroy"),t.emitEvent("destroyFjGallery"))}},{key:"initPhotoswipe",value:function(){function t(e,i){if(void 0===i)return void(e&&e.itemHolders.length&&e.itemHolders.forEach(function(i){i.item&&i.item.html&&t(e,i.item)}));var o=e.viewportSize.x*window.devicePixelRatio,s=e.viewportSize.y*window.devicePixelRatio,n=i.vw/i.vh,r=void 0,p=a(i.container),l=e.options.barsSize,d=0,v=0;l&&(d=l.top&&"auto"!==l.top?l.top:0,v=l.bottom&&"auto"!==l.bottom?l.bottom:0),s-=d+v,r=n>o/s?o:s*n,p.find(".vp-pswp-video").css("max-width",r),p.css({top:d,bottom:v})}var e=this;if(void 0!==v&&e.options.itemsClickAction&&"popup_gallery"===e.options.itemsClickAction&&!e.$item.closest("#vp_preview").length){if(!a(".vp-pswp").length){var i="\n <div class=\"pswp vp-pswp vp-pswp-uid-'}"+e.uid+'" tabindex="-1" role="dialog" aria-hidden="true">\n <div class="pswp__bg"></div>\n <div class="pswp__scroll-wrap">\n <div class="pswp__container">\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n </div>\n <div class="pswp__ui pswp__ui--hidden">\n <div class="pswp__top-bar">\n <div class="pswp__counter"></div>\n <a class="pswp__button pswp__button--close" title="'+u.pswp_close+'"></a>\n <a class="pswp__button pswp__button--share" title="'+u.pswp_share+'"></a>\n <a class="pswp__button pswp__button--fs" title="'+u.pswp_fs+'"></a>\n <a class="pswp__button pswp__button--zoom" title="'+u.pswp_zoom+'"></a>\n </div>\n <div class="pswp__preloader">\n <div class="pswp__preloader__icn">\n <div class="pswp__preloader__cut">\n <div class="pswp__preloader__donut"></div>\n </div>\n </div>\n </div>\n <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">\n <div class="pswp__share-tooltip"></div>\n </div>\n <a class="pswp__button pswp__button--arrow--left" title="'+u.pswp_prev+'"></a>\n <a class="pswp__button pswp__button--arrow--right" title="'+u.pswp_next+'"></a>\n <div class="pswp__caption">\n <div class="pswp__caption__center"></div>\n </div>\n </div>\n </div>\n </div>\n ';a("body").append(i)}var o=function(t){var e=a(t).find(".vp-portfolio__item-wrap"),i=[],o=void 0,s=void 0,n=void 0,r=void 0,p=void 0;return e.each(function(){if(o=a(this).find(".vp-portfolio__item-popup"),s=(o.attr("data-vp-popup-img-size")||"1920x1080").split("x"),n=(o.attr("data-vp-popup-video-size")||"1920x1080").split("x"),p=o.attr("data-vp-popup-video"))r={html:p,vw:parseInt(n[0],10),vh:parseInt(n[1],10)};else{r={src:o.attr("data-vp-popup-img"),w:parseInt(s[0],10),h:parseInt(s[1],10)};var t=o.html();t&&(r.title=t),r.el=this;var e=o.attr("data-vp-popup-md-img")||r.src;e&&(s=(o.attr("data-vp-popup-md-img-size")||o.attr("data-vp-popup-img-size")||"1920x1080").split("x"),r.m={src:e,w:parseInt(s[0],10),h:parseInt(s[1],10)}),r.o={src:r.src,w:r.w,h:r.h}}i.push(r)}),i},s=function(i,s,n,r){var p=a(".vp-pswp")[0],l=o(s),d={captionAndToolbarShowEmptyCaptions:!1,closeEl:c.show_close_button,captionEl:c.show_caption,fullscreenEl:c.show_fullscreen_button,zoomEl:c.show_zoom_button,shareEl:c.show_share_button,counterEl:c.show_counter,arrowEl:c.show_arrows,shareButtons:[{id:"facebook",label:u.pswp_share_fb,url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:u.pswp_share_tw,url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:u.pswp_share_pin,url:"https://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"}],bgOpacity:1,tapToClose:!0,tapToToggleControls:!1,showHideOpacity:!0,galleryUID:e.uid};if(r)if(d.galleryPIDs){for(var m=0;m<l.length;m++)if(l[m].pid===i){d.index=m;break}}else d.index=parseInt(i,10)-1;else d.index=parseInt(i,10);if(!Number.isNaN(d.index)){n&&(d.showAnimationDuration=0);var y=new v(p,f,l,d),_=void 0,h=!1,w=!0,g=void 0;y.listen("beforeResize",function(){_=y.viewportSize.x*window.devicePixelRatio,h&&_<1e3?(h=!1,g=!0):!h&&_>=1e3&&(h=!0,g=!0),g&&!w&&y.invalidateCurrItems(),w&&(w=!1),g=!1}),y.listen("gettingData",function(t,e){e.html||(h?(e.src=e.o.src,e.w=e.o.w,e.h=e.o.h):(e.src=e.m.src,e.w=e.m.w,e.h=e.m.h))}),y.listen("resize",function(){t(this)}),y.listen("afterChange",function(){t(this)}),y.listen("destroy",function(){var t=this;t&&t.itemHolders.length&&t.itemHolders.forEach(function(t){t.el&&a(t.el).find(".vp-pswp-video").remove()})}),y.init()}};e.$item.on("click.vpf.vpf-uid-"+e.uid,".vp-portfolio__item",function(t){t.preventDefault();var i=0,o=this;e.$item.find(".vp-portfolio__item").each(function(t){return this!==o||(i=t,!1)}),s(i,e.$item[0])});var n=function(){var t=window.location.hash.substring(1),e={};if(t.length<5)return e;for(var i=t.split("&"),o=0;o<i.length;o++)if(i[o]){var s=i[o].split("=");s.length<2||(e[s[0]]=s[1])}return e}();n.pid&&n.gid===e.uid&&s(n.pid,e.$item[0],!0,!0)}}},{key:"destroyPhotoswipe",value:function(){var t=this;t.$item.off("click.vpf.vpf-uid-"+t.uid),a(".vp-pswp-uid-"+t.uid).remove()}},{key:"addItems",value:function(t,e){var i=this,o=i.$items_wrap.data("isotope"),s=i.$items_wrap.fjGallery;if(o){if(e){var n=i.$items_wrap.find(".vp-portfolio__item-wrap");i.$items_wrap.isotope("remove",n),i.$items_wrap.prepend(t).isotope("prepended",t)}else i.$items_wrap.append(t).isotope("appended",t);i.$items_wrap.imagesLoaded(function(){i.initIsotope("layout")})}s&&(e?(i.destroyFjGallery(),i.$items_wrap.find(".vp-portfolio__item-wrap").remove(),i.$items_wrap.prepend(t),i.initFjGallery()):(i.$items_wrap.append(t),i.initFjGallery("appendImages",t))),i.emitEvent("addItems",[t,e])}},{key:"removeItems",value:function(t){var e=this;e.$items_wrap.data("isotope")&&e.$items_wrap.isotope("remove",t),e.emitEvent("removeItems",[t])}},{key:"loadNewItems",value:function(t,e,i){var o=this;!o.loading&&t&&(o.loading=!0,o.$item.addClass("vp-portfolio__loading"),o.emitEvent("startLoadingNewItems",[t]),a.get(t,{},function(t){t=t.replace("<body",'<body><div id="vp-infinite-load-body"').replace("</body>","</div></body>");var s=a(t).filter("#vp-infinite-load-body"),n=s.find(".vp-portfolio.vp-uid-"+o.uid);if(n.length){var r=n.find(".vp-portfolio__items").html();o.$filter.length&&o.$filter.each(function(){var t=a(this),e="";e=t.parent().hasClass("vp-single-filter")?s.find('[class="'+t.parent().attr("class").replace(" vp-single-filter__ready","")+'"] .vp-portfolio__filter-wrap').html():n.find(".vp-portfolio__filter-wrap").html(),t.html(e)}),o.$pagination.length&&o.$pagination.html(n.find(".vp-portfolio__pagination-wrap").html()),o.addItems(a(r),e),o.emitEvent("loadedNewItems",[n,n,t])}var p=n.attr("data-vp-next-page-url");o.options.nextPageUrl=p,o.$item.attr("data-vp-next-page-url",p),o.$item.removeClass("vp-portfolio__loading"),o.loading=!1,o.emitEvent("endLoadingNewItems"),o.initCustomColors(),i&&i()}))}}]),t}(),w=function(t){var e=Array.prototype.slice.call(arguments,1),o=void 0;return this.each(function(){if(void 0===o)if("object"===(void 0===t?"undefined":n(t))||void 0===t)this.vpf||(this.vpf=new h(a(this),t));else if(this.vpf){var s;o=(s=this.vpf)[t].apply(s,i(e))}}),void 0!==o?o:this};w.constructor=h;var g=jQuery.fn.vpf;jQuery.fn.vpf=w,jQuery.fn.vpf.noConflict=function(){return jQuery.fn.vpf=g,this},a(function(){a(".vp-portfolio").vpf()})}]);
1
+ !function(t){function e(o){if(i[o])return i[o].exports;var s=i[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,e),s.l=!0,s.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([,,,function(t,e,i){t.exports=i(4)},function(t,e){function i(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e<t.length;e++)i[e]=t[e];return i}return Array.from(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(){c=_.width(),h=_.height()}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=function(){function t(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,i,o){return i&&t(e.prototype,i),o&&t(e,o),e}}(),a=jQuery,p=window,l=p.VPData,d=p.objectFitImages,v=p.PhotoSwipe,f=p.PhotoSwipeUI_Default,m=l.__,u=l.settingsPopupGallery,_=a(window),c=0,h=0;s(),_.on("resize load orientationchange",s);var w=[320,576,768,992,1200];void 0!==d&&d();var y=function(){function t(e,i){o(this,t);var s=this;s.$item=e;for(var r=e[0].className.split(/\s+/),n=0;n<r.length;n++)r[n]&&/^vp-uid-/.test(r[n])&&(s.uid=r[n].replace(/^vp-uid-/,"")),r[n]&&/^vp-id-/.test(r[n])&&(s.id=r[n].replace(/^vp-id-/,""));if(!s.uid)return void console.error(m.couldnt_retrieve_vp);s.$items_wrap=e.find(".vp-portfolio__items"),s.$pagination=e.find(".vp-portfolio__pagination-wrap"),s.$filter=e.find(".vp-portfolio__filter-wrap"),s.id&&(s.$filter=s.$filter.add(".vp-single-filter.vp-id-"+s.id+" .vp-portfolio__filter-wrap")),s.userOptions=i,s.firstRun=!0,s.init()}return n(t,[{key:"emitEvent",value:function(t,e){e=e?[this].concat(e):[this],this.$item.trigger(t+".vpf.vpf-uid-"+this.uid,e)}},{key:"init",value:function(){var t=this;t.firstRun||t.destroy(),t.destroyed=!1,t.initOptions(),t.initEvents(),t.initLayout(),t.initCustomColors(),t.initPhotoswipe(),t.$items_wrap.imagesLoaded(function(){t.$item.addClass("vp-portfolio__ready"),t.id&&a(".vp-single-filter.vp-id-"+t.id).addClass("vp-single-filter__ready"),t.initIsotope(),t.initFjGallery(),t.initSwiper(),t.emitEvent("imagesLoaded")}),t.emitEvent("init"),t.firstRun=!1}},{key:"destroy",value:function(){var t=this;t.$item.removeClass("vp-portfolio__ready"),t.id&&a(".vp-single-filter.vp-id-"+t.id).removeClass("vp-single-filter__ready"),t.destroyEvents(),t.removeStyle(),t.renderStyle(),t.destroyPhotoswipe(),t.destroyIsotope(),t.destroyFjGallery(),t.destroySwiper(),t.emitEvent("destroy"),t.destroyed=!0}},{key:"addStyle",value:function(t,e,i){i=i||"";var o=this,s=o.uid;o.stylesList||(o.stylesList={}),void 0===o.stylesList[s]&&(o.stylesList[s]={}),void 0===o.stylesList[s][i]&&(o.stylesList[s][i]={}),void 0===o.stylesList[s][i][t]&&(o.stylesList[s][i][t]={}),o.stylesList[s][i][t]=a.extend(o.stylesList[s][i][t],e),o.emitEvent("addStyle",[t,e,i,o.stylesList])}},{key:"removeStyle",value:function(t,e,i){i=i||"";var o=this,s=o.uid;o.stylesList||(o.stylesList={}),void 0===o.stylesList[s]||t||(o.stylesList[s]={}),void 0!==o.stylesList[s]&&void 0!==o.stylesList[s][i]&&void 0!==o.stylesList[s][i][t]&&t&&delete o.stylesList[s][i][t],o.emitEvent("removeStyle",[t,e,o.stylesList])}},{key:"renderStyle",value:function(){var t=this,e=t.uid,i="";t.stylesList||(t.stylesList={}),void 0!==t.stylesList[e]&&Object.keys(t.stylesList[e]).forEach(function(o){o&&(i+="@media "+o+" {"),Object.keys(t.stylesList[e][o]).forEach(function(s){i+=".vp-uid-"+e+" "+s+" {",Object.keys(t.stylesList[e][o][s]).forEach(function(r){i+=r+":"+t.stylesList[e][o][s][r]+";"}),i+="}"}),o&&(i+="}")});var o=a("#vp-style-"+e);o.length||(o=a("<style>").attr("id","vp-style-"+e).appendTo("head")),o.html(i),t.emitEvent("renderStyle",[i,t.stylesList,o])}},{key:"firstToLowerCase",value:function(t){return t.substr(0,1).toLowerCase()+t.substr(1)}},{key:"initOptions",value:function(t){var e=this;e.defaults={layout:"tile",itemsGap:0,tilesType:"3|1,1|",masonryColumns:3,justifiedRowHeight:250,justifiedRowHeightTolerance:.25,pagination:"load-more"},t&&(e.userOptions=t);var i=e.$item[0].dataset,o={};Object.keys(i).forEach(function(t){t&&"vp"===t.substring(0,2)&&(o[e.firstToLowerCase(t.substring(2))]=i[t])}),e.options=a.extend({},e.defaults,o,e.userOptions),e.emitEvent("initOptions")}},{key:"isCrossLine",value:function(t,e,i,o){var s=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),r=(o.x-i.x)*(e.y-i.y)-(o.y-i.y)*(e.x-i.x),n=(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x),a=(e.x-t.x)*(o.y-t.y)-(e.y-t.y)*(o.x-t.x);return s*r<=0&&n*a<=0}},{key:"initEvents",value:function(){function t(){var t=i.$item[0].getBoundingClientRect(),e=t.left,o=c-t.right,s=parseFloat(i.$item.css("margin-left")||0),r=parseFloat(i.$item.css("margin-right")||0);i.$item.css({"margin-left":s-e,"margin-right":r-o})}function e(){var t=i.$item[0].getBoundingClientRect();t.bottom>0&&t.bottom-n<=h&&i.loadNewItems(i.options.nextPageUrl,!1,function(){e()})}var i=this,o=".vpf.vpf-uid-"+i.uid;if(i.$item.hasClass("vp-portfolio__stretch")&&(_.on("load"+o+" resize"+o+" orientationchange"+o,function(){t()}),t()),"fly"===i.options.itemsStyle){var s={};_.on("mousemove"+o,function(t){s={x:t.clientX,y:t.clientY}}),i.$item.on("mouseenter"+o+" mouseleave"+o,".vp-portfolio__item",function(t){var e=a(this),o=e[0].getBoundingClientRect(),r=e.find(".vp-portfolio__item-overlay"),n="mouseenter"===t.type,p="0%",l="0%",d={x:t.clientX,y:t.clientY},v=i.isCrossLine({x:o.left,y:o.top},{x:o.left+o.width,y:o.top},d,s),f=i.isCrossLine({x:o.left,y:o.top+o.height},{x:o.left+o.width,y:o.top+o.height},d,s),m=i.isCrossLine({x:o.left,y:o.top},{x:o.left,y:o.top+o.height},d,s),u=i.isCrossLine({x:o.left+o.width,y:o.top},{x:o.left+o.width,y:o.top+o.height},d,s);if(!(v||f||m||u)){var _=(o.width/2-d.x+o.left)/(o.width/2),c=(o.height/2-d.y+o.top)/(o.height/2);Math.abs(_)>Math.abs(c)?_>0?m=!0:u=!0:c>0?v=!0:f=!0}v?l="-10"+l:f?l="10"+l:m?p="-10"+p:u&&(p="10"+p),n&&(r.css({transition:"none",transform:"translateX("+p+") translateY("+l+") translateZ(0)"}),r[0].offsetHeight),r.css({transition:".2s transform ease-in-out",transform:"translateX("+(n?"0%":p)+") translateY("+(n?"0%":l)+") translateZ(0)"})})}i.$filter.on("click"+o,".vp-filter .vp-filter__item a",function(t){t.preventDefault();var e=a(this);i.loading||e.closest(".vp-filter__item").addClass("vp-filter__item-active").siblings().removeClass("vp-filter__item-active"),i.loadNewItems(e.attr("href"),!0)}),i.$item.on("click"+o,".vp-pagination .vp-pagination__item a",function(t){t.preventDefault();var e=a(this);e.hasClass("vp-pagination__no-more")&&"paged"!==i.options.pagination||i.loadNewItems(e.attr("href"),"paged"===i.options.pagination)}),i.$item.on("click"+o,".vp-portfolio__items .vp-portfolio__item-meta-category a",function(t){t.preventDefault(),t.stopPropagation(),i.loadNewItems(a(this).attr("href"),!0)});var r=void 0,n=250;"infinite"===i.options.pagination&&(_.on("load"+o+" scroll"+o+" resize"+o+" orientationchange"+o,function(){clearTimeout(r),r=setTimeout(function(){e()},60)}),e()),i.emitEvent("initEvents")}},{key:"destroyEvents",value:function(){var t=this,e=".vpf.vpf-uid-"+t.uid;t.$item.off(e),t.$filter.off(e),_.off(e),t.emitEvent("destroyEvents")}},{key:"getTilesSettings",value:function(){var t=this,e=t.options.tilesType.split(/[:|]/);return void 0===e[e.length-1]||e[e.length-1]||e.pop(),e}},{key:"initLayout",value:function(){var t=this;if(t.options.layout)switch(t.options.layout){case"tiles":var e=t.getTilesSettings(),i=parseInt(e[0],10)||1;if(e.shift(),t.addStyle(".vp-portfolio__item-wrap",{width:100/i+"%"}),e&&e.length)for(var o=0;o<e.length;o++){var s=e[o].split(","),r=parseFloat(s[0])||1,n=parseFloat(s[1])||1,a=".vp-portfolio__item-wrap";e.length>1&&(a+=":nth-of-type("+e.length+"n+"+(o+1)+")"),r&&1!==r&&t.addStyle(a,{width:100*r/i+"%"}),t.addStyle(a+" .vp-portfolio__item-img-wrap::before",{"margin-top":100*n+"%"})}for(var p=i-1,l=Math.min(w.length-1,p);l>=0;l--)p>0&&void 0!==w[l]&&(t.addStyle(".vp-portfolio__item-wrap",{width:100/p+"%"},"screen and (max-width: "+w[l]+"px)"),t.addStyle(".vp-portfolio__item-wrap:nth-of-type(n)",{width:100/p+"%"},"screen and (max-width: "+w[l]+"px)")),p-=1;break;case"masonry":t.addStyle(".vp-portfolio__item-wrap",{width:100/t.options.masonryColumns+"%"});for(var d=t.options.masonryColumns,v=d-1,f=Math.min(w.length-1,v);f>=0;f--)v>0&&void 0!==w[f]&&t.addStyle(".vp-portfolio__item-wrap",{width:100/v+"%"},"screen and (max-width: "+w[f]+"px)"),v-=1;case"justified":break;case"slider":"auto"!==t.options.sliderItemsHeight&&("auto"===t.options.sliderSlidesPerView?t.options.sliderItemsHeight.indexOf("%")===t.options.sliderItemsHeight.length-1?(t.addStyle(".vp-portfolio__items-wrap::before",{content:'""',display:"block",width:"100%","margin-top":isNaN(t.options.sliderItemsHeight)?t.options.sliderItemsHeight:t.options.sliderItemsHeight+"px"}),t.addStyle(".vp-portfolio__items",{position:"absolute",top:0,left:0,right:0,bottom:0}),t.addStyle(".vp-portfolio__item-wrap",{height:"true"===t.options.sliderBullets?"calc( 100% - 25px )":"100%"}),t.addStyle(".vp-portfolio__item, .vp-portfolio__item-img-wrap, .vp-portfolio__item-img, .vp-portfolio__item-wrap .vp-portfolio__item .vp-portfolio__item-img a, .vp-portfolio__item-wrap .vp-portfolio__item .vp-portfolio__item-img img",{width:"auto",height:"100%"})):t.addStyle(".vp-portfolio__item .vp-portfolio__item-img img",{width:"auto",height:isNaN(t.options.sliderItemsHeight)?t.options.sliderItemsHeight:t.options.sliderItemsHeight+"px"}):(t.addStyle(".vp-portfolio__item-img-wrap::before",{"margin-top":isNaN(t.options.sliderItemsHeight)?t.options.sliderItemsHeight:t.options.sliderItemsHeight+"px"}),t.addStyle(".vp-portfolio__item-img img, .vp-portfolio__item-img",{position:"absolute",top:0,right:0,bottom:0,left:0}),t.addStyle(".vp-portfolio__item .vp-portfolio__item-img img",{width:"100%",height:"100%"})))}var m=parseInt(t.options.itemsGap,10);if(m&&("tiles"===t.options.layout||"masonry"===t.options.layout)){t.addStyle(".vp-portfolio__items",{"margin-left":"-"+m+"px","margin-top":"-"+m+"px"});var u=m+"px";t.addStyle(".vp-portfolio__item-wrap .vp-portfolio__item",{"margin-left":u,"margin-top":u}),"tiles"===t.options.layout&&(t.addStyle(".vp-portfolio__item-wrap .vp-portfolio__item-img-wrap",{"margin-left":"-"+u,"margin-top":"-"+u}),t.addStyle(".vp-portfolio__item-wrap .vp-portfolio__item-img",{left:u,top:u}))}t.renderStyle(),t.emitEvent("initLayout")}},{key:"initCustomColors",value:function(){var t=this;t.$item.find("[data-vp-bg-color]").each(function(){var e=a(this).attr("data-vp-bg-color");t.addStyle('[data-vp-bg-color="'+e+'"]',{"background-color":e+" !important"})}),t.$item.find("[data-vp-text-color]").each(function(){var e=a(this).attr("data-vp-text-color");t.addStyle('[data-vp-text-color="'+e+'"]',{color:e+" !important"})}),t.renderStyle(),t.emitEvent("initCustomColors")}},{key:"initIsotope",value:function(t){var e=this;"tiles"!==e.options.layout&&"masonry"!==e.options.layout||(e.$items_wrap.isotope(t||{itemSelector:".vp-portfolio__item-wrap",layoutMode:"masonry",transitionDuration:"0.3s",percentPosition:!0}),e.emitEvent("initIsotope",[t]))}},{key:"destroyIsotope",value:function(){var t=this;t.$items_wrap.data("isotope")&&(t.$items_wrap.isotope("destroy"),t.emitEvent("destroyIsotope"))}},{key:"initFjGallery",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this;"justified"===i.options.layout&&(i.$items_wrap.fjGallery(!1!==t?t:{gutter:parseFloat(i.options.itemsGap)||0,rowHeight:parseFloat(i.options.justifiedRowHeight)||200,rowHeightTolerance:parseFloat(i.options.justifiedRowHeightTolerance)||0,itemSelector:".vp-portfolio__item-wrap",imageSelector:".vp-portfolio__item-img img"},e),i.emitEvent("initFjGallery",[t]))}},{key:"destroyFjGallery",value:function(){var t=this;t.$items_wrap[0].fjGallery&&(t.$items_wrap.fjGallery("destroy"),t.emitEvent("destroyFjGallery"))}},{key:"initSwiper",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this;if("slider"===e.options.layout&&void 0!==window.Swiper){var i=e.$items_wrap.parent();i.addClass("swiper-container"),e.$items_wrap.addClass("swiper-wrapper"),e.$items_wrap.children().addClass("swiper-slide"),"true"!==e.options.sliderArrows||i.find(".vp-portfolio__items-arrow").length||i.append('\n <div class="vp-portfolio__items-arrow vp-portfolio__items-arrow-prev"><span class="'+e.options.sliderArrowsIconPrev+'"></span></div>\n <div class="vp-portfolio__items-arrow vp-portfolio__items-arrow-next"><span class="'+e.options.sliderArrowsIconNext+'"></span></div>\n '),"true"!==e.options.sliderBullets||i.find(".vp-portfolio__items-bullets").length||i.append('<div class="vp-portfolio__items-bullets"></div>');var o=e.options.sliderSlidesPerView||3,s={};if(!isNaN(o))for(var r=o-1,n=Math.min(w.length-1,r);n>=0;n--)r>0&&void 0!==w[n]&&(s[w[n]]={slidesPerView:r}),r-=1;new window.Swiper(i[0],t||{speed:1e3*(parseFloat(e.options.sliderSpeed,10)||0),autoHeight:"auto"===e.options.sliderItemsHeight,effect:e.options.sliderEffect||"slide",spaceBetween:parseFloat(e.options.itemsGap)||0,centeredSlides:"true"===e.options.sliderCenteredSlides,freeMode:"true"===e.options.sliderFreeMode,loop:"true"===e.options.sliderLoop,autoplay:parseFloat(e.options.sliderAutoplay)>0&&{delay:1e3*parseFloat(e.options.sliderAutoplay),disableOnInteraction:!1},navigation:"true"===e.options.sliderArrows&&{nextEl:".vp-portfolio__items-arrow-next",prevEl:".vp-portfolio__items-arrow-prev"},pagination:"true"===e.options.sliderBullets&&{el:".vp-portfolio__items-bullets",clickable:!0,dynamicBullets:"true"===e.options.sliderBulletsDynamic},slidesPerView:o,breakpoints:s,keyboard:!0,grabCursor:!0}),e.emitEvent("initSwiper",[t])}}},{key:"destroySwiper",value:function(){var t=this,e=t.$items_wrap.parent()[0].swiper;if(e){e.destroy();var i=t.$items_wrap.parent();i.removeClass("swiper-container"),t.$items_wrap.removeClass("swiper-wrapper"),t.$items_wrap.children().removeClass("swiper-slide"),i.find(".vp-portfolio__items-arrow, .vp-portfolio__items-bullets").remove(),t.emitEvent("destroySwiper")}}},{key:"initPhotoswipe",value:function(){function t(e,i){if(void 0===i)return void(e&&e.itemHolders.length&&e.itemHolders.forEach(function(i){i.item&&i.item.html&&t(e,i.item)}));var o=e.viewportSize.x*window.devicePixelRatio,s=e.viewportSize.y*window.devicePixelRatio,r=i.vw/i.vh,n=void 0,p=a(i.container),l=e.options.barsSize,d=0,v=0;l&&(d=l.top&&"auto"!==l.top?l.top:0,v=l.bottom&&"auto"!==l.bottom?l.bottom:0),s-=d+v,n=r>o/s?o:s*r,p.find(".vp-pswp-video").css("max-width",n),p.css({top:d,bottom:v})}var e=this;if(void 0!==v&&e.options.itemsClickAction&&"popup_gallery"===e.options.itemsClickAction&&!e.$item.closest("#vp_preview").length){if(!a(".vp-pswp").length){var i="\n <div class=\"pswp vp-pswp vp-pswp-uid-'}"+e.uid+'" tabindex="-1" role="dialog" aria-hidden="true">\n <div class="pswp__bg"></div>\n <div class="pswp__scroll-wrap">\n <div class="pswp__container">\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n </div>\n <div class="pswp__ui pswp__ui--hidden">\n <div class="pswp__top-bar">\n <div class="pswp__counter"></div>\n <a class="pswp__button pswp__button--close" title="'+m.pswp_close+'"></a>\n <a class="pswp__button pswp__button--share" title="'+m.pswp_share+'"></a>\n <a class="pswp__button pswp__button--fs" title="'+m.pswp_fs+'"></a>\n <a class="pswp__button pswp__button--zoom" title="'+m.pswp_zoom+'"></a>\n </div>\n <div class="pswp__preloader">\n <div class="pswp__preloader__icn">\n <div class="pswp__preloader__cut">\n <div class="pswp__preloader__donut"></div>\n </div>\n </div>\n </div>\n <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">\n <div class="pswp__share-tooltip"></div>\n </div>\n <a class="pswp__button pswp__button--arrow--left" title="'+m.pswp_prev+'"></a>\n <a class="pswp__button pswp__button--arrow--right" title="'+m.pswp_next+'"></a>\n <div class="pswp__caption">\n <div class="pswp__caption__center"></div>\n </div>\n </div>\n </div>\n </div>\n ';a("body").append(i)}var o=function(t){var e=a(t).find(".vp-portfolio__item-wrap"),i=[],o=void 0,s=void 0,r=void 0,n=void 0,p=void 0;return e.each(function(){if(o=a(this).find(".vp-portfolio__item-popup"),s=(o.attr("data-vp-popup-img-size")||"1920x1080").split("x"),r=(o.attr("data-vp-popup-video-size")||"1920x1080").split("x"),p=o.attr("data-vp-popup-video"))n={html:p,vw:parseInt(r[0],10),vh:parseInt(r[1],10)};else{n={src:o.attr("data-vp-popup-img"),w:parseInt(s[0],10),h:parseInt(s[1],10)};var t=o.html();t&&(n.title=t),n.el=this;var e=o.attr("data-vp-popup-md-img")||n.src;e&&(s=(o.attr("data-vp-popup-md-img-size")||o.attr("data-vp-popup-img-size")||"1920x1080").split("x"),n.m={src:e,w:parseInt(s[0],10),h:parseInt(s[1],10)}),n.o={src:n.src,w:n.w,h:n.h}}i.push(n)}),i},s=function(i,s,r,n){var p=a(".vp-pswp")[0],l=o(s),d={captionAndToolbarShowEmptyCaptions:!1,closeEl:u.show_close_button,captionEl:u.show_caption,fullscreenEl:u.show_fullscreen_button,zoomEl:u.show_zoom_button,shareEl:u.show_share_button,counterEl:u.show_counter,arrowEl:u.show_arrows,shareButtons:[{id:"facebook",label:m.pswp_share_fb,url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:m.pswp_share_tw,url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:m.pswp_share_pin,url:"https://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"}],bgOpacity:1,tapToClose:!0,tapToToggleControls:!1,showHideOpacity:!0,galleryUID:e.uid};if(n)if(d.galleryPIDs){for(var _=0;_<l.length;_++)if(l[_].pid===i){d.index=_;break}}else d.index=parseInt(i,10)-1;else d.index=parseInt(i,10);if(!Number.isNaN(d.index)){r&&(d.showAnimationDuration=0);var c=new v(p,f,l,d),h=void 0,w=!1,y=!0,g=void 0;c.listen("beforeResize",function(){h=c.viewportSize.x*window.devicePixelRatio,w&&h<1e3?(w=!1,g=!0):!w&&h>=1e3&&(w=!0,g=!0),g&&!y&&c.invalidateCurrItems(),y&&(y=!1),g=!1}),c.listen("gettingData",function(t,e){e.html||(w?(e.src=e.o.src,e.w=e.o.w,e.h=e.o.h):(e.src=e.m.src,e.w=e.m.w,e.h=e.m.h))}),c.listen("resize",function(){t(this)}),c.listen("afterChange",function(){t(this)}),c.listen("destroy",function(){var t=this;t&&t.itemHolders.length&&t.itemHolders.forEach(function(t){t.el&&a(t.el).find(".vp-pswp-video").remove()})}),c.init()}};e.$item.on("click.vpf.vpf-uid-"+e.uid,".vp-portfolio__item",function(t){t.preventDefault();var i=0,o=this;e.$item.find(".vp-portfolio__item").each(function(t){return this!==o||(i=t,!1)}),s(i,e.$item[0])});var r=function(){var t=window.location.hash.substring(1),e={};if(t.length<5)return e;for(var i=t.split("&"),o=0;o<i.length;o++)if(i[o]){var s=i[o].split("=");s.length<2||(e[s[0]]=s[1])}return e}();r.pid&&r.gid===e.uid&&s(r.pid,e.$item[0],!0,!0)}}},{key:"destroyPhotoswipe",value:function(){var t=this;t.$item.off("click.vpf.vpf-uid-"+t.uid),a(".vp-pswp-uid-"+t.uid).remove()}},{key:"addItems",value:function(t,e){var i=this,o=i.$items_wrap.data("isotope"),s=i.$items_wrap[0].fjGallery,r=i.$items_wrap.parent()[0].swiper;if(o){if(e){var n=i.$items_wrap.find(".vp-portfolio__item-wrap");i.$items_wrap.isotope("remove",n),i.$items_wrap.prepend(t).isotope("prepended",t)}else i.$items_wrap.append(t).isotope("appended",t);i.initIsotope("layout"),i.$items_wrap.imagesLoaded().progress(function(){i.initIsotope("layout")})}else if(s)e?(i.destroyFjGallery(),i.$items_wrap.find(".vp-portfolio__item-wrap").remove(),i.$items_wrap.prepend(t),i.initFjGallery()):(i.$items_wrap.append(t),i.initFjGallery("appendImages",t));else if(r){e&&r.removeAllSlides();var a=[];t.addClass("swiper-slide").each(function(){a.push(this)}),r.appendSlide(a)}i.emitEvent("addItems",[t,e])}},{key:"removeItems",value:function(t){var e=this;e.$items_wrap.data("isotope")&&e.$items_wrap.isotope("remove",t),e.emitEvent("removeItems",[t])}},{key:"loadNewItems",value:function(t,e,i){var o=this;!o.loading&&t&&(o.loading=!0,o.$item.addClass("vp-portfolio__loading"),o.emitEvent("startLoadingNewItems",[t]),a.get(t,{},function(t){t=t.replace("<body",'<body><div id="vp-infinite-load-body"').replace("</body>","</div></body>");var s=a(t).filter("#vp-infinite-load-body"),r=s.find(".vp-portfolio.vp-uid-"+o.uid);if(r.length){var n=r.find(".vp-portfolio__items").html();o.$filter.length&&o.$filter.each(function(){var t=a(this),e="";e=t.parent().hasClass("vp-single-filter")?s.find('[class="'+t.parent().attr("class").replace(" vp-single-filter__ready","")+'"] .vp-portfolio__filter-wrap').html():r.find(".vp-portfolio__filter-wrap").html(),t.html(e)}),o.$pagination.length&&o.$pagination.html(r.find(".vp-portfolio__pagination-wrap").html()),o.addItems(a(n),e),o.emitEvent("loadedNewItems",[r,r,t])}var p=r.attr("data-vp-next-page-url");o.options.nextPageUrl=p,o.$item.attr("data-vp-next-page-url",p),o.$item.removeClass("vp-portfolio__loading"),o.loading=!1,o.emitEvent("endLoadingNewItems"),o.initCustomColors(),i&&i()}))}}]),t}(),g=function(t){var e=Array.prototype.slice.call(arguments,1),o=void 0;return this.each(function(){if(void 0===o)if("object"===(void 0===t?"undefined":r(t))||void 0===t)this.vpf||(this.vpf=new y(a(this),t));else if(this.vpf){var s;o=(s=this.vpf)[t].apply(s,i(e))}}),void 0!==o?o:this};g.constructor=y;var b=jQuery.fn.vpf;jQuery.fn.vpf=g,jQuery.fn.vpf.noConflict=function(){return jQuery.fn.vpf=b,this},a(function(){a(".vp-portfolio").vpf()})}]);
assets/vendor/swiper/css/swiper.css ADDED
@@ -0,0 +1,618 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Swiper 4.3.3
3
+ * Most modern mobile touch slider and framework with hardware accelerated transitions
4
+ * http://www.idangero.us/swiper/
5
+ *
6
+ * Copyright 2014-2018 Vladimir Kharlampidi
7
+ *
8
+ * Released under the MIT License
9
+ *
10
+ * Released on: June 5, 2018
11
+ */
12
+ .swiper-container {
13
+ margin: 0 auto;
14
+ position: relative;
15
+ overflow: hidden;
16
+ list-style: none;
17
+ padding: 0;
18
+ /* Fix of Webkit flickering */
19
+ z-index: 1;
20
+ }
21
+ .swiper-container-no-flexbox .swiper-slide {
22
+ float: left;
23
+ }
24
+ .swiper-container-vertical > .swiper-wrapper {
25
+ -webkit-box-orient: vertical;
26
+ -webkit-box-direction: normal;
27
+ -webkit-flex-direction: column;
28
+ -ms-flex-direction: column;
29
+ flex-direction: column;
30
+ }
31
+ .swiper-wrapper {
32
+ position: relative;
33
+ width: 100%;
34
+ height: 100%;
35
+ z-index: 1;
36
+ display: -webkit-box;
37
+ display: -webkit-flex;
38
+ display: -ms-flexbox;
39
+ display: flex;
40
+ -webkit-transition-property: -webkit-transform;
41
+ transition-property: -webkit-transform;
42
+ -o-transition-property: transform;
43
+ transition-property: transform;
44
+ transition-property: transform, -webkit-transform;
45
+ -webkit-box-sizing: content-box;
46
+ box-sizing: content-box;
47
+ }
48
+ .swiper-container-android .swiper-slide,
49
+ .swiper-wrapper {
50
+ -webkit-transform: translate3d(0px, 0, 0);
51
+ transform: translate3d(0px, 0, 0);
52
+ }
53
+ .swiper-container-multirow > .swiper-wrapper {
54
+ -webkit-flex-wrap: wrap;
55
+ -ms-flex-wrap: wrap;
56
+ flex-wrap: wrap;
57
+ }
58
+ .swiper-container-free-mode > .swiper-wrapper {
59
+ -webkit-transition-timing-function: ease-out;
60
+ -o-transition-timing-function: ease-out;
61
+ transition-timing-function: ease-out;
62
+ margin: 0 auto;
63
+ }
64
+ .swiper-slide {
65
+ -webkit-flex-shrink: 0;
66
+ -ms-flex-negative: 0;
67
+ flex-shrink: 0;
68
+ width: 100%;
69
+ height: 100%;
70
+ position: relative;
71
+ -webkit-transition-property: -webkit-transform;
72
+ transition-property: -webkit-transform;
73
+ -o-transition-property: transform;
74
+ transition-property: transform;
75
+ transition-property: transform, -webkit-transform;
76
+ }
77
+ .swiper-invisible-blank-slide {
78
+ visibility: hidden;
79
+ }
80
+ /* Auto Height */
81
+ .swiper-container-autoheight,
82
+ .swiper-container-autoheight .swiper-slide {
83
+ height: auto;
84
+ }
85
+ .swiper-container-autoheight .swiper-wrapper {
86
+ -webkit-box-align: start;
87
+ -webkit-align-items: flex-start;
88
+ -ms-flex-align: start;
89
+ align-items: flex-start;
90
+ -webkit-transition-property: height, -webkit-transform;
91
+ transition-property: height, -webkit-transform;
92
+ -o-transition-property: transform, height;
93
+ transition-property: transform, height;
94
+ transition-property: transform, height, -webkit-transform;
95
+ }
96
+ /* 3D Effects */
97
+ .swiper-container-3d {
98
+ -webkit-perspective: 1200px;
99
+ perspective: 1200px;
100
+ }
101
+ .swiper-container-3d .swiper-wrapper,
102
+ .swiper-container-3d .swiper-slide,
103
+ .swiper-container-3d .swiper-slide-shadow-left,
104
+ .swiper-container-3d .swiper-slide-shadow-right,
105
+ .swiper-container-3d .swiper-slide-shadow-top,
106
+ .swiper-container-3d .swiper-slide-shadow-bottom,
107
+ .swiper-container-3d .swiper-cube-shadow {
108
+ -webkit-transform-style: preserve-3d;
109
+ transform-style: preserve-3d;
110
+ }
111
+ .swiper-container-3d .swiper-slide-shadow-left,
112
+ .swiper-container-3d .swiper-slide-shadow-right,
113
+ .swiper-container-3d .swiper-slide-shadow-top,
114
+ .swiper-container-3d .swiper-slide-shadow-bottom {
115
+ position: absolute;
116
+ left: 0;
117
+ top: 0;
118
+ width: 100%;
119
+ height: 100%;
120
+ pointer-events: none;
121
+ z-index: 10;
122
+ }
123
+ .swiper-container-3d .swiper-slide-shadow-left {
124
+ background-image: -webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
125
+ background-image: -webkit-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
126
+ background-image: -o-linear-gradient(right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
127
+ background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
128
+ }
129
+ .swiper-container-3d .swiper-slide-shadow-right {
130
+ background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
131
+ background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
132
+ background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
133
+ background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
134
+ }
135
+ .swiper-container-3d .swiper-slide-shadow-top {
136
+ background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
137
+ background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
138
+ background-image: -o-linear-gradient(bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
139
+ background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
140
+ }
141
+ .swiper-container-3d .swiper-slide-shadow-bottom {
142
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));
143
+ background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
144
+ background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
145
+ background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
146
+ }
147
+ /* IE10 Windows Phone 8 Fixes */
148
+ .swiper-container-wp8-horizontal,
149
+ .swiper-container-wp8-horizontal > .swiper-wrapper {
150
+ -ms-touch-action: pan-y;
151
+ touch-action: pan-y;
152
+ }
153
+ .swiper-container-wp8-vertical,
154
+ .swiper-container-wp8-vertical > .swiper-wrapper {
155
+ -ms-touch-action: pan-x;
156
+ touch-action: pan-x;
157
+ }
158
+ .swiper-button-prev,
159
+ .swiper-button-next {
160
+ position: absolute;
161
+ top: 50%;
162
+ width: 27px;
163
+ height: 44px;
164
+ margin-top: -22px;
165
+ z-index: 10;
166
+ cursor: pointer;
167
+ background-size: 27px 44px;
168
+ background-position: center;
169
+ background-repeat: no-repeat;
170
+ }
171
+ .swiper-button-prev.swiper-button-disabled,
172
+ .swiper-button-next.swiper-button-disabled {
173
+ opacity: 0.35;
174
+ cursor: auto;
175
+ pointer-events: none;
176
+ }
177
+ .swiper-button-prev,
178
+ .swiper-container-rtl .swiper-button-next {
179
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
180
+ left: 10px;
181
+ right: auto;
182
+ }
183
+ .swiper-button-next,
184
+ .swiper-container-rtl .swiper-button-prev {
185
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
186
+ right: 10px;
187
+ left: auto;
188
+ }
189
+ .swiper-button-prev.swiper-button-white,
190
+ .swiper-container-rtl .swiper-button-next.swiper-button-white {
191
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
192
+ }
193
+ .swiper-button-next.swiper-button-white,
194
+ .swiper-container-rtl .swiper-button-prev.swiper-button-white {
195
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
196
+ }
197
+ .swiper-button-prev.swiper-button-black,
198
+ .swiper-container-rtl .swiper-button-next.swiper-button-black {
199
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
200
+ }
201
+ .swiper-button-next.swiper-button-black,
202
+ .swiper-container-rtl .swiper-button-prev.swiper-button-black {
203
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
204
+ }
205
+ .swiper-button-lock {
206
+ display: none;
207
+ }
208
+ .swiper-pagination {
209
+ position: absolute;
210
+ text-align: center;
211
+ -webkit-transition: 300ms opacity;
212
+ -o-transition: 300ms opacity;
213
+ transition: 300ms opacity;
214
+ -webkit-transform: translate3d(0, 0, 0);
215
+ transform: translate3d(0, 0, 0);
216
+ z-index: 10;
217
+ }
218
+ .swiper-pagination.swiper-pagination-hidden {
219
+ opacity: 0;
220
+ }
221
+ /* Common Styles */
222
+ .swiper-pagination-fraction,
223
+ .swiper-pagination-custom,
224
+ .swiper-container-horizontal > .swiper-pagination-bullets {
225
+ bottom: 10px;
226
+ left: 0;
227
+ width: 100%;
228
+ }
229
+ /* Bullets */
230
+ .swiper-pagination-bullets-dynamic {
231
+ overflow: hidden;
232
+ font-size: 0;
233
+ }
234
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
235
+ -webkit-transform: scale(0.33);
236
+ -ms-transform: scale(0.33);
237
+ transform: scale(0.33);
238
+ position: relative;
239
+ }
240
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
241
+ -webkit-transform: scale(1);
242
+ -ms-transform: scale(1);
243
+ transform: scale(1);
244
+ }
245
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
246
+ -webkit-transform: scale(1);
247
+ -ms-transform: scale(1);
248
+ transform: scale(1);
249
+ }
250
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
251
+ -webkit-transform: scale(0.66);
252
+ -ms-transform: scale(0.66);
253
+ transform: scale(0.66);
254
+ }
255
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
256
+ -webkit-transform: scale(0.33);
257
+ -ms-transform: scale(0.33);
258
+ transform: scale(0.33);
259
+ }
260
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
261
+ -webkit-transform: scale(0.66);
262
+ -ms-transform: scale(0.66);
263
+ transform: scale(0.66);
264
+ }
265
+ .swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
266
+ -webkit-transform: scale(0.33);
267
+ -ms-transform: scale(0.33);
268
+ transform: scale(0.33);
269
+ }
270
+ .swiper-pagination-bullet {
271
+ width: 8px;
272
+ height: 8px;
273
+ display: inline-block;
274
+ border-radius: 100%;
275
+ background: #000;
276
+ opacity: 0.2;
277
+ }
278
+ button.swiper-pagination-bullet {
279
+ border: none;
280
+ margin: 0;
281
+ padding: 0;
282
+ -webkit-box-shadow: none;
283
+ box-shadow: none;
284
+ -webkit-appearance: none;
285
+ -moz-appearance: none;
286
+ appearance: none;
287
+ }
288
+ .swiper-pagination-clickable .swiper-pagination-bullet {
289
+ cursor: pointer;
290
+ }
291
+ .swiper-pagination-bullet-active {
292
+ opacity: 1;
293
+ background: #007aff;
294
+ }
295
+ .swiper-container-vertical > .swiper-pagination-bullets {
296
+ right: 10px;
297
+ top: 50%;
298
+ -webkit-transform: translate3d(0px, -50%, 0);
299
+ transform: translate3d(0px, -50%, 0);
300
+ }
301
+ .swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet {
302
+ margin: 6px 0;
303
+ display: block;
304
+ }
305
+ .swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
306
+ top: 50%;
307
+ -webkit-transform: translateY(-50%);
308
+ -ms-transform: translateY(-50%);
309
+ transform: translateY(-50%);
310
+ width: 8px;
311
+ }
312
+ .swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
313
+ display: inline-block;
314
+ -webkit-transition: 200ms top, 200ms -webkit-transform;
315
+ transition: 200ms top, 200ms -webkit-transform;
316
+ -o-transition: 200ms transform, 200ms top;
317
+ transition: 200ms transform, 200ms top;
318
+ transition: 200ms transform, 200ms top, 200ms -webkit-transform;
319
+ }
320
+ .swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
321
+ margin: 0 4px;
322
+ }
323
+ .swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
324
+ left: 50%;
325
+ -webkit-transform: translateX(-50%);
326
+ -ms-transform: translateX(-50%);
327
+ transform: translateX(-50%);
328
+ white-space: nowrap;
329
+ }
330
+ .swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
331
+ -webkit-transition: 200ms left, 200ms -webkit-transform;
332
+ transition: 200ms left, 200ms -webkit-transform;
333
+ -o-transition: 200ms transform, 200ms left;
334
+ transition: 200ms transform, 200ms left;
335
+ transition: 200ms transform, 200ms left, 200ms -webkit-transform;
336
+ }
337
+ .swiper-container-horizontal.swiper-container-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
338
+ -webkit-transition: 200ms right, 200ms -webkit-transform;
339
+ transition: 200ms right, 200ms -webkit-transform;
340
+ -o-transition: 200ms transform, 200ms right;
341
+ transition: 200ms transform, 200ms right;
342
+ transition: 200ms transform, 200ms right, 200ms -webkit-transform;
343
+ }
344
+ /* Progress */
345
+ .swiper-pagination-progressbar {
346
+ background: rgba(0, 0, 0, 0.25);
347
+ position: absolute;
348
+ }
349
+ .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
350
+ background: #007aff;
351
+ position: absolute;
352
+ left: 0;
353
+ top: 0;
354
+ width: 100%;
355
+ height: 100%;
356
+ -webkit-transform: scale(0);
357
+ -ms-transform: scale(0);
358
+ transform: scale(0);
359
+ -webkit-transform-origin: left top;
360
+ -ms-transform-origin: left top;
361
+ transform-origin: left top;
362
+ }
363
+ .swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
364
+ -webkit-transform-origin: right top;
365
+ -ms-transform-origin: right top;
366
+ transform-origin: right top;
367
+ }
368
+ .swiper-container-horizontal > .swiper-pagination-progressbar,
369
+ .swiper-container-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
370
+ width: 100%;
371
+ height: 4px;
372
+ left: 0;
373
+ top: 0;
374
+ }
375
+ .swiper-container-vertical > .swiper-pagination-progressbar,
376
+ .swiper-container-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
377
+ width: 4px;
378
+ height: 100%;
379
+ left: 0;
380
+ top: 0;
381
+ }
382
+ .swiper-pagination-white .swiper-pagination-bullet-active {
383
+ background: #ffffff;
384
+ }
385
+ .swiper-pagination-progressbar.swiper-pagination-white {
386
+ background: rgba(255, 255, 255, 0.25);
387
+ }
388
+ .swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill {
389
+ background: #ffffff;
390
+ }
391
+ .swiper-pagination-black .swiper-pagination-bullet-active {
392
+ background: #000000;
393
+ }
394
+ .swiper-pagination-progressbar.swiper-pagination-black {
395
+ background: rgba(0, 0, 0, 0.25);
396
+ }
397
+ .swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill {
398
+ background: #000000;
399
+ }
400
+ .swiper-pagination-lock {
401
+ display: none;
402
+ }
403
+ /* Scrollbar */
404
+ .swiper-scrollbar {
405
+ border-radius: 10px;
406
+ position: relative;
407
+ -ms-touch-action: none;
408
+ background: rgba(0, 0, 0, 0.1);
409
+ }
410
+ .swiper-container-horizontal > .swiper-scrollbar {
411
+ position: absolute;
412
+ left: 1%;
413
+ bottom: 3px;
414
+ z-index: 50;
415
+ height: 5px;
416
+ width: 98%;
417
+ }
418
+ .swiper-container-vertical > .swiper-scrollbar {
419
+ position: absolute;
420
+ right: 3px;
421
+ top: 1%;
422
+ z-index: 50;
423
+ width: 5px;
424
+ height: 98%;
425
+ }
426
+ .swiper-scrollbar-drag {
427
+ height: 100%;
428
+ width: 100%;
429
+ position: relative;
430
+ background: rgba(0, 0, 0, 0.5);
431
+ border-radius: 10px;
432
+ left: 0;
433
+ top: 0;
434
+ }
435
+ .swiper-scrollbar-cursor-drag {
436
+ cursor: move;
437
+ }
438
+ .swiper-scrollbar-lock {
439
+ display: none;
440
+ }
441
+ .swiper-zoom-container {
442
+ width: 100%;
443
+ height: 100%;
444
+ display: -webkit-box;
445
+ display: -webkit-flex;
446
+ display: -ms-flexbox;
447
+ display: flex;
448
+ -webkit-box-pack: center;
449
+ -webkit-justify-content: center;
450
+ -ms-flex-pack: center;
451
+ justify-content: center;
452
+ -webkit-box-align: center;
453
+ -webkit-align-items: center;
454
+ -ms-flex-align: center;
455
+ align-items: center;
456
+ text-align: center;
457
+ }
458
+ .swiper-zoom-container > img,
459
+ .swiper-zoom-container > svg,
460
+ .swiper-zoom-container > canvas {
461
+ max-width: 100%;
462
+ max-height: 100%;
463
+ -o-object-fit: contain;
464
+ object-fit: contain;
465
+ }
466
+ .swiper-slide-zoomed {
467
+ cursor: move;
468
+ }
469
+ /* Preloader */
470
+ .swiper-lazy-preloader {
471
+ width: 42px;
472
+ height: 42px;
473
+ position: absolute;
474
+ left: 50%;
475
+ top: 50%;
476
+ margin-left: -21px;
477
+ margin-top: -21px;
478
+ z-index: 10;
479
+ -webkit-transform-origin: 50%;
480
+ -ms-transform-origin: 50%;
481
+ transform-origin: 50%;
482
+ -webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;
483
+ animation: swiper-preloader-spin 1s steps(12, end) infinite;
484
+ }
485
+ .swiper-lazy-preloader:after {
486
+ display: block;
487
+ content: '';
488
+ width: 100%;
489
+ height: 100%;
490
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
491
+ background-position: 50%;
492
+ background-size: 100%;
493
+ background-repeat: no-repeat;
494
+ }
495
+ .swiper-lazy-preloader-white:after {
496
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
497
+ }
498
+ @-webkit-keyframes swiper-preloader-spin {
499
+ 100% {
500
+ -webkit-transform: rotate(360deg);
501
+ transform: rotate(360deg);
502
+ }
503
+ }
504
+ @keyframes swiper-preloader-spin {
505
+ 100% {
506
+ -webkit-transform: rotate(360deg);
507
+ transform: rotate(360deg);
508
+ }
509
+ }
510
+ /* a11y */
511
+ .swiper-container .swiper-notification {
512
+ position: absolute;
513
+ left: 0;
514
+ top: 0;
515
+ pointer-events: none;
516
+ opacity: 0;
517
+ z-index: -1000;
518
+ }
519
+ .swiper-container-fade.swiper-container-free-mode .swiper-slide {
520
+ -webkit-transition-timing-function: ease-out;
521
+ -o-transition-timing-function: ease-out;
522
+ transition-timing-function: ease-out;
523
+ }
524
+ .swiper-container-fade .swiper-slide {
525
+ pointer-events: none;
526
+ -webkit-transition-property: opacity;
527
+ -o-transition-property: opacity;
528
+ transition-property: opacity;
529
+ }
530
+ .swiper-container-fade .swiper-slide .swiper-slide {
531
+ pointer-events: none;
532
+ }
533
+ .swiper-container-fade .swiper-slide-active,
534
+ .swiper-container-fade .swiper-slide-active .swiper-slide-active {
535
+ pointer-events: auto;
536
+ }
537
+ .swiper-container-cube {
538
+ overflow: visible;
539
+ }
540
+ .swiper-container-cube .swiper-slide {
541
+ pointer-events: none;
542
+ -webkit-backface-visibility: hidden;
543
+ backface-visibility: hidden;
544
+ z-index: 1;
545
+ visibility: hidden;
546
+ -webkit-transform-origin: 0 0;
547
+ -ms-transform-origin: 0 0;
548
+ transform-origin: 0 0;
549
+ width: 100%;
550
+ height: 100%;
551
+ }
552
+ .swiper-container-cube .swiper-slide .swiper-slide {
553
+ pointer-events: none;
554
+ }
555
+ .swiper-container-cube.swiper-container-rtl .swiper-slide {
556
+ -webkit-transform-origin: 100% 0;
557
+ -ms-transform-origin: 100% 0;
558
+ transform-origin: 100% 0;
559
+ }
560
+ .swiper-container-cube .swiper-slide-active,
561
+ .swiper-container-cube .swiper-slide-active .swiper-slide-active {
562
+ pointer-events: auto;
563
+ }
564
+ .swiper-container-cube .swiper-slide-active,
565
+ .swiper-container-cube .swiper-slide-next,
566
+ .swiper-container-cube .swiper-slide-prev,
567
+ .swiper-container-cube .swiper-slide-next + .swiper-slide {
568
+ pointer-events: auto;
569
+ visibility: visible;
570
+ }
571
+ .swiper-container-cube .swiper-slide-shadow-top,
572
+ .swiper-container-cube .swiper-slide-shadow-bottom,
573
+ .swiper-container-cube .swiper-slide-shadow-left,
574
+ .swiper-container-cube .swiper-slide-shadow-right {
575
+ z-index: 0;
576
+ -webkit-backface-visibility: hidden;
577
+ backface-visibility: hidden;
578
+ }
579
+ .swiper-container-cube .swiper-cube-shadow {
580
+ position: absolute;
581
+ left: 0;
582
+ bottom: 0px;
583
+ width: 100%;
584
+ height: 100%;
585
+ background: #000;
586
+ opacity: 0.6;
587
+ -webkit-filter: blur(50px);
588
+ filter: blur(50px);
589
+ z-index: 0;
590
+ }
591
+ .swiper-container-flip {
592
+ overflow: visible;
593
+ }
594
+ .swiper-container-flip .swiper-slide {
595
+ pointer-events: none;
596
+ -webkit-backface-visibility: hidden;
597
+ backface-visibility: hidden;
598
+ z-index: 1;
599
+ }
600
+ .swiper-container-flip .swiper-slide .swiper-slide {
601
+ pointer-events: none;
602
+ }
603
+ .swiper-container-flip .swiper-slide-active,
604
+ .swiper-container-flip .swiper-slide-active .swiper-slide-active {
605
+ pointer-events: auto;
606
+ }
607
+ .swiper-container-flip .swiper-slide-shadow-top,
608
+ .swiper-container-flip .swiper-slide-shadow-bottom,
609
+ .swiper-container-flip .swiper-slide-shadow-left,
610
+ .swiper-container-flip .swiper-slide-shadow-right {
611
+ z-index: 0;
612
+ -webkit-backface-visibility: hidden;
613
+ backface-visibility: hidden;
614
+ }
615
+ .swiper-container-coverflow .swiper-wrapper {
616
+ /* Windows 8 IE 10 fix */
617
+ -ms-perspective: 1200px;
618
+ }
assets/vendor/swiper/css/swiper.min.css ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Swiper 4.3.3
3
+ * Most modern mobile touch slider and framework with hardware accelerated transitions
4
+ * http://www.idangero.us/swiper/
5
+ *
6
+ * Copyright 2014-2018 Vladimir Kharlampidi
7
+ *
8
+ * Released under the MIT License
9
+ *
10
+ * Released on: June 5, 2018
11
+ */
12
+ .swiper-container{margin:0 auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-container-no-flexbox .swiper-slide{float:left}.swiper-container-vertical>.swiper-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-container-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.swiper-container-multirow>.swiper-wrapper{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.swiper-container-free-mode>.swiper-wrapper{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out;margin:0 auto}.swiper-slide{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;-o-transition-property:transform;transition-property:transform;transition-property:transform,-webkit-transform}.swiper-invisible-blank-slide{visibility:hidden}.swiper-container-autoheight,.swiper-container-autoheight .swiper-slide{height:auto}.swiper-container-autoheight .swiper-wrapper{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height,-webkit-transform;transition-property:height,-webkit-transform;-o-transition-property:transform,height;transition-property:transform,height;transition-property:transform,height,-webkit-transform}.swiper-container-3d{-webkit-perspective:1200px;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{-webkit-transform-style:preserve-3d;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:-webkit-gradient(linear,right top,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(right,rgba(0,0,0,.5),rgba(0,0,0,0));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:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,0));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:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(bottom,rgba(0,0,0,.5),rgba(0,0,0,0));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:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,0)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:-o-linear-gradient(top,rgba(0,0,0,.5),rgba(0,0,0,0));background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-container-wp8-horizontal,.swiper-container-wp8-horizontal>.swiper-wrapper{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-container-wp8-vertical,.swiper-container-wp8-vertical>.swiper-wrapper{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:27px;height:44px;margin-top:-22px;z-index:10;cursor:pointer;background-size:27px 44px;background-position:center;background-repeat:no-repeat}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-prev,.swiper-container-rtl .swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");left:10px;right:auto}.swiper-button-next,.swiper-container-rtl .swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");right:10px;left:auto}.swiper-button-prev.swiper-button-white,.swiper-container-rtl .swiper-button-next.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-white,.swiper-container-rtl .swiper-button-prev.swiper-button-white{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E")}.swiper-button-prev.swiper-button-black,.swiper-container-rtl .swiper-button-next.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-next.swiper-button-black,.swiper-container-rtl .swiper-button-prev.swiper-button-black{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E")}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:.3s opacity;-o-transition:.3s opacity;transition:.3s opacity;-webkit-transform:translate3d(0,0,0);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{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(.33);-ms-transform:scale(.33);transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(.66);-ms-transform:scale(.66);transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(.33);-ms-transform:scale(.33);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;-webkit-box-shadow:none;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:#007aff}.swiper-container-vertical>.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0,-50%,0);transform:translate3d(0,-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%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-container-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:.2s top,.2s -webkit-transform;transition:.2s top,.2s -webkit-transform;-o-transition:.2s transform,.2s top;transition:.2s transform,.2s top;transition:.2s transform,.2s top,.2s -webkit-transform}.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 4px}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-container-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s left,.2s -webkit-transform;transition:.2s left,.2s -webkit-transform;-o-transition:.2s transform,.2s left;transition:.2s transform,.2s left;transition:.2s transform,.2s left,.2s -webkit-transform}.swiper-container-horizontal.swiper-container-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:.2s right,.2s -webkit-transform;transition:.2s right,.2s -webkit-transform;-o-transition:.2s transform,.2s right;transition:.2s transform,.2s right;transition:.2s transform,.2s right,.2s -webkit-transform}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:#007aff;position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;-ms-transform-origin:right top;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-bullet-active{background:#fff}.swiper-pagination-progressbar.swiper-pagination-white{background:rgba(255,255,255,.25)}.swiper-pagination-progressbar.swiper-pagination-white .swiper-pagination-progressbar-fill{background:#fff}.swiper-pagination-black .swiper-pagination-bullet-active{background:#000}.swiper-pagination-progressbar.swiper-pagination-black{background:rgba(0,0,0,.25)}.swiper-pagination-progressbar.swiper-pagination-black .swiper-pagination-progressbar-fill{background:#000}.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:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align: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%;-o-object-fit:contain;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;-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;-webkit-animation:swiper-preloader-spin 1s steps(12,end) infinite;animation:swiper-preloader-spin 1s steps(12,end) infinite}.swiper-lazy-preloader:after{display:block;content:'';width:100%;height:100%;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");background-position:50%;background-size:100%;background-repeat:no-repeat}.swiper-lazy-preloader-white:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E")}@-webkit-keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{100%{-webkit-transform:rotate(360deg);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{-webkit-transition-timing-function:ease-out;-o-transition-timing-function:ease-out;transition-timing-function:ease-out}.swiper-container-fade .swiper-slide{pointer-events:none;-webkit-transition-property:opacity;-o-transition-property:opacity;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;-webkit-transform-origin:0 0;-ms-transform-origin:0 0;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{-webkit-transform-origin:100% 0;-ms-transform-origin:100% 0;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:0;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}.swiper-container-coverflow .swiper-wrapper{-ms-perspective:1200px}
assets/vendor/swiper/js/swiper.esm.bundle.js ADDED
@@ -0,0 +1,6700 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Swiper 4.3.3
3
+ * Most modern mobile touch slider and framework with hardware accelerated transitions
4
+ * http://www.idangero.us/swiper/
5
+ *
6
+ * Copyright 2014-2018 Vladimir Kharlampidi
7
+ *
8
+ * Released under the MIT License
9
+ *
10
+ * Released on: June 5, 2018
11
+ */
12
+
13
+ import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, data, transform, transition, on, off, trigger, transitionEnd, outerWidth, outerHeight, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, remove, add, styles } from 'dom7/dist/dom7.modular';
14
+ import { window, document } from 'ssr-window';
15
+
16
+ const Methods = {
17
+ addClass,
18
+ removeClass,
19
+ hasClass,
20
+ toggleClass,
21
+ attr,
22
+ removeAttr,
23
+ data,
24
+ transform,
25
+ transition,
26
+ on,
27
+ off,
28
+ trigger,
29
+ transitionEnd,
30
+ outerWidth,
31
+ outerHeight,
32
+ offset,
33
+ css,
34
+ each,
35
+ html,
36
+ text,
37
+ is,
38
+ index,
39
+ eq,
40
+ append,
41
+ prepend,
42
+ next,
43
+ nextAll,
44
+ prev,
45
+ prevAll,
46
+ parent,
47
+ parents,
48
+ closest,
49
+ find,
50
+ children,
51
+ remove,
52
+ add,
53
+ styles,
54
+ };
55
+
56
+ Object.keys(Methods).forEach((methodName) => {
57
+ $.fn[methodName] = Methods[methodName];
58
+ });
59
+
60
+ const Utils = {
61
+ deleteProps(obj) {
62
+ const object = obj;
63
+ Object.keys(object).forEach((key) => {
64
+ try {
65
+ object[key] = null;
66
+ } catch (e) {
67
+ // no getter for object
68
+ }
69
+ try {
70
+ delete object[key];
71
+ } catch (e) {
72
+ // something got wrong
73
+ }
74
+ });
75
+ },
76
+ nextTick(callback, delay = 0) {
77
+ return setTimeout(callback, delay);
78
+ },
79
+ now() {
80
+ return Date.now();
81
+ },
82
+ getTranslate(el, axis = 'x') {
83
+ let matrix;
84
+ let curTransform;
85
+ let transformMatrix;
86
+
87
+ const curStyle = window.getComputedStyle(el, null);
88
+
89
+ if (window.WebKitCSSMatrix) {
90
+ curTransform = curStyle.transform || curStyle.webkitTransform;
91
+ if (curTransform.split(',').length > 6) {
92
+ curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');
93
+ }
94
+ // Some old versions of Webkit choke when 'none' is passed; pass
95
+ // empty string instead in this case
96
+ transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
97
+ } else {
98
+ transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
99
+ matrix = transformMatrix.toString().split(',');
100
+ }
101
+
102
+ if (axis === 'x') {
103
+ // Latest Chrome and webkits Fix
104
+ if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
105
+ // Crazy IE10 Matrix
106
+ else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
107
+ // Normal Browsers
108
+ else curTransform = parseFloat(matrix[4]);
109
+ }
110
+ if (axis === 'y') {
111
+ // Latest Chrome and webkits Fix
112
+ if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
113
+ // Crazy IE10 Matrix
114
+ else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
115
+ // Normal Browsers
116
+ else curTransform = parseFloat(matrix[5]);
117
+ }
118
+ return curTransform || 0;
119
+ },
120
+ parseUrlQuery(url) {
121
+ const query = {};
122
+ let urlToParse = url || window.location.href;
123
+ let i;
124
+ let params;
125
+ let param;
126
+ let length;
127
+ if (typeof urlToParse === 'string' && urlToParse.length) {
128
+ urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
129
+ params = urlToParse.split('&').filter(paramsPart => paramsPart !== '');
130
+ length = params.length;
131
+
132
+ for (i = 0; i < length; i += 1) {
133
+ param = params[i].replace(/#\S+/g, '').split('=');
134
+ query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
135
+ }
136
+ }
137
+ return query;
138
+ },
139
+ isObject(o) {
140
+ return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
141
+ },
142
+ extend(...args) {
143
+ const to = Object(args[0]);
144
+ for (let i = 1; i < args.length; i += 1) {
145
+ const nextSource = args[i];
146
+ if (nextSource !== undefined && nextSource !== null) {
147
+ const keysArray = Object.keys(Object(nextSource));
148
+ for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
149
+ const nextKey = keysArray[nextIndex];
150
+ const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
151
+ if (desc !== undefined && desc.enumerable) {
152
+ if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
153
+ Utils.extend(to[nextKey], nextSource[nextKey]);
154
+ } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
155
+ to[nextKey] = {};
156
+ Utils.extend(to[nextKey], nextSource[nextKey]);
157
+ } else {
158
+ to[nextKey] = nextSource[nextKey];
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ return to;
165
+ },
166
+ };
167
+
168
+ const Support = (function Support() {
169
+ const testDiv = document.createElement('div');
170
+ return {
171
+ touch: (window.Modernizr && window.Modernizr.touch === true) || (function checkTouch() {
172
+ return !!(('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch));
173
+ }()),
174
+
175
+ pointerEvents: !!(window.navigator.pointerEnabled || window.PointerEvent),
176
+ prefixedPointerEvents: !!window.navigator.msPointerEnabled,
177
+
178
+ transition: (function checkTransition() {
179
+ const style = testDiv.style;
180
+ return ('transition' in style || 'webkitTransition' in style || 'MozTransition' in style);
181
+ }()),
182
+ transforms3d: (window.Modernizr && window.Modernizr.csstransforms3d === true) || (function checkTransforms3d() {
183
+ const style = testDiv.style;
184
+ return ('webkitPerspective' in style || 'MozPerspective' in style || 'OPerspective' in style || 'MsPerspective' in style || 'perspective' in style);
185
+ }()),
186
+
187
+ flexbox: (function checkFlexbox() {
188
+ const style = testDiv.style;
189
+ const styles$$1 = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
190
+ for (let i = 0; i < styles$$1.length; i += 1) {
191
+ if (styles$$1[i] in style) return true;
192
+ }
193
+ return false;
194
+ }()),
195
+
196
+ observer: (function checkObserver() {
197
+ return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
198
+ }()),
199
+
200
+ passiveListener: (function checkPassiveListener() {
201
+ let supportsPassive = false;
202
+ try {
203
+ const opts = Object.defineProperty({}, 'passive', {
204
+ // eslint-disable-next-line
205
+ get() {
206
+ supportsPassive = true;
207
+ },
208
+ });
209
+ window.addEventListener('testPassiveListener', null, opts);
210
+ } catch (e) {
211
+ // No support
212
+ }
213
+ return supportsPassive;
214
+ }()),
215
+
216
+ gestures: (function checkGestures() {
217
+ return 'ongesturestart' in window;
218
+ }()),
219
+ };
220
+ }());
221
+
222
+ class SwiperClass {
223
+ constructor(params = {}) {
224
+ const self = this;
225
+ self.params = params;
226
+
227
+ // Events
228
+ self.eventsListeners = {};
229
+
230
+ if (self.params && self.params.on) {
231
+ Object.keys(self.params.on).forEach((eventName) => {
232
+ self.on(eventName, self.params.on[eventName]);
233
+ });
234
+ }
235
+ }
236
+ on(events, handler, priority) {
237
+ const self = this;
238
+ if (typeof handler !== 'function') return self;
239
+ const method = priority ? 'unshift' : 'push';
240
+ events.split(' ').forEach((event) => {
241
+ if (!self.eventsListeners[event]) self.eventsListeners[event] = [];
242
+ self.eventsListeners[event][method](handler);
243
+ });
244
+ return self;
245
+ }
246
+ once(events, handler, priority) {
247
+ const self = this;
248
+ if (typeof handler !== 'function') return self;
249
+ function onceHandler(...args) {
250
+ handler.apply(self, args);
251
+ self.off(events, onceHandler);
252
+ }
253
+ return self.on(events, onceHandler, priority);
254
+ }
255
+ off(events, handler) {
256
+ const self = this;
257
+ if (!self.eventsListeners) return self;
258
+ events.split(' ').forEach((event) => {
259
+ if (typeof handler === 'undefined') {
260
+ self.eventsListeners[event] = [];
261
+ } else {
262
+ self.eventsListeners[event].forEach((eventHandler, index$$1) => {
263
+ if (eventHandler === handler) {
264
+ self.eventsListeners[event].splice(index$$1, 1);
265
+ }
266
+ });
267
+ }
268
+ });
269
+ return self;
270
+ }
271
+ emit(...args) {
272
+ const self = this;
273
+ if (!self.eventsListeners) return self;
274
+ let events;
275
+ let data$$1;
276
+ let context;
277
+ if (typeof args[0] === 'string' || Array.isArray(args[0])) {
278
+ events = args[0];
279
+ data$$1 = args.slice(1, args.length);
280
+ context = self;
281
+ } else {
282
+ events = args[0].events;
283
+ data$$1 = args[0].data;
284
+ context = args[0].context || self;
285
+ }
286
+ const eventsArray = Array.isArray(events) ? events : events.split(' ');
287
+ eventsArray.forEach((event) => {
288
+ if (self.eventsListeners && self.eventsListeners[event]) {
289
+ const handlers = [];
290
+ self.eventsListeners[event].forEach((eventHandler) => {
291
+ handlers.push(eventHandler);
292
+ });
293
+ handlers.forEach((eventHandler) => {
294
+ eventHandler.apply(context, data$$1);
295
+ });
296
+ }
297
+ });
298
+ return self;
299
+ }
300
+ useModulesParams(instanceParams) {
301
+ const instance = this;
302
+ if (!instance.modules) return;
303
+ Object.keys(instance.modules).forEach((moduleName) => {
304
+ const module = instance.modules[moduleName];
305
+ // Extend params
306
+ if (module.params) {
307
+ Utils.extend(instanceParams, module.params);
308
+ }
309
+ });
310
+ }
311
+ useModules(modulesParams = {}) {
312
+ const instance = this;
313
+ if (!instance.modules) return;
314
+ Object.keys(instance.modules).forEach((moduleName) => {
315
+ const module = instance.modules[moduleName];
316
+ const moduleParams = modulesParams[moduleName] || {};
317
+ // Extend instance methods and props
318
+ if (module.instance) {
319
+ Object.keys(module.instance).forEach((modulePropName) => {
320
+ const moduleProp = module.instance[modulePropName];
321
+ if (typeof moduleProp === 'function') {
322
+ instance[modulePropName] = moduleProp.bind(instance);
323
+ } else {
324
+ instance[modulePropName] = moduleProp;
325
+ }
326
+ });
327
+ }
328
+ // Add event listeners
329
+ if (module.on && instance.on) {
330
+ Object.keys(module.on).forEach((moduleEventName) => {
331
+ instance.on(moduleEventName, module.on[moduleEventName]);
332
+ });
333
+ }
334
+
335
+ // Module create callback
336
+ if (module.create) {
337
+ module.create.bind(instance)(moduleParams);
338
+ }
339
+ });
340
+ }
341
+ static set components(components) {
342
+ const Class = this;
343
+ if (!Class.use) return;
344
+ Class.use(components);
345
+ }
346
+ static installModule(module, ...params) {
347
+ const Class = this;
348
+ if (!Class.prototype.modules) Class.prototype.modules = {};
349
+ const name = module.name || (`${Object.keys(Class.prototype.modules).length}_${Utils.now()}`);
350
+ Class.prototype.modules[name] = module;
351
+ // Prototype
352
+ if (module.proto) {
353
+ Object.keys(module.proto).forEach((key) => {
354
+ Class.prototype[key] = module.proto[key];
355
+ });
356
+ }
357
+ // Class
358
+ if (module.static) {
359
+ Object.keys(module.static).forEach((key) => {
360
+ Class[key] = module.static[key];
361
+ });
362
+ }
363
+ // Callback
364
+ if (module.install) {
365
+ module.install.apply(Class, params);
366
+ }
367
+ return Class;
368
+ }
369
+ static use(module, ...params) {
370
+ const Class = this;
371
+ if (Array.isArray(module)) {
372
+ module.forEach(m => Class.installModule(m));
373
+ return Class;
374
+ }
375
+ return Class.installModule(module, ...params);
376
+ }
377
+ }
378
+
379
+ function updateSize () {
380
+ const swiper = this;
381
+ let width;
382
+ let height;
383
+ const $el = swiper.$el;
384
+ if (typeof swiper.params.width !== 'undefined') {
385
+ width = swiper.params.width;
386
+ } else {
387
+ width = $el[0].clientWidth;
388
+ }
389
+ if (typeof swiper.params.height !== 'undefined') {
390
+ height = swiper.params.height;
391
+ } else {
392
+ height = $el[0].clientHeight;
393
+ }
394
+ if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
395
+ return;
396
+ }
397
+
398
+ // Subtract paddings
399
+ width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
400
+ height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
401
+
402
+ Utils.extend(swiper, {
403
+ width,
404
+ height,
405
+ size: swiper.isHorizontal() ? width : height,
406
+ });
407
+ }
408
+
409
+ function updateSlides () {
410
+ const swiper = this;
411
+ const params = swiper.params;
412
+
413
+ const {
414
+ $wrapperEl, size: swiperSize, rtlTranslate: rtl, wrongRTL,
415
+ } = swiper;
416
+ const isVirtual = swiper.virtual && params.virtual.enabled;
417
+ const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
418
+ const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);
419
+ const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
420
+ let snapGrid = [];
421
+ const slidesGrid = [];
422
+ const slidesSizesGrid = [];
423
+
424
+ let offsetBefore = params.slidesOffsetBefore;
425
+ if (typeof offsetBefore === 'function') {
426
+ offsetBefore = params.slidesOffsetBefore.call(swiper);
427
+ }
428
+
429
+ let offsetAfter = params.slidesOffsetAfter;
430
+ if (typeof offsetAfter === 'function') {
431
+ offsetAfter = params.slidesOffsetAfter.call(swiper);
432
+ }
433
+
434
+ const previousSnapGridLength = swiper.snapGrid.length;
435
+ const previousSlidesGridLength = swiper.snapGrid.length;
436
+
437
+ let spaceBetween = params.spaceBetween;
438
+ let slidePosition = -offsetBefore;
439
+ let prevSlideSize = 0;
440
+ let index$$1 = 0;
441
+ if (typeof swiperSize === 'undefined') {
442
+ return;
443
+ }
444
+ if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
445
+ spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
446
+ }
447
+
448
+ swiper.virtualSize = -spaceBetween;
449
+
450
+ // reset margins
451
+ if (rtl) slides.css({ marginLeft: '', marginTop: '' });
452
+ else slides.css({ marginRight: '', marginBottom: '' });
453
+
454
+ let slidesNumberEvenToRows;
455
+ if (params.slidesPerColumn > 1) {
456
+ if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
457
+ slidesNumberEvenToRows = slidesLength;
458
+ } else {
459
+ slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
460
+ }
461
+ if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
462
+ slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
463
+ }
464
+ }
465
+
466
+ // Calc slides
467
+ let slideSize;
468
+ const slidesPerColumn = params.slidesPerColumn;
469
+ const slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
470
+ const numFullColumns = slidesPerRow - ((params.slidesPerColumn * slidesPerRow) - slidesLength);
471
+ for (let i = 0; i < slidesLength; i += 1) {
472
+ slideSize = 0;
473
+ const slide = slides.eq(i);
474
+ if (params.slidesPerColumn > 1) {
475
+ // Set slides order
476
+ let newSlideOrderIndex;
477
+ let column;
478
+ let row;
479
+ if (params.slidesPerColumnFill === 'column') {
480
+ column = Math.floor(i / slidesPerColumn);
481
+ row = i - (column * slidesPerColumn);
482
+ if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
483
+ row += 1;
484
+ if (row >= slidesPerColumn) {
485
+ row = 0;
486
+ column += 1;
487
+ }
488
+ }
489
+ newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
490
+ slide
491
+ .css({
492
+ '-webkit-box-ordinal-group': newSlideOrderIndex,
493
+ '-moz-box-ordinal-group': newSlideOrderIndex,
494
+ '-ms-flex-order': newSlideOrderIndex,
495
+ '-webkit-order': newSlideOrderIndex,
496
+ order: newSlideOrderIndex,
497
+ });
498
+ } else {
499
+ row = Math.floor(i / slidesPerRow);
500
+ column = i - (row * slidesPerRow);
501
+ }
502
+ slide
503
+ .css(
504
+ `margin-${swiper.isHorizontal() ? 'top' : 'left'}`,
505
+ (row !== 0 && params.spaceBetween) && (`${params.spaceBetween}px`)
506
+ )
507
+ .attr('data-swiper-column', column)
508
+ .attr('data-swiper-row', row);
509
+ }
510
+ if (slide.css('display') === 'none') continue; // eslint-disable-line
511
+
512
+ if (params.slidesPerView === 'auto') {
513
+ const slideStyles = window.getComputedStyle(slide[0], null);
514
+ const currentTransform = slide[0].style.transform;
515
+ const currentWebKitTransform = slide[0].style.webkitTransform;
516
+ if (currentTransform) {
517
+ slide[0].style.transform = 'none';
518
+ }
519
+ if (currentWebKitTransform) {
520
+ slide[0].style.webkitTransform = 'none';
521
+ }
522
+ if (swiper.isHorizontal()) {
523
+ slideSize = slide[0].getBoundingClientRect().width +
524
+ parseFloat(slideStyles.getPropertyValue('margin-left')) +
525
+ parseFloat(slideStyles.getPropertyValue('margin-right'));
526
+ } else {
527
+ slideSize = slide[0].getBoundingClientRect().height +
528
+ parseFloat(slideStyles.getPropertyValue('margin-top')) +
529
+ parseFloat(slideStyles.getPropertyValue('margin-bottom'));
530
+ }
531
+ if (currentTransform) {
532
+ slide[0].style.transform = currentTransform;
533
+ }
534
+ if (currentWebKitTransform) {
535
+ slide[0].style.webkitTransform = currentWebKitTransform;
536
+ }
537
+ if (params.roundLengths) slideSize = Math.floor(slideSize);
538
+ } else {
539
+ slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
540
+ if (params.roundLengths) slideSize = Math.floor(slideSize);
541
+
542
+ if (slides[i]) {
543
+ if (swiper.isHorizontal()) {
544
+ slides[i].style.width = `${slideSize}px`;
545
+ } else {
546
+ slides[i].style.height = `${slideSize}px`;
547
+ }
548
+ }
549
+ }
550
+ if (slides[i]) {
551
+ slides[i].swiperSlideSize = slideSize;
552
+ }
553
+ slidesSizesGrid.push(slideSize);
554
+
555
+
556
+ if (params.centeredSlides) {
557
+ slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
558
+ if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
559
+ if (i === 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
560
+ if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
561
+ if (params.roundLengths) slidePosition = Math.floor(slidePosition);
562
+ if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
563
+ slidesGrid.push(slidePosition);
564
+ } else {
565
+ if (params.roundLengths) slidePosition = Math.floor(slidePosition);
566
+ if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
567
+ slidesGrid.push(slidePosition);
568
+ slidePosition = slidePosition + slideSize + spaceBetween;
569
+ }
570
+
571
+ swiper.virtualSize += slideSize + spaceBetween;
572
+
573
+ prevSlideSize = slideSize;
574
+
575
+ index$$1 += 1;
576
+ }
577
+ swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
578
+ let newSlidesGrid;
579
+
580
+ if (
581
+ rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
582
+ $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
583
+ }
584
+ if (!Support.flexbox || params.setWrapperSize) {
585
+ if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
586
+ else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
587
+ }
588
+
589
+ if (params.slidesPerColumn > 1) {
590
+ swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
591
+ swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
592
+ if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
593
+ else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
594
+ if (params.centeredSlides) {
595
+ newSlidesGrid = [];
596
+ for (let i = 0; i < snapGrid.length; i += 1) {
597
+ let slidesGridItem = snapGrid[i];
598
+ if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
599
+ if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);
600
+ }
601
+ snapGrid = newSlidesGrid;
602
+ }
603
+ }
604
+
605
+ // Remove last grid elements depending on width
606
+ if (!params.centeredSlides) {
607
+ newSlidesGrid = [];
608
+ for (let i = 0; i < snapGrid.length; i += 1) {
609
+ let slidesGridItem = snapGrid[i];
610
+ if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
611
+ if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
612
+ newSlidesGrid.push(slidesGridItem);
613
+ }
614
+ }
615
+ snapGrid = newSlidesGrid;
616
+ if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
617
+ snapGrid.push(swiper.virtualSize - swiperSize);
618
+ }
619
+ }
620
+ if (snapGrid.length === 0) snapGrid = [0];
621
+
622
+ if (params.spaceBetween !== 0) {
623
+ if (swiper.isHorizontal()) {
624
+ if (rtl) slides.css({ marginLeft: `${spaceBetween}px` });
625
+ else slides.css({ marginRight: `${spaceBetween}px` });
626
+ } else slides.css({ marginBottom: `${spaceBetween}px` });
627
+ }
628
+
629
+ Utils.extend(swiper, {
630
+ slides,
631
+ snapGrid,
632
+ slidesGrid,
633
+ slidesSizesGrid,
634
+ });
635
+
636
+ if (slidesLength !== previousSlidesLength) {
637
+ swiper.emit('slidesLengthChange');
638
+ }
639
+ if (snapGrid.length !== previousSnapGridLength) {
640
+ if (swiper.params.watchOverflow) swiper.checkOverflow();
641
+ swiper.emit('snapGridLengthChange');
642
+ }
643
+ if (slidesGrid.length !== previousSlidesGridLength) {
644
+ swiper.emit('slidesGridLengthChange');
645
+ }
646
+
647
+ if (params.watchSlidesProgress || params.watchSlidesVisibility) {
648
+ swiper.updateSlidesOffset();
649
+ }
650
+ }
651
+
652
+ function updateAutoHeight (speed) {
653
+ const swiper = this;
654
+ const activeSlides = [];
655
+ let newHeight = 0;
656
+ let i;
657
+ if (typeof speed === 'number') {
658
+ swiper.setTransition(speed);
659
+ } else if (speed === true) {
660
+ swiper.setTransition(swiper.params.speed);
661
+ }
662
+ // Find slides currently in view
663
+ if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
664
+ for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
665
+ const index$$1 = swiper.activeIndex + i;
666
+ if (index$$1 > swiper.slides.length) break;
667
+ activeSlides.push(swiper.slides.eq(index$$1)[0]);
668
+ }
669
+ } else {
670
+ activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
671
+ }
672
+
673
+ // Find new height from highest slide in view
674
+ for (i = 0; i < activeSlides.length; i += 1) {
675
+ if (typeof activeSlides[i] !== 'undefined') {
676
+ const height = activeSlides[i].offsetHeight;
677
+ newHeight = height > newHeight ? height : newHeight;
678
+ }
679
+ }
680
+
681
+ // Update Height
682
+ if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);
683
+ }
684
+
685
+ function updateSlidesOffset () {
686
+ const swiper = this;
687
+ const slides = swiper.slides;
688
+ for (let i = 0; i < slides.length; i += 1) {
689
+ slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
690
+ }
691
+ }
692
+
693
+ function updateSlidesProgress (translate = (this && this.translate) || 0) {
694
+ const swiper = this;
695
+ const params = swiper.params;
696
+
697
+ const { slides, rtlTranslate: rtl } = swiper;
698
+
699
+ if (slides.length === 0) return;
700
+ if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
701
+
702
+ let offsetCenter = -translate;
703
+ if (rtl) offsetCenter = translate;
704
+
705
+ // Visible Slides
706
+ slides.removeClass(params.slideVisibleClass);
707
+
708
+ for (let i = 0; i < slides.length; i += 1) {
709
+ const slide = slides[i];
710
+ const slideProgress =
711
+ (
712
+ (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
713
+ ) / (slide.swiperSlideSize + params.spaceBetween);
714
+ if (params.watchSlidesVisibility) {
715
+ const slideBefore = -(offsetCenter - slide.swiperSlideOffset);
716
+ const slideAfter = slideBefore + swiper.slidesSizesGrid[i];
717
+ const isVisible =
718
+ (slideBefore >= 0 && slideBefore < swiper.size) ||
719
+ (slideAfter > 0 && slideAfter <= swiper.size) ||
720
+ (slideBefore <= 0 && slideAfter >= swiper.size);
721
+ if (isVisible) {
722
+ slides.eq(i).addClass(params.slideVisibleClass);
723
+ }
724
+ }
725
+ slide.progress = rtl ? -slideProgress : slideProgress;
726
+ }
727
+ }
728
+
729
+ function updateProgress (translate = (this && this.translate) || 0) {
730
+ const swiper = this;
731
+ const params = swiper.params;
732
+
733
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
734
+ let { progress, isBeginning, isEnd } = swiper;
735
+ const wasBeginning = isBeginning;
736
+ const wasEnd = isEnd;
737
+ if (translatesDiff === 0) {
738
+ progress = 0;
739
+ isBeginning = true;
740
+ isEnd = true;
741
+ } else {
742
+ progress = (translate - swiper.minTranslate()) / (translatesDiff);
743
+ isBeginning = progress <= 0;
744
+ isEnd = progress >= 1;
745
+ }
746
+ Utils.extend(swiper, {
747
+ progress,
748
+ isBeginning,
749
+ isEnd,
750
+ });
751
+
752
+ if (params.watchSlidesProgress || params.watchSlidesVisibility) swiper.updateSlidesProgress(translate);
753
+
754
+ if (isBeginning && !wasBeginning) {
755
+ swiper.emit('reachBeginning toEdge');
756
+ }
757
+ if (isEnd && !wasEnd) {
758
+ swiper.emit('reachEnd toEdge');
759
+ }
760
+ if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
761
+ swiper.emit('fromEdge');
762
+ }
763
+
764
+ swiper.emit('progress', progress);
765
+ }
766
+
767
+ function updateSlidesClasses () {
768
+ const swiper = this;
769
+
770
+ const {
771
+ slides, params, $wrapperEl, activeIndex, realIndex,
772
+ } = swiper;
773
+ const isVirtual = swiper.virtual && params.virtual.enabled;
774
+
775
+ slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);
776
+
777
+ let activeSlide;
778
+ if (isVirtual) {
779
+ activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`);
780
+ } else {
781
+ activeSlide = slides.eq(activeIndex);
782
+ }
783
+
784
+ // Active classes
785
+ activeSlide.addClass(params.slideActiveClass);
786
+
787
+ if (params.loop) {
788
+ // Duplicate to all looped slides
789
+ if (activeSlide.hasClass(params.slideDuplicateClass)) {
790
+ $wrapperEl
791
+ .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`)
792
+ .addClass(params.slideDuplicateActiveClass);
793
+ } else {
794
+ $wrapperEl
795
+ .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`)
796
+ .addClass(params.slideDuplicateActiveClass);
797
+ }
798
+ }
799
+ // Next Slide
800
+ let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);
801
+ if (params.loop && nextSlide.length === 0) {
802
+ nextSlide = slides.eq(0);
803
+ nextSlide.addClass(params.slideNextClass);
804
+ }
805
+ // Prev Slide
806
+ let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);
807
+ if (params.loop && prevSlide.length === 0) {
808
+ prevSlide = slides.eq(-1);
809
+ prevSlide.addClass(params.slidePrevClass);
810
+ }
811
+ if (params.loop) {
812
+ // Duplicate to all looped slides
813
+ if (nextSlide.hasClass(params.slideDuplicateClass)) {
814
+ $wrapperEl
815
+ .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
816
+ .addClass(params.slideDuplicateNextClass);
817
+ } else {
818
+ $wrapperEl
819
+ .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
820
+ .addClass(params.slideDuplicateNextClass);
821
+ }
822
+ if (prevSlide.hasClass(params.slideDuplicateClass)) {
823
+ $wrapperEl
824
+ .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
825
+ .addClass(params.slideDuplicatePrevClass);
826
+ } else {
827
+ $wrapperEl
828
+ .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
829
+ .addClass(params.slideDuplicatePrevClass);
830
+ }
831
+ }
832
+ }
833
+
834
+ function updateActiveIndex (newActiveIndex) {
835
+ const swiper = this;
836
+ const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
837
+ const {
838
+ slidesGrid, snapGrid, params, activeIndex: previousIndex, realIndex: previousRealIndex, snapIndex: previousSnapIndex,
839
+ } = swiper;
840
+ let activeIndex = newActiveIndex;
841
+ let snapIndex;
842
+ if (typeof activeIndex === 'undefined') {
843
+ for (let i = 0; i < slidesGrid.length; i += 1) {
844
+ if (typeof slidesGrid[i + 1] !== 'undefined') {
845
+ if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
846
+ activeIndex = i;
847
+ } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
848
+ activeIndex = i + 1;
849
+ }
850
+ } else if (translate >= slidesGrid[i]) {
851
+ activeIndex = i;
852
+ }
853
+ }
854
+ // Normalize slideIndex
855
+ if (params.normalizeSlideIndex) {
856
+ if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;
857
+ }
858
+ }
859
+ if (snapGrid.indexOf(translate) >= 0) {
860
+ snapIndex = snapGrid.indexOf(translate);
861
+ } else {
862
+ snapIndex = Math.floor(activeIndex / params.slidesPerGroup);
863
+ }
864
+ if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
865
+ if (activeIndex === previousIndex) {
866
+ if (snapIndex !== previousSnapIndex) {
867
+ swiper.snapIndex = snapIndex;
868
+ swiper.emit('snapIndexChange');
869
+ }
870
+ return;
871
+ }
872
+
873
+ // Get real index
874
+ const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
875
+
876
+ Utils.extend(swiper, {
877
+ snapIndex,
878
+ realIndex,
879
+ previousIndex,
880
+ activeIndex,
881
+ });
882
+ swiper.emit('activeIndexChange');
883
+ swiper.emit('snapIndexChange');
884
+ if (previousRealIndex !== realIndex) {
885
+ swiper.emit('realIndexChange');
886
+ }
887
+ swiper.emit('slideChange');
888
+ }
889
+
890
+ function updateClickedSlide (e) {
891
+ const swiper = this;
892
+ const params = swiper.params;
893
+ const slide = $(e.target).closest(`.${params.slideClass}`)[0];
894
+ let slideFound = false;
895
+ if (slide) {
896
+ for (let i = 0; i < swiper.slides.length; i += 1) {
897
+ if (swiper.slides[i] === slide) slideFound = true;
898
+ }
899
+ }
900
+
901
+ if (slide && slideFound) {
902
+ swiper.clickedSlide = slide;
903
+ if (swiper.virtual && swiper.params.virtual.enabled) {
904
+ swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
905
+ } else {
906
+ swiper.clickedIndex = $(slide).index();
907
+ }
908
+ } else {
909
+ swiper.clickedSlide = undefined;
910
+ swiper.clickedIndex = undefined;
911
+ return;
912
+ }
913
+ if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
914
+ swiper.slideToClickedSlide();
915
+ }
916
+ }
917
+
918
+ var update = {
919
+ updateSize,
920
+ updateSlides,
921
+ updateAutoHeight,
922
+ updateSlidesOffset,
923
+ updateSlidesProgress,
924
+ updateProgress,
925
+ updateSlidesClasses,
926
+ updateActiveIndex,
927
+ updateClickedSlide,
928
+ };
929
+
930
+ function getTranslate (axis = this.isHorizontal() ? 'x' : 'y') {
931
+ const swiper = this;
932
+
933
+ const {
934
+ params, rtlTranslate: rtl, translate, $wrapperEl,
935
+ } = swiper;
936
+
937
+ if (params.virtualTranslate) {
938
+ return rtl ? -translate : translate;
939
+ }
940
+
941
+ let currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
942
+ if (rtl) currentTranslate = -currentTranslate;
943
+
944
+ return currentTranslate || 0;
945
+ }
946
+
947
+ function setTranslate (translate, byController) {
948
+ const swiper = this;
949
+ const {
950
+ rtlTranslate: rtl, params, $wrapperEl, progress,
951
+ } = swiper;
952
+ let x = 0;
953
+ let y = 0;
954
+ const z = 0;
955
+
956
+ if (swiper.isHorizontal()) {
957
+ x = rtl ? -translate : translate;
958
+ } else {
959
+ y = translate;
960
+ }
961
+
962
+ if (params.roundLengths) {
963
+ x = Math.floor(x);
964
+ y = Math.floor(y);
965
+ }
966
+
967
+ if (!params.virtualTranslate) {
968
+ if (Support.transforms3d) $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);
969
+ else $wrapperEl.transform(`translate(${x}px, ${y}px)`);
970
+ }
971
+ swiper.previousTranslate = swiper.translate;
972
+ swiper.translate = swiper.isHorizontal() ? x : y;
973
+
974
+ // Check if we need to update progress
975
+ let newProgress;
976
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
977
+ if (translatesDiff === 0) {
978
+ newProgress = 0;
979
+ } else {
980
+ newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
981
+ }
982
+ if (newProgress !== progress) {
983
+ swiper.updateProgress(translate);
984
+ }
985
+
986
+ swiper.emit('setTranslate', swiper.translate, byController);
987
+ }
988
+
989
+ function minTranslate () {
990
+ return (-this.snapGrid[0]);
991
+ }
992
+
993
+ function maxTranslate () {
994
+ return (-this.snapGrid[this.snapGrid.length - 1]);
995
+ }
996
+
997
+ var translate = {
998
+ getTranslate,
999
+ setTranslate,
1000
+ minTranslate,
1001
+ maxTranslate,
1002
+ };
1003
+
1004
+ function setTransition (duration, byController) {
1005
+ const swiper = this;
1006
+
1007
+ swiper.$wrapperEl.transition(duration);
1008
+
1009
+ swiper.emit('setTransition', duration, byController);
1010
+ }
1011
+
1012
+ function transitionStart (runCallbacks = true, direction) {
1013
+ const swiper = this;
1014
+ const { activeIndex, params, previousIndex } = swiper;
1015
+ if (params.autoHeight) {
1016
+ swiper.updateAutoHeight();
1017
+ }
1018
+
1019
+ let dir = direction;
1020
+ if (!dir) {
1021
+ if (activeIndex > previousIndex) dir = 'next';
1022
+ else if (activeIndex < previousIndex) dir = 'prev';
1023
+ else dir = 'reset';
1024
+ }
1025
+
1026
+ swiper.emit('transitionStart');
1027
+
1028
+ if (runCallbacks && activeIndex !== previousIndex) {
1029
+ if (dir === 'reset') {
1030
+ swiper.emit('slideResetTransitionStart');
1031
+ return;
1032
+ }
1033
+ swiper.emit('slideChangeTransitionStart');
1034
+ if (dir === 'next') {
1035
+ swiper.emit('slideNextTransitionStart');
1036
+ } else {
1037
+ swiper.emit('slidePrevTransitionStart');
1038
+ }
1039
+ }
1040
+ }
1041
+
1042
+ function transitionEnd$1 (runCallbacks = true, direction) {
1043
+ const swiper = this;
1044
+ const { activeIndex, previousIndex } = swiper;
1045
+ swiper.animating = false;
1046
+ swiper.setTransition(0);
1047
+
1048
+ let dir = direction;
1049
+ if (!dir) {
1050
+ if (activeIndex > previousIndex) dir = 'next';
1051
+ else if (activeIndex < previousIndex) dir = 'prev';
1052
+ else dir = 'reset';
1053
+ }
1054
+
1055
+ swiper.emit('transitionEnd');
1056
+
1057
+ if (runCallbacks && activeIndex !== previousIndex) {
1058
+ if (dir === 'reset') {
1059
+ swiper.emit('slideResetTransitionEnd');
1060
+ return;
1061
+ }
1062
+ swiper.emit('slideChangeTransitionEnd');
1063
+ if (dir === 'next') {
1064
+ swiper.emit('slideNextTransitionEnd');
1065
+ } else {
1066
+ swiper.emit('slidePrevTransitionEnd');
1067
+ }
1068
+ }
1069
+ }
1070
+
1071
+ var transition$1 = {
1072
+ setTransition,
1073
+ transitionStart,
1074
+ transitionEnd: transitionEnd$1,
1075
+ };
1076
+
1077
+ function slideTo (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) {
1078
+ const swiper = this;
1079
+ let slideIndex = index$$1;
1080
+ if (slideIndex < 0) slideIndex = 0;
1081
+
1082
+ const {
1083
+ params, snapGrid, slidesGrid, previousIndex, activeIndex, rtlTranslate: rtl,
1084
+ } = swiper;
1085
+ if (swiper.animating && params.preventIntercationOnTransition) {
1086
+ return false;
1087
+ }
1088
+
1089
+ let snapIndex = Math.floor(slideIndex / params.slidesPerGroup);
1090
+ if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1091
+
1092
+ if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
1093
+ swiper.emit('beforeSlideChangeStart');
1094
+ }
1095
+
1096
+ const translate = -snapGrid[snapIndex];
1097
+
1098
+ // Update progress
1099
+ swiper.updateProgress(translate);
1100
+
1101
+ // Normalize slideIndex
1102
+ if (params.normalizeSlideIndex) {
1103
+ for (let i = 0; i < slidesGrid.length; i += 1) {
1104
+ if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
1105
+ slideIndex = i;
1106
+ }
1107
+ }
1108
+ }
1109
+ // Directions locks
1110
+ if (swiper.initialized && slideIndex !== activeIndex) {
1111
+ if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
1112
+ return false;
1113
+ }
1114
+ if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
1115
+ if ((activeIndex || 0) !== slideIndex) return false;
1116
+ }
1117
+ }
1118
+
1119
+ let direction;
1120
+ if (slideIndex > activeIndex) direction = 'next';
1121
+ else if (slideIndex < activeIndex) direction = 'prev';
1122
+ else direction = 'reset';
1123
+
1124
+
1125
+ // Update Index
1126
+ if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
1127
+ swiper.updateActiveIndex(slideIndex);
1128
+ // Update Height
1129
+ if (params.autoHeight) {
1130
+ swiper.updateAutoHeight();
1131
+ }
1132
+ swiper.updateSlidesClasses();
1133
+ if (params.effect !== 'slide') {
1134
+ swiper.setTranslate(translate);
1135
+ }
1136
+ if (direction !== 'reset') {
1137
+ swiper.transitionStart(runCallbacks, direction);
1138
+ swiper.transitionEnd(runCallbacks, direction);
1139
+ }
1140
+ return false;
1141
+ }
1142
+
1143
+ if (speed === 0 || !Support.transition) {
1144
+ swiper.setTransition(0);
1145
+ swiper.setTranslate(translate);
1146
+ swiper.updateActiveIndex(slideIndex);
1147
+ swiper.updateSlidesClasses();
1148
+ swiper.emit('beforeTransitionStart', speed, internal);
1149
+ swiper.transitionStart(runCallbacks, direction);
1150
+ swiper.transitionEnd(runCallbacks, direction);
1151
+ } else {
1152
+ swiper.setTransition(speed);
1153
+ swiper.setTranslate(translate);
1154
+ swiper.updateActiveIndex(slideIndex);
1155
+ swiper.updateSlidesClasses();
1156
+ swiper.emit('beforeTransitionStart', speed, internal);
1157
+ swiper.transitionStart(runCallbacks, direction);
1158
+ if (!swiper.animating) {
1159
+ swiper.animating = true;
1160
+ if (!swiper.onSlideToWrapperTransitionEnd) {
1161
+ swiper.onSlideToWrapperTransitionEnd = function transitionEnd$$1(e) {
1162
+ if (!swiper || swiper.destroyed) return;
1163
+ if (e.target !== this) return;
1164
+ swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1165
+ swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
1166
+ swiper.transitionEnd(runCallbacks, direction);
1167
+ };
1168
+ }
1169
+ swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1170
+ swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
1171
+ }
1172
+ }
1173
+
1174
+ return true;
1175
+ }
1176
+
1177
+ function slideToLoop (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) {
1178
+ const swiper = this;
1179
+ let newIndex = index$$1;
1180
+ if (swiper.params.loop) {
1181
+ newIndex += swiper.loopedSlides;
1182
+ }
1183
+
1184
+ return swiper.slideTo(newIndex, speed, runCallbacks, internal);
1185
+ }
1186
+
1187
+ /* eslint no-unused-vars: "off" */
1188
+ function slideNext (speed = this.params.speed, runCallbacks = true, internal) {
1189
+ const swiper = this;
1190
+ const { params, animating } = swiper;
1191
+ if (params.loop) {
1192
+ if (animating) return false;
1193
+ swiper.loopFix();
1194
+ // eslint-disable-next-line
1195
+ swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
1196
+ return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
1197
+ }
1198
+ return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
1199
+ }
1200
+
1201
+ /* eslint no-unused-vars: "off" */
1202
+ function slidePrev (speed = this.params.speed, runCallbacks = true, internal) {
1203
+ const swiper = this;
1204
+ const {
1205
+ params, animating, snapGrid, slidesGrid, rtlTranslate,
1206
+ } = swiper;
1207
+
1208
+ if (params.loop) {
1209
+ if (animating) return false;
1210
+ swiper.loopFix();
1211
+ // eslint-disable-next-line
1212
+ swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
1213
+ }
1214
+ const translate = rtlTranslate ? swiper.translate : -swiper.translate;
1215
+ function normalize(val) {
1216
+ if (val < 0) return -Math.floor(Math.abs(val));
1217
+ return Math.floor(val);
1218
+ }
1219
+ const normalizedTranslate = normalize(translate);
1220
+ const normalizedSnapGrid = snapGrid.map(val => normalize(val));
1221
+ const normalizedSlidesGrid = slidesGrid.map(val => normalize(val));
1222
+
1223
+ const currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
1224
+ const prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
1225
+ let prevIndex;
1226
+ if (typeof prevSnap !== 'undefined') {
1227
+ prevIndex = slidesGrid.indexOf(prevSnap);
1228
+ if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;
1229
+ }
1230
+ return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
1231
+ }
1232
+
1233
+ /* eslint no-unused-vars: "off" */
1234
+ function slideReset (speed = this.params.speed, runCallbacks = true, internal) {
1235
+ const swiper = this;
1236
+ return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
1237
+ }
1238
+
1239
+ /* eslint no-unused-vars: "off" */
1240
+ function slideToClosest (speed = this.params.speed, runCallbacks = true, internal) {
1241
+ const swiper = this;
1242
+ let index$$1 = swiper.activeIndex;
1243
+ const snapIndex = Math.floor(index$$1 / swiper.params.slidesPerGroup);
1244
+
1245
+ if (snapIndex < swiper.snapGrid.length - 1) {
1246
+ const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1247
+
1248
+ const currentSnap = swiper.snapGrid[snapIndex];
1249
+ const nextSnap = swiper.snapGrid[snapIndex + 1];
1250
+
1251
+ if ((translate - currentSnap) > (nextSnap - currentSnap) / 2) {
1252
+ index$$1 = swiper.params.slidesPerGroup;
1253
+ }
1254
+ }
1255
+
1256
+ return swiper.slideTo(index$$1, speed, runCallbacks, internal);
1257
+ }
1258
+
1259
+ function slideToClickedSlide () {
1260
+ const swiper = this;
1261
+ const { params, $wrapperEl } = swiper;
1262
+
1263
+ const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
1264
+ let slideToIndex = swiper.clickedIndex;
1265
+ let realIndex;
1266
+ if (params.loop) {
1267
+ if (swiper.animating) return;
1268
+ realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
1269
+ if (params.centeredSlides) {
1270
+ if (
1271
+ (slideToIndex < swiper.loopedSlides - (slidesPerView / 2)) ||
1272
+ (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
1273
+ ) {
1274
+ swiper.loopFix();
1275
+ slideToIndex = $wrapperEl
1276
+ .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
1277
+ .eq(0)
1278
+ .index();
1279
+
1280
+ Utils.nextTick(() => {
1281
+ swiper.slideTo(slideToIndex);
1282
+ });
1283
+ } else {
1284
+ swiper.slideTo(slideToIndex);
1285
+ }
1286
+ } else if (slideToIndex > swiper.slides.length - slidesPerView) {
1287
+ swiper.loopFix();
1288
+ slideToIndex = $wrapperEl
1289
+ .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
1290
+ .eq(0)
1291
+ .index();
1292
+
1293
+ Utils.nextTick(() => {
1294
+ swiper.slideTo(slideToIndex);
1295
+ });
1296
+ } else {
1297
+ swiper.slideTo(slideToIndex);
1298
+ }
1299
+ } else {
1300
+ swiper.slideTo(slideToIndex);
1301
+ }
1302
+ }
1303
+
1304
+ var slide = {
1305
+ slideTo,
1306
+ slideToLoop,
1307
+ slideNext,
1308
+ slidePrev,
1309
+ slideReset,
1310
+ slideToClosest,
1311
+ slideToClickedSlide,
1312
+ };
1313
+
1314
+ function loopCreate () {
1315
+ const swiper = this;
1316
+ const { params, $wrapperEl } = swiper;
1317
+ // Remove duplicated slides
1318
+ $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
1319
+
1320
+ let slides = $wrapperEl.children(`.${params.slideClass}`);
1321
+
1322
+ if (params.loopFillGroupWithBlank) {
1323
+ const blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
1324
+ if (blankSlidesNum !== params.slidesPerGroup) {
1325
+ for (let i = 0; i < blankSlidesNum; i += 1) {
1326
+ const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);
1327
+ $wrapperEl.append(blankNode);
1328
+ }
1329
+ slides = $wrapperEl.children(`.${params.slideClass}`);
1330
+ }
1331
+ }
1332
+
1333
+ if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;
1334
+
1335
+ swiper.loopedSlides = parseInt(params.loopedSlides || params.slidesPerView, 10);
1336
+ swiper.loopedSlides += params.loopAdditionalSlides;
1337
+ if (swiper.loopedSlides > slides.length) {
1338
+ swiper.loopedSlides = slides.length;
1339
+ }
1340
+
1341
+ const prependSlides = [];
1342
+ const appendSlides = [];
1343
+ slides.each((index$$1, el) => {
1344
+ const slide = $(el);
1345
+ if (index$$1 < swiper.loopedSlides) appendSlides.push(el);
1346
+ if (index$$1 < slides.length && index$$1 >= slides.length - swiper.loopedSlides) prependSlides.push(el);
1347
+ slide.attr('data-swiper-slide-index', index$$1);
1348
+ });
1349
+ for (let i = 0; i < appendSlides.length; i += 1) {
1350
+ $wrapperEl.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
1351
+ }
1352
+ for (let i = prependSlides.length - 1; i >= 0; i -= 1) {
1353
+ $wrapperEl.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
1354
+ }
1355
+ }
1356
+
1357
+ function loopFix () {
1358
+ const swiper = this;
1359
+ const {
1360
+ params, activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, snapGrid, rtlTranslate: rtl,
1361
+ } = swiper;
1362
+ let newIndex;
1363
+ swiper.allowSlidePrev = true;
1364
+ swiper.allowSlideNext = true;
1365
+
1366
+ const snapTranslate = -snapGrid[activeIndex];
1367
+ const diff = snapTranslate - swiper.getTranslate();
1368
+
1369
+
1370
+ // Fix For Negative Oversliding
1371
+ if (activeIndex < loopedSlides) {
1372
+ newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
1373
+ newIndex += loopedSlides;
1374
+ const slideChanged = swiper.slideTo(newIndex, 0, false, true);
1375
+ if (slideChanged && diff !== 0) {
1376
+ swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
1377
+ }
1378
+ } else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex >= slides.length - loopedSlides)) {
1379
+ // Fix For Positive Oversliding
1380
+ newIndex = -slides.length + activeIndex + loopedSlides;
1381
+ newIndex += loopedSlides;
1382
+ const slideChanged = swiper.slideTo(newIndex, 0, false, true);
1383
+ if (slideChanged && diff !== 0) {
1384
+ swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
1385
+ }
1386
+ }
1387
+ swiper.allowSlidePrev = allowSlidePrev;
1388
+ swiper.allowSlideNext = allowSlideNext;
1389
+ }
1390
+
1391
+ function loopDestroy () {
1392
+ const swiper = this;
1393
+ const { $wrapperEl, params, slides } = swiper;
1394
+ $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
1395
+ slides.removeAttr('data-swiper-slide-index');
1396
+ }
1397
+
1398
+ var loop = {
1399
+ loopCreate,
1400
+ loopFix,
1401
+ loopDestroy,
1402
+ };
1403
+
1404
+ function setGrabCursor (moving) {
1405
+ const swiper = this;
1406
+ if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) return;
1407
+ const el = swiper.el;
1408
+ el.style.cursor = 'move';
1409
+ el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
1410
+ el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
1411
+ el.style.cursor = moving ? 'grabbing' : 'grab';
1412
+ }
1413
+
1414
+ function unsetGrabCursor () {
1415
+ const swiper = this;
1416
+ if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) return;
1417
+ swiper.el.style.cursor = '';
1418
+ }
1419
+
1420
+ var grabCursor = {
1421
+ setGrabCursor,
1422
+ unsetGrabCursor,
1423
+ };
1424
+
1425
+ function appendSlide (slides) {
1426
+ const swiper = this;
1427
+ const { $wrapperEl, params } = swiper;
1428
+ if (params.loop) {
1429
+ swiper.loopDestroy();
1430
+ }
1431
+ if (typeof slides === 'object' && 'length' in slides) {
1432
+ for (let i = 0; i < slides.length; i += 1) {
1433
+ if (slides[i]) $wrapperEl.append(slides[i]);
1434
+ }
1435
+ } else {
1436
+ $wrapperEl.append(slides);
1437
+ }
1438
+ if (params.loop) {
1439
+ swiper.loopCreate();
1440
+ }
1441
+ if (!(params.observer && Support.observer)) {
1442
+ swiper.update();
1443
+ }
1444
+ }
1445
+
1446
+ function prependSlide (slides) {
1447
+ const swiper = this;
1448
+ const { params, $wrapperEl, activeIndex } = swiper;
1449
+
1450
+ if (params.loop) {
1451
+ swiper.loopDestroy();
1452
+ }
1453
+ let newActiveIndex = activeIndex + 1;
1454
+ if (typeof slides === 'object' && 'length' in slides) {
1455
+ for (let i = 0; i < slides.length; i += 1) {
1456
+ if (slides[i]) $wrapperEl.prepend(slides[i]);
1457
+ }
1458
+ newActiveIndex = activeIndex + slides.length;
1459
+ } else {
1460
+ $wrapperEl.prepend(slides);
1461
+ }
1462
+ if (params.loop) {
1463
+ swiper.loopCreate();
1464
+ }
1465
+ if (!(params.observer && Support.observer)) {
1466
+ swiper.update();
1467
+ }
1468
+ swiper.slideTo(newActiveIndex, 0, false);
1469
+ }
1470
+
1471
+ function addSlide (index$$1, slides) {
1472
+ const swiper = this;
1473
+ const { $wrapperEl, params, activeIndex } = swiper;
1474
+ let activeIndexBuffer = activeIndex;
1475
+ if (params.loop) {
1476
+ activeIndexBuffer -= swiper.loopedSlides;
1477
+ swiper.loopDestroy();
1478
+ swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
1479
+ }
1480
+ const baseLength = swiper.slides.length;
1481
+ if (index$$1 <= 0) {
1482
+ swiper.prependSlide(slides);
1483
+ return;
1484
+ } else if (index$$1 >= baseLength) {
1485
+ swiper.appendSlide(slides);
1486
+ return;
1487
+ }
1488
+ let newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + 1 : activeIndexBuffer;
1489
+
1490
+ const slidesBuffer = [];
1491
+ for (let i = baseLength - 1; i >= index$$1; i -= 1) {
1492
+ const currentSlide = swiper.slides.eq(i);
1493
+ currentSlide.remove();
1494
+ slidesBuffer.unshift(currentSlide);
1495
+ }
1496
+
1497
+ if (typeof slides === 'object' && 'length' in slides) {
1498
+ for (let i = 0; i < slides.length; i += 1) {
1499
+ if (slides[i]) $wrapperEl.append(slides[i]);
1500
+ }
1501
+ newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + slides.length : activeIndexBuffer;
1502
+ } else {
1503
+ $wrapperEl.append(slides);
1504
+ }
1505
+
1506
+ for (let i = 0; i < slidesBuffer.length; i += 1) {
1507
+ $wrapperEl.append(slidesBuffer[i]);
1508
+ }
1509
+
1510
+ if (params.loop) {
1511
+ swiper.loopCreate();
1512
+ }
1513
+ if (!(params.observer && Support.observer)) {
1514
+ swiper.update();
1515
+ }
1516
+ if (params.loop) {
1517
+ swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
1518
+ } else {
1519
+ swiper.slideTo(newActiveIndex, 0, false);
1520
+ }
1521
+ }
1522
+
1523
+ function removeSlide (slidesIndexes) {
1524
+ const swiper = this;
1525
+ const { params, $wrapperEl, activeIndex } = swiper;
1526
+
1527
+ let activeIndexBuffer = activeIndex;
1528
+ if (params.loop) {
1529
+ activeIndexBuffer -= swiper.loopedSlides;
1530
+ swiper.loopDestroy();
1531
+ swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
1532
+ }
1533
+ let newActiveIndex = activeIndexBuffer;
1534
+ let indexToRemove;
1535
+
1536
+ if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
1537
+ for (let i = 0; i < slidesIndexes.length; i += 1) {
1538
+ indexToRemove = slidesIndexes[i];
1539
+ if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
1540
+ if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
1541
+ }
1542
+ newActiveIndex = Math.max(newActiveIndex, 0);
1543
+ } else {
1544
+ indexToRemove = slidesIndexes;
1545
+ if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
1546
+ if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
1547
+ newActiveIndex = Math.max(newActiveIndex, 0);
1548
+ }
1549
+
1550
+ if (params.loop) {
1551
+ swiper.loopCreate();
1552
+ }
1553
+
1554
+ if (!(params.observer && Support.observer)) {
1555
+ swiper.update();
1556
+ }
1557
+ if (params.loop) {
1558
+ swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
1559
+ } else {
1560
+ swiper.slideTo(newActiveIndex, 0, false);
1561
+ }
1562
+ }
1563
+
1564
+ function removeAllSlides () {
1565
+ const swiper = this;
1566
+
1567
+ const slidesIndexes = [];
1568
+ for (let i = 0; i < swiper.slides.length; i += 1) {
1569
+ slidesIndexes.push(i);
1570
+ }
1571
+ swiper.removeSlide(slidesIndexes);
1572
+ }
1573
+
1574
+ var manipulation = {
1575
+ appendSlide,
1576
+ prependSlide,
1577
+ addSlide,
1578
+ removeSlide,
1579
+ removeAllSlides,
1580
+ };
1581
+
1582
+ const Device = (function Device() {
1583
+ const ua = window.navigator.userAgent;
1584
+
1585
+ const device = {
1586
+ ios: false,
1587
+ android: false,
1588
+ androidChrome: false,
1589
+ desktop: false,
1590
+ windows: false,
1591
+ iphone: false,
1592
+ ipod: false,
1593
+ ipad: false,
1594
+ cordova: window.cordova || window.phonegap,
1595
+ phonegap: window.cordova || window.phonegap,
1596
+ };
1597
+
1598
+ const windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); // eslint-disable-line
1599
+ const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
1600
+ const ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
1601
+ const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
1602
+ const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
1603
+
1604
+
1605
+ // Windows
1606
+ if (windows) {
1607
+ device.os = 'windows';
1608
+ device.osVersion = windows[2];
1609
+ device.windows = true;
1610
+ }
1611
+ // Android
1612
+ if (android && !windows) {
1613
+ device.os = 'android';
1614
+ device.osVersion = android[2];
1615
+ device.android = true;
1616
+ device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
1617
+ }
1618
+ if (ipad || iphone || ipod) {
1619
+ device.os = 'ios';
1620
+ device.ios = true;
1621
+ }
1622
+ // iOS
1623
+ if (iphone && !ipod) {
1624
+ device.osVersion = iphone[2].replace(/_/g, '.');
1625
+ device.iphone = true;
1626
+ }
1627
+ if (ipad) {
1628
+ device.osVersion = ipad[2].replace(/_/g, '.');
1629
+ device.ipad = true;
1630
+ }
1631
+ if (ipod) {
1632
+ device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
1633
+ device.iphone = true;
1634
+ }
1635
+ // iOS 8+ changed UA
1636
+ if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
1637
+ if (device.osVersion.split('.')[0] === '10') {
1638
+ device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
1639
+ }
1640
+ }
1641
+
1642
+ // Desktop
1643
+ device.desktop = !(device.os || device.android || device.webView);
1644
+
1645
+ // Webview
1646
+ device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);
1647
+
1648
+ // Minimal UI
1649
+ if (device.os && device.os === 'ios') {
1650
+ const osVersionArr = device.osVersion.split('.');
1651
+ const metaViewport = document.querySelector('meta[name="viewport"]');
1652
+ device.minimalUi =
1653
+ !device.webView &&
1654
+ (ipod || iphone) &&
1655
+ (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7) &&
1656
+ metaViewport && metaViewport.getAttribute('content').indexOf('minimal-ui') >= 0;
1657
+ }
1658
+
1659
+ // Pixel Ratio
1660
+ device.pixelRatio = window.devicePixelRatio || 1;
1661
+
1662
+ // Export object
1663
+ return device;
1664
+ }());
1665
+
1666
+ function onTouchStart (event) {
1667
+ const swiper = this;
1668
+ const data$$1 = swiper.touchEventsData;
1669
+ const { params, touches } = swiper;
1670
+ if (swiper.animating && params.preventIntercationOnTransition) {
1671
+ return;
1672
+ }
1673
+ let e = event;
1674
+ if (e.originalEvent) e = e.originalEvent;
1675
+ data$$1.isTouchEvent = e.type === 'touchstart';
1676
+ if (!data$$1.isTouchEvent && 'which' in e && e.which === 3) return;
1677
+ if (data$$1.isTouched && data$$1.isMoved) return;
1678
+ if (params.noSwiping && $(e.target).closest(params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`)[0]) {
1679
+ swiper.allowClick = true;
1680
+ return;
1681
+ }
1682
+ if (params.swipeHandler) {
1683
+ if (!$(e).closest(params.swipeHandler)[0]) return;
1684
+ }
1685
+
1686
+ touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
1687
+ touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
1688
+ const startX = touches.currentX;
1689
+ const startY = touches.currentY;
1690
+
1691
+ // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
1692
+
1693
+ if (
1694
+ Device.ios &&
1695
+ !Device.cordova &&
1696
+ params.iOSEdgeSwipeDetection &&
1697
+ ((startX <= params.iOSEdgeSwipeThreshold) ||
1698
+ (startX >= window.screen.width - params.iOSEdgeSwipeThreshold))
1699
+ ) {
1700
+ return;
1701
+ }
1702
+
1703
+ Utils.extend(data$$1, {
1704
+ isTouched: true,
1705
+ isMoved: false,
1706
+ allowTouchCallbacks: true,
1707
+ isScrolling: undefined,
1708
+ startMoving: undefined,
1709
+ });
1710
+
1711
+ touches.startX = startX;
1712
+ touches.startY = startY;
1713
+ data$$1.touchStartTime = Utils.now();
1714
+ swiper.allowClick = true;
1715
+ swiper.updateSize();
1716
+ swiper.swipeDirection = undefined;
1717
+ if (params.threshold > 0) data$$1.allowThresholdMove = false;
1718
+ if (e.type !== 'touchstart') {
1719
+ let preventDefault = true;
1720
+ if ($(e.target).is(data$$1.formElements)) preventDefault = false;
1721
+ if (
1722
+ document.activeElement &&
1723
+ $(document.activeElement).is(data$$1.formElements) &&
1724
+ document.activeElement !== e.target
1725
+ ) {
1726
+ document.activeElement.blur();
1727
+ }
1728
+ if (preventDefault && swiper.allowTouchMove) {
1729
+ e.preventDefault();
1730
+ }
1731
+ }
1732
+ swiper.emit('touchStart', e);
1733
+ }
1734
+
1735
+ function onTouchMove (event) {
1736
+ const swiper = this;
1737
+ const data$$1 = swiper.touchEventsData;
1738
+ const { params, touches, rtlTranslate: rtl } = swiper;
1739
+ let e = event;
1740
+ if (e.originalEvent) e = e.originalEvent;
1741
+ if (!data$$1.isTouched) {
1742
+ if (data$$1.startMoving && data$$1.isScrolling) {
1743
+ swiper.emit('touchMoveOpposite', e);
1744
+ }
1745
+ return;
1746
+ }
1747
+ if (data$$1.isTouchEvent && e.type === 'mousemove') return;
1748
+ const pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
1749
+ const pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
1750
+ if (e.preventedByNestedSwiper) {
1751
+ touches.startX = pageX;
1752
+ touches.startY = pageY;
1753
+ return;
1754
+ }
1755
+ if (!swiper.allowTouchMove) {
1756
+ // isMoved = true;
1757
+ swiper.allowClick = false;
1758
+ if (data$$1.isTouched) {
1759
+ Utils.extend(touches, {
1760
+ startX: pageX,
1761
+ startY: pageY,
1762
+ currentX: pageX,
1763
+ currentY: pageY,
1764
+ });
1765
+ data$$1.touchStartTime = Utils.now();
1766
+ }
1767
+ return;
1768
+ }
1769
+ if (data$$1.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
1770
+ if (swiper.isVertical()) {
1771
+ // Vertical
1772
+ if (
1773
+ (pageY < touches.startY && swiper.translate <= swiper.maxTranslate()) ||
1774
+ (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
1775
+ ) {
1776
+ data$$1.isTouched = false;
1777
+ data$$1.isMoved = false;
1778
+ return;
1779
+ }
1780
+ } else if (
1781
+ (pageX < touches.startX && swiper.translate <= swiper.maxTranslate()) ||
1782
+ (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
1783
+ ) {
1784
+ return;
1785
+ }
1786
+ }
1787
+ if (data$$1.isTouchEvent && document.activeElement) {
1788
+ if (e.target === document.activeElement && $(e.target).is(data$$1.formElements)) {
1789
+ data$$1.isMoved = true;
1790
+ swiper.allowClick = false;
1791
+ return;
1792
+ }
1793
+ }
1794
+ if (data$$1.allowTouchCallbacks) {
1795
+ swiper.emit('touchMove', e);
1796
+ }
1797
+ if (e.targetTouches && e.targetTouches.length > 1) return;
1798
+
1799
+ touches.currentX = pageX;
1800
+ touches.currentY = pageY;
1801
+
1802
+ const diffX = touches.currentX - touches.startX;
1803
+ const diffY = touches.currentY - touches.startY;
1804
+
1805
+ if (typeof data$$1.isScrolling === 'undefined') {
1806
+ let touchAngle;
1807
+ if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
1808
+ data$$1.isScrolling = false;
1809
+ } else {
1810
+ // eslint-disable-next-line
1811
+ if ((diffX * diffX) + (diffY * diffY) >= 25) {
1812
+ touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
1813
+ data$$1.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
1814
+ }
1815
+ }
1816
+ }
1817
+ if (data$$1.isScrolling) {
1818
+ swiper.emit('touchMoveOpposite', e);
1819
+ }
1820
+ if (typeof startMoving === 'undefined') {
1821
+ if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
1822
+ data$$1.startMoving = true;
1823
+ }
1824
+ }
1825
+ if (data$$1.isScrolling) {
1826
+ data$$1.isTouched = false;
1827
+ return;
1828
+ }
1829
+ if (!data$$1.startMoving) {
1830
+ return;
1831
+ }
1832
+ swiper.allowClick = false;
1833
+ e.preventDefault();
1834
+ if (params.touchMoveStopPropagation && !params.nested) {
1835
+ e.stopPropagation();
1836
+ }
1837
+
1838
+ if (!data$$1.isMoved) {
1839
+ if (params.loop) {
1840
+ swiper.loopFix();
1841
+ }
1842
+ data$$1.startTranslate = swiper.getTranslate();
1843
+ swiper.setTransition(0);
1844
+ if (swiper.animating) {
1845
+ swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
1846
+ }
1847
+ data$$1.allowMomentumBounce = false;
1848
+ // Grab Cursor
1849
+ if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
1850
+ swiper.setGrabCursor(true);
1851
+ }
1852
+ swiper.emit('sliderFirstMove', e);
1853
+ }
1854
+ swiper.emit('sliderMove', e);
1855
+ data$$1.isMoved = true;
1856
+
1857
+ let diff = swiper.isHorizontal() ? diffX : diffY;
1858
+ touches.diff = diff;
1859
+
1860
+ diff *= params.touchRatio;
1861
+ if (rtl) diff = -diff;
1862
+
1863
+ swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
1864
+ data$$1.currentTranslate = diff + data$$1.startTranslate;
1865
+
1866
+ let disableParentSwiper = true;
1867
+ let resistanceRatio = params.resistanceRatio;
1868
+ if (params.touchReleaseOnEdges) {
1869
+ resistanceRatio = 0;
1870
+ }
1871
+ if ((diff > 0 && data$$1.currentTranslate > swiper.minTranslate())) {
1872
+ disableParentSwiper = false;
1873
+ if (params.resistance) data$$1.currentTranslate = (swiper.minTranslate() - 1) + ((-swiper.minTranslate() + data$$1.startTranslate + diff) ** resistanceRatio);
1874
+ } else if (diff < 0 && data$$1.currentTranslate < swiper.maxTranslate()) {
1875
+ disableParentSwiper = false;
1876
+ if (params.resistance) data$$1.currentTranslate = (swiper.maxTranslate() + 1) - ((swiper.maxTranslate() - data$$1.startTranslate - diff) ** resistanceRatio);
1877
+ }
1878
+
1879
+ if (disableParentSwiper) {
1880
+ e.preventedByNestedSwiper = true;
1881
+ }
1882
+
1883
+ // Directions locks
1884
+ if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data$$1.currentTranslate < data$$1.startTranslate) {
1885
+ data$$1.currentTranslate = data$$1.startTranslate;
1886
+ }
1887
+ if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data$$1.currentTranslate > data$$1.startTranslate) {
1888
+ data$$1.currentTranslate = data$$1.startTranslate;
1889
+ }
1890
+
1891
+
1892
+ // Threshold
1893
+ if (params.threshold > 0) {
1894
+ if (Math.abs(diff) > params.threshold || data$$1.allowThresholdMove) {
1895
+ if (!data$$1.allowThresholdMove) {
1896
+ data$$1.allowThresholdMove = true;
1897
+ touches.startX = touches.currentX;
1898
+ touches.startY = touches.currentY;
1899
+ data$$1.currentTranslate = data$$1.startTranslate;
1900
+ touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
1901
+ return;
1902
+ }
1903
+ } else {
1904
+ data$$1.currentTranslate = data$$1.startTranslate;
1905
+ return;
1906
+ }
1907
+ }
1908
+
1909
+ if (!params.followFinger) return;
1910
+
1911
+ // Update active index in free mode
1912
+ if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
1913
+ swiper.updateActiveIndex();
1914
+ swiper.updateSlidesClasses();
1915
+ }
1916
+ if (params.freeMode) {
1917
+ // Velocity
1918
+ if (data$$1.velocities.length === 0) {
1919
+ data$$1.velocities.push({
1920
+ position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
1921
+ time: data$$1.touchStartTime,
1922
+ });
1923
+ }
1924
+ data$$1.velocities.push({
1925
+ position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
1926
+ time: Utils.now(),
1927
+ });
1928
+ }
1929
+ // Update progress
1930
+ swiper.updateProgress(data$$1.currentTranslate);
1931
+ // Update translate
1932
+ swiper.setTranslate(data$$1.currentTranslate);
1933
+ }
1934
+
1935
+ function onTouchEnd (event) {
1936
+ const swiper = this;
1937
+ const data$$1 = swiper.touchEventsData;
1938
+
1939
+ const {
1940
+ params, touches, rtlTranslate: rtl, $wrapperEl, slidesGrid, snapGrid,
1941
+ } = swiper;
1942
+ let e = event;
1943
+ if (e.originalEvent) e = e.originalEvent;
1944
+ if (data$$1.allowTouchCallbacks) {
1945
+ swiper.emit('touchEnd', e);
1946
+ }
1947
+ data$$1.allowTouchCallbacks = false;
1948
+ if (!data$$1.isTouched) {
1949
+ if (data$$1.isMoved && params.grabCursor) {
1950
+ swiper.setGrabCursor(false);
1951
+ }
1952
+ data$$1.isMoved = false;
1953
+ data$$1.startMoving = false;
1954
+ return;
1955
+ }
1956
+ // Return Grab Cursor
1957
+ if (params.grabCursor && data$$1.isMoved && data$$1.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
1958
+ swiper.setGrabCursor(false);
1959
+ }
1960
+
1961
+ // Time diff
1962
+ const touchEndTime = Utils.now();
1963
+ const timeDiff = touchEndTime - data$$1.touchStartTime;
1964
+
1965
+ // Tap, doubleTap, Click
1966
+ if (swiper.allowClick) {
1967
+ swiper.updateClickedSlide(e);
1968
+ swiper.emit('tap', e);
1969
+ if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) > 300) {
1970
+ if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout);
1971
+ data$$1.clickTimeout = Utils.nextTick(() => {
1972
+ if (!swiper || swiper.destroyed) return;
1973
+ swiper.emit('click', e);
1974
+ }, 300);
1975
+ }
1976
+ if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) < 300) {
1977
+ if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout);
1978
+ swiper.emit('doubleTap', e);
1979
+ }
1980
+ }
1981
+
1982
+ data$$1.lastClickTime = Utils.now();
1983
+ Utils.nextTick(() => {
1984
+ if (!swiper.destroyed) swiper.allowClick = true;
1985
+ });
1986
+
1987
+ if (!data$$1.isTouched || !data$$1.isMoved || !swiper.swipeDirection || touches.diff === 0 || data$$1.currentTranslate === data$$1.startTranslate) {
1988
+ data$$1.isTouched = false;
1989
+ data$$1.isMoved = false;
1990
+ data$$1.startMoving = false;
1991
+ return;
1992
+ }
1993
+ data$$1.isTouched = false;
1994
+ data$$1.isMoved = false;
1995
+ data$$1.startMoving = false;
1996
+
1997
+ let currentPos;
1998
+ if (params.followFinger) {
1999
+ currentPos = rtl ? swiper.translate : -swiper.translate;
2000
+ } else {
2001
+ currentPos = -data$$1.currentTranslate;
2002
+ }
2003
+
2004
+ if (params.freeMode) {
2005
+ if (currentPos < -swiper.minTranslate()) {
2006
+ swiper.slideTo(swiper.activeIndex);
2007
+ return;
2008
+ } else if (currentPos > -swiper.maxTranslate()) {
2009
+ if (swiper.slides.length < snapGrid.length) {
2010
+ swiper.slideTo(snapGrid.length - 1);
2011
+ } else {
2012
+ swiper.slideTo(swiper.slides.length - 1);
2013
+ }
2014
+ return;
2015
+ }
2016
+
2017
+ if (params.freeModeMomentum) {
2018
+ if (data$$1.velocities.length > 1) {
2019
+ const lastMoveEvent = data$$1.velocities.pop();
2020
+ const velocityEvent = data$$1.velocities.pop();
2021
+
2022
+ const distance = lastMoveEvent.position - velocityEvent.position;
2023
+ const time = lastMoveEvent.time - velocityEvent.time;
2024
+ swiper.velocity = distance / time;
2025
+ swiper.velocity /= 2;
2026
+ if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
2027
+ swiper.velocity = 0;
2028
+ }
2029
+ // this implies that the user stopped moving a finger then released.
2030
+ // There would be no events with distance zero, so the last event is stale.
2031
+ if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
2032
+ swiper.velocity = 0;
2033
+ }
2034
+ } else {
2035
+ swiper.velocity = 0;
2036
+ }
2037
+ swiper.velocity *= params.freeModeMomentumVelocityRatio;
2038
+
2039
+ data$$1.velocities.length = 0;
2040
+ let momentumDuration = 1000 * params.freeModeMomentumRatio;
2041
+ const momentumDistance = swiper.velocity * momentumDuration;
2042
+
2043
+ let newPosition = swiper.translate + momentumDistance;
2044
+ if (rtl) newPosition = -newPosition;
2045
+
2046
+ let doBounce = false;
2047
+ let afterBouncePosition;
2048
+ const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
2049
+ let needsLoopFix;
2050
+ if (newPosition < swiper.maxTranslate()) {
2051
+ if (params.freeModeMomentumBounce) {
2052
+ if (newPosition + swiper.maxTranslate() < -bounceAmount) {
2053
+ newPosition = swiper.maxTranslate() - bounceAmount;
2054
+ }
2055
+ afterBouncePosition = swiper.maxTranslate();
2056
+ doBounce = true;
2057
+ data$$1.allowMomentumBounce = true;
2058
+ } else {
2059
+ newPosition = swiper.maxTranslate();
2060
+ }
2061
+ if (params.loop && params.centeredSlides) needsLoopFix = true;
2062
+ } else if (newPosition > swiper.minTranslate()) {
2063
+ if (params.freeModeMomentumBounce) {
2064
+ if (newPosition - swiper.minTranslate() > bounceAmount) {
2065
+ newPosition = swiper.minTranslate() + bounceAmount;
2066
+ }
2067
+ afterBouncePosition = swiper.minTranslate();
2068
+ doBounce = true;
2069
+ data$$1.allowMomentumBounce = true;
2070
+ } else {
2071
+ newPosition = swiper.minTranslate();
2072
+ }
2073
+ if (params.loop && params.centeredSlides) needsLoopFix = true;
2074
+ } else if (params.freeModeSticky) {
2075
+ let nextSlide;
2076
+ for (let j = 0; j < snapGrid.length; j += 1) {
2077
+ if (snapGrid[j] > -newPosition) {
2078
+ nextSlide = j;
2079
+ break;
2080
+ }
2081
+ }
2082
+
2083
+ if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
2084
+ newPosition = snapGrid[nextSlide];
2085
+ } else {
2086
+ newPosition = snapGrid[nextSlide - 1];
2087
+ }
2088
+ newPosition = -newPosition;
2089
+ }
2090
+ if (needsLoopFix) {
2091
+ swiper.once('transitionEnd', () => {
2092
+ swiper.loopFix();
2093
+ });
2094
+ }
2095
+ // Fix duration
2096
+ if (swiper.velocity !== 0) {
2097
+ if (rtl) {
2098
+ momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
2099
+ } else {
2100
+ momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
2101
+ }
2102
+ } else if (params.freeModeSticky) {
2103
+ swiper.slideToClosest();
2104
+ return;
2105
+ }
2106
+
2107
+ if (params.freeModeMomentumBounce && doBounce) {
2108
+ swiper.updateProgress(afterBouncePosition);
2109
+ swiper.setTransition(momentumDuration);
2110
+ swiper.setTranslate(newPosition);
2111
+ swiper.transitionStart(true, swiper.swipeDirection);
2112
+ swiper.animating = true;
2113
+ $wrapperEl.transitionEnd(() => {
2114
+ if (!swiper || swiper.destroyed || !data$$1.allowMomentumBounce) return;
2115
+ swiper.emit('momentumBounce');
2116
+
2117
+ swiper.setTransition(params.speed);
2118
+ swiper.setTranslate(afterBouncePosition);
2119
+ $wrapperEl.transitionEnd(() => {
2120
+ if (!swiper || swiper.destroyed) return;
2121
+ swiper.transitionEnd();
2122
+ });
2123
+ });
2124
+ } else if (swiper.velocity) {
2125
+ swiper.updateProgress(newPosition);
2126
+ swiper.setTransition(momentumDuration);
2127
+ swiper.setTranslate(newPosition);
2128
+ swiper.transitionStart(true, swiper.swipeDirection);
2129
+ if (!swiper.animating) {
2130
+ swiper.animating = true;
2131
+ $wrapperEl.transitionEnd(() => {
2132
+ if (!swiper || swiper.destroyed) return;
2133
+ swiper.transitionEnd();
2134
+ });
2135
+ }
2136
+ } else {
2137
+ swiper.updateProgress(newPosition);
2138
+ }
2139
+
2140
+ swiper.updateActiveIndex();
2141
+ swiper.updateSlidesClasses();
2142
+ } else if (params.freeModeSticky) {
2143
+ swiper.slideToClosest();
2144
+ return;
2145
+ }
2146
+
2147
+ if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
2148
+ swiper.updateProgress();
2149
+ swiper.updateActiveIndex();
2150
+ swiper.updateSlidesClasses();
2151
+ }
2152
+ return;
2153
+ }
2154
+
2155
+ // Find current slide
2156
+ let stopIndex = 0;
2157
+ let groupSize = swiper.slidesSizesGrid[0];
2158
+ for (let i = 0; i < slidesGrid.length; i += params.slidesPerGroup) {
2159
+ if (typeof slidesGrid[i + params.slidesPerGroup] !== 'undefined') {
2160
+ if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + params.slidesPerGroup]) {
2161
+ stopIndex = i;
2162
+ groupSize = slidesGrid[i + params.slidesPerGroup] - slidesGrid[i];
2163
+ }
2164
+ } else if (currentPos >= slidesGrid[i]) {
2165
+ stopIndex = i;
2166
+ groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
2167
+ }
2168
+ }
2169
+
2170
+ // Find current slide size
2171
+ const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
2172
+
2173
+ if (timeDiff > params.longSwipesMs) {
2174
+ // Long touches
2175
+ if (!params.longSwipes) {
2176
+ swiper.slideTo(swiper.activeIndex);
2177
+ return;
2178
+ }
2179
+ if (swiper.swipeDirection === 'next') {
2180
+ if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + params.slidesPerGroup);
2181
+ else swiper.slideTo(stopIndex);
2182
+ }
2183
+ if (swiper.swipeDirection === 'prev') {
2184
+ if (ratio > (1 - params.longSwipesRatio)) swiper.slideTo(stopIndex + params.slidesPerGroup);
2185
+ else swiper.slideTo(stopIndex);
2186
+ }
2187
+ } else {
2188
+ // Short swipes
2189
+ if (!params.shortSwipes) {
2190
+ swiper.slideTo(swiper.activeIndex);
2191
+ return;
2192
+ }
2193
+ if (swiper.swipeDirection === 'next') {
2194
+ swiper.slideTo(stopIndex + params.slidesPerGroup);
2195
+ }
2196
+ if (swiper.swipeDirection === 'prev') {
2197
+ swiper.slideTo(stopIndex);
2198
+ }
2199
+ }
2200
+ }
2201
+
2202
+ function onResize () {
2203
+ const swiper = this;
2204
+
2205
+ const { params, el } = swiper;
2206
+
2207
+ if (el && el.offsetWidth === 0) return;
2208
+
2209
+ // Breakpoints
2210
+ if (params.breakpoints) {
2211
+ swiper.setBreakpoint();
2212
+ }
2213
+
2214
+ // Save locks
2215
+ const { allowSlideNext, allowSlidePrev, snapGrid } = swiper;
2216
+
2217
+ // Disable locks on resize
2218
+ swiper.allowSlideNext = true;
2219
+ swiper.allowSlidePrev = true;
2220
+
2221
+ swiper.updateSize();
2222
+ swiper.updateSlides();
2223
+
2224
+ if (params.freeMode) {
2225
+ const newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate());
2226
+ swiper.setTranslate(newTranslate);
2227
+ swiper.updateActiveIndex();
2228
+ swiper.updateSlidesClasses();
2229
+
2230
+ if (params.autoHeight) {
2231
+ swiper.updateAutoHeight();
2232
+ }
2233
+ } else {
2234
+ swiper.updateSlidesClasses();
2235
+ if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
2236
+ swiper.slideTo(swiper.slides.length - 1, 0, false, true);
2237
+ } else {
2238
+ swiper.slideTo(swiper.activeIndex, 0, false, true);
2239
+ }
2240
+ }
2241
+ // Return locks after resize
2242
+ swiper.allowSlidePrev = allowSlidePrev;
2243
+ swiper.allowSlideNext = allowSlideNext;
2244
+
2245
+ if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
2246
+ swiper.checkOverflow();
2247
+ }
2248
+ }
2249
+
2250
+ function onClick (e) {
2251
+ const swiper = this;
2252
+ if (!swiper.allowClick) {
2253
+ if (swiper.params.preventClicks) e.preventDefault();
2254
+ if (swiper.params.preventClicksPropagation && swiper.animating) {
2255
+ e.stopPropagation();
2256
+ e.stopImmediatePropagation();
2257
+ }
2258
+ }
2259
+ }
2260
+
2261
+ function attachEvents() {
2262
+ const swiper = this;
2263
+ const {
2264
+ params, touchEvents, el, wrapperEl,
2265
+ } = swiper;
2266
+
2267
+ {
2268
+ swiper.onTouchStart = onTouchStart.bind(swiper);
2269
+ swiper.onTouchMove = onTouchMove.bind(swiper);
2270
+ swiper.onTouchEnd = onTouchEnd.bind(swiper);
2271
+ }
2272
+
2273
+ swiper.onClick = onClick.bind(swiper);
2274
+
2275
+ const target = params.touchEventsTarget === 'container' ? el : wrapperEl;
2276
+ const capture = !!params.nested;
2277
+
2278
+ // Touch Events
2279
+ {
2280
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
2281
+ target.addEventListener(touchEvents.start, swiper.onTouchStart, false);
2282
+ document.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
2283
+ document.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
2284
+ } else {
2285
+ if (Support.touch) {
2286
+ const passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
2287
+ target.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
2288
+ target.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture } : capture);
2289
+ target.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
2290
+ }
2291
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
2292
+ target.addEventListener('mousedown', swiper.onTouchStart, false);
2293
+ document.addEventListener('mousemove', swiper.onTouchMove, capture);
2294
+ document.addEventListener('mouseup', swiper.onTouchEnd, false);
2295
+ }
2296
+ }
2297
+ // Prevent Links Clicks
2298
+ if (params.preventClicks || params.preventClicksPropagation) {
2299
+ target.addEventListener('click', swiper.onClick, true);
2300
+ }
2301
+ }
2302
+
2303
+ // Resize handler
2304
+ swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
2305
+ }
2306
+
2307
+ function detachEvents() {
2308
+ const swiper = this;
2309
+
2310
+ const {
2311
+ params, touchEvents, el, wrapperEl,
2312
+ } = swiper;
2313
+
2314
+ const target = params.touchEventsTarget === 'container' ? el : wrapperEl;
2315
+ const capture = !!params.nested;
2316
+
2317
+ // Touch Events
2318
+ {
2319
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
2320
+ target.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
2321
+ document.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
2322
+ document.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
2323
+ } else {
2324
+ if (Support.touch) {
2325
+ const passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
2326
+ target.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
2327
+ target.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
2328
+ target.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
2329
+ }
2330
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
2331
+ target.removeEventListener('mousedown', swiper.onTouchStart, false);
2332
+ document.removeEventListener('mousemove', swiper.onTouchMove, capture);
2333
+ document.removeEventListener('mouseup', swiper.onTouchEnd, false);
2334
+ }
2335
+ }
2336
+ // Prevent Links Clicks
2337
+ if (params.preventClicks || params.preventClicksPropagation) {
2338
+ target.removeEventListener('click', swiper.onClick, true);
2339
+ }
2340
+ }
2341
+
2342
+ // Resize handler
2343
+ swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
2344
+ }
2345
+
2346
+ var events = {
2347
+ attachEvents,
2348
+ detachEvents,
2349
+ };
2350
+
2351
+ function setBreakpoint () {
2352
+ const swiper = this;
2353
+ const {
2354
+ activeIndex, initialized, loopedSlides = 0, params,
2355
+ } = swiper;
2356
+ const breakpoints = params.breakpoints;
2357
+ if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) return;
2358
+ // Set breakpoint for window width and update parameters
2359
+ const breakpoint = swiper.getBreakpoint(breakpoints);
2360
+ if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
2361
+ const breakPointsParams = breakpoint in breakpoints ? breakpoints[breakpoint] : swiper.originalParams;
2362
+ const needsReLoop = params.loop && (breakPointsParams.slidesPerView !== params.slidesPerView);
2363
+
2364
+ Utils.extend(swiper.params, breakPointsParams);
2365
+
2366
+ Utils.extend(swiper, {
2367
+ allowTouchMove: swiper.params.allowTouchMove,
2368
+ allowSlideNext: swiper.params.allowSlideNext,
2369
+ allowSlidePrev: swiper.params.allowSlidePrev,
2370
+ });
2371
+
2372
+ swiper.currentBreakpoint = breakpoint;
2373
+
2374
+ if (needsReLoop && initialized) {
2375
+ swiper.loopDestroy();
2376
+ swiper.loopCreate();
2377
+ swiper.updateSlides();
2378
+ swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
2379
+ }
2380
+ swiper.emit('breakpoint', breakPointsParams);
2381
+ }
2382
+ }
2383
+
2384
+ function getBreakpoint (breakpoints) {
2385
+ // Get breakpoint for window width
2386
+ if (!breakpoints) return undefined;
2387
+ let breakpoint = false;
2388
+ const points = [];
2389
+ Object.keys(breakpoints).forEach((point) => {
2390
+ points.push(point);
2391
+ });
2392
+ points.sort((a, b) => parseInt(a, 10) - parseInt(b, 10));
2393
+ for (let i = 0; i < points.length; i += 1) {
2394
+ const point = points[i];
2395
+ if (point >= window.innerWidth && !breakpoint) {
2396
+ breakpoint = point;
2397
+ }
2398
+ }
2399
+ return breakpoint || 'max';
2400
+ }
2401
+
2402
+ var breakpoints = { setBreakpoint, getBreakpoint };
2403
+
2404
+ const Browser = (function Browser() {
2405
+ function isSafari() {
2406
+ const ua = window.navigator.userAgent.toLowerCase();
2407
+ return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
2408
+ }
2409
+ return {
2410
+ isIE: !!window.navigator.userAgent.match(/Trident/g) || !!window.navigator.userAgent.match(/MSIE/g),
2411
+ isSafari: isSafari(),
2412
+ isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),
2413
+ };
2414
+ }());
2415
+
2416
+ function addClasses () {
2417
+ const swiper = this;
2418
+ const {
2419
+ classNames, params, rtl, $el,
2420
+ } = swiper;
2421
+ const suffixes = [];
2422
+
2423
+ suffixes.push(params.direction);
2424
+
2425
+ if (params.freeMode) {
2426
+ suffixes.push('free-mode');
2427
+ }
2428
+ if (!Support.flexbox) {
2429
+ suffixes.push('no-flexbox');
2430
+ }
2431
+ if (params.autoHeight) {
2432
+ suffixes.push('autoheight');
2433
+ }
2434
+ if (rtl) {
2435
+ suffixes.push('rtl');
2436
+ }
2437
+ if (params.slidesPerColumn > 1) {
2438
+ suffixes.push('multirow');
2439
+ }
2440
+ if (Device.android) {
2441
+ suffixes.push('android');
2442
+ }
2443
+ if (Device.ios) {
2444
+ suffixes.push('ios');
2445
+ }
2446
+ // WP8 Touch Events Fix
2447
+ if (Browser.isIE && (Support.pointerEvents || Support.prefixedPointerEvents)) {
2448
+ suffixes.push(`wp8-${params.direction}`);
2449
+ }
2450
+
2451
+ suffixes.forEach((suffix) => {
2452
+ classNames.push(params.containerModifierClass + suffix);
2453
+ });
2454
+
2455
+ $el.addClass(classNames.join(' '));
2456
+ }
2457
+
2458
+ function removeClasses () {
2459
+ const swiper = this;
2460
+ const { $el, classNames } = swiper;
2461
+
2462
+ $el.removeClass(classNames.join(' '));
2463
+ }
2464
+
2465
+ var classes = { addClasses, removeClasses };
2466
+
2467
+ function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
2468
+ let image;
2469
+ function onReady() {
2470
+ if (callback) callback();
2471
+ }
2472
+ if (!imageEl.complete || !checkForComplete) {
2473
+ if (src) {
2474
+ image = new window.Image();
2475
+ image.onload = onReady;
2476
+ image.onerror = onReady;
2477
+ if (sizes) {
2478
+ image.sizes = sizes;
2479
+ }
2480
+ if (srcset) {
2481
+ image.srcset = srcset;
2482
+ }
2483
+ if (src) {
2484
+ image.src = src;
2485
+ }
2486
+ } else {
2487
+ onReady();
2488
+ }
2489
+ } else {
2490
+ // image already loaded...
2491
+ onReady();
2492
+ }
2493
+ }
2494
+
2495
+ function preloadImages () {
2496
+ const swiper = this;
2497
+ swiper.imagesToLoad = swiper.$el.find('img');
2498
+ function onReady() {
2499
+ if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;
2500
+ if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;
2501
+ if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
2502
+ if (swiper.params.updateOnImagesReady) swiper.update();
2503
+ swiper.emit('imagesReady');
2504
+ }
2505
+ }
2506
+ for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {
2507
+ const imageEl = swiper.imagesToLoad[i];
2508
+ swiper.loadImage(
2509
+ imageEl,
2510
+ imageEl.currentSrc || imageEl.getAttribute('src'),
2511
+ imageEl.srcset || imageEl.getAttribute('srcset'),
2512
+ imageEl.sizes || imageEl.getAttribute('sizes'),
2513
+ true,
2514
+ onReady
2515
+ );
2516
+ }
2517
+ }
2518
+
2519
+ var images = {
2520
+ loadImage,
2521
+ preloadImages,
2522
+ };
2523
+
2524
+ function checkOverflow() {
2525
+ const swiper = this;
2526
+ const wasLocked = swiper.isLocked;
2527
+
2528
+ swiper.isLocked = swiper.snapGrid.length === 1;
2529
+ swiper.allowSlideNext = !swiper.isLocked;
2530
+ swiper.allowSlidePrev = !swiper.isLocked;
2531
+
2532
+ // events
2533
+ if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock');
2534
+
2535
+ if (wasLocked && wasLocked !== swiper.isLocked) {
2536
+ swiper.isEnd = false;
2537
+ swiper.navigation.update();
2538
+ }
2539
+ }
2540
+
2541
+ var checkOverflow$1 = { checkOverflow };
2542
+
2543
+ var defaults = {
2544
+ init: true,
2545
+ direction: 'horizontal',
2546
+ touchEventsTarget: 'container',
2547
+ initialSlide: 0,
2548
+ speed: 300,
2549
+ //
2550
+ preventIntercationOnTransition: false,
2551
+
2552
+ // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
2553
+ iOSEdgeSwipeDetection: false,
2554
+ iOSEdgeSwipeThreshold: 20,
2555
+
2556
+ // Free mode
2557
+ freeMode: false,
2558
+ freeModeMomentum: true,
2559
+ freeModeMomentumRatio: 1,
2560
+ freeModeMomentumBounce: true,
2561
+ freeModeMomentumBounceRatio: 1,
2562
+ freeModeMomentumVelocityRatio: 1,
2563
+ freeModeSticky: false,
2564
+ freeModeMinimumVelocity: 0.02,
2565
+
2566
+ // Autoheight
2567
+ autoHeight: false,
2568
+
2569
+ // Set wrapper width
2570
+ setWrapperSize: false,
2571
+
2572
+ // Virtual Translate
2573
+ virtualTranslate: false,
2574
+
2575
+ // Effects
2576
+ effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
2577
+
2578
+ // Breakpoints
2579
+ breakpoints: undefined,
2580
+
2581
+ // Slides grid
2582
+ spaceBetween: 0,
2583
+ slidesPerView: 1,
2584
+ slidesPerColumn: 1,
2585
+ slidesPerColumnFill: 'column',
2586
+ slidesPerGroup: 1,
2587
+ centeredSlides: false,
2588
+ slidesOffsetBefore: 0, // in px
2589
+ slidesOffsetAfter: 0, // in px
2590
+ normalizeSlideIndex: true,
2591
+
2592
+ // Disable swiper and hide navigation when container not overflow
2593
+ watchOverflow: false,
2594
+
2595
+ // Round length
2596
+ roundLengths: false,
2597
+
2598
+ // Touches
2599
+ touchRatio: 1,
2600
+ touchAngle: 45,
2601
+ simulateTouch: true,
2602
+ shortSwipes: true,
2603
+ longSwipes: true,
2604
+ longSwipesRatio: 0.5,
2605
+ longSwipesMs: 300,
2606
+ followFinger: true,
2607
+ allowTouchMove: true,
2608
+ threshold: 0,
2609
+ touchMoveStopPropagation: true,
2610
+ touchReleaseOnEdges: false,
2611
+
2612
+ // Unique Navigation Elements
2613
+ uniqueNavElements: true,
2614
+
2615
+ // Resistance
2616
+ resistance: true,
2617
+ resistanceRatio: 0.85,
2618
+
2619
+ // Progress
2620
+ watchSlidesProgress: false,
2621
+ watchSlidesVisibility: false,
2622
+
2623
+ // Cursor
2624
+ grabCursor: false,
2625
+
2626
+ // Clicks
2627
+ preventClicks: true,
2628
+ preventClicksPropagation: true,
2629
+ slideToClickedSlide: false,
2630
+
2631
+ // Images
2632
+ preloadImages: true,
2633
+ updateOnImagesReady: true,
2634
+
2635
+ // loop
2636
+ loop: false,
2637
+ loopAdditionalSlides: 0,
2638
+ loopedSlides: null,
2639
+ loopFillGroupWithBlank: false,
2640
+
2641
+ // Swiping/no swiping
2642
+ allowSlidePrev: true,
2643
+ allowSlideNext: true,
2644
+ swipeHandler: null, // '.swipe-handler',
2645
+ noSwiping: true,
2646
+ noSwipingClass: 'swiper-no-swiping',
2647
+ noSwipingSelector: null,
2648
+
2649
+ // Passive Listeners
2650
+ passiveListeners: true,
2651
+
2652
+ // NS
2653
+ containerModifierClass: 'swiper-container-', // NEW
2654
+ slideClass: 'swiper-slide',
2655
+ slideBlankClass: 'swiper-slide-invisible-blank',
2656
+ slideActiveClass: 'swiper-slide-active',
2657
+ slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
2658
+ slideVisibleClass: 'swiper-slide-visible',
2659
+ slideDuplicateClass: 'swiper-slide-duplicate',
2660
+ slideNextClass: 'swiper-slide-next',
2661
+ slideDuplicateNextClass: 'swiper-slide-duplicate-next',
2662
+ slidePrevClass: 'swiper-slide-prev',
2663
+ slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
2664
+ wrapperClass: 'swiper-wrapper',
2665
+
2666
+ // Callbacks
2667
+ runCallbacksOnInit: true,
2668
+ };
2669
+
2670
+ const prototypes = {
2671
+ update,
2672
+ translate,
2673
+ transition: transition$1,
2674
+ slide,
2675
+ loop,
2676
+ grabCursor,
2677
+ manipulation,
2678
+ events,
2679
+ breakpoints,
2680
+ checkOverflow: checkOverflow$1,
2681
+ classes,
2682
+ images,
2683
+ };
2684
+
2685
+ const extendedDefaults = {};
2686
+
2687
+ class Swiper extends SwiperClass {
2688
+ constructor(...args) {
2689
+ let el;
2690
+ let params;
2691
+ if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
2692
+ params = args[0];
2693
+ } else {
2694
+ [el, params] = args;
2695
+ }
2696
+ if (!params) params = {};
2697
+
2698
+ params = Utils.extend({}, params);
2699
+ if (el && !params.el) params.el = el;
2700
+
2701
+ super(params);
2702
+
2703
+ Object.keys(prototypes).forEach((prototypeGroup) => {
2704
+ Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {
2705
+ if (!Swiper.prototype[protoMethod]) {
2706
+ Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
2707
+ }
2708
+ });
2709
+ });
2710
+
2711
+ // Swiper Instance
2712
+ const swiper = this;
2713
+ if (typeof swiper.modules === 'undefined') {
2714
+ swiper.modules = {};
2715
+ }
2716
+ Object.keys(swiper.modules).forEach((moduleName) => {
2717
+ const module = swiper.modules[moduleName];
2718
+ if (module.params) {
2719
+ const moduleParamName = Object.keys(module.params)[0];
2720
+ const moduleParams = module.params[moduleParamName];
2721
+ if (typeof moduleParams !== 'object') return;
2722
+ if (!(moduleParamName in params && 'enabled' in moduleParams)) return;
2723
+ if (params[moduleParamName] === true) {
2724
+ params[moduleParamName] = { enabled: true };
2725
+ }
2726
+ if (
2727
+ typeof params[moduleParamName] === 'object' &&
2728
+ !('enabled' in params[moduleParamName])
2729
+ ) {
2730
+ params[moduleParamName].enabled = true;
2731
+ }
2732
+ if (!params[moduleParamName]) params[moduleParamName] = { enabled: false };
2733
+ }
2734
+ });
2735
+
2736
+ // Extend defaults with modules params
2737
+ const swiperParams = Utils.extend({}, defaults);
2738
+ swiper.useModulesParams(swiperParams);
2739
+
2740
+ // Extend defaults with passed params
2741
+ swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
2742
+ swiper.originalParams = Utils.extend({}, swiper.params);
2743
+ swiper.passedParams = Utils.extend({}, params);
2744
+
2745
+ // Save Dom lib
2746
+ swiper.$ = $;
2747
+
2748
+ // Find el
2749
+ const $el = $(swiper.params.el);
2750
+ el = $el[0];
2751
+
2752
+ if (!el) {
2753
+ return undefined;
2754
+ }
2755
+
2756
+ if ($el.length > 1) {
2757
+ const swipers = [];
2758
+ $el.each((index$$1, containerEl) => {
2759
+ const newParams = Utils.extend({}, params, { el: containerEl });
2760
+ swipers.push(new Swiper(newParams));
2761
+ });
2762
+ return swipers;
2763
+ }
2764
+
2765
+ el.swiper = swiper;
2766
+ $el.data('swiper', swiper);
2767
+
2768
+ // Find Wrapper
2769
+ const $wrapperEl = $el.children(`.${swiper.params.wrapperClass}`);
2770
+
2771
+ // Extend Swiper
2772
+ Utils.extend(swiper, {
2773
+ $el,
2774
+ el,
2775
+ $wrapperEl,
2776
+ wrapperEl: $wrapperEl[0],
2777
+
2778
+ // Classes
2779
+ classNames: [],
2780
+
2781
+ // Slides
2782
+ slides: $(),
2783
+ slidesGrid: [],
2784
+ snapGrid: [],
2785
+ slidesSizesGrid: [],
2786
+
2787
+ // isDirection
2788
+ isHorizontal() {
2789
+ return swiper.params.direction === 'horizontal';
2790
+ },
2791
+ isVertical() {
2792
+ return swiper.params.direction === 'vertical';
2793
+ },
2794
+ // RTL
2795
+ rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
2796
+ rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
2797
+ wrongRTL: $wrapperEl.css('display') === '-webkit-box',
2798
+
2799
+ // Indexes
2800
+ activeIndex: 0,
2801
+ realIndex: 0,
2802
+
2803
+ //
2804
+ isBeginning: true,
2805
+ isEnd: false,
2806
+
2807
+ // Props
2808
+ translate: 0,
2809
+ previousTranslate: 0,
2810
+ progress: 0,
2811
+ velocity: 0,
2812
+ animating: false,
2813
+
2814
+ // Locks
2815
+ allowSlideNext: swiper.params.allowSlideNext,
2816
+ allowSlidePrev: swiper.params.allowSlidePrev,
2817
+
2818
+ // Touch Events
2819
+ touchEvents: (function touchEvents() {
2820
+ const touch = ['touchstart', 'touchmove', 'touchend'];
2821
+ let desktop = ['mousedown', 'mousemove', 'mouseup'];
2822
+ if (Support.pointerEvents) {
2823
+ desktop = ['pointerdown', 'pointermove', 'pointerup'];
2824
+ } else if (Support.prefixedPointerEvents) {
2825
+ desktop = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];
2826
+ }
2827
+ swiper.touchEventsTouch = {
2828
+ start: touch[0],
2829
+ move: touch[1],
2830
+ end: touch[2],
2831
+ };
2832
+ swiper.touchEventsDesktop = {
2833
+ start: desktop[0],
2834
+ move: desktop[1],
2835
+ end: desktop[2],
2836
+ };
2837
+ return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
2838
+ }()),
2839
+ touchEventsData: {
2840
+ isTouched: undefined,
2841
+ isMoved: undefined,
2842
+ allowTouchCallbacks: undefined,
2843
+ touchStartTime: undefined,
2844
+ isScrolling: undefined,
2845
+ currentTranslate: undefined,
2846
+ startTranslate: undefined,
2847
+ allowThresholdMove: undefined,
2848
+ // Form elements to match
2849
+ formElements: 'input, select, option, textarea, button, video',
2850
+ // Last click time
2851
+ lastClickTime: Utils.now(),
2852
+ clickTimeout: undefined,
2853
+ // Velocities
2854
+ velocities: [],
2855
+ allowMomentumBounce: undefined,
2856
+ isTouchEvent: undefined,
2857
+ startMoving: undefined,
2858
+ },
2859
+
2860
+ // Clicks
2861
+ allowClick: true,
2862
+
2863
+ // Touches
2864
+ allowTouchMove: swiper.params.allowTouchMove,
2865
+
2866
+ touches: {
2867
+ startX: 0,
2868
+ startY: 0,
2869
+ currentX: 0,
2870
+ currentY: 0,
2871
+ diff: 0,
2872
+ },
2873
+
2874
+ // Images
2875
+ imagesToLoad: [],
2876
+ imagesLoaded: 0,
2877
+
2878
+ });
2879
+
2880
+ // Install Modules
2881
+ swiper.useModules();
2882
+
2883
+ // Init
2884
+ if (swiper.params.init) {
2885
+ swiper.init();
2886
+ }
2887
+
2888
+ // Return app instance
2889
+ return swiper;
2890
+ }
2891
+ slidesPerViewDynamic() {
2892
+ const swiper = this;
2893
+ const {
2894
+ params, slides, slidesGrid, size: swiperSize, activeIndex,
2895
+ } = swiper;
2896
+ let spv = 1;
2897
+ if (params.centeredSlides) {
2898
+ let slideSize = slides[activeIndex].swiperSlideSize;
2899
+ let breakLoop;
2900
+ for (let i = activeIndex + 1; i < slides.length; i += 1) {
2901
+ if (slides[i] && !breakLoop) {
2902
+ slideSize += slides[i].swiperSlideSize;
2903
+ spv += 1;
2904
+ if (slideSize > swiperSize) breakLoop = true;
2905
+ }
2906
+ }
2907
+ for (let i = activeIndex - 1; i >= 0; i -= 1) {
2908
+ if (slides[i] && !breakLoop) {
2909
+ slideSize += slides[i].swiperSlideSize;
2910
+ spv += 1;
2911
+ if (slideSize > swiperSize) breakLoop = true;
2912
+ }
2913
+ }
2914
+ } else {
2915
+ for (let i = activeIndex + 1; i < slides.length; i += 1) {
2916
+ if (slidesGrid[i] - slidesGrid[activeIndex] < swiperSize) {
2917
+ spv += 1;
2918
+ }
2919
+ }
2920
+ }
2921
+ return spv;
2922
+ }
2923
+ update() {
2924
+ const swiper = this;
2925
+ if (!swiper || swiper.destroyed) return;
2926
+ const { snapGrid, params } = swiper;
2927
+ // Breakpoints
2928
+ if (params.breakpoints) {
2929
+ swiper.setBreakpoint();
2930
+ }
2931
+ swiper.updateSize();
2932
+ swiper.updateSlides();
2933
+ swiper.updateProgress();
2934
+ swiper.updateSlidesClasses();
2935
+
2936
+ function setTranslate() {
2937
+ const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
2938
+ const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
2939
+ swiper.setTranslate(newTranslate);
2940
+ swiper.updateActiveIndex();
2941
+ swiper.updateSlidesClasses();
2942
+ }
2943
+ let translated;
2944
+ if (swiper.params.freeMode) {
2945
+ setTranslate();
2946
+ if (swiper.params.autoHeight) {
2947
+ swiper.updateAutoHeight();
2948
+ }
2949
+ } else {
2950
+ if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
2951
+ translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
2952
+ } else {
2953
+ translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
2954
+ }
2955
+ if (!translated) {
2956
+ setTranslate();
2957
+ }
2958
+ }
2959
+ if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
2960
+ swiper.checkOverflow();
2961
+ }
2962
+ swiper.emit('update');
2963
+ }
2964
+ init() {
2965
+ const swiper = this;
2966
+ if (swiper.initialized) return;
2967
+
2968
+ swiper.emit('beforeInit');
2969
+
2970
+ // Set breakpoint
2971
+ if (swiper.params.breakpoints) {
2972
+ swiper.setBreakpoint();
2973
+ }
2974
+
2975
+ // Add Classes
2976
+ swiper.addClasses();
2977
+
2978
+ // Create loop
2979
+ if (swiper.params.loop) {
2980
+ swiper.loopCreate();
2981
+ }
2982
+
2983
+ // Update size
2984
+ swiper.updateSize();
2985
+
2986
+ // Update slides
2987
+ swiper.updateSlides();
2988
+
2989
+ if (swiper.params.watchOverflow) {
2990
+ swiper.checkOverflow();
2991
+ }
2992
+
2993
+ // Set Grab Cursor
2994
+ if (swiper.params.grabCursor) {
2995
+ swiper.setGrabCursor();
2996
+ }
2997
+
2998
+ if (swiper.params.preloadImages) {
2999
+ swiper.preloadImages();
3000
+ }
3001
+
3002
+ // Slide To Initial Slide
3003
+ if (swiper.params.loop) {
3004
+ swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
3005
+ } else {
3006
+ swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
3007
+ }
3008
+
3009
+ // Attach events
3010
+ swiper.attachEvents();
3011
+
3012
+ // Init Flag
3013
+ swiper.initialized = true;
3014
+
3015
+ // Emit
3016
+ swiper.emit('init');
3017
+ }
3018
+ destroy(deleteInstance = true, cleanStyles = true) {
3019
+ const swiper = this;
3020
+ const {
3021
+ params, $el, $wrapperEl, slides,
3022
+ } = swiper;
3023
+
3024
+ if (typeof swiper.params === 'undefined' || swiper.destroyed) {
3025
+ return null;
3026
+ }
3027
+
3028
+ swiper.emit('beforeDestroy');
3029
+
3030
+ // Init Flag
3031
+ swiper.initialized = false;
3032
+
3033
+ // Detach events
3034
+ swiper.detachEvents();
3035
+
3036
+ // Destroy loop
3037
+ if (params.loop) {
3038
+ swiper.loopDestroy();
3039
+ }
3040
+
3041
+ // Cleanup styles
3042
+ if (cleanStyles) {
3043
+ swiper.removeClasses();
3044
+ $el.removeAttr('style');
3045
+ $wrapperEl.removeAttr('style');
3046
+ if (slides && slides.length) {
3047
+ slides
3048
+ .removeClass([
3049
+ params.slideVisibleClass,
3050
+ params.slideActiveClass,
3051
+ params.slideNextClass,
3052
+ params.slidePrevClass,
3053
+ ].join(' '))
3054
+ .removeAttr('style')
3055
+ .removeAttr('data-swiper-slide-index')
3056
+ .removeAttr('data-swiper-column')
3057
+ .removeAttr('data-swiper-row');
3058
+ }
3059
+ }
3060
+
3061
+ swiper.emit('destroy');
3062
+
3063
+ // Detach emitter events
3064
+ Object.keys(swiper.eventsListeners).forEach((eventName) => {
3065
+ swiper.off(eventName);
3066
+ });
3067
+
3068
+ if (deleteInstance !== false) {
3069
+ swiper.$el[0].swiper = null;
3070
+ swiper.$el.data('swiper', null);
3071
+ Utils.deleteProps(swiper);
3072
+ }
3073
+ swiper.destroyed = true;
3074
+
3075
+ return null;
3076
+ }
3077
+ static extendDefaults(newDefaults) {
3078
+ Utils.extend(extendedDefaults, newDefaults);
3079
+ }
3080
+ static get extendedDefaults() {
3081
+ return extendedDefaults;
3082
+ }
3083
+ static get defaults() {
3084
+ return defaults;
3085
+ }
3086
+ static get Class() {
3087
+ return SwiperClass;
3088
+ }
3089
+ static get $() {
3090
+ return $;
3091
+ }
3092
+ }
3093
+
3094
+ var Device$1 = {
3095
+ name: 'device',
3096
+ proto: {
3097
+ device: Device,
3098
+ },
3099
+ static: {
3100
+ device: Device,
3101
+ },
3102
+ };
3103
+
3104
+ var Support$1 = {
3105
+ name: 'support',
3106
+ proto: {
3107
+ support: Support,
3108
+ },
3109
+ static: {
3110
+ support: Support,
3111
+ },
3112
+ };
3113
+
3114
+ var Browser$1 = {
3115
+ name: 'browser',
3116
+ proto: {
3117
+ browser: Browser,
3118
+ },
3119
+ static: {
3120
+ browser: Browser,
3121
+ },
3122
+ };
3123
+
3124
+ var Resize = {
3125
+ name: 'resize',
3126
+ create() {
3127
+ const swiper = this;
3128
+ Utils.extend(swiper, {
3129
+ resize: {
3130
+ resizeHandler() {
3131
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
3132
+ swiper.emit('beforeResize');
3133
+ swiper.emit('resize');
3134
+ },
3135
+ orientationChangeHandler() {
3136
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
3137
+ swiper.emit('orientationchange');
3138
+ },
3139
+ },
3140
+ });
3141
+ },
3142
+ on: {
3143
+ init() {
3144
+ const swiper = this;
3145
+ // Emit resize
3146
+ window.addEventListener('resize', swiper.resize.resizeHandler);
3147
+
3148
+ // Emit orientationchange
3149
+ window.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
3150
+ },
3151
+ destroy() {
3152
+ const swiper = this;
3153
+ window.removeEventListener('resize', swiper.resize.resizeHandler);
3154
+ window.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
3155
+ },
3156
+ },
3157
+ };
3158
+
3159
+ const Observer = {
3160
+ func: window.MutationObserver || window.WebkitMutationObserver,
3161
+ attach(target, options = {}) {
3162
+ const swiper = this;
3163
+
3164
+ const ObserverFunc = Observer.func;
3165
+ const observer = new ObserverFunc((mutations) => {
3166
+ mutations.forEach((mutation) => {
3167
+ swiper.emit('observerUpdate', mutation);
3168
+ });
3169
+ });
3170
+
3171
+ observer.observe(target, {
3172
+ attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
3173
+ childList: typeof options.childList === 'undefined' ? true : options.childList,
3174
+ characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
3175
+ });
3176
+
3177
+ swiper.observer.observers.push(observer);
3178
+ },
3179
+ init() {
3180
+ const swiper = this;
3181
+ if (!Support.observer || !swiper.params.observer) return;
3182
+ if (swiper.params.observeParents) {
3183
+ const containerParents = swiper.$el.parents();
3184
+ for (let i = 0; i < containerParents.length; i += 1) {
3185
+ swiper.observer.attach(containerParents[i]);
3186
+ }
3187
+ }
3188
+ // Observe container
3189
+ swiper.observer.attach(swiper.$el[0], { childList: false });
3190
+
3191
+ // Observe wrapper
3192
+ swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
3193
+ },
3194
+ destroy() {
3195
+ const swiper = this;
3196
+ swiper.observer.observers.forEach((observer) => {
3197
+ observer.disconnect();
3198
+ });
3199
+ swiper.observer.observers = [];
3200
+ },
3201
+ };
3202
+
3203
+ var Observer$1 = {
3204
+ name: 'observer',
3205
+ params: {
3206
+ observer: false,
3207
+ observeParents: false,
3208
+ },
3209
+ create() {
3210
+ const swiper = this;
3211
+ Utils.extend(swiper, {
3212
+ observer: {
3213
+ init: Observer.init.bind(swiper),
3214
+ attach: Observer.attach.bind(swiper),
3215
+ destroy: Observer.destroy.bind(swiper),
3216
+ observers: [],
3217
+ },
3218
+ });
3219
+ },
3220
+ on: {
3221
+ init() {
3222
+ const swiper = this;
3223
+ swiper.observer.init();
3224
+ },
3225
+ destroy() {
3226
+ const swiper = this;
3227
+ swiper.observer.destroy();
3228
+ },
3229
+ },
3230
+ };
3231
+
3232
+ const Virtual = {
3233
+ update(force) {
3234
+ const swiper = this;
3235
+ const { slidesPerView, slidesPerGroup, centeredSlides } = swiper.params;
3236
+ const {
3237
+ from: previousFrom,
3238
+ to: previousTo,
3239
+ slides,
3240
+ slidesGrid: previousSlidesGrid,
3241
+ renderSlide,
3242
+ offset: previousOffset,
3243
+ } = swiper.virtual;
3244
+ swiper.updateActiveIndex();
3245
+ const activeIndex = swiper.activeIndex || 0;
3246
+
3247
+ let offsetProp;
3248
+ if (swiper.rtlTranslate) offsetProp = 'right';
3249
+ else offsetProp = swiper.isHorizontal() ? 'left' : 'top';
3250
+
3251
+ let slidesAfter;
3252
+ let slidesBefore;
3253
+ if (centeredSlides) {
3254
+ slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup;
3255
+ slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup;
3256
+ } else {
3257
+ slidesAfter = slidesPerView + (slidesPerGroup - 1);
3258
+ slidesBefore = slidesPerGroup;
3259
+ }
3260
+ const from = Math.max((activeIndex || 0) - slidesBefore, 0);
3261
+ const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
3262
+ const offset$$1 = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
3263
+
3264
+ Utils.extend(swiper.virtual, {
3265
+ from,
3266
+ to,
3267
+ offset: offset$$1,
3268
+ slidesGrid: swiper.slidesGrid,
3269
+ });
3270
+
3271
+ function onRendered() {
3272
+ swiper.updateSlides();
3273
+ swiper.updateProgress();
3274
+ swiper.updateSlidesClasses();
3275
+ if (swiper.lazy && swiper.params.lazy.enabled) {
3276
+ swiper.lazy.load();
3277
+ }
3278
+ }
3279
+
3280
+ if (previousFrom === from && previousTo === to && !force) {
3281
+ if (swiper.slidesGrid !== previousSlidesGrid && offset$$1 !== previousOffset) {
3282
+ swiper.slides.css(offsetProp, `${offset$$1}px`);
3283
+ }
3284
+ swiper.updateProgress();
3285
+ return;
3286
+ }
3287
+ if (swiper.params.virtual.renderExternal) {
3288
+ swiper.params.virtual.renderExternal.call(swiper, {
3289
+ offset: offset$$1,
3290
+ from,
3291
+ to,
3292
+ slides: (function getSlides() {
3293
+ const slidesToRender = [];
3294
+ for (let i = from; i <= to; i += 1) {
3295
+ slidesToRender.push(slides[i]);
3296
+ }
3297
+ return slidesToRender;
3298
+ }()),
3299
+ });
3300
+ onRendered();
3301
+ return;
3302
+ }
3303
+ const prependIndexes = [];
3304
+ const appendIndexes = [];
3305
+ if (force) {
3306
+ swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();
3307
+ } else {
3308
+ for (let i = previousFrom; i <= previousTo; i += 1) {
3309
+ if (i < from || i > to) {
3310
+ swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove();
3311
+ }
3312
+ }
3313
+ }
3314
+ for (let i = 0; i < slides.length; i += 1) {
3315
+ if (i >= from && i <= to) {
3316
+ if (typeof previousTo === 'undefined' || force) {
3317
+ appendIndexes.push(i);
3318
+ } else {
3319
+ if (i > previousTo) appendIndexes.push(i);
3320
+ if (i < previousFrom) prependIndexes.push(i);
3321
+ }
3322
+ }
3323
+ }
3324
+ appendIndexes.forEach((index$$1) => {
3325
+ swiper.$wrapperEl.append(renderSlide(slides[index$$1], index$$1));
3326
+ });
3327
+ prependIndexes.sort((a, b) => a < b).forEach((index$$1) => {
3328
+ swiper.$wrapperEl.prepend(renderSlide(slides[index$$1], index$$1));
3329
+ });
3330
+ swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset$$1}px`);
3331
+ onRendered();
3332
+ },
3333
+ renderSlide(slide, index$$1) {
3334
+ const swiper = this;
3335
+ const params = swiper.params.virtual;
3336
+ if (params.cache && swiper.virtual.cache[index$$1]) {
3337
+ return swiper.virtual.cache[index$$1];
3338
+ }
3339
+ const $slideEl = params.renderSlide
3340
+ ? $(params.renderSlide.call(swiper, slide, index$$1))
3341
+ : $(`<div class="${swiper.params.slideClass}" data-swiper-slide-index="${index$$1}">${slide}</div>`);
3342
+ if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index$$1);
3343
+ if (params.cache) swiper.virtual.cache[index$$1] = $slideEl;
3344
+ return $slideEl;
3345
+ },
3346
+ appendSlide(slide) {
3347
+ const swiper = this;
3348
+ swiper.virtual.slides.push(slide);
3349
+ swiper.virtual.update(true);
3350
+ },
3351
+ prependSlide(slide) {
3352
+ const swiper = this;
3353
+ swiper.virtual.slides.unshift(slide);
3354
+ if (swiper.params.virtual.cache) {
3355
+ const cache = swiper.virtual.cache;
3356
+ const newCache = {};
3357
+ Object.keys(cache).forEach((cachedIndex) => {
3358
+ newCache[cachedIndex + 1] = cache[cachedIndex];
3359
+ });
3360
+ swiper.virtual.cache = newCache;
3361
+ }
3362
+ swiper.virtual.update(true);
3363
+ swiper.slideNext(0);
3364
+ },
3365
+ };
3366
+
3367
+ var Virtual$1 = {
3368
+ name: 'virtual',
3369
+ params: {
3370
+ virtual: {
3371
+ enabled: false,
3372
+ slides: [],
3373
+ cache: true,
3374
+ renderSlide: null,
3375
+ renderExternal: null,
3376
+ },
3377
+ },
3378
+ create() {
3379
+ const swiper = this;
3380
+ Utils.extend(swiper, {
3381
+ virtual: {
3382
+ update: Virtual.update.bind(swiper),
3383
+ appendSlide: Virtual.appendSlide.bind(swiper),
3384
+ prependSlide: Virtual.prependSlide.bind(swiper),
3385
+ renderSlide: Virtual.renderSlide.bind(swiper),
3386
+ slides: swiper.params.virtual.slides,
3387
+ cache: {},
3388
+ },
3389
+ });
3390
+ },
3391
+ on: {
3392
+ beforeInit() {
3393
+ const swiper = this;
3394
+ if (!swiper.params.virtual.enabled) return;
3395
+ swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);
3396
+ const overwriteParams = {
3397
+ watchSlidesProgress: true,
3398
+ };
3399
+ Utils.extend(swiper.params, overwriteParams);
3400
+ Utils.extend(swiper.originalParams, overwriteParams);
3401
+
3402
+ swiper.virtual.update();
3403
+ },
3404
+ setTranslate() {
3405
+ const swiper = this;
3406
+ if (!swiper.params.virtual.enabled) return;
3407
+ swiper.virtual.update();
3408
+ },
3409
+ },
3410
+ };
3411
+
3412
+ const Keyboard = {
3413
+ handle(event) {
3414
+ const swiper = this;
3415
+ const { rtlTranslate: rtl } = swiper;
3416
+ let e = event;
3417
+ if (e.originalEvent) e = e.originalEvent; // jquery fix
3418
+ const kc = e.keyCode || e.charCode;
3419
+ // Directions locks
3420
+ if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) {
3421
+ return false;
3422
+ }
3423
+ if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) {
3424
+ return false;
3425
+ }
3426
+ if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
3427
+ return undefined;
3428
+ }
3429
+ if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
3430
+ return undefined;
3431
+ }
3432
+ if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
3433
+ let inView = false;
3434
+ // Check that swiper should be inside of visible area of window
3435
+ if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {
3436
+ return undefined;
3437
+ }
3438
+ const windowWidth = window.innerWidth;
3439
+ const windowHeight = window.innerHeight;
3440
+ const swiperOffset = swiper.$el.offset();
3441
+ if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;
3442
+ const swiperCoord = [
3443
+ [swiperOffset.left, swiperOffset.top],
3444
+ [swiperOffset.left + swiper.width, swiperOffset.top],
3445
+ [swiperOffset.left, swiperOffset.top + swiper.height],
3446
+ [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height],
3447
+ ];
3448
+ for (let i = 0; i < swiperCoord.length; i += 1) {
3449
+ const point = swiperCoord[i];
3450
+ if (
3451
+ point[0] >= 0 && point[0] <= windowWidth &&
3452
+ point[1] >= 0 && point[1] <= windowHeight
3453
+ ) {
3454
+ inView = true;
3455
+ }
3456
+ }
3457
+ if (!inView) return undefined;
3458
+ }
3459
+ if (swiper.isHorizontal()) {
3460
+ if (kc === 37 || kc === 39) {
3461
+ if (e.preventDefault) e.preventDefault();
3462
+ else e.returnValue = false;
3463
+ }
3464
+ if ((kc === 39 && !rtl) || (kc === 37 && rtl)) swiper.slideNext();
3465
+ if ((kc === 37 && !rtl) || (kc === 39 && rtl)) swiper.slidePrev();
3466
+ } else {
3467
+ if (kc === 38 || kc === 40) {
3468
+ if (e.preventDefault) e.preventDefault();
3469
+ else e.returnValue = false;
3470
+ }
3471
+ if (kc === 40) swiper.slideNext();
3472
+ if (kc === 38) swiper.slidePrev();
3473
+ }
3474
+ swiper.emit('keyPress', kc);
3475
+ return undefined;
3476
+ },
3477
+ enable() {
3478
+ const swiper = this;
3479
+ if (swiper.keyboard.enabled) return;
3480
+ $(document).on('keydown', swiper.keyboard.handle);
3481
+ swiper.keyboard.enabled = true;
3482
+ },
3483
+ disable() {
3484
+ const swiper = this;
3485
+ if (!swiper.keyboard.enabled) return;
3486
+ $(document).off('keydown', swiper.keyboard.handle);
3487
+ swiper.keyboard.enabled = false;
3488
+ },
3489
+ };
3490
+
3491
+ var Keyboard$1 = {
3492
+ name: 'keyboard',
3493
+ params: {
3494
+ keyboard: {
3495
+ enabled: false,
3496
+ onlyInViewport: true,
3497
+ },
3498
+ },
3499
+ create() {
3500
+ const swiper = this;
3501
+ Utils.extend(swiper, {
3502
+ keyboard: {
3503
+ enabled: false,
3504
+ enable: Keyboard.enable.bind(swiper),
3505
+ disable: Keyboard.disable.bind(swiper),
3506
+ handle: Keyboard.handle.bind(swiper),
3507
+ },
3508
+ });
3509
+ },
3510
+ on: {
3511
+ init() {
3512
+ const swiper = this;
3513
+ if (swiper.params.keyboard.enabled) {
3514
+ swiper.keyboard.enable();
3515
+ }
3516
+ },
3517
+ destroy() {
3518
+ const swiper = this;
3519
+ if (swiper.keyboard.enabled) {
3520
+ swiper.keyboard.disable();
3521
+ }
3522
+ },
3523
+ },
3524
+ };
3525
+
3526
+ function isEventSupported() {
3527
+ const eventName = 'onwheel';
3528
+ let isSupported = eventName in document;
3529
+
3530
+ if (!isSupported) {
3531
+ const element = document.createElement('div');
3532
+ element.setAttribute(eventName, 'return;');
3533
+ isSupported = typeof element[eventName] === 'function';
3534
+ }
3535
+
3536
+ if (!isSupported &&
3537
+ document.implementation &&
3538
+ document.implementation.hasFeature &&
3539
+ // always returns true in newer browsers as per the standard.
3540
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
3541
+ document.implementation.hasFeature('', '') !== true
3542
+ ) {
3543
+ // This is the only way to test support for the `wheel` event in IE9+.
3544
+ isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
3545
+ }
3546
+
3547
+ return isSupported;
3548
+ }
3549
+ const Mousewheel = {
3550
+ lastScrollTime: Utils.now(),
3551
+ event: (function getEvent() {
3552
+ if (window.navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll';
3553
+ return isEventSupported() ? 'wheel' : 'mousewheel';
3554
+ }()),
3555
+ normalize(e) {
3556
+ // Reasonable defaults
3557
+ const PIXEL_STEP = 10;
3558
+ const LINE_HEIGHT = 40;
3559
+ const PAGE_HEIGHT = 800;
3560
+
3561
+ let sX = 0;
3562
+ let sY = 0; // spinX, spinY
3563
+ let pX = 0;
3564
+ let pY = 0; // pixelX, pixelY
3565
+
3566
+ // Legacy
3567
+ if ('detail' in e) {
3568
+ sY = e.detail;
3569
+ }
3570
+ if ('wheelDelta' in e) {
3571
+ sY = -e.wheelDelta / 120;
3572
+ }
3573
+ if ('wheelDeltaY' in e) {
3574
+ sY = -e.wheelDeltaY / 120;
3575
+ }
3576
+ if ('wheelDeltaX' in e) {
3577
+ sX = -e.wheelDeltaX / 120;
3578
+ }
3579
+
3580
+ // side scrolling on FF with DOMMouseScroll
3581
+ if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
3582
+ sX = sY;
3583
+ sY = 0;
3584
+ }
3585
+
3586
+ pX = sX * PIXEL_STEP;
3587
+ pY = sY * PIXEL_STEP;
3588
+
3589
+ if ('deltaY' in e) {
3590
+ pY = e.deltaY;
3591
+ }
3592
+ if ('deltaX' in e) {
3593
+ pX = e.deltaX;
3594
+ }
3595
+
3596
+ if ((pX || pY) && e.deltaMode) {
3597
+ if (e.deltaMode === 1) { // delta in LINE units
3598
+ pX *= LINE_HEIGHT;
3599
+ pY *= LINE_HEIGHT;
3600
+ } else { // delta in PAGE units
3601
+ pX *= PAGE_HEIGHT;
3602
+ pY *= PAGE_HEIGHT;
3603
+ }
3604
+ }
3605
+
3606
+ // Fall-back if spin cannot be determined
3607
+ if (pX && !sX) {
3608
+ sX = (pX < 1) ? -1 : 1;
3609
+ }
3610
+ if (pY && !sY) {
3611
+ sY = (pY < 1) ? -1 : 1;
3612
+ }
3613
+
3614
+ return {
3615
+ spinX: sX,
3616
+ spinY: sY,
3617
+ pixelX: pX,
3618
+ pixelY: pY,
3619
+ };
3620
+ },
3621
+ handleMouseEnter() {
3622
+ const swiper = this;
3623
+ swiper.mouseEntered = true;
3624
+ },
3625
+ handleMouseLeave() {
3626
+ const swiper = this;
3627
+ swiper.mouseEntered = false;
3628
+ },
3629
+ handle(event) {
3630
+ let e = event;
3631
+ const swiper = this;
3632
+ const params = swiper.params.mousewheel;
3633
+
3634
+ if (!swiper.mouseEntered && !params.releaseOnEdges) return true;
3635
+
3636
+ if (e.originalEvent) e = e.originalEvent; // jquery fix
3637
+ let delta = 0;
3638
+ const rtlFactor = swiper.rtlTranslate ? -1 : 1;
3639
+
3640
+ const data$$1 = Mousewheel.normalize(e);
3641
+
3642
+ if (params.forceToAxis) {
3643
+ if (swiper.isHorizontal()) {
3644
+ if (Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY)) delta = data$$1.pixelX * rtlFactor;
3645
+ else return true;
3646
+ } else if (Math.abs(data$$1.pixelY) > Math.abs(data$$1.pixelX)) delta = data$$1.pixelY;
3647
+ else return true;
3648
+ } else {
3649
+ delta = Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY) ? -data$$1.pixelX * rtlFactor : -data$$1.pixelY;
3650
+ }
3651
+
3652
+ if (delta === 0) return true;
3653
+
3654
+ if (params.invert) delta = -delta;
3655
+
3656
+ if (!swiper.params.freeMode) {
3657
+ if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) {
3658
+ if (delta < 0) {
3659
+ if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
3660
+ swiper.slideNext();
3661
+ swiper.emit('scroll', e);
3662
+ } else if (params.releaseOnEdges) return true;
3663
+ } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
3664
+ swiper.slidePrev();
3665
+ swiper.emit('scroll', e);
3666
+ } else if (params.releaseOnEdges) return true;
3667
+ }
3668
+ swiper.mousewheel.lastScrollTime = (new window.Date()).getTime();
3669
+ } else {
3670
+ // Freemode or scrollContainer:
3671
+ if (swiper.params.loop) {
3672
+ swiper.loopFix();
3673
+ }
3674
+ let position = swiper.getTranslate() + (delta * params.sensitivity);
3675
+ const wasBeginning = swiper.isBeginning;
3676
+ const wasEnd = swiper.isEnd;
3677
+
3678
+ if (position >= swiper.minTranslate()) position = swiper.minTranslate();
3679
+ if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();
3680
+
3681
+ swiper.setTransition(0);
3682
+ swiper.setTranslate(position);
3683
+ swiper.updateProgress();
3684
+ swiper.updateActiveIndex();
3685
+ swiper.updateSlidesClasses();
3686
+
3687
+ if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
3688
+ swiper.updateSlidesClasses();
3689
+ }
3690
+
3691
+ if (swiper.params.freeModeSticky) {
3692
+ clearTimeout(swiper.mousewheel.timeout);
3693
+ swiper.mousewheel.timeout = Utils.nextTick(() => {
3694
+ swiper.slideToClosest();
3695
+ }, 300);
3696
+ }
3697
+ // Emit event
3698
+ swiper.emit('scroll', e);
3699
+
3700
+ // Stop autoplay
3701
+ if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();
3702
+ // Return page scroll on edge positions
3703
+ if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;
3704
+ }
3705
+
3706
+ if (e.preventDefault) e.preventDefault();
3707
+ else e.returnValue = false;
3708
+ return false;
3709
+ },
3710
+ enable() {
3711
+ const swiper = this;
3712
+ if (!Mousewheel.event) return false;
3713
+ if (swiper.mousewheel.enabled) return false;
3714
+ let target = swiper.$el;
3715
+ if (swiper.params.mousewheel.eventsTarged !== 'container') {
3716
+ target = $(swiper.params.mousewheel.eventsTarged);
3717
+ }
3718
+ target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
3719
+ target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
3720
+ target.on(Mousewheel.event, swiper.mousewheel.handle);
3721
+ swiper.mousewheel.enabled = true;
3722
+ return true;
3723
+ },
3724
+ disable() {
3725
+ const swiper = this;
3726
+ if (!Mousewheel.event) return false;
3727
+ if (!swiper.mousewheel.enabled) return false;
3728
+ let target = swiper.$el;
3729
+ if (swiper.params.mousewheel.eventsTarged !== 'container') {
3730
+ target = $(swiper.params.mousewheel.eventsTarged);
3731
+ }
3732
+ target.off(Mousewheel.event, swiper.mousewheel.handle);
3733
+ swiper.mousewheel.enabled = false;
3734
+ return true;
3735
+ },
3736
+ };
3737
+
3738
+ var Mousewheel$1 = {
3739
+ name: 'mousewheel',
3740
+ params: {
3741
+ mousewheel: {
3742
+ enabled: false,
3743
+ releaseOnEdges: false,
3744
+ invert: false,
3745
+ forceToAxis: false,
3746
+ sensitivity: 1,
3747
+ eventsTarged: 'container',
3748
+ },
3749
+ },
3750
+ create() {
3751
+ const swiper = this;
3752
+ Utils.extend(swiper, {
3753
+ mousewheel: {
3754
+ enabled: false,
3755
+ enable: Mousewheel.enable.bind(swiper),
3756
+ disable: Mousewheel.disable.bind(swiper),
3757
+ handle: Mousewheel.handle.bind(swiper),
3758
+ handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
3759
+ handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
3760
+ lastScrollTime: Utils.now(),
3761
+ },
3762
+ });
3763
+ },
3764
+ on: {
3765
+ init() {
3766
+ const swiper = this;
3767
+ if (swiper.params.mousewheel.enabled) swiper.mousewheel.enable();
3768
+ },
3769
+ destroy() {
3770
+ const swiper = this;
3771
+ if (swiper.mousewheel.enabled) swiper.mousewheel.disable();
3772
+ },
3773
+ },
3774
+ };
3775
+
3776
+ const Navigation = {
3777
+ update() {
3778
+ // Update Navigation Buttons
3779
+ const swiper = this;
3780
+ const params = swiper.params.navigation;
3781
+
3782
+ if (swiper.params.loop) return;
3783
+ const { $nextEl, $prevEl } = swiper.navigation;
3784
+
3785
+ if ($prevEl && $prevEl.length > 0) {
3786
+ if (swiper.isBeginning) {
3787
+ $prevEl.addClass(params.disabledClass);
3788
+ } else {
3789
+ $prevEl.removeClass(params.disabledClass);
3790
+ }
3791
+ $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
3792
+ }
3793
+ if ($nextEl && $nextEl.length > 0) {
3794
+ if (swiper.isEnd) {
3795
+ $nextEl.addClass(params.disabledClass);
3796
+ } else {
3797
+ $nextEl.removeClass(params.disabledClass);
3798
+ }
3799
+ $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
3800
+ }
3801
+ },
3802
+ init() {
3803
+ const swiper = this;
3804
+ const params = swiper.params.navigation;
3805
+ if (!(params.nextEl || params.prevEl)) return;
3806
+
3807
+ let $nextEl;
3808
+ let $prevEl;
3809
+ if (params.nextEl) {
3810
+ $nextEl = $(params.nextEl);
3811
+ if (
3812
+ swiper.params.uniqueNavElements &&
3813
+ typeof params.nextEl === 'string' &&
3814
+ $nextEl.length > 1 &&
3815
+ swiper.$el.find(params.nextEl).length === 1
3816
+ ) {
3817
+ $nextEl = swiper.$el.find(params.nextEl);
3818
+ }
3819
+ }
3820
+ if (params.prevEl) {
3821
+ $prevEl = $(params.prevEl);
3822
+ if (
3823
+ swiper.params.uniqueNavElements &&
3824
+ typeof params.prevEl === 'string' &&
3825
+ $prevEl.length > 1 &&
3826
+ swiper.$el.find(params.prevEl).length === 1
3827
+ ) {
3828
+ $prevEl = swiper.$el.find(params.prevEl);
3829
+ }
3830
+ }
3831
+
3832
+ if ($nextEl && $nextEl.length > 0) {
3833
+ $nextEl.on('click', (e) => {
3834
+ e.preventDefault();
3835
+ if (swiper.isEnd && !swiper.params.loop) return;
3836
+ swiper.slideNext();
3837
+ });
3838
+ }
3839
+ if ($prevEl && $prevEl.length > 0) {
3840
+ $prevEl.on('click', (e) => {
3841
+ e.preventDefault();
3842
+ if (swiper.isBeginning && !swiper.params.loop) return;
3843
+ swiper.slidePrev();
3844
+ });
3845
+ }
3846
+
3847
+ Utils.extend(swiper.navigation, {
3848
+ $nextEl,
3849
+ nextEl: $nextEl && $nextEl[0],
3850
+ $prevEl,
3851
+ prevEl: $prevEl && $prevEl[0],
3852
+ });
3853
+ },
3854
+ destroy() {
3855
+ const swiper = this;
3856
+ const { $nextEl, $prevEl } = swiper.navigation;
3857
+ if ($nextEl && $nextEl.length) {
3858
+ $nextEl.off('click');
3859
+ $nextEl.removeClass(swiper.params.navigation.disabledClass);
3860
+ }
3861
+ if ($prevEl && $prevEl.length) {
3862
+ $prevEl.off('click');
3863
+ $prevEl.removeClass(swiper.params.navigation.disabledClass);
3864
+ }
3865
+ },
3866
+ };
3867
+
3868
+ var Navigation$1 = {
3869
+ name: 'navigation',
3870
+ params: {
3871
+ navigation: {
3872
+ nextEl: null,
3873
+ prevEl: null,
3874
+
3875
+ hideOnClick: false,
3876
+ disabledClass: 'swiper-button-disabled',
3877
+ hiddenClass: 'swiper-button-hidden',
3878
+ lockClass: 'swiper-button-lock',
3879
+ },
3880
+ },
3881
+ create() {
3882
+ const swiper = this;
3883
+ Utils.extend(swiper, {
3884
+ navigation: {
3885
+ init: Navigation.init.bind(swiper),
3886
+ update: Navigation.update.bind(swiper),
3887
+ destroy: Navigation.destroy.bind(swiper),
3888
+ },
3889
+ });
3890
+ },
3891
+ on: {
3892
+ init() {
3893
+ const swiper = this;
3894
+ swiper.navigation.init();
3895
+ swiper.navigation.update();
3896
+ },
3897
+ toEdge() {
3898
+ const swiper = this;
3899
+ swiper.navigation.update();
3900
+ },
3901
+ fromEdge() {
3902
+ const swiper = this;
3903
+ swiper.navigation.update();
3904
+ },
3905
+ destroy() {
3906
+ const swiper = this;
3907
+ swiper.navigation.destroy();
3908
+ },
3909
+ click(e) {
3910
+ const swiper = this;
3911
+ const { $nextEl, $prevEl } = swiper.navigation;
3912
+ if (
3913
+ swiper.params.navigation.hideOnClick &&
3914
+ !$(e.target).is($prevEl) &&
3915
+ !$(e.target).is($nextEl)
3916
+ ) {
3917
+ if ($nextEl) $nextEl.toggleClass(swiper.params.navigation.hiddenClass);
3918
+ if ($prevEl) $prevEl.toggleClass(swiper.params.navigation.hiddenClass);
3919
+ }
3920
+ },
3921
+ },
3922
+ };
3923
+
3924
+ const Pagination = {
3925
+ update() {
3926
+ // Render || Update Pagination bullets/items
3927
+ const swiper = this;
3928
+ const rtl = swiper.rtl;
3929
+ const params = swiper.params.pagination;
3930
+ if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
3931
+ const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
3932
+ const $el = swiper.pagination.$el;
3933
+ // Current/Total
3934
+ let current;
3935
+ const total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
3936
+ if (swiper.params.loop) {
3937
+ current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
3938
+ if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
3939
+ current -= (slidesLength - (swiper.loopedSlides * 2));
3940
+ }
3941
+ if (current > total - 1) current -= total;
3942
+ if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;
3943
+ } else if (typeof swiper.snapIndex !== 'undefined') {
3944
+ current = swiper.snapIndex;
3945
+ } else {
3946
+ current = swiper.activeIndex || 0;
3947
+ }
3948
+ // Types
3949
+ if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
3950
+ const bullets = swiper.pagination.bullets;
3951
+ let firstIndex;
3952
+ let lastIndex;
3953
+ let midIndex;
3954
+ if (params.dynamicBullets) {
3955
+ swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
3956
+ $el.css(swiper.isHorizontal() ? 'width' : 'height', `${swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)}px`);
3957
+ if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
3958
+ swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
3959
+ if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
3960
+ swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
3961
+ } else if (swiper.pagination.dynamicBulletIndex < 0) {
3962
+ swiper.pagination.dynamicBulletIndex = 0;
3963
+ }
3964
+ }
3965
+ firstIndex = current - swiper.pagination.dynamicBulletIndex;
3966
+ lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
3967
+ midIndex = (lastIndex + firstIndex) / 2;
3968
+ }
3969
+ bullets.removeClass(`${params.bulletActiveClass} ${params.bulletActiveClass}-next ${params.bulletActiveClass}-next-next ${params.bulletActiveClass}-prev ${params.bulletActiveClass}-prev-prev ${params.bulletActiveClass}-main`);
3970
+ if ($el.length > 1) {
3971
+ bullets.each((index$$1, bullet) => {
3972
+ const $bullet = $(bullet);
3973
+ const bulletIndex = $bullet.index();
3974
+ if (bulletIndex === current) {
3975
+ $bullet.addClass(params.bulletActiveClass);
3976
+ }
3977
+ if (params.dynamicBullets) {
3978
+ if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
3979
+ $bullet.addClass(`${params.bulletActiveClass}-main`);
3980
+ }
3981
+ if (bulletIndex === firstIndex) {
3982
+ $bullet
3983
+ .prev()
3984
+ .addClass(`${params.bulletActiveClass}-prev`)
3985
+ .prev()
3986
+ .addClass(`${params.bulletActiveClass}-prev-prev`);
3987
+ }
3988
+ if (bulletIndex === lastIndex) {
3989
+ $bullet
3990
+ .next()
3991
+ .addClass(`${params.bulletActiveClass}-next`)
3992
+ .next()
3993
+ .addClass(`${params.bulletActiveClass}-next-next`);
3994
+ }
3995
+ }
3996
+ });
3997
+ } else {
3998
+ const $bullet = bullets.eq(current);
3999
+ $bullet.addClass(params.bulletActiveClass);
4000
+ if (params.dynamicBullets) {
4001
+ const $firstDisplayedBullet = bullets.eq(firstIndex);
4002
+ const $lastDisplayedBullet = bullets.eq(lastIndex);
4003
+ for (let i = firstIndex; i <= lastIndex; i += 1) {
4004
+ bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);
4005
+ }
4006
+ $firstDisplayedBullet
4007
+ .prev()
4008
+ .addClass(`${params.bulletActiveClass}-prev`)
4009
+ .prev()
4010
+ .addClass(`${params.bulletActiveClass}-prev-prev`);
4011
+ $lastDisplayedBullet
4012
+ .next()
4013
+ .addClass(`${params.bulletActiveClass}-next`)
4014
+ .next()
4015
+ .addClass(`${params.bulletActiveClass}-next-next`);
4016
+ }
4017
+ }
4018
+ if (params.dynamicBullets) {
4019
+ const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
4020
+ const bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
4021
+ const offsetProp = rtl ? 'right' : 'left';
4022
+ bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);
4023
+ }
4024
+ }
4025
+ if (params.type === 'fraction') {
4026
+ $el.find(`.${params.currentClass}`).text(params.formatFractionCurrent(current + 1));
4027
+ $el.find(`.${params.totalClass}`).text(params.formatFractionTotal(total));
4028
+ }
4029
+ if (params.type === 'progressbar') {
4030
+ let progressbarDirection;
4031
+ if (params.progressbarOpposite) {
4032
+ progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
4033
+ } else {
4034
+ progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
4035
+ }
4036
+ const scale = (current + 1) / total;
4037
+ let scaleX = 1;
4038
+ let scaleY = 1;
4039
+ if (progressbarDirection === 'horizontal') {
4040
+ scaleX = scale;
4041
+ } else {
4042
+ scaleY = scale;
4043
+ }
4044
+ $el.find(`.${params.progressbarFillClass}`).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);
4045
+ }
4046
+ if (params.type === 'custom' && params.renderCustom) {
4047
+ $el.html(params.renderCustom(swiper, current + 1, total));
4048
+ swiper.emit('paginationRender', swiper, $el[0]);
4049
+ } else {
4050
+ swiper.emit('paginationUpdate', swiper, $el[0]);
4051
+ }
4052
+ $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4053
+ },
4054
+ render() {
4055
+ // Render Container
4056
+ const swiper = this;
4057
+ const params = swiper.params.pagination;
4058
+ if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4059
+ const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
4060
+
4061
+ const $el = swiper.pagination.$el;
4062
+ let paginationHTML = '';
4063
+ if (params.type === 'bullets') {
4064
+ const numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
4065
+ for (let i = 0; i < numberOfBullets; i += 1) {
4066
+ if (params.renderBullet) {
4067
+ paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
4068
+ } else {
4069
+ paginationHTML += `<${params.bulletElement} class="${params.bulletClass}"></${params.bulletElement}>`;
4070
+ }
4071
+ }
4072
+ $el.html(paginationHTML);
4073
+ swiper.pagination.bullets = $el.find(`.${params.bulletClass}`);
4074
+ }
4075
+ if (params.type === 'fraction') {
4076
+ if (params.renderFraction) {
4077
+ paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
4078
+ } else {
4079
+ paginationHTML =
4080
+ `<span class="${params.currentClass}"></span>` +
4081
+ ' / ' +
4082
+ `<span class="${params.totalClass}"></span>`;
4083
+ }
4084
+ $el.html(paginationHTML);
4085
+ }
4086
+ if (params.type === 'progressbar') {
4087
+ if (params.renderProgressbar) {
4088
+ paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
4089
+ } else {
4090
+ paginationHTML = `<span class="${params.progressbarFillClass}"></span>`;
4091
+ }
4092
+ $el.html(paginationHTML);
4093
+ }
4094
+ if (params.type !== 'custom') {
4095
+ swiper.emit('paginationRender', swiper.pagination.$el[0]);
4096
+ }
4097
+ },
4098
+ init() {
4099
+ const swiper = this;
4100
+ const params = swiper.params.pagination;
4101
+ if (!params.el) return;
4102
+
4103
+ let $el = $(params.el);
4104
+ if ($el.length === 0) return;
4105
+
4106
+ if (
4107
+ swiper.params.uniqueNavElements &&
4108
+ typeof params.el === 'string' &&
4109
+ $el.length > 1 &&
4110
+ swiper.$el.find(params.el).length === 1
4111
+ ) {
4112
+ $el = swiper.$el.find(params.el);
4113
+ }
4114
+
4115
+ if (params.type === 'bullets' && params.clickable) {
4116
+ $el.addClass(params.clickableClass);
4117
+ }
4118
+
4119
+ $el.addClass(params.modifierClass + params.type);
4120
+
4121
+ if (params.type === 'bullets' && params.dynamicBullets) {
4122
+ $el.addClass(`${params.modifierClass}${params.type}-dynamic`);
4123
+ swiper.pagination.dynamicBulletIndex = 0;
4124
+ if (params.dynamicMainBullets < 1) {
4125
+ params.dynamicMainBullets = 1;
4126
+ }
4127
+ }
4128
+ if (params.type === 'progressbar' && params.progressbarOpposite) {
4129
+ $el.addClass(params.progressbarOppositeClass);
4130
+ }
4131
+
4132
+ if (params.clickable) {
4133
+ $el.on('click', `.${params.bulletClass}`, function onClick(e) {
4134
+ e.preventDefault();
4135
+ let index$$1 = $(this).index() * swiper.params.slidesPerGroup;
4136
+ if (swiper.params.loop) index$$1 += swiper.loopedSlides;
4137
+ swiper.slideTo(index$$1);
4138
+ });
4139
+ }
4140
+
4141
+ Utils.extend(swiper.pagination, {
4142
+ $el,
4143
+ el: $el[0],
4144
+ });
4145
+ },
4146
+ destroy() {
4147
+ const swiper = this;
4148
+ const params = swiper.params.pagination;
4149
+ if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4150
+ const $el = swiper.pagination.$el;
4151
+
4152
+ $el.removeClass(params.hiddenClass);
4153
+ $el.removeClass(params.modifierClass + params.type);
4154
+ if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);
4155
+ if (params.clickable) {
4156
+ $el.off('click', `.${params.bulletClass}`);
4157
+ }
4158
+ },
4159
+ };
4160
+
4161
+ var Pagination$1 = {
4162
+ name: 'pagination',
4163
+ params: {
4164
+ pagination: {
4165
+ el: null,
4166
+ bulletElement: 'span',
4167
+ clickable: false,
4168
+ hideOnClick: false,
4169
+ renderBullet: null,
4170
+ renderProgressbar: null,
4171
+ renderFraction: null,
4172
+ renderCustom: null,
4173
+ progressbarOpposite: false,
4174
+ type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
4175
+ dynamicBullets: false,
4176
+ dynamicMainBullets: 1,
4177
+ formatFractionCurrent: number => number,
4178
+ formatFractionTotal: number => number,
4179
+ bulletClass: 'swiper-pagination-bullet',
4180
+ bulletActiveClass: 'swiper-pagination-bullet-active',
4181
+ modifierClass: 'swiper-pagination-', // NEW
4182
+ currentClass: 'swiper-pagination-current',
4183
+ totalClass: 'swiper-pagination-total',
4184
+ hiddenClass: 'swiper-pagination-hidden',
4185
+ progressbarFillClass: 'swiper-pagination-progressbar-fill',
4186
+ progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
4187
+ clickableClass: 'swiper-pagination-clickable', // NEW
4188
+ lockClass: 'swiper-pagination-lock',
4189
+ },
4190
+ },
4191
+ create() {
4192
+ const swiper = this;
4193
+ Utils.extend(swiper, {
4194
+ pagination: {
4195
+ init: Pagination.init.bind(swiper),
4196
+ render: Pagination.render.bind(swiper),
4197
+ update: Pagination.update.bind(swiper),
4198
+ destroy: Pagination.destroy.bind(swiper),
4199
+ dynamicBulletIndex: 0,
4200
+ },
4201
+ });
4202
+ },
4203
+ on: {
4204
+ init() {
4205
+ const swiper = this;
4206
+ swiper.pagination.init();
4207
+ swiper.pagination.render();
4208
+ swiper.pagination.update();
4209
+ },
4210
+ activeIndexChange() {
4211
+ const swiper = this;
4212
+ if (swiper.params.loop) {
4213
+ swiper.pagination.update();
4214
+ } else if (typeof swiper.snapIndex === 'undefined') {
4215
+ swiper.pagination.update();
4216
+ }
4217
+ },
4218
+ snapIndexChange() {
4219
+ const swiper = this;
4220
+ if (!swiper.params.loop) {
4221
+ swiper.pagination.update();
4222
+ }
4223
+ },
4224
+ slidesLengthChange() {
4225
+ const swiper = this;
4226
+ if (swiper.params.loop) {
4227
+ swiper.pagination.render();
4228
+ swiper.pagination.update();
4229
+ }
4230
+ },
4231
+ snapGridLengthChange() {
4232
+ const swiper = this;
4233
+ if (!swiper.params.loop) {
4234
+ swiper.pagination.render();
4235
+ swiper.pagination.update();
4236
+ }
4237
+ },
4238
+ destroy() {
4239
+ const swiper = this;
4240
+ swiper.pagination.destroy();
4241
+ },
4242
+ click(e) {
4243
+ const swiper = this;
4244
+ if (
4245
+ swiper.params.pagination.el &&
4246
+ swiper.params.pagination.hideOnClick &&
4247
+ swiper.pagination.$el.length > 0 &&
4248
+ !$(e.target).hasClass(swiper.params.pagination.bulletClass)
4249
+ ) {
4250
+ swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
4251
+ }
4252
+ },
4253
+ },
4254
+ };
4255
+
4256
+ const Scrollbar = {
4257
+ setTranslate() {
4258
+ const swiper = this;
4259
+ if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
4260
+ const { scrollbar, rtlTranslate: rtl, progress } = swiper;
4261
+ const {
4262
+ dragSize, trackSize, $dragEl, $el,
4263
+ } = scrollbar;
4264
+ const params = swiper.params.scrollbar;
4265
+
4266
+ let newSize = dragSize;
4267
+ let newPos = (trackSize - dragSize) * progress;
4268
+ if (rtl) {
4269
+ newPos = -newPos;
4270
+ if (newPos > 0) {
4271
+ newSize = dragSize - newPos;
4272
+ newPos = 0;
4273
+ } else if (-newPos + dragSize > trackSize) {
4274
+ newSize = trackSize + newPos;
4275
+ }
4276
+ } else if (newPos < 0) {
4277
+ newSize = dragSize + newPos;
4278
+ newPos = 0;
4279
+ } else if (newPos + dragSize > trackSize) {
4280
+ newSize = trackSize - newPos;
4281
+ }
4282
+ if (swiper.isHorizontal()) {
4283
+ if (Support.transforms3d) {
4284
+ $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);
4285
+ } else {
4286
+ $dragEl.transform(`translateX(${newPos}px)`);
4287
+ }
4288
+ $dragEl[0].style.width = `${newSize}px`;
4289
+ } else {
4290
+ if (Support.transforms3d) {
4291
+ $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);
4292
+ } else {
4293
+ $dragEl.transform(`translateY(${newPos}px)`);
4294
+ }
4295
+ $dragEl[0].style.height = `${newSize}px`;
4296
+ }
4297
+ if (params.hide) {
4298
+ clearTimeout(swiper.scrollbar.timeout);
4299
+ $el[0].style.opacity = 1;
4300
+ swiper.scrollbar.timeout = setTimeout(() => {
4301
+ $el[0].style.opacity = 0;
4302
+ $el.transition(400);
4303
+ }, 1000);
4304
+ }
4305
+ },
4306
+ setTransition(duration) {
4307
+ const swiper = this;
4308
+ if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
4309
+ swiper.scrollbar.$dragEl.transition(duration);
4310
+ },
4311
+ updateSize() {
4312
+ const swiper = this;
4313
+ if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
4314
+
4315
+ const { scrollbar } = swiper;
4316
+ const { $dragEl, $el } = scrollbar;
4317
+
4318
+ $dragEl[0].style.width = '';
4319
+ $dragEl[0].style.height = '';
4320
+ const trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
4321
+
4322
+ const divider = swiper.size / swiper.virtualSize;
4323
+ const moveDivider = divider * (trackSize / swiper.size);
4324
+ let dragSize;
4325
+ if (swiper.params.scrollbar.dragSize === 'auto') {
4326
+ dragSize = trackSize * divider;
4327
+ } else {
4328
+ dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
4329
+ }
4330
+
4331
+ if (swiper.isHorizontal()) {
4332
+ $dragEl[0].style.width = `${dragSize}px`;
4333
+ } else {
4334
+ $dragEl[0].style.height = `${dragSize}px`;
4335
+ }
4336
+
4337
+ if (divider >= 1) {
4338
+ $el[0].style.display = 'none';
4339
+ } else {
4340
+ $el[0].style.display = '';
4341
+ }
4342
+ if (swiper.params.scrollbarHide) {
4343
+ $el[0].style.opacity = 0;
4344
+ }
4345
+ Utils.extend(scrollbar, {
4346
+ trackSize,
4347
+ divider,
4348
+ moveDivider,
4349
+ dragSize,
4350
+ });
4351
+ scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
4352
+ },
4353
+ setDragPosition(e) {
4354
+ const swiper = this;
4355
+ const { scrollbar, rtlTranslate: rtl } = swiper;
4356
+ const { $el, dragSize, trackSize } = scrollbar;
4357
+
4358
+ let pointerPosition;
4359
+ if (swiper.isHorizontal()) {
4360
+ pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX);
4361
+ } else {
4362
+ pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY);
4363
+ }
4364
+ let positionRatio;
4365
+ positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize);
4366
+ positionRatio = Math.max(Math.min(positionRatio, 1), 0);
4367
+ if (rtl) {
4368
+ positionRatio = 1 - positionRatio;
4369
+ }
4370
+
4371
+ const position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
4372
+
4373
+ swiper.updateProgress(position);
4374
+ swiper.setTranslate(position);
4375
+ swiper.updateActiveIndex();
4376
+ swiper.updateSlidesClasses();
4377
+ },
4378
+ onDragStart(e) {
4379
+ const swiper = this;
4380
+ const params = swiper.params.scrollbar;
4381
+ const { scrollbar, $wrapperEl } = swiper;
4382
+ const { $el, $dragEl } = scrollbar;
4383
+ swiper.scrollbar.isTouched = true;
4384
+ e.preventDefault();
4385
+ e.stopPropagation();
4386
+
4387
+ $wrapperEl.transition(100);
4388
+ $dragEl.transition(100);
4389
+ scrollbar.setDragPosition(e);
4390
+
4391
+ clearTimeout(swiper.scrollbar.dragTimeout);
4392
+
4393
+ $el.transition(0);
4394
+ if (params.hide) {
4395
+ $el.css('opacity', 1);
4396
+ }
4397
+ swiper.emit('scrollbarDragStart', e);
4398
+ },
4399
+ onDragMove(e) {
4400
+ const swiper = this;
4401
+ const { scrollbar, $wrapperEl } = swiper;
4402
+ const { $el, $dragEl } = scrollbar;
4403
+
4404
+ if (!swiper.scrollbar.isTouched) return;
4405
+ if (e.preventDefault) e.preventDefault();
4406
+ else e.returnValue = false;
4407
+ scrollbar.setDragPosition(e);
4408
+ $wrapperEl.transition(0);
4409
+ $el.transition(0);
4410
+ $dragEl.transition(0);
4411
+ swiper.emit('scrollbarDragMove', e);
4412
+ },
4413
+ onDragEnd(e) {
4414
+ const swiper = this;
4415
+
4416
+ const params = swiper.params.scrollbar;
4417
+ const { scrollbar } = swiper;
4418
+ const { $el } = scrollbar;
4419
+
4420
+ if (!swiper.scrollbar.isTouched) return;
4421
+ swiper.scrollbar.isTouched = false;
4422
+ if (params.hide) {
4423
+ clearTimeout(swiper.scrollbar.dragTimeout);
4424
+ swiper.scrollbar.dragTimeout = Utils.nextTick(() => {
4425
+ $el.css('opacity', 0);
4426
+ $el.transition(400);
4427
+ }, 1000);
4428
+ }
4429
+ swiper.emit('scrollbarDragEnd', e);
4430
+ if (params.snapOnRelease) {
4431
+ swiper.slideToClosest();
4432
+ }
4433
+ },
4434
+ enableDraggable() {
4435
+ const swiper = this;
4436
+ if (!swiper.params.scrollbar.el) return;
4437
+ const {
4438
+ scrollbar, touchEvents, touchEventsDesktop, params,
4439
+ } = swiper;
4440
+ const $el = scrollbar.$el;
4441
+ const target = $el[0];
4442
+ const activeListener = Support.passiveListener && params.passiveListener ? { passive: false, capture: false } : false;
4443
+ const passiveListener = Support.passiveListener && params.passiveListener ? { passive: true, capture: false } : false;
4444
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
4445
+ target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
4446
+ document.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
4447
+ document.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
4448
+ } else {
4449
+ if (Support.touch) {
4450
+ target.addEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener);
4451
+ target.addEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener);
4452
+ target.addEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener);
4453
+ }
4454
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
4455
+ target.addEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener);
4456
+ document.addEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener);
4457
+ document.addEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener);
4458
+ }
4459
+ }
4460
+ },
4461
+ disableDraggable() {
4462
+ const swiper = this;
4463
+ if (!swiper.params.scrollbar.el) return;
4464
+ const {
4465
+ scrollbar, touchEvents, touchEventsDesktop, params,
4466
+ } = swiper;
4467
+ const $el = scrollbar.$el;
4468
+ const target = $el[0];
4469
+ const activeListener = Support.passiveListener && params.passiveListener ? { passive: false, capture: false } : false;
4470
+ const passiveListener = Support.passiveListener && params.passiveListener ? { passive: true, capture: false } : false;
4471
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
4472
+ target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
4473
+ document.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
4474
+ document.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
4475
+ } else {
4476
+ if (Support.touch) {
4477
+ target.removeEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener);
4478
+ target.removeEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener);
4479
+ target.removeEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener);
4480
+ }
4481
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
4482
+ target.removeEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener);
4483
+ document.removeEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener);
4484
+ document.removeEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener);
4485
+ }
4486
+ }
4487
+ },
4488
+ init() {
4489
+ const swiper = this;
4490
+ if (!swiper.params.scrollbar.el) return;
4491
+ const { scrollbar, $el: $swiperEl } = swiper;
4492
+ const params = swiper.params.scrollbar;
4493
+
4494
+ let $el = $(params.el);
4495
+ if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
4496
+ $el = $swiperEl.find(params.el);
4497
+ }
4498
+
4499
+ let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);
4500
+ if ($dragEl.length === 0) {
4501
+ $dragEl = $(`<div class="${swiper.params.scrollbar.dragClass}"></div>`);
4502
+ $el.append($dragEl);
4503
+ }
4504
+
4505
+ Utils.extend(scrollbar, {
4506
+ $el,
4507
+ el: $el[0],
4508
+ $dragEl,
4509
+ dragEl: $dragEl[0],
4510
+ });
4511
+
4512
+ if (params.draggable) {
4513
+ scrollbar.enableDraggable();
4514
+ }
4515
+ },
4516
+ destroy() {
4517
+ const swiper = this;
4518
+ swiper.scrollbar.disableDraggable();
4519
+ },
4520
+ };
4521
+
4522
+ var Scrollbar$1 = {
4523
+ name: 'scrollbar',
4524
+ params: {
4525
+ scrollbar: {
4526
+ el: null,
4527
+ dragSize: 'auto',
4528
+ hide: false,
4529
+ draggable: false,
4530
+ snapOnRelease: true,
4531
+ lockClass: 'swiper-scrollbar-lock',
4532
+ dragClass: 'swiper-scrollbar-drag',
4533
+ },
4534
+ },
4535
+ create() {
4536
+ const swiper = this;
4537
+ Utils.extend(swiper, {
4538
+ scrollbar: {
4539
+ init: Scrollbar.init.bind(swiper),
4540
+ destroy: Scrollbar.destroy.bind(swiper),
4541
+ updateSize: Scrollbar.updateSize.bind(swiper),
4542
+ setTranslate: Scrollbar.setTranslate.bind(swiper),
4543
+ setTransition: Scrollbar.setTransition.bind(swiper),
4544
+ enableDraggable: Scrollbar.enableDraggable.bind(swiper),
4545
+ disableDraggable: Scrollbar.disableDraggable.bind(swiper),
4546
+ setDragPosition: Scrollbar.setDragPosition.bind(swiper),
4547
+ onDragStart: Scrollbar.onDragStart.bind(swiper),
4548
+ onDragMove: Scrollbar.onDragMove.bind(swiper),
4549
+ onDragEnd: Scrollbar.onDragEnd.bind(swiper),
4550
+ isTouched: false,
4551
+ timeout: null,
4552
+ dragTimeout: null,
4553
+ },
4554
+ });
4555
+ },
4556
+ on: {
4557
+ init() {
4558
+ const swiper = this;
4559
+ swiper.scrollbar.init();
4560
+ swiper.scrollbar.updateSize();
4561
+ swiper.scrollbar.setTranslate();
4562
+ },
4563
+ update() {
4564
+ const swiper = this;
4565
+ swiper.scrollbar.updateSize();
4566
+ },
4567
+ resize() {
4568
+ const swiper = this;
4569
+ swiper.scrollbar.updateSize();
4570
+ },
4571
+ observerUpdate() {
4572
+ const swiper = this;
4573
+ swiper.scrollbar.updateSize();
4574
+ },
4575
+ setTranslate() {
4576
+ const swiper = this;
4577
+ swiper.scrollbar.setTranslate();
4578
+ },
4579
+ setTransition(duration) {
4580
+ const swiper = this;
4581
+ swiper.scrollbar.setTransition(duration);
4582
+ },
4583
+ destroy() {
4584
+ const swiper = this;
4585
+ swiper.scrollbar.destroy();
4586
+ },
4587
+ },
4588
+ };
4589
+
4590
+ const Parallax = {
4591
+ setTransform(el, progress) {
4592
+ const swiper = this;
4593
+ const { rtl } = swiper;
4594
+
4595
+ const $el = $(el);
4596
+ const rtlFactor = rtl ? -1 : 1;
4597
+
4598
+ const p = $el.attr('data-swiper-parallax') || '0';
4599
+ let x = $el.attr('data-swiper-parallax-x');
4600
+ let y = $el.attr('data-swiper-parallax-y');
4601
+ const scale = $el.attr('data-swiper-parallax-scale');
4602
+ const opacity = $el.attr('data-swiper-parallax-opacity');
4603
+
4604
+ if (x || y) {
4605
+ x = x || '0';
4606
+ y = y || '0';
4607
+ } else if (swiper.isHorizontal()) {
4608
+ x = p;
4609
+ y = '0';
4610
+ } else {
4611
+ y = p;
4612
+ x = '0';
4613
+ }
4614
+
4615
+ if ((x).indexOf('%') >= 0) {
4616
+ x = `${parseInt(x, 10) * progress * rtlFactor}%`;
4617
+ } else {
4618
+ x = `${x * progress * rtlFactor}px`;
4619
+ }
4620
+ if ((y).indexOf('%') >= 0) {
4621
+ y = `${parseInt(y, 10) * progress}%`;
4622
+ } else {
4623
+ y = `${y * progress}px`;
4624
+ }
4625
+
4626
+ if (typeof opacity !== 'undefined' && opacity !== null) {
4627
+ const currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
4628
+ $el[0].style.opacity = currentOpacity;
4629
+ }
4630
+ if (typeof scale === 'undefined' || scale === null) {
4631
+ $el.transform(`translate3d(${x}, ${y}, 0px)`);
4632
+ } else {
4633
+ const currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
4634
+ $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);
4635
+ }
4636
+ },
4637
+ setTranslate() {
4638
+ const swiper = this;
4639
+ const {
4640
+ $el, slides, progress, snapGrid,
4641
+ } = swiper;
4642
+ $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
4643
+ .each((index$$1, el) => {
4644
+ swiper.parallax.setTransform(el, progress);
4645
+ });
4646
+ slides.each((slideIndex, slideEl) => {
4647
+ let slideProgress = slideEl.progress;
4648
+ if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
4649
+ slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
4650
+ }
4651
+ slideProgress = Math.min(Math.max(slideProgress, -1), 1);
4652
+ $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
4653
+ .each((index$$1, el) => {
4654
+ swiper.parallax.setTransform(el, slideProgress);
4655
+ });
4656
+ });
4657
+ },
4658
+ setTransition(duration = this.params.speed) {
4659
+ const swiper = this;
4660
+ const { $el } = swiper;
4661
+ $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
4662
+ .each((index$$1, parallaxEl) => {
4663
+ const $parallaxEl = $(parallaxEl);
4664
+ let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
4665
+ if (duration === 0) parallaxDuration = 0;
4666
+ $parallaxEl.transition(parallaxDuration);
4667
+ });
4668
+ },
4669
+ };
4670
+
4671
+ var Parallax$1 = {
4672
+ name: 'parallax',
4673
+ params: {
4674
+ parallax: {
4675
+ enabled: false,
4676
+ },
4677
+ },
4678
+ create() {
4679
+ const swiper = this;
4680
+ Utils.extend(swiper, {
4681
+ parallax: {
4682
+ setTransform: Parallax.setTransform.bind(swiper),
4683
+ setTranslate: Parallax.setTranslate.bind(swiper),
4684
+ setTransition: Parallax.setTransition.bind(swiper),
4685
+ },
4686
+ });
4687
+ },
4688
+ on: {
4689
+ beforeInit() {
4690
+ const swiper = this;
4691
+ if (!swiper.params.parallax.enabled) return;
4692
+ swiper.params.watchSlidesProgress = true;
4693
+ },
4694
+ init() {
4695
+ const swiper = this;
4696
+ if (!swiper.params.parallax) return;
4697
+ swiper.parallax.setTranslate();
4698
+ },
4699
+ setTranslate() {
4700
+ const swiper = this;
4701
+ if (!swiper.params.parallax) return;
4702
+ swiper.parallax.setTranslate();
4703
+ },
4704
+ setTransition(duration) {
4705
+ const swiper = this;
4706
+ if (!swiper.params.parallax) return;
4707
+ swiper.parallax.setTransition(duration);
4708
+ },
4709
+ },
4710
+ };
4711
+
4712
+ const Zoom = {
4713
+ // Calc Scale From Multi-touches
4714
+ getDistanceBetweenTouches(e) {
4715
+ if (e.targetTouches.length < 2) return 1;
4716
+ const x1 = e.targetTouches[0].pageX;
4717
+ const y1 = e.targetTouches[0].pageY;
4718
+ const x2 = e.targetTouches[1].pageX;
4719
+ const y2 = e.targetTouches[1].pageY;
4720
+ const distance = Math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2));
4721
+ return distance;
4722
+ },
4723
+ // Events
4724
+ onGestureStart(e) {
4725
+ const swiper = this;
4726
+ const params = swiper.params.zoom;
4727
+ const zoom = swiper.zoom;
4728
+ const { gesture } = zoom;
4729
+ zoom.fakeGestureTouched = false;
4730
+ zoom.fakeGestureMoved = false;
4731
+ if (!Support.gestures) {
4732
+ if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
4733
+ return;
4734
+ }
4735
+ zoom.fakeGestureTouched = true;
4736
+ gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
4737
+ }
4738
+ if (!gesture.$slideEl || !gesture.$slideEl.length) {
4739
+ gesture.$slideEl = $(e.target).closest('.swiper-slide');
4740
+ if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
4741
+ gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
4742
+ gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
4743
+ gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
4744
+ if (gesture.$imageWrapEl.length === 0) {
4745
+ gesture.$imageEl = undefined;
4746
+ return;
4747
+ }
4748
+ }
4749
+ gesture.$imageEl.transition(0);
4750
+ swiper.zoom.isScaling = true;
4751
+ },
4752
+ onGestureChange(e) {
4753
+ const swiper = this;
4754
+ const params = swiper.params.zoom;
4755
+ const zoom = swiper.zoom;
4756
+ const { gesture } = zoom;
4757
+ if (!Support.gestures) {
4758
+ if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
4759
+ return;
4760
+ }
4761
+ zoom.fakeGestureMoved = true;
4762
+ gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
4763
+ }
4764
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4765
+ if (Support.gestures) {
4766
+ swiper.zoom.scale = e.scale * zoom.currentScale;
4767
+ } else {
4768
+ zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
4769
+ }
4770
+ if (zoom.scale > gesture.maxRatio) {
4771
+ zoom.scale = (gesture.maxRatio - 1) + (((zoom.scale - gesture.maxRatio) + 1) ** 0.5);
4772
+ }
4773
+ if (zoom.scale < params.minRatio) {
4774
+ zoom.scale = (params.minRatio + 1) - (((params.minRatio - zoom.scale) + 1) ** 0.5);
4775
+ }
4776
+ gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);
4777
+ },
4778
+ onGestureEnd(e) {
4779
+ const swiper = this;
4780
+ const params = swiper.params.zoom;
4781
+ const zoom = swiper.zoom;
4782
+ const { gesture } = zoom;
4783
+ if (!Support.gestures) {
4784
+ if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
4785
+ return;
4786
+ }
4787
+ if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
4788
+ return;
4789
+ }
4790
+ zoom.fakeGestureTouched = false;
4791
+ zoom.fakeGestureMoved = false;
4792
+ }
4793
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4794
+ zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
4795
+ gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
4796
+ zoom.currentScale = zoom.scale;
4797
+ zoom.isScaling = false;
4798
+ if (zoom.scale === 1) gesture.$slideEl = undefined;
4799
+ },
4800
+ onTouchStart(e) {
4801
+ const swiper = this;
4802
+ const zoom = swiper.zoom;
4803
+ const { gesture, image } = zoom;
4804
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4805
+ if (image.isTouched) return;
4806
+ if (Device.android) e.preventDefault();
4807
+ image.isTouched = true;
4808
+ image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
4809
+ image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
4810
+ },
4811
+ onTouchMove(e) {
4812
+ const swiper = this;
4813
+ const zoom = swiper.zoom;
4814
+ const { gesture, image, velocity } = zoom;
4815
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4816
+ swiper.allowClick = false;
4817
+ if (!image.isTouched || !gesture.$slideEl) return;
4818
+
4819
+ if (!image.isMoved) {
4820
+ image.width = gesture.$imageEl[0].offsetWidth;
4821
+ image.height = gesture.$imageEl[0].offsetHeight;
4822
+ image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
4823
+ image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
4824
+ gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
4825
+ gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
4826
+ gesture.$imageWrapEl.transition(0);
4827
+ if (swiper.rtl) {
4828
+ image.startX = -image.startX;
4829
+ image.startY = -image.startY;
4830
+ }
4831
+ }
4832
+ // Define if we need image drag
4833
+ const scaledWidth = image.width * zoom.scale;
4834
+ const scaledHeight = image.height * zoom.scale;
4835
+
4836
+ if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;
4837
+
4838
+ image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
4839
+ image.maxX = -image.minX;
4840
+ image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
4841
+ image.maxY = -image.minY;
4842
+
4843
+ image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
4844
+ image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
4845
+
4846
+ if (!image.isMoved && !zoom.isScaling) {
4847
+ if (
4848
+ swiper.isHorizontal() &&
4849
+ (
4850
+ (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x) ||
4851
+ (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
4852
+ )
4853
+ ) {
4854
+ image.isTouched = false;
4855
+ return;
4856
+ } else if (
4857
+ !swiper.isHorizontal() &&
4858
+ (
4859
+ (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y) ||
4860
+ (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
4861
+ )
4862
+ ) {
4863
+ image.isTouched = false;
4864
+ return;
4865
+ }
4866
+ }
4867
+ e.preventDefault();
4868
+ e.stopPropagation();
4869
+
4870
+ image.isMoved = true;
4871
+ image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
4872
+ image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
4873
+
4874
+ if (image.currentX < image.minX) {
4875
+ image.currentX = (image.minX + 1) - (((image.minX - image.currentX) + 1) ** 0.8);
4876
+ }
4877
+ if (image.currentX > image.maxX) {
4878
+ image.currentX = (image.maxX - 1) + (((image.currentX - image.maxX) + 1) ** 0.8);
4879
+ }
4880
+
4881
+ if (image.currentY < image.minY) {
4882
+ image.currentY = (image.minY + 1) - (((image.minY - image.currentY) + 1) ** 0.8);
4883
+ }
4884
+ if (image.currentY > image.maxY) {
4885
+ image.currentY = (image.maxY - 1) + (((image.currentY - image.maxY) + 1) ** 0.8);
4886
+ }
4887
+
4888
+ // Velocity
4889
+ if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;
4890
+ if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;
4891
+ if (!velocity.prevTime) velocity.prevTime = Date.now();
4892
+ velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
4893
+ velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
4894
+ if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;
4895
+ if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;
4896
+ velocity.prevPositionX = image.touchesCurrent.x;
4897
+ velocity.prevPositionY = image.touchesCurrent.y;
4898
+ velocity.prevTime = Date.now();
4899
+
4900
+ gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
4901
+ },
4902
+ onTouchEnd() {
4903
+ const swiper = this;
4904
+ const zoom = swiper.zoom;
4905
+ const { gesture, image, velocity } = zoom;
4906
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4907
+ if (!image.isTouched || !image.isMoved) {
4908
+ image.isTouched = false;
4909
+ image.isMoved = false;
4910
+ return;
4911
+ }
4912
+ image.isTouched = false;
4913
+ image.isMoved = false;
4914
+ let momentumDurationX = 300;
4915
+ let momentumDurationY = 300;
4916
+ const momentumDistanceX = velocity.x * momentumDurationX;
4917
+ const newPositionX = image.currentX + momentumDistanceX;
4918
+ const momentumDistanceY = velocity.y * momentumDurationY;
4919
+ const newPositionY = image.currentY + momentumDistanceY;
4920
+
4921
+ // Fix duration
4922
+ if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);
4923
+ if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);
4924
+ const momentumDuration = Math.max(momentumDurationX, momentumDurationY);
4925
+
4926
+ image.currentX = newPositionX;
4927
+ image.currentY = newPositionY;
4928
+
4929
+ // Define if we need image drag
4930
+ const scaledWidth = image.width * zoom.scale;
4931
+ const scaledHeight = image.height * zoom.scale;
4932
+ image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
4933
+ image.maxX = -image.minX;
4934
+ image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
4935
+ image.maxY = -image.minY;
4936
+ image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
4937
+ image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
4938
+
4939
+ gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
4940
+ },
4941
+ onTransitionEnd() {
4942
+ const swiper = this;
4943
+ const zoom = swiper.zoom;
4944
+ const { gesture } = zoom;
4945
+ if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
4946
+ gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
4947
+ gesture.$imageWrapEl.transform('translate3d(0,0,0)');
4948
+ gesture.$slideEl = undefined;
4949
+ gesture.$imageEl = undefined;
4950
+ gesture.$imageWrapEl = undefined;
4951
+
4952
+ zoom.scale = 1;
4953
+ zoom.currentScale = 1;
4954
+ }
4955
+ },
4956
+ // Toggle Zoom
4957
+ toggle(e) {
4958
+ const swiper = this;
4959
+ const zoom = swiper.zoom;
4960
+
4961
+ if (zoom.scale && zoom.scale !== 1) {
4962
+ // Zoom Out
4963
+ zoom.out();
4964
+ } else {
4965
+ // Zoom In
4966
+ zoom.in(e);
4967
+ }
4968
+ },
4969
+ in(e) {
4970
+ const swiper = this;
4971
+
4972
+ const zoom = swiper.zoom;
4973
+ const params = swiper.params.zoom;
4974
+ const { gesture, image } = zoom;
4975
+
4976
+ if (!gesture.$slideEl) {
4977
+ gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
4978
+ gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
4979
+ gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
4980
+ }
4981
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4982
+
4983
+ gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);
4984
+
4985
+ let touchX;
4986
+ let touchY;
4987
+ let offsetX;
4988
+ let offsetY;
4989
+ let diffX;
4990
+ let diffY;
4991
+ let translateX;
4992
+ let translateY;
4993
+ let imageWidth;
4994
+ let imageHeight;
4995
+ let scaledWidth;
4996
+ let scaledHeight;
4997
+ let translateMinX;
4998
+ let translateMinY;
4999
+ let translateMaxX;
5000
+ let translateMaxY;
5001
+ let slideWidth;
5002
+ let slideHeight;
5003
+
5004
+ if (typeof image.touchesStart.x === 'undefined' && e) {
5005
+ touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
5006
+ touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
5007
+ } else {
5008
+ touchX = image.touchesStart.x;
5009
+ touchY = image.touchesStart.y;
5010
+ }
5011
+
5012
+ zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5013
+ zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5014
+ if (e) {
5015
+ slideWidth = gesture.$slideEl[0].offsetWidth;
5016
+ slideHeight = gesture.$slideEl[0].offsetHeight;
5017
+ offsetX = gesture.$slideEl.offset().left;
5018
+ offsetY = gesture.$slideEl.offset().top;
5019
+ diffX = (offsetX + (slideWidth / 2)) - touchX;
5020
+ diffY = (offsetY + (slideHeight / 2)) - touchY;
5021
+
5022
+ imageWidth = gesture.$imageEl[0].offsetWidth;
5023
+ imageHeight = gesture.$imageEl[0].offsetHeight;
5024
+ scaledWidth = imageWidth * zoom.scale;
5025
+ scaledHeight = imageHeight * zoom.scale;
5026
+
5027
+ translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
5028
+ translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
5029
+ translateMaxX = -translateMinX;
5030
+ translateMaxY = -translateMinY;
5031
+
5032
+ translateX = diffX * zoom.scale;
5033
+ translateY = diffY * zoom.scale;
5034
+
5035
+ if (translateX < translateMinX) {
5036
+ translateX = translateMinX;
5037
+ }
5038
+ if (translateX > translateMaxX) {
5039
+ translateX = translateMaxX;
5040
+ }
5041
+
5042
+ if (translateY < translateMinY) {
5043
+ translateY = translateMinY;
5044
+ }
5045
+ if (translateY > translateMaxY) {
5046
+ translateY = translateMaxY;
5047
+ }
5048
+ } else {
5049
+ translateX = 0;
5050
+ translateY = 0;
5051
+ }
5052
+ gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);
5053
+ gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
5054
+ },
5055
+ out() {
5056
+ const swiper = this;
5057
+
5058
+ const zoom = swiper.zoom;
5059
+ const params = swiper.params.zoom;
5060
+ const { gesture } = zoom;
5061
+
5062
+ if (!gesture.$slideEl) {
5063
+ gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
5064
+ gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
5065
+ gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
5066
+ }
5067
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5068
+
5069
+ zoom.scale = 1;
5070
+ zoom.currentScale = 1;
5071
+ gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
5072
+ gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
5073
+ gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);
5074
+ gesture.$slideEl = undefined;
5075
+ },
5076
+ // Attach/Detach Events
5077
+ enable() {
5078
+ const swiper = this;
5079
+ const zoom = swiper.zoom;
5080
+ if (zoom.enabled) return;
5081
+ zoom.enabled = true;
5082
+
5083
+ const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
5084
+
5085
+ // Scale image
5086
+ if (Support.gestures) {
5087
+ swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
5088
+ swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
5089
+ swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
5090
+ } else if (swiper.touchEvents.start === 'touchstart') {
5091
+ swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
5092
+ swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
5093
+ swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
5094
+ }
5095
+
5096
+ // Move image
5097
+ swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove);
5098
+ },
5099
+ disable() {
5100
+ const swiper = this;
5101
+ const zoom = swiper.zoom;
5102
+ if (!zoom.enabled) return;
5103
+
5104
+ swiper.zoom.enabled = false;
5105
+
5106
+ const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
5107
+
5108
+ // Scale image
5109
+ if (Support.gestures) {
5110
+ swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
5111
+ swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
5112
+ swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
5113
+ } else if (swiper.touchEvents.start === 'touchstart') {
5114
+ swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
5115
+ swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
5116
+ swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
5117
+ }
5118
+
5119
+ // Move image
5120
+ swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove);
5121
+ },
5122
+ };
5123
+
5124
+ var Zoom$1 = {
5125
+ name: 'zoom',
5126
+ params: {
5127
+ zoom: {
5128
+ enabled: false,
5129
+ maxRatio: 3,
5130
+ minRatio: 1,
5131
+ toggle: true,
5132
+ containerClass: 'swiper-zoom-container',
5133
+ zoomedSlideClass: 'swiper-slide-zoomed',
5134
+ },
5135
+ },
5136
+ create() {
5137
+ const swiper = this;
5138
+ const zoom = {
5139
+ enabled: false,
5140
+ scale: 1,
5141
+ currentScale: 1,
5142
+ isScaling: false,
5143
+ gesture: {
5144
+ $slideEl: undefined,
5145
+ slideWidth: undefined,
5146
+ slideHeight: undefined,
5147
+ $imageEl: undefined,
5148
+ $imageWrapEl: undefined,
5149
+ maxRatio: 3,
5150
+ },
5151
+ image: {
5152
+ isTouched: undefined,
5153
+ isMoved: undefined,
5154
+ currentX: undefined,
5155
+ currentY: undefined,
5156
+ minX: undefined,
5157
+ minY: undefined,
5158
+ maxX: undefined,
5159
+ maxY: undefined,
5160
+ width: undefined,
5161
+ height: undefined,
5162
+ startX: undefined,
5163
+ startY: undefined,
5164
+ touchesStart: {},
5165
+ touchesCurrent: {},
5166
+ },
5167
+ velocity: {
5168
+ x: undefined,
5169
+ y: undefined,
5170
+ prevPositionX: undefined,
5171
+ prevPositionY: undefined,
5172
+ prevTime: undefined,
5173
+ },
5174
+ };
5175
+ ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach((methodName) => {
5176
+ zoom[methodName] = Zoom[methodName].bind(swiper);
5177
+ });
5178
+ Utils.extend(swiper, {
5179
+ zoom,
5180
+ });
5181
+ },
5182
+ on: {
5183
+ init() {
5184
+ const swiper = this;
5185
+ if (swiper.params.zoom.enabled) {
5186
+ swiper.zoom.enable();
5187
+ }
5188
+ },
5189
+ destroy() {
5190
+ const swiper = this;
5191
+ swiper.zoom.disable();
5192
+ },
5193
+ touchStart(e) {
5194
+ const swiper = this;
5195
+ if (!swiper.zoom.enabled) return;
5196
+ swiper.zoom.onTouchStart(e);
5197
+ },
5198
+ touchEnd(e) {
5199
+ const swiper = this;
5200
+ if (!swiper.zoom.enabled) return;
5201
+ swiper.zoom.onTouchEnd(e);
5202
+ },
5203
+ doubleTap(e) {
5204
+ const swiper = this;
5205
+ if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
5206
+ swiper.zoom.toggle(e);
5207
+ }
5208
+ },
5209
+ transitionEnd() {
5210
+ const swiper = this;
5211
+ if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
5212
+ swiper.zoom.onTransitionEnd();
5213
+ }
5214
+ },
5215
+ },
5216
+ };
5217
+
5218
+ const Lazy = {
5219
+ loadInSlide(index$$1, loadInDuplicate = true) {
5220
+ const swiper = this;
5221
+ const params = swiper.params.lazy;
5222
+ if (typeof index$$1 === 'undefined') return;
5223
+ if (swiper.slides.length === 0) return;
5224
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
5225
+
5226
+ const $slideEl = isVirtual
5227
+ ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index$$1}"]`)
5228
+ : swiper.slides.eq(index$$1);
5229
+
5230
+ let $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);
5231
+ if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
5232
+ $images = $images.add($slideEl[0]);
5233
+ }
5234
+ if ($images.length === 0) return;
5235
+
5236
+ $images.each((imageIndex, imageEl) => {
5237
+ const $imageEl = $(imageEl);
5238
+ $imageEl.addClass(params.loadingClass);
5239
+
5240
+ const background = $imageEl.attr('data-background');
5241
+ const src = $imageEl.attr('data-src');
5242
+ const srcset = $imageEl.attr('data-srcset');
5243
+ const sizes = $imageEl.attr('data-sizes');
5244
+
5245
+ swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, () => {
5246
+ if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) return;
5247
+ if (background) {
5248
+ $imageEl.css('background-image', `url("${background}")`);
5249
+ $imageEl.removeAttr('data-background');
5250
+ } else {
5251
+ if (srcset) {
5252
+ $imageEl.attr('srcset', srcset);
5253
+ $imageEl.removeAttr('data-srcset');
5254
+ }
5255
+ if (sizes) {
5256
+ $imageEl.attr('sizes', sizes);
5257
+ $imageEl.removeAttr('data-sizes');
5258
+ }
5259
+ if (src) {
5260
+ $imageEl.attr('src', src);
5261
+ $imageEl.removeAttr('data-src');
5262
+ }
5263
+ }
5264
+
5265
+ $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
5266
+ $slideEl.find(`.${params.preloaderClass}`).remove();
5267
+ if (swiper.params.loop && loadInDuplicate) {
5268
+ const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
5269
+ if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
5270
+ const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`);
5271
+ swiper.lazy.loadInSlide(originalSlide.index(), false);
5272
+ } else {
5273
+ const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`);
5274
+ swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
5275
+ }
5276
+ }
5277
+ swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
5278
+ });
5279
+
5280
+ swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
5281
+ });
5282
+ },
5283
+ load() {
5284
+ const swiper = this;
5285
+ const {
5286
+ $wrapperEl, params: swiperParams, slides, activeIndex,
5287
+ } = swiper;
5288
+ const isVirtual = swiper.virtual && swiperParams.virtual.enabled;
5289
+ const params = swiperParams.lazy;
5290
+
5291
+ let slidesPerView = swiperParams.slidesPerView;
5292
+ if (slidesPerView === 'auto') {
5293
+ slidesPerView = 0;
5294
+ }
5295
+
5296
+ function slideExist(index$$1) {
5297
+ if (isVirtual) {
5298
+ if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index$$1}"]`).length) {
5299
+ return true;
5300
+ }
5301
+ } else if (slides[index$$1]) return true;
5302
+ return false;
5303
+ }
5304
+ function slideIndex(slideEl) {
5305
+ if (isVirtual) {
5306
+ return $(slideEl).attr('data-swiper-slide-index');
5307
+ }
5308
+ return $(slideEl).index();
5309
+ }
5310
+
5311
+ if (!swiper.lazy.initialImageLoaded) swiper.lazy.initialImageLoaded = true;
5312
+ if (swiper.params.watchSlidesVisibility) {
5313
+ $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each((elIndex, slideEl) => {
5314
+ const index$$1 = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
5315
+ swiper.lazy.loadInSlide(index$$1);
5316
+ });
5317
+ } else if (slidesPerView > 1) {
5318
+ for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
5319
+ if (slideExist(i)) swiper.lazy.loadInSlide(i);
5320
+ }
5321
+ } else {
5322
+ swiper.lazy.loadInSlide(activeIndex);
5323
+ }
5324
+ if (params.loadPrevNext) {
5325
+ if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
5326
+ const amount = params.loadPrevNextAmount;
5327
+ const spv = slidesPerView;
5328
+ const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
5329
+ const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
5330
+ // Next Slides
5331
+ for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {
5332
+ if (slideExist(i)) swiper.lazy.loadInSlide(i);
5333
+ }
5334
+ // Prev Slides
5335
+ for (let i = minIndex; i < activeIndex; i += 1) {
5336
+ if (slideExist(i)) swiper.lazy.loadInSlide(i);
5337
+ }
5338
+ } else {
5339
+ const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);
5340
+ if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide));
5341
+
5342
+ const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);
5343
+ if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide));
5344
+ }
5345
+ }
5346
+ },
5347
+ };
5348
+
5349
+ var Lazy$1 = {
5350
+ name: 'lazy',
5351
+ params: {
5352
+ lazy: {
5353
+ enabled: false,
5354
+ loadPrevNext: false,
5355
+ loadPrevNextAmount: 1,
5356
+ loadOnTransitionStart: false,
5357
+
5358
+ elementClass: 'swiper-lazy',
5359
+ loadingClass: 'swiper-lazy-loading',
5360
+ loadedClass: 'swiper-lazy-loaded',
5361
+ preloaderClass: 'swiper-lazy-preloader',
5362
+ },
5363
+ },
5364
+ create() {
5365
+ const swiper = this;
5366
+ Utils.extend(swiper, {
5367
+ lazy: {
5368
+ initialImageLoaded: false,
5369
+ load: Lazy.load.bind(swiper),
5370
+ loadInSlide: Lazy.loadInSlide.bind(swiper),
5371
+ },
5372
+ });
5373
+ },
5374
+ on: {
5375
+ beforeInit() {
5376
+ const swiper = this;
5377
+ if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
5378
+ swiper.params.preloadImages = false;
5379
+ }
5380
+ },
5381
+ init() {
5382
+ const swiper = this;
5383
+ if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
5384
+ swiper.lazy.load();
5385
+ }
5386
+ },
5387
+ scroll() {
5388
+ const swiper = this;
5389
+ if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
5390
+ swiper.lazy.load();
5391
+ }
5392
+ },
5393
+ resize() {
5394
+ const swiper = this;
5395
+ if (swiper.params.lazy.enabled) {
5396
+ swiper.lazy.load();
5397
+ }
5398
+ },
5399
+ scrollbarDragMove() {
5400
+ const swiper = this;
5401
+ if (swiper.params.lazy.enabled) {
5402
+ swiper.lazy.load();
5403
+ }
5404
+ },
5405
+ transitionStart() {
5406
+ const swiper = this;
5407
+ if (swiper.params.lazy.enabled) {
5408
+ if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
5409
+ swiper.lazy.load();
5410
+ }
5411
+ }
5412
+ },
5413
+ transitionEnd() {
5414
+ const swiper = this;
5415
+ if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
5416
+ swiper.lazy.load();
5417
+ }
5418
+ },
5419
+ },
5420
+ };
5421
+
5422
+ /* eslint no-bitwise: ["error", { "allow": [">>"] }] */
5423
+
5424
+ const Controller = {
5425
+ LinearSpline: function LinearSpline(x, y) {
5426
+ const binarySearch = (function search() {
5427
+ let maxIndex;
5428
+ let minIndex;
5429
+ let guess;
5430
+ return (array, val) => {
5431
+ minIndex = -1;
5432
+ maxIndex = array.length;
5433
+ while (maxIndex - minIndex > 1) {
5434
+ guess = maxIndex + minIndex >> 1;
5435
+ if (array[guess] <= val) {
5436
+ minIndex = guess;
5437
+ } else {
5438
+ maxIndex = guess;
5439
+ }
5440
+ }
5441
+ return maxIndex;
5442
+ };
5443
+ }());
5444
+ this.x = x;
5445
+ this.y = y;
5446
+ this.lastIndex = x.length - 1;
5447
+ // Given an x value (x2), return the expected y2 value:
5448
+ // (x1,y1) is the known point before given value,
5449
+ // (x3,y3) is the known point after given value.
5450
+ let i1;
5451
+ let i3;
5452
+
5453
+ this.interpolate = function interpolate(x2) {
5454
+ if (!x2) return 0;
5455
+
5456
+ // Get the indexes of x1 and x3 (the array indexes before and after given x2):
5457
+ i3 = binarySearch(this.x, x2);
5458
+ i1 = i3 - 1;
5459
+
5460
+ // We have our indexes i1 & i3, so we can calculate already:
5461
+ // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
5462
+ return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
5463
+ };
5464
+ return this;
5465
+ },
5466
+ // xxx: for now i will just save one spline function to to
5467
+ getInterpolateFunction(c) {
5468
+ const swiper = this;
5469
+ if (!swiper.controller.spline) {
5470
+ swiper.controller.spline = swiper.params.loop ?
5471
+ new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid) :
5472
+ new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
5473
+ }
5474
+ },
5475
+ setTranslate(setTranslate, byController) {
5476
+ const swiper = this;
5477
+ const controlled = swiper.controller.control;
5478
+ let multiplier;
5479
+ let controlledTranslate;
5480
+ function setControlledTranslate(c) {
5481
+ // this will create an Interpolate function based on the snapGrids
5482
+ // x is the Grid of the scrolled scroller and y will be the controlled scroller
5483
+ // it makes sense to create this only once and recall it for the interpolation
5484
+ // the function does a lot of value caching for performance
5485
+ const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
5486
+ if (swiper.params.controller.by === 'slide') {
5487
+ swiper.controller.getInterpolateFunction(c);
5488
+ // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
5489
+ // but it did not work out
5490
+ controlledTranslate = -swiper.controller.spline.interpolate(-translate);
5491
+ }
5492
+
5493
+ if (!controlledTranslate || swiper.params.controller.by === 'container') {
5494
+ multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
5495
+ controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate();
5496
+ }
5497
+
5498
+ if (swiper.params.controller.inverse) {
5499
+ controlledTranslate = c.maxTranslate() - controlledTranslate;
5500
+ }
5501
+ c.updateProgress(controlledTranslate);
5502
+ c.setTranslate(controlledTranslate, swiper);
5503
+ c.updateActiveIndex();
5504
+ c.updateSlidesClasses();
5505
+ }
5506
+ if (Array.isArray(controlled)) {
5507
+ for (let i = 0; i < controlled.length; i += 1) {
5508
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
5509
+ setControlledTranslate(controlled[i]);
5510
+ }
5511
+ }
5512
+ } else if (controlled instanceof Swiper && byController !== controlled) {
5513
+ setControlledTranslate(controlled);
5514
+ }
5515
+ },
5516
+ setTransition(duration, byController) {
5517
+ const swiper = this;
5518
+ const controlled = swiper.controller.control;
5519
+ let i;
5520
+ function setControlledTransition(c) {
5521
+ c.setTransition(duration, swiper);
5522
+ if (duration !== 0) {
5523
+ c.transitionStart();
5524
+ c.$wrapperEl.transitionEnd(() => {
5525
+ if (!controlled) return;
5526
+ if (c.params.loop && swiper.params.controller.by === 'slide') {
5527
+ c.loopFix();
5528
+ }
5529
+ c.transitionEnd();
5530
+ });
5531
+ }
5532
+ }
5533
+ if (Array.isArray(controlled)) {
5534
+ for (i = 0; i < controlled.length; i += 1) {
5535
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
5536
+ setControlledTransition(controlled[i]);
5537
+ }
5538
+ }
5539
+ } else if (controlled instanceof Swiper && byController !== controlled) {
5540
+ setControlledTransition(controlled);
5541
+ }
5542
+ },
5543
+ };
5544
+ var Controller$1 = {
5545
+ name: 'controller',
5546
+ params: {
5547
+ controller: {
5548
+ control: undefined,
5549
+ inverse: false,
5550
+ by: 'slide', // or 'container'
5551
+ },
5552
+ },
5553
+ create() {
5554
+ const swiper = this;
5555
+ Utils.extend(swiper, {
5556
+ controller: {
5557
+ control: swiper.params.controller.control,
5558
+ getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),
5559
+ setTranslate: Controller.setTranslate.bind(swiper),
5560
+ setTransition: Controller.setTransition.bind(swiper),
5561
+ },
5562
+ });
5563
+ },
5564
+ on: {
5565
+ update() {
5566
+ const swiper = this;
5567
+ if (!swiper.controller.control) return;
5568
+ if (swiper.controller.spline) {
5569
+ swiper.controller.spline = undefined;
5570
+ delete swiper.controller.spline;
5571
+ }
5572
+ },
5573
+ resize() {
5574
+ const swiper = this;
5575
+ if (!swiper.controller.control) return;
5576
+ if (swiper.controller.spline) {
5577
+ swiper.controller.spline = undefined;
5578
+ delete swiper.controller.spline;
5579
+ }
5580
+ },
5581
+ observerUpdate() {
5582
+ const swiper = this;
5583
+ if (!swiper.controller.control) return;
5584
+ if (swiper.controller.spline) {
5585
+ swiper.controller.spline = undefined;
5586
+ delete swiper.controller.spline;
5587
+ }
5588
+ },
5589
+ setTranslate(translate, byController) {
5590
+ const swiper = this;
5591
+ if (!swiper.controller.control) return;
5592
+ swiper.controller.setTranslate(translate, byController);
5593
+ },
5594
+ setTransition(duration, byController) {
5595
+ const swiper = this;
5596
+ if (!swiper.controller.control) return;
5597
+ swiper.controller.setTransition(duration, byController);
5598
+ },
5599
+ },
5600
+ };
5601
+
5602
+ const a11y = {
5603
+ makeElFocusable($el) {
5604
+ $el.attr('tabIndex', '0');
5605
+ return $el;
5606
+ },
5607
+ addElRole($el, role) {
5608
+ $el.attr('role', role);
5609
+ return $el;
5610
+ },
5611
+ addElLabel($el, label) {
5612
+ $el.attr('aria-label', label);
5613
+ return $el;
5614
+ },
5615
+ disableEl($el) {
5616
+ $el.attr('aria-disabled', true);
5617
+ return $el;
5618
+ },
5619
+ enableEl($el) {
5620
+ $el.attr('aria-disabled', false);
5621
+ return $el;
5622
+ },
5623
+ onEnterKey(e) {
5624
+ const swiper = this;
5625
+ const params = swiper.params.a11y;
5626
+ if (e.keyCode !== 13) return;
5627
+ const $targetEl = $(e.target);
5628
+ if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
5629
+ if (!(swiper.isEnd && !swiper.params.loop)) {
5630
+ swiper.slideNext();
5631
+ }
5632
+ if (swiper.isEnd) {
5633
+ swiper.a11y.notify(params.lastSlideMessage);
5634
+ } else {
5635
+ swiper.a11y.notify(params.nextSlideMessage);
5636
+ }
5637
+ }
5638
+ if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
5639
+ if (!(swiper.isBeginning && !swiper.params.loop)) {
5640
+ swiper.slidePrev();
5641
+ }
5642
+ if (swiper.isBeginning) {
5643
+ swiper.a11y.notify(params.firstSlideMessage);
5644
+ } else {
5645
+ swiper.a11y.notify(params.prevSlideMessage);
5646
+ }
5647
+ }
5648
+ if (swiper.pagination && $targetEl.is(`.${swiper.params.pagination.bulletClass}`)) {
5649
+ $targetEl[0].click();
5650
+ }
5651
+ },
5652
+ notify(message) {
5653
+ const swiper = this;
5654
+ const notification = swiper.a11y.liveRegion;
5655
+ if (notification.length === 0) return;
5656
+ notification.html('');
5657
+ notification.html(message);
5658
+ },
5659
+ updateNavigation() {
5660
+ const swiper = this;
5661
+
5662
+ if (swiper.params.loop) return;
5663
+ const { $nextEl, $prevEl } = swiper.navigation;
5664
+
5665
+ if ($prevEl && $prevEl.length > 0) {
5666
+ if (swiper.isBeginning) {
5667
+ swiper.a11y.disableEl($prevEl);
5668
+ } else {
5669
+ swiper.a11y.enableEl($prevEl);
5670
+ }
5671
+ }
5672
+ if ($nextEl && $nextEl.length > 0) {
5673
+ if (swiper.isEnd) {
5674
+ swiper.a11y.disableEl($nextEl);
5675
+ } else {
5676
+ swiper.a11y.enableEl($nextEl);
5677
+ }
5678
+ }
5679
+ },
5680
+ updatePagination() {
5681
+ const swiper = this;
5682
+ const params = swiper.params.a11y;
5683
+ if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
5684
+ swiper.pagination.bullets.each((bulletIndex, bulletEl) => {
5685
+ const $bulletEl = $(bulletEl);
5686
+ swiper.a11y.makeElFocusable($bulletEl);
5687
+ swiper.a11y.addElRole($bulletEl, 'button');
5688
+ swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1));
5689
+ });
5690
+ }
5691
+ },
5692
+ init() {
5693
+ const swiper = this;
5694
+
5695
+ swiper.$el.append(swiper.a11y.liveRegion);
5696
+
5697
+ // Navigation
5698
+ const params = swiper.params.a11y;
5699
+ let $nextEl;
5700
+ let $prevEl;
5701
+ if (swiper.navigation && swiper.navigation.$nextEl) {
5702
+ $nextEl = swiper.navigation.$nextEl;
5703
+ }
5704
+ if (swiper.navigation && swiper.navigation.$prevEl) {
5705
+ $prevEl = swiper.navigation.$prevEl;
5706
+ }
5707
+ if ($nextEl) {
5708
+ swiper.a11y.makeElFocusable($nextEl);
5709
+ swiper.a11y.addElRole($nextEl, 'button');
5710
+ swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);
5711
+ $nextEl.on('keydown', swiper.a11y.onEnterKey);
5712
+ }
5713
+ if ($prevEl) {
5714
+ swiper.a11y.makeElFocusable($prevEl);
5715
+ swiper.a11y.addElRole($prevEl, 'button');
5716
+ swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);
5717
+ $prevEl.on('keydown', swiper.a11y.onEnterKey);
5718
+ }
5719
+
5720
+ // Pagination
5721
+ if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
5722
+ swiper.pagination.$el.on('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
5723
+ }
5724
+ },
5725
+ destroy() {
5726
+ const swiper = this;
5727
+ if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) swiper.a11y.liveRegion.remove();
5728
+
5729
+ let $nextEl;
5730
+ let $prevEl;
5731
+ if (swiper.navigation && swiper.navigation.$nextEl) {
5732
+ $nextEl = swiper.navigation.$nextEl;
5733
+ }
5734
+ if (swiper.navigation && swiper.navigation.$prevEl) {
5735
+ $prevEl = swiper.navigation.$prevEl;
5736
+ }
5737
+ if ($nextEl) {
5738
+ $nextEl.off('keydown', swiper.a11y.onEnterKey);
5739
+ }
5740
+ if ($prevEl) {
5741
+ $prevEl.off('keydown', swiper.a11y.onEnterKey);
5742
+ }
5743
+
5744
+ // Pagination
5745
+ if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
5746
+ swiper.pagination.$el.off('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
5747
+ }
5748
+ },
5749
+ };
5750
+ var A11y = {
5751
+ name: 'a11y',
5752
+ params: {
5753
+ a11y: {
5754
+ enabled: true,
5755
+ notificationClass: 'swiper-notification',
5756
+ prevSlideMessage: 'Previous slide',
5757
+ nextSlideMessage: 'Next slide',
5758
+ firstSlideMessage: 'This is the first slide',
5759
+ lastSlideMessage: 'This is the last slide',
5760
+ paginationBulletMessage: 'Go to slide {{index}}',
5761
+ },
5762
+ },
5763
+ create() {
5764
+ const swiper = this;
5765
+ Utils.extend(swiper, {
5766
+ a11y: {
5767
+ liveRegion: $(`<span class="${swiper.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`),
5768
+ },
5769
+ });
5770
+ Object.keys(a11y).forEach((methodName) => {
5771
+ swiper.a11y[methodName] = a11y[methodName].bind(swiper);
5772
+ });
5773
+ },
5774
+ on: {
5775
+ init() {
5776
+ const swiper = this;
5777
+ if (!swiper.params.a11y.enabled) return;
5778
+ swiper.a11y.init();
5779
+ swiper.a11y.updateNavigation();
5780
+ },
5781
+ toEdge() {
5782
+ const swiper = this;
5783
+ if (!swiper.params.a11y.enabled) return;
5784
+ swiper.a11y.updateNavigation();
5785
+ },
5786
+ fromEdge() {
5787
+ const swiper = this;
5788
+ if (!swiper.params.a11y.enabled) return;
5789
+ swiper.a11y.updateNavigation();
5790
+ },
5791
+ paginationUpdate() {
5792
+ const swiper = this;
5793
+ if (!swiper.params.a11y.enabled) return;
5794
+ swiper.a11y.updatePagination();
5795
+ },
5796
+ destroy() {
5797
+ const swiper = this;
5798
+ if (!swiper.params.a11y.enabled) return;
5799
+ swiper.a11y.destroy();
5800
+ },
5801
+ },
5802
+ };
5803
+
5804
+ const History = {
5805
+ init() {
5806
+ const swiper = this;
5807
+ if (!swiper.params.history) return;
5808
+ if (!window.history || !window.history.pushState) {
5809
+ swiper.params.history.enabled = false;
5810
+ swiper.params.hashNavigation.enabled = true;
5811
+ return;
5812
+ }
5813
+ const history = swiper.history;
5814
+ history.initialized = true;
5815
+ history.paths = History.getPathValues();
5816
+ if (!history.paths.key && !history.paths.value) return;
5817
+ history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);
5818
+ if (!swiper.params.history.replaceState) {
5819
+ window.addEventListener('popstate', swiper.history.setHistoryPopState);
5820
+ }
5821
+ },
5822
+ destroy() {
5823
+ const swiper = this;
5824
+ if (!swiper.params.history.replaceState) {
5825
+ window.removeEventListener('popstate', swiper.history.setHistoryPopState);
5826
+ }
5827
+ },
5828
+ setHistoryPopState() {
5829
+ const swiper = this;
5830
+ swiper.history.paths = History.getPathValues();
5831
+ swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
5832
+ },
5833
+ getPathValues() {
5834
+ const pathArray = window.location.pathname.slice(1).split('/').filter(part => part !== '');
5835
+ const total = pathArray.length;
5836
+ const key = pathArray[total - 2];
5837
+ const value = pathArray[total - 1];
5838
+ return { key, value };
5839
+ },
5840
+ setHistory(key, index$$1) {
5841
+ const swiper = this;
5842
+ if (!swiper.history.initialized || !swiper.params.history.enabled) return;
5843
+ const slide = swiper.slides.eq(index$$1);
5844
+ let value = History.slugify(slide.attr('data-history'));
5845
+ if (!window.location.pathname.includes(key)) {
5846
+ value = `${key}/${value}`;
5847
+ }
5848
+ const currentState = window.history.state;
5849
+ if (currentState && currentState.value === value) {
5850
+ return;
5851
+ }
5852
+ if (swiper.params.history.replaceState) {
5853
+ window.history.replaceState({ value }, null, value);
5854
+ } else {
5855
+ window.history.pushState({ value }, null, value);
5856
+ }
5857
+ },
5858
+ slugify(text$$1) {
5859
+ return text$$1.toString().toLowerCase()
5860
+ .replace(/\s+/g, '-')
5861
+ .replace(/[^\w-]+/g, '')
5862
+ .replace(/--+/g, '-')
5863
+ .replace(/^-+/, '')
5864
+ .replace(/-+$/, '');
5865
+ },
5866
+ scrollToSlide(speed, value, runCallbacks) {
5867
+ const swiper = this;
5868
+ if (value) {
5869
+ for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
5870
+ const slide = swiper.slides.eq(i);
5871
+ const slideHistory = History.slugify(slide.attr('data-history'));
5872
+ if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {
5873
+ const index$$1 = slide.index();
5874
+ swiper.slideTo(index$$1, speed, runCallbacks);
5875
+ }
5876
+ }
5877
+ } else {
5878
+ swiper.slideTo(0, speed, runCallbacks);
5879
+ }
5880
+ },
5881
+ };
5882
+
5883
+ var History$1 = {
5884
+ name: 'history',
5885
+ params: {
5886
+ history: {
5887
+ enabled: false,
5888
+ replaceState: false,
5889
+ key: 'slides',
5890
+ },
5891
+ },
5892
+ create() {
5893
+ const swiper = this;
5894
+ Utils.extend(swiper, {
5895
+ history: {
5896
+ init: History.init.bind(swiper),
5897
+ setHistory: History.setHistory.bind(swiper),
5898
+ setHistoryPopState: History.setHistoryPopState.bind(swiper),
5899
+ scrollToSlide: History.scrollToSlide.bind(swiper),
5900
+ destroy: History.destroy.bind(swiper),
5901
+ },
5902
+ });
5903
+ },
5904
+ on: {
5905
+ init() {
5906
+ const swiper = this;
5907
+ if (swiper.params.history.enabled) {
5908
+ swiper.history.init();
5909
+ }
5910
+ },
5911
+ destroy() {
5912
+ const swiper = this;
5913
+ if (swiper.params.history.enabled) {
5914
+ swiper.history.destroy();
5915
+ }
5916
+ },
5917
+ transitionEnd() {
5918
+ const swiper = this;
5919
+ if (swiper.history.initialized) {
5920
+ swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
5921
+ }
5922
+ },
5923
+ },
5924
+ };
5925
+
5926
+ const HashNavigation = {
5927
+ onHashCange() {
5928
+ const swiper = this;
5929
+ const newHash = document.location.hash.replace('#', '');
5930
+ const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');
5931
+ if (newHash !== activeSlideHash) {
5932
+ swiper.slideTo(swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index());
5933
+ }
5934
+ },
5935
+ setHash() {
5936
+ const swiper = this;
5937
+ if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) return;
5938
+ if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {
5939
+ window.history.replaceState(null, null, (`#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''));
5940
+ } else {
5941
+ const slide = swiper.slides.eq(swiper.activeIndex);
5942
+ const hash = slide.attr('data-hash') || slide.attr('data-history');
5943
+ document.location.hash = hash || '';
5944
+ }
5945
+ },
5946
+ init() {
5947
+ const swiper = this;
5948
+ if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) return;
5949
+ swiper.hashNavigation.initialized = true;
5950
+ const hash = document.location.hash.replace('#', '');
5951
+ if (hash) {
5952
+ const speed = 0;
5953
+ for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
5954
+ const slide = swiper.slides.eq(i);
5955
+ const slideHash = slide.attr('data-hash') || slide.attr('data-history');
5956
+ if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {
5957
+ const index$$1 = slide.index();
5958
+ swiper.slideTo(index$$1, speed, swiper.params.runCallbacksOnInit, true);
5959
+ }
5960
+ }
5961
+ }
5962
+ if (swiper.params.hashNavigation.watchState) {
5963
+ $(window).on('hashchange', swiper.hashNavigation.onHashCange);
5964
+ }
5965
+ },
5966
+ destroy() {
5967
+ const swiper = this;
5968
+ if (swiper.params.hashNavigation.watchState) {
5969
+ $(window).off('hashchange', swiper.hashNavigation.onHashCange);
5970
+ }
5971
+ },
5972
+ };
5973
+ var HashNavigation$1 = {
5974
+ name: 'hash-navigation',
5975
+ params: {
5976
+ hashNavigation: {
5977
+ enabled: false,
5978
+ replaceState: false,
5979
+ watchState: false,
5980
+ },
5981
+ },
5982
+ create() {
5983
+ const swiper = this;
5984
+ Utils.extend(swiper, {
5985
+ hashNavigation: {
5986
+ initialized: false,
5987
+ init: HashNavigation.init.bind(swiper),
5988
+ destroy: HashNavigation.destroy.bind(swiper),
5989
+ setHash: HashNavigation.setHash.bind(swiper),
5990
+ onHashCange: HashNavigation.onHashCange.bind(swiper),
5991
+ },
5992
+ });
5993
+ },
5994
+ on: {
5995
+ init() {
5996
+ const swiper = this;
5997
+ if (swiper.params.hashNavigation.enabled) {
5998
+ swiper.hashNavigation.init();
5999
+ }
6000
+ },
6001
+ destroy() {
6002
+ const swiper = this;
6003
+ if (swiper.params.hashNavigation.enabled) {
6004
+ swiper.hashNavigation.destroy();
6005
+ }
6006
+ },
6007
+ transitionEnd() {
6008
+ const swiper = this;
6009
+ if (swiper.hashNavigation.initialized) {
6010
+ swiper.hashNavigation.setHash();
6011
+ }
6012
+ },
6013
+ },
6014
+ };
6015
+
6016
+ /* eslint no-underscore-dangle: "off" */
6017
+
6018
+ const Autoplay = {
6019
+ run() {
6020
+ const swiper = this;
6021
+ const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
6022
+ let delay = swiper.params.autoplay.delay;
6023
+ if ($activeSlideEl.attr('data-swiper-autoplay')) {
6024
+ delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
6025
+ }
6026
+ swiper.autoplay.timeout = Utils.nextTick(() => {
6027
+ if (swiper.params.autoplay.reverseDirection) {
6028
+ if (swiper.params.loop) {
6029
+ swiper.loopFix();
6030
+ swiper.slidePrev(swiper.params.speed, true, true);
6031
+ swiper.emit('autoplay');
6032
+ } else if (!swiper.isBeginning) {
6033
+ swiper.slidePrev(swiper.params.speed, true, true);
6034
+ swiper.emit('autoplay');
6035
+ } else if (!swiper.params.autoplay.stopOnLastSlide) {
6036
+ swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
6037
+ swiper.emit('autoplay');
6038
+ } else {
6039
+ swiper.autoplay.stop();
6040
+ }
6041
+ } else if (swiper.params.loop) {
6042
+ swiper.loopFix();
6043
+ swiper.slideNext(swiper.params.speed, true, true);
6044
+ swiper.emit('autoplay');
6045
+ } else if (!swiper.isEnd) {
6046
+ swiper.slideNext(swiper.params.speed, true, true);
6047
+ swiper.emit('autoplay');
6048
+ } else if (!swiper.params.autoplay.stopOnLastSlide) {
6049
+ swiper.slideTo(0, swiper.params.speed, true, true);
6050
+ swiper.emit('autoplay');
6051
+ } else {
6052
+ swiper.autoplay.stop();
6053
+ }
6054
+ }, delay);
6055
+ },
6056
+ start() {
6057
+ const swiper = this;
6058
+ if (typeof swiper.autoplay.timeout !== 'undefined') return false;
6059
+ if (swiper.autoplay.running) return false;
6060
+ swiper.autoplay.running = true;
6061
+ swiper.emit('autoplayStart');
6062
+ swiper.autoplay.run();
6063
+ return true;
6064
+ },
6065
+ stop() {
6066
+ const swiper = this;
6067
+ if (!swiper.autoplay.running) return false;
6068
+ if (typeof swiper.autoplay.timeout === 'undefined') return false;
6069
+
6070
+ if (swiper.autoplay.timeout) {
6071
+ clearTimeout(swiper.autoplay.timeout);
6072
+ swiper.autoplay.timeout = undefined;
6073
+ }
6074
+ swiper.autoplay.running = false;
6075
+ swiper.emit('autoplayStop');
6076
+ return true;
6077
+ },
6078
+ pause(speed) {
6079
+ const swiper = this;
6080
+ if (!swiper.autoplay.running) return;
6081
+ if (swiper.autoplay.paused) return;
6082
+ if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout);
6083
+ swiper.autoplay.paused = true;
6084
+ if (speed === 0 || !swiper.params.autoplay.waitForTransition) {
6085
+ swiper.autoplay.paused = false;
6086
+ swiper.autoplay.run();
6087
+ } else {
6088
+ swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);
6089
+ swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
6090
+ }
6091
+ },
6092
+ };
6093
+
6094
+ var Autoplay$1 = {
6095
+ name: 'autoplay',
6096
+ params: {
6097
+ autoplay: {
6098
+ enabled: false,
6099
+ delay: 3000,
6100
+ waitForTransition: true,
6101
+ disableOnInteraction: true,
6102
+ stopOnLastSlide: false,
6103
+ reverseDirection: false,
6104
+ },
6105
+ },
6106
+ create() {
6107
+ const swiper = this;
6108
+ Utils.extend(swiper, {
6109
+ autoplay: {
6110
+ running: false,
6111
+ paused: false,
6112
+ run: Autoplay.run.bind(swiper),
6113
+ start: Autoplay.start.bind(swiper),
6114
+ stop: Autoplay.stop.bind(swiper),
6115
+ pause: Autoplay.pause.bind(swiper),
6116
+ onTransitionEnd(e) {
6117
+ if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;
6118
+ if (e.target !== this) return;
6119
+ swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);
6120
+ swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
6121
+ swiper.autoplay.paused = false;
6122
+ if (!swiper.autoplay.running) {
6123
+ swiper.autoplay.stop();
6124
+ } else {
6125
+ swiper.autoplay.run();
6126
+ }
6127
+ },
6128
+ },
6129
+ });
6130
+ },
6131
+ on: {
6132
+ init() {
6133
+ const swiper = this;
6134
+ if (swiper.params.autoplay.enabled) {
6135
+ swiper.autoplay.start();
6136
+ }
6137
+ },
6138
+ beforeTransitionStart(speed, internal) {
6139
+ const swiper = this;
6140
+ if (swiper.autoplay.running) {
6141
+ if (internal || !swiper.params.autoplay.disableOnInteraction) {
6142
+ swiper.autoplay.pause(speed);
6143
+ } else {
6144
+ swiper.autoplay.stop();
6145
+ }
6146
+ }
6147
+ },
6148
+ sliderFirstMove() {
6149
+ const swiper = this;
6150
+ if (swiper.autoplay.running) {
6151
+ if (swiper.params.autoplay.disableOnInteraction) {
6152
+ swiper.autoplay.stop();
6153
+ } else {
6154
+ swiper.autoplay.pause();
6155
+ }
6156
+ }
6157
+ },
6158
+ destroy() {
6159
+ const swiper = this;
6160
+ if (swiper.autoplay.running) {
6161
+ swiper.autoplay.stop();
6162
+ }
6163
+ },
6164
+ },
6165
+ };
6166
+
6167
+ const Fade = {
6168
+ setTranslate() {
6169
+ const swiper = this;
6170
+ const { slides } = swiper;
6171
+ for (let i = 0; i < slides.length; i += 1) {
6172
+ const $slideEl = swiper.slides.eq(i);
6173
+ const offset$$1 = $slideEl[0].swiperSlideOffset;
6174
+ let tx = -offset$$1;
6175
+ if (!swiper.params.virtualTranslate) tx -= swiper.translate;
6176
+ let ty = 0;
6177
+ if (!swiper.isHorizontal()) {
6178
+ ty = tx;
6179
+ tx = 0;
6180
+ }
6181
+ const slideOpacity = swiper.params.fadeEffect.crossFade ?
6182
+ Math.max(1 - Math.abs($slideEl[0].progress), 0) :
6183
+ 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);
6184
+ $slideEl
6185
+ .css({
6186
+ opacity: slideOpacity,
6187
+ })
6188
+ .transform(`translate3d(${tx}px, ${ty}px, 0px)`);
6189
+ }
6190
+ },
6191
+ setTransition(duration) {
6192
+ const swiper = this;
6193
+ const { slides, $wrapperEl } = swiper;
6194
+ slides.transition(duration);
6195
+ if (swiper.params.virtualTranslate && duration !== 0) {
6196
+ let eventTriggered = false;
6197
+ slides.transitionEnd(() => {
6198
+ if (eventTriggered) return;
6199
+ if (!swiper || swiper.destroyed) return;
6200
+ eventTriggered = true;
6201
+ swiper.animating = false;
6202
+ const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
6203
+ for (let i = 0; i < triggerEvents.length; i += 1) {
6204
+ $wrapperEl.trigger(triggerEvents[i]);
6205
+ }
6206
+ });
6207
+ }
6208
+ },
6209
+ };
6210
+
6211
+ var EffectFade = {
6212
+ name: 'effect-fade',
6213
+ params: {
6214
+ fadeEffect: {
6215
+ crossFade: false,
6216
+ },
6217
+ },
6218
+ create() {
6219
+ const swiper = this;
6220
+ Utils.extend(swiper, {
6221
+ fadeEffect: {
6222
+ setTranslate: Fade.setTranslate.bind(swiper),
6223
+ setTransition: Fade.setTransition.bind(swiper),
6224
+ },
6225
+ });
6226
+ },
6227
+ on: {
6228
+ beforeInit() {
6229
+ const swiper = this;
6230
+ if (swiper.params.effect !== 'fade') return;
6231
+ swiper.classNames.push(`${swiper.params.containerModifierClass}fade`);
6232
+ const overwriteParams = {
6233
+ slidesPerView: 1,
6234
+ slidesPerColumn: 1,
6235
+ slidesPerGroup: 1,
6236
+ watchSlidesProgress: true,
6237
+ spaceBetween: 0,
6238
+ virtualTranslate: true,
6239
+ };
6240
+ Utils.extend(swiper.params, overwriteParams);
6241
+ Utils.extend(swiper.originalParams, overwriteParams);
6242
+ },
6243
+ setTranslate() {
6244
+ const swiper = this;
6245
+ if (swiper.params.effect !== 'fade') return;
6246
+ swiper.fadeEffect.setTranslate();
6247
+ },
6248
+ setTransition(duration) {
6249
+ const swiper = this;
6250
+ if (swiper.params.effect !== 'fade') return;
6251
+ swiper.fadeEffect.setTransition(duration);
6252
+ },
6253
+ },
6254
+ };
6255
+
6256
+ const Cube = {
6257
+ setTranslate() {
6258
+ const swiper = this;
6259
+ const {
6260
+ $el, $wrapperEl, slides, width: swiperWidth, height: swiperHeight, rtlTranslate: rtl, size: swiperSize,
6261
+ } = swiper;
6262
+ const params = swiper.params.cubeEffect;
6263
+ const isHorizontal = swiper.isHorizontal();
6264
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
6265
+ let wrapperRotate = 0;
6266
+ let $cubeShadowEl;
6267
+ if (params.shadow) {
6268
+ if (isHorizontal) {
6269
+ $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');
6270
+ if ($cubeShadowEl.length === 0) {
6271
+ $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
6272
+ $wrapperEl.append($cubeShadowEl);
6273
+ }
6274
+ $cubeShadowEl.css({ height: `${swiperWidth}px` });
6275
+ } else {
6276
+ $cubeShadowEl = $el.find('.swiper-cube-shadow');
6277
+ if ($cubeShadowEl.length === 0) {
6278
+ $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
6279
+ $el.append($cubeShadowEl);
6280
+ }
6281
+ }
6282
+ }
6283
+ for (let i = 0; i < slides.length; i += 1) {
6284
+ const $slideEl = slides.eq(i);
6285
+ let slideIndex = i;
6286
+ if (isVirtual) {
6287
+ slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);
6288
+ }
6289
+ let slideAngle = slideIndex * 90;
6290
+ let round = Math.floor(slideAngle / 360);
6291
+ if (rtl) {
6292
+ slideAngle = -slideAngle;
6293
+ round = Math.floor(-slideAngle / 360);
6294
+ }
6295
+ const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
6296
+ let tx = 0;
6297
+ let ty = 0;
6298
+ let tz = 0;
6299
+ if (slideIndex % 4 === 0) {
6300
+ tx = -round * 4 * swiperSize;
6301
+ tz = 0;
6302
+ } else if ((slideIndex - 1) % 4 === 0) {
6303
+ tx = 0;
6304
+ tz = -round * 4 * swiperSize;
6305
+ } else if ((slideIndex - 2) % 4 === 0) {
6306
+ tx = swiperSize + (round * 4 * swiperSize);
6307
+ tz = swiperSize;
6308
+ } else if ((slideIndex - 3) % 4 === 0) {
6309
+ tx = -swiperSize;
6310
+ tz = (3 * swiperSize) + (swiperSize * 4 * round);
6311
+ }
6312
+ if (rtl) {
6313
+ tx = -tx;
6314
+ }
6315
+
6316
+ if (!isHorizontal) {
6317
+ ty = tx;
6318
+ tx = 0;
6319
+ }
6320
+
6321
+ const transform$$1 = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;
6322
+ if (progress <= 1 && progress > -1) {
6323
+ wrapperRotate = (slideIndex * 90) + (progress * 90);
6324
+ if (rtl) wrapperRotate = (-slideIndex * 90) - (progress * 90);
6325
+ }
6326
+ $slideEl.transform(transform$$1);
6327
+ if (params.slideShadows) {
6328
+ // Set shadows
6329
+ let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
6330
+ let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
6331
+ if (shadowBefore.length === 0) {
6332
+ shadowBefore = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
6333
+ $slideEl.append(shadowBefore);
6334
+ }
6335
+ if (shadowAfter.length === 0) {
6336
+ shadowAfter = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
6337
+ $slideEl.append(shadowAfter);
6338
+ }
6339
+ if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
6340
+ if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
6341
+ }
6342
+ }
6343
+ $wrapperEl.css({
6344
+ '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,
6345
+ '-moz-transform-origin': `50% 50% -${swiperSize / 2}px`,
6346
+ '-ms-transform-origin': `50% 50% -${swiperSize / 2}px`,
6347
+ 'transform-origin': `50% 50% -${swiperSize / 2}px`,
6348
+ });
6349
+
6350
+ if (params.shadow) {
6351
+ if (isHorizontal) {
6352
+ $cubeShadowEl.transform(`translate3d(0px, ${(swiperWidth / 2) + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);
6353
+ } else {
6354
+ const shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);
6355
+ const multiplier = 1.5 - (
6356
+ (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2) +
6357
+ (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)
6358
+ );
6359
+ const scale1 = params.shadowScale;
6360
+ const scale2 = params.shadowScale / multiplier;
6361
+ const offset$$1 = params.shadowOffset;
6362
+ $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${(swiperHeight / 2) + offset$$1}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);
6363
+ }
6364
+ }
6365
+ const zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0;
6366
+ $wrapperEl
6367
+ .transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);
6368
+ },
6369
+ setTransition(duration) {
6370
+ const swiper = this;
6371
+ const { $el, slides } = swiper;
6372
+ slides
6373
+ .transition(duration)
6374
+ .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
6375
+ .transition(duration);
6376
+ if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
6377
+ $el.find('.swiper-cube-shadow').transition(duration);
6378
+ }
6379
+ },
6380
+ };
6381
+
6382
+ var EffectCube = {
6383
+ name: 'effect-cube',
6384
+ params: {
6385
+ cubeEffect: {
6386
+ slideShadows: true,
6387
+ shadow: true,
6388
+ shadowOffset: 20,
6389
+ shadowScale: 0.94,
6390
+ },
6391
+ },
6392
+ create() {
6393
+ const swiper = this;
6394
+ Utils.extend(swiper, {
6395
+ cubeEffect: {
6396
+ setTranslate: Cube.setTranslate.bind(swiper),
6397
+ setTransition: Cube.setTransition.bind(swiper),
6398
+ },
6399
+ });
6400
+ },
6401
+ on: {
6402
+ beforeInit() {
6403
+ const swiper = this;
6404
+ if (swiper.params.effect !== 'cube') return;
6405
+ swiper.classNames.push(`${swiper.params.containerModifierClass}cube`);
6406
+ swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
6407
+ const overwriteParams = {
6408
+ slidesPerView: 1,
6409
+ slidesPerColumn: 1,
6410
+ slidesPerGroup: 1,
6411
+ watchSlidesProgress: true,
6412
+ resistanceRatio: 0,
6413
+ spaceBetween: 0,
6414
+ centeredSlides: false,
6415
+ virtualTranslate: true,
6416
+ };
6417
+ Utils.extend(swiper.params, overwriteParams);
6418
+ Utils.extend(swiper.originalParams, overwriteParams);
6419
+ },
6420
+ setTranslate() {
6421
+ const swiper = this;
6422
+ if (swiper.params.effect !== 'cube') return;
6423
+ swiper.cubeEffect.setTranslate();
6424
+ },
6425
+ setTransition(duration) {
6426
+ const swiper = this;
6427
+ if (swiper.params.effect !== 'cube') return;
6428
+ swiper.cubeEffect.setTransition(duration);
6429
+ },
6430
+ },
6431
+ };
6432
+
6433
+ const Flip = {
6434
+ setTranslate() {
6435
+ const swiper = this;
6436
+ const { slides, rtlTranslate: rtl } = swiper;
6437
+ for (let i = 0; i < slides.length; i += 1) {
6438
+ const $slideEl = slides.eq(i);
6439
+ let progress = $slideEl[0].progress;
6440
+ if (swiper.params.flipEffect.limitRotation) {
6441
+ progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
6442
+ }
6443
+ const offset$$1 = $slideEl[0].swiperSlideOffset;
6444
+ const rotate = -180 * progress;
6445
+ let rotateY = rotate;
6446
+ let rotateX = 0;
6447
+ let tx = -offset$$1;
6448
+ let ty = 0;
6449
+ if (!swiper.isHorizontal()) {
6450
+ ty = tx;
6451
+ tx = 0;
6452
+ rotateX = -rotateY;
6453
+ rotateY = 0;
6454
+ } else if (rtl) {
6455
+ rotateY = -rotateY;
6456
+ }
6457
+
6458
+ $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
6459
+
6460
+ if (swiper.params.flipEffect.slideShadows) {
6461
+ // Set shadows
6462
+ let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
6463
+ let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
6464
+ if (shadowBefore.length === 0) {
6465
+ shadowBefore = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'left' : 'top'}"></div>`);
6466
+ $slideEl.append(shadowBefore);
6467
+ }
6468
+ if (shadowAfter.length === 0) {
6469
+ shadowAfter = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'right' : 'bottom'}"></div>`);
6470
+ $slideEl.append(shadowAfter);
6471
+ }
6472
+ if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
6473
+ if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
6474
+ }
6475
+ $slideEl
6476
+ .transform(`translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`);
6477
+ }
6478
+ },
6479
+ setTransition(duration) {
6480
+ const swiper = this;
6481
+ const { slides, activeIndex, $wrapperEl } = swiper;
6482
+ slides
6483
+ .transition(duration)
6484
+ .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
6485
+ .transition(duration);
6486
+ if (swiper.params.virtualTranslate && duration !== 0) {
6487
+ let eventTriggered = false;
6488
+ // eslint-disable-next-line
6489
+ slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {
6490
+ if (eventTriggered) return;
6491
+ if (!swiper || swiper.destroyed) return;
6492
+ // if (!$(this).hasClass(swiper.params.slideActiveClass)) return;
6493
+ eventTriggered = true;
6494
+ swiper.animating = false;
6495
+ const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
6496
+ for (let i = 0; i < triggerEvents.length; i += 1) {
6497
+ $wrapperEl.trigger(triggerEvents[i]);
6498
+ }
6499
+ });
6500
+ }
6501
+ },
6502
+ };
6503
+
6504
+ var EffectFlip = {
6505
+ name: 'effect-flip',
6506
+ params: {
6507
+ flipEffect: {
6508
+ slideShadows: true,
6509
+ limitRotation: true,
6510
+ },
6511
+ },
6512
+ create() {
6513
+ const swiper = this;
6514
+ Utils.extend(swiper, {
6515
+ flipEffect: {
6516
+ setTranslate: Flip.setTranslate.bind(swiper),
6517
+ setTransition: Flip.setTransition.bind(swiper),
6518
+ },
6519
+ });
6520
+ },
6521
+ on: {
6522
+ beforeInit() {
6523
+ const swiper = this;
6524
+ if (swiper.params.effect !== 'flip') return;
6525
+ swiper.classNames.push(`${swiper.params.containerModifierClass}flip`);
6526
+ swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
6527
+ const overwriteParams = {
6528
+ slidesPerView: 1,
6529
+ slidesPerColumn: 1,
6530
+ slidesPerGroup: 1,
6531
+ watchSlidesProgress: true,
6532
+ spaceBetween: 0,
6533
+ virtualTranslate: true,
6534
+ };
6535
+ Utils.extend(swiper.params, overwriteParams);
6536
+ Utils.extend(swiper.originalParams, overwriteParams);
6537
+ },
6538
+ setTranslate() {
6539
+ const swiper = this;
6540
+ if (swiper.params.effect !== 'flip') return;
6541
+ swiper.flipEffect.setTranslate();
6542
+ },
6543
+ setTransition(duration) {
6544
+ const swiper = this;
6545
+ if (swiper.params.effect !== 'flip') return;
6546
+ swiper.flipEffect.setTransition(duration);
6547
+ },
6548
+ },
6549
+ };
6550
+
6551
+ const Coverflow = {
6552
+ setTranslate() {
6553
+ const swiper = this;
6554
+ const {
6555
+ width: swiperWidth, height: swiperHeight, slides, $wrapperEl, slidesSizesGrid,
6556
+ } = swiper;
6557
+ const params = swiper.params.coverflowEffect;
6558
+ const isHorizontal = swiper.isHorizontal();
6559
+ const transform$$1 = swiper.translate;
6560
+ const center = isHorizontal ? -transform$$1 + (swiperWidth / 2) : -transform$$1 + (swiperHeight / 2);
6561
+ const rotate = isHorizontal ? params.rotate : -params.rotate;
6562
+ const translate = params.depth;
6563
+ // Each slide offset from center
6564
+ for (let i = 0, length = slides.length; i < length; i += 1) {
6565
+ const $slideEl = slides.eq(i);
6566
+ const slideSize = slidesSizesGrid[i];
6567
+ const slideOffset = $slideEl[0].swiperSlideOffset;
6568
+ const offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;
6569
+
6570
+ let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
6571
+ let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
6572
+ // var rotateZ = 0
6573
+ let translateZ = -translate * Math.abs(offsetMultiplier);
6574
+
6575
+ let translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier);
6576
+ let translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0;
6577
+
6578
+ // Fix for ultra small values
6579
+ if (Math.abs(translateX) < 0.001) translateX = 0;
6580
+ if (Math.abs(translateY) < 0.001) translateY = 0;
6581
+ if (Math.abs(translateZ) < 0.001) translateZ = 0;
6582
+ if (Math.abs(rotateY) < 0.001) rotateY = 0;
6583
+ if (Math.abs(rotateX) < 0.001) rotateX = 0;
6584
+
6585
+ const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
6586
+
6587
+ $slideEl.transform(slideTransform);
6588
+ $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
6589
+ if (params.slideShadows) {
6590
+ // Set shadows
6591
+ let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
6592
+ let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
6593
+ if ($shadowBeforeEl.length === 0) {
6594
+ $shadowBeforeEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
6595
+ $slideEl.append($shadowBeforeEl);
6596
+ }
6597
+ if ($shadowAfterEl.length === 0) {
6598
+ $shadowAfterEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
6599
+ $slideEl.append($shadowAfterEl);
6600
+ }
6601
+ if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
6602
+ if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
6603
+ }
6604
+ }
6605
+
6606
+ // Set correct perspective for IE10
6607
+ if (Support.pointerEvents || Support.prefixedPointerEvents) {
6608
+ const ws = $wrapperEl[0].style;
6609
+ ws.perspectiveOrigin = `${center}px 50%`;
6610
+ }
6611
+ },
6612
+ setTransition(duration) {
6613
+ const swiper = this;
6614
+ swiper.slides
6615
+ .transition(duration)
6616
+ .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
6617
+ .transition(duration);
6618
+ },
6619
+ };
6620
+
6621
+ var EffectCoverflow = {
6622
+ name: 'effect-coverflow',
6623
+ params: {
6624
+ coverflowEffect: {
6625
+ rotate: 50,
6626
+ stretch: 0,
6627
+ depth: 100,
6628
+ modifier: 1,
6629
+ slideShadows: true,
6630
+ },
6631
+ },
6632
+ create() {
6633
+ const swiper = this;
6634
+ Utils.extend(swiper, {
6635
+ coverflowEffect: {
6636
+ setTranslate: Coverflow.setTranslate.bind(swiper),
6637
+ setTransition: Coverflow.setTransition.bind(swiper),
6638
+ },
6639
+ });
6640
+ },
6641
+ on: {
6642
+ beforeInit() {
6643
+ const swiper = this;
6644
+ if (swiper.params.effect !== 'coverflow') return;
6645
+
6646
+ swiper.classNames.push(`${swiper.params.containerModifierClass}coverflow`);
6647
+ swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
6648
+
6649
+ swiper.params.watchSlidesProgress = true;
6650
+ swiper.originalParams.watchSlidesProgress = true;
6651
+ },
6652
+ setTranslate() {
6653
+ const swiper = this;
6654
+ if (swiper.params.effect !== 'coverflow') return;
6655
+ swiper.coverflowEffect.setTranslate();
6656
+ },
6657
+ setTransition(duration) {
6658
+ const swiper = this;
6659
+ if (swiper.params.effect !== 'coverflow') return;
6660
+ swiper.coverflowEffect.setTransition(duration);
6661
+ },
6662
+ },
6663
+ };
6664
+
6665
+ // Swiper Class
6666
+
6667
+ const components = [
6668
+ Device$1,
6669
+ Support$1,
6670
+ Browser$1,
6671
+ Resize,
6672
+ Observer$1,
6673
+ Virtual$1,
6674
+ Keyboard$1,
6675
+ Mousewheel$1,
6676
+ Navigation$1,
6677
+ Pagination$1,
6678
+ Scrollbar$1,
6679
+ Parallax$1,
6680
+ Zoom$1,
6681
+ Lazy$1,
6682
+ Controller$1,
6683
+ A11y,
6684
+ History$1,
6685
+ HashNavigation$1,
6686
+ Autoplay$1,
6687
+ EffectFade,
6688
+ EffectCube,
6689
+ EffectFlip,
6690
+ EffectCoverflow
6691
+ ];
6692
+
6693
+ if (typeof Swiper.use === 'undefined') {
6694
+ Swiper.use = Swiper.Class.use;
6695
+ Swiper.installModule = Swiper.Class.installModule;
6696
+ }
6697
+
6698
+ Swiper.use(components);
6699
+
6700
+ export default Swiper;
assets/vendor/swiper/js/swiper.esm.js ADDED
@@ -0,0 +1,6683 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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ero.us/swiper/
5
+ *
6
+ * Copyright 2014-2018 Vladimir Kharlampidi
7
+ *
8
+ * Released under the MIT License
9
+ *
10
+ * Released on: June 5, 2018
11
+ */
12
+
13
+ import { $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, data, transform, transition, on, off, trigger, transitionEnd, outerWidth, outerHeight, offset, css, each, html, text, is, index, eq, append, prepend, next, nextAll, prev, prevAll, parent, parents, closest, find, children, remove, add, styles } from 'dom7/dist/dom7.modular';
14
+ import { window, document } from 'ssr-window';
15
+
16
+ const Methods = {
17
+ addClass,
18
+ removeClass,
19
+ hasClass,
20
+ toggleClass,
21
+ attr,
22
+ removeAttr,
23
+ data,
24
+ transform,
25
+ transition,
26
+ on,
27
+ off,
28
+ trigger,
29
+ transitionEnd,
30
+ outerWidth,
31
+ outerHeight,
32
+ offset,
33
+ css,
34
+ each,
35
+ html,
36
+ text,
37
+ is,
38
+ index,
39
+ eq,
40
+ append,
41
+ prepend,
42
+ next,
43
+ nextAll,
44
+ prev,
45
+ prevAll,
46
+ parent,
47
+ parents,
48
+ closest,
49
+ find,
50
+ children,
51
+ remove,
52
+ add,
53
+ styles,
54
+ };
55
+
56
+ Object.keys(Methods).forEach((methodName) => {
57
+ $.fn[methodName] = Methods[methodName];
58
+ });
59
+
60
+ const Utils = {
61
+ deleteProps(obj) {
62
+ const object = obj;
63
+ Object.keys(object).forEach((key) => {
64
+ try {
65
+ object[key] = null;
66
+ } catch (e) {
67
+ // no getter for object
68
+ }
69
+ try {
70
+ delete object[key];
71
+ } catch (e) {
72
+ // something got wrong
73
+ }
74
+ });
75
+ },
76
+ nextTick(callback, delay = 0) {
77
+ return setTimeout(callback, delay);
78
+ },
79
+ now() {
80
+ return Date.now();
81
+ },
82
+ getTranslate(el, axis = 'x') {
83
+ let matrix;
84
+ let curTransform;
85
+ let transformMatrix;
86
+
87
+ const curStyle = window.getComputedStyle(el, null);
88
+
89
+ if (window.WebKitCSSMatrix) {
90
+ curTransform = curStyle.transform || curStyle.webkitTransform;
91
+ if (curTransform.split(',').length > 6) {
92
+ curTransform = curTransform.split(', ').map(a => a.replace(',', '.')).join(', ');
93
+ }
94
+ // Some old versions of Webkit choke when 'none' is passed; pass
95
+ // empty string instead in this case
96
+ transformMatrix = new window.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
97
+ } else {
98
+ transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
99
+ matrix = transformMatrix.toString().split(',');
100
+ }
101
+
102
+ if (axis === 'x') {
103
+ // Latest Chrome and webkits Fix
104
+ if (window.WebKitCSSMatrix) curTransform = transformMatrix.m41;
105
+ // Crazy IE10 Matrix
106
+ else if (matrix.length === 16) curTransform = parseFloat(matrix[12]);
107
+ // Normal Browsers
108
+ else curTransform = parseFloat(matrix[4]);
109
+ }
110
+ if (axis === 'y') {
111
+ // Latest Chrome and webkits Fix
112
+ if (window.WebKitCSSMatrix) curTransform = transformMatrix.m42;
113
+ // Crazy IE10 Matrix
114
+ else if (matrix.length === 16) curTransform = parseFloat(matrix[13]);
115
+ // Normal Browsers
116
+ else curTransform = parseFloat(matrix[5]);
117
+ }
118
+ return curTransform || 0;
119
+ },
120
+ parseUrlQuery(url) {
121
+ const query = {};
122
+ let urlToParse = url || window.location.href;
123
+ let i;
124
+ let params;
125
+ let param;
126
+ let length;
127
+ if (typeof urlToParse === 'string' && urlToParse.length) {
128
+ urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
129
+ params = urlToParse.split('&').filter(paramsPart => paramsPart !== '');
130
+ length = params.length;
131
+
132
+ for (i = 0; i < length; i += 1) {
133
+ param = params[i].replace(/#\S+/g, '').split('=');
134
+ query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
135
+ }
136
+ }
137
+ return query;
138
+ },
139
+ isObject(o) {
140
+ return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
141
+ },
142
+ extend(...args) {
143
+ const to = Object(args[0]);
144
+ for (let i = 1; i < args.length; i += 1) {
145
+ const nextSource = args[i];
146
+ if (nextSource !== undefined && nextSource !== null) {
147
+ const keysArray = Object.keys(Object(nextSource));
148
+ for (let nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
149
+ const nextKey = keysArray[nextIndex];
150
+ const desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
151
+ if (desc !== undefined && desc.enumerable) {
152
+ if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
153
+ Utils.extend(to[nextKey], nextSource[nextKey]);
154
+ } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
155
+ to[nextKey] = {};
156
+ Utils.extend(to[nextKey], nextSource[nextKey]);
157
+ } else {
158
+ to[nextKey] = nextSource[nextKey];
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ return to;
165
+ },
166
+ };
167
+
168
+ const Support = (function Support() {
169
+ const testDiv = document.createElement('div');
170
+ return {
171
+ touch: (window.Modernizr && window.Modernizr.touch === true) || (function checkTouch() {
172
+ return !!(('ontouchstart' in window) || (window.DocumentTouch && document instanceof window.DocumentTouch));
173
+ }()),
174
+
175
+ pointerEvents: !!(window.navigator.pointerEnabled || window.PointerEvent),
176
+ prefixedPointerEvents: !!window.navigator.msPointerEnabled,
177
+
178
+ transition: (function checkTransition() {
179
+ const style = testDiv.style;
180
+ return ('transition' in style || 'webkitTransition' in style || 'MozTransition' in style);
181
+ }()),
182
+ transforms3d: (window.Modernizr && window.Modernizr.csstransforms3d === true) || (function checkTransforms3d() {
183
+ const style = testDiv.style;
184
+ return ('webkitPerspective' in style || 'MozPerspective' in style || 'OPerspective' in style || 'MsPerspective' in style || 'perspective' in style);
185
+ }()),
186
+
187
+ flexbox: (function checkFlexbox() {
188
+ const style = testDiv.style;
189
+ const styles$$1 = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
190
+ for (let i = 0; i < styles$$1.length; i += 1) {
191
+ if (styles$$1[i] in style) return true;
192
+ }
193
+ return false;
194
+ }()),
195
+
196
+ observer: (function checkObserver() {
197
+ return ('MutationObserver' in window || 'WebkitMutationObserver' in window);
198
+ }()),
199
+
200
+ passiveListener: (function checkPassiveListener() {
201
+ let supportsPassive = false;
202
+ try {
203
+ const opts = Object.defineProperty({}, 'passive', {
204
+ // eslint-disable-next-line
205
+ get() {
206
+ supportsPassive = true;
207
+ },
208
+ });
209
+ window.addEventListener('testPassiveListener', null, opts);
210
+ } catch (e) {
211
+ // No support
212
+ }
213
+ return supportsPassive;
214
+ }()),
215
+
216
+ gestures: (function checkGestures() {
217
+ return 'ongesturestart' in window;
218
+ }()),
219
+ };
220
+ }());
221
+
222
+ class SwiperClass {
223
+ constructor(params = {}) {
224
+ const self = this;
225
+ self.params = params;
226
+
227
+ // Events
228
+ self.eventsListeners = {};
229
+
230
+ if (self.params && self.params.on) {
231
+ Object.keys(self.params.on).forEach((eventName) => {
232
+ self.on(eventName, self.params.on[eventName]);
233
+ });
234
+ }
235
+ }
236
+ on(events, handler, priority) {
237
+ const self = this;
238
+ if (typeof handler !== 'function') return self;
239
+ const method = priority ? 'unshift' : 'push';
240
+ events.split(' ').forEach((event) => {
241
+ if (!self.eventsListeners[event]) self.eventsListeners[event] = [];
242
+ self.eventsListeners[event][method](handler);
243
+ });
244
+ return self;
245
+ }
246
+ once(events, handler, priority) {
247
+ const self = this;
248
+ if (typeof handler !== 'function') return self;
249
+ function onceHandler(...args) {
250
+ handler.apply(self, args);
251
+ self.off(events, onceHandler);
252
+ }
253
+ return self.on(events, onceHandler, priority);
254
+ }
255
+ off(events, handler) {
256
+ const self = this;
257
+ if (!self.eventsListeners) return self;
258
+ events.split(' ').forEach((event) => {
259
+ if (typeof handler === 'undefined') {
260
+ self.eventsListeners[event] = [];
261
+ } else {
262
+ self.eventsListeners[event].forEach((eventHandler, index$$1) => {
263
+ if (eventHandler === handler) {
264
+ self.eventsListeners[event].splice(index$$1, 1);
265
+ }
266
+ });
267
+ }
268
+ });
269
+ return self;
270
+ }
271
+ emit(...args) {
272
+ const self = this;
273
+ if (!self.eventsListeners) return self;
274
+ let events;
275
+ let data$$1;
276
+ let context;
277
+ if (typeof args[0] === 'string' || Array.isArray(args[0])) {
278
+ events = args[0];
279
+ data$$1 = args.slice(1, args.length);
280
+ context = self;
281
+ } else {
282
+ events = args[0].events;
283
+ data$$1 = args[0].data;
284
+ context = args[0].context || self;
285
+ }
286
+ const eventsArray = Array.isArray(events) ? events : events.split(' ');
287
+ eventsArray.forEach((event) => {
288
+ if (self.eventsListeners && self.eventsListeners[event]) {
289
+ const handlers = [];
290
+ self.eventsListeners[event].forEach((eventHandler) => {
291
+ handlers.push(eventHandler);
292
+ });
293
+ handlers.forEach((eventHandler) => {
294
+ eventHandler.apply(context, data$$1);
295
+ });
296
+ }
297
+ });
298
+ return self;
299
+ }
300
+ useModulesParams(instanceParams) {
301
+ const instance = this;
302
+ if (!instance.modules) return;
303
+ Object.keys(instance.modules).forEach((moduleName) => {
304
+ const module = instance.modules[moduleName];
305
+ // Extend params
306
+ if (module.params) {
307
+ Utils.extend(instanceParams, module.params);
308
+ }
309
+ });
310
+ }
311
+ useModules(modulesParams = {}) {
312
+ const instance = this;
313
+ if (!instance.modules) return;
314
+ Object.keys(instance.modules).forEach((moduleName) => {
315
+ const module = instance.modules[moduleName];
316
+ const moduleParams = modulesParams[moduleName] || {};
317
+ // Extend instance methods and props
318
+ if (module.instance) {
319
+ Object.keys(module.instance).forEach((modulePropName) => {
320
+ const moduleProp = module.instance[modulePropName];
321
+ if (typeof moduleProp === 'function') {
322
+ instance[modulePropName] = moduleProp.bind(instance);
323
+ } else {
324
+ instance[modulePropName] = moduleProp;
325
+ }
326
+ });
327
+ }
328
+ // Add event listeners
329
+ if (module.on && instance.on) {
330
+ Object.keys(module.on).forEach((moduleEventName) => {
331
+ instance.on(moduleEventName, module.on[moduleEventName]);
332
+ });
333
+ }
334
+
335
+ // Module create callback
336
+ if (module.create) {
337
+ module.create.bind(instance)(moduleParams);
338
+ }
339
+ });
340
+ }
341
+ static set components(components) {
342
+ const Class = this;
343
+ if (!Class.use) return;
344
+ Class.use(components);
345
+ }
346
+ static installModule(module, ...params) {
347
+ const Class = this;
348
+ if (!Class.prototype.modules) Class.prototype.modules = {};
349
+ const name = module.name || (`${Object.keys(Class.prototype.modules).length}_${Utils.now()}`);
350
+ Class.prototype.modules[name] = module;
351
+ // Prototype
352
+ if (module.proto) {
353
+ Object.keys(module.proto).forEach((key) => {
354
+ Class.prototype[key] = module.proto[key];
355
+ });
356
+ }
357
+ // Class
358
+ if (module.static) {
359
+ Object.keys(module.static).forEach((key) => {
360
+ Class[key] = module.static[key];
361
+ });
362
+ }
363
+ // Callback
364
+ if (module.install) {
365
+ module.install.apply(Class, params);
366
+ }
367
+ return Class;
368
+ }
369
+ static use(module, ...params) {
370
+ const Class = this;
371
+ if (Array.isArray(module)) {
372
+ module.forEach(m => Class.installModule(m));
373
+ return Class;
374
+ }
375
+ return Class.installModule(module, ...params);
376
+ }
377
+ }
378
+
379
+ function updateSize () {
380
+ const swiper = this;
381
+ let width;
382
+ let height;
383
+ const $el = swiper.$el;
384
+ if (typeof swiper.params.width !== 'undefined') {
385
+ width = swiper.params.width;
386
+ } else {
387
+ width = $el[0].clientWidth;
388
+ }
389
+ if (typeof swiper.params.height !== 'undefined') {
390
+ height = swiper.params.height;
391
+ } else {
392
+ height = $el[0].clientHeight;
393
+ }
394
+ if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
395
+ return;
396
+ }
397
+
398
+ // Subtract paddings
399
+ width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
400
+ height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
401
+
402
+ Utils.extend(swiper, {
403
+ width,
404
+ height,
405
+ size: swiper.isHorizontal() ? width : height,
406
+ });
407
+ }
408
+
409
+ function updateSlides () {
410
+ const swiper = this;
411
+ const params = swiper.params;
412
+
413
+ const {
414
+ $wrapperEl, size: swiperSize, rtlTranslate: rtl, wrongRTL,
415
+ } = swiper;
416
+ const isVirtual = swiper.virtual && params.virtual.enabled;
417
+ const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
418
+ const slides = $wrapperEl.children(`.${swiper.params.slideClass}`);
419
+ const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
420
+ let snapGrid = [];
421
+ const slidesGrid = [];
422
+ const slidesSizesGrid = [];
423
+
424
+ let offsetBefore = params.slidesOffsetBefore;
425
+ if (typeof offsetBefore === 'function') {
426
+ offsetBefore = params.slidesOffsetBefore.call(swiper);
427
+ }
428
+
429
+ let offsetAfter = params.slidesOffsetAfter;
430
+ if (typeof offsetAfter === 'function') {
431
+ offsetAfter = params.slidesOffsetAfter.call(swiper);
432
+ }
433
+
434
+ const previousSnapGridLength = swiper.snapGrid.length;
435
+ const previousSlidesGridLength = swiper.snapGrid.length;
436
+
437
+ let spaceBetween = params.spaceBetween;
438
+ let slidePosition = -offsetBefore;
439
+ let prevSlideSize = 0;
440
+ let index$$1 = 0;
441
+ if (typeof swiperSize === 'undefined') {
442
+ return;
443
+ }
444
+ if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
445
+ spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
446
+ }
447
+
448
+ swiper.virtualSize = -spaceBetween;
449
+
450
+ // reset margins
451
+ if (rtl) slides.css({ marginLeft: '', marginTop: '' });
452
+ else slides.css({ marginRight: '', marginBottom: '' });
453
+
454
+ let slidesNumberEvenToRows;
455
+ if (params.slidesPerColumn > 1) {
456
+ if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
457
+ slidesNumberEvenToRows = slidesLength;
458
+ } else {
459
+ slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
460
+ }
461
+ if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
462
+ slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
463
+ }
464
+ }
465
+
466
+ // Calc slides
467
+ let slideSize;
468
+ const slidesPerColumn = params.slidesPerColumn;
469
+ const slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
470
+ const numFullColumns = slidesPerRow - ((params.slidesPerColumn * slidesPerRow) - slidesLength);
471
+ for (let i = 0; i < slidesLength; i += 1) {
472
+ slideSize = 0;
473
+ const slide = slides.eq(i);
474
+ if (params.slidesPerColumn > 1) {
475
+ // Set slides order
476
+ let newSlideOrderIndex;
477
+ let column;
478
+ let row;
479
+ if (params.slidesPerColumnFill === 'column') {
480
+ column = Math.floor(i / slidesPerColumn);
481
+ row = i - (column * slidesPerColumn);
482
+ if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
483
+ row += 1;
484
+ if (row >= slidesPerColumn) {
485
+ row = 0;
486
+ column += 1;
487
+ }
488
+ }
489
+ newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
490
+ slide
491
+ .css({
492
+ '-webkit-box-ordinal-group': newSlideOrderIndex,
493
+ '-moz-box-ordinal-group': newSlideOrderIndex,
494
+ '-ms-flex-order': newSlideOrderIndex,
495
+ '-webkit-order': newSlideOrderIndex,
496
+ order: newSlideOrderIndex,
497
+ });
498
+ } else {
499
+ row = Math.floor(i / slidesPerRow);
500
+ column = i - (row * slidesPerRow);
501
+ }
502
+ slide
503
+ .css(
504
+ `margin-${swiper.isHorizontal() ? 'top' : 'left'}`,
505
+ (row !== 0 && params.spaceBetween) && (`${params.spaceBetween}px`)
506
+ )
507
+ .attr('data-swiper-column', column)
508
+ .attr('data-swiper-row', row);
509
+ }
510
+ if (slide.css('display') === 'none') continue; // eslint-disable-line
511
+
512
+ if (params.slidesPerView === 'auto') {
513
+ const slideStyles = window.getComputedStyle(slide[0], null);
514
+ const currentTransform = slide[0].style.transform;
515
+ const currentWebKitTransform = slide[0].style.webkitTransform;
516
+ if (currentTransform) {
517
+ slide[0].style.transform = 'none';
518
+ }
519
+ if (currentWebKitTransform) {
520
+ slide[0].style.webkitTransform = 'none';
521
+ }
522
+ if (swiper.isHorizontal()) {
523
+ slideSize = slide[0].getBoundingClientRect().width +
524
+ parseFloat(slideStyles.getPropertyValue('margin-left')) +
525
+ parseFloat(slideStyles.getPropertyValue('margin-right'));
526
+ } else {
527
+ slideSize = slide[0].getBoundingClientRect().height +
528
+ parseFloat(slideStyles.getPropertyValue('margin-top')) +
529
+ parseFloat(slideStyles.getPropertyValue('margin-bottom'));
530
+ }
531
+ if (currentTransform) {
532
+ slide[0].style.transform = currentTransform;
533
+ }
534
+ if (currentWebKitTransform) {
535
+ slide[0].style.webkitTransform = currentWebKitTransform;
536
+ }
537
+ if (params.roundLengths) slideSize = Math.floor(slideSize);
538
+ } else {
539
+ slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
540
+ if (params.roundLengths) slideSize = Math.floor(slideSize);
541
+
542
+ if (slides[i]) {
543
+ if (swiper.isHorizontal()) {
544
+ slides[i].style.width = `${slideSize}px`;
545
+ } else {
546
+ slides[i].style.height = `${slideSize}px`;
547
+ }
548
+ }
549
+ }
550
+ if (slides[i]) {
551
+ slides[i].swiperSlideSize = slideSize;
552
+ }
553
+ slidesSizesGrid.push(slideSize);
554
+
555
+
556
+ if (params.centeredSlides) {
557
+ slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
558
+ if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
559
+ if (i === 0) slidePosition = slidePosition - (swiperSize / 2) - spaceBetween;
560
+ if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
561
+ if (params.roundLengths) slidePosition = Math.floor(slidePosition);
562
+ if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
563
+ slidesGrid.push(slidePosition);
564
+ } else {
565
+ if (params.roundLengths) slidePosition = Math.floor(slidePosition);
566
+ if ((index$$1) % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
567
+ slidesGrid.push(slidePosition);
568
+ slidePosition = slidePosition + slideSize + spaceBetween;
569
+ }
570
+
571
+ swiper.virtualSize += slideSize + spaceBetween;
572
+
573
+ prevSlideSize = slideSize;
574
+
575
+ index$$1 += 1;
576
+ }
577
+ swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
578
+ let newSlidesGrid;
579
+
580
+ if (
581
+ rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
582
+ $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
583
+ }
584
+ if (!Support.flexbox || params.setWrapperSize) {
585
+ if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
586
+ else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
587
+ }
588
+
589
+ if (params.slidesPerColumn > 1) {
590
+ swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
591
+ swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
592
+ if (swiper.isHorizontal()) $wrapperEl.css({ width: `${swiper.virtualSize + params.spaceBetween}px` });
593
+ else $wrapperEl.css({ height: `${swiper.virtualSize + params.spaceBetween}px` });
594
+ if (params.centeredSlides) {
595
+ newSlidesGrid = [];
596
+ for (let i = 0; i < snapGrid.length; i += 1) {
597
+ let slidesGridItem = snapGrid[i];
598
+ if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
599
+ if (snapGrid[i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem);
600
+ }
601
+ snapGrid = newSlidesGrid;
602
+ }
603
+ }
604
+
605
+ // Remove last grid elements depending on width
606
+ if (!params.centeredSlides) {
607
+ newSlidesGrid = [];
608
+ for (let i = 0; i < snapGrid.length; i += 1) {
609
+ let slidesGridItem = snapGrid[i];
610
+ if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
611
+ if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
612
+ newSlidesGrid.push(slidesGridItem);
613
+ }
614
+ }
615
+ snapGrid = newSlidesGrid;
616
+ if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
617
+ snapGrid.push(swiper.virtualSize - swiperSize);
618
+ }
619
+ }
620
+ if (snapGrid.length === 0) snapGrid = [0];
621
+
622
+ if (params.spaceBetween !== 0) {
623
+ if (swiper.isHorizontal()) {
624
+ if (rtl) slides.css({ marginLeft: `${spaceBetween}px` });
625
+ else slides.css({ marginRight: `${spaceBetween}px` });
626
+ } else slides.css({ marginBottom: `${spaceBetween}px` });
627
+ }
628
+
629
+ Utils.extend(swiper, {
630
+ slides,
631
+ snapGrid,
632
+ slidesGrid,
633
+ slidesSizesGrid,
634
+ });
635
+
636
+ if (slidesLength !== previousSlidesLength) {
637
+ swiper.emit('slidesLengthChange');
638
+ }
639
+ if (snapGrid.length !== previousSnapGridLength) {
640
+ if (swiper.params.watchOverflow) swiper.checkOverflow();
641
+ swiper.emit('snapGridLengthChange');
642
+ }
643
+ if (slidesGrid.length !== previousSlidesGridLength) {
644
+ swiper.emit('slidesGridLengthChange');
645
+ }
646
+
647
+ if (params.watchSlidesProgress || params.watchSlidesVisibility) {
648
+ swiper.updateSlidesOffset();
649
+ }
650
+ }
651
+
652
+ function updateAutoHeight (speed) {
653
+ const swiper = this;
654
+ const activeSlides = [];
655
+ let newHeight = 0;
656
+ let i;
657
+ if (typeof speed === 'number') {
658
+ swiper.setTransition(speed);
659
+ } else if (speed === true) {
660
+ swiper.setTransition(swiper.params.speed);
661
+ }
662
+ // Find slides currently in view
663
+ if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
664
+ for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
665
+ const index$$1 = swiper.activeIndex + i;
666
+ if (index$$1 > swiper.slides.length) break;
667
+ activeSlides.push(swiper.slides.eq(index$$1)[0]);
668
+ }
669
+ } else {
670
+ activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
671
+ }
672
+
673
+ // Find new height from highest slide in view
674
+ for (i = 0; i < activeSlides.length; i += 1) {
675
+ if (typeof activeSlides[i] !== 'undefined') {
676
+ const height = activeSlides[i].offsetHeight;
677
+ newHeight = height > newHeight ? height : newHeight;
678
+ }
679
+ }
680
+
681
+ // Update Height
682
+ if (newHeight) swiper.$wrapperEl.css('height', `${newHeight}px`);
683
+ }
684
+
685
+ function updateSlidesOffset () {
686
+ const swiper = this;
687
+ const slides = swiper.slides;
688
+ for (let i = 0; i < slides.length; i += 1) {
689
+ slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
690
+ }
691
+ }
692
+
693
+ function updateSlidesProgress (translate = (this && this.translate) || 0) {
694
+ const swiper = this;
695
+ const params = swiper.params;
696
+
697
+ const { slides, rtlTranslate: rtl } = swiper;
698
+
699
+ if (slides.length === 0) return;
700
+ if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
701
+
702
+ let offsetCenter = -translate;
703
+ if (rtl) offsetCenter = translate;
704
+
705
+ // Visible Slides
706
+ slides.removeClass(params.slideVisibleClass);
707
+
708
+ for (let i = 0; i < slides.length; i += 1) {
709
+ const slide = slides[i];
710
+ const slideProgress =
711
+ (
712
+ (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
713
+ ) / (slide.swiperSlideSize + params.spaceBetween);
714
+ if (params.watchSlidesVisibility) {
715
+ const slideBefore = -(offsetCenter - slide.swiperSlideOffset);
716
+ const slideAfter = slideBefore + swiper.slidesSizesGrid[i];
717
+ const isVisible =
718
+ (slideBefore >= 0 && slideBefore < swiper.size) ||
719
+ (slideAfter > 0 && slideAfter <= swiper.size) ||
720
+ (slideBefore <= 0 && slideAfter >= swiper.size);
721
+ if (isVisible) {
722
+ slides.eq(i).addClass(params.slideVisibleClass);
723
+ }
724
+ }
725
+ slide.progress = rtl ? -slideProgress : slideProgress;
726
+ }
727
+ }
728
+
729
+ function updateProgress (translate = (this && this.translate) || 0) {
730
+ const swiper = this;
731
+ const params = swiper.params;
732
+
733
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
734
+ let { progress, isBeginning, isEnd } = swiper;
735
+ const wasBeginning = isBeginning;
736
+ const wasEnd = isEnd;
737
+ if (translatesDiff === 0) {
738
+ progress = 0;
739
+ isBeginning = true;
740
+ isEnd = true;
741
+ } else {
742
+ progress = (translate - swiper.minTranslate()) / (translatesDiff);
743
+ isBeginning = progress <= 0;
744
+ isEnd = progress >= 1;
745
+ }
746
+ Utils.extend(swiper, {
747
+ progress,
748
+ isBeginning,
749
+ isEnd,
750
+ });
751
+
752
+ if (params.watchSlidesProgress || params.watchSlidesVisibility) swiper.updateSlidesProgress(translate);
753
+
754
+ if (isBeginning && !wasBeginning) {
755
+ swiper.emit('reachBeginning toEdge');
756
+ }
757
+ if (isEnd && !wasEnd) {
758
+ swiper.emit('reachEnd toEdge');
759
+ }
760
+ if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
761
+ swiper.emit('fromEdge');
762
+ }
763
+
764
+ swiper.emit('progress', progress);
765
+ }
766
+
767
+ function updateSlidesClasses () {
768
+ const swiper = this;
769
+
770
+ const {
771
+ slides, params, $wrapperEl, activeIndex, realIndex,
772
+ } = swiper;
773
+ const isVirtual = swiper.virtual && params.virtual.enabled;
774
+
775
+ slides.removeClass(`${params.slideActiveClass} ${params.slideNextClass} ${params.slidePrevClass} ${params.slideDuplicateActiveClass} ${params.slideDuplicateNextClass} ${params.slideDuplicatePrevClass}`);
776
+
777
+ let activeSlide;
778
+ if (isVirtual) {
779
+ activeSlide = swiper.$wrapperEl.find(`.${params.slideClass}[data-swiper-slide-index="${activeIndex}"]`);
780
+ } else {
781
+ activeSlide = slides.eq(activeIndex);
782
+ }
783
+
784
+ // Active classes
785
+ activeSlide.addClass(params.slideActiveClass);
786
+
787
+ if (params.loop) {
788
+ // Duplicate to all looped slides
789
+ if (activeSlide.hasClass(params.slideDuplicateClass)) {
790
+ $wrapperEl
791
+ .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${realIndex}"]`)
792
+ .addClass(params.slideDuplicateActiveClass);
793
+ } else {
794
+ $wrapperEl
795
+ .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${realIndex}"]`)
796
+ .addClass(params.slideDuplicateActiveClass);
797
+ }
798
+ }
799
+ // Next Slide
800
+ let nextSlide = activeSlide.nextAll(`.${params.slideClass}`).eq(0).addClass(params.slideNextClass);
801
+ if (params.loop && nextSlide.length === 0) {
802
+ nextSlide = slides.eq(0);
803
+ nextSlide.addClass(params.slideNextClass);
804
+ }
805
+ // Prev Slide
806
+ let prevSlide = activeSlide.prevAll(`.${params.slideClass}`).eq(0).addClass(params.slidePrevClass);
807
+ if (params.loop && prevSlide.length === 0) {
808
+ prevSlide = slides.eq(-1);
809
+ prevSlide.addClass(params.slidePrevClass);
810
+ }
811
+ if (params.loop) {
812
+ // Duplicate to all looped slides
813
+ if (nextSlide.hasClass(params.slideDuplicateClass)) {
814
+ $wrapperEl
815
+ .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
816
+ .addClass(params.slideDuplicateNextClass);
817
+ } else {
818
+ $wrapperEl
819
+ .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${nextSlide.attr('data-swiper-slide-index')}"]`)
820
+ .addClass(params.slideDuplicateNextClass);
821
+ }
822
+ if (prevSlide.hasClass(params.slideDuplicateClass)) {
823
+ $wrapperEl
824
+ .children(`.${params.slideClass}:not(.${params.slideDuplicateClass})[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
825
+ .addClass(params.slideDuplicatePrevClass);
826
+ } else {
827
+ $wrapperEl
828
+ .children(`.${params.slideClass}.${params.slideDuplicateClass}[data-swiper-slide-index="${prevSlide.attr('data-swiper-slide-index')}"]`)
829
+ .addClass(params.slideDuplicatePrevClass);
830
+ }
831
+ }
832
+ }
833
+
834
+ function updateActiveIndex (newActiveIndex) {
835
+ const swiper = this;
836
+ const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
837
+ const {
838
+ slidesGrid, snapGrid, params, activeIndex: previousIndex, realIndex: previousRealIndex, snapIndex: previousSnapIndex,
839
+ } = swiper;
840
+ let activeIndex = newActiveIndex;
841
+ let snapIndex;
842
+ if (typeof activeIndex === 'undefined') {
843
+ for (let i = 0; i < slidesGrid.length; i += 1) {
844
+ if (typeof slidesGrid[i + 1] !== 'undefined') {
845
+ if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
846
+ activeIndex = i;
847
+ } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
848
+ activeIndex = i + 1;
849
+ }
850
+ } else if (translate >= slidesGrid[i]) {
851
+ activeIndex = i;
852
+ }
853
+ }
854
+ // Normalize slideIndex
855
+ if (params.normalizeSlideIndex) {
856
+ if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;
857
+ }
858
+ }
859
+ if (snapGrid.indexOf(translate) >= 0) {
860
+ snapIndex = snapGrid.indexOf(translate);
861
+ } else {
862
+ snapIndex = Math.floor(activeIndex / params.slidesPerGroup);
863
+ }
864
+ if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
865
+ if (activeIndex === previousIndex) {
866
+ if (snapIndex !== previousSnapIndex) {
867
+ swiper.snapIndex = snapIndex;
868
+ swiper.emit('snapIndexChange');
869
+ }
870
+ return;
871
+ }
872
+
873
+ // Get real index
874
+ const realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
875
+
876
+ Utils.extend(swiper, {
877
+ snapIndex,
878
+ realIndex,
879
+ previousIndex,
880
+ activeIndex,
881
+ });
882
+ swiper.emit('activeIndexChange');
883
+ swiper.emit('snapIndexChange');
884
+ if (previousRealIndex !== realIndex) {
885
+ swiper.emit('realIndexChange');
886
+ }
887
+ swiper.emit('slideChange');
888
+ }
889
+
890
+ function updateClickedSlide (e) {
891
+ const swiper = this;
892
+ const params = swiper.params;
893
+ const slide = $(e.target).closest(`.${params.slideClass}`)[0];
894
+ let slideFound = false;
895
+ if (slide) {
896
+ for (let i = 0; i < swiper.slides.length; i += 1) {
897
+ if (swiper.slides[i] === slide) slideFound = true;
898
+ }
899
+ }
900
+
901
+ if (slide && slideFound) {
902
+ swiper.clickedSlide = slide;
903
+ if (swiper.virtual && swiper.params.virtual.enabled) {
904
+ swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
905
+ } else {
906
+ swiper.clickedIndex = $(slide).index();
907
+ }
908
+ } else {
909
+ swiper.clickedSlide = undefined;
910
+ swiper.clickedIndex = undefined;
911
+ return;
912
+ }
913
+ if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
914
+ swiper.slideToClickedSlide();
915
+ }
916
+ }
917
+
918
+ var update = {
919
+ updateSize,
920
+ updateSlides,
921
+ updateAutoHeight,
922
+ updateSlidesOffset,
923
+ updateSlidesProgress,
924
+ updateProgress,
925
+ updateSlidesClasses,
926
+ updateActiveIndex,
927
+ updateClickedSlide,
928
+ };
929
+
930
+ function getTranslate (axis = this.isHorizontal() ? 'x' : 'y') {
931
+ const swiper = this;
932
+
933
+ const {
934
+ params, rtlTranslate: rtl, translate, $wrapperEl,
935
+ } = swiper;
936
+
937
+ if (params.virtualTranslate) {
938
+ return rtl ? -translate : translate;
939
+ }
940
+
941
+ let currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
942
+ if (rtl) currentTranslate = -currentTranslate;
943
+
944
+ return currentTranslate || 0;
945
+ }
946
+
947
+ function setTranslate (translate, byController) {
948
+ const swiper = this;
949
+ const {
950
+ rtlTranslate: rtl, params, $wrapperEl, progress,
951
+ } = swiper;
952
+ let x = 0;
953
+ let y = 0;
954
+ const z = 0;
955
+
956
+ if (swiper.isHorizontal()) {
957
+ x = rtl ? -translate : translate;
958
+ } else {
959
+ y = translate;
960
+ }
961
+
962
+ if (params.roundLengths) {
963
+ x = Math.floor(x);
964
+ y = Math.floor(y);
965
+ }
966
+
967
+ if (!params.virtualTranslate) {
968
+ if (Support.transforms3d) $wrapperEl.transform(`translate3d(${x}px, ${y}px, ${z}px)`);
969
+ else $wrapperEl.transform(`translate(${x}px, ${y}px)`);
970
+ }
971
+ swiper.previousTranslate = swiper.translate;
972
+ swiper.translate = swiper.isHorizontal() ? x : y;
973
+
974
+ // Check if we need to update progress
975
+ let newProgress;
976
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
977
+ if (translatesDiff === 0) {
978
+ newProgress = 0;
979
+ } else {
980
+ newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
981
+ }
982
+ if (newProgress !== progress) {
983
+ swiper.updateProgress(translate);
984
+ }
985
+
986
+ swiper.emit('setTranslate', swiper.translate, byController);
987
+ }
988
+
989
+ function minTranslate () {
990
+ return (-this.snapGrid[0]);
991
+ }
992
+
993
+ function maxTranslate () {
994
+ return (-this.snapGrid[this.snapGrid.length - 1]);
995
+ }
996
+
997
+ var translate = {
998
+ getTranslate,
999
+ setTranslate,
1000
+ minTranslate,
1001
+ maxTranslate,
1002
+ };
1003
+
1004
+ function setTransition (duration, byController) {
1005
+ const swiper = this;
1006
+
1007
+ swiper.$wrapperEl.transition(duration);
1008
+
1009
+ swiper.emit('setTransition', duration, byController);
1010
+ }
1011
+
1012
+ function transitionStart (runCallbacks = true, direction) {
1013
+ const swiper = this;
1014
+ const { activeIndex, params, previousIndex } = swiper;
1015
+ if (params.autoHeight) {
1016
+ swiper.updateAutoHeight();
1017
+ }
1018
+
1019
+ let dir = direction;
1020
+ if (!dir) {
1021
+ if (activeIndex > previousIndex) dir = 'next';
1022
+ else if (activeIndex < previousIndex) dir = 'prev';
1023
+ else dir = 'reset';
1024
+ }
1025
+
1026
+ swiper.emit('transitionStart');
1027
+
1028
+ if (runCallbacks && activeIndex !== previousIndex) {
1029
+ if (dir === 'reset') {
1030
+ swiper.emit('slideResetTransitionStart');
1031
+ return;
1032
+ }
1033
+ swiper.emit('slideChangeTransitionStart');
1034
+ if (dir === 'next') {
1035
+ swiper.emit('slideNextTransitionStart');
1036
+ } else {
1037
+ swiper.emit('slidePrevTransitionStart');
1038
+ }
1039
+ }
1040
+ }
1041
+
1042
+ function transitionEnd$1 (runCallbacks = true, direction) {
1043
+ const swiper = this;
1044
+ const { activeIndex, previousIndex } = swiper;
1045
+ swiper.animating = false;
1046
+ swiper.setTransition(0);
1047
+
1048
+ let dir = direction;
1049
+ if (!dir) {
1050
+ if (activeIndex > previousIndex) dir = 'next';
1051
+ else if (activeIndex < previousIndex) dir = 'prev';
1052
+ else dir = 'reset';
1053
+ }
1054
+
1055
+ swiper.emit('transitionEnd');
1056
+
1057
+ if (runCallbacks && activeIndex !== previousIndex) {
1058
+ if (dir === 'reset') {
1059
+ swiper.emit('slideResetTransitionEnd');
1060
+ return;
1061
+ }
1062
+ swiper.emit('slideChangeTransitionEnd');
1063
+ if (dir === 'next') {
1064
+ swiper.emit('slideNextTransitionEnd');
1065
+ } else {
1066
+ swiper.emit('slidePrevTransitionEnd');
1067
+ }
1068
+ }
1069
+ }
1070
+
1071
+ var transition$1 = {
1072
+ setTransition,
1073
+ transitionStart,
1074
+ transitionEnd: transitionEnd$1,
1075
+ };
1076
+
1077
+ function slideTo (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) {
1078
+ const swiper = this;
1079
+ let slideIndex = index$$1;
1080
+ if (slideIndex < 0) slideIndex = 0;
1081
+
1082
+ const {
1083
+ params, snapGrid, slidesGrid, previousIndex, activeIndex, rtlTranslate: rtl,
1084
+ } = swiper;
1085
+ if (swiper.animating && params.preventIntercationOnTransition) {
1086
+ return false;
1087
+ }
1088
+
1089
+ let snapIndex = Math.floor(slideIndex / params.slidesPerGroup);
1090
+ if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1091
+
1092
+ if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
1093
+ swiper.emit('beforeSlideChangeStart');
1094
+ }
1095
+
1096
+ const translate = -snapGrid[snapIndex];
1097
+
1098
+ // Update progress
1099
+ swiper.updateProgress(translate);
1100
+
1101
+ // Normalize slideIndex
1102
+ if (params.normalizeSlideIndex) {
1103
+ for (let i = 0; i < slidesGrid.length; i += 1) {
1104
+ if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
1105
+ slideIndex = i;
1106
+ }
1107
+ }
1108
+ }
1109
+ // Directions locks
1110
+ if (swiper.initialized && slideIndex !== activeIndex) {
1111
+ if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
1112
+ return false;
1113
+ }
1114
+ if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
1115
+ if ((activeIndex || 0) !== slideIndex) return false;
1116
+ }
1117
+ }
1118
+
1119
+ let direction;
1120
+ if (slideIndex > activeIndex) direction = 'next';
1121
+ else if (slideIndex < activeIndex) direction = 'prev';
1122
+ else direction = 'reset';
1123
+
1124
+
1125
+ // Update Index
1126
+ if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
1127
+ swiper.updateActiveIndex(slideIndex);
1128
+ // Update Height
1129
+ if (params.autoHeight) {
1130
+ swiper.updateAutoHeight();
1131
+ }
1132
+ swiper.updateSlidesClasses();
1133
+ if (params.effect !== 'slide') {
1134
+ swiper.setTranslate(translate);
1135
+ }
1136
+ if (direction !== 'reset') {
1137
+ swiper.transitionStart(runCallbacks, direction);
1138
+ swiper.transitionEnd(runCallbacks, direction);
1139
+ }
1140
+ return false;
1141
+ }
1142
+
1143
+ if (speed === 0 || !Support.transition) {
1144
+ swiper.setTransition(0);
1145
+ swiper.setTranslate(translate);
1146
+ swiper.updateActiveIndex(slideIndex);
1147
+ swiper.updateSlidesClasses();
1148
+ swiper.emit('beforeTransitionStart', speed, internal);
1149
+ swiper.transitionStart(runCallbacks, direction);
1150
+ swiper.transitionEnd(runCallbacks, direction);
1151
+ } else {
1152
+ swiper.setTransition(speed);
1153
+ swiper.setTranslate(translate);
1154
+ swiper.updateActiveIndex(slideIndex);
1155
+ swiper.updateSlidesClasses();
1156
+ swiper.emit('beforeTransitionStart', speed, internal);
1157
+ swiper.transitionStart(runCallbacks, direction);
1158
+ if (!swiper.animating) {
1159
+ swiper.animating = true;
1160
+ if (!swiper.onSlideToWrapperTransitionEnd) {
1161
+ swiper.onSlideToWrapperTransitionEnd = function transitionEnd$$1(e) {
1162
+ if (!swiper || swiper.destroyed) return;
1163
+ if (e.target !== this) return;
1164
+ swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1165
+ swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
1166
+ swiper.transitionEnd(runCallbacks, direction);
1167
+ };
1168
+ }
1169
+ swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1170
+ swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
1171
+ }
1172
+ }
1173
+
1174
+ return true;
1175
+ }
1176
+
1177
+ function slideToLoop (index$$1 = 0, speed = this.params.speed, runCallbacks = true, internal) {
1178
+ const swiper = this;
1179
+ let newIndex = index$$1;
1180
+ if (swiper.params.loop) {
1181
+ newIndex += swiper.loopedSlides;
1182
+ }
1183
+
1184
+ return swiper.slideTo(newIndex, speed, runCallbacks, internal);
1185
+ }
1186
+
1187
+ /* eslint no-unused-vars: "off" */
1188
+ function slideNext (speed = this.params.speed, runCallbacks = true, internal) {
1189
+ const swiper = this;
1190
+ const { params, animating } = swiper;
1191
+ if (params.loop) {
1192
+ if (animating) return false;
1193
+ swiper.loopFix();
1194
+ // eslint-disable-next-line
1195
+ swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
1196
+ return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
1197
+ }
1198
+ return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
1199
+ }
1200
+
1201
+ /* eslint no-unused-vars: "off" */
1202
+ function slidePrev (speed = this.params.speed, runCallbacks = true, internal) {
1203
+ const swiper = this;
1204
+ const {
1205
+ params, animating, snapGrid, slidesGrid, rtlTranslate,
1206
+ } = swiper;
1207
+
1208
+ if (params.loop) {
1209
+ if (animating) return false;
1210
+ swiper.loopFix();
1211
+ // eslint-disable-next-line
1212
+ swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
1213
+ }
1214
+ const translate = rtlTranslate ? swiper.translate : -swiper.translate;
1215
+ function normalize(val) {
1216
+ if (val < 0) return -Math.floor(Math.abs(val));
1217
+ return Math.floor(val);
1218
+ }
1219
+ const normalizedTranslate = normalize(translate);
1220
+ const normalizedSnapGrid = snapGrid.map(val => normalize(val));
1221
+ const normalizedSlidesGrid = slidesGrid.map(val => normalize(val));
1222
+
1223
+ const currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
1224
+ const prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
1225
+ let prevIndex;
1226
+ if (typeof prevSnap !== 'undefined') {
1227
+ prevIndex = slidesGrid.indexOf(prevSnap);
1228
+ if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;
1229
+ }
1230
+ return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
1231
+ }
1232
+
1233
+ /* eslint no-unused-vars: "off" */
1234
+ function slideReset (speed = this.params.speed, runCallbacks = true, internal) {
1235
+ const swiper = this;
1236
+ return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
1237
+ }
1238
+
1239
+ /* eslint no-unused-vars: "off" */
1240
+ function slideToClosest (speed = this.params.speed, runCallbacks = true, internal) {
1241
+ const swiper = this;
1242
+ let index$$1 = swiper.activeIndex;
1243
+ const snapIndex = Math.floor(index$$1 / swiper.params.slidesPerGroup);
1244
+
1245
+ if (snapIndex < swiper.snapGrid.length - 1) {
1246
+ const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1247
+
1248
+ const currentSnap = swiper.snapGrid[snapIndex];
1249
+ const nextSnap = swiper.snapGrid[snapIndex + 1];
1250
+
1251
+ if ((translate - currentSnap) > (nextSnap - currentSnap) / 2) {
1252
+ index$$1 = swiper.params.slidesPerGroup;
1253
+ }
1254
+ }
1255
+
1256
+ return swiper.slideTo(index$$1, speed, runCallbacks, internal);
1257
+ }
1258
+
1259
+ function slideToClickedSlide () {
1260
+ const swiper = this;
1261
+ const { params, $wrapperEl } = swiper;
1262
+
1263
+ const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
1264
+ let slideToIndex = swiper.clickedIndex;
1265
+ let realIndex;
1266
+ if (params.loop) {
1267
+ if (swiper.animating) return;
1268
+ realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
1269
+ if (params.centeredSlides) {
1270
+ if (
1271
+ (slideToIndex < swiper.loopedSlides - (slidesPerView / 2)) ||
1272
+ (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
1273
+ ) {
1274
+ swiper.loopFix();
1275
+ slideToIndex = $wrapperEl
1276
+ .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
1277
+ .eq(0)
1278
+ .index();
1279
+
1280
+ Utils.nextTick(() => {
1281
+ swiper.slideTo(slideToIndex);
1282
+ });
1283
+ } else {
1284
+ swiper.slideTo(slideToIndex);
1285
+ }
1286
+ } else if (slideToIndex > swiper.slides.length - slidesPerView) {
1287
+ swiper.loopFix();
1288
+ slideToIndex = $wrapperEl
1289
+ .children(`.${params.slideClass}[data-swiper-slide-index="${realIndex}"]:not(.${params.slideDuplicateClass})`)
1290
+ .eq(0)
1291
+ .index();
1292
+
1293
+ Utils.nextTick(() => {
1294
+ swiper.slideTo(slideToIndex);
1295
+ });
1296
+ } else {
1297
+ swiper.slideTo(slideToIndex);
1298
+ }
1299
+ } else {
1300
+ swiper.slideTo(slideToIndex);
1301
+ }
1302
+ }
1303
+
1304
+ var slide = {
1305
+ slideTo,
1306
+ slideToLoop,
1307
+ slideNext,
1308
+ slidePrev,
1309
+ slideReset,
1310
+ slideToClosest,
1311
+ slideToClickedSlide,
1312
+ };
1313
+
1314
+ function loopCreate () {
1315
+ const swiper = this;
1316
+ const { params, $wrapperEl } = swiper;
1317
+ // Remove duplicated slides
1318
+ $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
1319
+
1320
+ let slides = $wrapperEl.children(`.${params.slideClass}`);
1321
+
1322
+ if (params.loopFillGroupWithBlank) {
1323
+ const blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
1324
+ if (blankSlidesNum !== params.slidesPerGroup) {
1325
+ for (let i = 0; i < blankSlidesNum; i += 1) {
1326
+ const blankNode = $(document.createElement('div')).addClass(`${params.slideClass} ${params.slideBlankClass}`);
1327
+ $wrapperEl.append(blankNode);
1328
+ }
1329
+ slides = $wrapperEl.children(`.${params.slideClass}`);
1330
+ }
1331
+ }
1332
+
1333
+ if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length;
1334
+
1335
+ swiper.loopedSlides = parseInt(params.loopedSlides || params.slidesPerView, 10);
1336
+ swiper.loopedSlides += params.loopAdditionalSlides;
1337
+ if (swiper.loopedSlides > slides.length) {
1338
+ swiper.loopedSlides = slides.length;
1339
+ }
1340
+
1341
+ const prependSlides = [];
1342
+ const appendSlides = [];
1343
+ slides.each((index$$1, el) => {
1344
+ const slide = $(el);
1345
+ if (index$$1 < swiper.loopedSlides) appendSlides.push(el);
1346
+ if (index$$1 < slides.length && index$$1 >= slides.length - swiper.loopedSlides) prependSlides.push(el);
1347
+ slide.attr('data-swiper-slide-index', index$$1);
1348
+ });
1349
+ for (let i = 0; i < appendSlides.length; i += 1) {
1350
+ $wrapperEl.append($(appendSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
1351
+ }
1352
+ for (let i = prependSlides.length - 1; i >= 0; i -= 1) {
1353
+ $wrapperEl.prepend($(prependSlides[i].cloneNode(true)).addClass(params.slideDuplicateClass));
1354
+ }
1355
+ }
1356
+
1357
+ function loopFix () {
1358
+ const swiper = this;
1359
+ const {
1360
+ params, activeIndex, slides, loopedSlides, allowSlidePrev, allowSlideNext, snapGrid, rtlTranslate: rtl,
1361
+ } = swiper;
1362
+ let newIndex;
1363
+ swiper.allowSlidePrev = true;
1364
+ swiper.allowSlideNext = true;
1365
+
1366
+ const snapTranslate = -snapGrid[activeIndex];
1367
+ const diff = snapTranslate - swiper.getTranslate();
1368
+
1369
+
1370
+ // Fix For Negative Oversliding
1371
+ if (activeIndex < loopedSlides) {
1372
+ newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
1373
+ newIndex += loopedSlides;
1374
+ const slideChanged = swiper.slideTo(newIndex, 0, false, true);
1375
+ if (slideChanged && diff !== 0) {
1376
+ swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
1377
+ }
1378
+ } else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex >= slides.length - loopedSlides)) {
1379
+ // Fix For Positive Oversliding
1380
+ newIndex = -slides.length + activeIndex + loopedSlides;
1381
+ newIndex += loopedSlides;
1382
+ const slideChanged = swiper.slideTo(newIndex, 0, false, true);
1383
+ if (slideChanged && diff !== 0) {
1384
+ swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
1385
+ }
1386
+ }
1387
+ swiper.allowSlidePrev = allowSlidePrev;
1388
+ swiper.allowSlideNext = allowSlideNext;
1389
+ }
1390
+
1391
+ function loopDestroy () {
1392
+ const swiper = this;
1393
+ const { $wrapperEl, params, slides } = swiper;
1394
+ $wrapperEl.children(`.${params.slideClass}.${params.slideDuplicateClass}`).remove();
1395
+ slides.removeAttr('data-swiper-slide-index');
1396
+ }
1397
+
1398
+ var loop = {
1399
+ loopCreate,
1400
+ loopFix,
1401
+ loopDestroy,
1402
+ };
1403
+
1404
+ function setGrabCursor (moving) {
1405
+ const swiper = this;
1406
+ if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) return;
1407
+ const el = swiper.el;
1408
+ el.style.cursor = 'move';
1409
+ el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
1410
+ el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
1411
+ el.style.cursor = moving ? 'grabbing' : 'grab';
1412
+ }
1413
+
1414
+ function unsetGrabCursor () {
1415
+ const swiper = this;
1416
+ if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) return;
1417
+ swiper.el.style.cursor = '';
1418
+ }
1419
+
1420
+ var grabCursor = {
1421
+ setGrabCursor,
1422
+ unsetGrabCursor,
1423
+ };
1424
+
1425
+ function appendSlide (slides) {
1426
+ const swiper = this;
1427
+ const { $wrapperEl, params } = swiper;
1428
+ if (params.loop) {
1429
+ swiper.loopDestroy();
1430
+ }
1431
+ if (typeof slides === 'object' && 'length' in slides) {
1432
+ for (let i = 0; i < slides.length; i += 1) {
1433
+ if (slides[i]) $wrapperEl.append(slides[i]);
1434
+ }
1435
+ } else {
1436
+ $wrapperEl.append(slides);
1437
+ }
1438
+ if (params.loop) {
1439
+ swiper.loopCreate();
1440
+ }
1441
+ if (!(params.observer && Support.observer)) {
1442
+ swiper.update();
1443
+ }
1444
+ }
1445
+
1446
+ function prependSlide (slides) {
1447
+ const swiper = this;
1448
+ const { params, $wrapperEl, activeIndex } = swiper;
1449
+
1450
+ if (params.loop) {
1451
+ swiper.loopDestroy();
1452
+ }
1453
+ let newActiveIndex = activeIndex + 1;
1454
+ if (typeof slides === 'object' && 'length' in slides) {
1455
+ for (let i = 0; i < slides.length; i += 1) {
1456
+ if (slides[i]) $wrapperEl.prepend(slides[i]);
1457
+ }
1458
+ newActiveIndex = activeIndex + slides.length;
1459
+ } else {
1460
+ $wrapperEl.prepend(slides);
1461
+ }
1462
+ if (params.loop) {
1463
+ swiper.loopCreate();
1464
+ }
1465
+ if (!(params.observer && Support.observer)) {
1466
+ swiper.update();
1467
+ }
1468
+ swiper.slideTo(newActiveIndex, 0, false);
1469
+ }
1470
+
1471
+ function addSlide (index$$1, slides) {
1472
+ const swiper = this;
1473
+ const { $wrapperEl, params, activeIndex } = swiper;
1474
+ let activeIndexBuffer = activeIndex;
1475
+ if (params.loop) {
1476
+ activeIndexBuffer -= swiper.loopedSlides;
1477
+ swiper.loopDestroy();
1478
+ swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
1479
+ }
1480
+ const baseLength = swiper.slides.length;
1481
+ if (index$$1 <= 0) {
1482
+ swiper.prependSlide(slides);
1483
+ return;
1484
+ } else if (index$$1 >= baseLength) {
1485
+ swiper.appendSlide(slides);
1486
+ return;
1487
+ }
1488
+ let newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + 1 : activeIndexBuffer;
1489
+
1490
+ const slidesBuffer = [];
1491
+ for (let i = baseLength - 1; i >= index$$1; i -= 1) {
1492
+ const currentSlide = swiper.slides.eq(i);
1493
+ currentSlide.remove();
1494
+ slidesBuffer.unshift(currentSlide);
1495
+ }
1496
+
1497
+ if (typeof slides === 'object' && 'length' in slides) {
1498
+ for (let i = 0; i < slides.length; i += 1) {
1499
+ if (slides[i]) $wrapperEl.append(slides[i]);
1500
+ }
1501
+ newActiveIndex = activeIndexBuffer > index$$1 ? activeIndexBuffer + slides.length : activeIndexBuffer;
1502
+ } else {
1503
+ $wrapperEl.append(slides);
1504
+ }
1505
+
1506
+ for (let i = 0; i < slidesBuffer.length; i += 1) {
1507
+ $wrapperEl.append(slidesBuffer[i]);
1508
+ }
1509
+
1510
+ if (params.loop) {
1511
+ swiper.loopCreate();
1512
+ }
1513
+ if (!(params.observer && Support.observer)) {
1514
+ swiper.update();
1515
+ }
1516
+ if (params.loop) {
1517
+ swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
1518
+ } else {
1519
+ swiper.slideTo(newActiveIndex, 0, false);
1520
+ }
1521
+ }
1522
+
1523
+ function removeSlide (slidesIndexes) {
1524
+ const swiper = this;
1525
+ const { params, $wrapperEl, activeIndex } = swiper;
1526
+
1527
+ let activeIndexBuffer = activeIndex;
1528
+ if (params.loop) {
1529
+ activeIndexBuffer -= swiper.loopedSlides;
1530
+ swiper.loopDestroy();
1531
+ swiper.slides = $wrapperEl.children(`.${params.slideClass}`);
1532
+ }
1533
+ let newActiveIndex = activeIndexBuffer;
1534
+ let indexToRemove;
1535
+
1536
+ if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
1537
+ for (let i = 0; i < slidesIndexes.length; i += 1) {
1538
+ indexToRemove = slidesIndexes[i];
1539
+ if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
1540
+ if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
1541
+ }
1542
+ newActiveIndex = Math.max(newActiveIndex, 0);
1543
+ } else {
1544
+ indexToRemove = slidesIndexes;
1545
+ if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove();
1546
+ if (indexToRemove < newActiveIndex) newActiveIndex -= 1;
1547
+ newActiveIndex = Math.max(newActiveIndex, 0);
1548
+ }
1549
+
1550
+ if (params.loop) {
1551
+ swiper.loopCreate();
1552
+ }
1553
+
1554
+ if (!(params.observer && Support.observer)) {
1555
+ swiper.update();
1556
+ }
1557
+ if (params.loop) {
1558
+ swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
1559
+ } else {
1560
+ swiper.slideTo(newActiveIndex, 0, false);
1561
+ }
1562
+ }
1563
+
1564
+ function removeAllSlides () {
1565
+ const swiper = this;
1566
+
1567
+ const slidesIndexes = [];
1568
+ for (let i = 0; i < swiper.slides.length; i += 1) {
1569
+ slidesIndexes.push(i);
1570
+ }
1571
+ swiper.removeSlide(slidesIndexes);
1572
+ }
1573
+
1574
+ var manipulation = {
1575
+ appendSlide,
1576
+ prependSlide,
1577
+ addSlide,
1578
+ removeSlide,
1579
+ removeAllSlides,
1580
+ };
1581
+
1582
+ const Device = (function Device() {
1583
+ const ua = window.navigator.userAgent;
1584
+
1585
+ const device = {
1586
+ ios: false,
1587
+ android: false,
1588
+ androidChrome: false,
1589
+ desktop: false,
1590
+ windows: false,
1591
+ iphone: false,
1592
+ ipod: false,
1593
+ ipad: false,
1594
+ cordova: window.cordova || window.phonegap,
1595
+ phonegap: window.cordova || window.phonegap,
1596
+ };
1597
+
1598
+ const windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); // eslint-disable-line
1599
+ const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
1600
+ const ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
1601
+ const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
1602
+ const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
1603
+
1604
+
1605
+ // Windows
1606
+ if (windows) {
1607
+ device.os = 'windows';
1608
+ device.osVersion = windows[2];
1609
+ device.windows = true;
1610
+ }
1611
+ // Android
1612
+ if (android && !windows) {
1613
+ device.os = 'android';
1614
+ device.osVersion = android[2];
1615
+ device.android = true;
1616
+ device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
1617
+ }
1618
+ if (ipad || iphone || ipod) {
1619
+ device.os = 'ios';
1620
+ device.ios = true;
1621
+ }
1622
+ // iOS
1623
+ if (iphone && !ipod) {
1624
+ device.osVersion = iphone[2].replace(/_/g, '.');
1625
+ device.iphone = true;
1626
+ }
1627
+ if (ipad) {
1628
+ device.osVersion = ipad[2].replace(/_/g, '.');
1629
+ device.ipad = true;
1630
+ }
1631
+ if (ipod) {
1632
+ device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
1633
+ device.iphone = true;
1634
+ }
1635
+ // iOS 8+ changed UA
1636
+ if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
1637
+ if (device.osVersion.split('.')[0] === '10') {
1638
+ device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
1639
+ }
1640
+ }
1641
+
1642
+ // Desktop
1643
+ device.desktop = !(device.os || device.android || device.webView);
1644
+
1645
+ // Webview
1646
+ device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);
1647
+
1648
+ // Minimal UI
1649
+ if (device.os && device.os === 'ios') {
1650
+ const osVersionArr = device.osVersion.split('.');
1651
+ const metaViewport = document.querySelector('meta[name="viewport"]');
1652
+ device.minimalUi =
1653
+ !device.webView &&
1654
+ (ipod || iphone) &&
1655
+ (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7) &&
1656
+ metaViewport && metaViewport.getAttribute('content').indexOf('minimal-ui') >= 0;
1657
+ }
1658
+
1659
+ // Pixel Ratio
1660
+ device.pixelRatio = window.devicePixelRatio || 1;
1661
+
1662
+ // Export object
1663
+ return device;
1664
+ }());
1665
+
1666
+ function onTouchStart (event) {
1667
+ const swiper = this;
1668
+ const data$$1 = swiper.touchEventsData;
1669
+ const { params, touches } = swiper;
1670
+ if (swiper.animating && params.preventIntercationOnTransition) {
1671
+ return;
1672
+ }
1673
+ let e = event;
1674
+ if (e.originalEvent) e = e.originalEvent;
1675
+ data$$1.isTouchEvent = e.type === 'touchstart';
1676
+ if (!data$$1.isTouchEvent && 'which' in e && e.which === 3) return;
1677
+ if (data$$1.isTouched && data$$1.isMoved) return;
1678
+ if (params.noSwiping && $(e.target).closest(params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`)[0]) {
1679
+ swiper.allowClick = true;
1680
+ return;
1681
+ }
1682
+ if (params.swipeHandler) {
1683
+ if (!$(e).closest(params.swipeHandler)[0]) return;
1684
+ }
1685
+
1686
+ touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
1687
+ touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
1688
+ const startX = touches.currentX;
1689
+ const startY = touches.currentY;
1690
+
1691
+ // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
1692
+
1693
+ if (
1694
+ Device.ios &&
1695
+ !Device.cordova &&
1696
+ params.iOSEdgeSwipeDetection &&
1697
+ ((startX <= params.iOSEdgeSwipeThreshold) ||
1698
+ (startX >= window.screen.width - params.iOSEdgeSwipeThreshold))
1699
+ ) {
1700
+ return;
1701
+ }
1702
+
1703
+ Utils.extend(data$$1, {
1704
+ isTouched: true,
1705
+ isMoved: false,
1706
+ allowTouchCallbacks: true,
1707
+ isScrolling: undefined,
1708
+ startMoving: undefined,
1709
+ });
1710
+
1711
+ touches.startX = startX;
1712
+ touches.startY = startY;
1713
+ data$$1.touchStartTime = Utils.now();
1714
+ swiper.allowClick = true;
1715
+ swiper.updateSize();
1716
+ swiper.swipeDirection = undefined;
1717
+ if (params.threshold > 0) data$$1.allowThresholdMove = false;
1718
+ if (e.type !== 'touchstart') {
1719
+ let preventDefault = true;
1720
+ if ($(e.target).is(data$$1.formElements)) preventDefault = false;
1721
+ if (
1722
+ document.activeElement &&
1723
+ $(document.activeElement).is(data$$1.formElements) &&
1724
+ document.activeElement !== e.target
1725
+ ) {
1726
+ document.activeElement.blur();
1727
+ }
1728
+ if (preventDefault && swiper.allowTouchMove) {
1729
+ e.preventDefault();
1730
+ }
1731
+ }
1732
+ swiper.emit('touchStart', e);
1733
+ }
1734
+
1735
+ function onTouchMove (event) {
1736
+ const swiper = this;
1737
+ const data$$1 = swiper.touchEventsData;
1738
+ const { params, touches, rtlTranslate: rtl } = swiper;
1739
+ let e = event;
1740
+ if (e.originalEvent) e = e.originalEvent;
1741
+ if (!data$$1.isTouched) {
1742
+ if (data$$1.startMoving && data$$1.isScrolling) {
1743
+ swiper.emit('touchMoveOpposite', e);
1744
+ }
1745
+ return;
1746
+ }
1747
+ if (data$$1.isTouchEvent && e.type === 'mousemove') return;
1748
+ const pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
1749
+ const pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
1750
+ if (e.preventedByNestedSwiper) {
1751
+ touches.startX = pageX;
1752
+ touches.startY = pageY;
1753
+ return;
1754
+ }
1755
+ if (!swiper.allowTouchMove) {
1756
+ // isMoved = true;
1757
+ swiper.allowClick = false;
1758
+ if (data$$1.isTouched) {
1759
+ Utils.extend(touches, {
1760
+ startX: pageX,
1761
+ startY: pageY,
1762
+ currentX: pageX,
1763
+ currentY: pageY,
1764
+ });
1765
+ data$$1.touchStartTime = Utils.now();
1766
+ }
1767
+ return;
1768
+ }
1769
+ if (data$$1.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
1770
+ if (swiper.isVertical()) {
1771
+ // Vertical
1772
+ if (
1773
+ (pageY < touches.startY && swiper.translate <= swiper.maxTranslate()) ||
1774
+ (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
1775
+ ) {
1776
+ data$$1.isTouched = false;
1777
+ data$$1.isMoved = false;
1778
+ return;
1779
+ }
1780
+ } else if (
1781
+ (pageX < touches.startX && swiper.translate <= swiper.maxTranslate()) ||
1782
+ (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
1783
+ ) {
1784
+ return;
1785
+ }
1786
+ }
1787
+ if (data$$1.isTouchEvent && document.activeElement) {
1788
+ if (e.target === document.activeElement && $(e.target).is(data$$1.formElements)) {
1789
+ data$$1.isMoved = true;
1790
+ swiper.allowClick = false;
1791
+ return;
1792
+ }
1793
+ }
1794
+ if (data$$1.allowTouchCallbacks) {
1795
+ swiper.emit('touchMove', e);
1796
+ }
1797
+ if (e.targetTouches && e.targetTouches.length > 1) return;
1798
+
1799
+ touches.currentX = pageX;
1800
+ touches.currentY = pageY;
1801
+
1802
+ const diffX = touches.currentX - touches.startX;
1803
+ const diffY = touches.currentY - touches.startY;
1804
+
1805
+ if (typeof data$$1.isScrolling === 'undefined') {
1806
+ let touchAngle;
1807
+ if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
1808
+ data$$1.isScrolling = false;
1809
+ } else {
1810
+ // eslint-disable-next-line
1811
+ if ((diffX * diffX) + (diffY * diffY) >= 25) {
1812
+ touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
1813
+ data$$1.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
1814
+ }
1815
+ }
1816
+ }
1817
+ if (data$$1.isScrolling) {
1818
+ swiper.emit('touchMoveOpposite', e);
1819
+ }
1820
+ if (typeof startMoving === 'undefined') {
1821
+ if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
1822
+ data$$1.startMoving = true;
1823
+ }
1824
+ }
1825
+ if (data$$1.isScrolling) {
1826
+ data$$1.isTouched = false;
1827
+ return;
1828
+ }
1829
+ if (!data$$1.startMoving) {
1830
+ return;
1831
+ }
1832
+ swiper.allowClick = false;
1833
+ e.preventDefault();
1834
+ if (params.touchMoveStopPropagation && !params.nested) {
1835
+ e.stopPropagation();
1836
+ }
1837
+
1838
+ if (!data$$1.isMoved) {
1839
+ if (params.loop) {
1840
+ swiper.loopFix();
1841
+ }
1842
+ data$$1.startTranslate = swiper.getTranslate();
1843
+ swiper.setTransition(0);
1844
+ if (swiper.animating) {
1845
+ swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
1846
+ }
1847
+ data$$1.allowMomentumBounce = false;
1848
+ // Grab Cursor
1849
+ if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
1850
+ swiper.setGrabCursor(true);
1851
+ }
1852
+ swiper.emit('sliderFirstMove', e);
1853
+ }
1854
+ swiper.emit('sliderMove', e);
1855
+ data$$1.isMoved = true;
1856
+
1857
+ let diff = swiper.isHorizontal() ? diffX : diffY;
1858
+ touches.diff = diff;
1859
+
1860
+ diff *= params.touchRatio;
1861
+ if (rtl) diff = -diff;
1862
+
1863
+ swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
1864
+ data$$1.currentTranslate = diff + data$$1.startTranslate;
1865
+
1866
+ let disableParentSwiper = true;
1867
+ let resistanceRatio = params.resistanceRatio;
1868
+ if (params.touchReleaseOnEdges) {
1869
+ resistanceRatio = 0;
1870
+ }
1871
+ if ((diff > 0 && data$$1.currentTranslate > swiper.minTranslate())) {
1872
+ disableParentSwiper = false;
1873
+ if (params.resistance) data$$1.currentTranslate = (swiper.minTranslate() - 1) + ((-swiper.minTranslate() + data$$1.startTranslate + diff) ** resistanceRatio);
1874
+ } else if (diff < 0 && data$$1.currentTranslate < swiper.maxTranslate()) {
1875
+ disableParentSwiper = false;
1876
+ if (params.resistance) data$$1.currentTranslate = (swiper.maxTranslate() + 1) - ((swiper.maxTranslate() - data$$1.startTranslate - diff) ** resistanceRatio);
1877
+ }
1878
+
1879
+ if (disableParentSwiper) {
1880
+ e.preventedByNestedSwiper = true;
1881
+ }
1882
+
1883
+ // Directions locks
1884
+ if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data$$1.currentTranslate < data$$1.startTranslate) {
1885
+ data$$1.currentTranslate = data$$1.startTranslate;
1886
+ }
1887
+ if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data$$1.currentTranslate > data$$1.startTranslate) {
1888
+ data$$1.currentTranslate = data$$1.startTranslate;
1889
+ }
1890
+
1891
+
1892
+ // Threshold
1893
+ if (params.threshold > 0) {
1894
+ if (Math.abs(diff) > params.threshold || data$$1.allowThresholdMove) {
1895
+ if (!data$$1.allowThresholdMove) {
1896
+ data$$1.allowThresholdMove = true;
1897
+ touches.startX = touches.currentX;
1898
+ touches.startY = touches.currentY;
1899
+ data$$1.currentTranslate = data$$1.startTranslate;
1900
+ touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
1901
+ return;
1902
+ }
1903
+ } else {
1904
+ data$$1.currentTranslate = data$$1.startTranslate;
1905
+ return;
1906
+ }
1907
+ }
1908
+
1909
+ if (!params.followFinger) return;
1910
+
1911
+ // Update active index in free mode
1912
+ if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
1913
+ swiper.updateActiveIndex();
1914
+ swiper.updateSlidesClasses();
1915
+ }
1916
+ if (params.freeMode) {
1917
+ // Velocity
1918
+ if (data$$1.velocities.length === 0) {
1919
+ data$$1.velocities.push({
1920
+ position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
1921
+ time: data$$1.touchStartTime,
1922
+ });
1923
+ }
1924
+ data$$1.velocities.push({
1925
+ position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
1926
+ time: Utils.now(),
1927
+ });
1928
+ }
1929
+ // Update progress
1930
+ swiper.updateProgress(data$$1.currentTranslate);
1931
+ // Update translate
1932
+ swiper.setTranslate(data$$1.currentTranslate);
1933
+ }
1934
+
1935
+ function onTouchEnd (event) {
1936
+ const swiper = this;
1937
+ const data$$1 = swiper.touchEventsData;
1938
+
1939
+ const {
1940
+ params, touches, rtlTranslate: rtl, $wrapperEl, slidesGrid, snapGrid,
1941
+ } = swiper;
1942
+ let e = event;
1943
+ if (e.originalEvent) e = e.originalEvent;
1944
+ if (data$$1.allowTouchCallbacks) {
1945
+ swiper.emit('touchEnd', e);
1946
+ }
1947
+ data$$1.allowTouchCallbacks = false;
1948
+ if (!data$$1.isTouched) {
1949
+ if (data$$1.isMoved && params.grabCursor) {
1950
+ swiper.setGrabCursor(false);
1951
+ }
1952
+ data$$1.isMoved = false;
1953
+ data$$1.startMoving = false;
1954
+ return;
1955
+ }
1956
+ // Return Grab Cursor
1957
+ if (params.grabCursor && data$$1.isMoved && data$$1.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
1958
+ swiper.setGrabCursor(false);
1959
+ }
1960
+
1961
+ // Time diff
1962
+ const touchEndTime = Utils.now();
1963
+ const timeDiff = touchEndTime - data$$1.touchStartTime;
1964
+
1965
+ // Tap, doubleTap, Click
1966
+ if (swiper.allowClick) {
1967
+ swiper.updateClickedSlide(e);
1968
+ swiper.emit('tap', e);
1969
+ if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) > 300) {
1970
+ if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout);
1971
+ data$$1.clickTimeout = Utils.nextTick(() => {
1972
+ if (!swiper || swiper.destroyed) return;
1973
+ swiper.emit('click', e);
1974
+ }, 300);
1975
+ }
1976
+ if (timeDiff < 300 && (touchEndTime - data$$1.lastClickTime) < 300) {
1977
+ if (data$$1.clickTimeout) clearTimeout(data$$1.clickTimeout);
1978
+ swiper.emit('doubleTap', e);
1979
+ }
1980
+ }
1981
+
1982
+ data$$1.lastClickTime = Utils.now();
1983
+ Utils.nextTick(() => {
1984
+ if (!swiper.destroyed) swiper.allowClick = true;
1985
+ });
1986
+
1987
+ if (!data$$1.isTouched || !data$$1.isMoved || !swiper.swipeDirection || touches.diff === 0 || data$$1.currentTranslate === data$$1.startTranslate) {
1988
+ data$$1.isTouched = false;
1989
+ data$$1.isMoved = false;
1990
+ data$$1.startMoving = false;
1991
+ return;
1992
+ }
1993
+ data$$1.isTouched = false;
1994
+ data$$1.isMoved = false;
1995
+ data$$1.startMoving = false;
1996
+
1997
+ let currentPos;
1998
+ if (params.followFinger) {
1999
+ currentPos = rtl ? swiper.translate : -swiper.translate;
2000
+ } else {
2001
+ currentPos = -data$$1.currentTranslate;
2002
+ }
2003
+
2004
+ if (params.freeMode) {
2005
+ if (currentPos < -swiper.minTranslate()) {
2006
+ swiper.slideTo(swiper.activeIndex);
2007
+ return;
2008
+ } else if (currentPos > -swiper.maxTranslate()) {
2009
+ if (swiper.slides.length < snapGrid.length) {
2010
+ swiper.slideTo(snapGrid.length - 1);
2011
+ } else {
2012
+ swiper.slideTo(swiper.slides.length - 1);
2013
+ }
2014
+ return;
2015
+ }
2016
+
2017
+ if (params.freeModeMomentum) {
2018
+ if (data$$1.velocities.length > 1) {
2019
+ const lastMoveEvent = data$$1.velocities.pop();
2020
+ const velocityEvent = data$$1.velocities.pop();
2021
+
2022
+ const distance = lastMoveEvent.position - velocityEvent.position;
2023
+ const time = lastMoveEvent.time - velocityEvent.time;
2024
+ swiper.velocity = distance / time;
2025
+ swiper.velocity /= 2;
2026
+ if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
2027
+ swiper.velocity = 0;
2028
+ }
2029
+ // this implies that the user stopped moving a finger then released.
2030
+ // There would be no events with distance zero, so the last event is stale.
2031
+ if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
2032
+ swiper.velocity = 0;
2033
+ }
2034
+ } else {
2035
+ swiper.velocity = 0;
2036
+ }
2037
+ swiper.velocity *= params.freeModeMomentumVelocityRatio;
2038
+
2039
+ data$$1.velocities.length = 0;
2040
+ let momentumDuration = 1000 * params.freeModeMomentumRatio;
2041
+ const momentumDistance = swiper.velocity * momentumDuration;
2042
+
2043
+ let newPosition = swiper.translate + momentumDistance;
2044
+ if (rtl) newPosition = -newPosition;
2045
+
2046
+ let doBounce = false;
2047
+ let afterBouncePosition;
2048
+ const bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
2049
+ let needsLoopFix;
2050
+ if (newPosition < swiper.maxTranslate()) {
2051
+ if (params.freeModeMomentumBounce) {
2052
+ if (newPosition + swiper.maxTranslate() < -bounceAmount) {
2053
+ newPosition = swiper.maxTranslate() - bounceAmount;
2054
+ }
2055
+ afterBouncePosition = swiper.maxTranslate();
2056
+ doBounce = true;
2057
+ data$$1.allowMomentumBounce = true;
2058
+ } else {
2059
+ newPosition = swiper.maxTranslate();
2060
+ }
2061
+ if (params.loop && params.centeredSlides) needsLoopFix = true;
2062
+ } else if (newPosition > swiper.minTranslate()) {
2063
+ if (params.freeModeMomentumBounce) {
2064
+ if (newPosition - swiper.minTranslate() > bounceAmount) {
2065
+ newPosition = swiper.minTranslate() + bounceAmount;
2066
+ }
2067
+ afterBouncePosition = swiper.minTranslate();
2068
+ doBounce = true;
2069
+ data$$1.allowMomentumBounce = true;
2070
+ } else {
2071
+ newPosition = swiper.minTranslate();
2072
+ }
2073
+ if (params.loop && params.centeredSlides) needsLoopFix = true;
2074
+ } else if (params.freeModeSticky) {
2075
+ let nextSlide;
2076
+ for (let j = 0; j < snapGrid.length; j += 1) {
2077
+ if (snapGrid[j] > -newPosition) {
2078
+ nextSlide = j;
2079
+ break;
2080
+ }
2081
+ }
2082
+
2083
+ if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
2084
+ newPosition = snapGrid[nextSlide];
2085
+ } else {
2086
+ newPosition = snapGrid[nextSlide - 1];
2087
+ }
2088
+ newPosition = -newPosition;
2089
+ }
2090
+ if (needsLoopFix) {
2091
+ swiper.once('transitionEnd', () => {
2092
+ swiper.loopFix();
2093
+ });
2094
+ }
2095
+ // Fix duration
2096
+ if (swiper.velocity !== 0) {
2097
+ if (rtl) {
2098
+ momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
2099
+ } else {
2100
+ momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
2101
+ }
2102
+ } else if (params.freeModeSticky) {
2103
+ swiper.slideToClosest();
2104
+ return;
2105
+ }
2106
+
2107
+ if (params.freeModeMomentumBounce && doBounce) {
2108
+ swiper.updateProgress(afterBouncePosition);
2109
+ swiper.setTransition(momentumDuration);
2110
+ swiper.setTranslate(newPosition);
2111
+ swiper.transitionStart(true, swiper.swipeDirection);
2112
+ swiper.animating = true;
2113
+ $wrapperEl.transitionEnd(() => {
2114
+ if (!swiper || swiper.destroyed || !data$$1.allowMomentumBounce) return;
2115
+ swiper.emit('momentumBounce');
2116
+
2117
+ swiper.setTransition(params.speed);
2118
+ swiper.setTranslate(afterBouncePosition);
2119
+ $wrapperEl.transitionEnd(() => {
2120
+ if (!swiper || swiper.destroyed) return;
2121
+ swiper.transitionEnd();
2122
+ });
2123
+ });
2124
+ } else if (swiper.velocity) {
2125
+ swiper.updateProgress(newPosition);
2126
+ swiper.setTransition(momentumDuration);
2127
+ swiper.setTranslate(newPosition);
2128
+ swiper.transitionStart(true, swiper.swipeDirection);
2129
+ if (!swiper.animating) {
2130
+ swiper.animating = true;
2131
+ $wrapperEl.transitionEnd(() => {
2132
+ if (!swiper || swiper.destroyed) return;
2133
+ swiper.transitionEnd();
2134
+ });
2135
+ }
2136
+ } else {
2137
+ swiper.updateProgress(newPosition);
2138
+ }
2139
+
2140
+ swiper.updateActiveIndex();
2141
+ swiper.updateSlidesClasses();
2142
+ } else if (params.freeModeSticky) {
2143
+ swiper.slideToClosest();
2144
+ return;
2145
+ }
2146
+
2147
+ if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
2148
+ swiper.updateProgress();
2149
+ swiper.updateActiveIndex();
2150
+ swiper.updateSlidesClasses();
2151
+ }
2152
+ return;
2153
+ }
2154
+
2155
+ // Find current slide
2156
+ let stopIndex = 0;
2157
+ let groupSize = swiper.slidesSizesGrid[0];
2158
+ for (let i = 0; i < slidesGrid.length; i += params.slidesPerGroup) {
2159
+ if (typeof slidesGrid[i + params.slidesPerGroup] !== 'undefined') {
2160
+ if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + params.slidesPerGroup]) {
2161
+ stopIndex = i;
2162
+ groupSize = slidesGrid[i + params.slidesPerGroup] - slidesGrid[i];
2163
+ }
2164
+ } else if (currentPos >= slidesGrid[i]) {
2165
+ stopIndex = i;
2166
+ groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
2167
+ }
2168
+ }
2169
+
2170
+ // Find current slide size
2171
+ const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
2172
+
2173
+ if (timeDiff > params.longSwipesMs) {
2174
+ // Long touches
2175
+ if (!params.longSwipes) {
2176
+ swiper.slideTo(swiper.activeIndex);
2177
+ return;
2178
+ }
2179
+ if (swiper.swipeDirection === 'next') {
2180
+ if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + params.slidesPerGroup);
2181
+ else swiper.slideTo(stopIndex);
2182
+ }
2183
+ if (swiper.swipeDirection === 'prev') {
2184
+ if (ratio > (1 - params.longSwipesRatio)) swiper.slideTo(stopIndex + params.slidesPerGroup);
2185
+ else swiper.slideTo(stopIndex);
2186
+ }
2187
+ } else {
2188
+ // Short swipes
2189
+ if (!params.shortSwipes) {
2190
+ swiper.slideTo(swiper.activeIndex);
2191
+ return;
2192
+ }
2193
+ if (swiper.swipeDirection === 'next') {
2194
+ swiper.slideTo(stopIndex + params.slidesPerGroup);
2195
+ }
2196
+ if (swiper.swipeDirection === 'prev') {
2197
+ swiper.slideTo(stopIndex);
2198
+ }
2199
+ }
2200
+ }
2201
+
2202
+ function onResize () {
2203
+ const swiper = this;
2204
+
2205
+ const { params, el } = swiper;
2206
+
2207
+ if (el && el.offsetWidth === 0) return;
2208
+
2209
+ // Breakpoints
2210
+ if (params.breakpoints) {
2211
+ swiper.setBreakpoint();
2212
+ }
2213
+
2214
+ // Save locks
2215
+ const { allowSlideNext, allowSlidePrev, snapGrid } = swiper;
2216
+
2217
+ // Disable locks on resize
2218
+ swiper.allowSlideNext = true;
2219
+ swiper.allowSlidePrev = true;
2220
+
2221
+ swiper.updateSize();
2222
+ swiper.updateSlides();
2223
+
2224
+ if (params.freeMode) {
2225
+ const newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate());
2226
+ swiper.setTranslate(newTranslate);
2227
+ swiper.updateActiveIndex();
2228
+ swiper.updateSlidesClasses();
2229
+
2230
+ if (params.autoHeight) {
2231
+ swiper.updateAutoHeight();
2232
+ }
2233
+ } else {
2234
+ swiper.updateSlidesClasses();
2235
+ if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
2236
+ swiper.slideTo(swiper.slides.length - 1, 0, false, true);
2237
+ } else {
2238
+ swiper.slideTo(swiper.activeIndex, 0, false, true);
2239
+ }
2240
+ }
2241
+ // Return locks after resize
2242
+ swiper.allowSlidePrev = allowSlidePrev;
2243
+ swiper.allowSlideNext = allowSlideNext;
2244
+
2245
+ if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
2246
+ swiper.checkOverflow();
2247
+ }
2248
+ }
2249
+
2250
+ function onClick (e) {
2251
+ const swiper = this;
2252
+ if (!swiper.allowClick) {
2253
+ if (swiper.params.preventClicks) e.preventDefault();
2254
+ if (swiper.params.preventClicksPropagation && swiper.animating) {
2255
+ e.stopPropagation();
2256
+ e.stopImmediatePropagation();
2257
+ }
2258
+ }
2259
+ }
2260
+
2261
+ function attachEvents() {
2262
+ const swiper = this;
2263
+ const {
2264
+ params, touchEvents, el, wrapperEl,
2265
+ } = swiper;
2266
+
2267
+ {
2268
+ swiper.onTouchStart = onTouchStart.bind(swiper);
2269
+ swiper.onTouchMove = onTouchMove.bind(swiper);
2270
+ swiper.onTouchEnd = onTouchEnd.bind(swiper);
2271
+ }
2272
+
2273
+ swiper.onClick = onClick.bind(swiper);
2274
+
2275
+ const target = params.touchEventsTarget === 'container' ? el : wrapperEl;
2276
+ const capture = !!params.nested;
2277
+
2278
+ // Touch Events
2279
+ {
2280
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
2281
+ target.addEventListener(touchEvents.start, swiper.onTouchStart, false);
2282
+ document.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
2283
+ document.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
2284
+ } else {
2285
+ if (Support.touch) {
2286
+ const passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
2287
+ target.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
2288
+ target.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture } : capture);
2289
+ target.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
2290
+ }
2291
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
2292
+ target.addEventListener('mousedown', swiper.onTouchStart, false);
2293
+ document.addEventListener('mousemove', swiper.onTouchMove, capture);
2294
+ document.addEventListener('mouseup', swiper.onTouchEnd, false);
2295
+ }
2296
+ }
2297
+ // Prevent Links Clicks
2298
+ if (params.preventClicks || params.preventClicksPropagation) {
2299
+ target.addEventListener('click', swiper.onClick, true);
2300
+ }
2301
+ }
2302
+
2303
+ // Resize handler
2304
+ swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
2305
+ }
2306
+
2307
+ function detachEvents() {
2308
+ const swiper = this;
2309
+
2310
+ const {
2311
+ params, touchEvents, el, wrapperEl,
2312
+ } = swiper;
2313
+
2314
+ const target = params.touchEventsTarget === 'container' ? el : wrapperEl;
2315
+ const capture = !!params.nested;
2316
+
2317
+ // Touch Events
2318
+ {
2319
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
2320
+ target.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
2321
+ document.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
2322
+ document.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
2323
+ } else {
2324
+ if (Support.touch) {
2325
+ const passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
2326
+ target.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
2327
+ target.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
2328
+ target.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
2329
+ }
2330
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
2331
+ target.removeEventListener('mousedown', swiper.onTouchStart, false);
2332
+ document.removeEventListener('mousemove', swiper.onTouchMove, capture);
2333
+ document.removeEventListener('mouseup', swiper.onTouchEnd, false);
2334
+ }
2335
+ }
2336
+ // Prevent Links Clicks
2337
+ if (params.preventClicks || params.preventClicksPropagation) {
2338
+ target.removeEventListener('click', swiper.onClick, true);
2339
+ }
2340
+ }
2341
+
2342
+ // Resize handler
2343
+ swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
2344
+ }
2345
+
2346
+ var events = {
2347
+ attachEvents,
2348
+ detachEvents,
2349
+ };
2350
+
2351
+ function setBreakpoint () {
2352
+ const swiper = this;
2353
+ const {
2354
+ activeIndex, initialized, loopedSlides = 0, params,
2355
+ } = swiper;
2356
+ const breakpoints = params.breakpoints;
2357
+ if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) return;
2358
+ // Set breakpoint for window width and update parameters
2359
+ const breakpoint = swiper.getBreakpoint(breakpoints);
2360
+ if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
2361
+ const breakPointsParams = breakpoint in breakpoints ? breakpoints[breakpoint] : swiper.originalParams;
2362
+ const needsReLoop = params.loop && (breakPointsParams.slidesPerView !== params.slidesPerView);
2363
+
2364
+ Utils.extend(swiper.params, breakPointsParams);
2365
+
2366
+ Utils.extend(swiper, {
2367
+ allowTouchMove: swiper.params.allowTouchMove,
2368
+ allowSlideNext: swiper.params.allowSlideNext,
2369
+ allowSlidePrev: swiper.params.allowSlidePrev,
2370
+ });
2371
+
2372
+ swiper.currentBreakpoint = breakpoint;
2373
+
2374
+ if (needsReLoop && initialized) {
2375
+ swiper.loopDestroy();
2376
+ swiper.loopCreate();
2377
+ swiper.updateSlides();
2378
+ swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
2379
+ }
2380
+ swiper.emit('breakpoint', breakPointsParams);
2381
+ }
2382
+ }
2383
+
2384
+ function getBreakpoint (breakpoints) {
2385
+ // Get breakpoint for window width
2386
+ if (!breakpoints) return undefined;
2387
+ let breakpoint = false;
2388
+ const points = [];
2389
+ Object.keys(breakpoints).forEach((point) => {
2390
+ points.push(point);
2391
+ });
2392
+ points.sort((a, b) => parseInt(a, 10) - parseInt(b, 10));
2393
+ for (let i = 0; i < points.length; i += 1) {
2394
+ const point = points[i];
2395
+ if (point >= window.innerWidth && !breakpoint) {
2396
+ breakpoint = point;
2397
+ }
2398
+ }
2399
+ return breakpoint || 'max';
2400
+ }
2401
+
2402
+ var breakpoints = { setBreakpoint, getBreakpoint };
2403
+
2404
+ const Browser = (function Browser() {
2405
+ function isSafari() {
2406
+ const ua = window.navigator.userAgent.toLowerCase();
2407
+ return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
2408
+ }
2409
+ return {
2410
+ isIE: !!window.navigator.userAgent.match(/Trident/g) || !!window.navigator.userAgent.match(/MSIE/g),
2411
+ isSafari: isSafari(),
2412
+ isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent),
2413
+ };
2414
+ }());
2415
+
2416
+ function addClasses () {
2417
+ const swiper = this;
2418
+ const {
2419
+ classNames, params, rtl, $el,
2420
+ } = swiper;
2421
+ const suffixes = [];
2422
+
2423
+ suffixes.push(params.direction);
2424
+
2425
+ if (params.freeMode) {
2426
+ suffixes.push('free-mode');
2427
+ }
2428
+ if (!Support.flexbox) {
2429
+ suffixes.push('no-flexbox');
2430
+ }
2431
+ if (params.autoHeight) {
2432
+ suffixes.push('autoheight');
2433
+ }
2434
+ if (rtl) {
2435
+ suffixes.push('rtl');
2436
+ }
2437
+ if (params.slidesPerColumn > 1) {
2438
+ suffixes.push('multirow');
2439
+ }
2440
+ if (Device.android) {
2441
+ suffixes.push('android');
2442
+ }
2443
+ if (Device.ios) {
2444
+ suffixes.push('ios');
2445
+ }
2446
+ // WP8 Touch Events Fix
2447
+ if (Browser.isIE && (Support.pointerEvents || Support.prefixedPointerEvents)) {
2448
+ suffixes.push(`wp8-${params.direction}`);
2449
+ }
2450
+
2451
+ suffixes.forEach((suffix) => {
2452
+ classNames.push(params.containerModifierClass + suffix);
2453
+ });
2454
+
2455
+ $el.addClass(classNames.join(' '));
2456
+ }
2457
+
2458
+ function removeClasses () {
2459
+ const swiper = this;
2460
+ const { $el, classNames } = swiper;
2461
+
2462
+ $el.removeClass(classNames.join(' '));
2463
+ }
2464
+
2465
+ var classes = { addClasses, removeClasses };
2466
+
2467
+ function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
2468
+ let image;
2469
+ function onReady() {
2470
+ if (callback) callback();
2471
+ }
2472
+ if (!imageEl.complete || !checkForComplete) {
2473
+ if (src) {
2474
+ image = new window.Image();
2475
+ image.onload = onReady;
2476
+ image.onerror = onReady;
2477
+ if (sizes) {
2478
+ image.sizes = sizes;
2479
+ }
2480
+ if (srcset) {
2481
+ image.srcset = srcset;
2482
+ }
2483
+ if (src) {
2484
+ image.src = src;
2485
+ }
2486
+ } else {
2487
+ onReady();
2488
+ }
2489
+ } else {
2490
+ // image already loaded...
2491
+ onReady();
2492
+ }
2493
+ }
2494
+
2495
+ function preloadImages () {
2496
+ const swiper = this;
2497
+ swiper.imagesToLoad = swiper.$el.find('img');
2498
+ function onReady() {
2499
+ if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return;
2500
+ if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1;
2501
+ if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
2502
+ if (swiper.params.updateOnImagesReady) swiper.update();
2503
+ swiper.emit('imagesReady');
2504
+ }
2505
+ }
2506
+ for (let i = 0; i < swiper.imagesToLoad.length; i += 1) {
2507
+ const imageEl = swiper.imagesToLoad[i];
2508
+ swiper.loadImage(
2509
+ imageEl,
2510
+ imageEl.currentSrc || imageEl.getAttribute('src'),
2511
+ imageEl.srcset || imageEl.getAttribute('srcset'),
2512
+ imageEl.sizes || imageEl.getAttribute('sizes'),
2513
+ true,
2514
+ onReady
2515
+ );
2516
+ }
2517
+ }
2518
+
2519
+ var images = {
2520
+ loadImage,
2521
+ preloadImages,
2522
+ };
2523
+
2524
+ function checkOverflow() {
2525
+ const swiper = this;
2526
+ const wasLocked = swiper.isLocked;
2527
+
2528
+ swiper.isLocked = swiper.snapGrid.length === 1;
2529
+ swiper.allowSlideNext = !swiper.isLocked;
2530
+ swiper.allowSlidePrev = !swiper.isLocked;
2531
+
2532
+ // events
2533
+ if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock');
2534
+
2535
+ if (wasLocked && wasLocked !== swiper.isLocked) {
2536
+ swiper.isEnd = false;
2537
+ swiper.navigation.update();
2538
+ }
2539
+ }
2540
+
2541
+ var checkOverflow$1 = { checkOverflow };
2542
+
2543
+ var defaults = {
2544
+ init: true,
2545
+ direction: 'horizontal',
2546
+ touchEventsTarget: 'container',
2547
+ initialSlide: 0,
2548
+ speed: 300,
2549
+ //
2550
+ preventIntercationOnTransition: false,
2551
+
2552
+ // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
2553
+ iOSEdgeSwipeDetection: false,
2554
+ iOSEdgeSwipeThreshold: 20,
2555
+
2556
+ // Free mode
2557
+ freeMode: false,
2558
+ freeModeMomentum: true,
2559
+ freeModeMomentumRatio: 1,
2560
+ freeModeMomentumBounce: true,
2561
+ freeModeMomentumBounceRatio: 1,
2562
+ freeModeMomentumVelocityRatio: 1,
2563
+ freeModeSticky: false,
2564
+ freeModeMinimumVelocity: 0.02,
2565
+
2566
+ // Autoheight
2567
+ autoHeight: false,
2568
+
2569
+ // Set wrapper width
2570
+ setWrapperSize: false,
2571
+
2572
+ // Virtual Translate
2573
+ virtualTranslate: false,
2574
+
2575
+ // Effects
2576
+ effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
2577
+
2578
+ // Breakpoints
2579
+ breakpoints: undefined,
2580
+
2581
+ // Slides grid
2582
+ spaceBetween: 0,
2583
+ slidesPerView: 1,
2584
+ slidesPerColumn: 1,
2585
+ slidesPerColumnFill: 'column',
2586
+ slidesPerGroup: 1,
2587
+ centeredSlides: false,
2588
+ slidesOffsetBefore: 0, // in px
2589
+ slidesOffsetAfter: 0, // in px
2590
+ normalizeSlideIndex: true,
2591
+
2592
+ // Disable swiper and hide navigation when container not overflow
2593
+ watchOverflow: false,
2594
+
2595
+ // Round length
2596
+ roundLengths: false,
2597
+
2598
+ // Touches
2599
+ touchRatio: 1,
2600
+ touchAngle: 45,
2601
+ simulateTouch: true,
2602
+ shortSwipes: true,
2603
+ longSwipes: true,
2604
+ longSwipesRatio: 0.5,
2605
+ longSwipesMs: 300,
2606
+ followFinger: true,
2607
+ allowTouchMove: true,
2608
+ threshold: 0,
2609
+ touchMoveStopPropagation: true,
2610
+ touchReleaseOnEdges: false,
2611
+
2612
+ // Unique Navigation Elements
2613
+ uniqueNavElements: true,
2614
+
2615
+ // Resistance
2616
+ resistance: true,
2617
+ resistanceRatio: 0.85,
2618
+
2619
+ // Progress
2620
+ watchSlidesProgress: false,
2621
+ watchSlidesVisibility: false,
2622
+
2623
+ // Cursor
2624
+ grabCursor: false,
2625
+
2626
+ // Clicks
2627
+ preventClicks: true,
2628
+ preventClicksPropagation: true,
2629
+ slideToClickedSlide: false,
2630
+
2631
+ // Images
2632
+ preloadImages: true,
2633
+ updateOnImagesReady: true,
2634
+
2635
+ // loop
2636
+ loop: false,
2637
+ loopAdditionalSlides: 0,
2638
+ loopedSlides: null,
2639
+ loopFillGroupWithBlank: false,
2640
+
2641
+ // Swiping/no swiping
2642
+ allowSlidePrev: true,
2643
+ allowSlideNext: true,
2644
+ swipeHandler: null, // '.swipe-handler',
2645
+ noSwiping: true,
2646
+ noSwipingClass: 'swiper-no-swiping',
2647
+ noSwipingSelector: null,
2648
+
2649
+ // Passive Listeners
2650
+ passiveListeners: true,
2651
+
2652
+ // NS
2653
+ containerModifierClass: 'swiper-container-', // NEW
2654
+ slideClass: 'swiper-slide',
2655
+ slideBlankClass: 'swiper-slide-invisible-blank',
2656
+ slideActiveClass: 'swiper-slide-active',
2657
+ slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
2658
+ slideVisibleClass: 'swiper-slide-visible',
2659
+ slideDuplicateClass: 'swiper-slide-duplicate',
2660
+ slideNextClass: 'swiper-slide-next',
2661
+ slideDuplicateNextClass: 'swiper-slide-duplicate-next',
2662
+ slidePrevClass: 'swiper-slide-prev',
2663
+ slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
2664
+ wrapperClass: 'swiper-wrapper',
2665
+
2666
+ // Callbacks
2667
+ runCallbacksOnInit: true,
2668
+ };
2669
+
2670
+ const prototypes = {
2671
+ update,
2672
+ translate,
2673
+ transition: transition$1,
2674
+ slide,
2675
+ loop,
2676
+ grabCursor,
2677
+ manipulation,
2678
+ events,
2679
+ breakpoints,
2680
+ checkOverflow: checkOverflow$1,
2681
+ classes,
2682
+ images,
2683
+ };
2684
+
2685
+ const extendedDefaults = {};
2686
+
2687
+ class Swiper extends SwiperClass {
2688
+ constructor(...args) {
2689
+ let el;
2690
+ let params;
2691
+ if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
2692
+ params = args[0];
2693
+ } else {
2694
+ [el, params] = args;
2695
+ }
2696
+ if (!params) params = {};
2697
+
2698
+ params = Utils.extend({}, params);
2699
+ if (el && !params.el) params.el = el;
2700
+
2701
+ super(params);
2702
+
2703
+ Object.keys(prototypes).forEach((prototypeGroup) => {
2704
+ Object.keys(prototypes[prototypeGroup]).forEach((protoMethod) => {
2705
+ if (!Swiper.prototype[protoMethod]) {
2706
+ Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
2707
+ }
2708
+ });
2709
+ });
2710
+
2711
+ // Swiper Instance
2712
+ const swiper = this;
2713
+ if (typeof swiper.modules === 'undefined') {
2714
+ swiper.modules = {};
2715
+ }
2716
+ Object.keys(swiper.modules).forEach((moduleName) => {
2717
+ const module = swiper.modules[moduleName];
2718
+ if (module.params) {
2719
+ const moduleParamName = Object.keys(module.params)[0];
2720
+ const moduleParams = module.params[moduleParamName];
2721
+ if (typeof moduleParams !== 'object') return;
2722
+ if (!(moduleParamName in params && 'enabled' in moduleParams)) return;
2723
+ if (params[moduleParamName] === true) {
2724
+ params[moduleParamName] = { enabled: true };
2725
+ }
2726
+ if (
2727
+ typeof params[moduleParamName] === 'object' &&
2728
+ !('enabled' in params[moduleParamName])
2729
+ ) {
2730
+ params[moduleParamName].enabled = true;
2731
+ }
2732
+ if (!params[moduleParamName]) params[moduleParamName] = { enabled: false };
2733
+ }
2734
+ });
2735
+
2736
+ // Extend defaults with modules params
2737
+ const swiperParams = Utils.extend({}, defaults);
2738
+ swiper.useModulesParams(swiperParams);
2739
+
2740
+ // Extend defaults with passed params
2741
+ swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
2742
+ swiper.originalParams = Utils.extend({}, swiper.params);
2743
+ swiper.passedParams = Utils.extend({}, params);
2744
+
2745
+ // Save Dom lib
2746
+ swiper.$ = $;
2747
+
2748
+ // Find el
2749
+ const $el = $(swiper.params.el);
2750
+ el = $el[0];
2751
+
2752
+ if (!el) {
2753
+ return undefined;
2754
+ }
2755
+
2756
+ if ($el.length > 1) {
2757
+ const swipers = [];
2758
+ $el.each((index$$1, containerEl) => {
2759
+ const newParams = Utils.extend({}, params, { el: containerEl });
2760
+ swipers.push(new Swiper(newParams));
2761
+ });
2762
+ return swipers;
2763
+ }
2764
+
2765
+ el.swiper = swiper;
2766
+ $el.data('swiper', swiper);
2767
+
2768
+ // Find Wrapper
2769
+ const $wrapperEl = $el.children(`.${swiper.params.wrapperClass}`);
2770
+
2771
+ // Extend Swiper
2772
+ Utils.extend(swiper, {
2773
+ $el,
2774
+ el,
2775
+ $wrapperEl,
2776
+ wrapperEl: $wrapperEl[0],
2777
+
2778
+ // Classes
2779
+ classNames: [],
2780
+
2781
+ // Slides
2782
+ slides: $(),
2783
+ slidesGrid: [],
2784
+ snapGrid: [],
2785
+ slidesSizesGrid: [],
2786
+
2787
+ // isDirection
2788
+ isHorizontal() {
2789
+ return swiper.params.direction === 'horizontal';
2790
+ },
2791
+ isVertical() {
2792
+ return swiper.params.direction === 'vertical';
2793
+ },
2794
+ // RTL
2795
+ rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
2796
+ rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
2797
+ wrongRTL: $wrapperEl.css('display') === '-webkit-box',
2798
+
2799
+ // Indexes
2800
+ activeIndex: 0,
2801
+ realIndex: 0,
2802
+
2803
+ //
2804
+ isBeginning: true,
2805
+ isEnd: false,
2806
+
2807
+ // Props
2808
+ translate: 0,
2809
+ previousTranslate: 0,
2810
+ progress: 0,
2811
+ velocity: 0,
2812
+ animating: false,
2813
+
2814
+ // Locks
2815
+ allowSlideNext: swiper.params.allowSlideNext,
2816
+ allowSlidePrev: swiper.params.allowSlidePrev,
2817
+
2818
+ // Touch Events
2819
+ touchEvents: (function touchEvents() {
2820
+ const touch = ['touchstart', 'touchmove', 'touchend'];
2821
+ let desktop = ['mousedown', 'mousemove', 'mouseup'];
2822
+ if (Support.pointerEvents) {
2823
+ desktop = ['pointerdown', 'pointermove', 'pointerup'];
2824
+ } else if (Support.prefixedPointerEvents) {
2825
+ desktop = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];
2826
+ }
2827
+ swiper.touchEventsTouch = {
2828
+ start: touch[0],
2829
+ move: touch[1],
2830
+ end: touch[2],
2831
+ };
2832
+ swiper.touchEventsDesktop = {
2833
+ start: desktop[0],
2834
+ move: desktop[1],
2835
+ end: desktop[2],
2836
+ };
2837
+ return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
2838
+ }()),
2839
+ touchEventsData: {
2840
+ isTouched: undefined,
2841
+ isMoved: undefined,
2842
+ allowTouchCallbacks: undefined,
2843
+ touchStartTime: undefined,
2844
+ isScrolling: undefined,
2845
+ currentTranslate: undefined,
2846
+ startTranslate: undefined,
2847
+ allowThresholdMove: undefined,
2848
+ // Form elements to match
2849
+ formElements: 'input, select, option, textarea, button, video',
2850
+ // Last click time
2851
+ lastClickTime: Utils.now(),
2852
+ clickTimeout: undefined,
2853
+ // Velocities
2854
+ velocities: [],
2855
+ allowMomentumBounce: undefined,
2856
+ isTouchEvent: undefined,
2857
+ startMoving: undefined,
2858
+ },
2859
+
2860
+ // Clicks
2861
+ allowClick: true,
2862
+
2863
+ // Touches
2864
+ allowTouchMove: swiper.params.allowTouchMove,
2865
+
2866
+ touches: {
2867
+ startX: 0,
2868
+ startY: 0,
2869
+ currentX: 0,
2870
+ currentY: 0,
2871
+ diff: 0,
2872
+ },
2873
+
2874
+ // Images
2875
+ imagesToLoad: [],
2876
+ imagesLoaded: 0,
2877
+
2878
+ });
2879
+
2880
+ // Install Modules
2881
+ swiper.useModules();
2882
+
2883
+ // Init
2884
+ if (swiper.params.init) {
2885
+ swiper.init();
2886
+ }
2887
+
2888
+ // Return app instance
2889
+ return swiper;
2890
+ }
2891
+ slidesPerViewDynamic() {
2892
+ const swiper = this;
2893
+ const {
2894
+ params, slides, slidesGrid, size: swiperSize, activeIndex,
2895
+ } = swiper;
2896
+ let spv = 1;
2897
+ if (params.centeredSlides) {
2898
+ let slideSize = slides[activeIndex].swiperSlideSize;
2899
+ let breakLoop;
2900
+ for (let i = activeIndex + 1; i < slides.length; i += 1) {
2901
+ if (slides[i] && !breakLoop) {
2902
+ slideSize += slides[i].swiperSlideSize;
2903
+ spv += 1;
2904
+ if (slideSize > swiperSize) breakLoop = true;
2905
+ }
2906
+ }
2907
+ for (let i = activeIndex - 1; i >= 0; i -= 1) {
2908
+ if (slides[i] && !breakLoop) {
2909
+ slideSize += slides[i].swiperSlideSize;
2910
+ spv += 1;
2911
+ if (slideSize > swiperSize) breakLoop = true;
2912
+ }
2913
+ }
2914
+ } else {
2915
+ for (let i = activeIndex + 1; i < slides.length; i += 1) {
2916
+ if (slidesGrid[i] - slidesGrid[activeIndex] < swiperSize) {
2917
+ spv += 1;
2918
+ }
2919
+ }
2920
+ }
2921
+ return spv;
2922
+ }
2923
+ update() {
2924
+ const swiper = this;
2925
+ if (!swiper || swiper.destroyed) return;
2926
+ const { snapGrid, params } = swiper;
2927
+ // Breakpoints
2928
+ if (params.breakpoints) {
2929
+ swiper.setBreakpoint();
2930
+ }
2931
+ swiper.updateSize();
2932
+ swiper.updateSlides();
2933
+ swiper.updateProgress();
2934
+ swiper.updateSlidesClasses();
2935
+
2936
+ function setTranslate() {
2937
+ const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
2938
+ const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
2939
+ swiper.setTranslate(newTranslate);
2940
+ swiper.updateActiveIndex();
2941
+ swiper.updateSlidesClasses();
2942
+ }
2943
+ let translated;
2944
+ if (swiper.params.freeMode) {
2945
+ setTranslate();
2946
+ if (swiper.params.autoHeight) {
2947
+ swiper.updateAutoHeight();
2948
+ }
2949
+ } else {
2950
+ if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
2951
+ translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
2952
+ } else {
2953
+ translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
2954
+ }
2955
+ if (!translated) {
2956
+ setTranslate();
2957
+ }
2958
+ }
2959
+ if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
2960
+ swiper.checkOverflow();
2961
+ }
2962
+ swiper.emit('update');
2963
+ }
2964
+ init() {
2965
+ const swiper = this;
2966
+ if (swiper.initialized) return;
2967
+
2968
+ swiper.emit('beforeInit');
2969
+
2970
+ // Set breakpoint
2971
+ if (swiper.params.breakpoints) {
2972
+ swiper.setBreakpoint();
2973
+ }
2974
+
2975
+ // Add Classes
2976
+ swiper.addClasses();
2977
+
2978
+ // Create loop
2979
+ if (swiper.params.loop) {
2980
+ swiper.loopCreate();
2981
+ }
2982
+
2983
+ // Update size
2984
+ swiper.updateSize();
2985
+
2986
+ // Update slides
2987
+ swiper.updateSlides();
2988
+
2989
+ if (swiper.params.watchOverflow) {
2990
+ swiper.checkOverflow();
2991
+ }
2992
+
2993
+ // Set Grab Cursor
2994
+ if (swiper.params.grabCursor) {
2995
+ swiper.setGrabCursor();
2996
+ }
2997
+
2998
+ if (swiper.params.preloadImages) {
2999
+ swiper.preloadImages();
3000
+ }
3001
+
3002
+ // Slide To Initial Slide
3003
+ if (swiper.params.loop) {
3004
+ swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
3005
+ } else {
3006
+ swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
3007
+ }
3008
+
3009
+ // Attach events
3010
+ swiper.attachEvents();
3011
+
3012
+ // Init Flag
3013
+ swiper.initialized = true;
3014
+
3015
+ // Emit
3016
+ swiper.emit('init');
3017
+ }
3018
+ destroy(deleteInstance = true, cleanStyles = true) {
3019
+ const swiper = this;
3020
+ const {
3021
+ params, $el, $wrapperEl, slides,
3022
+ } = swiper;
3023
+
3024
+ if (typeof swiper.params === 'undefined' || swiper.destroyed) {
3025
+ return null;
3026
+ }
3027
+
3028
+ swiper.emit('beforeDestroy');
3029
+
3030
+ // Init Flag
3031
+ swiper.initialized = false;
3032
+
3033
+ // Detach events
3034
+ swiper.detachEvents();
3035
+
3036
+ // Destroy loop
3037
+ if (params.loop) {
3038
+ swiper.loopDestroy();
3039
+ }
3040
+
3041
+ // Cleanup styles
3042
+ if (cleanStyles) {
3043
+ swiper.removeClasses();
3044
+ $el.removeAttr('style');
3045
+ $wrapperEl.removeAttr('style');
3046
+ if (slides && slides.length) {
3047
+ slides
3048
+ .removeClass([
3049
+ params.slideVisibleClass,
3050
+ params.slideActiveClass,
3051
+ params.slideNextClass,
3052
+ params.slidePrevClass,
3053
+ ].join(' '))
3054
+ .removeAttr('style')
3055
+ .removeAttr('data-swiper-slide-index')
3056
+ .removeAttr('data-swiper-column')
3057
+ .removeAttr('data-swiper-row');
3058
+ }
3059
+ }
3060
+
3061
+ swiper.emit('destroy');
3062
+
3063
+ // Detach emitter events
3064
+ Object.keys(swiper.eventsListeners).forEach((eventName) => {
3065
+ swiper.off(eventName);
3066
+ });
3067
+
3068
+ if (deleteInstance !== false) {
3069
+ swiper.$el[0].swiper = null;
3070
+ swiper.$el.data('swiper', null);
3071
+ Utils.deleteProps(swiper);
3072
+ }
3073
+ swiper.destroyed = true;
3074
+
3075
+ return null;
3076
+ }
3077
+ static extendDefaults(newDefaults) {
3078
+ Utils.extend(extendedDefaults, newDefaults);
3079
+ }
3080
+ static get extendedDefaults() {
3081
+ return extendedDefaults;
3082
+ }
3083
+ static get defaults() {
3084
+ return defaults;
3085
+ }
3086
+ static get Class() {
3087
+ return SwiperClass;
3088
+ }
3089
+ static get $() {
3090
+ return $;
3091
+ }
3092
+ }
3093
+
3094
+ var Device$1 = {
3095
+ name: 'device',
3096
+ proto: {
3097
+ device: Device,
3098
+ },
3099
+ static: {
3100
+ device: Device,
3101
+ },
3102
+ };
3103
+
3104
+ var Support$1 = {
3105
+ name: 'support',
3106
+ proto: {
3107
+ support: Support,
3108
+ },
3109
+ static: {
3110
+ support: Support,
3111
+ },
3112
+ };
3113
+
3114
+ var Browser$1 = {
3115
+ name: 'browser',
3116
+ proto: {
3117
+ browser: Browser,
3118
+ },
3119
+ static: {
3120
+ browser: Browser,
3121
+ },
3122
+ };
3123
+
3124
+ var Resize = {
3125
+ name: 'resize',
3126
+ create() {
3127
+ const swiper = this;
3128
+ Utils.extend(swiper, {
3129
+ resize: {
3130
+ resizeHandler() {
3131
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
3132
+ swiper.emit('beforeResize');
3133
+ swiper.emit('resize');
3134
+ },
3135
+ orientationChangeHandler() {
3136
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
3137
+ swiper.emit('orientationchange');
3138
+ },
3139
+ },
3140
+ });
3141
+ },
3142
+ on: {
3143
+ init() {
3144
+ const swiper = this;
3145
+ // Emit resize
3146
+ window.addEventListener('resize', swiper.resize.resizeHandler);
3147
+
3148
+ // Emit orientationchange
3149
+ window.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
3150
+ },
3151
+ destroy() {
3152
+ const swiper = this;
3153
+ window.removeEventListener('resize', swiper.resize.resizeHandler);
3154
+ window.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
3155
+ },
3156
+ },
3157
+ };
3158
+
3159
+ const Observer = {
3160
+ func: window.MutationObserver || window.WebkitMutationObserver,
3161
+ attach(target, options = {}) {
3162
+ const swiper = this;
3163
+
3164
+ const ObserverFunc = Observer.func;
3165
+ const observer = new ObserverFunc((mutations) => {
3166
+ mutations.forEach((mutation) => {
3167
+ swiper.emit('observerUpdate', mutation);
3168
+ });
3169
+ });
3170
+
3171
+ observer.observe(target, {
3172
+ attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
3173
+ childList: typeof options.childList === 'undefined' ? true : options.childList,
3174
+ characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
3175
+ });
3176
+
3177
+ swiper.observer.observers.push(observer);
3178
+ },
3179
+ init() {
3180
+ const swiper = this;
3181
+ if (!Support.observer || !swiper.params.observer) return;
3182
+ if (swiper.params.observeParents) {
3183
+ const containerParents = swiper.$el.parents();
3184
+ for (let i = 0; i < containerParents.length; i += 1) {
3185
+ swiper.observer.attach(containerParents[i]);
3186
+ }
3187
+ }
3188
+ // Observe container
3189
+ swiper.observer.attach(swiper.$el[0], { childList: false });
3190
+
3191
+ // Observe wrapper
3192
+ swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
3193
+ },
3194
+ destroy() {
3195
+ const swiper = this;
3196
+ swiper.observer.observers.forEach((observer) => {
3197
+ observer.disconnect();
3198
+ });
3199
+ swiper.observer.observers = [];
3200
+ },
3201
+ };
3202
+
3203
+ var Observer$1 = {
3204
+ name: 'observer',
3205
+ params: {
3206
+ observer: false,
3207
+ observeParents: false,
3208
+ },
3209
+ create() {
3210
+ const swiper = this;
3211
+ Utils.extend(swiper, {
3212
+ observer: {
3213
+ init: Observer.init.bind(swiper),
3214
+ attach: Observer.attach.bind(swiper),
3215
+ destroy: Observer.destroy.bind(swiper),
3216
+ observers: [],
3217
+ },
3218
+ });
3219
+ },
3220
+ on: {
3221
+ init() {
3222
+ const swiper = this;
3223
+ swiper.observer.init();
3224
+ },
3225
+ destroy() {
3226
+ const swiper = this;
3227
+ swiper.observer.destroy();
3228
+ },
3229
+ },
3230
+ };
3231
+
3232
+ const Virtual = {
3233
+ update(force) {
3234
+ const swiper = this;
3235
+ const { slidesPerView, slidesPerGroup, centeredSlides } = swiper.params;
3236
+ const {
3237
+ from: previousFrom,
3238
+ to: previousTo,
3239
+ slides,
3240
+ slidesGrid: previousSlidesGrid,
3241
+ renderSlide,
3242
+ offset: previousOffset,
3243
+ } = swiper.virtual;
3244
+ swiper.updateActiveIndex();
3245
+ const activeIndex = swiper.activeIndex || 0;
3246
+
3247
+ let offsetProp;
3248
+ if (swiper.rtlTranslate) offsetProp = 'right';
3249
+ else offsetProp = swiper.isHorizontal() ? 'left' : 'top';
3250
+
3251
+ let slidesAfter;
3252
+ let slidesBefore;
3253
+ if (centeredSlides) {
3254
+ slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup;
3255
+ slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup;
3256
+ } else {
3257
+ slidesAfter = slidesPerView + (slidesPerGroup - 1);
3258
+ slidesBefore = slidesPerGroup;
3259
+ }
3260
+ const from = Math.max((activeIndex || 0) - slidesBefore, 0);
3261
+ const to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
3262
+ const offset$$1 = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
3263
+
3264
+ Utils.extend(swiper.virtual, {
3265
+ from,
3266
+ to,
3267
+ offset: offset$$1,
3268
+ slidesGrid: swiper.slidesGrid,
3269
+ });
3270
+
3271
+ function onRendered() {
3272
+ swiper.updateSlides();
3273
+ swiper.updateProgress();
3274
+ swiper.updateSlidesClasses();
3275
+ if (swiper.lazy && swiper.params.lazy.enabled) {
3276
+ swiper.lazy.load();
3277
+ }
3278
+ }
3279
+
3280
+ if (previousFrom === from && previousTo === to && !force) {
3281
+ if (swiper.slidesGrid !== previousSlidesGrid && offset$$1 !== previousOffset) {
3282
+ swiper.slides.css(offsetProp, `${offset$$1}px`);
3283
+ }
3284
+ swiper.updateProgress();
3285
+ return;
3286
+ }
3287
+ if (swiper.params.virtual.renderExternal) {
3288
+ swiper.params.virtual.renderExternal.call(swiper, {
3289
+ offset: offset$$1,
3290
+ from,
3291
+ to,
3292
+ slides: (function getSlides() {
3293
+ const slidesToRender = [];
3294
+ for (let i = from; i <= to; i += 1) {
3295
+ slidesToRender.push(slides[i]);
3296
+ }
3297
+ return slidesToRender;
3298
+ }()),
3299
+ });
3300
+ onRendered();
3301
+ return;
3302
+ }
3303
+ const prependIndexes = [];
3304
+ const appendIndexes = [];
3305
+ if (force) {
3306
+ swiper.$wrapperEl.find(`.${swiper.params.slideClass}`).remove();
3307
+ } else {
3308
+ for (let i = previousFrom; i <= previousTo; i += 1) {
3309
+ if (i < from || i > to) {
3310
+ swiper.$wrapperEl.find(`.${swiper.params.slideClass}[data-swiper-slide-index="${i}"]`).remove();
3311
+ }
3312
+ }
3313
+ }
3314
+ for (let i = 0; i < slides.length; i += 1) {
3315
+ if (i >= from && i <= to) {
3316
+ if (typeof previousTo === 'undefined' || force) {
3317
+ appendIndexes.push(i);
3318
+ } else {
3319
+ if (i > previousTo) appendIndexes.push(i);
3320
+ if (i < previousFrom) prependIndexes.push(i);
3321
+ }
3322
+ }
3323
+ }
3324
+ appendIndexes.forEach((index$$1) => {
3325
+ swiper.$wrapperEl.append(renderSlide(slides[index$$1], index$$1));
3326
+ });
3327
+ prependIndexes.sort((a, b) => a < b).forEach((index$$1) => {
3328
+ swiper.$wrapperEl.prepend(renderSlide(slides[index$$1], index$$1));
3329
+ });
3330
+ swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, `${offset$$1}px`);
3331
+ onRendered();
3332
+ },
3333
+ renderSlide(slide, index$$1) {
3334
+ const swiper = this;
3335
+ const params = swiper.params.virtual;
3336
+ if (params.cache && swiper.virtual.cache[index$$1]) {
3337
+ return swiper.virtual.cache[index$$1];
3338
+ }
3339
+ const $slideEl = params.renderSlide
3340
+ ? $(params.renderSlide.call(swiper, slide, index$$1))
3341
+ : $(`<div class="${swiper.params.slideClass}" data-swiper-slide-index="${index$$1}">${slide}</div>`);
3342
+ if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index$$1);
3343
+ if (params.cache) swiper.virtual.cache[index$$1] = $slideEl;
3344
+ return $slideEl;
3345
+ },
3346
+ appendSlide(slide) {
3347
+ const swiper = this;
3348
+ swiper.virtual.slides.push(slide);
3349
+ swiper.virtual.update(true);
3350
+ },
3351
+ prependSlide(slide) {
3352
+ const swiper = this;
3353
+ swiper.virtual.slides.unshift(slide);
3354
+ if (swiper.params.virtual.cache) {
3355
+ const cache = swiper.virtual.cache;
3356
+ const newCache = {};
3357
+ Object.keys(cache).forEach((cachedIndex) => {
3358
+ newCache[cachedIndex + 1] = cache[cachedIndex];
3359
+ });
3360
+ swiper.virtual.cache = newCache;
3361
+ }
3362
+ swiper.virtual.update(true);
3363
+ swiper.slideNext(0);
3364
+ },
3365
+ };
3366
+
3367
+ var virtual = {
3368
+ name: 'virtual',
3369
+ params: {
3370
+ virtual: {
3371
+ enabled: false,
3372
+ slides: [],
3373
+ cache: true,
3374
+ renderSlide: null,
3375
+ renderExternal: null,
3376
+ },
3377
+ },
3378
+ create() {
3379
+ const swiper = this;
3380
+ Utils.extend(swiper, {
3381
+ virtual: {
3382
+ update: Virtual.update.bind(swiper),
3383
+ appendSlide: Virtual.appendSlide.bind(swiper),
3384
+ prependSlide: Virtual.prependSlide.bind(swiper),
3385
+ renderSlide: Virtual.renderSlide.bind(swiper),
3386
+ slides: swiper.params.virtual.slides,
3387
+ cache: {},
3388
+ },
3389
+ });
3390
+ },
3391
+ on: {
3392
+ beforeInit() {
3393
+ const swiper = this;
3394
+ if (!swiper.params.virtual.enabled) return;
3395
+ swiper.classNames.push(`${swiper.params.containerModifierClass}virtual`);
3396
+ const overwriteParams = {
3397
+ watchSlidesProgress: true,
3398
+ };
3399
+ Utils.extend(swiper.params, overwriteParams);
3400
+ Utils.extend(swiper.originalParams, overwriteParams);
3401
+
3402
+ swiper.virtual.update();
3403
+ },
3404
+ setTranslate() {
3405
+ const swiper = this;
3406
+ if (!swiper.params.virtual.enabled) return;
3407
+ swiper.virtual.update();
3408
+ },
3409
+ },
3410
+ };
3411
+
3412
+ const Keyboard = {
3413
+ handle(event) {
3414
+ const swiper = this;
3415
+ const { rtlTranslate: rtl } = swiper;
3416
+ let e = event;
3417
+ if (e.originalEvent) e = e.originalEvent; // jquery fix
3418
+ const kc = e.keyCode || e.charCode;
3419
+ // Directions locks
3420
+ if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) {
3421
+ return false;
3422
+ }
3423
+ if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) {
3424
+ return false;
3425
+ }
3426
+ if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
3427
+ return undefined;
3428
+ }
3429
+ if (document.activeElement && document.activeElement.nodeName && (document.activeElement.nodeName.toLowerCase() === 'input' || document.activeElement.nodeName.toLowerCase() === 'textarea')) {
3430
+ return undefined;
3431
+ }
3432
+ if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
3433
+ let inView = false;
3434
+ // Check that swiper should be inside of visible area of window
3435
+ if (swiper.$el.parents(`.${swiper.params.slideClass}`).length > 0 && swiper.$el.parents(`.${swiper.params.slideActiveClass}`).length === 0) {
3436
+ return undefined;
3437
+ }
3438
+ const windowWidth = window.innerWidth;
3439
+ const windowHeight = window.innerHeight;
3440
+ const swiperOffset = swiper.$el.offset();
3441
+ if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft;
3442
+ const swiperCoord = [
3443
+ [swiperOffset.left, swiperOffset.top],
3444
+ [swiperOffset.left + swiper.width, swiperOffset.top],
3445
+ [swiperOffset.left, swiperOffset.top + swiper.height],
3446
+ [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height],
3447
+ ];
3448
+ for (let i = 0; i < swiperCoord.length; i += 1) {
3449
+ const point = swiperCoord[i];
3450
+ if (
3451
+ point[0] >= 0 && point[0] <= windowWidth &&
3452
+ point[1] >= 0 && point[1] <= windowHeight
3453
+ ) {
3454
+ inView = true;
3455
+ }
3456
+ }
3457
+ if (!inView) return undefined;
3458
+ }
3459
+ if (swiper.isHorizontal()) {
3460
+ if (kc === 37 || kc === 39) {
3461
+ if (e.preventDefault) e.preventDefault();
3462
+ else e.returnValue = false;
3463
+ }
3464
+ if ((kc === 39 && !rtl) || (kc === 37 && rtl)) swiper.slideNext();
3465
+ if ((kc === 37 && !rtl) || (kc === 39 && rtl)) swiper.slidePrev();
3466
+ } else {
3467
+ if (kc === 38 || kc === 40) {
3468
+ if (e.preventDefault) e.preventDefault();
3469
+ else e.returnValue = false;
3470
+ }
3471
+ if (kc === 40) swiper.slideNext();
3472
+ if (kc === 38) swiper.slidePrev();
3473
+ }
3474
+ swiper.emit('keyPress', kc);
3475
+ return undefined;
3476
+ },
3477
+ enable() {
3478
+ const swiper = this;
3479
+ if (swiper.keyboard.enabled) return;
3480
+ $(document).on('keydown', swiper.keyboard.handle);
3481
+ swiper.keyboard.enabled = true;
3482
+ },
3483
+ disable() {
3484
+ const swiper = this;
3485
+ if (!swiper.keyboard.enabled) return;
3486
+ $(document).off('keydown', swiper.keyboard.handle);
3487
+ swiper.keyboard.enabled = false;
3488
+ },
3489
+ };
3490
+
3491
+ var keyboard = {
3492
+ name: 'keyboard',
3493
+ params: {
3494
+ keyboard: {
3495
+ enabled: false,
3496
+ onlyInViewport: true,
3497
+ },
3498
+ },
3499
+ create() {
3500
+ const swiper = this;
3501
+ Utils.extend(swiper, {
3502
+ keyboard: {
3503
+ enabled: false,
3504
+ enable: Keyboard.enable.bind(swiper),
3505
+ disable: Keyboard.disable.bind(swiper),
3506
+ handle: Keyboard.handle.bind(swiper),
3507
+ },
3508
+ });
3509
+ },
3510
+ on: {
3511
+ init() {
3512
+ const swiper = this;
3513
+ if (swiper.params.keyboard.enabled) {
3514
+ swiper.keyboard.enable();
3515
+ }
3516
+ },
3517
+ destroy() {
3518
+ const swiper = this;
3519
+ if (swiper.keyboard.enabled) {
3520
+ swiper.keyboard.disable();
3521
+ }
3522
+ },
3523
+ },
3524
+ };
3525
+
3526
+ function isEventSupported() {
3527
+ const eventName = 'onwheel';
3528
+ let isSupported = eventName in document;
3529
+
3530
+ if (!isSupported) {
3531
+ const element = document.createElement('div');
3532
+ element.setAttribute(eventName, 'return;');
3533
+ isSupported = typeof element[eventName] === 'function';
3534
+ }
3535
+
3536
+ if (!isSupported &&
3537
+ document.implementation &&
3538
+ document.implementation.hasFeature &&
3539
+ // always returns true in newer browsers as per the standard.
3540
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
3541
+ document.implementation.hasFeature('', '') !== true
3542
+ ) {
3543
+ // This is the only way to test support for the `wheel` event in IE9+.
3544
+ isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
3545
+ }
3546
+
3547
+ return isSupported;
3548
+ }
3549
+ const Mousewheel = {
3550
+ lastScrollTime: Utils.now(),
3551
+ event: (function getEvent() {
3552
+ if (window.navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll';
3553
+ return isEventSupported() ? 'wheel' : 'mousewheel';
3554
+ }()),
3555
+ normalize(e) {
3556
+ // Reasonable defaults
3557
+ const PIXEL_STEP = 10;
3558
+ const LINE_HEIGHT = 40;
3559
+ const PAGE_HEIGHT = 800;
3560
+
3561
+ let sX = 0;
3562
+ let sY = 0; // spinX, spinY
3563
+ let pX = 0;
3564
+ let pY = 0; // pixelX, pixelY
3565
+
3566
+ // Legacy
3567
+ if ('detail' in e) {
3568
+ sY = e.detail;
3569
+ }
3570
+ if ('wheelDelta' in e) {
3571
+ sY = -e.wheelDelta / 120;
3572
+ }
3573
+ if ('wheelDeltaY' in e) {
3574
+ sY = -e.wheelDeltaY / 120;
3575
+ }
3576
+ if ('wheelDeltaX' in e) {
3577
+ sX = -e.wheelDeltaX / 120;
3578
+ }
3579
+
3580
+ // side scrolling on FF with DOMMouseScroll
3581
+ if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
3582
+ sX = sY;
3583
+ sY = 0;
3584
+ }
3585
+
3586
+ pX = sX * PIXEL_STEP;
3587
+ pY = sY * PIXEL_STEP;
3588
+
3589
+ if ('deltaY' in e) {
3590
+ pY = e.deltaY;
3591
+ }
3592
+ if ('deltaX' in e) {
3593
+ pX = e.deltaX;
3594
+ }
3595
+
3596
+ if ((pX || pY) && e.deltaMode) {
3597
+ if (e.deltaMode === 1) { // delta in LINE units
3598
+ pX *= LINE_HEIGHT;
3599
+ pY *= LINE_HEIGHT;
3600
+ } else { // delta in PAGE units
3601
+ pX *= PAGE_HEIGHT;
3602
+ pY *= PAGE_HEIGHT;
3603
+ }
3604
+ }
3605
+
3606
+ // Fall-back if spin cannot be determined
3607
+ if (pX && !sX) {
3608
+ sX = (pX < 1) ? -1 : 1;
3609
+ }
3610
+ if (pY && !sY) {
3611
+ sY = (pY < 1) ? -1 : 1;
3612
+ }
3613
+
3614
+ return {
3615
+ spinX: sX,
3616
+ spinY: sY,
3617
+ pixelX: pX,
3618
+ pixelY: pY,
3619
+ };
3620
+ },
3621
+ handleMouseEnter() {
3622
+ const swiper = this;
3623
+ swiper.mouseEntered = true;
3624
+ },
3625
+ handleMouseLeave() {
3626
+ const swiper = this;
3627
+ swiper.mouseEntered = false;
3628
+ },
3629
+ handle(event) {
3630
+ let e = event;
3631
+ const swiper = this;
3632
+ const params = swiper.params.mousewheel;
3633
+
3634
+ if (!swiper.mouseEntered && !params.releaseOnEdges) return true;
3635
+
3636
+ if (e.originalEvent) e = e.originalEvent; // jquery fix
3637
+ let delta = 0;
3638
+ const rtlFactor = swiper.rtlTranslate ? -1 : 1;
3639
+
3640
+ const data$$1 = Mousewheel.normalize(e);
3641
+
3642
+ if (params.forceToAxis) {
3643
+ if (swiper.isHorizontal()) {
3644
+ if (Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY)) delta = data$$1.pixelX * rtlFactor;
3645
+ else return true;
3646
+ } else if (Math.abs(data$$1.pixelY) > Math.abs(data$$1.pixelX)) delta = data$$1.pixelY;
3647
+ else return true;
3648
+ } else {
3649
+ delta = Math.abs(data$$1.pixelX) > Math.abs(data$$1.pixelY) ? -data$$1.pixelX * rtlFactor : -data$$1.pixelY;
3650
+ }
3651
+
3652
+ if (delta === 0) return true;
3653
+
3654
+ if (params.invert) delta = -delta;
3655
+
3656
+ if (!swiper.params.freeMode) {
3657
+ if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) {
3658
+ if (delta < 0) {
3659
+ if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
3660
+ swiper.slideNext();
3661
+ swiper.emit('scroll', e);
3662
+ } else if (params.releaseOnEdges) return true;
3663
+ } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
3664
+ swiper.slidePrev();
3665
+ swiper.emit('scroll', e);
3666
+ } else if (params.releaseOnEdges) return true;
3667
+ }
3668
+ swiper.mousewheel.lastScrollTime = (new window.Date()).getTime();
3669
+ } else {
3670
+ // Freemode or scrollContainer:
3671
+ if (swiper.params.loop) {
3672
+ swiper.loopFix();
3673
+ }
3674
+ let position = swiper.getTranslate() + (delta * params.sensitivity);
3675
+ const wasBeginning = swiper.isBeginning;
3676
+ const wasEnd = swiper.isEnd;
3677
+
3678
+ if (position >= swiper.minTranslate()) position = swiper.minTranslate();
3679
+ if (position <= swiper.maxTranslate()) position = swiper.maxTranslate();
3680
+
3681
+ swiper.setTransition(0);
3682
+ swiper.setTranslate(position);
3683
+ swiper.updateProgress();
3684
+ swiper.updateActiveIndex();
3685
+ swiper.updateSlidesClasses();
3686
+
3687
+ if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
3688
+ swiper.updateSlidesClasses();
3689
+ }
3690
+
3691
+ if (swiper.params.freeModeSticky) {
3692
+ clearTimeout(swiper.mousewheel.timeout);
3693
+ swiper.mousewheel.timeout = Utils.nextTick(() => {
3694
+ swiper.slideToClosest();
3695
+ }, 300);
3696
+ }
3697
+ // Emit event
3698
+ swiper.emit('scroll', e);
3699
+
3700
+ // Stop autoplay
3701
+ if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop();
3702
+ // Return page scroll on edge positions
3703
+ if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;
3704
+ }
3705
+
3706
+ if (e.preventDefault) e.preventDefault();
3707
+ else e.returnValue = false;
3708
+ return false;
3709
+ },
3710
+ enable() {
3711
+ const swiper = this;
3712
+ if (!Mousewheel.event) return false;
3713
+ if (swiper.mousewheel.enabled) return false;
3714
+ let target = swiper.$el;
3715
+ if (swiper.params.mousewheel.eventsTarged !== 'container') {
3716
+ target = $(swiper.params.mousewheel.eventsTarged);
3717
+ }
3718
+ target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
3719
+ target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
3720
+ target.on(Mousewheel.event, swiper.mousewheel.handle);
3721
+ swiper.mousewheel.enabled = true;
3722
+ return true;
3723
+ },
3724
+ disable() {
3725
+ const swiper = this;
3726
+ if (!Mousewheel.event) return false;
3727
+ if (!swiper.mousewheel.enabled) return false;
3728
+ let target = swiper.$el;
3729
+ if (swiper.params.mousewheel.eventsTarged !== 'container') {
3730
+ target = $(swiper.params.mousewheel.eventsTarged);
3731
+ }
3732
+ target.off(Mousewheel.event, swiper.mousewheel.handle);
3733
+ swiper.mousewheel.enabled = false;
3734
+ return true;
3735
+ },
3736
+ };
3737
+
3738
+ var mousewheel = {
3739
+ name: 'mousewheel',
3740
+ params: {
3741
+ mousewheel: {
3742
+ enabled: false,
3743
+ releaseOnEdges: false,
3744
+ invert: false,
3745
+ forceToAxis: false,
3746
+ sensitivity: 1,
3747
+ eventsTarged: 'container',
3748
+ },
3749
+ },
3750
+ create() {
3751
+ const swiper = this;
3752
+ Utils.extend(swiper, {
3753
+ mousewheel: {
3754
+ enabled: false,
3755
+ enable: Mousewheel.enable.bind(swiper),
3756
+ disable: Mousewheel.disable.bind(swiper),
3757
+ handle: Mousewheel.handle.bind(swiper),
3758
+ handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
3759
+ handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
3760
+ lastScrollTime: Utils.now(),
3761
+ },
3762
+ });
3763
+ },
3764
+ on: {
3765
+ init() {
3766
+ const swiper = this;
3767
+ if (swiper.params.mousewheel.enabled) swiper.mousewheel.enable();
3768
+ },
3769
+ destroy() {
3770
+ const swiper = this;
3771
+ if (swiper.mousewheel.enabled) swiper.mousewheel.disable();
3772
+ },
3773
+ },
3774
+ };
3775
+
3776
+ const Navigation = {
3777
+ update() {
3778
+ // Update Navigation Buttons
3779
+ const swiper = this;
3780
+ const params = swiper.params.navigation;
3781
+
3782
+ if (swiper.params.loop) return;
3783
+ const { $nextEl, $prevEl } = swiper.navigation;
3784
+
3785
+ if ($prevEl && $prevEl.length > 0) {
3786
+ if (swiper.isBeginning) {
3787
+ $prevEl.addClass(params.disabledClass);
3788
+ } else {
3789
+ $prevEl.removeClass(params.disabledClass);
3790
+ }
3791
+ $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
3792
+ }
3793
+ if ($nextEl && $nextEl.length > 0) {
3794
+ if (swiper.isEnd) {
3795
+ $nextEl.addClass(params.disabledClass);
3796
+ } else {
3797
+ $nextEl.removeClass(params.disabledClass);
3798
+ }
3799
+ $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
3800
+ }
3801
+ },
3802
+ init() {
3803
+ const swiper = this;
3804
+ const params = swiper.params.navigation;
3805
+ if (!(params.nextEl || params.prevEl)) return;
3806
+
3807
+ let $nextEl;
3808
+ let $prevEl;
3809
+ if (params.nextEl) {
3810
+ $nextEl = $(params.nextEl);
3811
+ if (
3812
+ swiper.params.uniqueNavElements &&
3813
+ typeof params.nextEl === 'string' &&
3814
+ $nextEl.length > 1 &&
3815
+ swiper.$el.find(params.nextEl).length === 1
3816
+ ) {
3817
+ $nextEl = swiper.$el.find(params.nextEl);
3818
+ }
3819
+ }
3820
+ if (params.prevEl) {
3821
+ $prevEl = $(params.prevEl);
3822
+ if (
3823
+ swiper.params.uniqueNavElements &&
3824
+ typeof params.prevEl === 'string' &&
3825
+ $prevEl.length > 1 &&
3826
+ swiper.$el.find(params.prevEl).length === 1
3827
+ ) {
3828
+ $prevEl = swiper.$el.find(params.prevEl);
3829
+ }
3830
+ }
3831
+
3832
+ if ($nextEl && $nextEl.length > 0) {
3833
+ $nextEl.on('click', (e) => {
3834
+ e.preventDefault();
3835
+ if (swiper.isEnd && !swiper.params.loop) return;
3836
+ swiper.slideNext();
3837
+ });
3838
+ }
3839
+ if ($prevEl && $prevEl.length > 0) {
3840
+ $prevEl.on('click', (e) => {
3841
+ e.preventDefault();
3842
+ if (swiper.isBeginning && !swiper.params.loop) return;
3843
+ swiper.slidePrev();
3844
+ });
3845
+ }
3846
+
3847
+ Utils.extend(swiper.navigation, {
3848
+ $nextEl,
3849
+ nextEl: $nextEl && $nextEl[0],
3850
+ $prevEl,
3851
+ prevEl: $prevEl && $prevEl[0],
3852
+ });
3853
+ },
3854
+ destroy() {
3855
+ const swiper = this;
3856
+ const { $nextEl, $prevEl } = swiper.navigation;
3857
+ if ($nextEl && $nextEl.length) {
3858
+ $nextEl.off('click');
3859
+ $nextEl.removeClass(swiper.params.navigation.disabledClass);
3860
+ }
3861
+ if ($prevEl && $prevEl.length) {
3862
+ $prevEl.off('click');
3863
+ $prevEl.removeClass(swiper.params.navigation.disabledClass);
3864
+ }
3865
+ },
3866
+ };
3867
+
3868
+ var navigation = {
3869
+ name: 'navigation',
3870
+ params: {
3871
+ navigation: {
3872
+ nextEl: null,
3873
+ prevEl: null,
3874
+
3875
+ hideOnClick: false,
3876
+ disabledClass: 'swiper-button-disabled',
3877
+ hiddenClass: 'swiper-button-hidden',
3878
+ lockClass: 'swiper-button-lock',
3879
+ },
3880
+ },
3881
+ create() {
3882
+ const swiper = this;
3883
+ Utils.extend(swiper, {
3884
+ navigation: {
3885
+ init: Navigation.init.bind(swiper),
3886
+ update: Navigation.update.bind(swiper),
3887
+ destroy: Navigation.destroy.bind(swiper),
3888
+ },
3889
+ });
3890
+ },
3891
+ on: {
3892
+ init() {
3893
+ const swiper = this;
3894
+ swiper.navigation.init();
3895
+ swiper.navigation.update();
3896
+ },
3897
+ toEdge() {
3898
+ const swiper = this;
3899
+ swiper.navigation.update();
3900
+ },
3901
+ fromEdge() {
3902
+ const swiper = this;
3903
+ swiper.navigation.update();
3904
+ },
3905
+ destroy() {
3906
+ const swiper = this;
3907
+ swiper.navigation.destroy();
3908
+ },
3909
+ click(e) {
3910
+ const swiper = this;
3911
+ const { $nextEl, $prevEl } = swiper.navigation;
3912
+ if (
3913
+ swiper.params.navigation.hideOnClick &&
3914
+ !$(e.target).is($prevEl) &&
3915
+ !$(e.target).is($nextEl)
3916
+ ) {
3917
+ if ($nextEl) $nextEl.toggleClass(swiper.params.navigation.hiddenClass);
3918
+ if ($prevEl) $prevEl.toggleClass(swiper.params.navigation.hiddenClass);
3919
+ }
3920
+ },
3921
+ },
3922
+ };
3923
+
3924
+ const Pagination = {
3925
+ update() {
3926
+ // Render || Update Pagination bullets/items
3927
+ const swiper = this;
3928
+ const rtl = swiper.rtl;
3929
+ const params = swiper.params.pagination;
3930
+ if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
3931
+ const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
3932
+ const $el = swiper.pagination.$el;
3933
+ // Current/Total
3934
+ let current;
3935
+ const total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
3936
+ if (swiper.params.loop) {
3937
+ current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
3938
+ if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
3939
+ current -= (slidesLength - (swiper.loopedSlides * 2));
3940
+ }
3941
+ if (current > total - 1) current -= total;
3942
+ if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current;
3943
+ } else if (typeof swiper.snapIndex !== 'undefined') {
3944
+ current = swiper.snapIndex;
3945
+ } else {
3946
+ current = swiper.activeIndex || 0;
3947
+ }
3948
+ // Types
3949
+ if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
3950
+ const bullets = swiper.pagination.bullets;
3951
+ let firstIndex;
3952
+ let lastIndex;
3953
+ let midIndex;
3954
+ if (params.dynamicBullets) {
3955
+ swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
3956
+ $el.css(swiper.isHorizontal() ? 'width' : 'height', `${swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)}px`);
3957
+ if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
3958
+ swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
3959
+ if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
3960
+ swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
3961
+ } else if (swiper.pagination.dynamicBulletIndex < 0) {
3962
+ swiper.pagination.dynamicBulletIndex = 0;
3963
+ }
3964
+ }
3965
+ firstIndex = current - swiper.pagination.dynamicBulletIndex;
3966
+ lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
3967
+ midIndex = (lastIndex + firstIndex) / 2;
3968
+ }
3969
+ bullets.removeClass(`${params.bulletActiveClass} ${params.bulletActiveClass}-next ${params.bulletActiveClass}-next-next ${params.bulletActiveClass}-prev ${params.bulletActiveClass}-prev-prev ${params.bulletActiveClass}-main`);
3970
+ if ($el.length > 1) {
3971
+ bullets.each((index$$1, bullet) => {
3972
+ const $bullet = $(bullet);
3973
+ const bulletIndex = $bullet.index();
3974
+ if (bulletIndex === current) {
3975
+ $bullet.addClass(params.bulletActiveClass);
3976
+ }
3977
+ if (params.dynamicBullets) {
3978
+ if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
3979
+ $bullet.addClass(`${params.bulletActiveClass}-main`);
3980
+ }
3981
+ if (bulletIndex === firstIndex) {
3982
+ $bullet
3983
+ .prev()
3984
+ .addClass(`${params.bulletActiveClass}-prev`)
3985
+ .prev()
3986
+ .addClass(`${params.bulletActiveClass}-prev-prev`);
3987
+ }
3988
+ if (bulletIndex === lastIndex) {
3989
+ $bullet
3990
+ .next()
3991
+ .addClass(`${params.bulletActiveClass}-next`)
3992
+ .next()
3993
+ .addClass(`${params.bulletActiveClass}-next-next`);
3994
+ }
3995
+ }
3996
+ });
3997
+ } else {
3998
+ const $bullet = bullets.eq(current);
3999
+ $bullet.addClass(params.bulletActiveClass);
4000
+ if (params.dynamicBullets) {
4001
+ const $firstDisplayedBullet = bullets.eq(firstIndex);
4002
+ const $lastDisplayedBullet = bullets.eq(lastIndex);
4003
+ for (let i = firstIndex; i <= lastIndex; i += 1) {
4004
+ bullets.eq(i).addClass(`${params.bulletActiveClass}-main`);
4005
+ }
4006
+ $firstDisplayedBullet
4007
+ .prev()
4008
+ .addClass(`${params.bulletActiveClass}-prev`)
4009
+ .prev()
4010
+ .addClass(`${params.bulletActiveClass}-prev-prev`);
4011
+ $lastDisplayedBullet
4012
+ .next()
4013
+ .addClass(`${params.bulletActiveClass}-next`)
4014
+ .next()
4015
+ .addClass(`${params.bulletActiveClass}-next-next`);
4016
+ }
4017
+ }
4018
+ if (params.dynamicBullets) {
4019
+ const dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
4020
+ const bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
4021
+ const offsetProp = rtl ? 'right' : 'left';
4022
+ bullets.css(swiper.isHorizontal() ? offsetProp : 'top', `${bulletsOffset}px`);
4023
+ }
4024
+ }
4025
+ if (params.type === 'fraction') {
4026
+ $el.find(`.${params.currentClass}`).text(params.formatFractionCurrent(current + 1));
4027
+ $el.find(`.${params.totalClass}`).text(params.formatFractionTotal(total));
4028
+ }
4029
+ if (params.type === 'progressbar') {
4030
+ let progressbarDirection;
4031
+ if (params.progressbarOpposite) {
4032
+ progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
4033
+ } else {
4034
+ progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
4035
+ }
4036
+ const scale = (current + 1) / total;
4037
+ let scaleX = 1;
4038
+ let scaleY = 1;
4039
+ if (progressbarDirection === 'horizontal') {
4040
+ scaleX = scale;
4041
+ } else {
4042
+ scaleY = scale;
4043
+ }
4044
+ $el.find(`.${params.progressbarFillClass}`).transform(`translate3d(0,0,0) scaleX(${scaleX}) scaleY(${scaleY})`).transition(swiper.params.speed);
4045
+ }
4046
+ if (params.type === 'custom' && params.renderCustom) {
4047
+ $el.html(params.renderCustom(swiper, current + 1, total));
4048
+ swiper.emit('paginationRender', swiper, $el[0]);
4049
+ } else {
4050
+ swiper.emit('paginationUpdate', swiper, $el[0]);
4051
+ }
4052
+ $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4053
+ },
4054
+ render() {
4055
+ // Render Container
4056
+ const swiper = this;
4057
+ const params = swiper.params.pagination;
4058
+ if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4059
+ const slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
4060
+
4061
+ const $el = swiper.pagination.$el;
4062
+ let paginationHTML = '';
4063
+ if (params.type === 'bullets') {
4064
+ const numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
4065
+ for (let i = 0; i < numberOfBullets; i += 1) {
4066
+ if (params.renderBullet) {
4067
+ paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
4068
+ } else {
4069
+ paginationHTML += `<${params.bulletElement} class="${params.bulletClass}"></${params.bulletElement}>`;
4070
+ }
4071
+ }
4072
+ $el.html(paginationHTML);
4073
+ swiper.pagination.bullets = $el.find(`.${params.bulletClass}`);
4074
+ }
4075
+ if (params.type === 'fraction') {
4076
+ if (params.renderFraction) {
4077
+ paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
4078
+ } else {
4079
+ paginationHTML =
4080
+ `<span class="${params.currentClass}"></span>` +
4081
+ ' / ' +
4082
+ `<span class="${params.totalClass}"></span>`;
4083
+ }
4084
+ $el.html(paginationHTML);
4085
+ }
4086
+ if (params.type === 'progressbar') {
4087
+ if (params.renderProgressbar) {
4088
+ paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
4089
+ } else {
4090
+ paginationHTML = `<span class="${params.progressbarFillClass}"></span>`;
4091
+ }
4092
+ $el.html(paginationHTML);
4093
+ }
4094
+ if (params.type !== 'custom') {
4095
+ swiper.emit('paginationRender', swiper.pagination.$el[0]);
4096
+ }
4097
+ },
4098
+ init() {
4099
+ const swiper = this;
4100
+ const params = swiper.params.pagination;
4101
+ if (!params.el) return;
4102
+
4103
+ let $el = $(params.el);
4104
+ if ($el.length === 0) return;
4105
+
4106
+ if (
4107
+ swiper.params.uniqueNavElements &&
4108
+ typeof params.el === 'string' &&
4109
+ $el.length > 1 &&
4110
+ swiper.$el.find(params.el).length === 1
4111
+ ) {
4112
+ $el = swiper.$el.find(params.el);
4113
+ }
4114
+
4115
+ if (params.type === 'bullets' && params.clickable) {
4116
+ $el.addClass(params.clickableClass);
4117
+ }
4118
+
4119
+ $el.addClass(params.modifierClass + params.type);
4120
+
4121
+ if (params.type === 'bullets' && params.dynamicBullets) {
4122
+ $el.addClass(`${params.modifierClass}${params.type}-dynamic`);
4123
+ swiper.pagination.dynamicBulletIndex = 0;
4124
+ if (params.dynamicMainBullets < 1) {
4125
+ params.dynamicMainBullets = 1;
4126
+ }
4127
+ }
4128
+ if (params.type === 'progressbar' && params.progressbarOpposite) {
4129
+ $el.addClass(params.progressbarOppositeClass);
4130
+ }
4131
+
4132
+ if (params.clickable) {
4133
+ $el.on('click', `.${params.bulletClass}`, function onClick(e) {
4134
+ e.preventDefault();
4135
+ let index$$1 = $(this).index() * swiper.params.slidesPerGroup;
4136
+ if (swiper.params.loop) index$$1 += swiper.loopedSlides;
4137
+ swiper.slideTo(index$$1);
4138
+ });
4139
+ }
4140
+
4141
+ Utils.extend(swiper.pagination, {
4142
+ $el,
4143
+ el: $el[0],
4144
+ });
4145
+ },
4146
+ destroy() {
4147
+ const swiper = this;
4148
+ const params = swiper.params.pagination;
4149
+ if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return;
4150
+ const $el = swiper.pagination.$el;
4151
+
4152
+ $el.removeClass(params.hiddenClass);
4153
+ $el.removeClass(params.modifierClass + params.type);
4154
+ if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass);
4155
+ if (params.clickable) {
4156
+ $el.off('click', `.${params.bulletClass}`);
4157
+ }
4158
+ },
4159
+ };
4160
+
4161
+ var pagination = {
4162
+ name: 'pagination',
4163
+ params: {
4164
+ pagination: {
4165
+ el: null,
4166
+ bulletElement: 'span',
4167
+ clickable: false,
4168
+ hideOnClick: false,
4169
+ renderBullet: null,
4170
+ renderProgressbar: null,
4171
+ renderFraction: null,
4172
+ renderCustom: null,
4173
+ progressbarOpposite: false,
4174
+ type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
4175
+ dynamicBullets: false,
4176
+ dynamicMainBullets: 1,
4177
+ formatFractionCurrent: number => number,
4178
+ formatFractionTotal: number => number,
4179
+ bulletClass: 'swiper-pagination-bullet',
4180
+ bulletActiveClass: 'swiper-pagination-bullet-active',
4181
+ modifierClass: 'swiper-pagination-', // NEW
4182
+ currentClass: 'swiper-pagination-current',
4183
+ totalClass: 'swiper-pagination-total',
4184
+ hiddenClass: 'swiper-pagination-hidden',
4185
+ progressbarFillClass: 'swiper-pagination-progressbar-fill',
4186
+ progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
4187
+ clickableClass: 'swiper-pagination-clickable', // NEW
4188
+ lockClass: 'swiper-pagination-lock',
4189
+ },
4190
+ },
4191
+ create() {
4192
+ const swiper = this;
4193
+ Utils.extend(swiper, {
4194
+ pagination: {
4195
+ init: Pagination.init.bind(swiper),
4196
+ render: Pagination.render.bind(swiper),
4197
+ update: Pagination.update.bind(swiper),
4198
+ destroy: Pagination.destroy.bind(swiper),
4199
+ dynamicBulletIndex: 0,
4200
+ },
4201
+ });
4202
+ },
4203
+ on: {
4204
+ init() {
4205
+ const swiper = this;
4206
+ swiper.pagination.init();
4207
+ swiper.pagination.render();
4208
+ swiper.pagination.update();
4209
+ },
4210
+ activeIndexChange() {
4211
+ const swiper = this;
4212
+ if (swiper.params.loop) {
4213
+ swiper.pagination.update();
4214
+ } else if (typeof swiper.snapIndex === 'undefined') {
4215
+ swiper.pagination.update();
4216
+ }
4217
+ },
4218
+ snapIndexChange() {
4219
+ const swiper = this;
4220
+ if (!swiper.params.loop) {
4221
+ swiper.pagination.update();
4222
+ }
4223
+ },
4224
+ slidesLengthChange() {
4225
+ const swiper = this;
4226
+ if (swiper.params.loop) {
4227
+ swiper.pagination.render();
4228
+ swiper.pagination.update();
4229
+ }
4230
+ },
4231
+ snapGridLengthChange() {
4232
+ const swiper = this;
4233
+ if (!swiper.params.loop) {
4234
+ swiper.pagination.render();
4235
+ swiper.pagination.update();
4236
+ }
4237
+ },
4238
+ destroy() {
4239
+ const swiper = this;
4240
+ swiper.pagination.destroy();
4241
+ },
4242
+ click(e) {
4243
+ const swiper = this;
4244
+ if (
4245
+ swiper.params.pagination.el &&
4246
+ swiper.params.pagination.hideOnClick &&
4247
+ swiper.pagination.$el.length > 0 &&
4248
+ !$(e.target).hasClass(swiper.params.pagination.bulletClass)
4249
+ ) {
4250
+ swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
4251
+ }
4252
+ },
4253
+ },
4254
+ };
4255
+
4256
+ const Scrollbar = {
4257
+ setTranslate() {
4258
+ const swiper = this;
4259
+ if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
4260
+ const { scrollbar, rtlTranslate: rtl, progress } = swiper;
4261
+ const {
4262
+ dragSize, trackSize, $dragEl, $el,
4263
+ } = scrollbar;
4264
+ const params = swiper.params.scrollbar;
4265
+
4266
+ let newSize = dragSize;
4267
+ let newPos = (trackSize - dragSize) * progress;
4268
+ if (rtl) {
4269
+ newPos = -newPos;
4270
+ if (newPos > 0) {
4271
+ newSize = dragSize - newPos;
4272
+ newPos = 0;
4273
+ } else if (-newPos + dragSize > trackSize) {
4274
+ newSize = trackSize + newPos;
4275
+ }
4276
+ } else if (newPos < 0) {
4277
+ newSize = dragSize + newPos;
4278
+ newPos = 0;
4279
+ } else if (newPos + dragSize > trackSize) {
4280
+ newSize = trackSize - newPos;
4281
+ }
4282
+ if (swiper.isHorizontal()) {
4283
+ if (Support.transforms3d) {
4284
+ $dragEl.transform(`translate3d(${newPos}px, 0, 0)`);
4285
+ } else {
4286
+ $dragEl.transform(`translateX(${newPos}px)`);
4287
+ }
4288
+ $dragEl[0].style.width = `${newSize}px`;
4289
+ } else {
4290
+ if (Support.transforms3d) {
4291
+ $dragEl.transform(`translate3d(0px, ${newPos}px, 0)`);
4292
+ } else {
4293
+ $dragEl.transform(`translateY(${newPos}px)`);
4294
+ }
4295
+ $dragEl[0].style.height = `${newSize}px`;
4296
+ }
4297
+ if (params.hide) {
4298
+ clearTimeout(swiper.scrollbar.timeout);
4299
+ $el[0].style.opacity = 1;
4300
+ swiper.scrollbar.timeout = setTimeout(() => {
4301
+ $el[0].style.opacity = 0;
4302
+ $el.transition(400);
4303
+ }, 1000);
4304
+ }
4305
+ },
4306
+ setTransition(duration) {
4307
+ const swiper = this;
4308
+ if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
4309
+ swiper.scrollbar.$dragEl.transition(duration);
4310
+ },
4311
+ updateSize() {
4312
+ const swiper = this;
4313
+ if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return;
4314
+
4315
+ const { scrollbar } = swiper;
4316
+ const { $dragEl, $el } = scrollbar;
4317
+
4318
+ $dragEl[0].style.width = '';
4319
+ $dragEl[0].style.height = '';
4320
+ const trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
4321
+
4322
+ const divider = swiper.size / swiper.virtualSize;
4323
+ const moveDivider = divider * (trackSize / swiper.size);
4324
+ let dragSize;
4325
+ if (swiper.params.scrollbar.dragSize === 'auto') {
4326
+ dragSize = trackSize * divider;
4327
+ } else {
4328
+ dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
4329
+ }
4330
+
4331
+ if (swiper.isHorizontal()) {
4332
+ $dragEl[0].style.width = `${dragSize}px`;
4333
+ } else {
4334
+ $dragEl[0].style.height = `${dragSize}px`;
4335
+ }
4336
+
4337
+ if (divider >= 1) {
4338
+ $el[0].style.display = 'none';
4339
+ } else {
4340
+ $el[0].style.display = '';
4341
+ }
4342
+ if (swiper.params.scrollbarHide) {
4343
+ $el[0].style.opacity = 0;
4344
+ }
4345
+ Utils.extend(scrollbar, {
4346
+ trackSize,
4347
+ divider,
4348
+ moveDivider,
4349
+ dragSize,
4350
+ });
4351
+ scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
4352
+ },
4353
+ setDragPosition(e) {
4354
+ const swiper = this;
4355
+ const { scrollbar, rtlTranslate: rtl } = swiper;
4356
+ const { $el, dragSize, trackSize } = scrollbar;
4357
+
4358
+ let pointerPosition;
4359
+ if (swiper.isHorizontal()) {
4360
+ pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX);
4361
+ } else {
4362
+ pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY);
4363
+ }
4364
+ let positionRatio;
4365
+ positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize);
4366
+ positionRatio = Math.max(Math.min(positionRatio, 1), 0);
4367
+ if (rtl) {
4368
+ positionRatio = 1 - positionRatio;
4369
+ }
4370
+
4371
+ const position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
4372
+
4373
+ swiper.updateProgress(position);
4374
+ swiper.setTranslate(position);
4375
+ swiper.updateActiveIndex();
4376
+ swiper.updateSlidesClasses();
4377
+ },
4378
+ onDragStart(e) {
4379
+ const swiper = this;
4380
+ const params = swiper.params.scrollbar;
4381
+ const { scrollbar, $wrapperEl } = swiper;
4382
+ const { $el, $dragEl } = scrollbar;
4383
+ swiper.scrollbar.isTouched = true;
4384
+ e.preventDefault();
4385
+ e.stopPropagation();
4386
+
4387
+ $wrapperEl.transition(100);
4388
+ $dragEl.transition(100);
4389
+ scrollbar.setDragPosition(e);
4390
+
4391
+ clearTimeout(swiper.scrollbar.dragTimeout);
4392
+
4393
+ $el.transition(0);
4394
+ if (params.hide) {
4395
+ $el.css('opacity', 1);
4396
+ }
4397
+ swiper.emit('scrollbarDragStart', e);
4398
+ },
4399
+ onDragMove(e) {
4400
+ const swiper = this;
4401
+ const { scrollbar, $wrapperEl } = swiper;
4402
+ const { $el, $dragEl } = scrollbar;
4403
+
4404
+ if (!swiper.scrollbar.isTouched) return;
4405
+ if (e.preventDefault) e.preventDefault();
4406
+ else e.returnValue = false;
4407
+ scrollbar.setDragPosition(e);
4408
+ $wrapperEl.transition(0);
4409
+ $el.transition(0);
4410
+ $dragEl.transition(0);
4411
+ swiper.emit('scrollbarDragMove', e);
4412
+ },
4413
+ onDragEnd(e) {
4414
+ const swiper = this;
4415
+
4416
+ const params = swiper.params.scrollbar;
4417
+ const { scrollbar } = swiper;
4418
+ const { $el } = scrollbar;
4419
+
4420
+ if (!swiper.scrollbar.isTouched) return;
4421
+ swiper.scrollbar.isTouched = false;
4422
+ if (params.hide) {
4423
+ clearTimeout(swiper.scrollbar.dragTimeout);
4424
+ swiper.scrollbar.dragTimeout = Utils.nextTick(() => {
4425
+ $el.css('opacity', 0);
4426
+ $el.transition(400);
4427
+ }, 1000);
4428
+ }
4429
+ swiper.emit('scrollbarDragEnd', e);
4430
+ if (params.snapOnRelease) {
4431
+ swiper.slideToClosest();
4432
+ }
4433
+ },
4434
+ enableDraggable() {
4435
+ const swiper = this;
4436
+ if (!swiper.params.scrollbar.el) return;
4437
+ const {
4438
+ scrollbar, touchEvents, touchEventsDesktop, params,
4439
+ } = swiper;
4440
+ const $el = scrollbar.$el;
4441
+ const target = $el[0];
4442
+ const activeListener = Support.passiveListener && params.passiveListener ? { passive: false, capture: false } : false;
4443
+ const passiveListener = Support.passiveListener && params.passiveListener ? { passive: true, capture: false } : false;
4444
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
4445
+ target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
4446
+ document.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
4447
+ document.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
4448
+ } else {
4449
+ if (Support.touch) {
4450
+ target.addEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener);
4451
+ target.addEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener);
4452
+ target.addEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener);
4453
+ }
4454
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
4455
+ target.addEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener);
4456
+ document.addEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener);
4457
+ document.addEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener);
4458
+ }
4459
+ }
4460
+ },
4461
+ disableDraggable() {
4462
+ const swiper = this;
4463
+ if (!swiper.params.scrollbar.el) return;
4464
+ const {
4465
+ scrollbar, touchEvents, touchEventsDesktop, params,
4466
+ } = swiper;
4467
+ const $el = scrollbar.$el;
4468
+ const target = $el[0];
4469
+ const activeListener = Support.passiveListener && params.passiveListener ? { passive: false, capture: false } : false;
4470
+ const passiveListener = Support.passiveListener && params.passiveListener ? { passive: true, capture: false } : false;
4471
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
4472
+ target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
4473
+ document.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
4474
+ document.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
4475
+ } else {
4476
+ if (Support.touch) {
4477
+ target.removeEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener);
4478
+ target.removeEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener);
4479
+ target.removeEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener);
4480
+ }
4481
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
4482
+ target.removeEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener);
4483
+ document.removeEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener);
4484
+ document.removeEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener);
4485
+ }
4486
+ }
4487
+ },
4488
+ init() {
4489
+ const swiper = this;
4490
+ if (!swiper.params.scrollbar.el) return;
4491
+ const { scrollbar, $el: $swiperEl } = swiper;
4492
+ const params = swiper.params.scrollbar;
4493
+
4494
+ let $el = $(params.el);
4495
+ if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
4496
+ $el = $swiperEl.find(params.el);
4497
+ }
4498
+
4499
+ let $dragEl = $el.find(`.${swiper.params.scrollbar.dragClass}`);
4500
+ if ($dragEl.length === 0) {
4501
+ $dragEl = $(`<div class="${swiper.params.scrollbar.dragClass}"></div>`);
4502
+ $el.append($dragEl);
4503
+ }
4504
+
4505
+ Utils.extend(scrollbar, {
4506
+ $el,
4507
+ el: $el[0],
4508
+ $dragEl,
4509
+ dragEl: $dragEl[0],
4510
+ });
4511
+
4512
+ if (params.draggable) {
4513
+ scrollbar.enableDraggable();
4514
+ }
4515
+ },
4516
+ destroy() {
4517
+ const swiper = this;
4518
+ swiper.scrollbar.disableDraggable();
4519
+ },
4520
+ };
4521
+
4522
+ var scrollbar = {
4523
+ name: 'scrollbar',
4524
+ params: {
4525
+ scrollbar: {
4526
+ el: null,
4527
+ dragSize: 'auto',
4528
+ hide: false,
4529
+ draggable: false,
4530
+ snapOnRelease: true,
4531
+ lockClass: 'swiper-scrollbar-lock',
4532
+ dragClass: 'swiper-scrollbar-drag',
4533
+ },
4534
+ },
4535
+ create() {
4536
+ const swiper = this;
4537
+ Utils.extend(swiper, {
4538
+ scrollbar: {
4539
+ init: Scrollbar.init.bind(swiper),
4540
+ destroy: Scrollbar.destroy.bind(swiper),
4541
+ updateSize: Scrollbar.updateSize.bind(swiper),
4542
+ setTranslate: Scrollbar.setTranslate.bind(swiper),
4543
+ setTransition: Scrollbar.setTransition.bind(swiper),
4544
+ enableDraggable: Scrollbar.enableDraggable.bind(swiper),
4545
+ disableDraggable: Scrollbar.disableDraggable.bind(swiper),
4546
+ setDragPosition: Scrollbar.setDragPosition.bind(swiper),
4547
+ onDragStart: Scrollbar.onDragStart.bind(swiper),
4548
+ onDragMove: Scrollbar.onDragMove.bind(swiper),
4549
+ onDragEnd: Scrollbar.onDragEnd.bind(swiper),
4550
+ isTouched: false,
4551
+ timeout: null,
4552
+ dragTimeout: null,
4553
+ },
4554
+ });
4555
+ },
4556
+ on: {
4557
+ init() {
4558
+ const swiper = this;
4559
+ swiper.scrollbar.init();
4560
+ swiper.scrollbar.updateSize();
4561
+ swiper.scrollbar.setTranslate();
4562
+ },
4563
+ update() {
4564
+ const swiper = this;
4565
+ swiper.scrollbar.updateSize();
4566
+ },
4567
+ resize() {
4568
+ const swiper = this;
4569
+ swiper.scrollbar.updateSize();
4570
+ },
4571
+ observerUpdate() {
4572
+ const swiper = this;
4573
+ swiper.scrollbar.updateSize();
4574
+ },
4575
+ setTranslate() {
4576
+ const swiper = this;
4577
+ swiper.scrollbar.setTranslate();
4578
+ },
4579
+ setTransition(duration) {
4580
+ const swiper = this;
4581
+ swiper.scrollbar.setTransition(duration);
4582
+ },
4583
+ destroy() {
4584
+ const swiper = this;
4585
+ swiper.scrollbar.destroy();
4586
+ },
4587
+ },
4588
+ };
4589
+
4590
+ const Parallax = {
4591
+ setTransform(el, progress) {
4592
+ const swiper = this;
4593
+ const { rtl } = swiper;
4594
+
4595
+ const $el = $(el);
4596
+ const rtlFactor = rtl ? -1 : 1;
4597
+
4598
+ const p = $el.attr('data-swiper-parallax') || '0';
4599
+ let x = $el.attr('data-swiper-parallax-x');
4600
+ let y = $el.attr('data-swiper-parallax-y');
4601
+ const scale = $el.attr('data-swiper-parallax-scale');
4602
+ const opacity = $el.attr('data-swiper-parallax-opacity');
4603
+
4604
+ if (x || y) {
4605
+ x = x || '0';
4606
+ y = y || '0';
4607
+ } else if (swiper.isHorizontal()) {
4608
+ x = p;
4609
+ y = '0';
4610
+ } else {
4611
+ y = p;
4612
+ x = '0';
4613
+ }
4614
+
4615
+ if ((x).indexOf('%') >= 0) {
4616
+ x = `${parseInt(x, 10) * progress * rtlFactor}%`;
4617
+ } else {
4618
+ x = `${x * progress * rtlFactor}px`;
4619
+ }
4620
+ if ((y).indexOf('%') >= 0) {
4621
+ y = `${parseInt(y, 10) * progress}%`;
4622
+ } else {
4623
+ y = `${y * progress}px`;
4624
+ }
4625
+
4626
+ if (typeof opacity !== 'undefined' && opacity !== null) {
4627
+ const currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
4628
+ $el[0].style.opacity = currentOpacity;
4629
+ }
4630
+ if (typeof scale === 'undefined' || scale === null) {
4631
+ $el.transform(`translate3d(${x}, ${y}, 0px)`);
4632
+ } else {
4633
+ const currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
4634
+ $el.transform(`translate3d(${x}, ${y}, 0px) scale(${currentScale})`);
4635
+ }
4636
+ },
4637
+ setTranslate() {
4638
+ const swiper = this;
4639
+ const {
4640
+ $el, slides, progress, snapGrid,
4641
+ } = swiper;
4642
+ $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
4643
+ .each((index$$1, el) => {
4644
+ swiper.parallax.setTransform(el, progress);
4645
+ });
4646
+ slides.each((slideIndex, slideEl) => {
4647
+ let slideProgress = slideEl.progress;
4648
+ if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
4649
+ slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
4650
+ }
4651
+ slideProgress = Math.min(Math.max(slideProgress, -1), 1);
4652
+ $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
4653
+ .each((index$$1, el) => {
4654
+ swiper.parallax.setTransform(el, slideProgress);
4655
+ });
4656
+ });
4657
+ },
4658
+ setTransition(duration = this.params.speed) {
4659
+ const swiper = this;
4660
+ const { $el } = swiper;
4661
+ $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
4662
+ .each((index$$1, parallaxEl) => {
4663
+ const $parallaxEl = $(parallaxEl);
4664
+ let parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
4665
+ if (duration === 0) parallaxDuration = 0;
4666
+ $parallaxEl.transition(parallaxDuration);
4667
+ });
4668
+ },
4669
+ };
4670
+
4671
+ var parallax = {
4672
+ name: 'parallax',
4673
+ params: {
4674
+ parallax: {
4675
+ enabled: false,
4676
+ },
4677
+ },
4678
+ create() {
4679
+ const swiper = this;
4680
+ Utils.extend(swiper, {
4681
+ parallax: {
4682
+ setTransform: Parallax.setTransform.bind(swiper),
4683
+ setTranslate: Parallax.setTranslate.bind(swiper),
4684
+ setTransition: Parallax.setTransition.bind(swiper),
4685
+ },
4686
+ });
4687
+ },
4688
+ on: {
4689
+ beforeInit() {
4690
+ const swiper = this;
4691
+ if (!swiper.params.parallax.enabled) return;
4692
+ swiper.params.watchSlidesProgress = true;
4693
+ },
4694
+ init() {
4695
+ const swiper = this;
4696
+ if (!swiper.params.parallax) return;
4697
+ swiper.parallax.setTranslate();
4698
+ },
4699
+ setTranslate() {
4700
+ const swiper = this;
4701
+ if (!swiper.params.parallax) return;
4702
+ swiper.parallax.setTranslate();
4703
+ },
4704
+ setTransition(duration) {
4705
+ const swiper = this;
4706
+ if (!swiper.params.parallax) return;
4707
+ swiper.parallax.setTransition(duration);
4708
+ },
4709
+ },
4710
+ };
4711
+
4712
+ const Zoom = {
4713
+ // Calc Scale From Multi-touches
4714
+ getDistanceBetweenTouches(e) {
4715
+ if (e.targetTouches.length < 2) return 1;
4716
+ const x1 = e.targetTouches[0].pageX;
4717
+ const y1 = e.targetTouches[0].pageY;
4718
+ const x2 = e.targetTouches[1].pageX;
4719
+ const y2 = e.targetTouches[1].pageY;
4720
+ const distance = Math.sqrt(((x2 - x1) ** 2) + ((y2 - y1) ** 2));
4721
+ return distance;
4722
+ },
4723
+ // Events
4724
+ onGestureStart(e) {
4725
+ const swiper = this;
4726
+ const params = swiper.params.zoom;
4727
+ const zoom = swiper.zoom;
4728
+ const { gesture } = zoom;
4729
+ zoom.fakeGestureTouched = false;
4730
+ zoom.fakeGestureMoved = false;
4731
+ if (!Support.gestures) {
4732
+ if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
4733
+ return;
4734
+ }
4735
+ zoom.fakeGestureTouched = true;
4736
+ gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
4737
+ }
4738
+ if (!gesture.$slideEl || !gesture.$slideEl.length) {
4739
+ gesture.$slideEl = $(e.target).closest('.swiper-slide');
4740
+ if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex);
4741
+ gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
4742
+ gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
4743
+ gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
4744
+ if (gesture.$imageWrapEl.length === 0) {
4745
+ gesture.$imageEl = undefined;
4746
+ return;
4747
+ }
4748
+ }
4749
+ gesture.$imageEl.transition(0);
4750
+ swiper.zoom.isScaling = true;
4751
+ },
4752
+ onGestureChange(e) {
4753
+ const swiper = this;
4754
+ const params = swiper.params.zoom;
4755
+ const zoom = swiper.zoom;
4756
+ const { gesture } = zoom;
4757
+ if (!Support.gestures) {
4758
+ if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
4759
+ return;
4760
+ }
4761
+ zoom.fakeGestureMoved = true;
4762
+ gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
4763
+ }
4764
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4765
+ if (Support.gestures) {
4766
+ swiper.zoom.scale = e.scale * zoom.currentScale;
4767
+ } else {
4768
+ zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
4769
+ }
4770
+ if (zoom.scale > gesture.maxRatio) {
4771
+ zoom.scale = (gesture.maxRatio - 1) + (((zoom.scale - gesture.maxRatio) + 1) ** 0.5);
4772
+ }
4773
+ if (zoom.scale < params.minRatio) {
4774
+ zoom.scale = (params.minRatio + 1) - (((params.minRatio - zoom.scale) + 1) ** 0.5);
4775
+ }
4776
+ gesture.$imageEl.transform(`translate3d(0,0,0) scale(${zoom.scale})`);
4777
+ },
4778
+ onGestureEnd(e) {
4779
+ const swiper = this;
4780
+ const params = swiper.params.zoom;
4781
+ const zoom = swiper.zoom;
4782
+ const { gesture } = zoom;
4783
+ if (!Support.gestures) {
4784
+ if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
4785
+ return;
4786
+ }
4787
+ if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
4788
+ return;
4789
+ }
4790
+ zoom.fakeGestureTouched = false;
4791
+ zoom.fakeGestureMoved = false;
4792
+ }
4793
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4794
+ zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
4795
+ gesture.$imageEl.transition(swiper.params.speed).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
4796
+ zoom.currentScale = zoom.scale;
4797
+ zoom.isScaling = false;
4798
+ if (zoom.scale === 1) gesture.$slideEl = undefined;
4799
+ },
4800
+ onTouchStart(e) {
4801
+ const swiper = this;
4802
+ const zoom = swiper.zoom;
4803
+ const { gesture, image } = zoom;
4804
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4805
+ if (image.isTouched) return;
4806
+ if (Device.android) e.preventDefault();
4807
+ image.isTouched = true;
4808
+ image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
4809
+ image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
4810
+ },
4811
+ onTouchMove(e) {
4812
+ const swiper = this;
4813
+ const zoom = swiper.zoom;
4814
+ const { gesture, image, velocity } = zoom;
4815
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4816
+ swiper.allowClick = false;
4817
+ if (!image.isTouched || !gesture.$slideEl) return;
4818
+
4819
+ if (!image.isMoved) {
4820
+ image.width = gesture.$imageEl[0].offsetWidth;
4821
+ image.height = gesture.$imageEl[0].offsetHeight;
4822
+ image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
4823
+ image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
4824
+ gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
4825
+ gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
4826
+ gesture.$imageWrapEl.transition(0);
4827
+ if (swiper.rtl) {
4828
+ image.startX = -image.startX;
4829
+ image.startY = -image.startY;
4830
+ }
4831
+ }
4832
+ // Define if we need image drag
4833
+ const scaledWidth = image.width * zoom.scale;
4834
+ const scaledHeight = image.height * zoom.scale;
4835
+
4836
+ if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return;
4837
+
4838
+ image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
4839
+ image.maxX = -image.minX;
4840
+ image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
4841
+ image.maxY = -image.minY;
4842
+
4843
+ image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
4844
+ image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
4845
+
4846
+ if (!image.isMoved && !zoom.isScaling) {
4847
+ if (
4848
+ swiper.isHorizontal() &&
4849
+ (
4850
+ (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x) ||
4851
+ (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
4852
+ )
4853
+ ) {
4854
+ image.isTouched = false;
4855
+ return;
4856
+ } else if (
4857
+ !swiper.isHorizontal() &&
4858
+ (
4859
+ (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y) ||
4860
+ (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
4861
+ )
4862
+ ) {
4863
+ image.isTouched = false;
4864
+ return;
4865
+ }
4866
+ }
4867
+ e.preventDefault();
4868
+ e.stopPropagation();
4869
+
4870
+ image.isMoved = true;
4871
+ image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
4872
+ image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
4873
+
4874
+ if (image.currentX < image.minX) {
4875
+ image.currentX = (image.minX + 1) - (((image.minX - image.currentX) + 1) ** 0.8);
4876
+ }
4877
+ if (image.currentX > image.maxX) {
4878
+ image.currentX = (image.maxX - 1) + (((image.currentX - image.maxX) + 1) ** 0.8);
4879
+ }
4880
+
4881
+ if (image.currentY < image.minY) {
4882
+ image.currentY = (image.minY + 1) - (((image.minY - image.currentY) + 1) ** 0.8);
4883
+ }
4884
+ if (image.currentY > image.maxY) {
4885
+ image.currentY = (image.maxY - 1) + (((image.currentY - image.maxY) + 1) ** 0.8);
4886
+ }
4887
+
4888
+ // Velocity
4889
+ if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x;
4890
+ if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y;
4891
+ if (!velocity.prevTime) velocity.prevTime = Date.now();
4892
+ velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
4893
+ velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
4894
+ if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0;
4895
+ if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0;
4896
+ velocity.prevPositionX = image.touchesCurrent.x;
4897
+ velocity.prevPositionY = image.touchesCurrent.y;
4898
+ velocity.prevTime = Date.now();
4899
+
4900
+ gesture.$imageWrapEl.transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
4901
+ },
4902
+ onTouchEnd() {
4903
+ const swiper = this;
4904
+ const zoom = swiper.zoom;
4905
+ const { gesture, image, velocity } = zoom;
4906
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4907
+ if (!image.isTouched || !image.isMoved) {
4908
+ image.isTouched = false;
4909
+ image.isMoved = false;
4910
+ return;
4911
+ }
4912
+ image.isTouched = false;
4913
+ image.isMoved = false;
4914
+ let momentumDurationX = 300;
4915
+ let momentumDurationY = 300;
4916
+ const momentumDistanceX = velocity.x * momentumDurationX;
4917
+ const newPositionX = image.currentX + momentumDistanceX;
4918
+ const momentumDistanceY = velocity.y * momentumDurationY;
4919
+ const newPositionY = image.currentY + momentumDistanceY;
4920
+
4921
+ // Fix duration
4922
+ if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x);
4923
+ if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y);
4924
+ const momentumDuration = Math.max(momentumDurationX, momentumDurationY);
4925
+
4926
+ image.currentX = newPositionX;
4927
+ image.currentY = newPositionY;
4928
+
4929
+ // Define if we need image drag
4930
+ const scaledWidth = image.width * zoom.scale;
4931
+ const scaledHeight = image.height * zoom.scale;
4932
+ image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
4933
+ image.maxX = -image.minX;
4934
+ image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
4935
+ image.maxY = -image.minY;
4936
+ image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
4937
+ image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
4938
+
4939
+ gesture.$imageWrapEl.transition(momentumDuration).transform(`translate3d(${image.currentX}px, ${image.currentY}px,0)`);
4940
+ },
4941
+ onTransitionEnd() {
4942
+ const swiper = this;
4943
+ const zoom = swiper.zoom;
4944
+ const { gesture } = zoom;
4945
+ if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
4946
+ gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
4947
+ gesture.$imageWrapEl.transform('translate3d(0,0,0)');
4948
+ gesture.$slideEl = undefined;
4949
+ gesture.$imageEl = undefined;
4950
+ gesture.$imageWrapEl = undefined;
4951
+
4952
+ zoom.scale = 1;
4953
+ zoom.currentScale = 1;
4954
+ }
4955
+ },
4956
+ // Toggle Zoom
4957
+ toggle(e) {
4958
+ const swiper = this;
4959
+ const zoom = swiper.zoom;
4960
+
4961
+ if (zoom.scale && zoom.scale !== 1) {
4962
+ // Zoom Out
4963
+ zoom.out();
4964
+ } else {
4965
+ // Zoom In
4966
+ zoom.in(e);
4967
+ }
4968
+ },
4969
+ in(e) {
4970
+ const swiper = this;
4971
+
4972
+ const zoom = swiper.zoom;
4973
+ const params = swiper.params.zoom;
4974
+ const { gesture, image } = zoom;
4975
+
4976
+ if (!gesture.$slideEl) {
4977
+ gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
4978
+ gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
4979
+ gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
4980
+ }
4981
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
4982
+
4983
+ gesture.$slideEl.addClass(`${params.zoomedSlideClass}`);
4984
+
4985
+ let touchX;
4986
+ let touchY;
4987
+ let offsetX;
4988
+ let offsetY;
4989
+ let diffX;
4990
+ let diffY;
4991
+ let translateX;
4992
+ let translateY;
4993
+ let imageWidth;
4994
+ let imageHeight;
4995
+ let scaledWidth;
4996
+ let scaledHeight;
4997
+ let translateMinX;
4998
+ let translateMinY;
4999
+ let translateMaxX;
5000
+ let translateMaxY;
5001
+ let slideWidth;
5002
+ let slideHeight;
5003
+
5004
+ if (typeof image.touchesStart.x === 'undefined' && e) {
5005
+ touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
5006
+ touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
5007
+ } else {
5008
+ touchX = image.touchesStart.x;
5009
+ touchY = image.touchesStart.y;
5010
+ }
5011
+
5012
+ zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5013
+ zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5014
+ if (e) {
5015
+ slideWidth = gesture.$slideEl[0].offsetWidth;
5016
+ slideHeight = gesture.$slideEl[0].offsetHeight;
5017
+ offsetX = gesture.$slideEl.offset().left;
5018
+ offsetY = gesture.$slideEl.offset().top;
5019
+ diffX = (offsetX + (slideWidth / 2)) - touchX;
5020
+ diffY = (offsetY + (slideHeight / 2)) - touchY;
5021
+
5022
+ imageWidth = gesture.$imageEl[0].offsetWidth;
5023
+ imageHeight = gesture.$imageEl[0].offsetHeight;
5024
+ scaledWidth = imageWidth * zoom.scale;
5025
+ scaledHeight = imageHeight * zoom.scale;
5026
+
5027
+ translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
5028
+ translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
5029
+ translateMaxX = -translateMinX;
5030
+ translateMaxY = -translateMinY;
5031
+
5032
+ translateX = diffX * zoom.scale;
5033
+ translateY = diffY * zoom.scale;
5034
+
5035
+ if (translateX < translateMinX) {
5036
+ translateX = translateMinX;
5037
+ }
5038
+ if (translateX > translateMaxX) {
5039
+ translateX = translateMaxX;
5040
+ }
5041
+
5042
+ if (translateY < translateMinY) {
5043
+ translateY = translateMinY;
5044
+ }
5045
+ if (translateY > translateMaxY) {
5046
+ translateY = translateMaxY;
5047
+ }
5048
+ } else {
5049
+ translateX = 0;
5050
+ translateY = 0;
5051
+ }
5052
+ gesture.$imageWrapEl.transition(300).transform(`translate3d(${translateX}px, ${translateY}px,0)`);
5053
+ gesture.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${zoom.scale})`);
5054
+ },
5055
+ out() {
5056
+ const swiper = this;
5057
+
5058
+ const zoom = swiper.zoom;
5059
+ const params = swiper.params.zoom;
5060
+ const { gesture } = zoom;
5061
+
5062
+ if (!gesture.$slideEl) {
5063
+ gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
5064
+ gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
5065
+ gesture.$imageWrapEl = gesture.$imageEl.parent(`.${params.containerClass}`);
5066
+ }
5067
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) return;
5068
+
5069
+ zoom.scale = 1;
5070
+ zoom.currentScale = 1;
5071
+ gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
5072
+ gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
5073
+ gesture.$slideEl.removeClass(`${params.zoomedSlideClass}`);
5074
+ gesture.$slideEl = undefined;
5075
+ },
5076
+ // Attach/Detach Events
5077
+ enable() {
5078
+ const swiper = this;
5079
+ const zoom = swiper.zoom;
5080
+ if (zoom.enabled) return;
5081
+ zoom.enabled = true;
5082
+
5083
+ const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
5084
+
5085
+ // Scale image
5086
+ if (Support.gestures) {
5087
+ swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
5088
+ swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
5089
+ swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
5090
+ } else if (swiper.touchEvents.start === 'touchstart') {
5091
+ swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
5092
+ swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
5093
+ swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
5094
+ }
5095
+
5096
+ // Move image
5097
+ swiper.$wrapperEl.on(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove);
5098
+ },
5099
+ disable() {
5100
+ const swiper = this;
5101
+ const zoom = swiper.zoom;
5102
+ if (!zoom.enabled) return;
5103
+
5104
+ swiper.zoom.enabled = false;
5105
+
5106
+ const passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
5107
+
5108
+ // Scale image
5109
+ if (Support.gestures) {
5110
+ swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
5111
+ swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
5112
+ swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
5113
+ } else if (swiper.touchEvents.start === 'touchstart') {
5114
+ swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
5115
+ swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
5116
+ swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
5117
+ }
5118
+
5119
+ // Move image
5120
+ swiper.$wrapperEl.off(swiper.touchEvents.move, `.${swiper.params.zoom.containerClass}`, zoom.onTouchMove);
5121
+ },
5122
+ };
5123
+
5124
+ var zoom = {
5125
+ name: 'zoom',
5126
+ params: {
5127
+ zoom: {
5128
+ enabled: false,
5129
+ maxRatio: 3,
5130
+ minRatio: 1,
5131
+ toggle: true,
5132
+ containerClass: 'swiper-zoom-container',
5133
+ zoomedSlideClass: 'swiper-slide-zoomed',
5134
+ },
5135
+ },
5136
+ create() {
5137
+ const swiper = this;
5138
+ const zoom = {
5139
+ enabled: false,
5140
+ scale: 1,
5141
+ currentScale: 1,
5142
+ isScaling: false,
5143
+ gesture: {
5144
+ $slideEl: undefined,
5145
+ slideWidth: undefined,
5146
+ slideHeight: undefined,
5147
+ $imageEl: undefined,
5148
+ $imageWrapEl: undefined,
5149
+ maxRatio: 3,
5150
+ },
5151
+ image: {
5152
+ isTouched: undefined,
5153
+ isMoved: undefined,
5154
+ currentX: undefined,
5155
+ currentY: undefined,
5156
+ minX: undefined,
5157
+ minY: undefined,
5158
+ maxX: undefined,
5159
+ maxY: undefined,
5160
+ width: undefined,
5161
+ height: undefined,
5162
+ startX: undefined,
5163
+ startY: undefined,
5164
+ touchesStart: {},
5165
+ touchesCurrent: {},
5166
+ },
5167
+ velocity: {
5168
+ x: undefined,
5169
+ y: undefined,
5170
+ prevPositionX: undefined,
5171
+ prevPositionY: undefined,
5172
+ prevTime: undefined,
5173
+ },
5174
+ };
5175
+ ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach((methodName) => {
5176
+ zoom[methodName] = Zoom[methodName].bind(swiper);
5177
+ });
5178
+ Utils.extend(swiper, {
5179
+ zoom,
5180
+ });
5181
+ },
5182
+ on: {
5183
+ init() {
5184
+ const swiper = this;
5185
+ if (swiper.params.zoom.enabled) {
5186
+ swiper.zoom.enable();
5187
+ }
5188
+ },
5189
+ destroy() {
5190
+ const swiper = this;
5191
+ swiper.zoom.disable();
5192
+ },
5193
+ touchStart(e) {
5194
+ const swiper = this;
5195
+ if (!swiper.zoom.enabled) return;
5196
+ swiper.zoom.onTouchStart(e);
5197
+ },
5198
+ touchEnd(e) {
5199
+ const swiper = this;
5200
+ if (!swiper.zoom.enabled) return;
5201
+ swiper.zoom.onTouchEnd(e);
5202
+ },
5203
+ doubleTap(e) {
5204
+ const swiper = this;
5205
+ if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
5206
+ swiper.zoom.toggle(e);
5207
+ }
5208
+ },
5209
+ transitionEnd() {
5210
+ const swiper = this;
5211
+ if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
5212
+ swiper.zoom.onTransitionEnd();
5213
+ }
5214
+ },
5215
+ },
5216
+ };
5217
+
5218
+ const Lazy = {
5219
+ loadInSlide(index$$1, loadInDuplicate = true) {
5220
+ const swiper = this;
5221
+ const params = swiper.params.lazy;
5222
+ if (typeof index$$1 === 'undefined') return;
5223
+ if (swiper.slides.length === 0) return;
5224
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
5225
+
5226
+ const $slideEl = isVirtual
5227
+ ? swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-swiper-slide-index="${index$$1}"]`)
5228
+ : swiper.slides.eq(index$$1);
5229
+
5230
+ let $images = $slideEl.find(`.${params.elementClass}:not(.${params.loadedClass}):not(.${params.loadingClass})`);
5231
+ if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
5232
+ $images = $images.add($slideEl[0]);
5233
+ }
5234
+ if ($images.length === 0) return;
5235
+
5236
+ $images.each((imageIndex, imageEl) => {
5237
+ const $imageEl = $(imageEl);
5238
+ $imageEl.addClass(params.loadingClass);
5239
+
5240
+ const background = $imageEl.attr('data-background');
5241
+ const src = $imageEl.attr('data-src');
5242
+ const srcset = $imageEl.attr('data-srcset');
5243
+ const sizes = $imageEl.attr('data-sizes');
5244
+
5245
+ swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, () => {
5246
+ if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) return;
5247
+ if (background) {
5248
+ $imageEl.css('background-image', `url("${background}")`);
5249
+ $imageEl.removeAttr('data-background');
5250
+ } else {
5251
+ if (srcset) {
5252
+ $imageEl.attr('srcset', srcset);
5253
+ $imageEl.removeAttr('data-srcset');
5254
+ }
5255
+ if (sizes) {
5256
+ $imageEl.attr('sizes', sizes);
5257
+ $imageEl.removeAttr('data-sizes');
5258
+ }
5259
+ if (src) {
5260
+ $imageEl.attr('src', src);
5261
+ $imageEl.removeAttr('data-src');
5262
+ }
5263
+ }
5264
+
5265
+ $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
5266
+ $slideEl.find(`.${params.preloaderClass}`).remove();
5267
+ if (swiper.params.loop && loadInDuplicate) {
5268
+ const slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
5269
+ if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
5270
+ const originalSlide = swiper.$wrapperEl.children(`[data-swiper-slide-index="${slideOriginalIndex}"]:not(.${swiper.params.slideDuplicateClass})`);
5271
+ swiper.lazy.loadInSlide(originalSlide.index(), false);
5272
+ } else {
5273
+ const duplicatedSlide = swiper.$wrapperEl.children(`.${swiper.params.slideDuplicateClass}[data-swiper-slide-index="${slideOriginalIndex}"]`);
5274
+ swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
5275
+ }
5276
+ }
5277
+ swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
5278
+ });
5279
+
5280
+ swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
5281
+ });
5282
+ },
5283
+ load() {
5284
+ const swiper = this;
5285
+ const {
5286
+ $wrapperEl, params: swiperParams, slides, activeIndex,
5287
+ } = swiper;
5288
+ const isVirtual = swiper.virtual && swiperParams.virtual.enabled;
5289
+ const params = swiperParams.lazy;
5290
+
5291
+ let slidesPerView = swiperParams.slidesPerView;
5292
+ if (slidesPerView === 'auto') {
5293
+ slidesPerView = 0;
5294
+ }
5295
+
5296
+ function slideExist(index$$1) {
5297
+ if (isVirtual) {
5298
+ if ($wrapperEl.children(`.${swiperParams.slideClass}[data-swiper-slide-index="${index$$1}"]`).length) {
5299
+ return true;
5300
+ }
5301
+ } else if (slides[index$$1]) return true;
5302
+ return false;
5303
+ }
5304
+ function slideIndex(slideEl) {
5305
+ if (isVirtual) {
5306
+ return $(slideEl).attr('data-swiper-slide-index');
5307
+ }
5308
+ return $(slideEl).index();
5309
+ }
5310
+
5311
+ if (!swiper.lazy.initialImageLoaded) swiper.lazy.initialImageLoaded = true;
5312
+ if (swiper.params.watchSlidesVisibility) {
5313
+ $wrapperEl.children(`.${swiperParams.slideVisibleClass}`).each((elIndex, slideEl) => {
5314
+ const index$$1 = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
5315
+ swiper.lazy.loadInSlide(index$$1);
5316
+ });
5317
+ } else if (slidesPerView > 1) {
5318
+ for (let i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
5319
+ if (slideExist(i)) swiper.lazy.loadInSlide(i);
5320
+ }
5321
+ } else {
5322
+ swiper.lazy.loadInSlide(activeIndex);
5323
+ }
5324
+ if (params.loadPrevNext) {
5325
+ if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
5326
+ const amount = params.loadPrevNextAmount;
5327
+ const spv = slidesPerView;
5328
+ const maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
5329
+ const minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
5330
+ // Next Slides
5331
+ for (let i = activeIndex + slidesPerView; i < maxIndex; i += 1) {
5332
+ if (slideExist(i)) swiper.lazy.loadInSlide(i);
5333
+ }
5334
+ // Prev Slides
5335
+ for (let i = minIndex; i < activeIndex; i += 1) {
5336
+ if (slideExist(i)) swiper.lazy.loadInSlide(i);
5337
+ }
5338
+ } else {
5339
+ const nextSlide = $wrapperEl.children(`.${swiperParams.slideNextClass}`);
5340
+ if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide));
5341
+
5342
+ const prevSlide = $wrapperEl.children(`.${swiperParams.slidePrevClass}`);
5343
+ if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide));
5344
+ }
5345
+ }
5346
+ },
5347
+ };
5348
+
5349
+ var lazy = {
5350
+ name: 'lazy',
5351
+ params: {
5352
+ lazy: {
5353
+ enabled: false,
5354
+ loadPrevNext: false,
5355
+ loadPrevNextAmount: 1,
5356
+ loadOnTransitionStart: false,
5357
+
5358
+ elementClass: 'swiper-lazy',
5359
+ loadingClass: 'swiper-lazy-loading',
5360
+ loadedClass: 'swiper-lazy-loaded',
5361
+ preloaderClass: 'swiper-lazy-preloader',
5362
+ },
5363
+ },
5364
+ create() {
5365
+ const swiper = this;
5366
+ Utils.extend(swiper, {
5367
+ lazy: {
5368
+ initialImageLoaded: false,
5369
+ load: Lazy.load.bind(swiper),
5370
+ loadInSlide: Lazy.loadInSlide.bind(swiper),
5371
+ },
5372
+ });
5373
+ },
5374
+ on: {
5375
+ beforeInit() {
5376
+ const swiper = this;
5377
+ if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
5378
+ swiper.params.preloadImages = false;
5379
+ }
5380
+ },
5381
+ init() {
5382
+ const swiper = this;
5383
+ if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
5384
+ swiper.lazy.load();
5385
+ }
5386
+ },
5387
+ scroll() {
5388
+ const swiper = this;
5389
+ if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
5390
+ swiper.lazy.load();
5391
+ }
5392
+ },
5393
+ resize() {
5394
+ const swiper = this;
5395
+ if (swiper.params.lazy.enabled) {
5396
+ swiper.lazy.load();
5397
+ }
5398
+ },
5399
+ scrollbarDragMove() {
5400
+ const swiper = this;
5401
+ if (swiper.params.lazy.enabled) {
5402
+ swiper.lazy.load();
5403
+ }
5404
+ },
5405
+ transitionStart() {
5406
+ const swiper = this;
5407
+ if (swiper.params.lazy.enabled) {
5408
+ if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
5409
+ swiper.lazy.load();
5410
+ }
5411
+ }
5412
+ },
5413
+ transitionEnd() {
5414
+ const swiper = this;
5415
+ if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
5416
+ swiper.lazy.load();
5417
+ }
5418
+ },
5419
+ },
5420
+ };
5421
+
5422
+ /* eslint no-bitwise: ["error", { "allow": [">>"] }] */
5423
+
5424
+ const Controller = {
5425
+ LinearSpline: function LinearSpline(x, y) {
5426
+ const binarySearch = (function search() {
5427
+ let maxIndex;
5428
+ let minIndex;
5429
+ let guess;
5430
+ return (array, val) => {
5431
+ minIndex = -1;
5432
+ maxIndex = array.length;
5433
+ while (maxIndex - minIndex > 1) {
5434
+ guess = maxIndex + minIndex >> 1;
5435
+ if (array[guess] <= val) {
5436
+ minIndex = guess;
5437
+ } else {
5438
+ maxIndex = guess;
5439
+ }
5440
+ }
5441
+ return maxIndex;
5442
+ };
5443
+ }());
5444
+ this.x = x;
5445
+ this.y = y;
5446
+ this.lastIndex = x.length - 1;
5447
+ // Given an x value (x2), return the expected y2 value:
5448
+ // (x1,y1) is the known point before given value,
5449
+ // (x3,y3) is the known point after given value.
5450
+ let i1;
5451
+ let i3;
5452
+
5453
+ this.interpolate = function interpolate(x2) {
5454
+ if (!x2) return 0;
5455
+
5456
+ // Get the indexes of x1 and x3 (the array indexes before and after given x2):
5457
+ i3 = binarySearch(this.x, x2);
5458
+ i1 = i3 - 1;
5459
+
5460
+ // We have our indexes i1 & i3, so we can calculate already:
5461
+ // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
5462
+ return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
5463
+ };
5464
+ return this;
5465
+ },
5466
+ // xxx: for now i will just save one spline function to to
5467
+ getInterpolateFunction(c) {
5468
+ const swiper = this;
5469
+ if (!swiper.controller.spline) {
5470
+ swiper.controller.spline = swiper.params.loop ?
5471
+ new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid) :
5472
+ new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
5473
+ }
5474
+ },
5475
+ setTranslate(setTranslate, byController) {
5476
+ const swiper = this;
5477
+ const controlled = swiper.controller.control;
5478
+ let multiplier;
5479
+ let controlledTranslate;
5480
+ function setControlledTranslate(c) {
5481
+ // this will create an Interpolate function based on the snapGrids
5482
+ // x is the Grid of the scrolled scroller and y will be the controlled scroller
5483
+ // it makes sense to create this only once and recall it for the interpolation
5484
+ // the function does a lot of value caching for performance
5485
+ const translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
5486
+ if (swiper.params.controller.by === 'slide') {
5487
+ swiper.controller.getInterpolateFunction(c);
5488
+ // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
5489
+ // but it did not work out
5490
+ controlledTranslate = -swiper.controller.spline.interpolate(-translate);
5491
+ }
5492
+
5493
+ if (!controlledTranslate || swiper.params.controller.by === 'container') {
5494
+ multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
5495
+ controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate();
5496
+ }
5497
+
5498
+ if (swiper.params.controller.inverse) {
5499
+ controlledTranslate = c.maxTranslate() - controlledTranslate;
5500
+ }
5501
+ c.updateProgress(controlledTranslate);
5502
+ c.setTranslate(controlledTranslate, swiper);
5503
+ c.updateActiveIndex();
5504
+ c.updateSlidesClasses();
5505
+ }
5506
+ if (Array.isArray(controlled)) {
5507
+ for (let i = 0; i < controlled.length; i += 1) {
5508
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
5509
+ setControlledTranslate(controlled[i]);
5510
+ }
5511
+ }
5512
+ } else if (controlled instanceof Swiper && byController !== controlled) {
5513
+ setControlledTranslate(controlled);
5514
+ }
5515
+ },
5516
+ setTransition(duration, byController) {
5517
+ const swiper = this;
5518
+ const controlled = swiper.controller.control;
5519
+ let i;
5520
+ function setControlledTransition(c) {
5521
+ c.setTransition(duration, swiper);
5522
+ if (duration !== 0) {
5523
+ c.transitionStart();
5524
+ c.$wrapperEl.transitionEnd(() => {
5525
+ if (!controlled) return;
5526
+ if (c.params.loop && swiper.params.controller.by === 'slide') {
5527
+ c.loopFix();
5528
+ }
5529
+ c.transitionEnd();
5530
+ });
5531
+ }
5532
+ }
5533
+ if (Array.isArray(controlled)) {
5534
+ for (i = 0; i < controlled.length; i += 1) {
5535
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
5536
+ setControlledTransition(controlled[i]);
5537
+ }
5538
+ }
5539
+ } else if (controlled instanceof Swiper && byController !== controlled) {
5540
+ setControlledTransition(controlled);
5541
+ }
5542
+ },
5543
+ };
5544
+ var controller = {
5545
+ name: 'controller',
5546
+ params: {
5547
+ controller: {
5548
+ control: undefined,
5549
+ inverse: false,
5550
+ by: 'slide', // or 'container'
5551
+ },
5552
+ },
5553
+ create() {
5554
+ const swiper = this;
5555
+ Utils.extend(swiper, {
5556
+ controller: {
5557
+ control: swiper.params.controller.control,
5558
+ getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),
5559
+ setTranslate: Controller.setTranslate.bind(swiper),
5560
+ setTransition: Controller.setTransition.bind(swiper),
5561
+ },
5562
+ });
5563
+ },
5564
+ on: {
5565
+ update() {
5566
+ const swiper = this;
5567
+ if (!swiper.controller.control) return;
5568
+ if (swiper.controller.spline) {
5569
+ swiper.controller.spline = undefined;
5570
+ delete swiper.controller.spline;
5571
+ }
5572
+ },
5573
+ resize() {
5574
+ const swiper = this;
5575
+ if (!swiper.controller.control) return;
5576
+ if (swiper.controller.spline) {
5577
+ swiper.controller.spline = undefined;
5578
+ delete swiper.controller.spline;
5579
+ }
5580
+ },
5581
+ observerUpdate() {
5582
+ const swiper = this;
5583
+ if (!swiper.controller.control) return;
5584
+ if (swiper.controller.spline) {
5585
+ swiper.controller.spline = undefined;
5586
+ delete swiper.controller.spline;
5587
+ }
5588
+ },
5589
+ setTranslate(translate, byController) {
5590
+ const swiper = this;
5591
+ if (!swiper.controller.control) return;
5592
+ swiper.controller.setTranslate(translate, byController);
5593
+ },
5594
+ setTransition(duration, byController) {
5595
+ const swiper = this;
5596
+ if (!swiper.controller.control) return;
5597
+ swiper.controller.setTransition(duration, byController);
5598
+ },
5599
+ },
5600
+ };
5601
+
5602
+ const a11y = {
5603
+ makeElFocusable($el) {
5604
+ $el.attr('tabIndex', '0');
5605
+ return $el;
5606
+ },
5607
+ addElRole($el, role) {
5608
+ $el.attr('role', role);
5609
+ return $el;
5610
+ },
5611
+ addElLabel($el, label) {
5612
+ $el.attr('aria-label', label);
5613
+ return $el;
5614
+ },
5615
+ disableEl($el) {
5616
+ $el.attr('aria-disabled', true);
5617
+ return $el;
5618
+ },
5619
+ enableEl($el) {
5620
+ $el.attr('aria-disabled', false);
5621
+ return $el;
5622
+ },
5623
+ onEnterKey(e) {
5624
+ const swiper = this;
5625
+ const params = swiper.params.a11y;
5626
+ if (e.keyCode !== 13) return;
5627
+ const $targetEl = $(e.target);
5628
+ if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
5629
+ if (!(swiper.isEnd && !swiper.params.loop)) {
5630
+ swiper.slideNext();
5631
+ }
5632
+ if (swiper.isEnd) {
5633
+ swiper.a11y.notify(params.lastSlideMessage);
5634
+ } else {
5635
+ swiper.a11y.notify(params.nextSlideMessage);
5636
+ }
5637
+ }
5638
+ if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
5639
+ if (!(swiper.isBeginning && !swiper.params.loop)) {
5640
+ swiper.slidePrev();
5641
+ }
5642
+ if (swiper.isBeginning) {
5643
+ swiper.a11y.notify(params.firstSlideMessage);
5644
+ } else {
5645
+ swiper.a11y.notify(params.prevSlideMessage);
5646
+ }
5647
+ }
5648
+ if (swiper.pagination && $targetEl.is(`.${swiper.params.pagination.bulletClass}`)) {
5649
+ $targetEl[0].click();
5650
+ }
5651
+ },
5652
+ notify(message) {
5653
+ const swiper = this;
5654
+ const notification = swiper.a11y.liveRegion;
5655
+ if (notification.length === 0) return;
5656
+ notification.html('');
5657
+ notification.html(message);
5658
+ },
5659
+ updateNavigation() {
5660
+ const swiper = this;
5661
+
5662
+ if (swiper.params.loop) return;
5663
+ const { $nextEl, $prevEl } = swiper.navigation;
5664
+
5665
+ if ($prevEl && $prevEl.length > 0) {
5666
+ if (swiper.isBeginning) {
5667
+ swiper.a11y.disableEl($prevEl);
5668
+ } else {
5669
+ swiper.a11y.enableEl($prevEl);
5670
+ }
5671
+ }
5672
+ if ($nextEl && $nextEl.length > 0) {
5673
+ if (swiper.isEnd) {
5674
+ swiper.a11y.disableEl($nextEl);
5675
+ } else {
5676
+ swiper.a11y.enableEl($nextEl);
5677
+ }
5678
+ }
5679
+ },
5680
+ updatePagination() {
5681
+ const swiper = this;
5682
+ const params = swiper.params.a11y;
5683
+ if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
5684
+ swiper.pagination.bullets.each((bulletIndex, bulletEl) => {
5685
+ const $bulletEl = $(bulletEl);
5686
+ swiper.a11y.makeElFocusable($bulletEl);
5687
+ swiper.a11y.addElRole($bulletEl, 'button');
5688
+ swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1));
5689
+ });
5690
+ }
5691
+ },
5692
+ init() {
5693
+ const swiper = this;
5694
+
5695
+ swiper.$el.append(swiper.a11y.liveRegion);
5696
+
5697
+ // Navigation
5698
+ const params = swiper.params.a11y;
5699
+ let $nextEl;
5700
+ let $prevEl;
5701
+ if (swiper.navigation && swiper.navigation.$nextEl) {
5702
+ $nextEl = swiper.navigation.$nextEl;
5703
+ }
5704
+ if (swiper.navigation && swiper.navigation.$prevEl) {
5705
+ $prevEl = swiper.navigation.$prevEl;
5706
+ }
5707
+ if ($nextEl) {
5708
+ swiper.a11y.makeElFocusable($nextEl);
5709
+ swiper.a11y.addElRole($nextEl, 'button');
5710
+ swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);
5711
+ $nextEl.on('keydown', swiper.a11y.onEnterKey);
5712
+ }
5713
+ if ($prevEl) {
5714
+ swiper.a11y.makeElFocusable($prevEl);
5715
+ swiper.a11y.addElRole($prevEl, 'button');
5716
+ swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);
5717
+ $prevEl.on('keydown', swiper.a11y.onEnterKey);
5718
+ }
5719
+
5720
+ // Pagination
5721
+ if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
5722
+ swiper.pagination.$el.on('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
5723
+ }
5724
+ },
5725
+ destroy() {
5726
+ const swiper = this;
5727
+ if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) swiper.a11y.liveRegion.remove();
5728
+
5729
+ let $nextEl;
5730
+ let $prevEl;
5731
+ if (swiper.navigation && swiper.navigation.$nextEl) {
5732
+ $nextEl = swiper.navigation.$nextEl;
5733
+ }
5734
+ if (swiper.navigation && swiper.navigation.$prevEl) {
5735
+ $prevEl = swiper.navigation.$prevEl;
5736
+ }
5737
+ if ($nextEl) {
5738
+ $nextEl.off('keydown', swiper.a11y.onEnterKey);
5739
+ }
5740
+ if ($prevEl) {
5741
+ $prevEl.off('keydown', swiper.a11y.onEnterKey);
5742
+ }
5743
+
5744
+ // Pagination
5745
+ if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
5746
+ swiper.pagination.$el.off('keydown', `.${swiper.params.pagination.bulletClass}`, swiper.a11y.onEnterKey);
5747
+ }
5748
+ },
5749
+ };
5750
+ var a11y$1 = {
5751
+ name: 'a11y',
5752
+ params: {
5753
+ a11y: {
5754
+ enabled: true,
5755
+ notificationClass: 'swiper-notification',
5756
+ prevSlideMessage: 'Previous slide',
5757
+ nextSlideMessage: 'Next slide',
5758
+ firstSlideMessage: 'This is the first slide',
5759
+ lastSlideMessage: 'This is the last slide',
5760
+ paginationBulletMessage: 'Go to slide {{index}}',
5761
+ },
5762
+ },
5763
+ create() {
5764
+ const swiper = this;
5765
+ Utils.extend(swiper, {
5766
+ a11y: {
5767
+ liveRegion: $(`<span class="${swiper.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`),
5768
+ },
5769
+ });
5770
+ Object.keys(a11y).forEach((methodName) => {
5771
+ swiper.a11y[methodName] = a11y[methodName].bind(swiper);
5772
+ });
5773
+ },
5774
+ on: {
5775
+ init() {
5776
+ const swiper = this;
5777
+ if (!swiper.params.a11y.enabled) return;
5778
+ swiper.a11y.init();
5779
+ swiper.a11y.updateNavigation();
5780
+ },
5781
+ toEdge() {
5782
+ const swiper = this;
5783
+ if (!swiper.params.a11y.enabled) return;
5784
+ swiper.a11y.updateNavigation();
5785
+ },
5786
+ fromEdge() {
5787
+ const swiper = this;
5788
+ if (!swiper.params.a11y.enabled) return;
5789
+ swiper.a11y.updateNavigation();
5790
+ },
5791
+ paginationUpdate() {
5792
+ const swiper = this;
5793
+ if (!swiper.params.a11y.enabled) return;
5794
+ swiper.a11y.updatePagination();
5795
+ },
5796
+ destroy() {
5797
+ const swiper = this;
5798
+ if (!swiper.params.a11y.enabled) return;
5799
+ swiper.a11y.destroy();
5800
+ },
5801
+ },
5802
+ };
5803
+
5804
+ const History = {
5805
+ init() {
5806
+ const swiper = this;
5807
+ if (!swiper.params.history) return;
5808
+ if (!window.history || !window.history.pushState) {
5809
+ swiper.params.history.enabled = false;
5810
+ swiper.params.hashNavigation.enabled = true;
5811
+ return;
5812
+ }
5813
+ const history = swiper.history;
5814
+ history.initialized = true;
5815
+ history.paths = History.getPathValues();
5816
+ if (!history.paths.key && !history.paths.value) return;
5817
+ history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);
5818
+ if (!swiper.params.history.replaceState) {
5819
+ window.addEventListener('popstate', swiper.history.setHistoryPopState);
5820
+ }
5821
+ },
5822
+ destroy() {
5823
+ const swiper = this;
5824
+ if (!swiper.params.history.replaceState) {
5825
+ window.removeEventListener('popstate', swiper.history.setHistoryPopState);
5826
+ }
5827
+ },
5828
+ setHistoryPopState() {
5829
+ const swiper = this;
5830
+ swiper.history.paths = History.getPathValues();
5831
+ swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
5832
+ },
5833
+ getPathValues() {
5834
+ const pathArray = window.location.pathname.slice(1).split('/').filter(part => part !== '');
5835
+ const total = pathArray.length;
5836
+ const key = pathArray[total - 2];
5837
+ const value = pathArray[total - 1];
5838
+ return { key, value };
5839
+ },
5840
+ setHistory(key, index$$1) {
5841
+ const swiper = this;
5842
+ if (!swiper.history.initialized || !swiper.params.history.enabled) return;
5843
+ const slide = swiper.slides.eq(index$$1);
5844
+ let value = History.slugify(slide.attr('data-history'));
5845
+ if (!window.location.pathname.includes(key)) {
5846
+ value = `${key}/${value}`;
5847
+ }
5848
+ const currentState = window.history.state;
5849
+ if (currentState && currentState.value === value) {
5850
+ return;
5851
+ }
5852
+ if (swiper.params.history.replaceState) {
5853
+ window.history.replaceState({ value }, null, value);
5854
+ } else {
5855
+ window.history.pushState({ value }, null, value);
5856
+ }
5857
+ },
5858
+ slugify(text$$1) {
5859
+ return text$$1.toString().toLowerCase()
5860
+ .replace(/\s+/g, '-')
5861
+ .replace(/[^\w-]+/g, '')
5862
+ .replace(/--+/g, '-')
5863
+ .replace(/^-+/, '')
5864
+ .replace(/-+$/, '');
5865
+ },
5866
+ scrollToSlide(speed, value, runCallbacks) {
5867
+ const swiper = this;
5868
+ if (value) {
5869
+ for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
5870
+ const slide = swiper.slides.eq(i);
5871
+ const slideHistory = History.slugify(slide.attr('data-history'));
5872
+ if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {
5873
+ const index$$1 = slide.index();
5874
+ swiper.slideTo(index$$1, speed, runCallbacks);
5875
+ }
5876
+ }
5877
+ } else {
5878
+ swiper.slideTo(0, speed, runCallbacks);
5879
+ }
5880
+ },
5881
+ };
5882
+
5883
+ var history = {
5884
+ name: 'history',
5885
+ params: {
5886
+ history: {
5887
+ enabled: false,
5888
+ replaceState: false,
5889
+ key: 'slides',
5890
+ },
5891
+ },
5892
+ create() {
5893
+ const swiper = this;
5894
+ Utils.extend(swiper, {
5895
+ history: {
5896
+ init: History.init.bind(swiper),
5897
+ setHistory: History.setHistory.bind(swiper),
5898
+ setHistoryPopState: History.setHistoryPopState.bind(swiper),
5899
+ scrollToSlide: History.scrollToSlide.bind(swiper),
5900
+ destroy: History.destroy.bind(swiper),
5901
+ },
5902
+ });
5903
+ },
5904
+ on: {
5905
+ init() {
5906
+ const swiper = this;
5907
+ if (swiper.params.history.enabled) {
5908
+ swiper.history.init();
5909
+ }
5910
+ },
5911
+ destroy() {
5912
+ const swiper = this;
5913
+ if (swiper.params.history.enabled) {
5914
+ swiper.history.destroy();
5915
+ }
5916
+ },
5917
+ transitionEnd() {
5918
+ const swiper = this;
5919
+ if (swiper.history.initialized) {
5920
+ swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
5921
+ }
5922
+ },
5923
+ },
5924
+ };
5925
+
5926
+ const HashNavigation = {
5927
+ onHashCange() {
5928
+ const swiper = this;
5929
+ const newHash = document.location.hash.replace('#', '');
5930
+ const activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');
5931
+ if (newHash !== activeSlideHash) {
5932
+ swiper.slideTo(swiper.$wrapperEl.children(`.${swiper.params.slideClass}[data-hash="${newHash}"]`).index());
5933
+ }
5934
+ },
5935
+ setHash() {
5936
+ const swiper = this;
5937
+ if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) return;
5938
+ if (swiper.params.hashNavigation.replaceState && window.history && window.history.replaceState) {
5939
+ window.history.replaceState(null, null, (`#${swiper.slides.eq(swiper.activeIndex).attr('data-hash')}` || ''));
5940
+ } else {
5941
+ const slide = swiper.slides.eq(swiper.activeIndex);
5942
+ const hash = slide.attr('data-hash') || slide.attr('data-history');
5943
+ document.location.hash = hash || '';
5944
+ }
5945
+ },
5946
+ init() {
5947
+ const swiper = this;
5948
+ if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) return;
5949
+ swiper.hashNavigation.initialized = true;
5950
+ const hash = document.location.hash.replace('#', '');
5951
+ if (hash) {
5952
+ const speed = 0;
5953
+ for (let i = 0, length = swiper.slides.length; i < length; i += 1) {
5954
+ const slide = swiper.slides.eq(i);
5955
+ const slideHash = slide.attr('data-hash') || slide.attr('data-history');
5956
+ if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {
5957
+ const index$$1 = slide.index();
5958
+ swiper.slideTo(index$$1, speed, swiper.params.runCallbacksOnInit, true);
5959
+ }
5960
+ }
5961
+ }
5962
+ if (swiper.params.hashNavigation.watchState) {
5963
+ $(window).on('hashchange', swiper.hashNavigation.onHashCange);
5964
+ }
5965
+ },
5966
+ destroy() {
5967
+ const swiper = this;
5968
+ if (swiper.params.hashNavigation.watchState) {
5969
+ $(window).off('hashchange', swiper.hashNavigation.onHashCange);
5970
+ }
5971
+ },
5972
+ };
5973
+ var hashNavigation = {
5974
+ name: 'hash-navigation',
5975
+ params: {
5976
+ hashNavigation: {
5977
+ enabled: false,
5978
+ replaceState: false,
5979
+ watchState: false,
5980
+ },
5981
+ },
5982
+ create() {
5983
+ const swiper = this;
5984
+ Utils.extend(swiper, {
5985
+ hashNavigation: {
5986
+ initialized: false,
5987
+ init: HashNavigation.init.bind(swiper),
5988
+ destroy: HashNavigation.destroy.bind(swiper),
5989
+ setHash: HashNavigation.setHash.bind(swiper),
5990
+ onHashCange: HashNavigation.onHashCange.bind(swiper),
5991
+ },
5992
+ });
5993
+ },
5994
+ on: {
5995
+ init() {
5996
+ const swiper = this;
5997
+ if (swiper.params.hashNavigation.enabled) {
5998
+ swiper.hashNavigation.init();
5999
+ }
6000
+ },
6001
+ destroy() {
6002
+ const swiper = this;
6003
+ if (swiper.params.hashNavigation.enabled) {
6004
+ swiper.hashNavigation.destroy();
6005
+ }
6006
+ },
6007
+ transitionEnd() {
6008
+ const swiper = this;
6009
+ if (swiper.hashNavigation.initialized) {
6010
+ swiper.hashNavigation.setHash();
6011
+ }
6012
+ },
6013
+ },
6014
+ };
6015
+
6016
+ /* eslint no-underscore-dangle: "off" */
6017
+
6018
+ const Autoplay = {
6019
+ run() {
6020
+ const swiper = this;
6021
+ const $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
6022
+ let delay = swiper.params.autoplay.delay;
6023
+ if ($activeSlideEl.attr('data-swiper-autoplay')) {
6024
+ delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
6025
+ }
6026
+ swiper.autoplay.timeout = Utils.nextTick(() => {
6027
+ if (swiper.params.autoplay.reverseDirection) {
6028
+ if (swiper.params.loop) {
6029
+ swiper.loopFix();
6030
+ swiper.slidePrev(swiper.params.speed, true, true);
6031
+ swiper.emit('autoplay');
6032
+ } else if (!swiper.isBeginning) {
6033
+ swiper.slidePrev(swiper.params.speed, true, true);
6034
+ swiper.emit('autoplay');
6035
+ } else if (!swiper.params.autoplay.stopOnLastSlide) {
6036
+ swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
6037
+ swiper.emit('autoplay');
6038
+ } else {
6039
+ swiper.autoplay.stop();
6040
+ }
6041
+ } else if (swiper.params.loop) {
6042
+ swiper.loopFix();
6043
+ swiper.slideNext(swiper.params.speed, true, true);
6044
+ swiper.emit('autoplay');
6045
+ } else if (!swiper.isEnd) {
6046
+ swiper.slideNext(swiper.params.speed, true, true);
6047
+ swiper.emit('autoplay');
6048
+ } else if (!swiper.params.autoplay.stopOnLastSlide) {
6049
+ swiper.slideTo(0, swiper.params.speed, true, true);
6050
+ swiper.emit('autoplay');
6051
+ } else {
6052
+ swiper.autoplay.stop();
6053
+ }
6054
+ }, delay);
6055
+ },
6056
+ start() {
6057
+ const swiper = this;
6058
+ if (typeof swiper.autoplay.timeout !== 'undefined') return false;
6059
+ if (swiper.autoplay.running) return false;
6060
+ swiper.autoplay.running = true;
6061
+ swiper.emit('autoplayStart');
6062
+ swiper.autoplay.run();
6063
+ return true;
6064
+ },
6065
+ stop() {
6066
+ const swiper = this;
6067
+ if (!swiper.autoplay.running) return false;
6068
+ if (typeof swiper.autoplay.timeout === 'undefined') return false;
6069
+
6070
+ if (swiper.autoplay.timeout) {
6071
+ clearTimeout(swiper.autoplay.timeout);
6072
+ swiper.autoplay.timeout = undefined;
6073
+ }
6074
+ swiper.autoplay.running = false;
6075
+ swiper.emit('autoplayStop');
6076
+ return true;
6077
+ },
6078
+ pause(speed) {
6079
+ const swiper = this;
6080
+ if (!swiper.autoplay.running) return;
6081
+ if (swiper.autoplay.paused) return;
6082
+ if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout);
6083
+ swiper.autoplay.paused = true;
6084
+ if (speed === 0 || !swiper.params.autoplay.waitForTransition) {
6085
+ swiper.autoplay.paused = false;
6086
+ swiper.autoplay.run();
6087
+ } else {
6088
+ swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);
6089
+ swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
6090
+ }
6091
+ },
6092
+ };
6093
+
6094
+ var autoplay = {
6095
+ name: 'autoplay',
6096
+ params: {
6097
+ autoplay: {
6098
+ enabled: false,
6099
+ delay: 3000,
6100
+ waitForTransition: true,
6101
+ disableOnInteraction: true,
6102
+ stopOnLastSlide: false,
6103
+ reverseDirection: false,
6104
+ },
6105
+ },
6106
+ create() {
6107
+ const swiper = this;
6108
+ Utils.extend(swiper, {
6109
+ autoplay: {
6110
+ running: false,
6111
+ paused: false,
6112
+ run: Autoplay.run.bind(swiper),
6113
+ start: Autoplay.start.bind(swiper),
6114
+ stop: Autoplay.stop.bind(swiper),
6115
+ pause: Autoplay.pause.bind(swiper),
6116
+ onTransitionEnd(e) {
6117
+ if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return;
6118
+ if (e.target !== this) return;
6119
+ swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);
6120
+ swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
6121
+ swiper.autoplay.paused = false;
6122
+ if (!swiper.autoplay.running) {
6123
+ swiper.autoplay.stop();
6124
+ } else {
6125
+ swiper.autoplay.run();
6126
+ }
6127
+ },
6128
+ },
6129
+ });
6130
+ },
6131
+ on: {
6132
+ init() {
6133
+ const swiper = this;
6134
+ if (swiper.params.autoplay.enabled) {
6135
+ swiper.autoplay.start();
6136
+ }
6137
+ },
6138
+ beforeTransitionStart(speed, internal) {
6139
+ const swiper = this;
6140
+ if (swiper.autoplay.running) {
6141
+ if (internal || !swiper.params.autoplay.disableOnInteraction) {
6142
+ swiper.autoplay.pause(speed);
6143
+ } else {
6144
+ swiper.autoplay.stop();
6145
+ }
6146
+ }
6147
+ },
6148
+ sliderFirstMove() {
6149
+ const swiper = this;
6150
+ if (swiper.autoplay.running) {
6151
+ if (swiper.params.autoplay.disableOnInteraction) {
6152
+ swiper.autoplay.stop();
6153
+ } else {
6154
+ swiper.autoplay.pause();
6155
+ }
6156
+ }
6157
+ },
6158
+ destroy() {
6159
+ const swiper = this;
6160
+ if (swiper.autoplay.running) {
6161
+ swiper.autoplay.stop();
6162
+ }
6163
+ },
6164
+ },
6165
+ };
6166
+
6167
+ const Fade = {
6168
+ setTranslate() {
6169
+ const swiper = this;
6170
+ const { slides } = swiper;
6171
+ for (let i = 0; i < slides.length; i += 1) {
6172
+ const $slideEl = swiper.slides.eq(i);
6173
+ const offset$$1 = $slideEl[0].swiperSlideOffset;
6174
+ let tx = -offset$$1;
6175
+ if (!swiper.params.virtualTranslate) tx -= swiper.translate;
6176
+ let ty = 0;
6177
+ if (!swiper.isHorizontal()) {
6178
+ ty = tx;
6179
+ tx = 0;
6180
+ }
6181
+ const slideOpacity = swiper.params.fadeEffect.crossFade ?
6182
+ Math.max(1 - Math.abs($slideEl[0].progress), 0) :
6183
+ 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);
6184
+ $slideEl
6185
+ .css({
6186
+ opacity: slideOpacity,
6187
+ })
6188
+ .transform(`translate3d(${tx}px, ${ty}px, 0px)`);
6189
+ }
6190
+ },
6191
+ setTransition(duration) {
6192
+ const swiper = this;
6193
+ const { slides, $wrapperEl } = swiper;
6194
+ slides.transition(duration);
6195
+ if (swiper.params.virtualTranslate && duration !== 0) {
6196
+ let eventTriggered = false;
6197
+ slides.transitionEnd(() => {
6198
+ if (eventTriggered) return;
6199
+ if (!swiper || swiper.destroyed) return;
6200
+ eventTriggered = true;
6201
+ swiper.animating = false;
6202
+ const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
6203
+ for (let i = 0; i < triggerEvents.length; i += 1) {
6204
+ $wrapperEl.trigger(triggerEvents[i]);
6205
+ }
6206
+ });
6207
+ }
6208
+ },
6209
+ };
6210
+
6211
+ var effectFade = {
6212
+ name: 'effect-fade',
6213
+ params: {
6214
+ fadeEffect: {
6215
+ crossFade: false,
6216
+ },
6217
+ },
6218
+ create() {
6219
+ const swiper = this;
6220
+ Utils.extend(swiper, {
6221
+ fadeEffect: {
6222
+ setTranslate: Fade.setTranslate.bind(swiper),
6223
+ setTransition: Fade.setTransition.bind(swiper),
6224
+ },
6225
+ });
6226
+ },
6227
+ on: {
6228
+ beforeInit() {
6229
+ const swiper = this;
6230
+ if (swiper.params.effect !== 'fade') return;
6231
+ swiper.classNames.push(`${swiper.params.containerModifierClass}fade`);
6232
+ const overwriteParams = {
6233
+ slidesPerView: 1,
6234
+ slidesPerColumn: 1,
6235
+ slidesPerGroup: 1,
6236
+ watchSlidesProgress: true,
6237
+ spaceBetween: 0,
6238
+ virtualTranslate: true,
6239
+ };
6240
+ Utils.extend(swiper.params, overwriteParams);
6241
+ Utils.extend(swiper.originalParams, overwriteParams);
6242
+ },
6243
+ setTranslate() {
6244
+ const swiper = this;
6245
+ if (swiper.params.effect !== 'fade') return;
6246
+ swiper.fadeEffect.setTranslate();
6247
+ },
6248
+ setTransition(duration) {
6249
+ const swiper = this;
6250
+ if (swiper.params.effect !== 'fade') return;
6251
+ swiper.fadeEffect.setTransition(duration);
6252
+ },
6253
+ },
6254
+ };
6255
+
6256
+ const Cube = {
6257
+ setTranslate() {
6258
+ const swiper = this;
6259
+ const {
6260
+ $el, $wrapperEl, slides, width: swiperWidth, height: swiperHeight, rtlTranslate: rtl, size: swiperSize,
6261
+ } = swiper;
6262
+ const params = swiper.params.cubeEffect;
6263
+ const isHorizontal = swiper.isHorizontal();
6264
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
6265
+ let wrapperRotate = 0;
6266
+ let $cubeShadowEl;
6267
+ if (params.shadow) {
6268
+ if (isHorizontal) {
6269
+ $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');
6270
+ if ($cubeShadowEl.length === 0) {
6271
+ $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
6272
+ $wrapperEl.append($cubeShadowEl);
6273
+ }
6274
+ $cubeShadowEl.css({ height: `${swiperWidth}px` });
6275
+ } else {
6276
+ $cubeShadowEl = $el.find('.swiper-cube-shadow');
6277
+ if ($cubeShadowEl.length === 0) {
6278
+ $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
6279
+ $el.append($cubeShadowEl);
6280
+ }
6281
+ }
6282
+ }
6283
+ for (let i = 0; i < slides.length; i += 1) {
6284
+ const $slideEl = slides.eq(i);
6285
+ let slideIndex = i;
6286
+ if (isVirtual) {
6287
+ slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);
6288
+ }
6289
+ let slideAngle = slideIndex * 90;
6290
+ let round = Math.floor(slideAngle / 360);
6291
+ if (rtl) {
6292
+ slideAngle = -slideAngle;
6293
+ round = Math.floor(-slideAngle / 360);
6294
+ }
6295
+ const progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
6296
+ let tx = 0;
6297
+ let ty = 0;
6298
+ let tz = 0;
6299
+ if (slideIndex % 4 === 0) {
6300
+ tx = -round * 4 * swiperSize;
6301
+ tz = 0;
6302
+ } else if ((slideIndex - 1) % 4 === 0) {
6303
+ tx = 0;
6304
+ tz = -round * 4 * swiperSize;
6305
+ } else if ((slideIndex - 2) % 4 === 0) {
6306
+ tx = swiperSize + (round * 4 * swiperSize);
6307
+ tz = swiperSize;
6308
+ } else if ((slideIndex - 3) % 4 === 0) {
6309
+ tx = -swiperSize;
6310
+ tz = (3 * swiperSize) + (swiperSize * 4 * round);
6311
+ }
6312
+ if (rtl) {
6313
+ tx = -tx;
6314
+ }
6315
+
6316
+ if (!isHorizontal) {
6317
+ ty = tx;
6318
+ tx = 0;
6319
+ }
6320
+
6321
+ const transform$$1 = `rotateX(${isHorizontal ? 0 : -slideAngle}deg) rotateY(${isHorizontal ? slideAngle : 0}deg) translate3d(${tx}px, ${ty}px, ${tz}px)`;
6322
+ if (progress <= 1 && progress > -1) {
6323
+ wrapperRotate = (slideIndex * 90) + (progress * 90);
6324
+ if (rtl) wrapperRotate = (-slideIndex * 90) - (progress * 90);
6325
+ }
6326
+ $slideEl.transform(transform$$1);
6327
+ if (params.slideShadows) {
6328
+ // Set shadows
6329
+ let shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
6330
+ let shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
6331
+ if (shadowBefore.length === 0) {
6332
+ shadowBefore = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
6333
+ $slideEl.append(shadowBefore);
6334
+ }
6335
+ if (shadowAfter.length === 0) {
6336
+ shadowAfter = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
6337
+ $slideEl.append(shadowAfter);
6338
+ }
6339
+ if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
6340
+ if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
6341
+ }
6342
+ }
6343
+ $wrapperEl.css({
6344
+ '-webkit-transform-origin': `50% 50% -${swiperSize / 2}px`,
6345
+ '-moz-transform-origin': `50% 50% -${swiperSize / 2}px`,
6346
+ '-ms-transform-origin': `50% 50% -${swiperSize / 2}px`,
6347
+ 'transform-origin': `50% 50% -${swiperSize / 2}px`,
6348
+ });
6349
+
6350
+ if (params.shadow) {
6351
+ if (isHorizontal) {
6352
+ $cubeShadowEl.transform(`translate3d(0px, ${(swiperWidth / 2) + params.shadowOffset}px, ${-swiperWidth / 2}px) rotateX(90deg) rotateZ(0deg) scale(${params.shadowScale})`);
6353
+ } else {
6354
+ const shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);
6355
+ const multiplier = 1.5 - (
6356
+ (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2) +
6357
+ (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)
6358
+ );
6359
+ const scale1 = params.shadowScale;
6360
+ const scale2 = params.shadowScale / multiplier;
6361
+ const offset$$1 = params.shadowOffset;
6362
+ $cubeShadowEl.transform(`scale3d(${scale1}, 1, ${scale2}) translate3d(0px, ${(swiperHeight / 2) + offset$$1}px, ${-swiperHeight / 2 / scale2}px) rotateX(-90deg)`);
6363
+ }
6364
+ }
6365
+ const zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0;
6366
+ $wrapperEl
6367
+ .transform(`translate3d(0px,0,${zFactor}px) rotateX(${swiper.isHorizontal() ? 0 : wrapperRotate}deg) rotateY(${swiper.isHorizontal() ? -wrapperRotate : 0}deg)`);
6368
+ },
6369
+ setTransition(duration) {
6370
+ const swiper = this;
6371
+ const { $el, slides } = swiper;
6372
+ slides
6373
+ .transition(duration)
6374
+ .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
6375
+ .transition(duration);
6376
+ if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
6377
+ $el.find('.swiper-cube-shadow').transition(duration);
6378
+ }
6379
+ },
6380
+ };
6381
+
6382
+ var effectCube = {
6383
+ name: 'effect-cube',
6384
+ params: {
6385
+ cubeEffect: {
6386
+ slideShadows: true,
6387
+ shadow: true,
6388
+ shadowOffset: 20,
6389
+ shadowScale: 0.94,
6390
+ },
6391
+ },
6392
+ create() {
6393
+ const swiper = this;
6394
+ Utils.extend(swiper, {
6395
+ cubeEffect: {
6396
+ setTranslate: Cube.setTranslate.bind(swiper),
6397
+ setTransition: Cube.setTransition.bind(swiper),
6398
+ },
6399
+ });
6400
+ },
6401
+ on: {
6402
+ beforeInit() {
6403
+ const swiper = this;
6404
+ if (swiper.params.effect !== 'cube') return;
6405
+ swiper.classNames.push(`${swiper.params.containerModifierClass}cube`);
6406
+ swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
6407
+ const overwriteParams = {
6408
+ slidesPerView: 1,
6409
+ slidesPerColumn: 1,
6410
+ slidesPerGroup: 1,
6411
+ watchSlidesProgress: true,
6412
+ resistanceRatio: 0,
6413
+ spaceBetween: 0,
6414
+ centeredSlides: false,
6415
+ virtualTranslate: true,
6416
+ };
6417
+ Utils.extend(swiper.params, overwriteParams);
6418
+ Utils.extend(swiper.originalParams, overwriteParams);
6419
+ },
6420
+ setTranslate() {
6421
+ const swiper = this;
6422
+ if (swiper.params.effect !== 'cube') return;
6423
+ swiper.cubeEffect.setTranslate();
6424
+ },
6425
+ setTransition(duration) {
6426
+ const swiper = this;
6427
+ if (swiper.params.effect !== 'cube') return;
6428
+ swiper.cubeEffect.setTransition(duration);
6429
+ },
6430
+ },
6431
+ };
6432
+
6433
+ const Flip = {
6434
+ setTranslate() {
6435
+ const swiper = this;
6436
+ const { slides, rtlTranslate: rtl } = swiper;
6437
+ for (let i = 0; i < slides.length; i += 1) {
6438
+ const $slideEl = slides.eq(i);
6439
+ let progress = $slideEl[0].progress;
6440
+ if (swiper.params.flipEffect.limitRotation) {
6441
+ progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
6442
+ }
6443
+ const offset$$1 = $slideEl[0].swiperSlideOffset;
6444
+ const rotate = -180 * progress;
6445
+ let rotateY = rotate;
6446
+ let rotateX = 0;
6447
+ let tx = -offset$$1;
6448
+ let ty = 0;
6449
+ if (!swiper.isHorizontal()) {
6450
+ ty = tx;
6451
+ tx = 0;
6452
+ rotateX = -rotateY;
6453
+ rotateY = 0;
6454
+ } else if (rtl) {
6455
+ rotateY = -rotateY;
6456
+ }
6457
+
6458
+ $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
6459
+
6460
+ if (swiper.params.flipEffect.slideShadows) {
6461
+ // Set shadows
6462
+ let shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
6463
+ let shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
6464
+ if (shadowBefore.length === 0) {
6465
+ shadowBefore = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'left' : 'top'}"></div>`);
6466
+ $slideEl.append(shadowBefore);
6467
+ }
6468
+ if (shadowAfter.length === 0) {
6469
+ shadowAfter = $(`<div class="swiper-slide-shadow-${swiper.isHorizontal() ? 'right' : 'bottom'}"></div>`);
6470
+ $slideEl.append(shadowAfter);
6471
+ }
6472
+ if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0);
6473
+ if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0);
6474
+ }
6475
+ $slideEl
6476
+ .transform(`translate3d(${tx}px, ${ty}px, 0px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`);
6477
+ }
6478
+ },
6479
+ setTransition(duration) {
6480
+ const swiper = this;
6481
+ const { slides, activeIndex, $wrapperEl } = swiper;
6482
+ slides
6483
+ .transition(duration)
6484
+ .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
6485
+ .transition(duration);
6486
+ if (swiper.params.virtualTranslate && duration !== 0) {
6487
+ let eventTriggered = false;
6488
+ // eslint-disable-next-line
6489
+ slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {
6490
+ if (eventTriggered) return;
6491
+ if (!swiper || swiper.destroyed) return;
6492
+ // if (!$(this).hasClass(swiper.params.slideActiveClass)) return;
6493
+ eventTriggered = true;
6494
+ swiper.animating = false;
6495
+ const triggerEvents = ['webkitTransitionEnd', 'transitionend'];
6496
+ for (let i = 0; i < triggerEvents.length; i += 1) {
6497
+ $wrapperEl.trigger(triggerEvents[i]);
6498
+ }
6499
+ });
6500
+ }
6501
+ },
6502
+ };
6503
+
6504
+ var effectFlip = {
6505
+ name: 'effect-flip',
6506
+ params: {
6507
+ flipEffect: {
6508
+ slideShadows: true,
6509
+ limitRotation: true,
6510
+ },
6511
+ },
6512
+ create() {
6513
+ const swiper = this;
6514
+ Utils.extend(swiper, {
6515
+ flipEffect: {
6516
+ setTranslate: Flip.setTranslate.bind(swiper),
6517
+ setTransition: Flip.setTransition.bind(swiper),
6518
+ },
6519
+ });
6520
+ },
6521
+ on: {
6522
+ beforeInit() {
6523
+ const swiper = this;
6524
+ if (swiper.params.effect !== 'flip') return;
6525
+ swiper.classNames.push(`${swiper.params.containerModifierClass}flip`);
6526
+ swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
6527
+ const overwriteParams = {
6528
+ slidesPerView: 1,
6529
+ slidesPerColumn: 1,
6530
+ slidesPerGroup: 1,
6531
+ watchSlidesProgress: true,
6532
+ spaceBetween: 0,
6533
+ virtualTranslate: true,
6534
+ };
6535
+ Utils.extend(swiper.params, overwriteParams);
6536
+ Utils.extend(swiper.originalParams, overwriteParams);
6537
+ },
6538
+ setTranslate() {
6539
+ const swiper = this;
6540
+ if (swiper.params.effect !== 'flip') return;
6541
+ swiper.flipEffect.setTranslate();
6542
+ },
6543
+ setTransition(duration) {
6544
+ const swiper = this;
6545
+ if (swiper.params.effect !== 'flip') return;
6546
+ swiper.flipEffect.setTransition(duration);
6547
+ },
6548
+ },
6549
+ };
6550
+
6551
+ const Coverflow = {
6552
+ setTranslate() {
6553
+ const swiper = this;
6554
+ const {
6555
+ width: swiperWidth, height: swiperHeight, slides, $wrapperEl, slidesSizesGrid,
6556
+ } = swiper;
6557
+ const params = swiper.params.coverflowEffect;
6558
+ const isHorizontal = swiper.isHorizontal();
6559
+ const transform$$1 = swiper.translate;
6560
+ const center = isHorizontal ? -transform$$1 + (swiperWidth / 2) : -transform$$1 + (swiperHeight / 2);
6561
+ const rotate = isHorizontal ? params.rotate : -params.rotate;
6562
+ const translate = params.depth;
6563
+ // Each slide offset from center
6564
+ for (let i = 0, length = slides.length; i < length; i += 1) {
6565
+ const $slideEl = slides.eq(i);
6566
+ const slideSize = slidesSizesGrid[i];
6567
+ const slideOffset = $slideEl[0].swiperSlideOffset;
6568
+ const offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;
6569
+
6570
+ let rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
6571
+ let rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
6572
+ // var rotateZ = 0
6573
+ let translateZ = -translate * Math.abs(offsetMultiplier);
6574
+
6575
+ let translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier);
6576
+ let translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0;
6577
+
6578
+ // Fix for ultra small values
6579
+ if (Math.abs(translateX) < 0.001) translateX = 0;
6580
+ if (Math.abs(translateY) < 0.001) translateY = 0;
6581
+ if (Math.abs(translateZ) < 0.001) translateZ = 0;
6582
+ if (Math.abs(rotateY) < 0.001) rotateY = 0;
6583
+ if (Math.abs(rotateX) < 0.001) rotateX = 0;
6584
+
6585
+ const slideTransform = `translate3d(${translateX}px,${translateY}px,${translateZ}px) rotateX(${rotateX}deg) rotateY(${rotateY}deg)`;
6586
+
6587
+ $slideEl.transform(slideTransform);
6588
+ $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
6589
+ if (params.slideShadows) {
6590
+ // Set shadows
6591
+ let $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
6592
+ let $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
6593
+ if ($shadowBeforeEl.length === 0) {
6594
+ $shadowBeforeEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'left' : 'top'}"></div>`);
6595
+ $slideEl.append($shadowBeforeEl);
6596
+ }
6597
+ if ($shadowAfterEl.length === 0) {
6598
+ $shadowAfterEl = $(`<div class="swiper-slide-shadow-${isHorizontal ? 'right' : 'bottom'}"></div>`);
6599
+ $slideEl.append($shadowAfterEl);
6600
+ }
6601
+ if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0;
6602
+ if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0;
6603
+ }
6604
+ }
6605
+
6606
+ // Set correct perspective for IE10
6607
+ if (Support.pointerEvents || Support.prefixedPointerEvents) {
6608
+ const ws = $wrapperEl[0].style;
6609
+ ws.perspectiveOrigin = `${center}px 50%`;
6610
+ }
6611
+ },
6612
+ setTransition(duration) {
6613
+ const swiper = this;
6614
+ swiper.slides
6615
+ .transition(duration)
6616
+ .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
6617
+ .transition(duration);
6618
+ },
6619
+ };
6620
+
6621
+ var effectCoverflow = {
6622
+ name: 'effect-coverflow',
6623
+ params: {
6624
+ coverflowEffect: {
6625
+ rotate: 50,
6626
+ stretch: 0,
6627
+ depth: 100,
6628
+ modifier: 1,
6629
+ slideShadows: true,
6630
+ },
6631
+ },
6632
+ create() {
6633
+ const swiper = this;
6634
+ Utils.extend(swiper, {
6635
+ coverflowEffect: {
6636
+ setTranslate: Coverflow.setTranslate.bind(swiper),
6637
+ setTransition: Coverflow.setTransition.bind(swiper),
6638
+ },
6639
+ });
6640
+ },
6641
+ on: {
6642
+ beforeInit() {
6643
+ const swiper = this;
6644
+ if (swiper.params.effect !== 'coverflow') return;
6645
+
6646
+ swiper.classNames.push(`${swiper.params.containerModifierClass}coverflow`);
6647
+ swiper.classNames.push(`${swiper.params.containerModifierClass}3d`);
6648
+
6649
+ swiper.params.watchSlidesProgress = true;
6650
+ swiper.originalParams.watchSlidesProgress = true;
6651
+ },
6652
+ setTranslate() {
6653
+ const swiper = this;
6654
+ if (swiper.params.effect !== 'coverflow') return;
6655
+ swiper.coverflowEffect.setTranslate();
6656
+ },
6657
+ setTransition(duration) {
6658
+ const swiper = this;
6659
+ if (swiper.params.effect !== 'coverflow') return;
6660
+ swiper.coverflowEffect.setTransition(duration);
6661
+ },
6662
+ },
6663
+ };
6664
+
6665
+ // Swiper Class
6666
+
6667
+ const components = [
6668
+ Device$1,
6669
+ Support$1,
6670
+ Browser$1,
6671
+ Resize,
6672
+ Observer$1,
6673
+
6674
+ ];
6675
+
6676
+ if (typeof Swiper.use === 'undefined') {
6677
+ Swiper.use = Swiper.Class.use;
6678
+ Swiper.installModule = Swiper.Class.installModule;
6679
+ }
6680
+
6681
+ Swiper.use(components);
6682
+
6683
+ export { Swiper, virtual as Virtual, keyboard as Keyboard, mousewheel as Mousewheel, navigation as Navigation, pagination as Pagination, scrollbar as Scrollbar, parallax as Parallax, zoom as Zoom, lazy as Lazy, controller as Controller, a11y$1 as A11y, history as History, hashNavigation as HashNavigation, autoplay as Autoplay, effectFade as EffectFade, effectCube as EffectCube, effectFlip as EffectFlip, effectCoverflow as EffectCoverflow };
assets/vendor/swiper/js/swiper.js ADDED
@@ -0,0 +1,7719 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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iper 4.3.3
3
+ * Most modern mobile touch slider and framework with hardware accelerated transitions
4
+ * http://www.idangero.us/swiper/
5
+ *
6
+ * Copyright 2014-2018 Vladimir Kharlampidi
7
+ *
8
+ * Released under the MIT License
9
+ *
10
+ * Released on: June 5, 2018
11
+ */
12
+
13
+ (function (global, factory) {
14
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
15
+ typeof define === 'function' && define.amd ? define(factory) :
16
+ (global.Swiper = factory());
17
+ }(this, (function () { 'use strict';
18
+
19
+ /**
20
+ * SSR Window 1.0.0
21
+ * Better handling for window object in SSR environment
22
+ * https://github.com/nolimits4web/ssr-window
23
+ *
24
+ * Copyright 2018, Vladimir Kharlampidi
25
+ *
26
+ * Licensed under MIT
27
+ *
28
+ * Released on: February 10, 2018
29
+ */
30
+ var d;
31
+ if (typeof document === 'undefined') {
32
+ d = {
33
+ body: {},
34
+ addEventListener: function addEventListener() {},
35
+ removeEventListener: function removeEventListener() {},
36
+ activeElement: {
37
+ blur: function blur() {},
38
+ nodeName: '',
39
+ },
40
+ querySelector: function querySelector() {
41
+ return null;
42
+ },
43
+ querySelectorAll: function querySelectorAll() {
44
+ return [];
45
+ },
46
+ getElementById: function getElementById() {
47
+ return null;
48
+ },
49
+ createEvent: function createEvent() {
50
+ return {
51
+ initEvent: function initEvent() {},
52
+ };
53
+ },
54
+ createElement: function createElement() {
55
+ return {
56
+ children: [],
57
+ childNodes: [],
58
+ style: {},
59
+ setAttribute: function setAttribute() {},
60
+ getElementsByTagName: function getElementsByTagName() {
61
+ return [];
62
+ },
63
+ };
64
+ },
65
+ location: { hash: '' },
66
+ };
67
+ } else {
68
+ // eslint-disable-next-line
69
+ d = document;
70
+ }
71
+
72
+ var doc = d;
73
+
74
+ var w;
75
+ if (typeof window === 'undefined') {
76
+ w = {
77
+ document: doc,
78
+ navigator: {
79
+ userAgent: '',
80
+ },
81
+ location: {},
82
+ history: {},
83
+ CustomEvent: function CustomEvent() {
84
+ return this;
85
+ },
86
+ addEventListener: function addEventListener() {},
87
+ removeEventListener: function removeEventListener() {},
88
+ getComputedStyle: function getComputedStyle() {
89
+ return {
90
+ getPropertyValue: function getPropertyValue() {
91
+ return '';
92
+ },
93
+ };
94
+ },
95
+ Image: function Image() {},
96
+ Date: function Date() {},
97
+ screen: {},
98
+ setTimeout: function setTimeout() {},
99
+ clearTimeout: function clearTimeout() {},
100
+ };
101
+ } else {
102
+ // eslint-disable-next-line
103
+ w = window;
104
+ }
105
+
106
+ var win = w;
107
+
108
+ /**
109
+ * Dom7 2.0.6
110
+ * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API
111
+ * http://framework7.io/docs/dom.html
112
+ *
113
+ * Copyright 2018, Vladimir Kharlampidi
114
+ * The iDangero.us
115
+ * http://www.idangero.us/
116
+ *
117
+ * Licensed under MIT
118
+ *
119
+ * Released on: May 27, 2018
120
+ */
121
+
122
+ var Dom7 = function Dom7(arr) {
123
+ var self = this;
124
+ // Create array-like object
125
+ for (var i = 0; i < arr.length; i += 1) {
126
+ self[i] = arr[i];
127
+ }
128
+ self.length = arr.length;
129
+ // Return collection with methods
130
+ return this;
131
+ };
132
+
133
+ function $(selector, context) {
134
+ var arr = [];
135
+ var i = 0;
136
+ if (selector && !context) {
137
+ if (selector instanceof Dom7) {
138
+ return selector;
139
+ }
140
+ }
141
+ if (selector) {
142
+ // String
143
+ if (typeof selector === 'string') {
144
+ var els;
145
+ var tempParent;
146
+ var html = selector.trim();
147
+ if (html.indexOf('<') >= 0 && html.indexOf('>') >= 0) {
148
+ var toCreate = 'div';
149
+ if (html.indexOf('<li') === 0) { toCreate = 'ul'; }
150
+ if (html.indexOf('<tr') === 0) { toCreate = 'tbody'; }
151
+ if (html.indexOf('<td') === 0 || html.indexOf('<th') === 0) { toCreate = 'tr'; }
152
+ if (html.indexOf('<tbody') === 0) { toCreate = 'table'; }
153
+ if (html.indexOf('<option') === 0) { toCreate = 'select'; }
154
+ tempParent = doc.createElement(toCreate);
155
+ tempParent.innerHTML = html;
156
+ for (i = 0; i < tempParent.childNodes.length; i += 1) {
157
+ arr.push(tempParent.childNodes[i]);
158
+ }
159
+ } else {
160
+ if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) {
161
+ // Pure ID selector
162
+ els = [doc.getElementById(selector.trim().split('#')[1])];
163
+ } else {
164
+ // Other selectors
165
+ els = (context || doc).querySelectorAll(selector.trim());
166
+ }
167
+ for (i = 0; i < els.length; i += 1) {
168
+ if (els[i]) { arr.push(els[i]); }
169
+ }
170
+ }
171
+ } else if (selector.nodeType || selector === win || selector === doc) {
172
+ // Node/element
173
+ arr.push(selector);
174
+ } else if (selector.length > 0 && selector[0].nodeType) {
175
+ // Array of elements or instance of Dom
176
+ for (i = 0; i < selector.length; i += 1) {
177
+ arr.push(selector[i]);
178
+ }
179
+ }
180
+ }
181
+ return new Dom7(arr);
182
+ }
183
+
184
+ $.fn = Dom7.prototype;
185
+ $.Class = Dom7;
186
+ $.Dom7 = Dom7;
187
+
188
+ function unique(arr) {
189
+ var uniqueArray = [];
190
+ for (var i = 0; i < arr.length; i += 1) {
191
+ if (uniqueArray.indexOf(arr[i]) === -1) { uniqueArray.push(arr[i]); }
192
+ }
193
+ return uniqueArray;
194
+ }
195
+
196
+ // Classes and attributes
197
+ function addClass(className) {
198
+ var this$1 = this;
199
+
200
+ if (typeof className === 'undefined') {
201
+ return this;
202
+ }
203
+ var classes = className.split(' ');
204
+ for (var i = 0; i < classes.length; i += 1) {
205
+ for (var j = 0; j < this.length; j += 1) {
206
+ if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.add(classes[i]); }
207
+ }
208
+ }
209
+ return this;
210
+ }
211
+ function removeClass(className) {
212
+ var this$1 = this;
213
+
214
+ var classes = className.split(' ');
215
+ for (var i = 0; i < classes.length; i += 1) {
216
+ for (var j = 0; j < this.length; j += 1) {
217
+ if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.remove(classes[i]); }
218
+ }
219
+ }
220
+ return this;
221
+ }
222
+ function hasClass(className) {
223
+ if (!this[0]) { return false; }
224
+ return this[0].classList.contains(className);
225
+ }
226
+ function toggleClass(className) {
227
+ var this$1 = this;
228
+
229
+ var classes = className.split(' ');
230
+ for (var i = 0; i < classes.length; i += 1) {
231
+ for (var j = 0; j < this.length; j += 1) {
232
+ if (typeof this$1[j].classList !== 'undefined') { this$1[j].classList.toggle(classes[i]); }
233
+ }
234
+ }
235
+ return this;
236
+ }
237
+ function attr(attrs, value) {
238
+ var arguments$1 = arguments;
239
+ var this$1 = this;
240
+
241
+ if (arguments.length === 1 && typeof attrs === 'string') {
242
+ // Get attr
243
+ if (this[0]) { return this[0].getAttribute(attrs); }
244
+ return undefined;
245
+ }
246
+
247
+ // Set attrs
248
+ for (var i = 0; i < this.length; i += 1) {
249
+ if (arguments$1.length === 2) {
250
+ // String
251
+ this$1[i].setAttribute(attrs, value);
252
+ } else {
253
+ // Object
254
+ // eslint-disable-next-line
255
+ for (var attrName in attrs) {
256
+ this$1[i][attrName] = attrs[attrName];
257
+ this$1[i].setAttribute(attrName, attrs[attrName]);
258
+ }
259
+ }
260
+ }
261
+ return this;
262
+ }
263
+ // eslint-disable-next-line
264
+ function removeAttr(attr) {
265
+ var this$1 = this;
266
+
267
+ for (var i = 0; i < this.length; i += 1) {
268
+ this$1[i].removeAttribute(attr);
269
+ }
270
+ return this;
271
+ }
272
+ function data(key, value) {
273
+ var this$1 = this;
274
+
275
+ var el;
276
+ if (typeof value === 'undefined') {
277
+ el = this[0];
278
+ // Get value
279
+ if (el) {
280
+ if (el.dom7ElementDataStorage && (key in el.dom7ElementDataStorage)) {
281
+ return el.dom7ElementDataStorage[key];
282
+ }
283
+
284
+ var dataKey = el.getAttribute(("data-" + key));
285
+ if (dataKey) {
286
+ return dataKey;
287
+ }
288
+ return undefined;
289
+ }
290
+ return undefined;
291
+ }
292
+
293
+ // Set value
294
+ for (var i = 0; i < this.length; i += 1) {
295
+ el = this$1[i];
296
+ if (!el.dom7ElementDataStorage) { el.dom7ElementDataStorage = {}; }
297
+ el.dom7ElementDataStorage[key] = value;
298
+ }
299
+ return this;
300
+ }
301
+ // Transforms
302
+ // eslint-disable-next-line
303
+ function transform(transform) {
304
+ var this$1 = this;
305
+
306
+ for (var i = 0; i < this.length; i += 1) {
307
+ var elStyle = this$1[i].style;
308
+ elStyle.webkitTransform = transform;
309
+ elStyle.transform = transform;
310
+ }
311
+ return this;
312
+ }
313
+ function transition(duration) {
314
+ var this$1 = this;
315
+
316
+ if (typeof duration !== 'string') {
317
+ duration = duration + "ms"; // eslint-disable-line
318
+ }
319
+ for (var i = 0; i < this.length; i += 1) {
320
+ var elStyle = this$1[i].style;
321
+ elStyle.webkitTransitionDuration = duration;
322
+ elStyle.transitionDuration = duration;
323
+ }
324
+ return this;
325
+ }
326
+ // Events
327
+ function on() {
328
+ var this$1 = this;
329
+ var assign;
330
+
331
+ var args = [], len = arguments.length;
332
+ while ( len-- ) args[ len ] = arguments[ len ];
333
+ var eventType = args[0];
334
+ var targetSelector = args[1];
335
+ var listener = args[2];
336
+ var capture = args[3];
337
+ if (typeof args[1] === 'function') {
338
+ (assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
339
+ targetSelector = undefined;
340
+ }
341
+ if (!capture) { capture = false; }
342
+
343
+ function handleLiveEvent(e) {
344
+ var target = e.target;
345
+ if (!target) { return; }
346
+ var eventData = e.target.dom7EventData || [];
347
+ if (eventData.indexOf(e) < 0) {
348
+ eventData.unshift(e);
349
+ }
350
+ if ($(target).is(targetSelector)) { listener.apply(target, eventData); }
351
+ else {
352
+ var parents = $(target).parents(); // eslint-disable-line
353
+ for (var k = 0; k < parents.length; k += 1) {
354
+ if ($(parents[k]).is(targetSelector)) { listener.apply(parents[k], eventData); }
355
+ }
356
+ }
357
+ }
358
+ function handleEvent(e) {
359
+ var eventData = e && e.target ? e.target.dom7EventData || [] : [];
360
+ if (eventData.indexOf(e) < 0) {
361
+ eventData.unshift(e);
362
+ }
363
+ listener.apply(this, eventData);
364
+ }
365
+ var events = eventType.split(' ');
366
+ var j;
367
+ for (var i = 0; i < this.length; i += 1) {
368
+ var el = this$1[i];
369
+ if (!targetSelector) {
370
+ for (j = 0; j < events.length; j += 1) {
371
+ var event = events[j];
372
+ if (!el.dom7Listeners) { el.dom7Listeners = {}; }
373
+ if (!el.dom7Listeners[event]) { el.dom7Listeners[event] = []; }
374
+ el.dom7Listeners[event].push({
375
+ listener: listener,
376
+ proxyListener: handleEvent,
377
+ });
378
+ el.addEventListener(event, handleEvent, capture);
379
+ }
380
+ } else {
381
+ // Live events
382
+ for (j = 0; j < events.length; j += 1) {
383
+ var event$1 = events[j];
384
+ if (!el.dom7LiveListeners) { el.dom7LiveListeners = {}; }
385
+ if (!el.dom7LiveListeners[event$1]) { el.dom7LiveListeners[event$1] = []; }
386
+ el.dom7LiveListeners[event$1].push({
387
+ listener: listener,
388
+ proxyListener: handleLiveEvent,
389
+ });
390
+ el.addEventListener(event$1, handleLiveEvent, capture);
391
+ }
392
+ }
393
+ }
394
+ return this;
395
+ }
396
+ function off() {
397
+ var this$1 = this;
398
+ var assign;
399
+
400
+ var args = [], len = arguments.length;
401
+ while ( len-- ) args[ len ] = arguments[ len ];
402
+ var eventType = args[0];
403
+ var targetSelector = args[1];
404
+ var listener = args[2];
405
+ var capture = args[3];
406
+ if (typeof args[1] === 'function') {
407
+ (assign = args, eventType = assign[0], listener = assign[1], capture = assign[2]);
408
+ targetSelector = undefined;
409
+ }
410
+ if (!capture) { capture = false; }
411
+
412
+ var events = eventType.split(' ');
413
+ for (var i = 0; i < events.length; i += 1) {
414
+ var event = events[i];
415
+ for (var j = 0; j < this.length; j += 1) {
416
+ var el = this$1[j];
417
+ var handlers = (void 0);
418
+ if (!targetSelector && el.dom7Listeners) {
419
+ handlers = el.dom7Listeners[event];
420
+ } else if (targetSelector && el.dom7LiveListeners) {
421
+ handlers = el.dom7LiveListeners[event];
422
+ }
423
+ if (handlers && handlers.length) {
424
+ for (var k = handlers.length - 1; k >= 0; k -= 1) {
425
+ var handler = handlers[k];
426
+ if (listener && handler.listener === listener) {
427
+ el.removeEventListener(event, handler.proxyListener, capture);
428
+ handlers.splice(k, 1);
429
+ } else if (!listener) {
430
+ el.removeEventListener(event, handler.proxyListener, capture);
431
+ handlers.splice(k, 1);
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
437
+ return this;
438
+ }
439
+ function trigger() {
440
+ var this$1 = this;
441
+ var args = [], len = arguments.length;
442
+ while ( len-- ) args[ len ] = arguments[ len ];
443
+
444
+ var events = args[0].split(' ');
445
+ var eventData = args[1];
446
+ for (var i = 0; i < events.length; i += 1) {
447
+ var event = events[i];
448
+ for (var j = 0; j < this.length; j += 1) {
449
+ var el = this$1[j];
450
+ var evt = (void 0);
451
+ try {
452
+ evt = new win.CustomEvent(event, {
453
+ detail: eventData,
454
+ bubbles: true,
455
+ cancelable: true,
456
+ });
457
+ } catch (e) {
458
+ evt = doc.createEvent('Event');
459
+ evt.initEvent(event, true, true);
460
+ evt.detail = eventData;
461
+ }
462
+ // eslint-disable-next-line
463
+ el.dom7EventData = args.filter(function (data, dataIndex) { return dataIndex > 0; });
464
+ el.dispatchEvent(evt);
465
+ el.dom7EventData = [];
466
+ delete el.dom7EventData;
467
+ }
468
+ }
469
+ return this;
470
+ }
471
+ function transitionEnd(callback) {
472
+ var events = ['webkitTransitionEnd', 'transitionend'];
473
+ var dom = this;
474
+ var i;
475
+ function fireCallBack(e) {
476
+ /* jshint validthis:true */
477
+ if (e.target !== this) { return; }
478
+ callback.call(this, e);
479
+ for (i = 0; i < events.length; i += 1) {
480
+ dom.off(events[i], fireCallBack);
481
+ }
482
+ }
483
+ if (callback) {
484
+ for (i = 0; i < events.length; i += 1) {
485
+ dom.on(events[i], fireCallBack);
486
+ }
487
+ }
488
+ return this;
489
+ }
490
+ function outerWidth(includeMargins) {
491
+ if (this.length > 0) {
492
+ if (includeMargins) {
493
+ // eslint-disable-next-line
494
+ var styles = this.styles();
495
+ return this[0].offsetWidth + parseFloat(styles.getPropertyValue('margin-right')) + parseFloat(styles.getPropertyValue('margin-left'));
496
+ }
497
+ return this[0].offsetWidth;
498
+ }
499
+ return null;
500
+ }
501
+ function outerHeight(includeMargins) {
502
+ if (this.length > 0) {
503
+ if (includeMargins) {
504
+ // eslint-disable-next-line
505
+ var styles = this.styles();
506
+ return this[0].offsetHeight + parseFloat(styles.getPropertyValue('margin-top')) + parseFloat(styles.getPropertyValue('margin-bottom'));
507
+ }
508
+ return this[0].offsetHeight;
509
+ }
510
+ return null;
511
+ }
512
+ function offset() {
513
+ if (this.length > 0) {
514
+ var el = this[0];
515
+ var box = el.getBoundingClientRect();
516
+ var body = doc.body;
517
+ var clientTop = el.clientTop || body.clientTop || 0;
518
+ var clientLeft = el.clientLeft || body.clientLeft || 0;
519
+ var scrollTop = el === win ? win.scrollY : el.scrollTop;
520
+ var scrollLeft = el === win ? win.scrollX : el.scrollLeft;
521
+ return {
522
+ top: (box.top + scrollTop) - clientTop,
523
+ left: (box.left + scrollLeft) - clientLeft,
524
+ };
525
+ }
526
+
527
+ return null;
528
+ }
529
+ function styles() {
530
+ if (this[0]) { return win.getComputedStyle(this[0], null); }
531
+ return {};
532
+ }
533
+ function css(props, value) {
534
+ var this$1 = this;
535
+
536
+ var i;
537
+ if (arguments.length === 1) {
538
+ if (typeof props === 'string') {
539
+ if (this[0]) { return win.getComputedStyle(this[0], null).getPropertyValue(props); }
540
+ } else {
541
+ for (i = 0; i < this.length; i += 1) {
542
+ // eslint-disable-next-line
543
+ for (var prop in props) {
544
+ this$1[i].style[prop] = props[prop];
545
+ }
546
+ }
547
+ return this;
548
+ }
549
+ }
550
+ if (arguments.length === 2 && typeof props === 'string') {
551
+ for (i = 0; i < this.length; i += 1) {
552
+ this$1[i].style[props] = value;
553
+ }
554
+ return this;
555
+ }
556
+ return this;
557
+ }
558
+ // Iterate over the collection passing elements to `callback`
559
+ function each(callback) {
560
+ var this$1 = this;
561
+
562
+ // Don't bother continuing without a callback
563
+ if (!callback) { return this; }
564
+ // Iterate over the current collection
565
+ for (var i = 0; i < this.length; i += 1) {
566
+ // If the callback returns false
567
+ if (callback.call(this$1[i], i, this$1[i]) === false) {
568
+ // End the loop early
569
+ return this$1;
570
+ }
571
+ }
572
+ // Return `this` to allow chained DOM operations
573
+ return this;
574
+ }
575
+ // eslint-disable-next-line
576
+ function html(html) {
577
+ var this$1 = this;
578
+
579
+ if (typeof html === 'undefined') {
580
+ return this[0] ? this[0].innerHTML : undefined;
581
+ }
582
+
583
+ for (var i = 0; i < this.length; i += 1) {
584
+ this$1[i].innerHTML = html;
585
+ }
586
+ return this;
587
+ }
588
+ // eslint-disable-next-line
589
+ function text(text) {
590
+ var this$1 = this;
591
+
592
+ if (typeof text === 'undefined') {
593
+ if (this[0]) {
594
+ return this[0].textContent.trim();
595
+ }
596
+ return null;
597
+ }
598
+
599
+ for (var i = 0; i < this.length; i += 1) {
600
+ this$1[i].textContent = text;
601
+ }
602
+ return this;
603
+ }
604
+ function is(selector) {
605
+ var el = this[0];
606
+ var compareWith;
607
+ var i;
608
+ if (!el || typeof selector === 'undefined') { return false; }
609
+ if (typeof selector === 'string') {
610
+ if (el.matches) { return el.matches(selector); }
611
+ else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); }
612
+ else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); }
613
+
614
+ compareWith = $(selector);
615
+ for (i = 0; i < compareWith.length; i += 1) {
616
+ if (compareWith[i] === el) { return true; }
617
+ }
618
+ return false;
619
+ } else if (selector === doc) { return el === doc; }
620
+ else if (selector === win) { return el === win; }
621
+
622
+ if (selector.nodeType || selector instanceof Dom7) {
623
+ compareWith = selector.nodeType ? [selector] : selector;
624
+ for (i = 0; i < compareWith.length; i += 1) {
625
+ if (compareWith[i] === el) { return true; }
626
+ }
627
+ return false;
628
+ }
629
+ return false;
630
+ }
631
+ function index() {
632
+ var child = this[0];
633
+ var i;
634
+ if (child) {
635
+ i = 0;
636
+ // eslint-disable-next-line
637
+ while ((child = child.previousSibling) !== null) {
638
+ if (child.nodeType === 1) { i += 1; }
639
+ }
640
+ return i;
641
+ }
642
+ return undefined;
643
+ }
644
+ // eslint-disable-next-line
645
+ function eq(index) {
646
+ if (typeof index === 'undefined') { return this; }
647
+ var length = this.length;
648
+ var returnIndex;
649
+ if (index > length - 1) {
650
+ return new Dom7([]);
651
+ }
652
+ if (index < 0) {
653
+ returnIndex = length + index;
654
+ if (returnIndex < 0) { return new Dom7([]); }
655
+ return new Dom7([this[returnIndex]]);
656
+ }
657
+ return new Dom7([this[index]]);
658
+ }
659
+ function append() {
660
+ var this$1 = this;
661
+ var args = [], len = arguments.length;
662
+ while ( len-- ) args[ len ] = arguments[ len ];
663
+
664
+ var newChild;
665
+
666
+ for (var k = 0; k < args.length; k += 1) {
667
+ newChild = args[k];
668
+ for (var i = 0; i < this.length; i += 1) {
669
+ if (typeof newChild === 'string') {
670
+ var tempDiv = doc.createElement('div');
671
+ tempDiv.innerHTML = newChild;
672
+ while (tempDiv.firstChild) {
673
+ this$1[i].appendChild(tempDiv.firstChild);
674
+ }
675
+ } else if (newChild instanceof Dom7) {
676
+ for (var j = 0; j < newChild.length; j += 1) {
677
+ this$1[i].appendChild(newChild[j]);
678
+ }
679
+ } else {
680
+ this$1[i].appendChild(newChild);
681
+ }
682
+ }
683
+ }
684
+
685
+ return this;
686
+ }
687
+ function prepend(newChild) {
688
+ var this$1 = this;
689
+
690
+ var i;
691
+ var j;
692
+ for (i = 0; i < this.length; i += 1) {
693
+ if (typeof newChild === 'string') {
694
+ var tempDiv = doc.createElement('div');
695
+ tempDiv.innerHTML = newChild;
696
+ for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) {
697
+ this$1[i].insertBefore(tempDiv.childNodes[j], this$1[i].childNodes[0]);
698
+ }
699
+ } else if (newChild instanceof Dom7) {
700
+ for (j = 0; j < newChild.length; j += 1) {
701
+ this$1[i].insertBefore(newChild[j], this$1[i].childNodes[0]);
702
+ }
703
+ } else {
704
+ this$1[i].insertBefore(newChild, this$1[i].childNodes[0]);
705
+ }
706
+ }
707
+ return this;
708
+ }
709
+ function next(selector) {
710
+ if (this.length > 0) {
711
+ if (selector) {
712
+ if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) {
713
+ return new Dom7([this[0].nextElementSibling]);
714
+ }
715
+ return new Dom7([]);
716
+ }
717
+
718
+ if (this[0].nextElementSibling) { return new Dom7([this[0].nextElementSibling]); }
719
+ return new Dom7([]);
720
+ }
721
+ return new Dom7([]);
722
+ }
723
+ function nextAll(selector) {
724
+ var nextEls = [];
725
+ var el = this[0];
726
+ if (!el) { return new Dom7([]); }
727
+ while (el.nextElementSibling) {
728
+ var next = el.nextElementSibling; // eslint-disable-line
729
+ if (selector) {
730
+ if ($(next).is(selector)) { nextEls.push(next); }
731
+ } else { nextEls.push(next); }
732
+ el = next;
733
+ }
734
+ return new Dom7(nextEls);
735
+ }
736
+ function prev(selector) {
737
+ if (this.length > 0) {
738
+ var el = this[0];
739
+ if (selector) {
740
+ if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) {
741
+ return new Dom7([el.previousElementSibling]);
742
+ }
743
+ return new Dom7([]);
744
+ }
745
+
746
+ if (el.previousElementSibling) { return new Dom7([el.previousElementSibling]); }
747
+ return new Dom7([]);
748
+ }
749
+ return new Dom7([]);
750
+ }
751
+ function prevAll(selector) {
752
+ var prevEls = [];
753
+ var el = this[0];
754
+ if (!el) { return new Dom7([]); }
755
+ while (el.previousElementSibling) {
756
+ var prev = el.previousElementSibling; // eslint-disable-line
757
+ if (selector) {
758
+ if ($(prev).is(selector)) { prevEls.push(prev); }
759
+ } else { prevEls.push(prev); }
760
+ el = prev;
761
+ }
762
+ return new Dom7(prevEls);
763
+ }
764
+ function parent(selector) {
765
+ var this$1 = this;
766
+
767
+ var parents = []; // eslint-disable-line
768
+ for (var i = 0; i < this.length; i += 1) {
769
+ if (this$1[i].parentNode !== null) {
770
+ if (selector) {
771
+ if ($(this$1[i].parentNode).is(selector)) { parents.push(this$1[i].parentNode); }
772
+ } else {
773
+ parents.push(this$1[i].parentNode);
774
+ }
775
+ }
776
+ }
777
+ return $(unique(parents));
778
+ }
779
+ function parents(selector) {
780
+ var this$1 = this;
781
+
782
+ var parents = []; // eslint-disable-line
783
+ for (var i = 0; i < this.length; i += 1) {
784
+ var parent = this$1[i].parentNode; // eslint-disable-line
785
+ while (parent) {
786
+ if (selector) {
787
+ if ($(parent).is(selector)) { parents.push(parent); }
788
+ } else {
789
+ parents.push(parent);
790
+ }
791
+ parent = parent.parentNode;
792
+ }
793
+ }
794
+ return $(unique(parents));
795
+ }
796
+ function closest(selector) {
797
+ var closest = this; // eslint-disable-line
798
+ if (typeof selector === 'undefined') {
799
+ return new Dom7([]);
800
+ }
801
+ if (!closest.is(selector)) {
802
+ closest = closest.parents(selector).eq(0);
803
+ }
804
+ return closest;
805
+ }
806
+ function find(selector) {
807
+ var this$1 = this;
808
+
809
+ var foundElements = [];
810
+ for (var i = 0; i < this.length; i += 1) {
811
+ var found = this$1[i].querySelectorAll(selector);
812
+ for (var j = 0; j < found.length; j += 1) {
813
+ foundElements.push(found[j]);
814
+ }
815
+ }
816
+ return new Dom7(foundElements);
817
+ }
818
+ function children(selector) {
819
+ var this$1 = this;
820
+
821
+ var children = []; // eslint-disable-line
822
+ for (var i = 0; i < this.length; i += 1) {
823
+ var childNodes = this$1[i].childNodes;
824
+
825
+ for (var j = 0; j < childNodes.length; j += 1) {
826
+ if (!selector) {
827
+ if (childNodes[j].nodeType === 1) { children.push(childNodes[j]); }
828
+ } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) {
829
+ children.push(childNodes[j]);
830
+ }
831
+ }
832
+ }
833
+ return new Dom7(unique(children));
834
+ }
835
+ function remove() {
836
+ var this$1 = this;
837
+
838
+ for (var i = 0; i < this.length; i += 1) {
839
+ if (this$1[i].parentNode) { this$1[i].parentNode.removeChild(this$1[i]); }
840
+ }
841
+ return this;
842
+ }
843
+ function add() {
844
+ var args = [], len = arguments.length;
845
+ while ( len-- ) args[ len ] = arguments[ len ];
846
+
847
+ var dom = this;
848
+ var i;
849
+ var j;
850
+ for (i = 0; i < args.length; i += 1) {
851
+ var toAdd = $(args[i]);
852
+ for (j = 0; j < toAdd.length; j += 1) {
853
+ dom[dom.length] = toAdd[j];
854
+ dom.length += 1;
855
+ }
856
+ }
857
+ return dom;
858
+ }
859
+
860
+ var Methods = {
861
+ addClass: addClass,
862
+ removeClass: removeClass,
863
+ hasClass: hasClass,
864
+ toggleClass: toggleClass,
865
+ attr: attr,
866
+ removeAttr: removeAttr,
867
+ data: data,
868
+ transform: transform,
869
+ transition: transition,
870
+ on: on,
871
+ off: off,
872
+ trigger: trigger,
873
+ transitionEnd: transitionEnd,
874
+ outerWidth: outerWidth,
875
+ outerHeight: outerHeight,
876
+ offset: offset,
877
+ css: css,
878
+ each: each,
879
+ html: html,
880
+ text: text,
881
+ is: is,
882
+ index: index,
883
+ eq: eq,
884
+ append: append,
885
+ prepend: prepend,
886
+ next: next,
887
+ nextAll: nextAll,
888
+ prev: prev,
889
+ prevAll: prevAll,
890
+ parent: parent,
891
+ parents: parents,
892
+ closest: closest,
893
+ find: find,
894
+ children: children,
895
+ remove: remove,
896
+ add: add,
897
+ styles: styles,
898
+ };
899
+
900
+ Object.keys(Methods).forEach(function (methodName) {
901
+ $.fn[methodName] = Methods[methodName];
902
+ });
903
+
904
+ var Utils = {
905
+ deleteProps: function deleteProps(obj) {
906
+ var object = obj;
907
+ Object.keys(object).forEach(function (key) {
908
+ try {
909
+ object[key] = null;
910
+ } catch (e) {
911
+ // no getter for object
912
+ }
913
+ try {
914
+ delete object[key];
915
+ } catch (e) {
916
+ // something got wrong
917
+ }
918
+ });
919
+ },
920
+ nextTick: function nextTick(callback, delay) {
921
+ if ( delay === void 0 ) delay = 0;
922
+
923
+ return setTimeout(callback, delay);
924
+ },
925
+ now: function now() {
926
+ return Date.now();
927
+ },
928
+ getTranslate: function getTranslate(el, axis) {
929
+ if ( axis === void 0 ) axis = 'x';
930
+
931
+ var matrix;
932
+ var curTransform;
933
+ var transformMatrix;
934
+
935
+ var curStyle = win.getComputedStyle(el, null);
936
+
937
+ if (win.WebKitCSSMatrix) {
938
+ curTransform = curStyle.transform || curStyle.webkitTransform;
939
+ if (curTransform.split(',').length > 6) {
940
+ curTransform = curTransform.split(', ').map(function (a) { return a.replace(',', '.'); }).join(', ');
941
+ }
942
+ // Some old versions of Webkit choke when 'none' is passed; pass
943
+ // empty string instead in this case
944
+ transformMatrix = new win.WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform);
945
+ } else {
946
+ transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,');
947
+ matrix = transformMatrix.toString().split(',');
948
+ }
949
+
950
+ if (axis === 'x') {
951
+ // Latest Chrome and webkits Fix
952
+ if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m41; }
953
+ // Crazy IE10 Matrix
954
+ else if (matrix.length === 16) { curTransform = parseFloat(matrix[12]); }
955
+ // Normal Browsers
956
+ else { curTransform = parseFloat(matrix[4]); }
957
+ }
958
+ if (axis === 'y') {
959
+ // Latest Chrome and webkits Fix
960
+ if (win.WebKitCSSMatrix) { curTransform = transformMatrix.m42; }
961
+ // Crazy IE10 Matrix
962
+ else if (matrix.length === 16) { curTransform = parseFloat(matrix[13]); }
963
+ // Normal Browsers
964
+ else { curTransform = parseFloat(matrix[5]); }
965
+ }
966
+ return curTransform || 0;
967
+ },
968
+ parseUrlQuery: function parseUrlQuery(url) {
969
+ var query = {};
970
+ var urlToParse = url || win.location.href;
971
+ var i;
972
+ var params;
973
+ var param;
974
+ var length;
975
+ if (typeof urlToParse === 'string' && urlToParse.length) {
976
+ urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : '';
977
+ params = urlToParse.split('&').filter(function (paramsPart) { return paramsPart !== ''; });
978
+ length = params.length;
979
+
980
+ for (i = 0; i < length; i += 1) {
981
+ param = params[i].replace(/#\S+/g, '').split('=');
982
+ query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || '';
983
+ }
984
+ }
985
+ return query;
986
+ },
987
+ isObject: function isObject(o) {
988
+ return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
989
+ },
990
+ extend: function extend() {
991
+ var args = [], len$1 = arguments.length;
992
+ while ( len$1-- ) args[ len$1 ] = arguments[ len$1 ];
993
+
994
+ var to = Object(args[0]);
995
+ for (var i = 1; i < args.length; i += 1) {
996
+ var nextSource = args[i];
997
+ if (nextSource !== undefined && nextSource !== null) {
998
+ var keysArray = Object.keys(Object(nextSource));
999
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) {
1000
+ var nextKey = keysArray[nextIndex];
1001
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
1002
+ if (desc !== undefined && desc.enumerable) {
1003
+ if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
1004
+ Utils.extend(to[nextKey], nextSource[nextKey]);
1005
+ } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) {
1006
+ to[nextKey] = {};
1007
+ Utils.extend(to[nextKey], nextSource[nextKey]);
1008
+ } else {
1009
+ to[nextKey] = nextSource[nextKey];
1010
+ }
1011
+ }
1012
+ }
1013
+ }
1014
+ }
1015
+ return to;
1016
+ },
1017
+ };
1018
+
1019
+ var Support = (function Support() {
1020
+ var testDiv = doc.createElement('div');
1021
+ return {
1022
+ touch: (win.Modernizr && win.Modernizr.touch === true) || (function checkTouch() {
1023
+ return !!(('ontouchstart' in win) || (win.DocumentTouch && doc instanceof win.DocumentTouch));
1024
+ }()),
1025
+
1026
+ pointerEvents: !!(win.navigator.pointerEnabled || win.PointerEvent),
1027
+ prefixedPointerEvents: !!win.navigator.msPointerEnabled,
1028
+
1029
+ transition: (function checkTransition() {
1030
+ var style = testDiv.style;
1031
+ return ('transition' in style || 'webkitTransition' in style || 'MozTransition' in style);
1032
+ }()),
1033
+ transforms3d: (win.Modernizr && win.Modernizr.csstransforms3d === true) || (function checkTransforms3d() {
1034
+ var style = testDiv.style;
1035
+ return ('webkitPerspective' in style || 'MozPerspective' in style || 'OPerspective' in style || 'MsPerspective' in style || 'perspective' in style);
1036
+ }()),
1037
+
1038
+ flexbox: (function checkFlexbox() {
1039
+ var style = testDiv.style;
1040
+ var styles = ('alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient').split(' ');
1041
+ for (var i = 0; i < styles.length; i += 1) {
1042
+ if (styles[i] in style) { return true; }
1043
+ }
1044
+ return false;
1045
+ }()),
1046
+
1047
+ observer: (function checkObserver() {
1048
+ return ('MutationObserver' in win || 'WebkitMutationObserver' in win);
1049
+ }()),
1050
+
1051
+ passiveListener: (function checkPassiveListener() {
1052
+ var supportsPassive = false;
1053
+ try {
1054
+ var opts = Object.defineProperty({}, 'passive', {
1055
+ // eslint-disable-next-line
1056
+ get: function get() {
1057
+ supportsPassive = true;
1058
+ },
1059
+ });
1060
+ win.addEventListener('testPassiveListener', null, opts);
1061
+ } catch (e) {
1062
+ // No support
1063
+ }
1064
+ return supportsPassive;
1065
+ }()),
1066
+
1067
+ gestures: (function checkGestures() {
1068
+ return 'ongesturestart' in win;
1069
+ }()),
1070
+ };
1071
+ }());
1072
+
1073
+ var SwiperClass = function SwiperClass(params) {
1074
+ if ( params === void 0 ) params = {};
1075
+
1076
+ var self = this;
1077
+ self.params = params;
1078
+
1079
+ // Events
1080
+ self.eventsListeners = {};
1081
+
1082
+ if (self.params && self.params.on) {
1083
+ Object.keys(self.params.on).forEach(function (eventName) {
1084
+ self.on(eventName, self.params.on[eventName]);
1085
+ });
1086
+ }
1087
+ };
1088
+
1089
+ var staticAccessors = { components: { configurable: true } };
1090
+ SwiperClass.prototype.on = function on (events, handler, priority) {
1091
+ var self = this;
1092
+ if (typeof handler !== 'function') { return self; }
1093
+ var method = priority ? 'unshift' : 'push';
1094
+ events.split(' ').forEach(function (event) {
1095
+ if (!self.eventsListeners[event]) { self.eventsListeners[event] = []; }
1096
+ self.eventsListeners[event][method](handler);
1097
+ });
1098
+ return self;
1099
+ };
1100
+ SwiperClass.prototype.once = function once (events, handler, priority) {
1101
+ var self = this;
1102
+ if (typeof handler !== 'function') { return self; }
1103
+ function onceHandler() {
1104
+ var args = [], len = arguments.length;
1105
+ while ( len-- ) args[ len ] = arguments[ len ];
1106
+
1107
+ handler.apply(self, args);
1108
+ self.off(events, onceHandler);
1109
+ }
1110
+ return self.on(events, onceHandler, priority);
1111
+ };
1112
+ SwiperClass.prototype.off = function off (events, handler) {
1113
+ var self = this;
1114
+ if (!self.eventsListeners) { return self; }
1115
+ events.split(' ').forEach(function (event) {
1116
+ if (typeof handler === 'undefined') {
1117
+ self.eventsListeners[event] = [];
1118
+ } else {
1119
+ self.eventsListeners[event].forEach(function (eventHandler, index) {
1120
+ if (eventHandler === handler) {
1121
+ self.eventsListeners[event].splice(index, 1);
1122
+ }
1123
+ });
1124
+ }
1125
+ });
1126
+ return self;
1127
+ };
1128
+ SwiperClass.prototype.emit = function emit () {
1129
+ var args = [], len = arguments.length;
1130
+ while ( len-- ) args[ len ] = arguments[ len ];
1131
+
1132
+ var self = this;
1133
+ if (!self.eventsListeners) { return self; }
1134
+ var events;
1135
+ var data;
1136
+ var context;
1137
+ if (typeof args[0] === 'string' || Array.isArray(args[0])) {
1138
+ events = args[0];
1139
+ data = args.slice(1, args.length);
1140
+ context = self;
1141
+ } else {
1142
+ events = args[0].events;
1143
+ data = args[0].data;
1144
+ context = args[0].context || self;
1145
+ }
1146
+ var eventsArray = Array.isArray(events) ? events : events.split(' ');
1147
+ eventsArray.forEach(function (event) {
1148
+ if (self.eventsListeners && self.eventsListeners[event]) {
1149
+ var handlers = [];
1150
+ self.eventsListeners[event].forEach(function (eventHandler) {
1151
+ handlers.push(eventHandler);
1152
+ });
1153
+ handlers.forEach(function (eventHandler) {
1154
+ eventHandler.apply(context, data);
1155
+ });
1156
+ }
1157
+ });
1158
+ return self;
1159
+ };
1160
+ SwiperClass.prototype.useModulesParams = function useModulesParams (instanceParams) {
1161
+ var instance = this;
1162
+ if (!instance.modules) { return; }
1163
+ Object.keys(instance.modules).forEach(function (moduleName) {
1164
+ var module = instance.modules[moduleName];
1165
+ // Extend params
1166
+ if (module.params) {
1167
+ Utils.extend(instanceParams, module.params);
1168
+ }
1169
+ });
1170
+ };
1171
+ SwiperClass.prototype.useModules = function useModules (modulesParams) {
1172
+ if ( modulesParams === void 0 ) modulesParams = {};
1173
+
1174
+ var instance = this;
1175
+ if (!instance.modules) { return; }
1176
+ Object.keys(instance.modules).forEach(function (moduleName) {
1177
+ var module = instance.modules[moduleName];
1178
+ var moduleParams = modulesParams[moduleName] || {};
1179
+ // Extend instance methods and props
1180
+ if (module.instance) {
1181
+ Object.keys(module.instance).forEach(function (modulePropName) {
1182
+ var moduleProp = module.instance[modulePropName];
1183
+ if (typeof moduleProp === 'function') {
1184
+ instance[modulePropName] = moduleProp.bind(instance);
1185
+ } else {
1186
+ instance[modulePropName] = moduleProp;
1187
+ }
1188
+ });
1189
+ }
1190
+ // Add event listeners
1191
+ if (module.on && instance.on) {
1192
+ Object.keys(module.on).forEach(function (moduleEventName) {
1193
+ instance.on(moduleEventName, module.on[moduleEventName]);
1194
+ });
1195
+ }
1196
+
1197
+ // Module create callback
1198
+ if (module.create) {
1199
+ module.create.bind(instance)(moduleParams);
1200
+ }
1201
+ });
1202
+ };
1203
+ staticAccessors.components.set = function (components) {
1204
+ var Class = this;
1205
+ if (!Class.use) { return; }
1206
+ Class.use(components);
1207
+ };
1208
+ SwiperClass.installModule = function installModule (module) {
1209
+ var params = [], len = arguments.length - 1;
1210
+ while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ];
1211
+
1212
+ var Class = this;
1213
+ if (!Class.prototype.modules) { Class.prototype.modules = {}; }
1214
+ var name = module.name || (((Object.keys(Class.prototype.modules).length) + "_" + (Utils.now())));
1215
+ Class.prototype.modules[name] = module;
1216
+ // Prototype
1217
+ if (module.proto) {
1218
+ Object.keys(module.proto).forEach(function (key) {
1219
+ Class.prototype[key] = module.proto[key];
1220
+ });
1221
+ }
1222
+ // Class
1223
+ if (module.static) {
1224
+ Object.keys(module.static).forEach(function (key) {
1225
+ Class[key] = module.static[key];
1226
+ });
1227
+ }
1228
+ // Callback
1229
+ if (module.install) {
1230
+ module.install.apply(Class, params);
1231
+ }
1232
+ return Class;
1233
+ };
1234
+ SwiperClass.use = function use (module) {
1235
+ var params = [], len = arguments.length - 1;
1236
+ while ( len-- > 0 ) params[ len ] = arguments[ len + 1 ];
1237
+
1238
+ var Class = this;
1239
+ if (Array.isArray(module)) {
1240
+ module.forEach(function (m) { return Class.installModule(m); });
1241
+ return Class;
1242
+ }
1243
+ return Class.installModule.apply(Class, [ module ].concat( params ));
1244
+ };
1245
+
1246
+ Object.defineProperties( SwiperClass, staticAccessors );
1247
+
1248
+ function updateSize () {
1249
+ var swiper = this;
1250
+ var width;
1251
+ var height;
1252
+ var $el = swiper.$el;
1253
+ if (typeof swiper.params.width !== 'undefined') {
1254
+ width = swiper.params.width;
1255
+ } else {
1256
+ width = $el[0].clientWidth;
1257
+ }
1258
+ if (typeof swiper.params.height !== 'undefined') {
1259
+ height = swiper.params.height;
1260
+ } else {
1261
+ height = $el[0].clientHeight;
1262
+ }
1263
+ if ((width === 0 && swiper.isHorizontal()) || (height === 0 && swiper.isVertical())) {
1264
+ return;
1265
+ }
1266
+
1267
+ // Subtract paddings
1268
+ width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10);
1269
+ height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10);
1270
+
1271
+ Utils.extend(swiper, {
1272
+ width: width,
1273
+ height: height,
1274
+ size: swiper.isHorizontal() ? width : height,
1275
+ });
1276
+ }
1277
+
1278
+ function updateSlides () {
1279
+ var swiper = this;
1280
+ var params = swiper.params;
1281
+
1282
+ var $wrapperEl = swiper.$wrapperEl;
1283
+ var swiperSize = swiper.size;
1284
+ var rtl = swiper.rtlTranslate;
1285
+ var wrongRTL = swiper.wrongRTL;
1286
+ var isVirtual = swiper.virtual && params.virtual.enabled;
1287
+ var previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
1288
+ var slides = $wrapperEl.children(("." + (swiper.params.slideClass)));
1289
+ var slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
1290
+ var snapGrid = [];
1291
+ var slidesGrid = [];
1292
+ var slidesSizesGrid = [];
1293
+
1294
+ var offsetBefore = params.slidesOffsetBefore;
1295
+ if (typeof offsetBefore === 'function') {
1296
+ offsetBefore = params.slidesOffsetBefore.call(swiper);
1297
+ }
1298
+
1299
+ var offsetAfter = params.slidesOffsetAfter;
1300
+ if (typeof offsetAfter === 'function') {
1301
+ offsetAfter = params.slidesOffsetAfter.call(swiper);
1302
+ }
1303
+
1304
+ var previousSnapGridLength = swiper.snapGrid.length;
1305
+ var previousSlidesGridLength = swiper.snapGrid.length;
1306
+
1307
+ var spaceBetween = params.spaceBetween;
1308
+ var slidePosition = -offsetBefore;
1309
+ var prevSlideSize = 0;
1310
+ var index = 0;
1311
+ if (typeof swiperSize === 'undefined') {
1312
+ return;
1313
+ }
1314
+ if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
1315
+ spaceBetween = (parseFloat(spaceBetween.replace('%', '')) / 100) * swiperSize;
1316
+ }
1317
+
1318
+ swiper.virtualSize = -spaceBetween;
1319
+
1320
+ // reset margins
1321
+ if (rtl) { slides.css({ marginLeft: '', marginTop: '' }); }
1322
+ else { slides.css({ marginRight: '', marginBottom: '' }); }
1323
+
1324
+ var slidesNumberEvenToRows;
1325
+ if (params.slidesPerColumn > 1) {
1326
+ if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) {
1327
+ slidesNumberEvenToRows = slidesLength;
1328
+ } else {
1329
+ slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn;
1330
+ }
1331
+ if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') {
1332
+ slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn);
1333
+ }
1334
+ }
1335
+
1336
+ // Calc slides
1337
+ var slideSize;
1338
+ var slidesPerColumn = params.slidesPerColumn;
1339
+ var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn;
1340
+ var numFullColumns = slidesPerRow - ((params.slidesPerColumn * slidesPerRow) - slidesLength);
1341
+ for (var i = 0; i < slidesLength; i += 1) {
1342
+ slideSize = 0;
1343
+ var slide = slides.eq(i);
1344
+ if (params.slidesPerColumn > 1) {
1345
+ // Set slides order
1346
+ var newSlideOrderIndex = (void 0);
1347
+ var column = (void 0);
1348
+ var row = (void 0);
1349
+ if (params.slidesPerColumnFill === 'column') {
1350
+ column = Math.floor(i / slidesPerColumn);
1351
+ row = i - (column * slidesPerColumn);
1352
+ if (column > numFullColumns || (column === numFullColumns && row === slidesPerColumn - 1)) {
1353
+ row += 1;
1354
+ if (row >= slidesPerColumn) {
1355
+ row = 0;
1356
+ column += 1;
1357
+ }
1358
+ }
1359
+ newSlideOrderIndex = column + ((row * slidesNumberEvenToRows) / slidesPerColumn);
1360
+ slide
1361
+ .css({
1362
+ '-webkit-box-ordinal-group': newSlideOrderIndex,
1363
+ '-moz-box-ordinal-group': newSlideOrderIndex,
1364
+ '-ms-flex-order': newSlideOrderIndex,
1365
+ '-webkit-order': newSlideOrderIndex,
1366
+ order: newSlideOrderIndex,
1367
+ });
1368
+ } else {
1369
+ row = Math.floor(i / slidesPerRow);
1370
+ column = i - (row * slidesPerRow);
1371
+ }
1372
+ slide
1373
+ .css(
1374
+ ("margin-" + (swiper.isHorizontal() ? 'top' : 'left')),
1375
+ (row !== 0 && params.spaceBetween) && (((params.spaceBetween) + "px"))
1376
+ )
1377
+ .attr('data-swiper-column', column)
1378
+ .attr('data-swiper-row', row);
1379
+ }
1380
+ if (slide.css('display') === 'none') { continue; } // eslint-disable-line
1381
+
1382
+ if (params.slidesPerView === 'auto') {
1383
+ var slideStyles = win.getComputedStyle(slide[0], null);
1384
+ var currentTransform = slide[0].style.transform;
1385
+ var currentWebKitTransform = slide[0].style.webkitTransform;
1386
+ if (currentTransform) {
1387
+ slide[0].style.transform = 'none';
1388
+ }
1389
+ if (currentWebKitTransform) {
1390
+ slide[0].style.webkitTransform = 'none';
1391
+ }
1392
+ if (swiper.isHorizontal()) {
1393
+ slideSize = slide[0].getBoundingClientRect().width +
1394
+ parseFloat(slideStyles.getPropertyValue('margin-left')) +
1395
+ parseFloat(slideStyles.getPropertyValue('margin-right'));
1396
+ } else {
1397
+ slideSize = slide[0].getBoundingClientRect().height +
1398
+ parseFloat(slideStyles.getPropertyValue('margin-top')) +
1399
+ parseFloat(slideStyles.getPropertyValue('margin-bottom'));
1400
+ }
1401
+ if (currentTransform) {
1402
+ slide[0].style.transform = currentTransform;
1403
+ }
1404
+ if (currentWebKitTransform) {
1405
+ slide[0].style.webkitTransform = currentWebKitTransform;
1406
+ }
1407
+ if (params.roundLengths) { slideSize = Math.floor(slideSize); }
1408
+ } else {
1409
+ slideSize = (swiperSize - ((params.slidesPerView - 1) * spaceBetween)) / params.slidesPerView;
1410
+ if (params.roundLengths) { slideSize = Math.floor(slideSize); }
1411
+
1412
+ if (slides[i]) {
1413
+ if (swiper.isHorizontal()) {
1414
+ slides[i].style.width = slideSize + "px";
1415
+ } else {
1416
+ slides[i].style.height = slideSize + "px";
1417
+ }
1418
+ }
1419
+ }
1420
+ if (slides[i]) {
1421
+ slides[i].swiperSlideSize = slideSize;
1422
+ }
1423
+ slidesSizesGrid.push(slideSize);
1424
+
1425
+
1426
+ if (params.centeredSlides) {
1427
+ slidePosition = slidePosition + (slideSize / 2) + (prevSlideSize / 2) + spaceBetween;
1428
+ if (prevSlideSize === 0 && i !== 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; }
1429
+ if (i === 0) { slidePosition = slidePosition - (swiperSize / 2) - spaceBetween; }
1430
+ if (Math.abs(slidePosition) < 1 / 1000) { slidePosition = 0; }
1431
+ if (params.roundLengths) { slidePosition = Math.floor(slidePosition); }
1432
+ if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); }
1433
+ slidesGrid.push(slidePosition);
1434
+ } else {
1435
+ if (params.roundLengths) { slidePosition = Math.floor(slidePosition); }
1436
+ if ((index) % params.slidesPerGroup === 0) { snapGrid.push(slidePosition); }
1437
+ slidesGrid.push(slidePosition);
1438
+ slidePosition = slidePosition + slideSize + spaceBetween;
1439
+ }
1440
+
1441
+ swiper.virtualSize += slideSize + spaceBetween;
1442
+
1443
+ prevSlideSize = slideSize;
1444
+
1445
+ index += 1;
1446
+ }
1447
+ swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
1448
+ var newSlidesGrid;
1449
+
1450
+ if (
1451
+ rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
1452
+ $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") });
1453
+ }
1454
+ if (!Support.flexbox || params.setWrapperSize) {
1455
+ if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
1456
+ else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
1457
+ }
1458
+
1459
+ if (params.slidesPerColumn > 1) {
1460
+ swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows;
1461
+ swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween;
1462
+ if (swiper.isHorizontal()) { $wrapperEl.css({ width: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
1463
+ else { $wrapperEl.css({ height: ((swiper.virtualSize + params.spaceBetween) + "px") }); }
1464
+ if (params.centeredSlides) {
1465
+ newSlidesGrid = [];
1466
+ for (var i$1 = 0; i$1 < snapGrid.length; i$1 += 1) {
1467
+ var slidesGridItem = snapGrid[i$1];
1468
+ if (params.roundLengths) { slidesGridItem = Math.floor(slidesGridItem); }
1469
+ if (snapGrid[i$1] < swiper.virtualSize + snapGrid[0]) { newSlidesGrid.push(slidesGridItem); }
1470
+ }
1471
+ snapGrid = newSlidesGrid;
1472
+ }
1473
+ }
1474
+
1475
+ // Remove last grid elements depending on width
1476
+ if (!params.centeredSlides) {
1477
+ newSlidesGrid = [];
1478
+ for (var i$2 = 0; i$2 < snapGrid.length; i$2 += 1) {
1479
+ var slidesGridItem$1 = snapGrid[i$2];
1480
+ if (params.roundLengths) { slidesGridItem$1 = Math.floor(slidesGridItem$1); }
1481
+ if (snapGrid[i$2] <= swiper.virtualSize - swiperSize) {
1482
+ newSlidesGrid.push(slidesGridItem$1);
1483
+ }
1484
+ }
1485
+ snapGrid = newSlidesGrid;
1486
+ if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
1487
+ snapGrid.push(swiper.virtualSize - swiperSize);
1488
+ }
1489
+ }
1490
+ if (snapGrid.length === 0) { snapGrid = [0]; }
1491
+
1492
+ if (params.spaceBetween !== 0) {
1493
+ if (swiper.isHorizontal()) {
1494
+ if (rtl) { slides.css({ marginLeft: (spaceBetween + "px") }); }
1495
+ else { slides.css({ marginRight: (spaceBetween + "px") }); }
1496
+ } else { slides.css({ marginBottom: (spaceBetween + "px") }); }
1497
+ }
1498
+
1499
+ Utils.extend(swiper, {
1500
+ slides: slides,
1501
+ snapGrid: snapGrid,
1502
+ slidesGrid: slidesGrid,
1503
+ slidesSizesGrid: slidesSizesGrid,
1504
+ });
1505
+
1506
+ if (slidesLength !== previousSlidesLength) {
1507
+ swiper.emit('slidesLengthChange');
1508
+ }
1509
+ if (snapGrid.length !== previousSnapGridLength) {
1510
+ if (swiper.params.watchOverflow) { swiper.checkOverflow(); }
1511
+ swiper.emit('snapGridLengthChange');
1512
+ }
1513
+ if (slidesGrid.length !== previousSlidesGridLength) {
1514
+ swiper.emit('slidesGridLengthChange');
1515
+ }
1516
+
1517
+ if (params.watchSlidesProgress || params.watchSlidesVisibility) {
1518
+ swiper.updateSlidesOffset();
1519
+ }
1520
+ }
1521
+
1522
+ function updateAutoHeight (speed) {
1523
+ var swiper = this;
1524
+ var activeSlides = [];
1525
+ var newHeight = 0;
1526
+ var i;
1527
+ if (typeof speed === 'number') {
1528
+ swiper.setTransition(speed);
1529
+ } else if (speed === true) {
1530
+ swiper.setTransition(swiper.params.speed);
1531
+ }
1532
+ // Find slides currently in view
1533
+ if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
1534
+ for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
1535
+ var index = swiper.activeIndex + i;
1536
+ if (index > swiper.slides.length) { break; }
1537
+ activeSlides.push(swiper.slides.eq(index)[0]);
1538
+ }
1539
+ } else {
1540
+ activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]);
1541
+ }
1542
+
1543
+ // Find new height from highest slide in view
1544
+ for (i = 0; i < activeSlides.length; i += 1) {
1545
+ if (typeof activeSlides[i] !== 'undefined') {
1546
+ var height = activeSlides[i].offsetHeight;
1547
+ newHeight = height > newHeight ? height : newHeight;
1548
+ }
1549
+ }
1550
+
1551
+ // Update Height
1552
+ if (newHeight) { swiper.$wrapperEl.css('height', (newHeight + "px")); }
1553
+ }
1554
+
1555
+ function updateSlidesOffset () {
1556
+ var swiper = this;
1557
+ var slides = swiper.slides;
1558
+ for (var i = 0; i < slides.length; i += 1) {
1559
+ slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop;
1560
+ }
1561
+ }
1562
+
1563
+ function updateSlidesProgress (translate) {
1564
+ if ( translate === void 0 ) translate = (this && this.translate) || 0;
1565
+
1566
+ var swiper = this;
1567
+ var params = swiper.params;
1568
+
1569
+ var slides = swiper.slides;
1570
+ var rtl = swiper.rtlTranslate;
1571
+
1572
+ if (slides.length === 0) { return; }
1573
+ if (typeof slides[0].swiperSlideOffset === 'undefined') { swiper.updateSlidesOffset(); }
1574
+
1575
+ var offsetCenter = -translate;
1576
+ if (rtl) { offsetCenter = translate; }
1577
+
1578
+ // Visible Slides
1579
+ slides.removeClass(params.slideVisibleClass);
1580
+
1581
+ for (var i = 0; i < slides.length; i += 1) {
1582
+ var slide = slides[i];
1583
+ var slideProgress =
1584
+ (
1585
+ (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0)) - slide.swiperSlideOffset
1586
+ ) / (slide.swiperSlideSize + params.spaceBetween);
1587
+ if (params.watchSlidesVisibility) {
1588
+ var slideBefore = -(offsetCenter - slide.swiperSlideOffset);
1589
+ var slideAfter = slideBefore + swiper.slidesSizesGrid[i];
1590
+ var isVisible =
1591
+ (slideBefore >= 0 && slideBefore < swiper.size) ||
1592
+ (slideAfter > 0 && slideAfter <= swiper.size) ||
1593
+ (slideBefore <= 0 && slideAfter >= swiper.size);
1594
+ if (isVisible) {
1595
+ slides.eq(i).addClass(params.slideVisibleClass);
1596
+ }
1597
+ }
1598
+ slide.progress = rtl ? -slideProgress : slideProgress;
1599
+ }
1600
+ }
1601
+
1602
+ function updateProgress (translate) {
1603
+ if ( translate === void 0 ) translate = (this && this.translate) || 0;
1604
+
1605
+ var swiper = this;
1606
+ var params = swiper.params;
1607
+
1608
+ var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
1609
+ var progress = swiper.progress;
1610
+ var isBeginning = swiper.isBeginning;
1611
+ var isEnd = swiper.isEnd;
1612
+ var wasBeginning = isBeginning;
1613
+ var wasEnd = isEnd;
1614
+ if (translatesDiff === 0) {
1615
+ progress = 0;
1616
+ isBeginning = true;
1617
+ isEnd = true;
1618
+ } else {
1619
+ progress = (translate - swiper.minTranslate()) / (translatesDiff);
1620
+ isBeginning = progress <= 0;
1621
+ isEnd = progress >= 1;
1622
+ }
1623
+ Utils.extend(swiper, {
1624
+ progress: progress,
1625
+ isBeginning: isBeginning,
1626
+ isEnd: isEnd,
1627
+ });
1628
+
1629
+ if (params.watchSlidesProgress || params.watchSlidesVisibility) { swiper.updateSlidesProgress(translate); }
1630
+
1631
+ if (isBeginning && !wasBeginning) {
1632
+ swiper.emit('reachBeginning toEdge');
1633
+ }
1634
+ if (isEnd && !wasEnd) {
1635
+ swiper.emit('reachEnd toEdge');
1636
+ }
1637
+ if ((wasBeginning && !isBeginning) || (wasEnd && !isEnd)) {
1638
+ swiper.emit('fromEdge');
1639
+ }
1640
+
1641
+ swiper.emit('progress', progress);
1642
+ }
1643
+
1644
+ function updateSlidesClasses () {
1645
+ var swiper = this;
1646
+
1647
+ var slides = swiper.slides;
1648
+ var params = swiper.params;
1649
+ var $wrapperEl = swiper.$wrapperEl;
1650
+ var activeIndex = swiper.activeIndex;
1651
+ var realIndex = swiper.realIndex;
1652
+ var isVirtual = swiper.virtual && params.virtual.enabled;
1653
+
1654
+ slides.removeClass(((params.slideActiveClass) + " " + (params.slideNextClass) + " " + (params.slidePrevClass) + " " + (params.slideDuplicateActiveClass) + " " + (params.slideDuplicateNextClass) + " " + (params.slideDuplicatePrevClass)));
1655
+
1656
+ var activeSlide;
1657
+ if (isVirtual) {
1658
+ activeSlide = swiper.$wrapperEl.find(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + activeIndex + "\"]"));
1659
+ } else {
1660
+ activeSlide = slides.eq(activeIndex);
1661
+ }
1662
+
1663
+ // Active classes
1664
+ activeSlide.addClass(params.slideActiveClass);
1665
+
1666
+ if (params.loop) {
1667
+ // Duplicate to all looped slides
1668
+ if (activeSlide.hasClass(params.slideDuplicateClass)) {
1669
+ $wrapperEl
1670
+ .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + realIndex + "\"]"))
1671
+ .addClass(params.slideDuplicateActiveClass);
1672
+ } else {
1673
+ $wrapperEl
1674
+ .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]"))
1675
+ .addClass(params.slideDuplicateActiveClass);
1676
+ }
1677
+ }
1678
+ // Next Slide
1679
+ var nextSlide = activeSlide.nextAll(("." + (params.slideClass))).eq(0).addClass(params.slideNextClass);
1680
+ if (params.loop && nextSlide.length === 0) {
1681
+ nextSlide = slides.eq(0);
1682
+ nextSlide.addClass(params.slideNextClass);
1683
+ }
1684
+ // Prev Slide
1685
+ var prevSlide = activeSlide.prevAll(("." + (params.slideClass))).eq(0).addClass(params.slidePrevClass);
1686
+ if (params.loop && prevSlide.length === 0) {
1687
+ prevSlide = slides.eq(-1);
1688
+ prevSlide.addClass(params.slidePrevClass);
1689
+ }
1690
+ if (params.loop) {
1691
+ // Duplicate to all looped slides
1692
+ if (nextSlide.hasClass(params.slideDuplicateClass)) {
1693
+ $wrapperEl
1694
+ .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]"))
1695
+ .addClass(params.slideDuplicateNextClass);
1696
+ } else {
1697
+ $wrapperEl
1698
+ .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (nextSlide.attr('data-swiper-slide-index')) + "\"]"))
1699
+ .addClass(params.slideDuplicateNextClass);
1700
+ }
1701
+ if (prevSlide.hasClass(params.slideDuplicateClass)) {
1702
+ $wrapperEl
1703
+ .children(("." + (params.slideClass) + ":not(." + (params.slideDuplicateClass) + ")[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]"))
1704
+ .addClass(params.slideDuplicatePrevClass);
1705
+ } else {
1706
+ $wrapperEl
1707
+ .children(("." + (params.slideClass) + "." + (params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + (prevSlide.attr('data-swiper-slide-index')) + "\"]"))
1708
+ .addClass(params.slideDuplicatePrevClass);
1709
+ }
1710
+ }
1711
+ }
1712
+
1713
+ function updateActiveIndex (newActiveIndex) {
1714
+ var swiper = this;
1715
+ var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1716
+ var slidesGrid = swiper.slidesGrid;
1717
+ var snapGrid = swiper.snapGrid;
1718
+ var params = swiper.params;
1719
+ var previousIndex = swiper.activeIndex;
1720
+ var previousRealIndex = swiper.realIndex;
1721
+ var previousSnapIndex = swiper.snapIndex;
1722
+ var activeIndex = newActiveIndex;
1723
+ var snapIndex;
1724
+ if (typeof activeIndex === 'undefined') {
1725
+ for (var i = 0; i < slidesGrid.length; i += 1) {
1726
+ if (typeof slidesGrid[i + 1] !== 'undefined') {
1727
+ if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - ((slidesGrid[i + 1] - slidesGrid[i]) / 2)) {
1728
+ activeIndex = i;
1729
+ } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
1730
+ activeIndex = i + 1;
1731
+ }
1732
+ } else if (translate >= slidesGrid[i]) {
1733
+ activeIndex = i;
1734
+ }
1735
+ }
1736
+ // Normalize slideIndex
1737
+ if (params.normalizeSlideIndex) {
1738
+ if (activeIndex < 0 || typeof activeIndex === 'undefined') { activeIndex = 0; }
1739
+ }
1740
+ }
1741
+ if (snapGrid.indexOf(translate) >= 0) {
1742
+ snapIndex = snapGrid.indexOf(translate);
1743
+ } else {
1744
+ snapIndex = Math.floor(activeIndex / params.slidesPerGroup);
1745
+ }
1746
+ if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; }
1747
+ if (activeIndex === previousIndex) {
1748
+ if (snapIndex !== previousSnapIndex) {
1749
+ swiper.snapIndex = snapIndex;
1750
+ swiper.emit('snapIndexChange');
1751
+ }
1752
+ return;
1753
+ }
1754
+
1755
+ // Get real index
1756
+ var realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10);
1757
+
1758
+ Utils.extend(swiper, {
1759
+ snapIndex: snapIndex,
1760
+ realIndex: realIndex,
1761
+ previousIndex: previousIndex,
1762
+ activeIndex: activeIndex,
1763
+ });
1764
+ swiper.emit('activeIndexChange');
1765
+ swiper.emit('snapIndexChange');
1766
+ if (previousRealIndex !== realIndex) {
1767
+ swiper.emit('realIndexChange');
1768
+ }
1769
+ swiper.emit('slideChange');
1770
+ }
1771
+
1772
+ function updateClickedSlide (e) {
1773
+ var swiper = this;
1774
+ var params = swiper.params;
1775
+ var slide = $(e.target).closest(("." + (params.slideClass)))[0];
1776
+ var slideFound = false;
1777
+ if (slide) {
1778
+ for (var i = 0; i < swiper.slides.length; i += 1) {
1779
+ if (swiper.slides[i] === slide) { slideFound = true; }
1780
+ }
1781
+ }
1782
+
1783
+ if (slide && slideFound) {
1784
+ swiper.clickedSlide = slide;
1785
+ if (swiper.virtual && swiper.params.virtual.enabled) {
1786
+ swiper.clickedIndex = parseInt($(slide).attr('data-swiper-slide-index'), 10);
1787
+ } else {
1788
+ swiper.clickedIndex = $(slide).index();
1789
+ }
1790
+ } else {
1791
+ swiper.clickedSlide = undefined;
1792
+ swiper.clickedIndex = undefined;
1793
+ return;
1794
+ }
1795
+ if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
1796
+ swiper.slideToClickedSlide();
1797
+ }
1798
+ }
1799
+
1800
+ var update = {
1801
+ updateSize: updateSize,
1802
+ updateSlides: updateSlides,
1803
+ updateAutoHeight: updateAutoHeight,
1804
+ updateSlidesOffset: updateSlidesOffset,
1805
+ updateSlidesProgress: updateSlidesProgress,
1806
+ updateProgress: updateProgress,
1807
+ updateSlidesClasses: updateSlidesClasses,
1808
+ updateActiveIndex: updateActiveIndex,
1809
+ updateClickedSlide: updateClickedSlide,
1810
+ };
1811
+
1812
+ function getTranslate (axis) {
1813
+ if ( axis === void 0 ) axis = this.isHorizontal() ? 'x' : 'y';
1814
+
1815
+ var swiper = this;
1816
+
1817
+ var params = swiper.params;
1818
+ var rtl = swiper.rtlTranslate;
1819
+ var translate = swiper.translate;
1820
+ var $wrapperEl = swiper.$wrapperEl;
1821
+
1822
+ if (params.virtualTranslate) {
1823
+ return rtl ? -translate : translate;
1824
+ }
1825
+
1826
+ var currentTranslate = Utils.getTranslate($wrapperEl[0], axis);
1827
+ if (rtl) { currentTranslate = -currentTranslate; }
1828
+
1829
+ return currentTranslate || 0;
1830
+ }
1831
+
1832
+ function setTranslate (translate, byController) {
1833
+ var swiper = this;
1834
+ var rtl = swiper.rtlTranslate;
1835
+ var params = swiper.params;
1836
+ var $wrapperEl = swiper.$wrapperEl;
1837
+ var progress = swiper.progress;
1838
+ var x = 0;
1839
+ var y = 0;
1840
+ var z = 0;
1841
+
1842
+ if (swiper.isHorizontal()) {
1843
+ x = rtl ? -translate : translate;
1844
+ } else {
1845
+ y = translate;
1846
+ }
1847
+
1848
+ if (params.roundLengths) {
1849
+ x = Math.floor(x);
1850
+ y = Math.floor(y);
1851
+ }
1852
+
1853
+ if (!params.virtualTranslate) {
1854
+ if (Support.transforms3d) { $wrapperEl.transform(("translate3d(" + x + "px, " + y + "px, " + z + "px)")); }
1855
+ else { $wrapperEl.transform(("translate(" + x + "px, " + y + "px)")); }
1856
+ }
1857
+ swiper.previousTranslate = swiper.translate;
1858
+ swiper.translate = swiper.isHorizontal() ? x : y;
1859
+
1860
+ // Check if we need to update progress
1861
+ var newProgress;
1862
+ var translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
1863
+ if (translatesDiff === 0) {
1864
+ newProgress = 0;
1865
+ } else {
1866
+ newProgress = (translate - swiper.minTranslate()) / (translatesDiff);
1867
+ }
1868
+ if (newProgress !== progress) {
1869
+ swiper.updateProgress(translate);
1870
+ }
1871
+
1872
+ swiper.emit('setTranslate', swiper.translate, byController);
1873
+ }
1874
+
1875
+ function minTranslate () {
1876
+ return (-this.snapGrid[0]);
1877
+ }
1878
+
1879
+ function maxTranslate () {
1880
+ return (-this.snapGrid[this.snapGrid.length - 1]);
1881
+ }
1882
+
1883
+ var translate = {
1884
+ getTranslate: getTranslate,
1885
+ setTranslate: setTranslate,
1886
+ minTranslate: minTranslate,
1887
+ maxTranslate: maxTranslate,
1888
+ };
1889
+
1890
+ function setTransition (duration, byController) {
1891
+ var swiper = this;
1892
+
1893
+ swiper.$wrapperEl.transition(duration);
1894
+
1895
+ swiper.emit('setTransition', duration, byController);
1896
+ }
1897
+
1898
+ function transitionStart (runCallbacks, direction) {
1899
+ if ( runCallbacks === void 0 ) runCallbacks = true;
1900
+
1901
+ var swiper = this;
1902
+ var activeIndex = swiper.activeIndex;
1903
+ var params = swiper.params;
1904
+ var previousIndex = swiper.previousIndex;
1905
+ if (params.autoHeight) {
1906
+ swiper.updateAutoHeight();
1907
+ }
1908
+
1909
+ var dir = direction;
1910
+ if (!dir) {
1911
+ if (activeIndex > previousIndex) { dir = 'next'; }
1912
+ else if (activeIndex < previousIndex) { dir = 'prev'; }
1913
+ else { dir = 'reset'; }
1914
+ }
1915
+
1916
+ swiper.emit('transitionStart');
1917
+
1918
+ if (runCallbacks && activeIndex !== previousIndex) {
1919
+ if (dir === 'reset') {
1920
+ swiper.emit('slideResetTransitionStart');
1921
+ return;
1922
+ }
1923
+ swiper.emit('slideChangeTransitionStart');
1924
+ if (dir === 'next') {
1925
+ swiper.emit('slideNextTransitionStart');
1926
+ } else {
1927
+ swiper.emit('slidePrevTransitionStart');
1928
+ }
1929
+ }
1930
+ }
1931
+
1932
+ function transitionEnd$1 (runCallbacks, direction) {
1933
+ if ( runCallbacks === void 0 ) runCallbacks = true;
1934
+
1935
+ var swiper = this;
1936
+ var activeIndex = swiper.activeIndex;
1937
+ var previousIndex = swiper.previousIndex;
1938
+ swiper.animating = false;
1939
+ swiper.setTransition(0);
1940
+
1941
+ var dir = direction;
1942
+ if (!dir) {
1943
+ if (activeIndex > previousIndex) { dir = 'next'; }
1944
+ else if (activeIndex < previousIndex) { dir = 'prev'; }
1945
+ else { dir = 'reset'; }
1946
+ }
1947
+
1948
+ swiper.emit('transitionEnd');
1949
+
1950
+ if (runCallbacks && activeIndex !== previousIndex) {
1951
+ if (dir === 'reset') {
1952
+ swiper.emit('slideResetTransitionEnd');
1953
+ return;
1954
+ }
1955
+ swiper.emit('slideChangeTransitionEnd');
1956
+ if (dir === 'next') {
1957
+ swiper.emit('slideNextTransitionEnd');
1958
+ } else {
1959
+ swiper.emit('slidePrevTransitionEnd');
1960
+ }
1961
+ }
1962
+ }
1963
+
1964
+ var transition$1 = {
1965
+ setTransition: setTransition,
1966
+ transitionStart: transitionStart,
1967
+ transitionEnd: transitionEnd$1,
1968
+ };
1969
+
1970
+ function slideTo (index, speed, runCallbacks, internal) {
1971
+ if ( index === void 0 ) index = 0;
1972
+ if ( speed === void 0 ) speed = this.params.speed;
1973
+ if ( runCallbacks === void 0 ) runCallbacks = true;
1974
+
1975
+ var swiper = this;
1976
+ var slideIndex = index;
1977
+ if (slideIndex < 0) { slideIndex = 0; }
1978
+
1979
+ var params = swiper.params;
1980
+ var snapGrid = swiper.snapGrid;
1981
+ var slidesGrid = swiper.slidesGrid;
1982
+ var previousIndex = swiper.previousIndex;
1983
+ var activeIndex = swiper.activeIndex;
1984
+ var rtl = swiper.rtlTranslate;
1985
+ if (swiper.animating && params.preventIntercationOnTransition) {
1986
+ return false;
1987
+ }
1988
+
1989
+ var snapIndex = Math.floor(slideIndex / params.slidesPerGroup);
1990
+ if (snapIndex >= snapGrid.length) { snapIndex = snapGrid.length - 1; }
1991
+
1992
+ if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) {
1993
+ swiper.emit('beforeSlideChangeStart');
1994
+ }
1995
+
1996
+ var translate = -snapGrid[snapIndex];
1997
+
1998
+ // Update progress
1999
+ swiper.updateProgress(translate);
2000
+
2001
+ // Normalize slideIndex
2002
+ if (params.normalizeSlideIndex) {
2003
+ for (var i = 0; i < slidesGrid.length; i += 1) {
2004
+ if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) {
2005
+ slideIndex = i;
2006
+ }
2007
+ }
2008
+ }
2009
+ // Directions locks
2010
+ if (swiper.initialized && slideIndex !== activeIndex) {
2011
+ if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) {
2012
+ return false;
2013
+ }
2014
+ if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
2015
+ if ((activeIndex || 0) !== slideIndex) { return false; }
2016
+ }
2017
+ }
2018
+
2019
+ var direction;
2020
+ if (slideIndex > activeIndex) { direction = 'next'; }
2021
+ else if (slideIndex < activeIndex) { direction = 'prev'; }
2022
+ else { direction = 'reset'; }
2023
+
2024
+
2025
+ // Update Index
2026
+ if ((rtl && -translate === swiper.translate) || (!rtl && translate === swiper.translate)) {
2027
+ swiper.updateActiveIndex(slideIndex);
2028
+ // Update Height
2029
+ if (params.autoHeight) {
2030
+ swiper.updateAutoHeight();
2031
+ }
2032
+ swiper.updateSlidesClasses();
2033
+ if (params.effect !== 'slide') {
2034
+ swiper.setTranslate(translate);
2035
+ }
2036
+ if (direction !== 'reset') {
2037
+ swiper.transitionStart(runCallbacks, direction);
2038
+ swiper.transitionEnd(runCallbacks, direction);
2039
+ }
2040
+ return false;
2041
+ }
2042
+
2043
+ if (speed === 0 || !Support.transition) {
2044
+ swiper.setTransition(0);
2045
+ swiper.setTranslate(translate);
2046
+ swiper.updateActiveIndex(slideIndex);
2047
+ swiper.updateSlidesClasses();
2048
+ swiper.emit('beforeTransitionStart', speed, internal);
2049
+ swiper.transitionStart(runCallbacks, direction);
2050
+ swiper.transitionEnd(runCallbacks, direction);
2051
+ } else {
2052
+ swiper.setTransition(speed);
2053
+ swiper.setTranslate(translate);
2054
+ swiper.updateActiveIndex(slideIndex);
2055
+ swiper.updateSlidesClasses();
2056
+ swiper.emit('beforeTransitionStart', speed, internal);
2057
+ swiper.transitionStart(runCallbacks, direction);
2058
+ if (!swiper.animating) {
2059
+ swiper.animating = true;
2060
+ if (!swiper.onSlideToWrapperTransitionEnd) {
2061
+ swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
2062
+ if (!swiper || swiper.destroyed) { return; }
2063
+ if (e.target !== this) { return; }
2064
+ swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
2065
+ swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
2066
+ swiper.transitionEnd(runCallbacks, direction);
2067
+ };
2068
+ }
2069
+ swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
2070
+ swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd);
2071
+ }
2072
+ }
2073
+
2074
+ return true;
2075
+ }
2076
+
2077
+ function slideToLoop (index, speed, runCallbacks, internal) {
2078
+ if ( index === void 0 ) index = 0;
2079
+ if ( speed === void 0 ) speed = this.params.speed;
2080
+ if ( runCallbacks === void 0 ) runCallbacks = true;
2081
+
2082
+ var swiper = this;
2083
+ var newIndex = index;
2084
+ if (swiper.params.loop) {
2085
+ newIndex += swiper.loopedSlides;
2086
+ }
2087
+
2088
+ return swiper.slideTo(newIndex, speed, runCallbacks, internal);
2089
+ }
2090
+
2091
+ /* eslint no-unused-vars: "off" */
2092
+ function slideNext (speed, runCallbacks, internal) {
2093
+ if ( speed === void 0 ) speed = this.params.speed;
2094
+ if ( runCallbacks === void 0 ) runCallbacks = true;
2095
+
2096
+ var swiper = this;
2097
+ var params = swiper.params;
2098
+ var animating = swiper.animating;
2099
+ if (params.loop) {
2100
+ if (animating) { return false; }
2101
+ swiper.loopFix();
2102
+ // eslint-disable-next-line
2103
+ swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
2104
+ return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
2105
+ }
2106
+ return swiper.slideTo(swiper.activeIndex + params.slidesPerGroup, speed, runCallbacks, internal);
2107
+ }
2108
+
2109
+ /* eslint no-unused-vars: "off" */
2110
+ function slidePrev (speed, runCallbacks, internal) {
2111
+ if ( speed === void 0 ) speed = this.params.speed;
2112
+ if ( runCallbacks === void 0 ) runCallbacks = true;
2113
+
2114
+ var swiper = this;
2115
+ var params = swiper.params;
2116
+ var animating = swiper.animating;
2117
+ var snapGrid = swiper.snapGrid;
2118
+ var slidesGrid = swiper.slidesGrid;
2119
+ var rtlTranslate = swiper.rtlTranslate;
2120
+
2121
+ if (params.loop) {
2122
+ if (animating) { return false; }
2123
+ swiper.loopFix();
2124
+ // eslint-disable-next-line
2125
+ swiper._clientLeft = swiper.$wrapperEl[0].clientLeft;
2126
+ }
2127
+ var translate = rtlTranslate ? swiper.translate : -swiper.translate;
2128
+ function normalize(val) {
2129
+ if (val < 0) { return -Math.floor(Math.abs(val)); }
2130
+ return Math.floor(val);
2131
+ }
2132
+ var normalizedTranslate = normalize(translate);
2133
+ var normalizedSnapGrid = snapGrid.map(function (val) { return normalize(val); });
2134
+ var normalizedSlidesGrid = slidesGrid.map(function (val) { return normalize(val); });
2135
+
2136
+ var currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)];
2137
+ var prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
2138
+ var prevIndex;
2139
+ if (typeof prevSnap !== 'undefined') {
2140
+ prevIndex = slidesGrid.indexOf(prevSnap);
2141
+ if (prevIndex < 0) { prevIndex = swiper.activeIndex - 1; }
2142
+ }
2143
+ return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
2144
+ }
2145
+
2146
+ /* eslint no-unused-vars: "off" */
2147
+ function slideReset (speed, runCallbacks, internal) {
2148
+ if ( speed === void 0 ) speed = this.params.speed;
2149
+ if ( runCallbacks === void 0 ) runCallbacks = true;
2150
+
2151
+ var swiper = this;
2152
+ return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
2153
+ }
2154
+
2155
+ /* eslint no-unused-vars: "off" */
2156
+ function slideToClosest (speed, runCallbacks, internal) {
2157
+ if ( speed === void 0 ) speed = this.params.speed;
2158
+ if ( runCallbacks === void 0 ) runCallbacks = true;
2159
+
2160
+ var swiper = this;
2161
+ var index = swiper.activeIndex;
2162
+ var snapIndex = Math.floor(index / swiper.params.slidesPerGroup);
2163
+
2164
+ if (snapIndex < swiper.snapGrid.length - 1) {
2165
+ var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
2166
+
2167
+ var currentSnap = swiper.snapGrid[snapIndex];
2168
+ var nextSnap = swiper.snapGrid[snapIndex + 1];
2169
+
2170
+ if ((translate - currentSnap) > (nextSnap - currentSnap) / 2) {
2171
+ index = swiper.params.slidesPerGroup;
2172
+ }
2173
+ }
2174
+
2175
+ return swiper.slideTo(index, speed, runCallbacks, internal);
2176
+ }
2177
+
2178
+ function slideToClickedSlide () {
2179
+ var swiper = this;
2180
+ var params = swiper.params;
2181
+ var $wrapperEl = swiper.$wrapperEl;
2182
+
2183
+ var slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
2184
+ var slideToIndex = swiper.clickedIndex;
2185
+ var realIndex;
2186
+ if (params.loop) {
2187
+ if (swiper.animating) { return; }
2188
+ realIndex = parseInt($(swiper.clickedSlide).attr('data-swiper-slide-index'), 10);
2189
+ if (params.centeredSlides) {
2190
+ if (
2191
+ (slideToIndex < swiper.loopedSlides - (slidesPerView / 2)) ||
2192
+ (slideToIndex > (swiper.slides.length - swiper.loopedSlides) + (slidesPerView / 2))
2193
+ ) {
2194
+ swiper.loopFix();
2195
+ slideToIndex = $wrapperEl
2196
+ .children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")"))
2197
+ .eq(0)
2198
+ .index();
2199
+
2200
+ Utils.nextTick(function () {
2201
+ swiper.slideTo(slideToIndex);
2202
+ });
2203
+ } else {
2204
+ swiper.slideTo(slideToIndex);
2205
+ }
2206
+ } else if (slideToIndex > swiper.slides.length - slidesPerView) {
2207
+ swiper.loopFix();
2208
+ slideToIndex = $wrapperEl
2209
+ .children(("." + (params.slideClass) + "[data-swiper-slide-index=\"" + realIndex + "\"]:not(." + (params.slideDuplicateClass) + ")"))
2210
+ .eq(0)
2211
+ .index();
2212
+
2213
+ Utils.nextTick(function () {
2214
+ swiper.slideTo(slideToIndex);
2215
+ });
2216
+ } else {
2217
+ swiper.slideTo(slideToIndex);
2218
+ }
2219
+ } else {
2220
+ swiper.slideTo(slideToIndex);
2221
+ }
2222
+ }
2223
+
2224
+ var slide = {
2225
+ slideTo: slideTo,
2226
+ slideToLoop: slideToLoop,
2227
+ slideNext: slideNext,
2228
+ slidePrev: slidePrev,
2229
+ slideReset: slideReset,
2230
+ slideToClosest: slideToClosest,
2231
+ slideToClickedSlide: slideToClickedSlide,
2232
+ };
2233
+
2234
+ function loopCreate () {
2235
+ var swiper = this;
2236
+ var params = swiper.params;
2237
+ var $wrapperEl = swiper.$wrapperEl;
2238
+ // Remove duplicated slides
2239
+ $wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass))).remove();
2240
+
2241
+ var slides = $wrapperEl.children(("." + (params.slideClass)));
2242
+
2243
+ if (params.loopFillGroupWithBlank) {
2244
+ var blankSlidesNum = params.slidesPerGroup - (slides.length % params.slidesPerGroup);
2245
+ if (blankSlidesNum !== params.slidesPerGroup) {
2246
+ for (var i = 0; i < blankSlidesNum; i += 1) {
2247
+ var blankNode = $(doc.createElement('div')).addClass(((params.slideClass) + " " + (params.slideBlankClass)));
2248
+ $wrapperEl.append(blankNode);
2249
+ }
2250
+ slides = $wrapperEl.children(("." + (params.slideClass)));
2251
+ }
2252
+ }
2253
+
2254
+ if (params.slidesPerView === 'auto' && !params.loopedSlides) { params.loopedSlides = slides.length; }
2255
+
2256
+ swiper.loopedSlides = parseInt(params.loopedSlides || params.slidesPerView, 10);
2257
+ swiper.loopedSlides += params.loopAdditionalSlides;
2258
+ if (swiper.loopedSlides > slides.length) {
2259
+ swiper.loopedSlides = slides.length;
2260
+ }
2261
+
2262
+ var prependSlides = [];
2263
+ var appendSlides = [];
2264
+ slides.each(function (index, el) {
2265
+ var slide = $(el);
2266
+ if (index < swiper.loopedSlides) { appendSlides.push(el); }
2267
+ if (index < slides.length && index >= slides.length - swiper.loopedSlides) { prependSlides.push(el); }
2268
+ slide.attr('data-swiper-slide-index', index);
2269
+ });
2270
+ for (var i$1 = 0; i$1 < appendSlides.length; i$1 += 1) {
2271
+ $wrapperEl.append($(appendSlides[i$1].cloneNode(true)).addClass(params.slideDuplicateClass));
2272
+ }
2273
+ for (var i$2 = prependSlides.length - 1; i$2 >= 0; i$2 -= 1) {
2274
+ $wrapperEl.prepend($(prependSlides[i$2].cloneNode(true)).addClass(params.slideDuplicateClass));
2275
+ }
2276
+ }
2277
+
2278
+ function loopFix () {
2279
+ var swiper = this;
2280
+ var params = swiper.params;
2281
+ var activeIndex = swiper.activeIndex;
2282
+ var slides = swiper.slides;
2283
+ var loopedSlides = swiper.loopedSlides;
2284
+ var allowSlidePrev = swiper.allowSlidePrev;
2285
+ var allowSlideNext = swiper.allowSlideNext;
2286
+ var snapGrid = swiper.snapGrid;
2287
+ var rtl = swiper.rtlTranslate;
2288
+ var newIndex;
2289
+ swiper.allowSlidePrev = true;
2290
+ swiper.allowSlideNext = true;
2291
+
2292
+ var snapTranslate = -snapGrid[activeIndex];
2293
+ var diff = snapTranslate - swiper.getTranslate();
2294
+
2295
+
2296
+ // Fix For Negative Oversliding
2297
+ if (activeIndex < loopedSlides) {
2298
+ newIndex = (slides.length - (loopedSlides * 3)) + activeIndex;
2299
+ newIndex += loopedSlides;
2300
+ var slideChanged = swiper.slideTo(newIndex, 0, false, true);
2301
+ if (slideChanged && diff !== 0) {
2302
+ swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
2303
+ }
2304
+ } else if ((params.slidesPerView === 'auto' && activeIndex >= loopedSlides * 2) || (activeIndex >= slides.length - loopedSlides)) {
2305
+ // Fix For Positive Oversliding
2306
+ newIndex = -slides.length + activeIndex + loopedSlides;
2307
+ newIndex += loopedSlides;
2308
+ var slideChanged$1 = swiper.slideTo(newIndex, 0, false, true);
2309
+ if (slideChanged$1 && diff !== 0) {
2310
+ swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff);
2311
+ }
2312
+ }
2313
+ swiper.allowSlidePrev = allowSlidePrev;
2314
+ swiper.allowSlideNext = allowSlideNext;
2315
+ }
2316
+
2317
+ function loopDestroy () {
2318
+ var swiper = this;
2319
+ var $wrapperEl = swiper.$wrapperEl;
2320
+ var params = swiper.params;
2321
+ var slides = swiper.slides;
2322
+ $wrapperEl.children(("." + (params.slideClass) + "." + (params.slideDuplicateClass))).remove();
2323
+ slides.removeAttr('data-swiper-slide-index');
2324
+ }
2325
+
2326
+ var loop = {
2327
+ loopCreate: loopCreate,
2328
+ loopFix: loopFix,
2329
+ loopDestroy: loopDestroy,
2330
+ };
2331
+
2332
+ function setGrabCursor (moving) {
2333
+ var swiper = this;
2334
+ if (Support.touch || !swiper.params.simulateTouch || (swiper.params.watchOverflow && swiper.isLocked)) { return; }
2335
+ var el = swiper.el;
2336
+ el.style.cursor = 'move';
2337
+ el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab';
2338
+ el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab';
2339
+ el.style.cursor = moving ? 'grabbing' : 'grab';
2340
+ }
2341
+
2342
+ function unsetGrabCursor () {
2343
+ var swiper = this;
2344
+ if (Support.touch || (swiper.params.watchOverflow && swiper.isLocked)) { return; }
2345
+ swiper.el.style.cursor = '';
2346
+ }
2347
+
2348
+ var grabCursor = {
2349
+ setGrabCursor: setGrabCursor,
2350
+ unsetGrabCursor: unsetGrabCursor,
2351
+ };
2352
+
2353
+ function appendSlide (slides) {
2354
+ var swiper = this;
2355
+ var $wrapperEl = swiper.$wrapperEl;
2356
+ var params = swiper.params;
2357
+ if (params.loop) {
2358
+ swiper.loopDestroy();
2359
+ }
2360
+ if (typeof slides === 'object' && 'length' in slides) {
2361
+ for (var i = 0; i < slides.length; i += 1) {
2362
+ if (slides[i]) { $wrapperEl.append(slides[i]); }
2363
+ }
2364
+ } else {
2365
+ $wrapperEl.append(slides);
2366
+ }
2367
+ if (params.loop) {
2368
+ swiper.loopCreate();
2369
+ }
2370
+ if (!(params.observer && Support.observer)) {
2371
+ swiper.update();
2372
+ }
2373
+ }
2374
+
2375
+ function prependSlide (slides) {
2376
+ var swiper = this;
2377
+ var params = swiper.params;
2378
+ var $wrapperEl = swiper.$wrapperEl;
2379
+ var activeIndex = swiper.activeIndex;
2380
+
2381
+ if (params.loop) {
2382
+ swiper.loopDestroy();
2383
+ }
2384
+ var newActiveIndex = activeIndex + 1;
2385
+ if (typeof slides === 'object' && 'length' in slides) {
2386
+ for (var i = 0; i < slides.length; i += 1) {
2387
+ if (slides[i]) { $wrapperEl.prepend(slides[i]); }
2388
+ }
2389
+ newActiveIndex = activeIndex + slides.length;
2390
+ } else {
2391
+ $wrapperEl.prepend(slides);
2392
+ }
2393
+ if (params.loop) {
2394
+ swiper.loopCreate();
2395
+ }
2396
+ if (!(params.observer && Support.observer)) {
2397
+ swiper.update();
2398
+ }
2399
+ swiper.slideTo(newActiveIndex, 0, false);
2400
+ }
2401
+
2402
+ function addSlide (index, slides) {
2403
+ var swiper = this;
2404
+ var $wrapperEl = swiper.$wrapperEl;
2405
+ var params = swiper.params;
2406
+ var activeIndex = swiper.activeIndex;
2407
+ var activeIndexBuffer = activeIndex;
2408
+ if (params.loop) {
2409
+ activeIndexBuffer -= swiper.loopedSlides;
2410
+ swiper.loopDestroy();
2411
+ swiper.slides = $wrapperEl.children(("." + (params.slideClass)));
2412
+ }
2413
+ var baseLength = swiper.slides.length;
2414
+ if (index <= 0) {
2415
+ swiper.prependSlide(slides);
2416
+ return;
2417
+ } else if (index >= baseLength) {
2418
+ swiper.appendSlide(slides);
2419
+ return;
2420
+ }
2421
+ var newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer;
2422
+
2423
+ var slidesBuffer = [];
2424
+ for (var i = baseLength - 1; i >= index; i -= 1) {
2425
+ var currentSlide = swiper.slides.eq(i);
2426
+ currentSlide.remove();
2427
+ slidesBuffer.unshift(currentSlide);
2428
+ }
2429
+
2430
+ if (typeof slides === 'object' && 'length' in slides) {
2431
+ for (var i$1 = 0; i$1 < slides.length; i$1 += 1) {
2432
+ if (slides[i$1]) { $wrapperEl.append(slides[i$1]); }
2433
+ }
2434
+ newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer;
2435
+ } else {
2436
+ $wrapperEl.append(slides);
2437
+ }
2438
+
2439
+ for (var i$2 = 0; i$2 < slidesBuffer.length; i$2 += 1) {
2440
+ $wrapperEl.append(slidesBuffer[i$2]);
2441
+ }
2442
+
2443
+ if (params.loop) {
2444
+ swiper.loopCreate();
2445
+ }
2446
+ if (!(params.observer && Support.observer)) {
2447
+ swiper.update();
2448
+ }
2449
+ if (params.loop) {
2450
+ swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
2451
+ } else {
2452
+ swiper.slideTo(newActiveIndex, 0, false);
2453
+ }
2454
+ }
2455
+
2456
+ function removeSlide (slidesIndexes) {
2457
+ var swiper = this;
2458
+ var params = swiper.params;
2459
+ var $wrapperEl = swiper.$wrapperEl;
2460
+ var activeIndex = swiper.activeIndex;
2461
+
2462
+ var activeIndexBuffer = activeIndex;
2463
+ if (params.loop) {
2464
+ activeIndexBuffer -= swiper.loopedSlides;
2465
+ swiper.loopDestroy();
2466
+ swiper.slides = $wrapperEl.children(("." + (params.slideClass)));
2467
+ }
2468
+ var newActiveIndex = activeIndexBuffer;
2469
+ var indexToRemove;
2470
+
2471
+ if (typeof slidesIndexes === 'object' && 'length' in slidesIndexes) {
2472
+ for (var i = 0; i < slidesIndexes.length; i += 1) {
2473
+ indexToRemove = slidesIndexes[i];
2474
+ if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); }
2475
+ if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; }
2476
+ }
2477
+ newActiveIndex = Math.max(newActiveIndex, 0);
2478
+ } else {
2479
+ indexToRemove = slidesIndexes;
2480
+ if (swiper.slides[indexToRemove]) { swiper.slides.eq(indexToRemove).remove(); }
2481
+ if (indexToRemove < newActiveIndex) { newActiveIndex -= 1; }
2482
+ newActiveIndex = Math.max(newActiveIndex, 0);
2483
+ }
2484
+
2485
+ if (params.loop) {
2486
+ swiper.loopCreate();
2487
+ }
2488
+
2489
+ if (!(params.observer && Support.observer)) {
2490
+ swiper.update();
2491
+ }
2492
+ if (params.loop) {
2493
+ swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false);
2494
+ } else {
2495
+ swiper.slideTo(newActiveIndex, 0, false);
2496
+ }
2497
+ }
2498
+
2499
+ function removeAllSlides () {
2500
+ var swiper = this;
2501
+
2502
+ var slidesIndexes = [];
2503
+ for (var i = 0; i < swiper.slides.length; i += 1) {
2504
+ slidesIndexes.push(i);
2505
+ }
2506
+ swiper.removeSlide(slidesIndexes);
2507
+ }
2508
+
2509
+ var manipulation = {
2510
+ appendSlide: appendSlide,
2511
+ prependSlide: prependSlide,
2512
+ addSlide: addSlide,
2513
+ removeSlide: removeSlide,
2514
+ removeAllSlides: removeAllSlides,
2515
+ };
2516
+
2517
+ var Device = (function Device() {
2518
+ var ua = win.navigator.userAgent;
2519
+
2520
+ var device = {
2521
+ ios: false,
2522
+ android: false,
2523
+ androidChrome: false,
2524
+ desktop: false,
2525
+ windows: false,
2526
+ iphone: false,
2527
+ ipod: false,
2528
+ ipad: false,
2529
+ cordova: win.cordova || win.phonegap,
2530
+ phonegap: win.cordova || win.phonegap,
2531
+ };
2532
+
2533
+ var windows = ua.match(/(Windows Phone);?[\s\/]+([\d.]+)?/); // eslint-disable-line
2534
+ var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
2535
+ var ipad = ua.match(/(iPad).*OS\s([\d_]+)/);
2536
+ var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
2537
+ var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
2538
+
2539
+
2540
+ // Windows
2541
+ if (windows) {
2542
+ device.os = 'windows';
2543
+ device.osVersion = windows[2];
2544
+ device.windows = true;
2545
+ }
2546
+ // Android
2547
+ if (android && !windows) {
2548
+ device.os = 'android';
2549
+ device.osVersion = android[2];
2550
+ device.android = true;
2551
+ device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0;
2552
+ }
2553
+ if (ipad || iphone || ipod) {
2554
+ device.os = 'ios';
2555
+ device.ios = true;
2556
+ }
2557
+ // iOS
2558
+ if (iphone && !ipod) {
2559
+ device.osVersion = iphone[2].replace(/_/g, '.');
2560
+ device.iphone = true;
2561
+ }
2562
+ if (ipad) {
2563
+ device.osVersion = ipad[2].replace(/_/g, '.');
2564
+ device.ipad = true;
2565
+ }
2566
+ if (ipod) {
2567
+ device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null;
2568
+ device.iphone = true;
2569
+ }
2570
+ // iOS 8+ changed UA
2571
+ if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) {
2572
+ if (device.osVersion.split('.')[0] === '10') {
2573
+ device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0];
2574
+ }
2575
+ }
2576
+
2577
+ // Desktop
2578
+ device.desktop = !(device.os || device.android || device.webView);
2579
+
2580
+ // Webview
2581
+ device.webView = (iphone || ipad || ipod) && ua.match(/.*AppleWebKit(?!.*Safari)/i);
2582
+
2583
+ // Minimal UI
2584
+ if (device.os && device.os === 'ios') {
2585
+ var osVersionArr = device.osVersion.split('.');
2586
+ var metaViewport = doc.querySelector('meta[name="viewport"]');
2587
+ device.minimalUi =
2588
+ !device.webView &&
2589
+ (ipod || iphone) &&
2590
+ (osVersionArr[0] * 1 === 7 ? osVersionArr[1] * 1 >= 1 : osVersionArr[0] * 1 > 7) &&
2591
+ metaViewport && metaViewport.getAttribute('content').indexOf('minimal-ui') >= 0;
2592
+ }
2593
+
2594
+ // Pixel Ratio
2595
+ device.pixelRatio = win.devicePixelRatio || 1;
2596
+
2597
+ // Export object
2598
+ return device;
2599
+ }());
2600
+
2601
+ function onTouchStart (event) {
2602
+ var swiper = this;
2603
+ var data = swiper.touchEventsData;
2604
+ var params = swiper.params;
2605
+ var touches = swiper.touches;
2606
+ if (swiper.animating && params.preventIntercationOnTransition) {
2607
+ return;
2608
+ }
2609
+ var e = event;
2610
+ if (e.originalEvent) { e = e.originalEvent; }
2611
+ data.isTouchEvent = e.type === 'touchstart';
2612
+ if (!data.isTouchEvent && 'which' in e && e.which === 3) { return; }
2613
+ if (data.isTouched && data.isMoved) { return; }
2614
+ if (params.noSwiping && $(e.target).closest(params.noSwipingSelector ? params.noSwipingSelector : ("." + (params.noSwipingClass)))[0]) {
2615
+ swiper.allowClick = true;
2616
+ return;
2617
+ }
2618
+ if (params.swipeHandler) {
2619
+ if (!$(e).closest(params.swipeHandler)[0]) { return; }
2620
+ }
2621
+
2622
+ touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
2623
+ touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
2624
+ var startX = touches.currentX;
2625
+ var startY = touches.currentY;
2626
+
2627
+ // Do NOT start if iOS edge swipe is detected. Otherwise iOS app (UIWebView) cannot swipe-to-go-back anymore
2628
+
2629
+ if (
2630
+ Device.ios &&
2631
+ !Device.cordova &&
2632
+ params.iOSEdgeSwipeDetection &&
2633
+ ((startX <= params.iOSEdgeSwipeThreshold) ||
2634
+ (startX >= win.screen.width - params.iOSEdgeSwipeThreshold))
2635
+ ) {
2636
+ return;
2637
+ }
2638
+
2639
+ Utils.extend(data, {
2640
+ isTouched: true,
2641
+ isMoved: false,
2642
+ allowTouchCallbacks: true,
2643
+ isScrolling: undefined,
2644
+ startMoving: undefined,
2645
+ });
2646
+
2647
+ touches.startX = startX;
2648
+ touches.startY = startY;
2649
+ data.touchStartTime = Utils.now();
2650
+ swiper.allowClick = true;
2651
+ swiper.updateSize();
2652
+ swiper.swipeDirection = undefined;
2653
+ if (params.threshold > 0) { data.allowThresholdMove = false; }
2654
+ if (e.type !== 'touchstart') {
2655
+ var preventDefault = true;
2656
+ if ($(e.target).is(data.formElements)) { preventDefault = false; }
2657
+ if (
2658
+ doc.activeElement &&
2659
+ $(doc.activeElement).is(data.formElements) &&
2660
+ doc.activeElement !== e.target
2661
+ ) {
2662
+ doc.activeElement.blur();
2663
+ }
2664
+ if (preventDefault && swiper.allowTouchMove) {
2665
+ e.preventDefault();
2666
+ }
2667
+ }
2668
+ swiper.emit('touchStart', e);
2669
+ }
2670
+
2671
+ function onTouchMove (event) {
2672
+ var swiper = this;
2673
+ var data = swiper.touchEventsData;
2674
+ var params = swiper.params;
2675
+ var touches = swiper.touches;
2676
+ var rtl = swiper.rtlTranslate;
2677
+ var e = event;
2678
+ if (e.originalEvent) { e = e.originalEvent; }
2679
+ if (!data.isTouched) {
2680
+ if (data.startMoving && data.isScrolling) {
2681
+ swiper.emit('touchMoveOpposite', e);
2682
+ }
2683
+ return;
2684
+ }
2685
+ if (data.isTouchEvent && e.type === 'mousemove') { return; }
2686
+ var pageX = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
2687
+ var pageY = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
2688
+ if (e.preventedByNestedSwiper) {
2689
+ touches.startX = pageX;
2690
+ touches.startY = pageY;
2691
+ return;
2692
+ }
2693
+ if (!swiper.allowTouchMove) {
2694
+ // isMoved = true;
2695
+ swiper.allowClick = false;
2696
+ if (data.isTouched) {
2697
+ Utils.extend(touches, {
2698
+ startX: pageX,
2699
+ startY: pageY,
2700
+ currentX: pageX,
2701
+ currentY: pageY,
2702
+ });
2703
+ data.touchStartTime = Utils.now();
2704
+ }
2705
+ return;
2706
+ }
2707
+ if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) {
2708
+ if (swiper.isVertical()) {
2709
+ // Vertical
2710
+ if (
2711
+ (pageY < touches.startY && swiper.translate <= swiper.maxTranslate()) ||
2712
+ (pageY > touches.startY && swiper.translate >= swiper.minTranslate())
2713
+ ) {
2714
+ data.isTouched = false;
2715
+ data.isMoved = false;
2716
+ return;
2717
+ }
2718
+ } else if (
2719
+ (pageX < touches.startX && swiper.translate <= swiper.maxTranslate()) ||
2720
+ (pageX > touches.startX && swiper.translate >= swiper.minTranslate())
2721
+ ) {
2722
+ return;
2723
+ }
2724
+ }
2725
+ if (data.isTouchEvent && doc.activeElement) {
2726
+ if (e.target === doc.activeElement && $(e.target).is(data.formElements)) {
2727
+ data.isMoved = true;
2728
+ swiper.allowClick = false;
2729
+ return;
2730
+ }
2731
+ }
2732
+ if (data.allowTouchCallbacks) {
2733
+ swiper.emit('touchMove', e);
2734
+ }
2735
+ if (e.targetTouches && e.targetTouches.length > 1) { return; }
2736
+
2737
+ touches.currentX = pageX;
2738
+ touches.currentY = pageY;
2739
+
2740
+ var diffX = touches.currentX - touches.startX;
2741
+ var diffY = touches.currentY - touches.startY;
2742
+
2743
+ if (typeof data.isScrolling === 'undefined') {
2744
+ var touchAngle;
2745
+ if ((swiper.isHorizontal() && touches.currentY === touches.startY) || (swiper.isVertical() && touches.currentX === touches.startX)) {
2746
+ data.isScrolling = false;
2747
+ } else {
2748
+ // eslint-disable-next-line
2749
+ if ((diffX * diffX) + (diffY * diffY) >= 25) {
2750
+ touchAngle = (Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180) / Math.PI;
2751
+ data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : (90 - touchAngle > params.touchAngle);
2752
+ }
2753
+ }
2754
+ }
2755
+ if (data.isScrolling) {
2756
+ swiper.emit('touchMoveOpposite', e);
2757
+ }
2758
+ if (typeof startMoving === 'undefined') {
2759
+ if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
2760
+ data.startMoving = true;
2761
+ }
2762
+ }
2763
+ if (data.isScrolling) {
2764
+ data.isTouched = false;
2765
+ return;
2766
+ }
2767
+ if (!data.startMoving) {
2768
+ return;
2769
+ }
2770
+ swiper.allowClick = false;
2771
+ e.preventDefault();
2772
+ if (params.touchMoveStopPropagation && !params.nested) {
2773
+ e.stopPropagation();
2774
+ }
2775
+
2776
+ if (!data.isMoved) {
2777
+ if (params.loop) {
2778
+ swiper.loopFix();
2779
+ }
2780
+ data.startTranslate = swiper.getTranslate();
2781
+ swiper.setTransition(0);
2782
+ if (swiper.animating) {
2783
+ swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend');
2784
+ }
2785
+ data.allowMomentumBounce = false;
2786
+ // Grab Cursor
2787
+ if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2788
+ swiper.setGrabCursor(true);
2789
+ }
2790
+ swiper.emit('sliderFirstMove', e);
2791
+ }
2792
+ swiper.emit('sliderMove', e);
2793
+ data.isMoved = true;
2794
+
2795
+ var diff = swiper.isHorizontal() ? diffX : diffY;
2796
+ touches.diff = diff;
2797
+
2798
+ diff *= params.touchRatio;
2799
+ if (rtl) { diff = -diff; }
2800
+
2801
+ swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
2802
+ data.currentTranslate = diff + data.startTranslate;
2803
+
2804
+ var disableParentSwiper = true;
2805
+ var resistanceRatio = params.resistanceRatio;
2806
+ if (params.touchReleaseOnEdges) {
2807
+ resistanceRatio = 0;
2808
+ }
2809
+ if ((diff > 0 && data.currentTranslate > swiper.minTranslate())) {
2810
+ disableParentSwiper = false;
2811
+ if (params.resistance) { data.currentTranslate = (swiper.minTranslate() - 1) + (Math.pow( (-swiper.minTranslate() + data.startTranslate + diff), resistanceRatio )); }
2812
+ } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) {
2813
+ disableParentSwiper = false;
2814
+ if (params.resistance) { data.currentTranslate = (swiper.maxTranslate() + 1) - (Math.pow( (swiper.maxTranslate() - data.startTranslate - diff), resistanceRatio )); }
2815
+ }
2816
+
2817
+ if (disableParentSwiper) {
2818
+ e.preventedByNestedSwiper = true;
2819
+ }
2820
+
2821
+ // Directions locks
2822
+ if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {
2823
+ data.currentTranslate = data.startTranslate;
2824
+ }
2825
+ if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {
2826
+ data.currentTranslate = data.startTranslate;
2827
+ }
2828
+
2829
+
2830
+ // Threshold
2831
+ if (params.threshold > 0) {
2832
+ if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
2833
+ if (!data.allowThresholdMove) {
2834
+ data.allowThresholdMove = true;
2835
+ touches.startX = touches.currentX;
2836
+ touches.startY = touches.currentY;
2837
+ data.currentTranslate = data.startTranslate;
2838
+ touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
2839
+ return;
2840
+ }
2841
+ } else {
2842
+ data.currentTranslate = data.startTranslate;
2843
+ return;
2844
+ }
2845
+ }
2846
+
2847
+ if (!params.followFinger) { return; }
2848
+
2849
+ // Update active index in free mode
2850
+ if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) {
2851
+ swiper.updateActiveIndex();
2852
+ swiper.updateSlidesClasses();
2853
+ }
2854
+ if (params.freeMode) {
2855
+ // Velocity
2856
+ if (data.velocities.length === 0) {
2857
+ data.velocities.push({
2858
+ position: touches[swiper.isHorizontal() ? 'startX' : 'startY'],
2859
+ time: data.touchStartTime,
2860
+ });
2861
+ }
2862
+ data.velocities.push({
2863
+ position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'],
2864
+ time: Utils.now(),
2865
+ });
2866
+ }
2867
+ // Update progress
2868
+ swiper.updateProgress(data.currentTranslate);
2869
+ // Update translate
2870
+ swiper.setTranslate(data.currentTranslate);
2871
+ }
2872
+
2873
+ function onTouchEnd (event) {
2874
+ var swiper = this;
2875
+ var data = swiper.touchEventsData;
2876
+
2877
+ var params = swiper.params;
2878
+ var touches = swiper.touches;
2879
+ var rtl = swiper.rtlTranslate;
2880
+ var $wrapperEl = swiper.$wrapperEl;
2881
+ var slidesGrid = swiper.slidesGrid;
2882
+ var snapGrid = swiper.snapGrid;
2883
+ var e = event;
2884
+ if (e.originalEvent) { e = e.originalEvent; }
2885
+ if (data.allowTouchCallbacks) {
2886
+ swiper.emit('touchEnd', e);
2887
+ }
2888
+ data.allowTouchCallbacks = false;
2889
+ if (!data.isTouched) {
2890
+ if (data.isMoved && params.grabCursor) {
2891
+ swiper.setGrabCursor(false);
2892
+ }
2893
+ data.isMoved = false;
2894
+ data.startMoving = false;
2895
+ return;
2896
+ }
2897
+ // Return Grab Cursor
2898
+ if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2899
+ swiper.setGrabCursor(false);
2900
+ }
2901
+
2902
+ // Time diff
2903
+ var touchEndTime = Utils.now();
2904
+ var timeDiff = touchEndTime - data.touchStartTime;
2905
+
2906
+ // Tap, doubleTap, Click
2907
+ if (swiper.allowClick) {
2908
+ swiper.updateClickedSlide(e);
2909
+ swiper.emit('tap', e);
2910
+ if (timeDiff < 300 && (touchEndTime - data.lastClickTime) > 300) {
2911
+ if (data.clickTimeout) { clearTimeout(data.clickTimeout); }
2912
+ data.clickTimeout = Utils.nextTick(function () {
2913
+ if (!swiper || swiper.destroyed) { return; }
2914
+ swiper.emit('click', e);
2915
+ }, 300);
2916
+ }
2917
+ if (timeDiff < 300 && (touchEndTime - data.lastClickTime) < 300) {
2918
+ if (data.clickTimeout) { clearTimeout(data.clickTimeout); }
2919
+ swiper.emit('doubleTap', e);
2920
+ }
2921
+ }
2922
+
2923
+ data.lastClickTime = Utils.now();
2924
+ Utils.nextTick(function () {
2925
+ if (!swiper.destroyed) { swiper.allowClick = true; }
2926
+ });
2927
+
2928
+ if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) {
2929
+ data.isTouched = false;
2930
+ data.isMoved = false;
2931
+ data.startMoving = false;
2932
+ return;
2933
+ }
2934
+ data.isTouched = false;
2935
+ data.isMoved = false;
2936
+ data.startMoving = false;
2937
+
2938
+ var currentPos;
2939
+ if (params.followFinger) {
2940
+ currentPos = rtl ? swiper.translate : -swiper.translate;
2941
+ } else {
2942
+ currentPos = -data.currentTranslate;
2943
+ }
2944
+
2945
+ if (params.freeMode) {
2946
+ if (currentPos < -swiper.minTranslate()) {
2947
+ swiper.slideTo(swiper.activeIndex);
2948
+ return;
2949
+ } else if (currentPos > -swiper.maxTranslate()) {
2950
+ if (swiper.slides.length < snapGrid.length) {
2951
+ swiper.slideTo(snapGrid.length - 1);
2952
+ } else {
2953
+ swiper.slideTo(swiper.slides.length - 1);
2954
+ }
2955
+ return;
2956
+ }
2957
+
2958
+ if (params.freeModeMomentum) {
2959
+ if (data.velocities.length > 1) {
2960
+ var lastMoveEvent = data.velocities.pop();
2961
+ var velocityEvent = data.velocities.pop();
2962
+
2963
+ var distance = lastMoveEvent.position - velocityEvent.position;
2964
+ var time = lastMoveEvent.time - velocityEvent.time;
2965
+ swiper.velocity = distance / time;
2966
+ swiper.velocity /= 2;
2967
+ if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) {
2968
+ swiper.velocity = 0;
2969
+ }
2970
+ // this implies that the user stopped moving a finger then released.
2971
+ // There would be no events with distance zero, so the last event is stale.
2972
+ if (time > 150 || (Utils.now() - lastMoveEvent.time) > 300) {
2973
+ swiper.velocity = 0;
2974
+ }
2975
+ } else {
2976
+ swiper.velocity = 0;
2977
+ }
2978
+ swiper.velocity *= params.freeModeMomentumVelocityRatio;
2979
+
2980
+ data.velocities.length = 0;
2981
+ var momentumDuration = 1000 * params.freeModeMomentumRatio;
2982
+ var momentumDistance = swiper.velocity * momentumDuration;
2983
+
2984
+ var newPosition = swiper.translate + momentumDistance;
2985
+ if (rtl) { newPosition = -newPosition; }
2986
+
2987
+ var doBounce = false;
2988
+ var afterBouncePosition;
2989
+ var bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio;
2990
+ var needsLoopFix;
2991
+ if (newPosition < swiper.maxTranslate()) {
2992
+ if (params.freeModeMomentumBounce) {
2993
+ if (newPosition + swiper.maxTranslate() < -bounceAmount) {
2994
+ newPosition = swiper.maxTranslate() - bounceAmount;
2995
+ }
2996
+ afterBouncePosition = swiper.maxTranslate();
2997
+ doBounce = true;
2998
+ data.allowMomentumBounce = true;
2999
+ } else {
3000
+ newPosition = swiper.maxTranslate();
3001
+ }
3002
+ if (params.loop && params.centeredSlides) { needsLoopFix = true; }
3003
+ } else if (newPosition > swiper.minTranslate()) {
3004
+ if (params.freeModeMomentumBounce) {
3005
+ if (newPosition - swiper.minTranslate() > bounceAmount) {
3006
+ newPosition = swiper.minTranslate() + bounceAmount;
3007
+ }
3008
+ afterBouncePosition = swiper.minTranslate();
3009
+ doBounce = true;
3010
+ data.allowMomentumBounce = true;
3011
+ } else {
3012
+ newPosition = swiper.minTranslate();
3013
+ }
3014
+ if (params.loop && params.centeredSlides) { needsLoopFix = true; }
3015
+ } else if (params.freeModeSticky) {
3016
+ var nextSlide;
3017
+ for (var j = 0; j < snapGrid.length; j += 1) {
3018
+ if (snapGrid[j] > -newPosition) {
3019
+ nextSlide = j;
3020
+ break;
3021
+ }
3022
+ }
3023
+
3024
+ if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') {
3025
+ newPosition = snapGrid[nextSlide];
3026
+ } else {
3027
+ newPosition = snapGrid[nextSlide - 1];
3028
+ }
3029
+ newPosition = -newPosition;
3030
+ }
3031
+ if (needsLoopFix) {
3032
+ swiper.once('transitionEnd', function () {
3033
+ swiper.loopFix();
3034
+ });
3035
+ }
3036
+ // Fix duration
3037
+ if (swiper.velocity !== 0) {
3038
+ if (rtl) {
3039
+ momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity);
3040
+ } else {
3041
+ momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity);
3042
+ }
3043
+ } else if (params.freeModeSticky) {
3044
+ swiper.slideToClosest();
3045
+ return;
3046
+ }
3047
+
3048
+ if (params.freeModeMomentumBounce && doBounce) {
3049
+ swiper.updateProgress(afterBouncePosition);
3050
+ swiper.setTransition(momentumDuration);
3051
+ swiper.setTranslate(newPosition);
3052
+ swiper.transitionStart(true, swiper.swipeDirection);
3053
+ swiper.animating = true;
3054
+ $wrapperEl.transitionEnd(function () {
3055
+ if (!swiper || swiper.destroyed || !data.allowMomentumBounce) { return; }
3056
+ swiper.emit('momentumBounce');
3057
+
3058
+ swiper.setTransition(params.speed);
3059
+ swiper.setTranslate(afterBouncePosition);
3060
+ $wrapperEl.transitionEnd(function () {
3061
+ if (!swiper || swiper.destroyed) { return; }
3062
+ swiper.transitionEnd();
3063
+ });
3064
+ });
3065
+ } else if (swiper.velocity) {
3066
+ swiper.updateProgress(newPosition);
3067
+ swiper.setTransition(momentumDuration);
3068
+ swiper.setTranslate(newPosition);
3069
+ swiper.transitionStart(true, swiper.swipeDirection);
3070
+ if (!swiper.animating) {
3071
+ swiper.animating = true;
3072
+ $wrapperEl.transitionEnd(function () {
3073
+ if (!swiper || swiper.destroyed) { return; }
3074
+ swiper.transitionEnd();
3075
+ });
3076
+ }
3077
+ } else {
3078
+ swiper.updateProgress(newPosition);
3079
+ }
3080
+
3081
+ swiper.updateActiveIndex();
3082
+ swiper.updateSlidesClasses();
3083
+ } else if (params.freeModeSticky) {
3084
+ swiper.slideToClosest();
3085
+ return;
3086
+ }
3087
+
3088
+ if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) {
3089
+ swiper.updateProgress();
3090
+ swiper.updateActiveIndex();
3091
+ swiper.updateSlidesClasses();
3092
+ }
3093
+ return;
3094
+ }
3095
+
3096
+ // Find current slide
3097
+ var stopIndex = 0;
3098
+ var groupSize = swiper.slidesSizesGrid[0];
3099
+ for (var i = 0; i < slidesGrid.length; i += params.slidesPerGroup) {
3100
+ if (typeof slidesGrid[i + params.slidesPerGroup] !== 'undefined') {
3101
+ if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + params.slidesPerGroup]) {
3102
+ stopIndex = i;
3103
+ groupSize = slidesGrid[i + params.slidesPerGroup] - slidesGrid[i];
3104
+ }
3105
+ } else if (currentPos >= slidesGrid[i]) {
3106
+ stopIndex = i;
3107
+ groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
3108
+ }
3109
+ }
3110
+
3111
+ // Find current slide size
3112
+ var ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
3113
+
3114
+ if (timeDiff > params.longSwipesMs) {
3115
+ // Long touches
3116
+ if (!params.longSwipes) {
3117
+ swiper.slideTo(swiper.activeIndex);
3118
+ return;
3119
+ }
3120
+ if (swiper.swipeDirection === 'next') {
3121
+ if (ratio >= params.longSwipesRatio) { swiper.slideTo(stopIndex + params.slidesPerGroup); }
3122
+ else { swiper.slideTo(stopIndex); }
3123
+ }
3124
+ if (swiper.swipeDirection === 'prev') {
3125
+ if (ratio > (1 - params.longSwipesRatio)) { swiper.slideTo(stopIndex + params.slidesPerGroup); }
3126
+ else { swiper.slideTo(stopIndex); }
3127
+ }
3128
+ } else {
3129
+ // Short swipes
3130
+ if (!params.shortSwipes) {
3131
+ swiper.slideTo(swiper.activeIndex);
3132
+ return;
3133
+ }
3134
+ if (swiper.swipeDirection === 'next') {
3135
+ swiper.slideTo(stopIndex + params.slidesPerGroup);
3136
+ }
3137
+ if (swiper.swipeDirection === 'prev') {
3138
+ swiper.slideTo(stopIndex);
3139
+ }
3140
+ }
3141
+ }
3142
+
3143
+ function onResize () {
3144
+ var swiper = this;
3145
+
3146
+ var params = swiper.params;
3147
+ var el = swiper.el;
3148
+
3149
+ if (el && el.offsetWidth === 0) { return; }
3150
+
3151
+ // Breakpoints
3152
+ if (params.breakpoints) {
3153
+ swiper.setBreakpoint();
3154
+ }
3155
+
3156
+ // Save locks
3157
+ var allowSlideNext = swiper.allowSlideNext;
3158
+ var allowSlidePrev = swiper.allowSlidePrev;
3159
+ var snapGrid = swiper.snapGrid;
3160
+
3161
+ // Disable locks on resize
3162
+ swiper.allowSlideNext = true;
3163
+ swiper.allowSlidePrev = true;
3164
+
3165
+ swiper.updateSize();
3166
+ swiper.updateSlides();
3167
+
3168
+ if (params.freeMode) {
3169
+ var newTranslate = Math.min(Math.max(swiper.translate, swiper.maxTranslate()), swiper.minTranslate());
3170
+ swiper.setTranslate(newTranslate);
3171
+ swiper.updateActiveIndex();
3172
+ swiper.updateSlidesClasses();
3173
+
3174
+ if (params.autoHeight) {
3175
+ swiper.updateAutoHeight();
3176
+ }
3177
+ } else {
3178
+ swiper.updateSlidesClasses();
3179
+ if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
3180
+ swiper.slideTo(swiper.slides.length - 1, 0, false, true);
3181
+ } else {
3182
+ swiper.slideTo(swiper.activeIndex, 0, false, true);
3183
+ }
3184
+ }
3185
+ // Return locks after resize
3186
+ swiper.allowSlidePrev = allowSlidePrev;
3187
+ swiper.allowSlideNext = allowSlideNext;
3188
+
3189
+ if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
3190
+ swiper.checkOverflow();
3191
+ }
3192
+ }
3193
+
3194
+ function onClick (e) {
3195
+ var swiper = this;
3196
+ if (!swiper.allowClick) {
3197
+ if (swiper.params.preventClicks) { e.preventDefault(); }
3198
+ if (swiper.params.preventClicksPropagation && swiper.animating) {
3199
+ e.stopPropagation();
3200
+ e.stopImmediatePropagation();
3201
+ }
3202
+ }
3203
+ }
3204
+
3205
+ function attachEvents() {
3206
+ var swiper = this;
3207
+ var params = swiper.params;
3208
+ var touchEvents = swiper.touchEvents;
3209
+ var el = swiper.el;
3210
+ var wrapperEl = swiper.wrapperEl;
3211
+
3212
+ {
3213
+ swiper.onTouchStart = onTouchStart.bind(swiper);
3214
+ swiper.onTouchMove = onTouchMove.bind(swiper);
3215
+ swiper.onTouchEnd = onTouchEnd.bind(swiper);
3216
+ }
3217
+
3218
+ swiper.onClick = onClick.bind(swiper);
3219
+
3220
+ var target = params.touchEventsTarget === 'container' ? el : wrapperEl;
3221
+ var capture = !!params.nested;
3222
+
3223
+ // Touch Events
3224
+ {
3225
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
3226
+ target.addEventListener(touchEvents.start, swiper.onTouchStart, false);
3227
+ doc.addEventListener(touchEvents.move, swiper.onTouchMove, capture);
3228
+ doc.addEventListener(touchEvents.end, swiper.onTouchEnd, false);
3229
+ } else {
3230
+ if (Support.touch) {
3231
+ var passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
3232
+ target.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
3233
+ target.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { passive: false, capture: capture } : capture);
3234
+ target.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
3235
+ }
3236
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
3237
+ target.addEventListener('mousedown', swiper.onTouchStart, false);
3238
+ doc.addEventListener('mousemove', swiper.onTouchMove, capture);
3239
+ doc.addEventListener('mouseup', swiper.onTouchEnd, false);
3240
+ }
3241
+ }
3242
+ // Prevent Links Clicks
3243
+ if (params.preventClicks || params.preventClicksPropagation) {
3244
+ target.addEventListener('click', swiper.onClick, true);
3245
+ }
3246
+ }
3247
+
3248
+ // Resize handler
3249
+ swiper.on((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize, true);
3250
+ }
3251
+
3252
+ function detachEvents() {
3253
+ var swiper = this;
3254
+
3255
+ var params = swiper.params;
3256
+ var touchEvents = swiper.touchEvents;
3257
+ var el = swiper.el;
3258
+ var wrapperEl = swiper.wrapperEl;
3259
+
3260
+ var target = params.touchEventsTarget === 'container' ? el : wrapperEl;
3261
+ var capture = !!params.nested;
3262
+
3263
+ // Touch Events
3264
+ {
3265
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
3266
+ target.removeEventListener(touchEvents.start, swiper.onTouchStart, false);
3267
+ doc.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
3268
+ doc.removeEventListener(touchEvents.end, swiper.onTouchEnd, false);
3269
+ } else {
3270
+ if (Support.touch) {
3271
+ var passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { passive: true, capture: false } : false;
3272
+ target.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener);
3273
+ target.removeEventListener(touchEvents.move, swiper.onTouchMove, capture);
3274
+ target.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener);
3275
+ }
3276
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
3277
+ target.removeEventListener('mousedown', swiper.onTouchStart, false);
3278
+ doc.removeEventListener('mousemove', swiper.onTouchMove, capture);
3279
+ doc.removeEventListener('mouseup', swiper.onTouchEnd, false);
3280
+ }
3281
+ }
3282
+ // Prevent Links Clicks
3283
+ if (params.preventClicks || params.preventClicksPropagation) {
3284
+ target.removeEventListener('click', swiper.onClick, true);
3285
+ }
3286
+ }
3287
+
3288
+ // Resize handler
3289
+ swiper.off((Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate'), onResize);
3290
+ }
3291
+
3292
+ var events = {
3293
+ attachEvents: attachEvents,
3294
+ detachEvents: detachEvents,
3295
+ };
3296
+
3297
+ function setBreakpoint () {
3298
+ var swiper = this;
3299
+ var activeIndex = swiper.activeIndex;
3300
+ var initialized = swiper.initialized;
3301
+ var loopedSlides = swiper.loopedSlides; if ( loopedSlides === void 0 ) loopedSlides = 0;
3302
+ var params = swiper.params;
3303
+ var breakpoints = params.breakpoints;
3304
+ if (!breakpoints || (breakpoints && Object.keys(breakpoints).length === 0)) { return; }
3305
+ // Set breakpoint for window width and update parameters
3306
+ var breakpoint = swiper.getBreakpoint(breakpoints);
3307
+ if (breakpoint && swiper.currentBreakpoint !== breakpoint) {
3308
+ var breakPointsParams = breakpoint in breakpoints ? breakpoints[breakpoint] : swiper.originalParams;
3309
+ var needsReLoop = params.loop && (breakPointsParams.slidesPerView !== params.slidesPerView);
3310
+
3311
+ Utils.extend(swiper.params, breakPointsParams);
3312
+
3313
+ Utils.extend(swiper, {
3314
+ allowTouchMove: swiper.params.allowTouchMove,
3315
+ allowSlideNext: swiper.params.allowSlideNext,
3316
+ allowSlidePrev: swiper.params.allowSlidePrev,
3317
+ });
3318
+
3319
+ swiper.currentBreakpoint = breakpoint;
3320
+
3321
+ if (needsReLoop && initialized) {
3322
+ swiper.loopDestroy();
3323
+ swiper.loopCreate();
3324
+ swiper.updateSlides();
3325
+ swiper.slideTo((activeIndex - loopedSlides) + swiper.loopedSlides, 0, false);
3326
+ }
3327
+ swiper.emit('breakpoint', breakPointsParams);
3328
+ }
3329
+ }
3330
+
3331
+ function getBreakpoint (breakpoints) {
3332
+ // Get breakpoint for window width
3333
+ if (!breakpoints) { return undefined; }
3334
+ var breakpoint = false;
3335
+ var points = [];
3336
+ Object.keys(breakpoints).forEach(function (point) {
3337
+ points.push(point);
3338
+ });
3339
+ points.sort(function (a, b) { return parseInt(a, 10) - parseInt(b, 10); });
3340
+ for (var i = 0; i < points.length; i += 1) {
3341
+ var point = points[i];
3342
+ if (point >= win.innerWidth && !breakpoint) {
3343
+ breakpoint = point;
3344
+ }
3345
+ }
3346
+ return breakpoint || 'max';
3347
+ }
3348
+
3349
+ var breakpoints = { setBreakpoint: setBreakpoint, getBreakpoint: getBreakpoint };
3350
+
3351
+ var Browser = (function Browser() {
3352
+ function isSafari() {
3353
+ var ua = win.navigator.userAgent.toLowerCase();
3354
+ return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0);
3355
+ }
3356
+ return {
3357
+ isIE: !!win.navigator.userAgent.match(/Trident/g) || !!win.navigator.userAgent.match(/MSIE/g),
3358
+ isSafari: isSafari(),
3359
+ isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(win.navigator.userAgent),
3360
+ };
3361
+ }());
3362
+
3363
+ function addClasses () {
3364
+ var swiper = this;
3365
+ var classNames = swiper.classNames;
3366
+ var params = swiper.params;
3367
+ var rtl = swiper.rtl;
3368
+ var $el = swiper.$el;
3369
+ var suffixes = [];
3370
+
3371
+ suffixes.push(params.direction);
3372
+
3373
+ if (params.freeMode) {
3374
+ suffixes.push('free-mode');
3375
+ }
3376
+ if (!Support.flexbox) {
3377
+ suffixes.push('no-flexbox');
3378
+ }
3379
+ if (params.autoHeight) {
3380
+ suffixes.push('autoheight');
3381
+ }
3382
+ if (rtl) {
3383
+ suffixes.push('rtl');
3384
+ }
3385
+ if (params.slidesPerColumn > 1) {
3386
+ suffixes.push('multirow');
3387
+ }
3388
+ if (Device.android) {
3389
+ suffixes.push('android');
3390
+ }
3391
+ if (Device.ios) {
3392
+ suffixes.push('ios');
3393
+ }
3394
+ // WP8 Touch Events Fix
3395
+ if (Browser.isIE && (Support.pointerEvents || Support.prefixedPointerEvents)) {
3396
+ suffixes.push(("wp8-" + (params.direction)));
3397
+ }
3398
+
3399
+ suffixes.forEach(function (suffix) {
3400
+ classNames.push(params.containerModifierClass + suffix);
3401
+ });
3402
+
3403
+ $el.addClass(classNames.join(' '));
3404
+ }
3405
+
3406
+ function removeClasses () {
3407
+ var swiper = this;
3408
+ var $el = swiper.$el;
3409
+ var classNames = swiper.classNames;
3410
+
3411
+ $el.removeClass(classNames.join(' '));
3412
+ }
3413
+
3414
+ var classes = { addClasses: addClasses, removeClasses: removeClasses };
3415
+
3416
+ function loadImage (imageEl, src, srcset, sizes, checkForComplete, callback) {
3417
+ var image;
3418
+ function onReady() {
3419
+ if (callback) { callback(); }
3420
+ }
3421
+ if (!imageEl.complete || !checkForComplete) {
3422
+ if (src) {
3423
+ image = new win.Image();
3424
+ image.onload = onReady;
3425
+ image.onerror = onReady;
3426
+ if (sizes) {
3427
+ image.sizes = sizes;
3428
+ }
3429
+ if (srcset) {
3430
+ image.srcset = srcset;
3431
+ }
3432
+ if (src) {
3433
+ image.src = src;
3434
+ }
3435
+ } else {
3436
+ onReady();
3437
+ }
3438
+ } else {
3439
+ // image already loaded...
3440
+ onReady();
3441
+ }
3442
+ }
3443
+
3444
+ function preloadImages () {
3445
+ var swiper = this;
3446
+ swiper.imagesToLoad = swiper.$el.find('img');
3447
+ function onReady() {
3448
+ if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) { return; }
3449
+ if (swiper.imagesLoaded !== undefined) { swiper.imagesLoaded += 1; }
3450
+ if (swiper.imagesLoaded === swiper.imagesToLoad.length) {
3451
+ if (swiper.params.updateOnImagesReady) { swiper.update(); }
3452
+ swiper.emit('imagesReady');
3453
+ }
3454
+ }
3455
+ for (var i = 0; i < swiper.imagesToLoad.length; i += 1) {
3456
+ var imageEl = swiper.imagesToLoad[i];
3457
+ swiper.loadImage(
3458
+ imageEl,
3459
+ imageEl.currentSrc || imageEl.getAttribute('src'),
3460
+ imageEl.srcset || imageEl.getAttribute('srcset'),
3461
+ imageEl.sizes || imageEl.getAttribute('sizes'),
3462
+ true,
3463
+ onReady
3464
+ );
3465
+ }
3466
+ }
3467
+
3468
+ var images = {
3469
+ loadImage: loadImage,
3470
+ preloadImages: preloadImages,
3471
+ };
3472
+
3473
+ function checkOverflow() {
3474
+ var swiper = this;
3475
+ var wasLocked = swiper.isLocked;
3476
+
3477
+ swiper.isLocked = swiper.snapGrid.length === 1;
3478
+ swiper.allowSlideNext = !swiper.isLocked;
3479
+ swiper.allowSlidePrev = !swiper.isLocked;
3480
+
3481
+ // events
3482
+ if (wasLocked !== swiper.isLocked) { swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); }
3483
+
3484
+ if (wasLocked && wasLocked !== swiper.isLocked) {
3485
+ swiper.isEnd = false;
3486
+ swiper.navigation.update();
3487
+ }
3488
+ }
3489
+
3490
+ var checkOverflow$1 = { checkOverflow: checkOverflow };
3491
+
3492
+ var defaults = {
3493
+ init: true,
3494
+ direction: 'horizontal',
3495
+ touchEventsTarget: 'container',
3496
+ initialSlide: 0,
3497
+ speed: 300,
3498
+ //
3499
+ preventIntercationOnTransition: false,
3500
+
3501
+ // To support iOS's swipe-to-go-back gesture (when being used in-app, with UIWebView).
3502
+ iOSEdgeSwipeDetection: false,
3503
+ iOSEdgeSwipeThreshold: 20,
3504
+
3505
+ // Free mode
3506
+ freeMode: false,
3507
+ freeModeMomentum: true,
3508
+ freeModeMomentumRatio: 1,
3509
+ freeModeMomentumBounce: true,
3510
+ freeModeMomentumBounceRatio: 1,
3511
+ freeModeMomentumVelocityRatio: 1,
3512
+ freeModeSticky: false,
3513
+ freeModeMinimumVelocity: 0.02,
3514
+
3515
+ // Autoheight
3516
+ autoHeight: false,
3517
+
3518
+ // Set wrapper width
3519
+ setWrapperSize: false,
3520
+
3521
+ // Virtual Translate
3522
+ virtualTranslate: false,
3523
+
3524
+ // Effects
3525
+ effect: 'slide', // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
3526
+
3527
+ // Breakpoints
3528
+ breakpoints: undefined,
3529
+
3530
+ // Slides grid
3531
+ spaceBetween: 0,
3532
+ slidesPerView: 1,
3533
+ slidesPerColumn: 1,
3534
+ slidesPerColumnFill: 'column',
3535
+ slidesPerGroup: 1,
3536
+ centeredSlides: false,
3537
+ slidesOffsetBefore: 0, // in px
3538
+ slidesOffsetAfter: 0, // in px
3539
+ normalizeSlideIndex: true,
3540
+
3541
+ // Disable swiper and hide navigation when container not overflow
3542
+ watchOverflow: false,
3543
+
3544
+ // Round length
3545
+ roundLengths: false,
3546
+
3547
+ // Touches
3548
+ touchRatio: 1,
3549
+ touchAngle: 45,
3550
+ simulateTouch: true,
3551
+ shortSwipes: true,
3552
+ longSwipes: true,
3553
+ longSwipesRatio: 0.5,
3554
+ longSwipesMs: 300,
3555
+ followFinger: true,
3556
+ allowTouchMove: true,
3557
+ threshold: 0,
3558
+ touchMoveStopPropagation: true,
3559
+ touchReleaseOnEdges: false,
3560
+
3561
+ // Unique Navigation Elements
3562
+ uniqueNavElements: true,
3563
+
3564
+ // Resistance
3565
+ resistance: true,
3566
+ resistanceRatio: 0.85,
3567
+
3568
+ // Progress
3569
+ watchSlidesProgress: false,
3570
+ watchSlidesVisibility: false,
3571
+
3572
+ // Cursor
3573
+ grabCursor: false,
3574
+
3575
+ // Clicks
3576
+ preventClicks: true,
3577
+ preventClicksPropagation: true,
3578
+ slideToClickedSlide: false,
3579
+
3580
+ // Images
3581
+ preloadImages: true,
3582
+ updateOnImagesReady: true,
3583
+
3584
+ // loop
3585
+ loop: false,
3586
+ loopAdditionalSlides: 0,
3587
+ loopedSlides: null,
3588
+ loopFillGroupWithBlank: false,
3589
+
3590
+ // Swiping/no swiping
3591
+ allowSlidePrev: true,
3592
+ allowSlideNext: true,
3593
+ swipeHandler: null, // '.swipe-handler',
3594
+ noSwiping: true,
3595
+ noSwipingClass: 'swiper-no-swiping',
3596
+ noSwipingSelector: null,
3597
+
3598
+ // Passive Listeners
3599
+ passiveListeners: true,
3600
+
3601
+ // NS
3602
+ containerModifierClass: 'swiper-container-', // NEW
3603
+ slideClass: 'swiper-slide',
3604
+ slideBlankClass: 'swiper-slide-invisible-blank',
3605
+ slideActiveClass: 'swiper-slide-active',
3606
+ slideDuplicateActiveClass: 'swiper-slide-duplicate-active',
3607
+ slideVisibleClass: 'swiper-slide-visible',
3608
+ slideDuplicateClass: 'swiper-slide-duplicate',
3609
+ slideNextClass: 'swiper-slide-next',
3610
+ slideDuplicateNextClass: 'swiper-slide-duplicate-next',
3611
+ slidePrevClass: 'swiper-slide-prev',
3612
+ slideDuplicatePrevClass: 'swiper-slide-duplicate-prev',
3613
+ wrapperClass: 'swiper-wrapper',
3614
+
3615
+ // Callbacks
3616
+ runCallbacksOnInit: true,
3617
+ };
3618
+
3619
+ var prototypes = {
3620
+ update: update,
3621
+ translate: translate,
3622
+ transition: transition$1,
3623
+ slide: slide,
3624
+ loop: loop,
3625
+ grabCursor: grabCursor,
3626
+ manipulation: manipulation,
3627
+ events: events,
3628
+ breakpoints: breakpoints,
3629
+ checkOverflow: checkOverflow$1,
3630
+ classes: classes,
3631
+ images: images,
3632
+ };
3633
+
3634
+ var extendedDefaults = {};
3635
+
3636
+ var Swiper = (function (SwiperClass$$1) {
3637
+ function Swiper() {
3638
+ var assign;
3639
+
3640
+ var args = [], len = arguments.length;
3641
+ while ( len-- ) args[ len ] = arguments[ len ];
3642
+ var el;
3643
+ var params;
3644
+ if (args.length === 1 && args[0].constructor && args[0].constructor === Object) {
3645
+ params = args[0];
3646
+ } else {
3647
+ (assign = args, el = assign[0], params = assign[1]);
3648
+ }
3649
+ if (!params) { params = {}; }
3650
+
3651
+ params = Utils.extend({}, params);
3652
+ if (el && !params.el) { params.el = el; }
3653
+
3654
+ SwiperClass$$1.call(this, params);
3655
+
3656
+ Object.keys(prototypes).forEach(function (prototypeGroup) {
3657
+ Object.keys(prototypes[prototypeGroup]).forEach(function (protoMethod) {
3658
+ if (!Swiper.prototype[protoMethod]) {
3659
+ Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
3660
+ }
3661
+ });
3662
+ });
3663
+
3664
+ // Swiper Instance
3665
+ var swiper = this;
3666
+ if (typeof swiper.modules === 'undefined') {
3667
+ swiper.modules = {};
3668
+ }
3669
+ Object.keys(swiper.modules).forEach(function (moduleName) {
3670
+ var module = swiper.modules[moduleName];
3671
+ if (module.params) {
3672
+ var moduleParamName = Object.keys(module.params)[0];
3673
+ var moduleParams = module.params[moduleParamName];
3674
+ if (typeof moduleParams !== 'object') { return; }
3675
+ if (!(moduleParamName in params && 'enabled' in moduleParams)) { return; }
3676
+ if (params[moduleParamName] === true) {
3677
+ params[moduleParamName] = { enabled: true };
3678
+ }
3679
+ if (
3680
+ typeof params[moduleParamName] === 'object' &&
3681
+ !('enabled' in params[moduleParamName])
3682
+ ) {
3683
+ params[moduleParamName].enabled = true;
3684
+ }
3685
+ if (!params[moduleParamName]) { params[moduleParamName] = { enabled: false }; }
3686
+ }
3687
+ });
3688
+
3689
+ // Extend defaults with modules params
3690
+ var swiperParams = Utils.extend({}, defaults);
3691
+ swiper.useModulesParams(swiperParams);
3692
+
3693
+ // Extend defaults with passed params
3694
+ swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params);
3695
+ swiper.originalParams = Utils.extend({}, swiper.params);
3696
+ swiper.passedParams = Utils.extend({}, params);
3697
+
3698
+ // Save Dom lib
3699
+ swiper.$ = $;
3700
+
3701
+ // Find el
3702
+ var $el = $(swiper.params.el);
3703
+ el = $el[0];
3704
+
3705
+ if (!el) {
3706
+ return undefined;
3707
+ }
3708
+
3709
+ if ($el.length > 1) {
3710
+ var swipers = [];
3711
+ $el.each(function (index, containerEl) {
3712
+ var newParams = Utils.extend({}, params, { el: containerEl });
3713
+ swipers.push(new Swiper(newParams));
3714
+ });
3715
+ return swipers;
3716
+ }
3717
+
3718
+ el.swiper = swiper;
3719
+ $el.data('swiper', swiper);
3720
+
3721
+ // Find Wrapper
3722
+ var $wrapperEl = $el.children(("." + (swiper.params.wrapperClass)));
3723
+
3724
+ // Extend Swiper
3725
+ Utils.extend(swiper, {
3726
+ $el: $el,
3727
+ el: el,
3728
+ $wrapperEl: $wrapperEl,
3729
+ wrapperEl: $wrapperEl[0],
3730
+
3731
+ // Classes
3732
+ classNames: [],
3733
+
3734
+ // Slides
3735
+ slides: $(),
3736
+ slidesGrid: [],
3737
+ snapGrid: [],
3738
+ slidesSizesGrid: [],
3739
+
3740
+ // isDirection
3741
+ isHorizontal: function isHorizontal() {
3742
+ return swiper.params.direction === 'horizontal';
3743
+ },
3744
+ isVertical: function isVertical() {
3745
+ return swiper.params.direction === 'vertical';
3746
+ },
3747
+ // RTL
3748
+ rtl: (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
3749
+ rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'),
3750
+ wrongRTL: $wrapperEl.css('display') === '-webkit-box',
3751
+
3752
+ // Indexes
3753
+ activeIndex: 0,
3754
+ realIndex: 0,
3755
+
3756
+ //
3757
+ isBeginning: true,
3758
+ isEnd: false,
3759
+
3760
+ // Props
3761
+ translate: 0,
3762
+ previousTranslate: 0,
3763
+ progress: 0,
3764
+ velocity: 0,
3765
+ animating: false,
3766
+
3767
+ // Locks
3768
+ allowSlideNext: swiper.params.allowSlideNext,
3769
+ allowSlidePrev: swiper.params.allowSlidePrev,
3770
+
3771
+ // Touch Events
3772
+ touchEvents: (function touchEvents() {
3773
+ var touch = ['touchstart', 'touchmove', 'touchend'];
3774
+ var desktop = ['mousedown', 'mousemove', 'mouseup'];
3775
+ if (Support.pointerEvents) {
3776
+ desktop = ['pointerdown', 'pointermove', 'pointerup'];
3777
+ } else if (Support.prefixedPointerEvents) {
3778
+ desktop = ['MSPointerDown', 'MSPointerMove', 'MSPointerUp'];
3779
+ }
3780
+ swiper.touchEventsTouch = {
3781
+ start: touch[0],
3782
+ move: touch[1],
3783
+ end: touch[2],
3784
+ };
3785
+ swiper.touchEventsDesktop = {
3786
+ start: desktop[0],
3787
+ move: desktop[1],
3788
+ end: desktop[2],
3789
+ };
3790
+ return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop;
3791
+ }()),
3792
+ touchEventsData: {
3793
+ isTouched: undefined,
3794
+ isMoved: undefined,
3795
+ allowTouchCallbacks: undefined,
3796
+ touchStartTime: undefined,
3797
+ isScrolling: undefined,
3798
+ currentTranslate: undefined,
3799
+ startTranslate: undefined,
3800
+ allowThresholdMove: undefined,
3801
+ // Form elements to match
3802
+ formElements: 'input, select, option, textarea, button, video',
3803
+ // Last click time
3804
+ lastClickTime: Utils.now(),
3805
+ clickTimeout: undefined,
3806
+ // Velocities
3807
+ velocities: [],
3808
+ allowMomentumBounce: undefined,
3809
+ isTouchEvent: undefined,
3810
+ startMoving: undefined,
3811
+ },
3812
+
3813
+ // Clicks
3814
+ allowClick: true,
3815
+
3816
+ // Touches
3817
+ allowTouchMove: swiper.params.allowTouchMove,
3818
+
3819
+ touches: {
3820
+ startX: 0,
3821
+ startY: 0,
3822
+ currentX: 0,
3823
+ currentY: 0,
3824
+ diff: 0,
3825
+ },
3826
+
3827
+ // Images
3828
+ imagesToLoad: [],
3829
+ imagesLoaded: 0,
3830
+
3831
+ });
3832
+
3833
+ // Install Modules
3834
+ swiper.useModules();
3835
+
3836
+ // Init
3837
+ if (swiper.params.init) {
3838
+ swiper.init();
3839
+ }
3840
+
3841
+ // Return app instance
3842
+ return swiper;
3843
+ }
3844
+
3845
+ if ( SwiperClass$$1 ) Swiper.__proto__ = SwiperClass$$1;
3846
+ Swiper.prototype = Object.create( SwiperClass$$1 && SwiperClass$$1.prototype );
3847
+ Swiper.prototype.constructor = Swiper;
3848
+
3849
+ var staticAccessors = { extendedDefaults: { configurable: true },defaults: { configurable: true },Class: { configurable: true },$: { configurable: true } };
3850
+ Swiper.prototype.slidesPerViewDynamic = function slidesPerViewDynamic () {
3851
+ var swiper = this;
3852
+ var params = swiper.params;
3853
+ var slides = swiper.slides;
3854
+ var slidesGrid = swiper.slidesGrid;
3855
+ var swiperSize = swiper.size;
3856
+ var activeIndex = swiper.activeIndex;
3857
+ var spv = 1;
3858
+ if (params.centeredSlides) {
3859
+ var slideSize = slides[activeIndex].swiperSlideSize;
3860
+ var breakLoop;
3861
+ for (var i = activeIndex + 1; i < slides.length; i += 1) {
3862
+ if (slides[i] && !breakLoop) {
3863
+ slideSize += slides[i].swiperSlideSize;
3864
+ spv += 1;
3865
+ if (slideSize > swiperSize) { breakLoop = true; }
3866
+ }
3867
+ }
3868
+ for (var i$1 = activeIndex - 1; i$1 >= 0; i$1 -= 1) {
3869
+ if (slides[i$1] && !breakLoop) {
3870
+ slideSize += slides[i$1].swiperSlideSize;
3871
+ spv += 1;
3872
+ if (slideSize > swiperSize) { breakLoop = true; }
3873
+ }
3874
+ }
3875
+ } else {
3876
+ for (var i$2 = activeIndex + 1; i$2 < slides.length; i$2 += 1) {
3877
+ if (slidesGrid[i$2] - slidesGrid[activeIndex] < swiperSize) {
3878
+ spv += 1;
3879
+ }
3880
+ }
3881
+ }
3882
+ return spv;
3883
+ };
3884
+ Swiper.prototype.update = function update$$1 () {
3885
+ var swiper = this;
3886
+ if (!swiper || swiper.destroyed) { return; }
3887
+ var snapGrid = swiper.snapGrid;
3888
+ var params = swiper.params;
3889
+ // Breakpoints
3890
+ if (params.breakpoints) {
3891
+ swiper.setBreakpoint();
3892
+ }
3893
+ swiper.updateSize();
3894
+ swiper.updateSlides();
3895
+ swiper.updateProgress();
3896
+ swiper.updateSlidesClasses();
3897
+
3898
+ function setTranslate() {
3899
+ var translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
3900
+ var newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
3901
+ swiper.setTranslate(newTranslate);
3902
+ swiper.updateActiveIndex();
3903
+ swiper.updateSlidesClasses();
3904
+ }
3905
+ var translated;
3906
+ if (swiper.params.freeMode) {
3907
+ setTranslate();
3908
+ if (swiper.params.autoHeight) {
3909
+ swiper.updateAutoHeight();
3910
+ }
3911
+ } else {
3912
+ if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) {
3913
+ translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true);
3914
+ } else {
3915
+ translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
3916
+ }
3917
+ if (!translated) {
3918
+ setTranslate();
3919
+ }
3920
+ }
3921
+ if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
3922
+ swiper.checkOverflow();
3923
+ }
3924
+ swiper.emit('update');
3925
+ };
3926
+ Swiper.prototype.init = function init () {
3927
+ var swiper = this;
3928
+ if (swiper.initialized) { return; }
3929
+
3930
+ swiper.emit('beforeInit');
3931
+
3932
+ // Set breakpoint
3933
+ if (swiper.params.breakpoints) {
3934
+ swiper.setBreakpoint();
3935
+ }
3936
+
3937
+ // Add Classes
3938
+ swiper.addClasses();
3939
+
3940
+ // Create loop
3941
+ if (swiper.params.loop) {
3942
+ swiper.loopCreate();
3943
+ }
3944
+
3945
+ // Update size
3946
+ swiper.updateSize();
3947
+
3948
+ // Update slides
3949
+ swiper.updateSlides();
3950
+
3951
+ if (swiper.params.watchOverflow) {
3952
+ swiper.checkOverflow();
3953
+ }
3954
+
3955
+ // Set Grab Cursor
3956
+ if (swiper.params.grabCursor) {
3957
+ swiper.setGrabCursor();
3958
+ }
3959
+
3960
+ if (swiper.params.preloadImages) {
3961
+ swiper.preloadImages();
3962
+ }
3963
+
3964
+ // Slide To Initial Slide
3965
+ if (swiper.params.loop) {
3966
+ swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit);
3967
+ } else {
3968
+ swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit);
3969
+ }
3970
+
3971
+ // Attach events
3972
+ swiper.attachEvents();
3973
+
3974
+ // Init Flag
3975
+ swiper.initialized = true;
3976
+
3977
+ // Emit
3978
+ swiper.emit('init');
3979
+ };
3980
+ Swiper.prototype.destroy = function destroy (deleteInstance, cleanStyles) {
3981
+ if ( deleteInstance === void 0 ) deleteInstance = true;
3982
+ if ( cleanStyles === void 0 ) cleanStyles = true;
3983
+
3984
+ var swiper = this;
3985
+ var params = swiper.params;
3986
+ var $el = swiper.$el;
3987
+ var $wrapperEl = swiper.$wrapperEl;
3988
+ var slides = swiper.slides;
3989
+
3990
+ if (typeof swiper.params === 'undefined' || swiper.destroyed) {
3991
+ return null;
3992
+ }
3993
+
3994
+ swiper.emit('beforeDestroy');
3995
+
3996
+ // Init Flag
3997
+ swiper.initialized = false;
3998
+
3999
+ // Detach events
4000
+ swiper.detachEvents();
4001
+
4002
+ // Destroy loop
4003
+ if (params.loop) {
4004
+ swiper.loopDestroy();
4005
+ }
4006
+
4007
+ // Cleanup styles
4008
+ if (cleanStyles) {
4009
+ swiper.removeClasses();
4010
+ $el.removeAttr('style');
4011
+ $wrapperEl.removeAttr('style');
4012
+ if (slides && slides.length) {
4013
+ slides
4014
+ .removeClass([
4015
+ params.slideVisibleClass,
4016
+ params.slideActiveClass,
4017
+ params.slideNextClass,
4018
+ params.slidePrevClass ].join(' '))
4019
+ .removeAttr('style')
4020
+ .removeAttr('data-swiper-slide-index')
4021
+ .removeAttr('data-swiper-column')
4022
+ .removeAttr('data-swiper-row');
4023
+ }
4024
+ }
4025
+
4026
+ swiper.emit('destroy');
4027
+
4028
+ // Detach emitter events
4029
+ Object.keys(swiper.eventsListeners).forEach(function (eventName) {
4030
+ swiper.off(eventName);
4031
+ });
4032
+
4033
+ if (deleteInstance !== false) {
4034
+ swiper.$el[0].swiper = null;
4035
+ swiper.$el.data('swiper', null);
4036
+ Utils.deleteProps(swiper);
4037
+ }
4038
+ swiper.destroyed = true;
4039
+
4040
+ return null;
4041
+ };
4042
+ Swiper.extendDefaults = function extendDefaults (newDefaults) {
4043
+ Utils.extend(extendedDefaults, newDefaults);
4044
+ };
4045
+ staticAccessors.extendedDefaults.get = function () {
4046
+ return extendedDefaults;
4047
+ };
4048
+ staticAccessors.defaults.get = function () {
4049
+ return defaults;
4050
+ };
4051
+ staticAccessors.Class.get = function () {
4052
+ return SwiperClass$$1;
4053
+ };
4054
+ staticAccessors.$.get = function () {
4055
+ return $;
4056
+ };
4057
+
4058
+ Object.defineProperties( Swiper, staticAccessors );
4059
+
4060
+ return Swiper;
4061
+ }(SwiperClass));
4062
+
4063
+ var Device$1 = {
4064
+ name: 'device',
4065
+ proto: {
4066
+ device: Device,
4067
+ },
4068
+ static: {
4069
+ device: Device,
4070
+ },
4071
+ };
4072
+
4073
+ var Support$1 = {
4074
+ name: 'support',
4075
+ proto: {
4076
+ support: Support,
4077
+ },
4078
+ static: {
4079
+ support: Support,
4080
+ },
4081
+ };
4082
+
4083
+ var Browser$1 = {
4084
+ name: 'browser',
4085
+ proto: {
4086
+ browser: Browser,
4087
+ },
4088
+ static: {
4089
+ browser: Browser,
4090
+ },
4091
+ };
4092
+
4093
+ var Resize = {
4094
+ name: 'resize',
4095
+ create: function create() {
4096
+ var swiper = this;
4097
+ Utils.extend(swiper, {
4098
+ resize: {
4099
+ resizeHandler: function resizeHandler() {
4100
+ if (!swiper || swiper.destroyed || !swiper.initialized) { return; }
4101
+ swiper.emit('beforeResize');
4102
+ swiper.emit('resize');
4103
+ },
4104
+ orientationChangeHandler: function orientationChangeHandler() {
4105
+ if (!swiper || swiper.destroyed || !swiper.initialized) { return; }
4106
+ swiper.emit('orientationchange');
4107
+ },
4108
+ },
4109
+ });
4110
+ },
4111
+ on: {
4112
+ init: function init() {
4113
+ var swiper = this;
4114
+ // Emit resize
4115
+ win.addEventListener('resize', swiper.resize.resizeHandler);
4116
+
4117
+ // Emit orientationchange
4118
+ win.addEventListener('orientationchange', swiper.resize.orientationChangeHandler);
4119
+ },
4120
+ destroy: function destroy() {
4121
+ var swiper = this;
4122
+ win.removeEventListener('resize', swiper.resize.resizeHandler);
4123
+ win.removeEventListener('orientationchange', swiper.resize.orientationChangeHandler);
4124
+ },
4125
+ },
4126
+ };
4127
+
4128
+ var Observer = {
4129
+ func: win.MutationObserver || win.WebkitMutationObserver,
4130
+ attach: function attach(target, options) {
4131
+ if ( options === void 0 ) options = {};
4132
+
4133
+ var swiper = this;
4134
+
4135
+ var ObserverFunc = Observer.func;
4136
+ var observer = new ObserverFunc(function (mutations) {
4137
+ mutations.forEach(function (mutation) {
4138
+ swiper.emit('observerUpdate', mutation);
4139
+ });
4140
+ });
4141
+
4142
+ observer.observe(target, {
4143
+ attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
4144
+ childList: typeof options.childList === 'undefined' ? true : options.childList,
4145
+ characterData: typeof options.characterData === 'undefined' ? true : options.characterData,
4146
+ });
4147
+
4148
+ swiper.observer.observers.push(observer);
4149
+ },
4150
+ init: function init() {
4151
+ var swiper = this;
4152
+ if (!Support.observer || !swiper.params.observer) { return; }
4153
+ if (swiper.params.observeParents) {
4154
+ var containerParents = swiper.$el.parents();
4155
+ for (var i = 0; i < containerParents.length; i += 1) {
4156
+ swiper.observer.attach(containerParents[i]);
4157
+ }
4158
+ }
4159
+ // Observe container
4160
+ swiper.observer.attach(swiper.$el[0], { childList: false });
4161
+
4162
+ // Observe wrapper
4163
+ swiper.observer.attach(swiper.$wrapperEl[0], { attributes: false });
4164
+ },
4165
+ destroy: function destroy() {
4166
+ var swiper = this;
4167
+ swiper.observer.observers.forEach(function (observer) {
4168
+ observer.disconnect();
4169
+ });
4170
+ swiper.observer.observers = [];
4171
+ },
4172
+ };
4173
+
4174
+ var Observer$1 = {
4175
+ name: 'observer',
4176
+ params: {
4177
+ observer: false,
4178
+ observeParents: false,
4179
+ },
4180
+ create: function create() {
4181
+ var swiper = this;
4182
+ Utils.extend(swiper, {
4183
+ observer: {
4184
+ init: Observer.init.bind(swiper),
4185
+ attach: Observer.attach.bind(swiper),
4186
+ destroy: Observer.destroy.bind(swiper),
4187
+ observers: [],
4188
+ },
4189
+ });
4190
+ },
4191
+ on: {
4192
+ init: function init() {
4193
+ var swiper = this;
4194
+ swiper.observer.init();
4195
+ },
4196
+ destroy: function destroy() {
4197
+ var swiper = this;
4198
+ swiper.observer.destroy();
4199
+ },
4200
+ },
4201
+ };
4202
+
4203
+ var Virtual = {
4204
+ update: function update(force) {
4205
+ var swiper = this;
4206
+ var ref = swiper.params;
4207
+ var slidesPerView = ref.slidesPerView;
4208
+ var slidesPerGroup = ref.slidesPerGroup;
4209
+ var centeredSlides = ref.centeredSlides;
4210
+ var ref$1 = swiper.virtual;
4211
+ var previousFrom = ref$1.from;
4212
+ var previousTo = ref$1.to;
4213
+ var slides = ref$1.slides;
4214
+ var previousSlidesGrid = ref$1.slidesGrid;
4215
+ var renderSlide = ref$1.renderSlide;
4216
+ var previousOffset = ref$1.offset;
4217
+ swiper.updateActiveIndex();
4218
+ var activeIndex = swiper.activeIndex || 0;
4219
+
4220
+ var offsetProp;
4221
+ if (swiper.rtlTranslate) { offsetProp = 'right'; }
4222
+ else { offsetProp = swiper.isHorizontal() ? 'left' : 'top'; }
4223
+
4224
+ var slidesAfter;
4225
+ var slidesBefore;
4226
+ if (centeredSlides) {
4227
+ slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup;
4228
+ slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup;
4229
+ } else {
4230
+ slidesAfter = slidesPerView + (slidesPerGroup - 1);
4231
+ slidesBefore = slidesPerGroup;
4232
+ }
4233
+ var from = Math.max((activeIndex || 0) - slidesBefore, 0);
4234
+ var to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1);
4235
+ var offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0);
4236
+
4237
+ Utils.extend(swiper.virtual, {
4238
+ from: from,
4239
+ to: to,
4240
+ offset: offset,
4241
+ slidesGrid: swiper.slidesGrid,
4242
+ });
4243
+
4244
+ function onRendered() {
4245
+ swiper.updateSlides();
4246
+ swiper.updateProgress();
4247
+ swiper.updateSlidesClasses();
4248
+ if (swiper.lazy && swiper.params.lazy.enabled) {
4249
+ swiper.lazy.load();
4250
+ }
4251
+ }
4252
+
4253
+ if (previousFrom === from && previousTo === to && !force) {
4254
+ if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) {
4255
+ swiper.slides.css(offsetProp, (offset + "px"));
4256
+ }
4257
+ swiper.updateProgress();
4258
+ return;
4259
+ }
4260
+ if (swiper.params.virtual.renderExternal) {
4261
+ swiper.params.virtual.renderExternal.call(swiper, {
4262
+ offset: offset,
4263
+ from: from,
4264
+ to: to,
4265
+ slides: (function getSlides() {
4266
+ var slidesToRender = [];
4267
+ for (var i = from; i <= to; i += 1) {
4268
+ slidesToRender.push(slides[i]);
4269
+ }
4270
+ return slidesToRender;
4271
+ }()),
4272
+ });
4273
+ onRendered();
4274
+ return;
4275
+ }
4276
+ var prependIndexes = [];
4277
+ var appendIndexes = [];
4278
+ if (force) {
4279
+ swiper.$wrapperEl.find(("." + (swiper.params.slideClass))).remove();
4280
+ } else {
4281
+ for (var i = previousFrom; i <= previousTo; i += 1) {
4282
+ if (i < from || i > to) {
4283
+ swiper.$wrapperEl.find(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + i + "\"]")).remove();
4284
+ }
4285
+ }
4286
+ }
4287
+ for (var i$1 = 0; i$1 < slides.length; i$1 += 1) {
4288
+ if (i$1 >= from && i$1 <= to) {
4289
+ if (typeof previousTo === 'undefined' || force) {
4290
+ appendIndexes.push(i$1);
4291
+ } else {
4292
+ if (i$1 > previousTo) { appendIndexes.push(i$1); }
4293
+ if (i$1 < previousFrom) { prependIndexes.push(i$1); }
4294
+ }
4295
+ }
4296
+ }
4297
+ appendIndexes.forEach(function (index) {
4298
+ swiper.$wrapperEl.append(renderSlide(slides[index], index));
4299
+ });
4300
+ prependIndexes.sort(function (a, b) { return a < b; }).forEach(function (index) {
4301
+ swiper.$wrapperEl.prepend(renderSlide(slides[index], index));
4302
+ });
4303
+ swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, (offset + "px"));
4304
+ onRendered();
4305
+ },
4306
+ renderSlide: function renderSlide(slide, index) {
4307
+ var swiper = this;
4308
+ var params = swiper.params.virtual;
4309
+ if (params.cache && swiper.virtual.cache[index]) {
4310
+ return swiper.virtual.cache[index];
4311
+ }
4312
+ var $slideEl = params.renderSlide
4313
+ ? $(params.renderSlide.call(swiper, slide, index))
4314
+ : $(("<div class=\"" + (swiper.params.slideClass) + "\" data-swiper-slide-index=\"" + index + "\">" + slide + "</div>"));
4315
+ if (!$slideEl.attr('data-swiper-slide-index')) { $slideEl.attr('data-swiper-slide-index', index); }
4316
+ if (params.cache) { swiper.virtual.cache[index] = $slideEl; }
4317
+ return $slideEl;
4318
+ },
4319
+ appendSlide: function appendSlide(slide) {
4320
+ var swiper = this;
4321
+ swiper.virtual.slides.push(slide);
4322
+ swiper.virtual.update(true);
4323
+ },
4324
+ prependSlide: function prependSlide(slide) {
4325
+ var swiper = this;
4326
+ swiper.virtual.slides.unshift(slide);
4327
+ if (swiper.params.virtual.cache) {
4328
+ var cache = swiper.virtual.cache;
4329
+ var newCache = {};
4330
+ Object.keys(cache).forEach(function (cachedIndex) {
4331
+ newCache[cachedIndex + 1] = cache[cachedIndex];
4332
+ });
4333
+ swiper.virtual.cache = newCache;
4334
+ }
4335
+ swiper.virtual.update(true);
4336
+ swiper.slideNext(0);
4337
+ },
4338
+ };
4339
+
4340
+ var Virtual$1 = {
4341
+ name: 'virtual',
4342
+ params: {
4343
+ virtual: {
4344
+ enabled: false,
4345
+ slides: [],
4346
+ cache: true,
4347
+ renderSlide: null,
4348
+ renderExternal: null,
4349
+ },
4350
+ },
4351
+ create: function create() {
4352
+ var swiper = this;
4353
+ Utils.extend(swiper, {
4354
+ virtual: {
4355
+ update: Virtual.update.bind(swiper),
4356
+ appendSlide: Virtual.appendSlide.bind(swiper),
4357
+ prependSlide: Virtual.prependSlide.bind(swiper),
4358
+ renderSlide: Virtual.renderSlide.bind(swiper),
4359
+ slides: swiper.params.virtual.slides,
4360
+ cache: {},
4361
+ },
4362
+ });
4363
+ },
4364
+ on: {
4365
+ beforeInit: function beforeInit() {
4366
+ var swiper = this;
4367
+ if (!swiper.params.virtual.enabled) { return; }
4368
+ swiper.classNames.push(((swiper.params.containerModifierClass) + "virtual"));
4369
+ var overwriteParams = {
4370
+ watchSlidesProgress: true,
4371
+ };
4372
+ Utils.extend(swiper.params, overwriteParams);
4373
+ Utils.extend(swiper.originalParams, overwriteParams);
4374
+
4375
+ swiper.virtual.update();
4376
+ },
4377
+ setTranslate: function setTranslate() {
4378
+ var swiper = this;
4379
+ if (!swiper.params.virtual.enabled) { return; }
4380
+ swiper.virtual.update();
4381
+ },
4382
+ },
4383
+ };
4384
+
4385
+ var Keyboard = {
4386
+ handle: function handle(event) {
4387
+ var swiper = this;
4388
+ var rtl = swiper.rtlTranslate;
4389
+ var e = event;
4390
+ if (e.originalEvent) { e = e.originalEvent; } // jquery fix
4391
+ var kc = e.keyCode || e.charCode;
4392
+ // Directions locks
4393
+ if (!swiper.allowSlideNext && ((swiper.isHorizontal() && kc === 39) || (swiper.isVertical() && kc === 40))) {
4394
+ return false;
4395
+ }
4396
+ if (!swiper.allowSlidePrev && ((swiper.isHorizontal() && kc === 37) || (swiper.isVertical() && kc === 38))) {
4397
+ return false;
4398
+ }
4399
+ if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) {
4400
+ return undefined;
4401
+ }
4402
+ if (doc.activeElement && doc.activeElement.nodeName && (doc.activeElement.nodeName.toLowerCase() === 'input' || doc.activeElement.nodeName.toLowerCase() === 'textarea')) {
4403
+ return undefined;
4404
+ }
4405
+ if (swiper.params.keyboard.onlyInViewport && (kc === 37 || kc === 39 || kc === 38 || kc === 40)) {
4406
+ var inView = false;
4407
+ // Check that swiper should be inside of visible area of window
4408
+ if (swiper.$el.parents(("." + (swiper.params.slideClass))).length > 0 && swiper.$el.parents(("." + (swiper.params.slideActiveClass))).length === 0) {
4409
+ return undefined;
4410
+ }
4411
+ var windowWidth = win.innerWidth;
4412
+ var windowHeight = win.innerHeight;
4413
+ var swiperOffset = swiper.$el.offset();
4414
+ if (rtl) { swiperOffset.left -= swiper.$el[0].scrollLeft; }
4415
+ var swiperCoord = [
4416
+ [swiperOffset.left, swiperOffset.top],
4417
+ [swiperOffset.left + swiper.width, swiperOffset.top],
4418
+ [swiperOffset.left, swiperOffset.top + swiper.height],
4419
+ [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height] ];
4420
+ for (var i = 0; i < swiperCoord.length; i += 1) {
4421
+ var point = swiperCoord[i];
4422
+ if (
4423
+ point[0] >= 0 && point[0] <= windowWidth &&
4424
+ point[1] >= 0 && point[1] <= windowHeight
4425
+ ) {
4426
+ inView = true;
4427
+ }
4428
+ }
4429
+ if (!inView) { return undefined; }
4430
+ }
4431
+ if (swiper.isHorizontal()) {
4432
+ if (kc === 37 || kc === 39) {
4433
+ if (e.preventDefault) { e.preventDefault(); }
4434
+ else { e.returnValue = false; }
4435
+ }
4436
+ if ((kc === 39 && !rtl) || (kc === 37 && rtl)) { swiper.slideNext(); }
4437
+ if ((kc === 37 && !rtl) || (kc === 39 && rtl)) { swiper.slidePrev(); }
4438
+ } else {
4439
+ if (kc === 38 || kc === 40) {
4440
+ if (e.preventDefault) { e.preventDefault(); }
4441
+ else { e.returnValue = false; }
4442
+ }
4443
+ if (kc === 40) { swiper.slideNext(); }
4444
+ if (kc === 38) { swiper.slidePrev(); }
4445
+ }
4446
+ swiper.emit('keyPress', kc);
4447
+ return undefined;
4448
+ },
4449
+ enable: function enable() {
4450
+ var swiper = this;
4451
+ if (swiper.keyboard.enabled) { return; }
4452
+ $(doc).on('keydown', swiper.keyboard.handle);
4453
+ swiper.keyboard.enabled = true;
4454
+ },
4455
+ disable: function disable() {
4456
+ var swiper = this;
4457
+ if (!swiper.keyboard.enabled) { return; }
4458
+ $(doc).off('keydown', swiper.keyboard.handle);
4459
+ swiper.keyboard.enabled = false;
4460
+ },
4461
+ };
4462
+
4463
+ var Keyboard$1 = {
4464
+ name: 'keyboard',
4465
+ params: {
4466
+ keyboard: {
4467
+ enabled: false,
4468
+ onlyInViewport: true,
4469
+ },
4470
+ },
4471
+ create: function create() {
4472
+ var swiper = this;
4473
+ Utils.extend(swiper, {
4474
+ keyboard: {
4475
+ enabled: false,
4476
+ enable: Keyboard.enable.bind(swiper),
4477
+ disable: Keyboard.disable.bind(swiper),
4478
+ handle: Keyboard.handle.bind(swiper),
4479
+ },
4480
+ });
4481
+ },
4482
+ on: {
4483
+ init: function init() {
4484
+ var swiper = this;
4485
+ if (swiper.params.keyboard.enabled) {
4486
+ swiper.keyboard.enable();
4487
+ }
4488
+ },
4489
+ destroy: function destroy() {
4490
+ var swiper = this;
4491
+ if (swiper.keyboard.enabled) {
4492
+ swiper.keyboard.disable();
4493
+ }
4494
+ },
4495
+ },
4496
+ };
4497
+
4498
+ function isEventSupported() {
4499
+ var eventName = 'onwheel';
4500
+ var isSupported = eventName in doc;
4501
+
4502
+ if (!isSupported) {
4503
+ var element = doc.createElement('div');
4504
+ element.setAttribute(eventName, 'return;');
4505
+ isSupported = typeof element[eventName] === 'function';
4506
+ }
4507
+
4508
+ if (!isSupported &&
4509
+ doc.implementation &&
4510
+ doc.implementation.hasFeature &&
4511
+ // always returns true in newer browsers as per the standard.
4512
+ // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
4513
+ doc.implementation.hasFeature('', '') !== true
4514
+ ) {
4515
+ // This is the only way to test support for the `wheel` event in IE9+.
4516
+ isSupported = doc.implementation.hasFeature('Events.wheel', '3.0');
4517
+ }
4518
+
4519
+ return isSupported;
4520
+ }
4521
+ var Mousewheel = {
4522
+ lastScrollTime: Utils.now(),
4523
+ event: (function getEvent() {
4524
+ if (win.navigator.userAgent.indexOf('firefox') > -1) { return 'DOMMouseScroll'; }
4525
+ return isEventSupported() ? 'wheel' : 'mousewheel';
4526
+ }()),
4527
+ normalize: function normalize(e) {
4528
+ // Reasonable defaults
4529
+ var PIXEL_STEP = 10;
4530
+ var LINE_HEIGHT = 40;
4531
+ var PAGE_HEIGHT = 800;
4532
+
4533
+ var sX = 0;
4534
+ var sY = 0; // spinX, spinY
4535
+ var pX = 0;
4536
+ var pY = 0; // pixelX, pixelY
4537
+
4538
+ // Legacy
4539
+ if ('detail' in e) {
4540
+ sY = e.detail;
4541
+ }
4542
+ if ('wheelDelta' in e) {
4543
+ sY = -e.wheelDelta / 120;
4544
+ }
4545
+ if ('wheelDeltaY' in e) {
4546
+ sY = -e.wheelDeltaY / 120;
4547
+ }
4548
+ if ('wheelDeltaX' in e) {
4549
+ sX = -e.wheelDeltaX / 120;
4550
+ }
4551
+
4552
+ // side scrolling on FF with DOMMouseScroll
4553
+ if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) {
4554
+ sX = sY;
4555
+ sY = 0;
4556
+ }
4557
+
4558
+ pX = sX * PIXEL_STEP;
4559
+ pY = sY * PIXEL_STEP;
4560
+
4561
+ if ('deltaY' in e) {
4562
+ pY = e.deltaY;
4563
+ }
4564
+ if ('deltaX' in e) {
4565
+ pX = e.deltaX;
4566
+ }
4567
+
4568
+ if ((pX || pY) && e.deltaMode) {
4569
+ if (e.deltaMode === 1) { // delta in LINE units
4570
+ pX *= LINE_HEIGHT;
4571
+ pY *= LINE_HEIGHT;
4572
+ } else { // delta in PAGE units
4573
+ pX *= PAGE_HEIGHT;
4574
+ pY *= PAGE_HEIGHT;
4575
+ }
4576
+ }
4577
+
4578
+ // Fall-back if spin cannot be determined
4579
+ if (pX && !sX) {
4580
+ sX = (pX < 1) ? -1 : 1;
4581
+ }
4582
+ if (pY && !sY) {
4583
+ sY = (pY < 1) ? -1 : 1;
4584
+ }
4585
+
4586
+ return {
4587
+ spinX: sX,
4588
+ spinY: sY,
4589
+ pixelX: pX,
4590
+ pixelY: pY,
4591
+ };
4592
+ },
4593
+ handleMouseEnter: function handleMouseEnter() {
4594
+ var swiper = this;
4595
+ swiper.mouseEntered = true;
4596
+ },
4597
+ handleMouseLeave: function handleMouseLeave() {
4598
+ var swiper = this;
4599
+ swiper.mouseEntered = false;
4600
+ },
4601
+ handle: function handle(event) {
4602
+ var e = event;
4603
+ var swiper = this;
4604
+ var params = swiper.params.mousewheel;
4605
+
4606
+ if (!swiper.mouseEntered && !params.releaseOnEdges) { return true; }
4607
+
4608
+ if (e.originalEvent) { e = e.originalEvent; } // jquery fix
4609
+ var delta = 0;
4610
+ var rtlFactor = swiper.rtlTranslate ? -1 : 1;
4611
+
4612
+ var data = Mousewheel.normalize(e);
4613
+
4614
+ if (params.forceToAxis) {
4615
+ if (swiper.isHorizontal()) {
4616
+ if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) { delta = data.pixelX * rtlFactor; }
4617
+ else { return true; }
4618
+ } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) { delta = data.pixelY; }
4619
+ else { return true; }
4620
+ } else {
4621
+ delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY;
4622
+ }
4623
+
4624
+ if (delta === 0) { return true; }
4625
+
4626
+ if (params.invert) { delta = -delta; }
4627
+
4628
+ if (!swiper.params.freeMode) {
4629
+ if (Utils.now() - swiper.mousewheel.lastScrollTime > 60) {
4630
+ if (delta < 0) {
4631
+ if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) {
4632
+ swiper.slideNext();
4633
+ swiper.emit('scroll', e);
4634
+ } else if (params.releaseOnEdges) { return true; }
4635
+ } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) {
4636
+ swiper.slidePrev();
4637
+ swiper.emit('scroll', e);
4638
+ } else if (params.releaseOnEdges) { return true; }
4639
+ }
4640
+ swiper.mousewheel.lastScrollTime = (new win.Date()).getTime();
4641
+ } else {
4642
+ // Freemode or scrollContainer:
4643
+ if (swiper.params.loop) {
4644
+ swiper.loopFix();
4645
+ }
4646
+ var position = swiper.getTranslate() + (delta * params.sensitivity);
4647
+ var wasBeginning = swiper.isBeginning;
4648
+ var wasEnd = swiper.isEnd;
4649
+
4650
+ if (position >= swiper.minTranslate()) { position = swiper.minTranslate(); }
4651
+ if (position <= swiper.maxTranslate()) { position = swiper.maxTranslate(); }
4652
+
4653
+ swiper.setTransition(0);
4654
+ swiper.setTranslate(position);
4655
+ swiper.updateProgress();
4656
+ swiper.updateActiveIndex();
4657
+ swiper.updateSlidesClasses();
4658
+
4659
+ if ((!wasBeginning && swiper.isBeginning) || (!wasEnd && swiper.isEnd)) {
4660
+ swiper.updateSlidesClasses();
4661
+ }
4662
+
4663
+ if (swiper.params.freeModeSticky) {
4664
+ clearTimeout(swiper.mousewheel.timeout);
4665
+ swiper.mousewheel.timeout = Utils.nextTick(function () {
4666
+ swiper.slideToClosest();
4667
+ }, 300);
4668
+ }
4669
+ // Emit event
4670
+ swiper.emit('scroll', e);
4671
+
4672
+ // Stop autoplay
4673
+ if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) { swiper.autoplay.stop(); }
4674
+ // Return page scroll on edge positions
4675
+ if (position === swiper.minTranslate() || position === swiper.maxTranslate()) { return true; }
4676
+ }
4677
+
4678
+ if (e.preventDefault) { e.preventDefault(); }
4679
+ else { e.returnValue = false; }
4680
+ return false;
4681
+ },
4682
+ enable: function enable() {
4683
+ var swiper = this;
4684
+ if (!Mousewheel.event) { return false; }
4685
+ if (swiper.mousewheel.enabled) { return false; }
4686
+ var target = swiper.$el;
4687
+ if (swiper.params.mousewheel.eventsTarged !== 'container') {
4688
+ target = $(swiper.params.mousewheel.eventsTarged);
4689
+ }
4690
+ target.on('mouseenter', swiper.mousewheel.handleMouseEnter);
4691
+ target.on('mouseleave', swiper.mousewheel.handleMouseLeave);
4692
+ target.on(Mousewheel.event, swiper.mousewheel.handle);
4693
+ swiper.mousewheel.enabled = true;
4694
+ return true;
4695
+ },
4696
+ disable: function disable() {
4697
+ var swiper = this;
4698
+ if (!Mousewheel.event) { return false; }
4699
+ if (!swiper.mousewheel.enabled) { return false; }
4700
+ var target = swiper.$el;
4701
+ if (swiper.params.mousewheel.eventsTarged !== 'container') {
4702
+ target = $(swiper.params.mousewheel.eventsTarged);
4703
+ }
4704
+ target.off(Mousewheel.event, swiper.mousewheel.handle);
4705
+ swiper.mousewheel.enabled = false;
4706
+ return true;
4707
+ },
4708
+ };
4709
+
4710
+ var Mousewheel$1 = {
4711
+ name: 'mousewheel',
4712
+ params: {
4713
+ mousewheel: {
4714
+ enabled: false,
4715
+ releaseOnEdges: false,
4716
+ invert: false,
4717
+ forceToAxis: false,
4718
+ sensitivity: 1,
4719
+ eventsTarged: 'container',
4720
+ },
4721
+ },
4722
+ create: function create() {
4723
+ var swiper = this;
4724
+ Utils.extend(swiper, {
4725
+ mousewheel: {
4726
+ enabled: false,
4727
+ enable: Mousewheel.enable.bind(swiper),
4728
+ disable: Mousewheel.disable.bind(swiper),
4729
+ handle: Mousewheel.handle.bind(swiper),
4730
+ handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper),
4731
+ handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper),
4732
+ lastScrollTime: Utils.now(),
4733
+ },
4734
+ });
4735
+ },
4736
+ on: {
4737
+ init: function init() {
4738
+ var swiper = this;
4739
+ if (swiper.params.mousewheel.enabled) { swiper.mousewheel.enable(); }
4740
+ },
4741
+ destroy: function destroy() {
4742
+ var swiper = this;
4743
+ if (swiper.mousewheel.enabled) { swiper.mousewheel.disable(); }
4744
+ },
4745
+ },
4746
+ };
4747
+
4748
+ var Navigation = {
4749
+ update: function update() {
4750
+ // Update Navigation Buttons
4751
+ var swiper = this;
4752
+ var params = swiper.params.navigation;
4753
+
4754
+ if (swiper.params.loop) { return; }
4755
+ var ref = swiper.navigation;
4756
+ var $nextEl = ref.$nextEl;
4757
+ var $prevEl = ref.$prevEl;
4758
+
4759
+ if ($prevEl && $prevEl.length > 0) {
4760
+ if (swiper.isBeginning) {
4761
+ $prevEl.addClass(params.disabledClass);
4762
+ } else {
4763
+ $prevEl.removeClass(params.disabledClass);
4764
+ }
4765
+ $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4766
+ }
4767
+ if ($nextEl && $nextEl.length > 0) {
4768
+ if (swiper.isEnd) {
4769
+ $nextEl.addClass(params.disabledClass);
4770
+ } else {
4771
+ $nextEl.removeClass(params.disabledClass);
4772
+ }
4773
+ $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
4774
+ }
4775
+ },
4776
+ init: function init() {
4777
+ var swiper = this;
4778
+ var params = swiper.params.navigation;
4779
+ if (!(params.nextEl || params.prevEl)) { return; }
4780
+
4781
+ var $nextEl;
4782
+ var $prevEl;
4783
+ if (params.nextEl) {
4784
+ $nextEl = $(params.nextEl);
4785
+ if (
4786
+ swiper.params.uniqueNavElements &&
4787
+ typeof params.nextEl === 'string' &&
4788
+ $nextEl.length > 1 &&
4789
+ swiper.$el.find(params.nextEl).length === 1
4790
+ ) {
4791
+ $nextEl = swiper.$el.find(params.nextEl);
4792
+ }
4793
+ }
4794
+ if (params.prevEl) {
4795
+ $prevEl = $(params.prevEl);
4796
+ if (
4797
+ swiper.params.uniqueNavElements &&
4798
+ typeof params.prevEl === 'string' &&
4799
+ $prevEl.length > 1 &&
4800
+ swiper.$el.find(params.prevEl).length === 1
4801
+ ) {
4802
+ $prevEl = swiper.$el.find(params.prevEl);
4803
+ }
4804
+ }
4805
+
4806
+ if ($nextEl && $nextEl.length > 0) {
4807
+ $nextEl.on('click', function (e) {
4808
+ e.preventDefault();
4809
+ if (swiper.isEnd && !swiper.params.loop) { return; }
4810
+ swiper.slideNext();
4811
+ });
4812
+ }
4813
+ if ($prevEl && $prevEl.length > 0) {
4814
+ $prevEl.on('click', function (e) {
4815
+ e.preventDefault();
4816
+ if (swiper.isBeginning && !swiper.params.loop) { return; }
4817
+ swiper.slidePrev();
4818
+ });
4819
+ }
4820
+
4821
+ Utils.extend(swiper.navigation, {
4822
+ $nextEl: $nextEl,
4823
+ nextEl: $nextEl && $nextEl[0],
4824
+ $prevEl: $prevEl,
4825
+ prevEl: $prevEl && $prevEl[0],
4826
+ });
4827
+ },
4828
+ destroy: function destroy() {
4829
+ var swiper = this;
4830
+ var ref = swiper.navigation;
4831
+ var $nextEl = ref.$nextEl;
4832
+ var $prevEl = ref.$prevEl;
4833
+ if ($nextEl && $nextEl.length) {
4834
+ $nextEl.off('click');
4835
+ $nextEl.removeClass(swiper.params.navigation.disabledClass);
4836
+ }
4837
+ if ($prevEl && $prevEl.length) {
4838
+ $prevEl.off('click');
4839
+ $prevEl.removeClass(swiper.params.navigation.disabledClass);
4840
+ }
4841
+ },
4842
+ };
4843
+
4844
+ var Navigation$1 = {
4845
+ name: 'navigation',
4846
+ params: {
4847
+ navigation: {
4848
+ nextEl: null,
4849
+ prevEl: null,
4850
+
4851
+ hideOnClick: false,
4852
+ disabledClass: 'swiper-button-disabled',
4853
+ hiddenClass: 'swiper-button-hidden',
4854
+ lockClass: 'swiper-button-lock',
4855
+ },
4856
+ },
4857
+ create: function create() {
4858
+ var swiper = this;
4859
+ Utils.extend(swiper, {
4860
+ navigation: {
4861
+ init: Navigation.init.bind(swiper),
4862
+ update: Navigation.update.bind(swiper),
4863
+ destroy: Navigation.destroy.bind(swiper),
4864
+ },
4865
+ });
4866
+ },
4867
+ on: {
4868
+ init: function init() {
4869
+ var swiper = this;
4870
+ swiper.navigation.init();
4871
+ swiper.navigation.update();
4872
+ },
4873
+ toEdge: function toEdge() {
4874
+ var swiper = this;
4875
+ swiper.navigation.update();
4876
+ },
4877
+ fromEdge: function fromEdge() {
4878
+ var swiper = this;
4879
+ swiper.navigation.update();
4880
+ },
4881
+ destroy: function destroy() {
4882
+ var swiper = this;
4883
+ swiper.navigation.destroy();
4884
+ },
4885
+ click: function click(e) {
4886
+ var swiper = this;
4887
+ var ref = swiper.navigation;
4888
+ var $nextEl = ref.$nextEl;
4889
+ var $prevEl = ref.$prevEl;
4890
+ if (
4891
+ swiper.params.navigation.hideOnClick &&
4892
+ !$(e.target).is($prevEl) &&
4893
+ !$(e.target).is($nextEl)
4894
+ ) {
4895
+ if ($nextEl) { $nextEl.toggleClass(swiper.params.navigation.hiddenClass); }
4896
+ if ($prevEl) { $prevEl.toggleClass(swiper.params.navigation.hiddenClass); }
4897
+ }
4898
+ },
4899
+ },
4900
+ };
4901
+
4902
+ var Pagination = {
4903
+ update: function update() {
4904
+ // Render || Update Pagination bullets/items
4905
+ var swiper = this;
4906
+ var rtl = swiper.rtl;
4907
+ var params = swiper.params.pagination;
4908
+ if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
4909
+ var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
4910
+ var $el = swiper.pagination.$el;
4911
+ // Current/Total
4912
+ var current;
4913
+ var total = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
4914
+ if (swiper.params.loop) {
4915
+ current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup);
4916
+ if (current > slidesLength - 1 - (swiper.loopedSlides * 2)) {
4917
+ current -= (slidesLength - (swiper.loopedSlides * 2));
4918
+ }
4919
+ if (current > total - 1) { current -= total; }
4920
+ if (current < 0 && swiper.params.paginationType !== 'bullets') { current = total + current; }
4921
+ } else if (typeof swiper.snapIndex !== 'undefined') {
4922
+ current = swiper.snapIndex;
4923
+ } else {
4924
+ current = swiper.activeIndex || 0;
4925
+ }
4926
+ // Types
4927
+ if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) {
4928
+ var bullets = swiper.pagination.bullets;
4929
+ var firstIndex;
4930
+ var lastIndex;
4931
+ var midIndex;
4932
+ if (params.dynamicBullets) {
4933
+ swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true);
4934
+ $el.css(swiper.isHorizontal() ? 'width' : 'height', ((swiper.pagination.bulletSize * (params.dynamicMainBullets + 4)) + "px"));
4935
+ if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) {
4936
+ swiper.pagination.dynamicBulletIndex += (current - swiper.previousIndex);
4937
+ if (swiper.pagination.dynamicBulletIndex > (params.dynamicMainBullets - 1)) {
4938
+ swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1;
4939
+ } else if (swiper.pagination.dynamicBulletIndex < 0) {
4940
+ swiper.pagination.dynamicBulletIndex = 0;
4941
+ }
4942
+ }
4943
+ firstIndex = current - swiper.pagination.dynamicBulletIndex;
4944
+ lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1);
4945
+ midIndex = (lastIndex + firstIndex) / 2;
4946
+ }
4947
+ bullets.removeClass(((params.bulletActiveClass) + " " + (params.bulletActiveClass) + "-next " + (params.bulletActiveClass) + "-next-next " + (params.bulletActiveClass) + "-prev " + (params.bulletActiveClass) + "-prev-prev " + (params.bulletActiveClass) + "-main"));
4948
+ if ($el.length > 1) {
4949
+ bullets.each(function (index, bullet) {
4950
+ var $bullet = $(bullet);
4951
+ var bulletIndex = $bullet.index();
4952
+ if (bulletIndex === current) {
4953
+ $bullet.addClass(params.bulletActiveClass);
4954
+ }
4955
+ if (params.dynamicBullets) {
4956
+ if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) {
4957
+ $bullet.addClass(((params.bulletActiveClass) + "-main"));
4958
+ }
4959
+ if (bulletIndex === firstIndex) {
4960
+ $bullet
4961
+ .prev()
4962
+ .addClass(((params.bulletActiveClass) + "-prev"))
4963
+ .prev()
4964
+ .addClass(((params.bulletActiveClass) + "-prev-prev"));
4965
+ }
4966
+ if (bulletIndex === lastIndex) {
4967
+ $bullet
4968
+ .next()
4969
+ .addClass(((params.bulletActiveClass) + "-next"))
4970
+ .next()
4971
+ .addClass(((params.bulletActiveClass) + "-next-next"));
4972
+ }
4973
+ }
4974
+ });
4975
+ } else {
4976
+ var $bullet = bullets.eq(current);
4977
+ $bullet.addClass(params.bulletActiveClass);
4978
+ if (params.dynamicBullets) {
4979
+ var $firstDisplayedBullet = bullets.eq(firstIndex);
4980
+ var $lastDisplayedBullet = bullets.eq(lastIndex);
4981
+ for (var i = firstIndex; i <= lastIndex; i += 1) {
4982
+ bullets.eq(i).addClass(((params.bulletActiveClass) + "-main"));
4983
+ }
4984
+ $firstDisplayedBullet
4985
+ .prev()
4986
+ .addClass(((params.bulletActiveClass) + "-prev"))
4987
+ .prev()
4988
+ .addClass(((params.bulletActiveClass) + "-prev-prev"));
4989
+ $lastDisplayedBullet
4990
+ .next()
4991
+ .addClass(((params.bulletActiveClass) + "-next"))
4992
+ .next()
4993
+ .addClass(((params.bulletActiveClass) + "-next-next"));
4994
+ }
4995
+ }
4996
+ if (params.dynamicBullets) {
4997
+ var dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4);
4998
+ var bulletsOffset = (((swiper.pagination.bulletSize * dynamicBulletsLength) - (swiper.pagination.bulletSize)) / 2) - (midIndex * swiper.pagination.bulletSize);
4999
+ var offsetProp = rtl ? 'right' : 'left';
5000
+ bullets.css(swiper.isHorizontal() ? offsetProp : 'top', (bulletsOffset + "px"));
5001
+ }
5002
+ }
5003
+ if (params.type === 'fraction') {
5004
+ $el.find(("." + (params.currentClass))).text(params.formatFractionCurrent(current + 1));
5005
+ $el.find(("." + (params.totalClass))).text(params.formatFractionTotal(total));
5006
+ }
5007
+ if (params.type === 'progressbar') {
5008
+ var progressbarDirection;
5009
+ if (params.progressbarOpposite) {
5010
+ progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal';
5011
+ } else {
5012
+ progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical';
5013
+ }
5014
+ var scale = (current + 1) / total;
5015
+ var scaleX = 1;
5016
+ var scaleY = 1;
5017
+ if (progressbarDirection === 'horizontal') {
5018
+ scaleX = scale;
5019
+ } else {
5020
+ scaleY = scale;
5021
+ }
5022
+ $el.find(("." + (params.progressbarFillClass))).transform(("translate3d(0,0,0) scaleX(" + scaleX + ") scaleY(" + scaleY + ")")).transition(swiper.params.speed);
5023
+ }
5024
+ if (params.type === 'custom' && params.renderCustom) {
5025
+ $el.html(params.renderCustom(swiper, current + 1, total));
5026
+ swiper.emit('paginationRender', swiper, $el[0]);
5027
+ } else {
5028
+ swiper.emit('paginationUpdate', swiper, $el[0]);
5029
+ }
5030
+ $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass);
5031
+ },
5032
+ render: function render() {
5033
+ // Render Container
5034
+ var swiper = this;
5035
+ var params = swiper.params.pagination;
5036
+ if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
5037
+ var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length;
5038
+
5039
+ var $el = swiper.pagination.$el;
5040
+ var paginationHTML = '';
5041
+ if (params.type === 'bullets') {
5042
+ var numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - (swiper.loopedSlides * 2)) / swiper.params.slidesPerGroup) : swiper.snapGrid.length;
5043
+ for (var i = 0; i < numberOfBullets; i += 1) {
5044
+ if (params.renderBullet) {
5045
+ paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass);
5046
+ } else {
5047
+ paginationHTML += "<" + (params.bulletElement) + " class=\"" + (params.bulletClass) + "\"></" + (params.bulletElement) + ">";
5048
+ }
5049
+ }
5050
+ $el.html(paginationHTML);
5051
+ swiper.pagination.bullets = $el.find(("." + (params.bulletClass)));
5052
+ }
5053
+ if (params.type === 'fraction') {
5054
+ if (params.renderFraction) {
5055
+ paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass);
5056
+ } else {
5057
+ paginationHTML =
5058
+ "<span class=\"" + (params.currentClass) + "\"></span>" +
5059
+ ' / ' +
5060
+ "<span class=\"" + (params.totalClass) + "\"></span>";
5061
+ }
5062
+ $el.html(paginationHTML);
5063
+ }
5064
+ if (params.type === 'progressbar') {
5065
+ if (params.renderProgressbar) {
5066
+ paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass);
5067
+ } else {
5068
+ paginationHTML = "<span class=\"" + (params.progressbarFillClass) + "\"></span>";
5069
+ }
5070
+ $el.html(paginationHTML);
5071
+ }
5072
+ if (params.type !== 'custom') {
5073
+ swiper.emit('paginationRender', swiper.pagination.$el[0]);
5074
+ }
5075
+ },
5076
+ init: function init() {
5077
+ var swiper = this;
5078
+ var params = swiper.params.pagination;
5079
+ if (!params.el) { return; }
5080
+
5081
+ var $el = $(params.el);
5082
+ if ($el.length === 0) { return; }
5083
+
5084
+ if (
5085
+ swiper.params.uniqueNavElements &&
5086
+ typeof params.el === 'string' &&
5087
+ $el.length > 1 &&
5088
+ swiper.$el.find(params.el).length === 1
5089
+ ) {
5090
+ $el = swiper.$el.find(params.el);
5091
+ }
5092
+
5093
+ if (params.type === 'bullets' && params.clickable) {
5094
+ $el.addClass(params.clickableClass);
5095
+ }
5096
+
5097
+ $el.addClass(params.modifierClass + params.type);
5098
+
5099
+ if (params.type === 'bullets' && params.dynamicBullets) {
5100
+ $el.addClass(("" + (params.modifierClass) + (params.type) + "-dynamic"));
5101
+ swiper.pagination.dynamicBulletIndex = 0;
5102
+ if (params.dynamicMainBullets < 1) {
5103
+ params.dynamicMainBullets = 1;
5104
+ }
5105
+ }
5106
+ if (params.type === 'progressbar' && params.progressbarOpposite) {
5107
+ $el.addClass(params.progressbarOppositeClass);
5108
+ }
5109
+
5110
+ if (params.clickable) {
5111
+ $el.on('click', ("." + (params.bulletClass)), function onClick(e) {
5112
+ e.preventDefault();
5113
+ var index = $(this).index() * swiper.params.slidesPerGroup;
5114
+ if (swiper.params.loop) { index += swiper.loopedSlides; }
5115
+ swiper.slideTo(index);
5116
+ });
5117
+ }
5118
+
5119
+ Utils.extend(swiper.pagination, {
5120
+ $el: $el,
5121
+ el: $el[0],
5122
+ });
5123
+ },
5124
+ destroy: function destroy() {
5125
+ var swiper = this;
5126
+ var params = swiper.params.pagination;
5127
+ if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) { return; }
5128
+ var $el = swiper.pagination.$el;
5129
+
5130
+ $el.removeClass(params.hiddenClass);
5131
+ $el.removeClass(params.modifierClass + params.type);
5132
+ if (swiper.pagination.bullets) { swiper.pagination.bullets.removeClass(params.bulletActiveClass); }
5133
+ if (params.clickable) {
5134
+ $el.off('click', ("." + (params.bulletClass)));
5135
+ }
5136
+ },
5137
+ };
5138
+
5139
+ var Pagination$1 = {
5140
+ name: 'pagination',
5141
+ params: {
5142
+ pagination: {
5143
+ el: null,
5144
+ bulletElement: 'span',
5145
+ clickable: false,
5146
+ hideOnClick: false,
5147
+ renderBullet: null,
5148
+ renderProgressbar: null,
5149
+ renderFraction: null,
5150
+ renderCustom: null,
5151
+ progressbarOpposite: false,
5152
+ type: 'bullets', // 'bullets' or 'progressbar' or 'fraction' or 'custom'
5153
+ dynamicBullets: false,
5154
+ dynamicMainBullets: 1,
5155
+ formatFractionCurrent: function (number) { return number; },
5156
+ formatFractionTotal: function (number) { return number; },
5157
+ bulletClass: 'swiper-pagination-bullet',
5158
+ bulletActiveClass: 'swiper-pagination-bullet-active',
5159
+ modifierClass: 'swiper-pagination-', // NEW
5160
+ currentClass: 'swiper-pagination-current',
5161
+ totalClass: 'swiper-pagination-total',
5162
+ hiddenClass: 'swiper-pagination-hidden',
5163
+ progressbarFillClass: 'swiper-pagination-progressbar-fill',
5164
+ progressbarOppositeClass: 'swiper-pagination-progressbar-opposite',
5165
+ clickableClass: 'swiper-pagination-clickable', // NEW
5166
+ lockClass: 'swiper-pagination-lock',
5167
+ },
5168
+ },
5169
+ create: function create() {
5170
+ var swiper = this;
5171
+ Utils.extend(swiper, {
5172
+ pagination: {
5173
+ init: Pagination.init.bind(swiper),
5174
+ render: Pagination.render.bind(swiper),
5175
+ update: Pagination.update.bind(swiper),
5176
+ destroy: Pagination.destroy.bind(swiper),
5177
+ dynamicBulletIndex: 0,
5178
+ },
5179
+ });
5180
+ },
5181
+ on: {
5182
+ init: function init() {
5183
+ var swiper = this;
5184
+ swiper.pagination.init();
5185
+ swiper.pagination.render();
5186
+ swiper.pagination.update();
5187
+ },
5188
+ activeIndexChange: function activeIndexChange() {
5189
+ var swiper = this;
5190
+ if (swiper.params.loop) {
5191
+ swiper.pagination.update();
5192
+ } else if (typeof swiper.snapIndex === 'undefined') {
5193
+ swiper.pagination.update();
5194
+ }
5195
+ },
5196
+ snapIndexChange: function snapIndexChange() {
5197
+ var swiper = this;
5198
+ if (!swiper.params.loop) {
5199
+ swiper.pagination.update();
5200
+ }
5201
+ },
5202
+ slidesLengthChange: function slidesLengthChange() {
5203
+ var swiper = this;
5204
+ if (swiper.params.loop) {
5205
+ swiper.pagination.render();
5206
+ swiper.pagination.update();
5207
+ }
5208
+ },
5209
+ snapGridLengthChange: function snapGridLengthChange() {
5210
+ var swiper = this;
5211
+ if (!swiper.params.loop) {
5212
+ swiper.pagination.render();
5213
+ swiper.pagination.update();
5214
+ }
5215
+ },
5216
+ destroy: function destroy() {
5217
+ var swiper = this;
5218
+ swiper.pagination.destroy();
5219
+ },
5220
+ click: function click(e) {
5221
+ var swiper = this;
5222
+ if (
5223
+ swiper.params.pagination.el &&
5224
+ swiper.params.pagination.hideOnClick &&
5225
+ swiper.pagination.$el.length > 0 &&
5226
+ !$(e.target).hasClass(swiper.params.pagination.bulletClass)
5227
+ ) {
5228
+ swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass);
5229
+ }
5230
+ },
5231
+ },
5232
+ };
5233
+
5234
+ var Scrollbar = {
5235
+ setTranslate: function setTranslate() {
5236
+ var swiper = this;
5237
+ if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
5238
+ var scrollbar = swiper.scrollbar;
5239
+ var rtl = swiper.rtlTranslate;
5240
+ var progress = swiper.progress;
5241
+ var dragSize = scrollbar.dragSize;
5242
+ var trackSize = scrollbar.trackSize;
5243
+ var $dragEl = scrollbar.$dragEl;
5244
+ var $el = scrollbar.$el;
5245
+ var params = swiper.params.scrollbar;
5246
+
5247
+ var newSize = dragSize;
5248
+ var newPos = (trackSize - dragSize) * progress;
5249
+ if (rtl) {
5250
+ newPos = -newPos;
5251
+ if (newPos > 0) {
5252
+ newSize = dragSize - newPos;
5253
+ newPos = 0;
5254
+ } else if (-newPos + dragSize > trackSize) {
5255
+ newSize = trackSize + newPos;
5256
+ }
5257
+ } else if (newPos < 0) {
5258
+ newSize = dragSize + newPos;
5259
+ newPos = 0;
5260
+ } else if (newPos + dragSize > trackSize) {
5261
+ newSize = trackSize - newPos;
5262
+ }
5263
+ if (swiper.isHorizontal()) {
5264
+ if (Support.transforms3d) {
5265
+ $dragEl.transform(("translate3d(" + newPos + "px, 0, 0)"));
5266
+ } else {
5267
+ $dragEl.transform(("translateX(" + newPos + "px)"));
5268
+ }
5269
+ $dragEl[0].style.width = newSize + "px";
5270
+ } else {
5271
+ if (Support.transforms3d) {
5272
+ $dragEl.transform(("translate3d(0px, " + newPos + "px, 0)"));
5273
+ } else {
5274
+ $dragEl.transform(("translateY(" + newPos + "px)"));
5275
+ }
5276
+ $dragEl[0].style.height = newSize + "px";
5277
+ }
5278
+ if (params.hide) {
5279
+ clearTimeout(swiper.scrollbar.timeout);
5280
+ $el[0].style.opacity = 1;
5281
+ swiper.scrollbar.timeout = setTimeout(function () {
5282
+ $el[0].style.opacity = 0;
5283
+ $el.transition(400);
5284
+ }, 1000);
5285
+ }
5286
+ },
5287
+ setTransition: function setTransition(duration) {
5288
+ var swiper = this;
5289
+ if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
5290
+ swiper.scrollbar.$dragEl.transition(duration);
5291
+ },
5292
+ updateSize: function updateSize() {
5293
+ var swiper = this;
5294
+ if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) { return; }
5295
+
5296
+ var scrollbar = swiper.scrollbar;
5297
+ var $dragEl = scrollbar.$dragEl;
5298
+ var $el = scrollbar.$el;
5299
+
5300
+ $dragEl[0].style.width = '';
5301
+ $dragEl[0].style.height = '';
5302
+ var trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight;
5303
+
5304
+ var divider = swiper.size / swiper.virtualSize;
5305
+ var moveDivider = divider * (trackSize / swiper.size);
5306
+ var dragSize;
5307
+ if (swiper.params.scrollbar.dragSize === 'auto') {
5308
+ dragSize = trackSize * divider;
5309
+ } else {
5310
+ dragSize = parseInt(swiper.params.scrollbar.dragSize, 10);
5311
+ }
5312
+
5313
+ if (swiper.isHorizontal()) {
5314
+ $dragEl[0].style.width = dragSize + "px";
5315
+ } else {
5316
+ $dragEl[0].style.height = dragSize + "px";
5317
+ }
5318
+
5319
+ if (divider >= 1) {
5320
+ $el[0].style.display = 'none';
5321
+ } else {
5322
+ $el[0].style.display = '';
5323
+ }
5324
+ if (swiper.params.scrollbarHide) {
5325
+ $el[0].style.opacity = 0;
5326
+ }
5327
+ Utils.extend(scrollbar, {
5328
+ trackSize: trackSize,
5329
+ divider: divider,
5330
+ moveDivider: moveDivider,
5331
+ dragSize: dragSize,
5332
+ });
5333
+ scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass);
5334
+ },
5335
+ setDragPosition: function setDragPosition(e) {
5336
+ var swiper = this;
5337
+ var scrollbar = swiper.scrollbar;
5338
+ var rtl = swiper.rtlTranslate;
5339
+ var $el = scrollbar.$el;
5340
+ var dragSize = scrollbar.dragSize;
5341
+ var trackSize = scrollbar.trackSize;
5342
+
5343
+ var pointerPosition;
5344
+ if (swiper.isHorizontal()) {
5345
+ pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageX : e.pageX || e.clientX);
5346
+ } else {
5347
+ pointerPosition = ((e.type === 'touchstart' || e.type === 'touchmove') ? e.targetTouches[0].pageY : e.pageY || e.clientY);
5348
+ }
5349
+ var positionRatio;
5350
+ positionRatio = ((pointerPosition) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragSize / 2)) / (trackSize - dragSize);
5351
+ positionRatio = Math.max(Math.min(positionRatio, 1), 0);
5352
+ if (rtl) {
5353
+ positionRatio = 1 - positionRatio;
5354
+ }
5355
+
5356
+ var position = swiper.minTranslate() + ((swiper.maxTranslate() - swiper.minTranslate()) * positionRatio);
5357
+
5358
+ swiper.updateProgress(position);
5359
+ swiper.setTranslate(position);
5360
+ swiper.updateActiveIndex();
5361
+ swiper.updateSlidesClasses();
5362
+ },
5363
+ onDragStart: function onDragStart(e) {
5364
+ var swiper = this;
5365
+ var params = swiper.params.scrollbar;
5366
+ var scrollbar = swiper.scrollbar;
5367
+ var $wrapperEl = swiper.$wrapperEl;
5368
+ var $el = scrollbar.$el;
5369
+ var $dragEl = scrollbar.$dragEl;
5370
+ swiper.scrollbar.isTouched = true;
5371
+ e.preventDefault();
5372
+ e.stopPropagation();
5373
+
5374
+ $wrapperEl.transition(100);
5375
+ $dragEl.transition(100);
5376
+ scrollbar.setDragPosition(e);
5377
+
5378
+ clearTimeout(swiper.scrollbar.dragTimeout);
5379
+
5380
+ $el.transition(0);
5381
+ if (params.hide) {
5382
+ $el.css('opacity', 1);
5383
+ }
5384
+ swiper.emit('scrollbarDragStart', e);
5385
+ },
5386
+ onDragMove: function onDragMove(e) {
5387
+ var swiper = this;
5388
+ var scrollbar = swiper.scrollbar;
5389
+ var $wrapperEl = swiper.$wrapperEl;
5390
+ var $el = scrollbar.$el;
5391
+ var $dragEl = scrollbar.$dragEl;
5392
+
5393
+ if (!swiper.scrollbar.isTouched) { return; }
5394
+ if (e.preventDefault) { e.preventDefault(); }
5395
+ else { e.returnValue = false; }
5396
+ scrollbar.setDragPosition(e);
5397
+ $wrapperEl.transition(0);
5398
+ $el.transition(0);
5399
+ $dragEl.transition(0);
5400
+ swiper.emit('scrollbarDragMove', e);
5401
+ },
5402
+ onDragEnd: function onDragEnd(e) {
5403
+ var swiper = this;
5404
+
5405
+ var params = swiper.params.scrollbar;
5406
+ var scrollbar = swiper.scrollbar;
5407
+ var $el = scrollbar.$el;
5408
+
5409
+ if (!swiper.scrollbar.isTouched) { return; }
5410
+ swiper.scrollbar.isTouched = false;
5411
+ if (params.hide) {
5412
+ clearTimeout(swiper.scrollbar.dragTimeout);
5413
+ swiper.scrollbar.dragTimeout = Utils.nextTick(function () {
5414
+ $el.css('opacity', 0);
5415
+ $el.transition(400);
5416
+ }, 1000);
5417
+ }
5418
+ swiper.emit('scrollbarDragEnd', e);
5419
+ if (params.snapOnRelease) {
5420
+ swiper.slideToClosest();
5421
+ }
5422
+ },
5423
+ enableDraggable: function enableDraggable() {
5424
+ var swiper = this;
5425
+ if (!swiper.params.scrollbar.el) { return; }
5426
+ var scrollbar = swiper.scrollbar;
5427
+ var touchEvents = swiper.touchEvents;
5428
+ var touchEventsDesktop = swiper.touchEventsDesktop;
5429
+ var params = swiper.params;
5430
+ var $el = scrollbar.$el;
5431
+ var target = $el[0];
5432
+ var activeListener = Support.passiveListener && params.passiveListener ? { passive: false, capture: false } : false;
5433
+ var passiveListener = Support.passiveListener && params.passiveListener ? { passive: true, capture: false } : false;
5434
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
5435
+ target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
5436
+ doc.addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
5437
+ doc.addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
5438
+ } else {
5439
+ if (Support.touch) {
5440
+ target.addEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener);
5441
+ target.addEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener);
5442
+ target.addEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener);
5443
+ }
5444
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
5445
+ target.addEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener);
5446
+ doc.addEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener);
5447
+ doc.addEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener);
5448
+ }
5449
+ }
5450
+ },
5451
+ disableDraggable: function disableDraggable() {
5452
+ var swiper = this;
5453
+ if (!swiper.params.scrollbar.el) { return; }
5454
+ var scrollbar = swiper.scrollbar;
5455
+ var touchEvents = swiper.touchEvents;
5456
+ var touchEventsDesktop = swiper.touchEventsDesktop;
5457
+ var params = swiper.params;
5458
+ var $el = scrollbar.$el;
5459
+ var target = $el[0];
5460
+ var activeListener = Support.passiveListener && params.passiveListener ? { passive: false, capture: false } : false;
5461
+ var passiveListener = Support.passiveListener && params.passiveListener ? { passive: true, capture: false } : false;
5462
+ if (!Support.touch && (Support.pointerEvents || Support.prefixedPointerEvents)) {
5463
+ target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener);
5464
+ doc.removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener);
5465
+ doc.removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener);
5466
+ } else {
5467
+ if (Support.touch) {
5468
+ target.removeEventListener(touchEvents.start, swiper.scrollbar.onDragStart, activeListener);
5469
+ target.removeEventListener(touchEvents.move, swiper.scrollbar.onDragMove, activeListener);
5470
+ target.removeEventListener(touchEvents.end, swiper.scrollbar.onDragEnd, passiveListener);
5471
+ }
5472
+ if ((params.simulateTouch && !Device.ios && !Device.android) || (params.simulateTouch && !Support.touch && Device.ios)) {
5473
+ target.removeEventListener('mousedown', swiper.scrollbar.onDragStart, activeListener);
5474
+ doc.removeEventListener('mousemove', swiper.scrollbar.onDragMove, activeListener);
5475
+ doc.removeEventListener('mouseup', swiper.scrollbar.onDragEnd, passiveListener);
5476
+ }
5477
+ }
5478
+ },
5479
+ init: function init() {
5480
+ var swiper = this;
5481
+ if (!swiper.params.scrollbar.el) { return; }
5482
+ var scrollbar = swiper.scrollbar;
5483
+ var $swiperEl = swiper.$el;
5484
+ var params = swiper.params.scrollbar;
5485
+
5486
+ var $el = $(params.el);
5487
+ if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) {
5488
+ $el = $swiperEl.find(params.el);
5489
+ }
5490
+
5491
+ var $dragEl = $el.find(("." + (swiper.params.scrollbar.dragClass)));
5492
+ if ($dragEl.length === 0) {
5493
+ $dragEl = $(("<div class=\"" + (swiper.params.scrollbar.dragClass) + "\"></div>"));
5494
+ $el.append($dragEl);
5495
+ }
5496
+
5497
+ Utils.extend(scrollbar, {
5498
+ $el: $el,
5499
+ el: $el[0],
5500
+ $dragEl: $dragEl,
5501
+ dragEl: $dragEl[0],
5502
+ });
5503
+
5504
+ if (params.draggable) {
5505
+ scrollbar.enableDraggable();
5506
+ }
5507
+ },
5508
+ destroy: function destroy() {
5509
+ var swiper = this;
5510
+ swiper.scrollbar.disableDraggable();
5511
+ },
5512
+ };
5513
+
5514
+ var Scrollbar$1 = {
5515
+ name: 'scrollbar',
5516
+ params: {
5517
+ scrollbar: {
5518
+ el: null,
5519
+ dragSize: 'auto',
5520
+ hide: false,
5521
+ draggable: false,
5522
+ snapOnRelease: true,
5523
+ lockClass: 'swiper-scrollbar-lock',
5524
+ dragClass: 'swiper-scrollbar-drag',
5525
+ },
5526
+ },
5527
+ create: function create() {
5528
+ var swiper = this;
5529
+ Utils.extend(swiper, {
5530
+ scrollbar: {
5531
+ init: Scrollbar.init.bind(swiper),
5532
+ destroy: Scrollbar.destroy.bind(swiper),
5533
+ updateSize: Scrollbar.updateSize.bind(swiper),
5534
+ setTranslate: Scrollbar.setTranslate.bind(swiper),
5535
+ setTransition: Scrollbar.setTransition.bind(swiper),
5536
+ enableDraggable: Scrollbar.enableDraggable.bind(swiper),
5537
+ disableDraggable: Scrollbar.disableDraggable.bind(swiper),
5538
+ setDragPosition: Scrollbar.setDragPosition.bind(swiper),
5539
+ onDragStart: Scrollbar.onDragStart.bind(swiper),
5540
+ onDragMove: Scrollbar.onDragMove.bind(swiper),
5541
+ onDragEnd: Scrollbar.onDragEnd.bind(swiper),
5542
+ isTouched: false,
5543
+ timeout: null,
5544
+ dragTimeout: null,
5545
+ },
5546
+ });
5547
+ },
5548
+ on: {
5549
+ init: function init() {
5550
+ var swiper = this;
5551
+ swiper.scrollbar.init();
5552
+ swiper.scrollbar.updateSize();
5553
+ swiper.scrollbar.setTranslate();
5554
+ },
5555
+ update: function update() {
5556
+ var swiper = this;
5557
+ swiper.scrollbar.updateSize();
5558
+ },
5559
+ resize: function resize() {
5560
+ var swiper = this;
5561
+ swiper.scrollbar.updateSize();
5562
+ },
5563
+ observerUpdate: function observerUpdate() {
5564
+ var swiper = this;
5565
+ swiper.scrollbar.updateSize();
5566
+ },
5567
+ setTranslate: function setTranslate() {
5568
+ var swiper = this;
5569
+ swiper.scrollbar.setTranslate();
5570
+ },
5571
+ setTransition: function setTransition(duration) {
5572
+ var swiper = this;
5573
+ swiper.scrollbar.setTransition(duration);
5574
+ },
5575
+ destroy: function destroy() {
5576
+ var swiper = this;
5577
+ swiper.scrollbar.destroy();
5578
+ },
5579
+ },
5580
+ };
5581
+
5582
+ var Parallax = {
5583
+ setTransform: function setTransform(el, progress) {
5584
+ var swiper = this;
5585
+ var rtl = swiper.rtl;
5586
+
5587
+ var $el = $(el);
5588
+ var rtlFactor = rtl ? -1 : 1;
5589
+
5590
+ var p = $el.attr('data-swiper-parallax') || '0';
5591
+ var x = $el.attr('data-swiper-parallax-x');
5592
+ var y = $el.attr('data-swiper-parallax-y');
5593
+ var scale = $el.attr('data-swiper-parallax-scale');
5594
+ var opacity = $el.attr('data-swiper-parallax-opacity');
5595
+
5596
+ if (x || y) {
5597
+ x = x || '0';
5598
+ y = y || '0';
5599
+ } else if (swiper.isHorizontal()) {
5600
+ x = p;
5601
+ y = '0';
5602
+ } else {
5603
+ y = p;
5604
+ x = '0';
5605
+ }
5606
+
5607
+ if ((x).indexOf('%') >= 0) {
5608
+ x = (parseInt(x, 10) * progress * rtlFactor) + "%";
5609
+ } else {
5610
+ x = (x * progress * rtlFactor) + "px";
5611
+ }
5612
+ if ((y).indexOf('%') >= 0) {
5613
+ y = (parseInt(y, 10) * progress) + "%";
5614
+ } else {
5615
+ y = (y * progress) + "px";
5616
+ }
5617
+
5618
+ if (typeof opacity !== 'undefined' && opacity !== null) {
5619
+ var currentOpacity = opacity - ((opacity - 1) * (1 - Math.abs(progress)));
5620
+ $el[0].style.opacity = currentOpacity;
5621
+ }
5622
+ if (typeof scale === 'undefined' || scale === null) {
5623
+ $el.transform(("translate3d(" + x + ", " + y + ", 0px)"));
5624
+ } else {
5625
+ var currentScale = scale - ((scale - 1) * (1 - Math.abs(progress)));
5626
+ $el.transform(("translate3d(" + x + ", " + y + ", 0px) scale(" + currentScale + ")"));
5627
+ }
5628
+ },
5629
+ setTranslate: function setTranslate() {
5630
+ var swiper = this;
5631
+ var $el = swiper.$el;
5632
+ var slides = swiper.slides;
5633
+ var progress = swiper.progress;
5634
+ var snapGrid = swiper.snapGrid;
5635
+ $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
5636
+ .each(function (index, el) {
5637
+ swiper.parallax.setTransform(el, progress);
5638
+ });
5639
+ slides.each(function (slideIndex, slideEl) {
5640
+ var slideProgress = slideEl.progress;
5641
+ if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') {
5642
+ slideProgress += Math.ceil(slideIndex / 2) - (progress * (snapGrid.length - 1));
5643
+ }
5644
+ slideProgress = Math.min(Math.max(slideProgress, -1), 1);
5645
+ $(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
5646
+ .each(function (index, el) {
5647
+ swiper.parallax.setTransform(el, slideProgress);
5648
+ });
5649
+ });
5650
+ },
5651
+ setTransition: function setTransition(duration) {
5652
+ if ( duration === void 0 ) duration = this.params.speed;
5653
+
5654
+ var swiper = this;
5655
+ var $el = swiper.$el;
5656
+ $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]')
5657
+ .each(function (index, parallaxEl) {
5658
+ var $parallaxEl = $(parallaxEl);
5659
+ var parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration;
5660
+ if (duration === 0) { parallaxDuration = 0; }
5661
+ $parallaxEl.transition(parallaxDuration);
5662
+ });
5663
+ },
5664
+ };
5665
+
5666
+ var Parallax$1 = {
5667
+ name: 'parallax',
5668
+ params: {
5669
+ parallax: {
5670
+ enabled: false,
5671
+ },
5672
+ },
5673
+ create: function create() {
5674
+ var swiper = this;
5675
+ Utils.extend(swiper, {
5676
+ parallax: {
5677
+ setTransform: Parallax.setTransform.bind(swiper),
5678
+ setTranslate: Parallax.setTranslate.bind(swiper),
5679
+ setTransition: Parallax.setTransition.bind(swiper),
5680
+ },
5681
+ });
5682
+ },
5683
+ on: {
5684
+ beforeInit: function beforeInit() {
5685
+ var swiper = this;
5686
+ if (!swiper.params.parallax.enabled) { return; }
5687
+ swiper.params.watchSlidesProgress = true;
5688
+ },
5689
+ init: function init() {
5690
+ var swiper = this;
5691
+ if (!swiper.params.parallax) { return; }
5692
+ swiper.parallax.setTranslate();
5693
+ },
5694
+ setTranslate: function setTranslate() {
5695
+ var swiper = this;
5696
+ if (!swiper.params.parallax) { return; }
5697
+ swiper.parallax.setTranslate();
5698
+ },
5699
+ setTransition: function setTransition(duration) {
5700
+ var swiper = this;
5701
+ if (!swiper.params.parallax) { return; }
5702
+ swiper.parallax.setTransition(duration);
5703
+ },
5704
+ },
5705
+ };
5706
+
5707
+ var Zoom = {
5708
+ // Calc Scale From Multi-touches
5709
+ getDistanceBetweenTouches: function getDistanceBetweenTouches(e) {
5710
+ if (e.targetTouches.length < 2) { return 1; }
5711
+ var x1 = e.targetTouches[0].pageX;
5712
+ var y1 = e.targetTouches[0].pageY;
5713
+ var x2 = e.targetTouches[1].pageX;
5714
+ var y2 = e.targetTouches[1].pageY;
5715
+ var distance = Math.sqrt((Math.pow( (x2 - x1), 2 )) + (Math.pow( (y2 - y1), 2 )));
5716
+ return distance;
5717
+ },
5718
+ // Events
5719
+ onGestureStart: function onGestureStart(e) {
5720
+ var swiper = this;
5721
+ var params = swiper.params.zoom;
5722
+ var zoom = swiper.zoom;
5723
+ var gesture = zoom.gesture;
5724
+ zoom.fakeGestureTouched = false;
5725
+ zoom.fakeGestureMoved = false;
5726
+ if (!Support.gestures) {
5727
+ if (e.type !== 'touchstart' || (e.type === 'touchstart' && e.targetTouches.length < 2)) {
5728
+ return;
5729
+ }
5730
+ zoom.fakeGestureTouched = true;
5731
+ gesture.scaleStart = Zoom.getDistanceBetweenTouches(e);
5732
+ }
5733
+ if (!gesture.$slideEl || !gesture.$slideEl.length) {
5734
+ gesture.$slideEl = $(e.target).closest('.swiper-slide');
5735
+ if (gesture.$slideEl.length === 0) { gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); }
5736
+ gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
5737
+ gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
5738
+ gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
5739
+ if (gesture.$imageWrapEl.length === 0) {
5740
+ gesture.$imageEl = undefined;
5741
+ return;
5742
+ }
5743
+ }
5744
+ gesture.$imageEl.transition(0);
5745
+ swiper.zoom.isScaling = true;
5746
+ },
5747
+ onGestureChange: function onGestureChange(e) {
5748
+ var swiper = this;
5749
+ var params = swiper.params.zoom;
5750
+ var zoom = swiper.zoom;
5751
+ var gesture = zoom.gesture;
5752
+ if (!Support.gestures) {
5753
+ if (e.type !== 'touchmove' || (e.type === 'touchmove' && e.targetTouches.length < 2)) {
5754
+ return;
5755
+ }
5756
+ zoom.fakeGestureMoved = true;
5757
+ gesture.scaleMove = Zoom.getDistanceBetweenTouches(e);
5758
+ }
5759
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
5760
+ if (Support.gestures) {
5761
+ swiper.zoom.scale = e.scale * zoom.currentScale;
5762
+ } else {
5763
+ zoom.scale = (gesture.scaleMove / gesture.scaleStart) * zoom.currentScale;
5764
+ }
5765
+ if (zoom.scale > gesture.maxRatio) {
5766
+ zoom.scale = (gesture.maxRatio - 1) + (Math.pow( ((zoom.scale - gesture.maxRatio) + 1), 0.5 ));
5767
+ }
5768
+ if (zoom.scale < params.minRatio) {
5769
+ zoom.scale = (params.minRatio + 1) - (Math.pow( ((params.minRatio - zoom.scale) + 1), 0.5 ));
5770
+ }
5771
+ gesture.$imageEl.transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
5772
+ },
5773
+ onGestureEnd: function onGestureEnd(e) {
5774
+ var swiper = this;
5775
+ var params = swiper.params.zoom;
5776
+ var zoom = swiper.zoom;
5777
+ var gesture = zoom.gesture;
5778
+ if (!Support.gestures) {
5779
+ if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) {
5780
+ return;
5781
+ }
5782
+ if (e.type !== 'touchend' || (e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android)) {
5783
+ return;
5784
+ }
5785
+ zoom.fakeGestureTouched = false;
5786
+ zoom.fakeGestureMoved = false;
5787
+ }
5788
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
5789
+ zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio);
5790
+ gesture.$imageEl.transition(swiper.params.speed).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
5791
+ zoom.currentScale = zoom.scale;
5792
+ zoom.isScaling = false;
5793
+ if (zoom.scale === 1) { gesture.$slideEl = undefined; }
5794
+ },
5795
+ onTouchStart: function onTouchStart(e) {
5796
+ var swiper = this;
5797
+ var zoom = swiper.zoom;
5798
+ var gesture = zoom.gesture;
5799
+ var image = zoom.image;
5800
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
5801
+ if (image.isTouched) { return; }
5802
+ if (Device.android) { e.preventDefault(); }
5803
+ image.isTouched = true;
5804
+ image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX;
5805
+ image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY;
5806
+ },
5807
+ onTouchMove: function onTouchMove(e) {
5808
+ var swiper = this;
5809
+ var zoom = swiper.zoom;
5810
+ var gesture = zoom.gesture;
5811
+ var image = zoom.image;
5812
+ var velocity = zoom.velocity;
5813
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
5814
+ swiper.allowClick = false;
5815
+ if (!image.isTouched || !gesture.$slideEl) { return; }
5816
+
5817
+ if (!image.isMoved) {
5818
+ image.width = gesture.$imageEl[0].offsetWidth;
5819
+ image.height = gesture.$imageEl[0].offsetHeight;
5820
+ image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0;
5821
+ image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0;
5822
+ gesture.slideWidth = gesture.$slideEl[0].offsetWidth;
5823
+ gesture.slideHeight = gesture.$slideEl[0].offsetHeight;
5824
+ gesture.$imageWrapEl.transition(0);
5825
+ if (swiper.rtl) {
5826
+ image.startX = -image.startX;
5827
+ image.startY = -image.startY;
5828
+ }
5829
+ }
5830
+ // Define if we need image drag
5831
+ var scaledWidth = image.width * zoom.scale;
5832
+ var scaledHeight = image.height * zoom.scale;
5833
+
5834
+ if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) { return; }
5835
+
5836
+ image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
5837
+ image.maxX = -image.minX;
5838
+ image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
5839
+ image.maxY = -image.minY;
5840
+
5841
+ image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX;
5842
+ image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY;
5843
+
5844
+ if (!image.isMoved && !zoom.isScaling) {
5845
+ if (
5846
+ swiper.isHorizontal() &&
5847
+ (
5848
+ (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x) ||
5849
+ (Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)
5850
+ )
5851
+ ) {
5852
+ image.isTouched = false;
5853
+ return;
5854
+ } else if (
5855
+ !swiper.isHorizontal() &&
5856
+ (
5857
+ (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y) ||
5858
+ (Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)
5859
+ )
5860
+ ) {
5861
+ image.isTouched = false;
5862
+ return;
5863
+ }
5864
+ }
5865
+ e.preventDefault();
5866
+ e.stopPropagation();
5867
+
5868
+ image.isMoved = true;
5869
+ image.currentX = (image.touchesCurrent.x - image.touchesStart.x) + image.startX;
5870
+ image.currentY = (image.touchesCurrent.y - image.touchesStart.y) + image.startY;
5871
+
5872
+ if (image.currentX < image.minX) {
5873
+ image.currentX = (image.minX + 1) - (Math.pow( ((image.minX - image.currentX) + 1), 0.8 ));
5874
+ }
5875
+ if (image.currentX > image.maxX) {
5876
+ image.currentX = (image.maxX - 1) + (Math.pow( ((image.currentX - image.maxX) + 1), 0.8 ));
5877
+ }
5878
+
5879
+ if (image.currentY < image.minY) {
5880
+ image.currentY = (image.minY + 1) - (Math.pow( ((image.minY - image.currentY) + 1), 0.8 ));
5881
+ }
5882
+ if (image.currentY > image.maxY) {
5883
+ image.currentY = (image.maxY - 1) + (Math.pow( ((image.currentY - image.maxY) + 1), 0.8 ));
5884
+ }
5885
+
5886
+ // Velocity
5887
+ if (!velocity.prevPositionX) { velocity.prevPositionX = image.touchesCurrent.x; }
5888
+ if (!velocity.prevPositionY) { velocity.prevPositionY = image.touchesCurrent.y; }
5889
+ if (!velocity.prevTime) { velocity.prevTime = Date.now(); }
5890
+ velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2;
5891
+ velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2;
5892
+ if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) { velocity.x = 0; }
5893
+ if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) { velocity.y = 0; }
5894
+ velocity.prevPositionX = image.touchesCurrent.x;
5895
+ velocity.prevPositionY = image.touchesCurrent.y;
5896
+ velocity.prevTime = Date.now();
5897
+
5898
+ gesture.$imageWrapEl.transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)"));
5899
+ },
5900
+ onTouchEnd: function onTouchEnd() {
5901
+ var swiper = this;
5902
+ var zoom = swiper.zoom;
5903
+ var gesture = zoom.gesture;
5904
+ var image = zoom.image;
5905
+ var velocity = zoom.velocity;
5906
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
5907
+ if (!image.isTouched || !image.isMoved) {
5908
+ image.isTouched = false;
5909
+ image.isMoved = false;
5910
+ return;
5911
+ }
5912
+ image.isTouched = false;
5913
+ image.isMoved = false;
5914
+ var momentumDurationX = 300;
5915
+ var momentumDurationY = 300;
5916
+ var momentumDistanceX = velocity.x * momentumDurationX;
5917
+ var newPositionX = image.currentX + momentumDistanceX;
5918
+ var momentumDistanceY = velocity.y * momentumDurationY;
5919
+ var newPositionY = image.currentY + momentumDistanceY;
5920
+
5921
+ // Fix duration
5922
+ if (velocity.x !== 0) { momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); }
5923
+ if (velocity.y !== 0) { momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); }
5924
+ var momentumDuration = Math.max(momentumDurationX, momentumDurationY);
5925
+
5926
+ image.currentX = newPositionX;
5927
+ image.currentY = newPositionY;
5928
+
5929
+ // Define if we need image drag
5930
+ var scaledWidth = image.width * zoom.scale;
5931
+ var scaledHeight = image.height * zoom.scale;
5932
+ image.minX = Math.min(((gesture.slideWidth / 2) - (scaledWidth / 2)), 0);
5933
+ image.maxX = -image.minX;
5934
+ image.minY = Math.min(((gesture.slideHeight / 2) - (scaledHeight / 2)), 0);
5935
+ image.maxY = -image.minY;
5936
+ image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX);
5937
+ image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY);
5938
+
5939
+ gesture.$imageWrapEl.transition(momentumDuration).transform(("translate3d(" + (image.currentX) + "px, " + (image.currentY) + "px,0)"));
5940
+ },
5941
+ onTransitionEnd: function onTransitionEnd() {
5942
+ var swiper = this;
5943
+ var zoom = swiper.zoom;
5944
+ var gesture = zoom.gesture;
5945
+ if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) {
5946
+ gesture.$imageEl.transform('translate3d(0,0,0) scale(1)');
5947
+ gesture.$imageWrapEl.transform('translate3d(0,0,0)');
5948
+ gesture.$slideEl = undefined;
5949
+ gesture.$imageEl = undefined;
5950
+ gesture.$imageWrapEl = undefined;
5951
+
5952
+ zoom.scale = 1;
5953
+ zoom.currentScale = 1;
5954
+ }
5955
+ },
5956
+ // Toggle Zoom
5957
+ toggle: function toggle(e) {
5958
+ var swiper = this;
5959
+ var zoom = swiper.zoom;
5960
+
5961
+ if (zoom.scale && zoom.scale !== 1) {
5962
+ // Zoom Out
5963
+ zoom.out();
5964
+ } else {
5965
+ // Zoom In
5966
+ zoom.in(e);
5967
+ }
5968
+ },
5969
+ in: function in$1(e) {
5970
+ var swiper = this;
5971
+
5972
+ var zoom = swiper.zoom;
5973
+ var params = swiper.params.zoom;
5974
+ var gesture = zoom.gesture;
5975
+ var image = zoom.image;
5976
+
5977
+ if (!gesture.$slideEl) {
5978
+ gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
5979
+ gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
5980
+ gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
5981
+ }
5982
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
5983
+
5984
+ gesture.$slideEl.addClass(("" + (params.zoomedSlideClass)));
5985
+
5986
+ var touchX;
5987
+ var touchY;
5988
+ var offsetX;
5989
+ var offsetY;
5990
+ var diffX;
5991
+ var diffY;
5992
+ var translateX;
5993
+ var translateY;
5994
+ var imageWidth;
5995
+ var imageHeight;
5996
+ var scaledWidth;
5997
+ var scaledHeight;
5998
+ var translateMinX;
5999
+ var translateMinY;
6000
+ var translateMaxX;
6001
+ var translateMaxY;
6002
+ var slideWidth;
6003
+ var slideHeight;
6004
+
6005
+ if (typeof image.touchesStart.x === 'undefined' && e) {
6006
+ touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX;
6007
+ touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY;
6008
+ } else {
6009
+ touchX = image.touchesStart.x;
6010
+ touchY = image.touchesStart.y;
6011
+ }
6012
+
6013
+ zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
6014
+ zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio;
6015
+ if (e) {
6016
+ slideWidth = gesture.$slideEl[0].offsetWidth;
6017
+ slideHeight = gesture.$slideEl[0].offsetHeight;
6018
+ offsetX = gesture.$slideEl.offset().left;
6019
+ offsetY = gesture.$slideEl.offset().top;
6020
+ diffX = (offsetX + (slideWidth / 2)) - touchX;
6021
+ diffY = (offsetY + (slideHeight / 2)) - touchY;
6022
+
6023
+ imageWidth = gesture.$imageEl[0].offsetWidth;
6024
+ imageHeight = gesture.$imageEl[0].offsetHeight;
6025
+ scaledWidth = imageWidth * zoom.scale;
6026
+ scaledHeight = imageHeight * zoom.scale;
6027
+
6028
+ translateMinX = Math.min(((slideWidth / 2) - (scaledWidth / 2)), 0);
6029
+ translateMinY = Math.min(((slideHeight / 2) - (scaledHeight / 2)), 0);
6030
+ translateMaxX = -translateMinX;
6031
+ translateMaxY = -translateMinY;
6032
+
6033
+ translateX = diffX * zoom.scale;
6034
+ translateY = diffY * zoom.scale;
6035
+
6036
+ if (translateX < translateMinX) {
6037
+ translateX = translateMinX;
6038
+ }
6039
+ if (translateX > translateMaxX) {
6040
+ translateX = translateMaxX;
6041
+ }
6042
+
6043
+ if (translateY < translateMinY) {
6044
+ translateY = translateMinY;
6045
+ }
6046
+ if (translateY > translateMaxY) {
6047
+ translateY = translateMaxY;
6048
+ }
6049
+ } else {
6050
+ translateX = 0;
6051
+ translateY = 0;
6052
+ }
6053
+ gesture.$imageWrapEl.transition(300).transform(("translate3d(" + translateX + "px, " + translateY + "px,0)"));
6054
+ gesture.$imageEl.transition(300).transform(("translate3d(0,0,0) scale(" + (zoom.scale) + ")"));
6055
+ },
6056
+ out: function out() {
6057
+ var swiper = this;
6058
+
6059
+ var zoom = swiper.zoom;
6060
+ var params = swiper.params.zoom;
6061
+ var gesture = zoom.gesture;
6062
+
6063
+ if (!gesture.$slideEl) {
6064
+ gesture.$slideEl = swiper.clickedSlide ? $(swiper.clickedSlide) : swiper.slides.eq(swiper.activeIndex);
6065
+ gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas');
6066
+ gesture.$imageWrapEl = gesture.$imageEl.parent(("." + (params.containerClass)));
6067
+ }
6068
+ if (!gesture.$imageEl || gesture.$imageEl.length === 0) { return; }
6069
+
6070
+ zoom.scale = 1;
6071
+ zoom.currentScale = 1;
6072
+ gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)');
6073
+ gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)');
6074
+ gesture.$slideEl.removeClass(("" + (params.zoomedSlideClass)));
6075
+ gesture.$slideEl = undefined;
6076
+ },
6077
+ // Attach/Detach Events
6078
+ enable: function enable() {
6079
+ var swiper = this;
6080
+ var zoom = swiper.zoom;
6081
+ if (zoom.enabled) { return; }
6082
+ zoom.enabled = true;
6083
+
6084
+ var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
6085
+
6086
+ // Scale image
6087
+ if (Support.gestures) {
6088
+ swiper.$wrapperEl.on('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
6089
+ swiper.$wrapperEl.on('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
6090
+ swiper.$wrapperEl.on('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
6091
+ } else if (swiper.touchEvents.start === 'touchstart') {
6092
+ swiper.$wrapperEl.on(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
6093
+ swiper.$wrapperEl.on(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
6094
+ swiper.$wrapperEl.on(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
6095
+ }
6096
+
6097
+ // Move image
6098
+ swiper.$wrapperEl.on(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove);
6099
+ },
6100
+ disable: function disable() {
6101
+ var swiper = this;
6102
+ var zoom = swiper.zoom;
6103
+ if (!zoom.enabled) { return; }
6104
+
6105
+ swiper.zoom.enabled = false;
6106
+
6107
+ var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { passive: true, capture: false } : false;
6108
+
6109
+ // Scale image
6110
+ if (Support.gestures) {
6111
+ swiper.$wrapperEl.off('gesturestart', '.swiper-slide', zoom.onGestureStart, passiveListener);
6112
+ swiper.$wrapperEl.off('gesturechange', '.swiper-slide', zoom.onGestureChange, passiveListener);
6113
+ swiper.$wrapperEl.off('gestureend', '.swiper-slide', zoom.onGestureEnd, passiveListener);
6114
+ } else if (swiper.touchEvents.start === 'touchstart') {
6115
+ swiper.$wrapperEl.off(swiper.touchEvents.start, '.swiper-slide', zoom.onGestureStart, passiveListener);
6116
+ swiper.$wrapperEl.off(swiper.touchEvents.move, '.swiper-slide', zoom.onGestureChange, passiveListener);
6117
+ swiper.$wrapperEl.off(swiper.touchEvents.end, '.swiper-slide', zoom.onGestureEnd, passiveListener);
6118
+ }
6119
+
6120
+ // Move image
6121
+ swiper.$wrapperEl.off(swiper.touchEvents.move, ("." + (swiper.params.zoom.containerClass)), zoom.onTouchMove);
6122
+ },
6123
+ };
6124
+
6125
+ var Zoom$1 = {
6126
+ name: 'zoom',
6127
+ params: {
6128
+ zoom: {
6129
+ enabled: false,
6130
+ maxRatio: 3,
6131
+ minRatio: 1,
6132
+ toggle: true,
6133
+ containerClass: 'swiper-zoom-container',
6134
+ zoomedSlideClass: 'swiper-slide-zoomed',
6135
+ },
6136
+ },
6137
+ create: function create() {
6138
+ var swiper = this;
6139
+ var zoom = {
6140
+ enabled: false,
6141
+ scale: 1,
6142
+ currentScale: 1,
6143
+ isScaling: false,
6144
+ gesture: {
6145
+ $slideEl: undefined,
6146
+ slideWidth: undefined,
6147
+ slideHeight: undefined,
6148
+ $imageEl: undefined,
6149
+ $imageWrapEl: undefined,
6150
+ maxRatio: 3,
6151
+ },
6152
+ image: {
6153
+ isTouched: undefined,
6154
+ isMoved: undefined,
6155
+ currentX: undefined,
6156
+ currentY: undefined,
6157
+ minX: undefined,
6158
+ minY: undefined,
6159
+ maxX: undefined,
6160
+ maxY: undefined,
6161
+ width: undefined,
6162
+ height: undefined,
6163
+ startX: undefined,
6164
+ startY: undefined,
6165
+ touchesStart: {},
6166
+ touchesCurrent: {},
6167
+ },
6168
+ velocity: {
6169
+ x: undefined,
6170
+ y: undefined,
6171
+ prevPositionX: undefined,
6172
+ prevPositionY: undefined,
6173
+ prevTime: undefined,
6174
+ },
6175
+ };
6176
+ ('onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out').split(' ').forEach(function (methodName) {
6177
+ zoom[methodName] = Zoom[methodName].bind(swiper);
6178
+ });
6179
+ Utils.extend(swiper, {
6180
+ zoom: zoom,
6181
+ });
6182
+ },
6183
+ on: {
6184
+ init: function init() {
6185
+ var swiper = this;
6186
+ if (swiper.params.zoom.enabled) {
6187
+ swiper.zoom.enable();
6188
+ }
6189
+ },
6190
+ destroy: function destroy() {
6191
+ var swiper = this;
6192
+ swiper.zoom.disable();
6193
+ },
6194
+ touchStart: function touchStart(e) {
6195
+ var swiper = this;
6196
+ if (!swiper.zoom.enabled) { return; }
6197
+ swiper.zoom.onTouchStart(e);
6198
+ },
6199
+ touchEnd: function touchEnd(e) {
6200
+ var swiper = this;
6201
+ if (!swiper.zoom.enabled) { return; }
6202
+ swiper.zoom.onTouchEnd(e);
6203
+ },
6204
+ doubleTap: function doubleTap(e) {
6205
+ var swiper = this;
6206
+ if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) {
6207
+ swiper.zoom.toggle(e);
6208
+ }
6209
+ },
6210
+ transitionEnd: function transitionEnd() {
6211
+ var swiper = this;
6212
+ if (swiper.zoom.enabled && swiper.params.zoom.enabled) {
6213
+ swiper.zoom.onTransitionEnd();
6214
+ }
6215
+ },
6216
+ },
6217
+ };
6218
+
6219
+ var Lazy = {
6220
+ loadInSlide: function loadInSlide(index, loadInDuplicate) {
6221
+ if ( loadInDuplicate === void 0 ) loadInDuplicate = true;
6222
+
6223
+ var swiper = this;
6224
+ var params = swiper.params.lazy;
6225
+ if (typeof index === 'undefined') { return; }
6226
+ if (swiper.slides.length === 0) { return; }
6227
+ var isVirtual = swiper.virtual && swiper.params.virtual.enabled;
6228
+
6229
+ var $slideEl = isVirtual
6230
+ ? swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]"))
6231
+ : swiper.slides.eq(index);
6232
+
6233
+ var $images = $slideEl.find(("." + (params.elementClass) + ":not(." + (params.loadedClass) + "):not(." + (params.loadingClass) + ")"));
6234
+ if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) {
6235
+ $images = $images.add($slideEl[0]);
6236
+ }
6237
+ if ($images.length === 0) { return; }
6238
+
6239
+ $images.each(function (imageIndex, imageEl) {
6240
+ var $imageEl = $(imageEl);
6241
+ $imageEl.addClass(params.loadingClass);
6242
+
6243
+ var background = $imageEl.attr('data-background');
6244
+ var src = $imageEl.attr('data-src');
6245
+ var srcset = $imageEl.attr('data-srcset');
6246
+ var sizes = $imageEl.attr('data-sizes');
6247
+
6248
+ swiper.loadImage($imageEl[0], (src || background), srcset, sizes, false, function () {
6249
+ if (typeof swiper === 'undefined' || swiper === null || !swiper || (swiper && !swiper.params) || swiper.destroyed) { return; }
6250
+ if (background) {
6251
+ $imageEl.css('background-image', ("url(\"" + background + "\")"));
6252
+ $imageEl.removeAttr('data-background');
6253
+ } else {
6254
+ if (srcset) {
6255
+ $imageEl.attr('srcset', srcset);
6256
+ $imageEl.removeAttr('data-srcset');
6257
+ }
6258
+ if (sizes) {
6259
+ $imageEl.attr('sizes', sizes);
6260
+ $imageEl.removeAttr('data-sizes');
6261
+ }
6262
+ if (src) {
6263
+ $imageEl.attr('src', src);
6264
+ $imageEl.removeAttr('data-src');
6265
+ }
6266
+ }
6267
+
6268
+ $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass);
6269
+ $slideEl.find(("." + (params.preloaderClass))).remove();
6270
+ if (swiper.params.loop && loadInDuplicate) {
6271
+ var slideOriginalIndex = $slideEl.attr('data-swiper-slide-index');
6272
+ if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) {
6273
+ var originalSlide = swiper.$wrapperEl.children(("[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]:not(." + (swiper.params.slideDuplicateClass) + ")"));
6274
+ swiper.lazy.loadInSlide(originalSlide.index(), false);
6275
+ } else {
6276
+ var duplicatedSlide = swiper.$wrapperEl.children(("." + (swiper.params.slideDuplicateClass) + "[data-swiper-slide-index=\"" + slideOriginalIndex + "\"]"));
6277
+ swiper.lazy.loadInSlide(duplicatedSlide.index(), false);
6278
+ }
6279
+ }
6280
+ swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]);
6281
+ });
6282
+
6283
+ swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]);
6284
+ });
6285
+ },
6286
+ load: function load() {
6287
+ var swiper = this;
6288
+ var $wrapperEl = swiper.$wrapperEl;
6289
+ var swiperParams = swiper.params;
6290
+ var slides = swiper.slides;
6291
+ var activeIndex = swiper.activeIndex;
6292
+ var isVirtual = swiper.virtual && swiperParams.virtual.enabled;
6293
+ var params = swiperParams.lazy;
6294
+
6295
+ var slidesPerView = swiperParams.slidesPerView;
6296
+ if (slidesPerView === 'auto') {
6297
+ slidesPerView = 0;
6298
+ }
6299
+
6300
+ function slideExist(index) {
6301
+ if (isVirtual) {
6302
+ if ($wrapperEl.children(("." + (swiperParams.slideClass) + "[data-swiper-slide-index=\"" + index + "\"]")).length) {
6303
+ return true;
6304
+ }
6305
+ } else if (slides[index]) { return true; }
6306
+ return false;
6307
+ }
6308
+ function slideIndex(slideEl) {
6309
+ if (isVirtual) {
6310
+ return $(slideEl).attr('data-swiper-slide-index');
6311
+ }
6312
+ return $(slideEl).index();
6313
+ }
6314
+
6315
+ if (!swiper.lazy.initialImageLoaded) { swiper.lazy.initialImageLoaded = true; }
6316
+ if (swiper.params.watchSlidesVisibility) {
6317
+ $wrapperEl.children(("." + (swiperParams.slideVisibleClass))).each(function (elIndex, slideEl) {
6318
+ var index = isVirtual ? $(slideEl).attr('data-swiper-slide-index') : $(slideEl).index();
6319
+ swiper.lazy.loadInSlide(index);
6320
+ });
6321
+ } else if (slidesPerView > 1) {
6322
+ for (var i = activeIndex; i < activeIndex + slidesPerView; i += 1) {
6323
+ if (slideExist(i)) { swiper.lazy.loadInSlide(i); }
6324
+ }
6325
+ } else {
6326
+ swiper.lazy.loadInSlide(activeIndex);
6327
+ }
6328
+ if (params.loadPrevNext) {
6329
+ if (slidesPerView > 1 || (params.loadPrevNextAmount && params.loadPrevNextAmount > 1)) {
6330
+ var amount = params.loadPrevNextAmount;
6331
+ var spv = slidesPerView;
6332
+ var maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length);
6333
+ var minIndex = Math.max(activeIndex - Math.max(spv, amount), 0);
6334
+ // Next Slides
6335
+ for (var i$1 = activeIndex + slidesPerView; i$1 < maxIndex; i$1 += 1) {
6336
+ if (slideExist(i$1)) { swiper.lazy.loadInSlide(i$1); }
6337
+ }
6338
+ // Prev Slides
6339
+ for (var i$2 = minIndex; i$2 < activeIndex; i$2 += 1) {
6340
+ if (slideExist(i$2)) { swiper.lazy.loadInSlide(i$2); }
6341
+ }
6342
+ } else {
6343
+ var nextSlide = $wrapperEl.children(("." + (swiperParams.slideNextClass)));
6344
+ if (nextSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(nextSlide)); }
6345
+
6346
+ var prevSlide = $wrapperEl.children(("." + (swiperParams.slidePrevClass)));
6347
+ if (prevSlide.length > 0) { swiper.lazy.loadInSlide(slideIndex(prevSlide)); }
6348
+ }
6349
+ }
6350
+ },
6351
+ };
6352
+
6353
+ var Lazy$1 = {
6354
+ name: 'lazy',
6355
+ params: {
6356
+ lazy: {
6357
+ enabled: false,
6358
+ loadPrevNext: false,
6359
+ loadPrevNextAmount: 1,
6360
+ loadOnTransitionStart: false,
6361
+
6362
+ elementClass: 'swiper-lazy',
6363
+ loadingClass: 'swiper-lazy-loading',
6364
+ loadedClass: 'swiper-lazy-loaded',
6365
+ preloaderClass: 'swiper-lazy-preloader',
6366
+ },
6367
+ },
6368
+ create: function create() {
6369
+ var swiper = this;
6370
+ Utils.extend(swiper, {
6371
+ lazy: {
6372
+ initialImageLoaded: false,
6373
+ load: Lazy.load.bind(swiper),
6374
+ loadInSlide: Lazy.loadInSlide.bind(swiper),
6375
+ },
6376
+ });
6377
+ },
6378
+ on: {
6379
+ beforeInit: function beforeInit() {
6380
+ var swiper = this;
6381
+ if (swiper.params.lazy.enabled && swiper.params.preloadImages) {
6382
+ swiper.params.preloadImages = false;
6383
+ }
6384
+ },
6385
+ init: function init() {
6386
+ var swiper = this;
6387
+ if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) {
6388
+ swiper.lazy.load();
6389
+ }
6390
+ },
6391
+ scroll: function scroll() {
6392
+ var swiper = this;
6393
+ if (swiper.params.freeMode && !swiper.params.freeModeSticky) {
6394
+ swiper.lazy.load();
6395
+ }
6396
+ },
6397
+ resize: function resize() {
6398
+ var swiper = this;
6399
+ if (swiper.params.lazy.enabled) {
6400
+ swiper.lazy.load();
6401
+ }
6402
+ },
6403
+ scrollbarDragMove: function scrollbarDragMove() {
6404
+ var swiper = this;
6405
+ if (swiper.params.lazy.enabled) {
6406
+ swiper.lazy.load();
6407
+ }
6408
+ },
6409
+ transitionStart: function transitionStart() {
6410
+ var swiper = this;
6411
+ if (swiper.params.lazy.enabled) {
6412
+ if (swiper.params.lazy.loadOnTransitionStart || (!swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded)) {
6413
+ swiper.lazy.load();
6414
+ }
6415
+ }
6416
+ },
6417
+ transitionEnd: function transitionEnd() {
6418
+ var swiper = this;
6419
+ if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) {
6420
+ swiper.lazy.load();
6421
+ }
6422
+ },
6423
+ },
6424
+ };
6425
+
6426
+ /* eslint no-bitwise: ["error", { "allow": [">>"] }] */
6427
+
6428
+ var Controller = {
6429
+ LinearSpline: function LinearSpline(x, y) {
6430
+ var binarySearch = (function search() {
6431
+ var maxIndex;
6432
+ var minIndex;
6433
+ var guess;
6434
+ return function (array, val) {
6435
+ minIndex = -1;
6436
+ maxIndex = array.length;
6437
+ while (maxIndex - minIndex > 1) {
6438
+ guess = maxIndex + minIndex >> 1;
6439
+ if (array[guess] <= val) {
6440
+ minIndex = guess;
6441
+ } else {
6442
+ maxIndex = guess;
6443
+ }
6444
+ }
6445
+ return maxIndex;
6446
+ };
6447
+ }());
6448
+ this.x = x;
6449
+ this.y = y;
6450
+ this.lastIndex = x.length - 1;
6451
+ // Given an x value (x2), return the expected y2 value:
6452
+ // (x1,y1) is the known point before given value,
6453
+ // (x3,y3) is the known point after given value.
6454
+ var i1;
6455
+ var i3;
6456
+
6457
+ this.interpolate = function interpolate(x2) {
6458
+ if (!x2) { return 0; }
6459
+
6460
+ // Get the indexes of x1 and x3 (the array indexes before and after given x2):
6461
+ i3 = binarySearch(this.x, x2);
6462
+ i1 = i3 - 1;
6463
+
6464
+ // We have our indexes i1 & i3, so we can calculate already:
6465
+ // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1
6466
+ return (((x2 - this.x[i1]) * (this.y[i3] - this.y[i1])) / (this.x[i3] - this.x[i1])) + this.y[i1];
6467
+ };
6468
+ return this;
6469
+ },
6470
+ // xxx: for now i will just save one spline function to to
6471
+ getInterpolateFunction: function getInterpolateFunction(c) {
6472
+ var swiper = this;
6473
+ if (!swiper.controller.spline) {
6474
+ swiper.controller.spline = swiper.params.loop ?
6475
+ new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid) :
6476
+ new Controller.LinearSpline(swiper.snapGrid, c.snapGrid);
6477
+ }
6478
+ },
6479
+ setTranslate: function setTranslate(setTranslate$1, byController) {
6480
+ var swiper = this;
6481
+ var controlled = swiper.controller.control;
6482
+ var multiplier;
6483
+ var controlledTranslate;
6484
+ function setControlledTranslate(c) {
6485
+ // this will create an Interpolate function based on the snapGrids
6486
+ // x is the Grid of the scrolled scroller and y will be the controlled scroller
6487
+ // it makes sense to create this only once and recall it for the interpolation
6488
+ // the function does a lot of value caching for performance
6489
+ var translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate;
6490
+ if (swiper.params.controller.by === 'slide') {
6491
+ swiper.controller.getInterpolateFunction(c);
6492
+ // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid
6493
+ // but it did not work out
6494
+ controlledTranslate = -swiper.controller.spline.interpolate(-translate);
6495
+ }
6496
+
6497
+ if (!controlledTranslate || swiper.params.controller.by === 'container') {
6498
+ multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate());
6499
+ controlledTranslate = ((translate - swiper.minTranslate()) * multiplier) + c.minTranslate();
6500
+ }
6501
+
6502
+ if (swiper.params.controller.inverse) {
6503
+ controlledTranslate = c.maxTranslate() - controlledTranslate;
6504
+ }
6505
+ c.updateProgress(controlledTranslate);
6506
+ c.setTranslate(controlledTranslate, swiper);
6507
+ c.updateActiveIndex();
6508
+ c.updateSlidesClasses();
6509
+ }
6510
+ if (Array.isArray(controlled)) {
6511
+ for (var i = 0; i < controlled.length; i += 1) {
6512
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
6513
+ setControlledTranslate(controlled[i]);
6514
+ }
6515
+ }
6516
+ } else if (controlled instanceof Swiper && byController !== controlled) {
6517
+ setControlledTranslate(controlled);
6518
+ }
6519
+ },
6520
+ setTransition: function setTransition(duration, byController) {
6521
+ var swiper = this;
6522
+ var controlled = swiper.controller.control;
6523
+ var i;
6524
+ function setControlledTransition(c) {
6525
+ c.setTransition(duration, swiper);
6526
+ if (duration !== 0) {
6527
+ c.transitionStart();
6528
+ c.$wrapperEl.transitionEnd(function () {
6529
+ if (!controlled) { return; }
6530
+ if (c.params.loop && swiper.params.controller.by === 'slide') {
6531
+ c.loopFix();
6532
+ }
6533
+ c.transitionEnd();
6534
+ });
6535
+ }
6536
+ }
6537
+ if (Array.isArray(controlled)) {
6538
+ for (i = 0; i < controlled.length; i += 1) {
6539
+ if (controlled[i] !== byController && controlled[i] instanceof Swiper) {
6540
+ setControlledTransition(controlled[i]);
6541
+ }
6542
+ }
6543
+ } else if (controlled instanceof Swiper && byController !== controlled) {
6544
+ setControlledTransition(controlled);
6545
+ }
6546
+ },
6547
+ };
6548
+ var Controller$1 = {
6549
+ name: 'controller',
6550
+ params: {
6551
+ controller: {
6552
+ control: undefined,
6553
+ inverse: false,
6554
+ by: 'slide', // or 'container'
6555
+ },
6556
+ },
6557
+ create: function create() {
6558
+ var swiper = this;
6559
+ Utils.extend(swiper, {
6560
+ controller: {
6561
+ control: swiper.params.controller.control,
6562
+ getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper),
6563
+ setTranslate: Controller.setTranslate.bind(swiper),
6564
+ setTransition: Controller.setTransition.bind(swiper),
6565
+ },
6566
+ });
6567
+ },
6568
+ on: {
6569
+ update: function update() {
6570
+ var swiper = this;
6571
+ if (!swiper.controller.control) { return; }
6572
+ if (swiper.controller.spline) {
6573
+ swiper.controller.spline = undefined;
6574
+ delete swiper.controller.spline;
6575
+ }
6576
+ },
6577
+ resize: function resize() {
6578
+ var swiper = this;
6579
+ if (!swiper.controller.control) { return; }
6580
+ if (swiper.controller.spline) {
6581
+ swiper.controller.spline = undefined;
6582
+ delete swiper.controller.spline;
6583
+ }
6584
+ },
6585
+ observerUpdate: function observerUpdate() {
6586
+ var swiper = this;
6587
+ if (!swiper.controller.control) { return; }
6588
+ if (swiper.controller.spline) {
6589
+ swiper.controller.spline = undefined;
6590
+ delete swiper.controller.spline;
6591
+ }
6592
+ },
6593
+ setTranslate: function setTranslate(translate, byController) {
6594
+ var swiper = this;
6595
+ if (!swiper.controller.control) { return; }
6596
+ swiper.controller.setTranslate(translate, byController);
6597
+ },
6598
+ setTransition: function setTransition(duration, byController) {
6599
+ var swiper = this;
6600
+ if (!swiper.controller.control) { return; }
6601
+ swiper.controller.setTransition(duration, byController);
6602
+ },
6603
+ },
6604
+ };
6605
+
6606
+ var a11y = {
6607
+ makeElFocusable: function makeElFocusable($el) {
6608
+ $el.attr('tabIndex', '0');
6609
+ return $el;
6610
+ },
6611
+ addElRole: function addElRole($el, role) {
6612
+ $el.attr('role', role);
6613
+ return $el;
6614
+ },
6615
+ addElLabel: function addElLabel($el, label) {
6616
+ $el.attr('aria-label', label);
6617
+ return $el;
6618
+ },
6619
+ disableEl: function disableEl($el) {
6620
+ $el.attr('aria-disabled', true);
6621
+ return $el;
6622
+ },
6623
+ enableEl: function enableEl($el) {
6624
+ $el.attr('aria-disabled', false);
6625
+ return $el;
6626
+ },
6627
+ onEnterKey: function onEnterKey(e) {
6628
+ var swiper = this;
6629
+ var params = swiper.params.a11y;
6630
+ if (e.keyCode !== 13) { return; }
6631
+ var $targetEl = $(e.target);
6632
+ if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) {
6633
+ if (!(swiper.isEnd && !swiper.params.loop)) {
6634
+ swiper.slideNext();
6635
+ }
6636
+ if (swiper.isEnd) {
6637
+ swiper.a11y.notify(params.lastSlideMessage);
6638
+ } else {
6639
+ swiper.a11y.notify(params.nextSlideMessage);
6640
+ }
6641
+ }
6642
+ if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) {
6643
+ if (!(swiper.isBeginning && !swiper.params.loop)) {
6644
+ swiper.slidePrev();
6645
+ }
6646
+ if (swiper.isBeginning) {
6647
+ swiper.a11y.notify(params.firstSlideMessage);
6648
+ } else {
6649
+ swiper.a11y.notify(params.prevSlideMessage);
6650
+ }
6651
+ }
6652
+ if (swiper.pagination && $targetEl.is(("." + (swiper.params.pagination.bulletClass)))) {
6653
+ $targetEl[0].click();
6654
+ }
6655
+ },
6656
+ notify: function notify(message) {
6657
+ var swiper = this;
6658
+ var notification = swiper.a11y.liveRegion;
6659
+ if (notification.length === 0) { return; }
6660
+ notification.html('');
6661
+ notification.html(message);
6662
+ },
6663
+ updateNavigation: function updateNavigation() {
6664
+ var swiper = this;
6665
+
6666
+ if (swiper.params.loop) { return; }
6667
+ var ref = swiper.navigation;
6668
+ var $nextEl = ref.$nextEl;
6669
+ var $prevEl = ref.$prevEl;
6670
+
6671
+ if ($prevEl && $prevEl.length > 0) {
6672
+ if (swiper.isBeginning) {
6673
+ swiper.a11y.disableEl($prevEl);
6674
+ } else {
6675
+ swiper.a11y.enableEl($prevEl);
6676
+ }
6677
+ }
6678
+ if ($nextEl && $nextEl.length > 0) {
6679
+ if (swiper.isEnd) {
6680
+ swiper.a11y.disableEl($nextEl);
6681
+ } else {
6682
+ swiper.a11y.enableEl($nextEl);
6683
+ }
6684
+ }
6685
+ },
6686
+ updatePagination: function updatePagination() {
6687
+ var swiper = this;
6688
+ var params = swiper.params.a11y;
6689
+ if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
6690
+ swiper.pagination.bullets.each(function (bulletIndex, bulletEl) {
6691
+ var $bulletEl = $(bulletEl);
6692
+ swiper.a11y.makeElFocusable($bulletEl);
6693
+ swiper.a11y.addElRole($bulletEl, 'button');
6694
+ swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/{{index}}/, $bulletEl.index() + 1));
6695
+ });
6696
+ }
6697
+ },
6698
+ init: function init() {
6699
+ var swiper = this;
6700
+
6701
+ swiper.$el.append(swiper.a11y.liveRegion);
6702
+
6703
+ // Navigation
6704
+ var params = swiper.params.a11y;
6705
+ var $nextEl;
6706
+ var $prevEl;
6707
+ if (swiper.navigation && swiper.navigation.$nextEl) {
6708
+ $nextEl = swiper.navigation.$nextEl;
6709
+ }
6710
+ if (swiper.navigation && swiper.navigation.$prevEl) {
6711
+ $prevEl = swiper.navigation.$prevEl;
6712
+ }
6713
+ if ($nextEl) {
6714
+ swiper.a11y.makeElFocusable($nextEl);
6715
+ swiper.a11y.addElRole($nextEl, 'button');
6716
+ swiper.a11y.addElLabel($nextEl, params.nextSlideMessage);
6717
+ $nextEl.on('keydown', swiper.a11y.onEnterKey);
6718
+ }
6719
+ if ($prevEl) {
6720
+ swiper.a11y.makeElFocusable($prevEl);
6721
+ swiper.a11y.addElRole($prevEl, 'button');
6722
+ swiper.a11y.addElLabel($prevEl, params.prevSlideMessage);
6723
+ $prevEl.on('keydown', swiper.a11y.onEnterKey);
6724
+ }
6725
+
6726
+ // Pagination
6727
+ if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
6728
+ swiper.pagination.$el.on('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey);
6729
+ }
6730
+ },
6731
+ destroy: function destroy() {
6732
+ var swiper = this;
6733
+ if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) { swiper.a11y.liveRegion.remove(); }
6734
+
6735
+ var $nextEl;
6736
+ var $prevEl;
6737
+ if (swiper.navigation && swiper.navigation.$nextEl) {
6738
+ $nextEl = swiper.navigation.$nextEl;
6739
+ }
6740
+ if (swiper.navigation && swiper.navigation.$prevEl) {
6741
+ $prevEl = swiper.navigation.$prevEl;
6742
+ }
6743
+ if ($nextEl) {
6744
+ $nextEl.off('keydown', swiper.a11y.onEnterKey);
6745
+ }
6746
+ if ($prevEl) {
6747
+ $prevEl.off('keydown', swiper.a11y.onEnterKey);
6748
+ }
6749
+
6750
+ // Pagination
6751
+ if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) {
6752
+ swiper.pagination.$el.off('keydown', ("." + (swiper.params.pagination.bulletClass)), swiper.a11y.onEnterKey);
6753
+ }
6754
+ },
6755
+ };
6756
+ var A11y = {
6757
+ name: 'a11y',
6758
+ params: {
6759
+ a11y: {
6760
+ enabled: true,
6761
+ notificationClass: 'swiper-notification',
6762
+ prevSlideMessage: 'Previous slide',
6763
+ nextSlideMessage: 'Next slide',
6764
+ firstSlideMessage: 'This is the first slide',
6765
+ lastSlideMessage: 'This is the last slide',
6766
+ paginationBulletMessage: 'Go to slide {{index}}',
6767
+ },
6768
+ },
6769
+ create: function create() {
6770
+ var swiper = this;
6771
+ Utils.extend(swiper, {
6772
+ a11y: {
6773
+ liveRegion: $(("<span class=\"" + (swiper.params.a11y.notificationClass) + "\" aria-live=\"assertive\" aria-atomic=\"true\"></span>")),
6774
+ },
6775
+ });
6776
+ Object.keys(a11y).forEach(function (methodName) {
6777
+ swiper.a11y[methodName] = a11y[methodName].bind(swiper);
6778
+ });
6779
+ },
6780
+ on: {
6781
+ init: function init() {
6782
+ var swiper = this;
6783
+ if (!swiper.params.a11y.enabled) { return; }
6784
+ swiper.a11y.init();
6785
+ swiper.a11y.updateNavigation();
6786
+ },
6787
+ toEdge: function toEdge() {
6788
+ var swiper = this;
6789
+ if (!swiper.params.a11y.enabled) { return; }
6790
+ swiper.a11y.updateNavigation();
6791
+ },
6792
+ fromEdge: function fromEdge() {
6793
+ var swiper = this;
6794
+ if (!swiper.params.a11y.enabled) { return; }
6795
+ swiper.a11y.updateNavigation();
6796
+ },
6797
+ paginationUpdate: function paginationUpdate() {
6798
+ var swiper = this;
6799
+ if (!swiper.params.a11y.enabled) { return; }
6800
+ swiper.a11y.updatePagination();
6801
+ },
6802
+ destroy: function destroy() {
6803
+ var swiper = this;
6804
+ if (!swiper.params.a11y.enabled) { return; }
6805
+ swiper.a11y.destroy();
6806
+ },
6807
+ },
6808
+ };
6809
+
6810
+ var History = {
6811
+ init: function init() {
6812
+ var swiper = this;
6813
+ if (!swiper.params.history) { return; }
6814
+ if (!win.history || !win.history.pushState) {
6815
+ swiper.params.history.enabled = false;
6816
+ swiper.params.hashNavigation.enabled = true;
6817
+ return;
6818
+ }
6819
+ var history = swiper.history;
6820
+ history.initialized = true;
6821
+ history.paths = History.getPathValues();
6822
+ if (!history.paths.key && !history.paths.value) { return; }
6823
+ history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit);
6824
+ if (!swiper.params.history.replaceState) {
6825
+ win.addEventListener('popstate', swiper.history.setHistoryPopState);
6826
+ }
6827
+ },
6828
+ destroy: function destroy() {
6829
+ var swiper = this;
6830
+ if (!swiper.params.history.replaceState) {
6831
+ win.removeEventListener('popstate', swiper.history.setHistoryPopState);
6832
+ }
6833
+ },
6834
+ setHistoryPopState: function setHistoryPopState() {
6835
+ var swiper = this;
6836
+ swiper.history.paths = History.getPathValues();
6837
+ swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false);
6838
+ },
6839
+ getPathValues: function getPathValues() {
6840
+ var pathArray = win.location.pathname.slice(1).split('/').filter(function (part) { return part !== ''; });
6841
+ var total = pathArray.length;
6842
+ var key = pathArray[total - 2];
6843
+ var value = pathArray[total - 1];
6844
+ return { key: key, value: value };
6845
+ },
6846
+ setHistory: function setHistory(key, index) {
6847
+ var swiper = this;
6848
+ if (!swiper.history.initialized || !swiper.params.history.enabled) { return; }
6849
+ var slide = swiper.slides.eq(index);
6850
+ var value = History.slugify(slide.attr('data-history'));
6851
+ if (!win.location.pathname.includes(key)) {
6852
+ value = key + "/" + value;
6853
+ }
6854
+ var currentState = win.history.state;
6855
+ if (currentState && currentState.value === value) {
6856
+ return;
6857
+ }
6858
+ if (swiper.params.history.replaceState) {
6859
+ win.history.replaceState({ value: value }, null, value);
6860
+ } else {
6861
+ win.history.pushState({ value: value }, null, value);
6862
+ }
6863
+ },
6864
+ slugify: function slugify(text) {
6865
+ return text.toString().toLowerCase()
6866
+ .replace(/\s+/g, '-')
6867
+ .replace(/[^\w-]+/g, '')
6868
+ .replace(/--+/g, '-')
6869
+ .replace(/^-+/, '')
6870
+ .replace(/-+$/, '');
6871
+ },
6872
+ scrollToSlide: function scrollToSlide(speed, value, runCallbacks) {
6873
+ var swiper = this;
6874
+ if (value) {
6875
+ for (var i = 0, length = swiper.slides.length; i < length; i += 1) {
6876
+ var slide = swiper.slides.eq(i);
6877
+ var slideHistory = History.slugify(slide.attr('data-history'));
6878
+ if (slideHistory === value && !slide.hasClass(swiper.params.slideDuplicateClass)) {
6879
+ var index = slide.index();
6880
+ swiper.slideTo(index, speed, runCallbacks);
6881
+ }
6882
+ }
6883
+ } else {
6884
+ swiper.slideTo(0, speed, runCallbacks);
6885
+ }
6886
+ },
6887
+ };
6888
+
6889
+ var History$1 = {
6890
+ name: 'history',
6891
+ params: {
6892
+ history: {
6893
+ enabled: false,
6894
+ replaceState: false,
6895
+ key: 'slides',
6896
+ },
6897
+ },
6898
+ create: function create() {
6899
+ var swiper = this;
6900
+ Utils.extend(swiper, {
6901
+ history: {
6902
+ init: History.init.bind(swiper),
6903
+ setHistory: History.setHistory.bind(swiper),
6904
+ setHistoryPopState: History.setHistoryPopState.bind(swiper),
6905
+ scrollToSlide: History.scrollToSlide.bind(swiper),
6906
+ destroy: History.destroy.bind(swiper),
6907
+ },
6908
+ });
6909
+ },
6910
+ on: {
6911
+ init: function init() {
6912
+ var swiper = this;
6913
+ if (swiper.params.history.enabled) {
6914
+ swiper.history.init();
6915
+ }
6916
+ },
6917
+ destroy: function destroy() {
6918
+ var swiper = this;
6919
+ if (swiper.params.history.enabled) {
6920
+ swiper.history.destroy();
6921
+ }
6922
+ },
6923
+ transitionEnd: function transitionEnd() {
6924
+ var swiper = this;
6925
+ if (swiper.history.initialized) {
6926
+ swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex);
6927
+ }
6928
+ },
6929
+ },
6930
+ };
6931
+
6932
+ var HashNavigation = {
6933
+ onHashCange: function onHashCange() {
6934
+ var swiper = this;
6935
+ var newHash = doc.location.hash.replace('#', '');
6936
+ var activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash');
6937
+ if (newHash !== activeSlideHash) {
6938
+ swiper.slideTo(swiper.$wrapperEl.children(("." + (swiper.params.slideClass) + "[data-hash=\"" + newHash + "\"]")).index());
6939
+ }
6940
+ },
6941
+ setHash: function setHash() {
6942
+ var swiper = this;
6943
+ if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) { return; }
6944
+ if (swiper.params.hashNavigation.replaceState && win.history && win.history.replaceState) {
6945
+ win.history.replaceState(null, null, (("#" + (swiper.slides.eq(swiper.activeIndex).attr('data-hash'))) || ''));
6946
+ } else {
6947
+ var slide = swiper.slides.eq(swiper.activeIndex);
6948
+ var hash = slide.attr('data-hash') || slide.attr('data-history');
6949
+ doc.location.hash = hash || '';
6950
+ }
6951
+ },
6952
+ init: function init() {
6953
+ var swiper = this;
6954
+ if (!swiper.params.hashNavigation.enabled || (swiper.params.history && swiper.params.history.enabled)) { return; }
6955
+ swiper.hashNavigation.initialized = true;
6956
+ var hash = doc.location.hash.replace('#', '');
6957
+ if (hash) {
6958
+ var speed = 0;
6959
+ for (var i = 0, length = swiper.slides.length; i < length; i += 1) {
6960
+ var slide = swiper.slides.eq(i);
6961
+ var slideHash = slide.attr('data-hash') || slide.attr('data-history');
6962
+ if (slideHash === hash && !slide.hasClass(swiper.params.slideDuplicateClass)) {
6963
+ var index = slide.index();
6964
+ swiper.slideTo(index, speed, swiper.params.runCallbacksOnInit, true);
6965
+ }
6966
+ }
6967
+ }
6968
+ if (swiper.params.hashNavigation.watchState) {
6969
+ $(win).on('hashchange', swiper.hashNavigation.onHashCange);
6970
+ }
6971
+ },
6972
+ destroy: function destroy() {
6973
+ var swiper = this;
6974
+ if (swiper.params.hashNavigation.watchState) {
6975
+ $(win).off('hashchange', swiper.hashNavigation.onHashCange);
6976
+ }
6977
+ },
6978
+ };
6979
+ var HashNavigation$1 = {
6980
+ name: 'hash-navigation',
6981
+ params: {
6982
+ hashNavigation: {
6983
+ enabled: false,
6984
+ replaceState: false,
6985
+ watchState: false,
6986
+ },
6987
+ },
6988
+ create: function create() {
6989
+ var swiper = this;
6990
+ Utils.extend(swiper, {
6991
+ hashNavigation: {
6992
+ initialized: false,
6993
+ init: HashNavigation.init.bind(swiper),
6994
+ destroy: HashNavigation.destroy.bind(swiper),
6995
+ setHash: HashNavigation.setHash.bind(swiper),
6996
+ onHashCange: HashNavigation.onHashCange.bind(swiper),
6997
+ },
6998
+ });
6999
+ },
7000
+ on: {
7001
+ init: function init() {
7002
+ var swiper = this;
7003
+ if (swiper.params.hashNavigation.enabled) {
7004
+ swiper.hashNavigation.init();
7005
+ }
7006
+ },
7007
+ destroy: function destroy() {
7008
+ var swiper = this;
7009
+ if (swiper.params.hashNavigation.enabled) {
7010
+ swiper.hashNavigation.destroy();
7011
+ }
7012
+ },
7013
+ transitionEnd: function transitionEnd() {
7014
+ var swiper = this;
7015
+ if (swiper.hashNavigation.initialized) {
7016
+ swiper.hashNavigation.setHash();
7017
+ }
7018
+ },
7019
+ },
7020
+ };
7021
+
7022
+ /* eslint no-underscore-dangle: "off" */
7023
+
7024
+ var Autoplay = {
7025
+ run: function run() {
7026
+ var swiper = this;
7027
+ var $activeSlideEl = swiper.slides.eq(swiper.activeIndex);
7028
+ var delay = swiper.params.autoplay.delay;
7029
+ if ($activeSlideEl.attr('data-swiper-autoplay')) {
7030
+ delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay;
7031
+ }
7032
+ swiper.autoplay.timeout = Utils.nextTick(function () {
7033
+ if (swiper.params.autoplay.reverseDirection) {
7034
+ if (swiper.params.loop) {
7035
+ swiper.loopFix();
7036
+ swiper.slidePrev(swiper.params.speed, true, true);
7037
+ swiper.emit('autoplay');
7038
+ } else if (!swiper.isBeginning) {
7039
+ swiper.slidePrev(swiper.params.speed, true, true);
7040
+ swiper.emit('autoplay');
7041
+ } else if (!swiper.params.autoplay.stopOnLastSlide) {
7042
+ swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true);
7043
+ swiper.emit('autoplay');
7044
+ } else {
7045
+ swiper.autoplay.stop();
7046
+ }
7047
+ } else if (swiper.params.loop) {
7048
+ swiper.loopFix();
7049
+ swiper.slideNext(swiper.params.speed, true, true);
7050
+ swiper.emit('autoplay');
7051
+ } else if (!swiper.isEnd) {
7052
+ swiper.slideNext(swiper.params.speed, true, true);
7053
+ swiper.emit('autoplay');
7054
+ } else if (!swiper.params.autoplay.stopOnLastSlide) {
7055
+ swiper.slideTo(0, swiper.params.speed, true, true);
7056
+ swiper.emit('autoplay');
7057
+ } else {
7058
+ swiper.autoplay.stop();
7059
+ }
7060
+ }, delay);
7061
+ },
7062
+ start: function start() {
7063
+ var swiper = this;
7064
+ if (typeof swiper.autoplay.timeout !== 'undefined') { return false; }
7065
+ if (swiper.autoplay.running) { return false; }
7066
+ swiper.autoplay.running = true;
7067
+ swiper.emit('autoplayStart');
7068
+ swiper.autoplay.run();
7069
+ return true;
7070
+ },
7071
+ stop: function stop() {
7072
+ var swiper = this;
7073
+ if (!swiper.autoplay.running) { return false; }
7074
+ if (typeof swiper.autoplay.timeout === 'undefined') { return false; }
7075
+
7076
+ if (swiper.autoplay.timeout) {
7077
+ clearTimeout(swiper.autoplay.timeout);
7078
+ swiper.autoplay.timeout = undefined;
7079
+ }
7080
+ swiper.autoplay.running = false;
7081
+ swiper.emit('autoplayStop');
7082
+ return true;
7083
+ },
7084
+ pause: function pause(speed) {
7085
+ var swiper = this;
7086
+ if (!swiper.autoplay.running) { return; }
7087
+ if (swiper.autoplay.paused) { return; }
7088
+ if (swiper.autoplay.timeout) { clearTimeout(swiper.autoplay.timeout); }
7089
+ swiper.autoplay.paused = true;
7090
+ if (speed === 0 || !swiper.params.autoplay.waitForTransition) {
7091
+ swiper.autoplay.paused = false;
7092
+ swiper.autoplay.run();
7093
+ } else {
7094
+ swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd);
7095
+ swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
7096
+ }
7097
+ },
7098
+ };
7099
+
7100
+ var Autoplay$1 = {
7101
+ name: 'autoplay',
7102
+ params: {
7103
+ autoplay: {
7104
+ enabled: false,
7105
+ delay: 3000,
7106
+ waitForTransition: true,
7107
+ disableOnInteraction: true,
7108
+ stopOnLastSlide: false,
7109
+ reverseDirection: false,
7110
+ },
7111
+ },
7112
+ create: function create() {
7113
+ var swiper = this;
7114
+ Utils.extend(swiper, {
7115
+ autoplay: {
7116
+ running: false,
7117
+ paused: false,
7118
+ run: Autoplay.run.bind(swiper),
7119
+ start: Autoplay.start.bind(swiper),
7120
+ stop: Autoplay.stop.bind(swiper),
7121
+ pause: Autoplay.pause.bind(swiper),
7122
+ onTransitionEnd: function onTransitionEnd(e) {
7123
+ if (!swiper || swiper.destroyed || !swiper.$wrapperEl) { return; }
7124
+ if (e.target !== this) { return; }
7125
+ swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd);
7126
+ swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd);
7127
+ swiper.autoplay.paused = false;
7128
+ if (!swiper.autoplay.running) {
7129
+ swiper.autoplay.stop();
7130
+ } else {
7131
+ swiper.autoplay.run();
7132
+ }
7133
+ },
7134
+ },
7135
+ });
7136
+ },
7137
+ on: {
7138
+ init: function init() {
7139
+ var swiper = this;
7140
+ if (swiper.params.autoplay.enabled) {
7141
+ swiper.autoplay.start();
7142
+ }
7143
+ },
7144
+ beforeTransitionStart: function beforeTransitionStart(speed, internal) {
7145
+ var swiper = this;
7146
+ if (swiper.autoplay.running) {
7147
+ if (internal || !swiper.params.autoplay.disableOnInteraction) {
7148
+ swiper.autoplay.pause(speed);
7149
+ } else {
7150
+ swiper.autoplay.stop();
7151
+ }
7152
+ }
7153
+ },
7154
+ sliderFirstMove: function sliderFirstMove() {
7155
+ var swiper = this;
7156
+ if (swiper.autoplay.running) {
7157
+ if (swiper.params.autoplay.disableOnInteraction) {
7158
+ swiper.autoplay.stop();
7159
+ } else {
7160
+ swiper.autoplay.pause();
7161
+ }
7162
+ }
7163
+ },
7164
+ destroy: function destroy() {
7165
+ var swiper = this;
7166
+ if (swiper.autoplay.running) {
7167
+ swiper.autoplay.stop();
7168
+ }
7169
+ },
7170
+ },
7171
+ };
7172
+
7173
+ var Fade = {
7174
+ setTranslate: function setTranslate() {
7175
+ var swiper = this;
7176
+ var slides = swiper.slides;
7177
+ for (var i = 0; i < slides.length; i += 1) {
7178
+ var $slideEl = swiper.slides.eq(i);
7179
+ var offset = $slideEl[0].swiperSlideOffset;
7180
+ var tx = -offset;
7181
+ if (!swiper.params.virtualTranslate) { tx -= swiper.translate; }
7182
+ var ty = 0;
7183
+ if (!swiper.isHorizontal()) {
7184
+ ty = tx;
7185
+ tx = 0;
7186
+ }
7187
+ var slideOpacity = swiper.params.fadeEffect.crossFade ?
7188
+ Math.max(1 - Math.abs($slideEl[0].progress), 0) :
7189
+ 1 + Math.min(Math.max($slideEl[0].progress, -1), 0);
7190
+ $slideEl
7191
+ .css({
7192
+ opacity: slideOpacity,
7193
+ })
7194
+ .transform(("translate3d(" + tx + "px, " + ty + "px, 0px)"));
7195
+ }
7196
+ },
7197
+ setTransition: function setTransition(duration) {
7198
+ var swiper = this;
7199
+ var slides = swiper.slides;
7200
+ var $wrapperEl = swiper.$wrapperEl;
7201
+ slides.transition(duration);
7202
+ if (swiper.params.virtualTranslate && duration !== 0) {
7203
+ var eventTriggered = false;
7204
+ slides.transitionEnd(function () {
7205
+ if (eventTriggered) { return; }
7206
+ if (!swiper || swiper.destroyed) { return; }
7207
+ eventTriggered = true;
7208
+ swiper.animating = false;
7209
+ var triggerEvents = ['webkitTransitionEnd', 'transitionend'];
7210
+ for (var i = 0; i < triggerEvents.length; i += 1) {
7211
+ $wrapperEl.trigger(triggerEvents[i]);
7212
+ }
7213
+ });
7214
+ }
7215
+ },
7216
+ };
7217
+
7218
+ var EffectFade = {
7219
+ name: 'effect-fade',
7220
+ params: {
7221
+ fadeEffect: {
7222
+ crossFade: false,
7223
+ },
7224
+ },
7225
+ create: function create() {
7226
+ var swiper = this;
7227
+ Utils.extend(swiper, {
7228
+ fadeEffect: {
7229
+ setTranslate: Fade.setTranslate.bind(swiper),
7230
+ setTransition: Fade.setTransition.bind(swiper),
7231
+ },
7232
+ });
7233
+ },
7234
+ on: {
7235
+ beforeInit: function beforeInit() {
7236
+ var swiper = this;
7237
+ if (swiper.params.effect !== 'fade') { return; }
7238
+ swiper.classNames.push(((swiper.params.containerModifierClass) + "fade"));
7239
+ var overwriteParams = {
7240
+ slidesPerView: 1,
7241
+ slidesPerColumn: 1,
7242
+ slidesPerGroup: 1,
7243
+ watchSlidesProgress: true,
7244
+ spaceBetween: 0,
7245
+ virtualTranslate: true,
7246
+ };
7247
+ Utils.extend(swiper.params, overwriteParams);
7248
+ Utils.extend(swiper.originalParams, overwriteParams);
7249
+ },
7250
+ setTranslate: function setTranslate() {
7251
+ var swiper = this;
7252
+ if (swiper.params.effect !== 'fade') { return; }
7253
+ swiper.fadeEffect.setTranslate();
7254
+ },
7255
+ setTransition: function setTransition(duration) {
7256
+ var swiper = this;
7257
+ if (swiper.params.effect !== 'fade') { return; }
7258
+ swiper.fadeEffect.setTransition(duration);
7259
+ },
7260
+ },
7261
+ };
7262
+
7263
+ var Cube = {
7264
+ setTranslate: function setTranslate() {
7265
+ var swiper = this;
7266
+ var $el = swiper.$el;
7267
+ var $wrapperEl = swiper.$wrapperEl;
7268
+ var slides = swiper.slides;
7269
+ var swiperWidth = swiper.width;
7270
+ var swiperHeight = swiper.height;
7271
+ var rtl = swiper.rtlTranslate;
7272
+ var swiperSize = swiper.size;
7273
+ var params = swiper.params.cubeEffect;
7274
+ var isHorizontal = swiper.isHorizontal();
7275
+ var isVirtual = swiper.virtual && swiper.params.virtual.enabled;
7276
+ var wrapperRotate = 0;
7277
+ var $cubeShadowEl;
7278
+ if (params.shadow) {
7279
+ if (isHorizontal) {
7280
+ $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow');
7281
+ if ($cubeShadowEl.length === 0) {
7282
+ $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
7283
+ $wrapperEl.append($cubeShadowEl);
7284
+ }
7285
+ $cubeShadowEl.css({ height: (swiperWidth + "px") });
7286
+ } else {
7287
+ $cubeShadowEl = $el.find('.swiper-cube-shadow');
7288
+ if ($cubeShadowEl.length === 0) {
7289
+ $cubeShadowEl = $('<div class="swiper-cube-shadow"></div>');
7290
+ $el.append($cubeShadowEl);
7291
+ }
7292
+ }
7293
+ }
7294
+ for (var i = 0; i < slides.length; i += 1) {
7295
+ var $slideEl = slides.eq(i);
7296
+ var slideIndex = i;
7297
+ if (isVirtual) {
7298
+ slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10);
7299
+ }
7300
+ var slideAngle = slideIndex * 90;
7301
+ var round = Math.floor(slideAngle / 360);
7302
+ if (rtl) {
7303
+ slideAngle = -slideAngle;
7304
+ round = Math.floor(-slideAngle / 360);
7305
+ }
7306
+ var progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
7307
+ var tx = 0;
7308
+ var ty = 0;
7309
+ var tz = 0;
7310
+ if (slideIndex % 4 === 0) {
7311
+ tx = -round * 4 * swiperSize;
7312
+ tz = 0;
7313
+ } else if ((slideIndex - 1) % 4 === 0) {
7314
+ tx = 0;
7315
+ tz = -round * 4 * swiperSize;
7316
+ } else if ((slideIndex - 2) % 4 === 0) {
7317
+ tx = swiperSize + (round * 4 * swiperSize);
7318
+ tz = swiperSize;
7319
+ } else if ((slideIndex - 3) % 4 === 0) {
7320
+ tx = -swiperSize;
7321
+ tz = (3 * swiperSize) + (swiperSize * 4 * round);
7322
+ }
7323
+ if (rtl) {
7324
+ tx = -tx;
7325
+ }
7326
+
7327
+ if (!isHorizontal) {
7328
+ ty = tx;
7329
+ tx = 0;
7330
+ }
7331
+
7332
+ var transform = "rotateX(" + (isHorizontal ? 0 : -slideAngle) + "deg) rotateY(" + (isHorizontal ? slideAngle : 0) + "deg) translate3d(" + tx + "px, " + ty + "px, " + tz + "px)";
7333
+ if (progress <= 1 && progress > -1) {
7334
+ wrapperRotate = (slideIndex * 90) + (progress * 90);
7335
+ if (rtl) { wrapperRotate = (-slideIndex * 90) - (progress * 90); }
7336
+ }
7337
+ $slideEl.transform(transform);
7338
+ if (params.slideShadows) {
7339
+ // Set shadows
7340
+ var shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
7341
+ var shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
7342
+ if (shadowBefore.length === 0) {
7343
+ shadowBefore = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'left' : 'top') + "\"></div>"));
7344
+ $slideEl.append(shadowBefore);
7345
+ }
7346
+ if (shadowAfter.length === 0) {
7347
+ shadowAfter = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'right' : 'bottom') + "\"></div>"));
7348
+ $slideEl.append(shadowAfter);
7349
+ }
7350
+ if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); }
7351
+ if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); }
7352
+ }
7353
+ }
7354
+ $wrapperEl.css({
7355
+ '-webkit-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
7356
+ '-moz-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
7357
+ '-ms-transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
7358
+ 'transform-origin': ("50% 50% -" + (swiperSize / 2) + "px"),
7359
+ });
7360
+
7361
+ if (params.shadow) {
7362
+ if (isHorizontal) {
7363
+ $cubeShadowEl.transform(("translate3d(0px, " + ((swiperWidth / 2) + params.shadowOffset) + "px, " + (-swiperWidth / 2) + "px) rotateX(90deg) rotateZ(0deg) scale(" + (params.shadowScale) + ")"));
7364
+ } else {
7365
+ var shadowAngle = Math.abs(wrapperRotate) - (Math.floor(Math.abs(wrapperRotate) / 90) * 90);
7366
+ var multiplier = 1.5 - (
7367
+ (Math.sin((shadowAngle * 2 * Math.PI) / 360) / 2) +
7368
+ (Math.cos((shadowAngle * 2 * Math.PI) / 360) / 2)
7369
+ );
7370
+ var scale1 = params.shadowScale;
7371
+ var scale2 = params.shadowScale / multiplier;
7372
+ var offset = params.shadowOffset;
7373
+ $cubeShadowEl.transform(("scale3d(" + scale1 + ", 1, " + scale2 + ") translate3d(0px, " + ((swiperHeight / 2) + offset) + "px, " + (-swiperHeight / 2 / scale2) + "px) rotateX(-90deg)"));
7374
+ }
7375
+ }
7376
+ var zFactor = (Browser.isSafari || Browser.isUiWebView) ? (-swiperSize / 2) : 0;
7377
+ $wrapperEl
7378
+ .transform(("translate3d(0px,0," + zFactor + "px) rotateX(" + (swiper.isHorizontal() ? 0 : wrapperRotate) + "deg) rotateY(" + (swiper.isHorizontal() ? -wrapperRotate : 0) + "deg)"));
7379
+ },
7380
+ setTransition: function setTransition(duration) {
7381
+ var swiper = this;
7382
+ var $el = swiper.$el;
7383
+ var slides = swiper.slides;
7384
+ slides
7385
+ .transition(duration)
7386
+ .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
7387
+ .transition(duration);
7388
+ if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) {
7389
+ $el.find('.swiper-cube-shadow').transition(duration);
7390
+ }
7391
+ },
7392
+ };
7393
+
7394
+ var EffectCube = {
7395
+ name: 'effect-cube',
7396
+ params: {
7397
+ cubeEffect: {
7398
+ slideShadows: true,
7399
+ shadow: true,
7400
+ shadowOffset: 20,
7401
+ shadowScale: 0.94,
7402
+ },
7403
+ },
7404
+ create: function create() {
7405
+ var swiper = this;
7406
+ Utils.extend(swiper, {
7407
+ cubeEffect: {
7408
+ setTranslate: Cube.setTranslate.bind(swiper),
7409
+ setTransition: Cube.setTransition.bind(swiper),
7410
+ },
7411
+ });
7412
+ },
7413
+ on: {
7414
+ beforeInit: function beforeInit() {
7415
+ var swiper = this;
7416
+ if (swiper.params.effect !== 'cube') { return; }
7417
+ swiper.classNames.push(((swiper.params.containerModifierClass) + "cube"));
7418
+ swiper.classNames.push(((swiper.params.containerModifierClass) + "3d"));
7419
+ var overwriteParams = {
7420
+ slidesPerView: 1,
7421
+ slidesPerColumn: 1,
7422
+ slidesPerGroup: 1,
7423
+ watchSlidesProgress: true,
7424
+ resistanceRatio: 0,
7425
+ spaceBetween: 0,
7426
+ centeredSlides: false,
7427
+ virtualTranslate: true,
7428
+ };
7429
+ Utils.extend(swiper.params, overwriteParams);
7430
+ Utils.extend(swiper.originalParams, overwriteParams);
7431
+ },
7432
+ setTranslate: function setTranslate() {
7433
+ var swiper = this;
7434
+ if (swiper.params.effect !== 'cube') { return; }
7435
+ swiper.cubeEffect.setTranslate();
7436
+ },
7437
+ setTransition: function setTransition(duration) {
7438
+ var swiper = this;
7439
+ if (swiper.params.effect !== 'cube') { return; }
7440
+ swiper.cubeEffect.setTransition(duration);
7441
+ },
7442
+ },
7443
+ };
7444
+
7445
+ var Flip = {
7446
+ setTranslate: function setTranslate() {
7447
+ var swiper = this;
7448
+ var slides = swiper.slides;
7449
+ var rtl = swiper.rtlTranslate;
7450
+ for (var i = 0; i < slides.length; i += 1) {
7451
+ var $slideEl = slides.eq(i);
7452
+ var progress = $slideEl[0].progress;
7453
+ if (swiper.params.flipEffect.limitRotation) {
7454
+ progress = Math.max(Math.min($slideEl[0].progress, 1), -1);
7455
+ }
7456
+ var offset = $slideEl[0].swiperSlideOffset;
7457
+ var rotate = -180 * progress;
7458
+ var rotateY = rotate;
7459
+ var rotateX = 0;
7460
+ var tx = -offset;
7461
+ var ty = 0;
7462
+ if (!swiper.isHorizontal()) {
7463
+ ty = tx;
7464
+ tx = 0;
7465
+ rotateX = -rotateY;
7466
+ rotateY = 0;
7467
+ } else if (rtl) {
7468
+ rotateY = -rotateY;
7469
+ }
7470
+
7471
+ $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length;
7472
+
7473
+ if (swiper.params.flipEffect.slideShadows) {
7474
+ // Set shadows
7475
+ var shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
7476
+ var shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
7477
+ if (shadowBefore.length === 0) {
7478
+ shadowBefore = $(("<div class=\"swiper-slide-shadow-" + (swiper.isHorizontal() ? 'left' : 'top') + "\"></div>"));
7479
+ $slideEl.append(shadowBefore);
7480
+ }
7481
+ if (shadowAfter.length === 0) {
7482
+ shadowAfter = $(("<div class=\"swiper-slide-shadow-" + (swiper.isHorizontal() ? 'right' : 'bottom') + "\"></div>"));
7483
+ $slideEl.append(shadowAfter);
7484
+ }
7485
+ if (shadowBefore.length) { shadowBefore[0].style.opacity = Math.max(-progress, 0); }
7486
+ if (shadowAfter.length) { shadowAfter[0].style.opacity = Math.max(progress, 0); }
7487
+ }
7488
+ $slideEl
7489
+ .transform(("translate3d(" + tx + "px, " + ty + "px, 0px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)"));
7490
+ }
7491
+ },
7492
+ setTransition: function setTransition(duration) {
7493
+ var swiper = this;
7494
+ var slides = swiper.slides;
7495
+ var activeIndex = swiper.activeIndex;
7496
+ var $wrapperEl = swiper.$wrapperEl;
7497
+ slides
7498
+ .transition(duration)
7499
+ .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
7500
+ .transition(duration);
7501
+ if (swiper.params.virtualTranslate && duration !== 0) {
7502
+ var eventTriggered = false;
7503
+ // eslint-disable-next-line
7504
+ slides.eq(activeIndex).transitionEnd(function onTransitionEnd() {
7505
+ if (eventTriggered) { return; }
7506
+ if (!swiper || swiper.destroyed) { return; }
7507
+ // if (!$(this).hasClass(swiper.params.slideActiveClass)) return;
7508
+ eventTriggered = true;
7509
+ swiper.animating = false;
7510
+ var triggerEvents = ['webkitTransitionEnd', 'transitionend'];
7511
+ for (var i = 0; i < triggerEvents.length; i += 1) {
7512
+ $wrapperEl.trigger(triggerEvents[i]);
7513
+ }
7514
+ });
7515
+ }
7516
+ },
7517
+ };
7518
+
7519
+ var EffectFlip = {
7520
+ name: 'effect-flip',
7521
+ params: {
7522
+ flipEffect: {
7523
+ slideShadows: true,
7524
+ limitRotation: true,
7525
+ },
7526
+ },
7527
+ create: function create() {
7528
+ var swiper = this;
7529
+ Utils.extend(swiper, {
7530
+ flipEffect: {
7531
+ setTranslate: Flip.setTranslate.bind(swiper),
7532
+ setTransition: Flip.setTransition.bind(swiper),
7533
+ },
7534
+ });
7535
+ },
7536
+ on: {
7537
+ beforeInit: function beforeInit() {
7538
+ var swiper = this;
7539
+ if (swiper.params.effect !== 'flip') { return; }
7540
+ swiper.classNames.push(((swiper.params.containerModifierClass) + "flip"));
7541
+ swiper.classNames.push(((swiper.params.containerModifierClass) + "3d"));
7542
+ var overwriteParams = {
7543
+ slidesPerView: 1,
7544
+ slidesPerColumn: 1,
7545
+ slidesPerGroup: 1,
7546
+ watchSlidesProgress: true,
7547
+ spaceBetween: 0,
7548
+ virtualTranslate: true,
7549
+ };
7550
+ Utils.extend(swiper.params, overwriteParams);
7551
+ Utils.extend(swiper.originalParams, overwriteParams);
7552
+ },
7553
+ setTranslate: function setTranslate() {
7554
+ var swiper = this;
7555
+ if (swiper.params.effect !== 'flip') { return; }
7556
+ swiper.flipEffect.setTranslate();
7557
+ },
7558
+ setTransition: function setTransition(duration) {
7559
+ var swiper = this;
7560
+ if (swiper.params.effect !== 'flip') { return; }
7561
+ swiper.flipEffect.setTransition(duration);
7562
+ },
7563
+ },
7564
+ };
7565
+
7566
+ var Coverflow = {
7567
+ setTranslate: function setTranslate() {
7568
+ var swiper = this;
7569
+ var swiperWidth = swiper.width;
7570
+ var swiperHeight = swiper.height;
7571
+ var slides = swiper.slides;
7572
+ var $wrapperEl = swiper.$wrapperEl;
7573
+ var slidesSizesGrid = swiper.slidesSizesGrid;
7574
+ var params = swiper.params.coverflowEffect;
7575
+ var isHorizontal = swiper.isHorizontal();
7576
+ var transform = swiper.translate;
7577
+ var center = isHorizontal ? -transform + (swiperWidth / 2) : -transform + (swiperHeight / 2);
7578
+ var rotate = isHorizontal ? params.rotate : -params.rotate;
7579
+ var translate = params.depth;
7580
+ // Each slide offset from center
7581
+ for (var i = 0, length = slides.length; i < length; i += 1) {
7582
+ var $slideEl = slides.eq(i);
7583
+ var slideSize = slidesSizesGrid[i];
7584
+ var slideOffset = $slideEl[0].swiperSlideOffset;
7585
+ var offsetMultiplier = ((center - slideOffset - (slideSize / 2)) / slideSize) * params.modifier;
7586
+
7587
+ var rotateY = isHorizontal ? rotate * offsetMultiplier : 0;
7588
+ var rotateX = isHorizontal ? 0 : rotate * offsetMultiplier;
7589
+ // var rotateZ = 0
7590
+ var translateZ = -translate * Math.abs(offsetMultiplier);
7591
+
7592
+ var translateY = isHorizontal ? 0 : params.stretch * (offsetMultiplier);
7593
+ var translateX = isHorizontal ? params.stretch * (offsetMultiplier) : 0;
7594
+
7595
+ // Fix for ultra small values
7596
+ if (Math.abs(translateX) < 0.001) { translateX = 0; }
7597
+ if (Math.abs(translateY) < 0.001) { translateY = 0; }
7598
+ if (Math.abs(translateZ) < 0.001) { translateZ = 0; }
7599
+ if (Math.abs(rotateY) < 0.001) { rotateY = 0; }
7600
+ if (Math.abs(rotateX) < 0.001) { rotateX = 0; }
7601
+
7602
+ var slideTransform = "translate3d(" + translateX + "px," + translateY + "px," + translateZ + "px) rotateX(" + rotateX + "deg) rotateY(" + rotateY + "deg)";
7603
+
7604
+ $slideEl.transform(slideTransform);
7605
+ $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1;
7606
+ if (params.slideShadows) {
7607
+ // Set shadows
7608
+ var $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top');
7609
+ var $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom');
7610
+ if ($shadowBeforeEl.length === 0) {
7611
+ $shadowBeforeEl = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'left' : 'top') + "\"></div>"));
7612
+ $slideEl.append($shadowBeforeEl);
7613
+ }
7614
+ if ($shadowAfterEl.length === 0) {
7615
+ $shadowAfterEl = $(("<div class=\"swiper-slide-shadow-" + (isHorizontal ? 'right' : 'bottom') + "\"></div>"));
7616
+ $slideEl.append($shadowAfterEl);
7617
+ }
7618
+ if ($shadowBeforeEl.length) { $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; }
7619
+ if ($shadowAfterEl.length) { $shadowAfterEl[0].style.opacity = (-offsetMultiplier) > 0 ? -offsetMultiplier : 0; }
7620
+ }
7621
+ }
7622
+
7623
+ // Set correct perspective for IE10
7624
+ if (Support.pointerEvents || Support.prefixedPointerEvents) {
7625
+ var ws = $wrapperEl[0].style;
7626
+ ws.perspectiveOrigin = center + "px 50%";
7627
+ }
7628
+ },
7629
+ setTransition: function setTransition(duration) {
7630
+ var swiper = this;
7631
+ swiper.slides
7632
+ .transition(duration)
7633
+ .find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left')
7634
+ .transition(duration);
7635
+ },
7636
+ };
7637
+
7638
+ var EffectCoverflow = {
7639
+ name: 'effect-coverflow',
7640
+ params: {
7641
+ coverflowEffect: {
7642
+ rotate: 50,
7643
+ stretch: 0,
7644
+ depth: 100,
7645
+ modifier: 1,
7646
+ slideShadows: true,
7647
+ },
7648
+ },
7649
+ create: function create() {
7650
+ var swiper = this;
7651
+ Utils.extend(swiper, {
7652
+ coverflowEffect: {
7653
+ setTranslate: Coverflow.setTranslate.bind(swiper),
7654
+ setTransition: Coverflow.setTransition.bind(swiper),
7655
+ },
7656
+ });
7657
+ },
7658
+ on: {
7659
+ beforeInit: function beforeInit() {
7660
+ var swiper = this;
7661
+ if (swiper.params.effect !== 'coverflow') { return; }
7662
+
7663
+ swiper.classNames.push(((swiper.params.containerModifierClass) + "coverflow"));
7664
+ swiper.classNames.push(((swiper.params.containerModifierClass) + "3d"));
7665
+
7666
+ swiper.params.watchSlidesProgress = true;
7667
+ swiper.originalParams.watchSlidesProgress = true;
7668
+ },
7669
+ setTranslate: function setTranslate() {
7670
+ var swiper = this;
7671
+ if (swiper.params.effect !== 'coverflow') { return; }
7672
+ swiper.coverflowEffect.setTranslate();
7673
+ },
7674
+ setTransition: function setTransition(duration) {
7675
+ var swiper = this;
7676
+ if (swiper.params.effect !== 'coverflow') { return; }
7677
+ swiper.coverflowEffect.setTransition(duration);
7678
+ },
7679
+ },
7680
+ };
7681
+
7682
+ // Swiper Class
7683
+
7684
+ var components = [
7685
+ Device$1,
7686
+ Support$1,
7687
+ Browser$1,
7688
+ Resize,
7689
+ Observer$1,
7690
+ Virtual$1,
7691
+ Keyboard$1,
7692
+ Mousewheel$1,
7693
+ Navigation$1,
7694
+ Pagination$1,
7695
+ Scrollbar$1,
7696
+ Parallax$1,
7697
+ Zoom$1,
7698
+ Lazy$1,
7699
+ Controller$1,
7700
+ A11y,
7701
+ History$1,
7702
+ HashNavigation$1,
7703
+ Autoplay$1,
7704
+ EffectFade,
7705
+ EffectCube,
7706
+ EffectFlip,
7707
+ EffectCoverflow
7708
+ ];
7709
+
7710
+ if (typeof Swiper.use === 'undefined') {
7711
+ Swiper.use = Swiper.Class.use;
7712
+ Swiper.installModule = Swiper.Class.installModule;
7713
+ }
7714
+
7715
+ Swiper.use(components);
7716
+
7717
+ return Swiper;
7718
+
7719
+ })));
assets/vendor/swiper/js/swiper.min.js ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Swiper 4.3.3
3
+ * Most modern mobile touch slider and framework with hardware accelerated transitions
4
+ * http://www.idangero.us/swiper/
5
+ *
6
+ * Copyright 2014-2018 Vladimir Kharlampidi
7
+ *
8
+ * Released under the MIT License
9
+ *
10
+ * Released on: June 5, 2018
11
+ */
12
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.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<e.length;t+=1)this[t]=e[t];return this.length=e.length,this};function s(s,a){var r=[],n=0;if(s&&!a&&s instanceof i)return s;if(s)if("string"==typeof s){var o,l,d=s.trim();if(d.indexOf("<")>=0&&d.indexOf(">")>=0){var h="div";for(0===d.indexOf("<li")&&(h="ul"),0===d.indexOf("<tr")&&(h="tbody"),0!==d.indexOf("<td")&&0!==d.indexOf("<th")||(h="tr"),0===d.indexOf("<tbody")&&(h="table"),0===d.indexOf("<option")&&(h="select"),(l=e.createElement(h)).innerHTML=d,n=0;n<l.childNodes.length;n+=1)r.push(l.childNodes[n])}else for(o=a||"#"!==s[0]||s.match(/[ .<>:~]/)?(a||e).querySelectorAll(s.trim()):[e.getElementById(s.trim().split("#")[1])],n=0;n<o.length;n+=1)o[n]&&r.push(o[n])}else if(s.nodeType||s===t||s===e)r.push(s);else if(s.length>0&&s[0].nodeType)for(n=0;n<s.length;n+=1)r.push(s[n]);return new i(r)}function a(e){for(var t=[],i=0;i<e.length;i+=1)-1===t.indexOf(e[i])&&t.push(e[i]);return t}s.fn=i.prototype,s.Class=i,s.Dom7=i;var r={addClass:function(e){if(void 0===e)return this;for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void 0!==this[s].classList&&this[s].classList.add(t[i]);return this},removeClass:function(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void 0!==this[s].classList&&this[s].classList.remove(t[i]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void 0!==this[s].classList&&this[s].classList.toggle(t[i]);return this},attr:function(e,t){var i=arguments;if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var s=0;s<this.length;s+=1)if(2===i.length)this[s].setAttribute(e,t);else for(var a in e)this[s][a]=e[a],this[s].setAttribute(a,e[a]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},data:function(e,t){var i;if(void 0!==t){for(var s=0;s<this.length;s+=1)(i=this[s]).dom7ElementDataStorage||(i.dom7ElementDataStorage={}),i.dom7ElementDataStorage[e]=t;return this}if(i=this[0]){if(i.dom7ElementDataStorage&&e in i.dom7ElementDataStorage)return i.dom7ElementDataStorage[e];var a=i.getAttribute("data-"+e);return a||void 0}},transform:function(e){for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransform=e,i.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransitionDuration=e,i.transitionDuration=e}return this},on:function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];var a=t[0],r=t[1],n=t[2],o=t[3];function l(e){var t=e.target;if(t){var i=e.target.dom7EventData||[];if(i.indexOf(e)<0&&i.unshift(e),s(t).is(r))n.apply(t,i);else for(var a=s(t).parents(),o=0;o<a.length;o+=1)s(a[o]).is(r)&&n.apply(a[o],i)}}function d(e){var t=e&&e.target?e.target.dom7EventData||[]:[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"==typeof t[1]&&(a=(e=t)[0],n=e[1],o=e[2],r=void 0),o||(o=!1);for(var h,p=a.split(" "),c=0;c<this.length;c+=1){var u=this[c];if(r)for(h=0;h<p.length;h+=1){var v=p[h];u.dom7LiveListeners||(u.dom7LiveListeners={}),u.dom7LiveListeners[v]||(u.dom7LiveListeners[v]=[]),u.dom7LiveListeners[v].push({listener:n,proxyListener:l}),u.addEventListener(v,l,o)}else for(h=0;h<p.length;h+=1){var f=p[h];u.dom7Listeners||(u.dom7Listeners={}),u.dom7Listeners[f]||(u.dom7Listeners[f]=[]),u.dom7Listeners[f].push({listener:n,proxyListener:d}),u.addEventListener(f,d,o)}}return this},off:function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];var s=t[0],a=t[1],r=t[2],n=t[3];"function"==typeof t[1]&&(s=(e=t)[0],r=e[1],n=e[2],a=void 0),n||(n=!1);for(var o=s.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],h=0;h<this.length;h+=1){var p=this[h],c=void 0;if(!a&&p.dom7Listeners?c=p.dom7Listeners[d]:a&&p.dom7LiveListeners&&(c=p.dom7LiveListeners[d]),c&&c.length)for(var u=c.length-1;u>=0;u-=1){var v=c[u];r&&v.listener===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;n<a.length;n+=1)for(var o=a[n],l=0;l<this.length;l+=1){var d=this[l],h=void 0;try{h=new t.CustomEvent(o,{detail:r,bubbles:!0,cancelable:!0})}catch(t){(h=e.createEvent("Event")).initEvent(o,!0,!0),h.detail=r}d.dom7EventData=i.filter(function(e,t){return t>0}),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;t<i.length;t+=1)s.off(i[t],a)}if(e)for(t=0;t<i.length;t+=1)s.on(i[t],a);return this},outerWidth:function(e){if(this.length>0){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;s<this.length;s+=1)for(var a in e)this[s].style[a]=e[a];return this}if(this[0])return t.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(s=0;s<this.length;s+=1)this[s].style[e]=i;return this}return this},each:function(e){if(!e)return this;for(var t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(a){var r,n,o=this[0];if(!o||void 0===a)return!1;if("string"==typeof a){if(o.matches)return o.matches(a);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(a);if(o.msMatchesSelector)return o.msMatchesSelector(a);for(r=s(a),n=0;n<r.length;n+=1)if(r[n]===o)return!0;return!1}if(a===e)return o===e;if(a===t)return o===t;if(a.nodeType||a instanceof i){for(r=a.nodeType?[a]:a,n=0;n<r.length;n+=1)if(r[n]===o)return!0;return!1}return!1},index:function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;var t,s=this.length;return new i(e>s-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<s.length;r+=1){t=s[r];for(var n=0;n<this.length;n+=1)if("string"==typeof t){var o=e.createElement("div");for(o.innerHTML=t;o.firstChild;)this[n].appendChild(o.firstChild)}else if(t instanceof i)for(var l=0;l<t.length;l+=1)this[n].appendChild(t[l]);else this[n].appendChild(t)}return this},prepend:function(t){var s,a;for(s=0;s<this.length;s+=1)if("string"==typeof t){var r=e.createElement("div");for(r.innerHTML=t,a=r.childNodes.length-1;a>=0;a-=1)this[s].insertBefore(r.childNodes[a],this[s].childNodes[0])}else if(t instanceof i)for(a=0;a<t.length;a+=1)this[s].insertBefore(t[a],this[s].childNodes[0]);else this[s].insertBefore(t,this[s].childNodes[0]);return this},next:function(e){return this.length>0?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;i<this.length;i+=1)null!==this[i].parentNode&&(e?s(this[i].parentNode).is(e)&&t.push(this[i].parentNode):t.push(this[i].parentNode));return s(a(t))},parents:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var r=this[i].parentNode;r;)e?s(r).is(e)&&t.push(r):t.push(r),r=r.parentNode;return s(a(t))},closest:function(e){var t=this;return void 0===e?new i([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],s=0;s<this.length;s+=1)for(var a=this[s].querySelectorAll(e),r=0;r<a.length;r+=1)t.push(a[r]);return new i(t)},children:function(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].childNodes,o=0;o<n.length;o+=1)e?1===n[o].nodeType&&s(n[o]).is(e)&&t.push(n[o]):1===n[o].nodeType&&t.push(n[o]);return new i(a(t))},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var i,a;for(i=0;i<e.length;i+=1){var r=s(e[i]);for(a=0;a<r.length;a+=1)this[this.length]=r[a],this.length+=1}return this},styles:function(){return this[0]?t.getComputedStyle(this[0],null):{}}};Object.keys(r).forEach(function(e){s.fn[e]=r[e]});var n,o,l,d={deleteProps:function(e){var t=e;Object.keys(t).forEach(function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,i){var s,a,r;void 0===i&&(i="x");var n=t.getComputedStyle(e,null);return t.WebKitCSSMatrix?((a=n.transform||n.webkitTransform).split(",").length>6&&(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;i<r;i+=1)a=s[i].replace(/#\S+/g,"").split("="),n[decodeURIComponent(a[0])]=void 0===a[1]?void 0:decodeURIComponent(a[1])||"";return n},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var i=Object(e[0]),s=1;s<e.length;s+=1){var a=e[s];if(void 0!==a&&null!==a)for(var r=Object.keys(Object(a)),n=0,o=r.length;n<o;n+=1){var l=r[n],h=Object.getOwnPropertyDescriptor(a,l);void 0!==h&&h.enumerable&&(d.isObject(i[l])&&d.isObject(a[l])?d.extend(i[l],a[l]):!d.isObject(i[l])&&d.isObject(a[l])?(i[l]={},d.extend(i[l],a[l])):i[l]=a[l])}}return i}},h=(l=e.createElement("div"),{touch:t.Modernizr&&!0===t.Modernizr.touch||!!("ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch),pointerEvents:!(!t.navigator.pointerEnabled&&!t.PointerEvent),prefixedPointerEvents:!!t.navigator.msPointerEnabled,transition:(o=l.style,"transition"in o||"webkitTransition"in o||"MozTransition"in o),transforms3d:t.Modernizr&&!0===t.Modernizr.csstransforms3d||(n=l.style,"webkitPerspective"in n||"MozPerspective"in n||"OPerspective"in n||"MsPerspective"in n||"perspective"in n),flexbox:function(){for(var e=l.style,t="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),i=0;i<t.length;i+=1)if(t[i]in e)return!0;return!1}(),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}),p=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])})},c={components:{configurable:!0}};p.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},p.prototype.once=function(e,t,i){var s=this;if("function"!=typeof t)return s;return s.on(e,function i(){for(var a=[],r=arguments.length;r--;)a[r]=arguments[r];t.apply(s,a),s.off(e,i)},i)},p.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].forEach(function(s,a){s===t&&i.eventsListeners[e].splice(a,1)})}),i):i},p.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var i,s,a,r=this;return r.eventsListeners?("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),(Array.isArray(i)?i:i.split(" ")).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):r},p.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach(function(i){var s=t.modules[i];s.params&&d.extend(e,s.params)})},p.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)})},c.components.set=function(e){this.use&&this.use(e)},p.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+"_"+d.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},p.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(p,c);var u={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),d.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,n=this.virtual&&e.virtual.enabled,o=n?this.virtual.slides.length:this.slides.length,l=i.children("."+this.params.slideClass),p=n?this.virtual.slides.length:l.length,c=[],u=[],v=[],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,E=0;if(void 0!==s){var T,S;"string"==typeof w&&w.indexOf("%")>=0&&(w=parseFloat(w.replace("%",""))/100*s),this.virtualSize=-w,a?l.css({marginLeft:"",marginTop:""}):l.css({marginRight:"",marginBottom:""}),e.slidesPerColumn>1&&(T=Math.floor(p/e.slidesPerColumn)===p/this.params.slidesPerColumn?p:Math.ceil(p/e.slidesPerColumn)*e.slidesPerColumn,"auto"!==e.slidesPerView&&"row"===e.slidesPerColumnFill&&(T=Math.max(T,e.slidesPerView*e.slidesPerColumn)));for(var C,M=e.slidesPerColumn,z=T/M,k=z-(e.slidesPerColumn*z-p),P=0;P<p;P+=1){S=0;var $=l.eq(P);if(e.slidesPerColumn>1){var L=void 0,I=void 0,D=void 0;"column"===e.slidesPerColumnFill?(D=P-(I=Math.floor(P/M))*M,(I>k||I===k&&D===M-1)&&(D+=1)>=M&&(D=0,I+=1),L=I+D*T/M,$.css({"-webkit-box-ordinal-group":L,"-moz-box-ordinal-group":L,"-ms-flex-order":L,"-webkit-order":L,order:L})):I=P-(D=Math.floor(P/z))*z,$.css("margin-"+(this.isHorizontal()?"top":"left"),0!==D&&e.spaceBetween&&e.spaceBetween+"px").attr("data-swiper-column",I).attr("data-swiper-row",D)}if("none"!==$.css("display")){if("auto"===e.slidesPerView){var O=t.getComputedStyle($[0],null),A=$[0].style.transform,G=$[0].style.webkitTransform;A&&($[0].style.transform="none"),G&&($[0].style.webkitTransform="none"),S=this.isHorizontal()?$[0].getBoundingClientRect().width+parseFloat(O.getPropertyValue("margin-left"))+parseFloat(O.getPropertyValue("margin-right")):$[0].getBoundingClientRect().height+parseFloat(O.getPropertyValue("margin-top"))+parseFloat(O.getPropertyValue("margin-bottom")),A&&($[0].style.transform=A),G&&($[0].style.webkitTransform=G),e.roundLengths&&(S=Math.floor(S))}else S=(s-(e.slidesPerView-1)*w)/e.slidesPerView,e.roundLengths&&(S=Math.floor(S)),l[P]&&(this.isHorizontal()?l[P].style.width=S+"px":l[P].style.height=S+"px");l[P]&&(l[P].swiperSlideSize=S),v.push(S),e.centeredSlides?(y=y+S/2+x/2+w,0===x&&0!==P&&(y=y-s/2-w),0===P&&(y=y-s/2-w),Math.abs(y)<.001&&(y=0),e.roundLengths&&(y=Math.floor(y)),E%e.slidesPerGroup==0&&c.push(y),u.push(y)):(e.roundLengths&&(y=Math.floor(y)),E%e.slidesPerGroup==0&&c.push(y),u.push(y),y=y+S+w),this.virtualSize+=S+w,x=S,E+=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"}),h.flexbox&&!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)*T,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 H=0;H<c.length;H+=1){var N=c[H];e.roundLengths&&(N=Math.floor(N)),c[H]<this.virtualSize+c[0]&&C.push(N)}c=C}if(!e.centeredSlides){C=[];for(var B=0;B<c.length;B+=1){var X=c[B];e.roundLengths&&(X=Math.floor(X)),c[B]<=this.virtualSize-s&&C.push(X)}c=C,Math.floor(this.virtualSize-s)-Math.floor(c[c.length-1])>1&&c.push(this.virtualSize-s)}0===c.length&&(c=[0]),0!==e.spaceBetween&&(this.isHorizontal()?a?l.css({marginLeft:w+"px"}):l.css({marginRight:w+"px"}):l.css({marginBottom:w+"px"})),d.extend(this,{slides:l,snapGrid:c,slidesGrid:u,slidesSizesGrid:v}),p!==o&&this.emit("slidesLengthChange"),c.length!==g&&(this.params.watchOverflow&&this.checkOverflow(),this.emit("snapGridLengthChange")),u.length!==b&&this.emit("slidesGridLengthChange"),(e.watchSlidesProgress||e.watchSlidesVisibility)&&this.updateSlidesOffset()}},updateAutoHeight:function(e){var t,i=[],s=0;if("number"==typeof e?this.setTransition(e):!0===e&&this.setTransition(this.params.speed),"auto"!==this.params.slidesPerView&&this.params.slidesPerView>1)for(t=0;t<Math.ceil(this.params.slidesPerView);t+=1){var a=this.activeIndex+t;if(a>this.slides.length)break;i.push(this.slides.eq(a)[0])}else i.push(this.slides.eq(this.activeIndex)[0]);for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var r=i[t].offsetHeight;s=r>s?r:s}s&&this.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this.params,i=this.slides,s=this.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&&this.updateSlidesOffset();var a=-e;s&&(a=e),i.removeClass(t.slideVisibleClass);for(var r=0;r<i.length;r+=1){var n=i[r],o=(a+(t.centeredSlides?this.minTranslate():0)-n.swiperSlideOffset)/(n.swiperSlideSize+t.spaceBetween);if(t.watchSlidesVisibility){var l=-(a-n.swiperSlideOffset),d=l+this.slidesSizesGrid[r];(l>=0&&l<this.size||d>0&&d<=this.size||l<=0&&d>=this.size)&&i.eq(r).addClass(t.slideVisibleClass)}n.progress=s?-o:o}}},updateProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this.params,i=this.maxTranslate()-this.minTranslate(),s=this.progress,a=this.isBeginning,r=this.isEnd,n=a,o=r;0===i?(s=0,a=!0,r=!0):(a=(s=(e-this.minTranslate())/i)<=0,r=s>=1),d.extend(this,{progress:s,isBeginning:a,isEnd:r}),(t.watchSlidesProgress||t.watchSlidesVisibility)&&this.updateSlidesProgress(e),a&&!n&&this.emit("reachBeginning toEdge"),r&&!o&&this.emit("reachEnd toEdge"),(n&&!a||o&&!r)&&this.emit("fromEdge"),this.emit("progress",s)},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,n=this.activeIndex,o=this.realIndex,l=this.snapIndex,h=e;if(void 0===h){for(var p=0;p<s.length;p+=1)void 0!==s[p+1]?i>=s[p]&&i<s[p+1]-(s[p+1]-s[p])/2?h=p:i>=s[p]&&i<s[p+1]&&(h=p+1):i>=s[p]&&(h=p);r.normalizeSlideIndex&&(h<0||void 0===h)&&(h=0)}if((t=a.indexOf(i)>=0?a.indexOf(i):Math.floor(h/r.slidesPerGroup))>=a.length&&(t=a.length-1),h!==n){var c=parseInt(this.slides.eq(h).attr("data-swiper-slide-index")||h,10);d.extend(this,{snapIndex:t,realIndex:c,previousIndex:n,activeIndex:h}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),o!==c&&this.emit("realIndexChange"),this.emit("slideChange")}else t!==l&&(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;r<this.slides.length;r+=1)this.slides[r]===i&&(a=!0);if(!i||!a)return this.clickedSlide=void 0,void(this.clickedIndex=void 0);this.clickedSlide=i,this.virtual&&this.params.virtual.enabled?this.clickedIndex=parseInt(s(i).attr("data-swiper-slide-index"),10):this.clickedIndex=s(i).index(),t.slideToClickedSlide&&void 0!==this.clickedIndex&&this.clickedIndex!==this.activeIndex&&this.slideToClickedSlide()}};var v={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this.params,i=this.rtlTranslate,s=this.translate,a=this.$wrapperEl;if(t.virtualTranslate)return i?-s:s;var r=d.getTranslate(a[0],e);return i&&(r=-r),r||0},setTranslate:function(e,t){var i=this.rtlTranslate,s=this.params,a=this.$wrapperEl,r=this.progress,n=0,o=0;this.isHorizontal()?n=i?-e:e:o=e,s.roundLengths&&(n=Math.floor(n),o=Math.floor(o)),s.virtualTranslate||(h.transforms3d?a.transform("translate3d("+n+"px, "+o+"px, 0px)"):a.transform("translate("+n+"px, "+o+"px)")),this.previousTranslate=this.translate,this.translate=this.isHorizontal()?n:o;var l=this.maxTranslate()-this.minTranslate();(0===l?0:(e-this.minTranslate())/l)!==r&&this.updateProgress(e),this.emit("setTranslate",this.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}};var f={setTransition:function(e,t){this.$wrapperEl.transition(e),this.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);var i=this.activeIndex,s=this.params,a=this.previousIndex;s.autoHeight&&this.updateAutoHeight();var r=t;if(r||(r=i>a?"next":i<a?"prev":"reset"),this.emit("transitionStart"),e&&i!==a){if("reset"===r)return void this.emit("slideResetTransitionStart");this.emit("slideChangeTransitionStart"),"next"===r?this.emit("slideNextTransitionStart"):this.emit("slidePrevTransitionStart")}},transitionEnd:function(e,t){void 0===e&&(e=!0);var i=this.activeIndex,s=this.previousIndex;this.animating=!1,this.setTransition(0);var a=t;if(a||(a=i>s?"next":i<s?"prev":"reset"),this.emit("transitionEnd"),e&&i!==s){if("reset"===a)return void this.emit("slideResetTransitionEnd");this.emit("slideChangeTransitionEnd"),"next"===a?this.emit("slideNextTransitionEnd"):this.emit("slidePrevTransitionEnd")}}};var m={slideTo:function(e,t,i,s){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var a=this,r=e;r<0&&(r=0);var n=a.params,o=a.snapGrid,l=a.slidesGrid,d=a.previousIndex,p=a.activeIndex,c=a.rtlTranslate;if(a.animating&&n.preventIntercationOnTransition)return!1;var u=Math.floor(r/n.slidesPerGroup);u>=o.length&&(u=o.length-1),(p||n.initialSlide||0)===(d||0)&&i&&a.emit("beforeSlideChangeStart");var v,f=-o[u];if(a.updateProgress(f),n.normalizeSlideIndex)for(var m=0;m<l.length;m+=1)-Math.floor(100*f)>=Math.floor(100*l[m])&&(r=m);if(a.initialized&&r!==p){if(!a.allowSlideNext&&f<a.translate&&f<a.minTranslate())return!1;if(!a.allowSlidePrev&&f>a.translate&&f>a.maxTranslate()&&(p||0)!==r)return!1}return v=r>p?"next":r<p?"prev":"reset",c&&-f===a.translate||!c&&f===a.translate?(a.updateActiveIndex(r),n.autoHeight&&a.updateAutoHeight(),a.updateSlidesClasses(),"slide"!==n.effect&&a.setTranslate(f),"reset"!==v&&(a.transitionStart(i,v),a.transitionEnd(i,v)),!1):(0!==t&&h.transition?(a.setTransition(t),a.setTranslate(f),a.updateActiveIndex(r),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,v),a.animating||(a.animating=!0,a.onSlideToWrapperTransitionEnd||(a.onSlideToWrapperTransitionEnd=function(e){a&&!a.destroyed&&e.target===this&&(a.$wrapperEl[0].removeEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].removeEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd),a.transitionEnd(i,v))}),a.$wrapperEl[0].addEventListener("transitionend",a.onSlideToWrapperTransitionEnd),a.$wrapperEl[0].addEventListener("webkitTransitionEnd",a.onSlideToWrapperTransitionEnd))):(a.setTransition(0),a.setTranslate(f),a.updateActiveIndex(r),a.updateSlidesClasses(),a.emit("beforeTransitionStart",t,s),a.transitionStart(i,v),a.transitionEnd(i,v)),!0)},slideToLoop:function(e,t,i,s){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var a=e;return this.params.loop&&(a+=this.loopedSlides),this.slideTo(a,t,i,s)},slideNext:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.params,a=this.animating;return s.loop?!a&&(this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft,this.slideTo(this.activeIndex+s.slidesPerGroup,e,t,i)):this.slideTo(this.activeIndex+s.slidesPerGroup,e,t,i)},slidePrev:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.params,a=this.animating,r=this.snapGrid,n=this.slidesGrid,o=this.rtlTranslate;if(s.loop){if(a)return!1;this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft}function l(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var d,h=l(o?this.translate:-this.translate),p=r.map(function(e){return l(e)}),c=(n.map(function(e){return l(e)}),r[p.indexOf(h)],r[p.indexOf(h)-1]);return 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){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.activeIndex,a=Math.floor(s/this.params.slidesPerGroup);if(a<this.snapGrid.length-1){var r=this.rtlTranslate?this.translate:-this.translate,n=this.snapGrid[a];r-n>(this.snapGrid[a+1]-n)/2&&(s=this.params.slidesPerGroup)}return this.slideTo(s,e,t,i)},slideToClickedSlide:function(){var e,t=this,i=t.params,a=t.$wrapperEl,r="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,n=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(s(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?n<t.loopedSlides-r/2||n>t.slides.length-t.loopedSlides+r/2?(t.loopFix(),n=a.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),d.nextTick(function(){t.slideTo(n)})):t.slideTo(n):n>t.slides.length-r?(t.loopFix(),n=a.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),d.nextTick(function(){t.slideTo(n)})):t.slideTo(n)}else t.slideTo(n)}};var g={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;o<n;o+=1){var l=s(e.createElement("div")).addClass(i.slideClass+" "+i.slideBlankClass);a.append(l)}r=a.children("."+i.slideClass)}}"auto"!==i.slidesPerView||i.loopedSlides||(i.loopedSlides=r.length),t.loopedSlides=parseInt(i.loopedSlides||i.slidesPerView,10),t.loopedSlides+=i.loopAdditionalSlides,t.loopedSlides>r.length&&(t.loopedSlides=r.length);var d=[],h=[];r.each(function(e,i){var a=s(i);e<t.loopedSlides&&h.push(i),e<r.length&&e>=r.length-t.loopedSlides&&d.push(i),a.attr("data-swiper-slide-index",e)});for(var p=0;p<h.length;p+=1)a.append(s(h[p].cloneNode(!0)).addClass(i.slideDuplicateClass));for(var c=d.length-1;c>=0;c-=1)a.prepend(s(d[c].cloneNode(!0)).addClass(i.slideDuplicateClass))},loopFix:function(){var e,t=this.params,i=this.activeIndex,s=this.slides,a=this.loopedSlides,r=this.allowSlidePrev,n=this.allowSlideNext,o=this.snapGrid,l=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var d=-o[i]-this.getTranslate();i<a?(e=s.length-3*a+i,e+=a,this.slideTo(e,0,!1,!0)&&0!==d&&this.setTranslate((l?-this.translate:this.translate)-d)):("auto"===t.slidesPerView&&i>=2*a||i>=s.length-a)&&(e=-s.length+i+a,e+=a,this.slideTo(e,0,!1,!0)&&0!==d&&this.setTranslate((l?-this.translate:this.translate)-d));this.allowSlidePrev=r,this.allowSlideNext=n},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,i=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass).remove(),i.removeAttr("data-swiper-slide-index")}};var b={setGrabCursor:function(e){if(!(h.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)){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(){h.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}};var w={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<e.length;s+=1)e[s]&&t.append(e[s]);else t.append(e);i.loop&&this.loopCreate(),i.observer&&h.observer||this.update()},prependSlide:function(e){var t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&this.loopDestroy();var a=s+1;if("object"==typeof e&&"length"in e){for(var r=0;r<e.length;r+=1)e[r]&&i.prepend(e[r]);a=s+e.length}else i.prepend(e);t.loop&&this.loopCreate(),t.observer&&h.observer||this.update(),this.slideTo(a,0,!1)},addSlide:function(e,t){var i=this.$wrapperEl,s=this.params,a=this.activeIndex;s.loop&&(a-=this.loopedSlides,this.loopDestroy(),this.slides=i.children("."+s.slideClass));var r=this.slides.length;if(e<=0)this.prependSlide(t);else if(e>=r)this.appendSlide(t);else{for(var n=a>e?a+1:a,o=[],l=r-1;l>=e;l-=1){var d=this.slides.eq(l);d.remove(),o.unshift(d)}if("object"==typeof t&&"length"in t){for(var p=0;p<t.length;p+=1)t[p]&&i.append(t[p]);n=a>e?a+t.length:a}else i.append(t);for(var c=0;c<o.length;c+=1)i.append(o[c]);s.loop&&this.loopCreate(),s.observer&&h.observer||this.update(),s.loop?this.slideTo(n+this.loopedSlides,0,!1):this.slideTo(n,0,!1)}},removeSlide:function(e){var t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&(s-=this.loopedSlides,this.loopDestroy(),this.slides=i.children("."+t.slideClass));var a,r=s;if("object"==typeof e&&"length"in e){for(var n=0;n<e.length;n+=1)a=e[n],this.slides[a]&&this.slides.eq(a).remove(),a<r&&(r-=1);r=Math.max(r,0)}else a=e,this.slides[a]&&this.slides.eq(a).remove(),a<r&&(r-=1),r=Math.max(r,0);t.loop&&this.loopCreate(),t.observer&&h.observer||this.update(),t.loop?this.slideTo(r+this.loopedSlides,0,!1):this.slideTo(r,0,!1)},removeAllSlides:function(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},y=function(){var i=t.navigator.userAgent,s={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:t.cordova||t.phonegap,phonegap:t.cordova||t.phonegap},a=i.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),r=i.match(/(Android);?[\s\/]+([\d.]+)?/),n=i.match(/(iPad).*OS\s([\d_]+)/),o=i.match(/(iPod)(.*OS\s([\d_]+))?/),l=!n&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(a&&(s.os="windows",s.osVersion=a[2],s.windows=!0),r&&!a&&(s.os="android",s.osVersion=r[2],s.android=!0,s.androidChrome=i.toLowerCase().indexOf("chrome")>=0),(n||l||o)&&(s.os="ios",s.ios=!0),l&&!o&&(s.osVersion=l[2].replace(/_/g,"."),s.iphone=!0),n&&(s.osVersion=n[2].replace(/_/g,"."),s.ipad=!0),o&&(s.osVersion=o[3]?o[3].replace(/_/g,"."):null,s.iphone=!0),s.ios&&s.osVersion&&i.indexOf("Version/")>=0&&"10"===s.osVersion.split(".")[0]&&(s.osVersion=i.toLowerCase().split("version/")[1].split(" ")[0]),s.desktop=!(s.os||s.android||s.webView),s.webView=(l||n||o)&&i.match(/.*AppleWebKit(?!.*Safari)/i),s.os&&"ios"===s.os){var d=s.osVersion.split("."),h=e.querySelector('meta[name="viewport"]');s.minimalUi=!s.webView&&(o||l)&&(1*d[0]==7?1*d[1]>=1:1*d[0]>7)&&h&&h.getAttribute("content").indexOf("minimal-ui")>=0}return s.pixelRatio=t.devicePixelRatio||1,s}();function x(){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;if(this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),e.freeMode){var r=Math.min(Math.max(this.translate,this.maxTranslate()),this.minTranslate());this.setTranslate(r),this.updateActiveIndex(),this.updateSlidesClasses(),e.autoHeight&&this.updateAutoHeight()}else 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.allowSlidePrev=s,this.allowSlideNext=i,this.params.watchOverflow&&a!==this.snapGrid&&this.checkOverflow()}}var E={attachEvents:function(){var i=this.params,a=this.touchEvents,r=this.el,n=this.wrapperEl;this.onTouchStart=function(i){var a=this.touchEventsData,r=this.params,n=this.touches;if(!this.animating||!r.preventIntercationOnTransition){var o=i;if(o.originalEvent&&(o=o.originalEvent),a.isTouchEvent="touchstart"===o.type,(a.isTouchEvent||!("which"in o)||3!==o.which)&&(!a.isTouched||!a.isMoved))if(r.noSwiping&&s(o.target).closest(r.noSwipingSelector?r.noSwipingSelector:"."+r.noSwipingClass)[0])this.allowClick=!0;else if(!r.swipeHandler||s(o).closest(r.swipeHandler)[0]){n.currentX="touchstart"===o.type?o.targetTouches[0].pageX:o.pageX,n.currentY="touchstart"===o.type?o.targetTouches[0].pageY:o.pageY;var l=n.currentX,h=n.currentY;if(!y.ios||y.cordova||!r.iOSEdgeSwipeDetection||!(l<=r.iOSEdgeSwipeThreshold||l>=t.screen.width-r.iOSEdgeSwipeThreshold)){if(d.extend(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),n.startX=l,n.startY=h,a.touchStartTime=d.now(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,r.threshold>0&&(a.allowThresholdMove=!1),"touchstart"!==o.type){var p=!0;s(o.target).is(a.formElements)&&(p=!1),e.activeElement&&s(e.activeElement).is(a.formElements)&&e.activeElement!==o.target&&e.activeElement.blur(),p&&this.allowTouchMove&&o.preventDefault()}this.emit("touchStart",o)}}}}.bind(this),this.onTouchMove=function(t){var i=this.touchEventsData,a=this.params,r=this.touches,n=this.rtlTranslate,o=t;if(o.originalEvent&&(o=o.originalEvent),i.isTouched){if(!i.isTouchEvent||"mousemove"!==o.type){var l="touchmove"===o.type?o.targetTouches[0].pageX:o.pageX,h="touchmove"===o.type?o.targetTouches[0].pageY:o.pageY;if(o.preventedByNestedSwiper)return r.startX=l,void(r.startY=h);if(!this.allowTouchMove)return this.allowClick=!1,void(i.isTouched&&(d.extend(r,{startX:l,startY:h,currentX:l,currentY:h}),i.touchStartTime=d.now()));if(i.isTouchEvent&&a.touchReleaseOnEdges&&!a.loop)if(this.isVertical()){if(h<r.startY&&this.translate<=this.maxTranslate()||h>r.startY&&this.translate>=this.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(l<r.startX&&this.translate<=this.maxTranslate()||l>r.startX&&this.translate>=this.minTranslate())return;if(i.isTouchEvent&&e.activeElement&&o.target===e.activeElement&&s(o.target).is(i.formElements))return i.isMoved=!0,void(this.allowClick=!1);if(i.allowTouchCallbacks&&this.emit("touchMove",o),!(o.targetTouches&&o.targetTouches.length>1)){r.currentX=l,r.currentY=h;var p,c=r.currentX-r.startX,u=r.currentY-r.startY;if(void 0===i.isScrolling&&(this.isHorizontal()&&r.currentY===r.startY||this.isVertical()&&r.currentX===r.startX?i.isScrolling=!1:c*c+u*u>=25&&(p=180*Math.atan2(Math.abs(u),Math.abs(c))/Math.PI,i.isScrolling=this.isHorizontal()?p>a.touchAngle:90-p>a.touchAngle)),i.isScrolling&&this.emit("touchMoveOpposite",o),"undefined"==typeof startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else if(i.startMoving){this.allowClick=!1,o.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&o.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",o)),this.emit("sliderMove",o),i.isMoved=!0;var v=this.isHorizontal()?c:u;r.diff=v,v*=a.touchRatio,n&&(v=-v),this.swipeDirection=v>0?"prev":"next",i.currentTranslate=v+i.startTranslate;var f=!0,m=a.resistanceRatio;if(a.touchReleaseOnEdges&&(m=0),v>0&&i.currentTranslate>this.minTranslate()?(f=!1,a.resistance&&(i.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+i.startTranslate+v,m))):v<0&&i.currentTranslate<this.maxTranslate()&&(f=!1,a.resistance&&(i.currentTranslate=this.maxTranslate()+1-Math.pow(this.maxTranslate()-i.startTranslate-v,m))),f&&(o.preventedByNestedSwiper=!0),!this.allowSlideNext&&"next"===this.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!this.allowSlidePrev&&"prev"===this.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(v)>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.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:d.now()})),this.updateProgress(i.currentTranslate),this.setTranslate(i.currentTranslate))}}}}else i.startMoving&&i.isScrolling&&this.emit("touchMoveOpposite",o)}.bind(this),this.onTouchEnd=function(e){var t=this,i=t.touchEventsData,s=t.params,a=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=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=d.now(),u=c-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(h),t.emit("tap",h),u<300&&c-i.lastClickTime>300&&(i.clickTimeout&&clearTimeout(i.clickTimeout),i.clickTimeout=d.nextTick(function(){t&&!t.destroyed&&t.emit("click",h)},300)),u<300&&c-i.lastClickTime<300&&(i.clickTimeout&&clearTimeout(i.clickTimeout),t.emit("doubleTap",h))),i.lastClickTime=d.now(),d.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.freeMode){if(p<-t.minTranslate())return void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(s.freeModeMomentum){if(i.velocities.length>1){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)<s.freeModeMinimumVelocity&&(t.velocity=0),(g>150||d.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,E,T=!1,S=20*Math.abs(t.velocity)*s.freeModeMomentumBounceRatio;if(y<t.maxTranslate())s.freeModeMomentumBounce?(y+t.maxTranslate()<-S&&(y=t.maxTranslate()-S),x=t.maxTranslate(),T=!0,i.allowMomentumBounce=!0):y=t.maxTranslate(),s.loop&&s.centeredSlides&&(E=!0);else if(y>t.minTranslate())s.freeModeMomentumBounce?(y-t.minTranslate()>S&&(y=t.minTranslate()+S),x=t.minTranslate(),T=!0,i.allowMomentumBounce=!0):y=t.minTranslate(),s.loop&&s.centeredSlides&&(E=!0);else if(s.freeModeSticky){for(var C,M=0;M<l.length;M+=1)if(l[M]>-y){C=M;break}y=-(y=Math.abs(l[C]-y)<Math.abs(l[C-1]-y)||"next"===t.swipeDirection?l[C]:l[C-1])}if(E&&t.once("transitionEnd",function(){t.loopFix()}),0!==t.velocity)b=r?Math.abs((-y-t.translate)/t.velocity):Math.abs((y-t.translate)/t.velocity);else if(s.freeModeSticky)return void t.slideToClosest();s.freeModeMomentumBounce&&T?(t.updateProgress(x),t.setTransition(b),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&i.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(s.speed),t.setTranslate(x),n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))})):t.velocity?(t.updateProgress(y),t.setTransition(b),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd(function(){t&&!t.destroyed&&t.transitionEnd()}))):t.updateProgress(y),t.updateActiveIndex(),t.updateSlidesClasses()}else if(s.freeModeSticky)return void t.slideToClosest();(!s.freeModeMomentum||u>=s.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var z=0,k=t.slidesSizesGrid[0],P=0;P<o.length;P+=s.slidesPerGroup)void 0!==o[P+s.slidesPerGroup]?p>=o[P]&&p<o[P+s.slidesPerGroup]&&(z=P,k=o[P+s.slidesPerGroup]-o[P]):p>=o[P]&&(z=P,k=o[o.length-1]-o[o.length-2]);var $=(p-o[z])/k;if(u>s.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&($>=s.longSwipesRatio?t.slideTo(z+s.slidesPerGroup):t.slideTo(z)),"prev"===t.swipeDirection&&($>1-s.longSwipesRatio?t.slideTo(z+s.slidesPerGroup):t.slideTo(z))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(z+s.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(z)}}}.bind(this),this.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(this);var o="container"===i.touchEventsTarget?r:n,l=!!i.nested;if(h.touch||!h.pointerEvents&&!h.prefixedPointerEvents){if(h.touch){var p=!("touchstart"!==a.start||!h.passiveListener||!i.passiveListeners)&&{passive:!0,capture:!1};o.addEventListener(a.start,this.onTouchStart,p),o.addEventListener(a.move,this.onTouchMove,h.passiveListener?{passive:!1,capture:l}:l),o.addEventListener(a.end,this.onTouchEnd,p)}(i.simulateTouch&&!y.ios&&!y.android||i.simulateTouch&&!h.touch&&y.ios)&&(o.addEventListener("mousedown",this.onTouchStart,!1),e.addEventListener("mousemove",this.onTouchMove,l),e.addEventListener("mouseup",this.onTouchEnd,!1))}else o.addEventListener(a.start,this.onTouchStart,!1),e.addEventListener(a.move,this.onTouchMove,l),e.addEventListener(a.end,this.onTouchEnd,!1);(i.preventClicks||i.preventClicksPropagation)&&o.addEventListener("click",this.onClick,!0),this.on(y.ios||y.android?"resize orientationchange observerUpdate":"resize observerUpdate",x,!0)},detachEvents:function(){var t=this.params,i=this.touchEvents,s=this.el,a=this.wrapperEl,r="container"===t.touchEventsTarget?s:a,n=!!t.nested;if(h.touch||!h.pointerEvents&&!h.prefixedPointerEvents){if(h.touch){var o=!("onTouchStart"!==i.start||!h.passiveListener||!t.passiveListeners)&&{passive:!0,capture:!1};r.removeEventListener(i.start,this.onTouchStart,o),r.removeEventListener(i.move,this.onTouchMove,n),r.removeEventListener(i.end,this.onTouchEnd,o)}(t.simulateTouch&&!y.ios&&!y.android||t.simulateTouch&&!h.touch&&y.ios)&&(r.removeEventListener("mousedown",this.onTouchStart,!1),e.removeEventListener("mousemove",this.onTouchMove,n),e.removeEventListener("mouseup",this.onTouchEnd,!1))}else r.removeEventListener(i.start,this.onTouchStart,!1),e.removeEventListener(i.move,this.onTouchMove,n),e.removeEventListener(i.end,this.onTouchEnd,!1);(t.preventClicks||t.preventClicksPropagation)&&r.removeEventListener("click",this.onClick,!0),this.off(y.ios||y.android?"resize orientationchange observerUpdate":"resize observerUpdate",x)}};var T={setBreakpoint:function(){var e=this.activeIndex,t=this.initialized,i=this.loopedSlides;void 0===i&&(i=0);var s=this.params,a=s.breakpoints;if(a&&(!a||0!==Object.keys(a).length)){var r=this.getBreakpoint(a);if(r&&this.currentBreakpoint!==r){var n=r in a?a[r]:this.originalParams,o=s.loop&&n.slidesPerView!==s.slidesPerView;d.extend(this.params,n),d.extend(this,{allowTouchMove:this.params.allowTouchMove,allowSlideNext:this.params.allowSlideNext,allowSlidePrev:this.params.allowSlidePrev}),this.currentBreakpoint=r,o&&t&&(this.loopDestroy(),this.loopCreate(),this.updateSlides(),this.slideTo(e-i+this.loopedSlides,0,!1)),this.emit("breakpoint",n)}}},getBreakpoint:function(e){if(e){var i=!1,s=[];Object.keys(e).forEach(function(e){s.push(e)}),s.sort(function(e,t){return parseInt(e,10)-parseInt(t,10)});for(var a=0;a<s.length;a+=1){var r=s[a];r>=t.innerWidth&&!i&&(i=r)}return i||"max"}}},S=function(){return{isIE:!!t.navigator.userAgent.match(/Trident/g)||!!t.navigator.userAgent.match(/MSIE/g),isSafari:(e=t.navigator.userAgent.toLowerCase(),e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)};var e}();var C={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventIntercationOnTransition:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold: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,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,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:!0,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},M={update:u,translate:v,transition:f,slide:m,loop:g,grabCursor:b,manipulation:w,events:E,breakpoints:T,checkOverflow:{checkOverflow:function(){var e=this.isLocked;this.isLocked=1===this.snapGrid.length,this.allowSlideNext=!this.isLocked,this.allowSlidePrev=!this.isLocked,e!==this.isLocked&&this.emit(this.isLocked?"lock":"unlock"),e&&e!==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(t.direction),t.freeMode&&a.push("free-mode"),h.flexbox||a.push("no-flexbox"),t.autoHeight&&a.push("autoheight"),i&&a.push("rtl"),t.slidesPerColumn>1&&a.push("multirow"),y.android&&a.push("android"),y.ios&&a.push("ios"),S.isIE&&(h.pointerEvents||h.prefixedPointerEvents)&&a.push("wp8-"+t.direction),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(){void 0!==e&&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;i<e.imagesToLoad.length;i+=1){var s=e.imagesToLoad[i];e.loadImage(s,s.currentSrc||s.getAttribute("src"),s.srcset||s.getAttribute("srcset"),s.sizes||s.getAttribute("sizes"),!0,t)}}}},z={},k=function(e){function t(){for(var i,a,r,n=[],o=arguments.length;o--;)n[o]=arguments[o];1===n.length&&n[0].constructor&&n[0].constructor===Object?r=n[0]:(a=(i=n)[0],r=i[1]),r||(r={}),r=d.extend({},r),a&&!r.el&&(r.el=a),e.call(this,r),Object.keys(M).forEach(function(e){Object.keys(M[e]).forEach(function(i){t.prototype[i]||(t.prototype[i]=M[e][i])})});var l=this;void 0===l.modules&&(l.modules={}),Object.keys(l.modules).forEach(function(e){var t=l.modules[e];if(t.params){var i=Object.keys(t.params)[0],s=t.params[i];if("object"!=typeof s)return;if(!(i in r&&"enabled"in s))return;!0===r[i]&&(r[i]={enabled:!0}),"object"!=typeof r[i]||"enabled"in r[i]||(r[i].enabled=!0),r[i]||(r[i]={enabled:!1})}});var p=d.extend({},C);l.useModulesParams(p),l.params=d.extend({},p,z,r),l.originalParams=d.extend({},l.params),l.passedParams=d.extend({},r),l.$=s;var c=s(l.params.el);if(a=c[0]){if(c.length>1){var u=[];return c.each(function(e,i){var s=d.extend({},r,{el:i});u.push(new t(s))}),u}a.swiper=l,c.data("swiper",l);var v,f,m=c.children("."+l.params.wrapperClass);return d.extend(l,{$el:c,el:a,$wrapperEl:m,wrapperEl:m[0],classNames:[],slides:s(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===l.params.direction},isVertical:function(){return"vertical"===l.params.direction},rtl:"rtl"===a.dir.toLowerCase()||"rtl"===c.css("direction"),rtlTranslate:"horizontal"===l.params.direction&&("rtl"===a.dir.toLowerCase()||"rtl"===c.css("direction")),wrongRTL:"-webkit-box"===m.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEvents:(v=["touchstart","touchmove","touchend"],f=["mousedown","mousemove","mouseup"],h.pointerEvents?f=["pointerdown","pointermove","pointerup"]:h.prefixedPointerEvents&&(f=["MSPointerDown","MSPointerMove","MSPointerUp"]),l.touchEventsTouch={start:v[0],move:v[1],end:v[2]},l.touchEventsDesktop={start:f[0],move:f[1],end:f[2]},h.touch||!l.params.simulateTouch?l.touchEventsTouch:l.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:d.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.useModules(),l.params.init&&l.init(),l}}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;l<t.length;l+=1)t[l]&&!n&&(r+=1,(o+=t[l].swiperSlideSize)>s&&(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;h<t.length;h+=1)i[h]-i[a]<s&&(r+=1);return r},t.prototype.update=function(){var e=this;if(e&&!e.destroyed){var t=e.snapGrid,i=e.params;i.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(s(),e.params.autoHeight&&e.updateAutoHeight()):(("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&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.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,n=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"),n&&n.length&&n.removeClass([s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index").removeAttr("data-swiper-column").removeAttr("data-swiper-row")),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),d.deleteProps(i)),i.destroyed=!0,null)},t.extendDefaults=function(e){d.extend(z,e)},i.extendedDefaults.get=function(){return z},i.defaults.get=function(){return C},i.Class.get=function(){return e},i.$.get=function(){return s},Object.defineProperties(t,i),t}(p),P={name:"device",proto:{device:y},static:{device:y}},$={name:"support",proto:{support:h},static:{support:h}},L={name:"browser",proto:{browser:S},static:{browser:S}},I={name:"resize",create:function(){var e=this;d.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)}}},D={func:t.MutationObserver||t.WebkitMutationObserver,attach:function(e,t){void 0===t&&(t={});var i=this,s=new(0,D.func)(function(e){e.forEach(function(e){i.emit("observerUpdate",e)})});s.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),i.observer.observers.push(s)},init:function(){if(h.observer&&this.params.observer){if(this.params.observeParents)for(var e=this.$el.parents(),t=0;t<e.length;t+=1)this.observer.attach(e[t]);this.observer.attach(this.$el[0],{childList:!1}),this.observer.attach(this.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach(function(e){e.disconnect()}),this.observer.observers=[]}},O={name:"observer",params:{observer:!1,observeParents:!1},create:function(){d.extend(this,{observer:{init:D.init.bind(this),attach:D.attach.bind(this),destroy:D.destroy.bind(this),observers:[]}})},on:{init:function(){this.observer.init()},destroy:function(){this.observer.destroy()}}},A={update:function(e){var t=this,i=t.params,s=i.slidesPerView,a=i.slidesPerGroup,r=i.centeredSlides,n=t.virtual,o=n.from,l=n.to,h=n.slides,p=n.slidesGrid,c=n.renderSlide,u=n.offset;t.updateActiveIndex();var v,f,m,g=t.activeIndex||0;v=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",r?(f=Math.floor(s/2)+a,m=Math.floor(s/2)+a):(f=s+(a-1),m=a);var b=Math.max((g||0)-m,0),w=Math.min((g||0)+f,h.length-1),y=(t.slidesGrid[b]||0)-(t.slidesGrid[0]||0);function x(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(d.extend(t.virtual,{from:b,to:w,offset:y,slidesGrid:t.slidesGrid}),o===b&&l===w&&!e)return t.slidesGrid!==p&&y!==u&&t.slides.css(v,y+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:y,from:b,to:w,slides:function(){for(var e=[],t=b;t<=w;t+=1)e.push(h[t]);return e}()}),void x();var E=[],T=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var S=o;S<=l;S+=1)(S<b||S>w)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+S+'"]').remove();for(var C=0;C<h.length;C+=1)C>=b&&C<=w&&(void 0===l||e?T.push(C):(C>l&&T.push(C),C<o&&E.push(C)));T.forEach(function(e){t.$wrapperEl.append(c(h[e],e))}),E.sort(function(e,t){return e<t}).forEach(function(e){t.$wrapperEl.prepend(c(h[e],e))}),t.$wrapperEl.children(".swiper-slide").css(v,y+"px"),x()},renderSlide:function(e,t){var i=this.params.virtual;if(i.cache&&this.virtual.cache[t])return this.virtual.cache[t];var a=i.renderSlide?s(i.renderSlide.call(this,e,t)):s('<div class="'+this.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");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){this.virtual.slides.push(e),this.virtual.update(!0)},prependSlide:function(e){if(this.virtual.slides.unshift(e),this.params.virtual.cache){var t=this.virtual.cache,i={};Object.keys(t).forEach(function(e){i[e+1]=t[e]}),this.virtual.cache=i}this.virtual.update(!0),this.slideNext(0)}},G={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null}},create:function(){d.extend(this,{virtual:{update:A.update.bind(this),appendSlide:A.appendSlide.bind(this),prependSlide:A.prependSlide.bind(this),renderSlide:A.renderSlide.bind(this),slides:this.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){if(this.params.virtual.enabled){this.classNames.push(this.params.containerModifierClass+"virtual");var e={watchSlidesProgress:!0};d.extend(this.params,e),d.extend(this.originalParams,e),this.virtual.update()}},setTranslate:function(){this.params.virtual.enabled&&this.virtual.update()}}},H={handle:function(i){var s=this.rtlTranslate,a=i;a.originalEvent&&(a=a.originalEvent);var r=a.keyCode||a.charCode;if(!this.allowSlideNext&&(this.isHorizontal()&&39===r||this.isVertical()&&40===r))return!1;if(!this.allowSlidePrev&&(this.isHorizontal()&&37===r||this.isVertical()&&38===r))return!1;if(!(a.shiftKey||a.altKey||a.ctrlKey||a.metaKey||e.activeElement&&e.activeElement.nodeName&&("input"===e.activeElement.nodeName.toLowerCase()||"textarea"===e.activeElement.nodeName.toLowerCase()))){if(this.params.keyboard.onlyInViewport&&(37===r||39===r||38===r||40===r)){var n=!1;if(this.$el.parents("."+this.params.slideClass).length>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<h.length;p+=1){var c=h[p];c[0]>=0&&c[0]<=o&&c[1]>=0&&c[1]<=l&&(n=!0)}if(!n)return}this.isHorizontal()?(37!==r&&39!==r||(a.preventDefault?a.preventDefault():a.returnValue=!1),(39===r&&!s||37===r&&s)&&this.slideNext(),(37===r&&!s||39===r&&s)&&this.slidePrev()):(38!==r&&40!==r||(a.preventDefault?a.preventDefault():a.returnValue=!1),40===r&&this.slideNext(),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)}},N={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0}},create:function(){d.extend(this,{keyboard:{enabled:!1,enable:H.enable.bind(this),disable:H.disable.bind(this),handle:H.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}};var B={lastScrollTime:d.now(),event: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),(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 i=e,s=this,a=s.params.mousewheel;if(!s.mouseEntered&&!a.releaseOnEdges)return!0;i.originalEvent&&(i=i.originalEvent);var r=0,n=s.rtlTranslate?-1:1,o=B.normalize(i);if(a.forceToAxis)if(s.isHorizontal()){if(!(Math.abs(o.pixelX)>Math.abs(o.pixelY)))return!0;r=o.pixelX*n}else{if(!(Math.abs(o.pixelY)>Math.abs(o.pixelX)))return!0;r=o.pixelY}else r=Math.abs(o.pixelX)>Math.abs(o.pixelY)?-o.pixelX*n:-o.pixelY;if(0===r)return!0;if(a.invert&&(r=-r),s.params.freeMode){s.params.loop&&s.loopFix();var l=s.getTranslate()+r*a.sensitivity,h=s.isBeginning,p=s.isEnd;if(l>=s.minTranslate()&&(l=s.minTranslate()),l<=s.maxTranslate()&&(l=s.maxTranslate()),s.setTransition(0),s.setTranslate(l),s.updateProgress(),s.updateActiveIndex(),s.updateSlidesClasses(),(!h&&s.isBeginning||!p&&s.isEnd)&&s.updateSlidesClasses(),s.params.freeModeSticky&&(clearTimeout(s.mousewheel.timeout),s.mousewheel.timeout=d.nextTick(function(){s.slideToClosest()},300)),s.emit("scroll",i),s.params.autoplay&&s.params.autoplayDisableOnInteraction&&s.autoplay.stop(),l===s.minTranslate()||l===s.maxTranslate())return!0}else{if(d.now()-s.mousewheel.lastScrollTime>60)if(r<0)if(s.isEnd&&!s.params.loop||s.animating){if(a.releaseOnEdges)return!0}else s.slideNext(),s.emit("scroll",i);else if(s.isBeginning&&!s.params.loop||s.animating){if(a.releaseOnEdges)return!0}else s.slidePrev(),s.emit("scroll",i);s.mousewheel.lastScrollTime=(new t.Date).getTime()}return i.preventDefault?i.preventDefault():i.returnValue=!1,!1},enable:function(){if(!B.event)return!1;if(this.mousewheel.enabled)return!1;var e=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(e=s(this.params.mousewheel.eventsTarged)),e.on("mouseenter",this.mousewheel.handleMouseEnter),e.on("mouseleave",this.mousewheel.handleMouseLeave),e.on(B.event,this.mousewheel.handle),this.mousewheel.enabled=!0,!0},disable:function(){if(!B.event)return!1;if(!this.mousewheel.enabled)return!1;var e=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(e=s(this.params.mousewheel.eventsTarged)),e.off(B.event,this.mousewheel.handle),this.mousewheel.enabled=!1,!0}},X={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))}},init:function(){var e,t,i=this,a=i.params.navigation;(a.nextEl||a.prevEl)&&(a.nextEl&&(e=s(a.nextEl),i.params.uniqueNavElements&&"string"==typeof a.nextEl&&e.length>1&&1===i.$el.find(a.nextEl).length&&(e=i.$el.find(a.nextEl))),a.prevEl&&(t=s(a.prevEl),i.params.uniqueNavElements&&"string"==typeof a.prevEl&&t.length>1&&1===i.$el.find(a.prevEl).length&&(t=i.$el.find(a.prevEl))),e&&e.length>0&&e.on("click",function(e){e.preventDefault(),i.isEnd&&!i.params.loop||i.slideNext()}),t&&t.length>0&&t.on("click",function(e){e.preventDefault(),i.isBeginning&&!i.params.loop||i.slidePrev()}),d.extend(i.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"),t.removeClass(this.params.navigation.disabledClass)),i&&i.length&&(i.off("click"),i.removeClass(this.params.navigation.disabledClass))}},Y={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 if(h.eq(i).addClass(t.bulletActiveClass),t.dynamicBullets){for(var p=h.eq(o),c=h.eq(l),u=o;u<=l;u+=1)h.eq(u).addClass(t.bulletActiveClass+"-main");p.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),c.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next")}if(t.dynamicBullets){var v=Math.min(h.length,t.dynamicMainBullets+4),f=(this.pagination.bulletSize*v-this.pagination.bulletSize)/2-d*this.pagination.bulletSize,m=e?"right":"left";h.css(this.isHorizontal()?m:"top",f+"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 g;g=t.progressbarOpposite?this.isHorizontal()?"vertical":"horizontal":this.isHorizontal()?"horizontal":"vertical";var b=(i+1)/n,w=1,y=1;"horizontal"===g?w=b:y=b,r.find("."+t.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+w+") scaleY("+y+")").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<a;r+=1)e.renderBullet?s+=e.renderBullet.call(this,r,e.bulletClass):s+="<"+e.bulletElement+' class="'+e.bulletClass+'"></'+e.bulletElement+">";i.html(s),this.pagination.bullets=i.find("."+e.bulletClass)}"fraction"===e.type&&(s=e.renderFraction?e.renderFraction.call(this,e.currentClass,e.totalClass):'<span class="'+e.currentClass+'"></span> / <span class="'+e.totalClass+'"></span>',i.html(s)),"progressbar"===e.type&&(s=e.renderProgressbar?e.renderProgressbar.call(this,e.progressbarFillClass):'<span class="'+e.progressbarFillClass+'"></span>',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)}),d.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)}}},V={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()?(h.transforms3d?r.transform("translate3d("+d+"px, 0, 0)"):r.transform("translateX("+d+"px)"),r[0].style.width=l+"px"):(h.transforms3d?r.transform("translate3d(0px, "+d+"px, 0)"):r.transform("translateY("+d+"px)"),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,n=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.scrollbarHide&&(i[0].style.opacity=0),d.extend(e,{trackSize:a,divider:r,moveDivider:n,dragSize:s}),e.$el[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](this.params.scrollbar.lockClass)}},setDragPosition:function(e){var t,i=this.scrollbar,s=this.rtlTranslate,a=i.$el,r=i.dragSize,n=i.trackSize;t=((this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY)-a.offset()[this.isHorizontal()?"left":"top"]-r/2)/(n-r),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var o=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*t;this.updateProgress(o),this.setTranslate(o),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,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.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.$el;this.scrollbar.isTouched&&(this.scrollbar.isTouched=!1,t.hide&&(clearTimeout(this.scrollbar.dragTimeout),this.scrollbar.dragTimeout=d.nextTick(function(){i.css("opacity",0),i.transition(400)},1e3)),this.emit("scrollbarDragEnd",e),t.snapOnRelease&&this.slideToClosest())},enableDraggable:function(){if(this.params.scrollbar.el){var t=this.scrollbar,i=this.touchEvents,s=this.touchEventsDesktop,a=this.params,r=t.$el[0],n=!(!h.passiveListener||!a.passiveListener)&&{passive:!1,capture:!1},o=!(!h.passiveListener||!a.passiveListener)&&{passive:!0,capture:!1};h.touch||!h.pointerEvents&&!h.prefixedPointerEvents?(h.touch&&(r.addEventListener(i.start,this.scrollbar.onDragStart,n),r.addEventListener(i.move,this.scrollbar.onDragMove,n),r.addEventListener(i.end,this.scrollbar.onDragEnd,o)),(a.simulateTouch&&!y.ios&&!y.android||a.simulateTouch&&!h.touch&&y.ios)&&(r.addEventListener("mousedown",this.scrollbar.onDragStart,n),e.addEventListener("mousemove",this.scrollbar.onDragMove,n),e.addEventListener("mouseup",this.scrollbar.onDragEnd,o))):(r.addEventListener(s.start,this.scrollbar.onDragStart,n),e.addEventListener(s.move,this.scrollbar.onDragMove,n),e.addEventListener(s.end,this.scrollbar.onDragEnd,o))}},disableDraggable:function(){if(this.params.scrollbar.el){var t=this.scrollbar,i=this.touchEvents,s=this.touchEventsDesktop,a=this.params,r=t.$el[0],n=!(!h.passiveListener||!a.passiveListener)&&{passive:!1,capture:!1},o=!(!h.passiveListener||!a.passiveListener)&&{passive:!0,capture:!1};h.touch||!h.pointerEvents&&!h.prefixedPointerEvents?(h.touch&&(r.removeEventListener(i.start,this.scrollbar.onDragStart,n),r.removeEventListener(i.move,this.scrollbar.onDragMove,n),r.removeEventListener(i.end,this.scrollbar.onDragEnd,o)),(a.simulateTouch&&!y.ios&&!y.android||a.simulateTouch&&!h.touch&&y.ios)&&(r.removeEventListener("mousedown",this.scrollbar.onDragStart,n),e.removeEventListener("mousemove",this.scrollbar.onDragMove,n),e.removeEventListener("mouseup",this.scrollbar.onDragEnd,o))):(r.removeEventListener(s.start,this.scrollbar.onDragStart,n),e.removeEventListener(s.move,this.scrollbar.onDragMove,n),e.removeEventListener(s.end,this.scrollbar.onDragEnd,o))}},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('<div class="'+this.params.scrollbar.dragClass+'"></div>'),a.append(r)),d.extend(e,{$el:a,el:a[0],$dragEl:r,dragEl:r[0]}),i.draggable&&e.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},R={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",void 0!==h&&null!==h){var p=h-(h-1)*(1-Math.abs(t));a[0].style.opacity=p}if(void 0===d||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]").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]").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]").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)})}},F={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,!h.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,a.scaleStart=F.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(!h.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;i.fakeGestureMoved=!0,s.scaleMove=F.getDistanceBetweenTouches(e)}s.$imageEl&&0!==s.$imageEl.length&&(h.gestures?this.zoom.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.scale<t.minRatio&&(i.scale=t.minRatio+1-Math.pow(t.minRatio-i.scale+1,.5)),s.$imageEl.transform("translate3d(0,0,0) scale("+i.scale+")"))},onGestureEnd:function(e){var t=this.params.zoom,i=this.zoom,s=i.gesture;if(!h.gestures){if(!i.fakeGestureTouched||!i.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!y.android)return;i.fakeGestureTouched=!1,i.fakeGestureMoved=!1}s.$imageEl&&0!==s.$imageEl.length&&(i.scale=Math.max(Math.min(i.scale,s.maxRatio),t.minRatio),s.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale("+i.scale+")"),i.currentScale=i.scale,i.isScaling=!1,1===i.scale&&(s.$slideEl=void 0))},onTouchStart:function(e){var t=this.zoom,i=t.gesture,s=t.image;i.$imageEl&&0!==i.$imageEl.length&&(s.isTouched||(y.android&&e.preventDefault(),s.isTouched=!0,s.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this.zoom,i=t.gesture,s=t.image,a=t.velocity;if(i.$imageEl&&0!==i.$imageEl.length&&(this.allowClick=!1,s.isTouched&&i.$slideEl)){s.isMoved||(s.width=i.$imageEl[0].offsetWidth,s.height=i.$imageEl[0].offsetHeight,s.startX=d.getTranslate(i.$imageWrapEl[0],"x")||0,s.startY=d.getTranslate(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0),this.rtl&&(s.startX=-s.startX,s.startY=-s.startY));var r=s.width*t.scale,n=s.height*t.scale;if(!(r<i.slideWidth&&n<i.slideHeight)){if(s.minX=Math.min(i.slideWidth/2-r/2,0),s.maxX=-s.minX,s.minY=Math.min(i.slideHeight/2-n/2,0),s.maxY=-s.minY,s.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!s.isMoved&&!t.isScaling){if(this.isHorizontal()&&(Math.floor(s.minX)===Math.floor(s.startX)&&s.touchesCurrent.x<s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&&s.touchesCurrent.x>s.touchesStart.x))return void(s.isTouched=!1);if(!this.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.y<s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&&s.touchesCurrent.y>s.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.currentX<s.minX&&(s.currentX=s.minX+1-Math.pow(s.minX-s.currentX+1,.8)),s.currentX>s.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentY<s.minY&&(s.currentY=s.minY+1-Math.pow(s.minY-s.currentY+1,.8)),s.currentY>s.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)"),t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0,e.scale=1,e.currentScale=1)},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,o=r*b.scale,n<c&&(n=c),n>v&&(n=v),o<u&&(o=u),o>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||!h.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1};h.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,t),this.$wrapperEl.on(this.touchEvents.end,".swiper-slide",e.onGestureEnd,t)),this.$wrapperEl.on(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove)}},disable:function(){var e=this.zoom;if(e.enabled){this.zoom.enabled=!1;var t=!("touchstart"!==this.touchEvents.start||!h.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1};h.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,t),this.$wrapperEl.off(this.touchEvents.end,".swiper-slide",e.onGestureEnd,t)),this.$wrapperEl.off(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove)}}},W={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(void 0!==i&&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;p<r+l;p+=1)d(p)&&e.lazy.loadInSlide(p);else e.lazy.loadInSlide(r);if(o.loadPrevNext)if(l>1||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;m<v;m+=1)d(m)&&e.lazy.loadInSlide(m);for(var g=f;g<r;g+=1)d(g)&&e.lazy.loadInSlide(g)}else{var b=t.children("."+i.slideNextClass);b.length>0&&e.lazy.loadInSlide(h(b));var w=t.children("."+i.slidePrevClass);w.length>0&&e.lazy.loadInSlide(h(w))}}},q={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 q.LinearSpline(this.slidesGrid,e.slidesGrid):new q.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;o<r.length;o+=1)r[o]!==t&&r[o]instanceof k&&n(r[o]);else r instanceof k&&t!==r&&n(r)},setTransition:function(e,t){var i,s=this,a=s.controller.control;function r(t){t.setTransition(e,s),0!==e&&(t.transitionStart(),t.$wrapperEl.transitionEnd(function(){a&&(t.params.loop&&"slide"===s.params.controller.by&&t.loopFix(),t.transitionEnd())}))}if(Array.isArray(a))for(i=0;i<a.length;i+=1)a[i]!==t&&a[i]instanceof k&&r(a[i]);else a instanceof k&&t!==a&&r(a)}},j={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},addElRole:function(e,t){return e.attr("role",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){var t=this.params.a11y;if(13===e.keyCode){var i=s(e.target);this.navigation&&this.navigation.$nextEl&&i.is(this.navigation.$nextEl)&&(this.isEnd&&!this.params.loop||this.slideNext(),this.isEnd?this.a11y.notify(t.lastSlideMessage):this.a11y.notify(t.nextSlideMessage)),this.navigation&&this.navigation.$prevEl&&i.is(this.navigation.$prevEl)&&(this.isBeginning&&!this.params.loop||this.slidePrev(),this.isBeginning?this.a11y.notify(t.firstSlideMessage):this.a11y.notify(t.prevSlideMessage)),this.pagination&&i.is("."+this.params.pagination.bulletClass)&&i[0].click()}},notify:function(e){var t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation:function(){if(!this.params.loop){var e=this.navigation,t=e.$nextEl,i=e.$prevEl;i&&i.length>0&&(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)}},K={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=K.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=K.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=K.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().toLowerCase().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<a;s+=1){var r=this.slides.eq(s);if(K.slugify(r.attr("data-history"))===t&&!r.hasClass(this.params.slideDuplicateClass)){var n=r.index();this.slideTo(n,e,i)}}else this.slideTo(0,e,i)}},U={onHashCange:function(){var t=e.location.hash.replace("#","");t!==this.slides.eq(this.activeIndex).attr("data-hash")&&this.slideTo(this.$wrapperEl.children("."+this.params.slideClass+'[data-hash="'+t+'"]').index())},setHash:function(){if(this.hashNavigation.initialized&&this.params.hashNavigation.enabled)if(this.params.hashNavigation.replaceState&&t.history&&t.history.replaceState)t.history.replaceState(null,null,"#"+this.slides.eq(this.activeIndex).attr("data-hash")||"");else{var i=this.slides.eq(this.activeIndex),s=i.attr("data-hash")||i.attr("data-history");e.location.hash=s||""}},init:function(){if(!(!this.params.hashNavigation.enabled||this.params.history&&this.params.history.enabled)){this.hashNavigation.initialized=!0;var i=e.location.hash.replace("#","");if(i)for(var a=0,r=this.slides.length;a<r;a+=1){var n=this.slides.eq(a);if((n.attr("data-hash")||n.attr("data-history"))===i&&!n.hasClass(this.params.slideDuplicateClass)){var o=n.index();this.slideTo(o,0,this.params.runCallbacksOnInit,!0)}}this.params.hashNavigation.watchState&&s(t).on("hashchange",this.hashNavigation.onHashCange)}},destroy:function(){this.params.hashNavigation.watchState&&s(t).off("hashchange",this.hashNavigation.onHashCange)}},_={run:function(){var e=this,t=e.slides.eq(e.activeIndex),i=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(i=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),e.autoplay.timeout=d.nextTick(function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay"))},i)},start:function(){return void 0===this.autoplay.timeout&&(!this.autoplay.running&&(this.autoplay.running=!0,this.emit("autoplayStart"),this.autoplay.run(),!0))},stop:function(){return!!this.autoplay.running&&(void 0!==this.autoplay.timeout&&(this.autoplay.timeout&&(clearTimeout(this.autoplay.timeout),this.autoplay.timeout=void 0),this.autoplay.running=!1,this.emit("autoplayStop"),!0))},pause:function(e){this.autoplay.running&&(this.autoplay.paused||(this.autoplay.timeout&&clearTimeout(this.autoplay.timeout),this.autoplay.paused=!0,0!==e&&this.params.autoplay.waitForTransition?(this.$wrapperEl[0].addEventListener("transitionend",this.autoplay.onTransitionEnd),this.$wrapperEl[0].addEventListener("webkitTransitionEnd",this.autoplay.onTransitionEnd)):(this.autoplay.paused=!1,this.autoplay.run())))}},Z={setTranslate:function(){for(var e=this.slides,t=0;t<e.length;t+=1){var i=this.slides.eq(t),s=-i[0].swiperSlideOffset;this.params.virtualTranslate||(s-=this.translate);var a=0;this.isHorizontal()||(a=s,s=0);var r=this.params.fadeEffect.crossFade?Math.max(1-Math.abs(i[0].progress),0):1+Math.min(Math.max(i[0].progress,-1),0);i.css({opacity:r}).transform("translate3d("+s+"px, "+a+"px, 0px)")}},setTransition:function(e){var t=this,i=t.slides,s=t.$wrapperEl;if(i.transition(e),t.params.virtualTranslate&&0!==e){var a=!1;i.transitionEnd(function(){if(!a&&t&&!t.destroyed){a=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)s.trigger(e[i])}})}}},Q={setTranslate:function(){var e,t=this.$el,i=this.$wrapperEl,a=this.slides,r=this.width,n=this.height,o=this.rtlTranslate,l=this.size,d=this.params.cubeEffect,h=this.isHorizontal(),p=this.virtual&&this.params.virtual.enabled,c=0;d.shadow&&(h?(0===(e=i.find(".swiper-cube-shadow")).length&&(e=s('<div class="swiper-cube-shadow"></div>'),i.append(e)),e.css({height:r+"px"})):0===(e=t.find(".swiper-cube-shadow")).length&&(e=s('<div class="swiper-cube-shadow"></div>'),t.append(e)));for(var u=0;u<a.length;u+=1){var v=a.eq(u),f=u;p&&(f=parseInt(v.attr("data-swiper-slide-index"),10));var m=90*f,g=Math.floor(m/360);o&&(m=-m,g=Math.floor(-m/360));var b=Math.max(Math.min(v[0].progress,1),-1),w=0,y=0,x=0;f%4==0?(w=4*-g*l,x=0):(f-1)%4==0?(w=0,x=4*-g*l):(f-2)%4==0?(w=l+4*g*l,x=l):(f-3)%4==0&&(w=-l,x=3*l+4*l*g),o&&(w=-w),h||(y=w,w=0);var E="rotateX("+(h?0:-m)+"deg) rotateY("+(h?m:0)+"deg) translate3d("+w+"px, "+y+"px, "+x+"px)";if(b<=1&&b>-1&&(c=90*f+90*b,o&&(c=90*-f-90*b)),v.transform(E),d.slideShadows){var T=h?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),C=h?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===T.length&&(T=s('<div class="swiper-slide-shadow-'+(h?"left":"top")+'"></div>'),v.append(T)),0===C.length&&(C=s('<div class="swiper-slide-shadow-'+(h?"right":"bottom")+'"></div>'),v.append(C)),T.length&&(T[0].style.opacity=Math.max(-b,0)),C.length&&(C[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 M=Math.abs(c)-90*Math.floor(Math.abs(c)/90),z=1.5-(Math.sin(2*M*Math.PI/360)/2+Math.cos(2*M*Math.PI/360)/2),k=d.shadowScale,P=d.shadowScale/z,$=d.shadowOffset;e.transform("scale3d("+k+", 1, "+P+") translate3d(0px, "+(n/2+$)+"px, "+-n/2/P+"px) rotateX(-90deg)")}var L=S.isSafari||S.isUiWebView?-l/2:0;i.transform("translate3d(0px,0,"+L+"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)}},J={setTranslate:function(){for(var e=this.slides,t=this.rtlTranslate,i=0;i<e.length;i+=1){var a=e.eq(i),r=a[0].progress;this.params.flipEffect.limitRotation&&(r=Math.max(Math.min(a[0].progress,1),-1));var n=-180*r,o=0,l=-a[0].swiperSlideOffset,d=0;if(this.isHorizontal()?t&&(n=-n):(d=l,l=0,o=-n,n=0),a[0].style.zIndex=-Math.abs(Math.round(r))+e.length,this.params.flipEffect.slideShadows){var h=this.isHorizontal()?a.find(".swiper-slide-shadow-left"):a.find(".swiper-slide-shadow-top"),p=this.isHorizontal()?a.find(".swiper-slide-shadow-right"):a.find(".swiper-slide-shadow-bottom");0===h.length&&(h=s('<div class="swiper-slide-shadow-'+(this.isHorizontal()?"left":"top")+'"></div>'),a.append(h)),0===p.length&&(p=s('<div class="swiper-slide-shadow-'+(this.isHorizontal()?"right":"bottom")+'"></div>'),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<e.length;i+=1)a.trigger(e[i])}})}}},ee={setTranslate:function(){for(var e=this.width,t=this.height,i=this.slides,a=this.$wrapperEl,r=this.slidesSizesGrid,n=this.params.coverflowEffect,o=this.isHorizontal(),l=this.translate,d=o?e/2-l:t/2-l,p=o?n.rotate:-n.rotate,c=n.depth,u=0,v=i.length;u<v;u+=1){var f=i.eq(u),m=r[u],g=(d-f[0].swiperSlideOffset-m/2)/m*n.modifier,b=o?p*g:0,w=o?0:p*g,y=-c*Math.abs(g),x=o?0:n.stretch*g,E=o?n.stretch*g:0;Math.abs(E)<.001&&(E=0),Math.abs(x)<.001&&(x=0),Math.abs(y)<.001&&(y=0),Math.abs(b)<.001&&(b=0),Math.abs(w)<.001&&(w=0);var T="translate3d("+E+"px,"+x+"px,"+y+"px) rotateX("+w+"deg) rotateY("+b+"deg)";if(f.transform(T),f[0].style.zIndex=1-Math.abs(Math.round(g)),n.slideShadows){var S=o?f.find(".swiper-slide-shadow-left"):f.find(".swiper-slide-shadow-top"),C=o?f.find(".swiper-slide-shadow-right"):f.find(".swiper-slide-shadow-bottom");0===S.length&&(S=s('<div class="swiper-slide-shadow-'+(o?"left":"top")+'"></div>'),f.append(S)),0===C.length&&(C=s('<div class="swiper-slide-shadow-'+(o?"right":"bottom")+'"></div>'),f.append(C)),S.length&&(S[0].style.opacity=g>0?g:0),C.length&&(C[0].style.opacity=-g>0?-g:0)}}(h.pointerEvents||h.prefixedPointerEvents)&&(a[0].style.perspectiveOrigin=d+"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)}},te=[P,$,L,I,O,G,N,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){d.extend(this,{mousewheel:{enabled:!1,enable:B.enable.bind(this),disable:B.disable.bind(this),handle:B.handle.bind(this),handleMouseEnter:B.handleMouseEnter.bind(this),handleMouseLeave:B.handleMouseLeave.bind(this),lastScrollTime:d.now()}})},on:{init:function(){this.params.mousewheel.enabled&&this.mousewheel.enable()},destroy:function(){this.mousewheel.enabled&&this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){d.extend(this,{navigation:{init:X.init.bind(this),update:X.update.bind(this),destroy:X.destroy.bind(this)}})},on:{init:function(){this.navigation.init(),this.navigation.update()},toEdge:function(){this.navigation.update()},fromEdge:function(){this.navigation.update()},destroy:function(){this.navigation.destroy()},click:function(e){var t=this.navigation,i=t.$nextEl,a=t.$prevEl;!this.params.navigation.hideOnClick||s(e.target).is(a)||s(e.target).is(i)||(i&&i.toggleClass(this.params.navigation.hiddenClass),a&&a.toggleClass(this.params.navigation.hiddenClass))}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",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",lockClass:"swiper-pagination-lock"}},create:function(){d.extend(this,{pagination:{init:Y.init.bind(this),render:Y.render.bind(this),update:Y.update.bind(this),destroy:Y.destroy.bind(this),dynamicBulletIndex:0}})},on:{init:function(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange:function(){this.params.loop?this.pagination.update():void 0===this.snapIndex&&this.pagination.update()},snapIndexChange:function(){this.params.loop||this.pagination.update()},slidesLengthChange:function(){this.params.loop&&(this.pagination.render(),this.pagination.update())},snapGridLengthChange:function(){this.params.loop||(this.pagination.render(),this.pagination.update())},destroy:function(){this.pagination.destroy()},click:function(e){this.params.pagination.el&&this.params.pagination.hideOnClick&&this.pagination.$el.length>0&&!s(e.target).hasClass(this.params.pagination.bulletClass)&&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(){d.extend(this,{scrollbar:{init:V.init.bind(this),destroy:V.destroy.bind(this),updateSize:V.updateSize.bind(this),setTranslate:V.setTranslate.bind(this),setTransition:V.setTransition.bind(this),enableDraggable:V.enableDraggable.bind(this),disableDraggable:V.disableDraggable.bind(this),setDragPosition:V.setDragPosition.bind(this),onDragStart:V.onDragStart.bind(this),onDragMove:V.onDragMove.bind(this),onDragEnd:V.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(){d.extend(this,{parallax:{setTransform:R.setTransform.bind(this),setTranslate:R.setTranslate.bind(this),setTransition:R.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0)},init:function(){this.params.parallax&&this.parallax.setTranslate()},setTranslate:function(){this.params.parallax&&this.parallax.setTranslate()},setTransition:function(e){this.params.parallax&&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]=F[i].bind(e)}),d.extend(e,{zoom: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()}}},{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(){d.extend(this,{lazy:{initialImageLoaded:!1,load:W.load.bind(this),loadInSlide:W.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()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){d.extend(this,{controller:{control:this.params.controller.control,getInterpolateFunction:q.getInterpolateFunction.bind(this),setTranslate:q.setTranslate.bind(this),setTransition:q.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;d.extend(e,{a11y:{liveRegion:s('<span class="'+e.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')}}),Object.keys(j).forEach(function(t){e.a11y[t]=j[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(){d.extend(this,{history:{init:K.init.bind(this),setHistory:K.setHistory.bind(this),setHistoryPopState:K.setHistoryPopState.bind(this),scrollToSlide:K.scrollToSlide.bind(this),destroy:K.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)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){d.extend(this,{hashNavigation:{initialized:!1,init:U.init.bind(this),destroy:U.destroy.bind(this),setHash:U.setHash.bind(this),onHashCange:U.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()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var e=this;d.extend(e,{autoplay:{running:!1,paused:!1,run:_.run.bind(e),start:_.start.bind(e),stop:_.stop.bind(e),pause:_.pause.bind(e),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()},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())},destroy:function(){this.autoplay.running&&this.autoplay.stop()}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){d.extend(this,{fadeEffect:{setTranslate:Z.setTranslate.bind(this),setTransition:Z.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};d.extend(this.params,e),d.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(){d.extend(this,{cubeEffect:{setTranslate:Q.setTranslate.bind(this),setTransition:Q.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};d.extend(this.params,e),d.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(){d.extend(this,{flipEffect:{setTranslate:J.setTranslate.bind(this),setTransition:J.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};d.extend(this.params,e),d.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(){d.extend(this,{coverflowEffect:{setTranslate:ee.setTranslate.bind(this),setTransition:ee.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)}}}];return void 0===k.use&&(k.use=k.Class.use,k.installModule=k.Class.installModule),k.use(te),k});
13
+ //# sourceMappingURL=swiper.min.js.map
assets/vendor/swiper/js/swiper.min.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["swiper.js"],"names":["global","factory","exports","module","define","amd","Swiper","this","doc","document","body","addEventListener","removeEventListener","activeElement","blur","nodeName","querySelector","querySelectorAll","getElementById","createEvent","initEvent","createElement","children","childNodes","style","setAttribute","getElementsByTagName","location","hash","win","window","navigator","userAgent","history","CustomEvent","getComputedStyle","getPropertyValue","Image","Date","screen","setTimeout","clearTimeout","Dom7","arr","i","length","$","selector","context","els","tempParent","html","trim","indexOf","toCreate","innerHTML","push","match","split","nodeType","unique","uniqueArray","fn","prototype","Class","Methods","addClass","className","classes","j","classList","add","removeClass","remove","hasClass","contains","toggleClass","toggle","attr","attrs","value","arguments$1","arguments","getAttribute","attrName","removeAttr","removeAttribute","data","key","el","dom7ElementDataStorage","dataKey","transform","elStyle","webkitTransform","transition","duration","webkitTransitionDuration","transitionDuration","on","assign","args","len","eventType","targetSelector","listener","capture","handleLiveEvent","e","target","eventData","dom7EventData","unshift","is","apply","parents","k","handleEvent","undefined","events","event$1","dom7LiveListeners","proxyListener","event","dom7Listeners","off","handlers","handler","splice","trigger","evt","detail","bubbles","cancelable","filter","dataIndex","dispatchEvent","transitionEnd","callback","dom","fireCallBack","call","outerWidth","includeMargins","styles","offsetWidth","parseFloat","outerHeight","offsetHeight","offset","box","getBoundingClientRect","clientTop","clientLeft","scrollTop","scrollY","scrollLeft","scrollX","top","left","css","props","prop","each","text","textContent","compareWith","matches","webkitMatchesSelector","msMatchesSelector","index","child","previousSibling","eq","returnIndex","append","newChild","tempDiv","firstChild","appendChild","prepend","insertBefore","next","nextElementSibling","nextAll","nextEls","prev","previousElementSibling","prevAll","prevEls","parent","parentNode","closest","find","foundElements","found","removeChild","toAdd","Object","keys","forEach","methodName","testDiv","Utils","deleteProps","obj","object","nextTick","delay","now","getTranslate","axis","matrix","curTransform","transformMatrix","curStyle","WebKitCSSMatrix","map","a","replace","join","MozTransform","OTransform","MsTransform","msTransform","toString","m41","m42","parseUrlQuery","url","params","param","query","urlToParse","href","paramsPart","decodeURIComponent","isObject","o","constructor","extend","len$1","to","nextSource","keysArray","nextIndex","nextKey","desc","getOwnPropertyDescriptor","enumerable","Support","touch","Modernizr","DocumentTouch","pointerEvents","pointerEnabled","PointerEvent","prefixedPointerEvents","msPointerEnabled","transforms3d","csstransforms3d","flexbox","observer","passiveListener","supportsPassive","opts","defineProperty","get","gestures","SwiperClass","self","eventsListeners","eventName","staticAccessors","components","configurable","priority","method","once","onceHandler","eventHandler","emit","Array","isArray","slice","useModulesParams","instanceParams","instance","modules","moduleName","useModules","modulesParams","moduleParams","modulePropName","moduleProp","bind","moduleEventName","create","set","use","installModule","name","proto","static","install","m","concat","defineProperties","update","updateSize","width","height","$el","clientWidth","clientHeight","isHorizontal","isVertical","parseInt","size","updateSlides","$wrapperEl","swiperSize","rtl","rtlTranslate","wrongRTL","isVirtual","virtual","enabled","previousSlidesLength","slides","slidesLength","snapGrid","slidesGrid","slidesSizesGrid","offsetBefore","slidesOffsetBefore","offsetAfter","slidesOffsetAfter","previousSnapGridLength","previousSlidesGridLength","spaceBetween","slidePosition","prevSlideSize","slidesNumberEvenToRows","slideSize","virtualSize","marginLeft","marginTop","marginRight","marginBottom","slidesPerColumn","Math","floor","ceil","slidesPerView","slidesPerColumnFill","max","newSlidesGrid","slidesPerRow","numFullColumns","slide","newSlideOrderIndex","column","row","-webkit-box-ordinal-group","-moz-box-ordinal-group","-ms-flex-order","-webkit-order","order","slideStyles","currentTransform","currentWebKitTransform","roundLengths","swiperSlideSize","centeredSlides","abs","slidesPerGroup","effect","setWrapperSize","i$1","slidesGridItem","i$2","slidesGridItem$1","watchOverflow","checkOverflow","watchSlidesProgress","watchSlidesVisibility","updateSlidesOffset","updateAutoHeight","speed","activeSlides","newHeight","setTransition","activeIndex","swiperSlideOffset","offsetLeft","offsetTop","updateSlidesProgress","translate","offsetCenter","slideVisibleClass","slideProgress","minTranslate","slideBefore","slideAfter","progress","updateProgress","translatesDiff","maxTranslate","isBeginning","isEnd","wasBeginning","wasEnd","updateSlidesClasses","activeSlide","realIndex","slideActiveClass","loop","slideDuplicateClass","slideDuplicateActiveClass","nextSlide","slideNextClass","prevSlide","slidePrevClass","slideDuplicateNextClass","slideDuplicatePrevClass","updateActiveIndex","newActiveIndex","snapIndex","previousIndex","previousRealIndex","previousSnapIndex","normalizeSlideIndex","updateClickedSlide","slideFound","clickedSlide","clickedIndex","slideToClickedSlide","virtualTranslate","currentTranslate","setTranslate","byController","x","y","previousTranslate","transition$1","transitionStart","runCallbacks","direction","autoHeight","dir","animating","slideTo","internal","swiper","slideIndex","preventIntercationOnTransition","initialSlide","initialized","allowSlideNext","allowSlidePrev","onSlideToWrapperTransitionEnd","destroyed","slideToLoop","newIndex","loopedSlides","slideNext","loopFix","_clientLeft","slidePrev","normalize","val","prevIndex","normalizedTranslate","normalizedSnapGrid","prevSnap","slideReset","slideToClosest","currentSnap","slidesPerViewDynamic","slideToIndex","loopCreate","loopFillGroupWithBlank","blankSlidesNum","blankNode","loopAdditionalSlides","prependSlides","appendSlides","cloneNode","diff","loopDestroy","grabCursor","setGrabCursor","moving","simulateTouch","isLocked","cursor","unsetGrabCursor","manipulation","appendSlide","prependSlide","addSlide","activeIndexBuffer","baseLength","slidesBuffer","currentSlide","removeSlide","slidesIndexes","indexToRemove","removeAllSlides","Device","ua","device","ios","android","androidChrome","desktop","windows","iphone","ipod","ipad","cordova","phonegap","os","osVersion","toLowerCase","webView","osVersionArr","metaViewport","minimalUi","pixelRatio","devicePixelRatio","onResize","breakpoints","setBreakpoint","freeMode","newTranslate","min","attachEvents","touchEvents","wrapperEl","onTouchStart","touchEventsData","touches","originalEvent","isTouchEvent","type","which","isTouched","isMoved","noSwiping","noSwipingSelector","allowClick","swipeHandler","currentX","targetTouches","pageX","currentY","pageY","startX","startY","iOSEdgeSwipeDetection","iOSEdgeSwipeThreshold","allowTouchCallbacks","isScrolling","startMoving","touchStartTime","swipeDirection","threshold","allowThresholdMove","preventDefault","formElements","allowTouchMove","onTouchMove","preventedByNestedSwiper","touchReleaseOnEdges","touchAngle","diffX","diffY","atan2","PI","touchMoveStopPropagation","nested","stopPropagation","startTranslate","allowMomentumBounce","touchRatio","disableParentSwiper","resistanceRatio","resistance","pow","followFinger","velocities","position","time","onTouchEnd","currentPos","touchEndTime","timeDiff","lastClickTime","clickTimeout","freeModeMomentum","lastMoveEvent","pop","velocityEvent","distance","velocity","freeModeMinimumVelocity","freeModeMomentumVelocityRatio","momentumDuration","freeModeMomentumRatio","momentumDistance","newPosition","afterBouncePosition","needsLoopFix","doBounce","bounceAmount","freeModeMomentumBounceRatio","freeModeMomentumBounce","freeModeSticky","longSwipesMs","stopIndex","groupSize","ratio","longSwipes","longSwipesRatio","shortSwipes","onClick","preventClicks","preventClicksPropagation","stopImmediatePropagation","touchEventsTarget","start","passiveListeners","passive","move","end","detachEvents","breakpoint","getBreakpoint","currentBreakpoint","breakPointsParams","originalParams","needsReLoop","points","point","sort","b","innerWidth","Browser","isIE","isSafari","isUiWebView","test","defaults","init","uniqueNavElements","preloadImages","updateOnImagesReady","noSwipingClass","containerModifierClass","slideClass","slideBlankClass","wrapperClass","runCallbacksOnInit","prototypes","wasLocked","navigation","addClasses","classNames","suffixes","suffix","removeClasses","images","loadImage","imageEl","src","srcset","sizes","checkForComplete","image","onReady","complete","onload","onerror","imagesLoaded","imagesToLoad","currentSrc","extendedDefaults","SwiperClass$$1","prototypeGroup","protoMethod","moduleParamName","swiperParams","passedParams","swipers","containerEl","newParams","touchEventsTouch","touchEventsDesktop","__proto__","spv","breakLoop","translateValue","destroy","deleteInstance","cleanStyles","extendDefaults","newDefaults","Device$1","Support$1","support","Browser$1","browser","Resize","resize","resizeHandler","orientationChangeHandler","Observer","func","MutationObserver","WebkitMutationObserver","attach","options","ObserverFunc","mutations","mutation","observe","attributes","childList","characterData","observers","observeParents","containerParents","disconnect","Observer$1","Virtual","force","ref","ref$1","previousFrom","from","previousTo","previousSlidesGrid","renderSlide","previousOffset","offsetProp","slidesAfter","slidesBefore","onRendered","lazy","load","renderExternal","slidesToRender","prependIndexes","appendIndexes","cache","$slideEl","newCache","cachedIndex","Virtual$1","beforeInit","overwriteParams","Keyboard","handle","kc","keyCode","charCode","shiftKey","altKey","ctrlKey","metaKey","keyboard","onlyInViewport","inView","windowWidth","windowHeight","innerHeight","swiperOffset","swiperCoord","returnValue","enable","disable","Keyboard$1","Mousewheel","lastScrollTime","isSupported","element","implementation","hasFeature","isEventSupported","sX","sY","pX","pY","wheelDelta","wheelDeltaY","wheelDeltaX","HORIZONTAL_AXIS","deltaY","deltaX","deltaMode","spinX","spinY","pixelX","pixelY","handleMouseEnter","mouseEntered","handleMouseLeave","mousewheel","releaseOnEdges","delta","rtlFactor","forceToAxis","invert","sensitivity","timeout","autoplay","autoplayDisableOnInteraction","stop","getTime","eventsTarged","Navigation","$nextEl","$prevEl","disabledClass","lockClass","nextEl","prevEl","Pagination","pagination","current","total","paginationType","bullets","firstIndex","lastIndex","midIndex","dynamicBullets","bulletSize","dynamicMainBullets","dynamicBulletIndex","bullet","$bullet","bulletIndex","bulletActiveClass","$firstDisplayedBullet","$lastDisplayedBullet","dynamicBulletsLength","bulletsOffset","formatFractionCurrent","formatFractionTotal","progressbarDirection","progressbarOpposite","scale","scaleX","scaleY","renderCustom","render","paginationHTML","numberOfBullets","renderBullet","bulletClass","renderFraction","currentClass","totalClass","renderProgressbar","progressbarFillClass","clickable","clickableClass","modifierClass","progressbarOppositeClass","hiddenClass","Scrollbar","scrollbar","dragSize","trackSize","$dragEl","newSize","newPos","hide","opacity","divider","moveDivider","display","scrollbarHide","setDragPosition","positionRatio","clientX","clientY","onDragStart","dragTimeout","onDragMove","onDragEnd","snapOnRelease","enableDraggable","activeListener","disableDraggable","$swiperEl","dragEl","draggable","Parallax","setTransform","p","currentOpacity","currentScale","parallax","slideEl","parallaxEl","$parallaxEl","parallaxDuration","Zoom","getDistanceBetweenTouches","x1","y1","x2","y2","sqrt","onGestureStart","zoom","gesture","fakeGestureTouched","fakeGestureMoved","scaleStart","$imageEl","$imageWrapEl","maxRatio","isScaling","onGestureChange","scaleMove","minRatio","onGestureEnd","changedTouches","touchesStart","slideWidth","slideHeight","scaledWidth","scaledHeight","minX","maxX","minY","maxY","touchesCurrent","prevPositionX","prevPositionY","prevTime","momentumDurationX","momentumDurationY","momentumDistanceX","newPositionX","momentumDistanceY","newPositionY","onTransitionEnd","out","in","touchX","touchY","translateX","translateY","imageWidth","imageHeight","translateMinX","translateMinY","translateMaxX","translateMaxY","Lazy","loadInSlide","loadInDuplicate","$images","elementClass","loadedClass","loadingClass","imageIndex","background","slideOriginalIndex","originalSlide","duplicatedSlide","slideExist","initialImageLoaded","elIndex","loadPrevNext","loadPrevNextAmount","amount","maxIndex","minIndex","Controller","LinearSpline","guess","i1","i3","binarySearch","array","interpolate","getInterpolateFunction","c","controller","spline","setTranslate$1","multiplier","controlledTranslate","controlled","control","setControlledTranslate","by","inverse","setControlledTransition","a11y","makeElFocusable","addElRole","role","addElLabel","label","disableEl","enableEl","onEnterKey","$targetEl","notify","lastSlideMessage","nextSlideMessage","firstSlideMessage","prevSlideMessage","click","message","notification","liveRegion","updateNavigation","updatePagination","bulletEl","$bulletEl","paginationBulletMessage","History","pushState","hashNavigation","paths","getPathValues","scrollToSlide","replaceState","setHistoryPopState","pathArray","pathname","part","setHistory","slugify","includes","currentState","state","HashNavigation","onHashCange","newHash","setHash","watchState","Autoplay","run","$activeSlideEl","reverseDirection","stopOnLastSlide","running","pause","paused","waitForTransition","Fade","tx","ty","slideOpacity","fadeEffect","crossFade","eventTriggered","triggerEvents","Cube","$cubeShadowEl","swiperWidth","swiperHeight","cubeEffect","wrapperRotate","shadow","slideAngle","round","tz","slideShadows","shadowBefore","shadowAfter","-webkit-transform-origin","-moz-transform-origin","-ms-transform-origin","transform-origin","shadowOffset","shadowAngle","sin","cos","scale1","shadowScale","scale2","zFactor","Flip","flipEffect","limitRotation","rotateY","rotateX","zIndex","Coverflow","coverflowEffect","center","rotate","depth","offsetMultiplier","modifier","translateZ","stretch","slideTransform","$shadowBeforeEl","$shadowAfterEl","perspectiveOrigin","hideOnClick","toEdge","fromEdge","bulletElement","number","activeIndexChange","snapIndexChange","slidesLengthChange","snapGridLengthChange","dragClass","observerUpdate","containerClass","zoomedSlideClass","touchStart","touchEnd","doubleTap","loadOnTransitionStart","preloaderClass","scroll","scrollbarDragMove","notificationClass","paginationUpdate","disableOnInteraction","beforeTransitionStart","sliderFirstMove"],"mappings":";;;;;;;;;;;CAYC,SAAUA,EAAQC,GACE,iBAAZC,SAA0C,oBAAXC,OAAyBA,OAAOD,QAAUD,IAC9D,mBAAXG,QAAyBA,OAAOC,IAAMD,OAAOH,GACnDD,EAAOM,OAASL,IAHnB,CAIEM,KAAM,WAAe,aAarB,IA0CIC,EAzCoB,oBAAbC,UAEPC,QACAC,iBAAkB,aAClBC,oBAAqB,aACrBC,eACEC,KAAM,aACNC,SAAU,IAEZC,cAAe,WACb,OAAO,MAETC,iBAAkB,WAChB,UAEFC,eAAgB,WACd,OAAO,MAETC,YAAa,WACX,OACEC,UAAW,eAGfC,cAA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