1window.wp=window.wp||{},window.wp["./assets/js/frontend.blocks"]=function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},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=546)}({13:function(t,e){function i(t){return(i="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})(t)}function n(e){return"function"==typeof Symbol&&"symbol"===i(Symbol.iterator)?t.exports=n=function(t){return i(t)}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":i(t)},n(e)}t.exports=n},23:function(t,e,i){"use strict";function n(t,e,i){var n=function(t){var e={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(var i in e)if(void 0!==t.style[i])return e[i]}(document.createElement("div")),o=void 0!==e.animation?e.animation:"",a=void 0!==e.duration?e.duration:"1s",d=void 0!==e.delay?e.delay:"0s";return t.css({"animation-duration":a,"animation-delay":d,"-webkit-animation-delay":d}),t.addClass("animated "+o).one(n,function(){jQuery(this).removeClass("animated "+o),"function"==typeof i&&i()}),this}e.a=n},28:function(t,e,i){function n(t){return o(t)||a(t)||d()}var o=i(32),a=i(31),d=i(33);t.exports=n},31:function(t,e){function i(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}t.exports=i},32:function(t,e){function i(t){if(Array.isArray(t))return t}t.exports=i},33:function(t,e){function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}t.exports=i},546:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i(547)},547:function(t,e,i){"use strict";i(548)},548:function(t,e,i){"use strict";var n=(i(549),i(550)),o=(i.n(n),i(551)),a=(i.n(o),i(552)),d=(i.n(a),i(553)),s=(i.n(d),i(554),i(555),i(556)),c=(i.n(s),i(557),i(558),i(559)),r=(i.n(c),i(560)),l=(i.n(r),i(561)),u=(i.n(l),i(562)),p=(i.n(u),i(563)),w=(i.n(p),i(564)),f=(i.n(w),i(565)),g=(i.n(f),i(566)),m=(i.n(g),i(567),i(568),i(569)),h=(i.n(m),i(570));i.n(h)},549:function(t,e,i){"use strict";var n=i(23);/*! 2 * getwid-icon 3 */ 4!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-icon:not(.getwid-init)").each(function(e,i){t(i).addClass("getwid-init"),t(".getwid-animation.wp-block-getwid-icon__wrapper").on("mouseenter",function(){Object(n.a)(t(this),{animation:t(this).attr("data-animation")})})})};i()})}(jQuery)},550:function(t,e){/*! 5 * getwid-section 6 */ 7!function(t){t(document).ready(function(e){function i(){var t=document.createElement("script");t.type="text/javascript",t.src="https://www.youtube.com/iframe_api",t.id="youtube_video_api_js";var e=!1;document.getElementsByTagName("head")[0].appendChild(t),t.onload=t.onreadystatechange=function(){e||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e=!0,t.onload=t.onreadystatechange=null)}}function n(t){var e=/(?:https?:\/\/)?(?:www\.)?(?:youtube(?:-nocookie)?\.com\/\S*(?:(?:\/e(?:mbed))?\/v?|(?:watch\?)?(?:\S*?&?vi?\=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/;return!!t.match(e)&&RegExp.$1}function o(){void 0===window.onYouTubeIframeAPIReady?window.onYouTubeIframeAPIReady=function(){getwidYT.init()}:d=setInterval(function(){void 0!==window.YT&&window.YT.loaded&&(getwidYT.ready||getwidYT.init())})}var a,d=!1,s=t(".wp-block-getwid-section__background-video.source-youtube .wp-block-getwid-section__background-video-youtube");window.getwidYT={data:{ready:!1},init:function(){getwidYT.data.ready=!0,clearInterval(d),s.each(function(e){var i=t(this).attr("id"),n=t(this).parent().attr("youtube-video-autoplay"),o=t(this).parent().attr("youtube-video-loop"),a=t(this).parent().attr("youtube-video-muted"),d=t(this).closest(".wp-block-getwid-section__wrapper").find(".getwid-background-video-controls .getwid-background-video-play"),c=t(this).closest(".wp-block-getwid-section__wrapper").find(".getwid-background-video-controls .getwid-background-video-mute");window.YT.ready(function(){var r={playsinline:1,autoplay:"true"==n?1:0,controls:0,disablekb:1,fs:0,cc_load_policy:0,iv_load_policy:3,loop:"true"==o?1:0,modestbranding:1,rel:0,showinfo:0,enablejsapi:1,mute:"true"==a?1:0,autohide:1};"true"==o&&(r.playlist=i);new YT.Player(s[e],{playerVars:r,height:"100%",width:"100%",videoId:i,events:{onReady:function(e){var i=e.target;"true"==n?d.html('<i class="getwid-icon getwid-icon-pause"></i>'):"false"==n&&d.html('<i class="getwid-icon getwid-icon-play"></i>'),"true"==a?c.html('<i class="getwid-icon getwid-icon-mute"></i>'):"false"==a&&c.html('<i class="getwid-icon getwid-icon-volume-up"></i>'),t(d).on("click",function(t){"true"==n?(i.pauseVideo(),d.html('<i class="getwid-icon getwid-icon-play"></i>'),n="false"):"false"==n&&(i.playVideo(),d.html('<i class="getwid-icon getwid-icon-pause"></i>'),n="true")}),t(c).on("click",function(t){"true"==a?(i.unMute(),c.html('<i class="getwid-icon getwid-icon-volume-up"></i>'),a="false"):"false"==a&&(i.mute(),c.html('<i class="getwid-icon getwid-icon-mute"></i>'),a="true")}),"true"==n&&i.playVideo()},onStateChange:function(t){-1==t.data&&(d.html('<i class="getwid-icon getwid-icon-play"></i>'),n="false"),1==t.data&&(d.html('<i class="getwid-icon getwid-icon-pause"></i>'),n="true"),2==t.data&&(d.html('<i class="getwid-icon getwid-icon-play"></i>'),n="false"),3==t.data&&(d.html('<i class="getwid-icon getwid-icon-pause"></i>'),n="true"),0==t.data&&"false"==o&&(t.target.stopVideo(),d.html('<i class="getwid-icon getwid-icon-play"></i>'),n="false")}}})})})}},t(document.body).on("post-load",function(t){c(),r(),l(),u()});var c=function(){a=t(".wp-block-getwid-section__background-video.source-youtube .wp-block-getwid-section__background-video-youtube:not(.getwid-init)"),a.each(function(e){t(this).addClass("getwid-init");var i=n(t(this).parent().attr("youtube-video-url"));t(this).attr("id",i)}),a.length&&(t("#youtube_video_api_js").length||(i(),o()))},r=function(){var e,i,n,o,a,d,s=t(".wp-block-getwid-section__background-slider:not(.getwid-init)");s.length&&"undefined"!=typeof imagesLoaded&&s.each(function(s){d=t(this),e=1==d.data("autoplay"),i=parseInt(d.data("autoplay-speed")),n="fade"==d.data("slide-effect"),o=parseInt(d.data("slide-speed")),a=1==d.data("infinite"),t(this).addClass("getwid-init"),d.imagesLoaded().done(function(d){t(d.elements[0]).slick({arrows:!1,dots:!1,rows:0,slidesToShow:1,slidesToScroll:1,autoplay:e,autoplaySpeed:i,fade:n,speed:o,infinite:a,rtl:!!Getwid.isRTL})})})},l=function(){if("undefined"!=typeof WOW){new WOW({boxClass:"getwid-anim",mobile:!1}).init()}},u=function(){t(".wp-block-getwid-section:not(.getwid-init)").each(function(e){t(this).addClass("getwid-init");var i=t(this),n=i.find(".wp-block-getwid-section__background-video.source-media-library").get(0),o=i.find(".getwid-background-video-play"),a=i.find(".getwid-background-video-mute");i.find(".wp-block-getwid-section__background-video.source-media-library").on("play",function(t){o.html('<i class="getwid-icon getwid-icon-pause"></i>')}).on("pause",function(t){o.html('<i class="getwid-icon getwid-icon-play"></i>')}),i.on("click",".getwid-background-video-play",function(t){t.preventDefault(),n&&(n.paused?n.play():n.pause())}),i.ready(function(){n&&(n.paused?o.html('<i class="getwid-icon getwid-icon-play"></i>'):o.html('<i class="getwid-icon getwid-icon-pause"></i>'),n.muted?a.html('<i class="getwid-icon getwid-icon-mute"></i>'):a.html('<i class="getwid-icon getwid-icon-volume-up"></i>'))}),i.on("click",".getwid-background-video-mute",function(t){t.preventDefault(),n&&(n.muted=!n.muted,n.muted?a.html('<i class="getwid-icon getwid-icon-mute"></i>'):a.html('<i class="getwid-icon getwid-icon-volume-up"></i>'))})})};c(),r(),l(),u()})}(jQuery)},551:function(t,e){/*! 8 * getwid-tabs 9 */ 10!function(t){t(document).ready(function(e){function i(t){for(var e="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=i.length,o=0;o<t;
10o++)e+=i.charAt(Math.floor(Math.random()*n));return e}t(document.body).on("post-load",function(t){n()});var n=function(){var e=t(".wp-block-getwid-tabs:not(.getwid-init)"),n=0;e.each(function(e){var o=i(5);t(this).addClass("getwid-init"),n=t(this).data("active-tab");t(this).find(".wp-block-getwid-tabs__nav-links");t(this).find(".wp-block-getwid-tabs__nav-link").each(function(e,i){t(i).find("a").attr("href","#tab-".concat(o,"-").concat(e))}),t(this).find(".wp-block-getwid-tabs__tab-content-wrapper, > .wp-block-getwid-tabs__tab-content").each(function(e,i){t(i).attr("id","tab-".concat(o,"-").concat(e))}),t(this).find(".wp-block-getwid-tabs__nav-link").each(function(e,i){var n=t(i).closest(".wp-block-getwid-tabs").find(">.wp-block-getwid-tabs__nav-links");t(i).detach(),n.append(i);var o={};t.each(t(i)[0].attributes,function(t,e){o[e.nodeName]=e.nodeValue}),t(i).replaceWith(function(){return t("<li/>",o).append(t(i).contents())})}),t(this).find(".wp-block-getwid-tabs__tab-content-wrapper").eq(n).addClass("is-active-tab"),t(this).tabs({active:n,activate:function(e,i){i.newPanel.closest(".wp-block-getwid-tabs").find(".wp-block-getwid-tabs__tab-content-wrapper").removeClass("is-active-tab"),i.newPanel.addClass("is-active-tab"),t("html, body").add(window,document).stop()}})})};n()})}(jQuery)},552:function(t,e){/*! 11 * getwid-accordion 12 */ 13!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){var e=t(".wp-block-getwid-accordion:not(.getwid-init)"),i=0;e.each(function(e,n){t(this).addClass("getwid-init"),i="none"!=t(this).data("active-element")&&parseInt(t(this).data("active-element"),10),t(n).accordion({icons:!1,animate:!1,collapsible:!0,active:i,heightStyle:"content",create:function(t,e){},activate:function(e,i){if(i.newPanel.length){var n=i.newPanel.find(".wp-block-getwid-accordion__content").outerHeight(!0);n&&t(i.newPanel).animate({height:n},{queue:!1,duration:500,complete:function(){t(this).css("height","")}})}if(i.oldPanel.length){var o=i.oldPanel.find(".wp-block-getwid-accordion__content").outerHeight(!0);o&&(t(i.oldPanel).css("height",o),t(i.oldPanel).animate({height:0},{queue:!1,duration:500,complete:function(){t(this).css("height","")}}))}}})})};i()})}(jQuery)},553:function(t,e){/*! 14 * getwid-toggle 15 */ 16!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-toggle:not(.getwid-init)").each(function(e,i){t(this).addClass("getwid-init"),t(i).find(".wp-block-getwid-toggle__row .wp-block-getwid-toggle__header-wrapper").on("click",function(e){e.preventDefault(),e.stopImmediatePropagation();var i=t(this).parent(),n=i.find(".wp-block-getwid-toggle__content-wrapper").first(),o=i.find(".wp-block-getwid-toggle__content").first().outerHeight(!0);i.hasClass("is-active")?(i.removeClass("is-active"),n.css("height",o),t(n).animate({height:0},{queue:!1,duration:500,complete:function(){t(this).css("height","")}})):(t(n).animate({height:o},{queue:!1,duration:500,complete:function(){t(this).css("height","")}}),i.addClass("is-active"))})})};i()})}(jQuery)},554:function(t,e,i){"use strict";var n=i(23);/*! 17 * getwid-icon-box 18 */ 19!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-icon-box:not(.getwid-init)").each(function(e,i){t(i).addClass("getwid-init"),t(".getwid-animation.wp-block-getwid-icon-box").on("mouseenter",function(){Object(n.a)(t(this).find(".wp-block-getwid-icon-box__icon-wrapper"),{animation:t(this).attr("data-animation")})})})};i()})}(jQuery)},555:function(t,e,i){"use strict";var n=i(23);/*! 20 * getwid-media-text-slider 21 */ 22!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){var e,i,o,a,d,s,c,r,l=t(".wp-block-getwid-media-text-slider:not(.getwid-init) .wp-block-getwid-media-text-slider__content");l.each(function(l){c=t(this),c.closest(".wp-block-getwid-media-text-slider").addClass("getwid-init"),r=void 0!==t(this).closest(".wp-block-getwid-media-text-slider").data("animation"),e=1==c.data("slide-autoplay"),i=1==c.data("slide-pause-on-hover"),o=parseInt(c.data("slide-autoplay-speed")),a="fade"==c.data("slide-effect"),d=parseInt(c.data("slide-speed")),s=1==c.data("infinite"),r&&t(this).find(".wp-block-getwid-media-text-slider-slide .wp-block-getwid-media-text-slider-slide-content__content").css("opacity","0"),c.on("init",function(){r&&t(this).find(".wp-block-getwid-media-text-slider-slide.slick-active .wp-block-getwid-media-text-slider-slide-content__content").css("opacity","1")});var u=!1;
22c.on("beforeChange",function(t,e,i,n){u=i==n}),c.on("afterChange",function(e,i,o){if(!u){r&&t(this).find(".wp-block-getwid-media-text-slider-slide .wp-block-getwid-media-text-slider-slide-content__content").css("opacity","0");var a=t(this).find('.wp-block-getwid-media-text-slider-slide[data-slick-index="'+o+'"]').find(".wp-block-getwid-media-text-slider-slide-content__content");r&&a.length&&Object(n.a)(a,{animation:t(this).closest(".wp-block-getwid-media-text-slider").data("animation"),duration:t(this).closest(".wp-block-getwid-media-text-slider").data("duration"),delay:t(this).closest(".wp-block-getwid-media-text-slider").data("delay")},a.css("opacity","1"))}});var p=t(this).closest(".".concat("wp-block-getwid-media-text-slider")),w=!p.hasClass("has-arrows-none"),f=!p.hasClass("has-dots-none");c.slick({rows:0,slidesToShow:1,slidesToScroll:1,autoplay:e,pauseOnHover:i,autoplaySpeed:o,fade:a,speed:d,infinite:s,arrows:w,dots:f,rtl:!!Getwid.isRTL})})};i()})}(jQuery)},556:function(t,e){/*! 23 * getwid-images-slider 24 */ 25!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){var e,i,n,o,a,d,s,c,r,l,u,p,w,f,g,m,h,_,b,v=t(".wp-block-getwid-images-slider:not(.getwid-init) .wp-block-getwid-images-slider__wrapper");v.length&&"undefined"!=typeof imagesLoaded&&v.each(function(v){e=t(this),e.closest(".wp-block-getwid-images-slider").addClass("getwid-init"),e.imagesLoaded().done(function(e){var v=t(e.elements[0]);i="fade"==v.data("effect"),n=v.data("slides-show")&&"slide"==v.data("effect")?parseInt(v.data("slides-show")):1,o=v.data("slides-show-laptop")?parseInt(v.data("slides-show-laptop")):1,a=v.data("slides-show-tablet")?parseInt(v.data("slides-show-tablet")):1,d=v.data("slides-show-mobile")?parseInt(v.data("slides-show-mobile")):1,s=v.data("slides-scroll")?parseInt(v.data("slides-scroll")):1,c=1==v.data("autoplay"),r=parseInt(v.data("autoplay-speed"))?parseInt(v.data("autoplay-speed")):2e3,l=1==v.data("infinite"),u=parseInt(v.data("animation-speed")),p=1==v.data("center-mode"),w=1==v.data("variable-width"),f=1==v.data("pause-hover"),g="none"!=v.data("arrows"),m="none"!=v.data("dots"),h=v.data("height")?v.data("height"):void 0,_=!!v.data("reset-on-tablet"),b=!!v.data("reset-on-mobile"),t(e.elements[0]).slick({arrows:g,dots:m,rows:0,slidesToShow:n,slidesToScroll:s,autoplay:c,autoplaySpeed:r,fade:i,speed:u,infinite:l,centerMode:p,variableWidth:w,pauseOnHover:f,adaptiveHeight:!0,rtl:!!Getwid.isRTL,responsive:[{breakpoint:991,settings:{slidesToShow:o,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:a,slidesToScroll:1}},{breakpoint:468,settings:{slidesToShow:d,slidesToScroll:1}}]})})})};i()})}(jQuery)},557:function(module,__webpack_exports__,__webpack_require__){"use strict";var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof__=__webpack_require__(13),__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof___default=__webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof__);/*! 26 * getwid-map 27 */ 28!function($){var _this=this;$(document).ready(function(event){function removeAllAttributes(t){var e=$.map(t[0].attributes,function(t){return t.name});$.each(e,function(e,i){"class"!=i&&t.removeAttr(i)})}function mapStyles(mapData){var mapStyle=mapData.mapStyle,customStyle=mapData.customStyle;if("object"==__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_typeof___default()(mapStyle))return null;if("default"!=mapStyle){if("custom"!=mapStyle)return stylesArr[mapStyle];try{return eval(customStyle)}catch(t){if(!(t instanceof SyntaxError))throw t;console.error(t.message)}}}function initMarkers(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.mapMarkers,o=n[e].coords,a=new google.maps.Marker({position:o,map:i,draggable:!1,animation:google.maps.Animation.DROP});n[e].bounce&&setTimeout(function(){return a.setAnimation(google.maps.Animation.BOUNCE)},2e3);var d="";""!=unescape(n[e].description)&&(d="\n\t\t\t\t\t<div class='getwid-poi-info-window'>\n\t\t\t\t\t\t".concat(_unescape(n[e].description),"\n\t\t\t\t\t</div>\n\t\t\t\t")),attachMessage(a,d,n[e].popUpOpen,n[e].popUpMaxWidth)}function attachMessage(t,e,i,n){var o=new google.maps.InfoWindow({content:e,maxWidth:n});i&&""!=o.content&&o.open(t.get("map"),t),google.maps.event.clearInstanceListeners(t),t.addListener("click",function(){""!=o.content&&o.open(t.get("map"),t)})}$(document.body).on("post-load",function(t){getwid_init_map()});var getwid_init_map=function(){var t=$(".wp-block-getwid-map:not(.getwid-init)");"undefined"!=typeof google?t.each(function(t,e){$(_this).addClass("getwid-init"),$(e).find(".wp-block-getwid-map__points").remove();var i=$(e).find(".wp-block-getwid-map__container")[0],n=$(e).data("map-center"),o=$(e).data("map-markers"),a=$(e).data("map-zoom"),d=$(e).data("map-style"),s=$(e).data("custom-style"),c=$(e).data("zoom-control"),r=$(e).data("type-control"),l=$(e).data("interaction"),u=$(e).data("street-view-control"),p=$(e).data("full-screen-control");removeAllAttributes($(e));var w={mapCenter:n,mapZoom:a,interaction:l,mapStyle:d,customStyle:s,zoomControl:c,mapTypeControl:r,streetViewControl:u,fullscreenControl:p,mapMarkers:o},f=new google.maps.Map(i,{center:n,styles:mapStyles(w),gestureHandling:l,zoomControl:c,mapTypeControl:r,streetViewControl:u,fullscreenControl:p,zoom:a});void 0!==o&&o.length&&$.each(o,function(t,e){initMarkers(w,t,f)})}):t.length&&t.each(function(t,e){var i=$(e);i.find(".wp-block-getwid-map__container").remove(),$(i).prepend('<iframe loading="lazy" src="https://www.google.com/maps/embed" style="border:0;" allowfullscreen="" width="100%" height="400px" frameborder="0"></iframe>')})};getwid_init_map()})}(jQuery)}
28,558:function(t,e,i){"use strict";var n=i(23);/*! 29 * getwid-image-box 30 */ 31!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-image-box:not(.getwid-init)").each(function(e,i){t(i).addClass("getwid-init"),t(".getwid-animation.wp-block-getwid-image-box").on("mouseenter",function(){Object(n.a)(t(this).find(".wp-block-getwid-image-box__image-wrapper"),{animation:t(this).attr("data-animation")})})})};i()})}(jQuery)},559:function(t,e){/*! 32 * getwid-progress-bar 33 */ 34!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-progress-bar:not(.getwid-init)").each(function(e){function i(e){s.find(t("".concat(d,"__progress"))).css("width","".concat(e,"%")),s.find(t("".concat(d,"__percent"))).text("".concat(e,"%"))}function n(e){var i=s.find(t("".concat(d,"__progress"))),n=function(){return Math.round(i.width()/i.parent().width()*100)};i.animate({width:"".concat(e,"%")},{duration:2e3,progress:function(){s.find(t("".concat(d,"__percent"))).text(n()+"%")}})}t(this).addClass("getwid-init");var o,a,d=".wp-block-getwid-progress-bar",s=t(this);o=s.find("".concat(d,"__wrapper")).data("fill-amount"),a=s.find("".concat(d,"__wrapper")).data("is-animated");var c=s.find(t("".concat(d,"__wrapper"))),r=new Waypoint({element:c.get(0),handler:function(){a?n(o):i(o),r.destroy()},offset:"100%"});t(window).resize(function(){i(o)})})};i()})}(jQuery)},560:function(t,e){/*! 35 * getwid-circle-progress-bar 36 */ 37!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-circle-progress-bar:not(.getwid-init)").each(function(e){function i(){var t=w.find("".concat(p,"__canvas")).get(0);t.width=parseFloat(r),t.height=parseFloat(r)}function n(t,e){var n=w.find("".concat(p,"__canvas")).get(0).getContext("2d"),o="auto"===l?r/14:l,s=r/2,c=Math.PI/180*-90;i(),n.clearRect(0,0,r,r),n.beginPath(),n.arc(s,s,s-o/2,c,c+2*Math.PI),n.lineWidth=o,n.strokeStyle=a,n.stroke(),n.beginPath(),n.arc(s,s,s-o/2,c,c+2*Math.PI*(t/100)),n.lineWidth=o,n.strokeStyle=d,n.stroke(),n.beginPath(),n.textAlign="center",n.font="16px serif",n.fillText(e||t+"%",s+6.5,s+5),n.stroke()}function o(t){var e=0,i=setInterval(function(){n(e,t),++e>s&&clearInterval(i)},35)}var a,d,s,c,r,l,u,p=".wp-block-getwid-circle-progress-bar",w=t(this);t(this).addClass("getwid-init"),a=w.find("".concat(p,"__wrapper")).data("background-color")?w.find("".concat(p,"__wrapper")).data("background-color"):"#eeeeee",d=w.find("".concat(p,"__wrapper")).data("text-color")?w.find("".concat(p,"__wrapper")).data("text-color"):"#0000ee",s=w.find("".concat(p,"__wrapper")).data("fill-amount"),c=w.find("".concat(p,"__wrapper")).data("is-animated"),r=w.find("".concat(p,"__wrapper")).data("size"),l=w.find("".concat(p,"__wrapper")).data("thickness"),u=w.find("".concat(p,"__wrapper")).data("value");var f=w.find(t("".concat(p,"__wrapper"))),g=new Waypoint({element:f.get(0),handler:function(){c?o(u):n(s,u),g.destroy()},offset:"100%"})})};i()})}(jQuery)},561:function(t,e){/*! 38 * getwid-counter 39 */ 40!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-counter:not(.getwid-init)").each(function(e){function i(){if(!r)return null;switch(w){case"outExpo":return function(t,e,i,n){return i*(1-Math.pow(2,-10*t/n))*1024/1023+e};case"outQuintic":return function(t,e,i,n){var o=(t/=n)*t,a=o*t;return e+i*(a*o+-5*o*o+10*a+-10*o+5*t)};case"outCubic":return function(t,e,i,n){var o=(t/=n)*t;return e+i*(o*t+-3*o+3*t)}}}function n(){switch(f){case"eastern_arabic":return["à ","á","â","ã","ä","ÃÂ¥","æ","ç","è","é"];case"farsi":return["ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù"];default:return null}}function o(){return{startVal:a,decimalPlaces:s,duration:c,useEasing:r,useGrouping:l,separator:u,decimal:p,easingFn:i(),numerals:n()}}t(this).addClass("getwid-init");var a,d,s,c,r,l,u,p,w,f,g=".wp-block-getwid-counter",m=t(this);
40a=m.find("".concat(g,"__wrapper")).data("start"),d=m.find("".concat(g,"__wrapper")).data("end"),s=m.find("".concat(g,"__wrapper")).data("decimal-places"),c=m.find("".concat(g,"__wrapper")).data("duration"),r=m.find("".concat(g,"__wrapper")).data("use-easing"),l=m.find("".concat(g,"__wrapper")).data("use-grouping"),u=m.find("".concat(g,"__wrapper")).data("separator"),p=m.find("".concat(g,"__wrapper")).data("decimal"),w=m.find("".concat(g,"__wrapper")).data("easing-fn"),f=m.find("".concat(g,"__wrapper")).data("numerals");var h=m.find("".concat(g,"__number")),_=new Waypoint({element:h.get(0),handler:function(){new CountUp(h.get(0),d,o()).start(),_.destroy()},offset:"100%"})})};i()})}(jQuery)},562:function(t,e){/*! 41 * getwid-contact-form 42 */ 43!function(t){var e=this;t(document).ready(function(i){t(document.body).on("post-load",function(t){n()});var n=function(){t(".wp-block-getwid-contact-form__form:not(.getwid-init)").each(function(i,n){t(e).addClass("getwid-init");var o,a=t(n).find("p[class$=__result]"),d=t(n).find("button[type='submit']"),s=t(n).find(".wp-block-getwid-captcha");s.length&&function(){if(s.length){var t=s.data("sitekey"),e=s.data("theme");grecaptcha.ready(function(){o=grecaptcha.render(s[0],{sitekey:t,theme:e})})}}(),a.hide(),t(n).submit(function(e){e.preventDefault(),d.prop("disabled",!0);var i={};t(n).serializeArray().forEach(function(t,e){i[t.name]=t.value});var c={action:"getwid_send_mail",security:Getwid.nonces.recaptcha_v2_contact_form,data:i};""!=a.text()&&a.hide(300),t.post(Getwid.ajax_url,c,function(e){a.hasClass("success")?a.removeClass("success"):a.hasClass("fail")&&a.removeClass("fail"),d.prop("disabled",!1),s.length&&e.success&&grecaptcha.reset(o),e.success?(t(n)[0].reset(),a.addClass("success")):a.addClass("fail"),a.html(e.data),a.show(300)})})})};n()})}(jQuery)},563:function(t,e){/*! 44 * getwid-post-carousel 45 */ 46!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){var e=t(".wp-block-getwid-post-carousel:not(.getwid-init) .wp-block-getwid-post-carousel__wrapper");e.length&&"undefined"!=typeof imagesLoaded&&e.each(function(e){getwid_post_carousel=t(this);var i=getwid_post_carousel.data("slider-option"),n=i.sliderSlidesToShowDesktop,o=i.getwid_slidesToShowLaptop,a=i.getwid_slidesToShowTablet,d=i.getwid_slidesToShowMobile,s=i.getwid_slidesToScroll,c=i.getwid_autoplay,r=i.getwid_autoplay_speed,l=i.getwid_infinite,u=i.getwid_animation_speed,p=i.getwid_center_mode,w=i.getwid_pause_on_hover,f=i.getwid_arrows,g=i.getwid_dots;w=!1,s=parseInt(s),n=parseInt(n),o=parseInt(o),d=parseInt(d),a=parseInt(a),f="none"!=f,g="none"!=g,getwid_post_carousel.closest(".wp-block-getwid-post-carousel").addClass("getwid-init"),getwid_post_carousel.imagesLoaded().done(function(e){t(e.elements[0]).slick({arrows:f,dots:g,rows:0,slidesToShow:n,slidesToScroll:s,autoplay:c,autoplaySpeed:r,fade:!1,speed:u,infinite:l,centerMode:p,variableWidth:!1,pauseOnHover:w,adaptiveHeight:!0,rtl:!!Getwid.isRTL,responsive:[{breakpoint:991,settings:{slidesToShow:o,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:a,slidesToScroll:1}},{breakpoint:468,settings:{slidesToShow:d,slidesToScroll:1}}]})})})};i()})}(jQuery)},564:function(t,e){/*! 47 * getwid-post-slider 48 */ 49!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){var e=t(".wp-block-getwid-post-slider:not(.getwid-init) .wp-block-getwid-post-slider__content");e.length&&"undefined"!=typeof imagesLoaded&&e.each(function(e){getwid_post_slider=t(this);var i=getwid_post_slider.data("slider-option"),n=i.getwid_fade_effect,o=i.getwid_autoplay,a=i.getwid_autoplay_speed,d=i.getwid_infinite,s=i.getwid_animation_speed,c=i.getwid_arrows,r=i.getwid_dots;n="fade"==n,getwid_pause_on_hover=!1,c="none"!=c,r="none"!=r,getwid_post_slider.closest(".wp-block-getwid-post-slider").addClass("getwid-init"),getwid_post_slider.imagesLoaded().done(function(e){t(e.elements[0]).slick({arrows:c,dots:r,rows:0,slidesToShow:1,slidesToScroll:1,autoplay:o,autoplaySpeed:a,fade:n,speed:s,infinite:d,centerMode:!1,variableWidth:!1,pauseOnHover:!1,adaptiveHeight:!0,rtl:!!Getwid.isRTL})})})};i()})}(jQuery)},565:function(t,e){/*! 50 * getwid-video-popup 51 */ 52!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-video-popup:not(.getwid-init)").each(function(e){t(this).addClass("getwid-init"),t(this).find(".wp-block-getwid-video-popup__link").fancybox({baseClass:"getwid-video-popup"})})};i()})}(jQuery)},566:function(t,e){/*! 53 * getwid-mailchimp 54 */ 55!function(t){var e=this;t(document).ready(function(i){t(document.body).on("post-load",function(t){n()});var n=function(){t(".wp-block-getwid-mailchimp__form:not(.getwid-init)").each(function(i,n){t(e).addClass("getwid-init");var o=t(n).find("p[class$=__result]"),a=t(n).find("button[type='submit']");o.hide(),t(n).submit(function(e){e.preventDefault(),a.prop("disabled",!0);var i={};
55t(n).serializeArray().forEach(function(t,e){i[t.name]=t.value});var d={action:"getwid_subscribe",data:i};""!=o.text()&&o.hide(300),t.post(Getwid.ajax_url,d,function(e){o.hasClass("success")?o.removeClass("success"):o.hasClass("fail")&&o.removeClass("fail"),a.prop("disabled",!1),e.success?(t(n)[0].reset(),o.addClass("success")):o.addClass("fail"),o.html(e.data),o.show(300)})})})};n()})}(jQuery)},567:function(t,e,i){"use strict";var n=i(23);/*! 56 * getwid-image-hotspot 57 */ 58!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-image-hotspot:not(.getwid-init)").each(function(e,i){t(this).addClass("getwid-init");var o=t(i).data("trigger"),a=t(i).data("theme"),d=t(i).data("tooltip-animation"),s=t(i).data("arrow"),c=t(i).data("image-points");t(".getwid-animation .wp-block-getwid-image-hotspot__dot").on("mouseenter",function(){Object(n.a)(t(this),{animation:t(this).closest(".getwid-animation").attr("data-animation")})}),t(i).find(".wp-block-getwid-image-hotspot__dot").each(function(e,i){var n=t(i),r=n.data("point-id"),l=_unescape(n.find(".wp-block-getwid-image-hotspot__dot-title").html()),u=_unescape(c[r].content),p=c[r].popUpOpen,w=c[r].placement,f=c[r].popUpWidth,g=tippy(i,{maxWidth:parseInt(f,10),hideOnClick:"multiple"!=o||"toggle",theme:a,animation:d,animateFill:!1,interactive:!0,trigger:"hover"==o?"mouseenter":"click",arrow:s,placement:w,allowHTML:!0,content:'<div class="wp-block-getwid-image-hotspot__tooltip"><div class="wp-block-getwid-image-hotspot__tooltip-title">'.concat(l,'</div><div class="wp-block-getwid-image-hotspot__tooltip-content">').concat(u,"</div></div>")});p&&setTimeout(function(){g.show()},1e3),n.find(".wp-block-getwid-image-hotspot__dot-description").remove(),new Waypoint({element:i,handler:function(e){t(this.element).addClass("is-visible")},offset:"100%"})})})};i()})}(jQuery)},568:function(t,e,i){"use strict";var n=i(28),o=i.n(n);/*! 59 * getwid-content-timeline 60 */ 61!function(t){var e=this;t(document).ready(function(i){t(document.body).on("post-load",function(t){n()});var n=function(){t(".wp-block-getwid-content-timeline:not(.getwid-init)").each(function(i,n){t(e).addClass("getwid-init");var a=!1,d="wp-block-getwid-content-timeline-item",s=t(n).find(".".concat(d)),c="none"!=t(n).data("animation")?t(n).data("animation"):null,r=t(n).find("div[class$=__point]").data("point-color"),l=t(n).data("filling");t.each(s,function(e,i){c&&(i.getBoundingClientRect().top>.8*window.innerHeight?t(i).addClass("is-hidden"):t(i).addClass(c));var n=t(i).find(".".concat(d,"__content-wrapper"));(0==n.children().length||n.find(".".concat(d,"__mobile-meta")).is(":only-child"))&&n.addClass("has-no-content")});var u=function(e){t.each(s,function(i,n){t(n).hasClass("is-hidden")&&n.getBoundingClientRect().top<=.8*window.innerHeight&&(t(n).removeClass("is-hidden"),t(n).addClass(e))}),a=!1};c&&t(document).scroll(function(){a||(a=!0,window.requestAnimationFrame?window.requestAnimationFrame(function(){return u(c)}):setTimeout(function(){return u(c)},250))});var p=t(window).height()/2,w=function(){var e=t(n).find(".".concat(d,"__point")),i=0;t.each(e,function(t,n){e[t+1]&&(i+=e[t+1].getBoundingClientRect().top-n.getBoundingClientRect().top)});var a=t(n).find("div[class$=__line]"),s=e.get(),c=o()(s),r=c[0],l=(c.slice(1),t(r).position().top+t(r).height()/2);a.css({height:i,top:l})},f=function(){var e=t(n).find(".".concat(d,"__point")),i=e.get(),a=o()(i);a[0],a.slice(1).length&&t.each(e,function(e,i){var n=i.getBoundingClientRect().top,o=t(i).parents(".".concat(d))[0];n<=p?(t(o).hasClass("is-active")||t(o).addClass("is-active"),t(i).find(":first-child").css({borderColor:r||""})):(t(o).hasClass("is-active")&&t(o).removeClass("is-active"),t(i).find(":first-child").css({borderColor:""}))})},g=function(){var e=t(n).find(".".concat(d,"__point")),i=t(n).find("div[class*=__bar]")[0],a=i.getBoundingClientRect().top,s=e.toArray(),c=o()(s),r=c[0],l=c.slice(1),u=p-r.getBoundingClientRect().top;if(l.length){var w=l.slice(-1).pop(),f=w.getBoundingClientRect().top;a<=p&&f>=p&&t(i).css({height:u}),a>=p&&t(i).css({height:0}),f<=p&&t(i).css({height:"100%"})}};t(document).ready(function(){var e=setInterval(function(){"complete"==document.readyState&&(w(),l&&(f(),g()),l&&t(document).scroll(function(){f(),g()}),clearInterval(e))},1e3)}),t(window).resize(function(){w(),l&&(f(),g())})})};n()})}(jQuery)},569:function(t,e){/*! 62 * getwid-countdown 63 */ 64!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){t(".wp-block-getwid-countdown:not(.getwid-init)").each(function(e,i){t(this).addClass("getwid-init");var n=jQuery(i).find(".wp-block-getwid-countdown__content"),o=n.data("datetime"),a=n.data("years"),d=n.data("months"),s=n.data("weeks"),c=n.data("days"),r=n.data("hours"),l=n.data("minutes"),u=n.data("seconds"),p=n.data("bg-color"),w="negative"==o?"":o,f="";a&&(f+="Y"),d&&(f+="O"),s&&(f+="W"),c&&(f+="D"),r&&(f+="H"),l&&(f+="M"),u&&(f+="S"),n.countdown({until:w,format:f,onTick:function(t){var e=jQuery(".countdown-section",n);p&&e.css("background-color",p)}})})};i()})}(jQuery)},570:function(t,e){/*! 65 * getwid-content-slider 66 */ 67!function(t){t(document).ready(function(e){t(document.body).on("post-load",function(t){i()});var i=function(){var e=t(".wp-block-getwid-content-slider:not(.getwid-init)");e.length&&e.each(function(e){var i,n,o,a,d,s,c,r,l,u,p,w=t(this),f=w.find(".wp-block-getwid-content-slider__wrapper").first();w.addClass("getwid-init"),f.slick({autoplay:!!w.data("autoplay"),autoplaySpeed:null!==(i=w.data("autoplay-speed"))&&void 0!==i?i:3e3,arrows:"none"!==w.data("arrows"),dots:"none"!==w.data("dots"),speed:null!==(n=w.data("animation-speed"))&&void 0!==n?n:800,infinite:!!w.data("infinite"),fade:"fade"===w.data("effect"),centerMode:!!w.data("center-mode"),adaptiveHeight:!!w.data("adaptive-height"),draggable:null===(o=w.data("draggable"))||void 0===o||o,pauseOnHover:!!w.data("pause-hover"),rows:0,slidesToShow:null!==(a=w.data("slides-show"))&&void 0!==a?a:1,slidesToScroll:null!==(d=w.data("slides-scroll"))&&void 0!==d?d:1,rtl:!!Getwid.isRTL,responsive:[{breakpoint:991,settings:{slidesToShow:null!==(s=w.data("slides-show-laptop"))&&void 0!==s?s:1,slidesToScroll:null!==(c=w.data("slides-scroll-laptop"))&&void 0!==c?c:1}},{breakpoint:768,settings:{slidesToShow:null!==(r=w.data("slides-show-tablet"))&&void 0!==r?r:1,slidesToScroll:null!==(l=w.data("slides-scroll-tablet"))&&void 0!==l?l:1}},{breakpoint:468,settings:{slidesToShow:null!==(u=w.data("slides-show-mobile"))&&void 0!==u?u:1,slidesToScroll:null!==(p=w.data("slides-scroll-mobile"))&&void 0!==p?p:1}}]})})};i()})}(jQuery)}}); 68!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,
vendor: 6,594 bytes, line 68
68sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 68
68ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
68slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
68parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
68,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,619 bytes, line 68
68,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
68!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
68):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
68o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
68,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 69 70 71const remove_el_hidden_by_roles = function() { 72 if(document.body.classList.contains('is_fellow')) { 73 var hide_me = document.getElementsByClassName('hide-fellow'); 74 while(hide_me[0]) { 75 hide_me[0].remove(); 76 } 77 } 78 if(document.body.classList.contains('is_alumni')) { 79 var hide_me = document.getElementsByClassName('hide-alumni'); 80 while(hide_me[0]) { 81 hide_me[0].remove(); 82 } 83 } 84 if(document.body.classList.contains('is_employer')) { 85 var hide_me = document.getElementsByClassName('hide-employer'); 86 while(hide_me[0]) { 87 hide_me[0].remove(); 88 } 89 } 90 if(document.body.classList.contains('is_university')) { 91 var hide_me = document.getElementsByClassName('hide-university'); 92 while(hide_me[0]) { 93 hide_me[0].remove(); 94 } 95 } 96} 97remove_el_hidden_by_roles(); 98window.addEventListener("load",remove_el_hidden_by_roles()); 99 100window.addEventListener('load', (event) => { 101 const queryString = window.location.search; 102 const urlParams = new URLSearchParams(queryString); 103 if (!urlParams.get('tab')) return 104 105 const id = urlParams.get('tab') 106 let tab = document.querySelector("#"+id) 107 let block= tab.closest(".section") 108 let panel = document.querySelector(".tabs-block__menu-item[data-tab-target="+id+"]") 109 let checkActive = document.querySelectorAll(".is-active") 110 111 checkActive.forEach(element => { 112 element.classList.remove("is-active") 113 }); 114 115 tab.classList.add("is-active") 116 panel.classList.add("is-active") 117 118 setTimeout(() => { 119 block.scrollIntoView({ behavior: 'smooth',block:'start' }); 120 }, 500); 121 122}); 123 124window.addEventListener("load",()=>{ 125 texts = document.querySelectorAll('a.link,.sub-nav-block a') // change target here 126 texts.forEach((t)=>{ 127 text = t.innerHTML 128 // console.log(text) 129 html = text.replace("i4","<span class='notransform'>i4</span>") 130 t.innerHTML = html 131 }) 132 }) 133 134window.addEventListener("load",()=>{ 135 texts = document.querySelectorAll('a') // change target here 136 texts.forEach((t)=>{ 137 text = t.innerHTML 138 // console.log(text) 139 html = text.replace('eGEM','<span class="notransform">eGEM </span>') 140 t.innerHTML = html 141 }) 142 }) 143 144 jQuery(".sendbtnsec").click(function(){ 145 jQuery("#gform_submit_button_1").trigger('click'); 146 return false; 147 }); 148jQuery(function($) { 149 150 $('.nav-scroll').click(function(){ 151 $('.sub-nav-block').animate({scrollLeft : 100},600); 152 return false; 153 }); 154 155 156 var scrolled = false; 157 158 $(".sub-nav-block").scroll(function() { 159 160 //if I scroll more than 1000px... 161 if($(".sub-nav-block").scrollLeft() > 10 && scrolled == false){ 162 $(".nav-scroll").addClass("hideit"); 163 scrolled = true; 164 } else if($(window).scrollTop() == 0) { 165 scrolled = false;
166 } 167 }); 168 169 $('.photo-slider-main').slick({ 170 slidesToShow: 1, 171 slidesToScroll: 1, 172 arrows: false, 173 dots: false, 174 fade: true, 175 asNavFor: '.slider-nav' 176 }); 177 $('.photo-slider-thumbs-main').slick({ 178 slidesToShow: 3, 179 slidesToScroll: 1, 180 asNavFor: '.slider-for', 181 dots: false, 182 arrows: false, 183 focusOnSelect: true, 184 nextArrow: '<button type="button" class="slick-arrow slick-next">ï¡</button>', 185 prevArrow: '<button type="button" class="slick-arrow slick-prev">ï </button>', 186 dotsClass: 'custom_paging', 187 responsive: [ 188 { 189 breakpoint: 620, 190 settings: { 191 arrows: false, 192 } 193 } 194 ], 195 }); 196$(".logo-slider-block").owlCarousel({ 197 stagePadding: 0, 198 dots: true, 199 nav: false, 200 items:4, 201responsive : { 2020 : { 203 items: 1 204}, 205620 : { 206 items: 2 207}, 208960 : { 209 items: 4 210} 211} 212}); 213$(window).on('scroll',function(){ 214 215 // Show button after 100px 216 var showAfter = 1000; 217 if ( $(this).scrollTop() > showAfter ) { 218 $('.back-to-top').fadeIn(); 219 } else { 220 $('.back-to-top').fadeOut(); 221 } 222 }); 223 224 //Click event to scroll to top 225 $('.back-to-top').on('click',function(){ 226 $('html, body').animate({scrollTop : 0},800); 227 return false; 228 }); 229 230 231 232 233 $(".searchtoggle").on('click',function() { 234 $(".searchformwrap").toggleClass("showthis"); 235 $(".searchtoggle").toggleClass("searchclicked"); 236 $( ".searchtogglebar input" ).focus(); 237 }); 238 $(".hero-block").on('click',function() { 239 $(".searchformwrap").removeClass("showthis"); 240 $(".searchtoggle").removeClass("searchclicked"); 241 }); 242 $("#nav-trigger").on( "click", function(e) { 243 e.preventDefault(); 244 console.log('click'); 245 if ($('#nav-trigger').hasClass("menu-open") || $('#nav-close').hasClass("menu-open")) { 246 $('#nav-trigger').removeClass("menu-open"); 247 $('.navbar').removeClass("nav-menu-open"); 248 $('#nav-close').removeClass("menu-open"); 249 $("#sidebar-nav").removeClass("menu-open"); 250 } else { 251 $('#nav-trigger').addClass("menu-open"); 252 $('.navbar').addClass("nav-menu-open"); 253 $('#nav-close').addClass("menu-open"); 254 $("#sidebar-nav").addClass("menu-open"); 255 $("#sidebar-nav").show(); 256 } 257 $("#sidebar-nav li").each(function(i) { 258 $(this).delay(i * 100).css('opacity',0).animate({'opacity': 1}, 500); 259 }); 260 261 }); 262 $("#nav-close").on( "click", function(e) { 263 e.preventDefault(); 264 console.log('click'); 265 if ($('#nav-trigger').hasClass("menu-open") || $('#nav-close').hasClass("menu-open")) { 266 $('#nav-trigger').removeClass("menu-open"); 267 $('#nav-close').removeClass("menu-open"); 268 $('.navbar').removeClass("nav-menu-open"); 269 $("#sidebar-nav").removeClass("menu-open"); 270 } else { 271 $('#nav-trigger').addClass("menu-open"); 272 $('#nav-close').addClass("menu-open"); 273 $('.navbar').addClass("nav-menu-open"); 274 $("#sidebar-nav").addClass("menu-open"); 275 $("#sidebar-nav").show(); 276 } 277 }); 278 279 280$(".nav-scroll,.sub-nav-block").on( "click", function(e) { 281 console.log(test) 282 // if($(e.target).text() == "Apply now") return 283 e.preventDefault(); 284 $(".nav-scroll").addClass("hideit"); 285}); 286 287 $("#sidebar-nav .menu-item-has-children").on( "click", function(e) { 288 $(this).toggleClass("up"); 289 $(this).children('ul').slideToggle( "fast", function() { 290 }); 291 }); 292 293 $('a[href*="#"]') 294 // Remove links that don't actually link to anything 295 .not('[href="#"]') 296 .not('[href="#0"]') 297 .click(function(event) { 298 // On-page links 299 if ( 300 location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') 301 && 302 location.hostname == this.hostname 303 ) { 304 // Figure out element to scroll to 305 var target = $(this.hash); 306 target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); 307 // Does a scroll target exist? 308 if (target.length) { 309 // Only prevent default if animation is actually gonna happen 310 event.preventDefault(); 311 $('html, body').animate({ 312 scrollTop: target.offset().top - 72 313 }, 1000, function() { 314 // Callback after animation 315 // Must change focus! 316 var $target = $(target); 317 $target.focus(); 318 if ($target.is(":focus")) { // Checking if the target was focused 319 return false; 320 } else { 321 $target.attr('tabindex','-1'); // Adding tabindex for elements not focusable
322 $target.focus(); // Set focus again 323 }; 324 }); 325 } 326 } 327 }); 328 329 //Menu Functions 330 $(".menu-icon,.menu-background").on( "click", function(e) { 331 console.log('click'); 332 if ($('#primary-menu').hasClass("menu-open") ) { 333 $('.menu-background').removeClass("menu-open"); 334 $('#primary-menu').removeClass("menu-open"); 335 } else { 336 $('.menu-background').addClass("menu-open"); 337 $('#primary-menu').addClass("menu-open"); 338 } 339 }); 340 341 342 343 //Tab Functions 344 $(".tabs-block__menu-item[data-tab-target]").on( "click", function(e) { 345 e.preventDefault() 346 let target = $(e.target).data("tab-target") 347 348 $(this).parent().find('.is-active').removeClass("is-active"); 349 $(`#${target}`).parent().find('.is-active').removeClass("is-active"); 350 $(`#${target}`).addClass("is-active"); 351 $(this).addClass("is-active"); 352 }); 353 354 355 //Faq 356 357 358 window.addEventListener("load", function(){ 359 360 let $ = jQuery; 361 // $('.row .col:first').addClass('aaaa'); 362 // $('.row .col').each(function(i) { 363 // if ( i === 1 ) { 364 // $(this).addClass('aaaa'); 365 // } 366 // }); 367 //$('.row .col').eq(2).addClass('aaaa'); 368 //$('.row').eq(2).addClass('aaaa'); 369 370 371 372 373 $(".faq-title").on( "click", function(e) { 374 e.preventDefault() 375 let target = $(this).next() 376 let icon = $(this).find('i') 377 378 379 if ($(this).hasClass('is-active')) { 380 $(target).removeClass("is-active") 381 $(icon).removeClass("is-active") 382 $(this).removeClass("is-active") 383 return 384 } 385 386 $(".faq-content").removeClass("is-active") 387 $(".faq-title > i").removeClass("is-active") 388 $(icon).addClass("is-active") 389 $(this).addClass("is-active") 390 $(target).addClass("is-active") 391 392 }); 393 $(".timeline-block.x2").owlCarousel({ 394 stagePadding: 100, 395 dots: false, 396 nav: true, 397 responsive : { 398 // breakpoint from 0 up 399 0 : { 400 items:1, 401 nav:true, 402 stagePadding: 40, 403 }, 404 // breakpoint from 480 up 405 621 : { 406 items:2, 407 nav:true 408 }, 409 // breakpoint from 768 up 410 800 : { 411 items:3, 412 nav:true 413 } 414 } 415 }); 416 }); 417 418 419$(".university-info, .fwblurbpop").on( "click", function(e) { 420 if ($(this).next().find(".contactpop").hasClass("lightbox-open") ) { 421 $(this).next().find(".contactpop").removeClass("lightbox-open"); 422 } else { 423 $(this).next().find(".contactpop").addClass("lightbox-open"); 424 } 425}); 426 427$(".lightbox__modal-close, .lightbox__modal-shadow").on( "click", function(e) { 428 $(".lightbox__modal-container").removeClass("lightbox-open"); 429}); 430 431 432 433 var mobilemq = window.matchMedia( "(max-width: 620px)" ); 434 if (mobilemq.matches) { 435 436$("#top-university-partners .wp-block-columns").owlCarousel({ 437 stagePadding: 0, 438 dots: true, 439 nav: false, 440 items:2, 441}); 442 /* Clone the table (optional) */ 443 if ($('figure').hasClass("wp-block-table") ) { 444 $('table').clone().appendTo('section.x1:not(#gem-fellows-by-year) .container').addClass('cloned'); 445 446 /* Converts the .cloned table to DIVs */ 447 $('table.cloned').replaceWith( 448 $('table').html() 449 .replace(/<tbody/gi, '<div class="table faq-block"') 450 .replace(/<tr/gi, '<div class="row faq-item"') 451 .replace(/<\/tr>/gi, '</div>') 452 .replace(/<td/gi, '<div class="col"') 453 .replace(/<td/gi, '<div class="col"') 454 .replace(/<\/td>/gi, '</div>') 455 .replace(/<\/tbody/gi, '<\/div') 456 ); 457 $( ".row:not(.uni-row) .col:first-child" ) 458 .addClass( "faq-title" ); 459 }; 460 $(".row:not(.uni-row)").each(function(){ 461 $(this).children('div').not(':first-child').wrapAll('<div class="faq-content" />') 462 }); 463 $(".footer-menu .menu-item-has-children").on( "click", function(e) { 464 $(this).toggleClass("up"); 465 $(this).children('ul').slideToggle( "fast", function() { 466 }); 467 }); 468 469 $('.testimonials-block').owlCarousel({ 470 loop:true, 471 dots:true, 472 items:1 473 474 }) 475 476 } 477 else { 478 479 }; 480 481 var has_masonry = (document.querySelector('.flex-masonry') != null); 482 if(has_masonry) { 483 var macy = Macy({ 484 container: '.flex-masonry', 485 trueOrder: false, 486 waitForImages: false, 487 margin: 24, 488 columns: 2, 489 breakAt: { 490 1200: 2, 491 940: 2, 492 520: 1, 493 425: 1 494 } 495 }); 496 macy.recalculate(); 497 } 498 499}); 500 501 502 503 504 505 506 507 508window.addEventListener("load",()=>{ 509 510 let lastKnownScrollPosition = 0; 511 let lastKnownScrollelement = {}; 512 let ticking = false;
513 514 function doSomething(scrollPos) { 515 // console.log("this works not ticking") 516 let nav = document.querySelector(".sub-nav-block"); 517 let currentBtn = document.querySelector(".sub-nav-block a.active"); 518 if(currentBtn == undefined) return; 519 let position = currentBtn.getBoundingClientRect().x 520 console.log(position, "element is ",currentBtn.parentElement ) 521 522 if(lastKnownScrollelement != currentBtn){ 523 nav.scroll({ 524 top: 0, 525 left: position, 526 behavior: 'smooth' 527 }); 528 } 529 } 530 document.addEventListener('scroll', function(e) { 531 532 lastKnownScrollPosition = window.scrollY; 533 lastKnownScrollelement = document.querySelector(".sub-nav-block a.active"); 534 ticking = false 535 536 if (!ticking) { 537 window.requestAnimationFrame(function() { 538 doSomething(lastKnownScrollPosition); 539 540 ticking = false; 541 }); 542 543 ticking = true; 544 545 } 546 }); 547 548}) 549 550 551 552 553 554 555 556 557 558 559 560 561/* 562 * slide-nav 1.0.1 563 * ES6 Vanilla.js navigation plugin to simple use on one-page websites. 564 * https://github.com/qmixi/slide-nav 565 * 566 * Copyright (C) 2017 - A project by Piotr Kumorek 567 * Released under the MIT license. 568*/ 569 570'use strict'; 571 572var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); 573 574function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 575 576var SlideNav = function () { 577 function SlideNav(options) { 578 _classCallCheck(this, SlideNav); 579 580 //default values 581 if (!options) var options = {}; 582 this.activeClass = options.activeClass || 'active'; 583 this.toggleButtonSelector = options.toggleButtonSelector || false; 584 this.toggleBoxSelector = options.toggleBoxSelector || false; 585 this.speed = options.speed > 0 ? options.speed : 70; 586 this.hideAfterSelect = options.hideBoxAfterSelect || true; 587 this.changeHash = options.changeHash || false; 588 this.navBoxToggleClass = options.navBoxToggleClass || false; 589 590 //initialize 591 this.init(); 592 } 593 594 _createClass(SlideNav, [{ 595 key: 'init', 596 value: function init() { 597 //scrollDoc 598 this.scrollDoc = document.scrollingElement || document.documentElement; 599 600 this.getElements(); 601 this.observe(); 602 this.setActiveAnchor(); 603 } 604 }, { 605 key: 'getElements', 606 value: function getElements() { 607 this.toggleButton = document.querySelector(this.toggleButtonSelector); 608 if (this.toggleButton) { 609 this.opened = false; 610 } 611 this.toggleBoxes = document.querySelectorAll(this.toggleBoxSelector); 612 this.navAnchors = document.querySelectorAll('a:not([target="_blank"])'); 613 } 614 }, { 615 key: 'observe', 616 value: function observe() { 617 var _this = this; 618 619 //blur navBox 620 window.addEventListener("click", function (e) { 621 if (_this.opened && !_this.isClosestElement(e.target, _this.toggleButton) && !_this.isBoxNavTarget(e.target)) { 622 _this.hideNavBox(); 623 } 624 }); 625 // toggle button 626 if (this.toggleButton) { 627 this.toggleButton.addEventListener("click", function (e) { 628 setTimeout(function () { 629 _this.opened ? _this.hideNavBox() : _this.showNavBox(); 630 }); 631 }); 632 }; 633 634 // anchors 635 var _iteratorNormalCompletion = true; 636 var _didIteratorError = false; 637 var _iteratorError = undefined; 638 639 640 try { 641 for (var _iterator = this.navAnchors[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { 642 var anchor = _step.value; 643 644 anchor.addEventListener("click", function (e) { 645 e.preventDefault(); 646 var linkHash = _this.getHash(e.currentTarget.href); 647 if (!_this.goToSection(linkHash) && e.currentTarget.href) _this.goToUrl(e.currentTarget.href); 648 }); 649 } 650 } catch (err) {
651 _didIteratorError = true; 652 _iteratorError = err; 653 } finally { 654 try { 655 if (!_iteratorNormalCompletion && _iterator.return) { 656 _iterator.return(); 657 } 658 } finally { 659 if (_didIteratorError) { 660 throw _iteratorError; 661 } 662 } 663 } 664 665 ; 666 // scroll 667 window.addEventListener("scroll", function () { 668 _this.setActiveAnchor(); 669 }); 670 } 671 }, { 672 key: 'setActiveAnchor', 673 value: function setActiveAnchor() { 674 var _iteratorNormalCompletion2 = true; 675 var _didIteratorError2 = false; 676 var _iteratorError2 = undefined; 677 678 try { 679 for (var _iterator2 = this.navAnchors[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { 680 var anchor = _step2.value; 681 682 var linkHash = this.getHash(anchor.href), 683 section = this.getSection(linkHash), 684 offset = this.scrollDoc.scrollTop - 120, 685 scrollHeight = this.scrollDoc.scrollHeight; 686 687 if (section && (section.offsetTop <= offset && section.offsetTop + section.offsetHeight > offset || offset + window.innerHeight == scrollHeight)) { 688 var _iteratorNormalCompletion3 = true; 689 var _didIteratorError3 = false; 690 var _iteratorError3 = undefined; 691 692 try { 693 for (var _iterator3 = this.navAnchors[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { 694 var link = _step3.value; 695 696 if (link.href != anchor.href) link.classList.remove('active'); 697 } 698 } catch (err) { 699 _didIteratorError3 = true; 700 _iteratorError3 = err; 701 } finally { 702 try { 703 if (!_iteratorNormalCompletion3 && _iterator3.return) { 704 _iterator3.return(); 705 } 706 } finally { 707 if (_didIteratorError3) { 708 throw _iteratorError3; 709 } 710 } 711 } 712 //bank 713 anchor.classList.add('active'); 714 715 716 717 } 718 } 719 } catch (err) { 720 _didIteratorError2 = true; 721 _iteratorError2 = err; 722 } finally { 723 try { 724 if (!_iteratorNormalCompletion2 && _iterator2.return) { 725 _iterator2.return(); 726 } 727 } finally { 728 if (_didIteratorError2) { 729 throw _iteratorError2; 730 } 731 } 732 } 733 } 734 }, { 735 key: 'goToSection', 736 value: function goToSection(linkHash) { 737 var section = this.getSection(linkHash); 738 if (section) { 739 var offsetTop = section.offsetTop; 740 this.scrollTo(offsetTop, this.speed); 741 if (this.hideAfterSelect) this.hideNavBox(); 742 if (this.changeHash) { 743 history.pushState({}
743, null, "#" + linkHash); 744 } 745 return true; 746 } else { 747 return false; 748 } 749 } 750 }, { 751 key: 'scrollTo', 752 value: function scrollTo(destOffset, duration) { 753 var _this2 = this; 754 755 var diffOffset = destOffset - this.scrollDoc.scrollTop, 756 partDist = diffOffset / duration * 1; 757 758 if (duration <= 0) return; 759 setTimeout(function () { 760 _this2.scrollDoc.scrollTop = _this2.scrollDoc.scrollTop + partDist; 761 if (_this2.scrollDoc.scrollTop == destOffset) return; 762 _this2.scrollTo(destOffset, duration - 1); 763 }, 1); 764 } 765 }, { 766 key: 'goToUrl', 767 value: function goToUrl(url) { 768 return window.location = url; 769 } 770 }, { 771 key: 'getSection', 772 value: function getSection(linkHash) { 773 if (linkHash && typeof(linkHash) === 'string' && isNaN(linkHash)) { 774 var id = "#" + linkHash; 775 return document.querySelector(id); 776 } 777 return false; 778 } 779 }, { 780 key: 'getHash', 781 value: function getHash(href) { 782 return href.split('#')[1]; 783 } 784 }, { 785 key: 'isBoxNavTarget', 786 value: function isBoxNavTarget(target) { 787 var isTarget = false;
788 var _iteratorNormalCompletion4 = true; 789 var _didIteratorError4 = false; 790 var _iteratorError4 = undefined; 791 792 try { 793 for (var _iterator4 = this.toggleBoxes[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { 794 var box = _step4.value; 795 796 if (this.isClosestElement(target, box)) isTarget = true; 797 } 798 } catch (err) { 799 _didIteratorError4 = true; 800 _iteratorError4 = err; 801 } finally { 802 try { 803 if (!_iteratorNormalCompletion4 && _iterator4.return) { 804 _iterator4.return(); 805 } 806 } finally { 807 if (_didIteratorError4) { 808 throw _iteratorError4; 809 } 810 } 811 } 812 813 return isTarget; 814 } 815 }, { 816 key: 'isClosestElement', 817 value: function isClosestElement(target, element) { 818 while (element != target) { 819 target = target.parentNode; 820 if (!target) return false; 821 } 822 return true; 823 } 824 }, { 825 key: 'hideNavBox', 826 value: function hideNavBox() { 827 var _iteratorNormalCompletion5 = true; 828 var _didIteratorError5 = false; 829 var _iteratorError5 = undefined; 830 831 try { 832 for (var _iterator5 = this.toggleBoxes[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) { 833 var box = _step5.value; 834 835 if (this.navBoxToggleClass) { 836 box.classList.remove(this.navBoxToggleClass); 837 } else { 838 box.style.display = 'none'; 839 } 840 } 841 } catch (err) { 842 _didIteratorError5 = true; 843 _iteratorError5 = err; 844 } finally { 845 try { 846 if (!_iteratorNormalCompletion5 && _iterator5.return) { 847 _iterator5.return(); 848 } 849 } finally { 850 if (_didIteratorError5) { 851 throw _iteratorError5; 852 } 853 } 854 } 855 856 this.opened = false; 857 } 858 }, { 859 key: 'showNavBox', 860 value: function showNavBox() { 861 var _iteratorNormalCompletion6 = true; 862 var _didIteratorError6 = false; 863 var _iteratorError6 = undefined; 864 865 try { 866 for (var _iterator6 = this.toggleBoxes[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) { 867 var box = _step6.value; 868 869 if (this.navBoxToggleClass) { 870 box.classList.add(this.navBoxToggleClass); 871 } else { 872 box.style.display = 'block'; 873 } 874 } 875 } catch (err) { 876 _didIteratorError6 = true; 877 _iteratorError6 = err; 878 } finally { 879 try { 880 if (!_iteratorNormalCompletion6 && _iterator6.return) { 881 _iterator6.return(); 882 } 883 } finally { 884 if (_didIteratorError6) { 885 throw _iteratorError6; 886 } 887 } 888 } 889 890 this.opened = true; 891 } 892 }]); 893 894 return SlideNav; 895}(); 896 897var nav = new SlideNav({ 898 activeClass: "active", 899 toggleBoxSelector: '.sub-nav-block', 900 //speed: 1000 //default 250 901}); 902 903 904 905// let subNav = document.querySelector(".sub-nav-block"); 906// let active = document.querySelector(".active"); 907 908 909 910// }) 911 912 913// let lastKnownScrollPosition = 0; 914// let ticking = false; 915 916// function doSomething(scrollPos) { 917// // Do something with the scroll position 918// console.log("this works") 919// } 920 921/** 922 * There is a known bug on iOS that sometimes occurs when using delay JS features, 923 * and other event based JS. This bug causes <a> links to not work until they are 924 * clicked twice. The FastClick library creates instant synthetic 'click' events, 925 * that bypass this issue. 926 */ 927/* ACI: FastClick is not defined 928function add_fastclick_fix() { 929jQuery('a').each(function(){ 930 FastClick.attach(this); 931}); 932} 933 934window.addEventListener('load', add_fastclick_fix); 935*/ 936 937 938 939function feed_card_close(target_id,) { 940 // console.log('feed_card_close', target_id); 941 if(confirm('Removing this is permanent. Are you sure?')) { 942 var target = document.querySelector('#'+target_id); 943 if(target) { 944 target.classList.add('closed'); 945 set_hidden_id(target_id); 946 } 947 } 948} 949 950function recommended_connections_card_close(target_id,) { 951 console.log('recommended_connections_card_close', target_id); 952 if(confirm('Removing this person is permanent. Are you sure?')) { 953 var target = document.querySelector('#'+target_id); 954 if(target) { 955 target.classList.add('closed'); 956 set_hidden_id(target_id); 957 window.remove_this_el = target; 958 setTimeout(function(){ 959 if(window.remove_this_el) window.remove_this_el.remove(); 960 }, 1000); 961 } 962 } 963} 964 965function set_hidden_id( id ) { 966 var hidden_ids = get_hidden_ids(); 967 hidden_ids.ids.push(id); 968 hidden_ids.ids = [...new Set(hidden_ids.ids)] // ES6 method to remove potential duplicates 969 var JSON_string = JSON.stringify(hidden_ids); 970 setCookie('GEM_Hidden_IDs', JSON_string); 971} 972 973function get_hidden_ids() { 974 var hidden_ids = getCookie('GEM_Hidden_IDs'); 975 976 if (hidden_ids === '') { 977 hidden_ids = {ids: []}; 978 } else { 979 hidden_ids = JSON.parse(hidden_ids); 980 } 981 return hidden_ids; 982} 983 984function hide_hidden_ids() { 985 var hidden_ids = get_hidden_ids(); 986 // console.log('hide_hidden_ids', hidden_ids); 987 for(let i = 0; hidden_ids.ids[i]; i++) { 988 var el = document.getElementById( hidden_ids.ids[i] ); 989 if(el) { 990 el.remove(); // delete the el 991 } 992 } 993} 994hide_hidden_ids(); 995window.addEventListener('load', hide_hidden_ids); 996 997function setCookie(cname, cvalue, exdays = 1000) { 998 const d = new Date(); 999 d.setTime(d.getTime() + (exdays*24*60*60*1000)); 1000 let expires = "expires="+ d.toUTCString(); 1001 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 1002} 1003 1004function getCookie(cname) { 1005 let name = cname + "="; 1006 let decodedCookie = decodeURIComponent(document.cookie); 1007 let ca = decodedCookie.split(';'); 1008 for(let i = 0; i <ca.length; i++) {
vendor: 7,330 bytes, lines 1009-1097
1009 let c = ca[i]; 1010 while (c.charAt(0) == ' ') { 1011 c = c.substring(1); 1012 } 1013 if (c.indexOf(name) == 0) { 1014 return c.substring(name.length, c.length); 1015 } 1016 } 1017 return ""; 1018} 1019 1020 1021// keeps track of whether user is pressing cmd key 1022var cmd_pressed = false; 1023 1024document.body.addEventListener('keydown', function(e) { 1025 cmd_pressed = e.metaKey 1026}); 1027 1028document.body.addEventListener('keyup', function(e) { 1029 cmd_pressed = false; 1030}); 1031 1032const go_to_my_link = function(el) { 1033 window.go_to_el = el; 1034 let link = el.getElementsByTagName('a')[0]; 1035 if( undefined === link) { 1036 console.log('no link fond within element:', el); 1037 return; 1038 } 1039 else url = link.getAttribute('href'); 1040 1041 if(cmd_pressed) window.open(url); // new window 1042 else window.location.assign(url); // same window 1043} 1044 1045function onkeypress_to_onclick(e) { 1046 var keycode = (e.keyCode ? e.keyCode : e.which); 1047 if (keycode == '13' || keycode == '32') { // enter or spacebar 1048 document.activeElement.click(); 1049 } 1050} 1051 1052function form_enter_key_action(e, form_action) { 1053 var keycode = (e.keyCode ? e.keyCode : e.which); 1054 if (keycode == '13') { // enter 1055 e.preventDefault(); 1056 form_action(); 1057 } 1058} 1059 1060function toggle_classname( el, classname = '' ) { 1061 el.classList.toggle(classname); 1062} 1063 1064function zip_after_state_fix() { 1065 // WPUF builds the "Address Field" form group with the State field after Zip Code. 1066 // We will move it up to be just after to City, where it should be. 1067 // Add classname "zip-after-state" to the field's "Advanced Options" > "CSS Class Name" 1068 1069 var address_fields_to_fix = document.querySelectorAll('.zip-after-state'); 1070 for(let i=0; address_fields_to_fix[i]; i++) { 1071 let address = address_fields_to_fix[i]; 1072 if(address.classList.contains('zip-after-state-complete')) continue; 1073 1074 let city_name = address.querySelector('.city_name'); 1075 let state = address.querySelector('.state'); 1076 1077 if(city_name == undefined || state == undefined) { 1078 console.warn('WPUF Address Field "'+address.dataset.label+'" seems to wrongly have "zip-after-state" as a classname. Missing "city_name" or "state". Aborting zip_after_state_fix...'); 1079 continue; 1080 } 1081 // Do the fix 1082 city_name.parentNode.insertBefore(state, city_name.nextSibling); 1083 address.classList.add('zip-after-state-complete'); 1084 } 1085} 1086zip_after_state_fix(); 1087window.addEventListener('load', zip_after_state_fix());// JavaScript Document 1088 1089/*! 1090 * jQuery UI Menu 1.13.2 1091 * http://jqueryui.com 1092 * 1093 * Copyright jQuery Foundation and other contributors 1094 * Released under the MIT license. 1095 * http://jquery.org/license 1096 */ 1097!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./core"],e):e(jQuery)}(function(a){"use strict";return a.widget("ui.menu",{version:"1.13.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault(),this._activateItem(e)},"click .ui-menu-item":function(e){var t=a(e.target),i=a(a.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this._menuItems().first();t||this.focus(e,i)},blur:function(e){this._delay(function(){a.contains(this.element[0],a.ui.safeActiveElement(this.document[0]))||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e,!0),this.mouseHandled=!1}})},_activateItem:function(e){var t,i;this.previousFilter||e.clientX===this.lastMousePosition.x&&e.clientY===this.lastMousePosition.y||(this.lastMousePosition={x:e.clientX,y:e.clientY},t=a(e.target).closest(".ui-menu-item"),i=a(e.currentTarget),t[0]!==i[0]||i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,i)))},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=a(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var t,i,s,n=!0;switch(e.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(e);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case a.ui.keyCode.HOME:this._move("first","first",e);break;case a.ui.keyCode.END:this._move("last","last",e);break;case a.ui.keyCode.UP:this.previous(e);break;case a.ui.keyCode.DOWN:this.next(e);break;case a.ui.keyCode.LEFT:this.collapse(e);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(e);break;case a.ui.keyCode.ESCAPE:this.collapse(e);break;default:t=this.previousFilter||"",s=n=!1,i=96<=e.keyCode&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),i===t?s=!0:i=t+i,t=this._filterMenuItems(i),(t=s&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(i=String.fromCharCode(e.keyCode),t=this._filterMenuItems(i)),t.length?(this.focus(e,t),this.previousFilter=i,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}n&&e.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var e,t,s=this,n=this.options.icons.submenu,i=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=i.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=a(this),t=e.prev(),i=a("<span>").data("ui-menu-submenu-caret",!0);s._addClass(i,"ui-menu-icon","ui-icon "+n),t.attr("aria-haspopup","true").prepend(i),e.attr("aria-labelledby",t.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(e=i.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=a(this);s._isDivider(e)&&s._addClass(e,"ui-menu-divider","ui-widget-content")}),t=(i=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(t,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!
vendor: 5,150 bytes, line 1097
1097a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){var i;"icons"===e&&(i=this.element.find(".ui-menu-icon"),this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,t.submenu)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),i=this.active.children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",i.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,i,s;this._hasScroll()&&(t=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,t=e.offset().top-this.activeMenu.offset().top-t-i,i=this.activeMenu.scrollTop(),s=this.activeMenu.height(),e=e.outerHeight(),t<0?this.activeMenu.scrollTop(i+t):s<t+e&&this.activeMenu.scrollTop(i+t-s+e))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(e){var t=a.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(t)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var e=i?this.element:a(t&&t.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element),this._close(e),this.blur(t),this._removeClass(e.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=e},i?0:this.delay)},_close:function(e){(e=e||(this.active?this.active.parent():this.element)).find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!a(e.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this._menuItems(this.active.children(".ui-menu")).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(e){return(e||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(e,t,i){var s;(s=this.active?"first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").last():this.active[e+"All"](".ui-menu-item").first():s)&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[t]()),this.focus(i,s)},nextPage:function(e){var t,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===a.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(t=a(this)).offset().top-i-s<0}),this.focus(e,t)):this.focus(e,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var t,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===a.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(t=a(this)).offset().top-i+s}),this.focus(e,t)):this.focus(e,this._menuItems(this.activeMenu).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||a(e.target).closest(".ui-menu-item");var t={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,t)},_filterMenuItems:function(e){var e=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),t=new RegExp("^"+e,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return t.test(String.prototype.trim.call(a(this).children(".ui-menu-item-wrapper").text()))})}})});// JavaScript Document
vendor: 23,216 bytes, lines 1098-2044
1098/** 1099 * Owl Carousel v2.3.4 1100 * Copyright 2013-2018 David Deutsch 1101 * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 1102 */ 1103/** 1104 * Owl carousel 1105 * @version 2.3.4 1106 * @author Bartosz Wojciechowski 1107 * @author David Deutsch 1108 * @license The MIT License (MIT) 1109 * @todo Lazy Load Icon 1110 * @todo prevent animationend bubling 1111 * @todo itemsScaleUp 1112 * @todo Test Zepto 1113 * @todo stagePadding calculate wrong active classes 1114 */ 1115;(function($, window, document, undefined) { 1116 1117 /** 1118 * Creates a carousel. 1119 * @class The Owl Carousel. 1120 * @public 1121 * @param {HTMLElement|jQuery} element - The element to create the carousel for. 1122 * @param {Object} [options] - The options 1123 */ 1124 function Owl(element, options) { 1125 1126 /** 1127 * Current settings for the carousel. 1128 * @public 1129 */ 1130 this.settings = null; 1131 1132 /** 1133 * Current options set by the caller including defaults. 1134 * @public 1135 */ 1136 this.options = $.extend({}, Owl.Defaults, options); 1137 1138 /** 1139 * Plugin element. 1140 * @public 1141 */ 1142 this.$element = $(element); 1143 1144 /** 1145 * Proxied event handlers. 1146 * @protected 1147 */ 1148 this._handlers = {}; 1149 1150 /** 1151 * References to the running plugins of this carousel. 1152 * @protected 1153 */ 1154 this._plugins = {}; 1155 1156 /** 1157 * Currently suppressed events to prevent them from being retriggered. 1158 * @protected 1159 */ 1160 this._supress = {}; 1161 1162 /** 1163 * Absolute current position. 1164 * @protected 1165 */ 1166 this._current = null; 1167 1168 /** 1169 * Animation speed in milliseconds. 1170 * @protected 1171 */ 1172 this._speed = null; 1173 1174 /** 1175 * Coordinates of all items in pixel. 1176 * @todo The name of this member is missleading. 1177 * @protected 1178 */ 1179 this._coordinates = []; 1180 1181 /** 1182 * Current breakpoint. 1183 * @todo Real media queries would be nice. 1184 * @protected 1185 */ 1186 this._breakpoint = null; 1187 1188 /** 1189 * Current width of the plugin element. 1190 */ 1191 this._width = null; 1192 1193 /** 1194 * All real items. 1195 * @protected 1196 */ 1197 this._items = []; 1198 1199 /** 1200 * All cloned items. 1201 * @protected 1202 */ 1203 this._clones = []; 1204 1205 /** 1206 * Merge values of all items. 1207 * @todo Maybe this could be part of a plugin. 1208 * @protected 1209 */ 1210 this._mergers = []; 1211 1212 /** 1213 * Widths of all items. 1214 */ 1215 this._widths = []; 1216 1217 /** 1218 * Invalidated parts within the update process. 1219 * @protected 1220 */ 1221 this._invalidated = {}; 1222 1223 /** 1224 * Ordered list of workers for the update process. 1225 * @protected 1226 */ 1227 this._pipe = []; 1228 1229 /** 1230 * Current state information for the drag operation. 1231 * @todo #261 1232 * @protected 1233 */ 1234 this._drag = { 1235 time: null, 1236 target: null, 1237 pointer: null, 1238 stage: { 1239 start: null, 1240 current: null 1241 }, 1242 direction: null 1243 }; 1244 1245 /** 1246 * Current state information and their tags. 1247 * @type {Object} 1248 * @protected 1249 */ 1250 this._states = { 1251 current: {}, 1252 tags: { 1253 'initializing': [ 'busy' ], 1254 'animating': [ 'busy' ], 1255 'dragging': [ 'interacting' ] 1256 } 1257 }; 1258 1259 $.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler) { 1260 this._handlers[handler] = $.proxy(this[handler], this); 1261 }, this)); 1262 1263 $.each(Owl.Plugins, $.proxy(function(key, plugin) { 1264 this._plugins[key.charAt(0).toLowerCase() + key.slice(1)] 1265 = new plugin(this); 1266 }, this)); 1267 1268 $.each(Owl.Workers, $.proxy(function(priority, worker) { 1269 this._pipe.push({ 1270 'filter': worker.filter, 1271 'run': $.proxy(worker.run, this) 1272 }); 1273 }, this)); 1274 1275 this.setup(); 1276 this.initialize(); 1277 } 1278 1279 /** 1280 * Default options for the carousel. 1281 * @public 1282 */ 1283 Owl.Defaults = { 1284 items: 3, 1285 loop: false, 1286 center: false, 1287 rewind: false, 1288 checkVisibility: true, 1289 1290 mouseDrag: true, 1291 touchDrag: true, 1292 pullDrag: true, 1293 freeDrag: false, 1294 1295 margin: 0, 1296 stagePadding: 0, 1297 1298 merge: false, 1299 mergeFit: true, 1300 autoWidth: false, 1301 1302 startPosition: 0, 1303 rtl: false, 1304 1305 smartSpeed: 250, 1306 fluidSpeed: false, 1307 dragEndSpeed: false, 1308 1309 responsive: {}, 1310 responsiveRefreshRate: 200, 1311 responsiveBaseElement: window, 1312 1313 fallbackEasing: 'swing', 1314 slideTransition: '', 1315 1316 info: false, 1317 1318 nestedItemSelector: false, 1319 itemElement: 'div', 1320 stageElement: 'div', 1321 1322 refreshClass: 'owl-refresh', 1323 loadedClass: 'owl-loaded', 1324 loadingClass: 'owl-loading', 1325 rtlClass: 'owl-rtl', 1326 responsiveClass: 'owl-responsive', 1327 dragClass: 'owl-drag', 1328 itemClass: 'owl-item', 1329 stageClass: 'owl-stage', 1330 stageOuterClass: 'owl-stage-outer', 1331 grabClass: 'owl-grab' 1332 }; 1333 1334 /** 1335 * Enumeration for width. 1336 * @public 1337 * @readonly 1338 * @enum {String} 1339 */ 1340 Owl.Width = { 1341 Default: 'default', 1342 Inner: 'inner', 1343 Outer: 'outer' 1344 }; 1345 1346 /** 1347 * Enumeration for types. 1348 * @public 1349 * @readonly 1350 * @enum {String} 1351 */ 1352 Owl.Type = { 1353 Event: 'event', 1354 State: 'state' 1355 }; 1356 1357 /** 1358 * Contains all registered plugins. 1359 * @public 1360 */ 1361 Owl.Plugins = {}; 1362 1363 /** 1364 * List of workers involved in the update process. 1365 */ 1366 Owl.Workers = [ { 1367 filter: [ 'width', 'settings' ], 1368 run: function() { 1369 this._width = this.$element.width(); 1370 } 1371 }, { 1372 filter: [ 'width', 'items', 'settings' ], 1373 run: function(cache) { 1374 cache.current = this._items && this._items[this.relative(this._current)]; 1375 } 1376 }, { 1377 filter: [ 'items', 'settings' ], 1378 run: function() { 1379 this.$stage.children('.cloned').remove(); 1380 } 1381 }, { 1382 filter: [ 'width', 'items', 'settings' ], 1383 run: function(cache) { 1384 var margin = this.settings.margin || '', 1385 grid = !this.settings.autoWidth, 1386 rtl = this.settings.rtl, 1387 css = { 1388 'width': 'auto', 1389 'margin-left': rtl ? margin : '', 1390 'margin-right': rtl ? '' : margin 1391 }; 1392 1393 !grid && this.$stage.children().css(css); 1394 1395 cache.css = css; 1396 } 1397 }, { 1398 filter: [ 'width', 'items', 'settings' ], 1399 run: function(cache) { 1400 var width = (this.width() / this.settings.items).toFixed(3) - this.settings.margin, 1401 merge = null, 1402 iterator = this._items.length, 1403 grid = !this.settings.autoWidth, 1404 widths = []; 1405 1406 cache.items = { 1407 merge: false, 1408 width: width 1409 }; 1410 1411 while (iterator--) { 1412 merge = this._mergers[iterator]; 1413 merge = this.settings.mergeFit && Math.min(merge, this.settings.items) || merge; 1414 1415 cache.items.merge = merge > 1 || cache.items.merge; 1416 1417 widths[iterator] = !grid ? this._items[iterator].width() : width * merge; 1418 } 1419 1420 this._widths = widths; 1421 } 1422 }, { 1423 filter: [ 'items', 'settings' ], 1424 run: function() { 1425 var clones = [], 1426 items = this._items, 1427 settings = this.settings, 1428 // TODO: Should be computed from number of min width items in stage 1429 view = Math.max(settings.items * 2, 4), 1430 size = Math.ceil(items.length / 2) * 2, 1431 repeat = settings.loop && items.length ? settings.rewind ? view : Math.max(view, size) : 0, 1432 append = '', 1433 prepend = ''; 1434 1435 repeat /= 2; 1436 1437 while (repeat > 0) { 1438 // Switch to only using appended clones 1439 clones.push(this.normalize(clones.length / 2, true)); 1440 append = append + items[clones[clones.length - 1]][0].outerHTML; 1441 clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true)); 1442 prepend = items[clones[clones.length - 1]][0].outerHTML + prepend; 1443 repeat -= 1; 1444 } 1445 1446 this._clones = clones; 1447 1448 $(append).addClass('cloned').appendTo(this.$stage); 1449 $(prepend).addClass('cloned').prependTo(this.$stage); 1450 } 1451 }, { 1452 filter: [ 'width', 'items', 'settings' ], 1453 run: function() { 1454 var rtl = this.settings.rtl ? 1 : -1, 1455 size = this._clones.length + this._items.length, 1456 iterator = -1, 1457 previous = 0, 1458 current = 0, 1459 coordinates = []; 1460 1461 while (++iterator < size) { 1462 previous = coordinates[iterator - 1] || 0; 1463 current = this._widths[this.relative(iterator)] + this.settings.margin; 1464 coordinates.push(previous + current * rtl); 1465 } 1466 1467 this._coordinates = coordinates; 1468 } 1469 }, { 1470 filter: [ 'width', 'items', 'settings' ], 1471 run: function() { 1472 var padding = this.settings.stagePadding, 1473 coordinates = this._coordinates, 1474 css = { 1475 'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2, 1476 'padding-left': padding || '', 1477 'padding-right': padding || '' 1478 }; 1479 1480 this.$stage.css(css); 1481 } 1482 }, { 1483 filter: [ 'width', 'items', 'settings' ], 1484 run: function(cache) { 1485 var iterator = this._coordinates.length, 1486 grid = !this.settings.autoWidth, 1487 items = this.$stage.children(); 1488 1489 if (grid && cache.items.merge) { 1490 while (iterator--) { 1491 cache.css.width = this._widths[this.relative(iterator)]; 1492 items.eq(iterator).css(cache.css); 1493 } 1494 } else if (grid) { 1495 cache.css.width = cache.items.width; 1496 items.css(cache.css); 1497 } 1498 } 1499 }, { 1500 filter: [ 'items' ], 1501 run: function() { 1502 this._coordinates.length < 1 && this.$stage.removeAttr('style'); 1503 } 1504 }, { 1505 filter: [ 'width', 'items', 'settings' ], 1506 run: function(cache) { 1507 cache.current = cache.current ? this.$stage.children().index(cache.current) : 0; 1508 cache.current = Math.max(this.minimum(), Math.min(this.maximum(), cache.current)); 1509 this.reset(cache.current); 1510 } 1511 }, { 1512 filter: [ 'position' ], 1513 run: function() { 1514 this.animate(this.coordinates(this._current)); 1515 } 1516 }, { 1517 filter: [ 'width', 'position', 'items', 'settings' ], 1518 run: function() { 1519 var rtl = this.settings.rtl ? 1 : -1, 1520 padding = this.settings.stagePadding * 2, 1521 begin = this.coordinates(this.current()) + padding, 1522 end = begin + this.width() * rtl, 1523 inner, outer, matches = [], i, n; 1524 1525 for (i = 0, n = this._coordinates.length; i < n; i++) { 1526 inner = this._coordinates[i - 1] || 0; 1527 outer = Math.abs(this._coordinates[i]) + padding * rtl; 1528 1529 if ((this.op(inner, '<=', begin) && (this.op(inner, '>', end))) 1530 || (this.op(outer, '<', begin) && this.op(outer, '>', end))) { 1531 matches.push(i); 1532 } 1533 } 1534 1535 this.$stage.children('.active').removeClass('active'); 1536 this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active'); 1537 1538 this.$stage.children('.center').removeClass('center'); 1539 if (this.settings.center) { 1540 this.$stage.children().eq(this.current()).addClass('center'); 1541 } 1542 } 1543 } ]; 1544 1545 /** 1546 * Create the stage DOM element 1547 */ 1548 Owl.prototype.initializeStage = function() { 1549 this.$stage = this.$element.find('.' + this.settings.stageClass); 1550 1551 // if the stage is already in the DOM, grab it and skip stage initialization 1552 if (this.$stage.length) { 1553 return; 1554 } 1555 1556 this.$element.addClass(this.options.loadingClass); 1557 1558 // create stage 1559 this.$stage = $('<' + this.settings.stageElement + '>', { 1560 "class": this.settings.stageClass 1561 }).wrap( $( '<div/>', { 1562 "class": this.settings.stageOuterClass 1563 })); 1564 1565 // append stage 1566 this.$element.append(this.$stage.parent()); 1567 }; 1568 1569 /** 1570 * Create item DOM elements 1571 */ 1572 Owl.prototype.initializeItems = function() { 1573 var $items = this.$element.find('.owl-item'); 1574 1575 // if the items are already in the DOM, grab them and skip item initialization 1576 if ($items.length) { 1577 this._items = $items.get().map(function(item) { 1578 return $(item); 1579 }); 1580 1581 this._mergers = this._items.map(function() { 1582 return 1; 1583 }); 1584 1585 this.refresh(); 1586 1587 return; 1588 } 1589 1590 // append content 1591 this.replace(this.$element.children().not(this.$stage.parent())); 1592 1593 // check visibility 1594 if (this.isVisible()) { 1595 // update view 1596 this.refresh(); 1597 } else { 1598 // invalidate width 1599 this.invalidate('width'); 1600 } 1601 1602 this.$element 1603 .removeClass(this.options.loadingClass) 1604 .addClass(this.options.loadedClass); 1605 }; 1606 1607 /** 1608 * Initializes the carousel. 1609 * @protected 1610 */ 1611 Owl.prototype.initialize = function() { 1612 this.enter('initializing'); 1613 this.trigger('initialize'); 1614 1615 this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl); 1616 1617 if (this.settings.autoWidth && !this.is('pre-loading')) { 1618 var imgs, nestedSelector, width; 1619 imgs = this.$element.find('img'); 1620 nestedSelector = this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector : undefined; 1621 width = this.$element.children(nestedSelector).width(); 1622 1623 if (imgs.length && width <= 0) { 1624 this.preloadAutoWidthImages(imgs); 1625 } 1626 } 1627 1628 this.initializeStage(); 1629 this.initializeItems(); 1630 1631 // register event handlers 1632 this.registerEventHandlers(); 1633 1634 this.leave('initializing'); 1635 this.trigger('initialized'); 1636 }; 1637 1638 /** 1639 * @returns {Boolean} visibility of $element 1640 * if you know the carousel will always be visible you can set `checkVisibility` to `false` to 1641 * prevent the expensive browser layout forced reflow the $element.is(':visible') does 1642 */ 1643 Owl.prototype.isVisible = function() { 1644 return this.settings.checkVisibility 1645 ? this.$element.is(':visible') 1646 : true; 1647 }; 1648 1649 /** 1650 * Setups the current settings. 1651 * @todo Remove responsive classes. Why should adaptive designs be brought into IE8? 1652 * @todo Support for media queries by using `matchMedia` would be nice. 1653 * @public 1654 */ 1655 Owl.prototype.setup = function() { 1656 var viewport = this.viewport(), 1657 overwrites = this.options.responsive, 1658 match = -1, 1659 settings = null; 1660 1661 if (!overwrites) { 1662 settings = $.extend({}, this.options); 1663 } else { 1664 $.each(overwrites, function(breakpoint) { 1665 if (breakpoint <= viewport && breakpoint > match) { 1666 match = Number(breakpoint); 1667 } 1668 }); 1669 1670 settings = $.extend({}, this.options, overwrites[match]); 1671 if (typeof settings.stagePadding === 'function') { 1672 settings.stagePadding = settings.stagePadding(); 1673 } 1674 delete settings.responsive; 1675 1676 // responsive class 1677 if (settings.responsiveClass) { 1678 this.$element.attr('class', 1679 this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match) 1680 ); 1681 } 1682 } 1683 1684 this.trigger('change', { property: { name: 'settings', value: settings } }); 1685 this._breakpoint = match; 1686 this.settings = settings; 1687 this.invalidate('settings'); 1688 this.trigger('changed', { property: { name: 'settings', value: this.settings } }); 1689 }; 1690 1691 /** 1692 * Updates option logic if necessery. 1693 * @protected 1694 */ 1695 Owl.prototype.optionsLogic = function() { 1696 if (this.settings.autoWidth) { 1697 this.settings.stagePadding = false; 1698 this.settings.merge = false; 1699 } 1700 }; 1701 1702 /** 1703 * Prepares an item before add. 1704 * @todo Rename event parameter `content` to `item`. 1705 * @protected 1706 * @returns {jQuery|HTMLElement} - The item container. 1707 */ 1708 Owl.prototype.prepare = function(item) { 1709 var event = this.trigger('prepare', { content: item }); 1710 1711 if (!event.data) { 1712 event.data = $('<' + this.settings.itemElement + '/>') 1713 .addClass(this.options.itemClass).append(item) 1714 } 1715 1716 this.trigger('prepared', { content: event.data }); 1717 1718 return event.data; 1719 }; 1720 1721 /** 1722 * Updates the view. 1723 * @public 1724 */ 1725 Owl.prototype.update = function() { 1726 var i = 0, 1727 n = this._pipe.length, 1728 filter = $.proxy(function(p) { return this[p] }, this._invalidated), 1729 cache = {}; 1730 1731 while (i < n) { 1732 if (this._invalidated.all || $.grep(this._pipe[i].filter, filter).length > 0) { 1733 this._pipe[i].run(cache); 1734 } 1735 i++; 1736 } 1737 1738 this._invalidated = {}; 1739 1740 !this.is('valid') && this.enter('valid'); 1741 }; 1742 1743 /** 1744 * Gets the width of the view. 1745 * @public 1746 * @param {Owl.Width} [dimension=Owl.Width.Default] - The dimension to return. 1747 * @returns {Number} - The width of the view in pixel. 1748 */ 1749 Owl.prototype.width = function(dimension) { 1750 dimension = dimension || Owl.Width.Default; 1751 switch (dimension) { 1752 case Owl.Width.Inner: 1753 case Owl.Width.Outer: 1754 return this._width; 1755 default: 1756 return this._width - this.settings.stagePadding * 2 + this.settings.margin; 1757 } 1758 }; 1759 1760 /** 1761 * Refreshes the carousel primarily for adaptive purposes. 1762 * @public 1763 */ 1764 Owl.prototype.refresh = function() { 1765 this.enter('refreshing'); 1766 this.trigger('refresh'); 1767 1768 this.setup(); 1769 1770 this.optionsLogic(); 1771 1772 this.$element.addClass(this.options.refreshClass); 1773 1774 this.update(); 1775 1776 this.$element.removeClass(this.options.refreshClass); 1777 1778 this.leave('refreshing'); 1779 this.trigger('refreshed'); 1780 }; 1781 1782 /** 1783 * Checks window `resize` event. 1784 * @protected 1785 */ 1786 Owl.prototype.onThrottledResize = function() { 1787 window.clearTimeout(this.resizeTimer); 1788 this.resizeTimer = window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate); 1789 }; 1790 1791 /** 1792 * Checks window `resize` event. 1793 * @protected 1794 */ 1795 Owl.prototype.onResize = function() { 1796 if (!this._items.length) { 1797 return false; 1798 } 1799 1800 if (this._width === this.$element.width()) { 1801 return false; 1802 } 1803 1804 if (!this.isVisible()) { 1805 return false; 1806 } 1807 1808 this.enter('resizing'); 1809 1810 if (this.trigger('resize').isDefaultPrevented()) { 1811 this.leave('resizing'); 1812 return false; 1813 } 1814 1815 this.invalidate('width'); 1816 1817 this.refresh(); 1818 1819 this.leave('resizing'); 1820 this.trigger('resized'); 1821 }; 1822 1823 /** 1824 * Registers event handlers. 1825 * @todo Check `msPointerEnabled` 1826 * @todo #261 1827 * @protected 1828 */ 1829 Owl.prototype.registerEventHandlers = function() { 1830 if ($.support.transition) { 1831 this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this)); 1832 } 1833 1834 if (this.settings.responsive !== false) { 1835 this.on(window, 'resize', this._handlers.onThrottledResize); 1836 } 1837 1838 if (this.settings.mouseDrag) { 1839 this.$element.addClass(this.options.dragClass); 1840 this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this)); 1841 this.$stage.on('dragstart.owl.core selectstart.owl.core', function() { return false }); 1842 } 1843 1844 if (this.settings.touchDrag){ 1845 this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this)); 1846 this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this)); 1847 } 1848 }; 1849 1850 /** 1851 * Handles `touchstart` and `mousedown` events. 1852 * @todo Horizontal swipe threshold as option 1853 * @todo #261 1854 * @protected 1855 * @param {Event} event - The event arguments. 1856 */ 1857 Owl.prototype.onDragStart = function(event) { 1858 var stage = null; 1859 1860 if (event.which === 3) { 1861 return; 1862 } 1863 1864 if ($.support.transform) { 1865 stage = this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(','); 1866 stage = { 1867 x: stage[stage.length === 16 ? 12 : 4], 1868 y: stage[stage.length === 16 ? 13 : 5] 1869 }; 1870 } else { 1871 stage = this.$stage.position(); 1872 stage = { 1873 x: this.settings.rtl ? 1874 stage.left + this.$stage.width() - this.width() + this.settings.margin : 1875 stage.left, 1876 y: stage.top 1877 }; 1878 } 1879 1880 if (this.is('animating')) { 1881 $.support.transform ? this.animate(stage.x) : this.$stage.stop() 1882 this.invalidate('position'); 1883 } 1884 1885 this.$element.toggleClass(this.options.grabClass, event.type === 'mousedown'); 1886 1887 this.speed(0); 1888 1889 this._drag.time = new Date().getTime(); 1890 this._drag.target = $(event.target); 1891 this._drag.stage.start = stage; 1892 this._drag.stage.current = stage; 1893 this._drag.pointer = this.pointer(event); 1894 1895 $(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this)); 1896 1897 $(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event) { 1898 var delta = this.difference(this._drag.pointer, this.pointer(event)); 1899 1900 $(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this)); 1901 1902 if (Math.abs(delta.x) < Math.abs(delta.y) && this.is('valid')) { 1903 return; 1904 } 1905 1906 event.preventDefault(); 1907 1908 this.enter('dragging'); 1909 this.trigger('drag'); 1910 }, this)); 1911 }; 1912 1913 /** 1914 * Handles the `touchmove` and `mousemove` events. 1915 * @todo #261 1916 * @protected 1917 * @param {Event} event - The event arguments. 1918 */ 1919 Owl.prototype.onDragMove = function(event) { 1920 var minimum = null, 1921 maximum = null, 1922 pull = null, 1923 delta = this.difference(this._drag.pointer, this.pointer(event)), 1924 stage = this.difference(this._drag.stage.start, delta); 1925 1926 if (!this.is('dragging')) { 1927 return; 1928 } 1929 1930 event.preventDefault(); 1931 1932 if (this.settings.loop) { 1933 minimum = this.coordinates(this.minimum()); 1934 maximum = this.coordinates(this.maximum() + 1) - minimum; 1935 stage.x = (((stage.x - minimum) % maximum + maximum) % maximum) + minimum; 1936 } else { 1937 minimum = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum()); 1938 maximum = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum()); 1939 pull = this.settings.pullDrag ? -1 * delta.x / 5 : 0; 1940 stage.x = Math.max(Math.min(stage.x, minimum + pull), maximum + pull); 1941 } 1942 1943 this._drag.stage.current = stage; 1944 1945 this.animate(stage.x); 1946 }; 1947 1948 /** 1949 * Handles the `touchend` and `mouseup` events. 1950 * @todo #261 1951 * @todo Threshold for click event 1952 * @protected 1953 * @param {Event} event - The event arguments. 1954 */ 1955 Owl.prototype.onDragEnd = function(event) { 1956 var delta = this.difference(this._drag.pointer, this.pointer(event)), 1957 stage = this._drag.stage.current, 1958 direction = delta.x > 0 ^ this.settings.rtl ? 'left' : 'right'; 1959 1960 $(document).off('.owl.core'); 1961 1962 this.$element.removeClass(this.options.grabClass); 1963 1964 if (delta.x !== 0 && this.is('dragging') || !this.is('valid')) { 1965 this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed); 1966 this.current(this.closest(stage.x, delta.x !== 0 ? direction : this._drag.direction)); 1967 this.invalidate('position'); 1968 this.update(); 1969 1970 this._drag.direction = direction; 1971 1972 if (Math.abs(delta.x) > 3 || new Date().getTime() - this._drag.time > 300) { 1973 this._drag.target.one('click.owl.core', function() { return false; }); 1974 } 1975 } 1976 1977 if (!this.is('dragging')) { 1978 return; 1979 } 1980 1981 this.leave('dragging'); 1982 this.trigger('dragged'); 1983 }; 1984 1985 /** 1986 * Gets absolute position of the closest item for a coordinate. 1987 * @todo Setting `freeDrag` makes `closest` not reusable. See #165. 1988 * @protected 1989 * @param {Number} coordinate - The coordinate in pixel. 1990 * @param {String} direction - The direction to check for the closest item. Ether `left` or `right`. 1991 * @return {Number} - The absolute position of the closest item. 1992 */ 1993 Owl.prototype.closest = function(coordinate, direction) { 1994 var position = -1, 1995 pull = 30, 1996 width = this.width(), 1997 coordinates = this.coordinates(); 1998 1999 if (!this.settings.freeDrag) { 2000 // check closest item 2001 $.each(coordinates, $.proxy(function(index, value) { 2002 // on a left pull, check on current index 2003 if (direction === 'left' && coordinate > value - pull && coordinate < value + pull) { 2004 position = index; 2005 // on a right pull, check on previous index 2006 // to do so, subtract width from value and set position = index + 1 2007 } else if (direction === 'right' && coordinate > value - width - pull && coordinate < value - width + pull) { 2008 position = index + 1; 2009 } else if (this.op(coordinate, '<', value) 2010 && this.op(coordinate, '>', coordinates[index + 1] !== undefined ? coordinates[index + 1] : value - width)) { 2011 position = direction === 'left' ? index + 1 : index; 2012 } 2013 return position === -1; 2014 }, this)); 2015 } 2016 2017 if (!this.settings.loop) { 2018 // non loop boundries 2019 if (this.op(coordinate, '>', coordinates[this.minimum()])) { 2020 position = coordinate = this.minimum(); 2021 } else if (this.op(coordinate, '<', coordinates[this.maximum()])) { 2022 position = coordinate = this.maximum(); 2023 } 2024 } 2025 2026 return position; 2027 }; 2028 2029 /** 2030 * Animates the stage. 2031 * @todo #270 2032 * @public 2033 * @param {Number} coordinate - The coordinate in pixels. 2034 */ 2035 Owl.prototype.animate = function(coordinate) { 2036 var animate = this.speed() > 0; 2037 2038 this.is('animating') && this.onTransitionEnd(); 2039 2040 if (animate) { 2041 this.enter('animating'); 2042 this.trigger('translate'); 2043 } 2044
vendor: 10,524 bytes, lines 2045-2412
2045 if ($.support.transform3d && $.support.transition) { 2046 this.$stage.css({ 2047 transform: 'translate3d(' + coordinate + 'px,0px,0px)', 2048 transition: (this.speed() / 1000) + 's' + ( 2049 this.settings.slideTransition ? ' ' + this.settings.slideTransition : '' 2050 ) 2051 }); 2052 } else if (animate) { 2053 this.$stage.animate({ 2054 left: coordinate + 'px' 2055 }, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this)); 2056 } else { 2057 this.$stage.css({ 2058 left: coordinate + 'px' 2059 }); 2060 } 2061 }; 2062 2063 /** 2064 * Checks whether the carousel is in a specific state or not. 2065 * @param {String} state - The state to check. 2066 * @returns {Boolean} - The flag which indicates if the carousel is busy. 2067 */ 2068 Owl.prototype.is = function(state) { 2069 return this._states.current[state] && this._states.current[state] > 0; 2070 }; 2071 2072 /** 2073 * Sets the absolute position of the current item. 2074 * @public 2075 * @param {Number} [position] - The new absolute position or nothing to leave it unchanged. 2076 * @returns {Number} - The absolute position of the current item. 2077 */ 2078 Owl.prototype.current = function(position) { 2079 if (position === undefined) { 2080 return this._current; 2081 } 2082 2083 if (this._items.length === 0) { 2084 return undefined; 2085 } 2086 2087 position = this.normalize(position); 2088 2089 if (this._current !== position) { 2090 var event = this.trigger('change', { property: { name: 'position', value: position } }); 2091 2092 if (event.data !== undefined) { 2093 position = this.normalize(event.data); 2094 } 2095 2096 this._current = position; 2097 2098 this.invalidate('position'); 2099 2100 this.trigger('changed', { property: { name: 'position', value: this._current } }); 2101 } 2102 2103 return this._current; 2104 }; 2105 2106 /** 2107 * Invalidates the given part of the update routine. 2108 * @param {String} [part] - The part to invalidate. 2109 * @returns {Array.<String>} - The invalidated parts. 2110 */ 2111 Owl.prototype.invalidate = function(part) { 2112 if ($.type(part) === 'string') { 2113 this._invalidated[part] = true; 2114 this.is('valid') && this.leave('valid'); 2115 } 2116 return $.map(this._invalidated, function(v, i) { return i }); 2117 }; 2118 2119 /** 2120 * Resets the absolute position of the current item. 2121 * @public 2122 * @param {Number} position - The absolute position of the new item. 2123 */ 2124 Owl.prototype.reset = function(position) { 2125 position = this.normalize(position); 2126 2127 if (position === undefined) { 2128 return; 2129 } 2130 2131 this._speed = 0; 2132 this._current = position; 2133 2134 this.suppress([ 'translate', 'translated' ]); 2135 2136 this.animate(this.coordinates(position)); 2137 2138 this.release([ 'translate', 'translated' ]); 2139 }; 2140 2141 /** 2142 * Normalizes an absolute or a relative position of an item. 2143 * @public 2144 * @param {Number} position - The absolute or relative position to normalize. 2145 * @param {Boolean} [relative=false] - Whether the given position is relative or not. 2146 * @returns {Number} - The normalized position. 2147 */ 2148 Owl.prototype.normalize = function(position, relative) { 2149 var n = this._items.length, 2150 m = relative ? 0 : this._clones.length; 2151 2152 if (!this.isNumeric(position) || n < 1) { 2153 position = undefined; 2154 } else if (position < 0 || position >= n + m) { 2155 position = ((position - m / 2) % n + n) % n + m / 2; 2156 } 2157 2158 return position; 2159 }; 2160 2161 /** 2162 * Converts an absolute position of an item into a relative one. 2163 * @public 2164 * @param {Number} position - The absolute position to convert. 2165 * @returns {Number} - The converted position. 2166 */ 2167 Owl.prototype.relative = function(position) { 2168 position -= this._clones.length / 2; 2169 return this.normalize(position, true); 2170 }; 2171 2172 /** 2173 * Gets the maximum position for the current item. 2174 * @public 2175 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position. 2176 * @returns {Number} 2177 */ 2178 Owl.prototype.maximum = function(relative) { 2179 var settings = this.settings, 2180 maximum = this._coordinates.length, 2181 iterator, 2182 reciprocalItemsWidth, 2183 elementWidth; 2184 2185 if (settings.loop) { 2186 maximum = this._clones.length / 2 + this._items.length - 1; 2187 } else if (settings.autoWidth || settings.merge) { 2188 iterator = this._items.length; 2189 if (iterator) { 2190 reciprocalItemsWidth = this._items[--iterator].width(); 2191 elementWidth = this.$element.width(); 2192 while (iterator--) { 2193 reciprocalItemsWidth += this._items[iterator].width() + this.settings.margin; 2194 if (reciprocalItemsWidth > elementWidth) { 2195 break; 2196 } 2197 } 2198 } 2199 maximum = iterator + 1; 2200 } else if (settings.center) { 2201 maximum = this._items.length - 1; 2202 } else { 2203 maximum = this._items.length - settings.items; 2204 } 2205 2206 if (relative) { 2207 maximum -= this._clones.length / 2; 2208 } 2209 2210 return Math.max(maximum, 0); 2211 }; 2212 2213 /** 2214 * Gets the minimum position for the current item. 2215 * @public 2216 * @param {Boolean} [relative=false] - Whether to return an absolute position or a relative position. 2217 * @returns {Number} 2218 */ 2219 Owl.prototype.minimum = function(relative) { 2220 return relative ? 0 : this._clones.length / 2; 2221 }; 2222 2223 /** 2224 * Gets an item at the specified relative position. 2225 * @public 2226 * @param {Number} [position] - The relative position of the item. 2227 * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given. 2228 */ 2229 Owl.prototype.items = function(position) { 2230 if (position === undefined) { 2231 return this._items.slice(); 2232 } 2233 2234 position = this.normalize(position, true); 2235 return this._items[position]; 2236 }; 2237 2238 /** 2239 * Gets an item at the specified relative position. 2240 * @public 2241 * @param {Number} [position] - The relative position of the item. 2242 * @return {jQuery|Array.<jQuery>} - The item at the given position or all items if no position was given. 2243 */ 2244 Owl.prototype.mergers = function(position) { 2245 if (position === undefined) { 2246 return this._mergers.slice(); 2247 } 2248 2249 position = this.normalize(position, true); 2250 return this._mergers[position]; 2251 }; 2252 2253 /** 2254 * Gets the absolute positions of clones for an item. 2255 * @public 2256 * @param {Number} [position] - The relative position of the item. 2257 * @returns {Array.<Number>} - The absolute positions of clones for the item or all if no position was given. 2258 */ 2259 Owl.prototype.clones = function(position) { 2260 var odd = this._clones.length / 2, 2261 even = odd + this._items.length, 2262 map = function(index) { return index % 2 === 0 ? even + index / 2 : odd - (index + 1) / 2 }; 2263 2264 if (position === undefined) { 2265 return $.map(this._clones, function(v, i) { return map(i) }); 2266 } 2267 2268 return $.map(this._clones, function(v, i) { return v === position ? map(i) : null }); 2269 }; 2270 2271 /** 2272 * Sets the current animation speed. 2273 * @public 2274 * @param {Number} [speed] - The animation speed in milliseconds or nothing to leave it unchanged. 2275 * @returns {Number} - The current animation speed in milliseconds. 2276 */ 2277 Owl.prototype.speed = function(speed) { 2278 if (speed !== undefined) { 2279 this._speed = speed; 2280 } 2281 2282 return this._speed; 2283 }; 2284 2285 /** 2286 * Gets the coordinate of an item. 2287 * @todo The name of this method is missleanding. 2288 * @public 2289 * @param {Number} position - The absolute position of the item within `minimum()` and `maximum()`. 2290 * @returns {Number|Array.<Number>} - The coordinate of the item in pixel or all coordinates. 2291 */ 2292 Owl.prototype.coordinates = function(position) { 2293 var multiplier = 1, 2294 newPosition = position - 1, 2295 coordinate; 2296 2297 if (position === undefined) { 2298 return $.map(this._coordinates, $.proxy(function(coordinate, index) { 2299 return this.coordinates(index); 2300 }, this)); 2301 } 2302 2303 if (this.settings.center) { 2304 if (this.settings.rtl) { 2305 multiplier = -1; 2306 newPosition = position + 1; 2307 } 2308 2309 coordinate = this._coordinates[position]; 2310 coordinate += (this.width() - coordinate + (this._coordinates[newPosition] || 0)) / 2 * multiplier; 2311 } else { 2312 coordinate = this._coordinates[newPosition] || 0; 2313 } 2314 2315 coordinate = Math.ceil(coordinate); 2316 2317 return coordinate; 2318 }; 2319 2320 /** 2321 * Calculates the speed for a translation. 2322 * @protected 2323 * @param {Number} from - The absolute position of the start item. 2324 * @param {Number} to - The absolute position of the target item. 2325 * @param {Number} [factor=undefined] - The time factor in milliseconds. 2326 * @returns {Number} - The time in milliseconds for the translation. 2327 */ 2328 Owl.prototype.duration = function(from, to, factor) { 2329 if (factor === 0) { 2330 return 0; 2331 } 2332 2333 return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor || this.settings.smartSpeed)); 2334 }; 2335 2336 /** 2337 * Slides to the specified item. 2338 * @public 2339 * @param {Number} position - The position of the item. 2340 * @param {Number} [speed] - The time in milliseconds for the transition. 2341 */ 2342 Owl.prototype.to = function(position, speed) { 2343 var current = this.current(), 2344 revert = null, 2345 distance = position - this.relative(current), 2346 direction = (distance > 0) - (distance < 0), 2347 items = this._items.length, 2348 minimum = this.minimum(), 2349 maximum = this.maximum(); 2350 2351 if (this.settings.loop) { 2352 if (!this.settings.rewind && Math.abs(distance) > items / 2) { 2353 distance += direction * -1 * items; 2354 } 2355 2356 position = current + distance; 2357 revert = ((position - minimum) % items + items) % items + minimum; 2358 2359 if (revert !== position && revert - distance <= maximum && revert - distance > 0) { 2360 current = revert - distance; 2361 position = revert; 2362 this.reset(current); 2363 } 2364 } else if (this.settings.rewind) { 2365 maximum += 1; 2366 position = (position % maximum + maximum) % maximum; 2367 } else { 2368 position = Math.max(minimum, Math.min(maximum, position)); 2369 } 2370 2371 this.speed(this.duration(current, position, speed)); 2372 this.current(position); 2373 2374 if (this.isVisible()) { 2375 this.update(); 2376 } 2377 }; 2378 2379 /** 2380 * Slides to the next item. 2381 * @public 2382 * @param {Number} [speed] - The time in milliseconds for the transition. 2383 */ 2384 Owl.prototype.next = function(speed) { 2385 speed = speed || false; 2386 this.to(this.relative(this.current()) + 1, speed); 2387 }; 2388 2389 /** 2390 * Slides to the previous item. 2391 * @public 2392 * @param {Number} [speed] - The time in milliseconds for the transition. 2393 */ 2394 Owl.prototype.prev = function(speed) { 2395 speed = speed || false; 2396 this.to(this.relative(this.current()) - 1, speed); 2397 }; 2398 2399 /** 2400 * Handles the end of an animation. 2401 * @protected 2402 * @param {Event} event - The event arguments. 2403 */ 2404 Owl.prototype.onTransitionEnd = function(event) { 2405 2406 // if css2 animation then event object is undefined 2407 if (event !== undefined) { 2408 event.stopPropagation(); 2409 2410 // Catch only owl-stage transitionEnd event 2411 if ((event.target || event.srcElement || event.originalTarget) !== this.$stage.get(0)) { 2412 return false;
vendor: 22,957 bytes, lines 2413-3261
2413 } 2414 } 2415 2416 this.leave('animating'); 2417 this.trigger('translated'); 2418 }; 2419 2420 /** 2421 * Gets viewport width. 2422 * @protected 2423 * @return {Number} - The width in pixel. 2424 */ 2425 Owl.prototype.viewport = function() { 2426 var width; 2427 if (this.options.responsiveBaseElement !== window) { 2428 width = $(this.options.responsiveBaseElement).width(); 2429 } else if (window.innerWidth) { 2430 width = window.innerWidth; 2431 } else if (document.documentElement && document.documentElement.clientWidth) { 2432 width = document.documentElement.clientWidth; 2433 } else { 2434 console.warn('Can not detect viewport width.'); 2435 } 2436 return width; 2437 }; 2438 2439 /** 2440 * Replaces the current content. 2441 * @public 2442 * @param {HTMLElement|jQuery|String} content - The new content. 2443 */ 2444 Owl.prototype.replace = function(content) { 2445 this.$stage.empty(); 2446 this._items = []; 2447 2448 if (content) { 2449 content = (content instanceof jQuery) ? content : $(content); 2450 } 2451 2452 if (this.settings.nestedItemSelector) { 2453 content = content.find('.' + this.settings.nestedItemSelector); 2454 } 2455 2456 content.filter(function() { 2457 return this.nodeType === 1; 2458 }).each($.proxy(function(index, item) { 2459 item = this.prepare(item); 2460 this.$stage.append(item); 2461 this._items.push(item); 2462 this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1); 2463 }, this)); 2464 2465 this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0); 2466 2467 this.invalidate('items'); 2468 }; 2469 2470 /** 2471 * Adds an item. 2472 * @todo Use `item` instead of `content` for the event arguments. 2473 * @public 2474 * @param {HTMLElement|jQuery|String} content - The item content to add. 2475 * @param {Number} [position] - The relative position at which to insert the item otherwise the item will be added to the end. 2476 */ 2477 Owl.prototype.add = function(content, position) { 2478 var current = this.relative(this._current); 2479 2480 position = position === undefined ? this._items.length : this.normalize(position, true); 2481 content = content instanceof jQuery ? content : $(content); 2482 2483 this.trigger('add', { content: content, position: position }); 2484 2485 content = this.prepare(content); 2486 2487 if (this._items.length === 0 || position === this._items.length) { 2488 this._items.length === 0 && this.$stage.append(content); 2489 this._items.length !== 0 && this._items[position - 1].after(content); 2490 this._items.push(content); 2491 this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1); 2492 } else { 2493 this._items[position].before(content); 2494 this._items.splice(position, 0, content); 2495 this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1 || 1); 2496 } 2497 2498 this._items[current] && this.reset(this._items[current].index()); 2499 2500 this.invalidate('items'); 2501 2502 this.trigger('added', { content: content, position: position }); 2503 }; 2504 2505 /** 2506 * Removes an item by its position. 2507 * @todo Use `item` instead of `content` for the event arguments. 2508 * @public 2509 * @param {Number} position - The relative position of the item to remove. 2510 */ 2511 Owl.prototype.remove = function(position) { 2512 position = this.normalize(position, true); 2513 2514 if (position === undefined) { 2515 return; 2516 } 2517 2518 this.trigger('remove', { content: this._items[position], position: position }); 2519 2520 this._items[position].remove(); 2521 this._items.splice(position, 1); 2522 this._mergers.splice(position, 1); 2523 2524 this.invalidate('items'); 2525 2526 this.trigger('removed', { content: null, position: position }); 2527 }; 2528 2529 /** 2530 * Preloads images with auto width. 2531 * @todo Replace by a more generic approach 2532 * @protected 2533 */ 2534 Owl.prototype.preloadAutoWidthImages = function(images) { 2535 images.each($.proxy(function(i, element) { 2536 this.enter('pre-loading'); 2537 element = $(element); 2538 $(new Image()).one('load', $.proxy(function(e) { 2539 element.attr('src', e.target.src); 2540 element.css('opacity', 1); 2541 this.leave('pre-loading'); 2542 !this.is('pre-loading') && !this.is('initializing') && this.refresh(); 2543 }, this)).attr('src', element.attr('src') || element.attr('data-src') || element.attr('data-src-retina')); 2544 }, this)); 2545 }; 2546 2547 /** 2548 * Destroys the carousel. 2549 * @public 2550 */ 2551 Owl.prototype.destroy = function() { 2552 2553 this.$element.off('.owl.core'); 2554 this.$stage.off('.owl.core'); 2555 $(document).off('.owl.core'); 2556 2557 if (this.settings.responsive !== false) { 2558 window.clearTimeout(this.resizeTimer); 2559 this.off(window, 'resize', this._handlers.onThrottledResize); 2560 } 2561 2562 for (var i in this._plugins) { 2563 this._plugins[i].destroy(); 2564 } 2565 2566 this.$stage.children('.cloned').remove(); 2567 2568 this.$stage.unwrap(); 2569 this.$stage.children().contents().unwrap(); 2570 this.$stage.children().unwrap(); 2571 this.$stage.remove(); 2572 this.$element 2573 .removeClass(this.options.refreshClass) 2574 .removeClass(this.options.loadingClass) 2575 .removeClass(this.options.loadedClass) 2576 .removeClass(this.options.rtlClass) 2577 .removeClass(this.options.dragClass) 2578 .removeClass(this.options.grabClass) 2579 .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), '')) 2580 .removeData('owl.carousel'); 2581 }; 2582 2583 /** 2584 * Operators to calculate right-to-left and left-to-right. 2585 * @protected 2586 * @param {Number} [a] - The left side operand. 2587 * @param {String} [o] - The operator. 2588 * @param {Number} [b] - The right side operand. 2589 */ 2590 Owl.prototype.op = function(a, o, b) { 2591 var rtl = this.settings.rtl; 2592 switch (o) { 2593 case '<': 2594 return rtl ? a > b : a < b; 2595 case '>': 2596 return rtl ? a < b : a > b; 2597 case '>=': 2598 return rtl ? a <= b : a >= b; 2599 case '<=': 2600 return rtl ? a >= b : a <= b; 2601 default: 2602 break; 2603 } 2604 }; 2605 2606 /** 2607 * Attaches to an internal event. 2608 * @protected 2609 * @param {HTMLElement} element - The event source. 2610 * @param {String} event - The event name. 2611 * @param {Function} listener - The event handler to attach. 2612 * @param {Boolean} capture - Wether the event should be handled at the capturing phase or not. 2613 */ 2614 Owl.prototype.on = function(element, event, listener, capture) { 2615 if (element.addEventListener) { 2616 element.addEventListener(event, listener, capture); 2617 } else if (element.attachEvent) { 2618 element.attachEvent('on' + event, listener); 2619 } 2620 }; 2621 2622 /** 2623 * Detaches from an internal event. 2624 * @protected 2625 * @param {HTMLElement} element - The event source. 2626 * @param {String} event - The event name. 2627 * @param {Function} listener - The attached event handler to detach. 2628 * @param {Boolean} capture - Wether the attached event handler was registered as a capturing listener or not. 2629 */ 2630 Owl.prototype.off = function(element, event, listener, capture) { 2631 if (element.removeEventListener) { 2632 element.removeEventListener(event, listener, capture); 2633 } else if (element.detachEvent) { 2634 element.detachEvent('on' + event, listener); 2635 } 2636 }; 2637 2638 /** 2639 * Triggers a public event. 2640 * @todo Remove `status`, `relatedTarget` should be used instead. 2641 * @protected 2642 * @param {String} name - The event name. 2643 * @param {*} [data=null] - The event data. 2644 * @param {String} [namespace=carousel] - The event namespace. 2645 * @param {String} [state] - The state which is associated with the event. 2646 * @param {Boolean} [enter=false] - Indicates if the call enters the specified state or not. 2647 * @returns {Event} - The event arguments. 2648 */ 2649 Owl.prototype.trigger = function(name, data, namespace, state, enter) { 2650 var status = { 2651 item: { count: this._items.length, index: this.current() } 2652 }, handler = $.camelCase( 2653 $.grep([ 'on', name, namespace ], function(v) { return v }) 2654 .join('-').toLowerCase() 2655 ), event = $.Event( 2656 [ name, 'owl', namespace || 'carousel' ].join('.').toLowerCase(), 2657 $.extend({ relatedTarget: this }, status, data) 2658 ); 2659 2660 if (!this._supress[name]) { 2661 $.each(this._plugins, function(name, plugin) { 2662 if (plugin.onTrigger) { 2663 plugin.onTrigger(event); 2664 } 2665 }); 2666 2667 this.register({ type: Owl.Type.Event, name: name }); 2668 this.$element.trigger(event); 2669 2670 if (this.settings && typeof this.settings[handler] === 'function') { 2671 this.settings[handler].call(this, event); 2672 } 2673 } 2674 2675 return event; 2676 }; 2677 2678 /** 2679 * Enters a state. 2680 * @param name - The state name. 2681 */ 2682 Owl.prototype.enter = function(name) { 2683 $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) { 2684 if (this._states.current[name] === undefined) { 2685 this._states.current[name] = 0; 2686 } 2687 2688 this._states.current[name]++; 2689 }, this)); 2690 }; 2691 2692 /** 2693 * Leaves a state. 2694 * @param name - The state name. 2695 */ 2696 Owl.prototype.leave = function(name) { 2697 $.each([ name ].concat(this._states.tags[name] || []), $.proxy(function(i, name) { 2698 this._states.current[name]--; 2699 }, this)); 2700 }; 2701 2702 /** 2703 * Registers an event or state. 2704 * @public 2705 * @param {Object} object - The event or state to register. 2706 */ 2707 Owl.prototype.register = function(object) { 2708 if (object.type === Owl.Type.Event) { 2709 if (!$.event.special[object.name]) { 2710 $.event.special[object.name] = {}; 2711 } 2712 2713 if (!$.event.special[object.name].owl) { 2714 var _default = $.event.special[object.name]._default; 2715 $.event.special[object.name]._default = function(e) { 2716 if (_default && _default.apply && (!e.namespace || e.namespace.indexOf('owl') === -1)) { 2717 return _default.apply(this, arguments); 2718 } 2719 return e.namespace && e.namespace.indexOf('owl') > -1; 2720 }; 2721 $.event.special[object.name].owl = true; 2722 } 2723 } else if (object.type === Owl.Type.State) { 2724 if (!this._states.tags[object.name]) { 2725 this._states.tags[object.name] = object.tags; 2726 } else { 2727 this._states.tags[object.name] = this._states.tags[object.name].concat(object.tags); 2728 } 2729 2730 this._states.tags[object.name] = $.grep(this._states.tags[object.name], $.proxy(function(tag, i) { 2731 return $.inArray(tag, this._states.tags[object.name]) === i; 2732 }, this)); 2733 } 2734 }; 2735 2736 /** 2737 * Suppresses events. 2738 * @protected 2739 * @param {Array.<String>} events - The events to suppress. 2740 */ 2741 Owl.prototype.suppress = function(events) { 2742 $.each(events, $.proxy(function(index, event) { 2743 this._supress[event] = true; 2744 }, this)); 2745 }; 2746 2747 /** 2748 * Releases suppressed events. 2749 * @protected 2750 * @param {Array.<String>} events - The events to release. 2751 */ 2752 Owl.prototype.release = function(events) { 2753 $.each(events, $.proxy(function(index, event) { 2754 delete this._supress[event]; 2755 }, this)); 2756 }; 2757 2758 /** 2759 * Gets unified pointer coordinates from event. 2760 * @todo #261 2761 * @protected 2762 * @param {Event} - The `mousedown` or `touchstart` event. 2763 * @returns {Object} - Contains `x` and `y` coordinates of current pointer position. 2764 */ 2765 Owl.prototype.pointer = function(event) { 2766 var result = { x: null, y: null }; 2767 2768 event = event.originalEvent || event || window.event; 2769 2770 event = event.touches && event.touches.length ? 2771 event.touches[0] : event.changedTouches && event.changedTouches.length ? 2772 event.changedTouches[0] : event; 2773 2774 if (event.pageX) { 2775 result.x = event.pageX; 2776 result.y = event.pageY; 2777 } else { 2778 result.x = event.clientX; 2779 result.y = event.clientY; 2780 } 2781 2782 return result; 2783 }; 2784 2785 /** 2786 * Determines if the input is a Number or something that can be coerced to a Number 2787 * @protected 2788 * @param {Number|String|Object|Array|Boolean|RegExp|Function|Symbol} - The input to be tested 2789 * @returns {Boolean} - An indication if the input is a Number or can be coerced to a Number 2790 */ 2791 Owl.prototype.isNumeric = function(number) { 2792 return !isNaN(parseFloat(number)); 2793 }; 2794 2795 /** 2796 * Gets the difference of two vectors. 2797 * @todo #261 2798 * @protected 2799 * @param {Object} - The first vector. 2800 * @param {Object} - The second vector. 2801 * @returns {Object} - The difference. 2802 */ 2803 Owl.prototype.difference = function(first, second) { 2804 return { 2805 x: first.x - second.x, 2806 y: first.y - second.y 2807 }; 2808 }; 2809 2810 /** 2811 * The jQuery Plugin for the Owl Carousel 2812 * @todo Navigation plugin `next` and `prev` 2813 * @public 2814 */ 2815 $.fn.owlCarousel = function(option) { 2816 var args = Array.prototype.slice.call(arguments, 1); 2817 2818 return this.each(function() { 2819 var $this = $(this), 2820 data = $this.data('owl.carousel'); 2821 2822 if (!data) { 2823 data = new Owl(this, typeof option == 'object' && option); 2824 $this.data('owl.carousel', data); 2825 2826 $.each([ 2827 'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove' 2828 ], function(i, event) { 2829 data.register({ type: Owl.Type.Event, name: event }); 2830 data.$element.on(event + '.owl.carousel.core', $.proxy(function(e) { 2831 if (e.namespace && e.relatedTarget !== this) { 2832 this.suppress([ event ]); 2833 data[event].apply(this, [].slice.call(arguments, 1)); 2834 this.release([ event ]); 2835 } 2836 }, data)); 2837 }); 2838 } 2839 2840 if (typeof option == 'string' && option.charAt(0) !== '_') { 2841 data[option].apply(data, args); 2842 } 2843 }); 2844 }; 2845 2846 /** 2847 * The constructor for the jQuery Plugin 2848 * @public 2849 */ 2850 $.fn.owlCarousel.Constructor = Owl; 2851 2852})(window.Zepto || window.jQuery, window, document); 2853 2854/** 2855 * AutoRefresh Plugin 2856 * @version 2.3.4 2857 * @author Artus Kolanowski 2858 * @author David Deutsch 2859 * @license The MIT License (MIT) 2860 */ 2861;(function($, window, document, undefined) { 2862 2863 /** 2864 * Creates the auto refresh plugin. 2865 * @class The Auto Refresh Plugin 2866 * @param {Owl} carousel - The Owl Carousel 2867 */ 2868 var AutoRefresh = function(carousel) { 2869 /** 2870 * Reference to the core. 2871 * @protected 2872 * @type {Owl} 2873 */ 2874 this._core = carousel; 2875 2876 /** 2877 * Refresh interval. 2878 * @protected 2879 * @type {number} 2880 */ 2881 this._interval = null; 2882 2883 /** 2884 * Whether the element is currently visible or not. 2885 * @protected 2886 * @type {Boolean} 2887 */ 2888 this._visible = null; 2889 2890 /** 2891 * All event handlers. 2892 * @protected 2893 * @type {Object} 2894 */ 2895 this._handlers = { 2896 'initialized.owl.carousel': $.proxy(function(e) { 2897 if (e.namespace && this._core.settings.autoRefresh) { 2898 this.watch(); 2899 } 2900 }, this) 2901 }; 2902 2903 // set default options 2904 this._core.options = $.extend({}, AutoRefresh.Defaults, this._core.options); 2905 2906 // register event handlers 2907 this._core.$element.on(this._handlers); 2908 }; 2909 2910 /** 2911 * Default options. 2912 * @public 2913 */ 2914 AutoRefresh.Defaults = { 2915 autoRefresh: true, 2916 autoRefreshInterval: 500 2917 }; 2918 2919 /** 2920 * Watches the element. 2921 */ 2922 AutoRefresh.prototype.watch = function() { 2923 if (this._interval) { 2924 return; 2925 } 2926 2927 this._visible = this._core.isVisible(); 2928 this._interval = window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval); 2929 }; 2930 2931 /** 2932 * Refreshes the element. 2933 */ 2934 AutoRefresh.prototype.refresh = function() { 2935 if (this._core.isVisible() === this._visible) { 2936 return; 2937 } 2938 2939 this._visible = !this._visible; 2940 2941 this._core.$element.toggleClass('owl-hidden', !this._visible); 2942 2943 this._visible && (this._core.invalidate('width') && this._core.refresh()); 2944 }; 2945 2946 /** 2947 * Destroys the plugin. 2948 */ 2949 AutoRefresh.prototype.destroy = function() { 2950 var handler, property; 2951 2952 window.clearInterval(this._interval); 2953 2954 for (handler in this._handlers) { 2955 this._core.$element.off(handler, this._handlers[handler]); 2956 } 2957 for (property in Object.getOwnPropertyNames(this)) { 2958 typeof this[property] != 'function' && (this[property] = null); 2959 } 2960 }; 2961 2962 $.fn.owlCarousel.Constructor.Plugins.AutoRefresh = AutoRefresh; 2963 2964})(window.Zepto || window.jQuery, window, document); 2965 2966/** 2967 * Lazy Plugin 2968 * @version 2.3.4 2969 * @author Bartosz Wojciechowski 2970 * @author David Deutsch 2971 * @license The MIT License (MIT) 2972 */ 2973;(function($, window, document, undefined) { 2974 2975 /** 2976 * Creates the lazy plugin. 2977 * @class The Lazy Plugin 2978 * @param {Owl} carousel - The Owl Carousel 2979 */ 2980 var Lazy = function(carousel) { 2981 2982 /** 2983 * Reference to the core. 2984 * @protected 2985 * @type {Owl} 2986 */ 2987 this._core = carousel; 2988 2989 /** 2990 * Already loaded items. 2991 * @protected 2992 * @type {Array.<jQuery>} 2993 */ 2994 this._loaded = []; 2995 2996 /** 2997 * Event handlers. 2998 * @protected 2999 * @type {Object} 3000 */ 3001 this._handlers = { 3002 'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e) { 3003 if (!e.namespace) { 3004 return; 3005 } 3006 3007 if (!this._core.settings || !this._core.settings.lazyLoad) { 3008 return; 3009 } 3010 3011 if ((e.property && e.property.name == 'position') || e.type == 'initialized') { 3012 var settings = this._core.settings, 3013 n = (settings.center && Math.ceil(settings.items / 2) || settings.items), 3014 i = ((settings.center && n * -1) || 0), 3015 position = (e.property && e.property.value !== undefined ? e.property.value : this._core.current()) + i, 3016 clones = this._core.clones().length, 3017 load = $.proxy(function(i, v) { this.load(v) }, this); 3018 //TODO: Need documentation for this new option 3019 if (settings.lazyLoadEager > 0) { 3020 n += settings.lazyLoadEager; 3021 // If the carousel is looping also preload images that are to the "left" 3022 if (settings.loop) { 3023 position -= settings.lazyLoadEager; 3024 n++; 3025 } 3026 } 3027 3028 while (i++ < n) { 3029 this.load(clones / 2 + this._core.relative(position)); 3030 clones && $.each(this._core.clones(this._core.relative(position)), load); 3031 position++; 3032 } 3033 } 3034 }, this) 3035 }; 3036 3037 // set the default options 3038 this._core.options = $.extend({}, Lazy.Defaults, this._core.options); 3039 3040 // register event handler 3041 this._core.$element.on(this._handlers); 3042 }; 3043 3044 /** 3045 * Default options. 3046 * @public 3047 */ 3048 Lazy.Defaults = { 3049 lazyLoad: false, 3050 lazyLoadEager: 0 3051 }; 3052 3053 /** 3054 * Loads all resources of an item at the specified position. 3055 * @param {Number} position - The absolute position of the item. 3056 * @protected 3057 */ 3058 Lazy.prototype.load = function(position) { 3059 var $item = this._core.$stage.children().eq(position), 3060 $elements = $item && $item.find('.owl-lazy'); 3061 3062 if (!$elements || $.inArray($item.get(0), this._loaded) > -1) { 3063 return; 3064 } 3065 3066 $elements.each($.proxy(function(index, element) { 3067 var $element = $(element), image, 3068 url = (window.devicePixelRatio > 1 && $element.attr('data-src-retina')) || $element.attr('data-src') || $element.attr('data-srcset'); 3069 3070 this._core.trigger('load', { element: $element, url: url }, 'lazy'); 3071 3072 if ($element.is('img')) { 3073 $element.one('load.owl.lazy', $.proxy(function() { 3074 $element.css('opacity', 1); 3075 this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); 3076 }, this)).attr('src', url); 3077 } else if ($element.is('source')) { 3078 $element.one('load.owl.lazy', $.proxy(function() { 3079 this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); 3080 }, this)).attr('srcset', url); 3081 } else { 3082 image = new Image(); 3083 image.onload = $.proxy(function() { 3084 $element.css({ 3085 'background-image': 'url("' + url + '")', 3086 'opacity': '1' 3087 }); 3088 this._core.trigger('loaded', { element: $element, url: url }, 'lazy'); 3089 }, this); 3090 image.src = url; 3091 } 3092 }, this)); 3093 3094 this._loaded.push($item.get(0)); 3095 }; 3096 3097 /** 3098 * Destroys the plugin. 3099 * @public 3100 */ 3101 Lazy.prototype.destroy = function() { 3102 var handler, property; 3103 3104 for (handler in this.handlers) { 3105 this._core.$element.off(handler, this.handlers[handler]); 3106 } 3107 for (property in Object.getOwnPropertyNames(this)) { 3108 typeof this[property] != 'function' && (this[property] = null); 3109 } 3110 }; 3111 3112 $.fn.owlCarousel.Constructor.Plugins.Lazy = Lazy; 3113 3114})(window.Zepto || window.jQuery, window, document); 3115 3116/** 3117 * AutoHeight Plugin 3118 * @version 2.3.4 3119 * @author Bartosz Wojciechowski 3120 * @author David Deutsch 3121 * @license The MIT License (MIT) 3122 */ 3123;(function($, window, document, undefined) { 3124 3125 /** 3126 * Creates the auto height plugin. 3127 * @class The Auto Height Plugin 3128 * @param {Owl} carousel - The Owl Carousel 3129 */ 3130 var AutoHeight = function(carousel) { 3131 /** 3132 * Reference to the core. 3133 * @protected 3134 * @type {Owl} 3135 */ 3136 this._core = carousel; 3137 3138 this._previousHeight = null; 3139 3140 /** 3141 * All event handlers. 3142 * @protected 3143 * @type {Object} 3144 */ 3145 this._handlers = { 3146 'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e) { 3147 if (e.namespace && this._core.settings.autoHeight) { 3148 this.update(); 3149 } 3150 }, this), 3151 'changed.owl.carousel': $.proxy(function(e) { 3152 if (e.namespace && this._core.settings.autoHeight && e.property.name === 'position'){ 3153 this.update(); 3154 } 3155 }, this), 3156 'loaded.owl.lazy': $.proxy(function(e) { 3157 if (e.namespace && this._core.settings.autoHeight 3158 && e.element.closest('.' + this._core.settings.itemClass).index() === this._core.current()) { 3159 this.update(); 3160 } 3161 }, this) 3162 }; 3163 3164 // set default options 3165 this._core.options = $.extend({}, AutoHeight.Defaults, this._core.options); 3166 3167 // register event handlers 3168 this._core.$element.on(this._handlers); 3169 this._intervalId = null; 3170 var refThis = this; 3171 3172 // These changes have been taken from a PR by gavrochelegnou proposed in #1575 3173 // and have been made compatible with the latest jQuery version 3174 $(window).on('load', function() { 3175 if (refThis._core.settings.autoHeight) { 3176 refThis.update(); 3177 } 3178 }); 3179 3180 // Autoresize the height of the carousel when window is resized 3181 // When carousel has images, the height is dependent on the width 3182 // and should also change on resize 3183 $(window).resize(function() { 3184 if (refThis._core.settings.autoHeight) { 3185 if (refThis._intervalId != null) { 3186 clearTimeout(refThis._intervalId); 3187 } 3188 3189 refThis._intervalId = setTimeout(function() { 3190 refThis.update(); 3191 }, 250); 3192 } 3193 }); 3194 3195 }; 3196 3197 /** 3198 * Default options. 3199 * @public 3200 */ 3201 AutoHeight.Defaults = { 3202 autoHeight: false, 3203 autoHeightClass: 'owl-height' 3204 }; 3205 3206 /** 3207 * Updates the view. 3208 */ 3209 AutoHeight.prototype.update = function() { 3210 var start = this._core._current, 3211 end = start + this._core.settings.items, 3212 lazyLoadEnabled = this._core.settings.lazyLoad, 3213 visible = this._core.$stage.children().toArray().slice(start, end), 3214 heights = [], 3215 maxheight = 0; 3216 3217 $.each(visible, function(index, item) { 3218 heights.push($(item).height()); 3219 }); 3220 3221 maxheight = Math.max.apply(null, heights); 3222 3223 if (maxheight <= 1 && lazyLoadEnabled && this._previousHeight) { 3224 maxheight = this._previousHeight; 3225 } 3226 3227 this._previousHeight = maxheight; 3228 3229 this._core.$stage.parent() 3230 .height(maxheight) 3231 .addClass(this._core.settings.autoHeightClass); 3232 }; 3233 3234 AutoHeight.prototype.destroy = function() { 3235 var handler, property; 3236 3237 for (handler in this._handlers) { 3238 this._core.$element.off(handler, this._handlers[handler]); 3239 } 3240 for (property in Object.getOwnPropertyNames(this)) { 3241 typeof this[property] !== 'function' && (this[property] = null); 3242 } 3243 }; 3244 3245 $.fn.owlCarousel.Constructor.Plugins.AutoHeight = AutoHeight; 3246 3247})(window.Zepto || window.jQuery, window, document); 3248 3249/** 3250 * Video Plugin 3251 * @version 2.3.4 3252 * @author Bartosz Wojciechowski 3253 * @author David Deutsch 3254 * @license The MIT License (MIT) 3255 */ 3256;(function($, window, document, undefined) { 3257 3258 /** 3259 * Creates the video plugin. 3260 * @class The Video Plugin 3261 * @param {Owl} carousel - The Owl Carousel
vendor: 5,347 bytes, lines 3262-3459
3262 */ 3263 var Video = function(carousel) { 3264 /** 3265 * Reference to the core. 3266 * @protected 3267 * @type {Owl} 3268 */ 3269 this._core = carousel; 3270 3271 /** 3272 * Cache all video URLs. 3273 * @protected 3274 * @type {Object} 3275 */ 3276 this._videos = {}; 3277 3278 /** 3279 * Current playing item. 3280 * @protected 3281 * @type {jQuery} 3282 */ 3283 this._playing = null; 3284 3285 /** 3286 * All event handlers. 3287 * @todo The cloned content removale is too late 3288 * @protected 3289 * @type {Object} 3290 */ 3291 this._handlers = { 3292 'initialized.owl.carousel': $.proxy(function(e) { 3293 if (e.namespace) { 3294 this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] }); 3295 } 3296 }, this), 3297 'resize.owl.carousel': $.proxy(function(e) { 3298 if (e.namespace && this._core.settings.video && this.isInFullScreen()) { 3299 e.preventDefault(); 3300 } 3301 }, this), 3302 'refreshed.owl.carousel': $.proxy(function(e) { 3303 if (e.namespace && this._core.is('resizing')) { 3304 this._core.$stage.find('.cloned .owl-video-frame').remove(); 3305 } 3306 }, this), 3307 'changed.owl.carousel': $.proxy(function(e) { 3308 if (e.namespace && e.property.name === 'position' && this._playing) { 3309 this.stop(); 3310 } 3311 }, this), 3312 'prepared.owl.carousel': $.proxy(function(e) { 3313 if (!e.namespace) { 3314 return; 3315 } 3316 3317 var $element = $(e.content).find('.owl-video'); 3318 3319 if ($element.length) { 3320 $element.css('display', 'none'); 3321 this.fetch($element, $(e.content)); 3322 } 3323 }, this) 3324 }; 3325 3326 // set default options 3327 this._core.options = $.extend({}, Video.Defaults, this._core.options); 3328 3329 // register event handlers 3330 this._core.$element.on(this._handlers); 3331 3332 this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e) { 3333 this.play(e); 3334 }, this)); 3335 }; 3336 3337 /** 3338 * Default options. 3339 * @public 3340 */ 3341 Video.Defaults = { 3342 video: false, 3343 videoHeight: false, 3344 videoWidth: false 3345 }; 3346 3347 /** 3348 * Gets the video ID and the type (YouTube/Vimeo/vzaar only). 3349 * @protected 3350 * @param {jQuery} target - The target containing the video data. 3351 * @param {jQuery} item - The item containing the video. 3352 */ 3353 Video.prototype.fetch = function(target, item) { 3354 var type = (function() { 3355 if (target.attr('data-vimeo-id')) { 3356 return 'vimeo'; 3357 } else if (target.attr('data-vzaar-id')) { 3358 return 'vzaar' 3359 } else { 3360 return 'youtube'; 3361 } 3362 })(), 3363 id = target.attr('data-vimeo-id') || target.attr('data-youtube-id') || target.attr('data-vzaar-id'), 3364 width = target.attr('data-width') || this._core.settings.videoWidth, 3365 height = target.attr('data-height') || this._core.settings.videoHeight, 3366 url = target.attr('href'); 3367 3368 if (url) { 3369 3370 /* 3371 Parses the id's out of the following urls (and probably more): 3372 https://www.youtube.com/watch?v=:id 3373 https://youtu.be/:id 3374 https://vimeo.com/:id 3375 https://vimeo.com/channels/:channel/:id 3376 https://vimeo.com/groups/:group/videos/:id 3377 https://app.vzaar.com/videos/:id 3378 3379 Visual example: https://regexper.com/#(http%3A%7Chttps%3A%7C)%5C%2F%5C%2F(player.%7Cwww.%7Capp.)%3F(vimeo%5C.com%7Cyoutu(be%5C.com%7C%5C.be%7Cbe%5C.googleapis%5C.com)%7Cvzaar%5C.com)%5C%2F(video%5C%2F%7Cvideos%5C%2F%7Cembed%5C%2F%7Cchannels%5C%2F.%2B%5C%2F%7Cgroups%5C%2F.%2B%5C%2F%7Cwatch%5C%3Fv%3D%7Cv%5C%2F)%3F(%5BA-Za-z0-9._%25-%5D*)(%5C%26%5CS%2B)%3F 3380 */ 3381 3382 id = url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/); 3383 3384 if (id[3].indexOf('youtu') > -1) { 3385 type = 'youtube'; 3386 } else if (id[3].indexOf('vimeo') > -1) { 3387 type = 'vimeo'; 3388 } else if (id[3].indexOf('vzaar') > -1) { 3389 type = 'vzaar'; 3390 } else { 3391 throw new Error('Video URL not supported.'); 3392 } 3393 id = id[6]; 3394 } else { 3395 throw new Error('Missing video URL.'); 3396 } 3397 3398 this._videos[url] = { 3399 type: type, 3400 id: id, 3401 width: width, 3402 height: height 3403 }; 3404 3405 item.attr('data-video', url); 3406 3407 this.thumbnail(target, this._videos[url]); 3408 }; 3409 3410 /** 3411 * Creates video thumbnail. 3412 * @protected 3413 * @param {jQuery} target - The target containing the video data. 3414 * @param {Object} info - The video info object. 3415 * @see `fetch` 3416 */ 3417 Video.prototype.thumbnail = function(target, video) { 3418 var tnLink, 3419 icon, 3420 path, 3421 dimensions = video.width && video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;' : '', 3422 customTn = target.find('img'), 3423 srcType = 'src', 3424 lazyClass = '', 3425 settings = this._core.settings, 3426 create = function(path) { 3427 icon = '<div class="owl-video-play-icon"></div>'; 3428 3429 if (settings.lazyLoad) { 3430 tnLink = $('<div/>',{ 3431 "class": 'owl-video-tn ' + lazyClass, 3432 "srcType": path 3433 }); 3434 } else { 3435 tnLink = $( '<div/>', { 3436 "class": "owl-video-tn", 3437 "style": 'opacity:1;background-image:url(' + path + ')' 3438 }); 3439 } 3440 target.after(tnLink); 3441 target.after(icon); 3442 }; 3443 3444 // wrap video content into owl-video-wrapper div 3445 target.wrap( $( '<div/>', { 3446 "class": "owl-video-wrapper", 3447 "style": dimensions 3448 })); 3449 3450 if (this._core.settings.lazyLoad) { 3451 srcType = 'data-src'; 3452 lazyClass = 'owl-lazy'; 3453 } 3454 3455 // custom thumbnail 3456 if (customTn.length) { 3457 create(customTn.attr(srcType)); 3458 customTn.remove(); 3459 return false;
vendor: 6,411 bytes, lines 3460-3705
3460 } 3461 3462 if (video.type === 'youtube') { 3463 path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg"; 3464 create(path); 3465 } else if (video.type === 'vimeo') { 3466 $.ajax({ 3467 type: 'GET', 3468 url: '//vimeo.com/api/v2/video/' + video.id + '.json', 3469 jsonp: 'callback', 3470 dataType: 'jsonp', 3471 success: function(data) { 3472 path = data[0].thumbnail_large; 3473 create(path); 3474 } 3475 }); 3476 } else if (video.type === 'vzaar') { 3477 $.ajax({ 3478 type: 'GET', 3479 url: '//vzaar.com/api/videos/' + video.id + '.json', 3480 jsonp: 'callback', 3481 dataType: 'jsonp', 3482 success: function(data) { 3483 path = data.framegrab_url; 3484 create(path); 3485 } 3486 }); 3487 } 3488 }; 3489 3490 /** 3491 * Stops the current video. 3492 * @public 3493 */ 3494 Video.prototype.stop = function() { 3495 this._core.trigger('stop', null, 'video'); 3496 this._playing.find('.owl-video-frame').remove(); 3497 this._playing.removeClass('owl-video-playing'); 3498 this._playing = null; 3499 this._core.leave('playing'); 3500 this._core.trigger('stopped', null, 'video'); 3501 }; 3502 3503 /** 3504 * Starts the current video. 3505 * @public 3506 * @param {Event} event - The event arguments. 3507 */ 3508 Video.prototype.play = function(event) { 3509 var target = $(event.target), 3510 item = target.closest('.' + this._core.settings.itemClass), 3511 video = this._videos[item.attr('data-video')], 3512 width = video.width || '100%', 3513 height = video.height || this._core.$stage.height(), 3514 html, 3515 iframe; 3516 3517 if (this._playing) { 3518 return; 3519 } 3520 3521 this._core.enter('playing'); 3522 this._core.trigger('play', null, 'video'); 3523 3524 item = this._core.items(this._core.relative(item.index())); 3525 3526 this._core.reset(item.index()); 3527 3528 html = $( '<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>' ); 3529 html.attr( 'height', height ); 3530 html.attr( 'width', width ); 3531 if (video.type === 'youtube') { 3532 html.attr( 'src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id ); 3533 } else if (video.type === 'vimeo') { 3534 html.attr( 'src', '//player.vimeo.com/video/' + video.id + '?autoplay=1' ); 3535 } else if (video.type === 'vzaar') { 3536 html.attr( 'src', '//view.vzaar.com/' + video.id + '/player?autoplay=true' ); 3537 } 3538 3539 iframe = $(html).wrap( '<div class="owl-video-frame" />' ).insertAfter(item.find('.owl-video')); 3540 3541 this._playing = item.addClass('owl-video-playing'); 3542 }; 3543 3544 /** 3545 * Checks whether an video is currently in full screen mode or not. 3546 * @todo Bad style because looks like a readonly method but changes members. 3547 * @protected 3548 * @returns {Boolean} 3549 */ 3550 Video.prototype.isInFullScreen = function() { 3551 var element = document.fullscreenElement || document.mozFullScreenElement || 3552 document.webkitFullscreenElement; 3553 3554 return element && $(element).parent().hasClass('owl-video-frame'); 3555 }; 3556 3557 /** 3558 * Destroys the plugin. 3559 */ 3560 Video.prototype.destroy = function() { 3561 var handler, property; 3562 3563 this._core.$element.off('click.owl.video'); 3564 3565 for (handler in this._handlers) { 3566 this._core.$element.off(handler, this._handlers[handler]); 3567 } 3568 for (property in Object.getOwnPropertyNames(this)) { 3569 typeof this[property] != 'function' && (this[property] = null); 3570 } 3571 }; 3572 3573 $.fn.owlCarousel.Constructor.Plugins.Video = Video; 3574 3575})(window.Zepto || window.jQuery, window, document); 3576 3577/** 3578 * Animate Plugin 3579 * @version 2.3.4 3580 * @author Bartosz Wojciechowski 3581 * @author David Deutsch 3582 * @license The MIT License (MIT) 3583 */ 3584;(function($, window, document, undefined) { 3585 3586 /** 3587 * Creates the animate plugin. 3588 * @class The Navigation Plugin 3589 * @param {Owl} scope - The Owl Carousel 3590 */ 3591 var Animate = function(scope) { 3592 this.core = scope; 3593 this.core.options = $.extend({}, Animate.Defaults, this.core.options); 3594 this.swapping = true; 3595 this.previous = undefined; 3596 this.next = undefined; 3597 3598 this.handlers = { 3599 'change.owl.carousel': $.proxy(function(e) { 3600 if (e.namespace && e.property.name == 'position') { 3601 this.previous = this.core.current(); 3602 this.next = e.property.value; 3603 } 3604 }, this), 3605 'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e) { 3606 if (e.namespace) { 3607 this.swapping = e.type == 'translated'; 3608 } 3609 }, this), 3610 'translate.owl.carousel': $.proxy(function(e) { 3611 if (e.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn)) { 3612 this.swap(); 3613 } 3614 }, this) 3615 }; 3616 3617 this.core.$element.on(this.handlers); 3618 }; 3619 3620 /** 3621 * Default options. 3622 * @public 3623 */ 3624 Animate.Defaults = { 3625 animateOut: false, 3626 animateIn: false 3627 }; 3628 3629 /** 3630 * Toggles the animation classes whenever an translations starts. 3631 * @protected 3632 * @returns {Boolean|undefined} 3633 */ 3634 Animate.prototype.swap = function() { 3635 3636 if (this.core.settings.items !== 1) { 3637 return; 3638 } 3639 3640 if (!$.support.animation || !$.support.transition) { 3641 return; 3642 } 3643 3644 this.core.speed(0); 3645 3646 var left, 3647 clear = $.proxy(this.clear, this), 3648 previous = this.core.$stage.children().eq(this.previous), 3649 next = this.core.$stage.children().eq(this.next), 3650 incoming = this.core.settings.animateIn, 3651 outgoing = this.core.settings.animateOut; 3652 3653 if (this.core.current() === this.previous) { 3654 return; 3655 } 3656 3657 if (outgoing) { 3658 left = this.core.coordinates(this.previous) - this.core.coordinates(this.next); 3659 previous.one($.support.animation.end, clear) 3660 .css( { 'left': left + 'px' } ) 3661 .addClass('animated owl-animated-out') 3662 .addClass(outgoing); 3663 } 3664 3665 if (incoming) { 3666 next.one($.support.animation.end, clear) 3667 .addClass('animated owl-animated-in') 3668 .addClass(incoming); 3669 } 3670 }; 3671 3672 Animate.prototype.clear = function(e) { 3673 $(e.target).css( { 'left': '' } ) 3674 .removeClass('animated owl-animated-out owl-animated-in') 3675 .removeClass(this.core.settings.animateIn) 3676 .removeClass(this.core.settings.animateOut); 3677 this.core.onTransitionEnd(); 3678 }; 3679 3680 /** 3681 * Destroys the plugin. 3682 * @public 3683 */ 3684 Animate.prototype.destroy = function() { 3685 var handler, property; 3686 3687 for (handler in this.handlers) { 3688 this.core.$element.off(handler, this.handlers[handler]); 3689 } 3690 for (property in Object.getOwnPropertyNames(this)) { 3691 typeof this[property] != 'function' && (this[property] = null); 3692 } 3693 }; 3694 3695 $.fn.owlCarousel.Constructor.Plugins.Animate = Animate; 3696 3697})(window.Zepto || window.jQuery, window, document); 3698 3699/** 3700 * Autoplay Plugin 3701 * @version 2.3.4 3702 * @author Bartosz Wojciechowski 3703 * @author Artus Kolanowski 3704 * @author David Deutsch 3705 * @author Tom De CaluwÃ
3705Â
vendor: 9,497 bytes, lines 3705-4097
3705© 3706 * @license The MIT License (MIT) 3707 */ 3708;(function($, window, document, undefined) { 3709 3710 /** 3711 * Creates the autoplay plugin. 3712 * @class The Autoplay Plugin 3713 * @param {Owl} scope - The Owl Carousel 3714 */ 3715 var Autoplay = function(carousel) { 3716 /** 3717 * Reference to the core. 3718 * @protected 3719 * @type {Owl} 3720 */ 3721 this._core = carousel; 3722 3723 /** 3724 * The autoplay timeout id. 3725 * @type {Number} 3726 */ 3727 this._call = null; 3728 3729 /** 3730 * Depending on the state of the plugin, this variable contains either 3731 * the start time of the timer or the current timer value if it's 3732 * paused. Since we start in a paused state we initialize the timer 3733 * value. 3734 * @type {Number} 3735 */ 3736 this._time = 0; 3737 3738 /** 3739 * Stores the timeout currently used. 3740 * @type {Number} 3741 */ 3742 this._timeout = 0; 3743 3744 /** 3745 * Indicates whenever the autoplay is paused. 3746 * @type {Boolean} 3747 */ 3748 this._paused = true; 3749 3750 /** 3751 * All event handlers. 3752 * @protected 3753 * @type {Object} 3754 */ 3755 this._handlers = { 3756 'changed.owl.carousel': $.proxy(function(e) { 3757 if (e.namespace && e.property.name === 'settings') { 3758 if (this._core.settings.autoplay) { 3759 this.play(); 3760 } else { 3761 this.stop(); 3762 } 3763 } else if (e.namespace && e.property.name === 'position' && this._paused) { 3764 // Reset the timer. This code is triggered when the position 3765 // of the carousel was changed through user interaction. 3766 this._time = 0; 3767 } 3768 }, this), 3769 'initialized.owl.carousel': $.proxy(function(e) { 3770 if (e.namespace && this._core.settings.autoplay) { 3771 this.play(); 3772 } 3773 }, this), 3774 'play.owl.autoplay': $.proxy(function(e, t, s) { 3775 if (e.namespace) { 3776 this.play(t, s); 3777 } 3778 }, this), 3779 'stop.owl.autoplay': $.proxy(function(e) { 3780 if (e.namespace) { 3781 this.stop(); 3782 } 3783 }, this), 3784 'mouseover.owl.autoplay': $.proxy(function() { 3785 if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { 3786 this.pause(); 3787 } 3788 }, this), 3789 'mouseleave.owl.autoplay': $.proxy(function() { 3790 if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { 3791 this.play(); 3792 } 3793 }, this), 3794 'touchstart.owl.core': $.proxy(function() { 3795 if (this._core.settings.autoplayHoverPause && this._core.is('rotating')) { 3796 this.pause(); 3797 } 3798 }, this), 3799 'touchend.owl.core': $.proxy(function() { 3800 if (this._core.settings.autoplayHoverPause) { 3801 this.play(); 3802 } 3803 }, this) 3804 }; 3805 3806 // register event handlers 3807 this._core.$element.on(this._handlers); 3808 3809 // set default options 3810 this._core.options = $.extend({}, Autoplay.Defaults, this._core.options); 3811 }; 3812 3813 /** 3814 * Default options. 3815 * @public 3816 */ 3817 Autoplay.Defaults = { 3818 autoplay: false, 3819 autoplayTimeout: 5000, 3820 autoplayHoverPause: false, 3821 autoplaySpeed: false 3822 }; 3823 3824 /** 3825 * Transition to the next slide and set a timeout for the next transition. 3826 * @private 3827 * @param {Number} [speed] - The animation speed for the animations. 3828 */ 3829 Autoplay.prototype._next = function(speed) { 3830 this._call = window.setTimeout( 3831 $.proxy(this._next, this, speed), 3832 this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read() 3833 ); 3834 3835 if (this._core.is('interacting') || document.hidden) { 3836 return; 3837 } 3838 this._core.next(speed || this._core.settings.autoplaySpeed); 3839 } 3840 3841 /** 3842 * Reads the current timer value when the timer is playing. 3843 * @public 3844 */ 3845 Autoplay.prototype.read = function() { 3846 return new Date().getTime() - this._time; 3847 }; 3848 3849 /** 3850 * Starts the autoplay. 3851 * @public 3852 * @param {Number} [timeout] - The interval before the next animation starts. 3853 * @param {Number} [speed] - The animation speed for the animations. 3854 */ 3855 Autoplay.prototype.play = function(timeout, speed) { 3856 var elapsed; 3857 3858 if (!this._core.is('rotating')) { 3859 this._core.enter('rotating'); 3860 } 3861 3862 timeout = timeout || this._core.settings.autoplayTimeout; 3863 3864 // Calculate the elapsed time since the last transition. If the carousel 3865 // wasn't playing this calculation will yield zero. 3866 elapsed = Math.min(this._time % (this._timeout || timeout), timeout); 3867 3868 if (this._paused) { 3869 // Start the clock. 3870 this._time = this.read(); 3871 this._paused = false; 3872 } else { 3873 // Clear the active timeout to allow replacement. 3874 window.clearTimeout(this._call); 3875 } 3876 3877 // Adjust the origin of the timer to match the new timeout value. 3878 this._time += this.read() % timeout - elapsed; 3879 3880 this._timeout = timeout; 3881 this._call = window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed); 3882 }; 3883 3884 /** 3885 * Stops the autoplay. 3886 * @public 3887 */ 3888 Autoplay.prototype.stop = function() { 3889 if (this._core.is('rotating')) { 3890 // Reset the clock. 3891 this._time = 0; 3892 this._paused = true; 3893 3894 window.clearTimeout(this._call); 3895 this._core.leave('rotating'); 3896 } 3897 }; 3898 3899 /** 3900 * Pauses the autoplay. 3901 * @public 3902 */ 3903 Autoplay.prototype.pause = function() { 3904 if (this._core.is('rotating') && !this._paused) { 3905 // Pause the clock. 3906 this._time = this.read(); 3907 this._paused = true; 3908 3909 window.clearTimeout(this._call); 3910 } 3911 }; 3912 3913 /** 3914 * Destroys the plugin. 3915 */ 3916 Autoplay.prototype.destroy = function() { 3917 var handler, property; 3918 3919 this.stop(); 3920 3921 for (handler in this._handlers) { 3922 this._core.$element.off(handler, this._handlers[handler]); 3923 } 3924 for (property in Object.getOwnPropertyNames(this)) { 3925 typeof this[property] != 'function' && (this[property] = null); 3926 } 3927 }; 3928 3929 $.fn.owlCarousel.Constructor.Plugins.autoplay = Autoplay; 3930 3931})(window.Zepto || window.jQuery, window, document); 3932 3933/** 3934 * Navigation Plugin 3935 * @version 2.3.4 3936 * @author Artus Kolanowski 3937 * @author David Deutsch 3938 * @license The MIT License (MIT) 3939 */ 3940;(function($, window, document, undefined) { 3941 'use strict'; 3942 3943 /** 3944 * Creates the navigation plugin. 3945 * @class The Navigation Plugin 3946 * @param {Owl} carousel - The Owl Carousel. 3947 */ 3948 var Navigation = function(carousel) { 3949 /** 3950 * Reference to the core. 3951 * @protected 3952 * @type {Owl} 3953 */ 3954 this._core = carousel; 3955 3956 /** 3957 * Indicates whether the plugin is initialized or not. 3958 * @protected 3959 * @type {Boolean} 3960 */ 3961 this._initialized = false; 3962 3963 /** 3964 * The current paging indexes. 3965 * @protected 3966 * @type {Array} 3967 */ 3968 this._pages = []; 3969 3970 /** 3971 * All DOM elements of the user interface. 3972 * @protected 3973 * @type {Object} 3974 */ 3975 this._controls = {}; 3976 3977 /** 3978 * Markup for an indicator. 3979 * @protected 3980 * @type {Array.<String>} 3981 */ 3982 this._templates = []; 3983 3984 /** 3985 * The carousel element. 3986 * @type {jQuery} 3987 */ 3988 this.$element = this._core.$element; 3989 3990 /** 3991 * Overridden methods of the carousel. 3992 * @protected 3993 * @type {Object} 3994 */ 3995 this._overrides = { 3996 next: this._core.next, 3997 prev: this._core.prev, 3998 to: this._core.to 3999 }; 4000 4001 /** 4002 * All event handlers. 4003 * @protected 4004 * @type {Object} 4005 */ 4006 this._handlers = { 4007 'prepared.owl.carousel': $.proxy(function(e) { 4008 if (e.namespace && this._core.settings.dotsData) { 4009 this._templates.push('<div class="' + this._core.settings.dotClass + '">' + 4010 $(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '</div>'); 4011 } 4012 }, this), 4013 'added.owl.carousel': $.proxy(function(e) { 4014 if (e.namespace && this._core.settings.dotsData) { 4015 this._templates.splice(e.position, 0, this._templates.pop()); 4016 } 4017 }, this), 4018 'remove.owl.carousel': $.proxy(function(e) { 4019 if (e.namespace && this._core.settings.dotsData) { 4020 this._templates.splice(e.position, 1); 4021 } 4022 }, this), 4023 'changed.owl.carousel': $.proxy(function(e) { 4024 if (e.namespace && e.property.name == 'position') { 4025 this.draw(); 4026 } 4027 }, this), 4028 'initialized.owl.carousel': $.proxy(function(e) { 4029 if (e.namespace && !this._initialized) { 4030 this._core.trigger('initialize', null, 'navigation'); 4031 this.initialize(); 4032 this.update(); 4033 this.draw(); 4034 this._initialized = true; 4035 this._core.trigger('initialized', null, 'navigation'); 4036 } 4037 }, this), 4038 'refreshed.owl.carousel': $.proxy(function(e) { 4039 if (e.namespace && this._initialized) { 4040 this._core.trigger('refresh', null, 'navigation'); 4041 this.update(); 4042 this.draw(); 4043 this._core.trigger('refreshed', null, 'navigation'); 4044 } 4045 }, this) 4046 }; 4047 4048 // set default options 4049 this._core.options = $.extend({}, Navigation.Defaults, this._core.options); 4050 4051 // register event handlers 4052 this.$element.on(this._handlers); 4053 }; 4054 4055 /** 4056 * Default options. 4057 * @public 4058 * @todo Rename `slideBy` to `navBy` 4059 */ 4060 Navigation.Defaults = { 4061 nav: false, 4062 navText: [ 4063 '<span aria-label="' + 'Previous' + '">‹</span>', 4064 '<span aria-label="' + 'Next' + '">›</span>' 4065 ], 4066 navSpeed: false, 4067 navElement: 'button type="button" role="presentation"', 4068 navContainer: false, 4069 navContainerClass: 'owl-nav', 4070 navClass: [ 4071 'owl-prev', 4072 'owl-next' 4073 ], 4074 slideBy: 1, 4075 dotClass: 'owl-dot', 4076 dotsClass: 'owl-dots', 4077 dots: true, 4078 dotsEach: false, 4079 dotsData: false, 4080 dotsSpeed: false, 4081 dotsContainer: false 4082 }; 4083 4084 /** 4085 * Initializes the layout of the plugin and extends the carousel. 4086 * @protected 4087 */ 4088 Navigation.prototype.initialize = function() { 4089 var override, 4090 settings = this._core.settings; 4091 4092 // create DOM structure for relative navigation 4093 this._controls.$relative = (settings.navContainer ? $(settings.navContainer) 4094 : $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled'); 4095 4096 this._controls.$previous = $('<' + settings.navElement + '>') 4097 .addClass(settings.navClass[0])
vendor: 4,756 bytes, lines 4098-4259
4098 .html(settings.navText[0]) 4099 .prependTo(this._controls.$relative) 4100 .on('click', $.proxy(function(e) { 4101 this.prev(settings.navSpeed); 4102 }, this)); 4103 this._controls.$next = $('<' + settings.navElement + '>') 4104 .addClass(settings.navClass[1]) 4105 .html(settings.navText[1]) 4106 .appendTo(this._controls.$relative) 4107 .on('click', $.proxy(function(e) { 4108 this.next(settings.navSpeed); 4109 }, this)); 4110 4111 // create DOM structure for absolute navigation 4112 if (!settings.dotsData) { 4113 this._templates = [ $('<button role="button">') 4114 .addClass(settings.dotClass) 4115 .append($('<span>')) 4116 .prop('outerHTML') ]; 4117 } 4118 4119 this._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer) 4120 : $('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled'); 4121 4122 this._controls.$absolute.on('click', 'button', $.proxy(function(e) { 4123 var index = $(e.target).parent().is(this._controls.$absolute) 4124 ? $(e.target).index() : $(e.target).parent().index(); 4125 4126 e.preventDefault(); 4127 4128 this.to(index, settings.dotsSpeed); 4129 }, this)); 4130 4131 /*$el.on('focusin', function() { 4132 $(document).off(".carousel"); 4133 4134 $(document).on('keydown.carousel', function(e) { 4135 if(e.keyCode == 37) { 4136 $el.trigger('prev.owl') 4137 } 4138 if(e.keyCode == 39) { 4139 $el.trigger('next.owl') 4140 } 4141 }); 4142 });*/ 4143 4144 // override public methods of the carousel 4145 for (override in this._overrides) { 4146 this._core[override] = $.proxy(this[override], this); 4147 } 4148 }; 4149 4150 /** 4151 * Destroys the plugin. 4152 * @protected 4153 */ 4154 Navigation.prototype.destroy = function() { 4155 var handler, control, property, override, settings; 4156 settings = this._core.settings; 4157 4158 for (handler in this._handlers) { 4159 this.$element.off(handler, this._handlers[handler]); 4160 } 4161 for (control in this._controls) { 4162 if (control === '$relative' && settings.navContainer) { 4163 this._controls[control].html(''); 4164 } else { 4165 this._controls[control].remove(); 4166 } 4167 } 4168 for (override in this.overides) { 4169 this._core[override] = this._overrides[override]; 4170 } 4171 for (property in Object.getOwnPropertyNames(this)) { 4172 typeof this[property] != 'function' && (this[property] = null); 4173 } 4174 }; 4175 4176 /** 4177 * Updates the internal state. 4178 * @protected 4179 */ 4180 Navigation.prototype.update = function() { 4181 var i, j, k, 4182 lower = this._core.clones().length / 2, 4183 upper = lower + this._core.items().length, 4184 maximum = this._core.maximum(true), 4185 settings = this._core.settings, 4186 size = settings.center || settings.autoWidth || settings.dotsData 4187 ? 1 : settings.dotsEach || settings.items; 4188 4189 if (settings.slideBy !== 'page') { 4190 settings.slideBy = Math.min(settings.slideBy, settings.items); 4191 } 4192 4193 if (settings.dots || settings.slideBy == 'page') { 4194 this._pages = []; 4195 4196 for (i = lower, j = 0, k = 0; i < upper; i++) { 4197 if (j >= size || j === 0) { 4198 this._pages.push({ 4199 start: Math.min(maximum, i - lower), 4200 end: i - lower + size - 1 4201 }); 4202 if (Math.min(maximum, i - lower) === maximum) { 4203 break; 4204 } 4205 j = 0, ++k; 4206 } 4207 j += this._core.mergers(this._core.relative(i)); 4208 } 4209 } 4210 }; 4211 4212 /** 4213 * Draws the user interface. 4214 * @todo The option `dotsData` wont work. 4215 * @protected 4216 */ 4217 Navigation.prototype.draw = function() { 4218 var difference, 4219 settings = this._core.settings, 4220 disabled = this._core.items().length <= settings.items, 4221 index = this._core.relative(this._core.current()), 4222 loop = settings.loop || settings.rewind; 4223 4224 this._controls.$relative.toggleClass('disabled', !settings.nav || disabled); 4225 4226 if (settings.nav) { 4227 this._controls.$previous.toggleClass('disabled', !loop && index <= this._core.minimum(true)); 4228 this._controls.$next.toggleClass('disabled', !loop && index >= this._core.maximum(true)); 4229 } 4230 4231 this._controls.$absolute.toggleClass('disabled', !settings.dots || disabled); 4232 4233 if (settings.dots) { 4234 difference = this._pages.length - this._controls.$absolute.children().length; 4235 4236 if (settings.dotsData && difference !== 0) { 4237 this._controls.$absolute.html(this._templates.join('')); 4238 } else if (difference > 0) { 4239 this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0])); 4240 } else if (difference < 0) { 4241 this._controls.$absolute.children().slice(difference).remove(); 4242 } 4243 4244 this._controls.$absolute.find('.active').removeClass('active'); 4245 this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active'); 4246 } 4247 }; 4248 4249 /** 4250 * Extends event data. 4251 * @protected 4252 * @param {Event} event - The event object which gets thrown. 4253 */ 4254 Navigation.prototype.onTrigger = function(event) { 4255 var settings = this._core.settings; 4256 4257 event.page = { 4258 index: $.inArray(this.current(), this._pages), 4259 count: this._pages.length,
vendor: 7,283 bytes, lines 4260-4545
4260 size: settings && (settings.center || settings.autoWidth || settings.dotsData 4261 ? 1 : settings.dotsEach || settings.items) 4262 }; 4263 }; 4264 4265 /** 4266 * Gets the current page position of the carousel. 4267 * @protected 4268 * @returns {Number} 4269 */ 4270 Navigation.prototype.current = function() { 4271 var current = this._core.relative(this._core.current()); 4272 return $.grep(this._pages, $.proxy(function(page, index) { 4273 return page.start <= current && page.end >= current; 4274 }, this)).pop(); 4275 }; 4276 4277 /** 4278 * Gets the current succesor/predecessor position. 4279 * @protected 4280 * @returns {Number} 4281 */ 4282 Navigation.prototype.getPosition = function(successor) { 4283 var position, length, 4284 settings = this._core.settings; 4285 4286 if (settings.slideBy == 'page') { 4287 position = $.inArray(this.current(), this._pages); 4288 length = this._pages.length; 4289 successor ? ++position : --position; 4290 position = this._pages[((position % length) + length) % length].start; 4291 } else { 4292 position = this._core.relative(this._core.current()); 4293 length = this._core.items().length; 4294 successor ? position += settings.slideBy : position -= settings.slideBy; 4295 } 4296 4297 return position; 4298 }; 4299 4300 /** 4301 * Slides to the next item or page. 4302 * @public 4303 * @param {Number} [speed=false] - The time in milliseconds for the transition. 4304 */ 4305 Navigation.prototype.next = function(speed) { 4306 $.proxy(this._overrides.to, this._core)(this.getPosition(true), speed); 4307 }; 4308 4309 /** 4310 * Slides to the previous item or page. 4311 * @public 4312 * @param {Number} [speed=false] - The time in milliseconds for the transition. 4313 */ 4314 Navigation.prototype.prev = function(speed) { 4315 $.proxy(this._overrides.to, this._core)(this.getPosition(false), speed); 4316 }; 4317 4318 /** 4319 * Slides to the specified item or page. 4320 * @public 4321 * @param {Number} position - The position of the item or page. 4322 * @param {Number} [speed] - The time in milliseconds for the transition. 4323 * @param {Boolean} [standard=false] - Whether to use the standard behaviour or not. 4324 */ 4325 Navigation.prototype.to = function(position, speed, standard) { 4326 var length; 4327 4328 if (!standard && this._pages.length) { 4329 length = this._pages.length; 4330 $.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed); 4331 } else { 4332 $.proxy(this._overrides.to, this._core)(position, speed); 4333 } 4334 }; 4335 4336 $.fn.owlCarousel.Constructor.Plugins.Navigation = Navigation; 4337 4338})(window.Zepto || window.jQuery, window, document); 4339 4340/** 4341 * Hash Plugin 4342 * @version 2.3.4 4343 * @author Artus Kolanowski 4344 * @author David Deutsch 4345 * @license The MIT License (MIT) 4346 */ 4347;(function($, window, document, undefined) { 4348 'use strict'; 4349 4350 /** 4351 * Creates the hash plugin. 4352 * @class The Hash Plugin 4353 * @param {Owl} carousel - The Owl Carousel 4354 */ 4355 var Hash = function(carousel) { 4356 /** 4357 * Reference to the core. 4358 * @protected 4359 * @type {Owl} 4360 */ 4361 this._core = carousel; 4362 4363 /** 4364 * Hash index for the items. 4365 * @protected 4366 * @type {Object} 4367 */ 4368 this._hashes = {}; 4369 4370 /** 4371 * The carousel element. 4372 * @type {jQuery} 4373 */ 4374 this.$element = this._core.$element; 4375 4376 /** 4377 * All event handlers. 4378 * @protected 4379 * @type {Object} 4380 */ 4381 this._handlers = { 4382 'initialized.owl.carousel': $.proxy(function(e) { 4383 if (e.namespace && this._core.settings.startPosition === 'URLHash') { 4384 $(window).trigger('hashchange.owl.navigation'); 4385 } 4386 }, this), 4387 'prepared.owl.carousel': $.proxy(function(e) { 4388 if (e.namespace) { 4389 var hash = $(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash'); 4390 4391 if (!hash) { 4392 return; 4393 } 4394 4395 this._hashes[hash] = e.content; 4396 } 4397 }, this), 4398 'changed.owl.carousel': $.proxy(function(e) { 4399 if (e.namespace && e.property.name === 'position') { 4400 var current = this._core.items(this._core.relative(this._core.current())), 4401 hash = $.map(this._hashes, function(item, hash) { 4402 return item === current ? hash : null; 4403 }).join(); 4404 4405 if (!hash || window.location.hash.slice(1) === hash) { 4406 return; 4407 } 4408 4409 window.location.hash = hash; 4410 } 4411 }, this) 4412 }; 4413 4414 // set default options 4415 this._core.options = $.extend({}, Hash.Defaults, this._core.options); 4416 4417 // register the event handlers 4418 this.$element.on(this._handlers); 4419 4420 // register event listener for hash navigation 4421 $(window).on('hashchange.owl.navigation', $.proxy(function(e) { 4422 var hash = window.location.hash.substring(1), 4423 items = this._core.$stage.children(), 4424 position = this._hashes[hash] && items.index(this._hashes[hash]); 4425 4426 if (position === undefined || position === this._core.current()) { 4427 return; 4428 } 4429 4430 this._core.to(this._core.relative(position), false, true); 4431 }, this)); 4432 }; 4433 4434 /** 4435 * Default options. 4436 * @public 4437 */ 4438 Hash.Defaults = { 4439 URLhashListener: false 4440 }; 4441 4442 /** 4443 * Destroys the plugin. 4444 * @public 4445 */ 4446 Hash.prototype.destroy = function() { 4447 var handler, property; 4448 4449 $(window).off('hashchange.owl.navigation'); 4450 4451 for (handler in this._handlers) { 4452 this._core.$element.off(handler, this._handlers[handler]); 4453 } 4454 for (property in Object.getOwnPropertyNames(this)) { 4455 typeof this[property] != 'function' && (this[property] = null); 4456 } 4457 }; 4458 4459 $.fn.owlCarousel.Constructor.Plugins.Hash = Hash; 4460 4461})(window.Zepto || window.jQuery, window, document); 4462 4463/** 4464 * Support Plugin 4465 * 4466 * @version 2.3.4 4467 * @author Vivid Planet Software GmbH 4468 * @author Artus Kolanowski 4469 * @author David Deutsch 4470 * @license The MIT License (MIT) 4471 */ 4472;(function($, window, document, undefined) { 4473 4474 var style = $('<support>').get(0).style, 4475 prefixes = 'Webkit Moz O ms'.split(' '), 4476 events = { 4477 transition: { 4478 end: { 4479 WebkitTransition: 'webkitTransitionEnd', 4480 MozTransition: 'transitionend', 4481 OTransition: 'oTransitionEnd', 4482 transition: 'transitionend' 4483 } 4484 }, 4485 animation: { 4486 end: { 4487 WebkitAnimation: 'webkitAnimationEnd', 4488 MozAnimation: 'animationend', 4489 OAnimation: 'oAnimationEnd', 4490 animation: 'animationend' 4491 } 4492 } 4493 }, 4494 tests = { 4495 csstransforms: function() { 4496 return !!test('transform'); 4497 }, 4498 csstransforms3d: function() { 4499 return !!test('perspective'); 4500 }, 4501 csstransitions: function() { 4502 return !!test('transition'); 4503 }, 4504 cssanimations: function() { 4505 return !!test('animation'); 4506 } 4507 }; 4508 4509 function test(property, prefixed) { 4510 var result = false, 4511 upper = property.charAt(0).toUpperCase() + property.slice(1); 4512 4513 $.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property) { 4514 if (style[property] !== undefined) { 4515 result = prefixed ? property : true; 4516 return false; 4517 } 4518 }); 4519 4520 return result; 4521 } 4522 4523 function prefixed(property) { 4524 return test(property, true); 4525 } 4526 4527 if (tests.csstransitions()) { 4528 /* jshint -W053 */ 4529 $.support.transition = new String(prefixed('transition')) 4530 $.support.transition.end = events.transition.end[ $.support.transition ]; 4531 } 4532 4533 if (tests.cssanimations()) { 4534 /* jshint -W053 */ 4535 $.support.animation = new String(prefixed('animation')) 4536 $.support.animation.end = events.animation.end[ $.support.animation ]; 4537 } 4538 4539 if (tests.csstransforms()) { 4540 /* jshint -W053 */ 4541 $.support.transform = new String(prefixed('transform')); 4542 $.support.transform3d = tests.csstransforms3d(); 4543 } 4544 4545})(window.Zepto || window.jQuery, window, document);
4545// JavaScript Document
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.