1/*! Slick */ 2!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,sliding:!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
2ptions.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.
2slick",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:
2parseInt(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"}
2,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 2
2,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={};
2!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}
2):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+
2o: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","")}
2,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}}); 3/*! jQuery.Flipster, v1.1.3 (built 2019-05-01) */ 4 5!function(I,t,P){"use strict";function D(n,i){var a=null;return function(){var t=this,e=arguments;null===a&&(a=setTimeout(function(){n.apply(t,e),a=null},i))}}var r,e=(r={},function(t){if(r[t]!==P)return r[t];var e=document.createElement("div").style,n=t.charAt(0).toUpperCase()+t.slice(1),i=(t+" "+["webkit","moz","ms","o"].join(n+" ")+n).split(" ");for(var a in i)if(i[a]in e)return r[t]=i[a];return r[t]=!1}),L="http://www.w3.org/2000/svg",E=I(t),M=e("transform"),i={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},T={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},X=new RegExp("\\b("+T.itemCurrent+"|"+T.itemPast+"|"+T.itemFuture+")(.*?)(\\s|$)","g"),j=new RegExp("\\s\\s+","g");I.fn.flipster=function(e){if("string"==typeof e){var n=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=I(this).data("methods");return t[e]?t[e].apply(this,n):this})}var k=I.extend({},i,e);return this.each(function(){var t,r,o,e,l,s,c,u,f,i=I(this),p=[],v=0,a=!1,n=!1;function h(e){return e=e||"next",I('<button class="'+T.button+" "+("next"===e?T.buttonNext:T.buttonPrev)+'" role="button" />').html(function(t){var e="next"===t?k.buttonNext:k.buttonPrev;return"custom"===k.buttons?e:'<svg viewBox="0 0 13 20" xmlns="'+L+'" aria-labelledby="title"><title>'+e+'</title><polyline points="10,3 3,10 10,17"'+("next"===t?' transform="rotate(180 6.5,10)"':"")+"/></svg>"}(e)).on("click",function(t){_(e),t.preventDefault()})}function d(){i.css("transition",""),r.css("transition",""),l.css("transition","")}function m(a){a&&(i.css("transition","none"),r.css("transition","none"),l.css("transition","none")),o=r.width(),r.height(function(){var t,e=0;return l.each(function(){t=I(this).height(),e<t&&(e=t)}),e}()),o?(e&&(clearInterval(e),e=!1),l.each(function(t){var e,n,i=I(this);i.attr("class",function(t,e){return e&&e.replace(X,"").replace(j," ")}),e=i.outerWidth(),0!==k.spacing&&i.css("margin-right",e*k.spacing+"px"),n=i.position().left,p[t]=-1*(n+e/2-o/2),t===l.length-1&&(g(),a&&setTimeout(d,1))})):e=e||setInterval(function(){m(a)},500)}function g(){var e,n,i,a=l.length;l.each(function(t){e=I(this),n=" ",i=t===v?(n+=T.itemCurrent,a+1):t<v?(n+=T.itemPast+" "+T.itemPast+"-"+(v-t),a-(v-t)):(n+=T.itemFuture+" "+T.itemFuture+"-"+(t-v),a-(t-v)),e.css("z-index",i).attr("class",function(t,e){return e&&e.replace(X,"").replace(j," ")+n})}),0<=v&&(o&&p[v]!==P||m(!0),M?r.css("transform","translateX("+p[v]+"px)"):r.css({left:p[v]+"px"})),function(){if(k.nav){var t=s.data("flip-category");u.removeClass(T.navCurrent),f.filter(function(){return I(this).data("index")===v||t&&I(this).data("category")===t}).parent().addClass(T.navCurrent)}}()}function _(t){var e=v;if(!(l.length<=1))return"prev"===t?0<v?v--:k.loop&&(v=l.length-1):"next"===t?v<l.length-1?v++:k.loop&&(v=0):"number"==typeof t?v=t:t!==P&&(v=l.index(t),k.loop&&e!=v&&(e==l.length-1&&v!=l.length-2&&(v=0),0==e&&1!=v&&(v=l.length-1))),s=l.eq(v),v!==e&&k.onItemSwitch&&k.onItemSwitch.call(i,l[v],l[e]),g(),i}function y(t){return k.autoplay=t||k.autoplay,clearInterval(a),a=setInterval(function(){var t=v;_("next"),t!==v||k.loop||clearInterval(a)},k.autoplay),i}function b(){return clearInterval(a),a=0,i}function x(t){return b(),k.autoplay&&t&&(a=-1),i}function w(){m(!0),i.hide().css("visibility","").addClass(T.active).fadeIn(k.fadeIn)}function C(){if(r=i.find(k.itemContainer).addClass(T.container),!((l=r.find(k.itemSelector)).length<=1))return l.addClass(T.item).each(function(){var t=I(this);t.children("."+T.itemContent).length||t.wrapInner('<div class="'+T.itemContent+'" />')}),k.click&&l.on("click.flipster touchend.flipster",function(t){n||(I(this).hasClass(T.itemCurrent)||t.preventDefault(),_(this))}),k.buttons&&1<l.length&&(i.find("."+T.button).remove(),i.append(h("prev"),h("next"))),function(){var s={};!k.nav||l.length<=1||(c&&c.remove(),c=I('<ul class="'+T.nav+'" role="navigation" />'),f=I(""),l.each(function(t){var e=I(this),n=e.data("flip-category"),i=e.data("flip-title")||e.attr("title")||t,a=I('<a href="#" class="'+T.navLink+'">'+i+"</a>").data("index",t);if(f=f.add(a),n){if(!s[n]){var r=I('<li class="'+T.navItem+" "+T.navCategory+'">'),o=I('<a href="#" class="'+T.navLink+" "+T.navCategoryLink+'" data-flip-category="'+n+'">'+n+"</a>").data("category",n).data("index",t);s[n]=I('<ul class="'+T.navChild+'" />'),f=f.add(o),r.append(o,s[n]).appendTo(c)}s[n].append(a)}else c.append(a);a.wrap('<li class="'+T.navItem+'">')}),c.on("click","a",function(t){var e=I(this).data("index");0<=e&&(_(e),t.preventDefault())}),"after"===k.nav?i.append(c):i.prepend(c),u=c.find("."+T.navItem))}(),0<=v&&_(v),i}t={jump:_,next:function(){return _("next")},prev:function(){return _("prev")},play:y,stop:b,pause:x,index:C},i.data("methods",t),i.hasClass(T.active)||function(){var t;if(i.css("visibility","hidden"),C(),l.length<=1)i.css("visibility","");else{t=!!k.style&&"flipster--"+k.style.split(" ").join(" flipster--"),i.addClass([T.main,M?"flipster--transform":" flipster--no-transform",t,k.click?"flipster--click":""].join(" ")),k.start&&(v="center"===k.start?Math.floor(l.length/2):k.start),_(v);var e=i.find("img");if(e.length){var n=0;e.on("load",function(){++n>=e.length&&w()}),setTimeout(w,750)}else w();E.on("resize.flipster",D(m,400)),k.autoplay&&y(),k.pauseOnHover&&r.on("mouseenter.flipster",function(){a?x(!0):b()}).on("mouseleave.flipster",function(){-1===a&&y()}
5),function(t){k.keyboard&&(t[0].tabIndex=0,t.on("keydown.flipster",D(function(t){var e=t.which;37!==e&&39!==e||(_(37===e?"prev":"next"),t.preventDefault())},250)))}(i),function(t){if(k.scrollwheel){var e,n,i=!1,a=0,r=0,o=0,s=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());t.on("mousewheel.flipster wheel.flipster",function(){i=!0}).on("mousewheel.flipster wheel.flipster",D(function(t){clearTimeout(r),r=setTimeout(function(){o=a=0},300),t=t.originalEvent,o+=t.wheelDelta||-1*(t.deltaY+t.deltaX),Math.abs(o)<25&&!s||(a++,n!==(e=0<o?"prev":"next")&&(a=0),n=e,(a<6||a%3==0)&&_(e),o=0)},50)),E.on("mousewheel.flipster wheel.flipster",function(t){i&&(t.preventDefault(),i=!1)})}}(r),function(t){var e,n,i,a,r,o;k.touch&&t.on({"touchstart.flipster":function(t){t=t.originalEvent,e=t.touches?t.touches[0].clientX:t.clientX,n=t.touches?t.touches[0].clientY:t.clientY},"touchmove.flipster":function(t){t=t.originalEvent,i=t.touches?t.touches[0].clientX:t.clientX,a=t.touches?t.touches[0].clientY:t.clientY,o=i-e,r=a-n,30<Math.abs(o)&&Math.abs(r)<100&&t.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){o=i-e,r=a-n,30<Math.abs(o)&&Math.abs(r)<100&&_(0<o?"prev":"next")}})}(r)}}()})}}(jQuery,window); 6/*! 7 * HC Off-canvas Nav 8 * =================== 9 * Version: 3.1.2 10 * Author: Some Web Media 11 * Author URL: http://somewebmedia.com 12 * Plugin URL: https://github.com/somewebmedia/hc-offcanvas-nav 13 * Description: jQuery plugin for creating off-canvas multi-level navigations 14 * License: MIT 15 */ 16!function(B,e){"use strict";var a,l,S=e.document,N=(/iPad|iPhone|iPod/.test(navigator.userAgent)||!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))&&!e.MSStream,P="ontouchstart"in e||navigator.maxTouchPoints||e.DocumentTouch&&S instanceof DocumentTouch,M=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},A=function(e){return e.stopPropagation()},D=function(n,a,l){return function(e){n&&e.preventDefault(),a&&e.stopPropagation(),"function"==typeof l&&l()}},E=(a=B("head"),l="hc-offcanvas-nav-style",function(e){var n=a.find("style#"+l);n.length?n.html(n.html()+e):B('<style id="'+l+'">'+e+"</style>").appendTo(a)}),H=function(e,n,a){var l=a.children("li"),t=l.length,o=-1<n?Math.max(0,Math.min(n-1,t)):Math.max(0,Math.min(t+n+1,t));0===o?a.prepend(e):l.eq(o-1).after(e)},W=0;B.fn.extend({hcOffcanvasNav:function(e){if(!this.length)return this;var l,x=B.extend({},{maxWidth:1024,pushContent:!1,side:"left",levelOpen:"overlap",levelSpacing:40,levelTitles:!1,navTitle:null,navClass:"",disableBody:!0,closeOnClick:!0,customToggle:null,insertClose:!0,insertBack:!0,labelClose:"Close",labelBack:"Back"},e),w=B(S.getElementsByTagName("html")[0]),O=(B(S),B(S.body)),T=(l=function(e){var n=["Webkit","Moz","Ms","O"],a=(S.body||S.documentElement).style,l=e.charAt(0).toUpperCase()+e.slice(1);if(void 0!==a[e])return e;for(var t=0;t<n.length;t++)if(void 0!==a[n[t]+l])return n[t]+l;return!1}("transform"),function(e,n){if(l){var a="left"===x.side?n:-n;e.css(l,"translate3d("+a+"px,0,0)")}else e.css(x.side,n)});return this.each(function(){var e=B(this),n=void 0;if(e.is("ul"))n=e.clone().wrap("<nav>").parent();else if(e.is("nav"))n=e.clone();else if(!(n=e.find("nav, ul").first().clone()).length)return void console.log("%c! HC Offcanvas Nav:%c There is no <nav> or <ul> elements in your menu.","color: red","color: black");var a=n.find("div");if(a.length){var p="hc-nav-"+ ++W,v={},l=!1,t=0,s=0,o=void 0,i=null,r=void 0,c=void 0;e.addClass("hc-nav "+p),x.customToggle?r=B(x.customToggle).addClass("hc-nav-trigger "+p).on("click",b):(r=B('<a class="hc-nav-trigger '+p+'"><span></span></a>').on("click",b),e.after(r));var d=r.css("display"),f="\n .hc-offcanvas-nav."+p+" {\n display: block;\n }\n .hc-nav-trigger."+p+" {\n display: "+(d&&"none"!==d?d:"block")+"\n }\n .hc-nav."+p+" {\n display: none;\n }\n ";x.maxWidth&&(f="@media screen and (max-width: "+(x.maxWidth-1)+"px) {\n "+f+"\n }"),E(f);var h=n.children("ul").wrapAll('<div class="nav-wrapper nav-wrapper-1">').parent().on("click",A).wrap('<div class="nav-container">').parent();if(x.navTitle&&h.children().prepend("<h2>"+x.navTitle+"</h2>"),n.on("click",A).removeAttr("id").removeClass().addClass("\n hc-offcanvas-nav\n "+p+"\n "+(x.navClass||"")+"\n nav-levels-"+(x.levelOpen||"none")+"\n side-"+x.side+"\n "+(x.disableBody?"disable-body":"")+"\n "+(N?"is-ios":"")+"\n "+(P?"touch-device":"")+"\n ").find("[id]").removeAttr("id"),setTimeout(function(){var e;s=h.width(),e=h.css("transition-duration"),o=parseFloat(e)*(/\ds$/.test(e)?1e3:1),"boolean"!=typeof x.pushContent&&(c=B(x.pushContent)).length&&E(function e(n){return"string"==typeof n?n:n.attr("id")?"#"+n.attr("id"):n.attr("class")?n.prop("tagName").toLowerCase()+"."+n.attr("class").replace(/\s+/g,"."):e(n.parent())+" "+n.prop("tagName").toLowerCase()}(x.pushContent)+" {\n transition: "+h.css("transition-property").split(",")[0]+" "+h.css("transition-duration")+" "+h.css("transition-timing-function").split(",")[0]+";\n }")},1),x.disableBody&&n.on("click",C),x.closeOnClick&&a.find("li").children("a").on("click",C),!1!==x.insertClose){var u=B('<li class="nav-close"><a href="#">'+(x.labelClose||"")+"<span></span></a></li>");u.children("a").on("click",D(!0,!0,C)),!0===x.insertClose?a.first().prepend(u):M(x.insertClose)&&H(u,x.insertClose,a.first().add(a.siblings("ul")))}a.each(function(){var e=B(this),n=e.parents("li").length;if(0!==n){var a=e.parent().addClass("nav-parent"),l=a.children("a");v[n]||(v[n]=[]),v[n].push({nav:e});var t=v[n].length-1;
16v[n][t].wrapper=e.closest(".nav-wrapper");var o=e.wrap('<div class="nav-wrapper nav-wrapper-'+(n+1)+'">').parent().on("click",A);if(!x.levelSpacing||"expand"!==x.levelOpen&&!1!==x.levelOpen&&"none"!==x.levelOpen||e.css("text-indent",x.levelSpacing*n+"px"),!1===x.levelOpen||"none"===x.levelOpen)return;!0===x.levelTitles&&o.prepend("<h2>"+l.text()+"</h2>");var i=B('<span class="nav-next">').appendTo(l),s=B('<label for="'+p+"-"+n+"-"+t+'">').on("click",A),r=B('<input type="checkbox" id="'+p+"-"+n+"-"+t+'">').attr("data-level",n).attr("data-index",t).on("click",A).on("change",m);if(v[n][t].checkbox=r,a.prepend(r),l.attr("href")&&"#"!==l.attr("href")?i.append(s):l.on("click",D(!0,!0)).prepend(s),!1!==x.insertBack&&"overlap"===x.levelOpen){var c=B('<li class="nav-back"><a href="#">'+(x.labelBack||"")+"<span></span></a></li>");c.children("a").on("click",D(!0,!0,function(){return y(n,t)})),!0===x.insertBack?e.prepend(c):M(x.insertBack)&&H(c,x.insertBack,e)}}}),O.append(n);var g=function(e,n){if(v[e]&&v[e][n]){var a=v[e][n].checkbox,l=a.parent("li"),t=v[e][n].wrapper;a.prop("checked",!1),t.removeClass("sub-level-open"),l.removeClass("level-open")}}}else console.log("%c! HC Offcanvas Nav:%c Menu must contain <ul> element.","color: red","color: black");function m(){var e,n,a,l,t=B(this),o=Number(t.attr("data-level")),i=Number(t.attr("data-index"));t.prop("checked")?(n=i,a=v[e=o][n].checkbox.parent("li"),(l=v[e][n].wrapper).addClass("sub-level-open"),a.addClass("level-open"),"overlap"===x.levelOpen&&(l.on("click",function(){return y(e,n)}),T(h,e*x.levelSpacing),c&&c.length&&T(c,s+e*x.levelSpacing))):y(o,i)}function k(){l=!0,n.addClass("nav-open"),r.addClass("toggle-open"),"expand"===x.levelOpen&&i&&clearTimeout(i),x.disableBody&&(t=w.scrollTop()||O.scrollTop(),S.documentElement.scrollHeight>S.documentElement.offsetHeight&&w.addClass("hc-nav-yscroll"),O.addClass("hc-nav-open"),t&&O.css("top",-t)),c&&c.length&&T(c,s)}function C(){l=!1,c&&c.length&&T(c,0),n.removeClass("nav-open"),h.removeAttr("style"),r.removeClass("toggle-open"),!1!==x.levelOpen&&"none"!==x.levelOpen&&(i=setTimeout(function(){y(0)},"expand"===x.levelOpen?o:0)),x.disableBody&&(O.removeClass("hc-nav-open"),w.removeClass("hc-nav-yscroll"),t&&(O.css("top","").scrollTop(t),w.scrollTop(t),t=0))}function b(e){e.preventDefault(),e.stopPropagation(),l?C():k()}function y(e,n){for(var a=e;a<=Object.keys(v).length;a++){if(0!==a)if(a==e&&void 0!==n){if(g(a,n),"overlap"===x.levelOpen)v[a][n].wrapper.off("click").on("click",A),T(h,(a-1)*x.levelSpacing),c&&c.length&&T(c,s+(a-1)*x.levelSpacing)}else for(var l in v[a]){if(g(a,l),"overlap"===x.levelOpen)v[a][l].wrapper.off("click").on("click",A),a==e&&(T(h,(a-1)*x.levelSpacing),c&&c.length&&T(c,s+(a-1)*x.levelSpacing))}}}})}})}(jQuery,"undefined"!=typeof window?window:this); 17 18/*! picturefill - v3.0.2 - 2016-02-12 19 * https://scottjehl.github.io/picturefill/ 20 * Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT 21 */ 22/*! Gecko-Picture - v1.0 23 * https://github.com/scottjehl/picturefill/tree/3.0/src/plugins/gecko-picture 24 * Firefox's early picture implementation (prior to FF41) is static and does 25 * not react to viewport changes. This tiny module fixes this. 26 */ 27(function(window) { 28 /*jshint eqnull:true */ 29 var ua = navigator.userAgent; 30 31 if ( window.HTMLPictureElement && ((/ecko/).test(ua) && ua.match(/rv\:(\d+)/) && RegExp.$1 < 45) ) { 32 addEventListener("resize", (function() { 33 var timer; 34 35 var dummySrc = document.createElement("source"); 36 37 var fixRespimg = function(img) { 38 var source, sizes; 39 var picture = img.parentNode; 40 41 if (picture.nodeName.toUpperCase() === "PICTURE") { 42 source = dummySrc.cloneNode(); 43 44 picture.insertBefore(source, picture.firstElementChild); 45 setTimeout(function() { 46 picture.removeChild(source); 47 }); 48 } else if (!img._pfLastSize || img.offsetWidth > img._pfLastSize) { 49 img._pfLastSize = img.offsetWidth; 50 sizes = img.sizes; 51 img.sizes += ",100vw"; 52 setTimeout(function() { 53 img.sizes = sizes; 54 }); 55 } 56 }; 57 58 var findPictureImgs = function() { 59 var i; 60 var imgs = document.querySelectorAll("picture > img, img[srcset][sizes]"); 61 for (i = 0; i < imgs.length; i++) { 62 fixRespimg(imgs[i]); 63 } 64 }; 65 var onResize = function() { 66 clearTimeout(timer); 67 timer = setTimeout(findPictureImgs, 99); 68 }; 69 var mq = window.matchMedia && matchMedia("(orientation: landscape)"); 70 var init = function() { 71 onResize(); 72 73 if (mq && mq.addListener) { 74 mq.addListener(onResize); 75 } 76 }; 77 78 dummySrc.srcset = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; 79 80 if (/^[c|i]|d$/.test(document.readyState || "")) { 81 init(); 82 } else { 83 document.addEventListener("DOMContentLoaded", init); 84 } 85 86 return onResize; 87 })()); 88 } 89})(window); 90
vendor: 42,606 bytes, lines 91-1563
91 92 93/*! Picturefill - v3.0.2 94 * http://scottjehl.github.io/picturefill 95 * Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; 96 * License: MIT 97 */ 98 99(function( window, document, undefined ) { 100 // Enable strict mode 101 "use strict"; 102 103 // HTML shim|v it for old IE (IE9 will still need the HTML video tag workaround) 104 document.createElement( "picture" ); 105 106 var warn, eminpx, alwaysCheckWDescriptor, evalId; 107 // local object for method references and testing exposure 108 var pf = {}; 109 var isSupportTestReady = false; 110 var noop = function() {}; 111 var image = document.createElement( "img" ); 112 var getImgAttr = image.getAttribute; 113 var setImgAttr = image.setAttribute; 114 var removeImgAttr = image.removeAttribute; 115 var docElem = document.documentElement; 116 var types = {}; 117 var cfg = { 118 //resource selection: 119 algorithm: "" 120 }; 121 var srcAttr = "data-pfsrc"; 122 var srcsetAttr = srcAttr + "set"; 123 // ua sniffing is done for undetectable img loading features, 124 // to do some non crucial perf optimizations 125 var ua = navigator.userAgent; 126 var supportAbort = (/rident/).test(ua) || ((/ecko/).test(ua) && ua.match(/rv\:(\d+)/) && RegExp.$1 > 35 ); 127 var curSrcProp = "currentSrc"; 128 var regWDesc = /\s+\+?\d+(e\d+)?w/; 129 var regSize = /(\([^)]+\))?\s*(.+)/; 130 var setOptions = window.picturefillCFG; 131 /** 132 * Shortcut property for https://w3c.github.io/webappsec/specs/mixedcontent/#restricts-mixed-content ( for easy overriding in tests ) 133 */ 134 // baseStyle also used by getEmValue (i.e.: width: 1em is important) 135 var baseStyle = "position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)"; 136 var fsCss = "font-size:100%!important;"; 137 var isVwDirty = true; 138 139 var cssCache = {}; 140 var sizeLengthCache = {}; 141 var DPR = window.devicePixelRatio; 142 var units = { 143 px: 1, 144 "in": 96 145 }; 146 var anchor = document.createElement( "a" ); 147 /** 148 * alreadyRun flag used for setOptions. is it true setOptions will reevaluate 149 * @type {boolean} 150 */ 151 var alreadyRun = false; 152 153 // Reusable, non-"g" Regexes 154 155 // (Don't use \s, to avoid matching non-breaking space.) 156 var regexLeadingSpaces = /^[ \t\n\r\u000c]+/, 157 regexLeadingCommasOrSpaces = /^[, \t\n\r\u000c]+/, 158 regexLeadingNotSpaces = /^[^ \t\n\r\u000c]+/, 159 regexTrailingCommas = /[,]+$/, 160 regexNonNegativeInteger = /^\d+$/, 161 162 // ( Positive or negative or unsigned integers or decimals, without or without exponents. 163 // Must include at least one digit. 164 // According to spec tests any decimal point must be followed by a digit. 165 // No leading plus sign is allowed.) 166 // https://html.spec.whatwg.org/multipage/infrastructure.html#valid-floating-point-number 167 regexFloatingPoint = /^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/; 168 169 var on = function(obj, evt, fn, capture) { 170 if ( obj.addEventListener ) { 171 obj.addEventListener(evt, fn, capture || false); 172 } else if ( obj.attachEvent ) { 173 obj.attachEvent( "on" + evt, fn); 174 } 175 }; 176 177 /** 178 * simple memoize function: 179 */ 180 181 var memoize = function(fn) { 182 var cache = {}; 183 return function(input) { 184 if ( !(input in cache) ) { 185 cache[ input ] = fn(input); 186 } 187 return cache[ input ]; 188 }; 189 }; 190 191 // UTILITY FUNCTIONS 192 193 // Manual is faster than RegEx 194 // http://jsperf.com/whitespace-character/5 195 function isSpace(c) { 196 return (c === "\u0020" || // space 197 c === "\u0009" || // horizontal tab 198 c === "\u000A" || // new line 199 c === "\u000C" || // form feed 200 c === "\u000D"); // carriage return 201 } 202 203 /** 204 * gets a mediaquery and returns a boolean or gets a css length and returns a number 205 * @param css mediaqueries or css length 206 * @returns {boolean|number} 207 * 208 * based on: https://gist.github.com/jonathantneal/db4f77009b155f083738 209 */ 210 var evalCSS = (function() { 211 212 var regLength = /^([\d\.]+)(em|vw|px)$/; 213 var replace = function() { 214 var args = arguments, index = 0, string = args[0]; 215 while (++index in args) { 216 string = string.replace(args[index], args[++index]); 217 } 218 return string; 219 }; 220 221 var buildStr = memoize(function(css) { 222 223 return "return " + replace((css || "").toLowerCase(), 224 // interpret `and` 225 /\band\b/g, "&&", 226 227 // interpret `,` 228 /,/g, "||", 229 230 // interpret `min-` as >= 231 /min-([a-z-\s]+):/g, "e.$1>=", 232 233 // interpret `max-` as <= 234 /max-([a-z-\s]+):/g, "e.$1<=", 235 236 //calc value 237 /calc([^)]+)/g, "($1)", 238 239 // interpret css values 240 /(\d+[\.]*[\d]*)([a-z]+)/g, "($1 * e.$2)", 241 //make eval less evil 242 /^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/ig, "" 243 ) + ";"; 244 }); 245 246 return function(css, length) { 247 var parsedLength; 248 if (!(css in cssCache)) { 249 cssCache[css] = false; 250 if (length && (parsedLength = css.match( regLength ))) { 251 cssCache[css] = parsedLength[ 1 ] * units[parsedLength[ 2 ]]; 252 } else { 253 /*jshint evil:true */ 254 try{ 255 cssCache[css] = new Function("e", buildStr(css))(units); 256 } catch(e) {} 257 /*jshint evil:false */ 258 } 259 } 260 return cssCache[css]; 261 }; 262 })(); 263 264 var setResolution = function( candidate, sizesattr ) { 265 if ( candidate.w ) { // h = means height: || descriptor.type === 'h' do not handle yet... 266 candidate.cWidth = pf.calcListLength( sizesattr || "100vw" ); 267 candidate.res = candidate.w / candidate.cWidth ; 268 } else { 269 candidate.res = candidate.d; 270 } 271 return candidate; 272 }; 273 274 /** 275 * 276 * @param opt 277 */ 278 var picturefill = function( opt ) { 279 280 if (!isSupportTestReady) {return;} 281 282 var elements, i, plen; 283 284 var options = opt || {}; 285 286 if ( options.elements && options.elements.nodeType === 1 ) { 287 if ( options.elements.nodeName.toUpperCase() === "IMG" ) { 288 options.elements = [ options.elements ]; 289 } else { 290 options.context = options.elements; 291 options.elements = null; 292 } 293 } 294 295 elements = options.elements || pf.qsa( (options.context || document), ( options.reevaluate || options.reselect ) ? pf.sel : pf.selShort ); 296 297 if ( (plen = elements.length) ) { 298 299 pf.setupRun( options ); 300 alreadyRun = true; 301 302 // Loop through all elements 303 for ( i = 0; i < plen; i++ ) { 304 pf.fillImg(elements[ i ], options); 305 } 306 307 pf.teardownRun( options ); 308 } 309 }; 310 311 /** 312 * outputs a warning for the developer 313 * @param {message} 314 * @type {Function} 315 */ 316 warn = ( window.console && console.warn ) ? 317 function( message ) { 318 console.warn( message ); 319 } : 320 noop 321 ; 322 323 if ( !(curSrcProp in image) ) { 324 curSrcProp = "src"; 325 } 326 327 // Add support for standard mime types. 328 types[ "image/jpeg" ] = true; 329 types[ "image/gif" ] = true; 330 types[ "image/png" ] = true; 331 332 function detectTypeSupport( type, typeUri ) { 333 // based on Modernizr's lossless img-webp test 334 // note: asynchronous 335 var image = new window.Image(); 336 image.onerror = function() { 337 types[ type ] = false; 338 picturefill(); 339 }; 340 image.onload = function() { 341 types[ type ] = image.width === 1; 342 picturefill(); 343 }; 344 image.src = typeUri; 345 return "pending"; 346 } 347 348 // test svg support 349 types[ "image/svg+xml" ] = document.implementation.hasFeature( "http://www.w3.org/TR/SVG11/feature#Image", "1.1" ); 350 351 /** 352 * updates the internal vW property with the current viewport width in px 353 */ 354 function updateMetrics() { 355 356 isVwDirty = false; 357 DPR = window.devicePixelRatio; 358 cssCache = {}; 359 sizeLengthCache = {}; 360 361 pf.DPR = DPR || 1; 362 363 units.width = Math.max(window.innerWidth || 0, docElem.clientWidth); 364 units.height = Math.max(window.innerHeight || 0, docElem.clientHeight); 365 366 units.vw = units.width / 100; 367 units.vh = units.height / 100; 368 369 evalId = [ units.height, units.width, DPR ].join("-"); 370 371 units.em = pf.getEmValue(); 372 units.rem = units.em; 373 } 374 375 function chooseLowRes( lowerValue, higherValue, dprValue, isCached ) { 376 var bonusFactor, tooMuch, bonus, meanDensity; 377 378 //experimental 379 if (cfg.algorithm === "saveData" ){ 380 if ( lowerValue > 2.7 ) { 381 meanDensity = dprValue + 1; 382 } else { 383 tooMuch = higherValue - dprValue; 384 bonusFactor = Math.pow(lowerValue - 0.6, 1.5); 385 386 bonus = tooMuch * bonusFactor; 387 388 if (isCached) { 389 bonus += 0.1 * bonusFactor; 390 } 391 392 meanDensity = lowerValue + bonus; 393 } 394 } else { 395 meanDensity = (dprValue > 1) ? 396 Math.sqrt(lowerValue * higherValue) : 397 lowerValue; 398 } 399 400 return meanDensity > dprValue; 401 } 402 403 function applyBestCandidate( img ) { 404 var srcSetCandidates; 405 var matchingSet = pf.getSet( img ); 406 var evaluated = false; 407 if ( matchingSet !== "pending" ) { 408 evaluated = evalId; 409 if ( matchingSet ) { 410 srcSetCandidates = pf.setRes( matchingSet ); 411 pf.applySetCandidate( srcSetCandidates, img ); 412 } 413 } 414 img[ pf.ns ].evaled = evaluated; 415 } 416 417 function ascendingSort( a, b ) { 418 return a.res - b.res; 419 } 420 421 function setSrcToCur( img, src, set ) { 422 var candidate; 423 if ( !set && src ) { 424 set = img[ pf.ns ].sets; 425 set = set && set[set.length - 1]; 426 } 427 428 candidate = getCandidateForSrc(src, set); 429 430 if ( candidate ) { 431 src = pf.makeUrl(src); 432 img[ pf.ns ].curSrc = src; 433 img[ pf.ns ].curCan = candidate; 434 435 if ( !candidate.res ) { 436 setResolution( candidate, candidate.set.sizes ); 437 } 438 } 439 return candidate; 440 } 441 442 function getCandidateForSrc( src, set ) { 443 var i, candidate, candidates; 444 if ( src && set ) { 445 candidates = pf.parseSet( set ); 446 src = pf.makeUrl(src); 447 for ( i = 0; i < candidates.length; i++ ) { 448 if ( src === pf.makeUrl(candidates[ i ].url) ) { 449 candidate = candidates[ i ]; 450 break; 451 } 452 } 453 } 454 return candidate; 455 } 456 457 function getAllSourceElements( picture, candidates ) { 458 var i, len, source, srcset; 459 460 // SPEC mismatch intended for size and perf: 461 // actually only source elements preceding the img should be used 462 // also note: don't use qsa here, because IE8 sometimes doesn't like source as the key part in a selector 463 var sources = picture.getElementsByTagName( "source" ); 464 465 for ( i = 0, len = sources.length; i < len; i++ ) { 466 source = sources[ i ]; 467 source[ pf.ns ] = true; 468 srcset = source.getAttribute( "srcset" ); 469 470 // if source does not have a srcset attribute, skip 471 if ( srcset ) { 472 candidates.push( { 473 srcset: srcset, 474 media: source.getAttribute( "media" ), 475 type: source.getAttribute( "type" ), 476 sizes: source.getAttribute( "sizes" ) 477 } ); 478 } 479 } 480 } 481 482 /** 483 * Srcset Parser 484 * By Alex Bell | MIT License 485 * 486 * @returns Array [{url: _, d: _, w: _, h:_, set:_(????)}, ...] 487 * 488 * Based super duper closely on the reference algorithm at: 489 * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-srcset-attribute 490 */ 491 492 // 1. Let input be the value passed to this algorithm. 493 // (TO-DO : Explain what "set" argument is here. Maybe choose a more 494 // descriptive & more searchable name. Since passing the "set" in really has 495 // nothing to do with parsing proper, I would prefer this assignment eventually 496 // go in an external fn.) 497 function parseSrcset(input, set) { 498 499 function collectCharacters(regEx) { 500 var chars, 501 match = regEx.exec(input.substring(pos)); 502 if (match) { 503 chars = match[ 0 ]; 504 pos += chars.length; 505 return chars; 506 } 507 } 508 509 var inputLength = input.length, 510 url, 511 descriptors, 512 currentDescriptor, 513 state, 514 c, 515 516 // 2. Let position be a pointer into input, initially pointing at the start 517 // of the string. 518 pos = 0, 519 520 // 3. Let candidates be an initially empty source set. 521 candidates = []; 522 523 /** 524 * Adds descriptor properties to a candidate, pushes to the candidates array 525 * @return undefined 526 */ 527 // (Declared outside of the while loop so that it's only created once. 528 // (This fn is defined before it is used, in order to pass JSHINT. 529 // Unfortunately this breaks the sequencing of the spec comments. :/ ) 530 function parseDescriptors() { 531 532 // 9. Descriptor parser: Let error be no. 533 var pError = false, 534 535 // 10. Let width be absent. 536 // 11. Let density be absent. 537 // 12. Let future-compat-h be absent. (We're implementing it now as h) 538 w, d, h, i, 539 candidate = {}, 540 desc, lastChar, value, intVal, floatVal; 541 542 // 13. For each descriptor in descriptors, run the appropriate set of steps 543 // from the following list: 544 for (i = 0 ; i < descriptors.length; i++) { 545 desc = descriptors[ i ]; 546 547 lastChar = desc[ desc.length - 1 ]; 548 value = desc.substring(0, desc.length - 1); 549 intVal = parseInt(value, 10); 550 floatVal = parseFloat(value); 551 552 // If the descriptor consists of a valid non-negative integer followed by 553 // a U+0077 LATIN SMALL LETTER W character 554 if (regexNonNegativeInteger.test(value) && (lastChar === "w")) { 555 556 // If width and density are not both absent, then let error be yes. 557 if (w || d) {pError = true;} 558 559 // Apply the rules for parsing non-negative integers to the descriptor. 560 // If the result is zero, let error be yes. 561 // Otherwise, let width be the result. 562 if (intVal === 0) {pError = true;} else {w = intVal;} 563 564 // If the descriptor consists of a valid floating-point number followed by 565 // a U+0078 LATIN SMALL LETTER X character 566 } else if (regexFloatingPoint.test(value) && (lastChar === "x")) { 567 568 // If width, density and future-compat-h are not all absent, then let error 569 // be yes. 570 if (w || d || h) {pError = true;} 571 572 // Apply the rules for parsing floating-point number values to the descriptor. 573 // If the result is less than zero, let error be yes. Otherwise, let density 574 // be the result. 575 if (floatVal < 0) {pError = true;} else {d = floatVal;} 576 577 // If the descriptor consists of a valid non-negative integer followed by 578 // a U+0068 LATIN SMALL LETTER H character 579 } else if (regexNonNegativeInteger.test(value) && (lastChar === "h")) { 580 581 // If height and density are not both absent, then let error be yes. 582 if (h || d) {pError = true;} 583 584 // Apply the rules for parsing non-negative integers to the descriptor. 585 // If the result is zero, let error be yes. Otherwise, let future-compat-h 586 // be the result. 587 if (intVal === 0) {pError = true;} else {h = intVal;} 588 589 // Anything else, Let error be yes. 590 } else {pError = true;} 591 } // (close step 13 for loop) 592 593 // 15. If error is still no, then append a new image source to candidates whose 594 // URL is url, associated with a width width if not absent and a pixel 595 // density density if not absent. Otherwise, there is a parse error. 596 if (!pError) { 597 candidate.url = url; 598 599 if (w) { candidate.w = w;} 600 if (d) { candidate.d = d;} 601 if (h) { candidate.h = h;} 602 if (!h && !d && !w) {candidate.d = 1;} 603 if (candidate.d === 1) {set.has1x = true;} 604 candidate.set = set; 605 606 candidates.push(candidate); 607 } 608 } // (close parseDescriptors fn) 609 610 /** 611 * Tokenizes descriptor properties prior to parsing 612 * Returns undefined. 613 * (Again, this fn is defined before it is used, in order to pass JSHINT. 614 * Unfortunately this breaks the logical sequencing of the spec comments. :/ ) 615 */ 616 function tokenize() { 617 618 // 8.1. Descriptor tokeniser: Skip whitespace 619 collectCharacters(regexLeadingSpaces); 620 621 // 8.2. Let current descriptor be the empty string. 622 currentDescriptor = ""; 623 624 // 8.3. Let state be in descriptor. 625 state = "in descriptor"; 626 627 while (true) { 628 629 // 8.4. Let c be the character at position. 630 c = input.charAt(pos); 631 632 // Do the following depending on the value of state. 633 // For the purpose of this step, "EOF" is a special character representing 634 // that position is past the end of input. 635 636 // In descriptor 637 if (state === "in descriptor") { 638 // Do the following, depending on the value of c: 639 640 // Space character 641 // If current descriptor is not empty, append current descriptor to 642 // descriptors and let current descriptor be the empty string. 643 // Set state to after descriptor. 644 if (isSpace(c)) { 645 if (currentDescriptor) { 646 descriptors.push(currentDescriptor); 647 currentDescriptor = ""; 648 state = "after descriptor"; 649 } 650 651 // U+002C COMMA (,) 652 // Advance position to the next character in input. If current descriptor 653 // is not empty, append current descriptor to descriptors. Jump to the step 654 // labeled descriptor parser. 655 } else if (c === ",") { 656 pos += 1; 657 if (currentDescriptor) { 658 descriptors.push(currentDescriptor); 659 } 660 parseDescriptors(); 661 return; 662 663 // U+0028 LEFT PARENTHESIS (() 664 // Append c to current descriptor. Set state to in parens. 665 } else if (c === "\u0028") { 666 currentDescriptor = currentDescriptor + c; 667 state = "in parens"; 668 669 // EOF 670 // If current descriptor is not empty, append current descriptor to 671 // descriptors. Jump to the step labeled descriptor parser. 672 } else if (c === "") { 673 if (currentDescriptor) { 674 descriptors.push(currentDescriptor); 675 } 676 parseDescriptors(); 677 return; 678 679 // Anything else 680 // Append c to current descriptor. 681 } else { 682 currentDescriptor = currentDescriptor + c; 683 } 684 // (end "in descriptor" 685 686 // In parens 687 } else if (state === "in parens") { 688 689 // U+0029 RIGHT PARENTHESIS ()) 690 // Append c to current descriptor. Set state to in descriptor. 691 if (c === ")") { 692 currentDescriptor = currentDescriptor + c; 693 state = "in descriptor"; 694 695 // EOF 696 // Append current descriptor to descriptors. Jump to the step labeled 697 // descriptor parser. 698 } else if (c === "") { 699 descriptors.push(currentDescriptor); 700 parseDescriptors(); 701 return; 702 703 // Anything else 704 // Append c to current descriptor. 705 } else { 706 currentDescriptor = currentDescriptor + c; 707 } 708 709 // After descriptor 710 } else if (state === "after descriptor") { 711 712 // Do the following, depending on the value of c: 713 // Space character: Stay in this state. 714 if (isSpace(c)) { 715 716 // EOF: Jump to the step labeled descriptor parser. 717 } else if (c === "") { 718 parseDescriptors(); 719 return; 720 721 // Anything else 722 // Set state to in descriptor. Set position to the previous character in input. 723 } else { 724 state = "in descriptor"; 725 pos -= 1; 726 727 } 728 } 729 730 // Advance position to the next character in input. 731 pos += 1; 732 733 // Repeat this step. 734 } // (close while true loop) 735 } 736 737 // 4. Splitting loop: Collect a sequence of characters that are space 738 // characters or U+002C COMMA characters. If any U+002C COMMA characters 739 // were collected, that is a parse error. 740 while (true) { 741 collectCharacters(regexLeadingCommasOrSpaces); 742 743 // 5. If position is past the end of input, return candidates and abort these steps. 744 if (pos >= inputLength) { 745 return candidates; // (we're done, this is the sole return path) 746 } 747 748 // 6. Collect a sequence of characters that are not space characters, 749 // and let that be url. 750 url = collectCharacters(regexLeadingNotSpaces); 751 752 // 7. Let descriptors be a new empty list. 753 descriptors = []; 754 755 // 8. If url ends with a U+002C COMMA character (,), follow these substeps: 756 // (1). Remove all trailing U+002C COMMA characters from url. If this removed 757 // more than one character, that is a parse error. 758 if (url.slice(-1) === ",") { 759 url = url.replace(regexTrailingCommas, ""); 760 // (Jump ahead to step 9 to skip tokenization and just push the candidate). 761 parseDescriptors(); 762 763 // Otherwise, follow these substeps: 764 } else { 765 tokenize(); 766 } // (close else of step 8) 767 768 // 16. Return to the step labeled splitting loop. 769 } // (Close of big while loop.) 770 } 771 772 /* 773 * Sizes Parser 774 * 775 * By Alex Bell | MIT License 776 * 777 * Non-strict but accurate and lightweight JS Parser for the string value <img sizes="here"> 778 * 779 * Reference algorithm at: 780 * https://html.spec.whatwg.org/multipage/embedded-content.html#parse-a-sizes-attribute 781 * 782 * Most comments are copied in directly from the spec 783 * (except for comments in parens). 784 * 785 * Grammar is: 786 * <source-size-list> = <source-size># [ , <source-size-value> ]? | <source-size-value> 787 * <source-size> = <media-condition> <source-size-value> 788 * <source-size-value> = <length> 789 * http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#attr-img-sizes 790 * 791 * E.g. "(max-width: 30em) 100vw, (max-width: 50em) 70vw, 100vw" 792 * or "(min-width: 30em), calc(30vw - 15px)" or just "30vw" 793 * 794 * Returns the first valid <css-length> with a media condition that evaluates to true, 795 * or "100vw" if all valid media conditions evaluate to false. 796 * 797 */ 798 799 function parseSizes(strValue) { 800 801 // (Percentage CSS lengths are not allowed in this case, to avoid confusion: 802 // https://html.spec.whatwg.org/multipage/embedded-content.html#valid-source-size-list 803 // CSS allows a single optional plus or minus sign: 804 // http://www.w3.org/TR/CSS2/syndata.html#numbers 805 // CSS is ASCII case-insensitive: 806 // http://www.w3.org/TR/CSS2/syndata.html#characters ) 807 // Spec allows exponential notation for <number> type: 808 // http://dev.w3.org/csswg/css-values/#numbers 809 var regexCssLengthWithUnits = /^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i; 810 811 // (This is a quick and lenient test. Because of optional unlimited-depth internal 812 // grouping parens and strict spacing rules, this could get very complicated.) 813 var regexCssCalc = /^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i; 814 815 var i; 816 var unparsedSizesList; 817 var unparsedSizesListLength; 818 var unparsedSize; 819 var lastComponentValue; 820 var size; 821 822 // UTILITY FUNCTIONS 823 824 // (Toy CSS parser. The goals here are: 825 // 1) expansive test coverage without the weight of a full CSS parser. 826 // 2) Avoiding regex wherever convenient. 827 // Quick tests: http://jsfiddle.net/gtntL4gr/3/ 828 // Returns an array of arrays.) 829 function parseComponentValues(str) { 830 var chrctr; 831 var component = ""; 832 var componentArray = []; 833 var listArray = []; 834 var parenDepth = 0; 835 var pos = 0; 836 var inComment = false; 837 838 function pushComponent() { 839 if (component) { 840 componentArray.push(component); 841 component = ""; 842 } 843 } 844 845 function pushComponentArray() { 846 if (componentArray[0]) { 847 listArray.push(componentArray); 848 componentArray = []; 849 } 850 } 851 852 // (Loop forwards from the beginning of the string.) 853 while (true) { 854 chrctr = str.charAt(pos); 855 856 if (chrctr === "") { // ( End of string reached.) 857 pushComponent(); 858 pushComponentArray(); 859 return listArray; 860 } else if (inComment) { 861 if ((chrctr === "*") && (str[pos + 1] === "/")) { // (At end of a comment.) 862 inComment = false; 863 pos += 2; 864 pushComponent(); 865 continue; 866 } else { 867 pos += 1; // (Skip all characters inside comments.) 868 continue; 869 } 870 } else if (isSpace(chrctr)) { 871 // (If previous character in loop was also a space, or if 872 // at the beginning of the string, do not add space char to 873 // component.) 874 if ( (str.charAt(pos - 1) && isSpace( str.charAt(pos - 1) ) ) || !component ) { 875 pos += 1; 876 continue; 877 } else if (parenDepth === 0) { 878 pushComponent(); 879 pos +=1; 880 continue; 881 } else { 882 // (Replace any space character with a plain space for legibility.) 883 chrctr = " "; 884 } 885 } else if (chrctr === "(") { 886 parenDepth += 1; 887 } else if (chrctr === ")") { 888 parenDepth -= 1; 889 } else if (chrctr === ",") { 890 pushComponent(); 891 pushComponentArray(); 892 pos += 1; 893 continue; 894 } else if ( (chrctr === "/") && (str.charAt(pos + 1) === "*") ) { 895 inComment = true; 896 pos += 2; 897 continue; 898 } 899 900 component = component + chrctr; 901 pos += 1; 902 } 903 } 904 905 function isValidNonNegativeSourceSizeValue(s) { 906 if (regexCssLengthWithUnits.test(s) && (parseFloat(s) >= 0)) {return true;} 907 if (regexCssCalc.test(s)) {return true;} 908 // ( http://www.w3.org/TR/CSS2/syndata.html#numbers says: 909 // "-0 is equivalent to 0 and is not a negative number." which means that 910 // unitless zero and unitless negative zero must be accepted as special cases.) 911 if ((s === "0") || (s === "-0") || (s === "+0")) {return true;} 912 return false; 913 } 914 915 // When asked to parse a sizes attribute from an element, parse a 916 // comma-separated list of component values from the value of the element's 917 // sizes attribute (or the empty string, if the attribute is absent), and let 918 // unparsed sizes list be the result. 919 // http://dev.w3.org/csswg/css-syntax/#parse-comma-separated-list-of-component-values 920 921 unparsedSizesList = parseComponentValues(strValue); 922 unparsedSizesListLength = unparsedSizesList.length; 923 924 // For each unparsed size in unparsed sizes list: 925 for (i = 0; i < unparsedSizesListLength; i++) { 926 unparsedSize = unparsedSizesList[i]; 927 928 // 1. Remove all consecutive <whitespace-token>s from the end of unparsed size. 929 // ( parseComponentValues() already omits spaces outside of parens. ) 930 931 // If unparsed size is now empty, that is a parse error; continue to the next 932 // iteration of this algorithm. 933 // ( parseComponentValues() won't push an empty array. ) 934 935 // 2. If the last component value in unparsed size is a valid non-negative 936 // <source-size-value>, let size be its value and remove the component value 937 // from unparsed size. Any CSS function other than the calc() function is 938 // invalid. Otherwise, there is a parse error; continue to the next iteration 939 // of this algorithm. 940 // http://dev.w3.org/csswg/css-syntax/#parse-component-value 941 lastComponentValue = unparsedSize[unparsedSize.length - 1]; 942 943 if (isValidNonNegativeSourceSizeValue(lastComponentValue)) { 944 size = lastComponentValue; 945 unparsedSize.pop(); 946 } else { 947 continue; 948 } 949 950 // 3. Remove all consecutive <whitespace-token>s from the end of unparsed 951 // size. If unparsed size is now empty, return size and exit this algorithm. 952 // If this was not the last item in unparsed sizes list, that is a parse error. 953 if (unparsedSize.length === 0) { 954 return size; 955 } 956 957 // 4. Parse the remaining component values in unparsed size as a 958 // <media-condition>. If it does not parse correctly, or it does parse 959 // correctly but the <media-condition> evaluates to false, continue to the 960 // next iteration of this algorithm. 961 // (Parsing all possible compound media conditions in JS is heavy, complicated, 962 // and the payoff is unclear. Is there ever an situation where the 963 // media condition parses incorrectly but still somehow evaluates to true? 964 // Can we just rely on the browser/polyfill to do it?) 965 unparsedSize = unparsedSize.join(" "); 966 if (!(pf.matchesMedia( unparsedSize ) ) ) { 967 continue; 968 } 969 970 // 5. Return size and exit this algorithm. 971 return size; 972 } 973 974 // If the above algorithm exhausts unparsed sizes list without returning a 975 // size value, return 100vw. 976 return "100vw"; 977 } 978 979 // namespace 980 pf.ns = ("pf" + new Date().getTime()).substr(0, 9); 981 982 // srcset support test 983 pf.supSrcset = "srcset" in image; 984 pf.supSizes = "sizes" in image; 985 pf.supPicture = !!window.HTMLPictureElement; 986 987 // UC browser does claim to support srcset and picture, but not sizes, 988 // this extended test reveals the browser does support nothing 989 if (pf.supSrcset && pf.supPicture && !pf.supSizes) { 990 (function(image2) { 991 image.srcset = "data:,a"; 992 image2.src = "data:,a"; 993 pf.supSrcset = image.complete === image2.complete; 994 pf.supPicture = pf.supSrcset && pf.supPicture; 995 })(document.createElement("img")); 996 } 997 998 // Safari9 has basic support for sizes, but does't expose the `sizes` idl attribute 999 if (pf.supSrcset && !pf.supSizes) { 1000 1001 (function() { 1002 var width2 = "data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw=="; 1003 var width1 = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; 1004 var img = document.createElement("img"); 1005 var test = function() { 1006 var width = img.width; 1007 1008 if (width === 2) { 1009 pf.supSizes = true; 1010 } 1011 1012 alwaysCheckWDescriptor = pf.supSrcset && !pf.supSizes; 1013 1014 isSupportTestReady = true; 1015 // force async 1016 setTimeout(picturefill); 1017 }; 1018 1019 img.onload = test; 1020 img.onerror = test; 1021 img.setAttribute("sizes", "9px"); 1022 1023 img.srcset = width1 + " 1w," + width2 + " 9w"; 1024 img.src = width1; 1025 })(); 1026 1027 } else { 1028 isSupportTestReady = true; 1029 } 1030 1031 // using pf.qsa instead of dom traversing does scale much better, 1032 // especially on sites mixing responsive and non-responsive images 1033 pf.selShort = "picture>img,img[srcset]"; 1034 pf.sel = pf.selShort; 1035 pf.cfg = cfg; 1036 1037 /** 1038 * Shortcut property for `devicePixelRatio` ( for easy overriding in tests ) 1039 */ 1040 pf.DPR = (DPR || 1 ); 1041 pf.u = units; 1042 1043 // container of supported mime types that one might need to qualify before using 1044 pf.types = types; 1045 1046 pf.setSize = noop; 1047 1048 /** 1049 * Gets a string and returns the absolute URL 1050 * @param src 1051 * @returns {String} absolute URL 1052 */ 1053 1054 pf.makeUrl = memoize(function(src) { 1055 anchor.href = src; 1056 return anchor.href; 1057 }); 1058 1059 /** 1060 * Gets a DOM element or document and a selctor and returns the found matches 1061 * Can be extended with jQuery/Sizzle for IE7 support 1062 * @param context 1063 * @param sel 1064 * @returns {NodeList|Array} 1065 */ 1066 pf.qsa = function(context, sel) { 1067 return ( "querySelector" in context ) ? context.querySelectorAll(sel) : []; 1068 }; 1069 1070 /** 1071 * Shortcut method for matchMedia ( for easy overriding in tests ) 1072 * wether native or pf.mMQ is used will be decided lazy on first call 1073 * @returns {boolean} 1074 */ 1075 pf.matchesMedia = function() { 1076 if ( window.matchMedia && (matchMedia( "(min-width: 0.1em)" ) || {}).matches ) { 1077 pf.matchesMedia = function( media ) { 1078 return !media || ( matchMedia( media ).matches ); 1079 }; 1080 } else { 1081 pf.matchesMedia = pf.mMQ; 1082 } 1083 1084 return pf.matchesMedia.apply( this, arguments ); 1085 }; 1086 1087 /** 1088 * A simplified matchMedia implementation for IE8 and IE9 1089 * handles only min-width/max-width with px or em values 1090 * @param media 1091 * @returns {boolean} 1092 */ 1093 pf.mMQ = function( media ) { 1094 return media ? evalCSS(media) : true; 1095 }; 1096 1097 /** 1098 * Returns the calculated length in css pixel from the given sourceSizeValue 1099 * http://dev.w3.org/csswg/css-values-3/#length-value 1100 * intended Spec mismatches: 1101 * * Does not check for invalid use of CSS functions 1102 * * Does handle a computed length of 0 the same as a negative and therefore invalid value 1103 * @param sourceSizeValue 1104 * @returns {Number} 1105 */ 1106 pf.calcLength = function( sourceSizeValue ) { 1107 1108 var value = evalCSS(sourceSizeValue, true) || false; 1109 if (value < 0) { 1110 value = false; 1111 } 1112 1113 return value; 1114 }; 1115 1116 /** 1117 * Takes a type string and checks if its supported 1118 */ 1119 1120 pf.supportsType = function( type ) { 1121 return ( type ) ? types[ type ] : true; 1122 }; 1123 1124 /** 1125 * Parses a sourceSize into mediaCondition (media) and sourceSizeValue (length) 1126 * @param sourceSizeStr 1127 * @returns {*} 1128 */ 1129 pf.parseSize = memoize(function( sourceSizeStr ) { 1130 var match = ( sourceSizeStr || "" ).match(regSize); 1131 return { 1132 media: match && match[1], 1133 length: match && match[2] 1134 }; 1135 }); 1136 1137 pf.parseSet = function( set ) { 1138 if ( !set.cands ) { 1139 set.cands = parseSrcset(set.srcset, set); 1140 } 1141 return set.cands; 1142 }; 1143 1144 /** 1145 * returns 1em in css px for html/body default size 1146 * function taken from respondjs 1147 * @returns {*|number} 1148 */ 1149 pf.getEmValue = function() { 1150 var body; 1151 if ( !eminpx && (body = document.body) ) { 1152 var div = document.createElement( "div" ), 1153 originalHTMLCSS = docElem.style.cssText, 1154 originalBodyCSS = body.style.cssText; 1155 1156 div.style.cssText = baseStyle; 1157 1158 // 1em in a media query is the value of the default font size of the browser 1159 // reset docElem and body to ensure the correct value is returned 1160 docElem.style.cssText = fsCss; 1161 body.style.cssText = fsCss; 1162 1163 body.appendChild( div ); 1164 eminpx = div.offsetWidth; 1165 body.removeChild( div ); 1166 1167 //also update eminpx before returning 1168 eminpx = parseFloat( eminpx, 10 ); 1169 1170 // restore the original values 1171 docElem.style.cssText = originalHTMLCSS; 1172 body.style.cssText = originalBodyCSS; 1173 1174 } 1175 return eminpx || 16; 1176 }; 1177 1178 /** 1179 * Takes a string of sizes and returns the width in pixels as a number 1180 */ 1181 pf.calcListLength = function( sourceSizeListStr ) { 1182 // Split up source size list, ie ( max-width: 30em ) 100%, ( max-width: 50em ) 50%, 33% 1183 // 1184 // or (min-width:30em) calc(30% - 15px) 1185 if ( !(sourceSizeListStr in sizeLengthCache) || cfg.uT ) { 1186 var winningLength = pf.calcLength( parseSizes( sourceSizeListStr ) ); 1187 1188 sizeLengthCache[ sourceSizeListStr ] = !winningLength ? units.width : winningLength; 1189 } 1190 1191 return sizeLengthCache[ sourceSizeListStr ]; 1192 }; 1193 1194 /** 1195 * Takes a candidate object with a srcset property in the form of url/ 1196 * ex. "images/pic-medium.png 1x, images/pic-medium-2x.png 2x" or 1197 * "images/pic-medium.png 400w, images/pic-medium-2x.png 800w" or 1198 * "images/pic-small.png" 1199 * Get an array of image candidates in the form of 1200 * {url: "/foo/bar.png", resolution: 1} 1201 * where resolution is http://dev.w3.org/csswg/css-values-3/#resolution-value 1202 * If sizes is specified, res is calculated 1203 */ 1204 pf.setRes = function( set ) { 1205 var candidates; 1206 if ( set ) { 1207 1208 candidates = pf.parseSet( set ); 1209 1210 for ( var i = 0, len = candidates.length; i < len; i++ ) { 1211 setResolution( candidates[ i ], set.sizes ); 1212 } 1213 } 1214 return candidates; 1215 }; 1216 1217 pf.setRes.res = setResolution; 1218 1219 pf.applySetCandidate = function( candidates, img ) { 1220 if ( !candidates.length ) {return;} 1221 var candidate, 1222 i, 1223 j, 1224 length, 1225 bestCandidate, 1226 curSrc, 1227 curCan, 1228 candidateSrc, 1229 abortCurSrc; 1230 1231 var imageData = img[ pf.ns ]; 1232 var dpr = pf.DPR; 1233 1234 curSrc = imageData.curSrc || img[curSrcProp]; 1235 1236 curCan = imageData.curCan || setSrcToCur(img, curSrc, candidates[0].set); 1237 1238 // if we have a current source, we might either become lazy or give this source some advantage 1239 if ( curCan && curCan.set === candidates[ 0 ].set ) { 1240 1241 // if browser can abort image request and the image has a higher pixel density than needed 1242 // and this image isn't downloaded yet, we skip next part and try to save bandwidth 1243 abortCurSrc = (supportAbort && !img.complete && curCan.res - 0.1 > dpr); 1244 1245 if ( !abortCurSrc ) { 1246 curCan.cached = true; 1247 1248 // if current candidate is "best", "better" or "okay", 1249 // set it to bestCandidate 1250 if ( curCan.res >= dpr ) { 1251 bestCandidate = curCan; 1252 } 1253 } 1254 } 1255 1256 if ( !bestCandidate ) { 1257 1258 candidates.sort( ascendingSort ); 1259 1260 length = candidates.length; 1261 bestCandidate = candidates[ length - 1 ]; 1262 1263 for ( i = 0; i < length; i++ ) { 1264 candidate = candidates[ i ]; 1265 if ( candidate.res >= dpr ) { 1266 j = i - 1; 1267 1268 // we have found the perfect candidate, 1269 // but let's improve this a little bit with some assumptions ;-) 1270 if (candidates[ j ] && 1271 (abortCurSrc || curSrc !== pf.makeUrl( candidate.url )) && 1272 chooseLowRes(candidates[ j ].res, candidate.res, dpr, candidates[ j ].cached)) { 1273 1274 bestCandidate = candidates[ j ]; 1275 1276 } else { 1277 bestCandidate = candidate; 1278 } 1279 break; 1280 } 1281 } 1282 } 1283 1284 if ( bestCandidate ) { 1285 1286 candidateSrc = pf.makeUrl( bestCandidate.url ); 1287 1288 imageData.curSrc = candidateSrc; 1289 imageData.curCan = bestCandidate; 1290 1291 if ( candidateSrc !== curSrc ) { 1292 pf.setSrc( img, bestCandidate ); 1293 } 1294 pf.setSize( img ); 1295 } 1296 }; 1297 1298 pf.setSrc = function( img, bestCandidate ) { 1299 var origWidth; 1300 img.src = bestCandidate.url; 1301 1302 // although this is a specific Safari issue, we don't want to take too much different code paths 1303 if ( bestCandidate.set.type === "image/svg+xml" ) { 1304 origWidth = img.style.width; 1305 img.style.width = (img.offsetWidth + 1) + "px"; 1306 1307 // next line only should trigger a repaint 1308 // if... is only done to trick dead code removal 1309 if ( img.offsetWidth + 1 ) { 1310 img.style.width = origWidth; 1311 } 1312 } 1313 }; 1314 1315 pf.getSet = function( img ) { 1316 var i, set, supportsType; 1317 var match = false; 1318 var sets = img [ pf.ns ].sets; 1319 1320 for ( i = 0; i < sets.length && !match; i++ ) { 1321 set = sets[i]; 1322 1323 if ( !set.srcset || !pf.matchesMedia( set.media ) || !(supportsType = pf.supportsType( set.type )) ) { 1324 continue; 1325 } 1326 1327 if ( supportsType === "pending" ) { 1328 set = supportsType; 1329 } 1330 1331 match = set; 1332 break; 1333 } 1334 1335 return match; 1336 }; 1337 1338 pf.parseSets = function( element, parent, options ) { 1339 var srcsetAttribute, imageSet, isWDescripor, srcsetParsed; 1340 1341 var hasPicture = parent && parent.nodeName.toUpperCase() === "PICTURE"; 1342 var imageData = element[ pf.ns ]; 1343 1344 if ( imageData.src === undefined || options.src ) { 1345 imageData.src = getImgAttr.call( element, "src" ); 1346 if ( imageData.src ) { 1347 setImgAttr.call( element, srcAttr, imageData.src ); 1348 } else { 1349 removeImgAttr.call( element, srcAttr ); 1350 } 1351 } 1352 1353 if ( imageData.srcset === undefined || options.srcset || !pf.supSrcset || element.srcset ) { 1354 srcsetAttribute = getImgAttr.call( element, "srcset" ); 1355 imageData.srcset = srcsetAttribute; 1356 srcsetParsed = true; 1357 } 1358 1359 imageData.sets = []; 1360 1361 if ( hasPicture ) { 1362 imageData.pic = true; 1363 getAllSourceElements( parent, imageData.sets ); 1364 } 1365 1366 if ( imageData.srcset ) { 1367 imageSet = { 1368 srcset: imageData.srcset, 1369 sizes: getImgAttr.call( element, "sizes" ) 1370 }; 1371 1372 imageData.sets.push( imageSet ); 1373 1374 isWDescripor = (alwaysCheckWDescriptor || imageData.src) && regWDesc.test(imageData.srcset || ""); 1375 1376 // add normal src as candidate, if source has no w descriptor 1377 if ( !isWDescripor && imageData.src && !getCandidateForSrc(imageData.src, imageSet) && !imageSet.has1x ) { 1378 imageSet.srcset += ", " + imageData.src; 1379 imageSet.cands.push({ 1380 url: imageData.src, 1381 d: 1, 1382 set: imageSet 1383 }); 1384 } 1385 1386 } else if ( imageData.src ) { 1387 imageData.sets.push( { 1388 srcset: imageData.src, 1389 sizes: null 1390 } ); 1391 } 1392 1393 imageData.curCan = null; 1394 imageData.curSrc = undefined; 1395 1396 // if img has picture or the srcset was removed or has a srcset and does not support srcset at all 1397 // or has a w descriptor (and does not support sizes) set support to false to evaluate 1398 imageData.supported = !( hasPicture || ( imageSet && !pf.supSrcset ) || (isWDescripor && !pf.supSizes) ); 1399 1400 if ( srcsetParsed && pf.supSrcset && !imageData.supported ) { 1401 if ( srcsetAttribute ) { 1402 setImgAttr.call( element, srcsetAttr, srcsetAttribute ); 1403 element.srcset = ""; 1404 } else { 1405 removeImgAttr.call( element, srcsetAttr ); 1406 } 1407 } 1408 1409 if (imageData.supported && !imageData.srcset && ((!imageData.src && element.src) || element.src !== pf.makeUrl(imageData.src))) { 1410 if (imageData.src === null) { 1411 element.removeAttribute("src"); 1412 } else { 1413 element.src = imageData.src; 1414 } 1415 } 1416 1417 imageData.parsed = true; 1418 }; 1419 1420 pf.fillImg = function(element, options) { 1421 var imageData; 1422 var extreme = options.reselect || options.reevaluate; 1423 1424 // expando for caching data on the img 1425 if ( !element[ pf.ns ] ) { 1426 element[ pf.ns ] = {}; 1427 } 1428 1429 imageData = element[ pf.ns ]; 1430 1431 // if the element has already been evaluated, skip it 1432 // unless `options.reevaluate` is set to true ( this, for example, 1433 // is set to true when running `picturefill` on `resize` ). 1434 if ( !extreme && imageData.evaled === evalId ) { 1435 return; 1436 } 1437 1438 if ( !imageData.parsed || options.reevaluate ) { 1439 pf.parseSets( element, element.parentNode, options ); 1440 } 1441 1442 if ( !imageData.supported ) { 1443 applyBestCandidate( element ); 1444 } else { 1445 imageData.evaled = evalId; 1446 } 1447 }; 1448 1449 pf.setupRun = function() { 1450 if ( !alreadyRun || isVwDirty || (DPR !== window.devicePixelRatio) ) { 1451 updateMetrics(); 1452 } 1453 }; 1454 1455 // If picture is supported, well, that's awesome. 1456 if ( pf.supPicture ) { 1457 picturefill = noop; 1458 pf.fillImg = noop; 1459 } else { 1460 1461 // Set up picture polyfill by polling the document 1462 (function() { 1463 var isDomReady; 1464 var regReady = window.attachEvent ? /d$|^c/ : /d$|^c|^i/; 1465 1466 var run = function() { 1467 var readyState = document.readyState || ""; 1468 1469 timerId = setTimeout(run, readyState === "loading" ? 200 : 999); 1470 if ( document.body ) { 1471 pf.fillImgs(); 1472 isDomReady = isDomReady || regReady.test(readyState); 1473 if ( isDomReady ) { 1474 clearTimeout( timerId ); 1475 } 1476 1477 } 1478 }; 1479 1480 var timerId = setTimeout(run, document.body ? 9 : 99); 1481 1482 // Also attach picturefill on resize and readystatechange 1483 // http://modernjavascript.blogspot.com/2013/08/building-better-debounce.html 1484 var debounce = function(func, wait) { 1485 var timeout, timestamp; 1486 var later = function() { 1487 var last = (new Date()) - timestamp; 1488 1489 if (last < wait) { 1490 timeout = setTimeout(later, wait - last); 1491 } else { 1492 timeout = null; 1493 func(); 1494 } 1495 }; 1496 1497 return function() { 1498 timestamp = new Date(); 1499 1500 if (!timeout) { 1501 timeout = setTimeout(later, wait); 1502 } 1503 }; 1504 }; 1505 var lastClientWidth = docElem.clientHeight; 1506 var onResize = function() { 1507 isVwDirty = Math.max(window.innerWidth || 0, docElem.clientWidth) !== units.width || docElem.clientHeight !== lastClientWidth; 1508 lastClientWidth = docElem.clientHeight; 1509 if ( isVwDirty ) { 1510 pf.fillImgs(); 1511 } 1512 }; 1513 1514 on( window, "resize", debounce(onResize, 99 ) ); 1515 on( document, "readystatechange", run ); 1516 })(); 1517 } 1518 1519 pf.picturefill = picturefill; 1520 //use this internally for easy monkey patching/performance testing 1521 pf.fillImgs = picturefill; 1522 pf.teardownRun = noop; 1523 1524 /* expose methods for testing */ 1525 picturefill._ = pf; 1526 1527 window.picturefillCFG = { 1528 pf: pf, 1529 push: function(args) { 1530 var name = args.shift(); 1531 if (typeof pf[name] === "function") { 1532 pf[name].apply(pf, args); 1533 } else { 1534 cfg[name] = args[0]; 1535 if (alreadyRun) { 1536 pf.fillImgs( { reselect: true } ); 1537 } 1538 } 1539 } 1540 }; 1541 1542 while (setOptions && setOptions.length) { 1543 window.picturefillCFG.push(setOptions.shift()); 1544 } 1545 1546 /* expose picturefill */ 1547 window.picturefill = picturefill; 1548 1549 /* expose picturefill */ 1550 if ( typeof module === "object" && typeof module.exports === "object" ) { 1551 // CommonJS, just export 1552 module.exports = picturefill; 1553 } else if ( typeof define === "function" && define.amd ) { 1554 // AMD support 1555 define( "picturefill", function() { return picturefill; } ); 1556 } 1557 1558 // IE8 evals this sync, so it must be the last thing we do 1559 if ( !pf.supPicture ) { 1560 types[ "image/webp" ] = detectTypeSupport("image/webp", "data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==" ); 1561 } 1562 1563} )( window, document );
1564 1565 1566$(document).ready(function(){ 1567 $(".pop-up").fancybox(); 1568}); 1569 1570$(function() { 1571 if ($(window).width() < 992) { 1572 $('#main-nav').hcOffcanvasNav({ 1573 maxWidth: 992, 1574 height: 'bottom', 1575 insertClose: false, 1576 insertBack: true, 1577 labelBack: 'Ðазад', 1578 disableBody: 'true', 1579 levelSpacing: 0, 1580 closeOpenLevels: true, 1581 }); 1582 } 1583}); 1584 1585$(function() { 1586 if ($(window).width() > 991) { 1587 $('.subSiteList').each(function() { 1588 if ($(this).children('.subSiteList__item').length >= 9 ) { 1589 $(this).addClass('active'); 1590 } 1591 }) 1592 } 1593}); 1594 1595 1596// $('input[type=tel]').mask('+7 (999) 999-99-99'); 1597 1598$(function(){ 1599 $('.slider-js').slick({ 1600 slidesToShow: 1, 1601 slidesToScroll: 1, 1602 draggable: true, 1603 swipeToSlide: true, 1604 dots: true, 1605 dotsClass: 'slick-dots slider__dots', 1606 arrows: true, 1607 prevArrow: $('.slider__arrow--left'), 1608 nextArrow: $('.slider__arrow--right'), 1609 mobileFirst: false, 1610 centerMode: false, 1611 variableWidth: false, 1612 adaptiveHeight: false, 1613 autoplay: true, 1614 autoplaySpeed: 6500, 1615 responsive: [ 1616 { 1617 breakpoint: 577, 1618 settings: { 1619 arrows: false, 1620 } 1621 } 1622 ] 1623 }); 1624}); 1625 1626$(function() { 1627 $('.tab__captionList').on('click', 'li:not(.active)', function() { 1628 $(this) 1629 .addClass('active').siblings().removeClass('active') 1630 .closest('section').find('.tab__tabsContent').removeClass('active').eq($(this).index()).addClass('active'); 1631 }); 1632}); 1633 1634// $(function() { 1635// const video = document.getElementById('video'); 1636// const videoControls = document.getElementById('video-controls'); 1637// const playButton = document.getElementById('play'); 1638 1639// const videoWorks = !!document.createElement('video').canPlayType; 1640// if (videoWorks) { 1641// video.controls = false; 1642// videoControls.classList.remove('hidden'); 1643// } 1644 1645// function togglePlay() { 1646// if (video.paused) { 1647// video.play(); 1648// playButton.classList.add('hidden'); 1649// } else if (video.ended) { 1650// video.play(); 1651 1652// } else { 1653// video.pause(); 1654// playButton.classList.remove('hidden'); 1655// } 1656// } 1657 1658// video.addEventListener("ended",function(){ 1659// playButton.classList.remove('hidden'); 1660// }); 1661 1662// playButton.addEventListener('click', togglePlay); 1663// video.addEventListener('click', togglePlay); 1664 1665// video.addEventListener("timeupdate", myFunction); 1666 1667// video.addEventListener("canplaythrough", myFunction); 1668 1669// function myFunction() { 1670// document.getElementById("time-count").innerHTML = Math.round(video.duration - video.currentTime); 1671// } 1672// }); 1673 1674$(".design-js").flipster({ 1675 style: 'flat', 1676 spacing: -2.22, 1677 buttons: true, 1678 scrollwheel: false, 1679}); 1680 1681 1682$(document).ready(function() { 1683 $(".questions__itemCaption").on("click", function() { 1684 if ($(this).hasClass("active")) { 1685 $(this).removeClass("active"); 1686 $(this) 1687 .siblings(".questions__content") 1688 .slideUp(300); 1689 } else { 1690 $(".questions__itemCaption").removeClass("active"); 1691 $(this).addClass("active"); 1692 $(".questions__content").slideUp(300); 1693 $(this) 1694 .siblings(".questions__content") 1695 .slideDown(300); 1696 } 1697 }); 1698}); 1699 1700$(function(){ 1701 $('.customers-js').slick({ 1702 slidesToShow: 5, 1703 slidesToScroll: 1, 1704 draggable: true, 1705 swipeToSlide: true, 1706 dots: false, 1707 arrows: true, 1708 prevArrow: '<div class="customers__arrow customers__arrow--left"></div>', 1709 nextArrow: '<div class="customers__arrow customers__arrow--right"></div>', 1710 mobileFirst: false, 1711 centerMode: false, 1712 variableWidth: false, 1713 adaptiveHeight: false, 1714 responsive: [ 1715 { 1716 breakpoint: 992, 1717 settings: { 1718 slidesToShow: 4, 1719 } 1720 }, 1721 { 1722 breakpoint: 769, 1723 settings: { 1724 slidesToShow: 3, 1725 } 1726 }, 1727 { 1728 breakpoint: 577, 1729 settings: { 1730 slidesToShow: 2, 1731 } 1732 } 1733 ] 1734 }); 1735}); 1736 1737$(function(){ 1738 $('.production-js').slick({ 1739 slidesToShow: 1, 1740 slidesToScroll: 1, 1741 draggable: true, 1742 swipeToSlide: true, 1743 dots: false,
1744 arrows: false, 1745 mobileFirst: true, 1746 centerMode: false, 1747 variableWidth: true, 1748 adaptiveHeight: false, 1749 infinite: false, 1750 responsive: [ 1751 { 1752 breakpoint: 767, 1753 settings: 'unslick' 1754 } 1755 ] 1756 }); 1757}); 1758 1759$(function() { 1760 $('.form').each(function(){ 1761 // ÐбÑÑвлÑем пеÑеменнÑе (ÑоÑма и кнопка оÑпÑавки) 1762 var form = $(this), 1763 btn = form.find('.feedback__button'); 1764 1765 // // ÐобавлÑем ÐºÐ°Ð¶Ð´Ð¾Ð¼Ñ Ð¿ÑовеÑÑÐµÐ¼Ð¾Ð¼Ñ Ð¿Ð¾Ð»Ñ, Ñказание ÑÑо поле пÑÑÑое 1766 form.find('.feedback__input--required').addClass('empty'); 1767 1768 // ФÑнкÑÐ¸Ñ Ð¿ÑовеÑки полей ÑоÑÐ¼Ñ 1769 function checkInput(){ 1770 form.find('.feedback__input--required').each(function(){ 1771 if($(this).val() != '' ){ 1772 // ÐÑли поле не пÑÑÑое ÑдалÑем клаÑÑ-Ñказание 1773 $(this).removeClass('empty'); 1774 $(this).addClass('valid'); 1775 } else { 1776 // ÐÑли поле пÑÑÑое добавлÑем клаÑÑ-Ñказание 1777 $(this).addClass('empty'); 1778 $(this).removeClass('valid'); 1779 } 1780 }); 1781 } 1782 1783 // ФÑнкÑÐ¸Ñ Ð¿Ð¾Ð´ÑвеÑки незаполненнÑÑ Ð¿Ð¾Ð»ÐµÐ¹ 1784 function lightEmpty(){ 1785 form.find('.empty').addClass('invalid'); 1786 } 1787 1788 // ÐÑовеÑка в Ñежиме ÑеалÑного вÑемени 1789 setInterval(function(){ 1790 // ÐапÑÑкаем ÑÑнкÑÐ¸Ñ Ð¿ÑовеÑки полей на заполненноÑÑÑ 1791 checkInput(); 1792 // СÑиÑаем к-во незаполненнÑÑ Ð¿Ð¾Ð»ÐµÐ¹ 1793 var sizeEmpty = form.find('.empty').length; 1794 // ÐеÑаем ÑÑловие-ÑÑÐ¸Ð³ÐµÑ Ð½Ð° ÐºÐ½Ð¾Ð¿ÐºÑ Ð¾ÑпÑавки ÑоÑÐ¼Ñ 1795 if(sizeEmpty > 0){ 1796 if(btn.hasClass('disabled')){ 1797 return false 1798 } else { 1799 btn.addClass('disabled') 1800 } 1801 } else { 1802 btn.removeClass('disabled') 1803 } 1804 },500); 1805 1806 // СобÑÑие клика по кнопке оÑпÑавиÑÑ 1807 // btn.click(function(){ 1808 // if($(this).hasClass('disabled')){ 1809 // // подÑвеÑиваем незаполненнÑе Ð¿Ð¾Ð»Ñ Ð¸ ÑоÑÐ¼Ñ Ð½Ðµ оÑпÑавлÑем, еÑли еÑÑÑ Ð½ÐµÐ·Ð°Ð¿Ð¾Ð»Ð½ÐµÐ½Ð½Ñе Ð¿Ð¾Ð»Ñ 1810 // lightEmpty(); 1811 // return false 1812 // } else { 1813 // // ÐÑе Ñ Ð¾ÑоÑо, вÑе заполнено, оÑпÑавлÑем ÑоÑÐ¼Ñ 1814 // if(!!document.querySelector('.recaptcha-checkbox-checked')) { 1815 // alert('GOO'); 1816 // form.submit(); 1817 // } 1818 1819 // } 1820 // }); 1821 }); 1822}); 1823 1824document.querySelectorAll('form').forEach(elem => { 1825 elem.addEventListener('submit', (form) => { 1826 return false; 1827 }); 1828}); 1829 1830$(function() { 1831 $('.calculation__input').on("focus", function(){ 1832 $(this).parent('.calculation__inputWrap').addClass('focus'); 1833 }); 1834 $('.calculation__input').on("blur", function(){ 1835 if($(this).val() != '' && $('.calculation__input:focus')){ 1836 $(this).parent('.calculation__inputWrap').addClass('focus'); 1837 } else { 1838 $(this).parent('.calculation__inputWrap').removeClass('focus'); 1839 } 1840 }); 1841}); 1842 1843 1844// document.getElementById('attach-field').addEventListener('change', function(){ 1845// if( this.value ){ 1846// $('.feedback__file').addClass('checked'); 1847// } else { 1848// $('.feedback__file').removeClass('checked'); 1849// } 1850// }); 1851 1852$(function(){ 1853 $('.checkbox-js').slick({ 1854 slidesToShow: 7, 1855 slidesToScroll: 1, 1856 draggable: true, 1857 swipeToSlide: true, 1858 focusOnSelect: true, 1859 dots: false, 1860 arrows: true, 1861 prevArrow: '<div class="checkbox__arrow checkbox__arrow--left"></div>', 1862 nextArrow: '<div class="checkbox__arrow checkbox__arrow--right"></div>', 1863 mobileFirst: false, 1864 centerMode: false, 1865 variableWidth: true, 1866 adaptiveHeight: false, 1867 responsive: [ 1868 { 1869 breakpoint: 992, 1870 settings: { 1871 slidesToShow: 4, 1872 variableWidth: false, 1873 arows: false, 1874 } 1875 }, 1876 { 1877 breakpoint: 769, 1878 settings: { 1879 slidesToShow: 3, 1880 variableWidth: false,
1881 arows: false, 1882 } 1883 }, 1884 { 1885 breakpoint: 577, 1886 settings: { 1887 slidesToShow: 2, 1888 variableWidth: false, 1889 arows: false, 1890 } 1891 } 1892 ] 1893 }); 1894}); 1895 1896 1897$(function() { 1898 1899 // $('#edition').on('change', function() { 1900 1901 $('.productCase').on('click', function() { 1902 var text = $(this).children('span').text(); 1903 var id = $(this).attr('data-id'); 1904 1905 $('.productCase').removeClass('active'); 1906 $(this).addClass('active'); 1907 $(this).parents('.modal__orderForm').find('.feedback__hidden[name="p12"]').val( text ); 1908 $('.fromCount__input[data-inputId="countId-'+id+'"]').val( text ); 1909 }); 1910 1911 $('.productTiraj').on('click', function() { 1912 var text = $(this).children('span').text(); 1913 1914 $('.productTiraj').removeClass('active'); 1915 $(this).addClass('active'); 1916 $('#edition').val(text); 1917 $('.formProduct .feedback__hidden[name="p14"]').val(text); 1918 $('.formProductCalc .feedback__hidden[name="p12"]').val(text); 1919 1920 if ($('#CustomTirag').hasClass('active')) { 1921 if ($('.cursor-arrow').length == 0) { 1922 $('#PreciseTerrazh').append(` 1923 <span class="cursor-arrow"> 1924 <svg width="41" height="32" viewBox="0 0 41 32" fill="none" xmlns="http://www.w3.org/2000/svg"> 1925 <path fill-rule="evenodd" clip-rule="evenodd" d="M39.8089 15.6675C39.8089 16.3657 39.2429 16.9317 38.5447 16.9317L5.83983 16.9317L17.0905 28.1824C17.5842 28.6761 17.5842 29.4765 17.0905 29.9702C16.5968 30.4639 15.7964 30.4639 15.3027 29.9702L1.89387 16.5614C1.40017 16.0677 1.40017 15.2673 1.89387 14.7736L15.3027 1.36473C15.7964 0.871028 16.5968 0.871028 17.0905 1.36473C17.5842 1.85843 17.5842 2.65887 17.0905 3.15257L5.83983 14.4033L38.5447 14.4033C39.2429 14.4033 39.8089 14.9693 39.8089 15.6675Z" fill="#1A1A1A" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> 1926 </svg> 1927 </span> 1928 `); 1929 } 1930 } else { 1931 $('.cursor-arrow').remove(); 1932 } 1933 }); 1934 1935 1936 $('#edition').on('input', function () { 1937 if($(this).val() !== '') { 1938 $('.cursor-arrow').remove(); 1939 } 1940 }) 1941 1942 $('.checkbox__itemLabel').on('click', function() { 1943 var text = $(this).children('span').text(); 1944 1945 $('.checkbox__itemLabel').removeClass('active'); 1946 $(this).addClass('active'); 1947 $('.formProduct .feedback__hidden[name="p18"]').val( text ); 1948 }); 1949 1950 $('.formProduct #edition').on('keyup', function() { 1951 $('.formProduct .feedback__hidden[name="p14"]').val( $(this).val() ); 1952 }); 1953 $('.formProduct #length').on('keyup', function() { 1954 $('.formProduct .feedback__hidden[name="p15"]').val( $(this).val() ); 1955 }); 1956 $('.formProduct #width').on('keyup', function() { 1957 $('.formProduct .feedback__hidden[name="p16"]').val( $(this).val() ); 1958 }); 1959 $('.formProduct #height').on('keyup', function() { 1960 $('.formProduct .feedback__hidden[name="p17"]').val( $(this).val() ); 1961 }); 1962 1963 1964 $('.formProductCalc #edition').on('keyup', function() { 1965 $('.formProductCalc .feedback__hidden[name="p12"]').val( $(this).val() ); 1966 }); 1967 $('.formProductCalc #length').on('keyup', function() { 1968 $('.formProductCalc .feedback__hidden[name="p13"]').val( $(this).val() ); 1969 }); 1970 $('.formProductCalc #width').on('keyup', function() { 1971 $('.formProductCalc .feedback__hidden[name="p14"]').val( $(this).val() ); 1972 }); 1973 $('.formProductCalc #height').on('keyup', function() { 1974 $('.formProductCalc .feedback__hidden[name="p15"]').val( $(this).val() ); 1975 }); 1976 1977}); 1978 1979 1980$(document).ready(function(){ 1981 $('.feedback__file').each( function(i) 1982 { 1983 var $input = $(this).children('input'), 1984 $label = $(this).children('span'), 1985 labelVal = $label.html(); 1986 1987 $input.attr('id', 'file' + i); 1988 $(this).attr('for', 'file' + i); 1989 1990 $input.on('change', function(e) 1991 { 1992 var fileName = '', 1993 val = $(this).val(); 1994 1995 if( this.files && this.files.length > 1 ) 1996 { 1997 fileName = ( this.getAttribute( 'data-multiple-caption' ) || '' ).replace( '{count}', this.files.length ); 1998 } 1999 else if( e.target.value ) 2000 { 2001 fileName = e.target.value.split( '\\' ).pop(); 2002 } 2003 if( fileName ) 2004 { 2005 $label.html( 'ÐÑбÑан Ñайл: ' + fileName ); 2006 2007 if( val ){ 2008 $label.parent().addClass('checked'); 2009 } else { 2010 $label.parent().removeClass('checked'); 2011 } 2012 } 2013 else 2014 {
2015 $label.html( labelVal ); 2016 } 2017 }); 2018 }); 2019}); 2020 2021 2022$(function(){ 2023 $('.product__imgList-js').slick({ 2024 slidesToShow: 3, 2025 vertical: true, 2026 draggable: false, 2027 swipeToSlide: true, 2028 dots: false, 2029 arrows: true, 2030 prevArrow: '<div class="customers__arrow product__arrow product__arrow--top"></div>', 2031 nextArrow: '<div class="customers__arrow product__arrow product__arrow--bot"></div>', 2032 mobileFirst: false, 2033 asNavFor: '.product__mainSlider-js', 2034 focusOnSelect: true, 2035 responsive: [ 2036 { 2037 breakpoint: 992, 2038 settings: { 2039 slidesToShow: 3, 2040 vertical: false, 2041 } 2042 } 2043 ] 2044 }); 2045 2046 $('.product__imgList-js-equipment').slick({ 2047 slidesToShow: 3, 2048 vertical: false, 2049 draggable: false, 2050 swipeToSlide: true, 2051 dots: false, 2052 arrows: false, 2053 prevArrow: '<div class="customers__arrow product__arrow product__arrow--top"></div>', 2054 nextArrow: '<div class="customers__arrow product__arrow product__arrow--bot"></div>', 2055 mobileFirst: false, 2056 asNavFor: '.product__mainSlider-js-equipment', 2057 focusOnSelect: false, 2058 responsive: [ 2059 { 2060 breakpoint: 768, 2061 settings: { 2062 slidesToShow: 2, 2063 vertical: false, 2064 } 2065 }, 2066 { 2067 breakpoint: 480, 2068 settings: { 2069 slidesToShow: 2, 2070 vertical: false, 2071 } 2072 } 2073 ] 2074 }); 2075}); 2076 2077$(function(){ 2078 $('.product__mainSlider-js').slick({ 2079 slidesToShow: 1, 2080 fade: true, 2081 cssEase: 'linear', 2082 arrows: false, 2083 asNavFor: '.product__imgList-js', 2084 }); 2085 2086 $('.product__mainSlider-js-equipment').slick({ 2087 slidesToShow: 1, 2088 fade: true, 2089 cssEase: 'linear', 2090 arrows: false, 2091 asNavFor: '.product__imgList-js-equipment', 2092 }); 2093 2094 $('input[type=tel]').mask('+7 (999) 999-99-99'); 2095 2096}); 2097 2098 2099// $('.product__desc').length(); 2100// if ( $('.product__desc p').text().length > 130 ) { 2101// $('.product__desc p') 2102// .css('height', 73) 2103// .css('overflow', 'hidden') 2104// .after('<a href="javascript:;" class="product__link">ЧиÑаÑÑ Ð¿Ð¾Ð»Ð½Ð¾ÑÑÑÑ</a>'); 2105// $('.product__link').on('click', function() { 2106// $(this).prev().css('height', 'auto'); 2107// $(this).hide(); 2108// }); 2109// } 2110 2111 2112$(function() { 2113 2114 diafan_ajax.success['feedback_add'] = function(form, response){ 2115 if(response.result) 2116 { 2117 2118 $.fancybox.close(); 2119 2120 setTimeout(function(){ 2121 $.fancybox.open({src:'#modal_thanks',type:'inline'}); 2122 },200); 2123 2124 2125 setTimeout(function(){ 2126 $.fancybox.close(); 2127 },3500); 2128 2129 } 2130 } 2131 2132 diafan_ajax.success['cart_one_click'] = function(form, response){ 2133 if(response.result) 2134 { 2135 2136 $.fancybox.close(); 2137 2138 setTimeout(function(){ 2139 $.fancybox.open({src:'#modal_thanks',type:'inline'}); 2140 },200); 2141 2142 2143 setTimeout(function(){ 2144 $.fancybox.close(); 2145 },3500); 2146 2147 } 2148 } 2149 2150}); 2151 2152 2153// Ð¡Ð»Ð°Ð¹Ð´ÐµÑ Ð½Ð° ÑÑÑаниÑе ÑÐµÑ Ð½Ð¾Ð»Ð¾Ð³Ð¸Ð¸ 2154$('.tech_slider-row').slick({ 2155 slidesToShow: 1, 2156 slidesToScroll: 1, 2157 arrows: false, 2158 fade: true, 2159 swipe: false, 2160 touchMove: false, 2161 asNavFor: '.tech_band' 2162}); 2163$('.tech_band').slick({ 2164 slidesToShow: 7, 2165 slidesToScroll: 1, 2166 asNavFor: '.tech_slider-row', 2167 dots: false, 2168 arrows: false, 2169 centerMode: true, 2170 centerPadding: 0, 2171 focusOnSelect: true, 2172 responsive: [ 2173 { 2174 breakpoint: 1800, 2175 settings: { 2176 slidesToShow: 7, 2177 slidesToScroll: 1 2178 } 2179 }, 2180 { 2181 breakpoint: 1440, 2182 settings: { 2183 slidesToShow: 6, 2184 slidesToScroll: 1 2185 } 2186 }, 2187 { 2188 breakpoint: 1280, 2189 settings: { 2190 slidesToShow: 4, 2191 slidesToScroll: 1 2192 } 2193 }, 2194 { 2195 breakpoint: 1025, 2196 settings: { 2197 centerMode: false, 2198 slidesToShow: 4, 2199 slidesToScroll: 1 2200 } 2201 }, 2202 { 2203 breakpoint: 770, 2204 settings: { 2205 centerMode: false, 2206 slidesToShow: 3, 2207 arrows: false, 2208 slidesToScroll: 1 2209 } 2210 }, 2211 { 2212 breakpoint: 600, 2213 settings: { 2214 centerMode: true, 2215 slidesToShow: 1, 2216 slidesToScroll: 1, 2217 arrows: false 2218 } 2219 } 2220 ] 2221}); 2222 2223$(document).ready(function(){ 2224 $('.product__imgList-js').css('height', 'auto'); 2225 $('.product__mainSlider-js').css('height', 'auto'); 2226}); 2227 2228$(function() { 2229 2230 $('.nyTab__tab:last-child').show(); 2231 $('.nyTab__listItem:last-child').addClass('active'); 2232 2233 $('.nyTab__listItem').click(function() { 2234 2235 var linkID = $(this).attr('data-id'); 2236 2237 $('.nyTab__listItem').removeClass('active'); 2238 $(this).addClass('active'); 2239 2240 $('.nyTab__tab').hide(); 2241 // $( linkID ).show(); 2242 $( linkID ).fadeIn(); 2243 }); 2244 2245 2246 if ($(window).width() <= 991) { 2247 const clone = $('.header__top-menu').clone(true); 2248 console.log('Ðлон:', clone); 2249 $('.nav-wrapper-1').append(clone); 2250 2251 $('.nav-wrapper-1').append(` 2252 <div class="nav-contacts"> 2253 <div class="nav-contact"> 2254 <a href="tel:+74950893620"> 2255 +7 (495) 089-36-20 2256 </a> 2257 </div> 2258 <div class="nav-contact"> 2259 <p><strong>ÐдÑеÑ</strong></p> 2260 <p>ÐоÑква, Ñл. ÐеÑейÑÐºÐ°Ñ 29а, Ñ1</p> 2261 </div> 2262 <div class="nav-contact"> 2263 <p><strong>ЧаÑÑ ÑабоÑÑ</strong></p> 2264 <p>Ðн-ÐÑ 9:00â18:00</p> 2265 </div> 2266 </div> 2267 `) 2268 } 2269 2270 2271 2272 if (localStorage.getItem('cookieConsent') === 'true') { 2273 $('#cookies').hide(); 2274 } else { 2275 $('#cookies').show(); 2276 } 2277 2278 $('#cookies .button').click(function() { 2279 localStorage.setItem('cookieConsent', 'true'); 2280 $('#cookies').fadeOut(); 2281 }); 2282 2283 $('.cookies-close').click(function () { 2284 $('#cookies').fadeOut(); 2285 }) 2286}); 2287
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.