!function($,_undefined){"use strict";const supportsPassive=(()=>{var supported=!1;try{const opts=Object.defineProperty({},'passive',{get(){supported=!0}});window.addEventListener('testPassive',null,opts);window.removeEventListener('testPassive',null,opts)}catch(e){}
return supported})();if(!supportsPassive){return}
const REGEXP_NO_PREVENT_DEFAULT=/^(.*)\.noPreventDefault$/;['scroll','wheel','mousewheel','touchstart','touchmove','touchend',].map((eventType)=>{jQuery.event.special[eventType]={setup:function(_,ns,handle){const options={};if(ns.includes('noPreventDefault')&&!REGEXP_NO_PREVENT_DEFAULT.test(eventType)){options.passive=!0}
if(document.documentMode){this.addEventListener(eventType,handle,options)}else{return!1}},}})}(jQuery);
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
!(function($,_undefined){"use strict";const _window=window;const _document=document;_window.$us=_window.$us||{};function isNode(node){return(node&&node.nodeType)}
function hasClass(node,className){if(isNode(node)){return node.classList.contains(className)}
return!1}
function getAt(node){if(isNode(node)){return(node.className.match('at_([\dA-z_-]+)')||[])[1]}
return}
function usMod(node,mod,value){if(!isNode(node)||!mod){return}
if(value){value=`${mod}_${value}`}
var className=String(node.className);className=className.replace(new RegExp(`${mod}_([a-z]+)`),value);if(value&&!className.includes(value)){className+=` ${value}`}
if(node.className!==className){node.className=className}}
function USHeader_NoCache(){const self=this;const lHeader=_document.querySelector('.l-header');if(!isNode(lHeader)){return}
self.places={hidden:lHeader.querySelector('.l-subheader.for_hidden')};self.elms={};self.state='default';self.settings=$us.headerSettings||{};self.breakpoints={laptops:1280,tablets:1024,mobiles:600};for(const k in self.breakpoints){self.breakpoints[k]=parseInt(((self.settings[k]||{}).options||{}).breakpoint)||self.breakpoints[k]}
self._events={resize:self.resize.bind(self),};lHeader.querySelectorAll('.l-subheader-cell').forEach((node)=>{self.places[getAt(node.parentNode.parentNode)+'_'+getAt(node)]=node});lHeader.querySelectorAll('[class*=ush_]').forEach((node)=>{const matches=/(^|)ush_([a-z_]+)_([\d]+)(\s|$)/.exec(node.className);if(!matches){return}
const id=matches[2]+':'+matches[3];if(hasClass(node,'w-vwrapper')||hasClass(node,'w-hwrapper')){self.places[id]=node}
self.elms[id]=node});_window.addEventListener('resize',self._events.resize);self.setView('default');self.resize()}
USHeader_NoCache.prototype.setView=function(newState){const self=this;if(newState!==self.state){usMod(_document.body,'state',self.state=newState)}
const orientation=((self.settings[newState]||{}).options||{}).orientation||'hor';if(orientation!==self.orientation){usMod(_document.body,'header',self.orientation=orientation)}
if(['default','laptops'].includes(newState)){_document.body.classList.remove('header-show')}};USHeader_NoCache.prototype.setLayout=function(newState){const self=this;const layout=(self.settings[newState]||{}).layout||{};for(const place in layout){if(!layout[place]||!self.places[place]){if(place.indexOf('wrapper')>-1){self.places[place]=self.places.hidden}else{continue}}
self._placeElements(layout[place],self.places[place]);}};USHeader_NoCache.prototype._placeElements=function(elms,place){const self=this;for(var i=0;i<elms.length;i ++){var elmId;if(typeof elms[i]=='object'){elmId=elms[i][0];if(!self.places[elmId]||!self.elms[elmId]){continue}
place.append(self.elms[elmId]);self._placeElements(elms[i].shift(),self.places[elmId])}else{elmId=elms[i];if(!self.elms[elmId]){continue}
place.append(self.elms[elmId])}}};USHeader_NoCache.prototype.resize=function(){const self=this;var newState='default';for(const state in self.breakpoints){if(_window.innerWidth<=self.breakpoints[state]){newState=state}else{break}}
if(self.state!==newState){self.setLayout(newState);self.setView(newState);if($us.header&&typeof $us.header.setView=='function'){$us.header.setView(newState)}}};$us.headerNoCache=new USHeader_NoCache})();
!function($,_undefined){"use strict";const _window=window;const _document=document;const _navigator=_window.navigator;const _location=_window.location;const max=Math.max;const min=Math.min;const pow=Math.pow;if($.isPlainObject(_window.$ush)){return}
_window.$ush={};$ush.TAB_KEYCODE=9;$ush.ENTER_KEYCODE=13;$ush.ESC_KEYCODE=27;$ush.SPACE_KEYCODE=32;const ua=_navigator.userAgent.toLowerCase();const base64Chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';const fromCharCode=String.fromCharCode;$ush.ua=ua;$ush.isMacOS=/(Mac|iPhone|iPod|iPad)/i.test(_navigator.platform);$ush.isFirefox=ua.includes('firefox');$ush.isSafari=/^((?!chrome|android).)*safari/i.test(ua);$ush.isTouchend=('ontouchend' in _document);$ush.safariVersion=function(){const self=this;if(self.isSafari){return self.parseInt((ua.match(/version\/([\d]+)/i)||[])[1])}
return 0}
$ush.fn=function(fn){if(typeof fn==='function'){fn()}};$ush.isUndefined=function(value){return(typeof value==='undefined'||value==='undefined')};$ush.isRtl=function(){return this.toString(_document.body.className).split(/\p{Zs}/u).includes('rtl')};$ush.isNode=function(node){return!!(node&&node.nodeType)};$ush.isNodeInViewport=function(node){const self=this;const rect=$ush.$rect(node);const nearestTop=rect.top-_window.innerHeight;return nearestTop<=0&&(rect.top+rect.height)>=0};$ush.uniqid=function(prefix){return(prefix||'')+Math.random().toString(36).substr(2,9)};$ush.utf8Decode=function(data){var tmp_arr=[],i=0,ac=0,c1=0,c2=0,c3=0;data+='';while(i<data.length){c1=data.charCodeAt(i);if(c1<128){tmp_arr[ac ++]=fromCharCode(c1);i ++}else if(c1>191&&c1<224){c2=data.charCodeAt(i+1);tmp_arr[ac ++]=fromCharCode(((c1&31)<<6)|(c2&63));i+=2}else{c2=data.charCodeAt(i+1);c3=data.charCodeAt(i+2);tmp_arr[ac ++]=fromCharCode(((c1&15)<<12)|((c2&63)<<6)|(c3&63));i+=3}}
return tmp_arr.join('')};$ush.utf8Encode=function(data){if(data===null||this.isUndefined(data)){return ''}
var string=(''+data),utftext='',start,end,stringl=0;start=end=0;stringl=string.length;for(var n=0;n<stringl;n ++){var c1=string.charCodeAt(n);var enc=null;if(c1<128){end ++}else if(c1>127&&c1<2048){enc=fromCharCode((c1>>6)|192)+fromCharCode((c1&63)|128)}else{enc=fromCharCode((c1>>12)|224)+fromCharCode(((c1>>6)&63)|128)+fromCharCode((c1&63)|128)}
if(enc!==null){if(end>start){utftext+=string.slice(start,end)}
utftext+=enc;start=end=n+1}}
if(end>start){utftext+=string.slice(start,stringl)}
return utftext};$ush.base64Decode=function(data){var o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,dec='',tmp_arr=[],self=this;if(!data){return data}
data+='';do{h1=base64Chars.indexOf(data.charAt(i ++));h2=base64Chars.indexOf(data.charAt(i ++));h3=base64Chars.indexOf(data.charAt(i ++));h4=base64Chars.indexOf(data.charAt(i ++));bits=h1<<18|h2<<12|h3<<6|h4;o1=bits>>16&0xff;o2=bits>>8&0xff;o3=bits&0xff;if(h3==64){tmp_arr[ac ++]=fromCharCode(o1)}else if(h4==64){tmp_arr[ac ++]=fromCharCode(o1,o2)}else{tmp_arr[ac ++]=fromCharCode(o1,o2,o3)}}while(i<data.length);return self.utf8Decode(tmp_arr.join(''))};$ush.base64Encode=function(data){var o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,enc='',tmp_arr=[],self=this;if(!data){return data}
data=self.utf8Encode(''+data);do{o1=data.charCodeAt(i ++);o2=data.charCodeAt(i ++);o3=data.charCodeAt(i ++);bits=o1<<16|o2<<8|o3;h1=bits>>18&0x3f;h2=bits>>12&0x3f;h3=bits>>6&0x3f;h4=bits&0x3f;tmp_arr[ac ++]=base64Chars.charAt(h1)+base64Chars.charAt(h2)+base64Chars.charAt(h3)+base64Chars.charAt(h4)}while(i<data.length);enc=tmp_arr.join('');const r=data.length%3;return(r?enc.slice(0,r-3):enc)+'==='.slice(r||3)};$ush.stripTags=function(input){return $ush.toString(input).replace(/(<([^>]+)>)/ig,'').replace('"','&quot;')};$ush.rawurldecode=function(str){return decodeURIComponent(this.toString(str))};$ush.rawurlencode=function(str){return encodeURIComponent(this.toString(str)).replace(/!/g,'%21').replace(/'/g,'%27').replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/\*/g,'%2A')};$ush.timeout=function(fn,delay){var handle={},start=new Date().getTime(),requestAnimationFrame=_window.requestAnimationFrame;function loop(){var current=new Date().getTime(),delta=current-start;delta>=$ush.parseFloat(delay)?fn.call():handle.value=requestAnimationFrame(loop)}
handle.value=requestAnimationFrame(loop);return handle};$ush.clearTimeout=function(handle){if($.isPlainObject(handle)){handle=handle.value}
if(typeof handle==='number'){_window.cancelAnimationFrame(handle)}};$ush.throttle=function(fn,wait,no_trailing,debounce_mode){const self=this;if(typeof fn!=='function'){return $.noop}
if(typeof wait!=='number'){wait=0}
if(typeof no_trailing!=='boolean'){no_trailing=_undefined}
var last_exec=0,timeout,context,args;return function(){context=this;args=arguments;var elapsed=+new Date()-last_exec;function exec(){last_exec=+new Date();fn.apply(context,args)}
function clear(){timeout=_undefined}
if(debounce_mode&&!timeout){exec()}
timeout&&self.clearTimeout(timeout);if(self.isUndefined(debounce_mode)&&elapsed>wait){exec()}else if(no_trailing!==!0){timeout=self.timeout(debounce_mode?clear:exec,self.isUndefined(debounce_mode)?wait-elapsed:wait)}}};$ush.debounce=function(fn,wait,at_begin){const self=this;return self.isUndefined(at_begin)?self.throttle(fn,wait,_undefined,!1):self.throttle(fn,wait,at_begin!==!1)};$ush.debounce_fn_1ms=$ush.debounce($ush.fn,1);$ush.debounce_fn_10ms=$ush.debounce($ush.fn,10);$ush.parseInt=function(value){value=parseInt(value,10);return!isNaN(value)?value:0};$ush.parseFloat=function(value){value=parseFloat(value);return!isNaN(value)?value:0};$ush.limitValueByRange=function(value,minValue,maxValue){return $ush.parseFloat(min(maxValue,max(minValue,value)))};$ush.toArray=function(data){if(['string','number','bigint','boolean','symbol','function'].includes(typeof data)){return[data]}
try{data=[].slice.call(data||[])}catch(err){console.error(err);data=[]}
return data};$ush.toString=function(value){const self=this;if(self.isUndefined(value)||value===null){return ''}
else if($.isPlainObject(value)||Array.isArray(value)){return self.rawurlencode(JSON.stringify(value))}
return String(value)};$ush.toPlainObject=function(value){const self=this;try{value=JSON.parse(self.rawurldecode(value)||'{}')}catch(err){}
if(!$.isPlainObject(value)){value={}}
return value};$ush.toLowerCase=function(value){return $ush.toString(value).toLowerCase()};$ush.clone=function(_object,_default){return $.extend(!0,{},_default||{},_object||{})};$ush.escapePcre=function(value){return $ush.toString(value).replace(/[.*+?^${}()|\:[\]\\]/g,'\\$&')};$ush.removeSpaces=function(text){return $ush.toString(text).replace(/\p{Zs}/gu,'')};$ush.fromCharCode=function(text){return $ush.toString(text).replace(/&#(\d+);/g,(_,num)=>fromCharCode(num))};$ush.comparePlainObject=function(){const args=arguments;for(var i=1;i>-1;i--){if(!$.isPlainObject(args[i])){return!1}}
return JSON.stringify(args[0])===JSON.stringify(args[1])};$ush.checksum=function(value){if(typeof value!=='string'){value=JSON.stringify(value)}
if(value.length){return value.split('').reduce((acc,val)=>(acc=(acc<<5)-acc+val.charCodeAt(0))&acc)}
return 0};$ush.$rect=function(node){return this.isNode(node)?node.getBoundingClientRect():{}};$ush.setCaretPosition=function(node,position){const self=this;if(!self.isNode(node)){return}
if(self.isUndefined(position)){position=node.value.length}
if(node.createTextRange){const range=node.createTextRange();range.move('character',position);range.select()}else{if(node.selectionStart){node.focus();node.setSelectionRange(position,position)}else{node.focus()}}};$ush.copyTextToClipboard=function(text){const self=this;try{const textarea=_document.createElement('textarea');textarea.value=self.toString(text);textarea.setAttribute('readonly','');textarea.setAttribute('css','position:absolute;top:-9999px;left:-9999px');_document.body.append(textarea);textarea.select();_document.execCommand ('copy');if(_window.getSelection){_window.getSelection().removeAllRanges()}else if(_document.selection){_document.selection.empty()}
textarea.remove();return!0}catch(err){return!1}};$ush.storage=function(namespace){if(namespace=$ush.toString(namespace)){namespace+='_'}
const _localStorage=_window.localStorage;return{set:function(key,value){_localStorage.setItem(namespace+key,value)},get:function(key){return _localStorage.getItem(namespace+key)},remove:function(key){_localStorage.removeItem(namespace+key)}}};$ush.setCookie=function(name,value,expiry){const date=new Date()
date.setTime(date.getTime()+(expiry*86400000));_document.cookie=name+'='+value+';expires='+date.toUTCString()+';path=/'};$ush.getCookie=function(name){name+='='
const decodedCookie=decodeURIComponent(_document.cookie);const cookies=decodedCookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=cookies[i];while(cookie.charAt(0)==' '){cookie=cookie.substring(1)}
if(cookie.indexOf(name)==0){return cookie.substring(name.length,cookie.length)}}
return null};$ush.removeCookie=function(name){const self=this;if(self.getCookie(name)!==null){self.setCookie(name,1,-1)}};$ush.download=function(data,fileName,type){const fileBlob=new Blob([String(data)],{type:type});if(_navigator.msSaveOrOpenBlob){_navigator.msSaveOrOpenBlob(fileBlob,fileName)}else{const url=_window.URL.createObjectURL(fileBlob);const anchorElement=_document.createElement('a');anchorElement.href=url;anchorElement.download=fileName;_document.body.appendChild(anchorElement);anchorElement.click();$ush.timeout(()=>{_document.body.removeChild(anchorElement);_window.URL.revokeObjectURL(url)})}};$ush.mixinEvents={on:function(eventType,handler,one){const self=this;if(self.$$events===_undefined){self.$$events={}}
if(self.$$events[eventType]===_undefined){self.$$events[eventType]=[]}
self.$$events[eventType].push({handler:handler,one:!!one,});return self},one:function(eventType,handler){return this.on(eventType,handler,!0)},off:function(eventType,handler){const self=this;if(self.$$events===_undefined||self.$$events[eventType]===_undefined){return self}
if(handler!==_undefined){for(const handlerPos in self.$$events[eventType]){if(handler===self.$$events[eventType][handlerPos].handler){self.$$events[eventType].splice(handlerPos,1)}}}else{self.$$events[eventType]=[]}
return self},trigger:function(eventType,extraParams){const self=this;if(self.$$events===_undefined||self.$$events[eventType]===_undefined||self.$$events[eventType].length===0){return self}
const args=arguments;const params=(args.length>2||!Array.isArray(extraParams))?[].slice.call(args,1):extraParams;for(var i=0;i<self.$$events[eventType].length;i++){const event=self.$$events[eventType][i];event.handler.apply(event.handler,params);if(!!event.one){self.off(eventType,event.handler)}}
return self}};$ush.urlManager=function(url){const $window=$(_window);const events=$ush.clone($ush.mixinEvents);var _url=new URL($ush.isUndefined(url)?_location.href:url),lastUrl=_url.toString();if($ush.isUndefined(url)){function refresh(){_url=new URL(lastUrl=_location.href)}
$window.on('pushstate',refresh).on('popstate',(e)=>{refresh();events.trigger('popstate',e.originalEvent)})}
return $.extend(events,{isChanged:function(){return this.toString()!==_location.href},has:function(key,value){if(typeof key==='string'){const hasKey=_url.searchParams.has(key);if(!value){return hasKey}
return hasKey&&_url.searchParams.get(key)===value}
return!1},set:function(key,value){const setParam=(key,value)=>{if($ush.isUndefined(value)||value===null){_url.searchParams.delete(key)}else{_url.searchParams.set(key,$ush.toString(value))}};if($.isPlainObject(key)){for(const k in key){setParam(k,key[k])}}else{setParam(key,value)}
return this},get:function(){const args=$ush.toArray(arguments);const result={};for(const key of args){if(this.has(key)){result[key]=_url.searchParams.get(key)}else{result[key]=_undefined}}
if(args.length===1){return Object.values(result)[0]}
return result},remove:function(){const self=this;const args=$ush.toArray(arguments);for(const key of args)if(self.has(key)){_url.searchParams.delete(key)}
return self},toString:function(urldecode){return _url.toString()},toJson:function(toString){var result={};_url.searchParams.forEach((_,key,searchParams)=>{var values=searchParams.getAll(key);if(values.length<2){values=values[0]}
result[key]=$ush.isUndefined(values)?'':values});if(toString){result=JSON.stringify(result);if(result==='{}'){result=''}}
return result},ignoreParams:[],getChangedParams:function(){const self=this;const data={setParams:{},oldParams:{}};if(!self.isChanged()){return data}
const ignoreParams=$ush.toArray(self.ignoreParams);(new URL(lastUrl)).searchParams.forEach((value,key)=>{if(!ignoreParams.includes(key)&&!self.has(key,value)){data.oldParams[key]=value}});_url.searchParams.forEach((value,key)=>{if(!ignoreParams.includes(key)||(!$ush.isUndefined(data.oldParams[key])&&data.oldParams[key]!==value)){data.setParams[key]=value}});return $ush.clone(data)},push:function(state,urldecode){const self=this;if(!self.isChanged()){return}
if(!$.isPlainObject(state)){state={}}
history.pushState($.extend(state,self.getChangedParams()),'',lastUrl=self.toString());$window.trigger('pushstate');return self}})}}(jQuery);var _document=document,_navigator=navigator,_undefined=undefined,_window=window;!function(a,b){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",b):"object"==typeof module&&module.exports?module.exports=b():a.EvEmitter=b()}("undefined"==typeof window?this:window,function(){function a(){}var b=a.prototype;return b.on=function(a,b){if(a&&b){var c=this._events=this._events||{},d=c[a]=c[a]||[];return-1==d.indexOf(b)&&d.push(b),this}},b.once=function(a,b){if(a&&b){this.on(a,b);var c=this._onceEvents=this._onceEvents||{},d=c[a]=c[a]||{};return d[b]=!0,this}},b.off=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){var d=c.indexOf(b);return-1!=d&&c.splice(d,1),this}},b.emitEvent=function(a,b){var c=this._events&&this._events[a];if(c&&c.length){c=c.slice(0),b=b||[];for(var d=this._onceEvents&&this._onceEvents[a],e=0;e<c.length;e++){var f=c[e],g=d&&d[f];g&&(this.off(a,f),delete d[f]),f.apply(this,b)}return this}},b.allOff=function(){delete this._events,delete this._onceEvents},a}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(c){return b(a,c)}):"object"==typeof module&&module.exports?module.exports=b(a,require("ev-emitter")):a.imagesLoaded=b(a,a.EvEmitter)}("undefined"==typeof window?this:window,function(b,c){function f(a,b){for(var c in b)a[c]=b[c];return a}function g(b){if(Array.isArray(b))return b;var c="object"==typeof b&&"number"==typeof b.length;return c?a.call(b):[b]}function j(a,b,c){if(!(this instanceof j))return new j(a,b,c);var d=a;return"string"==typeof a&&(d=document.querySelectorAll(a)),d?(this.elements=g(d),this.options=f({},this.options),"function"==typeof b?c=b:f(this.options,b),c&&this.on("always",c),this.getImages(),l&&(this.jqDeferred=new l.Deferred),void setTimeout(this.check.bind(this))):void m.error("Bad element for imagesLoaded "+(d||a))}function i(a){this.img=a}function k(a,b){this.url=a,this.element=b,this.img=new Image}var l=b.jQuery,m=b.console,a=Array.prototype.slice;j.prototype=Object.create(c.prototype),j.prototype.options={},j.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},j.prototype.addElementImages=function(a){"IMG"==a.nodeName&&this.addImage(a),!0===this.options.background&&this.addElementBackgroundImages(a);var b=a.nodeType;if(b&&d[b]){for(var c,e=a.querySelectorAll("img"),f=0;f<e.length;f++)c=e[f],this.addImage(c);if("string"==typeof this.options.background){var g=a.querySelectorAll(this.options.background);for(f=0;f<g.length;f++){var h=g[f];this.addElementBackgroundImages(h)}}}};var d={1:!0,9:!0,11:!0};return j.prototype.addElementBackgroundImages=function(a){var b=getComputedStyle(a);if(b)for(var c,d=/url\((['"])?(.*?)\1\)/gi,e=d.exec(b.backgroundImage);null!==e;)c=e&&e[2],c&&this.addBackground(c,a),e=d.exec(b.backgroundImage)},j.prototype.addImage=function(a){var b=new i(a);this.images.push(b)},j.prototype.addBackground=function(a,b){var c=new k(a,b);this.images.push(c)},j.prototype.check=function(){function a(a,c,d){setTimeout(function(){b.progress(a,c,d)})}var b=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(b){b.once("progress",a),b.check()}):void this.complete()},j.prototype.progress=function(a,b,c){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!a.isLoaded,this.emitEvent("progress",[this,a,b]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,a),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&m&&m.log("progress: "+c,a,b)},j.prototype.complete=function(){var a=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(a,[this]),this.emitEvent("always",[this]),this.jqDeferred){var b=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[b](this)}},i.prototype=Object.create(c.prototype),i.prototype.check=function(){var a=this.getIsImageComplete();return a?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},i.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},i.prototype.confirm=function(a,b){this.isLoaded=a,this.emitEvent("progress",[this,this.img,b])},i.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},i.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},i.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},i.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},k.prototype=Object.create(i.prototype),k.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var a=this.getIsImageComplete();a&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},k.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},k.prototype.confirm=function(a,b){this.isLoaded=a,this.emitEvent("progress",[this,this.element,b])},j.makeJQueryPlugin=function(a){a=a||b.jQuery,a&&(l=a,l.fn.imagesLoaded=function(a,b){var c=new j(this,a,b);return c.jqDeferred.promise(l(this))})},j.makeJQueryPlugin(),j});jQuery.easing.jswing=jQuery.easing.swing;var pow=Math.pow;jQuery.extend(jQuery.easing,{def:"easeOutExpo",easeInExpo:function(a){return 0===a?0:pow(2,10*a-10)},easeOutExpo:function(a){return 1===a?1:1-pow(2,-10*a)},easeInOutExpo:function(a){return 0===a?0:1===a?1:.5>a?pow(2,20*a-10)/2:(2-pow(2,-20*a+10))/2}});_window.$us=_window.$us||{};_window.$ush=_window.$ush||{};$us.iOS=(/^iPad|iPhone|iPod/.test(_navigator.platform)||(_navigator.userAgent.indexOf('Mac')>-1&&_navigator.maxTouchPoints>1&&$ush.isTouchend));$us.mobileNavOpened=0;$us.header={};['getCurrentHeight','getHeaderInitialPos','getHeight','getScrollDirection','getScrollTop','isFixed','isHidden','isHorizontal','isStatic','isSticky','isStickyAutoHidden','stickyAutoHideEnabled','stickyEnabled','isTransparent','isVertical','on'].map((name)=>{$us.header[name]=jQuery.noop});jQuery.fn.usMod=function(mod,value){const self=this;if(self.length==0)return self;if(value===_undefined){const pcre=new RegExp('^.*?'+mod+'_([\dA-z_-]+).*?$');return(pcre.exec(self.get(0).className)||[])[1]||!1}
self.each((_,item)=>{item.className=item.className.replace(new RegExp('(^|)'+mod+'_[\dA-z_-]+(|$)'),'$2');if(value!==!1){item.className+=' '+mod+'_'+value}});return self};$us.getAnimationName=function(animationName,defaultAnimationName){if(jQuery.easing.hasOwnProperty(animationName)){return animationName}
return defaultAnimationName?defaultAnimationName:jQuery.easing._default};$us.mixins={};$us.mixins.Events={on:function(eventType,handler){const self=this;if(self.$$events===_undefined){self.$$events={}}
if(self.$$events[eventType]===_undefined){self.$$events[eventType]=[]}
self.$$events[eventType].push(handler);return self},off:function(eventType,handler){const self=this;if(self.$$events===_undefined||self.$$events[eventType]===_undefined){return self}
if(handler!==_undefined){var handlerPos=jQuery.inArray(handler,self.$$events[eventType]);if(handlerPos!=-1){self.$$events[eventType].splice(handlerPos,1)}}else{self.$$events[eventType]=[]}
return self},trigger:function(eventType,extraParameters){const self=this;if(self.$$events===_undefined||self.$$events[eventType]===_undefined||self.$$events[eventType].length==0){return self}
var args=arguments,params=(args.length>2||!Array.isArray(extraParameters))?Array.prototype.slice.call(args,1):extraParameters;params.unshift(self);for(var index=0;index<self.$$events[eventType].length;index ++){self.$$events[eventType][index].apply(self.$$events[eventType][index],params)}
return self}};jQuery.isMobile=(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(_navigator.userAgent)||(_navigator.platform=='MacIntel'&&_navigator.maxTouchPoints>1));!function($){$us.$window=$(_window);$us.$document=$(_document);$us.$html=$('html');$us.$body=$('.l-body:first');$us.$htmlBody=$us.$html.add($us.$body);$us.$canvas=$('.l-canvas:first');$us.usbPreview=()=>{return _document.body.className.includes('usb_preview')};if($us.iOS){$us.$html.removeClass('no-touch').addClass('ios-touch')}else if($.isMobile||$ush.isTouchend){$us.$html.removeClass('no-touch').addClass('touch')}else{}}(jQuery);!function($){$us.getCurrentState=()=>{return $ush.toString($us.$body.usMod('state'))};$us.currentStateIs=(state)=>{if(!state){return!1}
if(!Array.isArray(state)){state=[$ush.toString(state)]}
return state.includes($us.getCurrentState())};$us.getAdminBarHeight=()=>{return(_document.getElementById('wpadminbar')||{}).offsetHeight||0}}(jQuery);!function($){"use strict";function USCanvas(options){const self=this;const defaults={disableEffectsWidth:900,backToTopDisplay:100};self.options=$.extend({},defaults,options||{});self.$header=$('.l-header',$us.$canvas);self.$main=$('.l-main',$us.$canvas);self.$sections=$('> *:not(.l-header) .l-section',$us.$canvas);self.$firstSection=self.$sections.first();self.$secondSection=self.$sections.eq(1);self.$stickySections=self.$sections.filter('.type_sticky:visible');self.$fullscreenSections=self.$sections.filter('.full_height');self.$topLink=$('.w-toplink');self.type=$us.$canvas.usMod('type');self._headerPos=self.$header.usMod('pos');self.headerPos=self._headerPos;self.headerBg=self.$header.usMod('bg');self.rtl=$us.$body.hasClass('rtl');self.isScrolling=!1;self.isAndroid=/Android/i.test(_navigator.userAgent);self._events={scroll:self.scroll.bind(self),resize:self.resize.bind(self),toggleClassIsSticky:self.toggleClassIsSticky.bind(self),}
if($us.$body.hasClass('us_iframe')){$('a:not([target])').each((_,node)=>$(node).attr('target','_parent'));$(()=>$('.l-popup-box',_window.parent.document).removeClass('loading'))}
if(self.hasStickyFirstSection()){$us.$body.addClass('sticky_first_section')}
$us.$window.on('scroll.noPreventDefault',self._events.scroll).on('resize load',self._events.resize).on('scroll.noPreventDefault resize load',self._events.toggleClassIsSticky);$ush.timeout(self._events.resize,25);$ush.timeout(self._events.resize,75)}
USCanvas.prototype={getOffsetTop:function(){var top=Math.ceil($us.$canvas.offset().top);if($us.currentStateIs('mobiles')){top-=$us.getAdminBarHeight()}
return top},isStickySection:function(){return this.$stickySections.length>0},hasStickySection:function(){const self=this;if(self.isStickySection()){return self.$stickySections.hasClass('is_sticky')}
return!1},hasPositionStickySections:function(){const self=this;if(self.isStickySection()){return self.$stickySections.filter((_,node)=>{return $(node).css('position')=='sticky'}).length>0}
return!1},getStickySectionHeight:function(){const self=this;var stickySectionHeight=0;if(self.isStickySection()){var header=$us.header,$stickySection=self.$stickySections.first();stickySectionHeight=$stickySection.outerHeight(!0);if(self.hasStickyFirstSection()&&header.isHorizontal()&&!header.isStatic()){stickySectionHeight-=header.getCurrentHeight()}}
return stickySectionHeight},hasStickyFirstSection:function(){const self=this;const $first=self.$stickySections.first();return self.isStickySection()&&$first.index()===0&&$first.hasClass('is_sticky')},isAfterStickySection:function(node){var $node=$(node);if($node.length==0){return!1}
if(!$node.hasClass('l-section')){$node=$node.closest('.l-section')}
return $node.index()>this.$stickySections.index()},getHeightFirstSection:function(){return this.$firstSection.length>0?parseFloat(this.$firstSection.outerHeight(!0)):0},scroll:function(){const self=this;const scrollTop=parseInt($us.$window.scrollTop());self.$topLink.toggleClass('active',(scrollTop>=self.winHeight*self.options.backToTopDisplay/100));if(self.isAndroid){if(self.pid){$ush.clearTimeout(self.pid)}
self.isScrolling=!0;self.pid=$ush.timeout(()=>{self.isScrolling=!1},100)}},resize:function(){const self=this;self.winHeight=parseInt($us.$window.height());self.winWidth=parseInt($us.$window.width());$us.$body.toggleClass('disable_effects',(self.winWidth<self.options.disableEffectsWidth));if($us.$body.hasClass('us_iframe')){var $frameContent=$('.l-popup-box-content',_window.parent.document),outerHeight=$us.$body.outerHeight(!0);if(outerHeight>0&&$(_window.parent).height()>outerHeight){$frameContent.css('height',outerHeight)}else{$frameContent.css('height','')}}
self.scroll()},toggleClassIsSticky:function(){const self=this;if(!self.isStickySection()){return}
self.$stickySections.each((_,section)=>{const $section=$(section);const offsetTop=section.getBoundingClientRect().top-parseInt($section.css('top'));$section.toggleClass('is_sticky',(parseInt(offsetTop)===0&&$section.css('position')=='sticky'))})}};$us.canvas=new USCanvas($us.canvasOptions||{})}(jQuery);!function($){$.fn.resetInlineCSS=function(){const self=this;var args=[].slice.call(arguments);if(args.length>0&&Array.isArray(args[0])){args=args[0]}
for(var index=0;index<args.length;index++){self.css(args[index],'')}
return self};$.fn.clearPreviousTransitions=function(){const self=this;const prevTimers=(self.data('animation-timers')||'').split(',');if(prevTimers.length>=2){self.resetInlineCSS('transition');prevTimers.map(clearTimeout);self.removeData('animation-timers')}
return self};$.fn.performCSSTransition=function(css,duration,onFinish,easing,delay){const self=this;var transition=[];duration=duration||250;delay=delay||25;easing=easing||'ease';self.clearPreviousTransitions();for(const attr in css){if(!css.hasOwnProperty(attr)){continue}
transition.push(attr+' '+(duration/1000)+'s '+easing)}
transition=transition.join(', ');self.css({transition:transition});const timer1=setTimeout(()=>self.css(css),delay);const timer2=setTimeout(()=>{self.resetInlineCSS('transition');if(typeof onFinish==='function'){onFinish()}},duration+delay);self.data('animation-timers',timer1+','+timer2)};$.fn.slideDownCSS=function(duration,onFinish,easing,delay){const self=this;if(self.length==0){return}
self.clearPreviousTransitions();self.resetInlineCSS('padding-top','padding-bottom');const timer1=setTimeout(()=>{const paddingTop=parseInt(self.css('padding-top'));const paddingBottom=parseInt(self.css('padding-bottom'));self.css({visibility:'hidden',position:'absolute',height:'auto','padding-top':0,'padding-bottom':0,display:'block'});var height=self.height();self.css({overflow:'hidden',height:'0px',opacity:0,visibility:'',position:''});self.performCSSTransition({opacity:1,height:height+paddingTop+paddingBottom,'padding-top':paddingTop,'padding-bottom':paddingBottom},duration,()=>{self.resetInlineCSS('overflow').css('height','auto');if(typeof onFinish=='function'){onFinish()}},easing,delay)},25);self.data('animation-timers',timer1+',null')};$.fn.slideUpCSS=function(duration,onFinish,easing,delay){const self=this;if(self.length==0){return}
self.clearPreviousTransitions();self.css({height:self.outerHeight(),overflow:'hidden','padding-top':self.css('padding-top'),'padding-bottom':self.css('padding-bottom')});self.performCSSTransition({height:0,opacity:0,'padding-top':0,'padding-bottom':0},duration,()=>{self.resetInlineCSS('overflow','padding-top','padding-bottom').css({display:'none'});if(typeof onFinish=='function'){onFinish()}},easing,delay)};$.fn.fadeInCSS=function(duration,onFinish,easing,delay){const self=this;if(self.length==0){return}
self.clearPreviousTransitions();self.css({opacity:0,display:'block'});self.performCSSTransition({opacity:1},duration,onFinish,easing,delay)};$.fn.fadeOutCSS=function(duration,onFinish,easing,delay){const self=this;if(self.length==0){return}
self.performCSSTransition({opacity:0},duration,()=>{self.css('display','none');if(typeof onFinish==='function'){onFinish()}},easing,delay)}}(jQuery);jQuery(function($){"use strict";if(_document.cookie.indexOf('us_cookie_notice_accepted=true')!==-1){$('.l-cookie').remove()}else{$us.$document.on('click','#us-set-cookie',(e)=>{e.preventDefault();e.stopPropagation();const d=new Date();d.setFullYear(d.getFullYear()+1);_document.cookie=`us_cookie_notice_accepted=true; expires=${d.toUTCString()}; path=/;`;if(location.protocol==='https:'){_document.cookie+=' secure;'}
$('.l-cookie').remove()})}
$('.w-color-switch input[name=us-color-scheme-switch]').prop('checked',$ush.getCookie('us_color_scheme_switch_is_on')==='true');$us.$document.on('change','[name=us-color-scheme-switch]',(e)=>{if($ush.getCookie('us_color_scheme_switch_is_on')==='true'){$us.$html.removeClass('us-color-scheme-on');$ush.removeCookie('us_color_scheme_switch_is_on')}else{$us.$html.addClass('us-color-scheme-on');$ush.setCookie('us_color_scheme_switch_is_on','true',30)}
if($us.header.$container.length){$us.header.$container.addClass('notransition');$ush.timeout(()=>$us.header.$container.removeClass('notransition'),50)}});function usPopupLink(context,opts){const $links=$('a[ref=magnificPopup][class!=direct-link]:not(.inited)',context||_document);const defaultOptions={fixedContentPos:!0,mainClass:'mfp-fade',removalDelay:300,type:'image'};if($links.length>0){$links.addClass('inited').magnificPopup($.extend({},defaultOptions,opts||{}))}};$.fn.wPopupLink=function(opts){return this.each(function(){$(this).data('usPopupLink',new usPopupLink(this,opts))})};$(()=>$us.$document.wPopupLink());(function(){const $footer=$('.l-footer');if($us.$body.hasClass('footer_reveal')&&$footer.length>0&&$footer.html().trim().length>0){function usFooterReveal(){var footerHeight=$footer.innerHeight();if(_window.innerWidth>parseInt($us.canvasOptions.columnsStackingWidth)-1){$us.$canvas.css('margin-bottom',Math.round(footerHeight)-1)}else{$us.$canvas.css('margin-bottom','')}};usFooterReveal();$us.$window.on('resize load',usFooterReveal)}})();const $usYTVimeoVideoContainer=$('.with_youtube, .with_vimeo');if($usYTVimeoVideoContainer.length>0){$us.$window.on('resize load',()=>{$usYTVimeoVideoContainer.each(function(){var $container=$(this),$frame=$container.find('iframe').first(),cHeight=$container.innerHeight(),cWidth=$container.innerWidth(),fWidth='',fHeight='';if(cWidth/cHeight<16/9){fWidth=cHeight*(16/9);fHeight=cHeight}else{fWidth=cWidth;fHeight=fWidth*(9/16)}
$frame.css({'width':Math.round(fWidth),'height':Math.round(fHeight),})})})}});(function($){"use strict";function USWaypoints(){const self=this;self.waypoints=[];$us.$canvas.on('contentChange',self._countAll.bind(self));$us.$window.on('resize load',self._events.resize.bind(self)).on('scroll scroll.waypoints',self._events.scroll.bind(self));$ush.timeout(self._events.resize.bind(self),75);$ush.timeout(self._events.scroll.bind(self),75)}
USWaypoints.prototype={_events:{scroll:function(){const self=this;var scrollTop=parseInt($us.$window.scrollTop());scrollTop=(scrollTop>=0)?scrollTop:0;for(var i=0;i<self.waypoints.length;i ++){if(self.waypoints[i].scrollPos<scrollTop){self.waypoints[i].fn(self.waypoints[i].$node);self.waypoints.splice(i,1);i --}}},resize:function(){const self=this;$ush.timeout(()=>{self._countAll.call(self);self._events.scroll.call(self)},150);self._countAll.call(self);self._events.scroll.call(self)}},add:function($node,offset,fn){const self=this;$node=($node instanceof $)?$node:$($node);if($node.length==0){return}
if(typeof offset!='string'||offset.indexOf('%')==-1){offset=parseInt(offset)}
if($node.offset().top<($us.$window.height()+$us.$window.scrollTop())){offset=0}
var waypoint={$node:$node,offset:offset,fn:fn};self._count(waypoint);self.waypoints.push(waypoint)},_count:function(waypoint){const elmTop=waypoint.$node.offset().top,winHeight=$us.$window.height();if(typeof waypoint.offset=='number'){waypoint.scrollPos=elmTop-winHeight+waypoint.offset}else{waypoint.scrollPos=elmTop-winHeight+winHeight*parseInt(waypoint.offset)/100}},_countAll:function(){const self=this;for(var i=0;i<self.waypoints.length;i ++){self._count(self.waypoints[i])}}};$us.waypoints=new USWaypoints})(jQuery);(function(){var lastTime=0;const vendors=['ms','moz','webkit','o'];for(var x=0;x<vendors.length&&!_window.requestAnimationFrame;++ x){_window.requestAnimationFrame=_window[vendors[x]+'RequestAnimationFrame'];_window.cancelAnimationFrame=_window[vendors[x]+'CancelAnimationFrame']||_window[vendors[x]+'CancelRequestAnimationFrame']}
if(!_window.requestAnimationFrame){_window.requestAnimationFrame=(callback,element)=>{const currTime=new Date().getTime();const timeToCall=Math.max(0,16-(currTime-lastTime));const id=_window.setTimeout(()=>callback(currTime+timeToCall),timeToCall);lastTime=currTime+timeToCall;return id}}
if(!_window.cancelAnimationFrame){_window.cancelAnimationFrame=(id)=>clearTimeout(id)}}());!function($){if($us.$body.hasClass('single-format-video')){$('figure.wp-block-embed div.wp-block-embed__wrapper',$us.$body).each((_,node)=>{if(node.firstElementChild===null){node.remove()}})}}(jQuery);!function($){"use strict";function usCollapsibleContent(container){const self=this;self._events={showContent:self.showContent.bind(self),};self.$container=$(container);self.$firstElement=$('> *:first',self.$container);self.collapsedHeight=self.$container.data('content-height')||200;self.$container.on('click','.collapsible-content-more, .collapsible-content-less',self._events.showContent);if(self.$container.closest('.owl-carousel').length==0){self.setHeight.call(self)}};usCollapsibleContent.prototype={setHeight:function(){const self=this;let collapsedHeight=self.$firstElement.css('height',self.collapsedHeight).height();self.$firstElement.css('height','');let heightFirstElement=self.$firstElement.height();if(heightFirstElement&&heightFirstElement<=collapsedHeight){$('.toggle-links',self.$container).hide();self.$firstElement.css('height','');self.$container.removeClass('with_collapsible_content')}else{$('.toggle-links',self.$container).show();self.$firstElement.css('height',self.collapsedHeight)}},showContent:function(e){const self=this;e.preventDefault();e.stopPropagation();self.$container.toggleClass('show_content',$(e.target).hasClass('collapsible-content-more')).trigger('showContent');$ush.timeout(()=>{$us.$canvas.trigger('contentChange');if($.isMobile&&!$ush.isNodeInViewport(self.$container[0])){$us.$htmlBody.stop(!0,!1).scrollTop(self.$container.offset().top-$us.header.getCurrentHeight(!0))}},1)}};$.fn.usCollapsibleContent=function(){return this.each(function(){$(this).data('usCollapsibleContent',new usCollapsibleContent(this))})};$('[data-content-height]',$us.$canvas).usCollapsibleContent();$us.$document.on('usPostList.itemsLoaded usGrid.itemsLoaded',(_,$items)=>{$('[data-content-height]',$items).usCollapsibleContent()});if($('.owl-carousel',$us.$canvas).length>0){$us.$canvas.on('click','.collapsible-content-more, .collapsible-content-less',(e)=>{const $target=$(e.target);const $container=$target.closest('[data-content-height]');if(!$container.data('usCollapsibleContent')){$container.usCollapsibleContent();$target.trigger('click')}})}}(jQuery);!function($){$us.$window.on('us.wpopup.afterShow',(_,wPopup)=>{if(wPopup instanceof $us.wPopup&&$('video.wp-video-shortcode',wPopup.$box).length>0){const handle=$ush.timeout(()=>{$ush.clearTimeout(handle);_window.dispatchEvent(new Event('resize'))},1)}})}(jQuery);!function($){"use strict";$us.scrollbarWidth=function(force){const self=this;if($ush.isUndefined(self.width)||force){const scrollDiv=_document.createElement('div');scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';_document.body.appendChild(scrollDiv);self.width=scrollDiv.offsetWidth-scrollDiv.clientWidth;_document.body.removeChild(scrollDiv)}
return self.width};if($.magnificPopup){const origMfpOpen=$.magnificPopup.proto.open;const origMfpClose=$.magnificPopup.proto.close;$.magnificPopup.proto.open=function(){const result=origMfpOpen.apply(this,arguments);$us.$html.removeAttr('style');$us.$document.trigger('usPopupOpened',this);return result};$.magnificPopup.proto.close=function(){const result=origMfpClose.apply(this,arguments);$us.$document.trigger('usPopupClosed',this);return result}}
$us.$document.on('usPopupOpened',()=>{$us.$html.addClass('us_popup_is_opened');if(!$.isMobile&&$us.$html[0].scrollHeight>$us.$html[0].clientHeight){const scrollbarWidth=$us.scrollbarWidth();if(scrollbarWidth){$us.$html.css('--scrollbar-width',scrollbarWidth+'px')}}});$us.$document.on('usPopupClosed',()=>{$us.$html.removeClass('us_popup_is_opened');if(!$.isMobile){$us.$html.css('--scrollbar-width','')}})}(jQuery);!function($,_undefined){"use strict";const _document=document;const _location=location;const ceil=Math.ceil;window.$ush=window.$ush||{};window.$us=window.$us||{};function USScroll(opts){const self=this;const defaultOpts={attachOnInit:['.menu-item a[href*="#"]','.menu-item[href*="#"]','.post_custom_field a[href*="#"]','.post_title a[href*="#"]','.w-ibanner a[href*="#"]','.vc_custom_heading a[href*="#"]','.vc_icon_element a[href*="#"]','.w-comments-title a[href*="#"]','.w-iconbox a[href*="#"]','.w-image a[href*="#"]:not([onclick])','.w-text a[href*="#"]','.w-toplink','a.smooth-scroll[href*="#"]','a.w-btn[href*="#"]:not([onclick])','a.w-grid-item-anchor[href*="#"]'].join(),buttonActiveClass:'active',menuItemActiveClass:'current-menu-item',menuItemAncestorActiveClass:'current-menu-ancestor',animationDuration:($us.canvasOptions||{}).scrollDuration||0,animationEasing:$us.getAnimationName('easeInOutExpo'),endAnimationEasing:$us.getAnimationName('easeOutExpo')};self.opts=$.extend({},defaultOpts,opts||{});self.blocks={};self.isScrolling=!1;self._events={onAnchorClick:self.onAnchorClick.bind(self),onCancel:self.onCancel.bind(self),onScroll:self.onScroll.bind(self),onResize:self.onResize.bind(self)};$us.$window.on('resize load',$ush.debounce(self._events.onResize,1));$ush.timeout(self._events.onResize,75);$us.$window.on('scroll.noPreventDefault',self._events.onScroll);$ush.timeout(self._events.onScroll,75);if(self.opts.attachOnInit){self.attach(self.opts.attachOnInit)}
$us.$canvas.on('contentChange',self._countAllPositions.bind(self));if(_location.hash&&_location.hash.indexOf('#!')==-1){var hash=_location.hash,scrollPlace=(self.blocks[hash]!==_undefined)?hash:_undefined;if(scrollPlace===_undefined){try{const $target=$(hash);if($target.length!=0){scrollPlace=$target}}
catch(error){}}
if(scrollPlace!==_undefined){var keepScrollPositionTimer=setInterval(()=>{self.scrollTo(scrollPlace);if(_document.readyState!=='loading'){clearInterval(keepScrollPositionTimer)}},100);const clearHashEvents=()=>{$us.$window.off('load mousewheel.noPreventDefault DOMMouseScroll touchstart.noPreventDefault',clearHashEvents);$ush.timeout(()=>{$us.canvas.resize();self._countAllPositions();if($us.hasOwnProperty('waypoints')){$us.waypoints._countAll()}
self.scrollTo(scrollPlace)},100)};$us.$window.on('load mousewheel.noPreventDefault DOMMouseScroll touchstart.noPreventDefault',clearHashEvents)}}
self.animateOpts={duration:self.opts.animationDuration,easing:self.opts.animationEasing,start:()=>{self.isScrolling=!0},complete:()=>{self.onCancel()},}}
USScroll.prototype={_countPosition:function(hash){const self=this;var $target=self.blocks[hash].$target,offsetTop=$target.offset().top;if($target.hasClass('type_sticky')){var key='realTop';if(!$target.hasClass('is_sticky')){$target.removeData(key)}
if(!$target.data(key)){$target.data(key,offsetTop)}
offsetTop=$target.data(key)||offsetTop}
if($us.$body.hasClass('footer_reveal')&&$target.closest('footer').length){offsetTop=$us.$body.outerHeight(!0)+(offsetTop-$us.$window.scrollTop())}
self.blocks[hash].top=ceil(offsetTop-$us.canvas.getOffsetTop())},_countAllPositions:function(){const self=this;for(const hash in self.blocks){if(self.blocks[hash]){self._countPosition(hash)}}},indicatePosition:function(activeHash){const self=this;for(const hash in self.blocks){if(!self.blocks[hash]){continue}
const block=self.blocks[hash];if(!$ush.isUndefined(block.buttons)){block.buttons.toggleClass(self.opts.buttonActiveClass,hash===activeHash)}
if(!$ush.isUndefined(block.menuItems)){block.menuItems.toggleClass(self.opts.menuItemActiveClass,hash===activeHash)}
if(!$ush.isUndefined(block.menuAncestors)){block.menuAncestors.removeClass(self.opts.menuItemAncestorActiveClass)}}
if(!$ush.isUndefined(self.blocks[activeHash])&&!$ush.isUndefined(self.blocks[activeHash].menuAncestors)){self.blocks[activeHash].menuAncestors.addClass(self.opts.menuItemAncestorActiveClass)}},attach:function(anchors){const self=this;const $anchors=$(anchors).not('.no_smooth_scroll');if($anchors.length==0){return}
var _pathname=decodeURIComponent(_location.pathname),patternPathname=new RegExp('^'+_pathname.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")+'#'),patternPageId=/^\/?(\?page_id=\d+).*?/;$anchors.each((index,anchor)=>{const $anchor=$(anchor);if($anchor.closest('.no_smooth_scroll').length>0){return}
var href=$ush.toString($anchor.attr('href')).replace(_location.origin,''),hash=$anchor.prop('hash'),hasProtocol=/^(https?:\/\/)/.test(href),hasPageId=patternPageId.test(href);if(hash.indexOf('#!')>-1||href.indexOf('#')<0||(href.substr(0,2)=='/#'&&_location.search&&_pathname=='/')||(hasProtocol&&href.indexOf(_location.origin)!==0)||(hasPageId&&href.indexOf((_location.search.match(patternPageId)||[])[1])==-1)||(href.charAt(0)=='/'&&!hasPageId&&!patternPathname.test(href))){return}
if(hash!=''&&hash!='#'){if(self.blocks[hash]===_undefined){var $target=$(hash),$originalTarget,type='';if($target.length==0){return}
if($target.hasClass('g-cols')&&$target.hasClass('vc-row')&&$target.parent().children().length==1){$target=$target.closest('.l-section')}
if($target.hasClass('w-tabs-section')){const $newTarget=$target.closest('.w-tabs');if(!$newTarget.hasClass('accordion')){$originalTarget=$target;$target=$newTarget}
type='tab-section'}else if($target.hasClass('w-tabs')){type='tabs'}
self.blocks[hash]={type:type,$target:$target,$originalTarget:$originalTarget};self._countPosition(hash)}
if($anchor.parent().length>0&&$anchor.parent().hasClass('menu-item')){var $menuIndicator=$anchor.closest('.menu-item');self.blocks[hash].menuItems=(self.blocks[hash].menuItems||$()).add($menuIndicator);var $menuAncestors=$menuIndicator.parents('.menu-item-has-children');if($menuAncestors.length>0){self.blocks[hash].menuAncestors=(self.blocks[hash].menuAncestors||$()).add($menuAncestors)}}else{self.blocks[hash].buttons=(self.blocks[hash].buttons||$()).add($anchor)}}
$anchor.on('click',self._events.onAnchorClick)})},getPlacePosition:function(place){const self=this;const data={newY:0,type:''};if(place===''||place==='#'){data.newY=0;data.type='top'}
else if(self.blocks[place]!==_undefined){self._countPosition(place);data.newY=self.blocks[place].top;data.type='hash';place=self.blocks[place].$target}else if(place instanceof $){if(place.hasClass('w-tabs-section')){var newPlace=place.closest('.w-tabs');if(!newPlace.hasClass('accordion')){place=newPlace}}
data.newY=place.offset().top;data.type='element'}else{data.newY=place}
if($us.canvas.isStickySection()&&$us.canvas.hasPositionStickySections()&&!$(place).hasClass('type_sticky')&&$us.canvas.isAfterStickySection(place)){data.newY-=$us.canvas.getStickySectionHeight()}
return data},scrollTo:function(place,animate){const self=this;var $place=$(place);if($place.closest('.w-popup-wrap').length){self.scrollToPopupContent(place);return!0}
var offset=self.getPlacePosition(place),indicateActive=()=>{if(offset.type==='hash'){self.indicatePosition(place)}else{self.onScroll()}};if(animate){if(navigator.userAgent.match(/iPad/i)!=null&&$('.us_iframe').length&&offset.type=='hash'){$place[0].scrollIntoView({behavior:"smooth",block:"start"})}
var scrollTop=$us.$window.scrollTop(),scrollDirections=scrollTop<offset.newY?'down':'up';if(scrollTop===offset.newY){return}
const animateOpts=$.extend({},self.animateOpts,{always:()=>{self.isScrolling=!1;indicateActive()}});animateOpts.step=(now,fx)=>{var newY=self.getPlacePosition(place).newY;if($us.header.isHorizontal()&&$us.header.stickyEnabled()){newY-=$us.header.getCurrentHeight()}
fx.end=newY};if($place.hasClass('us_animate_this')){$place.trigger('us_startAnimate')}
$us.$htmlBody.stop(!0,!1).animate({scrollTop:offset.newY+'px'},animateOpts);$us.$window.on('keydown mousewheel.noPreventDefault DOMMouseScroll touchstart.noPreventDefault',self._events.onCancel)}else{if($us.header.stickyEnabled()&&$us.header.isHorizontal()){offset.newY-=$us.header.getCurrentHeight(!0)}
$us.$htmlBody.stop(!0,!1).scrollTop(offset.newY);indicateActive()}},scrollToPopupContent:function(place){const self=this;const node=_document.getElementById(place.replace('#',''));const animateOpts=$.extend({},self.animateOpts,{always:()=>{self.isScrolling=!1},});$(node).closest('.w-popup-wrap').stop(!0,!1).animate({scrollTop:node.offsetTop+'px'},animateOpts);$us.$window.on('keydown mousewheel.noPreventDefault DOMMouseScroll touchstart.noPreventDefault',self._events.onCancel)},onAnchorClick:function(e){e.preventDefault();const self=this;const $anchor=$(e.currentTarget);const hash=$anchor.prop('hash');if($anchor.hasClass('w-nav-anchor')&&$anchor.closest('.menu-item').hasClass('menu-item-has-children')&&$anchor.closest('.w-nav').hasClass('type_mobile')){var menuOptions=$anchor.closest('.w-nav').find('.w-nav-options:first')[0].onclick()||{},dropByLabel=$anchor.parents('.menu-item').hasClass('mobile-drop-by_label'),dropByArrow=$anchor.parents('.menu-item').hasClass('mobile-drop-by_arrow');if(dropByLabel||(menuOptions.mobileBehavior&&!dropByArrow)){return!1}}
if($anchor.attr('href')==='#'&&$anchor.closest('.w-popup-wrap').length){return!1}
self.scrollTo(hash,!0);self.indicatePosition(hash);if(typeof self.blocks[hash]!=='undefined'){var block=self.blocks[hash];if(['tabs','tab-section'].includes(block.type)){var $linkedSection=$(`.w-tabs-section[id="${hash.substr(1)}"]`,block.$target);if(block.type==='tabs'){$linkedSection=$('.w-tabs-section:first',block.$target)}else if(block.$target.hasClass('w-tabs-section')){$linkedSection=block.$target}
if($linkedSection.length){$('.w-tabs-section-header',$linkedSection).trigger('click')}}else if(block.menuItems!==_undefined&&$us.currentStateIs(['mobiles','tablets'])&&$us.$body.hasClass('header-show')){$us.$body.removeClass('header-show')}}},onCancel:function(){$us.$htmlBody.stop(!0,!1);$us.$window.off('keydown mousewheel.noPreventDefault DOMMouseScroll touchstart',this._events.onCancel);this.isScrolling=!1},onScroll:function(){const self=this;if(self.isScrolling){return}
var scrollTop=ceil($us.header.getScrollTop()),activeHash;scrollTop=(scrollTop>=0)?scrollTop:0;for(const hash in self.blocks){const block=self.blocks[hash];if(!block||activeHash||$ush.isNodeInViewport(block)){continue}
var top=block.top;if(!$us.header.isHorizontal()){top-=$us.canvas.getOffsetTop()}else{if($us.header.stickyEnabled()){top-=$us.header.getCurrentHeight(!0)}
if($us.canvas.hasStickySection()){top-=$us.canvas.getStickySectionHeight()}}
top=$ush.parseInt(top.toFixed(0));if(scrollTop>=top&&scrollTop<=(top+block.$target.outerHeight(!1))){activeHash=hash}
if(activeHash&&block.type==='tab-section'&&block.$originalTarget.is(':hidden')){activeHash=_undefined}}
$ush.debounce_fn_1ms(self.indicatePosition.bind(self,activeHash))},onResize:function(){const self=this;$ush.timeout(()=>{self._countAllPositions();self.onScroll()},150);self._countAllPositions();self.onScroll()}};$(()=>$us.scroll=new USScroll($us.scrollOptions||{}))}(jQuery);(function($){"use strict";var USAnimate=function(container){var self=this;self.$container=$(container);self.$items=$('[class*="us_animate_"]:not(.off_autostart)',self.$container);self.$items.each(function(_,item){var $item=$(item);if($item.data('_animate_inited')||$item.hasClass('off_autostart')){return}
if($item.parents('.owl-carousel').length){$item.addClass('start')}
$item.data('_animate_inited',!0);$us.waypoints.add($item,'12%',function($node){if(!$node.hasClass('start')){$ush.timeout(function(){$node.addClass('start')},20)}});$item.one('us_startAnimate',function(){if(!$item.hasClass('start')){$item.addClass('start')}})})};window.USAnimate=USAnimate;new USAnimate(document);$('.wpb_animate_when_almost_visible').each(function(){$us.waypoints.add($(this),'12%',function($node){if(!$node.hasClass('wpb_start_animation')){$ush.timeout(function(){$node.addClass('wpb_start_animation')},20)}})})})(jQuery);!function($,_undefined){"use strict";function usCarousel(container){const self=this;self.$container=$(container);self.$carousel=$('.w-grid-list.owl-carousel',self.$container);self.options={navElement:'button',navText:['',''],responsiveRefreshRate:100,};self._events={initializedOwlCarousel:self.initializedOwlCarousel.bind(self),mousedownOwlCore:self.mousedownOwlCore.bind(self),};const $opts=$('.w-grid-carousel-json',self.$container);if($opts.is('[onclick]')){$.extend(self.options,($opts[0].onclick()||{}).carousel_settings||{})}
$opts.remove();if($us.$html.hasClass('touch')||$us.$html.hasClass('ios-touch')){self.options.mouseDrag=!1}
if($us.usbPreview()){$.extend(self.options,{autoplayHoverPause:!0,mouseDrag:!1,touchDrag:!1,loop:!1,})}
if(self.options.autoplayContinual){$.extend(self.options,{slideTransition:'linear',autoplaySpeed:self.options.autoplayTimeout,smartSpeed:self.options.autoplayTimeout,});if(!self.options.autoWidth){self.options.slideBy=1}}
self.$carousel.on('initialized.owl.carousel',self._events.initializedOwlCarousel).on('mousedown.owl.core',self._events.mousedownOwlCore);self.owlCarousel=self.$carousel.owlCarousel(self.options).data('owl.carousel');if(self.owlCarousel&&self.options.autoplayContinual){self.$carousel.trigger('next.owl.carousel')}
if(self.owlCarousel&&self.options.aria_labels.prev&&self.options.aria_labels.next){$('.owl-prev',self.$carousel).attr('aria-label',self.options.aria_labels.prev);$('.owl-next',self.$carousel).attr('aria-label',self.options.aria_labels.next)}
const screenSize=String(self.$carousel[0].className).match(/owl-responsive-(\d+)/)[1];const carouselResponsive=(self.options.responsive||{})[screenSize]||{};if(carouselResponsive){if(carouselResponsive.items===1){self.$carousel.toggleClass('autoheight',carouselResponsive.autoHeight)}
self.$carousel.toggleClass('with_dots',carouselResponsive.dots)}
if($('[ref=magnificPopupGrid]',self.$carousel).length>0){$ush.timeout(self.initMagnificPopup.bind(self),1)}
if(self.$container.hasClass('open_items_in_popup')){new $us.wPopup().popupPost(self.$container)}
self.initKeyboardNav(carouselResponsive)}
$.extend(usCarousel.prototype,{initKeyboardNav:function(carouselResponsive){const self=this;const focusableSelectors=['a[href]','area[href]','input:not([disabled])','select:not([disabled])','textarea:not([disabled])','button:not([disabled])','iframe','object','embed','[tabindex]:not([tabindex="-1"])','[contenteditable]','video[controls] source'].join();$ush.timeout(()=>{self.$carousel.find('.owl-item.cloned').find(focusableSelectors).attr('tabindex',-1)},100);if(carouselResponsive.autoplay){var lastFocused=null;self.$carousel.off('focusin.carouselKeyboardNav').on('focusin.carouselKeyboardNav',(e)=>{self.$carousel.trigger('stop.owl.autoplay');const $allItems=$('.owl-item:not(.cloned)',self.$carousel);const $mainActive=$('.owl-item.active:not(.cloned)',self.$carousel);const $first=$(focusableSelectors,$mainActive).first();if(!$first.length){return}
if(!$allItems.has(e.target).length){return}
if($first[0]===e.target||$first[0]===lastFocused){return}
if(!$mainActive.has(e.target).length){$first.focus();lastFocused=$first[0]}});self.$carousel.off('focusout.carouselKeyboardNav').on('focusout.carouselKeyboardNav',()=>{self.$carousel.trigger('play.owl.autoplay')})}
if(carouselResponsive.items===1&&!carouselResponsive.loop){self.$carousel.off('keyup.carouselKeyboardNav').on('keyup.carouselKeyboardNav',(e)=>{if(e.keyCode!==$ush.TAB_KEYCODE){return}
const $owlItem=$(e.target).closest('.owl-item');if(!$owlItem.length){return}
if(e.shiftKey){self.$carousel.trigger('to.owl.carousel',[$owlItem.index()])}else{self.$carousel.trigger('to.owl.carousel',[$owlItem.index(),0])}})}
self.$carousel.off('keydown.carouselKeyboardNav').on('keydown.carouselKeyboardNav',(e)=>{if(e.keyCode!==$ush.TAB_KEYCODE||carouselResponsive.items===1){return}
if(self.options.slideBy==='page'){const $activeItems=$('.owl-item.active:not(.cloned)',self.$carousel);const $focusables=$(focusableSelectors,$activeItems).filter(':visible');const index=$focusables.index(e.target);if(index<0){return}
if(!e.shiftKey&&index===$focusables.length-1){self.$carousel.trigger('stop.owl.autoplay');self.$carousel.trigger('next.owl.carousel',[0])}
if(e.shiftKey&&index===0){self.$carousel.trigger('stop.owl.autoplay');self.$carousel.trigger('prev.owl.carousel',[0])}}else{const $owlItem=$(e.target).closest('.owl-item');if(!$owlItem.length){return}
const $focusables=$(focusableSelectors,$owlItem).filter(':visible');const index=$focusables.index(e.target);if(e.shiftKey&&index===0){self.$carousel.trigger('prev.owl.carousel',carouselResponsive.items===1?[0]:null)}
if(!e.shiftKey&&index===$focusables.length-1){self.$carousel.trigger('next.owl.carousel',carouselResponsive.items===1?[0]:null)}}});self.$carousel.on('keydown.carouselArrowsNav',focusableSelectors,(e)=>{switch(e.keyCode){case 37:e.preventDefault();self.$carousel.trigger('prev.owl.carousel');break;case 39:e.preventDefault();self.$carousel.trigger('next.owl.carousel');break}})},initializedOwlCarousel:function(e){const self=this;const $toggleLinks=$('[data-content-height]',e.currentTarget);$toggleLinks.each((_,node)=>{const $node=$(node);var usCollapsibleContent=$node.data('usCollapsibleContent');if($ush.isUndefined(usCollapsibleContent)){usCollapsibleContent=$node.usCollapsibleContent().data('usCollapsibleContent')}
usCollapsibleContent.setHeight();$ush.timeout(()=>{self.$carousel.trigger('refresh.owl.carousel')},1)});if($.isMobile&&self.$carousel.closest('.w-tabs-section.active').length>0){$ush.timeout(()=>{self.$carousel.trigger('refresh.owl.carousel')},50)}
if(self.options.autoHeight){$toggleLinks.on('showContent',()=>{self.$carousel.trigger('refresh.owl.carousel')})}},mousedownOwlCore:function(e){const self=this;if(!String(e.target.className).includes('collapsible-content-')){return}
if(self.owlCarousel.settings.mouseDrag){self.owlCarousel.$stage.trigger('mouseup.owl.core')}
if(self.owlCarousel.settings.touchDrag){self.owlCarousel.$stage.trigger('touchcancel.owl.core')}}});$.extend(usCarousel.prototype,{initMagnificPopup:function(){const self=this;const globalOpts=$us.langOptions.magnificPopup||{};self.$carousel.magnificPopup({type:'image',delegate:'.owl-item:not(.cloned) a[ref=magnificPopupGrid]',gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1],tPrev:globalOpts.tPrev,tNext:globalOpts.tNext,tCounter:globalOpts.tCounter},image:{titleSrc:'aria-label'},removalDelay:300,mainClass:'mfp-fade',fixedContentPos:!0,callbacks:{beforeOpen:function(){if(self.owlCarousel&&self.owlCarousel.settings.autoplay){self.$carousel.trigger('stop.owl.autoplay')}},beforeClose:function(){if(self.owlCarousel&&self.owlCarousel.settings.autoplay){self.$carousel.trigger('play.owl.autoplay')}}}});self.$carousel.on('initialized.owl.carousel',(e)=>{const items={};const $list=$(e.currentTarget);$('.owl-item:not(.cloned)',$list).each((_,owlItem)=>{const $owlItem=$(owlItem);const id=$('[data-id]',$owlItem).data('id');if(!items[id]){items[id]=$owlItem}});$list.on('click','.owl-item.cloned',(e)=>{e.preventDefault();e.stopPropagation();const id=$('[data-id]',e.currentTarget).data('id');if(items[id]){$('a[ref=magnificPopupGrid]',items[id]).trigger('click')}})})},});$.fn.usCarousel=function(){return this.each(function(){$(this).data('usCarousel',new usCarousel(this))})};$(()=>$('.w-grid.type_carousel').usCarousel())}(jQuery);!function($,undefined){"use strict";window.$us=window.$us||{};function usContentCarousel(container){const self=this;const $carouselContainer=$('.owl-carousel',container);var carouselOptions={navElement:'button',navText:['',''],responsiveRefreshRate:100,}
if($carouselContainer.is('[onclick]')){$.extend(carouselOptions,$carouselContainer[0].onclick()||{});if(!$us.usbPreview()){$carouselContainer.removeAttr('onclick')}}
if($us.$html.hasClass('touch')||$us.$html.hasClass('ios-touch')){$.extend(carouselOptions,{mouseDrag:!1,})}
if(carouselOptions.slideBy=='page'){if($('.wpb_row:first',$carouselContainer).length){$.each(carouselOptions.responsive,(_,options)=>{$.extend(options,{items:1,autoWidth:!1})})}}
if($us.usbPreview()){$.extend(carouselOptions,{autoplayHoverPause:!0,mouseDrag:!1,touchDrag:!1,loop:!1,});$carouselContainer.one('initialized.owl.carousel',()=>{$('.owl-item',$carouselContainer).each((_,node)=>{var $node=$(node),$element=$('> *',node),usbid=$element.data('usbid')||$element.data('usbid2');$node.attr('data-usbid',usbid);$element.data('usbid2',usbid).removeAttr('data-usbid')});$ush.timeout(()=>{$('.owl-dots *, .owl-prev, .owl-next',$carouselContainer).addClass('usb_skip_elmSelected')},1)});$('style[data-for]',$carouselContainer).each((_,node)=>{$(node).next().prepend(node)})}
$carouselContainer.one('initialized.owl.carousel',()=>{$('[data-content-height]',$carouselContainer).each((_,node)=>{var $node=$(node),usCollapsibleContent=$node.data('usCollapsibleContent');if($ush.isUndefined(usCollapsibleContent)){usCollapsibleContent=$node.usCollapsibleContent().data('usCollapsibleContent')}
usCollapsibleContent.setHeight();$ush.timeout(()=>{$carouselContainer.trigger('refresh.owl.carousel')},1)});if(carouselOptions.autoHeight){$('[data-content-height]',$carouselContainer).on('showContent',()=>{$list.trigger('refresh.owl.carousel')})}});if(carouselOptions.autoplayContinual){carouselOptions.slideTransition='linear';carouselOptions.autoplaySpeed=carouselOptions.autoplayTimeout;carouselOptions.smartSpeed=carouselOptions.autoplayTimeout;if(!carouselOptions.autoWidth){carouselOptions.slideBy=1}}
if($carouselContainer.data('owl.carousel')){$carouselContainer.trigger('destroy.owl.carousel')}
$carouselContainer.owlCarousel(carouselOptions);if($carouselContainer&&carouselOptions.autoplayContinual){$carouselContainer.trigger('next.owl.carousel')}
if($carouselContainer&&carouselOptions.aria_labels.prev&&carouselOptions.aria_labels.next){$('.owl-prev',$carouselContainer).attr('aria-label',carouselOptions.aria_labels.prev);$('.owl-next',$carouselContainer).attr('aria-label',carouselOptions.aria_labels.next)}
const currentOwlResponsiveValue=$carouselContainer.attr('class').match(/owl-responsive-(\d+)/)[1];const carouselOptionsResponsive=carouselOptions.responsive||{};const currentOptionsResponsive=carouselOptionsResponsive[currentOwlResponsiveValue];if(currentOptionsResponsive){if(currentOptionsResponsive.items===1){$carouselContainer.toggleClass('autoheight',currentOptionsResponsive.autoHeight)}
$carouselContainer.toggleClass('with_dots',currentOptionsResponsive.dots)}}
$.fn.usContentCarousel=function(options){return this.each(function(){$(this).data('usContentCarousel',new usContentCarousel(this,options))})};$(()=>{$('.w-content-carousel').usContentCarousel()})}(jQuery);!function($){"use strict";$us.USVCCharts=function(container,options){this.init(container,options)};$us.USVCCharts.prototype={init:function(container,options){this.$container=$(container);this.charts={line:{class:'vc_line-chart',},round:{class:'vc_round-chart',}};$us.$canvas.on('contentChange',this.redraw.bind(this))},redraw:function(event,data={}){if(!data||!data.elm){return}
for(const chart in this.charts){const $wrapper=$(data.elm).hasClass('w-popup')?'.w-popup-wrap':$(data.elm);if(this.$container.closest($wrapper).length){if(this.$container.hasClass(this.charts.line.class)){$.fn.vcLineChart&&this.$container.vcLineChart({reload:!1})}else if(this.$container.hasClass(this.charts.round.class)){$.fn.vcRoundChart&&this.$container.vcRoundChart({reload:!1})}}}},};$.fn.USVCCharts=function(options){return this.each(function(){$(this).data('USVCCharts',new $us.USVCCharts(this,options))})};$(function(){$('.vc_line-chart, .vc_round-chart').USVCCharts()})}(jQuery);!function($){"use strict";$us.CommnentsForm=function(container,options){this.init(container,options)};$us.CommnentsForm.prototype={init:function(container,options){this.$container=$(container);this.$form=this.$container.find('form.comment-form');if(!this.$form.length){return}
this.$jsonContainer=this.$container.find('.us-comments-json');if(!this.$jsonContainer.length){return}
this.jsonData=this.$jsonContainer[0].onclick()||{};this.$jsonContainer.remove();this.$fields={content:{field:this.$form.find('textarea'),msg:this.jsonData.no_content_msg||'Please enter a Message'},name:{field:this.$form.find('.for_text input[type="text"]'),msg:this.jsonData.no_name_msg||'Please enter your Name'},email:{field:this.$form.find('.for_email input[type="email"]'),msg:this.jsonData.no_email_msg||'Please enter a valid email address.'}};this._events={formSubmit:this.formSubmit.bind(this)};this.$form.on('submit',this._events.formSubmit)},formSubmit:function(event){this.$form.find('.w-form-row.check_wrong').removeClass('check_wrong');this.$form.find('.w-form-state').html('');for(var i in this.$fields){if(this.$fields[i].field.length==0){continue}
if(this.$fields[i].field.val()==''&&this.$fields[i].field.attr('data-required')){this.$fields[i].field.closest('.w-form-row').toggleClass('check_wrong');this.$fields[i].field.closest('.w-form-row').find('.w-form-row-state').html(this.$fields[i].msg);event.preventDefault()}}}};$.fn.CommnentsForm=function(options){return this.each(function(){$(this).data('CommnentsForm',new $us.CommnentsForm(this,options))})};$(function(){$('.w-post-elm.post_comments.layout_comments_template').CommnentsForm();$('.l-section.for_comments').CommnentsForm()})}(jQuery);!function($,undefined){var
_parseFloat=parseFloat,_parseInt=parseInt,_undefined=undefined,_window=window
var USCounterNumber=function(container){var self=this;self.$container=$(container);self.initialString=self.$container.html()+'';self.finalString=self.$container.data('final')+'';self.format=self.getFormat(self.initialString,self.finalString);if(self.format.decMark){var pattern=new RegExp('[^0-9\/'+self.format.decMark+']+','g');self.initial=_parseFloat(self.initialString.replace(pattern,'').replace(self.format.decMark,'.'));self.final=_parseFloat(self.finalString.replace(pattern,'').replace(self.format.decMark,'.'))}else{self.initial=_parseInt(self.initialString.replace(/[^0-9]+/g,''));self.final=_parseInt(self.finalString.replace(/[^0-9]+/g,''))}
if(self.format.accounting){if(self.initialString.length>0&&self.initialString[0]=='('){self.initial=-self.initial}
if(self.finalString.length>0&&self.finalString[0]=='('){self.final=-self.final}}};USCounterNumber.prototype={step:function(now){var self=this,value=(1-now)*self.initial+self.final*now,intPart=Math[self.format.decMark?'floor':'round'](value).toString(),result='';if(self.format.zerofill){var amountOfZeros=(self.format.intDigits-intPart.length);if(amountOfZeros>0){intPart='0'.repeat(amountOfZeros)+intPart}}
if(self.format.groupMark){if(self.format.indian){result+=intPart.replace(/(\d)(?=(\d\d)+\d$)/g,'$1'+self.format.groupMark)}else{result+=intPart.replace(/\B(?=(\d{3})+(?!\d))/g,self.format.groupMark)}}else{result+=intPart}
if(self.format.decMark){var decimalPart=(value%1).toFixed(self.format.decDigits).substring(2);result+=self.format.decMark+decimalPart}
if(self.format.accounting&&result.length>0&&result[0]=='-'){result='('+result.substring(1)+')'}
self.$container.html(result)},getFormat:function(initial,final){var self=this,iFormat=self._getFormat(initial),fFormat=self._getFormat(final),format=$.extend({},iFormat,fFormat);if(format.groupMark==format.decMark){delete format.groupMark}
return format},_getFormat:function(str){var marks=str.replace(/[0-9\(\)\-]+/g,''),format={};if(str.charAt(0)=='('){format.accounting=!0}
if(/^0[0-9]/.test(str)){format.zerofill=!0}
str=str.replace(/[\(\)\-]/g,'');if(marks.length!=0){if(marks.length>1){format.groupMark=marks.charAt(0);if(marks.charAt(0)!=marks.charAt(marks.length-1)){format.decMark=marks.charAt(marks.length-1)}
if(str.split(format.groupMark).length>2&&str.split(format.groupMark)[1].length==2){format.indian=!0}}else{format[(((str.length-1)-str.indexOf(marks))==3&&marks!=='.')?'groupMark':'decMark']=marks}
if(format.decMark){format.decDigits=str.length-str.indexOf(format.decMark)-1}}
if(format.zerofill){format.intDigits=str.replace(/[^\d]+/g,'').length-(format.decDigits||0)}
return format}};var USCounterText=function(container){var self=this;self.$container=$(container);self.initial=self.$container.text()+'';self.final=self.$container.data('final')+'';self.partsStates=self.getStates(self.initial,self.final);self.len=1/(self.partsStates.length-1);self.curState=0};USCounterText.prototype={step:function(now){var self=this,state=Math.round(Math.max(0,now/self.len));if(state==self.curState){return}
self.$container.html(self.partsStates[state]);self.curState=state},getStates:function(initial,final){var min=Math.min,dist=[],i,j;for(i=0;i<=initial.length;i ++){dist[i]=[i]}
for(j=1;j<=final.length;j ++){dist[0][j]=j;for(i=1;i<=initial.length;i ++){dist[i][j]=(initial[i-1]===final[j-1])?dist[i-1][j-1]:(Math.min(dist[i-1][j],dist[i][j-1],dist[i-1][j-1])+1)}}
var states=[final];for(i=initial.length,j=final.length;i>0||j>0;i --,j --){var min=dist[i][j];if(i>0){min=Math.min(min,dist[i-1][j],(j>0)?dist[i-1][j-1]:min)}
if(j>0){min=Math.min(min,dist[i][j-1])}
if(min>=dist[i][j]){continue}
if(min==dist[i][j-1]){states.unshift(states[0].substring(0,j-1)+states[0].substring(j));i ++}else if(min==dist[i-1][j-1]){states.unshift(states[0].substring(0,j-1)+initial[i-1]+states[0].substring(j))}else if(min==dist[i-1][j]){states.unshift(states[0].substring(0,j)+initial[i-1]+states[0].substring(j));j ++}}
return states}};var USCounter=function(container){var self=this;self.$container=$(container);self.parts=[];self.duration=_parseFloat(self.$container.data('duration')||2)*1000;self.$container.find('.w-counter-value-part').each(function(index,part){var $part=$(part);if($part.html()+''==$part.data('final')+''){return}
var type=$part.usMod('type');if(type=='number'){self.parts.push(new USCounterNumber($part))}else{self.parts.push(new USCounterText($part))}});if(_window.$us!==_undefined&&_window.$us.scroll!==_undefined){$us.waypoints.add(self.$container,'15%',self.animate.bind(self))}else{self.animate()}};USCounter.prototype={animate:function(duration){var self=this;self.$container.css('w-counter',0).animate({'w-counter':1},{duration:self.duration,step:self.step.bind(self)})},step:function(now){var self=this;for(var i=0;i<self.parts.length;i ++){self.parts[i].step(now)}}};$.fn.wCounter=function(options){return this.each(function(){var self=this;$(self).data('wCounter',new USCounter(self,options))})};$(function(){$('.w-counter').wCounter()})}(jQuery);(function($){"use strict";$.fn.wDropdown=function(){return this.each(function(){var $self=$(this),$current=$self.find('.w-dropdown-current'),$anchors=$self.find('a'),openEventName='click',closeEventName='mouseup mousewheel DOMMouseScroll touchstart focusout',justOpened=!1;if($self.hasClass('open_on_hover')){openEventName='mouseenter';closeEventName='mouseleave'}
var closeList=function(){$self.removeClass('opened');$us.$window.off(closeEventName,closeListEvent)};var closeListEvent=function(e){if(closeEventName!='mouseleave'&&$self.has(e.target).length!==0){return}
e.stopPropagation();e.preventDefault();closeList()};var openList=function(){$self.addClass('opened');if(closeEventName=='mouseleave'){$self.on(closeEventName,closeListEvent)}else{$us.$window.on(closeEventName,closeListEvent)}
justOpened=!0;$ush.timeout(function(){justOpened=!1},500)};var openListEvent=function(e){if(openEventName=='click'&&$self.hasClass('opened')&&!justOpened){closeList();return}
openList()};$current.on(openEventName,openListEvent);$self.on('click','a[href$="#"]',function(e){e.preventDefault()}).on('keydown',function(e){const keyCode=e.keyCode||e.which;if(keyCode==$ush.TAB_KEYCODE){var $target=$(e.target)||{},index=$anchors.index($target);if(e.shiftKey){if(index===0){closeList()}}else{if(index===$anchors.length-1){closeList()}}}
if(keyCode==$ush.ESC_KEYCODE){closeList()}})})};$(function(){$('.w-dropdown').wDropdown()})})(jQuery);!function($,undefined){var _window=window,_document=document,_undefined=undefined;_window.$us=_window.$us||{};$us.WForm=function(container){var self=this;self.$form=$(container);if(!self.$form.hasClass('for_cform')){self.$form=$('.w-form.for_cform',container)}
self.$formH=$('.w-form-h',self.$form);self.$dateFields=$('.w-form-row.for_date input',self.$form);self.$message=$('.w-form-message',self.$form);self.$reusableBlock=$('.w-form-reusable-block',self.$form);self.$submit=$('.w-btn',self.$form);self.options={};self.isFileValid=!0;self.pickerOptions={};var $formJson=$('.w-form-json',self.$form);if($formJson.is('[onclick]')){self.options=$formJson[0].onclick()||{};if(!$us.usbPreview()){$formJson.remove()}}
if(self.$dateFields.length){$(()=>{self._initDateField()})}
$(['input[type=text]','input[type=email]','input[type=tel]','input[type=number]','input[type=date]','input[type=search]','input[type=url]','input[type=password]','textarea'].join(),self.$form).each((_,input)=>{const $input=$(input);const $row=$input.closest('.w-form-row');if($input.attr('type')==='hidden'){return}
$row.toggleClass('not-empty',$input.val()!='');$input.on('input change',()=>{$row.toggleClass('not-empty',$input.val()!='')})});self._events={changeFile:self._changeFile.bind(self),submit:self._submit.bind(self)};self.$form.on('change','input[type=file]:visible',self._events.changeFile).on('submit',self._events.submit)};$.extend($us.WForm.prototype,{getExtension:function(name){return(''+name).split('.').pop()},_validExtension:function(file,accepts){if(!accepts){return!0}
var self=this;accepts=(''+accepts).split(',');for(var i in accepts){var accept=(''+accepts[i]).trim();if(!accept){continue}
if(accept.indexOf('/')>-1){var acceptMatches=accept.split('/');if(file.type===accept||(acceptMatches[1]==='*'&&(''+file.type).indexOf(acceptMatches[0])===0)){return!0}}else if(self.getExtension(file.name)===accept.replace(/[^A-z\d]+/,'')){return!0}}
return!1},_requiredValidation:function(){const self=this;let errors=0;$('[data-required=true]',self.$form).each(function(_,input){let $input=$(input),isEmpty=$input.is('[type=checkbox]')?!$input.is(':checked'):$input.val()=='',$row=$input.closest('.w-form-row');if($row.hasClass('for_checkboxes')||$row.hasClass('for_radio')){return!0}
if(input.type==='file'){isEmpty=isEmpty||!self.isFileValid}
if(input.type==='select-one'){isEmpty=$input.val()===$('option:first-child',$input).val()}
$row.toggleClass('check_wrong',isEmpty);if(isEmpty){errors ++}});$('.for_checkboxes.required',self.$form).each(function(_,elm){let $input=$('input[type=checkbox]',elm),$row=$input.closest('.w-form-row'),isEmpty=!$input.is(':checked');$row.toggleClass('check_wrong',isEmpty);if(isEmpty){errors ++}});$('.for_radio.required',self.$form).each(function(_,elm){let $input=$('input[type=radio]',elm).first(),$row=$input.closest('.w-form-row'),isEmpty=$input.is(':checked');$row.toggleClass('check_wrong',isEmpty);if(isEmpty){errors ++}});return!errors},_initDateField:function(){var self=this;$.each(self.$dateFields,function(_,input){var $input=$(input);self.pickerOptions.dateFormat=$input.data('date-format');try{$input.datepicker(self.pickerOptions);if($input.closest('.w-popup-wrap').length){$input.on('click',function(e){let $datepicker=$('#ui-datepicker-div'),datepickerHeight=$datepicker.outerHeight(),inputBounds=e.currentTarget.getBoundingClientRect();if(_window.innerHeight-(inputBounds.bottom+datepickerHeight)>0){$datepicker.css({position:'fixed',left:inputBounds.left,top:(inputBounds.top+inputBounds.height)})}else{$datepicker.css({position:'fixed',left:inputBounds.left,top:(inputBounds.top-datepickerHeight),})}})}}catch(e){}})},_changeFile:function(e){var self=this,errMessage='',input=e.target,$input=$(input),accept=$input.attr('accept')||'',maxSize=$input.data('max_size')||$input.data('std')||0;if(input.files.length){for(var i in input.files){if(errMessage){break}
var file=input.files[i];if(!(file instanceof File)){continue}
if(!self._validExtension(file,accept)){errMessage=(self.options.messages.err_extension||'').replace('%s',self.getExtension(file.name))}
if(!errMessage&&file.size>(parseFloat(maxSize)*1048576)){errMessage=(self.options.messages.err_size||'').replace('%s',maxSize)}}}
$input.closest('.for_file').toggleClass('check_wrong',!(self.isFileValid=!errMessage)).find('.w-form-row-state').html(errMessage||self.options.messages.err_empty)},_submit:function(e){e.preventDefault();var self=this;self.$message.usMod('type',!1).html('');if(self.$submit.hasClass('loading')||!self._requiredValidation()||!self.isFileValid){return}
self.$submit.addClass('loading');var formData=_window.FormData?new FormData(self.$form[0]):self.$form.serialize();if(self.$form.hasClass('validate_by_recaptcha')){grecaptcha.ready(function(){try{grecaptcha.execute(self.options.recaptcha_site_key,{action:'submit'}).then(function(token){formData.append('g-recaptcha-response',token);sendAjaxRequest()})}catch(e){self.$message.usMod('type','error').html(self.options.messages.err_recaptcha_keys);self.$submit.removeClass('loading')}})}else{sendAjaxRequest()}
function sendAjaxRequest(){$.ajax({type:'POST',url:self.options.ajaxurl,data:formData,cache:!1,processData:!1,contentType:!1,dataType:'json',success:function(res){$('.w-form-row.check_wrong',self.$form).removeClass('check_wrong');if(res.success){if(res.data.redirect_url){_window.location.href=res.data.redirect_url;return}
if(res.data.popup_selector){const $popupTrigger=$(res.data.popup_selector).find('.w-popup-trigger');if($popupTrigger.length){$popupTrigger.trigger('click')}}
if(res.data.message){self.$message.usMod('type','success').html(res.data.message)}
if(self.$reusableBlock.length){self.$reusableBlock.slideDown(400)}
if(self.options.close_popup_after_sending){const $popupCloser=self.$form.closest('.w-popup-wrap').find('.w-popup-closer');if($popupCloser.length){$popupCloser.trigger('click')}}
if(self.options.hide_form_after_sending){const formPos=self.$form.offset().top;const scrollTop=$us.$window.scrollTop();if(!$ush.isNodeInViewport(self.$form[0])||formPos>=(scrollTop+window.innerHeight)||scrollTop>=formPos){$us.$htmlBody.animate({scrollTop:formPos-$us.header.getInitHeight()},400)}
self.$formH.slideUp(400)}
$('.w-form-row.not-empty',self.$form).removeClass('not-empty');$('input[type=text], input[type=email], textarea',self.$form).val('');self.$form.trigger('usCformSuccess',res).get(0).reset()}else{if($.isPlainObject(res.data)){for(var fieldName in res.data){if(fieldName==='empty_message'){$resultField.usMod('type','error');continue}
if(fieldName==='reCAPTCHA'&&res.data[fieldName].error_message){self.$message.usMod('type','error').html(res.data.reCAPTCHA.error_message)}
$('[name="'+fieldName+'"]',self.$form).closest('.w-form-row').addClass('check_wrong').find('.w-form-row-state').html(res.data[fieldName].error_message||'')}}else{self.$message.usMod('type','error').html(res.data)}}},complete:function(){self.$submit.removeClass('loading')}})}}});$.fn.wForm=function(){return this.each(function(){$(this).data('wForm',new $us.WForm(this))})};$('.w-form.for_cform').wForm()}(jQuery);!function($){"use strict";$us.WFlipBox=function(container){this.$container=$(container);this.$front=this.$container.find('.w-flipbox-front');this.$frontH=this.$container.find('.w-flipbox-front-h');this.$back=this.$container.find('.w-flipbox-back');this.$backH=this.$container.find('.w-flipbox-back-h');this.$xFlank=this.$container.find('.w-flipbox-xflank');this.$yFlank=this.$container.find('.w-flipbox-yflank');this.$btn=this.$container.find('.w-btn');var isWebkit='WebkitAppearance' in document.documentElement.style;if(isWebkit&&this.$container.usMod('animation')==='cubeflip'&&this.$btn.length){this.$container.usMod('animation','cubetilt')}
var animation=this.$container.usMod('animation'),direction=this.$container.usMod('direction');this.forceSquare=(animation=='cubeflip'&&['ne','se','sw','nw'].indexOf(direction)!=-1);this.autoSize=(this.$front[0].style.height==''&&!this.forceSquare);this.centerContent=(this.$container.usMod('valign')=='center');if(this._events===undefined){this._events={}}
$.extend(this._events,{resize:this.resize.bind(this)});if(this.centerContent||this.forceSquare||this.autoSize){$us.$window.bind('resize load',this._events.resize);this.resize()}
this.makeHoverable('.w-btn');$ush.timeout(function(){this.$back.css('display','');this.$yFlank.css('display','');this.$xFlank.css('display','');this.resize()}.bind(this),250);$us.$canvas.on('contentChange',this._events.resize)};$us.WFlipBox.prototype={resize:function(){var width=this.$container.width(),height;if(this.centerContent||this.autoSize||this.forceSquare){this.padding=parseInt(this.$front.css('padding-top'))}
if(this.autoSize||this.centerContent){var frontContentHeight=this.$frontH.height(),backContentHeight=this.$backH.height()}
if(this.forceSquare||this.autoSize){height=this.forceSquare?width:(Math.max(frontContentHeight,backContentHeight)+2*this.padding);this.$front.css('height',height+'px')}else{height=this.$container.height()}
if(this.centerContent){this.$front.css('padding-top',Math.max(this.padding,(height-frontContentHeight)/2));this.$back.css('padding-top',Math.max(this.padding,(height-backContentHeight)/2))}},makeHoverable:function(exclude){if(this._events===undefined){this._events={}}
if(jQuery.isMobile){this._events.touchHoverStart=function(){this.$container.toggleClass('hover')}.bind(this);this.$container.on('touchstart.noPreventDefault',this._events.touchHoverStart);if(exclude){this._events.touchHoverPrevent=function(e){e.stopPropagation()};this.$container.find(exclude).on('touchstart.noPreventDefault',this._events.touchHoverPrevent)}}else{this._mouseInside=!1;this._focused=!1;$.extend(this._events,{mouseHoverStart:function(){this.$container.addClass('hover');this._mouseInside=!0}.bind(this),mouseHoverEnd:function(){if(!this._focused){this.$container.removeClass('hover')}
this._mouseInside=!1}.bind(this),focus:function(){this.$container.addClass('hover');this._focused=!0}.bind(this),blur:function(){if(!this._mouseInside){this.$container.removeClass('hover')}
this._focused=!1}.bind(this)});this.$container.on('mouseenter',this._events.mouseHoverStart);this.$container.on('mouseleave',this._events.mouseHoverEnd);this.$focusable=this.$container.find('a').addBack('a');this.$focusable.on('focus',this._events.focus);this.$focusable.on('blur',this._events.blur)}}};$.fn.wFlipBox=function(options){return this.each(function(){$(this).data('wFlipBox',new $us.WFlipBox(this,options))})};$(function(){$('.w-flipbox').wFlipBox()})}(jQuery);(function($,_undefined){"use strict";function usGallery(container){const self=this;self.currentPage=1;self.ajaxData={};self.allImageIds=[];self.$container=$(container);self.$list=$('.w-gallery-list',container);self.$itemsImg=$('.w-gallery-item-img',container);self.$loadmore=$('.w-gallery-loadmore',container);self.$jsonContainer=$('.w-gallery-json',container);self._events={showNumberOfHiddenImages:$ush.debounce(self.showNumberOfHiddenImages.bind(self),5),getItems:self.getItems.bind(self),usbReloadIsotopeLayout:self._usbReloadIsotopeLayout.bind(self),};if(self.$jsonContainer.length&&!$us.usbPreview()){self.ajaxData=self.$jsonContainer[0].onclick()||{};self.allImageIds=self.ajaxData.template_vars.ids||[]}
if(self.$container.hasClass('type_masonry')){self.initMasonry()}
if(self.$container.hasClass('action_popup_image')){self.initMagnificPopup()}
self.$container.on('usbReloadIsotopeLayout',self._events.usbReloadIsotopeLayout);$us.$window.on('resize',self._events.showNumberOfHiddenImages);self.showNumberOfHiddenImages();if(!self.allImageIds.length){return}
$('button',self.$loadmore).on('click',self._events.getItems);if(self.ajaxData.template_vars.pagination=='load_on_scroll'){$us.waypoints.add(self.$loadmore,'-70%',self._events.getItems)}}
usGallery.prototype={initMagnificPopup:function(){$('a.w-gallery-item-link',this.$container).magnificPopup({type:'image',gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1],tPrev:$us.langOptions.magnificPopup.tPrev,tNext:$us.langOptions.magnificPopup.tNext,tCounter:$us.langOptions.magnificPopup.tCounter},removalDelay:300,mainClass:'mfp-fade',fixedContentPos:!0})},initMasonry:function(){const self=this;const isotopeOptions={itemSelector:'.w-gallery-item:not(.hidden)',layoutMode:'masonry',isOriginLeft:!$ush.isRtl(),};if(self.$list.parents('.w-tabs-section-content-h').length){isotopeOptions.transitionDuration=0}
$('>*:not(.hidden)',self.$list).imagesLoaded(()=>{self.$list.isotope(isotopeOptions);self.$list.isotope()});$us.$canvas.on('contentChange',()=>{$('>*:not(.hidden)',self.$list).imagesLoaded(()=>{self.$list.isotope()})})},showNumberOfHiddenImages:function(){const self=this;const hiddenImagesNumber=self.$itemsImg.filter(':hidden').length;self.$itemsImg.removeAttr('data-hidden-images-number');if(hiddenImagesNumber){self.$itemsImg.filter(':visible:last').attr('data-hidden-images-number',hiddenImagesNumber)}},_usbReloadIsotopeLayout:function(){const self=this;if(self.$container.hasClass('with_isotope')){self.$list.isotope('layout')}},getItems:function(){const self=this;if(self.$loadmore.hasClass('hidden')){return}
self.currentPage+=1;self.ajaxData.template_vars.ids=self.allImageIds.slice(self.ajaxData.template_vars.quantity*(self.currentPage-1),self.ajaxData.template_vars.quantity*self.currentPage);if(!self.ajaxData.template_vars.ids.length){self.$loadmore.addClass('hidden');return}
self.$loadmore.addClass('loading');$.ajax({type:'post',url:$us.ajaxUrl,data:{action:self.ajaxData.action,template_vars:JSON.stringify(self.ajaxData.template_vars),},success:(html)=>{var $result=$(html),$items=$('.w-gallery-list > *',$result);if(!$items.length||self.currentPage===self.ajaxData.template_vars.max_num_pages){self.$loadmore.addClass('hidden')}
self.$list.append($items);if(self.$container.hasClass('action_popup_image')){self.initMagnificPopup()}
if(self.$container.hasClass('type_masonry')){var isotope=self.$list.data('isotope');if(isotope){isotope.insert($items);isotope.reloadItems()}}
if(self.ajaxData.template_vars.pagination=='load_on_scroll'){$us.waypoints.add(self.$loadmore,'-70%',self._events.getItems)}
self.$loadmore.removeClass('loading')},error:()=>{self.$loadmore.removeClass('loading')}})},};$.fn.usGallery=function(){return this.each(function(){$(this).data('usGallery',new usGallery(this))})};$(()=>$('.w-gallery').usGallery());$us.$document.on('usPostList.itemsLoaded usGrid.itemsLoaded',(_,$items)=>{$('.w-gallery',$items).usGallery()})})(jQuery);!function($,undefined){"use strict";var _document=document,_window=window,_null=null;_window.$us=_window.$us||{};const _REGEXP_EXTRACT_COORDINATES_=/^(-?[\d\.]+),(-?[\d\.]+)$/;_window.usGmapLoaded=function(){$us.$document.trigger('usGmapLoaded')};$us._wGmapsGeocodes={_maxAttempts:5,_tasks:{},add:function(key,callback){var self=this;self._tasks[''+key]={counter:0,running:!1,callback:callback,};return self.run.bind(self,key)},remove:function(key){var self=this;if(self._tasks[key]){delete self._tasks[key]}},run:function(key){var self=this,task=self._tasks[key];if($ush.isUndefined(task)||task.running){return}
if(task.counter>=self._maxAttempts){self.remove(key)}
if(typeof task.callback==='function'){task.counter++;task.running=!0;task.callback(function(){task.running=!1})}}};$us.wGmaps=function(container,options){var self=this;self.$container=$(container);if(self.$container.data('_inited')){return}
self.$container.data('_inited',1);self._mapInstance=_null;self.cookieName=self.$container.data('cookie-name');self.options=options||{};self.style={};self.uniqid=$ush.uniqid();var attributeName='data-api-key';if(self.$container.is('['+attributeName+']')){self._apiKey=self.$container.attr(attributeName);self.$container.removeAttr(attributeName)}
self._events={confirm:self._confirm.bind(self),redraw:self._redraw.bind(self),init:self._init.bind(self),};$us.$document.on('usGmapLoaded',self._events.init);if(self.cookieName){self.$container.on('click','.action_confirm_load',self._events.confirm);return}
if(!self.cookieName||$ush.getCookie(self.cookieName)){self[self.isGmapLoaded()?'_init':'_initAftetGmapLoaded']()}};$.extend($us.wGmaps.prototype,{isGmapLoaded:function(){return!!(_window.google||{})['maps']},_confirm:function(){var self=this;if($('input[name^='+self.cookieName+']:checked',self.$container).length){$ush.setCookie(self.cookieName,1,365)}
self.$container.html($ush.base64Decode(''+$('script[type="text/template"]',self.$container).text())).removeAttr('data-cookie-name');self[self.isGmapLoaded()?'_init':'_initAftetGmapLoaded']()},_init:function(){var self=this;if(self.$container.is('[data-cookie-name]')||!self.isGmapLoaded()){return}
var $mapJson=$('.w-map-json',self.$container);if($mapJson.is('[onclick]')){$.extend(self.options,$mapJson[0].onclick()||{});$mapJson.remove()}
var $styleJson=$('.w-map-style-json',self.$container);if($styleJson.is('[onclick]')){self.style=$styleJson[0].onclick()||[];$styleJson.remove()}
var mapOptions={el:'#'+self.$container.attr('id'),lat:0,lng:0,mapTypeId:google.maps.MapTypeId[self.options.maptype],type:self.options.type,zoom:self.options.zoom};if(self.options.hideControls){mapOptions.disableDefaultUI=!0}
if(self.options.disableZoom){mapOptions.scrollwheel=!1}
if(self.options.disableDragging&&(!$us.$html.hasClass('no-touch'))){mapOptions.draggable=!1}
self._mapInstance=new GMaps(mapOptions);if(self.style!=_null&&Array.isArray(self.style)){self._mapInstance.map.setOptions({styles:self.style})}
var shouldRunGeoCode,matches=$ush.removeSpaces(''+self.options.address).match(_REGEXP_EXTRACT_COORDINATES_);if(matches){self.options.latitude=matches[1];self.options.longitude=matches[2];$ush.timeout(function(){self._mapInstance.setCenter(self.options.latitude,self.options.longitude)},1)}else{$us._wGmapsGeocodes.add(self.uniqid,function(stopGeocodeTask){self._mapGeoCode(self.uniqid,self.options.address,function(latitude,longitude){self.options.latitude=latitude;self.options.longitude=longitude;self._mapInstance.setCenter(latitude,longitude);if(typeof stopGeocodeTask==='function'){stopGeocodeTask()}},self.uniqid)})()}
$.each(self.options.markers,function(i,_){var markerOptions={};if(self.options.icon!=_null||self.options.markers[i].marker_img!=_null){var url,width,height;if(self.options.markers[i].marker_img!=_null){url=self.options.markers[i].marker_img[0];width=self.options.markers[i].marker_size[0];height=self.options.markers[i].marker_size[1]}else{url=self.options.icon.url;width=self.options.icon.size[0];height=self.options.icon.size[1]}
var size=new google.maps.Size($ush.parseInt(width),$ush.parseInt(height));markerOptions.icon={url:url,size:size,scaledSize:size,}}
if(self.options.markers[i]!=_null){var matches=$ush.removeSpaces(self.options.markers[i].address).match(_REGEXP_EXTRACT_COORDINATES_);if(matches){markerOptions.lat=matches[1];markerOptions.lng=matches[2];if(self.options.markers[i].html){markerOptions.infoWindow={content:self.options.markers[i].html}}
var marker=self._mapInstance.addMarker(markerOptions);if(self.options.markers[i].infowindow){marker.infoWindow.open(self._mapInstance.map,marker)}}else{var markerGeocodeId=self.uniqid+':'+i;$us._wGmapsGeocodes.add(markerGeocodeId,function(stopGeocodeTask){self._mapGeoCode(markerGeocodeId,self.options.markers[i].address,function(latitude,longitude){markerOptions.lat=latitude;markerOptions.lng=longitude;if(self.options.markers[i].html){markerOptions.infoWindow={content:self.options.markers[i].html}}
var marker=self._mapInstance.addMarker(markerOptions);if(self.options.markers[i].infowindow){marker.infoWindow.open($ush.clone(self._mapInstance.map,{shouldFocus:!1}),marker)}
if(typeof stopGeocodeTask==='function'){stopGeocodeTask()}})})()}}});$us.$canvas.on('contentChange',self._events.redraw);$us.$window.on('load',self._events.redraw)},_mapGeoCode:function(uniqid,address,callback){var self=this;GMaps.geocode({address:address,callback:function(results,status){if(status=='OK'){var location=results[0].geometry.location;if(typeof callback==='function'){callback.call(_null,location.lat(),location.lng(),results)}
$us._wGmapsGeocodes.remove(uniqid)}else if(status=='OVER_QUERY_LIMIT'){$ush.timeout($us._wGmapsGeocodes.bind(_null,uniqid),2000)}}})},_redraw:function(){var self=this;if(self.$container.is(':hidden')){return}
self.$container.css({height:'',width:''});self._mapInstance.refresh();var latitude=$ush.parseFloat(self.options.latitude),longitude=$ush.parseFloat(self.options.longitude);if(latitude&&longitude){self._mapInstance.setCenter(latitude,longitude)}},_initAftetGmapLoaded:function(){var $script=$('script#us-google-maps:first');if(!$script.is('[data-src]')){return}
$script.attr('src',(''+$script.data('src')).replace('&#038;','&')).removeAttr('data-src')}});$.fn.wGmaps=function(options){options=options||{};return this.each(function(){this._wGmaps=new $us.wGmaps(this,$ush.clone(options))})};$(function(){$('.w-map.provider_google').wGmaps()})}(jQuery);(function($,_undefined){"use strict";const _window=window;$us.WGrid=function(container,options){const self=this;self.$container=$(container);self.$filters=$('.g-filters-item',self.$container);self.$list=$('.w-grid-list',self.$container);self.$loadmore=$('.g-loadmore',self.$container);self.$pagination=$('> .pagination',self.$container);self.$preloader=$('.w-grid-preloader',self.$container);self.$style=$('> style:first',self.$container);self.loading=!1;self.changeUpdateState=!1;self.gridFilter=null;self.curFilterTaxonomy='';self.paginationType=self.$pagination.length?'regular':(self.$loadmore.length?'ajax':'none');self.filterTaxonomyName=self.$list.data('filter_taxonomy_name')?self.$list.data('filter_taxonomy_name'):'category';if(self.$container.data('gridInit')==1){return}
self.$container.data('gridInit',1);self._events={updateState:self._updateState.bind(self),updateOrderBy:self._updateOrderBy.bind(self),initMagnificPopup:self._initMagnificPopup.bind(self),usbReloadIsotopeLayout:self._usbReloadIsotopeLayout.bind(self),scrollToGrid:$ush.debounce(self.scrollToGrid.bind(self),10),};var $jsonContainer=$('.w-grid-json',self.$container);if($jsonContainer.length&&$jsonContainer.is('[onclick]')){self.ajaxData=$jsonContainer[0].onclick()||{};if(!$us.usbPreview()){$jsonContainer.remove()}}else{self.ajaxData={};self.ajaxUrl=''}
if(self.$container.hasClass('open_items_in_popup')){new $us.wPopup().popupPost(self.$container)}
if(self.paginationType!='none'||self.$filters.length){if(self.ajaxData==_undefined){return}
self.templateVars=self.ajaxData.template_vars||{};if(self.filterTaxonomyName){self.initialFilterTaxonomy=self.$list.data('filter_default_taxonomies')?self.$list.data('filter_default_taxonomies').toString().split(','):'';self.curFilterTaxonomy=self.initialFilterTaxonomy}
self.curPage=self.ajaxData.current_page||1;self.infiniteScroll=self.ajaxData.infinite_scroll||0}
if(self.$container.hasClass('with_isotope')){self.$list.imagesLoaded(()=>{var smallestItemSelector,isotopeOptions={itemSelector:'.w-grid-item',layoutMode:(self.$container.hasClass('isotope_fit_rows'))?'fitRows':'masonry',isOriginLeft:!$('.l-body').hasClass('rtl'),transitionDuration:0};if(self.$list.find('.size_1x1').length){smallestItemSelector='.size_1x1'}else if(self.$list.find('.size_1x2').length){smallestItemSelector='.size_1x2'}else if(self.$list.find('.size_2x1').length){smallestItemSelector='.size_2x1'}else if(self.$list.find('.size_2x2').length){smallestItemSelector='.size_2x2'}
if(smallestItemSelector){smallestItemSelector=smallestItemSelector||'.w-grid-item';isotopeOptions.masonry={columnWidth:smallestItemSelector}}
self.$list.on('layoutComplete',()=>{if(_window.USAnimate){$('.w-grid-item.off_autostart',self.$list).removeClass('off_autostart');new USAnimate(self.$list)}
$us.$window.trigger('scroll.waypoints')});self.$list.isotope(isotopeOptions);if(self.paginationType=='ajax'){self.initAjaxPagination()}
$us.$canvas.on('contentChange',()=>{self.$list.imagesLoaded(()=>{self.$list.isotope('layout')})})});self.$container.on('usbReloadIsotopeLayout',self._events.usbReloadIsotopeLayout)}else if(self.paginationType=='ajax'){self.initAjaxPagination()}
self.$filters.each((index,filter)=>{var $filter=$(filter),taxonomy=$filter.data('taxonomy');$filter.on('click',()=>{if(taxonomy!=self.curFilterTaxonomy){if(self.loading){return}
self.setState(1,taxonomy);self.$filters.removeClass('active');$filter.addClass('active')}})});if(self.$container.closest('.l-main').length){$us.$body.on('us_grid.updateState',self._events.updateState).on('us_grid.updateOrderBy',self._events.updateOrderBy)}
self.$container.on('scrollToGrid',self._events.scrollToGrid);self.$list.on('click','[ref=magnificPopup]',self._events.initMagnificPopup)};$us.WGrid.prototype={_updateState:function(e,queryString,page,gridFilter){const self=this;var $container=self.$container;if(!$container.is('[data-filterable="true"]')||!$container.hasClass('used_by_grid_filter')||(!$container.is(':visible')&&!$container.hasClass('hidden'))){return}
page=page||1;self.changeUpdateState=!0;self.gridFilter=gridFilter;if(self.ajaxData===_undefined){self.ajaxData={}}
if(!self.hasOwnProperty('templateVars')){self.templateVars=self.ajaxData.template_vars||{query_args:{}}}
self.templateVars.us_grid_filter_query_string=queryString;if(self.templateVars.query_args!==!1){self.templateVars.query_args.paged=page}
self.templateVars.filters_args=gridFilter.filtersArgs||{};self.setState(page);if(self.paginationType==='regular'&&/page(=|\/)/.test(location.href)){var url=location.href.replace(/(page(=|\/))(\d+)(\/?)/,'$1'+page+'$2');if(history.replaceState){history.replaceState(document.title,document.title,url)}}},_updateOrderBy:function(e,orderby,page,gridOrder){const self=this;if(!self.$container.is('[data-filterable="true"]')||!self.$container.hasClass('used_by_grid_order')){return}
page=page||1;self.changeUpdateState=!0;if(!self.hasOwnProperty('templateVars')){self.templateVars=self.ajaxData.template_vars||{query_args:{}}}
if(self.templateVars.query_args!==!1){self.templateVars.query_args.paged=page}
self.templateVars.grid_orderby=orderby;self.setState(page)},_initMagnificPopup:function(e){e.stopPropagation();e.preventDefault();var $target=$(e.currentTarget);if($target.data('magnificPopup')===_undefined){$target.magnificPopup({type:'image',mainClass:'mfp-fade'});$target.trigger('click')}},_usbReloadIsotopeLayout:function(){const self=this;if(self.$container.hasClass('with_isotope')){self.$list.isotope('layout')}},initAjaxPagination:function(){const self=this;self.$loadmore.on('click',()=>{if(self.curPage<self.ajaxData.max_num_pages){self.setState(self.curPage+1)}});if(self.infiniteScroll){$us.waypoints.add(self.$loadmore,'-70%',()=>{if(!self.loading){self.$loadmore.click()}})}},setState:function(page,taxonomy){const self=this;if(self.loading&&!self.changeUpdateState){return}
if(page!==1&&self.paginationType=='ajax'&&self.none!==_undefined&&self.none==!0){return}
self.none=!1;self.loading=!0;self.$container.next('.w-grid-none').addClass('hidden');if(self.$filters.length&&!self.changeUpdateState){taxonomy=taxonomy||self.curFilterTaxonomy;if(taxonomy=='*'){taxonomy=self.initialFilterTaxonomy}
if(taxonomy!=''){var newTaxArgs={'taxonomy':self.filterTaxonomyName,'field':'slug','terms':taxonomy},taxQueryFound=!1;if(self.templateVars.query_args.tax_query==_undefined){self.templateVars.query_args.tax_query=[]}else{$.each(self.templateVars.query_args.tax_query,(index,taxArgs)=>{if(taxArgs!=null&&taxArgs.taxonomy==self.filterTaxonomyName){self.templateVars.query_args.tax_query[index]=newTaxArgs;taxQueryFound=!0;return!1}})}
if(!taxQueryFound){self.templateVars.query_args.tax_query.push(newTaxArgs)}}else if(self.templateVars.query_args.tax_query!=_undefined){$.each(self.templateVars.query_args.tax_query,(index,taxArgs)=>{if(taxArgs!=null&&taxArgs.taxonomy==self.filterTaxonomyName){self.templateVars.query_args.tax_query[index]=null;return!1}})}}
if(self.templateVars.query_args!==!1){self.templateVars.query_args.paged=page}
if(self.paginationType=='ajax'){if(page==1){self.$loadmore.addClass('hidden')}else{self.$loadmore.addClass('loading')}
if(!self.infiniteScroll){self.prevScrollTop=$us.$window.scrollTop()}}
if(self.paginationType!='ajax'||page==1){self.$preloader.addClass('active');if(self.$list.data('isotope')){self.$list.isotope('remove',self.$container.find('.w-grid-item'));self.$list.isotope('layout')}else{self.$container.find('.w-grid-item').remove()}}
self.ajaxData.template_vars=JSON.stringify(self.templateVars);var isotope=self.$list.data('isotope');if(isotope&&page==1){self.$list.html('');isotope.remove(isotope.items);isotope.reloadItems()}
if(self.xhr!==_undefined){self.xhr.abort()}
self.xhr=$.ajax({type:'post',url:$us.ajaxUrl,data:self.ajaxData,cache:!1,beforeSend:function(){self.$container.removeClass('hidden')},success:function(html){var $result=$(html),$container=$('.w-grid-list',$result).first(),$pagination=$('.pagination > *',$result),$items=$container.children(),smallestItemSelector;self.$container.toggleClass('hidden',!$items.length);$container.imagesLoaded(()=>{self.beforeAppendItems($items);$items.appendTo(self.$list);$container.html('');var $sliders=$items.find('.w-slider');if(isotope){isotope.insert($items);isotope.reloadItems()}
if($sliders.length){$sliders.each((index,slider)=>{$(slider).usImageSlider().find('.royalSlider').data('royalSlider').ev.on('rsAfterInit',()=>{if(isotope){self.$list.isotope('layout')}})})}
if(isotope){if(self.$list.find('.size_1x1').length){smallestItemSelector='.size_1x1'}else if(self.$list.find('.size_1x2').length){smallestItemSelector='.size_1x2'}else if(self.$list.find('.size_2x1').length){smallestItemSelector='.size_2x1'}else if(self.$list.find('.size_2x2').length){smallestItemSelector='.size_2x2'}
if(isotope.options.masonry){isotope.options.masonry.columnWidth=smallestItemSelector||'.w-grid-item'}
self.$list.isotope('layout');self.$list.trigger('layoutComplete')}
if(self.paginationType=='ajax'){if(page==1){var $jsonContainer=$result.find('.w-grid-json');if($jsonContainer.length){var ajaxData=$jsonContainer[0].onclick()||{};self.ajaxData.max_num_pages=ajaxData.max_num_pages||self.ajaxData.max_num_pages}else{self.ajaxData.max_num_pages=1}}
if(self.templateVars.query_args.paged>=self.ajaxData.max_num_pages||!$items.length){self.$loadmore.addClass('hidden')}else{self.$loadmore.removeClass('hidden').removeClass('loading')}
if(self.infiniteScroll){$us.waypoints.add(self.$loadmore,'-70%',()=>{if(!self.loading){self.$loadmore.click()}})}else if(Math.round(self.prevScrollTop)!=Math.round($us.$window.scrollTop())){$us.$window.scrollTop(self.prevScrollTop)}}else if(self.paginationType==='regular'&&self.changeUpdateState){$('a[href]',$pagination).each((_,item)=>{var $item=$(item),pathname=location.pathname.replace(/((\/page.*)?)\/$/,'');$item.attr('href',pathname+$item.attr('href'))});self.$pagination.html($pagination)}
var $result_none=$result.next('.w-grid-none');if(self.changeUpdateState&&$result_none.length){var $none=self.$container.next('.w-grid-none');if($none.length){$none.removeClass('hidden')}else{self.$container.after($result_none)}
var $nextGrid=$('.w-grid:first',self.$container.next('.w-grid-none'));if($nextGrid.length){$nextGrid.wGrid()}
self.none=!0}
if(self.changeUpdateState&&self.gridFilter){var $jsonData=$result.filter('.w-grid-filter-json-data:first');if($jsonData.length){self.gridFilter.trigger('us_grid_filter.update-items-amount',$jsonData[0].onclick()||{})}
$jsonData.remove()}
var customStyles=$('style#grid-post-content-css',$result).html()||'';if(customStyles){if(!self.$style.length){self.$style=$('<style></style>');self.$container.append(self.$style)}
self.$style.text(self.$style.text()+customStyles)}
$us.$canvas.resize();self.$preloader.removeClass('active');if(_window.USAnimate&&self.$container.hasClass('with_css_animation')){new USAnimate(self.$container)}
$ush.timeout(()=>{$us.$document.trigger('usGrid.itemsLoaded',[$items])},1)});self.$container.trigger('scrollToGrid');self.loading=!1;self.$container.trigger('USGridItemsLoaded')},error:()=>{self.$loadmore.removeClass('loading')},});self.curPage=page;self.curFilterTaxonomy=taxonomy},scrollToGrid:function(){const self=this;if(self.curPage!==1){return}
var $container=self.$container;if($container.hasClass('hidden')){$container=$container.next()}
const gridPos=$ush.parseInt($container.offset().top);if(!gridPos){return}
const scrollTop=$us.$window.scrollTop();if(scrollTop>=gridPos||gridPos>=(scrollTop+_window.innerHeight)){$us.$htmlBody.stop(!0,!1).animate({scrollTop:(gridPos-$us.header.getCurrentHeight())},500)}},beforeAppendItems:function($items){if($('[data-content-height]',$items).length){var handle=$ush.timeout(()=>{$('[data-content-height]',$items).usCollapsibleContent();$ush.clearTimeout(handle)},1)}},};$.fn.wGrid=function(options){return this.each(function(){$(this).data('wGrid',new $us.WGrid(this,options))})};$(()=>$('.w-grid:not(.us_post_list,.us_product_list,.type_carousel)').wGrid());$('.w-grid-list:not(.owl-carousel)').each((_,node)=>{const $list=$(node);if(!$list.find('[ref=magnificPopupGrid]').length){return}
const globalOpts=$us.langOptions.magnificPopup;$list.magnificPopup({type:'image',delegate:'a[ref=magnificPopupGrid]:visible',gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1],tPrev:globalOpts.tPrev,tNext:globalOpts.tNext,tCounter:globalOpts.tCounter},image:{titleSrc:'aria-label'},removalDelay:300,mainClass:'mfp-fade',fixedContentPos:!0,})})})(jQuery);!function($,_undefined){"use strict";const _document=document;const abs=Math.abs;function usGridFilter(container,options){const self=this;self.filtersArgs={};self.options={filterPrefix:'filter',gridNotFoundMessage:!1,gridPaginationSelector:'.w-grid-pagination',gridSelector:'.w-grid[data-filterable="true"]:first',layout:'hor',mobileWidth:600,use_grid:'first'};self.$container=$(container);self.$filtersItem=$('.w-filter-item',container);if(self.$container.is('[onclick]')){$.extend(self.options,self.$container[0].onclick()||{});if(!$us.usbPreview()){self.$container.removeAttr('onclick')}}
if(self.options.use_grid!=='first'){const $use_grid=$(self.options.use_grid);if($use_grid.length&&$use_grid.hasClass('w-grid')){self.$grid=$use_grid}}
if($ush.isUndefined(self.$grid)){self.$grid=$('.l-main '+self.options.gridSelector,$us.$canvas)}
var $filtersArgs=$('.w-filter-json-filters-args:first',self.$container);if($filtersArgs.length){self.filtersArgs=$filtersArgs[0].onclick()||{};$filtersArgs.remove()}
if(!self.$grid.length&&self.options.gridNotFoundMessage){self.$container.prepend('<div class="w-filter-message">'+self.options.gridNotFoundMessage+'</div>')}
self._events={changeFilter:self.changeFilter.bind(self),closeMobileFilters:self._closeMobileFilters.bind(self),openMobileFilters:self._openMobileFilters.bind(self),hideItemDropdown:self._hideItemDropdown.bind(self),loadPageNumber:self._loadPageNumber.bind(self),resetItemValues:self._resetItemValues.bind(self),resize:self._resize.bind(self),toggleItemSection:self._toggleItemSection.bind(self),showItemDropdown:self._showItemDropdown.bind(self),changeItemAtts:self._changeItemAtts.bind(self),updateItemsAmount:self._updateItemsAmount.bind(self),woocommerceOrdering:self._woocommerceOrdering.bind(self),navUsingKeyPress:self.navUsingKeyPress.bind(self),};self.$grid.addClass('used_by_grid_filter');self.$container.on('click','.w-filter-opener',self._events.openMobileFilters).on('click','.w-filter-list-closer, .w-filter-list-panel > .w-btn',self._events.closeMobileFilters);self.$filtersItem.on('change','input, select',self._events.changeFilter).on('click','.w-filter-item-reset',self._events.resetItemValues);$(self.options.gridPaginationSelector,self.$grid).on('click','.page-numbers',self._events.loadPageNumber);$us.$window.on('resize load',$ush.debounce(self._events.resize,10));self.on('changeItemAtts',self._events.changeItemAtts);if(self.$container.hasClass('drop_on_click')){self.$filtersItem.on('click','.w-filter-item-title',self._events.showItemDropdown);$(_document).on('mouseup',self._events.hideItemDropdown)}
$us.$document.on('keydown',self._events.navUsingKeyPress);$('form.woocommerce-ordering',$us.$canvas).off('change','select.orderby').on('change','select.orderby',self._events.woocommerceOrdering);$('.ui-slider',self.$container).each(function(_,node){var $node=$(node),$parent=$node.parent(),valueFormat=function(value){value=$ush.toString(value);if(options.priceFormat){var priceFormat=$ush.toPlainObject(options.priceFormat),decimals=$ush.parseInt(abs(priceFormat.decimals));if(decimals){value=$ush.toString($ush.parseFloat(value).toFixed(decimals)).replace(/^(\d+)(\.)(\d+)$/,'$1'+priceFormat.decimal_separator+'$3')}
value=value.replace(/\B(?=(\d{3})+(?!\d))/g,priceFormat.thousand_separator)}
return $ush.toString(options.unitFormat).replace('%d',value)},showRangeResult=function(e,ui){$('.for_min_value',$parent).html(valueFormat(ui.values[0]));$('.for_max_value',$parent).html(valueFormat(ui.values[1]))};var options=$.extend(!0,{slider:{animate:!0,max:100,min:0,range:!0,step:1,values:[0,100],},unitFormat:'%d',priceFormat:null,},node.onclick()||{});$node.data('defautlValues',[options.slider.min,options.slider.max].join('-')).removeAttr('onclick').slider($.extend(options.slider,{slide:showRangeResult,change:$ush.debounce(function(e,ui){showRangeResult(e,ui);$('input[type=hidden]',$parent).val(ui.values.join('-')).trigger('change')}),}))});self.checkItemValues();self.$container.toggleClass('active',self.$filtersItem.hasClass('has_value'));self.on('us_grid_filter.update-items-amount',self._events.updateItemsAmount);self._events.resize();if(self.$container.hasClass('togglable')){self.$filtersItem.on('click','.w-filter-item-title',self._events.toggleItemSection)}
self.setupTabindex()};$.extend(usGridFilter.prototype,$us.mixins.Events,{isMobile:function(){return $ush.parseInt($us.$window.width())<=$ush.parseInt(this.options.mobileWidth)},changeFilter:function(e){const self=this;const $target=$(e.target);const $item=$target.closest('.w-filter-item');const type=$ush.toString($item.usMod('type'));$item.removeClass('loading');self.$filtersItem.not($item).addClass('loading');if(['radio','checkbox'].includes(type)){if(type==='radio'){$('.w-filter-item-value',$item).removeClass('selected')}
$target.closest('.w-filter-item-value').toggleClass('selected',$target.is(':checked '))}else if(type==='range'){var $inputs=$('input[type!=hidden]',$item),rangeValues=[];$inputs.each((i,input)=>{let $input=$(input),value=$ush.parseInt(input.value),name=$ush.toString(input.dataset.name);if(!value&&name==['min_value','max_value'][i]&&rangeValues.length==i){value=$input.attr('placeholder')}
rangeValues.push($ush.parseInt(value))});rangeValues=rangeValues.join('-');$('input[type="hidden"]',$item).val(rangeValues!=='0-0'?rangeValues:'')}else if(type==='range_slider'){var $input=$('input[type="hidden"]',$item);if($input.val()==$ush.toString($('.ui-slider',$item).data('defautlValues'))){$input.val('')}}
var value=self.getValue();$ush.debounce_fn_1ms(self.URLSearchParams.bind(self,value));self.triggerGrid('us_grid.updateState',[value,1,self]);self.trigger('changeItemAtts',$item);self.$container.toggleClass('active',self.$filtersItem.hasClass('has_value'))},_loadPageNumber:function(e){e.preventDefault();e.stopPropagation();var self=this,$target=$(e.currentTarget),href=$ush.toString($target.attr('href')),page=$ush.parseInt((href.match(/page(=|\/)(\d+)(\/?)/)||[])[2]||1);history.replaceState(_document.title,_document.title,href);self.triggerGrid('us_grid.updateState',[self.getValue(),page,self])},_resetItemValues:function(e){e.preventDefault();e.stopPropagation();var self=this,$item=$(e.currentTarget).closest('.w-filter-item'),type=$ush.toString($item.usMod('type'));if(!type){return}
if(['checkbox','radio'].indexOf(type)>-1){$('input:checked',$item).prop('checked',!1);$('input[value="*"]:first',$item).each(function(_,input){$(input).prop('checked',!0).closest('.w-filter-item').addClass('selected')})}
if(type==='range'){$('input',$item).val('')}
if(type==='dropdown'){$('option',$item).prop('selected',!1)}
if(type==='range_slider'){var $uiSlider=$('.ui-slider',$item);$uiSlider.slider('values',$ush.toString($uiSlider.data('defautlValues')).split('-'))}
$('.w-filter-item-value',$item).removeClass('selected');self.trigger('changeItemAtts',$item);self.$container.toggleClass('active',self.$filtersItem.hasClass('has_value'));var value=self.getValue();$ush.debounce_fn_1ms(self.URLSearchParams.bind(self,value));self.URLSearchParams(value);self.triggerGrid('us_grid.updateState',[value,1,self])},_changeItemAtts:function(_,item){var self=this,$item=$(item),title='',hasValue=!1,type=$ush.toString($item.usMod('type')),$selected=$('input:not([value="*"]):checked',$item);if(!type){return}
if(['checkbox','radio'].indexOf(type)>-1){hasValue=$selected.length;if(self.options.layout=='hor'){var title='';if($selected.length===1){title+=$selected.nextAll('.w-filter-item-value-label:first').text()}else if($selected.length>1){title+=$selected.length}}}
if(type==='dropdown'){var value=$('select:first',$item).val();hasValue=(value!=='*')?value:''}
if(type==='range'){var value=$('input[type="hidden"]:first',$item).val();hasValue=value;if(self.options.layout=='hor'&&value){title+=value}}
if(type==='range_slider'){var value=$('input[type="hidden"]:first',$item).val();hasValue=value&&value!=$ush.toString($('.ui-slider',$item).data('defautlValues'))}
$item.toggleClass('has_value',!!hasValue);if(self.$container.hasClass('togglable')&&hasValue){$item.addClass('expand')}
$('> .w-filter-item-title > span:not(.w-filter-item-reset)',item).html(title)},_resize:function(){var self=this;self.$container.usMod('state',self.isMobile()?'mobile':'desktop');if(!self.isMobile()){$us.$body.removeClass('us_filter_open');self.$container.removeClass('open_for_mobile')}},_openMobileFilters:function(){$us.$body.addClass('us_filter_open');this.$container.addClass('open_for_mobile')},_closeMobileFilters:function(){$us.$body.removeClass('us_filter_open');this.$container.removeClass('open_for_mobile')},_showItemDropdown:function(e){this._hideItemDropdown(e);$(e.currentTarget).closest('.w-filter-item').addClass('expand')},_hideItemDropdown:function(e){var self=this;if(self.$filtersItem.hasClass('expand')){self.$filtersItem.filter('.expand').each(function(_,node){var $node=$(node);if(!$node.is(e.target)&&$node.has(e.target).length===0){$node.removeClass('expand')}})}},_toggleItemSection:function(e){$(e.currentTarget).closest('.w-filter-item').toggleClass('expand')},_woocommerceOrdering:function(e){e.stopPropagation();var self=this,$form=$(e.currentTarget).closest('form');$('input[name^="'+self.options.filterPrefix+'"]',$form).remove();$.each(self.getValue().split('&'),function(_,value){value=value.split('=');if(value.length===2){$form.append('<input type="hidden" name="'+value[0]+'" value="'+value[1]+'"/>')}});$form.trigger('submit')},_updateItemsAmount:function(_,data){const self=this;$.each((data.taxonomies_query_args||{}),function(key,items){var $item=self.$filtersItem.filter('[data-source="'+key+'"]'),type=$ush.toString($item.usMod('type')),numActiveValues=0;$.each(items,function(value,amount){var disabled=!amount;if(!disabled){numActiveValues++}
if(type==='dropdown'){var $option=$('select:first option[value="'+value+'"]',$item),template=$option.data('template')||'';if(template){template=template.replace('%s',(amount?'('+amount+')':''));$option.text(template)}
$option.prop('disabled',disabled).toggleClass('disabled',disabled)}else{var $input=$('input[value="'+value+'"]',$item);$input.prop('disabled',disabled).nextAll('.w-filter-item-value-amount').text(amount);$input.closest('.w-filter-item-value').toggleClass('disabled',disabled);if(disabled&&$input.is(':checked')){$input.prop('checked',!1)}}});$item.removeClass('loading');$item.toggleClass('disabled',numActiveValues<1)});if(data.hasOwnProperty('wc_min_max_price')&&data.wc_min_max_price instanceof Object){const $price=self.$filtersItem.filter('[data-source$="|_price"]');$.each((data.wc_min_max_price||{}),function(name,value){var $input=$('input.type_'+name,$price);$input.attr('placeholder',value?value:$input.attr('aria-label'))});$price.removeClass('loading')}
if(!$.isEmptyObject(data)){if(self.handle){$ush.clearTimeout(self.handle)}
self.handle=$ush.timeout(function(){$ush.debounce_fn_1ms(self.URLSearchParams.bind(self,self.getValue()));self.checkItemValues()},100)}
self.setupTabindex()},triggerGrid:function(eventType,extraParams){$ush.debounce_fn_10ms(function(){$us.$body.trigger(eventType,extraParams)})},checkItemValues:function(){var self=this;self.$filtersItem.each(function(_,node){self.trigger('changeItemAtts',node)})},getValue:function(){var value='',filters={};$.each(this.$container.serializeArray(),function(_,filter){if(filter.value==='*'||!filter.value){return}
if(!filters.hasOwnProperty(filter.name)){filters[filter.name]=[]}
filters[filter.name].push(filter.value)});for(var k in filters){if(value){value+='&'}
if(Array.isArray(filters[k])){value+=k+'='+filters[k].join(',')}}
return encodeURI(value);},URLSearchParams:function(params){var url=location.origin+location.pathname+(location.pathname.slice(-1)!='/'?'/':''),search=location.search.replace(new RegExp(this.options.filterPrefix+"(.+?)(&|$)","g"),'');if(!search||search.substr(0,1)!=='?'){search+='?'}else if('?&'.indexOf(search.slice(-1))===-1){search+='&'}
if(!params&&'?&'.indexOf(search.slice(-1))!==-1){search=search.slice(0,-1)}
history.replaceState(_document.title,_document.title,url+search+params)},navUsingKeyPress:function(e){const self=this;const keyCode=e.keyCode;if(keyCode==$ush.ESC_KEYCODE){self._hideItemDropdown({})}
if(keyCode===$ush.ENTER_KEYCODE&&$.contains(self.$container[0],e.target)){const $target=$(e.target);if($target.hasClass('w-filter-item-value')){$('input[type=radio], input[type=checkbox]',$target).trigger('click')}}},setupTabindex:function(){const self=this;if(self.options.layout==='hor'&&/\sstyle_switch_/.test(self.$container[0].className)){self.$filtersItem.each((_,filter)=>{if(filter.classList.contains('type_radio')||filter.classList.contains('type_checkbox')){$('.w-filter-item-value',filter).each((_,itemValue)=>{const $itemValue=$(itemValue);if($itemValue.hasClass('disabled')){$itemValue.removeAttr('tabindex')}else{$itemValue.attr('tabindex',0)}})}})}}});$.fn.usGridFilter=function(options){return this.each(function(){$(this).data('usGridFilter',new usGridFilter(this,options))})};$(()=>$('.w-filter.for_grid',$us.$canvas).usGridFilter())}(jQuery);(function($,undefined){"use strict";$us.WGridOrder=function(container){this.init(container)};$.extend($us.WGridOrder.prototype,$us.mixins.Events,{init:function(container){this.$container=$(container);this.$select=$('select',this.$container);this.$grid=$('.w-grid[data-filterable="true"]:first',$us.$canvas.find('.l-main'));this.name=this.$select.attr('name')||'order';this.$container.on('change','select',this._events.changeSelect.bind(this));this.$grid.addClass('used_by_grid_order')},_events:{changeSelect:function(){var value=this.$select.val()||'',matches=(location.href.match(/page(=|\/)(\d+)(\/?)/)||[]),page=parseInt(matches[2]||1);this.URLSearchValue(value);this.triggerGrid('us_grid.updateOrderBy',[value,page,this])}},triggerGrid:function(eventType,extraParameters){$ush.debounce_fn_10ms(function(){$us.$body.trigger(eventType,extraParameters)})},URLSearchValue:function(value){var orderby_search='',url=location.origin+location.pathname+(location.pathname.slice(-1)!='/'?'/':''),search=location.search.replace(new RegExp('[?&]'+this.name+'=[^&#]*(#.*)?$'),'$1').replace(new RegExp('([?&])'+this.name+'=[^&]*&'),'$1');if(search&&search.substr(0,1)==='?'){search=search.slice(1)}
if(value){orderby_search+=this.name+'='+value}
if(orderby_search&&search){orderby_search+='&'}
orderby_search+=search;history.replaceState(document.title,document.title,url+(orderby_search?'?'+orderby_search:''))}});$.fn.wGridOrder=function(options){return this.each(function(){$(this).data('wGridOrder',new $us.WGridOrder(this))})};$(function(){$('.w-order.for_grid',$us.$canvas).wGridOrder()})})(jQuery);!function($,_undefined){"use strict";const _window=window;_window.$ush=_window.$ush||{};_window.$us.canvas=_window.$us.canvas||{};function toBoolean(value){if(typeof value=='boolean'){return value}
if(typeof value=='string'){value=value.trim();return value.toLocaleLowerCase()=='true'||value=='1'}
return!!parseInt(value)}
function USHeader(settings){const self=this;self.$container=$('.l-header',$us.$canvas);self.$showBtn=$('.w-header-show:first',$us.$body);self.settings=settings||{};self.canvasOffset=0;self.bodyHeight=$us.$body.height();self.adminBarHeight=0;self._states={init_height:0,scroll_direction:'down',sticky:!1,sticky_auto_hide:!1,vertical_scrollable:!1};if(self.$container.length===0){return}
self.breakpoints={laptops:1280,tablets:1024,mobiles:600};for(const k in self.breakpoints){self.breakpoints[k]=parseInt(((self.settings[k]||{}).options||{}).breakpoint)||self.breakpoints[k]}
self._events={swichVerticalScrollable:self.swichVerticalScrollable.bind(self),hideMobileVerticalHeader:self.hideMobileVerticalHeader.bind(self),changeSticky:self.changeSticky.bind(self),contentChange:self.contentChange.bind(self),showBtn:self.showBtn.bind(self),scroll:$ush.debounce(self.scroll.bind(self),1),resize:$ush.debounce(self.resize.bind(self),1),};self._states.init_height=self.getHeight();$us.$window.on('scroll.noPreventDefault',self._events.scroll).on('resize load',self._events.resize);self.$container.on('contentChange',self._events.contentChange);self.$showBtn.on('click',self._events.showBtn);self.on('changeSticky',self._events.changeSticky).on('swichVerticalScrollable',self._events.swichVerticalScrollable);self.setView($us.$body.usMod('state')||'default');self.resize();if(self.stickyAutoHideEnabled()){self.$container.addClass('sticky_auto_hide')}
self.$container.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd',$ush.debounce(()=>{self.trigger.call(self,'transitionEnd')},1))}
$.extend(USHeader.prototype,$us.mixins.Events,{prevScrollTop:0,currentStateIs:function(state){return(state&&['default','laptops','tablets','mobiles'].includes(state)&&this.state===state)},isVertical:function(){return this.orientation==='ver'},isHorizontal:function(){return this.orientation==='hor'},isFixed:function(){return this.pos==='fixed'},isStatic:function(){return this.pos==='static'},isTransparent:function(){return this.bg==='transparent'},_isWithinScrollBoundaries:function(scrollTop){scrollTop=Math.ceil(scrollTop);return(scrollTop+_window.innerHeight>=$us.$document.height())||scrollTop<=0},isHidden:function(){return!!$us.header.settings.is_hidden},stickyEnabled:function(){return((this.settings[this.state]||{}).options||{}).sticky||!1},stickyAutoHideEnabled:function(){return this.stickyEnabled()&&(((this.settings[this.state]||{}).options||{}).sticky_auto_hide||!1)},isPinned:function(){return this._states.sticky||!1},isStickyAutoHidden:function(){return this._states.sticky_auto_hide||!1},getHeaderInitialPos:function(){return $us.$body.usMod('headerinpos')||''},getScrollDirection:function(){return this._states.scroll_direction||'down'},getHeight:function(){const self=this;if(!self.$container.length){return 0}
const beforeContent=getComputedStyle(self.$container[0],':before').content;var height=0;if(beforeContent&&['none','auto'].includes(beforeContent)===!1){height=beforeContent.replace(/[^+\d]/g,'')}
if(!height){height=self.$container.outerHeight()}
return $ush.parseFloat(height)},getInitHeight:function(){return $ush.parseInt(this._states.init_height)||this.getHeight()},getCurrentHeight:function(adminBar){const self=this;var height=0;if(adminBar&&self.isHorizontal()&&(!self.currentStateIs('mobiles')||(self.adminBarHeight&&self.adminBarHeight>=self.getScrollTop()))){height+=self.adminBarHeight}
if(!self.isStickyAutoHidden()){height+=self.getHeight()}
return height},getScrollTop:function(){return _window.scrollY||this.prevScrollTop},prevOffsetTop:0,getOffsetTop:function(){return(this.prevOffsetTop=Math.max(this.prevOffsetTop,$ush.parseFloat(this.$container.css('top'))))},isScrollAtTopPosition:function(){return $ush.parseInt(_window.scrollY)===0},setView:function(newState){const self=this;if(newState==self.state){return}
var options=(self.settings[newState]||{}).options||{},orientation=options.orientation||'hor',pos=toBoolean(options.sticky)?'fixed':'static',bg=toBoolean(options.transparent)?'transparent':'solid',shadow=options.shadow||'thin';if(orientation==='ver'){pos='fixed';bg='solid'}
self._setPos(pos);self._setBg(bg);self._setShadow(shadow);self.orientation=orientation
self.state=newState
$us.$document.trigger('usHeader.update_view');if(self.stickyAutoHideEnabled()){self.$container.removeClass('down')}},_setPos:function(pos){const self=this;if(pos===self.pos){return}
self.$container.usMod('pos',self.pos=pos);if(self.pos==='static'){self.trigger('changeSticky',!1)}},_setBg:function(bg){const self=this;if(bg!=self.bg){self.$container.usMod('bg',self.bg=bg)}},_setShadow:function(shadow){const self=this;if(shadow!=self.shadow){self.$container.usMod('shadow',self.shadow=shadow)}},_isVerticalScrollable:function(){const self=this;if(!self.isVertical()){return}
if((self.currentStateIs('default')||self.currentStateIs('laptops'))&&self.isFixed()){self.$container.addClass('scrollable');var headerHeight=self.getHeight(),canvasHeight=parseInt($us.canvas.winHeight),documentHeight=parseInt($us.$document.height());self.$container.removeClass('scrollable');if((headerHeight/canvasHeight)>1.05){self.trigger('swichVerticalScrollable',!0)}else if(self._states.vertical_scrollable){self.trigger('swichVerticalScrollable',!1)}
if((headerHeight/documentHeight)>1.05){self.$container.css({position:'absolute',top:0})}}else if(self._states.vertical_scrollable){self.trigger('swichVerticalScrollable',!1)}},swichVerticalScrollable:function(_,state){const self=this;self.$container.toggleClass('scrollable',self._states.vertical_scrollable=!!state);if(!self._states.vertical_scrollable){self.$container.resetInlineCSS('position','top','bottom');delete self._headerScrollRange}},changeSticky:function(_,state){const self=this;self._states.sticky=!!state;var currentHeight=self.getCurrentHeight(!0),resetCss=['position','top','bottom'];if($us.canvas.hasStickyFirstSection()&&self.getHeaderInitialPos()=='bottom'&&!self.stickyAutoHideEnabled()){resetCss=resetCss.filter((value)=>{return value!=='top'})}
self.$container.toggleClass('sticky',self._states.sticky).resetInlineCSS(resetCss);if(currentHeight==self.getCurrentHeight(!0)){self.trigger('transitionEnd')}},contentChange:function(){this._isVerticalScrollable()},showBtn:function(e){const self=this;if($us.$body.hasClass('header-show')){return}
e.stopPropagation();$us.$body.addClass('header-show').on(($.isMobile?'touchstart.noPreventDefault':'click'),self._events.hideMobileVerticalHeader)},hideMobileVerticalHeader:function(e){const self=this;if($.contains(self.$container[0],e.target)){return}
$us.$body.off(($.isMobile?'touchstart':'click'),self._events.hideMobileVerticalHeader);$ush.timeout(()=>$us.$body.removeClass('header-show'),10)},scroll:function(){const self=this;var scrollTop=self.getScrollTop(),headerAbovePosition=(self.getHeaderInitialPos()==='above');if(self.prevScrollTop!=scrollTop){self._states.scroll_direction=(self.prevScrollTop<=scrollTop)?'down':'up'}
self.prevScrollTop=scrollTop;if(self.isScrollAtTopPosition()){self._states.scroll_direction='up'}
if(self.stickyAutoHideEnabled()&&self.isPinned()&&!self._isWithinScrollBoundaries(scrollTop)&&!headerAbovePosition){self._states.sticky_auto_hide=(self.getScrollDirection()==='down');self.$container.toggleClass('down',self._states.sticky_auto_hide)}
if(!self.isFixed()){return}
var headerAttachedFirstSection=['bottom','below'].includes(self.getHeaderInitialPos());if(self.isHorizontal()&&(headerAbovePosition||(headerAttachedFirstSection&&(self.currentStateIs('tablets')||self.currentStateIs('mobiles')))||!headerAttachedFirstSection)){if(self.stickyEnabled()){var scrollBreakpoint=parseInt(((self.settings[self.state]||{}).options||{}).scroll_breakpoint)||100,isSticky=Math.ceil(scrollTop)>=scrollBreakpoint;if(isSticky!=self.isPinned()){self.trigger('changeSticky',isSticky)}}
if(self.isPinned()&&!_window.scrollY){self.trigger('changeSticky',!1)}}
if(self.isHorizontal()&&headerAttachedFirstSection&&!headerAbovePosition&&(self.currentStateIs('default')||self.currentStateIs('laptops'))){var top=($us.canvas.getHeightFirstSection()+self.adminBarHeight);if(self.getHeaderInitialPos()=='bottom'){top-=self.getInitHeight()}
if(self.stickyEnabled()){var isSticky=scrollTop>=top;if(isSticky!=self.isPinned()){self.trigger('changeSticky',isSticky)}}
if(!self.isPinned()&&top!=self.getOffsetTop()){self.$container.css('top',top)}}
if(self.isVertical()&&!headerAttachedFirstSection&&!headerAbovePosition&&self._states.vertical_scrollable){var headerHeight=self.getHeight(),documentHeight=parseInt($us.$document.height());if(documentHeight>headerHeight){var canvasHeight=parseInt($us.canvas.winHeight)+self.canvasOffset,scrollRangeDiff=(headerHeight-canvasHeight),cssProps;if(self._headerScrollRange===_undefined){self._headerScrollRange=[0,scrollRangeDiff]}
if(self.bodyHeight>headerHeight){if(scrollTop<self._headerScrollRange[0]){self._headerScrollRange[0]=Math.max(0,scrollTop);self._headerScrollRange[1]=(self._headerScrollRange[0]+scrollRangeDiff);cssProps={position:'fixed',top:self.adminBarHeight}}else if(self._headerScrollRange[0]<scrollTop&&scrollTop<self._headerScrollRange[1]){cssProps={position:'absolute',top:self._headerScrollRange[0]}}else if(self._headerScrollRange[1]<=scrollTop){self._headerScrollRange[1]=Math.min(documentHeight-canvasHeight,scrollTop);self._headerScrollRange[0]=(self._headerScrollRange[1]-scrollRangeDiff);cssProps={position:'fixed',top:(canvasHeight-headerHeight)}}}else{cssProps={position:'absolute',top:self.adminBarHeight,}}
if(cssProps){self.$container.css(cssProps)}}}},resize:function(){const self=this;self.canvasOffset=$us.$window.outerHeight()-$us.$window.innerHeight();self.bodyHeight=$us.$body.height();self.adminBarHeight=$us.getAdminBarHeight()||0;if(self.isFixed()&&self.isHorizontal()){self.$container.addClass('notransition');$ush.timeout(()=>self.$container.removeClass('notransition'),50)}
self._isVerticalScrollable();self.scroll()}});_window.USHeader=USHeader;$us.header=new USHeader($us.headerSettings||{})}(jQuery);!function($){var Horparallax=function(container,options){var that=this;this.$window=$(window);this.container=$(container);if(container.onclick!=undefined){options=$.extend({},container.onclick()||{},typeof options=='object'&&options);if(!$us.usbPreview())this.container.removeProp('onclick')}
options=$.extend({},$.fn.horparallax.defaults,typeof options=='object'&&options);this.options=options;this.bg=this.container.find(options.bgSelector);this.containerWidth=this.container.outerWidth();this.containerHeight=this.container.outerHeight();this.bgWidth=this.bg.outerWidth();this.windowHeight=this.$window.height();this._frameRate=Math.round(1000/this.options.fps);if(!('ontouchstart' in window)||!('DeviceOrientationEvent' in window)){this.container.on('mouseenter',(e)=>{var offset=that.container.offset(),coord=(e.pageX-offset.left)/that.containerWidth;that.cancel();that._hoverAnimation=!0;that._hoverFrom=that.now;that._hoverTo=coord;that.start(that._hoverTo)}).on('mousemove',(e)=>{if(that._lastFrame+that._frameRate>Date.now()){return}
var offset=that.container.offset(),coord=(e.pageX-offset.left)/that.containerWidth;if(that._hoverAnimation){that._hoverTo=coord;return}
that.set(coord);that._lastFrame=Date.now()}).on('mouseleave',()=>{that.cancel();that.start(that.options.basePoint)})}
this.$window.resize(function(){that.handleResize()});this._orientationDriven=('ontouchstart' in window&&'DeviceOrientationEvent' in window);if(this._orientationDriven){this._checkIfVisible();window.addEventListener("deviceorientation",function(e){if(!that.visible||that._lastFrame+that._frameRate>Date.now()){return}
that._deviceOrientationChange(e);that._lastFrame=Date.now()});this.$window.resize(()=>{that._checkIfVisible()});this.$window.on('scroll.noPreventDefault',()=>{that._checkIfVisible()})}
this.set(this.options.basePoint);this._lastFrame=Date.now()};Horparallax.prototype={_deviceOrientationChange:function(e){var gamma=e.gamma,beta=e.beta,x,y;switch(window.orientation){case-90:beta=Math.max(-45,Math.min(45,beta));x=(beta+45)/90;break;case 90:beta=Math.max(-45,Math.min(45,beta));x=(45-beta)/90;break;case 180:gamma=Math.max(-45,Math.min(45,gamma));x=(gamma+45)/90;break;case 0:default:if(gamma<-90||gamma>90){gamma=Math.abs(e.gamma)/e.gamma*(180-Math.abs(e.gamma))}
gamma=Math.max(-45,Math.min(45,gamma));x=(45-gamma)/90;break}
this.set(x)},handleResize:function(){this.containerWidth=this.container.outerWidth();this.containerHeight=this.container.outerHeight();this.bgWidth=this.bg.outerWidth();this.windowHeight=this.$window.height();this.set(this.now)},_checkIfVisible:function(){var scrollTop=this.$window.scrollTop(),containerTop=this.container.offset().top;this.visible=(containerTop+this.containerHeight>scrollTop&&containerTop<scrollTop+this.windowHeight)},set:function(x){this.bg.css('left',(this.containerWidth-this.bgWidth)*x);this.now=x;return this},compute:function(from,to,delta){if(this._hoverAnimation){return(this._hoverTo-this._hoverFrom)*delta+this._hoverFrom}
return(to-from)*delta+from},start:function(to){var from=this.now,that=this;this.container.css('delta',0).animate({delta:1},{duration:this.options.duration,easing:this.options.easing,complete:function(){that._hoverAnimation=!1},step:function(delta){that.set(that.compute(from,to,delta))},queue:!1});return this},cancel:function(){this._hoverAnimation=!1;this.container.stop(!0,!1);return this}};if($.easing.easeOutElastic==undefined){$.easing.easeOutElastic=function(x,t,b,c,d){var s=1.70158,p=0,a=c;if(t==0){return b}
if((t/=d)==1){return b+c}
if(!p){p=d*.3}
if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}
return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b}}
$.fn.horparallax=function(options){return this.each(function(){var $this=$(this),data=$this.data('horparallax');if(!data){$this.data('horparallax',(data=new Horparallax(this,options)))}})};$.fn.horparallax.defaults={fps:60,basePoint:.5,duration:500,bgSelector:'.l-section-img',easing:$us.getAnimationName('swing')};$.fn.horparallax.Constructor=Horparallax;$(function(){jQuery('.parallax_hor').horparallax()})}(jQuery);!function($,_undefined){"use strict";function usImageSlider(container){let self=this,$container=$(container),$frame=$('.w-slider-h',container),$royalSlider=$('.royalSlider',container),options={};if(!$.fn.royalSlider||$container.data('usImageSlider')){return}
let $jsonData=$('.w-slider-json',container);if($jsonData.length){$.extend(options,$jsonData[0].onclick()||{})}
$jsonData.remove();if($container.parent().hasClass('w-post-elm')){options.imageScaleMode='fill'}
options.usePreloader=!1;$royalSlider.royalSlider(options);let royalSlider=$royalSlider.data('royalSlider');if(options.fullscreen&&options.fullscreen.enabled){var rsEnterFullscreen=function(){$royalSlider.appendTo($us.$body);royalSlider.ev.off('rsEnterFullscreen',rsEnterFullscreen);royalSlider.ev.on('rsExitFullscreen',rsExitFullscreen);royalSlider.updateSliderSize()};royalSlider.ev.on('rsEnterFullscreen',rsEnterFullscreen);var rsExitFullscreen=function(){$royalSlider.prependTo($frame);royalSlider.ev.off('rsExitFullscreen',rsExitFullscreen);royalSlider.ev.on('rsEnterFullscreen',rsEnterFullscreen)}}
royalSlider.ev.on('rsAfterContentSet',function(){royalSlider.slides.forEach(function(slide){$(slide.content.find('img')[0]).attr('alt',slide.caption.attr('data-alt'))})});$us.$canvas.on('contentChange',function(){$royalSlider.parent().imagesLoaded(function(){royalSlider.updateSliderSize()})});self.royalSlider=royalSlider};$.fn.usImageSlider=function(){return this.each(function(){$(this).data('usImageSlider',new usImageSlider(this))})};$(()=>{$('.w-slider').usImageSlider()});$us.$document.on('usPostList.itemsLoaded usGrid.itemsLoaded',(_,$items)=>{$('.w-slider',$items).usImageSlider()})}(jQuery);!function($){"use strict";$us.WItext=function(container){var defaultOptions={html_nbsp_char:!0};this.$container=$(container);var $parts=this.$container.find('.w-itext-part');if($parts.length===0){return}
var options=$.extend(defaultOptions,this.$container[0].onclick()||{});if(!$us.usbPreview())this.$container.removeAttr('onclick');var type=this.$container.usMod('type');this.animateChars=(type.substring(type.length-'chars'.length).toLowerCase()==='chars');this.duration=parseInt(options.duration)||1000;this.delay=parseInt(options.delay)||5000;this.dynamicColor=(options.dynamicColor||'');this.disablePartAnimation=options.disablePartAnimation||!1;this.animateDurations=[];this.type=this.animateChars?type.substring(0,type.length-'chars'.length):type;this.nbsp_char=options.html_nbsp_char?'&nbsp;':' ';this.parts=[];$parts.css({transitionDuration:this.duration+'ms'}).each(function(index,part){var part={$node:$(part),currentState:0,states:part.onclick()||[]};if(!$us.usbPreview())part.$node.removeAttr('onclick');if(this.dynamicColor){part.$node.css('color',this.dynamicColor)}
this.parts[index]=part}.bind(this));var timer=$ush.timeout(function(){this.parts.map(function(part){this._events.startAnimate.call(this,part)}.bind(this));$ush.clearTimeout(timer)}.bind(this),this.delay)};$us.WItext.prototype={_events:{startAnimate:function(part){part.currentState=(part.currentState===part.states.length-1)?0:(part.currentState+1);this.render.call(this,part)},restartAnimate:function(part){$ush.timeout(this._events.startAnimate.bind(this,part),this.delay)},clearAnimation:function(part){var text=$ush.toString(part.states[part.currentState]).replace(' ',this.nbsp_char);part.$node.html(text).css('width','');if(this.type==='typing'&&text.trim()&&text!==this.nbsp_char){part.$node.append('<i class="w-itext-cursor"></i>')}
if(part.curDuration===Math.max.apply(null,this.animateDurations)){this.animateDurations=[];this.parts.map(function(_part){this._events.restartAnimate.call(this,_part)}.bind(this))}}},render:function(part){var nextValue=part.states[part.currentState],$curSpan=part.$node.wrapInner('<span></span>').children('span'),$nextSpan=$('<span class="measure"></span>').html(nextValue.replace(' ',this.nbsp_char)).appendTo(part.$node),nextWidth=$nextSpan.width(),outType='fadeOut',startDelay=0;part.curDuration=this.duration;if(this.type==='typing'){var oldValue=$curSpan.text().trim()+' ',removeDuration=Math.floor(part.curDuration/3);startDelay=Math.max.apply(null,[startDelay,(removeDuration*oldValue.length)]);for(var i=0;i<oldValue.length;i ++){$curSpan.text(oldValue);$ush.timeout(function(){var text=$curSpan.text();$curSpan.text(text.substring(0,text.length-1))}.bind(this),removeDuration*i)}}
$ush.timeout(function(){part.$node.addClass('notransition');if(!this.disablePartAnimation){part.$node.css('width',part.$node.width())}
$ush.timeout(function(){part.$node.removeClass('notransition');if(!this.disablePartAnimation){part.$node.css('width',nextWidth)}}.bind(this),25);if(this.type!=='typing'){$curSpan.css({position:'absolute',top:0,left:0,width:!this.disablePartAnimation?nextWidth:'',transitionDuration:(this.duration/5)+'ms'}).addClass('animated_'+outType)}
if(!this.disablePartAnimation){$nextSpan.css('width',nextWidth)}
$nextSpan.removeClass('measure').prependTo(part.$node);if(this.animateChars){$nextSpan.empty();if(this.type==='typing'){$nextSpan.append('<span class="w-itext-part-nospan"></span>')}
for(var i=0;i<nextValue.length;i ++){var $char=((nextValue[i]!==' ')?nextValue[i]:this.nbsp_char);if(this.type!=='typing'){$char=$('<span>'+$char+'</span>');$char.css('transition-duration',part.curDuration+'ms').appendTo($nextSpan);$char.appendTo($nextSpan)}
$ush.timeout(function($char){if(this.type!=='typing'){$char.addClass('animated_'+this.type)}else{var $text=$('> span:first',$nextSpan);$text.html($text.html()+$char)}}.bind(this,$char),part.curDuration*i)}
if(this.type==='typing'&&$ush.toString(nextValue).trim()&&nextValue!==this.nbsp_char){$nextSpan.append('<i class="w-itext-cursor"></i>')}
part.curDuration*=(nextValue.length+1)}else{$nextSpan.wrapInner('<span></span>').children('span').css({'animation-duration':this.duration+'ms'}).addClass('animated_'+this.type)}
this.animateDurations.push(part.curDuration);$ush.timeout(this._events.clearAnimation.bind(this,part),part.curDuration+Math.floor(this.delay/3))}.bind(this),startDelay)}};$.fn.wItext=function(options){return this.each(function(){$(this).data('wItext',new $us.WItext(this,options))})};$(function(){$('.w-itext').wItext()})}(jQuery);!function($){"use strict";$us.WLogin=function(container,options){this.init(container,options)};$us.WLogin.prototype={init:function(container,options){this.$container=$(container);if(this.$container.data('loginInit')==1){return}
this.$container.data('loginInit',1);this.$submitBtn=this.$container.find('.w-btn');this.$username=this.$container.find('.for_text input[type="text"]');this.$password=this.$container.find('.for_password input[type="password"]');this.$preloader=this.$container.siblings('.g-preloader');this.$nonceVal=this.$container.find('#us_login_nonce').val();this.$resultField=this.$container.find('.w-form-message');this.$jsonContainer=this.$container.find('.w-form-json');this.jsonData=this.$jsonContainer[0].onclick()||{};this.$jsonContainer.remove();this.ajaxUrl=this.jsonData.ajaxurl||'';this.loginRedirect=this.jsonData.login_redirect||'';this.logoutRedirect=this.jsonData.logout_redirect||window.location.href;this.use_ajax=!!this.jsonData.use_ajax;this._events={formSubmit:this.formSubmit.bind(this)};this.$container.on('submit',this._events.formSubmit);if(this.use_ajax){$.ajax({type:'post',url:this.ajaxUrl,data:{action:'us_ajax_user_info',logout_redirect:this.logoutRedirect},success:function(result){if(result.success){this.$container.closest('.w-login').html(result.data)}else{this.$container.removeClass('hidden')}
this.$preloader.addClass('hidden')}.bind(this)})}},formSubmit:function(event){event.preventDefault();if(this.$submitBtn.hasClass('loading')){return}
this.$resultField.usMod('type',!1).html('');this.$container.find('.w-form-row.check_wrong').removeClass('check_wrong');this.$container.find('.w-form-state').html('');if(this.$container.find('.for_text input[type="text"]').val()==''){this.$username.closest('.w-form-row').toggleClass('check_wrong');return}
this.$submitBtn.addClass('loading');$.ajax({type:'post',url:this.ajaxUrl,dataType:'json',data:{action:'us_ajax_login',username:this.$username.val(),password:this.$password.val(),us_login_nonce:this.$nonceVal},success:function(result){if(result.success){document.location.href=this.loginRedirect}else{if(result.data.code=='invalid_username'){var $rowLog=this.$username.closest('.w-form-row');$rowLog.toggleClass('check_wrong');$rowLog.find('.w-form-row-state').html(result.data.message?result.data.message:'')}else if(result.data.code=='incorrect_password'||result.data.code=='empty_password'){var $rowPwd=this.$password.closest('.w-form-row');$rowPwd.toggleClass('check_wrong');$rowPwd.find('.w-form-row-state').html(result.data.message?result.data.message:'')}else{this.$resultField.usMod('type','error').html(result.data.message)}
this.$submitBtn.removeClass('loading')}}.bind(this),})}};$.fn.wUsLogin=function(options){return this.each(function(){$(this).data('wUsLogin',new $us.WLogin(this,options))})};$(function(){$('.w-login > .w-form').wUsLogin()})}(jQuery);!function($,_undefined){"use strict";window.$us=window.$us||{};$us.mobileNavOpened=0;const SLIDE_DURATION=250;function usNav(container){const self=this;self.$container=$(container);if(self.$container.length===0){return}
self.$items=$('.menu-item',self.$container);self.$list=$('.w-nav-list.level_1',self.$container);self.$anchors=$('.w-nav-anchor',self.$container);self.$arrows=$('.w-nav-arrow',self.$container);self.$mobileMenu=$('.w-nav-control',self.$container);self.$itemsHasChildren=$('.menu-item-has-children',self.$list);self.$childLists=$('.menu-item-has-children > .w-nav-list',self.$list);self.$reusableBlocksLinks=$('.menu-item-object-us_page_block a',self.$container);self.type=self.$container.usMod('type');self.layout=self.$container.usMod('layout');self.openDropdownOnClick=self.$container.hasClass('open_on_click');self.mobileNavOpened=!1;self.keyboardNavEvent=!1;self.opts={};self._events={closeMobileMenu:self.closeMobileMenu.bind(self),closeMobileMenuOnClick:self.closeMobileMenuOnClick.bind(self),closeMobileMenuOnFocusIn:self.closeMobileMenuOnFocusIn.bind(self),closeOnClickOutside:self.closeOnClickOutside.bind(self),handleKeyboardNav:self.handleKeyboardNav.bind(self),handleMobileClick:self.handleMobileClick.bind(self),resize:self.resize.bind(self),toggleMenuOnClick:self.toggleMenuOnClick.bind(self),toggleMobileMenu:self.toggleMobileMenu.bind(self),}
const $opts=$('.w-nav-options:first',self.$container);if($opts.is('[onclick]')){self.opts=$opts[0].onclick()||{};$opts.remove()}
self.$container.on('transitionend',()=>self.$container.removeClass('us_animate_this')).on('keydown.upsolution',self._events.handleKeyboardNav).on('click','.w-nav-close',self._events.closeMobileMenu).on('click','.w-nav-anchor, .w-hwrapper-link',self._events.closeMobileMenuOnClick).on('click','.w-nav-control',self._events.toggleMobileMenu).on('closeMobileMenu',self._events.closeMobileMenu);if(self.openDropdownOnClick){self.$container.on('click','.menu-item.togglable > .w-nav-anchor',self._events.toggleMenuOnClick);$us.$document.on('mouseup touchend.noPreventDefault',self._events.closeOnClickOutside)}
$us.$document.on('usHeader.update_view',self._events.resize);$us.$window.on('resize',$ush.debounce(self._events.resize,5));if($ush.isSafari){self.$mobileMenu.on('mouseup',()=>{self.$mobileMenu.attr('style','outline: none')})}
self.$reusableBlocksLinks.each((index,anchor)=>{if($(anchor).parents('.w-popup-wrap').length===0){self.$anchors.push(anchor)}});if($.isMobile&&self.type==='desktop'){self.$list.on('click','.w-nav-anchor[class*="level_"]',(e)=>{const $target=$(e.currentTarget);const $menuItem=$target.closest('.menu-item');if($target.usMod('level')>1&&!$menuItem.hasClass('menu-item-has-children')){$target.parents('.menu-item.opened').removeClass('opened')}})}
self.$itemsHasChildren.each((_,menuItem)=>{const $menuItem=$(menuItem);const $parent=$menuItem.closest('.menu-item');if($parent.length===0||$parent.usMod('columns')===!1){$menuItem.addClass('togglable')}
const $arrow=$('.w-nav-arrow:first',$menuItem);const $subAnchor=$('.w-nav-anchor:first',$menuItem);const dropByLabel=$menuItem.hasClass('mobile-drop-by_label')||$menuItem.parents('.menu-item').hasClass('mobile-drop-by_label');const dropByArrow=$menuItem.hasClass('mobile-drop-by_arrow')||$menuItem.parents('.menu-item').hasClass('mobile-drop-by_arrow');if(dropByLabel||(self.opts.mobileBehavior&&!dropByArrow)){$subAnchor.on('click',self._events.handleMobileClick)}else{$arrow.on('click',self._events.handleMobileClick);$arrow.on('click',self._events.handleKeyboardNav)}});if(!$us.$html.hasClass('no-touch')){self.$list.on('click','.menu-item-has-children.togglable > .w-nav-anchor',(e)=>{if(self.type==='mobile'){return}
e.preventDefault();const $target=$(e.currentTarget);const $menuItem=$target.parent();if($menuItem.hasClass('opened')){return location.assign($target.attr('href'))}
$menuItem.addClass('opened');const onOutsideClick=(e)=>{if($.contains($menuItem[0],e.target)){return}
$menuItem.removeClass('opened');$us.$body.off('touchstart',onOutsideClick)};$us.$body.on('touchstart.noPreventDefault',onOutsideClick)})}
$us.$document.on('keydown',(e)=>{if($ush.isSafari){self.$mobileMenu.removeAttr('style')}
if(e.keyCode===$ush.ESC_KEYCODE&&self.type==='mobile'&&self.mobileNavOpened){self.closeMobileMenu()}
if(e.keyCode===$ush.TAB_KEYCODE&&self.type==='desktop'&&!$(e.target).closest('.w-nav').length){self.$items.removeClass('opened')}});$ush.timeout(()=>{self.resize();$us.header.$container.trigger('contentChange')},50)};$.extend(usNav.prototype,{toggleMobileMenu:function(e){const self=this;e.preventDefault();self.mobileNavOpened=!self.mobileNavOpened;$us.$document.on('mouseup touchend.noPreventDefault',self._events.closeOnClickOutside);self.$anchors.each((_,node)=>{node.href=node.href||'javascript:void(0)'});if(self.mobileNavOpened){$('.l-header .w-nav').not(self.$container).each((_,node)=>{$(node).trigger('closeMobileMenu')});self.$mobileMenu.addClass('active').focus();self.$items.filter('.opened').removeClass('opened');self.$childLists.resetInlineCSS('display','height','opacity');if(self.layout==='dropdown'){self.$list.slideDownCSS(SLIDE_DURATION,()=>$us.header.$container.trigger('contentChange'))}
$us.$html.addClass('w-nav-open');self.$mobileMenu.attr('aria-expanded','true');$us.mobileNavOpened++;$us.$document.on('focusin',self._events.closeMobileMenuOnFocusIn)}else{self.closeMobileMenu()}
$us.$canvas.trigger('contentChange')},handleMobileClick:function(e){const self=this;if(self.type==='mobile'){e.stopPropagation();e.preventDefault();const $menuItem=$(e.currentTarget).closest('.menu-item');self.switchMobileSubMenu($menuItem,!$menuItem.hasClass('opened'))}},switchMobileSubMenu:function($menuItem,opened){const self=this;if(self.type!=='mobile'){return}
const $subMenu=$menuItem.children('.w-nav-list');if(opened){$menuItem.addClass('opened');$subMenu.slideDownCSS(SLIDE_DURATION,()=>$us.header.$container.trigger('contentChange'))}else{$menuItem.removeClass('opened');$subMenu.slideUpCSS(SLIDE_DURATION,()=>$us.header.$container.trigger('contentChange'))}},closeMobileMenuOnFocusIn:function(){const self=this;if(!$.contains(self.$container[0],document.activeElement)){self.closeMobileMenu()}},closeMobileMenu:function(){const self=this;if(self.type!=='mobile'){return}
self.mobileNavOpened=!1;self.$mobileMenu.removeClass('active');$us.$html.removeClass('w-nav-open');self.$mobileMenu.attr('aria-expanded','false');if(self.$list&&self.layout==='dropdown'){self.$list.slideUpCSS(SLIDE_DURATION)}
$us.mobileNavOpened--;self.$mobileMenu[0].focus();$us.$canvas.trigger('contentChange');$us.$document.off('focusin',self._events.closeMobileMenuOnFocusIn).off('mouseup touchend.noPreventDefault',self._events.closeOnClickOutside)},closeMobileMenuOnClick:function(e){const self=this;const $menuItem=$(e.currentTarget).closest('.menu-item');const dropByLabel=$menuItem.hasClass('mobile-drop-by_label')||$menuItem.parents('.menu-item').hasClass('mobile-drop-by_label');const dropByArrow=$menuItem.hasClass('mobile-drop-by_arrow')||$menuItem.parents('.menu-item').hasClass('mobile-drop-by_arrow');if(self.type!=='mobile'||$us.header.isVertical()){return}
if(dropByLabel||(self.opts.mobileBehavior&&$menuItem.hasClass('menu-item-has-children')&&!dropByArrow)){return}
self.closeMobileMenu()},});$.extend(usNav.prototype,{toggleMenuOnClick:function(e){const self=this;if(self.type==='mobile'){return}
const $menuItem=$(e.currentTarget).closest('.menu-item');const opened=!$menuItem.hasClass('opened');if(!self.keyboardNavEvent){e.preventDefault();e.stopPropagation()}else{return}
$menuItem.toggleClass('opened',opened);if(opened){self.closeOnMouseOver(e)}else{$('.menu-item-has-children.opened',$menuItem).removeClass('opened')}},closeOnClickOutside:function(e){const self=this;if(self.mobileNavOpened&&self.type==='mobile'){if(!self.$mobileMenu.is(e.target)&&!self.$mobileMenu.has(e.target).length&&!self.$list.is(e.target)&&!self.$list.has(e.target).length){self.closeMobileMenu()}}else if(self.$itemsHasChildren.hasClass('opened')&&!$.contains(self.$container[0],e.target)){self.$itemsHasChildren.removeClass('opened')}},closeOnMouseOver:function(e){const self=this;if(self.type==='mobile'){return}
const $target=$(e.target);const $itemHasChildren=$target.closest('.menu-item-has-children');const $menuItemLevel1=$target.closest('.menu-item.level_1');self.$itemsHasChildren.not($itemHasChildren).not($menuItemLevel1).removeClass('opened')},handleKeyboardNav:function(e){const self=this;const keyCode=e.keyCode||e.which;const $target=$(e.target);const $menuItem=$target.closest('.menu-item');const $menuItemLevel1=$target.closest('.menu-item.level_1');const $itemHasChildren=$target.closest('.menu-item-has-children');if(self.type==='mobile'){if([$ush.ENTER_KEYCODE,$ush.SPACE_KEYCODE].includes(keyCode)&&$target.is(self.$arrows)){e.stopPropagation();e.preventDefault();self.switchMobileSubMenu($menuItem,!$menuItem.hasClass('opened'))}
if(keyCode===$ush.TAB_KEYCODE){if(e.shiftKey&&self.$anchors.index($target)===0){self.closeMobileMenu()}}}
if(self.type==='desktop'){if([$ush.ENTER_KEYCODE,$ush.SPACE_KEYCODE].includes(keyCode)&&$target.is(self.$arrows)){e.preventDefault();self.$itemsHasChildren.off('mouseover',self._events.closeOnMouseOver).one('mouseover',self._events.closeOnMouseOver);if(!$itemHasChildren.hasClass('opened')){$itemHasChildren.addClass('opened').siblings().removeClass('opened');self.$itemsHasChildren.not($itemHasChildren).not($menuItemLevel1).removeClass('opened');self.$arrows.attr('aria-expanded','false');$target.attr('aria-expanded','true')}else{$itemHasChildren.removeClass('opened');$target.attr('aria-expanded','false')}}
if(keyCode===$ush.ESC_KEYCODE){if($menuItemLevel1.hasClass('opened')){$('.w-nav-arrow:first',$menuItemLevel1).focus()}
self.$items.removeClass('opened');self.$arrows.attr('aria-expanded','false')}
self.keyboardNavEvent=!0;$ush.timeout(()=>{self.keyboardNavEvent=!1},1)}},resize:function(){const self=this;if(self.$container.length===0){return}
const newType=(window.innerWidth<self.opts.mobileWidth)?'mobile':'desktop';if($us.header.orientation!==self.headerOrientation||newType!==self.type){self.$childLists.resetInlineCSS('display','height','opacity');if(self.headerOrientation==='hor'&&self.type==='mobile'){self.$list.resetInlineCSS('display','height','opacity')}
self.$items.removeClass('opened');self.headerOrientation=$us.header.orientation;self.type=newType;self.$container.usMod('type',newType)}
self.$list.removeClass('hide_for_mobiles')},});$.fn.usNav=function(){return this.each(function(){$(this).data('usNav',new usNav(this))})};$('.l-header .w-nav').usNav()}(jQuery);(function($){"use strict";$.fn.usMessage=function(){return this.each(function(){var $this=$(this),$closer=$this.find('.w-message-close');$closer.click(function(){$this.wrap('<div></div>');var $wrapper=$this.parent();$wrapper.css({overflow:'hidden',height:$this.outerHeight(!0)});$wrapper.performCSSTransition({height:0},300,function(){$wrapper.remove();$us.$canvas.trigger('contentChange')},'cubic-bezier(.4,0,.2,1)')})})};$(function(){$('.w-message').usMessage()})})(jQuery);!function($,undefined){"use strict";var _document=document,_window=window,_null=null;_window.$us=_window.$us||{};const _REGEXP_EXTRACT_COORDINATES_=/^(-?[\d\.]+),(-?[\d\.]+)$/;$us.wLmaps=function(container,options){var self=this;self.$container=$(container);if(self.$container.data('_inited')){return}
self.$container.data('_inited',1);self._mapInstance=_null;self.cookieName=self.$container.data('cookie-name');self.options=options||{};self._events={confirmInit:self._confirmInit.bind(self),redraw:self._redraw.bind(self)};if(self.cookieName){self.$container.on('click','.action_confirm_load',self._events.confirmInit);return}
self._init()};$.extend($us.wLmaps.prototype,{_confirmInit:function(){var self=this;if($('input[name^='+self.cookieName+']:checked',self.$container).length){$ush.setCookie(self.cookieName,1,365)}
self.$container.html($ush.base64Decode($('script[type="text/template"]',self.$container).text())).removeAttr('data-cookie-name');self._init()},_init:function(){var self=this;var $mapJson=$('.w-map-json',self.$container);if($mapJson.is('[onclick]')){$.extend(self.options,$mapJson[0].onclick()||{});$mapJson.remove()}
$us.$canvas.on('contentChange',self._events.redraw);self._beforeRender()},_beforeRender:function(){var self=this,address=(''+self.options.address),matches=$ush.removeSpaces(address).match(_REGEXP_EXTRACT_COORDINATES_);if(matches){self.center=[matches[1],matches[2]];self._render()}else{self._geocoder(address)}},_render:function(){var self=this,mapId=self.$container.attr('id'),lmapsOptions={center:self.center,zoom:self.options.zoom};if(self.options.hideControls){lmapsOptions.zoomControl=!1}
if(self.options.disableZoom){lmapsOptions.scrollWheelZoom=!1}
self._mapInstance=L.map(mapId,lmapsOptions);L.tileLayer(self.options.style,{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(self._mapInstance);self._renderMarkers();if($us.usbPreview()||self.options.disableDragging&&!$us.$html.hasClass('no-touch')){self._mapInstance.dragging.disable()}},_geocoder:function(text,markerOptions,popup){var self=this,osmUrl='https://nominatim.openstreetmap.org/search?format=json&limit=1&q='+encodeURI(text);$.getJSON(osmUrl,$.noop).done(function(json){if(!json.length){return}
var boundingBox=json[0].boundingbox;if(!markerOptions){self.center=[boundingBox[1],boundingBox[3]];self._render()}else{self.marker=L.marker([boundingBox[1],boundingBox[3]],markerOptions).addTo(self._mapInstance);if(popup){self.marker.bindPopup(popup)}}})},_redraw:function(){var self=this;if(!self._mapInstance||self.$container.is(':hidden')){return}
$ush.timeout(self._mapInstance.invalidateSize.bind(self._mapInstance,!0),100)},_renderMarkers:function(){var self=this;if(!self.options.markers.length){return}
var mainOptions={};for(var i=0;i<self.options.markers.length;i++){var item=self.options.markers[i];if(i==0){if(self.options.icon!=_null){var mainMarkerSizes=self.options.icon.size[0],markerImg=L.icon({iconUrl:self.options.icon.url,iconSize:mainMarkerSizes,});markerImg.options.iconAnchor=[mainMarkerSizes/2,mainMarkerSizes];markerImg.options.popupAnchor=[0,-mainMarkerSizes];mainOptions.icon=markerImg}
var marker=L.marker(self.center,mainOptions).addTo(self._mapInstance);if(item.html){if(item.infowindow){marker.bindPopup(item.html).openPopup()}else{marker.bindPopup(item.html)}}}else{var markerOptions={};if(item.marker_img!=_null){var markerSizes=item.marker_size[0],markerImg=L.icon({iconUrl:item.marker_img[0],iconSize:markerSizes,});markerImg.options.iconAnchor=[markerSizes/2,markerSizes];markerImg.options.popupAnchor=[0,-markerSizes];markerOptions.icon=markerImg}else{markerOptions=mainOptions}
var matches=$ush.removeSpaces(item.address).match(_REGEXP_EXTRACT_COORDINATES_);if(matches){self.marker=L.marker([matches[1],matches[2]],markerOptions).addTo(self._mapInstance);if(item.html){self.marker.bindPopup(item.html)}}else{self._geocoder(item.address,markerOptions,item.html)}}}}});$.fn.wLmaps=function(options){options=options||{};return this.each(function(){this._wLmaps=new $us.wLmaps(this,$ush.clone(options))})};$(function(){$('.w-map.provider_osm').wLmaps()})}(jQuery);(function($,_undefined){"use strict";const _window=window;const _document=document;const __debounce_fn_500ms=$ush.debounce($ush.fn,500);$us.PageScroller=function(container,options){this.init(container,options)};$us.PageScroller.prototype={init:function(container,options){var defaults={coolDown:100,animationDuration:1000,animationEasing:$us.getAnimationName('easeInOutExpo'),endAnimationEasing:$us.getAnimationName('easeOutExpo'),};this.options=$.extend({},defaults,options);this.$container=$(container);this.activeSection=0;this.sections=[];this.initialSections=[];this.hiddenSections=[];this.currHidden=[];this.dots=[];this.scrolls=[];this.usingDots=!1;this.footerReveal=$us.$body.hasClass('footer_reveal');this.isTouch=(('ontouchstart' in _window)||(navigator.msMaxTouchPoints>0)||(navigator.maxTouchPoints));this.disableWidth=(this.$container.data('disablewidth')!==_undefined)?this.$container.data('disablewidth'):768;this.hiddenClasses={'uvc_hidden-xs':[0,479],'uvc_hidden-xsl':[480,767],'uvc_hidden-sm':[768,991],'uvc_hidden-md':[992,1199],'uvc_hidden-ml':[1200,1823],'uvc_hidden-lg':[1824,99999],'vc_hidden-xs':[0,767],'vc_hidden-sm':[768,991],'vc_hidden-md':[992,1199],'vc_hidden-lg':[1200,99999],};if(this.$container.data('speed')!==_undefined){this.options.animationDuration=this.$container.data('speed')}
this._events={destroy:this._destroy.bind(this),mouseWheelHandler:this._mouseWheelHandler.bind(this),resize:this.resize.bind(this),scroll:this.scroll.bind(this)};this._attachEvents();this.$container.on('usb.removeHtml',this._events.destroy)
$us.$canvas.on('contentChange',$ush.debounce(this._events.resize,5));var _resize=$ush.debounce(this._events.resize,50);$us.$window.on('scroll.noPreventDefault',$ush.debounce(this._events.scroll,5)).on('resize',(_,stopExecute)=>{if(!stopExecute){_resize()}});$ush.timeout(this._init.bind(this),100)},is_popup:function(){return $us.$html.hasClass('us_popup_is_opened')},_add_dynamic_breakpoints:function(){var custom_breakpoints=$us.responsiveBreakpoints,default_breakpoints={'hide_on_mobiles':[0,767],'hide_on_tablets':[768,991],'hide_on_laptops':[992,1199],'hide_on_default':[1200,99999],};if(custom_breakpoints){default_breakpoints={'hide_on_mobiles':[0,custom_breakpoints.mobiles],'hide_on_tablets':[(custom_breakpoints.mobiles+1),custom_breakpoints.tablets],'hide_on_laptops':[(custom_breakpoints.tablets+1),custom_breakpoints.laptops],'hide_on_default':[(custom_breakpoints.laptops+1),9999]}}
this.hiddenClasses=Object.assign(this.hiddenClasses,default_breakpoints)},_init:function(){if($us.header.isStatic()&&$us.header.isHorizontal()&&!$us.header.isTransparent()){$us.canvas.$header.each(function(){var $section=$us.canvas.$header,section={$section:$section,area:'header',};this._countPosition(section);this.sections.push(section);this.initialSections.push(section)}.bind(this))}
this._add_dynamic_breakpoints();$('.l-main > .l-section, .l-footer > .l-section',$us.$canvas).each(function(key,elm){var $section=$(elm),section={$section:$section,hiddenBoundaries:[],area:'content',isSticky:$section.hasClass('type_sticky')},addedWidths=[];hidden:for(var i in this.hiddenClasses){if(this.hiddenClasses.hasOwnProperty(i)){var low=this.hiddenClasses[i][0],high=this.hiddenClasses[i][1];if($section.hasClass(i)){var addedWidthLength=addedWidths.length,j;addedWidths.push([low,high]);for(j=0;j<addedWidthLength;j ++){if(addedWidths[j][0]===low&&addedWidths[j][1]===high){break hidden}}
section.hiddenBoundaries.push([low,high]);if(this.hiddenSections.indexOf(key)===-1){this.hiddenSections.push(key)}}}}
this._countPosition(section,key);this.sections.push(section);this.initialSections.push(section)}.bind(this));this.lastContentSectionIndex=this.sections.length-1;$('.l-footer > .l-section').each(function(key,elm){var $section=$(elm),section={$section:$section,area:'footer',isSticky:$section.hasClass('type_sticky')};this._countPosition(section,key);this.sections.push(section);this.initialSections.push(section)}.bind(this));$ush.timeout(this.resize.bind(this),100);this.$dotsContainer=this.$container.find('.w-scroller-dots');if(this.$dotsContainer.length){this.usingDots=!0;this.$firstDot=this.$dotsContainer.find('.w-scroller-dot').first();this.redrawDots(!0);this.scroll()}},_destroy:function(){var self=this;$us.$document.off('mousewheel DOMMouseScroll MozMousePixelScroll');_document.removeEventListener('mousewheel',self._events.mouseWheelHandler);_document.removeEventListener('DOMMouseScroll',self._events.mouseWheelHandler);_document.removeEventListener('MozMousePixelScroll',self._events.mouseWheelHandler);$us.$canvas.off('touchstart touchmove')},isSectionHidden:function(section){if(!this.initialSections[section].hiddenBoundaries||!this.initialSections[section].hiddenBoundaries.length){return!1}
var currWidth=_window.innerWidth,isHidden=!1;for(var i=0;i<this.initialSections[section].hiddenBoundaries.length;i ++){var low=this.initialSections[section].hiddenBoundaries[i][0],high=this.initialSections[section].hiddenBoundaries[i][1];if(currWidth>=low&&currWidth<=high){isHidden=!0;break}}
return isHidden},redrawDots:function(inited){if(!this.usingDots||!this.$dotsContainer||!this.$dotsContainer.length){return!1}
this.$dotsContainer.html('');for(var i=0;i<this.sections.length;i ++){if(this.sections[i].area==='footer'&&!this.$container.data('footer-dots')){continue}
this.$firstDot.clone().appendTo(this.$dotsContainer)}
this.$dots=this.$dotsContainer.find('.w-scroller-dot');this.$dots.each(function(key,elm){var $dot=$(elm);this.dots[key]=$dot;$dot.click(function(){this.scrollTo(key);this.$dots.removeClass('active');$dot.addClass('active')}.bind(this)).toggleClass('hidden',this.sections[key].isSticky&&$us.$window.width()>$us.canvas.options.columnsStackingWidth)}.bind(this));if(!!inited&&this.dots[this.activeSection]){this.dots[this.activeSection].addClass('active')}
this.$dotsContainer.addClass('show')},recountSections:function(){if(this.currHidden){for(var initialSection in this.initialSections){this.sections[initialSection]=this.initialSections[initialSection]}}
for(var i=this.hiddenSections.length-1;i>=0;i --){var indexOfTheItem=this.currHidden.indexOf(this.hiddenSections[i]);if(this.isSectionHidden(this.hiddenSections[i])){if(indexOfTheItem===-1){this.currHidden.push(this.hiddenSections[i])}
this.sections.splice(this.hiddenSections[i],1)}else{this.currHidden.splice(indexOfTheItem,1)}}
this.redrawDots(!0)},getScrollSpeed:function(number){var sum=0,lastElements=this.scrolls.slice(Math.max(this.scrolls.length-number,1));for(var i=0;i<lastElements.length;i ++){sum=sum+lastElements[i]}
return Math.ceil(sum/number)},_mouseWheelHandler:function(e){var self=this;if($us.usbPreview()||self.is_popup()){return}
e.preventDefault();var currentTime=new Date().getTime(),target=self.activeSection,direction=e.wheelDelta||-e.detail,speedEnd,speedMiddle,isAccelerating;if(self.scrolls.length>149){self.scrolls.shift()}
self.scrolls.push(Math.abs(direction));if((currentTime-self.previousMouseWheelTime)>self.options.coolDown){self.scrolls=[]}
self.previousMouseWheelTime=currentTime;speedEnd=self.getScrollSpeed(10);speedMiddle=self.getScrollSpeed(70);isAccelerating=speedEnd>=speedMiddle;if(isAccelerating){if(direction<0){target ++}else if(direction>0){target --}
if(self.sections[target]===_undefined){return}
self.scrollTo(target);self.lastScroll=currentTime}},_attachEvents:function(){var self=this;self._destroy();if($us.$window.width()>self.disableWidth&&$us.mobileNavOpened<=0&&(!$us.$html.hasClass('cloverlay_fixed'))){_document.addEventListener('mousewheel',self._events.mouseWheelHandler,{passive:!1});_document.addEventListener('DOMMouseScroll',self._events.mouseWheelHandler,{passive:!1});_document.addEventListener('MozMousePixelScroll',self._events.mouseWheelHandler,{passive:!1});if($.isMobile||self.isTouch){$us.$canvas.on('touchstart.noPreventDefault',(event)=>{var e=event.originalEvent;if(typeof e.pointerType==='undefined'||e.pointerType!=='mouse'){self.touchStartY=e.touches[0].pageY}});$us.$canvas.on('touchmove',function(event){event.preventDefault();var currentTime=new Date().getTime(),e=event.originalEvent,target=self.activeSection;self.touchEndY=e.touches[0].pageY;if(Math.abs(self.touchStartY-self.touchEndY)>($us.$window.height()/50)){if(self.touchStartY>self.touchEndY){target ++}else if(self.touchEndY>self.touchStartY){target --}
if(self.sections[target]===_undefined){return}
self.scrollTo(target);self.lastScroll=currentTime}})}}},_countPosition:function(section,key){section.top=section.$section.offset().top-$us.canvas.getOffsetTop();if(this.footerReveal&&section.area==='footer'&&key!==_undefined){if(_window.innerWidth>parseInt($us.canvasOptions.columnsStackingWidth)-1){if(this.sections[key-1]!==_undefined&&this.sections[key-1].area==='footer'){section.top=this.sections[key-1].bottom}else{var rowIndex=(this.sections[this.lastContentSectionIndex+key]!==_undefined)?this.lastContentSectionIndex+key:key-1;section.top=this.sections[rowIndex].bottom}}}
section.bottom=section.top+section.$section.outerHeight(!1)},_countAllPositions:function(){var counter=0;for(var section in this.sections){if(this.sections[section].$section.length){this._countPosition(this.sections[section],counter)}
counter ++}},scrollTo:function(target){var currentTime=new Date().getTime();if(this.previousScrollTime!==_undefined&&(currentTime-this.previousScrollTime<this.options.animationDuration)){return}
this.previousScrollTime=currentTime;if(this.sections[target].isSticky&&$us.$window.width()>$us.canvas.options.columnsStackingWidth){if(target>this.activeSection){target+=1}else{target-=1}}
if(this.usingDots){this.$dots.removeClass('active');if(this.dots[target]!==_undefined){this.dots[target].addClass('active')}}
var top=Math.ceil(this.sections[target].top||0);if(top===Math.ceil($us.header.getScrollTop())){return}
var animateOptions={duration:this.options.animationDuration,easing:this.options.animationEasing,start:function(){this.isScrolling=!0}.bind(this),always:function(){this.isScrolling=!1;this.activeSection=target}.bind(this),step:function(now,fx){var newTop=top;if($us.header.stickyEnabled()){newTop-=$us.header.getCurrentHeight(!0)}
if(fx.end!==newTop){$us.$htmlBody.stop(!0,!1).animate({scrollTop:newTop},$.extend(animateOptions,{easing:this.options.endAnimationEasing}))}}.bind(this)};$us.$htmlBody.stop(!0,!1).animate({scrollTop:top},animateOptions)},resize:function(e){if(this.is_popup()){return!1}
this._attachEvents();this.recountSections();$ush.timeout(this._countAllPositions.bind(this),150)},scroll:function(){if(this.is_popup()){return!1}
var currentTime=new Date().getTime();if((currentTime-this.lastScroll)<(this.options.coolDown+this.options.animationDuration)){return}
__debounce_fn_500ms(function(){var scrollTop=$ush.parseInt($us.$window.scrollTop());if($us.header.isPinned()){scrollTop+=$us.header.getCurrentHeight(!0)}
for(var index in this.sections){var section=this.sections[index];if(scrollTop>=$ush.parseInt(section.top-1)&&scrollTop<$ush.parseInt(section.bottom-1)&&section.area==='content'&&this.activeSection!==index){this.activeSection=index}}
if(this.usingDots){this.$dots.removeClass('active');if(this.dots[this.activeSection]!==_undefined){this.dots[this.activeSection].addClass('active')}}}.bind(this))}};$.fn.usPageScroller=function(options){return this.each(function(){$(this).data('usPageScroller',new $us.PageScroller(this,options))})};$(function(){$ush.timeout(function(){$('.w-scroller').usPageScroller()},0)})})(jQuery);!function($){"use strict";if($('.l-preloader').length){$('document').ready(function(){$ush.timeout(function(){$('.l-preloader').addClass('done')},500);$ush.timeout(function(){$('.l-preloader').addClass('hidden')},1000)})}}(jQuery);!function($,_undefined){"use strict";var _originalUrl;$us.wPopup=function(container){const self=this;self.$container=$(container);self.$content=$('.w-popup-box-content',self.$container);self.$closer=$('.w-popup-closer',self.$container);self._events={show:self.show.bind(self),afterShow:self.afterShow.bind(self),hide:self.hide.bind(self),hideOnLinkClick:self.hideOnLinkClick.bind(self),afterHide:self.afterHide.bind(self),keyup:(e)=>{if(e.keyCode===$ush.ESC_KEYCODE){self.hide();self.$trigger[0].focus()}},scroll:()=>{$us.$document.trigger('scroll')},touchmove:(e)=>{self.savePopupSizes();if((self.popupSizes.wrapHeight>self.popupSizes.contentHeight)||$(e.target).closest('.w-popup-box').length===0){e.preventDefault()}},tabFocusTrap:self.tabFocusTrap.bind(self)};self.isDesktop=!jQuery.isMobile;self.forListItem=self.$container.hasClass('for_list-item');self.transitionEndEvent=(navigator.userAgent.search(/webkit/i)>0)?'webkitTransitionEnd':'transitionend';self.$trigger=$('.w-popup-trigger',self.$container);self.triggerType=self.$trigger.usMod('type');self.triggerOptions=$ush.toPlainObject(self.$trigger.data('options'));if(self.triggerType==='load'){let _timeoutHandle;if(self.$container.css('display')!=='none'){const delay=$ush.parseInt(self.triggerOptions.delay);_timeoutHandle=$ush.timeout(self.show.bind(self),delay*1000)}
self.$container.on('usb.refreshedEntireNode',()=>{if(_timeoutHandle){$ush.clearTimeout(_timeoutHandle)}
self.$overlay.remove();self.$wrap.remove()})}else if(self.triggerType==='selector'){const selector=self.$trigger.data('selector');if(selector){$us.$body.on('click',selector,self._events.show)}}else{self.$trigger.on('click',self._events.show)}
self.$wrap=$('.w-popup-wrap',self.$container).on('click',self._events.hide);self.$box=$('.w-popup-box',self.$container);self.$overlay=$('.w-popup-overlay',self.$container);self.$closer.on('click',self._events.hide);self.$wrap.on('click','a',self._events.hideOnLinkClick);self.$media=$('video,audio',self.$box);self.$wVideos=$('.w-video',self.$box);self.timer=null;self.ajaxData={action:'us_list_item_popup_content',};if(self.forListItem&&self.$container.is('[onclick]')){$.extend(self.ajaxData,self.$container[0].onclick()||{});self.ajaxData.post_id=self.$container.parents('.w-grid-item').attr('data-id');self.$container.removeAttr('onclick')}
self.popupSizes={wrapHeight:0,contentHeight:0,}};$us.wPopup.prototype={isKeyboardUsed:function(e){return e&&e.pointerType!=='mouse'&&e.pointerType!=='touch'&&e.pointerType!=='pen'},show:function(e){const self=this;if(e!==_undefined){e.preventDefault()}
if(self.$content.is(':empty')){$ush.timeout(self.loadListItemPopupContent.bind(self))}
if(self.triggerType==='load'&&!$us.usbPreview()){const uniqueId=$ush.toString(self.triggerOptions.uniqueId),cookieName='us_popup_'+uniqueId;if(uniqueId){if($ush.getCookie(cookieName)!==null){return}
const daysUntilNextShow=$ush.parseFloat(self.triggerOptions.daysUntilNextShow);$ush.setCookie(cookieName,'shown',daysUntilNextShow||365)}}
$ush.clearTimeout(self.timer);self.$overlay.appendTo($us.$body).show();self.$wrap.appendTo($us.$body).css('display','flex');if(!self.isDesktop){self.$wrap.on('touchmove',self._events.touchmove);$us.$document.on('touchmove',self._events.touchmove)}
$us.$body.on('keyup',self._events.keyup);self.$wrap.on('scroll.noPreventDefault',self._events.scroll);self.timer=$ush.timeout(self._events.afterShow,25);$us.$document.on('keydown.usPopup',self._events.tabFocusTrap);$us.$document.trigger('usPopupOpened',[self.$container]);if(e){self.$closer[0].focus({preventScroll:!0})}},afterShow:function(){const self=this;$ush.clearTimeout(self.timer);self.$overlay.addClass('active');self.$box.addClass('active');if(window.$us!==_undefined&&$us.$canvas!==_undefined){$us.$canvas.trigger('contentChange',{elm:self.$container})}
if(self.$wVideos.length){self.$wVideos.each((_,wVideo)=>{const $wVideoSource=$('[data-src]',wVideo);const $videoTag=$wVideoSource.parent('video');const src=$wVideoSource.data('src');if(!src){return}
$wVideoSource.attr('src',src);if($videoTag.length>0){$videoTag[0].load()}})}
$us.$window.trigger('resize').trigger('us.wpopup.afterShow',self)},loadListItemPopupContent:function(){const self=this;if(!self.forListItem){return}
self.$content.html('<div class="g-preloader type_1"></div>');$.ajax({url:$us.ajaxUrl,type:'POST',dataType:'json',data:self.ajaxData,success:(response)=>{if(response.success&&response.data){self.$content.html(response.data)}},})},hide:function(e){const self=this;if(e&&$(e.target).closest(self.$box).length&&!$(e.target).hasClass('w-popup-closer')){return}
$ush.clearTimeout(self.timer);$us.$body.off('keyup',self._events.keyup);self.$overlay.on(self.transitionEndEvent,self._events.afterHide);self.$overlay.removeClass('active');self.$box.removeClass('active');self.$wrap.off('scroll.noPreventDefault',self._events.scroll);$us.$document.off('touchmove',self._events.touchmove);self.timer=$ush.timeout(self._events.afterHide,1000);$us.$document.off('keydown.usPopup');if(self.isKeyboardUsed(e)){self.$trigger[0].focus()}},hideOnLinkClick:function(event){const self=this;const $item=$(event.currentTarget);const place=$item.attr('href');if((place.indexOf('#')===-1)||(place!=='#'&&place.indexOf('#')===0&&$(place,self.$wrap).length>0)){return}
self.hide()},afterHide:function(){const self=this;$ush.clearTimeout(self.timer);self.$overlay.off(self.transitionEndEvent,self._events.afterHide);self.$overlay.appendTo(self.$container).hide();self.$wrap.appendTo(self.$container).hide();$us.$document.trigger('usPopupClosed');$us.$window.trigger('resize',!0).trigger('us.wpopup.afterHide',self);if(self.$media.length>0){self.$media.trigger('pause')}
if(self.$wVideos.length){self.$wVideos.each((_,wVideo)=>{const $wVideoSource=$(wVideo).find('[src]');if(!$wVideoSource.data('src')){$wVideoSource.attr('data-src',$wVideoSource.attr('src'))}
$wVideoSource.attr('src','')})}},savePopupSizes:function(){const self=this;self.popupSizes.wrapHeight=self.$wrap.height();self.popupSizes.contentHeight=self.$content.outerHeight(!0)},tabFocusTrap:function(e,$wrap,$popupCloser,triggerElm){const self=this;self.$wrap=$wrap||self.$wrap;self.$closer=$popupCloser||self.$closer;if(self.$wrap.hasClass('l-popup')){$us.$document.on('usPopupClosed',()=>{triggerElm.focus()})}
if(e.keyCode!==$ush.TAB_KEYCODE){return}
const focusableSelectors=['a[href]','area[href]','input:not([disabled])','select:not([disabled])','textarea:not([disabled])','button:not([disabled])','iframe','object','embed','[tabindex]:not([tabindex="-1"])','[contenteditable]','video[controls] source'].join();const $focusable=$(focusableSelectors,self.$wrap).filter((_,node)=>{if($(node).is('video[controls], source')){return!0}
return $(node).is(':visible')});if(!$focusable.length){e.preventDefault();self.$closer[0].focus();return}
const firstElement=$focusable.first()[0];const lastElement=$focusable.last()[0];const target=e.target;if(!$.contains(self.$wrap[0],target)&&$us.$html.hasClass('us_popup_is_opened')&&!$(target).hasClass('w-popup-closer')){e.preventDefault();if(e.shiftKey){lastElement.focus()}else{firstElement.focus()}
return}
if(e.shiftKey&&target===firstElement){e.preventDefault();lastElement.focus()}else if(!e.shiftKey&&target===lastElement){e.preventDefault();firstElement.focus()}}};$.extend($us.wPopup.prototype,{popupPost:function(gridList){if(!gridList.hasClass('open_items_in_popup')){return}
const self=this;self.gridList=gridList;self.$popupPost=$('.l-popup',gridList);self.$popupPostBox=$('.l-popup-box',self.$popupPost);self.$popupPostFrame=$('.l-popup-box-content-frame',self.$popupPost);self.$popupPostToPrev=$('.l-popup-arrow.to_prev',self.$popupPost);self.$popupPostToNext=$('.l-popup-arrow.to_next',self.$popupPost);self.$popupPostCloser=$('.l-popup-closer',self.$popupPost);self.$list=$('.w-grid-list',gridList);$.extend(self._events,{closePostInPopup:self.closePostInPopup.bind(self),closePostInPopupByEsc:self.closePostInPopupByEsc.bind(self),loadPostInPopup:self.loadPostInPopup.bind(self),navInPopup:self.navInPopup.bind(self),openPostInPopup:self.openPostInPopup.bind(self),setPostInPopup:self.setPostInPopup.bind(self)});$us.$body.append(self.$popupPost);self.$list.on('click','.w-grid-item:not(.custom-link) .w-grid-item-anchor',self._events.openPostInPopup);self.$popupPostFrame.on('load',self._events.loadPostInPopup);self.$popupPost.on('click','.l-popup-arrow',self._events.navInPopup).on('click','.l-popup-closer, .l-popup-box',self._events.closePostInPopup)},setPostInPopup:function(index){const self=this;var $node=$('> *:eq('+$ush.parseInt(index)+')',self.$list);if(self.gridList.hasClass('type_carousel')){$node=$('.owl-item:eq('+$ush.parseInt(index)+')',self.$list)}
const url=$ush.toString($('[href]:first',$node).attr('href'));if(!url){console.error('No url to loaded post');return}
const $prev=$node.prev(':not(.custom-link)');const $next=$node.next(':not(.custom-link)');var pageTemplate=self.$popupPostBox.data('page-template');pageTemplate=pageTemplate?`&us_popup_page_template=${pageTemplate}`:'';self.$popupPostToPrev.data('index',$prev.index()).attr('title',$('.post_title',$prev).text()).toggleClass('hidden',!$prev.length);self.$popupPostToNext.data('index',$next.index()).attr('title',$('.post_title',$next).text()).toggleClass('hidden',!$next.length);self.$popupPostBox.addClass('loading');self.$popupPostBox.off('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');self.$popupPostFrame.attr('src',url+(url.includes('?')?'&':'?')+'us_iframe=1'+pageTemplate);history.replaceState(null,null,url)},openPostInPopup:function(e){const self=this;if($us.$window.width()<=$us.canvasOptions.disableEffectsWidth){return}
e.stopPropagation();e.preventDefault();if(!_originalUrl){_originalUrl=location.href}
if(self.gridList.hasClass('type_carousel')){self.setPostInPopup($(e.target).closest('.owl-item').index())}else{self.setPostInPopup($(e.target).closest('.w-grid-item').index())}
self.$popupPost.addClass('active');self.$popupPostBox.addClass('loading');$us.$document.trigger('usPopupOpened',[self.$popupPost,self.$popupPostCloser,e.target]);$ush.timeout(()=>{self.$popupPostBox.addClass('show')},25)},loadPostInPopup:function(){const self=this;self.$popupPost.on('keyup.usCloseLightbox',self._events.closePostInPopupByEsc);$('body',self.$popupPostFrame.contents()).on('keyup.usCloseLightbox',self._events.closePostInPopupByEsc)},navInPopup:function(e){this.setPostInPopup($(e.target).data('index'))},closePostInPopup:function(){const self=this;self.$popupPost.addClass('closing');self.$popupPostFrame.attr('src','about:blank');self.$popupPostBox.removeClass('show').one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd',$ush.debounce(()=>{self.$popupPost.removeClass('active closing');self.$popupPostToPrev.addClass('hidden');self.$popupPostToNext.addClass('hidden');$us.$document.trigger('usPopupClosed')},1));self.$popupPost.off('keyup.usCloseLightbox');if(_originalUrl){history.replaceState(null,null,_originalUrl)}},closePostInPopupByEsc:function(e){const self=this;if(e.keyCode===$ush.ESC_KEYCODE&&self.$popupPost.hasClass('active')){self.closePostInPopup()}},});$.fn.wPopup=function(options){return this.each(function(){$(this).data('wPopup',new $us.wPopup(this,options))})};$(()=>$('.w-popup').wPopup());$us.$document.on('usPostList.itemsLoaded usGrid.itemsLoaded',(_,$items)=>{$('.w-popup',$items).wPopup()});$us.$document.on('usPopupOpened',(event,$popup,$popupCloser,triggerElm)=>{if($popup.hasClass('l-popup')){if(event){$popupCloser[0].focus({preventScroll:!0})}
$us.$document.on('keydown.usPopup',(e)=>{$us.wPopup.prototype.tabFocusTrap(e,$popup,$popupCloser,triggerElm)})}});$us.$document.on('usPopupClosed',()=>{$us.$document.off('keydown.usPopup')})}(jQuery);(function($,_undefined){"use strict";const DELETE_FILTER=null;function usPostList(container){const self=this;self.data={paged:1,max_num_pages:1,paginationBase:'page',pagination:'none',ajaxUrl:$us.ajaxUrl,ajaxData:{us_ajax_list_pagination:1,},facetedFilter:{},};self.listResultCounterOpts=[];self.xhr;self.$container=$(container);self.$list=$('.w-grid-list',container);self.$loadmore=$('.g-loadmore',container);self.$pagination=$('nav.pagination',container);self.$none=self.$container.next('.w-grid-none');self.$listResultCounter=$('.w-list-result-counter');self.isCurrentQuery=self.$container.hasClass('for_current_wp_query');const $opts=$('.w-grid-list-json:first',container);if($opts.is('[onclick]')){$.extend(self.data,$opts[0].onclick()||{})}
$opts.remove();self.paginationType=$ush.toString(self.data.pagination);self.hideIsEmpty=self.$container.closest('.hide_if_inner_list_is_empty').length>0;self._events={addNextPage:self._addNextPage.bind(self),initMagnificPopup:self._initMagnificPopup.bind(self),usListOrder:self._usListOrder.bind(self),usListSearch:self._usListSearch.bind(self),usListFilter:self._usListFilter.bind(self),usbReloadIsotopeLayout:self.usbReloadIsotopeLayout.bind(self),};if(self.$listResultCounter.length&&self.isCurrentQuery){self.$listResultCounter.each((_,node)=>{const $node=$(node);if($node.is('[onclick]')){self.listResultCounterOpts.push(node.onclick()||{});$node.removeAttr('onclick')}});const numAjaxParams=Object.keys($ush.urlManager(self.data.ajaxUrl).toJson(!1)).length;if(self.paginationType==='none'){$.each(self.listResultCounterOpts,(index,opts)=>{self.countResult($('> *',self.$list).length,!1,opts,index)})}
if(self.paginationType==='numbered'){if(!(numAjaxParams<1)){$.each(self.listResultCounterOpts,(index,opts)=>{self.countResult(self.data.ajaxData.found_posts,!1,opts,index)})}}else if(!(numAjaxParams<=1)){const total=(self.paginationType==='none')?$('> *',self.$list).length:self.data.ajaxData.found_posts;$.each(self.listResultCounterOpts,(index,opts)=>{self.countResult(total,!1,opts,index)})}}
if(self.paginationType==='load_on_btn'){self.$loadmore.on('mousedown','button',self._events.addNextPage)}else if(self.paginationType==='load_on_scroll'){$us.waypoints.add(self.$loadmore,'-70%',self._events.addNextPage)}
self.$container.add(self.$none).on('usListSearch',self._events.usListSearch).on('usListOrder',self._events.usListOrder).on('usListFilter',self._events.usListFilter);self.$list.on('click','[ref=magnificPopup]',self._events.initMagnificPopup)
if(self.$container.hasClass('open_items_in_popup')){new $us.wPopup().popupPost(self.$container)}
if(self.$container.hasClass('type_masonry')){self.$list.imagesLoaded(()=>{const isotopeOptions={itemSelector:'.w-grid-item',layoutMode:(self.$container.hasClass('isotope_fit_rows'))?'fitRows':'masonry',isOriginLeft:!$('.l-body').hasClass('rtl'),transitionDuration:0};var columnWidth;if($('.size_1x1',self.$list).length>0){columnWidth='.size_1x1'}else if($('.size_1x2',self.$list).length>0){columnWidth='.size_1x2'}else if($('.size_2x1',self.$list).length>0){columnWidth='.size_2x1'}else if($('.size_2x2',self.$list).length>0){columnWidth='.size_2x2'}
if(columnWidth){columnWidth=columnWidth||'.w-grid-item';isotopeOptions.masonry={columnWidth:columnWidth}}
self.$list.on('layoutComplete',()=>{if(_window.USAnimate){$('.w-grid-item.off_autostart',self.$list).removeClass('off_autostart');new USAnimate(self.$list)}
$us.$window.trigger('scroll.waypoints')});self.$list.isotope(isotopeOptions);$us.$canvas.on('contentChange',()=>{self.$list.imagesLoaded(()=>{self.$list.isotope('layout')})})});self.$container.on('usbReloadIsotopeLayout',self._events.usbReloadIsotopeLayout)}}
$.extend(usPostList.prototype,{_usListSearch:function(e,name,value){this.applyFilter(name,value)},_usListOrder:function(e,name,value){this.applyFilter(name,value)},_usListFilter:function(e,values){const self=this;$.each(values,self.applyFilter.bind(self))},_addNextPage:function(){const self=this;if($ush.isUndefined(self.xhr)&&!self.$none.is(':visible')){self.addItems()}},applyFilter:function(name,value){const self=this;if($ush.toString(value)=='{}'){value=DELETE_FILTER}
if(name==='list_filters'){$.extend(value,JSON.parse(self.data.ajaxData[name]||'{}'));self.data.ajaxData[name]=JSON.stringify(value);return}
const pathname=location.pathname;const PAGINATION_PAGE_PATTERN=new RegExp(`\/${self.data.paginationBase}\/?([0-9]{1,})\/?$`);if(PAGINATION_PAGE_PATTERN.test(pathname)){history.pushState({},'',location.href.replace(pathname,pathname.replace(PAGINATION_PAGE_PATTERN,'')+'/'))}
self.data.paged=0;if(self.isCurrentQuery){self.data.ajaxUrl=$ush.urlManager(self.data.ajaxUrl).set(name,value).toString()}else if(value===DELETE_FILTER){delete self.data.ajaxData[name]}else{self.data.ajaxData[name]=value}
if(!$ush.isUndefined(self.xhr)){self.xhr.abort()}
self.addItems(!0)},scrollToList:function(){const self=this;if(self.data.paged>1){return}
const offsetTop=$ush.parseInt(self.$container.offset().top);if(!offsetTop){return}
const scrollTop=$us.$window.scrollTop();if(!$ush.isNodeInViewport(self.$container[0])||offsetTop>=(scrollTop+window.innerHeight)||scrollTop>=offsetTop){$us.$htmlBody.stop(!0,!1).animate({scrollTop:(offsetTop-$us.header.getInitHeight())},500)}},addItems:function(applyFilter){const self=this;self.data.paged+=1;if(!applyFilter&&self.data.paged>self.data.max_num_pages){return}
if(applyFilter){self.$container.addClass('filtering');if(self.$container.hasClass('preload_style_spinner')){self.$loadmore.removeClass('hidden').addClass('loading')}}else{self.$loadmore.removeClass('hidden').addClass('loading')}
if(!self.hideIsEmpty){self.$container.removeClass('hidden')}
self.$pagination.addClass('hidden');var ajaxUrl=$ush.toString(self.data.ajaxUrl),ajaxData=$ush.clone(self.data.ajaxData),numPage=$ush.rawurlencode('{num_page}');if(ajaxUrl.includes(numPage)){ajaxUrl=ajaxUrl.replace(numPage,self.data.paged)}else if(ajaxData.template_vars){ajaxData.template_vars=JSON.stringify(ajaxData.template_vars);ajaxData.paged=self.data.paged}
self.xhr=$.ajax({type:'post',url:ajaxUrl,dataType:'html',cache:!1,data:ajaxData,success:(html)=>{if(applyFilter){self.$list.html('');self.$none.addClass('hidden')}
var $listJson=$('.w-grid-list-json:first',html);if($listJson.is('[onclick]')){if($listJson[0].onclick===null){$listJson[0].onclick=new Function($listJson.attr('onclick'))}
$.extend(!0,self.data,$listJson[0].onclick()||{})}
var $items=$('.w-grid-list:first > *',html);const numAjaxParams=Object.keys($ush.urlManager(self.data.ajaxUrl).toJson(!1)).length;var filterIsClear=numAjaxParams<=1;if(self.paginationType==='numbered'){filterIsClear=numAjaxParams<1}
$ush.timeout(()=>{$us.$document.trigger('usPostList.itemsLoaded',[$items,applyFilter])},50);if(self.hideIsEmpty){self.$container.toggleClass('hidden',$items.length===0)}
if(!$items.length){if(!self.$none.length){self.$none=$('.w-grid-none:first',html);if(!self.$none.length){self.$none=$(html).filter('.w-grid-none:first')}
self.$container.after(self.$none)}
self.$container.removeClass('filtering');self.$loadmore.addClass('hidden');self.$pagination.addClass('hidden');self.$none.removeClass('hidden');$.each(self.listResultCounterOpts,(index,opts)=>{self.countResult($('> *',self.$list).length,!1,opts,index)});return}
if(self.$container.hasClass('type_masonry')){self.$list.isotope('insert',$items).isotope('reloadItems')}else{self.$list.append($items)}
if(window.USAnimate&&self.$container.hasClass('with_css_animation')){new USAnimate(self.$list);$us.$window.trigger('scroll.waypoints')}
if(self.paginationType=='numbered'){const $pagination=$('nav.pagination',html);if($pagination.length&&!self.$pagination.length){self.$list.after($pagination.prop('outerHTML'));self.$pagination=self.$list.next('nav.pagination')}
if(self.$pagination.length&&$pagination.length){self.$pagination.html($pagination.html()).removeClass('hidden')}else{self.$pagination.addClass('hidden')}}
if(self.data.paged>=self.data.max_num_pages){self.$loadmore.addClass('hidden');self.$none.addClass('hidden')}else{self.$loadmore.removeClass('hidden')}
if(self.paginationType=='load_on_scroll'){$us.waypoints.add(self.$loadmore,'-70%',self._events.addNextPage)}
$.each(self.listResultCounterOpts,(index,opts)=>{const foundPosts=(self.paginationType==='none')?$('> *',self.$list).length:self.data.ajaxData.found_posts;self.countResult(foundPosts,filterIsClear,opts,index)});$us.$canvas.trigger('contentChange')},complete:()=>{self.$container.removeClass('filtering');self.$loadmore.removeClass('loading');if(self.paginationType==='load_on_scroll'){self.$loadmore.addClass('hidden')}
delete self.xhr;self.scrollToList()}})},countResult:function(total,filterIsClear=!1,opts,index){const self=this;if(!self.$listResultCounter.length||!self.isCurrentQuery||$us.usbPreview()){return}
const $listResultCounter=self.$listResultCounter.eq(index);const totalUnfiltered=opts.totalUnfiltered;const perPage=opts.perPage;$listResultCounter.show();total=filterIsClear?totalUnfiltered:total;var lower=1;if(['load_on_scroll','load_on_btn'].includes(self.paginationType)){lower=1}else{lower=(self.data.paged-1)*perPage+1}
var upper=1;if(self.paginationType==='none'){upper=$('> *',self.$list).length}else{upper=Math.min(total,self.data.paged*perPage)}
var formattedText='';if(total===1){formattedText=opts.textSingle}else if(total===0){if(opts.textNoResults){formattedText=opts.textNoResults}else{$listResultCounter.hide()}}else{formattedText=$ush.toString(opts.text).replace('[lower]',lower).replace('[upper]',upper).replace('[total]',total).replace('[total_unfiltered]',totalUnfiltered)}
$listResultCounter.text(formattedText)},usbReloadIsotopeLayout:function(){const self=this;if(self.$container.hasClass('with_isotope')){self.$list.isotope('layout')}},});$.extend(usPostList.prototype,{_initMagnificPopup:function(e){e.stopPropagation();e.preventDefault();const $target=$(e.currentTarget);if($target.data('magnificPopup')===_undefined){$target.magnificPopup({type:'image',mainClass:'mfp-fade'});$target.trigger('click')}},});$.fn.usPostList=function(){return this.each(function(){$(this).data('usPostList',new usPostList(this))})};$(()=>$('.w-grid.us_post_list, .w-grid.us_product_list').usPostList())})(jQuery);!function($,_undefined){"use strict";const DELETE_FILTER=null;const urlManager=$ush.urlManager();const urlParam='_s';function usListSearch(container){const self=this;self._events={searchTextChanged:self.searchTextChanged.bind(self),formSubmit:self.formSubmit.bind(self),};self.$container=$(container);self.$input=$('input',container);self.$pageContent=$('main#page-content');self.$message=$('.w-search-message',container);self.name=self.$input.attr('name');self.listSelector=$ush.toString(self.$container.data('selector')).trim();if(self.changeURLParams()){let urlValue=urlManager.get(urlParam);if(!$ush.isUndefined(urlValue)){self.$input.val(urlValue)}}
self.$container.on('input','input',$ush.throttle(self._events.searchTextChanged,300,!1)).on('click','buttom',self._events.searchTextChanged).on('submit','form',self._events.formSubmit);$us.$document.on('keypress',(e)=>{if(self.$input.is(':focus')&&e.keyCode===$ush.ENTER_KEYCODE){e.preventDefault();self.searchTextChanged(e)}})}
$.extend(usListSearch.prototype,{changeURLParams:function(){return this.$container.hasClass('change_url_params')},formSubmit:function(e){e.preventDefault();this.searchTextChanged(e)},searchTextChanged:function(e){const self=this;var $listToSearch;if(self.listSelector){$listToSearch=$(self.listSelector,self.$pageContent)}else{$listToSearch=$(`
.w-grid.us_post_list:visible,
.w-grid.us_product_list:visible,
.w-grid-none:visible
`,self.$pageContent).first()}
if($listToSearch.hasClass('w-grid')){self.$message.addClass('hidden').text('');$listToSearch.addClass('used_by_list_search')}else if(!$listToSearch.hasClass('w-grid-none')){self.$message.html('No suitable list found. Add <b>Post List</b> or <b>Product List</b> elements.').removeClass('hidden')}
if(e.type==='input'&&!self.$container.hasClass('live_search')){return}
let value=self.$input.val();if(value===''){value=DELETE_FILTER}
if(value===self.lastValue){return}
self.lastValue=value;if(self.changeURLParams()){urlManager.set(urlParam,value).push()}
$listToSearch.trigger('usListSearch',[urlParam,value])}});$.fn.usListSearch=function(){return this.each(function(){$(this).data('usListSearch',new usListSearch(this))})};$(()=>{$('.w-search.for_list').usListSearch()})}(jQuery);!function($,_undefined){"use strict";const DELETE_FILTER=null;const urlManager=$ush.urlManager();const urlParam='_orderby';function usListOrder(container){const self=this;self._events={selectChanged:self._selectChanged.bind(self),};self.$container=$(container);self.$pageContent=$('main#page-content');if(self.changeURLParams()){let urlValue=urlManager.get(urlParam);if(!$ush.isUndefined(urlValue)){$('select',container).val(urlValue)}}
self.$container.on('change','select',self._events.selectChanged)}
$.extend(usListOrder.prototype,{changeURLParams:function(){return this.$container.hasClass('change_url_params')},_selectChanged:function(e){const self=this;const $firstList=$(`
.w-grid.us_post_list:visible,
.w-grid.us_product_list:visible,
.w-grid-none:visible
`,self.$pageContent).first();if($firstList.hasClass('w-grid')){$firstList.addClass('used_by_list_order')}
let value=e.target.value;if(value===''){value=DELETE_FILTER}
if(value===self.lastValue){return}
self.lastValue=value;if(self.changeURLParams()){urlManager.set(urlParam,value).push()}
$firstList.trigger('usListOrder',[urlParam,value])}});$.fn.usListOrder=function(){return this.each(function(){$(this).data('usListOrder',new usListOrder(this))})};$(()=>{$('.w-order.for_list').usListOrder()})}(jQuery);!function($,_undefined){"use strict";const abs=Math.abs;const max=Math.max;const min=Math.min;const urlManager=$ush.urlManager();const PREFIX_FOR_URL_PARAM='_';const FACETED_PARAM='_f';const RANGE_VALUES_BY_DEFAULT=[0,1000];const DELETE_FILTER=null;function parseValues(values){values=$ush.toString(values);if(!values||!values.includes('-')){return RANGE_VALUES_BY_DEFAULT}
return values.split('-').map($ush.parseFloat)}
function usListFilter(container){const self=this;self._events={applyFilterToList:$ush.debounce(self.applyFilterToList.bind(self),1),checkScreenStates:$ush.debounce(self.checkScreenStates.bind(self),10),closeMobileVersion:self.closeMobileVersion.bind(self),getItemValues:$ush.debounce(self.getItemValues.bind(self),0),hideItemDropdown:self.hideItemDropdown.bind(self),openMobileVersion:self.openMobileVersion.bind(self),resetItemValues:self.resetItemValues.bind(self),searchItemValues:self.searchItemValues.bind(self),toggleItemSection:self.toggleItemSection.bind(self),navUsingKeyPress:$ush.debounce(self.navUsingKeyPress.bind(self),0),};self.$container=$(container);self.$pageContent=$('main#page-content');if(!self.isVisible()){return}
self.$titles=$('.w-filter-item-title',self.$container);self.$listCloser=$('.w-filter-list-closer',self.$container);self.$opener=$('.w-filter-opener',self.$container);self.data={mobileWidth:600,listSelectorToFilter:null,ajaxData:{},};self.filters={};self.result={};self.lastResult;self.xhr;self.isFacetedFiltering=self.$container.hasClass('faceted_filtering');self.hidePostCount=self.$container.hasClass('hide_post_count');if(self.$container.is('[onclick]')){$.extend(self.data,self.$container[0].onclick()||{})}
$('.type_date_picker',self.$container).each((_,filter)=>{var $start=$('input:eq(0)',filter),$end=$('input:eq(1)',filter),$startContainer=$start.parent(),$endContainer=$start.parent(),startOptions={},endOptions={};if($startContainer.is('[onclick]')){startOptions=$startContainer[0].onclick()||{}}
if($endContainer.is('[onclick]')){endOptions=$endContainer[0].onclick()||{}}
$start.datepicker($.extend(!0,{isRTL:$ush.isRtl(),dateFormat:$start.data('date-format'),beforeShow:(_,inst)=>{inst.dpDiv.addClass('for_list_filter')},onSelect:()=>{$start.trigger('change')},onClose:(_,inst)=>{$end.datepicker('option','minDate',inst.input.datepicker('getDate')||null)},},startOptions));$end.datepicker($.extend(!0,{isRTL:$ush.isRtl(),dateFormat:$end.data('date-format'),beforeShow:(_,inst)=>{inst.dpDiv.addClass('for_list_filter')},onSelect:()=>{$start.trigger('change')},onClose:(_,inst)=>{$start.datepicker('option','maxDate',inst.input.datepicker('getDate')||null)},},endOptions))});$('.type_range_slider',self.$container).each((_,filter)=>{function showFormattedResult(_,ui){$('.for_min_value, .for_max_value',filter).each((i,node)=>{$(node).html(self.numberFormat(ui.values[i],opts))})}
const $slider=$('.ui-slider',filter);var opts={slider:{animate:!0,min:RANGE_VALUES_BY_DEFAULT[0],max:RANGE_VALUES_BY_DEFAULT[1],range:!0,step:10,values:RANGE_VALUES_BY_DEFAULT,slide:showFormattedResult,change:showFormattedResult,stop:$ush.debounce((_,ui)=>{$('input[type=hidden]',filter).val(ui.values.join('-')).trigger('change')}),},unitFormat:'%d',numberFormat:null,};if($slider.is('[onclick]')){opts=$.extend(!0,opts,$slider[0].onclick()||{})}
$slider.removeAttr('onclick').slider(opts.slider).fixSlider();$(filter).data('opts',opts)});$('[data-name]',self.$container).each((_,filter)=>{const $filter=$(filter);const compare=$ush.toString($filter.data('value-compare'));var name=$filter.data('name');if(compare){name+=`|${compare}`}
self.filters[name]=$filter});if(self.changeURLParams()){self.setupFields();urlManager.on('popstate',()=>{self.setupFields();self.applyFilterToList()})}
if(self.isFacetedFiltering){self._events.itemsLoaded=(_,$items,applyFilter)=>{if(applyFilter&&self.isVisible()){self.setPostCount(self.firstListData().facetedFilter.post_count)}};$us.$document.on('usPostList.itemsLoaded',self._events.itemsLoaded);var listFilters={};$.each(self.filters,(name,$filter)=>{listFilters[name]=$ush.toString($filter.usMod('type'))});self.listToFilter().trigger('usListFilter',{list_filters:listFilters});self.$container.addClass('loading');const data=$.extend(!0,{list_filters:JSON.stringify(listFilters),_s:urlManager.get('_s'),},self.firstListData().facetedFilter,self.result,self.data.ajaxData);data[FACETED_PARAM]=1;self.xhr=$.ajax({type:'post',url:$us.ajaxUrl,dataType:'json',cache:!1,data:data,success:(res)=>{if(!res.success){console.error(res.data.message)}
self.setPostCount(res.success?res.data:{})},complete:()=>{self.$container.removeClass('loading')}})}
else if(!self.isFacetedFiltering&&urlManager.has(FACETED_PARAM,'1')){urlManager.remove(FACETED_PARAM).push()}
$('.w-filter-item',self.$container).on('change','input:not([name=search_values]), select',self._events.getItemValues).on('input change','input[name=search_values]',self._events.searchItemValues).on('click','.w-filter-item-reset',self._events.resetItemValues).on('click','.w-filter-item-title',self._events.toggleItemSection);self.$container.on('mouseup','.w-filter-opener',self._events.openMobileVersion).on('mouseup','.w-filter-list-closer, .w-filter-button-submit',self._events.closeMobileVersion).on('keydown',self._events.navUsingKeyPress);$us.$window.on('resize',self._events.checkScreenStates);if(self.titlesAsDropdowns()){$us.$document.on('click',self._events.hideItemDropdown)}
self.on('applyFilterToList',self._events.applyFilterToList);self.checkScreenStates();self.сheckActiveFilters()}
$.extend(usListFilter.prototype,$ush.mixinEvents,{titlesAsToggles:function(){return this.$container.hasClass('mod_toggle')},titlesAsDropdowns:function(){return this.$container.hasClass('mod_dropdown')},changeURLParams:function(){return this.$container.hasClass('change_url_params')},isVisible:function(){const self=this;if(self.$container.parents('.w-tabs-section')){return!0}
return this.$container.is(':visible')},setupFields:function(){const self=this;$.each(self.filters,(name,$filter)=>{self.resetFields($filter);name=PREFIX_FOR_URL_PARAM+name;if(!urlManager.has(name)){delete self.result[name];return}
var values=$ush.toString(urlManager.get(name));values.split(',').map((value,i)=>{if($filter.hasClass('type_dropdown')){$(`select`,$filter).val(value)}else if($filter.hasClass('type_date_picker')){var $input=$(`input:eq(${i})`,$filter);if($input.length&&/\d{4}-\d{2}-\d{2}/.test(value)){$input.val($.datepicker.formatDate($input.data('date-format'),$.datepicker.parseDate('yy-mm-dd',value)))}}else if($filter.hasClass('type_range_input')){if(/([\.?\d]+)-([\.?\d]+)/.test(value)){$('input',$filter).each((i,input)=>{input.value=parseValues(value)[i]})}}else if($filter.hasClass('type_range_slider')){if(!self.isFacetedFiltering&&/([\.?\d]+)-([\.?\d]+)/.test(value)){$('.ui-slider',$filter).slider('values',parseValues(value));$(`input[type=hidden]`,$filter).val(value)}}else{$(`input[value="${value}"]`,$filter).prop('checked',!0)}});self.result[name]=values;$filter.addClass('has_value').toggleClass('expand',self.titlesAsToggles()&&self.$container.hasClass('layout_ver'))});self.showSelectedValues()},searchItemValues:function(e){const $filter=$(e.delegateTarget);const $items=$('[data-value]',$filter);const value=$ush.toLowerCase(e.target.value).trim();$items.filter((_,node)=>{return!$('input',node).is(':checked')}).toggleClass('hidden',!!value);if($filter.hasClass('type_radio')){const $buttonAnyValue=$('[data-value="*"]:first',$filter);if(!$('input',$buttonAnyValue).is(':checked')){$buttonAnyValue.toggleClass('hidden',!$ush.toLowerCase($buttonAnyValue.text()).includes(value))}}
if(value){$items.filter((_,node)=>{return $ush.toLowerCase($(node).text()).includes(value)}).removeClass('hidden').length}
$('.w-filter-item-message',$filter).toggleClass('hidden',$items.is(':visible'))},getItemValues:function(e){const self=this;const $filter=$(e.target).closest('.w-filter-item');const compare=$filter.data('value-compare');var name=PREFIX_FOR_URL_PARAM+$ush.toString($filter.data('name')),value=e.target.value,isExpand;if(compare){name+=`|${compare}`}
if($filter.hasClass('type_checkbox')){var values=[];$('input:checked',$filter).each((_,input)=>{values.push(input.value)});if(!values.length){self.result[name]=DELETE_FILTER}else{self.result[name]=values.toString()}}else if($filter.hasClass('type_date_picker')){var values=[];$('input.hasDatepicker',$filter).each((i,input)=>{values[i]=$.datepicker.formatDate('yy-mm-dd',$(input).datepicker('getDate'))});if(!values.length){self.result[name]=DELETE_FILTER}else{self.result[name]=values.toString()}}else if($filter.hasClass('type_range_input')){var defaultValues=[],values=[];$('input',$filter).each((i,input)=>{defaultValues[i]=input.dataset.value;values[i]=input.value||defaultValues[i]});if(!values.length||values.toString()===defaultValues.toString()){self.result[name]=DELETE_FILTER}else{self.result[name]=values.join('-')}}else{if($ush.rawurldecode(value)==='*'){self.result[name]=DELETE_FILTER}else{self.result[name]=value}}
const hasValue=!!self.result[name];$filter.toggleClass('has_value',hasValue);if(self.isFacetedFiltering){$filter.siblings().addClass('loading')}
self.trigger('applyFilterToList');self.showSelectedValues()},listToFilter:function(){const self=this;var $lists;if(self.data.listSelectorToFilter){$lists=$(self.data.listSelectorToFilter,self.$pageContent)}else{$lists=$(`
.w-grid.us_post_list:visible,
.w-grid.us_product_list:visible,
.w-grid-none:visible
`,self.$pageContent).first();if(!$lists.length){$lists=$(`
.w-tabs-section .w-grid.us_post_list,
.w-tabs-section .w-grid.us_product_list,
.w-tabs-section .w-grid-none
`,self.$pageContent).first()}}
if($lists.hasClass('w-grid-none')){$lists=$lists.prev()}
return $lists},firstListData:function(){return $ush.toPlainObject((this.listToFilter().first().data('usPostList')||{}).data)},numberFormat:function(value,options){const self=this;const defaultOpts={unitFormat:'%d',numberFormat:null,};value=$ush.toString(value);options=$.extend(defaultOpts,$ush.toPlainObject(options));if(options.numberFormat){var numberFormat=$ush.toPlainObject(options.numberFormat),decimals=$ush.parseInt(abs(numberFormat.decimals));if(decimals){value=$ush.toString($ush.parseFloat(value).toFixed(decimals)).replace(/^(\d+)(\.)(\d+)$/,'$1'+numberFormat.decimal_separator+'$3')}
value=value.replace(/\B(?=(\d{3})+(?!\d))/g,numberFormat.thousand_separator)}
return $ush.toString(options.unitFormat).replace('%d',value)},setPostCount:function(data){const self=this;if(!$.isPlainObject(data)){data={}}
$.each(self.filters,(filterName,filter)=>{const $filter=$(filter);const currentData=$ush.clone(data[filterName.split('|',1)[0]]||{});const isRangeType=$filter.hasClass('type_range_slider')||$filter.hasClass('type_range_input');if($filter.hasClass('range_by_year')&&!isRangeType){for(const k in currentData){const year=$ush.toString(k).substring(0,4);currentData[year]=$ush.parseInt(currentData[year])+currentData[k]}}
var numActiveValues=0;if($filter.hasClass('type_checkbox')||$filter.hasClass('type_radio')){const compare=$filter.data('value-compare');$('[data-value]',filter).each((_,node)=>{const $node=$(node);const value=$node.data('value');if($filter.hasClass('type_radio')&&value==='*'){return}
var postCount=0;if(compare=='between'){const rangeValues=value.split('-').map($ush.parseFloat);$.each(data[filterName.split('|')[0]]||{},(val,count)=>{if(val>=rangeValues[0]&&val<=rangeValues[1]){postCount+=count}})}else{postCount=$ush.parseInt(currentData[value])}
if(postCount){numActiveValues++}
$node.toggleClass('disabled',postCount===0).data('post-count',postCount).find('.w-filter-item-value-amount').text(postCount);$('input',$node).prop('disabled',postCount===0)})}else if($filter.hasClass('type_dropdown')){$('.w-filter-item-value-select option',filter).each((_,node)=>{const $node=$(node);const $formattedValue=$ush.rawurldecode(node.value).replace(/\\/g,'').replace(/[\u201A]/g,',');const postCount=$ush.parseInt(currentData[$formattedValue]);if(postCount){numActiveValues++}
if(!self.hidePostCount&&$node.data('label-template')){$node.text($ush.toString($node.data('label-template')).replace('%d',postCount))}
$node.prop('disabled',postCount===0).toggleClass('disabled',postCount===0);$('select',$node).prop('disabled',postCount===0)})}else if(isRangeType){const minValue=$ush.parseFloat(currentData[0]);const maxValue=$ush.parseFloat(currentData[1]);const newValues=[minValue,maxValue];const currentValues=urlManager.get(`_${filterName}`);if(minValue){numActiveValues++}
if(maxValue){numActiveValues++}
if($filter.hasClass('type_range_slider')){$('.ui-slider',$filter).slider('option',{min:minValue,max:maxValue,values:currentValues?parseValues(currentValues):newValues,});$(`input[type=hidden]`,$filter).val(newValues.join('-'))}else{const $opts=$('.for_range_input_options',filter);if($opts.is('[onclick]')){const opts=$opts[0].onclick()||{};$('.for_min_value, .for_max_value',filter).each((i,node)=>{const formattedValue=self.numberFormat(newValues[i],opts);const $node=$(node);$node.attr('placeholder',$ush.fromCharCode(formattedValue))})}}}else{numActiveValues=1}
const $focusableElements=$('input,select,button,.ui-slider-handle',filter);if(numActiveValues){$focusableElements.each((_,node)=>{const $node=$(node);if($node.hasClass('ui-slider-handle')){$node.attr('tabindex','0')}else{$node.removeAttr('tabindex')}})}else{$focusableElements.attr('tabindex','-1')}
$filter.removeClass('loading');$filter.toggleClass('disabled',numActiveValues<1)})},resetItemValues:function(e){const self=this;e.stopPropagation();e.preventDefault();const $filter=$(e.target).closest('.w-filter-item');const compare=$filter.data('value-compare');var name=PREFIX_FOR_URL_PARAM+$filter.data('name');if(compare){name+=`|${compare}`}
self.result[name]=DELETE_FILTER;self.trigger('applyFilterToList');self.resetFields($filter)},resetFields:function($filter){const self=this;if($filter.hasClass('type_checkbox')){$('input[type=checkbox]',$filter).prop('checked',!1)}else if($filter.hasClass('type_radio')){$('input[type=radio]',$filter).prop('checked',!1);$('input[value="%2A"]',$filter).prop('checked',!0)}else if($filter.hasClass('type_dropdown')){$('select',$filter).prop('selectedIndex',0)}else if($filter.hasClass('type_date_picker')||$filter.hasClass('type_range_input')){$('input',$filter).val('')}else if($filter.hasClass('type_range_slider')){var $input=$('input[type=hidden]',$filter),values=[$input.attr('min'),$input.attr('max')];$('.ui-slider',$filter).slider('values',values.map($ush.parseFloat))}
if(self.titlesAsDropdowns()){$('.w-filter-item-title span',$filter).text('')}
$filter.removeClass('has_value expand');$('input[name="search_values"]',$filter).val('');$('.w-filter-item-value',$filter).removeClass('hidden')},applyFilterToList:function(){const self=this;if(!$ush.isUndefined(self.lastResult)&&$ush.comparePlainObject(self.result,self.lastResult)){return}
self.lastResult=$ush.clone(self.result);self.сheckActiveFilters();const urlParams=$ush.clone(self.result);if(self.isFacetedFiltering){var f_value=DELETE_FILTER;for(const k in self.result){if(k!==FACETED_PARAM&&self.result[k]!==DELETE_FILTER){f_value=1;break}}
urlParams[FACETED_PARAM]=f_value;self.result[FACETED_PARAM]=1}
if(self.changeURLParams()){urlManager.set(urlParams);urlManager.push({})}
self.listToFilter().trigger('usListFilter',self.result)},toggleItemSection:function(e){const self=this;if(e.originalEvent.detail>0&&self.$container.hasClass('drop_on_hover')){return}
if(self.titlesAsToggles()||self.titlesAsDropdowns()){const $filter=$(e.delegateTarget);$filter.toggleClass('expand',!$filter.hasClass('expand'))}},openMobileVersion:function(){const self=this;$us.$body.addClass('us_filter_open');self.$container.addClass('open_for_mobile').attr('aria-modal','true');self.$opener.attr('tabindex','-1');if(self.titlesAsDropdowns()){self.$titles.attr('tabindex','-1')}},closeMobileVersion:function(){const self=this;$us.$body.removeClass('us_filter_open');self.$container.removeClass('open_for_mobile').removeAttr('aria-modal');self.$opener.removeAttr('tabindex');if(self.titlesAsDropdowns()){self.$titles.removeAttr('tabindex')}},showSelectedValues:function(){const self=this;if(!self.titlesAsDropdowns()){return}
for(const key in self.result){if(key===FACETED_PARAM){continue}
const name=(key.charAt(0)==='_')?key.substring(1):key;var value=self.result[key];if((self.lastResult||{})[key]===value||$ush.isUndefined(value)){continue}
const $filter=self.filters[name];const $label=$('.w-filter-item-title > span',$filter);if(value===null){$label.text('');continue}else{value=$ush.rawurldecode(value)}
if($filter.hasClass('type_dropdown')){$label.text($(`option[value="${value}"]`,$filter).text())}else if($filter.hasClass('type_range_slider')||$filter.hasClass('type_range_input')){const formattedLabel=$ush.toString(self.result[key]).split('-').map((v)=>self.numberFormat(v,$filter.data('opts'))).join(' - ');$label.html($ush.fromCharCode(formattedLabel))}else if($filter.hasClass('type_date_picker')){const values=[];$('input.hasDatepicker',$filter).each((_,input)=>{if(input.value){values.push(input.value)}});$label.text(values.join(' - '))}else{if(value.includes(',')&&value.split(',')[0].length>2){value=value.split(',').length}else{value=$(`[data-value="${value}"] .w-filter-item-value-label:first`,$filter).html()||value}
$label.text(value)}}},hideItemDropdown:function(e){const self=this;const $openedFilters=$('.w-filter-item.expand',self.$container);if(!$openedFilters.length){return}
$openedFilters.each((_,node)=>{const $node=$(node);if(!$node.is(e.target)&&$node.has(e.target).length===0){$node.removeClass('expand')}})},checkScreenStates:function(){const self=this;const isMobile=$ush.parseInt(window.innerWidth)<=$ush.parseInt(self.data.mobileWidth);if(!self.$container.hasClass(`state_${ isMobile ? 'mobile':'desktop' }`)){self.$container.usMod('state',isMobile?'mobile':'desktop');if(!isMobile){$us.$body.removeClass('us_filter_open');self.$container.removeClass('open_for_mobile')}}
self.countActiveFilters()},сheckActiveFilters:function(){const self=this;self.$container.toggleClass('active',$('.has_value:first',self.$container).length>0);self.countActiveFilters()},countActiveFilters:function(){const self=this;if(!self.$container.hasClass('state_mobile')){return}
if($us.usbPreview()){self.$container.addClass('active');self.$opener.attr('data-count-active',1);return}
self.$opener.attr('data-count-active',$('.w-filter-item.has_value',self.$container).length)},});$.extend(usListFilter.prototype,{navUsingKeyPress:function(e){const self=this;const keyCode=e.keyCode;if(![$ush.TAB_KEYCODE,$ush.ENTER_KEYCODE,$ush.SPACE_KEYCODE,$ush.ESC_KEYCODE].includes(keyCode)){return}
const focusableSelectors=['a[href]','input:not([disabled])','select:not([disabled])','textarea:not([disabled])','button:not([disabled])','[tabindex]',].join();const $target=$(e.target);const $activeElement=$(_document.activeElement).filter(focusableSelectors);const isOpenMobileVersion=self.$container.hasClass('open_for_mobile');function openMobileVersion(){if($target.hasClass('w-filter-opener')){self.openMobileVersion();self.$listCloser[0].focus()}}
function closeMobileVersion(){self.closeMobileVersion();self.$opener[0].focus()}
if(keyCode===$ush.ESC_KEYCODE){$.each(self.filters,(_,$filter)=>{if($filter.hasClass('expand')){$filter.removeClass('expand');$('.w-filter-item-title',$filter)[0].focus()}});if(isOpenMobileVersion){closeMobileVersion()}}
if([$ush.ENTER_KEYCODE,$ush.SPACE_KEYCODE].includes(keyCode)){if($target.hasClass('w-filter-item-reset')){if(isOpenMobileVersion){$(focusableSelectors,$target.closest('[data-name]')).filter(':visible:not([tabindex="-1"]):eq(0)')[0].focus()}else{$('.w-filter-item-title',$target.closest('.w-filter-item'))[0].focus();self.resetItemValues(e)}}
openMobileVersion();if($target.hasClass('w-filter-list-closer')||$target.hasClass('w-filter-button-submit')){closeMobileVersion()}}
if(keyCode===$ush.TAB_KEYCODE){const isContainActiveElement=$.contains(self.$container[0],$activeElement[0]);if(self.titlesAsDropdowns()&&!isOpenMobileVersion&&!isContainActiveElement){$('.w-filter-item.expand',self.$container).removeClass('expand')}
if(isOpenMobileVersion&&!isContainActiveElement){const $focusable=$(focusableSelectors,self.$container).filter(':visible:not([tabindex="-1"])');if(!$focusable.length){e.preventDefault();self.$listCloser[0].focus();return}
const firstElement=$focusable.first()[0];const lastElement=$focusable.last()[0];if(e.shiftKey&&$target[0]===firstElement){e.preventDefault();lastElement.focus()}else if(!e.shiftKey&&$target[0]===lastElement){e.preventDefault();firstElement.focus()}}}},});$.fn.usListFilter=function(){return this.each((_,node)=>{$(node).data('usListFilter',new usListFilter(node))})};$(()=>$('.w-filter.for_list').usListFilter())}(jQuery);!function($,_undefined){"use strict";$.fn.fixSlider=function(){this.each((_,node)=>{const inst=$(node).slider('instance');inst._original_refreshValue=inst._refreshValue;inst._calculateNewMax=function(){this.max=this.options.max};inst._refreshValue=function(){const self=this;self._original_refreshValue();if(self._hasMultipleValues()){var isFixed=!1;self.handles.each((i,handle)=>{const valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;if(isNaN(valPercent)){$(handle).css('left',`${i*100}%`);isFixed=!0}});if(isFixed){self.range.css({left:0,width:'100%'})}}}})}}(jQuery);(function($,undefined){"use strict";$us.WProgbar=function(container,options){this.$container=$(container);this.$bar=$('.w-progbar-bar-h',this.$container);this.$count=$('.w-progbar-title-count, .w-progbar-bar-count',this.$container);this.$title=$('.w-progbar-title',this.$container);this.options={delay:100,duration:800,finalValue:100,offset:'10%',startValue:0,value:50};if(this.$container.is('[onclick]')){$.extend(this.options,this.$container[0].onclick()||{});if(!$us.usbPreview())this.$container.removeAttr('onclick')}
$.extend(this.options,options||{});if(/bot|googlebot|crawler|spider|robot|crawling/i.test(navigator.userAgent)){this.$container.removeClass('initial')}
this.$count.text('');$us.waypoints.add(this.$container,this.options.offset,this.init.bind(this))};$.extend($us.WProgbar.prototype,{init:function(){if(this.running){return}
this.running=!0;if(this.$container.hasClass('initial')){this.$container.removeClass('initial')}
var loops=Math.ceil(this.options.duration/this.options.delay),increment=parseFloat(this.options.value)/loops,loopCount=0,handle=null,startValue=0;var funLoop=function(){startValue+=increment;loopCount++;if(handle){$ush.clearTimeout(handle)}
if(loopCount>=loops){var result=this.options.template;if(this.options.hasOwnProperty('showFinalValue')){result+=' '+this.options.showFinalValue}
this.$count.text(result);return}
this.render.call(this,startValue);handle=$ush.timeout(funLoop.bind(this),this.options.delay)};funLoop.call(this);var finalValue=parseFloat(this.options.finalValue),width=((parseFloat(parseFloat(this.options.value))/parseFloat(finalValue))*100).toFixed(0);this.$bar.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd',this._events.transitionEnd.bind(this)).css({width:width+'%',transitionDuration:parseInt(this.options.duration)+'ms'})},_events:{transitionEnd:function(){var result=this.options.template;if(this.options.hasOwnProperty('showFinalValue')){result+=' '+this.options.showFinalValue}
this.$count.text(result);this.running=!1}},render:function(value){var index=0,result=(''+this.options.template).replace(/([\-\d\.])/g,function(match){value+='';if(index===0&&match==='0'){if(value.charAt(index+1)==='.'||match==='.'){index++}
return match}
return value.charAt(index++)||''}.bind(this));if(result.charAt(index-1)==='.'){result=result.substr(0,index-1)+result.substr(index)}
if(this.options.hasOwnProperty('showFinalValue')){result+=' '+this.options.showFinalValue}
this.$count.text(result)}});$.fn.wProgbar=function(options){this.each(function(){$(this).data('wProgbar',new $us.WProgbar(this,options))})};$(function(){jQuery('.w-progbar').wProgbar()})})(jQuery);!function($,undefined){"use strict";var _window=window,_body=document.body;var abs=Math.abs,max=Math.max,min=Math.min,floor=Math.floor,round=Math.round;_window.$us=_window.$us||{};_window.$ush=_window.$ush||{};const _TRANSLATE_FACTOR_=7;function scroll(){return{top:_window.scrollY||_window.pageYOffset,}}
function areEffectsDisabled(){return $us.canvasOptions.disableEffectsWidth>=_body.clientWidth}
var _lastState={bodyHeight:$ush.parseInt(_body.clientHeight),effectsDisabled:areEffectsDisabled(),};function ScrollEffects(){var self=this;self.elms=[];self._events={onScroll:self._onScroll.bind(self),onСontentChange:self._onСontentChange.bind(self),};$us.$window.on('scroll.noPreventDefault',self._events.onScroll).on('resize',$ush.debounce(self._events.onСontentChange,25));$us.$canvas.on('contentChange',$ush.debounce(self._events.onСontentChange,1))}
ScrollEffects.prototype={addElms:function(elms){var self=this;if(!Array.isArray(elms)){elms=[elms]}
elms.map(function(element){if($ush.isNode(element)){for(var i in self.elms){if(self.elms[i].node===element){self.elms[i].removeEffects();self.elms.splice(i,1);break}}
self.elms.push(new SE_Manager(element))}})},_onСontentChange:function(){var self=this;var effectsDisabled=areEffectsDisabled();if(_lastState.effectsDisabled!==effectsDisabled){_lastState.effectsDisabled=effectsDisabled;self.elms.map(function(element){element[effectsDisabled?'removeEffects':'applyEffects']()})}
var bodyHeight=$ush.parseInt(_body.clientHeight);if(_lastState.bodyHeight!==bodyHeight){_lastState.bodyHeight=bodyHeight;self.elms.map(function(element){element.setInitialData()})}},_onScroll:function(){var self=this;if(areEffectsDisabled()){return}
self.elms.map(function(element){if(!element.isInViewport()){element.node.classList.remove('in_viewport');return}
element.node.classList.add('in_viewport');requestAnimationFrame(()=>element.applyEffects())})}};$us.scrollEffects=new ScrollEffects;function SE_Manager(node){var self=this;self.node=node;self.offsetTop=-0;self.nearestTop=-0;self.currentHeight=-0;self.initialData={top:-0,height:-0,};self._config={start_position:'0%',end_position:'100%',from_initial_position:0,translate_y:0,translate_y_direction:'up',translate_y_speed:'0.5x',translate_x:0,translate_x_direction:'left',translate_x_speed:'0.5x',opacity:0,opacity_direction:'out-in',scale:0,scale_direction:'up',scale_speed:'0.5x',delay:'0.1s',};var $node=$(node);$.extend(self._config,$node.data('us-scroll')||{});$node.removeAttr('data-us-scroll');self.setInitialData();node.classList.toggle('in_viewport',self.isInViewport());if(!areEffectsDisabled()){self.applyEffects()}
$ush.timeout(function(){node.style.setProperty('--scroll-delay',self.getParam('delay'))},100)}
SE_Manager.prototype={setInitialData:function(){var self=this,rect=$ush.$rect(self.node);self.currentHeight=rect.height;self.initialData.height=rect.height;self.initialData.top=scroll().top+rect.top-$ush.parseFloat(self.style('--translateY'));self.translateSpeedY=$ush.parseFloat(self.getParam('translate_y_speed'));self.translateSpeedX=$ush.parseFloat(self.getParam('translate_x_speed'));if($ush.parseInt(self.getParam('from_initial_position'))!=1){var startPosition=$ush.parseInt(self.getParam('start_position')),endPosition=$ush.parseInt(self.getParam('end_position')),centerPosition=50;self.centerScrollTop=$ush.parseInt(self.initialData.top+self.initialData.height/2-_window.innerHeight/2);self.startScrollTop=self.centerScrollTop-_window.innerHeight/2+(startPosition/100*_window.innerHeight)-self.initialData.height*(centerPosition-startPosition)/100;self.endScrollTop=self.centerScrollTop-_window.innerHeight/2+(endPosition/100*_window.innerHeight)+self.initialData.height*(endPosition-centerPosition)/100}},isInViewport:function(){var self=this,rect=$ush.$rect(self.node),initialTop=self.initialData.top-scroll().top,nearestTop=min(initialTop,rect.top)-_window.innerHeight;self.offsetTop=rect.top;self.nearestTop=nearestTop;self.currentHeight=rect.height;return(nearestTop<=0&&(max(initialTop,rect.top)+rect.height)>=0)},hasClass:function(className){return className&&this.node.classList.contains(className)},style:function(prop,value){var elmStyle=this.node.style;if($ush.isUndefined(value)){return elmStyle.getPropertyValue(prop)}else{elmStyle.setProperty(prop,$ush.toString(value))}},getParam:function(name,defaultValue){var self=this;return(self.node.dataset[name]||self._config[name]||defaultValue)},getPositionData:function(offsetY,distanceInPx){var self=this,currentPosition=100-($ush.parseFloat(offsetY)/$ush.parseFloat(distanceInPx)*100),startPosition=$ush.parseInt(self.getParam('start_position')),endPosition=$ush.parseInt(self.getParam('end_position'));return{start:startPosition,current:$ush.limitValueByRange(currentPosition,0,100),end:endPosition,diff:(endPosition-startPosition),}},applyEffects:function(){var self=this;self.setTranslateY();self.setTranslateX();self.setOpacity();self.setScale()},removeEffects:function(){var self=this;['--translateY','--translateX','--opacity','--scale'].map(function(varName){self.style(varName,'')})},getPosition:function(translateSpeed){var self=this,position=-0;if($ush.parseInt(self.getParam('from_initial_position'))==1){position=scroll().top*translateSpeed}else{if(self.startScrollTop<scroll().top&&scroll().top<self.endScrollTop){position=(scroll().top-self.centerScrollTop)*translateSpeed}else if(self.startScrollTop>=scroll().top){position=(self.startScrollTop-self.centerScrollTop)*translateSpeed}else if(self.endScrollTop<=scroll().top){position=(self.endScrollTop-self.centerScrollTop)*translateSpeed}}
if(self.initialData.top+self.initialData.height+position>=_lastState.bodyHeight){return _lastState.bodyHeight-self.initialData.top-self.initialData.height-1}
return position},setTranslateY:function(){var self=this;if(!self.hasClass('has_translate_y')||!self.translateSpeedY){return}
var translateSpeed=self.translateSpeedY,translateY;if(self.getParam('translate_y_direction')!=='down'){translateSpeed=-translateSpeed}
self.style('--translateY',self.getPosition(translateSpeed)+'px')},setTranslateX:function(){var self=this;if(!self.hasClass('has_translate_x')||!self.translateSpeedX){return}
var translateSpeed=self.translateSpeedX,translateX;if(self.getParam('translate_x_direction')!=='right'){translateSpeed=-translateSpeed}
self.style('--translateX',self.getPosition(translateSpeed)+'px')},setOpacity:function(){var self=this;var opacityDirection=self.getParam('opacity_direction'),opacity;if(!self.hasClass('has_opacity')||!opacityDirection){return}
if($ush.parseInt(self.getParam('from_initial_position'))==1){var initialPosition=$ush.parseInt(self.initialData.top+self.initialData.height/2);opacity=min(1,scroll().top/initialPosition)}else{var elmHeight=self.initialData.height,viewportHeight=_window.innerHeight,offsetTop=viewportHeight+self.nearestTop+elmHeight,position=self.getPositionData(offsetTop,viewportHeight+elmHeight),startPosition=position.start,currentPosition=$ush.limitValueByRange(round(position.current),startPosition,position.end);opacity=((100/position.diff)*(currentPosition-startPosition))/100}
if(opacityDirection==='in-out'){opacity=1-opacity}else if(opacityDirection==='in-out-in'){opacity=(2*opacity)-1}else if(opacityDirection==='out-in-out'){opacity=(opacity>0.5?2:0)-(2*opacity)}
self.style('--opacity',$ush.limitValueByRange(abs(opacity).toFixed(3),0,1))},setScale:function(){var self=this;var scaleSpeed=$ush.parseFloat(self.getParam('scale_speed'));if(!self.hasClass('has_scale')||!scaleSpeed){return}
if(self.getParam('scale_direction')==='down'){scaleSpeed=-scaleSpeed}
if($ush.parseInt(self.getParam('from_initial_position'))==1){var scale=1+(scroll().top/_window.innerHeight*100)/50*scaleSpeed}else{var elmHeight=max(self.initialData.height,self.currentHeight),viewportHeight=_window.innerHeight,offsetTop=viewportHeight+self.nearestTop+elmHeight,position=self.getPositionData(offsetTop,viewportHeight+elmHeight),currentPosition=$ush.limitValueByRange(round(position.current),position.start,position.end);var scale=1-(50-currentPosition)/50*scaleSpeed}
if(scale<0){scale=0}
self.style('--scale',scale)}};$.fn.usScrollEffects=function(){return this.each(function(){$us.scrollEffects.addElms(this)})};$(function(){$('[data-us-scroll]').usScrollEffects()})}(jQuery);!function($){"use strict";function UsSearch(container){this.$container=$(container);this.$form=this.$container.find('.w-search-form');this.$btnOpen=this.$container.find('.w-search-open');this.$btnClose=this.$container.find('.w-search-close');this.$input=this.$form.find('[name="s"]');this.$overlay=this.$container.find('.w-search-background');this.$window=$(window);this.searchOverlayInitRadius=25;this.isFullScreen=this.$container.hasClass('layout_fullscreen');this.isWithRipple=this.$container.hasClass('with_ripple');this._bindEvents()}
$.extend(UsSearch.prototype,{_bindEvents:function(){this.$btnOpen.on('click.usSearch',(e)=>{this.searchShow(e)});this.$btnClose.on('touchstart.noPreventDefault click',(e)=>{this.searchHide(e)});this.$form.on('keydown',(e)=>{if(e.keyCode===$ush.ESC_KEYCODE&&this.$container.hasClass('active')){this.searchHide(e)}});this.$btnOpen.on('keydown',(e)=>{if(e.keyCode===$ush.SPACE_KEYCODE){e.preventDefault();this.searchShow(e)}})},searchHide:function(e){e.stopPropagation();if(e.type==='touchstart'){e.preventDefault()}
if(this.isFullScreen){$ush.timeout(()=>{this.$btnOpen.one('click.usSearch',(evt)=>{this.searchShow(evt)})},100)}
this.$btnOpen.removeAttr('tabindex');this.$container.removeClass('active');this.$input.blur();if(this.isWithRipple&&this.isFullScreen){this.$form.css({transition:'opacity 0.4s'});$ush.timeout(()=>{this.$overlay.removeClass('overlay-on').addClass('overlay-out').css({'transform':'scale(0.1)'});this.$form.css('opacity',0);$ush.debounce(()=>{this.$form.css('display','none');this.$overlay.css('display','none')},600)},25)}
if(e.type!=='touchstart'){this.$btnOpen.trigger('focus')}
$us.$document.off('focusin.usSearch')},calculateOverlayScale:function(){const searchPos=this.$btnOpen.offset();const searchWidth=this.$btnOpen.width();const searchHeight=this.$btnOpen.height();searchPos.top-=this.$window.scrollTop();searchPos.left-=this.$window.scrollLeft();const overlayX=searchPos.left+searchWidth/2;const overlayY=searchPos.top+searchHeight/2;const winWidth=$us.canvas.winWidth;const winHeight=$us.canvas.winHeight;const dx=Math.pow(Math.max(winWidth-overlayX,overlayX),2);const dy=Math.pow(Math.max(winHeight-overlayY,overlayY),2);const overlayRadius=Math.sqrt(dx+dy);return[(overlayRadius+15)/this.searchOverlayInitRadius,overlayX,overlayY]},searchShow:function(e){e.preventDefault();$us.$document.on('focusin.usSearch',this.closeFormOnTabOutside.bind(this));if(this.isFullScreen){this.$btnOpen.off('click.usSearch')}
this.$container.addClass('active');this.$btnOpen.attr('tabindex','-1');if(this.isWithRipple&&this.isFullScreen){const calculateOverlayScale=this.calculateOverlayScale();const overlayScale=calculateOverlayScale[0];const overlayX=calculateOverlayScale[1];const overlayY=calculateOverlayScale[2];this.$overlay.css({width:this.searchOverlayInitRadius*2,height:this.searchOverlayInitRadius*2,left:overlayX,top:overlayY,"margin-left":-this.searchOverlayInitRadius,"margin-top":-this.searchOverlayInitRadius});this.$overlay.removeClass('overlay-out').show();this.$form.css({opacity:0,display:'block',transition:'opacity 0.4s 0.3s'});$ush.timeout(()=>{this.$overlay.addClass('overlay-on').css({"transform":"scale("+overlayScale+")"});this.$form.css('opacity',1)},25)}
$ush.timeout(()=>{this.$input.trigger('focus')},25)},closeFormOnTabOutside:function(e){if(!$.contains(this.$form[0],$us.$document[0].activeElement)){this.searchHide(e)}},});$.fn.wSearch=function(){return this.each(function(){$(this).data('wSearch',new UsSearch(this))})};$(function(){jQuery('.l-header .w-search').wSearch()})}(jQuery);!function($){"use strict";$us.UsSharing=function(container,options){this.init(container,options)};$us.UsSharing.prototype={init:function(container,options){this.$container=$(container);if(!!$('.w-sharing-list',this.$container).data('content-image')){if($('.l-canvas img:first-child').length){this.sharingImage=$('.l-canvas img:first-child').attr('src')}else{this.sharingImage=''}
this.setSharingImage()}
if(!this.$container.hasClass('w-sharing-tooltip')){if($('.whatsapp',this.$container).length&&$.isMobile){this.setWhatsAppUrl(this.$container.find('.whatsapp'))}}else{this.$copy2clipboard=$('.w-sharing-item.copy2clipboard',this.$container);this.selectedText='';this.activeArea='.l-main';if(this.$container.data('sharing-area')==='post_content'){this.activeArea='.w-post-elm.post_content'}
this.$container.appendTo("body");$('body').not(this.activeArea).on('mouseup',function(){var selection=this.getSelection();if(selection===''){this.$container.hide()}}.bind(this));$(this.activeArea).on('mouseup',function(e){var selection=this.getSelection();if(selection!==''){this.selectedText=selection;this.showTooltip(e)}else{this.selectedText='';this.hideTooltip()}}.bind(this));this.$copy2clipboard.on('click',function(){this.copyToClipboard()}.bind(this))}},showTooltip:function(e){$('.w-sharing-item',this.$container).each(function(index,elm){if($(elm).hasClass('copy2clipboard')){return}
if($.isMobile&&$(elm).hasClass('whatsapp')){this.setWhatsAppUrl($(elm))}
$(elm).attr('href',($(elm).data('url')||'').replace('{{text}}',this.selectedText))}.bind(this));this.$container.css({"display":"inline-block","left":e.pageX,"top":e.pageY-50,})},setSharingImage:function(){$('.w-sharing-item',this.$container).each(function(index,elm){if($(elm).hasClass('copy2clipboard')){return}
$(elm).attr('href',($(elm).attr('href')||'').replace('{{image}}',this.sharingImage));if($(elm).attr('data-url')){$(elm).attr('data-url',($(elm).attr('data-url')||'').replace('{{image}}',this.sharingImage))}}.bind(this))},setWhatsAppUrl:function($elm){$elm.attr('href',($elm.attr('href')||'').replace('https://web','https://api'))},hideTooltip:function(){this.$container.hide()},copyToClipboard:function(){var url,el=document.createElement('textarea');if(this.$copy2clipboard.parent().data('sharing-url')!==undefined&&this.$copy2clipboard.parent().data('sharing-url')!==''){url=this.$copy2clipboard.parent().attr('data-sharing-url')}else{url=window.location}
el.value=this.selectedText+' '+url;el.setAttribute('readonly','');el.style.position='absolute';el.style.left='-9999px';document.body.appendChild(el);el.select();document.execCommand ('copy');document.body.removeChild(el);this.hideTooltip()},getSelection:function(){var selection='';if(window.getSelection){selection=window.getSelection()}else if(document.selection){selection=document.selection.createRange()}
return selection.toString().trim()},};$.fn.UsSharing=function(options){return this.each(function(){$(this).data('UsSharing',new $us.UsSharing(this,options))})};$(function(){$('.w-sharing-tooltip, .w-sharing').UsSharing()})}(jQuery);!function($,_undefined){"use strict";window.$us=window.$us||{};const SLIDE_DURATION=250;function usSimpleNav(container){const self=this;self.$container=$(container);if(self.$container.length===0){return}
self.$items=$('.menu-item',self.$container);self.$menuItemHasChildren=$('.menu-item-has-children',self.$container);self.$menuItemHasChildren.each((_,section)=>{const $section=$(section);if(!$section.hasClass('current-menu-ancestor')){self.closeSection($section)}});self._events={toggleAccordionSection:self.toggleAccordionSection.bind(self),keyboardToggleAccordionSection:self.keyboardToggleAccordionSection.bind(self),}
self.$container.on('click','.menu-item-has-children > a',self._events.toggleAccordionSection).on('keydown','.menu-item-has-children > a',self._events.keyboardToggleAccordionSection)}
$.extend(usSimpleNav.prototype,{toggleAccordionSection:function(e){const self=this;const $target=$(e.target);const $clickedSection=$target.closest('.menu-item-has-children');e.preventDefault();e.stopImmediatePropagation();if(!self.$container.hasClass('allow_multiple_open')){self.closeOtherSections($clickedSection)}
if($clickedSection.hasClass('expanded')){self.closeSection($clickedSection)}else{self.openSection($clickedSection)}
return!1},keyboardToggleAccordionSection:function(e){const self=this;const $target=$(e.target);if([$ush.ENTER_KEYCODE,$ush.SPACE_KEYCODE].includes(e.keyCode||e.which)&&$target.parent('.menu-item-has-children').length!==0){e.preventDefault();self.toggleAccordionSection(e)}},openSection:function($section){$section.addClass('expanded');$section.children('a').attr('aria-expanded','true');$section.children('.sub-menu').slideDownCSS(SLIDE_DURATION)},closeSection:function($section){$section.removeClass('expanded');$section.children('a').attr('aria-expanded','false');$section.children('.sub-menu').slideUpCSS(SLIDE_DURATION)},closeOtherSections:function($selectedSection){const self=this;self.$menuItemHasChildren.each((_,section)=>{const $section=$(section);if(section!=$selectedSection[0]&&$section.hasClass('expanded')&&$selectedSection.parentsUntil('.w-menu','.expanded').length===0){self.closeSection($section)}})}});$.fn.usSimpleNav=function(){return this.each(function(){$(this).data('usSimpleNav',new usSimpleNav(this))})};$('.w-menu.type_accordion').usSimpleNav()}(jQuery);!function($,_undefined){"use strict";$us.WTabs=function(container,options){const self=this;const _defaults={easing:'cubic-bezier(.78,.13,.15,.86)',duration:300};self.options=$.extend({},_defaults,options);self.isRtl=$('.l-body').hasClass('rtl');self.$container=$(container);self.$tabsList=$('> .w-tabs-list:first',self.$container);self.$tabs=$('.w-tabs-item',self.$tabsList);self.$sectionsWrapper=$('> .w-tabs-sections:first',self.$container);self.$sections=$('> .w-tabs-section',self.$sectionsWrapper);self.$headers=self.$sections.children('.w-tabs-section-header');self.$contents=self.$sections.children('.w-tabs-section-content');self.$tabsBar=$();if(self.$container.hasClass('accordion')){self.$tabs=self.$headers}
self.accordionAtWidth=self.$container.data('accordion-at-width');self.align=self.$tabsList.usMod('align');self.count=self.$tabs.length;self.hasScrolling=self.$container.hasClass('has_scrolling')||!1;self.isAccordionAtWidth=$ush.parseInt(self.accordionAtWidth)!==0;self.isScrolling=!1;self.isTogglable=self.$container.usMod('type')==='togglable';self.minWidth=0;self.tabHeights=[];self.tabLefts=[];self.tabTops=[];self.tabWidths=[];self.width=0;if(self.count===0){return}
if(self.$container.hasClass('accordion')){self.basicLayout='accordion'}else{self.basicLayout=self.$container.usMod('layout')||'hor'}
self.curLayout=self.basicLayout;self.active=[];self.activeOnInit=[];self.definedActive=[];self.tabs=$.map(self.$tabs.toArray(),$);self.sections=$.map(self.$sections.toArray(),$);self.headers=$.map(self.$headers.toArray(),$);self.contents=$.map(self.$contents.toArray(),$);if(!self.sections.length){return}
$.each(self.tabs,(index)=>{if(self.sections[index].hasClass('content-empty')){self.tabs[index].hide();self.sections[index].hide()}
if(self.tabs[index].hasClass('active')){self.active.push(index);self.activeOnInit.push(index)}
if(self.tabs[index].hasClass('defined-active')){self.definedActive.push(index)}
self.tabs[index].add(self.headers[index]).on('click mouseover',(e)=>{var $link=self.tabs[index];if(!$link.is('a')){$link=$('a',$link)}
if($link.length){if(e.type=='click'&&!$ush.toString($link.attr('href'))){e.preventDefault()}}else{e.preventDefault()}
if(e.type=='mouseover'&&(self.$container.hasClass('accordion')||!self.$container.hasClass('switch_hover'))){return}
if(self.curLayout==='accordion'&&self.isTogglable){self.toggleSection(index)}else{if(index!=self.active[0]){self.headerClicked=!0;self.openSection(index)}else if(self.curLayout==='accordion'){self.contents[index].css('display','block').slideUp(self.options.duration,self._events.contentChanged);self.tabs[index].attr('aria-expanded','true').removeClass('active');self.sections[index].removeClass('active');self.active[0]=_undefined}}})});self._events={resize:self.resize.bind(self),hashchange:self.hashchange.bind(self),contentChanged:function(){$.each(self.tabs,(_,item)=>{var $content=$(item);$content.attr('aria-expanded',$content.hasClass('active'))})
$us.$canvas.trigger('contentChange',{elm:self.$container})},wheel:function(){if(self.isScrolling){$us.$htmlBody.stop(!0,!1)}}};self.switchLayout(self.curLayout);$us.$window.on('resize',$ush.debounce(self._events.resize,5)).on('hashchange',self._events.hashchange).on('wheel.noPreventDefault',$ush.debounce(self._events.wheel.bind(self),5));$us.$document.ready(()=>{self.resize();$ush.timeout(self._events.resize,50);$ush.timeout(()=>{if(window.location.hash){var hash=window.location.hash.substr(1),$linkedSection=$(`.w-tabs-section[id="${hash}"]`,self.$sectionsWrapper);if($linkedSection.length&&!$linkedSection.hasClass('active')){$('.w-tabs-section-header',$linkedSection).trigger('click')}}},150)});$.each(self.tabs,(index)=>{if(self.headers.length&&self.headers[index].attr('href')!=_undefined){var tabHref=self.headers[index].attr('href'),tabHeader=self.headers[index];$(`a[href="${tabHref}"]`,self.$container).on('click',function(e){e.preventDefault();if($(this).hasClass('w-tabs-section-header','w-tabs-item')){return}
if(!$(tabHeader).parent('.w-tabs-section').hasClass('active')){tabHeader.trigger('click')}})}});self.$container.addClass('initialized');self.headerHeight=0;$us.header.on('transitionEnd',(header)=>{self.headerHeight=header.getCurrentHeight(!0)});if($us.usbPreview()){const usbContentChange=()=>{if(!self.isTrendy()||self.curLayout=='accordion'){return}
self.measure();self.setBarPosition(self.active[0]||0)};self.$container.on('usb.contentChange',$ush.debounce(usbContentChange,1))}};$us.WTabs.prototype={isTrendy:function(){return this.$container.hasClass('style_trendy')},hashchange:function(){if(window.location.hash){var hash=window.location.hash.substr(1),$linkedSection=$(`.w-tabs-section[id="${hash}"]`,this.$sectionsWrapper);if($linkedSection.length&&!$linkedSection.hasClass('active')){$('.w-tabs-section-header',$linkedSection).click()}}},switchLayout:function(to){this.cleanUpLayout(this.curLayout);this.prepareLayout(to);this.curLayout=to},cleanUpLayout:function(from){this.$sections.resetInlineCSS('display');if(from==='accordion'){this.$container.removeClass('accordion');this.$contents.resetInlineCSS('height','padding-top','padding-bottom','display','opacity')}
if(this.isTrendy()&&['hor','ver'].includes(from)){this.$tabsBar.remove()}},prepareLayout:function(to){if(to!=='accordion'&&this.active[0]===_undefined){this.active[0]=this.activeOnInit[0];if(this.active[0]!==_undefined){this.tabs[this.active[0]].addClass('active');this.sections[this.active[0]].addClass('active')}}
if(to==='accordion'){this.$container.addClass('accordion');this.$contents.hide();if(this.curLayout!=='accordion'&&this.active[0]!==_undefined&&this.active[0]!==this.definedActive[0]){this.headers[this.active[0]].removeClass('active');this.tabs[this.active[0]].removeClass('active');this.sections[this.active[0]].removeClass('active');this.active[0]=this.definedActive[0]}
for(var i=0;i<this.active.length;i ++){if(this.contents[this.active[i]]!==_undefined){this.tabs[this.active[i]].attr('aria-expanded','true').addClass('active');this.sections[this.active[i]].addClass('active');this.contents[this.active[i]].show()}}}else if(to==='ver'){this.$contents.hide();this.contents[this.active[0]].show()}
if(this.isTrendy()&&'hor|ver'.indexOf(this.curLayout)>-1){this.$tabsBar=$('<div class="w-tabs-list-bar"></div>').appendTo(this.$tabsList)}},measure:function(){if(this.basicLayout==='ver'){if(this.isAccordionAtWidth){this.minWidth=this.accordionAtWidth}else{var
minTabWidth=this.$tabsList.outerWidth(!0),minContentWidth=300,navWidth=this.$container.usMod('navwidth');if(navWidth!=='auto'){minTabWidth=Math.max(minTabWidth,minContentWidth*parseInt(navWidth)/(100-parseInt(navWidth)))}
this.minWidth=Math.max(480,minContentWidth+minTabWidth+1)}
if(this.isTrendy()){this.tabHeights=[];this.tabTops=[];for(var index=0;index<this.tabs.length;index ++){this.tabHeights.push(this.tabs[index].outerHeight(!0));this.tabTops.push(index?(this.tabTops[index-1]+this.tabHeights[index-1]):0)}}}else{if(this.basicLayout==='hor'){this.$container.addClass('measure');if(this.isAccordionAtWidth){this.minWidth=this.accordionAtWidth}else{this.minWidth=0;for(var index=0;index<this.tabs.length;index ++){this.minWidth+=this.tabs[index].outerWidth(!0)}}
this.$container.removeClass('measure')}
if(this.isTrendy()){this.tabWidths=[];this.tabLefts=[];for(var index=0;index<this.tabs.length;index ++){this.tabWidths.push(this.tabs[index].outerWidth(!0));this.tabLefts.push(index?(this.tabLefts[index-1]+this.tabWidths[index-1]):this.tabs[index].position().left)}
if(this.isRtl){var
firstTabWidth=this.tabWidths[0],offset=('none'==this.align)?this.$tabsList.outerWidth(!0):this.tabWidths.reduce((a,b)=>{return a+b},0);this.tabLefts=this.tabLefts.map((left)=>Math.abs(left-offset+firstTabWidth))}}}},setBarPosition:function(index,animated){if(index===_undefined||!this.isTrendy()||'hor|ver'.indexOf(this.curLayout)==-1){return}
if(!this.$tabsBar.length){this.$tabsBar=$('<div class="w-tabs-list-bar"></div>').appendTo(this.$tabsList)}
var css={};if(this.curLayout==='hor'){css={width:this.tabWidths[index]};css[this.isRtl?'right':'left']=this.tabLefts[index]}else if(this.curLayout==='ver'){css={top:this.tabTops[index],height:this.tabHeights[index]}}
if(!animated){this.$tabsBar.css(css)}else{this.$tabsBar.performCSSTransition(css,this.options.duration,null,this.options.easing)}},openSection:function(index){if(this.sections[index]===_undefined){return}
if(this.curLayout==='hor'){this.$sections.removeClass('active').css('display','none');this.sections[index].stop(!0,!0).fadeIn(this.options.duration,function(){$(this).addClass('active')})}else if(this.curLayout==='accordion'){if(this.contents[this.active[0]]!==_undefined){this.contents[this.active[0]].css('display','block').stop(!0,!1).slideUp(this.options.duration)}
this.contents[index].css('display','none').stop(!0,!1).slideDown(this.options.duration,function(){this._events.contentChanged.call(this);if(this.hasScrolling&&this.curLayout==='accordion'&&this.headerClicked==!0){var top=this.headers[index].offset().top;if(!jQuery.isMobile){top-=$us.$canvas.offset().top||0}
var $prevStickySection=this.$container.closest('.l-section').prevAll('.l-section.type_sticky');if($prevStickySection.length){top-=parseInt($prevStickySection.outerHeight(!0))}
var animateOptions={duration:$us.canvasOptions.scrollDuration,easing:$us.getAnimationName('easeInOutExpo'),start:function(){this.isScrolling=!0}.bind(this),always:function(){this.isScrolling=!1}.bind(this),step:function(now,fx){var newTop=top;if($us.header.isHorizontal()&&$us.header.stickyEnabled()){newTop-=this.headerHeight}
if(fx.end!==newTop){$us.$htmlBody.stop(!0,!1).animate({scrollTop:newTop},$.extend(animateOptions,{easing:$us.getAnimationName('easeOutExpo')}))}}.bind(this)};$us.$htmlBody.stop(!0,!1).animate({scrollTop:top},animateOptions);this.headerClicked=!1}}.bind(this));this.$sections.removeClass('active');this.sections[index].addClass('active')}else if(this.curLayout==='ver'){if(this.contents[this.active[0]]!==_undefined){this.contents[this.active[0]].css('display','none')}
this.contents[index].css('display','none').stop(!0,!0).fadeIn(this.options.duration,this._events.contentChanged);this.$sections.removeClass('active');this.sections[index].addClass('active')}
this._events.contentChanged();this.$tabs.attr('aria-expanded','false').removeClass('active');this.tabs[index].attr('aria-expanded','true').addClass('active');this.active[0]=index;this.setBarPosition(index,!0)},toggleSection:function(index){var indexPos=$.inArray(index,this.active);if(indexPos!=-1){this.contents[index].css('display','block').slideUp(this.options.duration,this._events.contentChanged);this.tabs[index].attr('aria-expanded','true').removeClass('active');this.sections[index].removeClass('active');this.active.splice(indexPos,1)}else{this.contents[index].css('display','none').slideDown(this.options.duration,this._events.contentChanged);this.tabs[index].attr('aria-expanded','false').addClass('active');this.sections[index].addClass('active');this.active.push(index)}},resize:function(){this.width=this.isAccordionAtWidth?$us.$window.outerWidth():this.$container.width();if(this.curLayout!=='accordion'&&!this.width&&this.$container.closest('.w-nav').length&&!jQuery.isMobile){return}
var nextLayout=(this.width<=this.minWidth)?'accordion':this.basicLayout;if(nextLayout!==this.curLayout){this.switchLayout(nextLayout)}
if(this.curLayout!=='accordion'){this.measure()}
this._events.contentChanged();this.setBarPosition(this.active[0])}};$.fn.wTabs=function(options){return this.each(function(){$(this).data('wTabs',new $us.WTabs(this,options))})};$(()=>$('.w-tabs').wTabs());$us.$document.on('usPostList.itemsLoaded usGrid.itemsLoaded',(_,$items)=>{$('.w-tabs',$items).wTabs()})}(jQuery);jQuery(function($){$('.w-tabs .rev_slider').each(function(){var $slider=$(this);$slider.bind("revolution.slide.onloaded",function(e){$us.$canvas.on('contentChange',function(){$slider.revredraw()})})})});(function($,_undefined){"use strict";window.$us.YTPlayers=window.$us.YTPlayers||{};$us.wVideo=function(container){const self=this;self.$container=$(container);self.$videoH=$('.w-video-h',self.$container);self.cookieName=self.$container.data('cookie-name');self.isWithOverlay=self.$container.hasClass('with_overlay');if($ush.isSafari){(self.getVideoElement()||{load:$.noop}).load()}
if(!self.cookieName&&!self.isWithOverlay){return}
self.data={};if(self.$container.is('[onclick]')){self.data=self.$container[0].onclick()||{};if(!$us.usbPreview())self.$container.removeAttr('onclick')}
self._events={hideOverlay:self._hideOverlay.bind(self),confirm:self._confirm.bind(self)};if(self.cookieName){self.$container.on('click','.action_confirm_load',self._events.confirm)}
self.$container.one('click','> *',self._events.hideOverlay)};$.extend($us.wVideo.prototype,{getVideoElement:function(){return $('video',this.$videoH)[0]||null},_confirm:function(){const self=this;if($('input[name^='+self.cookieName+']:checked',self.$container).length){$ush.setCookie(self.cookieName,1,365)}
if(self.isWithOverlay){self.insertPlayer()}else{self.$videoH.html($ush.base64Decode(''+$('script[type="text/template"]',self.$container).text())).removeAttr('data-cookie-name')}},_hideOverlay:function(e){const self=this;e.preventDefault();if(self.$container.is('.with_overlay')){self.$container.removeAttr('style').removeClass('with_overlay')}
if(!self.cookieName){self.insertPlayer()}},insertPlayer:function(){const self=this;var data=$.extend({player_id:'',player_api:'',player_html:''},self.data||{});if(data.player_api&&!$('script[src="'+data.player_api+'"]',document.head).length){$('head').append('<script src="'+data.player_api+'"></script>')}
self.$videoH.html(data.player_html);const videoElement=self.getVideoElement();if(!data.player_api&&$ush.isNode(videoElement)){if(self.isWithOverlay&&$ush.isSafari){videoElement.setAttribute('preload','metadata')}
videoElement.play()}}});$.fn.wVideo=function(){return this.each(function(){$(this).data('wVideo',new $us.wVideo(this))})};$(()=>$('.w-video').wVideo());$us.$document.on('usPostList.itemsLoaded usGrid.itemsLoaded',(_,$items)=>{$('.w-video',$items).wVideo()})})(jQuery);(function($){var $window=$(window),windowHeight=$window.height();$.fn.parallax=function(xposParam){this.each(function(){var $container=$(this),$this=$container.children('.l-section-img'),speedFactor,offsetFactor=0,getHeight,topOffset=0,containerHeight=0,containerWidth=0,disableParallax=!1,parallaxIsDisabled=!1,baseImgHeight=0,baseImgWidth=0,isBgCover=($this.css('background-size')=='cover'),originalBgPos=$this.css('background-position'),curImgHeight=0,reversed=$container.hasClass('parallaxdir_reversed'),baseSpeedFactor=reversed?-0.1:0.61,xpos,outerHeight=!0;if($this.length==0){return}
if(xposParam===undefined){xpos="50%"}else{xpos=xposParam}
if($container.hasClass('parallax_xpos_right')){xpos="100%"}else if($container.hasClass('parallax_xpos_left')){xpos="0%"}
if(outerHeight){getHeight=function(jqo){return jqo.outerHeight(!0)}}else{getHeight=function(jqo){return jqo.height()}}
function getBackgroundSize(callback){var img=new Image(),width,height,backgroundSize=($this.css('background-size')||' ').split(' '),backgroundWidthAttr=$this.attr('data-img-width'),backgroundHeightAttr=$this.attr('data-img-height');if(backgroundWidthAttr!=''){width=parseInt(backgroundWidthAttr)}
if(backgroundHeightAttr!=''){height=parseInt(backgroundHeightAttr)}
if(width!==undefined&&height!==undefined){return callback({width:width,height:height})}
if(/px/.test(backgroundSize[0])){width=parseInt(backgroundSize[0])}
if(/%/.test(backgroundSize[0])){width=$this.parent().width()*(parseInt(backgroundSize[0])/100)}
if(/px/.test(backgroundSize[1])){height=parseInt(backgroundSize[1])}
if(/%/.test(backgroundSize[1])){height=$this.parent().height()*(parseInt(backgroundSize[0])/100)}
if(width!==undefined&&height!==undefined){return callback({width:width,height:height})}
img.onload=function(){if(typeof width=='undefined'){width=this.width}
if(typeof height=='undefined'){height=this.height}
callback({width:width,height:height})};img.src=($this.css('background-image')||'').replace(/url\(['"]*(.*?)['"]*\)/g,'$1')}
function update(){if($us.$html.hasClass('ios-touch')){return}
if(disableParallax){if(!parallaxIsDisabled){$this.css('backgroundPosition',originalBgPos);$container.usMod('parallax','fixed');parallaxIsDisabled=!0}
return}else{if(parallaxIsDisabled){$container.usMod('parallax','ver');parallaxIsDisabled=!1}}
if(isNaN(speedFactor)){return}
var pos=$window.scrollTop();if((topOffset+containerHeight<pos)||(pos<topOffset-windowHeight)){return}
$this.css('backgroundPosition',xpos+" "+(offsetFactor+speedFactor*(topOffset-pos))+"px")}
function resize(){$ush.timeout(function(){windowHeight=$window.height();containerHeight=getHeight($this);containerWidth=$this.width();if($window.width()<$us.canvasOptions.disableEffectsWidth){disableParallax=!0}else{disableParallax=!1;if(isBgCover){if(baseImgWidth/baseImgHeight<=containerWidth/containerHeight){curImgHeight=baseImgHeight*($this.width()/baseImgWidth);disableParallax=!1}else{disableParallax=!0}}}
if(curImgHeight!==0){if(baseSpeedFactor>=0){speedFactor=Math.min(baseSpeedFactor,curImgHeight/windowHeight);offsetFactor=.5*(windowHeight-curImgHeight-speedFactor*(windowHeight-containerHeight));if(offsetFactor>0){offsetFactor=-offsetFactor}}else{speedFactor=Math.min(baseSpeedFactor,(windowHeight-containerHeight)/(windowHeight+containerHeight));offsetFactor=Math.max(0,speedFactor*containerHeight)}}else{speedFactor=baseSpeedFactor;offsetFactor=0}
topOffset=$this.offset().top;update()},10)}
getBackgroundSize(function(sz){curImgHeight=baseImgHeight=sz.height;baseImgWidth=sz.width;resize()});$window.bind({'scroll.noPreventDefault':update,load:resize,resize:resize});resize()})};jQuery('.parallax_ver').parallax('50%')})(jQuery);!function($,_undefined){"use strict";window.$us=window.$us||{};function AddToFavorites(container){const self=this;self.$wrapperFavs=$(container);self.$btnFavs=$('.w-btn.us_add_to_favs',container);self.$tooltipNotLoggedIn=$('.us-add-to-favs-tooltip.not-logged-in',container);self.$tooltipAfterAdding=$('.us-add-to-favs-tooltip.message-after-adding',container);self.$btnFavsLabel=$('.w-btn-label',self.$btnFavs);self.xhr=_undefined;self.data={post_ID:0,labelAfterAdding:'',labelBeforeAdding:'',};if(self.$btnFavs.is('[onclick]')){$.extend(self.data,self.$btnFavs[0].onclick()||{})}
if(!$us.usbPreview()){self.$btnFavs.removeAttr('onclick')}
self._events={toggleFavorites:self._toggleFavorites.bind(self),};self.$btnFavs.on('click',self._events.toggleFavorites);self.setButtonState(self.getPostIDs().includes(self.data.post_ID))};$.extend(AddToFavorites.prototype,{getPostIDs:function(){return $ush.toString($us.userFavoritePostIds).split(',').map($ush.parseInt).filter((v)=>{return v})},setButtonState:function(isAdded){let self=this;self.$btnFavs.removeAttr('disabled').removeClass('loading');if(isAdded){self.$btnFavs.addClass('added');if(self.$btnFavsLabel.length){self.$btnFavsLabel.text(self.data.labelAfterAdding)}}else{self.$btnFavs.removeClass('added');if(self.$btnFavsLabel.length){self.$btnFavsLabel.text(self.data.labelBeforeAdding)}}},_toggleFavorites:function(e){const self=this;e.preventDefault();e.stopPropagation();const notLoggedIn=self.data.userLoggedIn===!1;const isAdded=!self.$btnFavs.hasClass('added');if(notLoggedIn&&!self.data.allowGuests){self.toggleTooltip(self.$tooltipNotLoggedIn);return}
$us.$document.trigger('usToggleFavorites',isAdded);let postIDs=self.getPostIDs(),index=postIDs.indexOf(self.data.post_ID);if(index>-1){postIDs.splice(index,1)}else{postIDs.push(self.data.post_ID)}
$us.userFavoritePostIds=postIDs.join(',');if(notLoggedIn&&self.data.allowGuests){$ush.setCookie('us_favorite_post_ids',postIDs.join(','),365)}
self.setButtonState(isAdded);self.toggleAriaLabel(isAdded);if(self.$btnFavs.hasClass('added')&&self.$tooltipAfterAdding.length){self.toggleTooltip(self.$tooltipAfterAdding)}else{self.$tooltipAfterAdding.removeClass('show')}
if(!$ush.isUndefined(self.xhr)){self.xhr.abort()}
self.xhr=$.ajax({url:$us.ajaxUrl,type:'POST',data:{action:'us_add_post_to_favorites',post_id:self.data.post_ID,}})},toggleTooltip:function(tooltip){const removeTooltip=()=>{$us.$window.off('click',removeTooltip);if(tooltip.hasClass('show')){tooltip.removeClass('show')}};tooltip.addClass('show');$ush.timeout(()=>{$us.$window.on('click',removeTooltip)},1)},toggleAriaLabel:function(isAdded){const self=this;if(!self.$btnFavs.hasClass('text_none')){return}
if(isAdded){self.$btnFavs.attr('aria-label',self.data.labelAfterAdding)}else{self.$btnFavs.attr('aria-label',self.data.labelBeforeAdding)}}});$.fn.usAddToFavorites=function(){return this.each(function(){$(this).data('usAddToFavorites',new AddToFavorites(this))})};function FavoritesCounter(container){const self=this;self.$wrapperFavsCounter=$(container);self.$favsCounter=$('.w-favs-counter-quantity',self.$wrapperFavsCounter);self.$favsCounterQuantity=self.$favsCounter.text()*1;$us.$document.on('usToggleFavorites',self._changeCount.bind(self))}
$.extend(FavoritesCounter.prototype,{_changeCount:function(_,isAdded){const self=this;if(isAdded){self.$favsCounterQuantity++;self.$favsCounter.text(self.$favsCounterQuantity)}else{self.$favsCounterQuantity--;self.$favsCounter.text(self.$favsCounterQuantity)}
if(self.$favsCounterQuantity<1){self.$wrapperFavsCounter.addClass('empty')}else{self.$wrapperFavsCounter.removeClass('empty')}},});$.fn.usFavoritesCounter=new FavoritesCounter('.w-favs-counter');$(()=>{$('.w-btn-wrapper.for_add_to_favs').usAddToFavorites()});$us.$document.on('usPostList.itemsLoaded usGrid.itemsLoaded',(_,$items)=>{$('.w-btn-wrapper.for_add_to_favs',$items).usAddToFavorites()})}(jQuery);!(function($){"use strict";const floor=Math.floor;function UsCountdown(container){this.$container=$(container);this.itemMap={};this.data={};if(this.$container.hasClass('expired')){return}
if(this.$container.is('[onclick]')){$.extend(this.data,this.$container[0].onclick()||{})}
if(!$us.usbPreview()){this.$container.removeAttr('onclick')}
this.remaining=$ush.parseInt(this.data.remainingTime);this.prev={days:null,hours:null,minutes:null,seconds:null,};this.$container.find('.w-countdown-item').each((i,item)=>{var type=$(item).data('type'),$itemNumber=$(item).find('.w-countdown-item-number'),$value=$itemNumber.find('span');this.itemMap[type]={$itemNumber,$value}});this.init()}
$.extend(UsCountdown.prototype,{init:function(){this.slide(!1);this.timer=$ush.timeout(this.tick.bind(this),1000)},tick:function(){this.remaining --;if(this.remaining<0){return this.finish()}
this.slide(!0);$ush.clearTimeout(this.timer);this.timer=$ush.timeout(this.tick.bind(this),1000)},slide:function(animate){const values={days:floor(this.remaining/86400),hours:floor((this.remaining%86400)/3600),minutes:floor((this.remaining%3600)/60),seconds:this.remaining%60,};Object.keys(values).forEach(type=>{const newVal=String(values[type]).padStart(2,'0');if(this.prev[type]===newVal){return}
this.prev[type]=newVal;const item=this.itemMap[type];if($us.usbPreview()&&!item){return}
const $old=item.$value;const oldVal=$old.text();if(!animate||oldVal===''){$old.text(newVal);return}
const $new=$('<span class="new">').text(newVal).appendTo(item.$itemNumber);if(!this.$container.hasClass('animation_none')){$old.removeClass('old new is-updating').addClass('old is-updating');$new.addClass('is-updating');$new.one('animationend',()=>{item.$itemNumber.find('span:not(:last)').remove();$old.remove();$new.removeClass('old new is-updating');item.$value=$new})}else{item.$itemNumber.find('span:not(:last)').remove();$old.remove();item.$value=$new}})},finish:function(){$ush.clearTimeout(this.timer);this.$container.addClass('expired')}});$.fn.wCountdown=function(){return this.each(function(){$(this).data('wCountdown',new UsCountdown(this))})};$(()=>$('.w-countdown').wCountdown())})(jQuery);jQuery(function($){"use strict";jQuery('.upb_bg_img, .upb_color, .upb_grad, .upb_content_iframe, .upb_content_video, .upb_no_bg').each(function(){var $bg=jQuery(this),$prev=$bg.prev();if($prev.length==0){var $parent=$bg.parent(),$parentParent=$parent.parent(),$prevParentParent=$parentParent.prev();if($prevParentParent.length){$bg.insertAfter($prevParentParent);if($parent.children().length==0){$parentParent.remove()}}}});$('.g-cols > .ult-item-wrap').each(function(index,elm){var $elm=jQuery(elm);$elm.replaceWith($elm.children())});jQuery('.overlay-show').click(function(){window.setTimeout(function(){$us.$canvas.trigger('contentChange')},1000)})});!(function($,_undefined){const $ush=window.$ush||{};function WooCommerce(){const self=this;self.$cart=$('.w-cart');self.$pageContent=$('#page-content');self.$notice=$('.w-wc-notices.woocommerce-notices-wrapper:first',$us.$canvas);self.$addToCart=$('.w-post-elm.add_to_cart',$us.$canvas);self._activeJqXHR={};self._cartOpened=!1;self._removeProcesses=0;self._events={addToCart:self._addToCart.bind(self),applyCouponCode:self._applyCouponCode.bind(self),changeCartQuantity:self.changeCartQuantity.bind(self),changedFragments:self._changedFragments.bind(self),couponCodeChange:self._couponCodeChange.bind(self),couponDisplaySwitch:self._couponDisplaySwitch.bind(self),enterCouponCode:self._enterCouponCode.bind(self),minusCartQuantity:self._minusCartQuantity.bind(self),moveNotifications:self._moveNotifications.bind(self),outsideClickEvent:self._outsideClickEvent.bind(self),plusCartQuantity:self._plusCartQuantity.bind(self),removeCartItem:self._removeCartItem.bind(self),updateCart:self._updateCart.bind(self),updatedCartTotals:self._updatedCartTotals.bind(self),showLoginForm:self._showLoginForm.bind(self),submitLoginForm:self._submitLoginForm.bind(self),loginFieldKeydown:self._loginFieldKeydown.bind(self)};if(self.isCart()){self.$cartNotification=$('.w-cart-notification',self.$cart);self.$cartNotification.on('click',()=>{self.$cartNotification.fadeOutCSS()});if($.isMobile){self.$cart.on('click','.w-cart-link',(e)=>{if(!self._cartOpened){e.preventDefault();self.$cart.addClass('opened');$us.$body.on('touchstart.noPreventDefault',self._events.outsideClickEvent)}else{self.$cart.removeClass('opened');$us.$body.off('touchstart',self._events.outsideClickEvent)}
self._cartOpened=!self._cartOpened})}
$us.$body.on('wc_fragments_loaded wc_fragments_refreshed',self._events.changedFragments).on('added_to_cart',self._events.addToCart).on('removed_from_cart',self._events.updateCart)}
if(self.isCartPage()){$us.$body.on('change initControls','input.qty',self._events.changeCartQuantity).on('change','.w-wc-coupon-form input',self._events.couponCodeChange).on('keyup','.w-wc-coupon-form input',self._events.enterCouponCode).on('click','.w-wc-coupon-form button',self._events.applyCouponCode).on('click','a.remove',self._events.removeCartItem).on('click','input.minus',self._events.minusCartQuantity).on('click','input.plus',self._events.plusCartQuantity).on('applied_coupon removed_coupon',self._events.couponDisplaySwitch).on('updated_cart_totals',self._events.updatedCartTotals);$('input.qty',$us.$canvas).trigger('initControls');$.ajaxPrefilter((_,originalOptions,jqXHR)=>{const data=$ush.toString(originalOptions.data);if(data.indexOf('&update_cart')>-1){self._activeJqXHR.updateCart=jqXHR}
if(data.indexOf('&us_calc_shipping')>-1){jqXHR.done((res)=>{$('.w-cart-shipping .woocommerce-shipping-destination').html($('.w-cart-shipping:first .woocommerce-shipping-destination',res).html())})}});$('.w-cart-shipping form.woocommerce-shipping-calculator',$us.$canvas).append('<input type="hidden" name="us_calc_shipping">')}
if(self.isCheckoutPage()){$us.$body.on('change','.w-wc-coupon-form input',self._events.couponCodeChange).on('keyup','.w-wc-coupon-form input',self._events.enterCouponCode).on('click','.w-wc-coupon-form button',self._events.applyCouponCode).on('applied_coupon_in_checkout removed_coupon_in_checkout',self._events.couponDisplaySwitch).on('applied_coupon_in_checkout removed_coupon_in_checkout checkout_error',self._events.moveNotifications).on('click','.w-checkout-login .showlogin',self._events.showLoginForm).on('click','.w-checkout-login button',self._events.submitLoginForm).on('keydown','.w-checkout-login input, .w-checkout-login button',self._events.loginFieldKeydown);const $couponField=$('.w-wc-coupon-form input',$us.$canvas);$us.$document.on('keypress',(e)=>{if(e.keyCode===$ush.ENTER_KEYCODE&&$couponField.is(':focus')){e.preventDefault()}})}
if(self.$addToCart.length>0){$us.$body.on('click','input.minus',self._events.minusCartQuantity).on('click','input.plus',self._events.plusCartQuantity).on('change initControls','input.qty',self._events.changeCartQuantity)}
$us.$document.on('ajaxComplete',(_,jqXHR,settings)=>{const $fragment=$(new DocumentFragment).append(jqXHR.responseText);if(self.isCartPage()&&$('.cart_totals',$fragment).length>1){const notices=self.$notice.html();self.$pageContent.html($('.l-main',$fragment));self.$notice=$('.w-wc-notices.woocommerce-notices-wrapper:first',$us.$canvas);if(notices){self.$notice.html(notices)}}
if(String(settings.url).includes('wc-ajax=apply_coupon')){const $message=$('.woocommerce-error, .woocommerce-message',$fragment);if($message.length>0){self.$notice.html($message.clone())}else{self.$notice.html('')}}})}
$.extend(WooCommerce.prototype,{isCart:function(){return this.$cart.length>0},isCartPage:function(){return $us.$body.hasClass('woocommerce-cart')},isCheckoutPage:function(){return $us.$body.hasClass('woocommerce-checkout')},_updateCart:function(){const self=this;$.each(self.$cart,(_,cart)=>{var $cart=$(cart),$cartQuantity=$('.w-cart-quantity',$cart),miniCartAmount=$('.us_mini_cart_amount:first',$cart).text();if($cart.hasClass('opened')){$cart.removeClass('opened')}
if(miniCartAmount!==_undefined){miniCartAmount=String(miniCartAmount).match(/\d+/g);$cartQuantity.html(miniCartAmount>0?miniCartAmount:'0');$cart[miniCartAmount>0?'removeClass':'addClass']('empty')}else{var total=0;$('.quantity',$cart).each((_,quantity)=>{var matches=String(quantity.innerText).match(/\d+/g);if(matches){total+=parseInt(matches[0],10)}});$cartQuantity.html(total>0?total:'0');$cart[total>0?'removeClass':'addClass']('empty')}})},_changedFragments:function(){this._updateCart()},_addToCart:function(e,fragments,_,$button){if($ush.isUndefined(e)){return}
const self=this;self._updateCart();var $notification=self.$cartNotification,$productName=$('.product-name',$notification),productName=$productName.text();productName=$button.closest('.product').find('.woocommerce-loop-product__title').text();$productName.html(productName);$notification.addClass('shown');$notification.on('mouseenter',()=>{$notification.removeClass('shown')});$ush.timeout(()=>{$notification.removeClass('shown').off('mouseenter')},3000)},_outsideClickEvent:function(e){const self=this;if($.contains(self.$cart[0],e.target)){return}
self.$cart.removeClass('opened');$us.$body.off('touchstart',self._events.outsideClickEvent);self._cartOpened=!1},_removeCartItem:function(e){var $item=$(e.target).closest('.cart_item').addClass('change_process');if(!$item.siblings('.cart_item:not(.change_process)').length){$('.w-cart-table',$us.$canvas).remove()}},changeCartQuantity:function(e){if($us.usbPreview()){return}
const self=this;const $input=$(e.target);const isGroupTable=$input.closest('.cart').hasClass('grouped_form');const max=$ush.parseInt($input.attr('max'))||-1;const min=$ush.parseInt($input.attr('min'))||(isGroupTable?0:1);var value=$ush.parseInt($input.val());if($input.is(':disabled')){return}
if(min>=value){value=min}
if(max>1&&value>=max){value=max}
if(value!=$input.val()){$input.val(value)}
$input.siblings('input.plus:first').prop('disabled',(max>0&&value>=max));$input.siblings('input.minus:first').prop('disabled',(value<=min));if(e.type=='initControls'){return}
$('input[name=us_cart_quantity]',$us.$canvas).val(!0);if(!$('.w-cart-table',$us.$canvas).hasClass('processing')){self.__updateCartForm_long(self._updateCartForm.bind(self))}else{self._updateCartForm()}},_minusCartQuantity:function(e){const self=this;var $target=$(e.target),$input=$target.siblings('input.qty:first');if(!$input.length){return}
const step=$ush.parseInt($input.attr('step')||1);$input.val($ush.parseInt($input.val())-step).trigger('change')},_plusCartQuantity:function(e){const self=this;var $target=$(e.target),$input=$target.siblings('input.qty:first');if(!$input.length){return}
const step=$ush.parseInt($input.attr('step')||1);$input.val($ush.parseInt($input.val())+step).trigger('change')},__updateCartForm_long:$ush.debounce($ush.fn,50),_updateCartForm:function(){const self=this;if(typeof(self._activeJqXHR.updateCart||{}).abort==='function'){self._activeJqXHR.updateCart.abort()}
$('.w-cart-table > button[name=update_cart]',$us.$canvas).removeAttr('disabled').trigger('click')},_updatedCartTotals:function(){const self=this;if(!!self._activeJqXHR.updateCart){self._activeJqXHR.updateCart=_undefined}
var wooElementClasses=['w-cart-shipping','w-cart-table','w-cart-totals','w-checkout-billing','w-checkout-order-review','w-checkout-payment','w-wc-coupon-form',];for(const i in wooElementClasses){$(`.${wooElementClasses[i]}.us_animate_this`,$us.$canvas).removeClass('us_animate_this')}
const $shipping=$('.w-cart-shipping .shipping',$us.$canvas);if(!$shipping.length){return}
$shipping.html($('.w-cart-totals .shipping:first',$us.$canvas).html())},_couponCodeChange:function(e){$('.w-cart-table, form.checkout_coupon:first',$us.$canvas).find('input[name=coupon_code]').val(e.target.value)},_enterCouponCode:function(e){if(e.keyCode===$ush.ENTER_KEYCODE){$(e.target).trigger('change').siblings('button:first').trigger('click')}},_applyCouponCode:function(e){e.stopPropagation();e.preventDefault();$('.w-cart-table, form.checkout_coupon:first',$us.$canvas).find('button[name=apply_coupon]').trigger('click');$(e.target).closest('.w-wc-coupon-form').find('input:first').val('')},_couponDisplaySwitch:function(e){const $coupon=$('.w-wc-coupon-form',$us.$canvas);if(!$coupon.length){return}
if(e.type.indexOf('applied_coupon')>-1&&!$('.woocommerce-error',$us.$canvas).length){$coupon.addClass('coupon_applied')}
if(e.type.indexOf('removed_coupon')>-1&&$('.woocommerce-remove-coupon',$us.$canvas).length<=1){$coupon.removeClass('coupon_applied')}},_moveNotifications:function(e,err_html){const self=this;if(!self.$notice.length){var $cartTotals=$('.w-cart-totals',$us.$canvas),$checkoutPayment=$('.w-checkout-payment',$us.$canvas);if(!$cartTotals.length&&!$checkoutPayment.length){return}}
var $message;if(e.type==='checkout_error'&&err_html){$message=$(err_html)}else{$message=$('.woocommerce-error, .woocommerce-message',$us.$canvas)}
if($message.length>0){self.$notice.html($message.clone())}
$message.remove();if(e.type==='checkout_error'){$('.woocommerce-NoticeGroup-checkout').remove()}},_showLoginForm:function(){$('.woocommerce-form-login').toggleClass('hidden');return!1},_submitLoginForm:function(){const self=this;if(self.isSubmittingLoginForm){return!1}
self.isSubmittingLoginForm=!0;var $formView=$('.w-checkout-login'),$usernameField=$('#us_checkout_login_username',$formView),$passwordField=$('#us_checkout_login_password',$formView),$redirectField=$('#us_checkout_login_redirect',$formView),$nonceField=$('#us_checkout_login_nonce',$formView);if($usernameField.length==0||$passwordField.length==0||$redirectField.length==0||$nonceField.length==0){return!1}
var fields={'login':'Login','rememberme':'forever','username':$usernameField.val(),'password':$passwordField.val(),'redirect':$redirectField.val(),'woocommerce-login-nonce':$nonceField.val(),},$form=$('<form>',{method:'post'});$.each(fields,(key,val)=>{$('<input>').attr({type:"hidden",name:key,value:val}).appendTo($form)});$form.appendTo('body').submit();return!1},_loginFieldKeydown:function(e){if(e.keyCode===$ush.ENTER_KEYCODE){e.stopPropagation();e.preventDefault();this._submitLoginForm()}}});$us.woocommerce=new WooCommerce;function us_wc_variations_image_update(variation){var $slider=$('.w-slider.for_product_image_gallery:not(.w-grid .w-slider)',$(this).closest('.product')),royalSlider=($slider.data('usImageSlider')||{}).royalSlider;if($ush.isUndefined(royalSlider)){return}
royalSlider.goTo(0);var $image=$('.rsImg',royalSlider.slidesJQ[0]),$thumb=$('.rsThumb:first img',$slider);if(variation===!1){if(!$slider.data('orig-img')){var src=$image.attr('src');$slider.data('orig-img',{src:src,srcset:src,full_src:src,thumb_src:$thumb.attr('srcset'),gallery_thumbnail_src:$thumb.attr('src'),});return}
variation={image:$slider.data('orig-img'),}}
if($.isPlainObject(variation.image)){$image.attr('src',$ush.toString(variation.image.src)).attr('srcset',$ush.toString(variation.image.srcset));$thumb.attr('src',$ush.toString(variation.image.gallery_thumbnail_src)).attr('srcset',$ush.toString(variation.image.thumb_src));$.extend(royalSlider.currSlide,{bigImage:$ush.toString(variation.image.full_src),image:$ush.toString(variation.image.src),});if(typeof royalSlider.updateSliderSize==='function'){royalSlider.updateSliderSize(!0)}}}
$(()=>{if($('.w-slider.for_product_image_gallery:not(.w-grid .w-slider.for_product_image_gallery)').length>0){$ush.timeout(()=>{$.fn.wc_variations_image_update=us_wc_variations_image_update},1)}})})(jQuery);
!function(){var e={795:function(){var e,t;(t=t||(e=[],{getAll:function(){return e},add:function(t){e.push(t)},remove:function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)},update:function(t){if(0===e.length)return!1;var i=0;for(t=null!=t?t:window.performance.now();i<e.length;)e[i].update(t)?i++:e.splice(i,1);return!0}})).Tween=function(e){var i={},n={},o={},s=1e3,a=!1,r=0,l=null,h=t.Easing.Linear.None,u=t.Interpolation.Linear,p=null,c=!1,d=null,f=null,g=null;for(var m in e)i[m]=parseFloat(e[m],10);this.to=function(e,t){return null!=t&&(s=t),n=e,this},this.start=function(s){for(var h in t.add(this),a=!0,c=!1,l=(null!=s?s:window.performance.now())+r,n){if(n[h]instanceof Array){if(0===n[h].length)continue;n[h]=[e[h]].concat(n[h])}null!=i[h]&&(i[h]=e[h],i[h]instanceof Array==!1&&(i[h]*=1),o[h]=i[h]||0)}return this},this.stop=function(){return a&&(t.remove(this),a=!1,null!=g&&g.call(e)),this},this.complete=function(){return a&&(t.remove(this),a=!1,null!=f&&f.call(e)),this},this.delay=function(e){return r=e,this},this.easing=function(e){return h=null==e?h:e,this},this.onStart=function(e){return p=e,this},this.onUpdate=function(e){return d=e,this},this.onComplete=function(e){return f=e,this},this.onStop=function(e){return g=e,this},this.update=function(t){if(t<l)return!0;for(o in!1===c&&(null!=p&&p.call(e),c=!0),a=(a=(t-l)/s)>1?1:a,r=h(a),n)if(null!=i[o]){var o,a,r,g=i[o]||0,m=n[o];m instanceof Array?e[o]=u(m,r):("string"==typeof m&&(m=m.startsWith("+")||m.startsWith("-")?g+parseFloat(m,10):parseFloat(m,10)),"number"==typeof m&&(e[o]=g+(m-g)*r))}return null!=d&&d.call(e,r),1!==a||(null!=f&&f.call(e),!1)}},t.Easing={Linear:{None:function(e){return e}},Quadratic:{InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)}},Cubic:{InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}},t.Interpolation={Linear:function(e,i){var n=e.length-1,o=n*i,s=Math.floor(o),a=t.Interpolation.Utils.Linear;return i<0?a(e[0],e[1],o):i>1?a(e[n],e[n-1],n-o):a(e[s],e[s+1>n?n:s+1],o-s)},Utils:{Linear:function(e,t,i){return(t-e)*i+e}}},window.TWEEN=t}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,i),s.exports}i.amdO={},function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||n(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,i){if(t){if("string"==typeof t)return e(t,i);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return e(t,i)}}var o,s,a=new WeakMap,r=new WeakMap;function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e instanceof l)return e;if(!(this instanceof l))return new l(e,t);if(a.set(this,[]),this.length=0,!e)return this;var i=[];return"string"==typeof e?i=e.trim().startsWith("<")&&e.trim().endsWith(">")?(i=Array.from(document.createRange().createContextualFragment(e.trim()).children)).map(function(e){return e.cloneNode(!0)}):Array.from(document.querySelectorAll(e)):e.nodeType||e===window||e===document?i=[e]:void 0!==e.length&&(i=Array.from(e)),this._setElements(i,t),this}function h(){return!0}function u(){return!1}l.prototype._getElements=function(){return a.get(this)||[]},l.prototype._setElements=function(e,i){var n=this;return a.set(this,e),this.length=e.length,Object.keys(this).forEach(function(e){isNaN(e)||delete n[e]}),e.forEach(function(e,o){if(i.hasOwnProperty("class")){var s;(s=e.classList).add.apply(s,t(i.class.trim().split(" ")))}i.hasOwnProperty("id")&&(e.id=i.id),i.hasOwnProperty("title")&&(e.title=i.title),i.hasOwnProperty("html")&&(e.innerHTML=i.html),n[o]=e}),this},l.prototype.on=function(e,t,i){var n,o;return"string"==typeof t&&"function"==typeof i?(o=t,n=i):(n=t,o=null),this._getElements().forEach(function(t){if(o){var i=function(e){if(e.target){var t=e.target.closest(o);t&&(e.originalEvent=e,n.call(t,e))}};t.addEventListener(e,i),t._queryHandlers||(t._queryHandlers={}),t._queryHandlers[e]||(t._queryHandlers[e]=[]),t._queryHandlers[e].push({original:n,wrapped:i,selector:o})}else{var s=function(e){e.originalEvent=e,n.call(t,e)};t.addEventListener(e,s),t._queryHandlers||(t._queryHandlers={}),t._queryHandlers[e]||(t._queryHandlers[e]=[]),t._queryHandlers[e].push({original:n,wrapped:s})}}),this},l.prototype.off=function(){return this._getElements().forEach(function(e){e._queryHandlers&&(Object.keys(e._queryHandlers).forEach(function(t){e._queryHandlers[t].forEach(function(i){e.removeEventListener(t,i.wrapped)})}),e._queryHandlers={})}),this},l.prototype.trigger=function(e){return this._getElements().forEach(function(t){if("string"==typeof e&&"function"==typeof t[e])t[e]();else{var i=new Event(e,{bubbles:!0});t.dispatchEvent(i)}}),this},l.prototype.addClass=function(e){return e&&this._getElements().forEach(function(i){if(i.classList){var n;(n=i.classList).add.apply(n,t(e.trim().split(" ")))}}),this},l.prototype.removeClass=function(e){return e&&this._getElements().forEach(function(i){if(i.classList){var n;(n=i.classList).remove.apply(n,t(e.trim().split(" ")))}}),this},l.prototype.hasClass=function(e){return this._getElements().some(function(t){return t.classList&&t.classList.contains(e)})},l.prototype.toggleClass=function(e,t){return this._getElements().forEach(function(i){void 0===t?i.classList.toggle(e):t?i.classList.add(e):i.classList.remove(e)}),this},l.prototype.css=function(e){var t=["width","height","min-width","min-height","max-width","max-height","margin","marginTop","marginRight","marginBottom","marginLeft","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","top","right","bottom","left","border-width","border-top-width","border-right-width","border-bottom-width","border-left-width","fontSize","lineHeight"];return this._getElements().forEach(function(i){Object.keys(e).forEach(function(n){var o=e[n];null!=o&&""!==o&&!isNaN(parseFloat(o))&&isFinite(o)&&t.includes(n)&&0!==o&&"0"!==o&&"number"==typeof o&&(o+="px"),i.style[n]=o})}),this},l.prototype.prepend=function(e){return e&&this._getElements().forEach(function(t){"string"==typeof e?t.insertAdjacentHTML("afterbegin",e):e instanceof l?e._getElements().forEach(function(e){t.insertBefore(e,t.firstChild)}):e.nodeType&&t.insertBefore(e,t.firstChild)}),this},l.prototype.append=function(e){return e&&this._getElements().forEach(function(t){"string"==typeof e?t.insertAdjacentHTML("beforeend",e):e instanceof l?e._getElements().forEach(function(e){t.contains(e)||t.appendChild(e)}):e.nodeType&&!t.contains(e)&&t.appendChild(e)}),this},l.prototype.appendTo=function(e){var t=e instanceof l?e._getElements()[0]:"string"==typeof e?document.querySelector(e):e;return t&&this._getElements().forEach(function(e){t.contains(e)||t.appendChild(e)}),this},l.prototype.after=function(e){return this._getElements().forEach(function(t){"string"==typeof e?t.insertAdjacentHTML("afterend",e):e instanceof l?e._getElements().forEach(function(e){t.parentNode.insertBefore(e,t.nextSibling)}):e.nodeType&&t.parentNode.insertBefore(e,t.nextSibling)}),this},l.prototype.html=function(e){return void 0===e?this._getElements()[0]?this._getElements()[0].innerHTML:"":(this._getElements().forEach(function(t){t.innerHTML=e}),this)},l.prototype.text=function(e){return void 0===e?this._getElements()[0]?this._getElements()[0].textContent:"":(this._getElements().forEach(function(t){t.textContent=e}),this)},l.prototype.find=function(e){var i=[];return this._getElements().forEach(function(n){var o=n.querySelectorAll(e);i.push.apply(i,t(Array.from(o)))}),new l(i)},l.prototype.children=function(e){var t=[];return this._getElements().forEach(function(i){Array.from(i.children).forEach(function(i){(!e||i.matches(e))&&t.push(i)})}),new l(t)},l.prototype.is=function(e){return this._getElements().some(function(t){return t.matches(e)})},l.prototype.closest=function(e){var t=[];return this._getElements().forEach(function(i){var n=i.closest(e);n&&!t.includes(n)&&t.push(n)}),new l(t)},l.prototype.contains=function(e){var t=e instanceof l?e._getElements()[0]:e;return this._getElements().some(function(e){return e.contains(t)})},l.prototype.siblings=function(e){var i=[];return this._getElements().forEach(function(n){var o=Array.from(n.parentElement.children).filter(function(e){return e!==n});e&&(o=o.filter(function(t){return t.matches(e)})),i.push.apply(i,t(o))}),new l(i)},l.prototype.parent=function(e){var t=this._getElements().map(function(e){return e.parentElement}).filter(function(e){return null!==e});return e&&(t=t.filter(function(t){return t.matches(e)})),new l(t)},l.prototype.each=function(e){return this._getElements().forEach(function(t,i){e.call(t,i,t)}),this},l.prototype.map=function(e){return this._getElements().map(function(t,i){return e.call(t,i,t)}),this},l.prototype.get=function(){return this._getElements()},l.prototype.attr=function(e,t){return 1==arguments.length?this._getElements()[0]?this._getElements()[0].getAttribute(e):void 0:(void 0===t?this._getElements().forEach(function(t){t.removeAttribute(e)}):this._getElements().forEach(function(i){i.setAttribute(e,t)}),this)},l.prototype.removeAttr=function(e){return this._getElements().forEach(function(t){t.removeAttribute(e)}),this},l.prototype.data=function(e,t){if(void 0===t){var i=this._getElements()[0];if(!i)return;var n=r.get(i)||{};if(void 0!==n[e])return n[e];var o=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return i.dataset[o]}return this._getElements().forEach(function(i){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t)i.setAttribute("data-".concat(e),t);else if(null===t){i.removeAttribute("data-".concat(e));var n=r.get(i);n&&void 0!==n[e]&&(delete n[e],r.set(i,n))}else if((void 0===t?"undefined":t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)=="object"){var o=r.get(i)||{};o[e]=t,r.set(i,o)}}),this},l.prototype.height=function(e){if(void 0===e){if(0===this._getElements().length)return 0;var t=this._getElements()[0];return t===window?window.innerHeight:t.offsetHeight}return this._getElements().forEach(function(t){t.style.height="number"==typeof e?e+"px":e}),this},l.prototype.width=function(e){if(void 0===e){if(0===this._getElements().length)return 0;var t=this._getElements()[0];return t===window?window.innerWidth:t.offsetWidth}return this._getElements().forEach(function(t){t.style.width="number"==typeof e?e+"px":e}),this},l.prototype.offset=function(){return{top:this[0].offsetTop,left:this[0].offsetLeft}},l.prototype.remove=function(){return this._getElements().forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),this._setElements([]),this},l.prototype.val=function(e){return void 0===e?this._getElements()[0]?this._getElements()[0].value:"":(this._getElements().forEach(function(t){t.value=e}),this)},l.prototype.hide=function(){return this._getElements().forEach(function(e){e.style.display="none"}),this},l.prototype.show=function(){return this._getElements().forEach(function(e){e.style.display="block"}),this},l.prototype.ready=function(e){document.addEventListener("DOMContentLoaded",e)},l.prototype.scrollTop=function(e){return void 0===e?this._getElements()[0]?this._getElements()[0].scrollTop:0:(this._getElements().forEach(function(t){t.scrollTop=e}),this)},l.prototype.change=function(e){return this._getElements().forEach(function(t){t.addEventListener("change",e)}),this},l.prototype.click=function(){return this._getElements().forEach(function(e){"function"==typeof e.click&&e.click()}),this},l.extend=function(e,t){for(var i=arguments.length,o=Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];if(!t)return{};var a=!0,r=!1,h=void 0;try{for(var u,p=o[Symbol.iterator]();!(a=(u=p.next()).done);a=!0){var c=u.value;if(c){var d=!0,f=!1,g=void 0;try{for(var m,v=Object.entries(c)[Symbol.iterator]();!(d=(m=v.next()).done);d=!0){var y,b=(y=m.value,function(e){if(Array.isArray(e))return e}(y)||function(e,t){var i,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var s=[],a=!0,r=!1;try{for(o=o.call(e);!(a=(i=o.next()).done)&&(s.push(i.value),2!==s.length);a=!0);}catch(e){r=!0,n=e}finally{try{a||null==o.return||o.return()}finally{if(r)throw n}}return s}}(y,2)||n(y,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=b[0],P=b[1];if(P instanceof l)t[w]=P;else switch(Object.prototype.toString.call(P)){case"[object Object]":"[object Object]"===Object.prototype.toString.call(t[w])?t[w]=l.extend(t[w],P):t[w]=l.extend({},P);break;case"[object Array]":t[w]=l.extend(Array(P.length),P);break;default:t[w]=P}}}catch(e){f=!0,g=e}finally{try{d||null==v.return||v.return()}finally{if(f)throw g}}}}}catch(e){r=!0,h=e}finally{try{a||null==p.return||p.return()}finally{if(r)throw h}}return t},l.Event=function(e,t){if(!(this instanceof l.Event))return new l.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?h:u,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&l.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this._eventFixed=!0},l.Event.prototype={constructor:l.Event,isDefaultPrevented:u,isPropagationStopped:u,isImmediatePropagationStopped:u,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=h,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=h,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=h,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},l.event={fix:function(e){return e._eventFixed?e:new l.Event(e)}};var p={jQuery:null,version:"2.4.27",autoDetectLocation:!0,_isHashTriggered:!1,slug:void 0,locationVar:"dearViewerLocation",locationFile:void 0,MOUSE_CLICK_ACTIONS:{NONE:"none",NAV:"nav"},ARROW_KEYS_ACTIONS:{NONE:"none",NAV:"nav"},MOUSE_DBL_CLICK_ACTIONS:{NONE:"none",ZOOM:"zoom"},MOUSE_SCROLL_ACTIONS:{NONE:"none",ZOOM:"zoom",NAV:"nav"},PAGE_SCALE:{PAGE_FIT:"fit",PAGE_WIDTH:"width",AUTO:"auto",ACTUAL:"actual",MANUAL:"manual"},READ_DIRECTION:{LTR:"ltr",RTL:"rtl"},TURN_DIRECTION:{LEFT:"left",RIGHT:"right",NONE:"none"},INFO_TYPE:{INFO:"info",ERROR:"error"},FLIPBOOK_PAGE_MODE:{SINGLE:"single",DOUBLE:"double",AUTO:"auto"},FLIPBOOK_SINGLE_PAGE_MODE:{ZOOM:"zoom",BOOKLET:"booklet",AUTO:"auto"},FLIPBOOK_PAGE_SIZE:{AUTO:"auto",SINGLE:"single",DOUBLE_INTERNAL:"dbl_int",DOUBLE:"dbl",DOUBLE_COVER_BACK:"dbl_cover_back"},LINK_TARGET:{NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},CONTROLS_POSITION:{HIDDEN:"hidden",TOP:"top",BOTTOM:"bottom"},TURN_CORNER:{TL:"tl",TR:"tr",BL:"bl",BR:"br",L:"l",R:"r",NONE:"none"},REQUEST_STATUS:{OFF:"none",ON:"pending",COUNT:"counting"},TEXTURE_TARGET:{THUMB:0,VIEWER:1,ZOOM:2},FLIPBOOK_CENTER_SHIFT:{RIGHT:1,LEFT:-1,NONE:0},FLIPBOOK_COVER_TYPE:{NONE:"none",PLAIN:"plain",BASIC:"basic",RIDGE:"ridge"}};function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}p.fakejQuery=!1,"undefined"==typeof jQuery?(p.fakejQuery=!0,p.jQuery=l):p.jQuery=jQuery,p._defaults={is3D:!0,has3DShadow:!0,color3DCover:"#aaaaaa",color3DSheets:"#fff",cover3DType:p.FLIPBOOK_COVER_TYPE.NONE,flexibility:.9,drag3D:!1,height:"auto",autoOpenOutline:!1,autoOpenThumbnail:!1,showDownloadControl:!0,showSearchControl:!0,showPrintControl:!0,enableSound:!0,duration:800,pageRotation:0,flipbook3DTiltAngleUp:0,flipbook3DTiltAngleLeft:0,readDirection:p.READ_DIRECTION.LTR,pageMode:p.FLIPBOOK_PAGE_MODE.AUTO,singlePageMode:p.FLIPBOOK_SINGLE_PAGE_MODE.AUTO,flipbookFitPages:!1,backgroundColor:"transparent",flipbookHardPages:"none",openPage:1,annotationClass:"",maxTextureSize:3200,minTextureSize:256,rangeChunkSize:524288,disableAutoFetch:!0,disableStream:!0,disableFontFace:!1,calendarMode:!1,icons:{altnext:"df-icon-arrow-right1",altprev:"df-icon-arrow-left1",next:"df-icon-arrow-right1",prev:"df-icon-arrow-left1",end:"df-icon-last-page",start:"df-icon-first-page",share:"df-icon-share","outline-open":"df-icon-arrow-right","outline-close":"df-icon-arrow-down",help:"df-icon-help",more:"df-icon-more",download:"df-icon-download",zoomin:"df-icon-add-circle",zoomout:"df-icon-minus-circle",resetzoom:"df-icon-minus-circle",fullscreen:"df-icon-fullscreen","fullscreen-off":"df-icon-fit-screen",fitscreen:"df-icon-fit-screen",thumbnail:"df-icon-grid-view",outline:"df-icon-list",close:"df-icon-close",doublepage:"df-icon-double-page",singlepage:"df-icon-file",print:"df-icon-print",play:"df-icon-play",pause:"df-icon-pause",search:"df-icon-search",sound:"df-icon-volume","sound-off":"df-icon-volume",facebook:"df-icon-facebook",google:"df-icon-google",twitter:"df-icon-twitter",whatsapp:"df-icon-whatsapp",linkedin:"df-icon-linkedin",pinterest:"df-icon-pinterest",mail:"df-icon-mail"},text:{toggleSound:"Turn on/off Sound",toggleThumbnails:"Toggle Thumbnails",toggleOutline:"Toggle Outline/Bookmark",previousPage:"Previous Page",nextPage:"Next Page",toggleFullscreen:"Toggle Fullscreen",zoomIn:"Zoom In",zoomOut:"Zoom Out",resetZoom:"Reset Zoom",pageFit:"Fit Page",widthFit:"Fit Width",toggleHelp:"Toggle Help",search:"Search in PDF",singlePageMode:"Single Page Mode",doublePageMode:"Double Page Mode",downloadPDFFile:"Download PDF File",gotoFirstPage:"Goto First Page",gotoLastPage:"Goto Last Page",print:"Print",play:"Start AutoPlay",pause:"Pause AutoPlay",share:"Share",close:"Close",mailSubject:"Check out this FlipBook",mailBody:"Check out this site {{url}}",loading:"Loading",thumbTitle:"Thumbnails",outlineTitle:"Table of Contents",searchTitle:"Search",searchPlaceHolder:"Search",searchClear:"Clear",searchSearchingInfo:"Searching Page:",searchResultsFound:"results found",searchResultsNotFound:"No results Found!",searchResultPage:"Page",searchResult:"result",searchResults:"results",searchMinimum:"Minimum 3 letters required!",analyticsEventCategory:"DearFlip",analyticsViewerReady:"Document Ready",analyticsViewerOpen:"Document Opened",analyticsViewerClose:"Document Closed",analyticsFirstPageChange:"First Page Changed"},share:{facebook:"https://www.facebook.com/sharer/sharer.php?u={{url}}&t={{mailsubject}}",twitter:"https://twitter.com/share?url={{url}}&text={{mailsubject}}",mail:void 0,whatsapp:"https://api.whatsapp.com/send/?text={{mailsubject}}+{{url}}&app_absent=0",linkedin:"https://www.linkedin.com/shareArticle?url={{url}}&title={{mailsubject}}",pinterest:"https://www.pinterest.com/pin/create/button/?url={{url}}&media=&description={{mailsubject}}"},allControls:"altPrev,pageNumber,altNext,play,outline,thumbnail,zoomIn,zoomOut,zoom,fullScreen,share,download,search,pageMode,startPage,endPage,sound,search,print,more",moreControls:"download,pageMode,pageFit,startPage,endPage,sound",leftControls:"outline,thumbnail",rightControls:"fullScreen,share,download,more",hideControls:"",hideShareControls:"",controlsPosition:p.CONTROLS_POSITION.BOTTOM,paddingTop:20,paddingLeft:15,paddingRight:15,paddingBottom:20,enableAnalytics:!1,hashNavigationEnabled:!1,zoomRatio:2,maxDPI:2,fakeZoom:1,progressiveZoom:!1,pageScale:p.PAGE_SCALE.PAGE_FIT,controlsFloating:!0,sideMenuOverlay:!0,enableAnnotation:!0,enableAutoLinks:!0,arrowKeysAction:p.ARROW_KEYS_ACTIONS.NAV,clickAction:p.MOUSE_CLICK_ACTIONS.NAV,dblClickAction:p.MOUSE_DBL_CLICK_ACTIONS.NONE,mouseScrollAction:p.MOUSE_SCROLL_ACTIONS.NONE,linkTarget:p.LINK_TARGET.BLANK,soundFile:"sound/turn2.mp3",imagesLocation:"images",imageResourcesPath:"images/pdfjs/",popupThumbPlaceholder:"data:image/svg+xml,"+escape('<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 210 297"><rect width="210" height="297" style="fill:#f1f2f2"/><circle cx="143" cy="95" r="12" style="fill:#e3e8ed"/><polygon points="131 138 120 149 95 124 34 184 176 185 131 138" style="fill:#e3e8ed"/></svg>'),cMapUrl:"js/libs/cmaps/",logo:"",logoUrl:"",sharePrefix:"",pageSize:p.FLIPBOOK_PAGE_SIZE.AUTO,backgroundImage:"",pixelRatio:window.devicePixelRatio||1,spotLightIntensity:.22,ambientLightColor:"#fff",ambientLightIntensity:.8,shadowOpacity:.1,slug:void 0,headerElementSelector:void 0,onReady:function(e){},onPageChanged:function(e){},beforePageChanged:function(e){},onCreate:function(e){},onCreateUI:function(e){},onFlip:function(e){},beforeFlip:function(e){},autoPDFLinktoViewer:!1,autoLightBoxFullscreen:!1,thumbLayout:"book-title-hover",cleanupAfterRender:!0,canvasWillReadFrequently:!0,providerType:"pdf",loadMoreCount:-1,autoPlay:!1,autoPlayDuration:1e3,autoPlayStart:!1,popupBackGroundColor:"#eee",mockupMode:!1,instantTextureProcess:!1,cachePDFTexture:!1,pdfVersion:"default"},p.defaults={},p.jQuery.extend(!0,p.defaults,p._defaults),p.viewers={},p.providers={},p.openFileOptions={},p.executeCallback=function(){};var d=p.jQuery,f="WebKitCSSMatrix"in window||document.body&&"MozPerspective"in document.body.style,g="onmousedown"in window,m=p.utils={mouseEvents:g?{type:"mouse",start:"mousedown",move:"mousemove",end:"mouseup"}:{type:"touch",start:"touchstart",move:"touchmove",end:"touchend"},html:{div:"<div></div>",a:"<a>",input:"<input type='text'/>",select:"<select></select>"},getSharePrefix:function(){return m.getSharePrefixes()[0]},getSharePrefixes:function(){return(p.defaults.sharePrefix+",dflip-,flipbook-,dearflip-,dearpdf-").split(",").map(function(e){return e.trim()})},toRad:function(e){return e*Math.PI/180},toDeg:function(e){return 180*e/Math.PI},ifdef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null==e?t:e},createBtn:function(e,t,i){var n=d(m.html.div,{class:"df-ui-btn df-ui-"+e,title:i,html:void 0!==i?"<span>"+i+"</span>":""});return void 0!==t&&t.indexOf("<svg")>-1?n.html(t.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg" ')):n.addClass(t),n},transition:function(e,t){return e?t/1e3+"s ease-out":"0s none"},display:function(e){return e?"block":"none"},resetTranslate:function(){return m.translateStr(0,0)},bgImage:function(e){return null==e||"blank"===e?"":' url("'+e+'")'},translateStr:function(e,t){return f?" translate3d("+e+"px,"+t+"px, 0px) ":" translate("+e+"px, "+t+"px) "},httpsCorrection:function(e){try{if(null==e)return null;if("string"!=typeof e)return e;var t=window.location;if(t.href.split(".")[0]===e.split(".")[0])return e;e.split("://")[1].split("/")[0].replace("www.","")===t.hostname.replace("www.","")&&e.indexOf(t.hostname.replace("www.",""))>-1&&(t.href.indexOf("https://")>-1?e=e.replace("http://","https://"):t.href.indexOf("http://")>-1&&(e=e.replace("https://","http://")),t.href.indexOf("://www.")>-1&&-1===e.indexOf("://www.")&&(e=e.replace("://","://www.")),-1===t.href.indexOf("://www.")&&e.indexOf("://www.")>-1&&(e=e.replace("://www.","://")))}catch(t){console.log("Skipping URL correction: "+e)}return e},rotateStr:function(e){return" rotateZ("+e+"deg) "},lowerPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},nearestPowerOfTwo:function(e,t){return Math.min(t||2048,Math.pow(2,Math.ceil(Math.log(e)/Math.LN2)))},getFullscreenElement:function(){return document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement},hasFullscreenEnabled:function(){return document.fullscreenEnabled||document.mozFullScreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled},fixMouseEvent:function(e){if(!e)return e;var t=e.originalEvent||e;if(!t.changedTouches||!(t.changedTouches.length>0))return e;var i=d.event.fix(e),n=t.changedTouches[0];return i.clientX=n.clientX,i.clientY=n.clientY,i.pageX=n.pageX,i.touches=t.touches,i.pageY=n.pageY,i.movementX=n.movementX,i.movementY=n.movementY,i},limitAt:function(e,t,i){return e<t?t:e>i?i:e},distOrigin:function(e,t){return m.distPoints(0,0,e,t)},distPoints:function(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))},angleByDistance:function(e,t){var i=t/2,n=m.limitAt(e,0,t);return n<i?m.toDeg(Math.asin(n/i)):90+m.toDeg(Math.asin((n-i)/i))},calculateScale:function(e,t){var i=m.distPoints(e[0].x,e[0].y,e[1].x,e[1].y);return m.distPoints(t[0].x,t[0].y,t[1].x,t[1].y)/i},getVectorAvg:function(e){return{x:e.map(function(e){return e.x}).reduce(m.sum)/e.length,y:e.map(function(e){return e.y}).reduce(m.sum)/e.length}},sum:function(e,t){return e+t},getTouches:function(e,t){return t=t||{left:0,top:0},Array.prototype.slice.call(e.touches).map(function(e){return{x:e.pageX-t.left,y:e.pageY-t.top}})},getScriptCallbacks:[],getScript:function(e,t,i,n){var o,s=m.getScriptCallbacks[e];function a(){o.removeEventListener("load",r,!1),o.removeEventListener("readystatechange",r,!1),o.removeEventListener("complete",r,!1),o.removeEventListener("error",l,!1),o.onload=o.onreadystatechange=null,o=null,o=null}function r(e,t){if(null!=o&&(t||!o.readyState||/loaded|complete/.test(o.readyState))){if(!t){for(var n=0;n<s.length;n++)s[n]&&s[n](),s[n]=null;i=null}a()}}function l(){i(),a(),i=null}if(0===d("script[src='"+e+"']").length){(s=m.getScriptCallbacks[e]=[]).push(t),o=document.createElement("script");var h=document.body.getElementsByTagName("script")[0];o.async=!0,o.setAttribute("data-cfasync","false"),!0===n&&o.setAttribute("type","module"),null!=h?(h.parentNode.insertBefore(o,h),h=null):document.body.appendChild(o),o.addEventListener("load",r,!1),o.addEventListener("readystatechange",r,!1),o.addEventListener("complete",r,!1),i&&o.addEventListener("error",l,!1),o.src=e+("MS"===m.prefix.dom?"?"+Math.random():"")}else s.push(t)},loadScript:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(function(i,n){var o=document.createElement("script");o.src=e,o.onload=function(e){t&&o.remove(),i(e)},o.onerror=function(){n(Error("Cannot load script at: ".concat(o.src)))},(document.head||document.documentElement).append(o)})},detectScriptLocation:function(){if(void 0===window[p.locationVar])d("script").each(function(){var e=d(this)[0].src;if((e.indexOf("/"+p.locationFile+".js")>-1||e.indexOf("/"+p.locationFile+".min.js")>-1||e.indexOf("js/"+p.locationFile+".")>-1)&&(e.indexOf("https://")>-1||e.indexOf("http://")>-1)){var t=e.split("/");window[p.locationVar]=t.slice(0,-2).join("/")}});else if(-1==window[p.locationVar].indexOf(":")){var e=document.createElement("a");e.href=window[p.locationVar],window[p.locationVar]=e.href,e=null}void 0!==window[p.locationVar]&&window[p.locationVar].length>2&&"/"!==window[p.locationVar].slice(-1)&&(window.window[p.locationVar]+="/")},disposeObject:function(e){return e&&e.dispose&&e.dispose(),e=null},log:function(){for(var e,t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];!0===p.defaults.enableDebugLog&&window.console&&(e=console).log.apply(e,function(e){if(Array.isArray(e))return c(e)}(i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return c(e,void 0);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return c(e,void 0)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())},color:{getBrightness:function(e){var t=e.replace("#","").match(/.{1,2}/g).map(function(e){return parseInt(e,16)});return .299*t[0]+.587*t[1]+.114*t[2]},isLight:function(e){return!m.color.isDark(e)},isDark:function(e){return 128>m.color.getBrightness(e)}},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),isIOS:/(iPad|iPhone|iPod)/g.test(navigator.userAgent),isIPad:"iPad"===navigator.platform||void 0!==navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/Mac/.test(navigator.platform),isMac:navigator.platform.toUpperCase().indexOf("MAC")>=0,isSafari:/constructor/i.test(window.HTMLElement)||"[object SafariRemoteNotification]"===(!window.safari||window.safari.pushNotification).toString(),isIEUnsupported:!!navigator.userAgent.match(/(MSIE|Trident)/),isSafariWindows:function(){return!m.isMac&&m.isSafari},hasWebgl:function(){try{var e=document.createElement("canvas");return!!(window.WebGLRenderingContext&&(e.getContext("webgl")||e.getContext("experimental-webgl")))}catch(e){return!1}}(),hasES2022:void 0!==Array.prototype.at,canSupport3D:function(){var e=!0;try{if(!1==m.hasWebgl)e=!1,console.log("Proper Support for Canvas webgl 3D not detected!");else if(!1==m.hasES2022)e=!1,console.log("Proper Support for 3D not extpected in older browser!");else if(-1!==navigator.userAgent.indexOf("MSIE")||navigator.appVersion.indexOf("Trident/")>0)e=!1,console.log("Proper Support for 3D not detected for IE!");else if(m.isSafariWindows())e=!1,console.log("Proper Support for 3D not detected for Safari!");else{var t=navigator.userAgent.toString().toLowerCase().match(/android\s([0-9\.]*)/i);(t=t?t[1]:void 0)&&(t=parseInt(t,10),!isNaN(t)&&t<9&&(e=!1,console.log("Proper Support for 3D not detected for Android below 9.0!")))}}catch(e){}return e},prefix:(o=window.getComputedStyle(document.documentElement,""),s=Array.prototype.slice.call(o).join("").match(/-(moz|webkit|ms)-/)[1],{dom:"WebKit|Moz|MS".match(RegExp("("+s+")","i"))[1],lowercase:s,css:"-"+s+"-",js:s[0].toUpperCase()+s.substr(1)}),scrollIntoView:function(e,t,i){(t=t||e.parentNode).scrollTop=e.offsetTop+(!1===i?e.offsetHeight-t.offsetHeight:0),t.scrollLeft=e.offsetLeft-t.offsetLeft},getVisibleElements:function(e){var t=e.container,i=e.elements,n=e.visible||[],o=t.scrollTop,s=o+t.clientHeight;if(0==s)return n;var a=0,r=i.length-1,l=i[a],h=l.offsetTop+l.clientTop+l.clientHeight;if(h<o)for(;a<r;){var u=a+r>>1;(h=(l=i[u]).offsetTop+l.clientTop+l.clientHeight)>o?r=u:a=u+1}for(var p=a;p<i.length;p++)if((l=i[p]).offsetTop+l.clientTop<=s)n.push(p+1);else break;return n},getMouseDelta:function(e){var t=0;return null!=e.wheelDelta?t=e.wheelDelta:null!=e.detail&&(t=-e.detail),t},pan:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e.startPoint,o=e.app.zoomValue,s=e.left+(!0===i?0:t.raw.x-n.raw.x),a=e.top+(!0===i?0:t.raw.y-n.raw.y);e.left=Math.ceil(m.limitAt(s,-e.shiftWidth,e.shiftWidth)),e.top=Math.ceil(m.limitAt(a,-e.shiftHeight,e.shiftHeight)),1===o&&(e.left=0,e.top=0),!1===i&&(e.startPoint=t)},elementIntersection:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e[0].getBoundingClientRect(),o=t[0].getBoundingClientRect(),s=Math.max(n.left,Math.floor(o.left)),a=Math.max(n.top,Math.floor(o.top)),r=Math.min(n.right,o.right),l=Math.min(n.bottom,o.bottom),h=Math.max(r-s,0),u=Math.max(l-a,0);return i?{left:Math.max(n.left-o.left,0),top:Math.max(n.top-o.top,0),width:h,height:u}:{left:s,top:a,right:r,bottom:l,width:h,height:u}}};m.isChromeExtension=function(){return 0===window.location.href.indexOf("chrome-extension://")};var v=/\x00+/g,y=/[\x01-\x1F]/g;m.removeNullCharacters=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"string"!=typeof e?(warn("The argument for removeNullCharacters must be a string."),e):(t&&(e=e.replace(y," ")),e.replace(v,""))},p.hashFocusBookFound=!1,m.detectHash=function(){p.preParseHash=window.location.hash;var e=m.getSharePrefixes();-1==e.indexOf("")&&e.push(""),Array.prototype.forEach.call(e,function(e){var t=p.preParseHash,i="#"+e;if(t&&t.indexOf(i)>=0&&!1===p.hashFocusBookFound){i.length>1&&(t=t.split(i)[1]);var n=t.split("/")[0].replace("#","");if(n.length>0)try{var o,s=t.split("/")[1];if(null!=s&&(s=s.split("/")[0]),o=d("[data-df-slug="+n+"]"),0===o.length&&(o=d("[data-slug="+n+"]")),0===o.length&&(o=d("#df-"+n+",#"+n)),0===o.length&&(o=d("[data-_slug="+n+"]")),o.length>0&&o.is("._df_thumb,._df_button,._df_custom,._df_link,._df_book,.df-element,.dp-element")){o=d(o[0]),p.hashFocusBookFound=!0,s=parseInt(s,10),m.focusHash(o);var a=p.activeLightBox&&p.activeLightBox.app||o.data("df-app");if(null!=a)return a.gotoPage(s),m.focusHash(a.element),!1;null!=s&&o.attr("data-hash-page",s),o.addClass("df-hash-focused",!0),null!=o.data("lightbox")||null!=o.data("df-lightbox")?(p._isHashTriggered=!0,o.trigger("click"),p._isHashTriggered=!1):null!=o.attr("href")&&o.attr("href").indexOf(".pdf")>-1&&o.trigger("click")}}catch(e){console.log(e)}}})},m.focusHash=function(e){var t,i;null===(t=(i=e[0]).scrollIntoView)||void 0===t||t.call(i,{behavior:"smooth",block:"nearest",inline:"nearest"})},m.contain=function(e,t,i,n){var o=Math.min(i/e,n/t);return{width:e*o,height:t*o}},m.containUnStretched=function(e,t,i,n){var o=Math.min(1,i/e,n/t);return{width:e*o,height:t*o}},m.fallbackOptions=function(e){return void 0===e.share.mail&&(e.share.mail="mailto:?subject="+e.text.mailSubject+"&body="+e.text.mailBody),e.openPage&&(e.openPage=parseInt(e.openPage,10)),e};var b=function(e){var t={},i={id:"",thumb:"",openPage:"data-hash-page,df-page,data-df-page,data-page,page",target:"",height:"",showDownloadControl:"data-download",source:"pdf-source,df-source,source",is3D:"webgl,is3d",viewerType:"viewertype,viewer-type",pageMode:"pagemode"};for(var n in i)for(var o=(n+","+i[n]).split(","),s=0;s<o.length;s++){var a=o[s];if(""!==a){var r=e.data(a);if(null!==r&&""!==r&&void 0!==r||null!==(r=e.attr(a))&&""!==r&&void 0!==r){t[n]=r;break}}}return e.removeAttr("data-hash-page"),t};m.getOptions=function(e){void 0==(e=d(e)).data("df-option")&void 0==e.data("option")&&e.data("df-option","option_"+e.attr("id")),void 0!==e.attr("source")&&e.data("df-source",e.attr("source"));var t=e.data("df-option")||e.data("option"),i=void 0;i=(void 0===t?"undefined":t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)=="object"?t:null==t||""===t||null==window[t]?{}:window[t];var n=b(e);return d.extend(!0,{},i,n)},m.isTrue=function(e){return"true"===e||!0===e},m.parseInt=function(e){return parseInt(e,10)},m.parseFloat=function(e){return parseFloat(e)},m.parseIntIfExists=function(e){return void 0!==e&&(e=parseInt(e,10)),e},m.parseFloatIfExists=function(e){return void 0!==e&&(e=parseFloat(e)),e},m.parseBoolIfExists=function(e){return void 0!==e&&(e=m.isTrue(e)),e},m.getCurveAngle=function(e,t){var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e?(i=t>135?180-(180-t)*2:t>45?t-45:0,i=m.limitAt(i,n,180)):(i=t<45?2*t:t<135?t+45:180,i=m.limitAt(i,0,180-n)),i},m.sanitizeOptions=function(e){if(e.showDownloadControl=m.parseBoolIfExists(e.showDownloadControl),e.showSearchControl=m.parseBoolIfExists(e.showSearchControl),e.showPrintControl=m.parseBoolIfExists(e.showPrintControl),e.flipbook3DTiltAngleLeft=m.parseIntIfExists(e.flipbook3DTiltAngleLeft),e.flipbook3DTiltAngleUp=m.parseIntIfExists(e.flipbook3DTiltAngleUp),e.paddingLeft=m.parseIntIfExists(e.paddingLeft),e.paddingRight=m.parseIntIfExists(e.paddingRight),e.paddingTop=m.parseIntIfExists(e.paddingTop),e.paddingBottom=m.parseIntIfExists(e.paddingBottom),e.duration=m.parseIntIfExists(e.duration),e.rangeChunkSize=m.parseIntIfExists(e.rangeChunkSize),e.maxTextureSize=m.parseIntIfExists(e.maxTextureSize),e.linkTarget=m.parseIntIfExists(e.linkTarget),e.zoomRatio=m.parseFloatIfExists(e.zoomRatio),e.enableAnalytics=m.parseBoolIfExists(e.enableAnalytics),e.autoPlay=m.parseBoolIfExists(e.autoPlay),e.autoPlayStart=m.parseBoolIfExists(e.autoPlayStart),e.autoPlayDuration=m.parseIntIfExists(e.autoPlayDuration),void 0!==e.loadMoreCount&&(e.loadMoreCount=m.parseInt(e.loadMoreCount),(isNaN(e.loadMoreCount)||0===e.loadMoreCount)&&(e.loadMoreCount=-1)),null!=e.source&&(Array===e.source.constructor||Array.isArray(e.source)||e.source instanceof Array))for(var t=0;t<e.source.length;t++)e.source[t]=m.httpsCorrection(e.source[t]);else e.source=m.httpsCorrection(e.source);return e},m.finalizeOptions=function(e){return e},m.urlify=function(e){for(var t,i,n=/[a-zA-Z0-9][^\s,]{3,}\.[^\s,]+[a-zA-Z0-9]/gi,o=[];t=n.exec(e);){var s=t[0];1==(s.match(/@/g)||[]).length?s.match(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,7})+/gi)&&o.push({index:t.index,length:s.length,text:s}):s.match(/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b[-a-zA-Z0-9@:%_\+.~#?&//=]*/g)&&(0===(i=s.toLowerCase()).indexOf("http:")||0===i.indexOf("https:")||0===i.indexOf("www."))&&o.push({index:t.index,length:s.length,text:s})}return o},m.oldurlify=function(e){return e.replace(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)/g,function(e,t,i,n,o){var s=e=e.toLowerCase();if(e.indexOf(":")>0&&-1===e.indexOf("http:")&&-1===e.indexOf("https:"))return m.log("AutoLink Rejected: "+s+" for "+e),e;if(0===e.indexOf("www."))s="http://"+e;else if(0===e.indexOf("http://")||0===e.indexOf("https://"));else if(0===e.indexOf("mailto:"));else if(e.indexOf("@")>0&&(s="mailto:"+e,null===e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)))return m.log("AutoLink Rejected: "+s+" for "+e),e;return m.log("AutoLink: "+s+" for "+e),'<a href="'+s+'" class="df-autolink" target="_blank">'+e+"</a>"})},m.supportsPassive=!1;try{var w=Object.defineProperty({},"passive",{get:function(){m.supportsPassive=!0}});window.addEventListener("testPassive",null,w),window.removeEventListener("testPassive",null,w)}catch(e){}p.parseCSSElements=function(){d(".dvcss").each(function(){var e,t=d(this),i=function(e){for(var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dvcss_e_",n=e.classList,o=0;o<n.length;o++)if(0===(t=n[o]).indexOf(i))return t;return null}(t[0]);t.removeClass(i).removeClass("dvcss"),i=i.replace("dvcss_e_","");try{e=JSON.parse(atob(i))}catch(e){}if(e){var n="df_option_"+e.id;window[n]=d.extend(!0,{},window[n],e),t.addClass("df-element"),"none"!==e.lightbox&&(t.attr("data-df-lightbox",void 0===e.lightbox?"custom":e.lightbox),"thumb"==e.lightbox&&t.attr("data-df-thumb",e.pdfThumb),e.thumbLayout&&t.attr("data-df-thumb-layout",e.thumbLayout),e.apl&&t.attr("apl",e.apl)),t.data("df-option",n),t.attr("data-df-slug",e.slug),t.attr("id","df_"+e.id)}})},p.parseThumbs=function(e){e.element.html(""),(null==e.thumbURL||""==e.thumbURL.toString().trim())&&(e.element.addClass("df-thumb-not-found"),e.thumbURL=p.defaults.popupThumbPlaceholder);var t=d("<span class='df-book-title'>").html(e.title),i=d("<div class='df-book-wrapper'>").appendTo(e.element);i.append(d("<div class='df-book-page1'>")),i.append(d("<div class='df-book-page2'>"));var n=d("<div class='df-book-cover'>").append(t).appendTo(i),o=e.element.hasClass("df-skip-lazy"),s=d('<img width="210px" height="297px" class="df-lazy" alt="'+e.title+'"/>');n.prepend(s),o?(s.attr("src",e.thumbURL),s.removeClass("df-lazy")):(s.attr("data-src",e.thumbURL),s.attr("src",p.defaults.popupThumbPlaceholder),p.addLazyElement(s[0])),!0===p.defaults.displayLightboxPlayIcon&&n.addClass("df-icon-play-popup"),"book-title-top"===e.thumbLayout?t.prependTo(e.element):("book-title-bottom"===e.thumbLayout||"cover-title"===e.thumbLayout)&&(e.hasShelf?e.thumbLayout="book-title-fixed":t.appendTo(e.element),!0===p.defaults.displayLightboxPlayIcon&&(e.element.removeClass("df-icon-play-popup"),i.addClass("df-icon-play-popup"))),e.element.addClass("df-tl-"+e.thumbLayout),e.element.attr("title",e.title)},p.initId=10,p.embeds=[],p.activeEmbeds=[],p.removeEmbeds=[],p.removeEmbedsLimit=m.isMobile?1:2,p.parseNormalElements=function(){d(".df-posts").each(function(){if(!1!==p.defaults.loadMoreCount&&-1!==p.defaults.loadMoreCount){var e=d(this);if("true"!==e.data("df-parsed")){e.data("df-parsed","true"),e.attr("df-parsed","true");var t=0,i=e.find(".df-element"),n=i.length;i.each(function(){++t>p.defaults.loadMoreCount&&d(this).attr("skip-parse","true")}),n>p.defaults.loadMoreCount&&e.append("<div class='df-load-more-button-wrapper'><div class='df-load-more-button'>Load More..</div></div>")}}}),p.triggerId=10,d(".df-element").each(function(){var e=d(this);if("true"!==e.attr("skip-parse")&&"true"!==e.data("df-parsed")){e.data("df-parsed","true"),e.attr("df-parsed","true");var t=e.data("df-lightbox")||e.data("lightbox");if(void 0===t)e.addClass("df-lazy-embed"),p.addLazyElement(e[0]);else if(e.addClass("df-popup-"+t),"thumb"===t){var i=e.data("df-thumb-layout")||p.defaults.thumbLayout,n=m.httpsCorrection(e.data("df-thumb"));e.removeAttr("data-thumb").removeAttr("data-thumb-layout");var o=e.html().trim();(void 0===o||""===o)&&(o="Click to Open");var s=e.parent().hasClass("df-has-shelf");p.parseThumbs({element:e,thumbURL:n,title:o,thumbLayout:i,hasShelf:s}),s&&e.after(d("<df-post-shelf>"))}else"button"===t&&p.defaults.buttonClass&&e.addClass(p.defaults.buttonClass);var a=e.attr("data-trigger");null!=a&&a.length>1&&(a=a.split(","),p.triggerId++,a.forEach(function(t){e.attr("df-trigger-id",p.triggerId),d("#"+t).addClass("df-trigger").attr("df-trigger",p.triggerId)}))}}),p.handleLazy=function(){var e;if(p.removeEmbeds.length>p.removeEmbedsLimit&&(e=p.removeEmbeds.shift())){var t=d("[initID='"+e+"']");if(t.length>0){var i=t.data("df-app");if(i){t.attr("data-df-page",i.currentPageNumber),m.log("Removed app id "+e),i.dispose(),i=null;var n=p.activeEmbeds.indexOf(e);n>-1&&p.activeEmbeds.splice(n,1)}}}if(e=p.embeds.shift()){var o=d("[initID='"+e+"']");if(o.length>0){if(o.is("img"))o.hasClass("df-lazy")?(o.attr("src",o.attr("data-src")),o.removeAttr("data-src"),o.removeClass("df-lazy"),p.lazyObserver.unobserve(o[0])):m.log("Prevent this"),p.handleLazy();else{var s=o.data("df-app");null==s?new p.Application({element:o}):s.softInit(),m.log("Created app id "+e),p.activeEmbeds.push(e)}}}p.removeEmbeds.length<=p.removeEmbedsLimit&&0==p.embeds.length&&(p.checkRequestQueue=null)}},p.lazyObserver={observe:function(e){(e=d(e)).is("img")?e.hasClass("df-lazy")&&(e.attr("src",e.attr("data-src")),e.removeAttr("data-src"),e.removeClass("df-lazy")):new p.Application({element:e})}},"function"==typeof IntersectionObserver&&(p.lazyObserver=new IntersectionObserver(function(e,t){e.forEach(function(e){var t,i=d(e.target),n=i.attr("initID");e.isIntersecting?(!i.attr("initID")&&(i.attr("initID",p.initId),n=p.initId.toString(),p.initId++),(t=p.removeEmbeds.indexOf(n))>-1?(p.removeEmbeds.splice(t,1),m.log("Removed id "+n+"from Removal list")):-1==(t=p.embeds.indexOf(n))&&(p.embeds.push(n),m.log("Added id "+n+"to Add list"))):n&&((t=p.embeds.indexOf(n))>-1?(p.embeds.splice(t,1),m.log("Removed id "+n+" from Add list")):-1==(t=p.removeEmbeds.indexOf(n))&&(p.removeEmbeds.push(n),m.log("Added id "+n+" to Removal list"))),P=0,(p.removeEmbeds.length>p.removeEmbedsLimit||p.embeds.length>0)&&null==p.checkRequestQueue&&(p.checkRequestQueue=function(){P++,p.checkRequestQueue&&requestAnimationFrame(function(){p&&p.checkRequestQueue&&p.checkRequestQueue()}),P>20&&(P=0,p.handleLazy())},p.checkRequestQueue())})}));var P=0;p.addLazyElement=function(e){p.lazyObserver.observe(e)},p.parseElements=m.parseElements=function(){p.parseCSSElements(),p.parseNormalElements()},p.initUtils=function(){m.detectScriptLocation();var e=d("body");(m.isSafari||m.isIOS)&&e.addClass("df-ios"),e.on("click",function(){}),e.on("click",".df-posts .df-load-more-button",function(){var e=d(this).closest(".df-posts");if(e.length>0){var t=0;e.find(".df-element").each(function(){var e=d(this);"true"===e.attr("skip-parse")&&(t<p.defaults.loadMoreCount&&e.removeAttr("skip-parse"),t++)}),p.parseNormalElements()}}),p.defaults.shelfImage&&""!=p.defaults.shelfImage&&e.append("<style>.df-has-shelf df-post-shelf:before, .df-has-shelf df-post-shelf:after{background-image: url('"+p.defaults.shelfImage+"');}</style>")};var S=p.jQuery,E=p.utils,x=/*#__PURE__*/function(){var e;function t(e,i){(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,t),this.pages=[],this.app=i,this.parentElement=this.app.viewerContainer;var n="df-viewer "+(e.viewerClass||"");this.element=S("<div>",{class:n}),this.parentElement.append(this.element),this.wrapper=S("<div>",{class:"df-viewer-wrapper"}),this.element.append(this.wrapper),this.oldBasePageNumber=0,this.pages=[],this.minZoom=1,this.maxZoom=4,this.swipeThreshold=20,this.stageDOM=null,this.events={},this.arrowKeysAction=e.arrowKeysAction,this.clickAction=e.clickAction,this.scrollAction=e.scrollAction,this.dblClickAction=e.dblClickAction,this.pageBuffer=[],this.pageBufferSize=10,this.afterConstructor()}return e=[{key:"afterConstructor",value:function(){}},{key:"init",value:function(){}},{key:"softDispose",value:function(){}},{key:"updateBuffer",value:function(e){}},{key:"pageResetCallback",value:function(e){}},{key:"initCustomControls",value:function(){}},{key:"_getInnerWidth",value:function(){return this.app.dimensions.containerWidth-this.app.dimensions.padding.width-this.app.dimensions.offset.width}},{key:"_getInnerHeight",value:function(){return this.app.dimensions.maxHeight-this.app.dimensions.padding.height}},{key:"_getOuterHeight",value:function(e){return e}},{key:"dispose",value:function(){this.stageDOM&&(this.stageDOM.removeEventListener("mousemove",this.events.mousemove,!1),this.stageDOM.removeEventListener("mousedown",this.events.mousedown,!1),this.stageDOM.removeEventListener("mouseup",this.events.mouseup,!1),this.stageDOM.removeEventListener("touchmove",this.events.mousemove,!1),this.stageDOM.removeEventListener("touchstart",this.events.mousedown,!1),this.stageDOM.removeEventListener("touchend",this.events.mouseup,!1),this.stageDOM.removeEventListener("dblclick",this.events.dblclick,!1),this.stageDOM.removeEventListener("scroll",this.events.scroll,!1),this.stageDOM.removeEventListener("mousewheel",this.events.mousewheel,!1),this.stageDOM.removeEventListener("DOMMouseScroll",this.events.mousewheel,!1)),this.events=null,this.stageDOM=null,this.element.remove()}},{key:"checkDocumentPageSizes",value:function(){}},{key:"getViewerPageNumber",value:function(e){return e}},{key:"getDocumentPageNumber",value:function(e){return e}},{key:"getRenderContext",value:function(e,t){var i=this.app,n=i.provider,o=t.pageNumber,s=E.ifdef(t.textureTarget,p.TEXTURE_TARGET.VIEWER);i.dimensions.pageFit;var a=n.viewPorts[o],r=i.viewer.getTextureSize(t),l=null;if(l=s===p.TEXTURE_TARGET.THUMB?i.thumbSize:Math.floor(r.height),void 0===n.getCache(o,l)){var h=r.height/a.height,u=document.createElement("canvas"),c=this.filterViewPort(e.getViewport({scale:h,rotation:e._pageInfo.rotate+i.options.pageRotation}),o);s===p.TEXTURE_TARGET.THUMB&&(h=c.width/c.height>180/i.thumbSize?180*h/c.width:h*i.thumbSize/c.height,c=this.filterViewPort(e.getViewport({scale:h,rotation:e._pageInfo.rotate+i.options.pageRotation}),o)),u.height=Math.floor(c.height),u.width=Math.floor(c.width);var d=Math.abs(u.width-r.width)/r.width*100;return d>.001&&d<2&&(u.width=Math.floor(r.width),u.height=Math.floor(r.height)),i.viewer.filterViewPortCanvas(c,u,o),{canvas:u,canvasContext:u.getContext("2d",{willReadFrequently:!0===p.defaults.canvasWillReadFrequently}),viewport:c}}}},{key:"filterViewPort",value:function(e,t){return e}},{key:"getViewPort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.app.provider.viewPorts[e];return t?null!=i?i:this.app.provider.defaultPage.viewPort:i}},{key:"pagesReady",value:function(){this.app.executeCallback("onPagesReady")}},{key:"onReady",value:function(){}},{key:"filterViewPortCanvas",value:function(e){}},{key:"finalizeAnnotations",value:function(){}},{key:"finalizeTextContent",value:function(){}},{key:"updateTextContent",value:function(e){void 0==e&&(e=this.getBasePage(e)),this.app.provider.processTextContent(e,this.getTextElement(e,!0))}},{key:"isActivePage",value:function(e){return e===this.app.currentPageNumber}},{key:"initEvents",value:function(){var e=this.stageDOM=E.ifdef(this.stageDOM,this.parentElement[0]);e&&(e.addEventListener("mousemove",this.events.mousemove=this.mouseMove.bind(this),!1),e.addEventListener("mousedown",this.events.mousedown=this.mouseDown.bind(this),!1),e.addEventListener("mouseup",this.events.mouseup=this.mouseUp.bind(this),!1),e.addEventListener("touchmove",this.events.mousemove=this.mouseMove.bind(this),!1),e.addEventListener("touchstart",this.events.mousedown=this.mouseDown.bind(this),!1),e.addEventListener("touchend",this.events.mouseup=this.mouseUp.bind(this),!1),e.addEventListener("dblclick",this.events.dblclick=this.dblclick.bind(this),!1),e.addEventListener("scroll",this.events.scroll=this.onScroll.bind(this),!1),e.addEventListener("mousewheel",this.events.mousewheel=this.mouseWheel.bind(this),!1),e.addEventListener("DOMMouseScroll",this.events.mousewheel=this.mouseWheel.bind(this),!1)),this.startTouches=null,this.lastScale=null,this.startPoint=null}},{key:"refresh",value:function(){}},{key:"reset",value:function(){}},{key:"eventToPoint",value:function(e){var t={x:e.clientX,y:e.clientY};return t.x=t.x-this.app.viewerContainer[0].getBoundingClientRect().left,t.y=t.y-this.app.viewerContainer[0].getBoundingClientRect().top,{raw:t}}},{key:"mouseMove",value:function(e){e=E.fixMouseEvent(e),this.pinchMove(e),!0===this.pinchZoomDirty&&e.preventDefault(),this.startPoint&&!0!=this.pinchZoomDirty&&(this.pan(this.eventToPoint(e)),e.preventDefault())}},{key:"mouseDown",value:function(e){e=E.fixMouseEvent(e),this.pinchDown(e),this.startPoint=this.eventToPoint(e)}},{key:"mouseUp",value:function(e){e=E.fixMouseEvent(e),!0===this.pinchZoomDirty&&e.preventDefault();var t=this.eventToPoint(e),i=e.target||e.originalTarget,n=this.startPoint&&t.x===this.startPoint.x&&t.y===this.startPoint.y&&"A"!==i.nodeName;!0===e.ctrlKey&&n&&this.zoomOnPoint(t),this.pinchUp(e),this.startPoint=null}},{key:"pinchDown",value:function(e){null!=e.touches&&2==e.touches.length&&null==this.startTouches&&(this.startTouches=E.getTouches(e),this.app.viewer.zoomCenter=E.getVectorAvg(E.getTouches(e,this.parentElement.offset())),this.lastScale=1)}},{key:"pinchUp",value:function(e){null!=e.touches&&e.touches.length<2&&!0==this.pinchZoomDirty&&(this.app.viewer.lastScale=this.lastScale,this.app.container.removeClass("df-pinch-zoom"),this.updateTemporaryScale(!0),this.app.zoom(),this.lastScale=null,this.app.viewer.canSwipe=!1,this.pinchZoomDirty=!1,this.app.viewer._pinchZoomLastScale=null,this.startTouches=null)}},{key:"pinchMove",value:function(e){if(null!=e.touches&&2==e.touches.length&&null!=this.startTouches){this.pinchZoomDirty=!0,this.app.container.addClass("df-pinch-zoom");var t=E.calculateScale(this.startTouches,E.getTouches(e));this.lastScale,this.lastScale=t,this.app.viewer.pinchZoomUpdateScale=E.limitAt(t,this.app.viewer.minZoom/this.app.zoomValue,this.app.viewer.maxZoom/this.app.zoomValue),this.app.viewer._pinchZoomLastScale!=this.app.viewer.pinchZoomUpdateScale&&(this.app.viewer.pinchZoomRequestStatus=p.REQUEST_STATUS.ON,this.app.viewer._pinchZoomLastScale=this.app.viewer.pinchZoomUpdateScale),e.preventDefault();return}}},{key:"updateTemporaryScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===e)this.parentElement[0].style.transform="none";else if(this.app.viewer.zoomCenter){var t=this.app.viewer.pinchZoomUpdateScale;this.parentElement[0].style.transformOrigin=this.app.viewer.zoomCenter.x+"px "+this.app.viewer.zoomCenter.y+"px",this.parentElement[0].style.transform="scale3d("+t+","+t+",1)"}}},{key:"pan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.panRequestStatus=p.REQUEST_STATUS.ON,E.pan(this,e,t)}},{key:"updatePan",value:function(){this.element.css({transform:"translate3d("+this.left+"px,"+this.top+"px,0)"})}},{key:"dblclick",value:function(e){}},{key:"onScroll",value:function(e){}},{key:"mouseWheel",value:function(e){var t=this.app,i=E.getMouseDelta(e),n=!0===e.ctrlKey,o=t.options.mouseScrollAction===p.MOUSE_SCROLL_ACTIONS.ZOOM&&(!0===t.options.isLightBox||!0===t.isFullscreen);n||o?(i>0||i<0)&&(e.preventDefault(),t.viewer.zoomCenter=this.eventToPoint(e).raw,t.zoom(i),t.ui.update()):t.options.mouseScrollAction===p.MOUSE_SCROLL_ACTIONS.NAV&&(i>0?t.next():i<0&&t.prev())}},{key:"zoomOnPoint",value:function(e){this.app.viewer.zoomCenter=e.raw,this.app.zoom(1)}},{key:"getVisiblePages",value:function(){return this.visiblePagesCache=[],{main:this.visiblePagesCache,buffer:[]}}},{key:"getBasePage",value:function(){return this.app.currentPageNumber}},{key:"isFirstPage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),1===e}},{key:"isLastPage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),e===this.app.pageCount}},{key:"isEdgePage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),1===e||e===this.app.pageCount}},{key:"checkRequestQueue",value:function(){var e=p.REQUEST_STATUS;this.panRequestStatus===e.ON&&(this.updatePan(),this.panRequestStatus=e.OFF),this.app.viewer.pinchZoomRequestStatus===e.ON&&(this.app.viewer.updateTemporaryScale(),this.app.viewer.pinchZoomRequestStatus=e.OFF)}},{key:"isAnimating",value:function(){return!1}},{key:"updatePendingStatusClass",value:function(e){void 0===e&&(e=this.isAnimating()),this.app.container.toggleClass("df-pending",e)}},{key:"initPages",value:function(){}},{key:"resize",value:function(){}},{key:"determinePageMode",value:function(){}},{key:"zoom",value:function(){}},{key:"gotoPageCallBack",value:function(){this.requestRefresh()}},{key:"requestRefresh",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.app.refreshRequestStatus=!0===e?p.REQUEST_STATUS.ON:p.REQUEST_STATUS.OFF}},{key:"getPageByNumber",value:function(e){var t=this.pages,i=void 0;if(this.app.isValidPage(e)){for(var n=0;n<t.length;n++)if(e===t[n].pageNumber){i=t[n];break}}return i}},{key:"changeAnnotation",value:function(){return!1}},{key:"getAnnotationElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.getPageByNumber(e);if(void 0!==i)return void 0===i.annotationElement&&(i.annotationElement=S("<div class='df-link-content'>"),i.contentLayer.append(i.annotationElement)),!0===t&&i.annotationElement.html(""),i.annotationElement[0]}},{key:"getTextElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.getPageByNumber(e);if(void 0!==i)return void 0===i.textElement&&(i.textElement=S("<div class='df-text-content'>"),i.contentLayer.append(i.textElement)),!0===t&&(i.textElement.html(""),i.textElement.siblings(".df-auto-link-content").html("")),i.textElement[0]}},{key:"render",value:function(){}},{key:"checkPageLoading",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!0,i=this.getVisiblePages().main,n=!0===e?i.length:this.isBooklet?1:2;n=Math.min(n,i.length);for(var o=0;o<n;o++){var s=this.getPageByNumber(i[o]);s&&(t=s.textureLoaded&&t)}return this.element.toggleClass("df-loading",!t),t}},{key:"textureLoadedCallback",value:function(e){}},{key:"handleZoom",value:function(){}},{key:"getTextureSize",value:function(e){console.error("Texture calculation missing!")}},{key:"textureHeightLimit",value:function(e){return E.limitAt(e,1,this.app.dimensions.maxTextureHeight)}},{key:"textureWidthLimit",value:function(e){return E.limitAt(e,1,this.app.dimensions.maxTextureWidth)}},{key:"setPage",value:function(e){E.log("Set Page detected",e.pageNumber);var t=this.getPageByNumber(e.pageNumber);return!!t&&(e.callback=this.textureLoadedCallback.bind(this),t.loadTexture(e),this.updateBuffer(t),!0)}},{key:"cleanPage",value:function(e){return!0}},{key:"validatePageChange",value:function(e){return e!==this.app.currentPageNumber}},{key:"afterControlUpdate",value:function(){}},{key:"searchPage",value:function(e){return{include:!0,label:this.app.provider.getLabelforPage(e)}}}],function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}();function C(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function T(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t,i){return t&&T(e.prototype,t),i&&T(e,i),e}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var L=p.utils,N=p.jQuery,_=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R(e,t)}(n,e);var t,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=O(n);return e=t?Reflect.construct(i,arguments,O(this).constructor):i.apply(this,arguments),e&&("object"==(e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)||"function"==typeof e)?e:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)});function n(e){var t;return C(this,n),(t=i.call(this)).canvasMode=null,e&&e.parentElement&&(t.parentElement=e.parentElement),t.init(),t}return k(n,[{key:"init",value:function(){var e=this.element=N("<div>",{class:"df-page"});e[0].appendChild(this.contentLayer[0]),this.texture=new Image,this.parentElement&&this.parentElement[0].append(e[0])}},{key:"resetContent",value:function(){void 0!==this.annotationElement&&this.annotationElement.html(""),void 0!==this.textElement&&this.textElement.html("")}},{key:"setLoading",value:function(){this.element.toggleClass("df-loading",!0!==this.textureLoaded)}},{key:"loadTexture",value:function(e){var t=this,i=e.texture,n=e.callback;function o(){t.textureSrc=i,t.element.css({backgroundImage:L.bgImage(i)}),t.updateTextureLoadStatus(!0),"function"==typeof n&&n(e)}null===t.canvasMode&&i&&"CANVAS"===i.nodeName&&(t.canvasMode=!0),!0===t.canvasMode?(t.element.find("canvas").remove(),i!==t.textureLoadFallback&&(t.textureSrc=i,t.element.append(N(i))),t.updateTextureLoadStatus(!0),"function"==typeof n&&n(e)):i===t.textureLoadFallback?o():(t.texture.onload=o,t.texture.src=i)}},{key:"updateCSS",value:function(e){this.element.css(e)}},{key:"resetCSS",value:function(){this.element.css({transform:"",boxShadow:"",display:"block"})}}]),n}(/*#__PURE__*/function(){function e(){C(this,e),this.textureLoadFallback="blank",this.textureStamp="-1",this.textureLoaded=!1,this.texture="blank",this.textureSrc="blank",this.pageNumber=void 0,this.contentLayer=N("<div>",{class:"df-page-content"})}return k(e,[{key:"reset",value:function(){this.resetTexture(),this.resetContent()}},{key:"resetTexture",value:function(){this.textureLoaded=!1,this.textureStamp="-1",this.loadTexture({texture:this.textureLoadFallback}),this.contentLayer.removeClass("df-content-loaded")}},{key:"clearTexture",value:function(){this.loadTexture({texture:this.textureLoadFallback})}},{key:"resetContent",value:function(){}},{key:"loadTexture",value:function(e){}},{key:"getTexture",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.textureSrc;return!0===e&&t&&t.cloneNode&&(t=t.cloneNode()).getContext&&t.getContext("2d").drawImage(this.textureSrc,0,0),t}},{key:"setLoading",value:function(){}},{key:"updateTextureLoadStatus",value:function(e){this.textureLoaded=!0===e,L.log((!0===this.textureLoaded?"Loaded ":"Loading ")+this.textureStamp+" for "+this.pageNumber),this.contentLayer.toggleClass("df-content-loaded",!0===e),this.setLoading()}},{key:"changeTexture",value:function(e,t){var i=e+"|"+t;return this.textureStamp!==i&&(L.log("Page "+e+":texture changed from - "+this.textureStamp+" to "+i),this.textureLoaded=!1,this.textureStamp=i,this.updateTextureLoadStatus(!1),!0)}}]),e}());function I(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e,t,i){return(A="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=M(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var D=p.jQuery,F=p.utils,B=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&z(e,t)}(o,e);var t,i,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=M(o);return e=t?Reflect.construct(i,arguments,M(this).constructor):i.apply(this,arguments),e&&("object"==(e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)||"function"==typeof e)?e:I(this)});function o(e,t){var i;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,o),e.viewerClass="df-reader",t.options.mouseScrollAction=p.MOUSE_SCROLL_ACTIONS.NONE,(i=n.call(this,e,t)).app.jumpStep=1,i.minZoom=.25,i.stackCount=i.app.pageCount,i.app.options.paddingLeft=0,i.app.options.paddingRight=0,i.app.options.paddingTop=10,i.app.options.paddingBottom=!0===i.app.options.controlsFloating?20:10,i.app.pageScaling=i.app.options.pageScale,i.acceptAppMouseEvents=!0,i.scrollStatus=p.REQUEST_STATUS.OFF,i.deltaPanX=0,i.deltaPanY=0,t._viewerPrepared(),i.zoomViewer=I(i),i}return i=[{key:"init",value:function(){A(M(o.prototype),"init",this).call(this),this.initEvents(),this.initPages(),this.initScrollBar()}},{key:"initEvents",value:function(){this.stageDOM=this.element[0],A(M(o.prototype),"initEvents",this).call(this)}},{key:"initPages",value:function(){this.stackCount=this.app.pageCount;for(var e=0;e<this.stackCount;e++){var t=new _({parentElement:this.wrapper});t.index=e,t.viewer=this,this.pages.push(t)}}},{key:"initScrollBar",value:function(){this.scrollBar=D("<div class='df-reader-scrollbar'>"),this.scrollBar.appendTo(this.app.container),this.scrollPageNumber=D("<div class='df-reader-scroll-page-number'>").appendTo(this.app.container),this.scrollPageNumberCurrent=D("<div>").appendTo(this.scrollPageNumber),this.scrollPageNumberTotal=D("<div class='df-reader-scroll-page-number-total'>").appendTo(this.scrollPageNumber)}},{key:"afterControlUpdate",value:function(){if(void 0!==this.scrollBar){var e=this.app.getCurrentLabel();this.scrollBar.text(e),this.app.provider.pageLabels?(this.scrollPageNumberCurrent.text(e),this.scrollPageNumberTotal.text("("+this.app.currentPageNumber+" of "+this.app.pageCount+")")):(this.scrollPageNumberCurrent.text(e),this.scrollPageNumberTotal.text("of "+this.app.pageCount))}}},{key:"updateBuffer",value:function(e){if("-1"!==e.textureStamp&&void 0!==e.pageNumber){for(var t=e.pageNumber,i=e.pageNumber,n=0,o=0;o<this.pageBuffer.length;o++){var s=this.pageBuffer[o].pageNumber;if(t===s){F.log("Page "+t+" already in buffer, skipping");return}Math.abs(this.app.currentPageNumber-s)>Math.abs(this.app.currentPageNumber-i)&&(i=s,n=o)}this.pageBuffer.push(e),this.pageBuffer.length>this.pageBufferSize&&(F.log("Farthest buffer: "+i),this.pageBuffer[n].reset(),this.pageBuffer.splice(n,1))}}},{key:"initCustomControls",value:function(){var e=this.app.ui.controls;e.openRight.hide(),e.openLeft.hide()}},{key:"dispose",value:function(){A(M(o.prototype),"dispose",this).call(this),this.scrollBar&&this.scrollBar.remove(),this.scrollPageNumber&&this.scrollPageNumber.remove(),this.element.remove()}},{key:"_getInnerHeight",value:function(){A(M(o.prototype),"_getInnerHeight",this).call(this);var e=this.app.dimensions.maxHeight-this.app.dimensions.padding.height,t=this.app.dimensions.defaultPage.viewPort,i=this.app.dimensions.containerWidth-20-this.app.dimensions.padding.width;this.app.pageScaling===p.PAGE_SCALE.ACTUAL&&(i=1*this.app.provider.defaultPage.viewPort.width);var n=e;return this.app.pageScaling===p.PAGE_SCALE.PAGE_WIDTH?n=100*t.height:this.app.pageScaling===p.PAGE_SCALE.AUTO?n=1.5*t.height:this.app.pageScaling===p.PAGE_SCALE.ACTUAL&&(n=1*t.height),n-=2,this._containCover=F.contain(t.width,t.height,i,n),n=Math.min(e,this._containCover.height+2),this.app.pageScaleValue=this._containCover.height/t.height,this.app.dimensions.isFixedHeight?e:n}},{key:"handleZoom",value:function(){var e=this.app,t=this.maxZoom=4,i=e.zoomValue;!0===e.pendingZoom&&null!=e.zoomDelta?i=e.zoomDelta>0?i*e.options.zoomRatio:i/e.options.zoomRatio:null!=this.lastScale&&(i*=this.lastScale,this.lastScale=null),i=F.limitAt(i,this.minZoom,t),e.zoomValueChange=i/e.zoomValue,e.zoomChanged=e.zoomValue!==i,e.zoomValue=i}},{key:"resize",value:function(){var e=this.app;e.dimensions;var t=e.dimensions.padding,i=this.shiftHeight=0;this.element.css({top:-i,bottom:-i,right:-0,left:-0,paddingTop:t.top,paddingRight:t.right,paddingBottom:t.bottom,paddingLeft:t.left});for(var n=this.getVisiblePages().main[0]-1,o=(n=this.pages[n].element[0]).getBoundingClientRect(),s=this.parentElement[0].getBoundingClientRect(),a=0;a<this.pages.length;a++){var r=this.pages[a],l=this.getViewPort(a+1,!0),h=r.element[0].style;h.height=Math.floor(l.height*e.pageScaleValue*e.zoomValue)+"px",h.width=Math.floor(l.width*e.pageScaleValue*e.zoomValue)+"px"}if(this.oldScrollHeight!=this.element[0].scrollHeight&&void 0!==this.oldScrollHeight){var u,p=this.element[0].scrollHeight/this.oldScrollHeight;this.skipScrollCheck=!0;var c=n.offsetTop+n.clientTop-(o.top-s.top+n.clientTop)*p,d=n.offsetLeft+n.clientLeft-(o.left-s.left+n.clientLeft)*p;c+=(p-1)*10/2,d+=(p-1)*10/2,this.zoomCenter=null!==(u=this.zoomCenter)&&void 0!==u?u:{x:0,y:0},c+=(p-1)*this.zoomCenter.y,d+=(p-1)*this.zoomCenter.x,this.zoomCenter=null,this.element[0].scrollTop=c,this.element[0].scrollLeft=d,this.skipScrollCheck=!1}this.oldScrollHeight=this.element[0].scrollHeight,this.scrollBar[0].style.transform="none",this.updateScrollBar()}},{key:"onReady",value:function(){this.gotoPageCallBack(),this.oldScrollHeight=this.element[0].scrollHeight}},{key:"refresh",value:function(){for(var e=this.app,t=this.getVisiblePages().main,i=0;i<t.length;i++){var n=void 0,o=t[i];n=this.pages[o-1],o!==n.pageNumber&&(n.resetTexture(),this.app.textureRequestStatus=p.REQUEST_STATUS.ON),n.element.attr("number",o),n.pageNumber=o}this.requestRefresh(!1),e.textureRequestStatus=p.REQUEST_STATUS.ON}},{key:"isAnimating",value:function(){return this.scrollStatus===p.REQUEST_STATUS.ON||this.scrollStatus===p.REQUEST_STATUS.COUNT}},{key:"checkRequestQueue",value:function(){A(M(o.prototype),"checkRequestQueue",this).call(this),this.scrollStatus===p.REQUEST_STATUS.ON&&(this.scrollStatus=p.REQUEST_STATUS.OFF),this.scrollStatus===p.REQUEST_STATUS.COUNT&&(this.scrollStatus=p.REQUEST_STATUS.ON)}},{key:"isActivePage",value:function(e){return void 0!==this.visiblePagesCache&&this.visiblePagesCache.includes(e)}},{key:"getVisiblePages",value:function(){var e=F.getVisibleElements({container:this.element[0],elements:this.wrapper[0].children});return e=0===e.length?[this.app.currentPageNumber]:e.splice(0,this.pageBufferSize),this.visiblePagesCache=e,{main:e,buffer:[]}}},{key:"getPageByNumber",value:function(e){var t=this.pages[e-1];return void 0===t&&F.log("Page Not found for: "+e),t}},{key:"onScroll",value:function(e){for(var t=this.element[0].scrollTop+this.app.dimensions.containerHeight/2,i=this.getVisiblePages().main,n=i[0],o=0;o<i.length;o++){n=i[o];var s=this.pages[n-1].element[0],a=s.offsetTop+s.clientTop;if(a<=t&&s.clientHeight+a>=t)break;if(o>0&&a>t&&s.clientHeight+a>=t){n=i[o-1];break}}this.skipScrollIntoView=!0,this.app.gotoPage(n),this.skipScrollIntoView=!1,this.updateScrollBar(),e.preventDefault&&e.preventDefault(),e.stopPropagation(),this.requestRefresh(),this.scrollStatus=p.REQUEST_STATUS.COUNT,p.handlePopup(this.element,!1)}},{key:"updateScrollBar",value:function(){var e=this.element[0];this.app.container[0],e.scrollLeft;var t=60+(e.offsetHeight-40-60-60)*e.scrollTop/(e.scrollHeight-e.offsetHeight);isNaN(t)&&(t=60),this.scrollBar.lastY=t,this.scrollBar[0].style.transform="translateY("+t+"px)"}},{key:"validatePageChange",value:function(e){}},{key:"gotoPageCallBack",value:function(){if(!0!==this.skipScrollIntoView){var e=this.getPageByNumber(this.app.currentPageNumber);null!=e&&F.scrollIntoView(e.element[0],this.element[0])}this.skipScrollIntoView=!1,this.requestRefresh()}},{key:"getTextureSize",value:function(e){var t=this.app.provider.viewPorts[1];this.app.provider.viewPorts[e.pageNumber]&&(t=this.app.provider.viewPorts[e.pageNumber]);var i=this.app.options.pixelRatio;return{height:t.height*this.app.zoomValue*this.app.pageScaleValue*i,width:t.width*this.app.zoomValue*this.app.pageScaleValue*i}}},{key:"textureLoadedCallback",value:function(e){var t=this.getPageByNumber(e.pageNumber),i=this.app,n=this.getViewPort(e.pageNumber,!0);t.element.height(Math.floor(n.height*i.pageScaleValue*i.zoomValue)).width(Math.floor(n.width*i.pageScaleValue*i.zoomValue)),this.pagesReady()}},{key:"pan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.startPoint,n=e.raw.y-i.raw.y,o=e.raw.x-i.raw.x;this.deltaPanY+=n,this.deltaPanX+=o,this.panRequestStatus=p.REQUEST_STATUS.ON,!1===t&&(this.startPoint=e)}},{key:"updatePan",value:function(){this.element[0].scrollTop=this.element[0].scrollTop-this.deltaPanY,this.element[0].scrollLeft=this.element[0].scrollLeft-this.deltaPanX,this.deltaPanY=0,this.deltaPanX=0}},{key:"mouseMove",value:function(e){if(this.startPoint&&this.isScrollBarPressed){var t=F.fixMouseEvent(e),i=this.eventToPoint(t),n=this.element[0],s=this.scrollBar.lastY-(this.startPoint.raw.y-i.raw.y);this.scrollBar.lastY=s,n.scrollTop=(s-60)*(n.scrollHeight-n.offsetHeight)/(n.offsetHeight-40-60-60),this.startPoint=i,e.preventDefault();return}e.touches&&e.touches.length<2||A(M(o.prototype),"mouseMove",this).call(this,e)}},{key:"mouseDown",value:function(e){A(M(o.prototype),"mouseDown",this).call(this,e),e.srcElement===this.scrollBar[0]&&(this.isScrollBarPressed=!0,this.scrollBar.addClass("df-active"),this.scrollPageNumber.addClass("df-active"))}},{key:"mouseUp",value:function(e){A(M(o.prototype),"mouseUp",this).call(this,e),(this.isScrollBarPressed=this.scrollBar)&&(this.isScrollBarPressed=!1,this.scrollBar.removeClass("df-active"),this.scrollPageNumber.removeClass("df-active"))}}],function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(o.prototype,i),o}(x);function H(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function U(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function V(e,t,i){return t&&U(e.prototype,t),i&&U(e,i),e}function W(e,t,i){return(W="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=j(e);return i=t?Reflect.construct(n,arguments,j(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)}}var K=p.jQuery,X=p.utils,Q=/*#__PURE__*/function(e){q(i,e);var t=Z(i);function i(e,n){var o,s;return H(this,i),e.viewerClass="df-flipbook "+(e.viewerClass||""),(o=t.call(this,e,n)).isFlipBook=!0,o.sheets=[],o.isRTL=o.app.isRTL,o.foldSense=o.isVertical()?0:50,o.isOneSided=!1,o.stackCount=null!==(s=e.stackCount)&&void 0!==s?s:6,o.annotedPage=null,o.pendingAnnotations=[],o.seamPositionX=0,o.seamPositionY=0,o.dragSheet=null,o.drag=null,o.soundOn=!0===e.enableSound,o.soundFile=null,o.minZoom=1,o.maxZoom=4,o.pureMaxZoom=4,(o.app.options.pageSize===p.FLIPBOOK_PAGE_SIZE.AUTO||o.app.options.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL)&&(o.app.checkSecondPage=!0),o.app.pageScaling=p.PAGE_SCALE.PAGE_FIT,e.viewerClass="",o.zoomViewer=new J(e,n),o}return V(i,[{key:"init",value:function(){W(j(i.prototype),"init",this).call(this),this.initSound();var e=this.app;this.pageMode=e.options.pageMode===p.FLIPBOOK_PAGE_MODE.AUTO?X.isMobile||e.pageCount<=2?p.FLIPBOOK_PAGE_MODE.SINGLE:p.FLIPBOOK_PAGE_MODE.DOUBLE:e.options.pageMode,this.singlePageMode=e.options.singlePageMode||(X.isMobile?p.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET:p.FLIPBOOK_SINGLE_PAGE_MODE.ZOOM),this.updatePageMode(),this.rightSheetHeight=this.leftSheetHeight=this._defaultPageSize.height,this.leftSheetWidth=this.rightSheetWidth=this._defaultPageSize.width,this.leftSheetTop=this.rightSheetTop=(this.availablePageHeight()-this._defaultPageSize.height)/2,this.topSheetLeft=this.bottomSheetLeft=(this.availablePageWidth()-this._defaultPageSize.width)/2,this.zoomViewer.rightSheetHeight=this.zoomViewer.leftSheetHeight=this._defaultPageSize.height,this.zoomViewer.leftSheetWidth=this.zoomViewer.rightSheetWidth=this._defaultPageSize.width}},{key:"determineHeight",value:function(){}},{key:"initCustomControls",value:function(){W(j(i.prototype),"initCustomControls",this).call(this);var e=this,t=this.app,n=t.ui,o=n.controls,s=t.options.text,a=t.options.icons;o.sound=X.createBtn("sound",a.sound,s.toggleSound).on("click",function(){e.soundOn=!e.soundOn,n.updateSound()}),n.updateSound=function(){!1===e.soundOn?o.sound.addClass("disabled"):o.sound.removeClass("disabled")},n.updateSound()}},{key:"dispose",value:function(){W(j(i.prototype),"dispose",this).call(this);for(var e=0;e<this.sheets.length;e++){var t=this.sheets[e];t&&t.currentTween&&(t.currentTween.stop(),t.currentTween=null)}this.zoomViewer.dispose(),this.soundFile=null}},{key:"determinePageMode",value:function(){var e=this.app,t=this.pageMode;if(this.app.pageCount<3)this.pageMode=p.FLIPBOOK_PAGE_MODE.SINGLE;else if(this.app.options.pageMode===p.FLIPBOOK_PAGE_MODE.AUTO&&!0!=this.pageModeChangedManually){if(!0===X.isMobile){if(this.app.dimensions.isAutoHeight&&!1==this.app.dimensions.isFixedHeight){var i=this._calculateInnerHeight(!0),n=this._calculateInnerHeight(!1),o=e.dimensions.stage.innerWidth+(!0!=e.options.sideMenuOverlay&&e.isSideMenuOpen?220:0);this.pageMode=i>1.1*n&&o<768?p.FLIPBOOK_PAGE_MODE.SINGLE:p.FLIPBOOK_PAGE_MODE.DOUBLE,this._calculateInnerHeight()}else{var s=e.dimensions.stage.innerWidth+(!0!=e.options.sideMenuOverlay&&e.isSideMenuOpen?220:0);this.pageMode=e.dimensions.stage.innerHeight>1.1*s&&s<768?p.FLIPBOOK_PAGE_MODE.SINGLE:p.FLIPBOOK_PAGE_MODE.DOUBLE}}this.pageMode!=t&&this.setPageMode({isSingle:this.pageMode==p.FLIPBOOK_PAGE_MODE.SINGLE})}}},{key:"initSound",value:function(){this.soundFile=document.createElement("audio"),this.soundFile.setAttribute("src",this.app.options.soundFile+"?ver="+p.version),this.soundFile.setAttribute("type","audio/mpeg")}},{key:"playSound",value:function(){try{!0===this.app.userHasInteracted&&!0===this.soundOn&&(this.soundFile.currentTime=0,this.soundFile.play())}catch(e){}}},{key:"checkDocumentPageSizes",value:function(){var e=this.app.provider;e.pageSize===p.FLIPBOOK_PAGE_SIZE.AUTO&&(e._page2Ratio&&e._page2Ratio>1.5*e.defaultPage.pageRatio?e.pageSize=p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL:e.pageSize=p.FLIPBOOK_PAGE_SIZE.SINGLE),e.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL&&(e.pageCount=1===e.numPages?1:2*e.numPages-2),(e.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK||e.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE)&&(e.pageCount=2*e.numPages)}},{key:"getViewerPageNumber",value:function(e){return this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL&&e>2&&(e=2*e-1),this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK&&e>2&&(e=2*e-1),e}},{key:"getDocumentPageNumber",value:function(e){return this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL&&e>2?Math.ceil((e-1)/2)+1:this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK&&e>1?e===this.app.pageCount?1:Math.ceil((e-1)/2)+1:e}},{key:"getViewPort",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;return this.filterViewPort(W(j(i.prototype),"getViewPort",this).call(this,e,t),e,n)}},{key:"isDoubleInternal",value:function(){return this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL}},{key:"isDoubleCoverBack",value:function(){return this.app.provider.pageSize===p.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK}},{key:"isDoubleInternalPage",value:function(e){return this.isDoubleInternal()&&e>1&&e<this.app.provider.pageCount}},{key:"getDoublePageWidthFix",value:function(e){return this.isDoubleInternalPage(e)||this.isDoubleCoverBack()?2:1}},{key:"isDoublePageFix",value:function(e){var t=!1;return(this.isDoubleCoverBack()||this.isDoubleInternalPage(e))&&(this.app.isRTL?e%2==0&&(t=!0):e%2==1&&(t=!0)),t}},{key:"finalizeAnnotations",value:function(e,t){}},{key:"finalizeTextContent",value:function(e,t){this.app.zoomValue>this.app.viewer.pureMaxZoom&&(this.zoomViewer.leftViewPort&&this.zoomViewer.leftPage.contentLayer[0].style.setProperty("--scale-factor",this.zoomViewer.leftSheetHeight/this.zoomViewer.leftViewPort.height),this.zoomViewer.rightViewPort&&this.zoomViewer.rightPage.contentLayer[0].style.setProperty("--scale-factor",this.zoomViewer.rightSheetHeight/this.zoomViewer.rightViewPort.height))}},{key:"isActivePage",value:function(e){return void 0!==this.visiblePagesCache&&this.visiblePagesCache.includes(e)}},{key:"isSheetCover",value:function(e){var t=this.isBooklet;return 0===e||t&&1===e||e===Math.ceil(this.app.pageCount/(t?1:2))-(t?0:1)}},{key:"isSheetHard",value:function(e){var t=this.app.options.flipbookHardPages;if(this.isBooklet,"cover"===t)return this.isSheetCover(e);if("all"===t)return!0;var i=(","+t+",").indexOf(","+(2*e+1)+",")>-1,n=(","+t+",").indexOf(","+(2*e+2)+",")>-1;return i||n}},{key:"sheetsIndexShift",value:function(e,t,i){e>t?(this.sheets[i-1].skipFlip=!0,this.sheets.unshift(this.sheets.pop())):e<t&&(this.sheets[0].skipFlip=!0,this.sheets.push(this.sheets.shift()))}},{key:"checkSwipe",value:function(e,t){if(!0!==this.pinchZoomDirty&&1===this.app.zoomValue&&!0===this.canSwipe){var i=this.isVertical()?e.y-this.lastPosY:e.x-this.lastPosX;null!=t.touches&&this.isVertical()&&i>5&&t.preventDefault(),Math.abs(i)>this.swipeThreshold&&(i<0?this.app.openRight():this.app.openLeft(),this.canSwipe=!1,t.preventDefault()),this.lastPosX=e.x,this.lastPosY=e.y}}},{key:"checkCenter",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.app,n=p.FLIPBOOK_CENTER_SHIFT,o=i.currentPageNumber%2==0,s=this.getBasePage(),a=this.isRTL,r=this.isSingle;e=0===s||this.isBooklet?this.isRTL?n.RIGHT:n.LEFT:s===i.pageCount?a?n.LEFT:n.RIGHT:r?a?o?n.LEFT:n.RIGHT:o?n.RIGHT:n.LEFT:n.NONE,!0!==this.centerNeedsUpdate&&(this.centerNeedsUpdate=this.centerShift!==e),this.centerNeedsUpdate&&(this.centerShift=e,this.updateCenter(t),this.centerNeedsUpdate=!1)}},{key:"updateCenter",value:function(){console.log("UpdateCenter: missing implementation.")}},{key:"reset",value:function(){for(var e,t=0;t<this.sheets.length;t++)(e=this.sheets[t]).reset(),e.pageNumber=-1,e.frontPage&&(e.frontPage.pageNumber=-1),e.backPage&&(e.backPage.pageNumber=-1),e.resetTexture();this.annotedPage=null,this.oldBasePageNumber=-1,this.centerShift=null,this.refresh()}},{key:"handleZoom",value:function(){var e=this.app;e.dimensions;var t=this.getLeftPageTextureSize({zoom:!1,isAnnotation:!0}),i=this.getRightPageTextureSize({zoom:!1,isAnnotation:!0});this.maxZoom,e.zoomValue,this.pureMaxZoom=e.dimensions.maxTextureSize/Math.max(t.height,t.width,i.height,i.width);var n=this.maxZoom=e.options.fakeZoom*this.pureMaxZoom,o=e.zoomValue,s=!1,a=!1;n<this.minZoom&&(n=this.maxZoom=this.minZoom),!0===e.pendingZoom&&null!=e.zoomDelta?o=e.zoomDelta>0?o*e.options.zoomRatio:o/e.options.zoomRatio:null!=this.lastScale&&(o*=this.lastScale,this.lastScale=null),o=X.limitAt(o,this.minZoom,n),e.zoomValueChange=o/e.zoomValue,(e.zoomChanged=e.zoomValue!==o)&&(1===o||1===e.zoomValue)&&(s=1===o,a=1===e.zoomValue),e.zoomValue=o,(a||s)&&(e.container.toggleClass("df-zoom-active",1!==o),a&&this.enterZoom(),s&&this.exitZoom())}},{key:"refresh",value:function(){var e=this.app,t=this.stackCount,i=this.isRTL,n=this.isBooklet,o=this.getBasePage(),s=n?1:2;i&&(o=e.pageCount-o);var a,r=this.oldBasePageNumber,l=Math.ceil(e.pageCount/s),h=Math.floor(t/2);o!==this.oldBasePageNumber&&(this.pageNumberChanged=!0,this.updatePendingStatusClass(!0),this.zoomViewer.reset()),this.sheetsIndexShift(r,o,t);var u=Math.ceil(o/s);for(a=0;a<t;a++){var c=void 0,d=u-h+a;if(i&&(d=l-d-1),null!=(c=this.sheets[a])){c.targetSide=a<h?p.TURN_DIRECTION.LEFT:p.TURN_DIRECTION.RIGHT;var f=c.side!==c.targetSide,g=d!==c.pageNumber,m=f&&!1===c.skipFlip&&1===e.zoomValue;!f&&g&&c.isFlipping&&c.currentTween&&c.currentTween.stop(),c.isHard=this.isSheetHard(d),c.isCover=this.isSheetCover(d),g&&(c.resetTexture(),(this.app.isRTL?c.backPage:c.frontPage).pageNumber=this.isBooklet?d:2*d+1,(this.app.isRTL?c.frontPage:c.backPage).pageNumber=this.isBooklet?-1:2*d+2,e.textureRequestStatus=p.REQUEST_STATUS.ON),c.pageNumber=d,this.refreshSheet({sheet:c,sheetNumber:d,totalSheets:l,zIndex:this.stackCount+(a<h?a-h:h-a),visible:n?i?a<h||c.isFlipping||m:a>=h||c.isFlipping||m:d>=0&&d<l||n&&d===l,index:a,needsFlip:m,midPoint:h})}}this.requestRefresh(!1),e.textureRequestStatus=p.REQUEST_STATUS.ON,this.oldBasePageNumber=o,this.checkCenter(),this.zoomViewer.refresh(),this.pageNumberChanged=!1}},{key:"validatePageChange",value:function(e){if(e===this.app.currentPageNumber)return!1;var t=this.app,i=!this.isFlipping()||void 0===t.oldPageNumber;return(i=i||t.currentPageNumber<e&&t.oldPageNumber<t.currentPageNumber)||t.currentPageNumber>e&&t.oldPageNumber>t.currentPageNumber}},{key:"getVisiblePages",value:function(){for(var e=[],t=this.getBasePage(),i=this.app.zoomValue>1?1:this.isBooklet&&X.isMobile?Math.min(this.stackCount/2,2):this.stackCount/2,n=0;n<i;n++)e.push(t-n),e.push(t+n+1);return this.visiblePagesCache=e,{main:e,buffer:[]}}},{key:"getBasePage",value:function(e){return(void 0===e&&(e=this.app.currentPageNumber),this.isBooklet)?e:2*Math.floor(e/2)}},{key:"getRightPageNumber",value:function(){return this.getBasePage()+(this.isBooklet?0:this.isRTL?0:1)}},{key:"getLeftPageNumber",value:function(){return this.getBasePage()+(this.isBooklet?0:this.isRTL?1:0)}},{key:"afterFlip",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0],!0!==this.isAnimating()&&(this.pagesReady(),this.updatePendingStatusClass())}},{key:"isFlipping",value:function(){var e=!1;return this.sheets.forEach(function(t){!0===t.isFlipping&&(e=!0)}),e}},{key:"isAnimating",value:function(){return this.isFlipping()}},{key:"mouseWheel",value:function(e){this.app.options.mouseScrollAction===p.MOUSE_SCROLL_ACTIONS.ZOOM?this.zoomViewer.mouseWheel(e):W(j(i.prototype),"mouseWheel",this).call(this,e)}},{key:"checkRequestQueue",value:function(){this.app.zoomValue>1?this.zoomViewer.checkRequestQueue():W(j(i.prototype),"checkRequestQueue",this).call(this)}},{key:"updatePan",value:function(){}},{key:"resetPageTween",value:function(){}},{key:"gotoPageCallBack",value:function(){this.resetPageTween(),1!==this.app.zoomValue&&!0===this.app.options.resetZoomBeforeFlip&&this.app.resetZoom(),this.beforeFlip(),this.requestRefresh()}},{key:"beforeFlip",value:function(){this.app.executeCallback("beforeFlip"),1===this.app.zoomValue&&this.getBasePage()!==this.oldBasePageNumber&&this.playSound()}},{key:"onFlip",value:function(){this.app.executeCallback("onFlip")}},{key:"getAnnotationElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=void 0;return(o=this.app.zoomValue>1||!0===n?this.zoomViewer.getAnnotationElement(e,t):W(j(i.prototype),"getAnnotationElement",this).call(this,e,t))&&(o.parentNode.classList.toggle("df-double-internal",this.isDoubleInternalPage(e)),o.parentNode.classList.toggle("df-double-internal-fix",this.isDoublePageFix(e))),o}},{key:"getTextElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.app.zoomValue>1||!0===n?this.zoomViewer.getTextElement(e,t):W(j(i.prototype),"getTextElement",this).call(this,e,t)}},{key:"enterZoom",value:function(){this.exchangeTexture(this,this.zoomViewer)}},{key:"exitZoom",value:function(){this.exchangeTexture(this.zoomViewer,this)}},{key:"exchangeTexture",value:function(e,t){var i=this.getBasePage(),n=e.getPageByNumber(i),o=t.getPageByNumber(i);if(o&&"-1"===o.textureStamp?(o.textureStamp=n.textureStamp,o.loadTexture({texture:n.getTexture(!0)}),X.log("Texture Exchanging at "+i)):X.log("Texture Exchanging Bypassed at "+i),!this.isBooklet){var s=e.getPageByNumber(i+1),a=t.getPageByNumber(i+1);a&&"-1"===a.textureStamp?(a.textureStamp=s.textureStamp,a.loadTexture({texture:s.getTexture(!0)}),X.log("Texture Exchanging at "+(i+1))):X.log("Texture Exchanging Bypassed at "+(i+1))}t.pagesReady()}},{key:"setPageMode",value:function(e){var t=this.app,i=!0===e.isSingle;this.pageMode=i?p.FLIPBOOK_PAGE_MODE.SINGLE:p.FLIPBOOK_PAGE_MODE.DOUBLE,this.updatePageMode(),t.resizeRequestStart()}},{key:"updatePageMode",value:function(){var e=this.app;this.app.pageCount<3&&(this.pageMode=p.FLIPBOOK_PAGE_MODE.SINGLE),this.isSingle=this.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE,this.isBooklet=this.isSingle&&this.singlePageMode===p.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET,this.app.jumpStep=this.isSingle?1:2,this.totalSheets=Math.ceil(this.app.pageCount/(this.isBooklet?1:2)),this.sheets.length>0&&this.reset(),e.ui.controls.pageMode&&(e.viewer.pageMode===p.FLIPBOOK_PAGE_MODE.DOUBLE?e.ui.controls.pageMode.removeClass(e.options.icons.doublepage).addClass(e.options.icons.singlepage).attr("title",e.options.text.singlePageMode).html("<span>"+e.options.text.singlePageMode+"</span>"):e.ui.controls.pageMode.addClass(e.options.icons.doublepage).removeClass(e.options.icons.singlepage).attr("title",e.options.text.doublePageMode).html("<span>"+e.options.text.doublePageMode+"</span>"))}},{key:"setPage",value:function(e){return e.textureTarget===p.TEXTURE_TARGET.ZOOM?this.zoomViewer.setPage(e):W(j(i.prototype),"setPage",this).call(this,e)}},{key:"_calculateInnerHeight",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;void 0===e&&(e=this.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE);var t=this.app.dimensions.defaultPage.viewPort,i=this.availablePageWidth(!1,!0,e),n=this.app.dimensions.maxHeight-this.app.dimensions.padding.height,o=this.isVertical()&&!1==e?n/2:n;this._defaultPageSize=X.contain(t.width,t.height,i,o),this._pageFitArea={width:i,height:n};var s=this.app.dimensions.isFixedHeight?n:this._pageFitArea.height;return this.app.dimensions.isAutoHeight&&!1==this.app.dimensions.isFixedHeight&&(s=Math.floor(this._defaultPageSize.height)),s}},{key:"_getInnerHeight",value:function(){var e=this._calculateInnerHeight();return this.app.dimensions.stage.width=this.app.dimensions.stage.innerWidth+this.app.dimensions.padding.width,this.app.dimensions.stage.height=e+this.app.dimensions.padding.height,e}},{key:"availablePageWidth",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;void 0===i&&(i=this.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE);var n=!0===t?this.app.dimensions.offset.width:0,o=this.app.dimensions.stage.innerWidth+n;return Math.floor((o/=!0===i||this.isVertical()?1:2)*(e?this.app.zoomValue:1))}},{key:"availablePageHeight",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;void 0===t&&(t=this.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE);var i=this.app.dimensions.stage.innerHeight;return!1===t&&this.isVertical()&&(i/=2),Math.floor(i*(e?this.app.zoomValue:1))}},{key:"getTextureSize",value:function(e){var t=this.getViewPort(e.pageNumber,!0),i=this.app.options.pixelRatio,n=!1===e.isRestricted?99999:this.app.options.maxTextureSize,o=X.contain(t.width,t.height,Math.min(i*this.availablePageWidth(e.zoom),n),Math.min(i*this.availablePageHeight(e.zoom),n));return{height:o.height,width:o.width}}},{key:"getLeftPageTextureSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.pageNumber=this.getLeftPageNumber(),this.getTextureSize(e)}},{key:"getRightPageTextureSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.pageNumber=this.getRightPageNumber(),this.getTextureSize(e)}},{key:"filterViewPort",value:function(e,t){var i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(void 0!==e){if(!0!=i)return e;var n=e.clone();return n.width=n.width/this.getDoublePageWidthFix(t),n}}},{key:"filterViewPortCanvas",value:function(e,t,i){this.isDoublePageFix(i)&&(e.transform[4]=e.transform[4]-Math.floor(Math.min(t.width,2*e.width-t.width))),e.widthFix=this.isDoubleInternalPage(i)?2:1}},{key:"isClosedPage",value:function(e){return void 0===e&&(e=this.app.currentPageNumber),1===e||e===this.app.jumpStep*Math.ceil(this.app.pageCount/this.app.jumpStep)&&!this.isBooklet}},{key:"isLeftPage",value:function(e){return(void 0===e&&(e=this.app.currentPageNumber),this.isBooklet)?this.isRTL:e%2==(this.isRTL?1:0)}},{key:"cleanPage",value:function(e){if(!this.isDoubleInternalPage(e))return W(j(i.prototype),"cleanPage",this).call(this,e);var t=e+(e%2==1?-1:1);return!1===this.app.provider.requestedPages[e]&&!1===this.app.provider.requestedPages[t]}},{key:"onReady",value:function(){W(j(i.prototype),"onReady",this).call(this)}},{key:"searchPage",value:function(e){return{include:!this.isDoublePageFix(e),label:this.app.provider.getLabelforPage(e)+(this.isDoubleInternalPage(e)?"-"+this.app.provider.getLabelforPage(e+1):"")}}},{key:"isVertical",value:function(){return!1}}]),i}(x),Y=/*#__PURE__*/function(e){q(i,e);var t=Z(i);function i(e){var n;return H(this,i),(n=t.call(this)).zoomStamp="",n.pendingZoomScale=1,n}return V(i,[{key:"resetZoomTexture",value:function(){this.zoomElement&&this.zoomElement.html(""),this.zoomStamp=""}},{key:"resetTexture",value:function(){W(j(i.prototype),"resetTexture",this).call(this),this.resetZoomTexture()}}]),i}(_),J=/*#__PURE__*/function(e){q(i,e);var t=Z(i);function i(e,n){var o;return H(this,i),e.viewerClass="df-zoomview "+(e.viewerClass||""),(o=t.call(this,e,n)).viewer=o.app.viewer,o.events={},o.init(),o.initEvents(),o.left=0,o.top=0,o.zoomUpdateCount=0,o}return V(i,[{key:"init",value:function(){this.leftPage=new Y,this.rightPage=new Y,this.pages.push(this.leftPage),this.pages.push(this.rightPage),this.leftPage.element.addClass("df-page-back"),this.rightPage.element.addClass("df-page-front"),this.wrapper.append(this.leftPage.element),this.wrapper.append(this.rightPage.element),this.bookShadow=K("<div>",{class:"df-book-shadow"}),this.wrapper.append(this.bookShadow),this.wrapper.addClass("df-sheet")}},{key:"initEvents",value:function(){this.stageDOM=this.element[0],W(j(i.prototype),"initEvents",this).call(this)}},{key:"dispose",value:function(){this.element.remove()}},{key:"resize",value:function(){var e=this.app.dimensions,t=e.padding,i=this.app.viewer.availablePageHeight(),n=this.app.viewer.availablePageWidth(),o=this.fullWidth=n*(this.app.viewer.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE||this.app.viewer.isVertical()?1:2),s=this.fullHeight=i*(this.app.viewer.isVertical()&&this.app.viewer.pageMode!==p.FLIPBOOK_PAGE_MODE.SINGLE?2:1),a=e.stage.innerWidth,r=e.stage.innerHeight,l=this.shiftHeight=Math.ceil(X.limitAt((s-r)/2,0,s)),h=this.shiftWidth=Math.ceil(X.limitAt((o-a)/2,0,o));if(1===this.app.zoomValue&&(this.left=0,this.top=0),this.element.css({top:-l,bottom:-l,right:-h,left:-h,paddingTop:t.top,paddingRight:t.right,paddingBottom:t.bottom,paddingLeft:t.left,transform:"translate3d("+this.left+"px,"+this.top+"px,0)"}),this.wrapper.css({width:o,height:s,marginTop:e.height-s-t.height>0?(e.height-t.height-s)/2:0}),this.wrapper.height(s).width(o-o%2),!0===this.app.pendingZoom&&this.zoom(),this.app.viewer.annotedPage=null,this.pagesReady(),!0===this.app.options.progressiveZoom){if(this.app.zoomValue>this.app.viewer.pureMaxZoom){if(this.startZoomUpdateRequest(),this.leftPage.zoomElement&&""!=this.leftPage.zoomStamp){var u=this.leftPage.zoomIntersection,c=this.leftSheetHeight/this.leftPage.zoomParentHeight;this.leftPage.zoomElement.css({left:u.left*c,top:u.top*c,width:u.width*c,height:u.height*c}),console.log("Left:"+c+":"+this.leftPage.zoomElement[0].style.cssText)}if(this.rightPage.zoomElement&&""!=this.rightPage.zoomStamp){var d=this.rightPage.zoomIntersection,f=this.rightSheetHeight/this.rightPage.zoomParentHeight;this.rightPage.zoomElement.css({left:d.left*f,top:d.top*f,width:d.width*f,height:d.height*f}),console.log("Right:"+f+":"+this.rightPage.zoomElement[0].style.cssText)}}else this.leftPage.resetZoomTexture(),this.rightPage.resetZoomTexture()}}},{key:"zoom",value:function(){var e=this.app;if(e.zoomChanged){var t=e.dimensions.origin,i=e.zoomValueChange;if(1===e.zoomValue)this.left=0,this.top=0;else{this.left*=i,this.top*=i,e.viewer.zoomCenter||(e.viewer.zoomCenter={x:t.x,y:t.y});var n={raw:e.viewer.zoomCenter},o={raw:{}},s=(n.raw.x-t.x)*i,a=(n.raw.y-t.y)*i;o.raw.x=t.x+s,o.raw.y=t.y+a,this.startPoint=o,this.pan(n),this.startPoint=null,e.container.toggleClass("df-zoom-region-active",this.app.zoomValue>this.app.viewer.pureMaxZoom)}}e.viewer.zoomCenter=null}},{key:"reset",value:function(){this.leftPage.resetTexture(),this.rightPage.resetTexture()}},{key:"refresh",value:function(){var e=this.app,t=e.viewer,i=t.getBasePage(),n=t.isBooklet?!e.isRTL:e.isRTL,o=n?this.rightPage:this.leftPage,s=n?this.leftPage:this.rightPage;o.pageNumber=i,s.pageNumber=i+1,o.updateCSS({display:0===i?"none":"block"}),s.updateCSS({display:s.pageNumber>e.pageCount||t.isBooklet?"none":"block"})}},{key:"updateCenter",value:function(){var e=this.app.viewer.isVertical();if(null!==this&&null!==this.app.viewer){var t=1*this.app.viewer.centerShift*(this.app.viewer.isRTL,this.app.viewer.isLeftPage()?e?this.leftSheetHeight:this.leftSheetWidth:e?this.rightSheetHeight:this.rightSheetWidth)/2;e?this.wrapper[0].style.top=t+"px":this.wrapper[0].style.left=t+"px"}}},{key:"isDoubleInternalPage",value:function(e){return this.app.viewer.isDoubleInternalPage(e)}},{key:"pagesReady",value:function(){if(!this.app.viewer.isFlipping()&&(1!==this.app.zoomValue&&this.app.viewer.updatePendingStatusClass(!1),!1===this.app.options.flipbookFitPages)){var e=this.app.viewer.getBasePage(),t=this.leftViewPort=this.app.viewer.getViewPort(e+(this.app.viewer.isBooklet?0:this.app.viewer.isRTL?1:0)),i=this.rightViewPort=this.app.viewer.getViewPort(e+(this.app.viewer.isBooklet?0:this.app.viewer.isRTL?0:1));if(t){var n=X.contain(t.width,t.height,this.app.viewer.availablePageWidth(),this.app.viewer.availablePageHeight());this.leftSheetWidth=Math.floor(n.width),this.leftSheetHeight=Math.floor(n.height),this.leftSheetTop=(this.app.viewer.availablePageHeight()-this.leftSheetHeight)/2,this.topSheetLeft=(this.app.viewer.availablePageWidth()-this.leftSheetWidth)/2,this.app.zoomValue>this.app.viewer.pureMaxZoom&&this.leftPage.contentLayer[0].style.setProperty("--scale-factor",this.leftSheetHeight/t.height)}if(i){var o=X.contain(i.width,i.height,this.app.viewer.availablePageWidth(),this.app.viewer.availablePageHeight());this.rightSheetWidth=Math.floor(o.width),this.rightSheetHeight=Math.floor(o.height),this.rightSheetTop=(this.app.viewer.availablePageHeight()-this.rightSheetHeight)/2,this.bottomSheetLeft=(this.app.viewer.availablePageWidth()-this.rightSheetWidth)/2,this.app.zoomValue>this.app.viewer.pureMaxZoom&&this.rightPage.contentLayer[0].style.setProperty("--scale-factor",this.rightSheetHeight/i.height)}(void 0!=t||void 0!=i)&&(this.totalSheetsWidth=this.leftSheetWidth+this.rightSheetWidth,this.leftPage.element.height(Math.floor(this.leftSheetHeight)).width(Math.floor(this.leftSheetWidth)),this.rightPage.element.height(Math.floor(this.rightSheetHeight)).width(Math.floor(this.rightSheetWidth)),this.app.viewer.isVertical()?(this.leftPage.element.css({transform:"translateX("+Math.floor(this.topSheetLeft)+"px)"}),this.rightPage.element.css({transform:"translateX("+Math.floor(this.bottomSheetLeft)+"px)"})):(this.leftPage.element.css({transform:"translateY("+Math.floor(this.leftSheetTop)+"px)"}),this.rightPage.element.css({transform:"translateY("+Math.floor(this.rightSheetTop)+"px)"})))}}},{key:"textureLoadedCallback",value:function(e){this.getPageByNumber(e.pageNumber),this.pagesReady()}},{key:"mouseUp",value:function(e){W(j(i.prototype),"mouseUp",this).call(this,e),this.startZoomUpdateRequest()}},{key:"setPage",value:function(e){return this.app,this.app.viewer,W(j(i.prototype),"setPage",this).call(this,e)}},{key:"startZoomUpdateRequest",value:function(){this.zoomUpdateStatus=p.REQUEST_STATUS.COUNT}},{key:"checkRequestQueue",value:function(){W(j(i.prototype),"checkRequestQueue",this).call(this),!0===this.app.options.progressiveZoom&&(this.zoomUpdateStatus===p.REQUEST_STATUS.ON?(this.zoomUpdateStatus=p.REQUEST_STATUS.OFF,this.zoomUpdate()):this.zoomUpdateStatus===p.REQUEST_STATUS.COUNT&&(this.zoomUpdateCount++,this.zoomUpdateCount>3&&(this.zoomUpdateCount=0,this.zoomUpdateStatus=p.REQUEST_STATUS.ON)))}},{key:"zoomUpdate",value:function(){this.zoomUpdatePage({pageNumber:this.app.viewer.getRightPageNumber(),refHeight:this.rightSheetHeight}),this.zoomUpdatePage({pageNumber:this.app.viewer.getLeftPageNumber(),refHeight:this.leftSheetHeight})}},{key:"zoomUpdatePage",value:function(e){var t=this.app,i=this.app.options.pixelRatio,n=this.app.viewer,o="",s=this.getPageByNumber(e.pageNumber);if(void 0!==s){var a=X.elementIntersection(t.element,s.element,!0);if(t.zoomValue>n.pureMaxZoom&&a.width*a.height>0){if(!0===DEARFLIP.skipZoom)return;var r=s.pageNumber+"|"+JSON.stringify(a);if(s.zoomStamp==r){console.log("Rendered "+s.pageNumber+" Duplicate zoom request");return}s.zoomStamp=r;var l=t.viewer.getDocumentPageNumber(e.pageNumber),h=t.provider,u=e.pageNumber,p=performance.now();h.pdfDocument.getPage(l).then(function(n){s.element.offset(),e.isRestricted=!1;var c=t.viewer.getRenderContext(n,e);h.viewPorts[l],c.viewport=n.getViewport({scale:e.refHeight*i/h.viewPorts[l].height}),c.canvas.height=a.height*i,c.canvas.width=a.width*i,o=c.canvas.width+"x"+c.canvas.height+" - of("+c.viewport.width.toFixed(2)+"x"+c.viewport.height.toFixed(2)+")",console.log("Page "+u+" rendering - "+c.canvas.width+"x"+c.canvas.height),c.viewport.transform[4]-=a.left*i,c.viewport.transform[5]-=a.top*i,h.requestedPages+=","+e.trace+"["+l+"|"+c.canvas.height+"]",n.cleanupAfterRender=!1,n.render(c).promise.then(function(){var i=X.elementIntersection(t.element,s.element,!0);if(s.zoomStamp!==r){console.log("Faulty zoom texture detected");return}if(s.zoomStamp!==s.pageNumber+"|"+JSON.stringify(i)){console.log("Faulty zoom texture detected - instant");return}if(void 0===s.zoomElement&&(s.zoomElement=K("<div class='zoom-element'></div>"),s.element.append(s.zoomElement)),s.zoomElement.html(""),s.zoomElement.append(c.canvas),s.zoomElement.css({left:a.left,top:a.top,width:a.width,height:a.height}),s.zoomIntersection=a,s.zoomParentHeight=s.element.height(),!0===t.options.cleanupAfterRender){var d=","+e.trace+"["+l+"|"+c.canvas.height+"]";h.requestedPages.indexOf(d)>-1&&(h.requestedPages=h.requestedPages.replace(d,""),-1==h.requestedPages.indexOf("["+l+"|")&&(h.pagesToClean.push(n),h.pagesToClean.length>0&&h.cleanUpPages()))}c=null,console.log("Rendered "+u+" in "+Math.floor(performance.now()-p)+" ms:"+o+" for "+r)}).catch(function(e){console.log(e)})}).catch(function(e){console.log(e)})}}}}]),i}(x),$=/*#__PURE__*/function(){function e(t){H(this,e),this.parentElement=t.parentElement,this.isFlipping=!1,this.isOneSided=!1,this.viewer=t.viewer,this.frontPage=null,this.backPage=null,this.pageNumber=void 0,this.animateToReset=null}return V(e,[{key:"init",value:function(){}},{key:"flip",value:function(){}},{key:"frontImage",value:function(e){this.frontPage.loadTexture({texture:e.texture,callback:e.callback})}},{key:"backImage",value:function(e){this.backPage.loadTexture({texture:e.texture,callback:e.callback})}},{key:"resetTexture",value:function(){this.frontPage.resetTexture(),this.backPage.resetTexture()}},{key:"reset",value:function(){this.animateToReset=null,this.isFlipping=!1,this.currentTween=null,this.pendingPoint=null,this.magnetic=!1,this.skipFlip=!0,this.animateToReset=null,this.viewer.dragPage=null,this.viewer.flipPage=null,this.viewer.corner=p.TURN_CORNER.NONE}}]),e}();function ee(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function et(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ei(e,t,i){return t&&et(e.prototype,t),i&&et(e,i),e}function en(e,t,i){return(en="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=eo(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function eo(e){return(eo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function es(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ea(e,t)}function ea(e,t){return(ea=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function er(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=eo(e);return i=t?Reflect.construct(n,arguments,eo(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)}}var el=p.jQuery,eh=p.utils,eu=/*#__PURE__*/function(e){es(i,e);var t=er(i);function i(e){var n;return ee(this,i),(n=t.call(this,e)).init(),n}return ei(i,[{key:"init",value:function(){var e="<div>",t=this.element=el(e,{class:"df-sheet"}),i=this.frontPage=new _;i.element.addClass("df-page-front");var n=this.backPage=new _;n.element.addClass("df-page-back");var o=this.wrapper=el(e,{class:"df-sheet-wrapper"}),s=this.foldInnerShadow=el(e,{class:"df-sheet-fold-inner-shadow"}),a=this.foldOuterShadow=el(e,{class:"df-sheet-fold-outer-shadow"});this.parentElement.append(t),t.append(o),t.append(a),o.append(i.element),o.append(n.element),o.append(s)}},{key:"updateCSS",value:function(e){this.element.css(e)}},{key:"resetCSS",value:function(){this.wrapper.css({transform:""}),this.frontPage.resetCSS(),this.backPage.resetCSS()}},{key:"updateSize",value:function(e,t,i,n){e=Math.floor(e),t=Math.floor(t),i=Math.floor(i),n=Math.floor(n),this.wrapper[0].style.height=this.wrapper[0].style.width=Math.ceil(eh.distOrigin(e,t)*this.viewer.app.zoomValue)+"px",this.element[0].style.height=this.frontPage.element[0].style.height=this.backPage.element[0].style.height=this.foldInnerShadow[0].style.height=t+"px",this.element[0].style.width=this.frontPage.element[0].style.width=this.backPage.element[0].style.width=this.foldInnerShadow[0].style.width=e+"px",this.viewer.isVertical()?this.element[0].style.transform="translateX("+n+"px)":this.element[0].style.transform="translateY("+i+"px)"}},{key:"flip",value:function(e){var t=this;if(e=e||t.pendingPoint,null!=t&&null!=t.viewer){t.isFlipping=!0,t.viewer.flipPage=t;var i,n,o=t.viewer.isBooklet,s=t.side===p.TURN_DIRECTION.RIGHT,a=t.viewer.isRTL,r=t.viewer.corner===p.TURN_CORNER.BL||t.viewer.corner===p.TURN_CORNER.BR?t.element.height():0,l=t.viewer.leftSheetWidth+t.viewer.rightSheetWidth,h=0;n=t.end=t&&!0===t.animateToReset?{x:s?l:0,y:r}:{x:s?0:l,y:r},t.flipEasing=t.isHard?TWEEN.Easing.Quadratic.InOut:TWEEN.Easing.Linear.None;var u=t.viewer.app.options.duration;!0===t.isHard?(null!=e&&(h=eh.angleByDistance(e.distance,e.fullWidth)),i=t.init={angle:h*(s?-1:1)},n=t.end=t&&!0===t.animateToReset?{angle:s?0:-0}:{angle:s?-180:180}):null==e?i=t.init=t&&!0===t.animateToReset?{x:s?0:l,y:0}:{x:s?l:0,y:0}:(i=t.init={x:e.x,y:e.y,opacity:1},u=t.viewer.app.options.duration*eh.distPoints(i.x,i.y,n.x,n.y)/t.viewer.fullWidth,u=eh.limitAt(u,t.viewer.app.options.duration/3,t.viewer.duration)),i.index=0,n.index=1,t.isFlipping=!0,o&&(!s&&!a||s&&a)&&(t.element[0].style.opacity=0),!0===t.isHard?t.currentTween=new TWEEN.Tween(i).delay(0).to(n,t.viewer.app.options.duration).onUpdate(function(){t.updateTween(this)}).easing(t.flipEasing).onComplete(t.completeTween.bind(t)).start():null==e?t.currentTween=new TWEEN.Tween(i).delay(0).to(n,t.viewer.app.options.duration).onUpdate(function(){t.updateTween(this)}).easing(TWEEN.Easing.Sinusoidal.Out).onComplete(t.completeTween.bind(t)).start():t.currentTween=new TWEEN.Tween(i).delay(0).to(n,u).onUpdate(function(){t.updateTween(this)}).easing(TWEEN.Easing.Sinusoidal.Out).onComplete(t.completeTween.bind(t)).start()}}},{key:"updatePoint",value:function(e){if(null!=e){var t=this.element.width(),i=this.element.height(),n=this.viewer.corner!==p.TURN_CORNER.NONE?this.viewer.corner:e.corner,o=p.TURN_CORNER,s=this.side===p.TURN_DIRECTION.RIGHT,a=n===o.BL||n===o.BR;e.rx=!0===s?this.viewer.leftSheetWidth+t-e.x:e.x,e.ry=!0===a?i-e.y:e.y;var r=Math.atan2(e.ry,e.rx);r=Math.PI/2-eh.limitAt(r,0,eh.toRad(90));var l=t-e.rx/2,h=e.ry/2,u=Math.max(0,Math.sin(r-Math.atan2(h,l))*eh.distOrigin(l,h)),c=.5*eh.distOrigin(e.rx,e.ry),d=Math.ceil(t-u*Math.sin(r)),f=Math.ceil(u*Math.cos(r)),g=eh.toDeg(r),m=a?s?180+(90-g):180+g:s?g:90-g,v=a?s?180+(90-g):g:s?g+180:m,y=a?s?90-g:g+90:s?m-90:m+180,b=s?t-d:d,w=a?i+f:-f,P=s?-d:d-t,S=a?-i-f:f,E=eh.limitAt(.5*e.distance/t,0,.5),x=eh.limitAt((this.viewer.leftSheetWidth+t-e.rx)*.5/t,.05,.3);this.element.addClass("df-folding");var C=s?this.backPage.element:this.frontPage.element,T=s?this.frontPage.element:this.backPage.element,k=this.foldOuterShadow,O=this.foldInnerShadow;this.wrapper.css({transform:eh.translateStr(b,w)+eh.rotateStr(m)}),T.css({transform:eh.rotateStr(-m)+eh.translateStr(-b,-w)}),C.css({transform:eh.rotateStr(v)+eh.translateStr(P,S),boxShadow:"rgba(0, 0, 0, "+E+") 0px 0px 20px"}),O.css({transform:eh.rotateStr(v)+eh.translateStr(P,S),opacity:x/2,backgroundImage:eh.prefix.css+"linear-gradient("+y+"deg, rgba(0, 0, 0, 0.25) , rgb(0, 0, 0) "+.7*c+"px, rgb(255, 255, 255) "+c+"px)"}),k.css({opacity:x/2,left:s?"auto":0,right:s?0:"auto",backgroundImage:eh.prefix.css+"linear-gradient("+(-y+180)+"deg, rgba(0, 0, 0,0) "+c/3+"px, rgb(0, 0, 0) "+c+"px)"})}}},{key:"updateAngle",value:function(e,t){if(this.viewer.isVertical()){var i=5*this.element.height();this.wrapper.css({perspective:i,perspectiveOrigin:!0===t?"50% 0%":"50% 100%"}),this.element.addClass("df-folding"),this.backPage.updateCSS({display:!0===t?e<=-90?"block":"none":e<90?"block":"none",transform:("MfS"!==eh.prefix.dom?"":"perspective("+i+"px) ")+(!0===t?"translateY(-100%) ":"")+"rotateX("+((!0===t?180:0)-e)+"deg)"}),this.frontPage.updateCSS({display:!0===t?e>-90?"block":"none":e>=90?"block":"none",transform:("MSd"!==eh.prefix.dom?"":"perspective("+i+"px) ")+(!1===t?"translateY(100%) ":"")+"rotateX("+((!1===t?-180:0)-e)+"deg)"})}else{var n=5*this.element.width();this.wrapper.css({perspective:n,perspectiveOrigin:!0===t?"0% 50%":"100% 50%"}),this.element.addClass("df-folding"),this.backPage.updateCSS({display:!0===t?e<=-90?"block":"none":e<90?"block":"none",transform:("MfS"!==eh.prefix.dom?"":"perspective("+n+"px) ")+(!0===t?"translateX(-100%) ":"")+"rotateY("+((!0===t?180:0)+e)+"deg)"}),this.frontPage.updateCSS({display:!0===t?e>-90?"block":"none":e>=90?"block":"none",transform:("MSd"!==eh.prefix.dom?"":"perspective("+n+"px) ")+(!1===t?"translateX(100%) ":"")+"rotateY("+((!1===t?-180:0)+e)+"deg)"})}}},{key:"updateTween",value:function(e){var t=this.viewer.isBooklet,i=this.side===p.TURN_DIRECTION.RIGHT,n=this.viewer.isRTL,o=!0===this.animateToReset;!0===this.isHard?(this.updateAngle(e.angle,i),this.angle=e.angle):(this.updatePoint({x:e.x,y:e.y}),this.x=e.x,this.y=e.y),t&&!o&&(this.element[0].style.opacity=i&&!n||!i&&n?e.index>.5?2*(1-e.index):1:e.index<.5?2*e.index:1)}},{key:"completeTween",value:function(){!0===this.isHard?(this.updateAngle(this.end.angle),this.backPage.element.css({display:"block"}),this.frontPage.element.css({display:"block"})):this.updatePoint({x:this.end.x,y:this.end.y}),this.element[0].style.opacity=1,!0!==this.animateToReset&&(this.side=this.targetSide),this.reset(),this.viewer.onFlip(),this.viewer.afterFlip(),this.viewer.requestRefresh()}}]),i}($),ep=/*#__PURE__*/function(e){es(i,e);var t=er(i);function i(e,n){var o,s;return ee(this,i),e.viewerClass=null!==(s=e.viewerClass)&&void 0!==s?s:"df-flipbook-2d",e.skipViewerLoaded=!0,(o=t.call(this,e,n)).bookShadow=el("<div>",{class:"df-book-shadow"}),o.wrapper.append(o.bookShadow),o.corner=p.TURN_CORNER.NONE,n._viewerPrepared(),o}return ei(i,[{key:"init",value:function(){en(eo(i.prototype),"init",this).call(this),this.initEvents(),this.initPages()}},{key:"initEvents",value:function(){this.stageDOM=this.element[0],en(eo(i.prototype),"initEvents",this).call(this)}},{key:"dispose",value:function(){en(eo(i.prototype),"dispose",this).call(this),this.element.remove()}},{key:"initPages",value:function(){for(var e=0;e<this.stackCount;e++){var t=new eu({parentElement:this.wrapper});t.index=e,t.viewer=this,this.sheets.push(t),this.pages.push(t.frontPage),this.pages.push(t.backPage)}}},{key:"resize",value:function(){en(eo(i.prototype),"resize",this).call(this);var e=this.app.dimensions,t=e.padding,n=this.availablePageHeight(),o=this.availablePageWidth(),s=this.fullWidth=o*(this.app.viewer.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE||this.app.viewer.isVertical()?1:2),a=this.fullHeight=n*(this.app.viewer.isVertical()&&this.app.viewer.pageMode!==p.FLIPBOOK_PAGE_MODE.SINGLE?2:1),r=e.width,l=e.height,h=this.shiftHeight=Math.ceil(eh.limitAt((a-l+t.height)/2,0,a)),u=this.shiftWidth=Math.ceil(eh.limitAt((s-r+t.width)/2,0,s));1===this.app.zoomValue&&(this.left=0,this.top=0),this.element.css({top:-h,bottom:-h,right:-u,left:-u,paddingTop:t.top,paddingRight:t.right,paddingBottom:t.bottom,paddingLeft:t.left,transform:"translate3d("+this.left+"px,"+this.top+"px,0)"}),this.wrapper.css({marginTop:Math.max(e.height-a-t.height)/2,width:s-s%2,height:a}),this.zoomViewer.resize(),this.centerNeedsUpdate=!0,this.checkCenter(!0),this.pagesReady()}},{key:"updateCenter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.isVertical(),i=this.centerShift,n=(this.isRTL,this.isLeftPage()?this.leftSheetHeight:this.rightSheetHeight),o=this.isLeftPage()?this.leftSheetWidth:this.rightSheetWidth,s=t?0:i*o/2,a=t?i*n/2:0;this.wrapperShiftX=s,this.wrapperShiftY=a,this.seamPositionY=(this.app.dimensions.padding.heightDiff+this.app.dimensions.containerHeight)/2+a,this.seamPositionX=(-this.app.dimensions.offset.width+this.app.dimensions.containerWidth)/2+s,t?this.wrapper[0].style.top=this.wrapperShiftY+"px":this.wrapper[0].style.left=this.wrapperShiftX+"px",this.wrapper[0].style.transition=e?"none":"",this.zoomViewer.updateCenter()}},{key:"refreshSheet",value:function(e){var t=e.sheet,i=e.sheetNumber;!1===t.isFlipping&&(e.needsFlip?(t.element.addClass("df-flipping"),t.flip()):(t.skipFlip=!1,t.element.removeClass("df-flipping df-quick-turn df-folding df-left-side df-right-side"),t.element.addClass(t.targetSide===p.TURN_DIRECTION.LEFT?"df-left-side":"df-right-side"),t.side=t.targetSide,t.targetSide===p.TURN_DIRECTION.LEFT?this.isVertical()?t.updateSize(this.leftSheetWidth,this.leftSheetHeight,0,this.topSheetLeft):t.updateSize(this.leftSheetWidth,this.leftSheetHeight,this.leftSheetTop,0):this.isVertical()?t.updateSize(this.rightSheetWidth,this.rightSheetHeight,0,this.bottomSheetLeft):t.updateSize(this.rightSheetWidth,this.rightSheetHeight,this.rightSheetTop,0))),t.visible=e.visible,t.isHard?t.element.addClass("df-hard-sheet"):(t.element.removeClass("df-hard-sheet"),t.frontPage.updateCSS({display:"block"}),t.backPage.updateCSS({display:"block"})),t.updateCSS({display:!0===t.visible?"block":"none",zIndex:e.zIndex}),null==t.pendingPoint&&!1===t.isFlipping&&t.resetCSS(),i!==t.pageNumber&&(t.element.attr("number",i),t.backPage.element.attr("pagenumber",t.backPage.pageNumber),t.frontPage.element.attr("pagenumber",t.frontPage.pageNumber))}},{key:"eventToPoint",value:function(e){var t=this.isVertical();e=eh.fixMouseEvent(e);var i,n,o,s,a,r,l,h,u,c,d=this.wrapper[0].getBoundingClientRect(),f=this.is3D,g=this.sheets,m=(this.app.dimensions,{x:e.clientX,y:e.clientY}),v=this.parentElement[0].getBoundingClientRect();m.x=m.x-v.left,m.y=m.y-v.top,i=(c=this.dragSheet?this.dragSheet.side===p.TURN_DIRECTION.RIGHT:t?m.y>this.seamPositionY:m.x>this.seamPositionX)?this.rightSheetWidth:this.leftSheetWidth,s=c?this.rightSheetHeight:this.leftSheetHeight,n=t?i:this.rightSheetWidth+this.leftSheetWidth,o=t?this.leftSheetHeight+this.rightSheetHeight:s,r=c?this.rightSheetTop:this.leftSheetTop,a=t?m.x-(this.seamPositionX-(c?this.rightSheetWidth:this.leftSheetWidth)/2):m.x-(this.seamPositionX-this.leftSheetWidth),r=m.y-(d.top-v.top)-r,l=this.drag===p.TURN_DIRECTION.NONE?a<i?a:n-a:this.drag===p.TURN_DIRECTION.LEFT?a:n-a,h=c?g[this.stackCount/2]:g[this.stackCount/2-1],u=a<this.foldSense?p.TURN_DIRECTION.LEFT:a>n-this.foldSense?p.TURN_DIRECTION.RIGHT:p.TURN_DIRECTION.NONE;var y,b=r,w=this.foldSense;return y=a>=0&&a<w?b>=0&&b<=w?p.TURN_CORNER.TL:b>=o-w&&b<=o?p.TURN_CORNER.BL:b>w&&b<o-w?p.TURN_CORNER.L:p.TURN_CORNER.NONE:a>=n-w&&a<=n?b>=0&&b<=w?p.TURN_CORNER.TR:b>=o-w&&b<=o?p.TURN_CORNER.BR:b>w&&b<o-w?p.TURN_CORNER.R:p.TURN_CORNER.NONE:p.TURN_CORNER.NONE,{isInsideSheet:a>=0&&a<=n&&b>=0&&b<=o,isInsideCorner:y!==p.TURN_CORNER.NONE&&y!==p.TURN_CORNER.L&&y!==p.TURN_CORNER.R,x:f?m.x:a,y:f?m.y:r,fullWidth:n,sheetWidth:i,sheetHeight:s,rawDistance:n-a,distance:l,sheet:h,drag:u,foldSense:this.foldSense,event:e,raw:m,corner:y}}},{key:"pan",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];eh.pan(this,e,t)}},{key:"mouseMove",value:function(e){var t=this.eventToPoint(e);if(null!=e.touches&&2==e.touches.length){this.pinchMove(e);return}1!==this.app.zoomValue&&null!=this.startPoint&&!0===this.canSwipe&&(this.pan(t),e.preventDefault());var i=this.dragSheet||t.sheet;if(null==this.flipPage&&(null!=this.dragSheet||!0===t.isInsideCorner)){null!=this.dragSheet||(t.y=eh.limitAt(t.y,1,this.availablePageHeight()-1),t.x=eh.limitAt(t.x,1,t.fullWidth-1));var n=null!=this.dragSheet?this.corner:t.corner;if(i.isHard){var o=n===p.TURN_CORNER.BR||n===p.TURN_CORNER.TR,s=eh.angleByDistance(t.distance,t.fullWidth);i.updateAngle(s*(o?-1:1),o)}else i.updatePoint(t);i.magnetic=!0,i.magneticCorner=t.corner,e.preventDefault()}null==this.dragSheet&&null!=i&&!1===t.isInsideCorner&&!0===i.magnetic&&(i.pendingPoint=t,i.animateToReset=!0,i.magnetic=!1,this.corner=i.magneticCorner,i.flip(i.pendingPoint),i.pendingPoint=null),this.checkSwipe(t,e)}},{key:"mouseUp",value:function(e){if(e.touches||0===e.button){if(null==this.dragSheet&&null!=e.touches&&0==e.touches.length){this.pinchUp(e);return}var t=this.eventToPoint(e),i=e.target||e.originalTarget,n=1===this.app.zoomValue&&t.x===this.startPoint.x&&t.y===this.startPoint.y&&"A"!==i.nodeName;if(!0===e.ctrlKey&&n)this.zoomOnPoint(t);else if(this.dragSheet){e.preventDefault();var o=this.dragSheet;if(o.pendingPoint=t,this.drag=t.drag,n&&(!0===t.isInsideCorner||t.isInsideSheet&&this.clickAction===p.MOUSE_CLICK_ACTIONS.NAV))t.corner.indexOf("l")>-1?this.app.openLeft():this.app.openRight();else{var s=this.getBasePage();t.distance>t.sheetWidth/2&&(t.sheet.side===p.TURN_DIRECTION.LEFT?this.app.openLeft():this.app.openRight()),s===this.getBasePage()&&(o.animateToReset=!0,o.flip(t))}this.dragSheet=null,o.magnetic=!1}else n&&!t.sheet.isFlipping&&t.isInsideSheet&&this.clickAction===p.MOUSE_CLICK_ACTIONS.NAV&&("left"===t.sheet.side?this.app.openLeft():this.app.openRight());this.startPoint=null,this.canSwipe=!1,this.drag=p.TURN_DIRECTION.NONE}}},{key:"mouseDown",value:function(e){if(e.touches||0===e.button){if(null!=e.touches&&2==e.touches.length){this.pinchDown(e);return}var t=this.eventToPoint(e);this.startPoint=t,this.lastPosX=t.x,this.lastPosY=t.y,t.isInsideCorner&&null==this.flipPage?(this.dragSheet=t.sheet,this.drag=t.drag,this.corner=t.corner,0===t.sheet.pageNumber?this.bookShadow.css({width:"50%",left:this.app.isRTL?0:"50%",transitionDelay:""}):t.sheet.pageNumber===Math.ceil(this.app.pageCount/2)-1&&this.bookShadow.css({width:"50%",left:this.app.isRTL?"50%":0,transitionDelay:""})):this.canSwipe=!0}}},{key:"onScroll",value:function(e){}},{key:"resetPageTween",value:function(){for(var e=0;e<this.stackCount;e++){var t=this.sheets[e];t.currentTween&&t.currentTween.complete(!0)}this.requestRefresh()}},{key:"pagesReady",value:function(){if(!this.isFlipping()){if(!1===this.app.options.flipbookFitPages){var e=this.app.viewer.getBasePage(),t=this.leftViewport=this.getViewPort(e+(this.isBooklet?0:this.isRTL?1:0)),i=this.rightViewPort=this.getViewPort(e+(this.isBooklet?0:this.isRTL?0:1));if(t){var n=eh.contain(t.width,t.height,this.availablePageWidth(),this.availablePageHeight());this.leftSheetWidth=Math.floor(n.width),this.leftSheetHeight=Math.floor(n.height),this.leftSheetTop=(this.availablePageHeight()-this.leftSheetHeight)/2,this.topSheetLeft=(this.app.viewer.availablePageWidth()-this.leftSheetWidth)/2}if(i){var o=eh.contain(i.width,i.height,this.availablePageWidth(),this.availablePageHeight());this.rightSheetWidth=Math.floor(o.width),this.rightSheetHeight=Math.floor(o.height),this.rightSheetTop=(this.availablePageHeight()-this.rightSheetHeight)/2,this.bottomSheetLeft=(this.app.viewer.availablePageWidth()-this.rightSheetWidth)/2}this.totalSheetsWidth=this.leftSheetWidth+this.rightSheetWidth;for(var s=0;s<this.sheets.length;s++){var a=this.sheets[s];a.side===p.TURN_DIRECTION.LEFT?this.isVertical()?a.updateSize(this.leftSheetWidth,this.leftSheetHeight,0,this.topSheetLeft):a.updateSize(this.leftSheetWidth,this.leftSheetHeight,this.leftSheetTop,0):this.isVertical()?a.updateSize(this.rightSheetWidth,this.rightSheetHeight,0,this.bottomSheetLeft):a.updateSize(this.rightSheetWidth,this.rightSheetHeight,this.rightSheetTop,0)}}this.updateCenter(),this.updatePendingStatusClass(),this.app.executeCallback("onPagesReady")}}},{key:"textureLoadedCallback",value:function(e){this.getPageByNumber(e.pageNumber),this.pagesReady()}},{key:"isSheetHard",value:function(e){return!!this.isVertical()||en(eo(i.prototype),"isSheetHard",this).call(this,e)}}]),i}(Q);function ec(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function ed(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ef(e,t,i){return t&&ed(e.prototype,t),i&&ed(e,i),e}function eg(e,t,i){return(eg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=em(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function em(e){return(em=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ev(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ey(e,t)}function ey(e,t){return(ey=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=em(e);return i=t?Reflect.construct(n,arguments,em(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this)}}var ew=p.jQuery,eP=p.utils,eS=/*#__PURE__*/function(e){ev(i,e);var t=eb(i);function i(){return ec(this,i),t.apply(this,arguments)}return ef(i,[{key:"init",value:function(){var e=this.element=ew("<div>",{class:"df-sheet"});(this.frontPage=new _).element.addClass("df-page-front").appendTo(this.element),(this.backPage=new _).element.addClass("df-page-back").appendTo(this.element),this.parentElement.append(e),this.frontPage.sheet=this.backPage.sheet=this}},{key:"completeTween",value:function(){this.isFlipping=!1,this.viewer.onFlip(),this.viewer.afterFlip(),this.viewer.requestRefresh(),this.element[0].style.opacity=1}},{key:"flip",value:function(e){this.side=this.targetSide,this.completeTween()}},{key:"updateSize",value:function(e,t,i,n){e=Math.floor(e),t=Math.floor(t),i=Math.floor(i),this.element[0].style.height=this.frontPage.element[0].style.height=t+"px",this.element[0].style.width=this.frontPage.element[0].style.width=e+"px",this.element[0].style.transform="translateX("+this.positionX+"px) translateY("+i+"px)"}}]),i}(eu),eE=/*#__PURE__*/function(e){ev(i,e);var t=eb(i);function i(e,n){var o;return ec(this,i),e.viewerClass="df-slider",e.pageMode=p.FLIPBOOK_PAGE_MODE.SINGLE,e.singlePageMode=p.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET,e.pageSize=p.FLIPBOOK_PAGE_SIZE.SINGLE,(o=t.call(this,e,n)).stackCount=10,o.soundOn=!1,o.foldSense=0,n._viewerPrepared(),o}return ef(i,[{key:"initPages",value:function(){for(var e=0;e<this.stackCount;e++){var t=new eS({parentElement:this.wrapper});t.index=e,t.viewer=this,this.sheets.push(t),this.pages.push(t.frontPage),this.pages.push(t.backPage)}}},{key:"resize",value:function(){eg(em(i.prototype),"resize",this).call(this),this.skipTransition=!0}},{key:"refreshSheet",value:function(e){var t=e.sheet,i=e.sheetNumber;t.element.toggleClass("df-no-transition",t.skipFlip||this.skipTransition),!1===t.isFlipping&&(e.needsFlip?t.flip():(t.skipFlip=!1,t.element.removeClass("df-flipping df-quick-turn df-folding df-left-side df-right-side"),t.element.addClass(t.targetSide===p.TURN_DIRECTION.LEFT?"df-left-side":"df-right-side"),t.side=t.targetSide)),t.visible=e.visible,t.updateCSS({display:e.sheetNumber>0&&e.sheetNumber<=this.app.pageCount?"block":"none",zIndex:e.zIndex}),i!==t.pageNumber&&(t.element.attr("number",i),t.backPage.element.attr("pagenumber",t.backPage.pageNumber),t.frontPage.element.attr("pagenumber",t.frontPage.pageNumber))}},{key:"refresh",value:function(){eg(em(i.prototype),"refresh",this).call(this),this.skipTransition=!1}},{key:"eventToPoint",value:function(e){var t=eg(em(i.prototype),"eventToPoint",this).call(this,e);return t.isInsideSheet=ew(e.srcElement).closest(".df-page").length>0,t.isInsideCorner=!1,t}},{key:"initCustomControls",value:function(){var e=this.app.ui.controls;e.pageMode&&e.pageMode.hide()}},{key:"setPageMode",value:function(e){e.isSingle=!0,eg(em(i.prototype),"setPageMode",this).call(this,e)}},{key:"pagesReady",value:function(){if(!this.isFlipping()){var e=0,t=0,i=this.app;this.stackCount;for(var n=[],o=i.currentPageNumber,s=0;s<this.stackCount/2;s++)n.push(o+s),n.push(o-s-1);for(var a=0;a<this.stackCount;a++){var r=n[a];if(this.getPageByNumber(r)){var l=this.getPageByNumber(r).sheet,h=this.getViewPort(l.pageNumber,!0),u=eP.contain(h.width,h.height,this.availablePageWidth(),this.availablePageHeight());i.currentPageNumber===l.pageNumber&&(this.leftSheetWidth=this.rightSheetWidth=Math.floor(u.width)),i.currentPageNumber>l.pageNumber?(e-=Math.floor(u.width)+10,l.positionX=e):(l.positionX=t,t+=Math.floor(u.width)+10);var p=(this.availablePageHeight()-u.height)/2;l.updateSize(Math.floor(u.width*i.zoomValue),Math.floor(u.height*i.zoomValue),p)}}this.updateCenter(),this.updatePendingStatusClass(),this.app.executeCallback("onPagesReady")}}},{key:"isVertical",value:function(){return!1}}]),i}(ep);function ex(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eC(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function eT(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ek(e,t,i){return t&&eT(e.prototype,t),i&&eT(e,i),e}function eO(e){return(eO=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eR(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eL(e,t)}function eL(e,t){return(eL=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eN(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=eO(e);return i=t?Reflect.construct(n,arguments,eO(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:ex(this)}}var e_={};function eI(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eA(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function eM(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ez(e,t,i){return t&&eM(e.prototype,t),i&&eM(e,i),e}function eD(e,t,i){return(eD="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=eF(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i||e):o.value}})(e,t,i||e)}function eF(e){return(eF=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eB(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eH(e,t)}function eH(e,t){return(eH=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eU(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var i,n=eF(e);return i=t?Reflect.construct(n,arguments,eF(this).constructor):n.apply(this,arguments),i&&("object"==(i&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i)||"function"==typeof i)?i:eI(this)}}e_.init=function(){if(!0!==e_.initialized){var e=window.THREE;e_={init:function(){},initialized:!0,GEOMETRY_TYPE:{PLANE:0,BOX:1,MODEL:2},MATERIAL_FACE:{FRONT:5,BACK:4},WHITE_COLOR:new e.Color("white"),defaults:{anisotropy:8,maxTextureSize:2048,groundTexture:"blank",color:16777215,shininess:15,width:210,height:297,depth:.2,segments:150,textureLoadFallback:"blank"},textureLoader:new e.TextureLoader,clearChild:function(e){var t,i=e.material;if(e.parent.remove(e),e=m.disposeObject(e),null!=i){if(null==i.length)i.map&&(t=i.map,i.dispose(),t.dispose()),i.bumpMap&&(t=i.bumpMap,i.dispose(),t.dispose()),i.normalMap&&(t=i.normalMap,i.dispose(),t.dispose());else for(var n=0;n<i.length;n++)i[n]&&(i[n].map&&(t=i[n].map,i[n].dispose(),t.dispose()),i[n].bumpMap&&(t=i[n].bumpMap,i[n].dispose(),t.dispose()),i[n].normalMap&&(t=i[n].normalMap,i[n].dispose(),t.dispose())),i[n]=null;i=null,t=null}},loadImage:function(t,i,n,o,s){if(null==i){var a=null==t.material[n]?null:t.material[n][o]?t.material[n][o].sourceFile:null;return null==a?null:a.indexOf("data:image")>-1?null:a}var r=null;return"CANVAS"===i.nodeName||"IMG"===i.nodeName?((r=new e.Texture(i)).needsUpdate=!0,e_.loadTexture(r,t,o,n),"function"==typeof s&&s(t,r)):"blank"!==i?(r=null==i?null:e_.textureLoader.load(i,function(e){e.sourceFile=i,e_.loadTexture(e,t,o,n),"function"==typeof s&&s(t,e)},void 0,function(){null==r.image&&e_.loadImage(t,e_.defaults.textureLoadFallback,n,o),e_.loadTextureFailed()}))&&(r.mapping=e.UVMapping):(e_.loadTexture(null,t,o,n),"function"==typeof s&&s(t,r)),0},loadTexture:function(t,i,n,o){if(t){var s=t.image;t.naturalWidth=s.naturalWidth,t.naturalHeight=s.naturalHeight,t.needsUpdate=!0,void 0!=i.textureRotation&&(t.rotation=e.MathUtils.degToRad(i.textureRotation),t.center=i.textureCenter)}null!==t&&"map"===n&&(t.anisotropy=0,e_.defaults.anisotropy>0&&(t.anisotropy=e_.defaults.anisotropy),!0===e.skipPowerOfTwo&&(t.minFilter=e.LinearFilter,t.magFilter=e.LinearFilter),t.name=new Date().toTimeString()),e_.clearTexture(i.material[o][n]),i.material[o][n]=t,"bumpMap"===n&&(i.material[o].bumpScale=i.sheet.getBumpScale(o)),i.material[o].needsUpdate=!0},loadTextureFailed:function(){return null},clearTexture:function(e){if(e){if(e.image&&"CANVAS"===e.image.nodeName){if(e.image.remove)try{e.image.remove()}catch(e){console.log(e)}delete e.image}e=m.disposeObject(e)}}},e.skipPowerOfTwo=!0;var t=/*#__PURE__*/function(t){eR(n,t);var i=eN(n);function n(t){eC(this,n);var o,s=t.width||e_.defaults.width,a=t.height||e_.defaults.height,r=t.color||e_.defaults.color,l=t.segments||e_.defaults.segments,h=t.depth||e_.defaults.depth,u={color:r,flatShading:!1,shininess:t.shininess||e_.defaults.shininess},p=new e.MeshPhongMaterial(u),c=[p,p,p,p,new e.MeshPhongMaterial(u),new e.MeshPhongMaterial(u)];return(o=i.call(this,new e.BoxGeometry(s,a,h,l,1,1),c)).material[5].transparent=!0,o.material[4].transparent=!0,o.baseType="Paper",o.type="Paper",o.castShadow=!0,o.receiveShadow=!0,t.parent3D.add(ex(o)),o}return ek(n,[{key:"loadImage",value:function(e,t,i){e_.loadImage(this,e,t,"map",i)}},{key:"frontImage",value:function(e,t){e_.loadImage(this,e,e_.MATERIAL_FACE.FRONT,"map",t)}},{key:"backImage",value:function(e,t){e_.loadImage(this,e,e_.MATERIAL_FACE.BACK,"map",t)}},{key:"loadBump",value:function(e){e_.loadImage(this,e,e_.MATERIAL_FACE.FRONT,"bumpMap",null),e_.loadImage(this,e,e_.MATERIAL_FACE.BACK,"bumpMap",null)}},{key:"loadNormalMap",value:function(e,t){if(void 0!==t){e_.loadImage(this,e,t,"normalMap",null);return}e_.loadImage(this,e,e_.MATERIAL_FACE.FRONT,"normalMap",null),e_.loadImage(this,e,e_.MATERIAL_FACE.BACK,"normalMap",null)}}]),n}(e.Mesh),i=/*#__PURE__*/function(e){eR(i,e);var t=eN(i);function i(e){var n;return eC(this,i),(n=t.call(this,e)).receiveShadow=!0,n.frontImage(e_.defaults.groundTexture),n.backImage(e_.defaults.groundTexture),n.type="Ground",n}return i}(t),n=/*#__PURE__*/function(t){eR(o,t);var n=eN(o);function o(t){eC(this,o);var s,a=ex(s=n.call(this));a.canvas=t.canvas||document.createElement("canvas"),a.canvas=s.canvas,a.camera=new e.PerspectiveCamera(20,a.width/a.height,4,5e4),a.renderer=new e.WebGLRenderer({canvas:a.canvas,antialias:!0,alpha:!0}),a.renderer.setPixelRatio(t.pixelRatio),a.renderer.setSize(a.width,a.height),a.renderer.setClearColor(16777215,0),a.renderer.shadowMap.enabled=!0,a.renderer.shadowMap.type=1,a.ground=new i({color:16777215,height:a.camera.far/10,width:a.camera.far/10,segments:2,parent3D:a}),a.ambientLight=new e.AmbientLight(4473924),a.add(a.ambientLight);var r=a.spotLight=new e.DirectionalLight(16777215,.25);return r.position.set(0,1,0),!1!==t.castShadow&&(r.castShadow=!0,r.shadow.camera.near=200,r.shadow.camera.far=2e3,r.shadow.camera.top=1350,r.shadow.camera.bottom=-1350,r.shadow.camera.left=-1350,r.shadow.camera.right=1350,r.shadow.radius=2,r.shadow.mapSize.width=1024,r.shadow.mapSize.height=1024,r.shadow.needsUpdate=!0),a.add(r),a.animateCount=0,a.renderCount=0,a.camera.position.set(-300,300,300),a.camera.lookAt(new e.Vector3(0,0,0)),s}return ek(o,[{key:"resizeCanvas",value:function(e,t){this.renderer.setSize(e,t),this.camera.aspect=e/t,this.camera.updateProjectionMatrix()}},{key:"render",value:function(){this.animateCount++,this.renderer.render(this,this.camera),null!=this.stats&&this.stats.update()}},{key:"clearMaterials",value:function(){for(var e=this.children.length,t=e-1;t>=0;t--){var i=this.children[t];if(i.baseType&&"Paper"===i.baseType&&i.material){if(i.material.length)for(var n=0;n<i.material.length;n++)i.material[n].needsUpdate=!0;else i.material.needsUpdate=!0}}}},{key:"clearChild",value:function(){this.spotLight.shadow.map=m.disposeObject(this.spotLight.shadow.map),this.spotLight.castShadow=!1,this.clearMaterials();for(var e=this.children.length,t=e-1;t>=0;t--){var i=this.children[t];if(i.children&&i.children.length>0)for(var n=i.children.length-1;n>=0;n--)e_.clearChild(i.children[n]);e_.clearChild(i),i=null}this.render()}}]),o}(e.Scene);e_.Paper=t,e_.Stage=n;var o=/*#__PURE__*/function(e){eR(i,e);var t=eN(i);function i(e){var n;return eC(this,i),(n=t.call(this)).element=e,n.element.style.position="absolute",n.addEventListener("removed",function(){null!==this.element.parentNode&&this.element.parentNode.removeChild(this.element)}),n}return i}(e.Object3D);e.CSS3DObject=o;var s=/*#__PURE__*/function(e){eR(i,e);var t=eN(i);function i(e){return eC(this,i),t.call(this,e)}return i}(e.CSS3DObject);e.CSS3DSprite=s,e.MathUtils&&(e.Math=e.MathUtils),e.CSS3DRenderer=function(){m.log("THREE.CSS3DRenderer",e.REVISION);var t,i,n,o,s=new e.Matrix4,a={camera:{fov:0,style:""},objects:{}},r=document.createElement("div");r.style.overflow="hidden",r.style.WebkitTransformStyle="preserve-3d",r.style.MozTransformStyle="preserve-3d",r.style.oTransformStyle="preserve-3d",r.style.transformStyle="preserve-3d",this.domElement=r;var l=document.createElement("div");l.style.WebkitTransformStyle="preserve-3d",l.style.MozTransformStyle="preserve-3d",l.style.oTransformStyle="preserve-3d",l.style.transformStyle="preserve-3d",r.appendChild(l),this.setClearColor=function(){},this.getSize=function(){return{width:t,height:i}},this.setSize=function(e,s){t=e,i=s,n=t/2,o=i/2,r.style.width=e+"px",r.style.height=s+"px",l.style.width=e+"px",l.style.height=s+"px"};var h=function(e){return Math.abs(e)<Number.EPSILON?0:e},u=function(e){var t=e.elements;return"matrix3d("+h(t[0])+","+h(-t[1])+","+h(t[2])+","+h(t[3])+","+h(t[4])+","+h(-t[5])+","+h(t[6])+","+h(t[7])+","+h(t[8])+","+h(-t[9])+","+h(t[10])+","+h(t[11])+","+h(t[12])+","+h(-t[13])+","+h(t[14])+","+h(t[15])+")"},p=function(e){var t=e.elements;return"translate3d(-50%,-50%,0) matrix3d("+h(t[0])+","+h(t[1])+","+h(t[2])+","+h(t[3])+","+h(-t[4])+","+h(-t[5])+","+h(-t[6])+","+h(-t[7])+","+h(t[8])+","+h(t[9])+","+h(t[10])+","+h(t[11])+","+h(t[12])+","+h(t[13])+","+h(t[14])+","+h(t[15])+")"},c=function(t,i){if(t instanceof e.CSS3DObject){t instanceof e.CSS3DSprite?(s.copy(i.matrixWorldInverse),s.transpose(),s.copyPosition(t.matrixWorld),s.scale(t.scale),s.elements[3]=0,s.elements[7]=0,s.elements[11]=0,s.elements[15]=1,n=p(s)):n=p(t.matrixWorld);var n,o=t.element,r=a.objects[t.id];(void 0===r||r!==n)&&(o.style.WebkitTransform=n,o.style.MozTransform=n,o.style.oTransform=n,o.style.transform=n,a.objects[t.id]=n),o.parentNode!==l&&l.appendChild(o)}for(var h=0,u=t.children.length;h<u;h++)c(t.children[h],i)};this.render=function(t,s){var h=.5/Math.tan(e.Math.degToRad(.5*s.fov))*i;a.camera.fov!==h&&(r.style.WebkitPerspective=h+"px",r.style.MozPerspective=h+"px",r.style.oPerspective=h+"px",r.style.perspective=h+"px",a.camera.fov=h),t.updateMatrixWorld(),null===s.parent&&s.updateMatrixWorld(),s.matrixWorldInverse.invert?s.matrixWorldInverse.copy(s.matrixWorld).invert():s.matrixWorldInverse.getInverse(s.matrixWorld);var p="translate3d(0,0,"+h+"px)"+u(s.matrixWorldInverse)+" translate3d("+n+"px,"+o+"px, 0)";a.camera.style!==p&&(l.style.WebkitTransform=p,l.style.MozTransform=p,l.style.oTransform=p,l.style.transform=p,a.camera.style=p),c(t,s)}}}};var eV=p.jQuery,eW=p.utils,ej=/*#__PURE__*/function(e){eB(i,e);var t=eU(i);function i(e){var n;return eA(this,i),(n=t.call(this,e)).flexibility=e.flexibility,n.sheetAngle=180,n.curveAngle=0,n.parent3D=e.parent3D,n.segments=e.segments||50,n.width=e.width||100,n.height=e.height||100,n.depth=e.depth||.5,n.matColor="white",n.fallbackMatColor=e_.WHITE_COLOR,n.init(),n.bumpScale=[0,0,0,0,1,1],n}return ez(i,[{key:"init",value:function(){this.element=new e_.Paper({parent3D:this.parent3D,segments:this.segments,depth:this.depth,height:this.height,width:this.width,flatShading:0===this.flexibility}),this.element.sheet=this,this.frontPage=new eG({sheet:this,face:5}),this.backPage=new eG({sheet:this,face:4}),this.reset(),this.updateAngle()}},{key:"setMatColor",value:function(e,t){if(this.matColor=new THREE.Color(e),void 0===t)for(var i=0;i<6;i++)this.element.material[i].color=this.matColor;else this.element.material[t].color=this.matColor}},{key:"getBumpScale",value:function(e){return this.bumpScale[e]}},{key:"resetMatColor",value:function(e,t){this.element.material[e].color=t?this.matColor:this.fallbackMatColor}},{key:"frontImage",value:function(e,t){this.element.frontImage(e,t)}},{key:"backImage",value:function(e,t){this.element.backImage(e,t)}},{key:"updateAngle",value:function(){if(void 0!==this.viewer&&null!==this.viewer){var e=!0===this.isHard?0:this.flexibility,t=(this.viewer.isVertical()?this.height:this.width)*(1-Math.sin(e/2*(e/2))/2-e/20);this.element.scale.y=(this.viewer.isVertical()?this.width:this.height)/this.element.geometry.parameters.height;var i=this.segments,n=t/1,o=n*e,s=[],a=[],r=[],l=[],h=[],u=[],p=this.depth,c=0,d=[];d.push(c),h[0]=[],u[0]=[];var f=this.sheetAngle*Math.PI/180;this.viewer.isVertical()||(this.element.position.x=-Math.cos(f)*this.viewer.pageOffset),this.viewer.isVertical()&&(this.element.position.y=Math.cos(f)*this.viewer.pageOffset);var g=!0===this.isHard?f:this.curveAngle*Math.PI/180,m=this.sheetAngle*Math.PI/180,v=m-Math.PI/2,y=Math.sin(v)*p/2;h[0][0]=h[0][1]=new THREE.Vector3(-n*Math.cos(f),0,Math.sin(f)*n-y),u[0][0]=u[0][1]=new THREE.Vector3(h[0][0].x-Math.cos(v)*p,0,h[0][0].z+2*y),h[0][1]=new THREE.Vector3(-n/2*Math.cos(g),0,n/2*Math.sin(g)-y),u[0][1]=new THREE.Vector3(h[0][1].x-Math.cos(v)*p,0,h[0][1].z+2*y),m=(45+this.sheetAngle/2)*Math.PI/180,h[0][2]=new THREE.Vector3(-Math.cos(m)*o/2,0,Math.sin(m)*o-y),u[0][2]=new THREE.Vector3(h[0][2].x+Math.cos(v)*p,0,h[0][2].z+2*y),5e-4>Math.abs(u[0][2].x-0)&&(u[0][2].x=0),h[0][3]=new THREE.Vector3(0,0,-y),u[0][3]=new THREE.Vector3(h[0][3].x-Math.cos(v)*p,0,h[0][3].z+2*y),5e-4>Math.abs(u[0][3].x-0)&&(u[0][3].x=0);for(var b=0;b<1;b++){var w=Math.max(this.segments-1,1);s[b]=new THREE.CubicBezierCurve3(h[b][0],h[b][1],h[b][2],h[b][3]),r[b]=s[b].getPoints(w),w>2&&r[b].push(new THREE.Vector3().copy(r[b][w]));for(var P=void 0,S=r[b][0],E=1;E<r[b].length;E++)c+=(P=r[b][E]).distanceTo(S),d.push(c),S=P;a[b]=new THREE.CubicBezierCurve3(u[b][0],u[b][1],u[b][2],u[b][3]),l[b]=a[b].getPoints(w),w>2&&l[b].push(new THREE.Vector3().copy(l[b][w]))}var x=this.element.geometry;if(void 0!==x.attributes){var C=x.attributes.position,T=x.attributes.uv,k=i+1;C.setZ(0,r[0][i].z),C.setZ(2,r[0][i].z),C.setX(0,r[0][i].x),C.setX(2,r[0][i].x),C.setZ(1,l[0][i].z),C.setZ(3,l[0][i].z),C.setX(1,l[0][i].x),C.setX(3,l[0][i].x),C.setZ(5,r[0][0].z),C.setZ(7,r[0][0].z),C.setX(5,r[0][0].x),C.setX(7,r[0][0].x),C.setZ(4,l[0][0].z),C.setZ(6,l[0][0].z),C.setX(4,l[0][0].x),C.setX(6,l[0][0].x);for(var O=0;O<1;O++)for(var R=0;R<k;R++)C.setZ(8+0*k+R,r[0][R].z),C.setX(8+0*k+R,r[0][R].x),C.setZ(8+1*k+R,l[0][R].z),C.setX(8+1*k+R,l[0][R].x),C.setZ(8+2*k+R,r[0][R].z),C.setX(8+2*k+R,r[0][R].x),C.setZ(8+3*k+R,l[0][R].z),C.setX(8+3*k+R,l[0][R].x),C.setZ(8+4*k+R,r[0][R].z),C.setX(8+4*k+R,r[0][R].x),C.setZ(8+5*k+R,r[0][R].z),C.setX(8+5*k+R,r[0][R].x),T.setX(8+4*k+R,d[R]/c),T.setX(8+5*k+R,d[R]/c),C.setZ(8+6*k+R,l[0][i-R].z),C.setX(8+6*k+R,l[0][i-R].x),C.setZ(8+7*k+R,l[0][i-R].z),C.setX(8+7*k+R,l[0][i-R].x),T.setX(8+6*k+R,1-d[i-R]/c),T.setX(8+7*k+R,1-d[i-R]/c);x.computeBoundingBox(),this.element.scale.x=1*n/c,x.computeBoundingSphere(),C.needsUpdate=!0,T.needsUpdate=!0,x.computeVertexNormals()}else{var L=x.vertices,N=i-1,_=8;L[0].z=L[2].z=r[0][i].z,L[0].x=L[2].x=r[0][i].x,L[1].z=L[3].z=l[0][i].z,L[1].x=L[3].x=l[0][i].x,L[5].z=L[7].z=r[0][0].z,L[5].x=L[7].x=r[0][0].x,L[4].z=L[6].z=l[0][0].z,L[4].x=L[6].x=l[0][0].x;for(var I=0;I<1;I++)for(var A=1;A<i;A++)L[_].z=L[_+3*N].z=l[0][A].z,L[_].x=L[_+3*N].x=l[0][A].x,L[_+N].z=L[_+2*N].z=r[0][A].z,L[_+N].x=L[_+2*N].x=r[0][A].x,_++;for(var M=x.faceVertexUvs[0],z=x.faces,D=0,F=0;F<M.length;F++)if(z[F].materialIndex===e_.MATERIAL_FACE.BACK){var B=d[D]/c;F%2==0?(M[F][0].x=M[F][1].x=M[F+1][0].x=B,D++):M[F-1][2].x=M[F][1].x=M[F][2].x=B}else if(z[F].materialIndex===e_.MATERIAL_FACE.FRONT){var H=1-d[D]/c;F%2==0?(M[F][0].x=M[F][1].x=M[F+1][0].x=H,D--):M[F-1][2].x=M[F][1].x=M[F][2].x=H}x.computeBoundingBox(),this.element.scale.x=1*n/c,x.computeBoundingSphere(),x.verticesNeedUpdate=!0,x.computeFaceNormals(),x.computeVertexNormals(),x.uvsNeedUpdate=!0,x.normalsNeedUpdate=!0}s.forEach(function(e){}),a.forEach(function(e){}),l.forEach(function(e){}),r.forEach(function(e){})}}},{key:"flip",value:function(e,t){var i=this,n=i.viewer.isBooklet;!0===i.isCover&&(0===e&&(e=2.5*i.viewer.flexibility),180===e&&(e-=2.5*i.viewer.flexibility));var o=t-e,s=e>90,a=i.viewer.isRTL,r=s?i.backPage.pageNumber:i.frontPage.pageNumber,l=this.viewer.getViewPort(r);l&&(l=eW.contain(l.width,l.height,i.viewer.availablePageWidth(),i.viewer.availablePageHeight()));var h=-(i.viewer.has3DCover&&i.viewer.isClosedPage()?i.viewer.coverExtraWidth:0),u=-(i.viewer.has3DCover&&i.viewer.isClosedPage()?i.viewer.coverExtraHeight:0);i.init={angle:e,height:s?i.viewer.rightSheetHeight:i.viewer.leftSheetHeight,width:s?i.viewer.rightSheetWidth:i.viewer.leftSheetWidth,index:s&&!a||!s&&a?1:0,_index:0},i.first={angle:e+o/4,index:s&&!a||!s&&a?1:.25},i.mid={angle:e+2*o/4,index:.5},i.mid2={angle:e+3*o/4,index:s&&!a||!s&&a?.25:1},i.end={angle:t,index:s&&!a||!s&&a?0:1,height:u+(l?l.height:i.height),width:h+(l?l.width:i.width)},i.isFlipping=!0;var p=function(e){i.sheetAngle=e.angle,i.curveAngle=i.isHard?e.angle:eW.getCurveAngle(s,e.angle),!0===i.isHard?(i.flexibility=0,i.isCover&&i.viewer.flipCover(i)):i.flexibility=e.angle<90?i.leftFlexibility:i.rightFlexibility,i.element.position.z=(e.angle<90?i.leftPos:i.rightPos)+i.depth,n&&(i.element.material[5].opacity=i.element.material[4].opacity=e.index,i.element.castShadow=e.index>.5),i.height=e.height,i.width=e.width,i.updateAngle(!0)};n&&(!s&&!a||s&&a)&&(i.element.material[5].opacity=i.element.material[4].opacity=0,i.element.castShadow=!1),i.currentTween=new TWEEN.Tween(i.init).to({angle:[i.first.angle,i.mid.angle,i.mid2.angle,i.end.angle],index:[i.first.index,i.mid.index,i.mid2.index,i.end.index],_index:1,height:i.end.height,width:i.end.width},i.viewer.app.options.duration*Math.abs(o)/180).onUpdate(function(e){p(this,e)}).easing(TWEEN.Easing.Sinusoidal.Out).onStop(function(){i.currentTween=null,i.isFlipping=!1,i.isCover&&(i.viewer.leftCover.isFlipping=!1,i.viewer.rightCover.isFlipping=!1),i.element.material[5].opacity=i.element.material[4].opacity=1}).onComplete(function(){i.updateAngle(),i.element.material[5].opacity=i.element.material[4].opacity=1,i.element.castShadow=!0,i.isFlipping=!1,i.isCover&&(i.viewer.leftCover.isFlipping=!1,i.viewer.rightCover.isFlipping=!1),i.side=i.targetSide,i.viewer.onFlip(),i.viewer.afterFlip(),i.currentTween=null,i.viewer&&i.viewer.requestRefresh&&i.viewer.requestRefresh()}).start(),i.currentTween.update(window.performance.now())}}]),i}($),eq=/*#__PURE__*/function(e){eB(i,e);var t=eU(i);function i(e,n){var o,s,a,r,l;return eA(this,i),e.viewerClass="df-flipbook-3d",(o=t.call(this,e,n)).pageOffset=5,o.spiralCount=20,o.groundDistance=null!==(s=e.groundDistance)&&void 0!==s?s:2,o.hasSpiral="true"===e.hasSpiral||!0===e.hasSpiral,o.flexibility=eW.limitAt(null!==(a=e.flexibility)&&void 0!==a?a:.9,0,10),o.hasSpiral&&(o.flexibility=0),0===o.flexibility&&(e.sheetSegments=8),o.drag3D=eW.isTrue(e.drag3D),o.texturePowerOfTwo=!eW.isMobile&&(null===(r=e.texturePowerOfTwo)||void 0===r||r),o.color3DSheets=null!==(l=o.app.options.color3DSheets)&&void 0!==l?l:"white",o.midPosition=0,o.initMOCKUP(function(){n._viewerPrepared()}),o}return ez(i,[{key:"initMOCKUP",value:function(e){var t=this.app;"undefined"==typeof THREE?(t.updateInfo(t.options.text.loading+" WEBGL 3D ..."),"function"==typeof window.define&&window.define.amd&&window.requirejs?(window.requirejs.config({paths:{three:t.options.threejsSrc.replace(".js","")},shim:{three:{exports:"THREE"}}}),window.require(["three"],function(t){return window.THREE=t,e_.init(),"function"==typeof e&&e(),t})):"function"==typeof window.define&&window.define.amd?window.require(["three",t.options.threejsSrc.replace(".js","")],function(t){t(function(){e_.init(),"function"==typeof e&&e()})}):eW.getScript(t.options.threejsSrc+"?ver="+p.version,function(){e_.init(),"function"==typeof e&&e()},function(){t.updateInfo("Unable to load THREE.js...")})):(e_.init(),"function"==typeof e&&e())}},{key:"init",value:function(){var e=this.app;eD(eF(i.prototype),"init",this).call(this),e.provider.defaultPage.pageRatio,this.pageScaleX=1,this.initDepth(),this.initStage(),this.initPages(),this.initEvents(),this.render()}},{key:"updatePageMode",value:function(){eD(eF(i.prototype),"updatePageMode",this).call(this);var e=this.app;this.has3DCover=e.options.cover3DType!==p.FLIPBOOK_COVER_TYPE.NONE&&e.pageCount>7&&!this.isBooklet,this.has3DCover&&"none"===e.options.flipbookHardPages&&(e.options.flipbookHardPages="cover")}},{key:"initDepth",value:function(){var e,t;this.sheetDepth=this.pageScaleX*(null!==(e=this.app.options.sheetDepth)&&void 0!==e?e:.5),this.sheetSegments=null!==(t=this.app.options.sheetSegments)&&void 0!==t?t:20,this.coverDepth=2*this.sheetDepth,this.sheetsDepth=Math.min(10,this.app.pageCount/4)*this.sheetDepth}},{key:"initStage",value:function(){var e=this.stage=new e_.Stage({pixelRatio:this.app.options.pixelRatio});(e.canvas=eV(e.renderer.domElement).addClass("df-3dcanvas")).appendTo(this.element),e.camera.position.set(0,0,600),e.camera.lookAt(new THREE.Vector3(0,0,0)),this.camera=e.camera,e.spotLight.position.set(-220,220,550),e.spotLight.castShadow=!eW.isMobile&&this.app.options.has3DShadow,e.spotLight.shadow&&(e.spotLight.shadow.bias=-.005),e.ambientLight.color=new THREE.Color("#fff"),e.ambientLight.intensity=.82;var t=new THREE.ShadowMaterial;t.opacity=this.app.options.shadowOpacity,e.ground.oldMaterial=e.ground.material,e.ground.material=t,e.ground.position.z=this.has3DCover?-6:-4,e.selectiveRendering=!0;var i=e.cssRenderer=new THREE.CSS3DRenderer;eV(i.domElement).css({position:"absolute",top:0,pointerEvents:"none"}).addClass("df-3dcanvas df-csscanvas"),this.element[0].appendChild(i.domElement),e.cssScene=new THREE.Scene,this.wrapper.remove(),this.wrapper=new THREE.Group,this.stage.add(this.wrapper),this.wrapper.add(e.ground),this.bookWrapper=new THREE.Group,this.bookWrapper.name="bookwrapper",this.wrapper.add(this.bookWrapper),this.bookHelper=e.bookHelper=new THREE.BoxHelper(this.bookWrapper,16776960),e.add(this.bookHelper),this.bookHelper.visible=!1,this.cameraWrapper=new THREE.Group,this.cameraWrapper.add(e.camera),e.add(this.cameraWrapper),this.app.renderRequestStatus=p.REQUEST_STATUS.ON}},{key:"initPages",value:function(){for(var e={parent3D:this.bookWrapper,viewer:this,segments:this.sheetSegments,depth:this.sheetDepth,flexibility:this.flexibility},t=0;t<this.stackCount;t++){var i=new ej(e);i.index=t,i.viewer=this,this.sheets.push(i),i.setMatColor(this.color3DSheets),this.pages.push(i.frontPage),this.pages.push(i.backPage),this.stage.cssScene.add(i.frontPage.cssPage),this.stage.cssScene.add(i.backPage.cssPage)}e.depth=this.sheetsDepth,e.segments=1,e.flexibility=0,this.leftSheets=new ej(e),this.rightSheets=new ej(e),this.leftSheets.setMatColor(this.color3DSheets),this.rightSheets.setMatColor(this.color3DSheets),e.depth=this.coverDepth,this.leftCover=new ej(e),this.rightCover=new ej(e),this.leftCover.isHard=!0,this.rightCover.isHard=!0,this.set3DCoverNormal(),this.setcolor3DCover(this.app.options.color3DCover),this.stage.cssScene.add(this.leftCover.frontPage.cssPage),this.stage.cssScene.add(this.rightCover.backPage.cssPage),this.zoomViewer.leftPage.element.css({backgroundColor:this.color3DSheets}),this.zoomViewer.rightPage.element.css({backgroundColor:this.color3DSheets}),this.isVertical()&&this.bookWrapper.children.forEach(function(e){e.rotateZ(THREE.MathUtils.degToRad(-90)),e.textureCenter=new THREE.Vector2(.5,.5),e.textureRotation=90}),this.initSpiral()}},{key:"initSpiral",value:function(){this.hasSpiral=!1}},{key:"set3DCoverNormal",value:function(){}},{key:"setcolor3DCover",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]}},{key:"initEvents",value:function(){this.stageDOM=this.element[0],eD(eF(i.prototype),"initEvents",this).call(this)}},{key:"dispose",value:function(){eD(eF(i.prototype),"dispose",this).call(this),this.stage&&(this.stage.clearChild(),this.stage.cssRenderer.domElement.parentNode.removeChild(this.stage.cssRenderer.domElement),this.stage.cssRenderer=null,this.stage.orbitControl=eW.disposeObject(this.stage.orbitControl),this.stage.renderer=eW.disposeObject(this.stage.renderer),eV(this.stage.canvas).remove(),this.stage.canvas=null,this.stage=eW.disposeObject(this.stage)),this.centerTween&&this.centerTween.stop&&this.centerTween.stop()}},{key:"render",value:function(){this.stage.render(),this.stage.cssRenderer.render(this.stage.cssScene,this.stage.camera)}},{key:"resize",value:function(){eD(eF(i.prototype),"resize",this).call(this);var e=this,t=e.app,n=e.stage,o=t.dimensions;o.padding,e.isSingle;var s=this.availablePageWidth(),a=this.availablePageHeight();n.resizeCanvas(o.stage.width,o.stage.height),n.cssRenderer.setSize(o.stage.width,o.stage.height),this.pageScaleX=Math.max(Math.max(s,a)/400,1),this.initDepth(),this.sheets.forEach(function(t){t.depth=e.sheetDepth}),t.refreshRequestStart();var r=this.refSize=Math.min(a,s);this.coverExtraWidth=(e.isVertical()?2:1)*r*.025,this.coverExtraHeight=(e.isVertical()?1:2)*r*.025,!0!==this.has3DCover&&(this.coverExtraWidth=0,this.coverExtraHeight=0),e.zoomViewer.resize(),e.cameraPositionDirty=!0,e.centerNeedsUpdate=!0,e.checkCenter(!0),e.pagesReady(),this.pageOffset=(this.hasSpiral?6:0)*Math.min(this._defaultPageSize.width,this._defaultPageSize.height)/1e3}},{key:"fitCameraToCenteredObject",value:function(e,t,i,n){var o=new THREE.Box3;o.setFromObject(t),new THREE.Vector3;var s=new THREE.Vector3;o.getSize(s);var a=this.coverExtraHeight,r=2*this.coverExtraWidth;this.isClosedPage()&&(r=0,a=0),s.x=s.x-r+this.app.dimensions.padding.width,s.y=s.y-a+this.app.dimensions.padding.height;var l=e.fov*(Math.PI/180),h=2*Math.atan(Math.tan(l/2)*e.aspect),u=Math.max(s.z/2+Math.abs(s.x/2/Math.tan(h/2)),s.z/2+Math.abs(s.y/2/Math.tan(l/2)));void 0!==i&&0!==i&&(u*=i),e.position.set(0,0,u);var p=o.min.z,c=p<0?-p+u:u-p;e.far=3*c,e.updateProjectionMatrix(),void 0!==n&&(n.target=new THREE.Vector3(0,0,0),n.maxDistance=2*c)}},{key:"updateShadowSize",value:function(){}},{key:"refresh",value:function(){var e=this.app,t=this.getBasePage();this.refreshRequested=!0;var n=1/e.pageCount*t,o=this.isRTL?1-n:n,s=Math.min(this.stackCount,this.totalSheets),a=eW.limitAt(this.totalSheets,this.stackCount,2*this.stackCount),r=this.isBooklet?0:this.flexibility/a;this.leftFlexibility=r*(1-o),this.rightFlexibility=r*o,this.midPosition=.5*s*this.sheetDepth,eD(eF(i.prototype),"refresh",this).call(this);var l=!0===this.has3DCover;this.leftCover.element.visible=this.rightCover.element.visible=this.leftSheets.element.visible=this.rightSheets.element.visible=l,this.wrapper.position.z=-this.midPosition;var h=0,u=0,p=this.isRTL,c=this.isFirstPage(),d=this.isLastPage(),f=this.isLeftClosed=this.isClosedPage()&&(p&&d||!p&&c),g=this.isRightClosed=this.isClosedPage()&&(!p&&d||p&&c);if(l){this.leftSheets.depth=p?this.sheetsDepth*(1-this.getBasePage()/e.pageCount):this.sheetsDepth*t/e.pageCount,this.leftSheets.element.visible=p?e.pageCount-this.getBasePage()>2:t>2,h-=this.leftSheets.depth/2,this.leftSheets.element.position.z=h,h-=this.coverDepth+(this.leftSheets.element.visible?this.leftSheets.depth/2:0)+3*this.coverDepth,this.leftCover.depth=this.rightCover.depth=this.coverDepth;var m=Math.max(this.leftSheetHeight,this.rightSheetHeight);g&&(m=this.leftSheetHeight),f&&(m=this.rightSheetHeight),!0!==this.leftCover.isFlipping&&(this.leftCover.element.position.z=f?this.midPosition+this.coverDepth:h+this.coverDepth/2,this.leftCover.element.position.z=Math.max(this.leftCover.element.position.z,-(.05*this.refSize)),this.leftCover.element.position.x=0,this.leftSheets.sheetAngle=this.leftCover.sheetAngle=f?180:0,this.leftSheets.curveAngle=this.leftCover.curveAngle=f?180:0,!0===this.rightCover.isFlipping||(this.leftCover.height=m,this.leftCover.width=this.leftCover.sheetAngle<90?this.leftSheetWidth:this.rightSheetWidth,this.isClosedPage()||(this.leftCover.width+=this.coverExtraWidth,this.leftCover.height+=this.coverExtraHeight)),this.leftSheets.updateAngle(),this.leftCover.updateAngle()),this.rightSheets.depth=this.sheetsDepth-this.leftSheets.depth,this.rightSheets.element.visible=p?t>2:e.pageCount-this.getBasePage()>2,u-=this.rightSheets.depth/2,this.rightSheets.element.position.z=u,u-=this.coverDepth+(this.rightSheets.element.visible?this.rightSheets.depth/2:0)+3*this.coverDepth,!0!==this.rightCover.isFlipping&&(this.rightCover.element.position.z=g?this.midPosition+this.coverDepth:u+this.coverDepth/2,this.rightCover.element.position.z=Math.max(this.rightCover.element.position.z,-(.05*this.refSize)),this.rightCover.element.position.x=0,this.rightSheets.sheetAngle=this.rightCover.sheetAngle=g?0:180,this.rightSheets.curveAngle=this.rightCover.curveAngle=g?0:180,!0===this.leftCover.isFlipping||(this.rightCover.height=m,this.rightCover.width=this.rightCover.sheetAngle<90?this.leftSheetWidth:this.rightSheetWidth,this.isClosedPage()||(this.rightCover.width+=this.coverExtraWidth,this.rightCover.height+=this.coverExtraHeight)),this.rightSheets.updateAngle(),this.rightCover.updateAngle()),this.updateSheets(),this.stage.ground.position.z=Math.min(h,u)-this.refSize*this.groundDistance/100,this.stage.ground.position.z=Math.max(this.stage.ground.position.z,-(.1*this.refSize))}else this.stage.ground.position.z=-this.midPosition-15*this.sheetDepth;!0===this.cameraPositionDirty&&this.updateCameraPosition(),this.refreshSpiral()}},{key:"refreshSpiral",value:function(){}},{key:"updateCameraPosition",value:function(){var e=this.app,t=this.stage,i=e.dimensions,n=i.padding,o=1/(2*Math.tan(Math.PI*t.camera.fov*.5/180)/(i.stage.height/e.zoomValue))+2.2;this.updateShadowSize(),this.stage.spotLight.position.x=-(330*this.pageScaleX),this.stage.spotLight.position.y=330*this.pageScaleX,this.stage.spotLight.position.z=550*this.pageScaleX,this.stage.spotLight.shadow.camera.far=1200*this.pageScaleX,this.stage.spotLight.shadow.camera.updateProjectionMatrix();var s=(n.top-n.bottom)/e.zoomValue/2,a=-(n.left-n.right)/e.zoomValue/2;t.camera.position.z!==o&&!0===e.pendingZoom&&(t.camera.position.z=o),1===e.zoomValue&&(this.bookWrapper.rotation.set(0,0,0),this.bookHelper.rotation.set(0,0,0),this.cameraWrapper.rotation.set(0,0,0),0!==e.options.flipbook3DTiltAngleUp||0!==e.options.flipbook3DTiltAngleLeft?(t.camera.aspect=i.stage.width/i.stage.height,t.camera.updateProjectionMatrix(),this.bookWrapper.rotateZ(THREE.Math.degToRad(-e.options.flipbook3DTiltAngleLeft)),this.bookWrapper.rotateX(THREE.Math.degToRad(-e.options.flipbook3DTiltAngleUp)),this.isVertical()?this.bookWrapper.scale.y=1/(this.isSingle?2:1):this.bookWrapper.scale.x=1/(this.isSingle?2:1),this.bookHelper.update(),this.fitCameraToCenteredObject(t.camera,this.bookWrapper),this.bookWrapper.rotation.set(0,0,0),this.bookWrapper.scale.x=1,this.bookWrapper.scale.y=1,t.camera.position.set(a,s,t.camera.position.z+t.ground.position.z),this.camera.aspect=i.stage.width/i.stage.height,this.camera.updateProjectionMatrix(),this.cameraWrapper.rotateX(THREE.Math.degToRad(e.options.flipbook3DTiltAngleUp)),this.cameraWrapper.rotateZ(THREE.Math.degToRad(e.options.flipbook3DTiltAngleLeft))):t.camera.position.set(a,s,o)),t.camera.updateProjectionMatrix(),this.app.renderRequestStatus=p.REQUEST_STATUS.ON,this.cameraPositionDirty=!1}},{key:"refreshSheet",value:function(e){var t,i=e.sheet,n=e.index,o=i.sheetAngle,s=!(i.isHard||0===this.flexibility);i.leftFlexibility=s?this.leftFlexibility:0,i.rightFlexibility=s?this.rightFlexibility:0,i.leftPos=this.midPosition+(n-e.midPoint+1)*this.sheetDepth-this.sheetDepth/2,i.rightPos=this.midPosition-(n-e.midPoint)*this.sheetDepth-this.sheetDepth/2,t=i.targetSide===p.TURN_DIRECTION.LEFT?0:180,!1===i.isFlipping&&(e.needsFlip?(i.isFlipping=!0,i.isCover&&0===e.sheetNumber&&(this.isRTL?this.rightCover.isFlipping=!0:this.leftCover.isFlipping=!0),i.isCover&&this.totalSheets-e.sheetNumber==1&&(this.isRTL?this.leftCover.isFlipping=!0:this.rightCover.isFlipping=!0),i.element.position.z=Math.max(o<90?i.leftPos:i.rightPos,this.midPosition)+this.sheetDepth,i.flexibility=o<90?i.leftFlexibility:i.rightFlexibility,i.flip(o,t)):(i.skipFlip=!1,i.sheetAngle=i.curveAngle=t,i.flexibility=t<90?i.leftFlexibility:i.rightFlexibility,i.element.position.z=t<90?i.leftPos:i.rightPos,i.side=i.targetSide,i.height=t<90?this.leftSheetHeight:this.rightSheetHeight,i.width=t<90?this.leftSheetWidth:this.rightSheetWidth),i.updateAngle(),this.app.renderRequestStatus=p.REQUEST_STATUS.ON),i.element.visible=e.visible}},{key:"updateCenter",value:function(){var e=this,t=this.app,i=this.isVertical(),n=i?e.wrapper.position.y:e.wrapper.position.x,o=(this.isVertical()?-1:1)*e.centerShift*(this.isLeftPage()?i?this.leftSheetHeight:this.leftSheetWidth:i?this.rightSheetHeight:this.rightSheetWidth)/2;e.seamPositionY=(t.dimensions.padding.heightDiff+t.dimensions.containerHeight)/2-o,e.seamPositionX=(-t.dimensions.offset.width+t.dimensions.containerWidth)/2+o,o!==e.centerEnd&&(e.centerTween&&e.centerTween.stop&&e.centerTween.stop(),e.onCenterStartAnimation(this),e.centerTween=new TWEEN.Tween({x:n}).delay(0).to({x:o},1===t.zoomValue&&!0!==e.skipCenterAnimation?e.app.options.duration:1).onStart(function(){}).onUpdate(function(){e.onCenterUpdateAnimation(this)}).onComplete(function(){e.onCenterCompleteAnimation(this)}).onStop(function(){e.onCenterStopAnimation(this)}).easing(TWEEN.Easing.Cubic.InOut).start(),this.updatePendingStatusClass(),e.skipCenterAnimation=!1,e.centerEnd=o),e.renderRequestStatus=p.REQUEST_STATUS.ON,this.zoomViewer.updateCenter()}},{key:"onCenterUpdateAnimation",value:function(e){this.isVertical()?(this.wrapper.position.y=e.x,this.stage&&this.stage.cssScene&&(this.stage.cssScene.position.y=e.x)):(this.wrapper.position.x=e.x,this.stage&&this.stage.cssScene&&(this.stage.cssScene.position.x=e.x))}},{key:"onCenterStartAnimation",value:function(e){}},{key:"onCenterStopAnimation",value:function(e){}},{key:"onCenterCompleteAnimation",value:function(e){}},{key:"flipCover",value:function(e){var t,i,n=null;0===e.pageNumber||this.isBooklet&&1===e.pageNumber?(n=this.isRTL?this.rightCover:this.leftCover,t=this.isRTL?1:-1):e.pageNumber===this.totalSheets-1&&(n=this.isRTL?this.leftCover:this.rightCover,t=this.isRTL?-1:1),null!==n&&(i=n.depth+e.depth+1,n.sheetAngle=e.sheetAngle,n.curveAngle=e.curveAngle,this.rightCover.height=this.leftCover.height=e.height+this.coverExtraHeight,this.rightCover.width=this.leftCover.width=e.width+this.coverExtraWidth,n.flexibility=e.flexibility,this.rightCover.updateAngle(),this.leftCover.updateAngle(),n.element.position.x=e.element.position.x+t*Math.sin(e.sheetAngle*Math.PI/180)*i,n.element.position.z=e.element.position.z+t*Math.cos(e.sheetAngle*Math.PI/180)*i)}},{key:"pagesReady",value:function(){if(!this.isAnimating()&&!0===this.refreshRequested){if(!1===this.app.options.flipbookFitPages){var e=this.app.viewer.getBasePage(),t=this.leftViewport=this.getViewPort(e+(this.isBooklet?0:this.isRTL?1:0)),i=this.rightViewPort=this.getViewPort(e+(this.isBooklet?0:this.isRTL?0:1));if(t){var n=eW.contain(t.width,t.height,this.availablePageWidth(),this.availablePageHeight());(this.leftSheetWidth!=Math.floor(n.width)||this.leftSheetHeight!=Math.floor(n.height))&&(this.cameraPositionDirty=!0),this.leftSheetWidth=Math.floor(n.width),this.leftSheetHeight=Math.floor(n.height)}if(i){var o=eW.contain(i.width,i.height,this.availablePageWidth(),this.availablePageHeight());(this.rightSheetWidth!=Math.floor(o.width)||this.rightSheetWidth!=Math.floor(o.height))&&(this.cameraPositionDirty=!0),this.rightSheetWidth=Math.floor(o.width),this.rightSheetHeight=Math.floor(o.height)}for(var s=0;s<this.sheets.length;s++){var a=this.sheets[s];a.side===p.TURN_DIRECTION.LEFT?(a.height=this.leftSheetHeight,a.width=this.leftSheetWidth):(a.height=this.rightSheetHeight,a.width=this.rightSheetWidth),a.updateAngle()}if(this.isClosedPage()){var r=this.isRTL&&this.isLastPage()||!this.isRTL&&this.isFirstPage();this.leftCover.width=this.rightCover.width=r?this.rightSheetWidth:this.leftSheetWidth,this.leftCover.height=this.rightCover.height=r?this.rightSheetHeight:this.leftSheetHeight}else this.leftCover.height=this.rightCover.height=this.coverExtraHeight+Math.max(this.leftSheetHeight,this.rightSheetHeight),this.leftCover.width=this.coverExtraWidth+this.leftSheetWidth,this.rightCover.width=this.coverExtraWidth+this.rightSheetWidth;this.leftSheets.width=this.leftSheetWidth,this.leftSheets.height=this.leftSheetHeight,this.rightSheets.height=this.rightSheetHeight,this.rightSheets.width=this.rightSheetWidth,this.leftCover.updateAngle(),this.leftSheets.updateAngle(),this.rightCover.updateAngle(),this.rightSheets.updateAngle(),this.updateSheets(!0)}this.updateCenter(),this.updateCSSLayer(),this.updatePendingStatusClass(),this.refreshSpiral(),!0===this.cameraPositionDirty&&this.updateCameraPosition(),this.app.executeCallback("onPagesReady")}}},{key:"updateSheets",value:function(e){if(!0!==this.isClosedPage()){var t=this.getPageByNumber(this.getRightPageNumber());if(!0!==this.rightCover.isFlipping&&t&&t.sheet.element.geometry.attributes){var i=this.rightSheets.element.geometry.attributes.position,n=e?t.sheet.element.geometry.boundingBox.max.x*t.sheet.element.scale.x:this.rightSheets.lastSlopeX;i.setX(21,n),i.setX(23,n),i.setX(4,n),i.setX(6,n),i.setX(10,n),i.setX(14,n),i.needsUpdate=!0,this.rightSheets.element.geometry.attributes.uv.needsUpdate=!0,this.rightSheets.element.geometry.computeVertexNormals(),e&&(this.rightSheets.lastSlopeX=n)}var o=this.getPageByNumber(this.getLeftPageNumber());if(!0!==this.leftCover.isFlipping&&o&&o.sheet.element.geometry.attributes){var s=this.leftSheets.element.geometry.attributes.position,a=e?o.sheet.element.geometry.boundingBox.min.x*o.sheet.element.scale.x:this.leftSheets.lastSlopeX;s.setX(16,a),s.setX(18,a),s.setX(5,a),s.setX(7,a),s.setX(8,a),s.setX(12,a),s.needsUpdate=!0,this.leftSheets.element.geometry.attributes.uv.needsUpdate=!0,this.leftSheets.element.geometry.computeVertexNormals(),e&&(this.leftSheets.lastSlopeX=a)}}}},{key:"updateCSSLayer",value:function(){}},{key:"mouseMove",value:function(e){if(e=eW.fixMouseEvent(e),this.app.renderRequestStatus=p.REQUEST_STATUS.ON,null!=e.touches&&2===e.touches.length){this.pinchMove(e);return}var t=this.eventToPoint(e);if(null!==this.dragSheet&&!1!==this.drag3D&&Math.abs(t.x-this.startPoint.x)>2){!0!==this.isDragging&&(this.updatePendingStatusClass(!0),this.isDragging=!0);var i=this.dragSheet.width,n=t.x-(this.app.dimensions.origin.x+this.centerEnd-i),o=eW.limitAt(1-n/i,-1,1),s=eW.toDeg(Math.acos(o)),a=this.dragSheet,r=this.drag===p.TURN_DIRECTION.LEFT;a.sheetAngle=s;var l=eW.getCurveAngle(r,s,45);a.isCover&&a.viewer.flipCover(a),a.curveAngle=a.isHard?s:l,a.updateAngle()}this.checkSwipe(t,e)}},{key:"mouseUp",value:function(e){if((e=eW.fixMouseEvent(e)).touches||0===e.button){if(null==this.dragSheet&&null!=e.touches&&0===e.touches.length){this.pinchUp(e);return}var t=this.eventToPoint(e);if(1===this.app.zoomValue){if(null!==this.dragSheet){var i=t.x-this.startPoint.x;Math.abs(i)>2*this.swipeThreshold&&(this.drag===p.TURN_DIRECTION.LEFT&&i>0?this.app.openLeft():this.drag===p.TURN_DIRECTION.RIGHT&&i<0&&this.app.openRight()),this.requestRefresh(),this.updatePendingStatusClass()}var n=e.target||e.originalTarget,o=this.startPoint&&t.x===this.startPoint.x&&t.y===this.startPoint.y&&"A"!==n.nodeName;!0===e.ctrlKey&&o?this.zoomOnPoint(t):o&&t.sheet&&this.clickAction===p.MOUSE_CLICK_ACTIONS.NAV&&(t.sheet.sheetAngle>90?this.app.openRight():this.app.openLeft())}this.dragSheet=null,this.drag=null,!0===this.isDragging&&(this.isDragging=!1),this.startPoint=null,this.canSwipe=!1,this.app.renderRequestStatus=p.REQUEST_STATUS.ON}}},{key:"raycastCLick",value:function(e){this.mouse=new THREE.Vector2,this.raycaster=new THREE.Raycaster,this.mouse.x=e.offsetX/this.app.dimensions.stage.width*2-1,this.mouse.y=1-e.offsetY/this.app.dimensions.stage.height*2,this.raycaster.setFromCamera(this.mouse,this.camera);var t=this.raycaster.intersectObjects(this.bookWrapper.children,!0);if(t.length>0){var i,n=0;do{if((i=null!=t[n]?t[n].object:null).sheet&&i.sheet.index&&!0!==i.sheet.isFlipping)return i;n++}while(n<t.length)}}},{key:"mouseDown",value:function(e){if((e=eW.fixMouseEvent(e)).touches||0===e.button){if(null!=e.touches&&2===e.touches.length)this.pinchDown(e);else{e=eW.fixMouseEvent(e);var t=this.eventToPoint(e);this.startPoint=t,this.lastPosX=t.x,this.lastPosY=t.y;var i=this.raycastCLick(e),n=t.sheet?t.sheet.width-Math.abs(t.x-(this.app.dimensions.origin.x+this.centerEnd)):0;t.sheet&&i&&t.isInsideSheet&&n<t.sheet.width/2?(this.dragSheet=i.sheet,this.drag=t.sheet.sheetAngle<90?p.TURN_DIRECTION.LEFT:p.TURN_DIRECTION.RIGHT):this.canSwipe=!0}}}},{key:"eventToPoint",value:function(e){var t=this.app.dimensions,i={x:(e=eW.fixMouseEvent(e)).clientX,y:e.clientY};i.x=i.x-this.parentElement[0].getBoundingClientRect().left,i.y=i.y-this.parentElement[0].getBoundingClientRect().top;var n=(-t.offset.width+t.containerWidth)/2-t.stage.width/2,o=(-t.offset.width+t.containerWidth)/2+t.stage.width/2,s=t.padding.top,a=t.padding.top+this.availablePageHeight(),r=this.isVertical()?i.y<this.seamPositionY:i.x<this.seamPositionX,l=this.getBasePage()+(r?0:1),h=this.getPageByNumber(l);h&&(h=h.sheet);var u=i.x>n&&i.x<o&&i.y>s&&i.y<a;return{isInsideSheet:u,isInsideDragZone:u&&i.x-n<this.foldSense||o-i.x<this.foldSense,x:i.x,y:i.y,left:n,top:s,right:o,bottom:a,raw:i,isLeftSheet:r,sheet:h}}},{key:"textureLoadedCallback",value:function(e){this.app.renderRequestStart(),this.pagesReady()}},{key:"getTextureSize",value:function(e){var t=eD(eF(i.prototype),"getTextureSize",this).call(this,e);if(1!==this.app.zoomValue||!0===e.isAnnotation)return t;var n=eW.nearestPowerOfTwo(t.height),o=t.width*n/t.height;return this.texturePowerOfTwo?{height:n,width:o}:t}},{key:"getPageByNumber",value:function(e){if(this.has3DCover){var t=!this.isBooklet&&e===this.app.pageCount&&e%2==0,n=1===e;if(!this.isRTL&&n||this.isRTL&&t)return this.leftCover.frontPage;if(!this.isRTL&&t||this.isRTL&&n)return this.rightCover.backPage}return eD(eF(i.prototype),"getPageByNumber",this).call(this,e)}},{key:"setPage",value:function(e){return eD(eF(i.prototype),"setPage",this).call(this,e)}},{key:"beforeFlip",value:function(){eD(eF(i.prototype),"beforeFlip",this).call(this)}}]),i}(Q),eG=/*#__PURE__*/function(e){eB(i,e);var t=eU(i);function i(e){eA(this,i);var n,o=eI(n=t.call(this,e));return o.element=null,o.face=e.face,o.parent3D=e.sheet,o.sheet=e.sheet,o.cssPage=new THREE.CSS3DObject(o.contentLayer[0]),n}return ez(i,[{key:"setLoading",value:function(){this.sheet.viewer.checkPageLoading()}},{key:"clearMap",value:function(){this.sheet.element.material[this.face].map=null,this.sheet.element.material[this.face].needsUpdate=!0}},{key:"loadTexture",value:function(e){var t=this,i=e.texture,n=e.callback;function o(i,o){t.updateTextureLoadStatus(!0),t.sheet.resetMatColor(t.face,e.texture===t.textureLoadFallback),"function"==typeof n&&n(e)}t.textureSrc=i,"function"==typeof p.defaults.beforeLoadTexture&&p.defaults.beforeLoadTexture({texture:i,page:t}),4===this.face?this.sheet.backImage(i,o):this.sheet.frontImage(i,o)}}]),i}(_);function eZ(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eK(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function eX(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function eQ(e,t,i){return t&&eX(e.prototype,t),i&&eX(e,i),e}function eY(e){return(eY=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eJ(e,t){return(eJ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function e$(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}p.defaults.maxTextureSize=2048,p.viewers={},p.viewers.flipbook=function e(t,i){return(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,e),!1==p.utils.canSupport3D()&&(t.is3D=!1),p.utils.isTrue(t.is3D))?new eq(t,i):new ep(t,i)},p.viewers.default=p.viewers.reader=B,p.viewers.slider=eE;var e0=p.jQuery,e1=p.utils,e2=/*#__PURE__*/function(){function e(){eK(this,e),this.baseUrl=null,this.pdfDocument=null,this.pdfApp=null,this.pdfHistory=null,this.externalLinkRel=null,this.externalLinkEnabled=!0,this._pagesRefCache=null}return eQ(e,[{key:"dispose",value:function(){this.baseUrl=null,this.pdfDocument=null,this.pdfApp=null,this.pdfHistory=null,this._pagesRefCache=null}},{key:"setDocument",value:function(e,t){this.baseUrl=t,this.pdfDocument=e,this._pagesRefCache=Object.create(null)}},{key:"setViewer",value:function(e){this.pdfApp=e,this.externalLinkTarget=e.options.linkTarget}},{key:"setHistory",value:function(e){this.pdfHistory=e}},{key:"pagesCount",get:function(){return this.pdfDocument.numPages}},{key:"page",get:function(){return this.pdfApp.currentPageNumber},set:function(e){this.pdfApp.gotoPage(e)}},{key:"navigateTo",value:function(e){this.goToDestination(e)}},{key:"addLinkAttributes",value:function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2];var i=this.externalLinkTarget,n=this.externalLinkRel,o=this.externalLinkEnabled;if(!t||"string"!=typeof t)throw Error('A valid "url" parameter must provided.');var s=(0,e1.removeNullCharacters)(t);o?e.href=e.title=s:(e.href="",e.title="Disabled: ".concat(s),e.onclick=function(){return!1});var a="";switch(i){case p.LINK_TARGET.NONE:break;case p.LINK_TARGET.SELF:a="_self";break;case p.LINK_TARGET.BLANK:a="_blank";break;case p.LINK_TARGET.PARENT:a="_parent";break;case p.LINK_TARGET.TOP:a="_top"}e.target=a,e.rel="string"==typeof n?n:"noopener noreferrer nofollow"}},{key:"goToDestination",value:function(e){var t,i="",n=this,o=function(t){e1.log("Requested: ",t);var s=t instanceof Object?n._pagesRefCache[t.num+" "+t.gen+" R"]:t+1;s?((s=n.pdfApp.viewer.getViewerPageNumber(s))>n.pdfApp.pageCount&&(s=n.pdfApp.pageCount),e1.log("Loading for:",t," at page ",s),n.pdfApp.requestDestRefKey===t.num+" "+t.gen+" R"?(n.pdfApp.gotoPage(s),n.pdfHistory&&n.pdfHistory.push({dest:e,hash:i,page:s})):e1.log("Expired Request for ",s," with ",t)):(n.pdfApp.container.addClass("df-fetch-pdf"),n.pdfDocument.getPageIndex(t).then(function(e){var i=t.num+" "+t.gen+" R";n._pagesRefCache[i]=e+1,o(t)}))};"string"==typeof e?(i=e,t=this.pdfDocument.getDestination(e)):t=Promise.resolve(e),t.then(function(t){e1.log("Started:",t),e=t,t instanceof Array&&(n.pdfApp.requestDestRefKey=t[0].num+" "+t[0].gen+" R",o(t[0]))})}},{key:"customNavigateTo",value:function(e){if(""!==e&&null!=e&&"null"!==e){var t=null;if(isNaN(Math.floor(e))){if("string"==typeof e&&isNaN(t=parseInt(e.replace("#",""),10))){window.open(e,this.pdfApp.options.linkTarget===p.LINK_TARGET.SELF?"_self":"_blank");return}}else t=e;null!=t&&this.pdfApp.gotoPage(t)}}},{key:"getDestinationHash",value:function(e){if("string"==typeof e)return this.getAnchorUrl("#"+escape(e));if(e instanceof Array){var t=e[0],i=t instanceof Object?this._pagesRefCache[t.num+" "+t.gen+" R"]:t+1;if(i){var n=this.getAnchorUrl("#page="+i),o=e[1];if((void 0===o?"undefined":e$(o))==="object"&&"name"in o&&"XYZ"===o.name){var s=e[4]||this.pdfApp.pageScaleValue,a=parseFloat(s);a&&(s=100*a),n+="&zoom="+s,(e[2]||e[3])&&(n+=","+(e[2]||0)+","+(e[3]||0))}return n}}return this.getAnchorUrl("")}},{key:"getCustomDestinationHash",value:function(e){return"#"+escape(e)}},{key:"getAnchorUrl",value:function(e){return(this.baseUrl||"")+e}},{key:"executeNamedAction",value:function(e){switch(e){case"GoBack":this.pdfHistory&&this.pdfHistory.back();break;case"GoForward":this.pdfHistory&&this.pdfHistory.forward();break;case"NextPage":this.page++;break;case"PrevPage":this.page--;break;case"LastPage":this.page=this.pagesCount;break;case"FirstPage":this.page=1}var t=document.createEvent("CustomEvent");t.initCustomEvent("namedaction",!0,!0,{action:e}),this.pdfApp.container.dispatchEvent(t)}},{key:"cachePageRef",value:function(e,t){var i=t.num+" "+t.gen+" R";this._pagesRefCache[i]=e}}]),e}(),e3=/*#__PURE__*/function(){function e(t,i){eK(this,e),this.props=t,this.app=i,this.textureCache=[],this.pageCount=0,this.numPages=0,this.outline=[],this.viewPorts=[],this.requestedPages="",this.requestIndex=0,this.pagesToClean=[],this.defaultPage=void 0,this.pageSize=this.app.options.pageSize,this._page1Pass=!1,this._page2Pass=!1,this.pageLabels=void 0,this.textSearchLength=0,this.textSearch="",this.textContentSearch=[],this.textContentJoinedSearch=[],this.textOffsetSearch=[],this.textContent=[],this.textContentJoined=[],this.textOffset=[],this.autoLinkItemsCache=[],this.autoLinkHitsCache=[],this.searchHitItemsCache=[],this.searchHits=[],this.PDFLinkItemsCache=[],this.canPrint=!0,this.textPostion=[],this.renderTime=0}return eQ(e,[{key:"finalize",value:function(){}},{key:"dispose",value:function(){}},{key:"softDispose",value:function(){}},{key:"setCache",value:function(e,t,i){i&&(void 0===this.textureCache[i]&&(this.textureCache[i]=[]),this.textureCache[i][e]=t)}},{key:"getCache",value:function(e,t){return void 0===this.textureCache[t]?void 0:this.textureCache[t][e]}},{key:"_isValidPage",value:function(e){return e>0&&e<=this.pageCount}},{key:"getLabelforPage",value:function(e){return this.pageLabels&&void 0!==this.pageLabels[e-1]?this.pageLabels[e-1]:e}},{key:"getThumbLabel",value:function(e){var t=this.getLabelforPage(e);return t!==e?t+" ("+e+")":e}},{key:"getPageNumberForLabel",value:function(e){if(!this.pageLabels)return e;var t=this.pageLabels.indexOf(e);return t<0?null:t+1}},{key:"processPage",value:function(e){}},{key:"cleanUpPages",value:function(){}},{key:"checkRequestQueue",value:function(){}},{key:"processAnnotations",value:function(){}},{key:"processTextContent",value:function(){}},{key:"loadDocument",value:function(){}},{key:"pagesLoaded",value:function(){this._page1Pass&&this._page2Pass&&(this.app.viewer.checkDocumentPageSizes(),this.finalize())}},{key:"_documentLoaded",value:function(){this.finalizeOutLine(),this.app&&this.app.dimensions&&void 0===this.app.dimensions.pageFit&&e1.log("Provider needs to initialize page properties for the app"),this.app._documentLoaded()}},{key:"finalizeOutLine",value:function(){if(null!==this.app&&null!==this.app.options){var e=this.app.options.outline;if(e)for(var t=0;t<e.length;t++)e[t].custom=!0,e[t].dest=e[t].dest.replace(/javascript:/g,""),this.outline.push(e[t])}}},{key:"search",value:function(){}}]),e}(),e5=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eJ(e,t)}(o,e);var t,n=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=eY(o);return e=t?Reflect.construct(i,arguments,eY(this).constructor):i.apply(this,arguments),e&&("object"===e$(e)||"function"==typeof e)?e:eZ(this)});function o(e,t){eK(this,o);var i,s=(i=n.call(this,e,t)).app,a=eZ(i);return a.pdfDocument=void 0,a._page2Ratio=void 0,a.cacheBustParameters="?ver="+p.version+"&pdfver="+s.options.pdfVersion,!0!==e.skipInit&&i.init(),i}return eQ(o,[{key:"init",value:function(){var e,t=this.app,n=this;function o(e){t.updateInfo(t.options.text.loading+" PDF Worker ...");var i=document.createElement("a");i.href=t.options.pdfjsWorkerSrc+n.cacheBustParameters,i.hostname!==window.location.hostname&&!0===p.loadCorsPdfjsWorker?(t.updateInfo(t.options.text.loading+" PDF Worker CORS ..."),e0.ajax({url:t.options.pdfjsWorkerSrc+n.cacheBustParameters,cache:!0,success:function(i){t.options.pdfjsWorkerSrc=e1.createObjectURL(i,"text/javascript"),"function"==typeof e&&e()}})):"function"==typeof e&&e()}e=function(){pdfjsLib.GlobalWorkerOptions.workerSrc=t.options.pdfjsWorkerSrc+n.cacheBustParameters,pdfjsLib.canvasWillReadFrequently=p.defaults.canvasWillReadFrequently,n.loadDocument()},"undefined"==typeof pdfjsLib?(t.updateInfo(t.options.text.loading+" PDF Service ..."),e1.getScript(t.options.pdfjsSrc+n.cacheBustParameters,function(){"function"==typeof define&&i.amdO&&window.requirejs&&window.require&&window.require.config?(t.updateInfo(t.options.text.loading+" PDF Service (require) ..."),window.require.config({paths:{"pdfjs-dist/build/pdf.worker":t.options.pdfjsWorkerSrc.replace(".js","")}}),window.require(["pdfjs-dist/build/pdf"],function(t){window.pdfjsLib=t,o(e)})):o(e)},function(){t.updateInfo("Unable to load PDF service.."),n.dispose()},t.options.pdfjsSrc.indexOf("pdfjs-4")>1||t.options.pdfjsSrc.indexOf("pdfjs-5")>1)):"function"==typeof e&&e()}},{key:"dispose",value:function(){this.pdfDocument&&this.pdfDocument.destroy(),this.linkService=e1.disposeObject(this.linkService),this.pdfLoadProgress&&this.pdfLoadProgress.destroy(),this.pdfLoadProgress=null,this.pdfDocument=null}},{key:"loadDocument",value:function(){var e=this.app,t=this.app.options,i=this,n=t.pdfParameters||{};if(n.url=e1.httpsCorrection(n.url||t.source),n.rangeChunkSize=t.rangeChunkSize,n.cMapPacked=!0,n.disableAutoFetch=t.disableAutoFetch,n.disableStream=t.disableStream,n.disableRange=!0===t.disableRange,n.disableFontFace=t.disableFontFace,n.isEvalSupported=!1,n.cMapUrl=t.cMapUrl,n.imagesLocation=t.imagesLocation,n.imageResourcesPath=t.imageResourcesPath,!n.url&&!n.data&&!n.range){e.updateInfo("ERROR:No PDF File provided! ","df-error");return}var o=i.pdfLoadProgress=pdfjsLib.getDocument(n);o._worker.promise.then(function(t){e.updateInfo(e.options.text.loading+" PDF ...")}),o.onPassword=function(e,t){switch(t){case pdfjsLib.PasswordResponses.NEED_PASSWORD:var i=prompt("Enter the password to open the PDF file.");if(null===i)throw Error("No password givsen.");e(i);break;case pdfjsLib.PasswordResponses.INCORRECT_PASSWORD:var i=prompt("Invalid password. Please try again.");if(!i)throw Error("No password givaen.");e(i)}},o.promise.then(function(n){i.pdfDocument=n,n.getPage(1).then(function(o){i.defaultPage=o;var s,a=i.defaultPage.viewPort=o.getViewport({scale:1,rotation:o._pageInfo.rotate+e.options.pageRotation}),r=i.defaultPage.pageRatio=a.width/a.height;i.viewPorts[1]=a,e.dimensions.defaultPage={ratio:r,viewPort:a,width:a.width,height:a.height},e.dimensions.maxTextureHeight=(null!==(s=t.maxTextureSize)&&void 0!==s?s:3200)/(r>1?r:1),e.dimensions.maxTextureWidth=e.dimensions.maxTextureHeight*r,e.dimensions.autoHeightRatio=1/r,i.pageCount=n.numPages,i.numPages=n.numPages,i._page1Pass=!0,i.pagesLoaded()}),n.numPages>1&&!0===e.checkSecondPage?n.getPage(2).then(function(t){var n=t.getViewport({scale:1,rotation:t._pageInfo.rotate+e.options.pageRotation});i._page2Ratio=n.width/n.height,i.viewPorts[2]=n,i._page2Pass=!0,i.pagesLoaded()}):(i._page2Pass=!0,i.pagesLoaded())}).catch(function(t){if(null!==e&&null!=e.options){var n,o="",s=document.createElement("a");s.href=e.options.source,s.hostname===window.location.hostname||-1!==s.href.indexOf("file://")||e1.isChromeExtension()||-1!==s.href.indexOf("blob:")||(o="<strong>CROSS ORIGIN!! </strong>");var a=(null===(n=e.options)||void 0===n?void 0:n.fileName)||s.href;e.updateInfo(o+"<strong>Error: Cannot access file!  </strong>"+a+"<br><br>"+t.message,"df-error"),console.log(t),e.container.removeClass("df-loading").addClass("df-error"),i.dispose()}}),o.getTotalLength=function(){return i.pdfLoadProgress._transport._networkStream._fullRequestReader.contentLength},o.onProgress=function(t){if(null!==e){var i=100*t.loaded/o.getTotalLength();isNaN(i)?t&&t.loaded?(void 0===o.lastLoaded||o.lastLoaded+25e4<t.loaded)&&(o.lastLoaded=t.loaded,e.updateInfo(e.options.text.loading+" PDF "+(Math.ceil(t.loaded/1e4)/100).toFixed(2).toString()+"MB ...")):e.updateInfo(e.options.text.loading+" PDF ..."):e.updateInfo(e.options.text.loading+" PDF "+Math.ceil(Math.min(100,i)).toString().split(".")[0]+"% ...")}}}},{key:"pdfFetchStarted",value:function(){this.pdfFetchStatusCount=0,this.app.container.addClass("df-fetch-pdf"),this.pdfFetchStatus=p.REQUEST_STATUS.COUNT}},{key:"checkRequestQueue",value:function(){}},{key:"finalize",value:function(){var e=this.app,t=this;null!==e&&null!==e.options&&(t.linkService=new e2,t.linkService.setDocument(t.pdfDocument,null),t.linkService.setViewer(e),t.pdfDocument.getOutline().then(function(i){!0===e.options.overwritePDFOutline&&(i=[]),i=i||[],t.outline=i}).finally(function(){t._getLabels()}))}},{key:"_getLabels",value:function(){var e=this.app,t=this;t.pdfDocument.getPageLabels().then(function(i){if(i&&!0!==e.options.disablePageLabels){for(var n=i.length,o=0,s=0,a=0;a<n;a++){var r=i[a];if(r===(a+1).toString())o++;else if(""===r)s++;else break}o>=n||s>=n||(t.pageLabels=i)}}).finally(function(){t._getPermissions()})}},{key:"_getPermissions",value:function(){var e=this.app,t=this;t.pdfDocument.getPermissions().then(function(i){null!==i&&Array.isArray(i)&&(t.canPrint=i.indexOf(pdfjsLib.PermissionFlag.PRINT)>-1,!1==t.canPrint&&(console.log("PDF printing is disabled."),e.options.showPrintControl=e.options.showPrintControl&&t.canPrint))}).finally(function(){t._documentLoaded()})}},{key:"processPage",value:function(e){var t=this.app,i=this,n=e.pageNumber,o=0,s="",a=t.viewer.getTextureSize(e);if(!0===DEARFLIP.defaults.cachePDFTexture&&void 0!==this.getCache(n,a.height)){t.applyTexture(this.getCache(n,a.height),e),e1.log("Texture loaded from cache for:"+n);return}var r=t.viewer.getDocumentPageNumber(n);e1.log("Requesting PDF Page:"+r),i.pdfDocument.getPage(r).then(function(l){i.viewPorts[n]||(e.isFreshPage=!0,i.viewPorts[n]=l.getViewport({scale:1,rotation:l._pageInfo.rotate+t.options.pageRotation}));var h,u=t.viewer.getRenderContext(l,e);i.viewPorts[n].lastScale=u.viewport.scale,i.viewPorts[n].lastHeight=u.canvas.height,e.isFreshPage&&(null===(h=t.viewer.getPageByNumber(e.pageNumber))||void 0===h||h.changeTexture(e.pageNumber,u.canvas.height)),s=u.canvas.width+"x"+u.canvas.height,e1.log("Page "+n+" rendering - "+s),e.trace=i.requestIndex++,i.requestedPages+=","+e.trace+"["+r+"|"+u.canvas.height+"]",l.cleanupAfterRender=!1,o=performance.now(),l.render(u).promise.then(function(){if(t.applyTexture(u.canvas,e),!0===DEARFLIP.defaults.cachePDFTexture&&i.setCache(e.pageNumber,u.canvas,a.height),!0===t.options.cleanupAfterRender){var h=","+e.trace+"["+r+"|"+u.canvas.height+"]";i.requestedPages.indexOf(h)>-1&&(i.requestedPages=i.requestedPages.replace(h,""),-1==i.requestedPages.indexOf("["+r+"|")&&(i.pagesToClean.push(l),i.pagesToClean.length>0&&i.cleanUpPages()))}u=null;var p=performance.now()-o;i.renderTime+=p,e1.log("Rendered "+n+" in "+p+" ms:"+s)}).catch(function(e){console.log(e)})}).catch(function(e){console.log(e)})}},{key:"cleanUpPages",value:function(){for(;this.pagesToClean.length>0;)this.pagesToClean.splice(-1)[0].cleanup()}},{key:"clearSearch",value:function(){this.searchHits=[],this.searchHitItemsCache=[],this.totalHits=0,this.app.searchResults.html(""),this.app.container.removeClass("df-search-open"),this.textSearch="",this.app.container.find(".df-search-hits").remove()}},{key:"search",value:function(e){if(this.textSearch!==e){if(this.clearSearch(),e.length<3&&""!=e){this.app.updateSearchInfo(this.app.options.text.searchMinimum);return}this.textSearch=e,this.textSearchLength=e.length,this.app.searchContainer.addClass("df-searching"),this.app.container.addClass("df-fetch-pdf"),this._search(e,1)}}},{key:"_search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=this;i.app.updateSearchInfo(i.app.options.text.searchSearchingInfo+" "+t),i.searchPage(t).then(function(n){for(var o,s=RegExp(e,"gi"),a=[];o=s.exec(n);)a.push({index:o.index,length:i.textSearchLength});if(i.searchHits[t]=a,a.length>0){var r=i.app.viewer.searchPage(t);!0===r.include&&(i.totalHits+=a.length,i.app.searchResults.append('<div class="df-search-result '+(i.app.currentPageNumber===t?"df-active":"")+'" data-df-page="'+t+'"><span>'+i.app.options.text.searchResultPage+" "+r.label+"</span><span>"+a.length+" "+(a.length>1?i.app.options.text.searchResults:i.app.options.text.searchResult)+"</span></div>"))}i.app.viewer.isActivePage(t)&&(i.processTextContent(t,i.app.viewer.getTextElement(t,!0)),i.app.ui.update()),i._search(e,t+1)}).catch(function(){}).finally(function(){0===i.totalHits?i.app.updateSearchInfo(i.app.options.text.searchResultsNotFound):i.app.updateSearchInfo(i.totalHits+" "+i.app.options.text.searchResultsFound),i.app.searchContainer.removeClass("df-searching"),i.app.container.removeClass("df-fetch-pdf")})}},{key:"prepareTextContent",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this;if(void 0==n.textContentJoinedSearch[t]||i){var o,n=this,s=0,a=0,r=0;n.textContentSearch[t]=[],n.textContent[t]=[],n.textOffsetSearch[t]=[],n.textOffset[t]=[],n.textContentJoinedSearch[t]=[],n.textContentJoined[t]=[];for(var l=0;l<e.items.length;l++)o=e.items[l],n.textContentSearch[t].push(!0===o.hasEOL?o.str+" ":o.str),n.textContent[t].push(o.str+" "),a+=r=(o.str.length||0)+(!0===o.hasEOL?1:0),n.textOffsetSearch[t].push({length:r,offset:a-r}),s+=r=(o.str.length||0)+1,n.textOffset[t].push({length:r,offset:s-r});n.textContentJoinedSearch[t]=n.textContentSearch[t].join(""),n.textContentJoined[t]=n.textContent[t].join("")}}},{key:"searchPage",value:function(e){var t=this;return new Promise(function(i,n){if(t._isValidPage(e))try{var o=t.app.viewer.getDocumentPageNumber(e);void 0==t.textContentJoinedSearch[o]?t.pdfDocument.getPage(o).then(function(e){e.getTextContent().then(function(e){t.prepareTextContent(e,o),i(t.textContentJoinedSearch[o])})}):i(t.textContentJoinedSearch[o])}catch(e){e1.log(e),n(e)}else n()})}}]),o}(e3);function e8(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e9(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function e4(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function e7(e,t,i){return t&&e4(e.prototype,t),i&&e4(e,i),e}function e6(e){return(e6=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}p.providers.pdf=e5;var tt=p.jQuery,ti=p.utils,tn=/*#__PURE__*/function(){function e(t){e9(this,e),this._viewPort=new ts(0,0),this._pageInfo={rotate:0},this.src=t.src}return e7(e,[{key:"getViewport",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{scale:1};return new ts(this._viewPort.height*e.scale,this._viewPort.width*e.scale,e.scale)}}]),e}(),to=/*#__PURE__*/function(){function e(t){e9(this,e),this.source=[],this.pages=[],this.numPages=t.length;for(var i=0;i<t.length;i++)this.source[i]=ti.httpsCorrection(t[i].toString()),this.pages.push(new tn({src:this.source[i]}))}return e7(e,[{key:"getPage",value:function(e){var t=this;return new Promise(function(i,n){try{var o=tt("<img/>");o.attr("src",t.source[e-1]),o[0].crossOrigin="Anonymous",o.on("load",function(){tt(this).off();var e=new tn({src:this.src});e._viewPort.height=this.height,e._viewPort.width=this.width,e._viewPort.scale=1,e.image=this,i(e)})}catch(e){n(e)}})}}]),e}(),ts=/*#__PURE__*/function(){function e(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;e9(this,e),this.scale=n,this.height=t,this.width=i,this.scale=n,this.transform=[0,0,0,0,0,this.height]}return e7(e,[{key:"clone",value:function(){return new e(this.height,this.width,this.scale)}}]),e}(),ta=/*#__PURE__*/function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&te(e,t)}(n,e);var t,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i=e6(n);return e=t?Reflect.construct(i,arguments,e6(this).constructor):i.apply(this,arguments),e&&("object"==(e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)||"function"==typeof e)?e:e8(this)});function n(e,t){e9(this,n);var o,s=(o=i.call(this,e,t)).app,a=e8(o);return a.document=new to(s.options.source),a.pageCount=a.document.numPages,a.numPages=a.document.numPages,a.loadDocument(),o}return e7(n,[{key:"dispose",value:function(){}},{key:"loadDocument",value:function(){var e=this.app,t=this.app.options,i=this;i.document.getPage(1).then(function(n){i.defaultPage=n;var o,s=i.defaultPage.viewPort=n._viewPort,a=i.defaultPage.pageRatio=s.width/s.height;i.viewPorts[1]=s,e.dimensions.defaultPage={ratio:a,viewPort:s,width:s.width,height:s.height},e.dimensions.maxTextureHeight=(null!==(o=t.maxTextureSize)&&void 0!==o?o:3200)/(a>1?a:1),e.dimensions.maxTextureWidth=e.dimensions.maxTextureHeight*a,e.dimensions.autoHeightRatio=1/a,i._page1Pass=!0,i.pagesLoaded()}),i.pageCount>1&&!0===e.checkSecondPage?i.document.getPage(2).then(function(e){var t=e._viewPort;i._page2Ratio=t.width/t.height,i.viewPorts[2]=t,i._page2Pass=!0,i.pagesLoaded()}):(i._page2Pass=!0,i.pagesLoaded())}},{key:"finalize",value:function(){var e=this.app;null!==e&&null!==e.options&&(this.linkService=new e2,this.linkService.setViewer(e),this._documentLoaded())}},{key:"processPage",value:function(e){var t=this.app,i=this,n=e.pageNumber,o=performance.now(),s=t.viewer.getDocumentPageNumber(n);ti.log("Requesting PDF Page:"+s),i.document.getPage(s).then(function(s){i.viewPorts[n]||(e.isFreshPage=!0,i.viewPorts[n]=s._viewPort);var a,r,l=t.viewer.getRenderContext(s,e);(e.isFreshPage&&(null===(a=t.viewer.getPageByNumber(e.pageNumber))||void 0===a||a.changeTexture(e.pageNumber,l.canvas.height)),e.preferCanvas=!0,!0===e.preferCanvas)?(l.canvas.getContext("2d").drawImage(s.image,l.viewport.transform[4],0,l.canvas.width*(null!==(r=l.viewport.widthFix)&&void 0!==r?r:1),l.canvas.height),t.applyTexture(l.canvas,e)):t.applyTexture({src:s.src,height:l.canvas.height,width:l.canvas.width},e),ti.log("Rendered "+n+" in "+(performance.now()-o)+" milliseconds")})}}]),n}(e3);function tr(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function tl(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function th(e,t,i){return t&&tl(e.prototype,t),i&&tl(e,i),e}function tu(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}p.providers.image=ta,i(795);var tp=p.jQuery,tc=p.utils,td=p.REQUEST_STATUS,tf=/*#__PURE__*/function(){function e(t,i){tr(this,e),this.options=t,this.app=i,this.parentElement=this.app.container,this.element=tp("<div>",{class:"df-ui"}),this.leftElement=tp("<div>",{class:"df-ui-left"}).appendTo(this.element),this.centerElement=tp("<div>",{class:"df-ui-center"}).appendTo(this.element),this.rightElement=tp("<div>",{class:"df-ui-right"}).appendTo(this.element),this.parentElement.append(this.element),this.events={},this.controls={}}return th(e,[{key:"init",value:function(){var e=this,t="<div>",i=this.app,n=this.controls,o=i.options.text,s=i.options.icons;e.createLogo(),this.openRight=n.openRight=tp(t,{class:"df-ui-nav df-ui-next",title:i.isRTL?o.previousPage:o.nextPage,html:'<div class="df-ui-btn '+s.next+'"></div>'}).on("click",function(){i.openRight()}),this.openLeft=n.openLeft=tp(t,{class:"df-ui-nav df-ui-prev",title:i.isRTL?o.nextPage:o.previousPage,html:'<div class="df-ui-btn '+s.prev+'"></div>'}).on("click",function(){i.openLeft()}),!0==i.options.autoPlay&&(this.play=n.play=tc.createBtn("play",s.play,o.play).on("click",function(){var e=tp(this);i.setAutoPlay(!e.hasClass(i.options.icons.pause))}),i.setAutoPlay(i.options.autoPlayStart)),this.pageNumber=n.pageNumber=tc.createBtn("page").on("change",function(){i.gotoPageLabel(n.pageInput.val())}).on("keyup",function(e){13===e.keyCode&&i.gotoPageLabel(n.pageInput.val())});var a="df_book_page_number_"+Math.ceil(performance.now()/10);this.pageInput=n.pageInput=tp('<input id="'+a+'" type="text"/>').appendTo(n.pageNumber),this.pageLabel=n.pageLabel=tp('<label for="'+a+'"></label>').appendTo(n.pageNumber),this.thumbnail=n.thumbnail=tc.createBtn("thumbnail",s.thumbnail,o.toggleThumbnails),n.thumbnail.on("click",function(){var t=tp(this);null==i.thumblist&&i.initThumbs(),i.thumbContainer.toggleClass("df-sidemenu-visible"),t.toggleClass("df-active"),t.hasClass("df-active")&&(t.siblings(".df-active").trigger("click"),i.thumbRequestStatus=td.ON),e.update(),!1===i.options.sideMenuOverlay&&i.resizeRequestStart()}).addClass("df-sidemenu-trigger"),i.hasOutline()&&(this.outline=n.outline=tc.createBtn("outline",s.outline,o.toggleOutline),n.outline.on("click",function(){var t=tp(this);if(null==i.outlineViewer&&i.initOutline(),i.outlineContainer){var n=i.outlineContainer;t.toggleClass("df-active"),n.toggleClass("df-sidemenu-visible"),t.hasClass("df-active")&&t.siblings(".df-active").trigger("click"),e.update(),!1===i.options.sideMenuOverlay&&i.resizeRequestStart()}}).addClass("df-sidemenu-trigger")),!0===i.options.showSearchControl&&!0!==tc.isMobile&&"string"==typeof i.options.source&&(n.search=tc.createBtn("search",s.search,o.search),n.search.on("click",function(){var t=tp(this);if(null==i.searchContainer&&i.initSearch(),i.searchContainer){var n=i.searchContainer;t.toggleClass("df-active"),n.toggleClass("df-sidemenu-visible"),t.hasClass("df-active")&&(t.siblings(".df-active").trigger("click"),i.searchBox[0].focus()),e.update(),!1===i.options.sideMenuOverlay&&i.resizeRequestStart()}}).addClass("df-sidemenu-trigger"));var r=e.element;if(this.zoomIn=n.zoomIn=tc.createBtn("zoomin",s.zoomin,o.zoomIn).on("click",function(){i.zoom(1),e.update()}),this.zoomOut=n.zoomOut=tc.createBtn("zoomout",s.zoomout,o.zoomOut).on("click",function(){i.zoom(-1),e.update()}),this.resetZoom=n.resetZoom=tc.createBtn("resetzoom",s.resetzoom,o.resetZoom).on("click",function(){i.resetZoom(-1),e.update()}),i.viewer.isFlipBook){if(i.pageCount>2){var l=i.viewer.pageMode===p.FLIPBOOK_PAGE_MODE.SINGLE;this.pageMode=n.pageMode=tc.createBtn("pagemode",s[l?"doublepage":"singlepage"],l?o.doublePageMode:o.singlePageMode).on("click",function(){var e=tp(this);i.viewer.setPageMode({isSingle:!e.hasClass(s.doublepage)}),i.viewer.pageModeChangedManually=!0})}}else this.pageFit=n.pageFit=tc.createBtn("pagefit",s.pagefit,o.pageFit).on("click",function(){var e=n.pageFit;!0==!e.hasClass(s.widthfit)?(e.addClass(s.widthfit),e.html("<span>"+o.widthFit+"</span>"),e.attr("title",o.widthFit)):(e.removeClass(s.widthfit),e.html("<span>"+o.pageFit+"</span>"),e.attr("title",o.pageFit))});if(this.share=n.share=tc.createBtn("share",s.share,o.share).on("click",function(){null==e.shareBox&&(e.shareBox=new tg(i.container,i.options)),!0===e.shareBox.isOpen?e.shareBox.close():(e.shareBox.update(i.getURLHash()),e.shareBox.show())}),this.more=n.more=tc.createBtn("more",s.more).on("click",function(t){!0!==e.moreContainerOpen&&(tp(this).addClass("df-active"),e.moreContainerOpen=!0,t.stopPropagation())}),this.startPage=n.startPage=tc.createBtn("start",s.start,o.gotoFirstPage).on("click",function(){i.start()}),this.endPage=n.endPage=tc.createBtn("end",s.end,o.gotoLastPage).on("click",function(){i.end()}),!0===i.options.showPrintControl&&!0!==tc.isMobile&&"string"==typeof i.options.source&&(this.print=n.print=tc.createBtn("print",s.print,o.print).on("click",function(){p.printHandler=p.printHandler||new tv,p.printHandler.printPDF(i.options.source)})),!0===i.options.showDownloadControl&&"string"==typeof i.options.source){var h="df-ui-btn df-ui-download "+s.download;this.download=n.download=tp('<a download target="_blank" class="'+h+'"><span>'+o.downloadPDFFile+"</span></a>"),n.download.attr("href",tc.httpsCorrection(i.options.source)).attr("title",o.downloadPDFFile)}e.moreContainer=tp(t,{class:"df-more-container"}),n.more.append(e.moreContainer),!0===i.options.isLightBox&&!0!==i.fullscreenSupported||(this.fullScreen=n.fullScreen=tc.createBtn("fullscreen",s.fullscreen,o.toggleFullscreen).on("click",i.switchFullscreen.bind(i))),i.viewer.initCustomControls();var u=i.options.allControls.replace(/ /g,"").split(","),c=","+i.options.moreControls.replace(/ /g,"")+",",d=","+i.options.hideControls.replace(/ /g,"")+",";i.options.leftControls.replace(/ /g,""),i.options.rightControls.replace(/ /g,""),d+=",";for(var f=0;f<u.length;f++){var g=u[f];if(0>d.indexOf(","+g+",")){var m=n[g];null!=m&&(void 0===m?"undefined":tu(m))=="object"&&(c.indexOf(","+g+",")>-1&&"more"!==g&&"pageNumber"!==g?e.moreContainer.append(m):!0==i.options.controlsFloating?r.append(m):this.centerElement.append(m))}}0==e.moreContainer.children().length&&this.more.addClass("df-hidden"),i.container.append(r),i.container.append(n.openLeft),i.container.append(this.controls.openRight),window.addEventListener("click",e.events.closePanels=e.closePanels.bind(e),!1),window.addEventListener("keyup",e.events.keyup=e.keyUp.bind(e),!1),document.addEventListener("fullscreenchange",e.events.fullscreenChange=e.fullscreenChange.bind(e),!1),!0===i.options.autoOpenThumbnail&&e.controls.thumbnail.trigger("click"),i.hasOutline()&&!0===i.options.autoOpenOutline&&e.controls.outline.trigger("click"),i.executeCallback("onCreateUI")}},{key:"closePanels",value:function(e){if(!0===this.moreContainerOpen){var t;null===(t=this.controls.more)||void 0===t||t.removeClass("df-active"),this.moreContainerOpen=!1}}},{key:"fullscreenChange",value:function(e){void 0===tc.getFullscreenElement()&&!0===this.app.isFullscreen&&this.app.switchFullscreen()}},{key:"keyUp",value:function(e){var t=this.app;if("INPUT"!==e.target.nodeName){var i=!1;switch(t.options.arrowKeysAction===p.ARROW_KEYS_ACTIONS.NAV&&((!0===t.isFullscreen||!0===t.options.isLightBox)&&(i=!0),!0!=t.options.isLightBox&&p.activeEmbeds.length<2&&!1===tp("body").hasClass("df-lightbox-open")&&(i=!0)),e.keyCode){case 27:p.activeLightBox&&p.activeLightBox.app&&!tc.isChromeExtension()&&p.activeLightBox.closeButton.trigger("click");break;case 37:i&&t.openLeft();break;case 39:i&&t.openRight();break;case 38:i&&t.viewer.isVertical()&&t.openLeft();break;case 40:i&&t.viewer.isVertical()&&t.openRight()}}}},{key:"createLogo",value:function(){var e=this.app,t=null;e.options.logo.indexOf("<")>-1?t=tp(e.options.logo).addClass("df-logo df-logo-html"):e.options.logo.trim().length>2&&(t=tp('<a class="df-logo df-logo-img" target="_blank" href="'+e.options.logoUrl+'"><img alt="" src="'+e.options.logo+'"/>')),this.element.append(t)}},{key:"dispose",value:function(){for(var e in this.controls)if(this.controls.hasOwnProperty(e)){var t=this.controls[e];null!==t&&(void 0===t?"undefined":tu(t))=="object"&&t.off().remove()}this.element.remove(),this.shareBox=tc.disposeObject(this.shareBox),window.removeEventListener("click",this.events.closePanels,!1),window.removeEventListener("keyup",this.events.keyup,!1),document.removeEventListener("fullscreenchange",this.events.fullscreenChange,!1)}},{key:"update",value:function(){var e=this.app,t=this.controls;!0!==this._pageLabelWidthSet&&(this.pageLabel.width(""),e.provider.pageLabels?this.pageLabel.text("88888888888888888".substring(0,3*e.pageCount.toString().length+4)):this.pageLabel.text("88888888888".substring(0,2*e.pageCount.toString().length+3)),this.pageNumber.width(this.pageLabel.width()),this.pageLabel.width(this.pageLabel.width()),this.pageLabel.text(""),this._pageLabelWidthSet=!0);var i=e.getCurrentLabel();if(i.toString()!==e.currentPageNumber.toString()?t.pageLabel.text(i+"("+e.currentPageNumber+"/"+e.pageCount+")"):t.pageLabel.text(i+"/"+e.pageCount),t.pageInput.val(i),e.container.toggleClass("df-sidemenu-open",e.container.find(".df-sidemenu-visible").length>0),this.isSearchOpen=e.provider.totalHits>0&&e.container.find(".df-sidemenu-visible.df-search-container").length>0,e.container.toggleClass("df-search-open",this.isSearchOpen),this.isSearchOpen){var n=e.searchContainer.find(".df-search-result[data-df-page='"+e.currentPageNumber+"']");if(e.searchContainer.find(".df-search-result.df-active").removeClass("df-active"),n.length>0&&!n.hasClass(".df-active")){n.addClass("df-active");var o=e.searchResults[0],s=o.scrollTop;s+o.getBoundingClientRect().height<(n=n[0]).offsetTop+n.scrollHeight?tc.scrollIntoView(n,null,!1):s>n.offsetTop&&tc.scrollIntoView(n)}}t.zoomIn.toggleClass("disabled",e.zoomValue===e.viewer.maxZoom),t.zoomOut.toggleClass("disabled",e.zoomValue===e.viewer.minZoom);var a=e.isRTL,r=e.currentPageNumber===e.startPage,l=e.currentPageNumber===e.endPage,h=r&&!a||l&&a,u=l&&!a||r&&a;t.openRight.toggleClass("df-hidden",u),t.openLeft.toggleClass("df-hidden",h),e.viewer.afterControlUpdate()}}]),e}(),tg=/*#__PURE__*/function(){function e(t,i){tr(this,e),this.isOpen=!1,this.shareUrl="",this.init(t,i)}return th(e,[{key:"init",value:function(e,t){var i=this;for(var n in i.wrapper=tp('<div class="df-share-wrapper" style="display: none;">').on("click",function(){i.close()}),i.box=tp('<div class="df-share-box">'),i.box.on("click",function(e){e.preventDefault(),e.stopPropagation()}),i.box.appendTo(i.wrapper).html('<span class="df-share-title">'+t.text.share+"</span>"),i.urlInput=tp('<textarea name="df-share-url" class="df-share-url">').on("click",function(){this.select()}),i.box.append(i.urlInput),t.share)!function(e){if(t.share.hasOwnProperty(e)&&0>t.hideShareControls.indexOf(e)){var n=t.share[e];null!==n&&(i[e]=tp("<div>",{class:"df-share-button df-share-"+e+" "+t.icons[e]}).on("click",function(e){e.preventDefault(),window.open(n.replace("{{url}}",encodeURIComponent(i.shareUrl)).replace("{{mailsubject}}",t.text.mailSubject),"Sharer","width=500,height=400"),e.stopPropagation()}),i.box.append(i[e]))}}(n);tp(e).append(i.wrapper)}},{key:"show",value:function(){this.wrapper.show(),this.urlInput.val(this.shareUrl),this.urlInput.trigger("click"),this.isOpen=!0}},{key:"dispose",value:function(){for(var e in this)this.hasOwnProperty(e)&&this[e]&&this[e].off&&this[e].off();this.wrapper.remove()}},{key:"close",value:function(){this.wrapper.hide(),this.isOpen=!1}},{key:"update",value:function(e){this.shareUrl=e}}]),e}(),tm=/*#__PURE__*/function(){function e(t){tr(this,e),this.duration=300;var i=this;return i.lightboxWrapper=tp("<div>").addClass("df-lightbox-wrapper"),i.backGround=tp("<div>").addClass("df-lightbox-bg").appendTo(i.lightboxWrapper),i.element=tp("<div>").addClass("df-app").appendTo(i.lightboxWrapper),i.controls=tp("<div>").addClass("df-lightbox-controls").appendTo(i.lightboxWrapper),i.closeButton=tp("<div>").addClass("df-lightbox-close df-ui-btn "+p.defaults.icons.close).on("click",function(){i.close(t)}).appendTo(i.controls),i.lightboxWrapper.append(i.element),i}return th(e,[{key:"show",value:function(e){return 0===this.lightboxWrapper.parent().length&&tp("body").append(this.lightboxWrapper),tp("html,body").addClass("df-lightbox-open"),this.lightboxWrapper.show(),"function"==typeof e&&e(),this}},{key:"close",value:function(e){return this.lightboxWrapper.hide(),Array.prototype.forEach.call(p.utils.getSharePrefixes(),function(e){0===window.location.hash.indexOf("#"+e)&&!0==p.defaults.hashNavigationEnabled&&history.replaceState(void 0,void 0,"#_")}),"function"==typeof e&&setTimeout(e,this.duration),tp("html,body").removeClass("df-lightbox-open"),this.element.attr("class","df-app").attr("style",""),this.lightboxWrapper.attr("class","df-lightbox-wrapper").attr("style","display:none"),this.backGround.attr("style",""),this}}]),e}(),tv=/*#__PURE__*/function(){function e(){tr(this,e);var t=this;return t.frame=tp('<iframe id="df-print-frame" style="display:none" src="about:blank">').appendTo(tp("body")),t.frame.on("load",function(){try{t.frame[0].contentWindow.print()}catch(e){console.log(e)}}),t}return th(e,[{key:"printPDF",value:function(e){-1==e.indexOf("?")?e+="?print=true":e+="&print=true",this.frame[0].src=e}}]),e}(),ty=/*#__PURE__*/function(){function e(t,i){tr(this,e),this.options=t,this.app=i,this.parentElement=t.parentElement,this.element=tp("<div>",{class:"df-sidemenu-wrapper"}),this.parentElement.append(this.element),this.buttons=tp("<div>",{class:"df-sidemenu-buttons df-ui-wrapper"}).appendTo(this.element),this.close=tc.createBtn("close",i.options.icons.close,i.options.text.close),this.buttons.append(this.close)}return th(e,[{key:"dispose",value:function(){this.element.remove()}}]),e}(),tb=/*#__PURE__*/function(){function e(t){tr(this,e),this.outline=null,this.lastToggleIsShow=!0,this.container=t.container,this.linkService=t.linkService,this.outlineItemClass=t.outlineItemClass||"outlineItem",this.outlineToggleClass=t.outlineToggleClass||"outlineItemToggler",this.outlineToggleHiddenClass=t.outlineToggleHiddenClass||"outlineItemsHidden"}return th(e,[{key:"dispose",value:function(){this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.linkService=null}},{key:"reset",value:function(){this.outline=null,this.lastToggleIsShow=!0;for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild)}},{key:"_dispatchEvent",value:function(e){var t=document.createEvent("CustomEvent");t.initCustomEvent("outlineloaded",!0,!0,{outlineCount:e}),this.container.dispatchEvent(t)}},{key:"_bindLink",value:function(e,t){var i=this.linkService;if(!0===t.custom)e.href=i.getCustomDestinationHash(t.dest),e.onclick=function(){return i.customNavigateTo(t.dest),!1};else{if(t.url){pdfjsLib.addLinkAttributes(e,{url:t.url});return}e.href=i.getDestinationHash(t.dest),e.onclick=function(){return i.navigateTo(t.dest),!1}}}},{key:"_addToggleButton",value:function(e){var t=this,i=document.createElement("div");i.className=this.outlineToggleClass+" "+this.outlineToggleHiddenClass,i.onclick=(function(n){if(n.stopPropagation(),i.classList.toggle(this.outlineToggleHiddenClass),n.shiftKey){var o=!i.classList.contains(this.outlineToggleHiddenClass);t._toggleOutlineItem(e,o)}}).bind(this),e.insertBefore(i,e.firstChild)}},{key:"_toggleOutlineItem",value:function(e,t){this.lastToggleIsShow=t;for(var i=e.querySelectorAll("."+this.outlineToggleClass),n=0,o=i.length;n<o;++n)i[n].classList[t?"remove":"add"](this.outlineToggleHiddenClass)}},{key:"render",value:function(e){var t=e&&e.outline||null,i=0;if(this.outline&&this.reset(),this.outline=t,t){for(var n=document.createDocumentFragment(),o=[{parent:n,items:this.outline,custom:!1}],s=!1;o.length>0;)for(var a=o.shift(),r=a.custom,l=0,h=a.items.length;l<h;l++){var u=a.items[l],p=document.createElement("div");p.className=this.outlineItemClass;var c=document.createElement("a");if(null==u.custom&&null!=r&&(u.custom=r),this._bindLink(c,u),c.textContent=u.title.replace(/\x00/g,""),p.appendChild(c),u.items&&u.items.length>0){s=!0,this._addToggleButton(p);var d=document.createElement("div");d.className=this.outlineItemClass+"s",p.appendChild(d),o.push({parent:d,custom:u.custom,items:u.items})}a.parent.appendChild(p),i++}s&&(null!=this.container.classList?this.container.classList.add(this.outlineItemClass+"s"):null!=this.container.className&&(this.container.className+=" picWindow")),this.container.appendChild(n),this._dispatchEvent(i)}}}]),e}(),tw=/*#__PURE__*/function(){function e(t){tr(this,e);var i=function(){s.thumbRequestCount=0,s.thumbRequestStatus=td.COUNT},n=this.itemHeight=t.itemHeight,o=this.itemWidth=t.itemWidth,s=this.app=t.app;this.items=t.items,this.generatorFn=t.generatorFn,this.totalRows=t.totalRows||t.items&&t.items.length,this.addFn=t.addFn,this.scrollFn=t.scrollFn,this.container=document.createElement("div");for(var a=this,r=0;r<this.totalRows;r++){var l=document.createElement("div"),h=r+1;l.id="df-thumb"+h;var u=document.createElement("div"),p=document.createElement("div"),c=document.createElement("div");c.className="df-wrapper",p.className="df-thumb-number",l.className="df-thumb",u.className="df-bg-image",c.style.height=n+"px",c.style.width=o+"px",p.innerText=s.provider.getLabelforPage(h),l.appendChild(c),c.appendChild(p),c.appendChild(u),this.container.appendChild(l)}a.dispose=function(){a.container&&a.container.parentNode&&a.container.parentNode.removeChild(a.container),a.container.removeEventListener("scroll",i)},a.container.addEventListener("scroll",i)}return th(e,[{key:"processThumbRequest",value:function(){tc.log("Thumb Request Initiated");var e=this.app;if(e.thumbRequestStatus=td.OFF,e.activeThumb!==e.currentPageNumber&&null!=e.thumbContainer&&e.thumbContainer.hasClass("df-sidemenu-visible")){var t=e.thumblist.container,i=t.scrollTop,n=t.getBoundingClientRect().height,o=e.thumbContainer.find("#df-thumb"+e.currentPageNumber);o.length>0?(e.thumbContainer.find(".df-selected").removeClass("df-selected"),o.addClass("df-selected"),i+n<(o=o[0]).offsetTop+o.scrollHeight?tc.scrollIntoView(o,null,!1):i>o.offsetTop&&tc.scrollIntoView(o),e.activeThumb=e.currentPageNumber):(tp(t).scrollTop(124*e.currentPageNumber),e.thumbRequestStatus=td.ON)}if(0===e.thumblist.container.getElementsByClassName("df-thumb-requested").length){var s=tc.getVisibleElements({container:e.thumblist.container,elements:e.thumblist.container.children});-1===s.indexOf(e.activeThumb)&&s.unshift(e.activeThumb);for(var a=0;a<s.length;a++){var r=e.thumblist.container.children[s[a]-1];if(void 0!==r&&!1===r.classList.contains("df-thumb-loaded")&&!1===r.classList.contains("df-thumb-requested"))return r.classList.add("df-thumb-requested"),tc.log("Thumb Requested for "+s[a]),e.provider.processPage({pageNumber:s[a],textureTarget:p.TEXTURE_TARGET.THUMB}),!1}}}},{key:"setPage",value:function(e){var t=this.app,i=e.pageNumber,n=e.texture;if(e.textureTarget===p.TEXTURE_TARGET.THUMB){var o=t.container.find("#df-thumb"+i);o.find(".df-wrapper").css({height:e.height,width:e.width}),o.find(".df-bg-image").css({backgroundImage:tc.bgImage(n)}),o.addClass("df-thumb-loaded").removeClass("df-thumb-requested")}tc.log("Thumbnail set for "+e.pageNumber),t.thumbRequestStatus=td.ON}}]),e}();function tP(){if(void 0===p.openLocalFileInput){var e=p.openLocalFileInput=tp('<input type="file" accept=".pdf" style="display:none">').appendTo(tp("body")).data("df-option",p.openFileOptions);e.change(function(){var t,i=e[0].files;i.length&&(t=i[0],e.val(""),p.openFile(t))})}}p.openLightBox=function(e){p.activeLightBox||(p.activeLightBox=new tm(function(){p.activeLightBox.app&&(p.activeLightBox.app.closeRequested=!0,p.activeLightBox.app.analytics({eventAction:p.activeLightBox.app.options.analyticsViewerClose,options:p.activeLightBox.app.options})),p.activeLightBox.app=tc.disposeObject(p.activeLightBox.app)})),p.activeLightBox.duration=300,(void 0===p.activeLightBox.app||null===p.activeLightBox.app||!0===p.activeLightBox.app.closeRequested||p.openLocalFileInput==e)&&(p.activeLightBox.app=tc.disposeObject(p.activeLightBox.app),null===p.activeLightBox.app&&p.activeLightBox.show(function(){p.activeLightBox.app=new p.Application({transparent:!1,isLightBox:!0,height:"100%",dataElement:e,element:p.activeLightBox.element}),!0!==p._isHashTriggered&&!0==p.defaults.hashNavigationEnabled&&history.pushState(null,null,"#"),p.activeLightBox.lightboxWrapper.toggleClass("df-lightbox-padded",!1===p.activeLightBox.app.options.popupFullsize),p.activeLightBox.lightboxWrapper.toggleClass("df-rtl",p.activeLightBox.app.options.readDirection===p.READ_DIRECTION.RTL),p.activeLightBox.backGround.css({backgroundColor:"transparent"===p.activeLightBox.app.options.backgroundColor?p.defaults.popupBackGroundColor:p.activeLightBox.app.options.backgroundColor})}))},p.checkBrowserURLforDefaults=function(){if(!tc.isIEUnsupported){var e=new URL(location.href).searchParams.get("viewer-type")||new URL(location.href).searchParams.get("viewertype"),t=new URL(location.href).searchParams.get("is-3d")||new URL(location.href).searchParams.get("is3d");e&&(p.defaults.viewerType=e),("true"===t||"false"===t)&&(p.defaults.is3D="true"===t)}},p.fileDropHandler=function(e,t){var i=e[0];"application/pdf"===i.type&&(t.preventDefault(),t.stopPropagation(),p.openFile(i))},p.openFile=function(e){if(e){var t;p.oldLocalFileObjectURL&&window.URL.revokeObjectURL(p.oldLocalFileObjectURL),p.oldLocalFileObjectURL=window.URL.createObjectURL(e),null===(t=p.openFileSelected)||void 0===t||t.call(p,{url:p.oldLocalFileObjectURL,file:e}),p.openURL(p.oldLocalFileObjectURL)}else p.openURL()},p.openURL=function(e){tP(),e&&(p.openFileOptions.source=e,p.openFileOptions.pdfParameters=null),p.openLightBox(p.openLocalFileInput)},p.openBase64=function(e){p.openFileOptions.source=null,p.openFileOptions.pdfParameters={data:atob(e)},p.openURL()},p.openLocalFile=function(){tP(),p.openLocalFileInput.click()},p.initControls=function(){var e=tp("body");if(!1!==p.defaults.autoPDFLinktoViewer&&e.on("click",'a[href$=".pdf"]',function(e){var t=tp(this);void 0!==t.attr("download")||"_blank"===t.attr("target")||t.hasClass("df-ui-btn")||t.parents(".df-app").length>0||(e.preventDefault(),t.data("df-source",t.attr("href")),p.openLightBox(t))}),window.addEventListener("popstate",function(e){p.activeLightBox&&p.activeLightBox.app&&!tc.isChromeExtension()&&p.activeLightBox.closeButton.trigger("click")}),e.on("click",".df-open-local-file",function(e){p.openLocalFile()}),e.on("click",".df-sidemenu-buttons .df-ui-close",function(){tp(this).closest(".df-app").find(".df-ui-btn.df-active").trigger("click")}),e.on("mouseout",".df-link-content section.squareAnnotation, .df-link-content section.textAnnotation, .df-link-content section.freeTextAnnotation",function(){var e=tp(this);p.handlePopup(e,!1)}),e.on("mouseover",".df-link-content section.squareAnnotation, .df-link-content section.textAnnotation, .df-link-content section.freeTextAnnotation",function(){var e=tp(this);p.handlePopup(e,!0)}),p.handlePopup=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=e.closest(".df-container"),n=i.find(".df-comment-popup");if(n.toggleClass("df-active",t),t){var o=e[0].getBoundingClientRect(),s=i[0].getBoundingClientRect(),a=e.find(".popupWrapper").first();if(e.hasClass("popupTriggerArea")){var r=e.data("annotation-id");void 0!==r&&(a=e.siblings("[data-annotation-id=popup_"+r+"]"))}n.html(a.html());var l=o.left-s.left;l+360>s.width?l=s.width-360-10:l<10&&(l=10);var h=o.top-s.top+o.height+5;h+n.height()>s.height?h=o.top-n.height()-o.height-10:h<10&&(h=10),n.css({left:l,top:h})}},void 0!=p.fileDropElement){var t=tp(p.fileDropElement);t.length>0&&(t.on("dragover",function(e){e.preventDefault(),e.stopPropagation(),tp(this).addClass("df-dragging")}),t.on("dragleave",function(e){e.preventDefault(),e.stopPropagation(),tp(this).removeClass("df-dragging")}),t.on("drop",function(e){var t=e.originalEvent.dataTransfer.files;t.length&&p.fileDropHandler(t,e)}))}};var tS=p.jQuery,tE=p.REQUEST_STATUS,tx=p.utils,tC=/*#__PURE__*/function(){var e;function t(e){var i,n,o;(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")})(this,t),this.options=e,this.viewerType=this.options.viewerType,this.startPage=1,this.endPage=1,this.element=tS(this.options.element),e.maxTextureSize=null!==(i=e.maxTextureSize)&&void 0!==i?i:2048,tx.isMobile&&(e.maxTextureSize=4096===e.maxTextureSize?3200:e.maxTextureSize),this.dimensions={padding:{},offset:{},pageFit:{},stage:{},isAutoHeight:"auto"===e.height,maxTextureSize:e.maxTextureSize},this.is3D=e.is3D,this.options.pixelRatio=tx.limitAt(this.options.pixelRatio,1,this.options.maxDPI),this.options.fakeZoom=null!==(n=this.options.fakeZoom)&&void 0!==n?n:1,this.events={},this.links=e.links,this.thumbSize=128,this.pendingZoom=!0,this.currentPageNumber=this.options.openPage||this.startPage,this.hashNavigationEnabled=!0===this.options.hashNavigationEnabled,this.pendingZoom=!0,this.zoomValue=1,this.pageScaling=p.PAGE_SCALE.MANUAL,this.isRTL=e.readDirection===p.READ_DIRECTION.RTL,this.jumpStep=1,this.resizeRequestStatus=tE.OFF,this.refreshRequestStatus=tE.OFF,this.refreshRequestCount=0,this.resizeRequestCount=0,this.fullscreenSupported=tx.hasFullscreenEnabled(),this.thumbRequestCount=0,this.isExternalReady=null===(o=this.options.isExternalReady)||void 0===o||o,this.init(),!0===this.options.autoLightBoxFullscreen&&!0===this.options.isLightBox&&this.switchFullscreen(),this.executeCallback("onCreate"),this.target=this}return e=[{key:"init",value:function(){var e=this.options;if(this.initDOM(),this.initResourcesLocation(),this.initInfo(),(null==e.source||0===e.source.length)&&null==e.pdfParameters){this.updateInfo("ERROR: Set a Valid Document Source.",p.INFO_TYPE.ERROR),this.container.removeClass("df-loading").addClass("df-error");return}if(tx.isIEUnsupported){this.updateInfo("Your browser (Internet Explorer) is out of date! <br><a href='https://browsehappy.com/'>Upgrade to a new browser.</a>","df-old-browser"),this.container.removeClass("df-loading").addClass("df-error");return}this.commentPopup=tS('<div class="df-comment-popup">').appendTo(this.container),this.viewer=new this.viewerType(e,this),this.sideMenu=new ty({parentElement:this.container},this),this.provider=new p.providers[e.providerType](e,this),this.state="loading",this.checkRequestQueue()}},{key:"initDOM",value:function(){this.element.addClass("df-app").removeClass("df-container df-loading"),this.container=tS("<div>").appendTo(this.element),this.container.addClass("df-container df-loading df-init"+(!0===this.options.controlsFloating?" df-float":" df-float-off")+" df-controls-"+this.options.controlsPosition+("transparent"===this.options.backgroundColor?" df-transparent":"")+(!0===this.isRTL?" df-rtl":"")+(!0===tx.isIOS||!0===tx.isIPad?" df-ios":"")),this._offsetParent=this.container[0].offsetParent,this.backGround=tS("<div class='df-bg'>").appendTo(this.container).css({backgroundColor:this.options.backgroundColor,backgroundImage:this.options.backgroundImage?"url('"+this.options.backgroundImage+"')":""}),this.viewerContainer=tS("<div>").appendTo(this.container),this.viewerContainer.addClass("df-viewer-container")}},{key:"initResourcesLocation",value:function(){var e=this.options;if(void 0!==window[p.locationVar]){if(e.pdfjsSrc=window[p.locationVar]+"js/libs/pdf.min.js",e.threejsSrc=window[p.locationVar]+"js/libs/three.min.js",e.pdfjsWorkerSrc=window[p.locationVar]+"js/libs/pdf.worker.min.js",e.soundFile=window[p.locationVar]+e.soundFile,e.imagesLocation=window[p.locationVar]+e.imagesLocation,e.imageResourcesPath=window[p.locationVar]+e.imageResourcesPath,e.cMapUrl=window[p.locationVar]+e.cMapUrl,void 0!==e.pdfVersion){var t="";"latest"==e.pdfVersion||"beta"==e.pdfVersion?t="latest":"stable"==e.pdfVersion&&(t="stable"),("latest"==e.pdfVersion||"default"==e.pdfVersion)&&(Array.prototype.at,void 0===Array.prototype.at&&(t="stable",console.log("Proper Support for Latest version PDF.js 3.7 not available. Switching to PDF.js 2.5!"))),"default"!==t&&""!==t&&(e.pdfjsSrc=window[p.locationVar]+"js/libs/pdfjs/"+t+"/pdf.min.js",e.pdfjsWorkerSrc=window[p.locationVar]+"js/libs/pdfjs/"+t+"/pdf.worker.min.js"),"stable"===t&&(this.options.fakeZoom=1)}}else console.warn("DEARVIEWER locationVar not found!");this.executeCallback("onInitResourcesLocation")}},{key:"initEvents",value:function(){var e=this.container[0];window.addEventListener("resize",this.events.resize=this.resetResizeRequest.bind(this),!1),e.addEventListener("mousemove",this.events.mousemove=this.mouseMove.bind(this),!1),e.addEventListener("mousedown",this.events.mousedown=this.mouseDown.bind(this),!1),window.addEventListener("mouseup",this.events.mouseup=this.mouseUp.bind(this),!1),e.addEventListener("touchmove",this.events.touchmove=this.mouseMove.bind(this),!1),e.addEventListener("touchstart",this.events.touchstart=this.mouseDown.bind(this),!1),window.addEventListener("touchend",this.events.touchend=this.mouseUp.bind(this),!1)}},{key:"mouseMove",value:function(e){e.touches&&e.touches.length>1&&e.preventDefault(),!0===this.viewer.acceptAppMouseEvents&&this.viewer.mouseMove(e)}},{key:"mouseDown",value:function(e){this.userHasInteracted=!0,!0===this.viewer.acceptAppMouseEvents&&0===tS(e.srcElement).closest(".df-sidemenu").length&&this.viewer.mouseDown(e)}},{key:"mouseUp",value:function(e){this.viewer&&!0===this.viewer.acceptAppMouseEvents&&this.viewer.mouseUp(e)}},{key:"softDispose",value:function(){this.softDisposed=!0,this.provider.dispose(),this.viewer.dispose()}},{key:"softInit",value:function(){this.viewer=new this.viewerType(this.options,this),this.provider=new p.providers[this.options.providerType](this.options,this),this.softDisposed=!1}},{key:"dispose",value:function(){var e,t,i,n,o,s=this.container[0];clearInterval(this.autoPlayTimer),this.autoPlayTimer=null,this.autoPlayFunction=null,this.provider=tx.disposeObject(this.provider),this.contentProvider=null,this.target=null,this.viewer=tx.disposeObject(this.viewer),this.sideMenu=tx.disposeObject(this.sideMenu),this.ui=tx.disposeObject(this.ui),this.thumblist=tx.disposeObject(this.thumblist),this.outlineViewer=tx.disposeObject(this.outlineViewer),this.events&&(window.removeEventListener("resize",this.events.resize,!1),s.removeEventListener("mousemove",this.events.mousemove,!1),s.removeEventListener("mousedown",this.events.mousedown,!1),window.removeEventListener("mouseup",this.events.mouseup,!1),s.removeEventListener("touchmove",this.events.touchmove,!1),s.removeEventListener("touchstart",this.events.touchstart,!1),window.removeEventListener("touchend",this.events.touchend,!1)),this.events=null,this.options=null,this.element.removeClass("df-app"),this.viewerType=null,this.checkRequestQueue=null,null===(e=this.info)||void 0===e||e.remove(),this.info=null,null===(t=this.loadingIcon)||void 0===t||t.remove(),this.loadingIcon=null,null===(i=this.backGround)||void 0===i||i.remove(),this.backGround=null,null===(n=this.outlineContainer)||void 0===n||n.remove(),this.outlineContainer=null,null===(o=this.commentPopup)||void 0===o||o.remove(),this.commentPopup=null,this.viewerContainer.off(),this.viewerContainer.remove(),this.viewerContainer=null,this.container.off(),this.container.remove(),this.container=null,this.element.off(),this.element.data("df-app",null),this.element=null,this._offsetParent=null,this.dimensions=null}},{key:"resetResizeRequest",value:function(){this.resizeRequestStatus=tE.COUNT,this.resizeRequestCount=0,this.container.addClass("df-pendingresize"),this.pendingResize=!0}},{key:"initInfo",value:function(){this.info=tS("<div>",{class:"df-loading-info"}),this.container.append(this.info),this.info.html(this.options.text.loading+"..."),this.loadingIcon=tS("<div>",{class:"df-loading-icon"}).appendTo(this.container)}},{key:"updateInfo",value:function(e,t){tx.log(e),void 0!==this.info&&this.info.html(e)}},{key:"_documentLoaded",value:function(){tx.log("Document Loaded"),this.isDocumentReady=!0,this.contentProvider=this.provider,this.executeCallback("onDocumentLoad"),this.endPage=this.pageCount=this.provider.pageCount,this.currentPageNumber=this.getValidPage(this.currentPageNumber)}},{key:"_viewerPrepared",value:function(){tx.log("Viewer Prepared"),this.isViewerPrepared=!0,this.executeCallback("onViewerLoad")}},{key:"requestFinalize",value:function(){!0===this.isDocumentReady&&!0===this.isViewerPrepared&&!0===this.isExternalReady&&!0!==this.finalizeRequested&&(this.finalizeRequested=!0,this.finalize())}},{key:"finalizeComponents",value:function(){this.ui=new tf({},this),this.ui.init(),this.calculateLayout(),this.viewer.init()}},{key:"finalize",value:function(){this.resize(),this.ui.update(),this.initEvents(),!0==this.options.isLightBox&&this.analytics({eventAction:this.options.analyticsViewerOpen,options:this.options}),this.container.removeClass("df-loading df-init"),this.viewer.onReady(),this.analytics({eventAction:this.options.analyticsViewerReady,options:this.options}),this.executeCallback("onReady"),!0===this.options.dataElement.hasClass("df-hash-focused")&&(tx.focusHash(this.options.dataElement),this.options.dataElement.removeClass("df-hash-focused")),!0===this.hashNavigationEnabled&&this.getURLHash(),tx.log("App Finalized")}},{key:"initOutline",value:function(){var e=tS("<div>").addClass("df-outline-container df-sidemenu");e.append('<div class="df-sidemenu-title">'+this.options.text.outlineTitle+"</div>");var t=tS("<div>").addClass("df-wrapper");e.append(t),this.sideMenu.element.append(e),this.outlineContainer=e,this.outlineViewer=new tb({container:t[0],linkService:this.provider.linkService,outlineItemClass:"df-outline-item",outlineToggleClass:"df-outline-toggle",outlineToggleHiddenClass:"df-outlines-hidden"}),this.outlineViewer.render({outline:this.provider.outline})}},{key:"initThumbs",value:function(){var e=this;e.thumblist=new tw({app:e,addFn:function(e){},scrollFn:function(){e.thumbRequestStatus=tE.ON},itemHeight:e.thumbSize,itemWidth:tx.limitAt(Math.floor(e.dimensions.defaultPage.ratio*e.thumbSize),32,180),totalRows:e.pageCount}),e.thumblist.lastScrolled=Date.now(),e.thumbRequestStatus=tE.ON;var t=tS("<div>").addClass("df-thumb-container df-sidemenu");t.append('<div class="df-sidemenu-title">'+this.options.text.thumbTitle+"</div>"),t.append(tS(e.thumblist.container).addClass("df-wrapper")),e.thumbContainer=t,e.sideMenu.element.append(t),e.container.on("click",".df-thumb-container .df-thumb",function(t){t.stopPropagation();var i=tS(this).attr("id").replace("df-thumb","");e.gotoPage(parseInt(i,10))})}},{key:"initSearch",value:function(){var e=this,t=tS("<div>").addClass("df-search-container df-sidemenu");t.append('<div class="df-sidemenu-title">'+this.options.text.searchTitle+"</div>"),e.searchForm=tS('<div class="df-search-form">').appendTo(t),e.searchBox=tS('<input type="text" class="df-search-text" placeholder="'+this.options.text.searchPlaceHolder+'">').on("keyup",function(t){13===t.keyCode&&e.search()}).appendTo(e.searchForm),e.searchButton=tS('<div class="df-ui-btn df-search-btn df-icon-search">').on("click",function(t){e.search()}).appendTo(e.searchForm),e.clearButton=tS('<a class="df-search-clear">'+this.options.text.searchClear+"</a>").on("click",function(t){e.clearSearch()}).appendTo(e.searchForm),e.searchInfo=tS('<div class="df-search-info">').appendTo(t),e.searchResults=tS('<div class="df-wrapper df-search-results">').appendTo(t),e.searchContainer=t,e.sideMenu.element.append(t),e.container.on("click",".df-search-result",function(t){t.stopPropagation();var i=tS(this).data("df-page");e.gotoPage(parseInt(i,10))})}},{key:"search",value:function(e){void 0==e&&(e=this.searchBox.val()),this.provider.search(e.trim())}},{key:"clearSearch",value:function(){this.searchBox.val(""),this.searchInfo.html(""),this.provider.clearSearch()}},{key:"updateSearchInfo",value:function(e){tx.log(e),void 0!==this.searchInfo&&this.searchInfo.html(e)}},{key:"checkRequestQueue",value:function(){var e=this;if(e.checkRequestQueue&&requestAnimationFrame(function(){e&&e.checkRequestQueue&&e.checkRequestQueue()}),!e.softDisposed){if("ready"!=e.state){"loading"===e.state&&!0===this.isDocumentReady&&!0===this.isViewerPrepared&&!0===this.isExternalReady&&(e.state="finalizing",this.finalizeComponents()),"finalizing"===e.state&&(e.state="ready",e.finalize());return}e.container&&e.container[0]&&e._offsetParent!==e.container[0].offsetParent&&(e._offsetParent=e.container[0].offsetParent,null!==e._offsetParent&&(e.resize(),e.resizeRequestStatus=tE.OFF),tx.log("Visibility Resize Detected")),(null!==e._offsetParent||e.isFullscreen)&&(TWEEN.getAll().length>0&&(TWEEN.update(),e.renderRequestStatus=tE.ON),e.resizeRequestStatus===tE.ON?(e.resizeRequestStatus=tE.OFF,e.resize()):e.resizeRequestStatus===tE.COUNT&&(e.resizeRequestCount++,e.resizeRequestCount>10&&(e.resizeRequestCount=0,e.resizeRequestStatus=tE.ON)),e.refreshRequestStatus===tE.ON?(e.refreshRequestStatus=tE.OFF,e.pendingResize=!1,e.viewer.refresh(),e.container.removeClass("df-pendingresize")):e.refreshRequestStatus===tE.COUNT&&(e.refreshRequestCount++,e.refreshRequestCount>3&&(e.refreshRequestCount=0,e.refreshRequestStatus=tE.ON)),e.textureRequestStatus===tE.ON&&e.processTextureRequest(),e.thumbRequestStatus===tE.ON?e.processThumbRequest():e.thumbRequestStatus===tE.COUNT&&(e.thumbRequestCount++,e.thumbRequestCount>3&&(e.thumbRequestCount=0,e.thumbRequestStatus=tE.ON)),e.renderRequestStatus===tE.ON&&(e.viewer.render(),e.renderRequestStatus=tE.OFF),e.provider.checkRequestQueue(),e.viewer.checkRequestQueue())}}},{key:"processTextureRequest",value:function(){var e,t,i=this.viewer,n=this.provider,o=i.getVisiblePages().main,s=0,a=this.zoomValue>1;if(i.isAnimating()&&!0!==DEARFLIP.defaults.instantTextureProcess)this.textureRequestStatus=tE.ON;else{tx.log("Texture Request Working");for(var r=0;r<o.length;r++){s=0;var l=o[r];if(l>0&&l<=this.pageCount){if(e=a?i.zoomViewer.getPageByNumber(l):i.getPageByNumber(l)){t=i.getTextureSize({pageNumber:l});var h={pageNumber:l,textureTarget:a?p.TEXTURE_TARGET.ZOOM:p.TEXTURE_TARGET.VIEWER};e.changeTexture(l,Math.floor(t.height))&&(n.processPage(h),s++,this.viewer.getAnnotationElement(l,!0)),!0===this.options.progressiveZoom&&this.zoomValue>1.1*i.pureMaxZoom&&this.viewer.zoomViewer.startZoomUpdateRequest()}if(s>0)break}}0===s&&(this.textureRequestStatus=tE.OFF)}return s}},{key:"applyTexture",value:function(e,t){var i=void 0!==e.toDataURL;if(t.textureTarget===p.TEXTURE_TARGET.THUMB){if(t.height=e.height,t.width=e.width,i){var n=e.toDataURL("image/png");this.provider.setCache(t.pageNumber,n,this.thumbSize),t.texture=n}else t.texture=e.src;this.thumblist.setPage(t)}else t.texture=i?e:e.src,!0===this.viewer.setPage(t)&&(this.provider.processAnnotations(t.pageNumber,this.viewer.getAnnotationElement(t.pageNumber,!0)),this.provider.processTextContent(t.pageNumber,this.viewer.getTextElement(t.pageNumber,!0)))}},{key:"processThumbRequest",value:function(){null!==this.thumblist&&void 0!==this.thumblist&&this.thumblist.processThumbRequest()}},{key:"refreshRequestStart",value:function(){this.refreshRequestStatus=tE.COUNT,this.refreshRequestCount=0}},{key:"renderRequestStart",value:function(){this.renderRequestStatus=tE.ON}},{key:"resizeRequestStart",value:function(){this.resizeRequestStatus=tE.ON}},{key:"zoom",value:function(e){this.pendingZoom=!0,this.zoomDelta=e,this.resize()}},{key:"resetZoom",value:function(){1!==this.zoomValue&&(this.zoomValue=1.001,this.zoom(-1))}},{key:"calculateLayout",value:function(){var e,t,i=this.isSideMenuOpen=this.container.hasClass("df-sidemenu-open"),n=this.dimensions,o=this.dimensions.padding,s=tS(window).height();n.offset={top:0,left:this.options.sideMenuOverlay||!i||this.isRTL?0:220,right:!this.options.sideMenuOverlay&&i&&this.isRTL?220:0,bottom:0,width:!this.options.sideMenuOverlay&&i?220:0},this.viewerContainer.css({left:n.offset.left,right:n.offset.right});var a=n.controlsHeight=this.container.find(".df-ui").height();if(o.top=this.options.paddingTop+(this.options.controlsPosition===p.CONTROLS_POSITION.TOP?a:0),o.left=this.options.paddingLeft,o.right=this.options.paddingRight,o.bottom=this.options.paddingBottom+(this.options.controlsPosition===p.CONTROLS_POSITION.BOTTOM?a:0),o.height=o.top+o.bottom,o.width=o.left+o.right,o.heightDiff=o.top-o.bottom,o.widthDiff=o.left-o.right,n.isFullSize=!0===this.isFullscreen,n.isFixedHeight=n.isFullSize||!n.isAutoHeight,n.containerWidth=n.isFullSize?tS(window).width():this.element.width(),this.container.toggleClass("df-xs",n.containerWidth<400).toggleClass("df-xss",n.containerWidth<320),n.maxHeight=s-(n.containerWidth>600&&null!==(t=tS(null!==(e=this.options.headerElementSelector)&&void 0!==e?e:"#wpadminbar").height())&&void 0!==t?t:0),n.isFixedHeight){if(n.isFullSize)n.maxHeight=s;else{this.element.height(this.options.height);var r=this.element.height();n.maxHeight=Math.min(r,n.maxHeight)}}n.width,n.stage.innerWidth=this.viewer._getInnerWidth();var l=n.stage.innerHeight=this.viewer._getInnerHeight(),h=this.viewer._getOuterHeight(l+n.padding.height);n.containerHeight=n.isFullSize?s:h,this.element.height(n.containerHeight);var u=this.element.height();n.isFullSize||u==n.containerHeight||(n.containerHeight=u,n.stage.innerHeight=u-n.padding.height,n.stage.height=u),n.origin={x:(o.widthDiff+n.containerWidth-n.offset.left-n.offset.right)/2,y:(o.heightDiff+n.containerHeight)/2},this.viewer.determinePageMode()}},{key:"resize",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];tx.log("Resize Request Initiated"),this.calculateLayout(),this.viewer.handleZoom(),this.viewer.resize(),!1!==e&&(this.pendingZoom?(this.viewer.refresh(),tx.log("Pending Zoom updated")):this.refreshRequestStart(),this.ui.update(),this.renderRequestStatus=tE.ON,this.zoomChanged=!1,this.pendingZoom=!1,this.executeCallback("afterResize"))}},{key:"hasOutline",value:function(){if(this.provider.outline.length>0)return!0}},{key:"switchFullscreen",value:function(){var e,t,i=this,n=i.container[0];if(i.container.toggleClass("df-fullscreen",!0!==i.isFullscreen),(null==i?void 0:null===(t=i.ui)||void 0===t?void 0:null===(e=t.controls)||void 0===e?void 0:e.fullscreen)&&i.ui.controls.fullScreen.toggleClass(i.options.icons["fullscreen-off"],!0!==i.isFullscreen),!0!==i.isFullscreen){var o=null;n.requestFullscreen?o=n.requestFullscreen():n.msRequestFullscreen?o=n.msRequestFullscreen():n.mozRequestFullScreen?o=n.mozRequestFullScreen():n.webkitRequestFullscreen&&(o=n.webkitRequestFullscreen()),o&&o.then&&o.then(function(){i.refreshRequestStatus,tE.ON,i.resize()}),i.isFullscreen=!0}else i.isFullscreen=!1,document.exitFullscreen?document.fullscreenElement&&document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen(),tx.hasFullscreenEnabled()||i.container[0].scrollIntoView();tx.hasFullscreenEnabled()||(i.resizeRequestStatus=tE.ON)}},{key:"next",value:function(){this.jumpBy(this.jumpStep)}},{key:"prev",value:function(){this.jumpBy(-this.jumpStep)}},{key:"jumpBy",value:function(e){var t=this.currentPageNumber+e;t=tx.limitAt(t,this.startPage,this.endPage),!0!=this.anyFirstPageChanged&&(this.analytics({eventAction:this.options.analyticsFirstPageChange,options:this.options}),this.anyFirstPageChanged=!0),this.gotoPage(t),this.ui.update()}},{key:"openRight",value:function(){this.isRTL?this.prev():this.next()}},{key:"openLeft",value:function(){this.isRTL?this.next():this.prev()}},{key:"start",value:function(){this.gotoPage(this.startPage)}},{key:"end",value:function(){this.gotoPage(this.endPage)}},{key:"gotoPage",value:function(e){e=this.getValidPage(parseInt(e,10)),null!==this.viewer&&!1!==this.viewer.validatePageChange(e)&&(this.executeCallback("beforePageChanged"),this.requestDestRefKey=void 0,this.container.removeClass("df-fetch-pdf"),this.oldPageNumber=this.currentPageNumber,this.currentPageNumber=e,this.thumbRequestStatus=tE.ON,this.viewer.gotoPageCallBack&&this.viewer.gotoPageCallBack(),this.ui.update(),!0==this.autoPlay&&this.setAutoPlay(this.autoPlay),!0===this.hashNavigationEnabled&&this.getURLHash(),this.executeCallback("onPageChanged"))}},{key:"gotoPageLabel",value:function(e){this.gotoPage(this.provider.getPageNumberForLabel(e.toString().trim()))}},{key:"getCurrentLabel",value:function(){return this.provider.getLabelforPage(this.currentPageNumber)}},{key:"autoPlayFunction",value:function(){this&&this.autoPlay&&(tx.limitAt(this.currentPageNumber+this.jumpStep,this.startPage,this.endPage)!==this.currentPageNumber?this.next():this.setAutoPlay(!1))}},{key:"setAutoPlay",value:function(e){if(this.options.autoPlay){var t=(e=!0==e)?this.options.text.pause:this.options.text.play;this.ui.controls.play.toggleClass(this.options.icons.pause,e),this.ui.controls.play.html("<span>"+t+"</span>"),this.ui.controls.play.attr("title",t),clearInterval(this.autoPlayTimer),e&&(this.autoPlayTimer=setInterval(this.autoPlayFunction.bind(this),this.options.autoPlayDuration)),this.autoPlay=e}}},{key:"isValidPage",value:function(e){return this.provider._isValidPage(e)}},{key:"getValidPage",value:function(e){return isNaN(e)?e=this.currentPageNumber:e<1?e=1:e>this.pageCount&&(e=this.pageCount),e}},{key:"getURLHash",value:function(){if(null!=this.options.id){var e=tx.getSharePrefix(this.options.sharePrefix)+(null!=this.options.slug?this.options.slug:this.options.id)+"/";null!=this.currentPageNumber&&(e+=this.currentPageNumber+"/"),history.replaceState(void 0,void 0,"#"+e)}return window.location.href}},{key:"executeCallback",value:function(e){}},{key:"analytics",value:function(e){}}],function(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}();p.prepareOptions=function(e){e.element instanceof tS||(e.element=tS(e.element));var t=e.element;null==e.dataElement&&(e.dataElement=t);var i=e.dataElement,n=p.utils.getOptions(i),o=tS.extend(!0,{},p.defaults,e,n);o=tx.fallbackOptions(o),tx.log(o);var s=tS.extend(!0,{},p._defaults,o);return tx.isMobile&&"function"==typeof p.viewers[s.mobileViewerType]&&(s.viewerType=s.mobileViewerType),"function"!=typeof p.viewers[s.viewerType]?(console.warn("Invalid Viewer Type! "+s.viewerType+" | Using default Viewer!"),s.viewerType=p.viewers.default):s.viewerType=p.viewers[s.viewerType],s=tx.finalizeOptions(tx.sanitizeOptions(s))},p.Application=function(e){var t=p.prepareOptions(e),i=new tC(t);return e.element.data("df-app",i),null!=t.id&&!0!==t.isLightBox&&(window[t.id.toString()]=i),i},void 0!==window.jQuery&&!1==p.fakejQuery&&tS.fn.extend({dearviewer_options:function(e){return null==e&&(e={}),e.element=tS(this),new p.prepareOptions(e)},dearviewer:function(e){return null==e&&(e={}),e.element=tS(this),new p.Application(e)}});var tT=p.jQuery,tk=window.DFLIP=window.DEARFLIP=p;tk.defaults.viewerType="flipbook",tk.slug="dflip",tk.locationVar="dFlipLocation",tk.locationFile="dflip",tk.PAGE_MODE={SINGLE:1,DOUBLE:2,AUTO:null},tk.SINGLE_PAGE_MODE={ZOOM:1,BOOKLET:2,AUTO:null},tk.CONTROLSPOSITION={HIDDEN:"hide",TOP:"top",BOTTOM:"bottom"},tk.DIRECTION={LTR:1,RTL:2},tk.PAGE_SIZE={AUTO:0,SINGLE:1,DOUBLEINTERNAL:2},tk.parseFallBack=function(){tT(".df-posts").addClass("dflip-books"),tT(".dflip-books").addClass("df-posts"),tT("._df_button, ._df_thumb, ._df_book").each(function(){var e=tT(this);"true"!==e.data("df-parsed")&&(e.addClass("df-element"),e.hasClass("_df_book")||(e.hasClass("_df_thumb")?(e.attr("data-df-lightbox","thumb"),void 0!==e.attr("thumb")&&e.data("df-thumb",e.attr("thumb"))):e.attr("data-df-lightbox","button")))})},tk.parseBooks=function(){tk.parseFallBack(),tk.parseElements()};var tO=function(e){return null!=e.source&&(Array===e.source.constructor||Array.isArray(e.source)||e.source instanceof Array)&&(e.providerType="image"),null!=e.cover3DType&&(!0==e.cover3DType||"true"==e.cover3DType?e.cover3DType=tk.FLIPBOOK_COVER_TYPE.BASIC:(!1==e.cover3DType||"false"==e.cover3DType)&&(e.cover3DType=tk.FLIPBOOK_COVER_TYPE.NONE)),void 0!==e.pageSize&&("1"===e.pageSize||1===e.pageSize||e.pageSize===tk.FLIPBOOK_PAGE_SIZE.SINGLE?e.pageSize=tk.FLIPBOOK_PAGE_SIZE.SINGLE:"2"===e.pageSize||2===e.pageSize||e.pageSize===tk.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL?e.pageSize=tk.FLIPBOOK_PAGE_SIZE.DOUBLE_INTERNAL:e.pageSize===tk.FLIPBOOK_PAGE_SIZE.DOUBLE_COVER_BACK||(e.pageSize=tk.FLIPBOOK_PAGE_SIZE.AUTO)),void 0!==e.pageMode&&("1"===e.pageMode||1===e.pageMode||e.pageMode===tk.FLIPBOOK_PAGE_MODE.SINGLE?e.pageMode=tk.FLIPBOOK_PAGE_MODE.SINGLE:"2"===e.pageMode||2===e.pageMode||e.pageMode===tk.FLIPBOOK_PAGE_MODE.DOUBLE?e.pageMode=tk.FLIPBOOK_PAGE_MODE.DOUBLE:e.pageMode=tk.FLIPBOOK_PAGE_MODE.AUTO),void 0!==e.singlePageMode&&("1"===e.singlePageMode||1===e.singlePageMode||e.singlePageMode===tk.FLIPBOOK_SINGLE_PAGE_MODE.ZOOM?e.singlePageMode=tk.FLIPBOOK_SINGLE_PAGE_MODE.ZOOM:"2"===e.singlePageMode||2===e.singlePageMode||e.singlePageMode===tk.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET?e.singlePageMode=tk.FLIPBOOK_SINGLE_PAGE_MODE.BOOKLET:e.singlePageMode=tk.FLIPBOOK_SINGLE_PAGE_MODE.AUTO),void 0!==e.controlsPosition&&"hide"===e.controlsPosition&&(e.controlsPosition=tk.CONTROLS_POSITION.HIDDEN),void 0!==e.overwritePDFOutline&&(e.overwritePDFOutline=m.isTrue(e.overwritePDFOutline)),void 0!==e.webgl&&(e.is3D=e.webgl=e.webgl,delete e.webgl),void 0!==e.webglShadow&&(e.has3DShadow=m.isTrue(e.webglShadow),delete e.webglShadow),void 0!==e.scrollWheel&&(m.isTrue(e.scrollWheel)&&(e.mouseScrollAction=tk.MOUSE_SCROLL_ACTIONS.ZOOM),delete e.scrollWheel),void 0!==e.stiffness&&delete e.stiffness,void 0!==e.soundEnable&&(e.enableSound=m.isTrue(e.soundEnable),delete e.soundEnable),void 0!==e.enableDownload&&(e.showDownloadControl=m.isTrue(e.enableDownload),delete e.enableDownload),void 0!==e.autoEnableOutline&&(e.autoOpenOutline=m.isTrue(e.autoEnableOutline),delete e.autoEnableOutline),void 0!==e.autoEnableThumbnail&&(e.autoOpenThumbnail=m.isTrue(e.autoEnableThumbnail),delete e.autoEnableThumbnail),void 0!==e.direction&&("2"===e.direction||2===e.direction||e.direction===tk.READ_DIRECTION.RTL?e.readDirection=tk.READ_DIRECTION.RTL:e.readDirection=tk.READ_DIRECTION.LTR,delete e.direction),void 0!==e.hard&&(e.flipbookHardPages=e.hard,"hard"===e.flipbookHardPages&&(e.flipbookHardPages="all"),delete e.hard),void 0!==e.forceFit&&delete e.forceFit,m.sanitizeOptions(e)};tT.fn.extend({flipBook:function(e,t){return null==t&&(t={}),t.source=e,t.element=tT(this),new p.Application(t)}}),tT(document).ready(function(){var e=tT("body");tk.executeCallback("beforeDearFlipInit"),void 0!==window.dFlipWPGlobal&&tT.extend(!0,tk.defaults,tO(window.dFlipWPGlobal)),tk.initUtils(),tk.initControls(),e.on("click",".df-element[data-df-lightbox],.df-element[data-lightbox]",function(e){var t=tT(this);e.preventDefault(),e.stopPropagation(),tk.openLightBox(t)}),tk.checkBrowserURLforDefaults(),tk.parseCSSElements(),tk.parseFallBack(),m.detectHash(),tk.parseNormalElements(),tk.executeCallback("afterDearFlipInit")}),m.finalizeOptions=function(e){return tO(e)},tk.executeCallback("onDearFlipLoad")}()}();
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).SimpleBar=e()}(this,(function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r,i,n,o="object",s=function(t){return t&&t.Math==Math&&t},a=s(typeof globalThis==o&&globalThis)||s(typeof window==o&&window)||s(typeof self==o&&self)||s(typeof t==o&&t)||Function("return this")(),c=function(t){try{return!!t()}catch(t){return!0}},l=!c((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),u={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,h={f:f&&!u.call({1:2},1)?function(t){var e=f(this,t);return!!e&&e.enumerable}:u},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p={}.toString,v=function(t){return p.call(t).slice(8,-1)},g="".split,b=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==v(t)?g.call(t,""):Object(t)}:Object,y=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},m=function(t){return b(y(t))},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},E=function(t,e){if(!x(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!x(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!x(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!x(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,S=function(t,e){return w.call(t,e)},O=a.document,k=x(O)&&x(O.createElement),A=function(t){return k?O.createElement(t):{}},T=!l&&!c((function(){return 7!=Object.defineProperty(A("div"),"a",{get:function(){return 7}}).a})),L=Object.getOwnPropertyDescriptor,z={f:l?L:function(t,e){if(t=m(t),e=E(e,!0),T)try{return L(t,e)}catch(t){}if(S(t,e))return d(!h.f.call(t,e),t[e])}},R=function(t){if(!x(t))throw TypeError(String(t)+" is not an object");return t},_=Object.defineProperty,M={f:l?_:function(t,e,r){if(R(t),e=E(e,!0),R(r),T)try{return _(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},C=l?function(t,e,r){return M.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},j=function(t,e){try{C(a,t,e)}catch(r){a[t]=e}return e},W=e((function(t){var e=a["__core-js_shared__"]||j("__core-js_shared__",{});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.2.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),N=W("native-function-to-string",Function.toString),I=a.WeakMap,B="function"==typeof I&&/native code/.test(N.call(I)),D=0,P=Math.random(),F=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++D+P).toString(36)},V=W("keys"),X=function(t){return V[t]||(V[t]=F(t))},H={},q=a.WeakMap;if(B){var $=new q,Y=$.get,G=$.has,U=$.set;r=function(t,e){return U.call($,t,e),e},i=function(t){return Y.call($,t)||{}},n=function(t){return G.call($,t)}}else{var Q=X("state");H[Q]=!0,r=function(t,e){return C(t,Q,e),e},i=function(t){return S(t,Q)?t[Q]:{}},n=function(t){return S(t,Q)}}var K={set:r,get:i,has:n,enforce:function(t){return n(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var r;if(!x(e)||(r=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},J=e((function(t){var e=K.get,r=K.enforce,i=String(N).split("toString");W("inspectSource",(function(t){return N.call(t)})),(t.exports=function(t,e,n,o){var s=!!o&&!!o.unsafe,c=!!o&&!!o.enumerable,l=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof e||S(n,"name")||C(n,"name",e),r(n).source=i.join("string"==typeof e?e:"")),t!==a?(s?!l&&t[e]&&(c=!0):delete t[e],c?t[e]=n:C(t,e,n)):c?t[e]=n:j(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||N.call(this)}))})),Z=a,tt=function(t){return"function"==typeof t?t:void 0},et=function(t,e){return arguments.length<2?tt(Z[t])||tt(a[t]):Z[t]&&Z[t][e]||a[t]&&a[t][e]},rt=Math.ceil,it=Math.floor,nt=function(t){return isNaN(t=+t)?0:(t>0?it:rt)(t)},ot=Math.min,st=function(t){return t>0?ot(nt(t),9007199254740991):0},at=Math.max,ct=Math.min,lt=function(t){return function(e,r,i){var n,o=m(e),s=st(o.length),a=function(t,e){var r=nt(t);return r<0?at(r+e,0):ct(r,e)}(i,s);if(t&&r!=r){for(;s>a;)if((n=o[a++])!=n)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===r)return t||a||0;return!t&&-1}},ut={includes:lt(!0),indexOf:lt(!1)}.indexOf,ft=function(t,e){var r,i=m(t),n=0,o=[];for(r in i)!S(H,r)&&S(i,r)&&o.push(r);for(;e.length>n;)S(i,r=e[n++])&&(~ut(o,r)||o.push(r));return o},ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],dt=ht.concat("length","prototype"),pt={f:Object.getOwnPropertyNames||function(t){return ft(t,dt)}},vt={f:Object.getOwnPropertySymbols},gt=et("Reflect","ownKeys")||function(t){var e=pt.f(R(t)),r=vt.f;return r?e.concat(r(t)):e},bt=function(t,e){for(var r=gt(e),i=M.f,n=z.f,o=0;o<r.length;o++){var s=r[o];S(t,s)||i(t,s,n(e,s))}},yt=/#|\.prototype\./,mt=function(t,e){var r=Et[xt(t)];return r==St||r!=wt&&("function"==typeof e?c(e):!!e)},xt=mt.normalize=function(t){return String(t).replace(yt,".").toLowerCase()},Et=mt.data={},wt=mt.NATIVE="N",St=mt.POLYFILL="P",Ot=mt,kt=z.f,At=function(t,e){var r,i,n,o,s,c=t.target,l=t.global,u=t.stat;if(r=l?a:u?a[c]||j(c,{}):(a[c]||{}).prototype)for(i in e){if(o=e[i],n=t.noTargetGet?(s=kt(r,i))&&s.value:r[i],!Ot(l?i:c+(u?".":"#")+i,t.forced)&&void 0!==n){if(typeof o==typeof n)continue;bt(o,n)}(t.sham||n&&n.sham)&&C(o,"sham",!0),J(r,i,o,t)}},Tt=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Lt=function(t,e,r){if(Tt(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,i){return t.call(e,r,i)};case 3:return function(r,i,n){return t.call(e,r,i,n)}}return function(){return t.apply(e,arguments)}},zt=function(t){return Object(y(t))},Rt=Array.isArray||function(t){return"Array"==v(t)},_t=!!Object.getOwnPropertySymbols&&!c((function(){return!String(Symbol())})),Mt=a.Symbol,Ct=W("wks"),jt=function(t){return Ct[t]||(Ct[t]=_t&&Mt[t]||(_t?Mt:F)("Symbol."+t))},Wt=jt("species"),Nt=function(t,e){var r;return Rt(t)&&("function"!=typeof(r=t.constructor)||r!==Array&&!Rt(r.prototype)?x(r)&&null===(r=r[Wt])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===e?0:e)},It=[].push,Bt=function(t){var e=1==t,r=2==t,i=3==t,n=4==t,o=6==t,s=5==t||o;return function(a,c,l,u){for(var f,h,d=zt(a),p=b(d),v=Lt(c,l,3),g=st(p.length),y=0,m=u||Nt,x=e?m(a,g):r?m(a,0):void 0;g>y;y++)if((s||y in p)&&(h=v(f=p[y],y,d),t))if(e)x[y]=h;else if(h)switch(t){case 3:return!0;case 5:return f;case 6:return y;case 2:It.call(x,f)}else if(n)return!1;return o?-1:i||n?n:x}},Dt={forEach:Bt(0),map:Bt(1),filter:Bt(2),some:Bt(3),every:Bt(4),find:Bt(5),findIndex:Bt(6)},Pt=function(t,e){var r=[][t];return!r||!c((function(){r.call(null,e||function(){throw 1},1)}))},Ft=Dt.forEach,Vt=Pt("forEach")?function(t){return Ft(this,t,arguments.length>1?arguments[1]:void 0)}:[].forEach;At({target:"Array",proto:!0,forced:[].forEach!=Vt},{forEach:Vt});var Xt={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var Ht in Xt){var qt=a[Ht],$t=qt&&qt.prototype;if($t&&$t.forEach!==Vt)try{C($t,"forEach",Vt)}catch(t){$t.forEach=Vt}}var Yt=!("undefined"==typeof window||!window.document||!window.document.createElement),Gt=jt("species"),Ut=Dt.filter;At({target:"Array",proto:!0,forced:!function(t){return!c((function(){var e=[];return(e.constructor={})[Gt]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("filter")},{filter:function(t){return Ut(this,t,arguments.length>1?arguments[1]:void 0)}});var Qt=Object.keys||function(t){return ft(t,ht)},Kt=l?Object.defineProperties:function(t,e){R(t);for(var r,i=Qt(e),n=i.length,o=0;n>o;)M.f(t,r=i[o++],e[r]);return t},Jt=et("document","documentElement"),Zt=X("IE_PROTO"),te=function(){},ee=function(){var t,e=A("iframe"),r=ht.length;for(e.style.display="none",Jt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),ee=t.F;r--;)delete ee.prototype[ht[r]];return ee()},re=Object.create||function(t,e){var r;return null!==t?(te.prototype=R(t),r=new te,te.prototype=null,r[Zt]=t):r=ee(),void 0===e?r:Kt(r,e)};H[Zt]=!0;var ie=jt("unscopables"),ne=Array.prototype;null==ne[ie]&&C(ne,ie,re(null));var oe,se,ae,ce=function(t){ne[ie][t]=!0},le={},ue=!c((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),fe=X("IE_PROTO"),he=Object.prototype,de=ue?Object.getPrototypeOf:function(t){return t=zt(t),S(t,fe)?t[fe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?he:null},pe=jt("iterator"),ve=!1;[].keys&&("next"in(ae=[].keys())?(se=de(de(ae)))!==Object.prototype&&(oe=se):ve=!0),null==oe&&(oe={}),S(oe,pe)||C(oe,pe,(function(){return this}));var ge={IteratorPrototype:oe,BUGGY_SAFARI_ITERATORS:ve},be=M.f,ye=jt("toStringTag"),me=function(t,e,r){t&&!S(t=r?t:t.prototype,ye)&&be(t,ye,{configurable:!0,value:e})},xe=ge.IteratorPrototype,Ee=function(){return this},we=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,i){return R(r),function(t){if(!x(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(i),e?t.call(r,i):r.__proto__=i,r}}():void 0),Se=ge.IteratorPrototype,Oe=ge.BUGGY_SAFARI_ITERATORS,ke=jt("iterator"),Ae=function(){return this},Te=function(t,e,r,i,n,o,s){!function(t,e,r){var i=e+" Iterator";t.prototype=re(xe,{next:d(1,r)}),me(t,i,!1),le[i]=Ee}(r,e,i);var a,c,l,u=function(t){if(t===n&&g)return g;if(!Oe&&t in p)return p[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",h=!1,p=t.prototype,v=p[ke]||p["@@iterator"]||n&&p[n],g=!Oe&&v||u(n),b="Array"==e&&p.entries||v;if(b&&(a=de(b.call(new t)),Se!==Object.prototype&&a.next&&(de(a)!==Se&&(we?we(a,Se):"function"!=typeof a[ke]&&C(a,ke,Ae)),me(a,f,!0))),"values"==n&&v&&"values"!==v.name&&(h=!0,g=function(){return v.call(this)}),p[ke]!==g&&C(p,ke,g),le[e]=g,n)if(c={values:u("values"),keys:o?g:u("keys"),entries:u("entries")},s)for(l in c)!Oe&&!h&&l in p||J(p,l,c[l]);else At({target:e,proto:!0,forced:Oe||h},c);return c},Le=K.set,ze=K.getterFor("Array Iterator"),Re=Te(Array,"Array",(function(t,e){Le(this,{type:"Array Iterator",target:m(t),index:0,kind:e})}),(function(){var t=ze(this),e=t.target,r=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:i,done:!1}:"values"==r?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values");le.Arguments=le.Array,ce("keys"),ce("values"),ce("entries");var _e=Object.assign,Me=!_e||c((function(){var t={},e={},r=Symbol();return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=_e({},t)[r]||"abcdefghijklmnopqrst"!=Qt(_e({},e)).join("")}))?function(t,e){for(var r=zt(t),i=arguments.length,n=1,o=vt.f,s=h.f;i>n;)for(var a,c=b(arguments[n++]),u=o?Qt(c).concat(o(c)):Qt(c),f=u.length,d=0;f>d;)a=u[d++],l&&!s.call(c,a)||(r[a]=c[a]);return r}:_e;At({target:"Object",stat:!0,forced:Object.assign!==Me},{assign:Me});var Ce=jt("toStringTag"),je="Arguments"==v(function(){return arguments}()),We=function(t){var e,r,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ce))?r:je?v(e):"Object"==(i=v(e))&&"function"==typeof e.callee?"Arguments":i},Ne={};Ne[jt("toStringTag")]="z";var Ie="[object z]"!==String(Ne)?function(){return"[object "+We(this)+"]"}:Ne.toString,Be=Object.prototype;Ie!==Be.toString&&J(Be,"toString",Ie,{unsafe:!0});var De="\t\n\v\f\r                　\u2028\u2029\ufeff",Pe="["+De+"]",Fe=RegExp("^"+Pe+Pe+"*"),Ve=RegExp(Pe+Pe+"*$"),Xe=function(t){return function(e){var r=String(y(e));return 1&t&&(r=r.replace(Fe,"")),2&t&&(r=r.replace(Ve,"")),r}},He={start:Xe(1),end:Xe(2),trim:Xe(3)}.trim,qe=a.parseInt,$e=/^[+-]?0[Xx]/,Ye=8!==qe(De+"08")||22!==qe(De+"0x16")?function(t,e){var r=He(String(t));return qe(r,e>>>0||($e.test(r)?16:10))}:qe;At({global:!0,forced:parseInt!=Ye},{parseInt:Ye});var Ge=function(t){return function(e,r){var i,n,o=String(y(e)),s=nt(r),a=o.length;return s<0||s>=a?t?"":void 0:(i=o.charCodeAt(s))<55296||i>56319||s+1===a||(n=o.charCodeAt(s+1))<56320||n>57343?t?o.charAt(s):i:t?o.slice(s,s+2):n-56320+(i-55296<<10)+65536}},Ue={codeAt:Ge(!1),charAt:Ge(!0)},Qe=Ue.charAt,Ke=K.set,Je=K.getterFor("String Iterator");Te(String,"String",(function(t){Ke(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=Je(this),r=e.string,i=e.index;return i>=r.length?{value:void 0,done:!0}:(t=Qe(r,i),e.index+=t.length,{value:t,done:!1})}));var Ze=function(t,e,r){for(var i in e)J(t,i,e[i],r);return t},tr=!c((function(){return Object.isExtensible(Object.preventExtensions({}))})),er=e((function(t){var e=M.f,r=F("meta"),i=0,n=Object.isExtensible||function(){return!0},o=function(t){e(t,r,{value:{objectID:"O"+ ++i,weakData:{}}})},s=t.exports={REQUIRED:!1,fastKey:function(t,e){if(!x(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!S(t,r)){if(!n(t))return"F";if(!e)return"E";o(t)}return t[r].objectID},getWeakData:function(t,e){if(!S(t,r)){if(!n(t))return!0;if(!e)return!1;o(t)}return t[r].weakData},onFreeze:function(t){return tr&&s.REQUIRED&&n(t)&&!S(t,r)&&o(t),t}};H[r]=!0})),rr=(er.REQUIRED,er.fastKey,er.getWeakData,er.onFreeze,jt("iterator")),ir=Array.prototype,nr=jt("iterator"),or=function(t,e,r,i){try{return i?e(R(r)[0],r[1]):e(r)}catch(e){var n=t.return;throw void 0!==n&&R(n.call(t)),e}},sr=e((function(t){var e=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,r,i,n,o){var s,a,c,l,u,f,h,d=Lt(r,i,n?2:1);if(o)s=t;else{if("function"!=typeof(a=function(t){if(null!=t)return t[nr]||t["@@iterator"]||le[We(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(h=a)&&(le.Array===h||ir[rr]===h)){for(c=0,l=st(t.length);l>c;c++)if((u=n?d(R(f=t[c])[0],f[1]):d(t[c]))&&u instanceof e)return u;return new e(!1)}s=a.call(t)}for(;!(f=s.next()).done;)if((u=or(s,d,f.value,n))&&u instanceof e)return u;return new e(!1)}).stop=function(t){return new e(!0,t)}})),ar=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},cr=jt("iterator"),lr=!1;try{var ur=0,fr={next:function(){return{done:!!ur++}},return:function(){lr=!0}};fr[cr]=function(){return this},Array.from(fr,(function(){throw 2}))}catch(t){}var hr=function(t,e,r,i,n){var o=a[t],s=o&&o.prototype,l=o,u=i?"set":"add",f={},h=function(t){var e=s[t];J(s,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(n&&!x(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return n&&!x(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(n&&!x(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(Ot(t,"function"!=typeof o||!(n||s.forEach&&!c((function(){(new o).entries().next()})))))l=r.getConstructor(e,t,i,u),er.REQUIRED=!0;else if(Ot(t,!0)){var d=new l,p=d[u](n?{}:-0,1)!=d,v=c((function(){d.has(1)})),g=function(t,e){if(!e&&!lr)return!1;var r=!1;try{var i={};i[cr]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}((function(t){new o(t)})),b=!n&&c((function(){for(var t=new o,e=5;e--;)t[u](e,e);return!t.has(-0)}));g||((l=e((function(e,r){ar(e,l,t);var n=function(t,e,r){var i,n;return we&&"function"==typeof(i=e.constructor)&&i!==r&&x(n=i.prototype)&&n!==r.prototype&&we(t,n),t}(new o,e,l);return null!=r&&sr(r,n[u],n,i),n}))).prototype=s,s.constructor=l),(v||b)&&(h("delete"),h("has"),i&&h("get")),(b||p)&&h(u),n&&s.clear&&delete s.clear}return f[t]=l,At({global:!0,forced:l!=o},f),me(l,t),n||r.setStrong(l,t,i),l},dr=er.getWeakData,pr=K.set,vr=K.getterFor,gr=Dt.find,br=Dt.findIndex,yr=0,mr=function(t){return t.frozen||(t.frozen=new xr)},xr=function(){this.entries=[]},Er=function(t,e){return gr(t.entries,(function(t){return t[0]===e}))};xr.prototype={get:function(t){var e=Er(this,t);if(e)return e[1]},has:function(t){return!!Er(this,t)},set:function(t,e){var r=Er(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=br(this.entries,(function(e){return e[0]===t}));return~e&&this.entries.splice(e,1),!!~e}};var wr={getConstructor:function(t,e,r,i){var n=t((function(t,o){ar(t,n,e),pr(t,{type:e,id:yr++,frozen:void 0}),null!=o&&sr(o,t[i],t,r)})),o=vr(e),s=function(t,e,r){var i=o(t),n=dr(R(e),!0);return!0===n?mr(i).set(e,r):n[i.id]=r,t};return Ze(n.prototype,{delete:function(t){var e=o(this);if(!x(t))return!1;var r=dr(t);return!0===r?mr(e).delete(t):r&&S(r,e.id)&&delete r[e.id]},has:function(t){var e=o(this);if(!x(t))return!1;var r=dr(t);return!0===r?mr(e).has(t):r&&S(r,e.id)}}),Ze(n.prototype,r?{get:function(t){var e=o(this);if(x(t)){var r=dr(t);return!0===r?mr(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return s(this,t,e)}}:{add:function(t){return s(this,t,!0)}}),n}},Sr=(e((function(t){var e,r=K.enforce,i=!a.ActiveXObject&&"ActiveXObject"in a,n=Object.isExtensible,o=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},s=t.exports=hr("WeakMap",o,wr,!0,!0);if(B&&i){e=wr.getConstructor(o,"WeakMap",!0),er.REQUIRED=!0;var c=s.prototype,l=c.delete,u=c.has,f=c.get,h=c.set;Ze(c,{delete:function(t){if(x(t)&&!n(t)){var i=r(this);return i.frozen||(i.frozen=new e),l.call(this,t)||i.frozen.delete(t)}return l.call(this,t)},has:function(t){if(x(t)&&!n(t)){var i=r(this);return i.frozen||(i.frozen=new e),u.call(this,t)||i.frozen.has(t)}return u.call(this,t)},get:function(t){if(x(t)&&!n(t)){var i=r(this);return i.frozen||(i.frozen=new e),u.call(this,t)?f.call(this,t):i.frozen.get(t)}return f.call(this,t)},set:function(t,i){if(x(t)&&!n(t)){var o=r(this);o.frozen||(o.frozen=new e),u.call(this,t)?h.call(this,t,i):o.frozen.set(t,i)}else h.call(this,t,i);return this}})}})),jt("iterator")),Or=jt("toStringTag"),kr=Re.values;for(var Ar in Xt){var Tr=a[Ar],Lr=Tr&&Tr.prototype;if(Lr){if(Lr[Sr]!==kr)try{C(Lr,Sr,kr)}catch(t){Lr[Sr]=kr}if(Lr[Or]||C(Lr,Or,Ar),Xt[Ar])for(var zr in Re)if(Lr[zr]!==Re[zr])try{C(Lr,zr,Re[zr])}catch(t){Lr[zr]=Re[zr]}}}var Rr="Expected a function",_r=NaN,Mr="[object Symbol]",Cr=/^\s+|\s+$/g,jr=/^[-+]0x[0-9a-f]+$/i,Wr=/^0b[01]+$/i,Nr=/^0o[0-7]+$/i,Ir=parseInt,Br="object"==typeof t&&t&&t.Object===Object&&t,Dr="object"==typeof self&&self&&self.Object===Object&&self,Pr=Br||Dr||Function("return this")(),Fr=Object.prototype.toString,Vr=Math.max,Xr=Math.min,Hr=function(){return Pr.Date.now()};function qr(t,e,r){var i,n,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Rr);function d(e){var r=i,o=n;return i=n=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=Hr();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?Xr(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&i?d(t):(i=n=void 0,s)}function b(){var t=Hr(),r=p(t);if(i=arguments,n=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=Yr(e)||0,$r(r)&&(u=!!r.leading,o=(f="maxWait"in r)?Vr(Yr(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=n=a=void 0},b.flush=function(){return void 0===a?s:g(Hr())},b}function $r(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Yr(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&Fr.call(t)==Mr}(t))return _r;if($r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=$r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Cr,"");var r=Wr.test(t);return r||Nr.test(t)?Ir(t.slice(2),r?2:8):jr.test(t)?_r:+t}var Gr=function(t,e,r){var i=!0,n=!0;if("function"!=typeof t)throw new TypeError(Rr);return $r(r)&&(i="leading"in r?!!r.leading:i,n="trailing"in r?!!r.trailing:n),qr(t,e,{leading:i,maxWait:e,trailing:n})},Ur="Expected a function",Qr=NaN,Kr="[object Symbol]",Jr=/^\s+|\s+$/g,Zr=/^[-+]0x[0-9a-f]+$/i,ti=/^0b[01]+$/i,ei=/^0o[0-7]+$/i,ri=parseInt,ii="object"==typeof t&&t&&t.Object===Object&&t,ni="object"==typeof self&&self&&self.Object===Object&&self,oi=ii||ni||Function("return this")(),si=Object.prototype.toString,ai=Math.max,ci=Math.min,li=function(){return oi.Date.now()};function ui(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function fi(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&si.call(t)==Kr}(t))return Qr;if(ui(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ui(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Jr,"");var r=ti.test(t);return r||ei.test(t)?ri(t.slice(2),r?2:8):Zr.test(t)?Qr:+t}var hi=function(t,e,r){var i,n,o,s,a,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError(Ur);function d(e){var r=i,o=n;return i=n=void 0,l=e,s=t.apply(o,r)}function p(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-l>=o}function v(){var t=li();if(p(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?ci(r,o-(t-l)):r}(t))}function g(t){return a=void 0,h&&i?d(t):(i=n=void 0,s)}function b(){var t=li(),r=p(t);if(i=arguments,n=this,c=t,r){if(void 0===a)return function(t){return l=t,a=setTimeout(v,e),u?d(t):s}(c);if(f)return a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),s}return e=fi(e)||0,ui(r)&&(u=!!r.leading,o=(f="maxWait"in r)?ai(fi(r.maxWait)||0,e):o,h="trailing"in r?!!r.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=n=a=void 0},b.flush=function(){return void 0===a?s:g(li())},b},di="Expected a function",pi="__lodash_hash_undefined__",vi="[object Function]",gi="[object GeneratorFunction]",bi=/^\[object .+?Constructor\]$/,yi="object"==typeof t&&t&&t.Object===Object&&t,mi="object"==typeof self&&self&&self.Object===Object&&self,xi=yi||mi||Function("return this")();var Ei=Array.prototype,wi=Function.prototype,Si=Object.prototype,Oi=xi["__core-js_shared__"],ki=function(){var t=/[^.]+$/.exec(Oi&&Oi.keys&&Oi.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ai=wi.toString,Ti=Si.hasOwnProperty,Li=Si.toString,zi=RegExp("^"+Ai.call(Ti).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ri=Ei.splice,_i=Di(xi,"Map"),Mi=Di(Object,"create");function Ci(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function ji(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Wi(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}function Ni(t,e){for(var r,i,n=t.length;n--;)if((r=t[n][0])===(i=e)||r!=r&&i!=i)return n;return-1}function Ii(t){return!(!Fi(t)||(e=t,ki&&ki in e))&&(function(t){var e=Fi(t)?Li.call(t):"";return e==vi||e==gi}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?zi:bi).test(function(t){if(null!=t){try{return Ai.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Bi(t,e){var r,i,n=t.__data__;return("string"==(i=typeof(r=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?n["string"==typeof e?"string":"hash"]:n.map}function Di(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Ii(r)?r:void 0}function Pi(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(di);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var s=t.apply(this,i);return r.cache=o.set(n,s),s};return r.cache=new(Pi.Cache||Wi),r}function Fi(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}Ci.prototype.clear=function(){this.__data__=Mi?Mi(null):{}},Ci.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Ci.prototype.get=function(t){var e=this.__data__;if(Mi){var r=e[t];return r===pi?void 0:r}return Ti.call(e,t)?e[t]:void 0},Ci.prototype.has=function(t){var e=this.__data__;return Mi?void 0!==e[t]:Ti.call(e,t)},Ci.prototype.set=function(t,e){return this.__data__[t]=Mi&&void 0===e?pi:e,this},ji.prototype.clear=function(){this.__data__=[]},ji.prototype.delete=function(t){var e=this.__data__,r=Ni(e,t);return!(r<0)&&(r==e.length-1?e.pop():Ri.call(e,r,1),!0)},ji.prototype.get=function(t){var e=this.__data__,r=Ni(e,t);return r<0?void 0:e[r][1]},ji.prototype.has=function(t){return Ni(this.__data__,t)>-1},ji.prototype.set=function(t,e){var r=this.__data__,i=Ni(r,t);return i<0?r.push([t,e]):r[i][1]=e,this},Wi.prototype.clear=function(){this.__data__={hash:new Ci,map:new(_i||ji),string:new Ci}},Wi.prototype.delete=function(t){return Bi(this,t).delete(t)},Wi.prototype.get=function(t){return Bi(this,t).get(t)},Wi.prototype.has=function(t){return Bi(this,t).has(t)},Wi.prototype.set=function(t,e){return Bi(this,t).set(t,e),this},Pi.Cache=Wi;var Vi,Xi=Pi,Hi=[],qi="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Vi||(Vi={}));var $i,Yi=function(t){return Object.freeze(t)},Gi=function(t,e){this.inlineSize=t,this.blockSize=e,Yi(this)},Ui=function(){function t(t,e,r,i){return this.x=t,this.y=e,this.width=r,this.height=i,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Yi(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Qi=function(t){return t instanceof SVGElement&&"getBBox"in t},Ki=function(t){if(Qi(t)){var e=t.getBBox(),r=e.width,i=e.height;return!r&&!i}var n=t,o=n.offsetWidth,s=n.offsetHeight;return!(o||s||t.getClientRects().length)},Ji=function(t){var e,r;if(t instanceof Element)return!0;var i=null===(r=null===(e=t)||void 0===e?void 0:e.ownerDocument)||void 0===r?void 0:r.defaultView;return!!(i&&t instanceof i.Element)},Zi="undefined"!=typeof window?window:{},tn=new WeakMap,en=/auto|scroll/,rn=/^tb|vertical/,nn=/msie|trident/i.test(Zi.navigator&&Zi.navigator.userAgent),on=function(t){return parseFloat(t||"0")},sn=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new Gi((r?e:t)||0,(r?t:e)||0)},an=Yi({devicePixelContentBoxSize:sn(),borderBoxSize:sn(),contentBoxSize:sn(),contentRect:new Ui(0,0,0,0)}),cn=function(t,e){if(void 0===e&&(e=!1),tn.has(t)&&!e)return tn.get(t);if(Ki(t))return tn.set(t,an),an;var r=getComputedStyle(t),i=Qi(t)&&t.ownerSVGElement&&t.getBBox(),n=!nn&&"border-box"===r.boxSizing,o=rn.test(r.writingMode||""),s=!i&&en.test(r.overflowY||""),a=!i&&en.test(r.overflowX||""),c=i?0:on(r.paddingTop),l=i?0:on(r.paddingRight),u=i?0:on(r.paddingBottom),f=i?0:on(r.paddingLeft),h=i?0:on(r.borderTopWidth),d=i?0:on(r.borderRightWidth),p=i?0:on(r.borderBottomWidth),v=f+l,g=c+u,b=(i?0:on(r.borderLeftWidth))+d,y=h+p,m=a?t.offsetHeight-y-t.clientHeight:0,x=s?t.offsetWidth-b-t.clientWidth:0,E=n?v+b:0,w=n?g+y:0,S=i?i.width:on(r.width)-E-x,O=i?i.height:on(r.height)-w-m,k=S+v+x+b,A=O+g+m+y,T=Yi({devicePixelContentBoxSize:sn(Math.round(S*devicePixelRatio),Math.round(O*devicePixelRatio),o),borderBoxSize:sn(k,A,o),contentBoxSize:sn(S,O,o),contentRect:new Ui(f,c,S,O)});return tn.set(t,T),T},ln=function(t,e,r){var i=cn(t,r),n=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case Vi.DEVICE_PIXEL_CONTENT_BOX:return s;case Vi.BORDER_BOX:return n;default:return o}},un=function(t){var e=cn(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=Yi([e.borderBoxSize]),this.contentBoxSize=Yi([e.contentBoxSize]),this.devicePixelContentBoxSize=Yi([e.devicePixelContentBoxSize])},fn=function(t){if(Ki(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},hn=function(){var t=1/0,e=[];Hi.forEach((function(r){if(0!==r.activeTargets.length){var i=[];r.activeTargets.forEach((function(e){var r=new un(e.target),n=fn(e.target);i.push(r),e.lastReportedSize=ln(e.target,e.observedBox),n<t&&(t=n)})),e.push((function(){r.callback.call(r.observer,i,r.observer)})),r.activeTargets.splice(0,r.activeTargets.length)}}));for(var r=0,i=e;r<i.length;r++){(0,i[r])()}return t},dn=function(t){Hi.forEach((function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach((function(r){r.isActive()&&(fn(r.target)>t?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},pn=function(){var t,e=0;for(dn(e);Hi.some((function(t){return t.activeTargets.length>0}));)e=hn(),dn(e);return Hi.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:qi}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=qi),window.dispatchEvent(t)),e>0},vn=[],gn=function(t){if(!$i){var e=0,r=document.createTextNode("");new MutationObserver((function(){return vn.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),$i=function(){r.textContent=""+(e?e--:e++)}}vn.push(t),$i()},bn=0,yn={attributes:!0,characterData:!0,childList:!0,subtree:!0},mn=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],xn=function(t){return void 0===t&&(t=0),Date.now()+t},En=!1,wn=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!En){En=!0;var r,i=xn(t);r=function(){var r=!1;try{r=pn()}finally{if(En=!1,t=i-xn(),!bn)return;r?e.run(1e3):t>0?e.run(t):e.start()}},gn((function(){requestAnimationFrame(r)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,yn)};document.body?e():Zi.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),mn.forEach((function(e){return Zi.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),mn.forEach((function(e){return Zi.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}()),Sn=function(t){!bn&&t>0&&wn.start(),!(bn+=t)&&wn.stop()},On=function(){function t(t,e){this.target=t,this.observedBox=e||Vi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=ln(this.target,this.observedBox,!0);return t=this.target,Qi(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),kn=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},An=new WeakMap,Tn=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},Ln=function(){function t(){}return t.connect=function(t,e){var r=new kn(t,e);An.set(t,r)},t.observe=function(t,e,r){var i=An.get(t),n=0===i.observationTargets.length;Tn(i.observationTargets,e)<0&&(n&&Hi.push(i),i.observationTargets.push(new On(e,r&&r.box)),Sn(1),wn.schedule())},t.unobserve=function(t,e){var r=An.get(t),i=Tn(r.observationTargets,e),n=1===r.observationTargets.length;i>=0&&(n&&Hi.splice(Hi.indexOf(r),1),r.observationTargets.splice(i,1),Sn(-1))},t.disconnect=function(t){var e=this,r=An.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),zn=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ln.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ji(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ln.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ji(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ln.unobserve(this,t)},t.prototype.disconnect=function(){Ln.disconnect(this)},t.toString=function(){return"function ResizeObserver (){ [polyfill code] }"},t}(),Rn=function(t){return function(e,r,i,n){Tt(r);var o=zt(e),s=b(o),a=st(o.length),c=t?a-1:0,l=t?-1:1;if(i<2)for(;;){if(c in s){n=s[c],c+=l;break}if(c+=l,t?c<0:a<=c)throw TypeError("Reduce of empty array with no initial value")}for(;t?c>=0:a>c;c+=l)c in s&&(n=r(n,s[c],c,o));return n}},_n={left:Rn(!1),right:Rn(!0)}.left;At({target:"Array",proto:!0,forced:Pt("reduce")},{reduce:function(t){return _n(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Mn=M.f,Cn=Function.prototype,jn=Cn.toString,Wn=/^\s*function ([^ (]*)/;!l||"name"in Cn||Mn(Cn,"name",{configurable:!0,get:function(){try{return jn.call(this).match(Wn)[1]}catch(t){return""}}});var Nn,In,Bn=function(){var t=R(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Dn=RegExp.prototype.exec,Pn=String.prototype.replace,Fn=Dn,Vn=(Nn=/a/,In=/b*/g,Dn.call(Nn,"a"),Dn.call(In,"a"),0!==Nn.lastIndex||0!==In.lastIndex),Xn=void 0!==/()??/.exec("")[1];(Vn||Xn)&&(Fn=function(t){var e,r,i,n,o=this;return Xn&&(r=new RegExp("^"+o.source+"$(?!\\s)",Bn.call(o))),Vn&&(e=o.lastIndex),i=Dn.call(o,t),Vn&&i&&(o.lastIndex=o.global?i.index+i[0].length:e),Xn&&i&&i.length>1&&Pn.call(i[0],r,(function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(i[n]=void 0)})),i});var Hn=Fn;At({target:"RegExp",proto:!0,forced:/./.exec!==Hn},{exec:Hn});var qn=jt("species"),$n=!c((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Yn=!c((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),Gn=function(t,e,r,i){var n=jt(t),o=!c((function(){var e={};return e[n]=function(){return 7},7!=""[t](e)})),s=o&&!c((function(){var e=!1,r=/a/;return r.exec=function(){return e=!0,null},"split"===t&&(r.constructor={},r.constructor[qn]=function(){return r}),r[n](""),!e}));if(!o||!s||"replace"===t&&!$n||"split"===t&&!Yn){var a=/./[n],l=r(n,""[t],(function(t,e,r,i,n){return e.exec===Hn?o&&!n?{done:!0,value:a.call(e,r,i)}:{done:!0,value:t.call(r,e,i)}:{done:!1}})),u=l[0],f=l[1];J(String.prototype,t,u),J(RegExp.prototype,n,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}),i&&C(RegExp.prototype[n],"sham",!0)}},Un=Ue.charAt,Qn=function(t,e,r){return e+(r?Un(t,e).length:1)},Kn=function(t,e){var r=t.exec;if("function"==typeof r){var i=r.call(t,e);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==v(t))throw TypeError("RegExp#exec called on incompatible receiver");return Hn.call(t,e)};Gn("match",1,(function(t,e,r){return[function(e){var r=y(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,r):new RegExp(e)[t](String(r))},function(t){var i=r(e,t,this);if(i.done)return i.value;var n=R(t),o=String(this);if(!n.global)return Kn(n,o);var s=n.unicode;n.lastIndex=0;for(var a,c=[],l=0;null!==(a=Kn(n,o));){var u=String(a[0]);c[l]=u,""===u&&(n.lastIndex=Qn(o,st(n.lastIndex),s)),l++}return 0===l?null:c}]}));var Jn=Math.max,Zn=Math.min,to=Math.floor,eo=/\$([$&'`]|\d\d?|<[^>]*>)/g,ro=/\$([$&'`]|\d\d?)/g;Gn("replace",2,(function(t,e,r){return[function(r,i){var n=y(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,n,i):e.call(String(n),r,i)},function(t,n){var o=r(e,t,this,n);if(o.done)return o.value;var s=R(t),a=String(this),c="function"==typeof n;c||(n=String(n));var l=s.global;if(l){var u=s.unicode;s.lastIndex=0}for(var f=[];;){var h=Kn(s,a);if(null===h)break;if(f.push(h),!l)break;""===String(h[0])&&(s.lastIndex=Qn(a,st(s.lastIndex),u))}for(var d,p="",v=0,g=0;g<f.length;g++){h=f[g];for(var b=String(h[0]),y=Jn(Zn(nt(h.index),a.length),0),m=[],x=1;x<h.length;x++)m.push(void 0===(d=h[x])?d:String(d));var E=h.groups;if(c){var w=[b].concat(m,y,a);void 0!==E&&w.push(E);var S=String(n.apply(void 0,w))}else S=i(b,a,y,m,E,n);y>=v&&(p+=a.slice(v,y)+S,v=y+b.length)}return p+a.slice(v)}];function i(t,r,i,n,o,s){var a=i+t.length,c=n.length,l=ro;return void 0!==o&&(o=zt(o),l=eo),e.call(s,l,(function(e,s){var l;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return r.slice(0,i);case"'":return r.slice(a);case"<":l=o[s.slice(1,-1)];break;default:var u=+s;if(0===u)return e;if(u>c){var f=to(u/10);return 0===f?e:f<=c?void 0===n[f-1]?s.charAt(1):n[f-1]+s.charAt(1):e}l=n[u-1]}return void 0===l?"":l}))}}));var io=function(t){return Array.prototype.reduce.call(t,(function(t,e){var r=e.name.match(/data-simplebar-(.+)/);if(r){var i=r[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[i]=!0;break;case"false":t[i]=!1;break;case void 0:t[i]=!0;break;default:t[i]=e.value}}return t}),{})};function no(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function oo(t){return t&&t.ownerDocument?t.ownerDocument:document}var so=null,ao=null;function co(t){if(null===so){var e=oo(t);if(void 0===e)return so=0;var r=e.body,i=e.createElement("div");i.classList.add("simplebar-hide-scrollbar"),r.appendChild(i);var n=i.getBoundingClientRect().right;r.removeChild(i),so=n}return so}Yt&&window.addEventListener("resize",(function(){ao!==window.devicePixelRatio&&(ao=window.devicePixelRatio,so=null)}));var lo=function(){function t(e,r){var i=this;this.onScroll=function(){var t=no(i.el);i.scrollXTicking||(t.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(t.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(t){i.mouseX=t.clientX,i.mouseY=t.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(t){var e,r;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(e=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(r=i.isWithinBounds(i.axis.y.track.rect)),(e||r)&&(t.preventDefault(),t.stopPropagation(),"mousedown"===t.type&&(e&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(t,"x"):i.onTrackClick(t,"x")),r&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(t,"y"):i.onTrackClick(t,"y"))))},this.drag=function(e){var r=i.axis[i.draggedAxis].track,n=r.rect[i.axis[i.draggedAxis].sizeAttr],o=i.axis[i.draggedAxis].scrollbar,s=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],a=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);e.preventDefault(),e.stopPropagation();var c=(("y"===i.draggedAxis?e.pageY:e.pageX)-r.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset)/(n-o.size)*(s-a);"x"===i.draggedAxis&&(c=i.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c-(n+o.size):c,c=i.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-c:c),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=c},this.onEndDrag=function(t){var e=oo(i.el),r=no(i.el);t.preventDefault(),t.stopPropagation(),i.el.classList.remove(i.classNames.dragging),e.removeEventListener("mousemove",i.drag,!0),e.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=r.setTimeout((function(){e.removeEventListener("click",i.preventClick,!0),e.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=e,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},r),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,t.instances.has(this.el)||(this.recalculate=Gr(this.recalculate.bind(this),64),this.onMouseMove=Gr(this.onMouseMove.bind(this),64),this.hideScrollbars=hi(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=hi(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=Xi(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var e=document.createElement("div");e.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var r=e.firstElementChild;document.body.appendChild(r);var i=r.firstElementChild;r.scrollLeft=0;var n=t.getOffset(r),o=t.getOffset(i);r.scrollLeft=999;var s=t.getOffset(i);return{isRtlScrollingInverted:n.left!==o.left&&o.left-s.left!=0,isRtlScrollbarInverted:n.left!==o.left}},t.getOffset=function(t){var e=t.getBoundingClientRect(),r=oo(t),i=no(t);return{top:e.top+(i.pageYOffset||r.documentElement.scrollTop),left:e.left+(i.pageXOffset||r.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),Yt&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var t=this;if(Array.prototype.filter.call(this.el.children,(function(e){return e.classList.contains(t.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var e=document.createElement("div"),r=document.createElement("div");e.classList.add(this.classNames.track),r.classList.add(this.classNames.scrollbar),e.appendChild(r),this.axis.x.track.el=e.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=e.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var t=this,e=no(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.addEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize);var r=!1,i=e.ResizeObserver||zn;this.resizeObserver=new i((function(){r&&t.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame((function(){r=!0})),this.mutationObserver=new e.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var t=no(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.heightAutoObserverEl.offsetHeight<=1,r=this.heightAutoObserverEl.offsetWidth<=1,i=this.contentEl.offsetWidth,n=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var a=this.contentEl.scrollHeight,c=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=r?i+"px":"auto",this.placeholderEl.style.height=a+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=c>i,this.axis.y.isOverflowing=a>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&c>n-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&a>l-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(t){if(void 0===t&&(t="y"),!this.axis[t].isOverflowing)return 0;var e,r=this.contentEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr],n=i/r;return e=Math.max(~~(n*i),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(e=Math.min(e,this.options.scrollbarMaxSize)),e},e.positionScrollbar=function(e){if(void 0===e&&(e="y"),this.axis[e].isOverflowing){var r=this.contentWrapperEl[this.axis[e].scrollSizeAttr],i=this.axis[e].track.el[this.axis[e].offsetSizeAttr],n=parseInt(this.elStyles[this.axis[e].sizeAttr],10),o=this.axis[e].scrollbar,s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=(s="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-s:s)/(r-n),c=~~((i-o.size)*a);c="x"===e&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?c+(i-o.size):c,o.el.style.transform="x"===e?"translate3d("+c+"px, 0, 0)":"translate3d(0, "+c+"px, 0)"}},e.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,r=this.axis[t].scrollbar.el;this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll"):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden"),this.axis[t].isOverflowing?r.style.display="block":r.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.rect=this.axis[t].track.el.getBoundingClientRect(),this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[t].scrollbar.rect)?this.axis[t].scrollbar.el.classList.add(this.classNames.hover):this.axis[t].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[t].track.rect)?(this.showScrollbar(t),this.axis[t].track.el.classList.add(this.classNames.hover)):this.axis[t].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),this.axis[t].track.el.classList.remove(this.classNames.hover),this.axis[t].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(t){void 0===t&&(t="y");var e=this.axis[t].scrollbar.el;this.axis[t].isVisible||(e.classList.add(this.classNames.visible),this.axis[t].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(t,e){void 0===e&&(e="y");var r=oo(this.el),i=no(this.el),n=this.axis[e].scrollbar,o="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=o-n.rect[this.axis[e].offsetAttr],this.draggedAxis=e,this.el.classList.add(this.classNames.dragging),r.addEventListener("mousemove",this.drag,!0),r.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(r.addEventListener("click",this.preventClick,!0),r.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(t,e){var r=this;if(void 0===e&&(e="y"),this.options.clickOnTrack){var i=no(this.el);this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect();var n=this.axis[e].scrollbar.rect[this.axis[e].offsetAttr],o=parseInt(this.elStyles[this.axis[e].sizeAttr],10),s=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],a=("y"===e?this.mouseY-n:this.mouseX-n)<0?-1:1,c=-1===a?s-o:s+o;!function t(){var n,o;-1===a?s>c&&(s-=r.options.clickOnTrackSpeed,r.contentWrapperEl.scrollTo(((n={})[r.axis[e].offsetAttr]=s,n)),i.requestAnimationFrame(t)):s<c&&(s+=r.options.clickOnTrackSpeed,r.contentWrapperEl.scrollTo(((o={})[r.axis[e].offsetAttr]=s,o)),i.requestAnimationFrame(t))}()}},e.getContentElement=function(){return this.contentEl},e.getScrollElement=function(){return this.contentWrapperEl},e.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:co(this.el)}catch(t){return co(this.el)}},e.removeListeners=function(){var t=this,e=no(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(e){t.el.removeEventListener(e,t.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},e.unMount=function(){this.removeListeners(),t.instances.delete(this.el)},e.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.findChild=function(t,e){var r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return r.call(t,e)}))[0]},t}();return lo.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},lo.instances=new WeakMap,lo.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||lo.instances.has(t)||new lo(t,io(t.attributes))}))},lo.removeObserver=function(){this.globalObserver.disconnect()},lo.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(lo.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},lo.handleMutations=function(t){t.forEach((function(t){Array.prototype.forEach.call(t.addedNodes,(function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!lo.instances.has(t)&&document.documentElement.contains(t)&&new lo(t,io(t.attributes)):Array.prototype.forEach.call(t.querySelectorAll("[data-simplebar]"),(function(t){"init"!==t.getAttribute("data-simplebar")&&!lo.instances.has(t)&&document.documentElement.contains(t)&&new lo(t,io(t.attributes))})))})),Array.prototype.forEach.call(t.removedNodes,(function(t){1===t.nodeType&&("init"===t.getAttribute("data-simplebar")?lo.instances.has(t)&&!document.documentElement.contains(t)&&lo.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){lo.instances.has(t)&&!document.documentElement.contains(t)&&lo.instances.get(t).unMount()})))}))}))},lo.getOptions=io,Yt&&lo.initHtmlApi(),lo}));
!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d+' '))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core.noPreventDefault",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core.noPreventDefault",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core.noPreventDefault touchend.owl.core.noPreventDefault",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return "left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return "string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case "<":return d?a>c:a<c;case ">":return d?a<c:a>c;case ">=":return d?a<=c:a>=c;case "<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?a("<div/>",{class:"owl-video-tn "+j,srcType:c}):a("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay.noPreventDefault":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay.noPreventDefault":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core.noPreventDefault":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core.noPreventDefault":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button role="button" aria-hidden="true" tabindex="-1">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d,e;e=this._core.settings;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return "page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);r=200==Math.round(t(n.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,I=d&&r,x=t(s.width);x!==!1&&(a.width=x+(I?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(I?0:y+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+z),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var o=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?o.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,o){t=i.makeArray(t);var n=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!o)return void n.push(t);e(t,o)&&n.push(t);for(var i=t.querySelectorAll(o),s=0;s<i.length;s++)n.push(i[s])}}),n},i.debounceMethod=function(t,e,i){i=i||100;var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,o){i.docReady(function(){var s=i.toDashed(o),r="data-"+s,a=document.querySelectorAll("["+r+"]"),u=document.querySelectorAll(".js-"+s),h=i.makeArray(a).concat(i.makeArray(u)),d=r+"-options",l=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(r)||t.getAttribute(d);try{i=s&&JSON.parse(s)}catch(a){return void(n&&n.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,o,u)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],h={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},d=o.prototype=Object.create(t.prototype);d.constructor=o,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var o=h[i]||i;e[o]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=t[e?"left":"right"],n=t[i?"top":"bottom"],s=parseFloat(o),r=parseFloat(n),a=this.layout.size;o.indexOf("%")!=-1&&(s=s/100*a.width),n.indexOf("%")!=-1&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?a.paddingLeft:a.paddingRight,r-=i?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[s]=this.getXValue(a),e[r]="";var u=o?"paddingTop":"paddingBottom",h=o?"top":"bottom",d=o?"bottom":"top",l=this.position.y+t[u];e[h]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),n&&!this.isTransitioning)return void this.layoutPosition();var s=t-i,r=e-o,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=i?t:-t,e=o?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+n(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(u,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var f={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var c={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(c)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,s){return e(t,i,o,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n){"use strict";function s(t,e){var i=o.getQueryElement(t);if(!i)return void(u&&u.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++l;this.element.outlayerGUID=n,f[n]=this,this._create();var s=this._getOption("initLayout");s&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],o=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var n=m[o]||1;return i*n}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=n,s.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=s.prototype;o.extend(c,e.prototype),c.option=function(t){o.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},s.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0;n<e.length;n++){var s=e[n],r=new i(s,this);o.push(r)}return o},c._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var o,n=this.options[t];n?("string"==typeof n?o=this.element.querySelector(n):n instanceof HTMLElement&&(o=n),this[t]=o?i(o)[e]:n):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var o=this._getItemLayoutPosition(t);o.item=t,o.isInstant=e||t.isLayoutInstant,i.push(o)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},c._positionItem=function(t,e,i,o,n){o?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},c._getContainerSize=d,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function o(){r++,r==s&&i()}var n=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,o)})},c.dispatchEvent=function(t,e,i){var o=e?[e].concat(i):i;if(this.emitEvent(t,o),h)if(this.$element=this.$element||h(this.element),e){var n=h.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){o.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=d,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),o=this._boundingRect,n=i(t),s={left:e.left-o.left-n.marginLeft,top:e.top-o.top-n.marginTop,right:o.right-e.right-n.marginRight,bottom:o.bottom-e.bottom-n.marginBottom};return s},c.handleEvent=o.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},o.debounceMethod(s,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=o.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),o.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.compatOptions=o.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(n),o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=n,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),o=i._create;i._create=function(){this.id=this.layout.itemGUID++,o.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=i.prototype,n=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return n.forEach(function(t){o[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},o.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(o),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var o=i.prototype;return o._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},o.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,s=n/o,r=o-n%o,a=r&&r<1?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},o.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,o=e(i);this.containerWidth=o&&o.innerWidth},o._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var n=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",s=this[n](o,t),r={x:this.columnWidth*s.col,y:s.y},a=s.y+t.size.outerHeight,u=o+s.col,h=s.col;h<u;h++)this.colYs[h]=a;return r},o._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},o._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;o<i;o++)e[o]=this._getColGroupY(o,t);return e},o._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},o._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,o=t>1&&i+t>this.cols;i=o?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},o._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this._getOption("originLeft"),s=n?o.left:o.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?o.top:o.bottom)+i.outerHeight,l=a;l<=u;l++)this.colYs[l]=Math.max(d,this.colYs[l])},o._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},o._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),o=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)n[s]||(o[s]=e.prototype[s]);var r=o.measureColumns;o.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=o._getOption;return o._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(i,o,n,s,r,a){return e(t,i,o,n,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,s,r){function a(t,e){return function(i,o){for(var n=0;n<t.length;n++){var s=t[n],r=i.sortData[s],a=o.sortData[s];if(r>a||r<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var o=t[i];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){function t(){e&&i&&o&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?o.push(a):u||a.isHidden||n.push(a)}}return{matches:i,needReveal:o,needHide:n}},l._getFilterTest=function(t){return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t);
}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});