").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){s(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("esgbox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(s(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),s(e).appendTo(t.$slide),s(e).is("video,audio")&&(s(e).addClass("esgbox-video"),s(e).wrap("
"),t.contentType="video",t.opts.width=t.opts.width||s(e).attr("width"),t.opts.height=t.opts.height||s(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.esgbox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("
").children().first()),t.$content.addClass("esgbox-content"),t.$slide.addClass("esgbox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("esgbox-slide--"+t.contentType).addClass("esgbox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=s(this.translate(this,this.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){this.isClosing||(t.isLoading=!1,t.isLoaded=!0,this.trigger("afterLoad",t),this.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=s(this.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.egbx",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&s('
').appendTo(t.$content)),this.adjustCaption(t),this.adjustLayout(t),t.pos===this.currPos&&this.updateCursor(),this.revealContent(t))},adjustCaption:function(t){var e,s=t||this.current,o=s.opts.caption,i=s.opts.captionPosition,n=s.opts.preventCaptionOverlap,a=this.$refs.caption,r=!1;a.toggleClass("esgbox-caption--separate",n),n&&o&&o.length&&(s.pos!==this.currPos?((e=a.clone().appendTo(a.parent())).children().eq(0).empty().html(o),r=e.outerHeight(!0),e.empty().remove()):this.$caption&&(r=this.$caption.outerHeight(!0)),s.$slide.css("padding-"+i,r||""))},adjustLayout:function(t){var e,s,o,i,n=t||this.current;n.isLoaded&&!0!==n.opts.disableLayoutFix&&(n.$content.css("margin-bottom",""),n.$content.outerHeight()>n.$slide.height()+.5&&(o=n.$slide[0].style["padding-bottom"],i=n.$slide.css("padding-bottom"),parseFloat(i)>0&&(e=n.$slide[0].scrollHeight,n.$slide.css("padding-bottom",0),Math.abs(e-n.$slide[0].scrollHeight)<1&&(s=i),n.$slide.css("padding-bottom",o))),n.$content.css("margin-bottom",s))},revealContent:function(t){var e,o,i,n,a=this,r=t.$slide,l=!1,c=!1,h=a.isMoved(t),d=t.isRevealed;return t.isRevealed=!0,e=t.opts[a.firstRun?"animationEffect":"transitionEffect"],i=t.opts[a.firstRun?"animationDuration":"transitionDuration"],i=parseInt(void 0===t.forcedDuration?i:t.forcedDuration,10),!h&&t.pos===a.currPos&&i||(e=!1),"zoom"===e&&(t.pos===a.currPos&&i&&"image"===t.type&&!t.hasError&&(c=a.getThumbPos(t))?l=a.getFitPos(t):e="fade"),"zoom"===e?(a.isAnimating=!0,l.scaleX=l.width/c.width,l.scaleY=l.height/c.height,"auto"==(n=t.opts.zoomOpacity)&&(n=Math.abs(t.width/t.height-c.width/c.height)>.1),n&&(c.opacity=.1,l.opacity=1),s.esgbox.setTranslate(t.$content.removeClass("esgbox-is-hidden"),c),u(t.$content),void s.esgbox.animate(t.$content,l,i,function(){a.isAnimating=!1,a.complete()})):(a.updateSlide(t),e?(s.esgbox.stop(r),o="esgbox-slide--"+(t.pos>=a.prevPos?"next":"previous")+" esgbox-animated esgbox-fx-"+e,r.addClass(o).removeClass("esgbox-slide--current"),t.$content.removeClass("esgbox-is-hidden"),u(r),"image"!==t.type&&t.$content.hide().show(0),void s.esgbox.animate(r,"esgbox-slide--current",i,function(){r.removeClass(o).css({transform:"",opacity:""}),t.pos===a.currPos&&a.complete()},!0)):(t.$content.removeClass("esgbox-is-hidden"),d||!h||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===a.currPos&&a.complete())))},getThumbPos:function(t){var o,i,n,a,r,l,c=t.$thumb;return!(!c||!function(t){var o,i;return!(!t||t.ownerDocument!==e)&&(s(".esgbox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},i=e.elementFromPoint(o.x,o.y)===t,s(".esgbox-container").css("pointer-events",""),i)}(c[0]))&&(i=s.esgbox.getTranslate(c),n=parseFloat(c.css("border-top-width")||0),a=parseFloat(c.css("border-right-width")||0),r=parseFloat(c.css("border-bottom-width")||0),l=parseFloat(c.css("border-left-width")||0),o={top:i.top+n,left:i.left+l,width:i.width-a-l,height:i.height-n-r,scaleX:1,scaleY:1},i.width>0&&i.height>0&&o)},complete:function(){var t,e=this,o=e.current,i={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),u(o.$slide),o.$slide.addClass("esgbox-slide--complete"),s.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?i[o.pos]=o:o&&(s.esgbox.stop(o.$slide),o.$slide.off().remove())}),e.slides=i),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShowESGBX"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&"html"===o.contentType&&((t=o.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,s;this.group.length<2||(s=this.slides[this.currPos+1],(e=this.slides[this.currPos-1])&&e.type===t&&this.loadSlide(e),s&&s.type===t&&this.loadSlide(s))},focus:function(t,o){var i,n,a=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");this.isClosing||((i=(i=!t&&this.current&&this.current.isComplete?this.current.$slide.find("*:visible"+(o?":not(.esgbox-close-small)":"")):this.$refs.container.find("*:visible")).filter(a).filter(function(){return"hidden"!==s(this).css("visibility")&&!s(this).hasClass("disabled")})).length?(n=i.index(e.activeElement),t&&t.shiftKey?(n<0||0==n)&&(t.preventDefault(),i.eq(i.length-1).trigger("focus")):(n<0||n==i.length-1)&&(t&&t.preventDefault(),i.eq(0).trigger("focus"))):this.$refs.container.trigger("focus"))},activate:function(){var t=this;s(".esgbox-container").each(function(){var e=s(this).data("EsgBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,n,a,r,l,c,d=this,g=d.current,p=function(){d.cleanUp(t)};return!d.isClosing&&(d.isClosing=!0,!1===d.trigger("beforeClose",t)?(d.isClosing=!1,h(function(){d.update()}),!1):(d.removeEvents(),n=g.$content,o=g.opts.animationEffect,i=s.isNumeric(e)?e:o?g.opts.animationDuration:0,g.$slide.removeClass("esgbox-slide--complete esgbox-slide--next esgbox-slide--previous esgbox-animated"),!0!==t?s.esgbox.stop(g.$slide):o=!1,g.$slide.siblings().trigger("onReset").remove(),i&&d.$refs.container.removeClass("esgbox-is-open").addClass("esgbox-is-closing").css("transition-duration",i+"ms"),d.hideLoading(g),d.hideControls(!0),d.updateCursor(),"zoom"!==o||n&&i&&"image"===g.type&&!d.isMoved()&&!g.hasError&&(c=d.getThumbPos(g))||(o="fade"),"zoom"===o?(s.esgbox.stop(n),l={top:(a=s.esgbox.getTranslate(n)).top,left:a.left,scaleX:a.width/c.width,scaleY:a.height/c.height,width:c.width,height:c.height},"auto"==(r=g.opts.zoomOpacity)&&(r=Math.abs(g.width/g.height-c.width/c.height)>.1),r&&(c.opacity=0),s.esgbox.setTranslate(n,l),u(n),s.esgbox.animate(n,c,i,p),!0):(o&&i?s.esgbox.animate(g.$slide.addClass("esgbox-slide--previous").removeClass("esgbox-slide--current"),"esgbox-animated esgbox-fx-"+o,i,p):!0===t?setTimeout(p,i):p(),!0)))},cleanUp:function(e){var o,i,n,a=this.current.opts.$orig;this.current.$slide.trigger("onReset"),this.$refs.container.empty().remove(),this.trigger("afterClose",e),this.current.opts.backFocus&&(a&&a.length&&a.is(":visible")||(a=this.$trigger),a&&a.length&&(i=t.scrollX,n=t.scrollY,a.trigger("focus"),s("html, body").scrollTop(n).scrollLeft(i))),this.current=null,(o=s.esgbox.getInstance())?o.activate():(s("body").removeClass("esgbox-active compensate-for-scrollbar"),s("#esgbox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),n=e&&e.opts?e:this.current;if(n?i.unshift(n):n=this,i.unshift(this),s.isFunction(n.opts[t])&&(o=n.opts[t].apply(n,i)),!1===o)return o;"afterClose"!==t&&this.$refs?this.$refs.container.trigger(t+".egbx",i):l.trigger(t+".egbx",i)},updateControls:function(){var t=this.current,o=t.index,i=this.$refs.container,n=this.$refs.caption,a=t.opts.caption;t.$slide.trigger("refresh"),a&&a.length?(this.$caption=n,n.children().eq(0).html(a)):this.$caption=null,this.hasHiddenControls||this.isIdle||this.showControls(),i.find("[data-esgbox-count]").html(this.group.length),i.find("[data-esgbox-index]").html(o+1),i.find("[data-esgbox-prev]").prop("disabled",!t.opts.loop&&o<=0),i.find("[data-esgbox-next]").prop("disabled",!t.opts.loop&&o>=this.group.length-1),"image"===t.type?i.find("[data-esgbox-zoom]").show().end().find("[data-esgbox-download]").attr("href",t.opts.image.src||t.src).show():t.opts.toolbar&&i.find("[data-esgbox-download],[data-esgbox-zoom]").hide(),s(e.activeElement).is(":hidden,[disabled]")&&this.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map(function(t){return"esgbox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this.current?this.current.opts:this.opts,e=this.$refs.container;this.hasHiddenControls=!1,this.idleSecondsCounter=0,e.toggleClass("esgbox-show-toolbar",!(!t.toolbar||!t.buttons)).toggleClass("esgbox-show-infobar",!!(t.infobar&&this.group.length>1)).toggleClass("esgbox-show-caption",!!this.$caption).toggleClass("esgbox-show-nav",!!(t.arrows&&this.group.length>1)).toggleClass("esgbox-is-modal",!!t.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),s.esgbox={version:"3.5.7",defaults:a,getInstance:function(t){var e=s('.esgbox-container:not(".esgbox-is-closing"):last').data("EsgBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===s.type(t)?e[t].apply(e,o):"function"===s.type(t)&&t.apply(e,o),e)},open:function(t,e,s){return new b(t,e,s)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),l.add("body").off("click.egbx-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(i=e.createElement("div"),t.getComputedStyle&&t.getComputedStyle(i)&&t.getComputedStyle(i).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var s="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(s=(void 0===e.left?t.position().left:e.left)+"px, "+(void 0===e.top?t.position().top:e.top)+"px",s=this.use3d?"translate3d("+s+", 0px)":"translate("+s+")"),void 0!==e.scaleX&&void 0!==e.scaleY?s+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(s+=" scaleX("+e.scaleX+")"),s.length&&(o.transform=s),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(t,e,o,i,n){var a,r=this;s.isFunction(o)&&(i=o,o=null),r.stop(t),a=r.getTranslate(t),t.on(g,function(l){(!l||!l.originalEvent||t.is(l.originalEvent.target)&&"z-index"!=l.originalEvent.propertyName)&&(r.stop(t),s.isNumeric(o)&&t.css("transition-duration",""),s.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:a.width*e.scaleX,height:a.height*e.scaleY,scaleX:1,scaleY:1}):!0!==n&&t.removeClass(e),s.isFunction(i)&&i(l))}),s.isNumeric(o)&&t.css("transition-duration",o+"ms"),s.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass("esgbox-slide--image")&&t.parent().addClass("esgbox-is-scaling")),s.esgbox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(g)},o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(g),t.off(g).css("transition-duration",""),t.parent().removeClass("esgbox-is-scaling"))}},s.fn.esgbox=function(t){var e;return(e=(t=t||{}).selector||!1)?s("body").off("click.egbx-start",e).on("click.egbx-start",e,{options:t},f):this.off("click.egbx-start").on("click.egbx-start",{items:this,options:t},f),this},l.on("click.egbx-start","[data-esgbox]",f),l.on("click.egbx-start","[data-esgbox-trigger]",function(t){s('[data-esgbox="'+s(this).attr("data-esgbox-trigger")+'"]').eq(s(this).attr("data-esgbox-index")||0).trigger("click.egbx-start",{$trigger:s(this)})}),n=null,l.on("mousedown mouseup focus blur",".esgbox-button",function(t){switch(t.type){case"mousedown":n=s(this);break;case"mouseup":n=null;break;case"focusin":s(".esgbox-button").removeClass("esgbox-focus"),s(this).is(n)||s(this).is("[disabled]")||s(this).addClass("esgbox-focus");break;case"focusout":s(".esgbox-button").removeClass("esgbox-focus")}})}function f(t,e){var o,i,n,a=[],r=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=p(t.data.options,e)),o=e.$target||s(t.currentTarget).trigger("blur"),(n=s.esgbox.getInstance())&&n.$trigger&&n.$trigger.is(o)||(a=e.selector?s(e.selector):(i=o.attr("data-esgbox")||"")?(a=t.data?t.data.items:[]).length?a.filter('[data-esgbox="'+i+'"]'):s('[data-esgbox="'+i+'"]'):[o],(r=s(a).index(o))<0&&(r=0),(n=s.esgbox.open(a,e,r)).$trigger=o))}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{rel:0,autoplay:1,autohide:1,fs:1,hd:1,playsinline:1,wmode:"transparent",enablejsapi:1,origin:location.protocol+"//"+location.hostname,html5:1,mute:0},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},s=function(e,s,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(s,function(t,s){e=e.replace("$"+t,s||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e};t(document).on("objectNeedsType.egbx",function(o,i,n){var a,r,l,c,h,d,g,u=n.src||"",p=!1;a=t.extend(!0,{},e,n.opts.media),t.each(a,function(e,o){if(l=u.match(o.matcher)){if(p=o.type,g=e,d={},o.paramPlace&&l[o.paramPlace]){"?"==(h=l[o.paramPlace])[0]&&(h=h.substring(1)),h=h.split("&");for(var i=0;i
1&&s.next()},onReady:function(e){(e&&e.target?jQuery(e.target.g||e.target.h||e.target.i).attr("src"):"").indexOf("autoplay=1")>-1&&(t.esgbox.is_mobile()||t.esgbox.isSafari11())&&(i.setVolume(0),i.mute(),i.playVideo())}}}):"vimeo"===e&&void 0!==Vimeo&&Vimeo&&(i=new Vimeo.Player(o)).on("ended",function(){s.next()}))}};t(document).on({"afterShowESGBX.egbx":function(t,e,s){"youtube"!==s.contentSource&&"vimeo"!==s.contentSource||o.load(s.contentSource)}})}(jQuery),function(t,e,s){"use strict";var o=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)},i=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)},n=function(e){var s=[];for(var o in e=(e=e.originalEvent||e||t.e).touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e])e[o].pageX?s.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&s.push({x:e[o].clientX,y:e[o].clientY});return s},a=function(t,e,s){return e&&t?"x"===s?t.x-e.x:"y"===s?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||s.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;es.clientHeight,a=("scroll"===i||"auto"===i)&&s.scrollWidth>s.clientWidth,!(r=n||a)&&(e=e.parent()).length&&!e.hasClass("esgbox-stage")&&!e.is("body"););return r},c=function(t){this.instance=t,this.$bg=t.$refs.bg,this.$stage=t.$refs.stage,this.$container=t.$refs.container,this.destroy(),this.$container.on("touchstart.egbx.touch mousedown.egbx.touch",s.proxy(this,"ontouchstart"))};c.prototype.destroy=function(){this.$container.off(".egbx.touch"),s(e).off(".egbx.touch"),this.requestId&&(i(this.requestId),this.requestId=null),this.tapped&&(clearTimeout(this.tapped),this.tapped=null)},c.prototype.ontouchstart=function(o){var i=s(o.target),c=this.instance,h=c.current,d=h.$slide,g=h.$content,u="touchstart"==o.type;if(u&&this.$container.off("mousedown.egbx.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&d.length&&i.length&&!r(i)&&!r(i.parent())&&(i.is("img")||!(o.originalEvent.clientX>i[0].clientWidth+i.offset().left))){if(!h||c.isAnimating||h.$slide.hasClass("esgbox-animated"))return o.stopPropagation(),void o.preventDefault();this.realPoints=this.startPoints=n(o),this.startPoints.length&&(h.touch&&o.stopPropagation(),this.startEvent=o,this.canTap=!0,this.$target=i,this.$content=g,this.opts=h.opts.touch,this.isPanning=!1,this.isSwiping=!1,this.isZooming=!1,this.isScrolling=!1,this.canPan=c.canPan(),this.startTime=(new Date).getTime(),this.distanceX=this.distanceY=this.distance=0,this.canvasWidth=Math.round(d[0].clientWidth),this.canvasHeight=Math.round(d[0].clientHeight),this.contentLastPos=null,this.contentStartPos=s.esgbox.getTranslate(this.$content)||{top:0,left:0},this.sliderStartPos=s.esgbox.getTranslate(d),this.stagePos=s.esgbox.getTranslate(c.$refs.stage),this.sliderStartPos.top-=this.stagePos.top,this.sliderStartPos.left-=this.stagePos.left,this.contentStartPos.top-=this.stagePos.top,this.contentStartPos.left-=this.stagePos.left,s(e).off(".egbx.touch").on(u?"touchend.egbx.touch touchcancel.egbx.touch":"mouseup.egbx.touch mouseleave.egbx.touch",s.proxy(this,"ontouchend")).on(u?"touchmove.egbx.touch":"mousemove.egbx.touch",s.proxy(this,"ontouchmove")),s.esgbox.isMobile&&e.addEventListener("scroll",this.onscroll,!0),((this.opts||this.canPan)&&(i.is(this.$stage)||this.$stage.find(i).length)||(i.is(".esgbox-image")&&o.preventDefault(),s.esgbox.isMobile&&i.parents(".esgbox-caption").length))&&(this.isScrollable=l(i)||l(i.parent()),s.esgbox.isMobile&&this.isScrollable||o.preventDefault(),(1===this.startPoints.length||h.hasError)&&(this.canPan?(s.esgbox.stop(this.$content),this.isPanning=!0):this.isSwiping=!0,this.$container.addClass("esgbox-is-grabbing")),2===this.startPoints.length&&"image"===h.type&&(h.isLoaded||h.$ghost)&&(this.canTap=!1,this.isSwiping=!1,this.isPanning=!1,this.isZooming=!0,s.esgbox.stop(this.$content),this.centerPointStartX=.5*(this.startPoints[0].x+this.startPoints[1].x)-s(t).scrollLeft(),this.centerPointStartY=.5*(this.startPoints[0].y+this.startPoints[1].y)-s(t).scrollTop(),this.percentageOfImageAtPinchPointX=(this.centerPointStartX-this.contentStartPos.left)/this.contentStartPos.width,this.percentageOfImageAtPinchPointY=(this.centerPointStartY-this.contentStartPos.top)/this.contentStartPos.height,this.startDistanceBetweenFingers=a(this.startPoints[0],this.startPoints[1]))))}},c.prototype.onscroll=function(t){this.isScrolling=!0,e.removeEventListener("scroll",this.onscroll,!0)},c.prototype.ontouchmove=function(t){void 0===t.originalEvent.buttons||0!==t.originalEvent.buttons?this.isScrolling?this.canTap=!1:(this.newPoints=n(t),(this.opts||this.canPan)&&this.newPoints.length&&this.newPoints.length&&(this.isSwiping&&!0===this.isSwiping||t.preventDefault(),this.distanceX=a(this.newPoints[0],this.startPoints[0],"x"),this.distanceY=a(this.newPoints[0],this.startPoints[0],"y"),this.distance=a(this.newPoints[0],this.startPoints[0]),this.distance>0&&(this.isSwiping?this.onSwipe(t):this.isPanning?this.onPan():this.isZooming&&this.onZoom()))):this.ontouchend(t)},c.prototype.onSwipe=function(e){var n,a=this,r=a.instance,l=a.isSwiping,c=a.sliderStartPos.left||0;if(!0!==l)"x"==l&&(a.distanceX>0&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?c+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?c-=Math.pow(-a.distanceX,.8):c+=a.distanceX),a.sliderLastPos={top:"x"==l?0:a.sliderStartPos.top+a.distanceY,left:c},a.requestId&&(i(a.requestId),a.requestId=null),a.requestId=o(function(){a.sliderLastPos&&(s.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;s.esgbox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("esgbox-is-sliding"))});else if(Math.abs(a.distance)>10){if(a.canTap=!1,r.group.length<2&&a.opts.vertical?a.isSwiping="y":r.isDragging||!1===a.opts.vertical||"auto"===a.opts.vertical&&s(t).width()>800?a.isSwiping="x":(n=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=n>45&&n<135?"y":"x"),"y"===a.isSwiping&&s.esgbox.isMobile&&a.isScrollable)return void(a.isScrolling=!0);r.isDragging=a.isSwiping,a.startPoints=a.newPoints,s.each(r.slides,function(t,e){var o,i;s.esgbox.stop(e.$slide),o=s.esgbox.getTranslate(e.$slide),i=s.esgbox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("esgbox-animated").removeClass(function(t,e){return(e.match(/(^|\s)esgbox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&&(a.sliderStartPos.top=o.top-i.top,a.sliderStartPos.left=o.left-i.left),s.esgbox.setTranslate(e.$slide,{top:o.top-i.top,left:o.left-i.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},c.prototype.onPan=function(){var t=this;a(t.newPoints[0],t.realPoints[0])<(s.esgbox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&i(t.requestId),t.requestId=o(function(){s.esgbox.setTranslate(t.$content,t.contentLastPos)}))},c.prototype.limitMovement=function(){var t,e,s,o,i,n,a=this.canvasWidth,r=this.canvasHeight,l=this.distanceX,c=this.distanceY,h=this.contentStartPos,d=h.left,g=h.top,u=h.width,p=h.height;return i=u>a?d+l:d,n=g+c,t=Math.max(0,.5*a-.5*u),e=Math.max(0,.5*r-.5*p),s=Math.min(a-u,.5*a-.5*u),o=Math.min(r-p,.5*r-.5*p),l>0&&i>t&&(i=t-1+Math.pow(-t+d+l,.8)||0),l<0&&i0&&n>e&&(n=e-1+Math.pow(-e+g+c,.8)||0),c<0&&ni?(t=t>0?0:t)n?(e=e>0?0:e)1&&(this.dMs>130&&n>10||n>50);this.sliderLastPos=null,"y"==t&&!e&&Math.abs(this.distanceY)>50?(s.esgbox.animate(this.instance.current.$slide,{top:this.sliderStartPos.top+this.distanceY+150*this.velocityY,opacity:0},200),o=this.instance.close(!0,250)):a&&this.distanceX>0?o=this.instance.previous(300):a&&this.distanceX<0&&(o=this.instance.next(300)),!1!==o||"x"!=t&&"y"!=t||this.instance.centerSlide(200),this.$container.removeClass("esgbox-is-sliding")},c.prototype.endPanning=function(){var t,e,o;this.contentLastPos&&(!1===this.opts.momentum||this.dMs>350?(t=this.contentLastPos.left,e=this.contentLastPos.top):(t=this.contentLastPos.left+500*this.velocityX,e=this.contentLastPos.top+500*this.velocityY),(o=this.limitPosition(t,e,this.contentStartPos.width,this.contentStartPos.height)).width=this.contentStartPos.width,o.height=this.contentStartPos.height,s.esgbox.animate(this.$content,o,366))},c.prototype.endZooming=function(){var t,e,o,i,n=this.instance.current,a=this.newWidth,r=this.newHeight;this.contentLastPos&&(t=this.contentLastPos.left,i={top:e=this.contentLastPos.top,left:t,width:a,height:r,scaleX:1,scaleY:1},s.esgbox.setTranslate(this.$content,i),an.width||r>n.height?this.instance.scaleToActual(this.centerPointStartX,this.centerPointStartY,150):(o=this.limitPosition(t,e,a,r),s.esgbox.animate(this.$content,o,150)))},c.prototype.onTap=function(e){var o,i=this,a=s(e.target),r=i.instance,l=r.current,c=e&&n(e)||i.startPoints,h=c[0]?c[0].x-s(t).scrollLeft()-i.stagePos.left:0,d=c[0]?c[0].y-s(t).scrollTop()-i.stagePos.top:0,g=function(t){var o=l.opts[t];if(s.isFunction(o)&&(o=o.apply(r,[l,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==l.type&&(l.isLoaded||l.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(h,d):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(a.is("img")||!(h>a[0].clientWidth+a.offset().left))){if(a.is(".esgbox-bg,.esgbox-inner,.esgbox-outer,.esgbox-container"))o="Outside";else if(a.is(".esgbox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(a).addBack().filter(a).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(h-i.tapX)>50||Math.abs(d-i.tapY)>50)return this;g("dblclick"+o)}else i.tapX=h,i.tapY=d,l.opts["dblclick"+o]&&l.opts["dblclick"+o]!==l.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,r.isAnimating||g("click"+o)},500):g("click"+o);return this}},s(e).on("onActivate.egbx",function(t,e){e&&!e.Guestures&&(e.Guestures=new c(e))}).on("beforeClose.egbx",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.esgbox.defaults,{btnTpl:{slideShow:''},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var s=function(t){this.instance=t,this.init()};e.extend(s.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,s=t.instance,o=s.group[s.currIndex].opts.slideShow;t.$button=s.$refs.toolbar.find("[data-esgbox-play]").on("click",function(){t.toggle()}),s.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('').appendTo(s.$refs.inner))},set:function(t){var s=this.instance,o=s.current;o&&(!0===t||o.opts.loop||s.currIndex'},fullScreen:{autoStart:!1}}),e(t).on(s.fullscreenchange,function(){var t=o.isFullscreen(),s=e.esgbox.getInstance();s&&(s.current&&"image"===s.current.type&&s.isAnimating&&(s.isAnimating=!1,s.update(!0,!0,0),s.isComplete||s.complete()),s.trigger("onFullscreenChange",t),s.$refs.container.toggleClass("esgbox-is-fullscreen",t),s.$refs.toolbar.find("[data-esgbox-fullscreen]").toggleClass("esgbox-button--fsenter",!t).toggleClass("esgbox-button--fsexit",t))})}e(t).on({"onInit.egbx":function(t,e){s?e&&e.group[e.currIndex].opts.fullScreen?(e.$refs.container.on("click.egbx-fullscreen","[data-esgbox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-esgbox-fullscreen]").hide():e.$refs.toolbar.find("[data-esgbox-fullscreen]").remove()},"afterKeydown.egbx":function(t,e,s,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.egbx":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("esgbox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var s="esgbox-thumbs";e.esgbox.defaults=e.extend(!0,{btnTpl:{thumbs:''},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".esgbox-container",axis:"y"}},e.esgbox.defaults);var o=function(t){this.init(t)};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,s=t.group,o=0;e.instance=t,e.opts=s[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-esgbox-thumbs]");for(var i=0,n=s.length;i1));i++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this.instance,i=this.opts.parentEl,n=[];this.$grid||(this.$grid=e('').appendTo(o.$refs.container.find(i).addBack().filter(i)),this.$grid.on("click","a",function(){o.jumpTo(e(this).attr("data-index"))})),this.$list||(this.$list=e('').appendTo(this.$grid)),e.each(o.group,function(e,s){(t=s.thumb)||"image"!==s.type||(t=s.src),n.push('
")}),this.$list[0].innerHTML=n.join(""),"x"===this.opts.axis&&this.$list.width(parseInt(this.$grid.css("padding-right"),10)+o.group.length*this.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,s,o=this.$list,i=this.$grid;this.instance.current&&(s=(e=o.children().removeClass("esgbox-thumbs-active").filter('[data-index="'+this.instance.current.index+'"]').addClass("esgbox-thumbs-active")).position(),"y"===this.opts.axis&&(s.top<0||s.top>o.height()-e.outerHeight())?o.stop().animate({scrollTop:o.scrollTop()+s.top},t):"x"===this.opts.axis&&(s.left
i.scrollLeft()+(i.width()-e.outerWidth()))&&o.parent().stop().animate({scrollLeft:s.left},t))},update:function(){this.instance.$refs.container.toggleClass("esgbox-show-thumbs",this.isVisible),this.isVisible?(this.$grid||this.create(),this.instance.trigger("onThumbsShow"),this.focus(0)):this.$grid&&this.instance.trigger("onThumbsHide"),this.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.egbx":function(t,e){var s;e&&!e.Thumbs&&(s=new o(e)).isActive&&!0===s.opts.autoStart&&s.show()},"beforeShow.egbx":function(t,e,s,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.egbx":function(t,e,s,o,i){var n=e&&e.Thumbs;n&&n.isActive&&71===i&&(o.preventDefault(),n.toggle())},"beforeClose.egbx":function(t,e){var s=e&&e.Thumbs;s&&s.isVisible&&!1!==s.opts.hideOnClose&&s.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";e.extend(!0,e.esgbox.defaults,{btnTpl:{share:''},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location},tpl:''}}),e(t).on("click","[data-esgbox-share]",function(){var t,s,o,i,n=e.esgbox.getInstance(),a=n.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[n,a])),s=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,(o=t,i={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},String(o).replace(/[&<>"'`=\/]/g,function(t){return i[t]}))).replace(/\{\{descr\}\}/g,n.$caption?encodeURIComponent(n.$caption.text()):""),e.esgbox.open({src:n.translate(n,s),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){n.$refs.container.one("beforeClose.egbx",function(){t.close(null,0)}),e.$content.find(".esgbox-share__button").on("click",function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,s){"use strict";function o(){var e=t.location.hash.substr(1),s=e.split("-"),o=s.length>1&&/^\+?\d+$/.test(s[s.length-1])&&parseInt(s.pop(-1),10)||1;return{hash:e,index:o<1?1:o,gallery:s.join("-")}}function i(t){""!==t.gallery&&s("[data-esgbox='"+s.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.egbx-start")}function n(t){var e,s;return!!t&&(""!==(s=(e=t.current?t.current.opts:t.opts).hash||(e.$orig?e.$orig.data("esgbox")||e.$orig.data("esgbox-trigger"):""))&&s)}s.escapeSelector||(s.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),s(function(){!1!==s.esgbox.defaults.hash&&(s(e).on({"onInit.egbx":function(t,e){var s,i;!1!==e.group[e.currIndex].opts.hash&&(s=o(),(i=n(e))&&s.gallery&&i==s.gallery&&(e.currIndex=s.index-1))},"beforeShow.egbx":function(s,o,i,a){var r;i&&!1!==i.opts.hash&&(r=n(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(a&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[a?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),a&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},"beforeClose.egbx":function(s,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),s(t).on("hashchange.egbx",function(){var t=o(),e=null;s.each(s(".esgbox-container").get().reverse(),function(t,o){var i=s(o).data("EsgBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),jQuery("body").on("essentialready",function(t,e){s.esgbox.getInstance()||i(o())}))})}(window,document,jQuery),function(t,e){"use strict";var s=(new Date).getTime();e(t).on({"onInit.egbx":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("esgbox-animated")||(t=t.originalEvent||t,i-s<250||(s=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery),function(t,e){"use strict";e.extend(!0,e.esgbox,{trim:function(t){return null!=t&&"string"==typeof t?t.trim():t},is_mobile:function(){var t=["android","webos","iphone","ipad","blackberry","Android","webos","iPod","iPhone","iPad","Blackberry","BlackBerry"],e=!1;if(void 0!==window.orientation)e=!0;else for(var s in t)t.hasOwnProperty(s)&&(e=!!(e||navigator.userAgent.split(t[s]).length>1)||e);return e},get_browser:function(){var t,e=navigator.userAgent,s=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(s[1])?(t=/\brv[ :]+(\d+)/g.exec(e)||[],"IE"):"Chrome"===s[1]&&null!=(t=e.match(/\b(OPR|Edge)\/(\d+)/))?t[1].replace("OPR","Opera"):(s=s[2]?[s[1],s[2]]:[navigator.appName,navigator.appVersion,"-?"],null!=(t=e.match(/version\/(\d+)/i))&&s.splice(1,1,t[1]),s[0])},get_browser_version:function(){var t,e=navigator.appName,s=navigator.userAgent,o=s.match(/(edge|opera|chrome|safari|firefox|msie)\/?\s*(\.?\d+(\.\d+)*)/i);return o&&null!=(t=s.match(/version\/([\.\d]+)/i))&&(o[2]=t[1]),(o=o?[o[1],o[2]]:[e,navigator.appVersion,"-?"])[1]},isSafari11:function(){return"safari"===e.esgbox.trim(e.esgbox.get_browser().toLowerCase())&&parseFloat(e.esgbox.get_browser_version())>=11}})}(document,jQuery);