!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(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));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.usPopupLink=function(opts){return this.each(function(){$(this).data('usPopupLink',new usPopupLink(this,opts))})};$(()=>$us.$document.usPopupLink());(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.$document.on('usPopup.afterShow',(_,usPopup)=>{if(usPopup instanceof $us.usPopup&&$('video.wp-video-shortcode',usPopup.$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('usMagnificPopupOpened',this);return result};$.magnificPopup.proto.close=function(){const result=origMfpClose.apply(this,arguments);$us.$document.trigger('usMagnificPopupClosed',this);return result}}
$us.$document.on('usPopupOpened usMagnificPopupOpened',()=>{$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 usMagnificPopupClosed',()=>{$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(document.querySelector('[ref=magnificPopupGrid]')!==null){$ush.timeout(self.initMagnificPopup.bind(self),1)}
if(self.$container.hasClass('open_items_in_popup')){new $us.usPopup().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 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){function usCounterNumber(container){const self=this;self.$container=$(container);self.initialString=$ush.toString(self.$container.html());self.finalString=$ush.toString(self.$container.data('final'));self.format=self.getFormat(self.initialString,self.finalString);if(self.format.decMark){const 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){const self=this;var 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){const self=this;var 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}};function usCounterText(container){const self=this;self.$container=$(container);self.initial=$ush.toString(self.$container.text());self.final=$ush.toString(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){const self=this;const 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}};function usCounter(container){const self=this;self.$container=$(container);self.parts=[];self.duration=parseFloat(self.$container.data('duration')||2)*1000;$('.w-counter-value-part',self.$container).each((_,part)=>{const $part=$(part);if($ush.toString($part.html())==$ush.toString($part.data('final'))){return}
if($part.usMod('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){const self=this;self.$container.css('w-counter',0).animate({'w-counter':1},{duration:self.duration,step:self.step.bind(self)})},step:function(now){const self=this;for(var i=0;i<self.parts.length;i++){self.parts[i].step(now)}}};$.fn.usCounter=function(options){return this.each(function(){$(this).data('usCounter',new usCounter(this,options))})};$(()=>$('.w-counter').usCounter())}(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.replace(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.numPage=0;self.ajaxData={};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()||{}}
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.ajaxData.template_vars||{}).ids||[]).length===0){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}
if(self.numPage===self.ajaxData.template_vars.max_num_pages){self.$loadmore.addClass('hidden');return}
self.numPage+=1;self.$loadmore.addClass('loading');$.ajax({type:'post',url:$us.ajaxUrl,data:$.extend({},self.ajaxData,{template_vars:JSON.stringify(self.ajaxData.template_vars),num_page:self.numPage,}),success:(html)=>{var $result=$(html),$items=$('.w-gallery-list > *',$result);if(!$items.length||self.numPage===self.ajaxData.template_vars.max_num_pages-1){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.usPopup().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){window.location.replace(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.usPopup=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.usPopup.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.loadItemContent.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');$us.$document.trigger('usPopup.afterShow',self)},loadItemContent:function(){const self=this;if(!self.forListItem){return}
$.ajax({url:$us.ajaxUrl,type:'POST',dataType:'json',data:self.ajaxData,beforeSend:()=>{self.$content.html('<div class="g-preloader type_1"></div>')},success:(res)=>{if(res.success&&res.data){self.$content.html(res.data);$us.$document.trigger('usPopup.itemContentLoaded',self)}},})},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('usPopup.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',()=>{if($ush.isNode(triggerElm)){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.usPopup.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.usPopup=function(options){return this.each(function(){$(this).data('usPopup',new $us.usPopup(this,options))})};$(()=>$('.w-popup').usPopup());$us.$document.on('usPostList.itemsLoaded usGrid.itemsLoaded',(_,$items)=>{$('.w-popup',$items).usPopup()});$us.$document.on('usPopupOpened',(e,$popup,$popupCloser,triggerElm)=>{if($popup.hasClass('l-popup')){if(e){$popupCloser[0].focus({preventScroll:!0})}
$us.$document.on('keydown.usPopup',(e)=>{$us.usPopup.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.listFilterUid=null;self.isScrollToListEnabled=!1;self.uid=$ush.uniqid();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.$pageContent=$('main#page-content');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.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.usPopup().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)}
self.initListResultCounter()}
$.extend(usPostList.prototype,{usListSearch:function(e,name,value){this.applyFilter(name,value)},usListOrder:function(e,values){const self=this;$.each(values,self.applyFilter.bind(self))},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}
if(name==='list_filter_uid'){self.listFilterUid=value;return}
if(name==='scroll_to_list'){self.isScrollToListEnabled=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||!self.isScrollToListEnabled){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(listFiltersApplied){const self=this;self.data.paged+=1;if(!listFiltersApplied&&self.data.paged>self.data.max_num_pages){return}
if(listFiltersApplied){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(listFiltersApplied){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=$(html).find('.w-grid-list').first().children();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(()=>{const data={postListUid:self.uid,listFilterUid:self.listFilterUid,listFiltersApplied:listFiltersApplied,};$us.$document.trigger('usPostList.itemsLoaded',[$items,data])},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');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)}
$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()}})},usbReloadIsotopeLayout:function(){const self=this;if(self.$container.hasClass('with_isotope')){self.$list.isotope('layout')}},});$.extend(usPostList.prototype,{initListResultCounter:function(){const self=this;const listResultCounterOpts=[];const $firstList=$(`
.w-grid.us_post_list:visible,
.w-grid.us_product_list:visible,
.w-grid-none:visible
`,self.$pageContent).first();self.$listResultCounter=$('.w-list-result-counter');if(!(self.$listResultCounter.length)){return}
self.$listResultCounter.each((_,node)=>{const $node=$(node);if(!$node.is('[onclick]')){return}
const opts=node.onclick()||{};if(self.$container[0]!==$firstList[0]){if(!self.$container.is(String(opts.listSelectorToCount))){return}}else if(opts.listSelectorToCount&&!self.$container.is(String(opts.listSelectorToCount))){return}
opts.$listResultCounter=$node;listResultCounterOpts.push(opts)});self._events.updateCountResults=function(_,$items,data){if(data.postListUid===self.uid){$.each(listResultCounterOpts,(_,opts)=>{const foundPosts=(self.paginationType==='none')?$('> *',self.$list).length:self.data.ajaxData.found_posts;self.countResult(foundPosts,opts)})}};$us.$document.on('usPostList.itemsLoaded',self._events.updateCountResults);const numAjaxParams=Object.keys($ush.urlManager(self.data.ajaxUrl).toJson(!1)).length;$.ajax({url:$us.ajaxUrl,type:'POST',dataType:'json',data:{action:'us_list_result_counter_total',query_args_unfiltered:self.data.facetedFilter.query_args_unfiltered,},success:(res)=>{if(!res.success){console.error(res.data.message);return}
$.each(listResultCounterOpts,(_,opts)=>{var total;if(res.data.total_unfiltered){total=res.data.total_unfiltered}else if(self.paginationType==='none'){total=$('> *',self.$list).length}else{total=self.data.ajaxData.found_posts}
$('.total-unfiltered',opts.$listResultCounter).text(total)});$.each(listResultCounterOpts,(_,opts)=>{if(opts.totalUnfiltered!==res.data.total_unfiltered&&self.paginationType!=='none'&&numAjaxParams<=1){self.countResult(self.data.ajaxData.found_posts,opts)}})},});if(self.paginationType==='none'&&numAjaxParams<=1){$.each(listResultCounterOpts,(_,opts)=>{self.countResult($('> *',self.$list).length,opts)})}
if(self.paginationType==='numbered'){if(!(numAjaxParams<1)){$.each(listResultCounterOpts,(_,opts)=>{self.countResult(self.data.ajaxData.found_posts,opts)})}}else if(!(numAjaxParams<=1)){const total=(self.paginationType==='none')?$('> *',self.$list).length:self.data.ajaxData.found_posts;$.each(listResultCounterOpts,(_,opts)=>{self.countResult(total,opts)})}},countResult:function(total,opts){const self=this;if(!self.$listResultCounter.length||$us.usbPreview()){return}
const $listResultCounter=opts.$listResultCounter;const $noResultsSpan=$('.no-results',$listResultCounter);const $oneResultSpan=$('.one-result',$listResultCounter);const $mainSpan=$('span:first-child',$listResultCounter);const perPage=self.isCurrentQuery?opts.perPage:self.data.ajaxData.per_page;$listResultCounter.show();$mainSpan.removeClass('hidden');$noResultsSpan.addClass('hidden');$oneResultSpan.addClass('hidden');const lower=['load_on_scroll','load_on_btn'].includes(self.paginationType)?1:(self.data.paged-1)*perPage+1;const upper=self.paginationType==='none'?$('> *',self.$list).length:Math.min(total,self.data.paged*perPage);if(total===1){$mainSpan.addClass('hidden');$oneResultSpan.removeClass('hidden')}else if(total===0){if($noResultsSpan.length){$mainSpan.addClass('hidden');$noResultsSpan.removeClass('hidden')}else{$listResultCounter.hide()}}else{$('.lower',$listResultCounter).text(lower);$('.upper',$listResultCounter).text(upper);$('.total',$listResultCounter).text(total)}},});$.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();function usListOrder(container){const self=this;self._events={selectChanged:self._selectChanged.bind(self),};self.$container=$(container);self.$pageContent=$('main#page-content');if(self.changeURLParams()){var urlValue=urlManager.get('_orderby');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')}
var value=e.target.value;if(value===''){value=DELETE_FILTER}
if(value===self.lastValue){return}
self.lastValue=value;if(self.changeURLParams()){urlManager.set('_orderby',value).push()}
$firstList.trigger('usListOrder',[{'scroll_to_list':self.$container.hasClass('scroll_to_list'),'_orderby':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');self.uid=$ush.uniqid();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));function changePosDatepicker(e){if(!$us.$body.hasClass('us_filter_open')){return}
const $datepicker=$('#ui-datepicker-div.for_list_filter');const datepickerHeight=$datepicker.outerHeight();const inputBounds=$ush.$rect(e.currentTarget);if(window.innerHeight-(inputBounds.top+datepickerHeight)>0){$datepicker.css({top:(inputBounds.top+inputBounds.height)})}else{$datepicker.css({top:(inputBounds.top-datepickerHeight)})}}
$start.on('click',changePosDatepicker);$end.on('click',changePosDatepicker)});$('.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){var listFilters={};$.each(self.filters,(name,$filter)=>{listFilters[name]=$ush.toString($filter.usMod('type'))});self._events.itemsLoaded=(_,$items,data)=>{if(data.listFiltersApplied&&self.isVisible()&&data.listFilterUid===self.uid){self.setPostCount(self.firstListData().facetedFilter.post_count)}};$us.$document.on('usPostList.itemsLoaded',self._events.itemsLoaded);self.listToFilter().trigger('usListFilter',{list_filters:listFilters,list_filter_uid:self.uid});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();if(!$us.usbPreview()&&self.changeURLParams()){self.listFilterReset=new usListFilterReset(self)}}
$.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.closest('.w-tabs-section').length){return!0}
return self.$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.showSelectedDropdownValues()},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.showSelectedDropdownValues()},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',$.extend({'scroll_to_list':self.$container.hasClass('scroll_to_list')},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')}},showSelectedDropdownValues:function(){const self=this;if(!self.titlesAsDropdowns()){return}
for(const key in self.result){if(key===FACETED_PARAM){continue}
const name=(key.charAt(0)===PREFIX_FOR_URL_PARAM)?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}
$('span',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()}}}},});function usListFilterReset(listFilter){const self=this;self.$containers=$('.w-filter-reset');if(!self.$containers.length){return}
self.$resetAllButton=$('.w-filter-reset-all',self.$containers);self.listFilter=listFilter;self.allOpts=[];self.$containers.each((_,node)=>{const $node=$(node);if(!$node.is('[onclick]')){return}
const opts=node.onclick()||{};opts.$node=$node;self.allOpts.push(opts)});self._events={hideShowListFilterReset:self.hideShowListFilterReset.bind(self),renderSelectedValues:self.renderSelectedValues.bind(self),resetAllFilters:self.resetAllFilters.bind(self),resetSingleFilterItem:self.resetSingleFilterItem.bind(self),};self.$containers.on('click','.w-filter-reset-single',self._events.resetSingleFilterItem).on('click','.w-filter-reset-all',self._events.resetAllFilters);if(self.$containers.hasClass('hidden')){self.hideShowListFilterReset();self.renderSelectedValues()}
urlManager.on('popstate',()=>{self.hideShowListFilterReset();self.renderSelectedValues()});self.listFilter.on('applyFilterToList',self._events.renderSelectedValues);self.listFilter.on('applyFilterToList',self._events.hideShowListFilterReset)}
$.extend(usListFilterReset.prototype,{renderSelectedValues:function(){const self=this;$.each(self.allOpts,(_,opts)=>{if(!opts.$node||!opts.$node.hasClass('show_selected_values')){return}
const fragment=document.createDocumentFragment();$('.w-filter-reset-single',opts.$node).remove();$.each(self.listFilter.result,(key,value)=>{if(key===FACETED_PARAM||!value){return}
key=$ush.toString(key);value=$ush.toString(value);const rawKey=(key.charAt(0)===PREFIX_FOR_URL_PARAM)?key.substring(1):key;const $filter=self.listFilter.filters[rawKey];if(!$filter.length){return}
var labelTitle='',labelValue='';if(!self.listFilter.$container.hasClass('mod_no_titles')){labelTitle=$('.w-filter-item-title',$filter).contents().first().text().trim()}
if($filter.hasClass('type_range_slider')){const minLabel=$('.w-filter-item-slider-result .for_min_value',$filter).text().trim();const maxLabel=$('.w-filter-item-slider-result .for_max_value',$filter).text().trim();if(!minLabel||!maxLabel){return}
labelValue=`${minLabel} – ${maxLabel}`}else if($filter.hasClass('type_range_input')||$filter.hasClass('type_date_picker')){labelValue=value.replace('-',' – ')}else if($filter.hasClass('type_dropdown')){labelValue=$(`option[value="${value}"]`,$filter).text().trim()||value}else{value.split(',').forEach((singleValue)=>{const $valueItem=$('.w-filter-item-value',$filter).filter((_,node)=>{return node.dataset.value==singleValue});if(!$valueItem.length){return}
const labelValue=$('.w-filter-item-value-label',$valueItem).first().text().trim();if(!labelValue){return}
fragment.appendChild(self.cloneResetBtn(opts,key,singleValue,labelTitle,labelValue))});return}
if(!labelValue){return}
fragment.appendChild(self.cloneResetBtn(opts,key,value,labelTitle,labelValue))});if(fragment.childNodes.length){opts.$node.prepend(fragment)}})},cloneResetBtn:function(opts,dataName='',dataValue='',labelTitle,labelValue){const self=this;const $singleResetButton=self.$resetAllButton.first().clone();$singleResetButton.removeClass().addClass(opts.singleResetBtnClass).attr('data-name',dataName).attr('data-value',dataValue);const $singleResetLabel=$('span',$singleResetButton);var $singleResetLabelText;if(labelTitle){$singleResetLabelText=`<t>${labelTitle}: </t><v>${labelValue}</v>`}else{$singleResetLabelText=`<v>${labelValue}</v>`}
$singleResetLabel.removeClass().addClass('w-btn-label').html($singleResetLabelText);return $singleResetButton[0]},resetSingleFilterItem:function(e){const self=this;const $singleResetButton=$(e.target).parents('.w-filter-reset-single');if(!$singleResetButton.length){return}
const key=$singleResetButton.data('name');const value=$ush.toString($singleResetButton.data('value'));const rawName=(key.charAt(0)===PREFIX_FOR_URL_PARAM)?key.substring(1):key;const $filter=self.listFilter.filters[rawName];if(!$filter){return}
const currentValue=self.listFilter.result[key];if(!currentValue||currentValue===DELETE_FILTER){return}
if($filter.hasClass('type_checkbox')){if(typeof currentValue==='string'&&currentValue.includes(',')){const values=currentValue.split(',');const newValues=values.filter((v)=>v!==value);self.listFilter.result[key]=newValues.length?newValues.join(','):DELETE_FILTER}else{self.listFilter.result[key]=DELETE_FILTER}
$(`input[value="${value}"]`,$filter).prop('checked',!1);if(!$filter.find('input:checked').length){$filter.removeClass('has_value')}}else{self.listFilter.result[key]=DELETE_FILTER;self.listFilter.resetFields($filter)}
self.listFilter.trigger('applyFilterToList')},resetAllFilters:function(){const self=this;$('.w-filter-item.has_value',self.listFilter.$container).each((_,item)=>{self.listFilter.resetFields($(item))});for(const key in self.listFilter.result){if(key!==FACETED_PARAM){self.listFilter.result[key]=DELETE_FILTER}}
self.listFilter.trigger('applyFilterToList')},hideShowListFilterReset:function(){const self=this;const hasActiveFilters=Object.entries(self.listFilter.result).some(([key,value])=>{if(key===FACETED_PARAM){return!1}
return value&&value!==DELETE_FILTER});if(!$us.usbPreview()){self.$containers.toggleClass('hidden',!hasActiveFilters)}}});$.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;const $selectedSectionParents=$selectedSection.parentsUntil('.w-menu');self.$menuItemHasChildren.each((_,section)=>{const $section=$(section);if(section!=$selectedSection[0]&&$section.hasClass('expanded')&&!$selectedSectionParents.is($section)){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.$cartCloser=$('.w-cart-closer',self.$cart);self.$cartLink=$('.w-cart-link',self.$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.isCartOpen=!1;self._removeProcesses=0;self._events={ajaxAddToCart:self.ajaxAddToCart.bind(self),applyCouponCode:self.applyCouponCode.bind(self),changeCartQuantity:self.changeCartQuantity.bind(self),couponCodeChange:self.couponCodeChange.bind(self),couponDisplaySwitch:self.couponDisplaySwitch.bind(self),enterCouponCode:self.enterCouponCode.bind(self),showNotification:self.showNotification.bind(self),loginFieldKeydown:self.loginFieldKeydown.bind(self),minusCartQuantity:self.minusCartQuantity.bind(self),moveNotifications:self.moveNotifications.bind(self),clickOutsideCart:self.clickOutsideCart.bind(self),plusCartQuantity:self.plusCartQuantity.bind(self),removeCartItem:self.removeCartItem.bind(self),showLoginForm:self.showLoginForm.bind(self),submitLoginForm:self.submitLoginForm.bind(self),updateCart:self.updateCart.bind(self),updatedCartTotals:self.updatedCartTotals.bind(self),showCartOnClick:self.showCartOnClick.bind(self),showCartOnKeyup:self.showCartOnKeyup.bind(self),hideCartOnKeyup:self.hideCartOnKeyup.bind(self),redirectToCartOnMobile:self.redirectToCartOnMobile.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',self._events.redirectToCartOnMobile)}else{if(self.$cart.hasClass('drop_on_click')||self.$cart.is('[class*="_panel"]')){self.$cartLink.on('keyup',self._events.showCartOnKeyup);self.$cartLink.on('click',self._events.showCartOnClick)}
$us.$body.on('keyup',self._events.hideCartOnKeyup);if(self.$cart.hasClass('layout_left_panel')||self.$cart.hasClass('layout_right_panel')){self.$cartCloser.on('click',(e)=>{self._toggleCart(!1)});self.$cartCloser.on('keyup',(e)=>{if(e.keyCode===$ush.ENTER_KEYCODE){self._toggleCart(!1,self.$cartLink)}})}}
$us.$body.on('wc_fragments_loaded wc_fragments_refreshed',self._events.updateCart).on('added_to_cart',self._events.showNotification).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($us.$body.hasClass('us-ajax_add_to_cart')){$us.$body.on('click','.single_add_to_cart_button:not(.disabled)',self._events.ajaxAddToCart)}
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)=>{if(settings.url.includes('add_to_cart')&&self.$cart.hasClass('open_on_ajax')&&(self.$cart.hasClass('layout_left_panel')||self.$cart.hasClass('layout_right_panel'))){self._toggleCart(!0);self.$cart.on('transitionend',()=>{self.$cartCloser[0].focus();self.$cart.off('transitionend')})}
if(String(jqXHR.responseText).charAt(0)==='{'){return}
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.hasClass('drop_on_click')&&!$cart.hasClass('layout_left_panel')&&!$cart.hasClass('layout_right_panel')){$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')}})},showNotification:function(e,fragments,_,$button){if($ush.isUndefined(e)){return}
const self=this;self.updateCart();const $notice=self.$cartNotification;const theProductName=$button.closest('.product, .w-popup-box-content').find('.woocommerce-loop-product__title, .w-post-elm.post_title').first().text();$('.product-name',$notice).html(`"${theProductName}"`);if($notice.hasClass('skip_message')){$notice.removeClass('skip_message');return}
$notice.addClass('shown');$notice.on('mouseenter',()=>{$notice.removeClass('shown')});$ush.timeout(()=>{$notice.removeClass('shown').off('mouseenter')},3000)},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()}},});$.extend(WooCommerce.prototype,{ajaxAddToCart:function(e){const self=this;e.preventDefault();const $button=$(e.currentTarget);if($('.g-preloader',$button).length===0){$button.html(`<div class="g-preloader type_1"><div></div></div><span class="w-btn-label">${$button.html()}</span>`)}
var data={};const $form=$button.closest('form.cart');const formData=new FormData($form[0],$button[0]);formData.forEach((value,key)=>{if(key.includes('[')){const keys=key.split(/\[|\]/).filter((k)=>{return k});keys.forEach((k,index)=>{if(index===keys.length-1){if(Array.isArray(data[k])){data[k].push(value)}else if(data[k]){data[k]=[data[k],value]}else{data[k]=key.includes('[]')?[value]:value}}else{if(!data[k]){data[k]={}}
data=data[k]}})}else{if(data[key]){if(Array.isArray(data[key])){data[key].push(value)}else{data[key]=[data[key],value]}}else{data[key]=value}}});if(data.variation_id){data.product_id=data.variation_id}else if(!data.product_id&&data['add-to-cart']){data.product_id=data['add-to-cart']}
delete data['add-to-cart'];$us.$body.trigger('adding_to_cart',$button,data);$.ajax({type:'POST',url:String(woocommerce_params.wc_ajax_url).replace('%%endpoint%%','add_to_cart'),data:data,beforeSend:()=>{$button.removeClass('added').addClass('loading')},complete:(jqXHR)=>{if(String(jqXHR.responseText).includes('us_redirect_to_cart')){return}
$button.addClass('added').removeClass('loading')},success:(res)=>{if(res.error&&res.product_url){window.location=res.product_url;return}
if(res.fragments.us_redirect_to_cart){window.location.replace(res.fragments.us_redirect_to_cart);return}
if(self.isCart()){self.$cartNotification.addClass('skip_message')}
$us.$body.trigger('added_to_cart',[res.fragments,res.cart_hash,$button]);if(self.isCart()&&self.$cart.hasClass('open_on_ajax')){self._toggleCart(!0)}
var message='';if(self.isCart()){message=self.$cartNotification.text()}
var $viewCart=$button.next('.added_to_cart.wc-forward').removeClass('added_to_cart');if($viewCart.length){message+=' '+$viewCart.prop('outerHTML');$viewCart.remove()}
$form.next('.woocommerce-notices-wrapper').remove();$form.after(`
<div class="woocommerce-notices-wrapper">
<div class="woocommerce-message" role="alert" tabindex="-1">${message}</div>
</div>
`)},})},clickOutsideCart:function(e){const self=this;if($.contains(self.$cart[0],e.target)){return}
self._toggleCart(!1)},redirectToCartOnMobile:function(e){e.preventDefault();const cartUrl=String((window.wc_add_to_cart_params||{}).cart_url);if(cartUrl.includes(window.location.host)){window.location.replace(cartUrl)}},showCartOnClick:function(e){const self=this;e.preventDefault();if(['mouse','touch','pen'].includes(e.pointerType)){self._toggleCart(!self.isCartOpen)}},showCartOnKeyup:function(e){const self=this;e.preventDefault();if(e.keyCode!==$ush.ENTER_KEYCODE){return}
if(!self.isCartOpen){if(self.$cartCloser.length>0){self.$cart.on('transitionend',()=>{self.$cartCloser[0].focus();self.$cart.off('transitionend')})}}
self._toggleCart(!self.isCartOpen)},hideCartOnKeyup:function(e){const self=this;if(e.keyCode===$ush.ESC_KEYCODE){self._toggleCart(!1,self.$cartLink)}},_toggleCart:function(open=!0,$elementToFocus=null){const self=this;self.$cart.toggleClass('opened',open);self.$cartLink.attr('aria-expanded',open);if(self.isCartOpen&&$elementToFocus!==null){$elementToFocus.focus()}
self.isCartOpen=open;if(self.$cart.hasClass('layout_dropdown')&&self.$cart.hasClass('drop_on_click')){if(open){$us.$body.on('mouseup touchend.noPreventDefault',self._events.clickOutsideCart)}else{$us.$body.off('mouseup touchend.noPreventDefault',self._events.clickOutsideCart)}}}});$.extend(WooCommerce.prototype,{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)}});$us.$document.on('usPopup.itemContentLoaded',(e,usPopup)=>{if(typeof $.fn.wc_product_gallery==='function'){$('.woocommerce-product-gallery',usPopup.$content).wc_product_gallery()}
if(typeof $.fn.wc_variation_form==='function'){$('.variations_form',usPopup.$content).wc_variation_form()}})})(jQuery);
;
(function ($){
var focused=true;
var easings={
swing:  'cubic-bezier(.02, .01, .47, 1)',
linear: 'linear',
easeInQuad:     'cubic-bezier(0.11, 0, 0.5, 0)',
easeOutQuad:    'cubic-bezier(0.5, 1, 0.89, 1)',
easeInOutQuad:  'cubic-bezier(0.45, 0, 0.55, 1)',
easeInCubic:    'cubic-bezier(0.32, 0, 0.67, 0)',
easeOutCubic:   'cubic-bezier(0.33, 1, 0.68, 1)',
easeInOutCubic: 'cubic-bezier(0.65, 0, 0.35, 1)',
easeInQuart:    'cubic-bezier(0.5, 0, 0.75, 0)',
easeOutQuart:   'cubic-bezier(0.25, 1, 0.5, 1)',
easeInOutQuart: 'cubic-bezier(0.76, 0, 0.24, 1)',
easeInQuint:    'cubic-bezier(0.64, 0, 0.78, 0)',
easeOutQuint:   'cubic-bezier(0.22, 1, 0.36, 1)',
easeInOutQuint: 'cubic-bezier(0.83, 0, 0.17, 1)',
easeInSine:     'cubic-bezier(0.12, 0, 0.39, 0)',
easeOutSine:    'cubic-bezier(0.61, 1, 0.88, 1)',
easeInOutSine:  'cubic-bezier(0.37, 0, 0.63, 1)',
easeInExpo:     'cubic-bezier(0.7, 0, 0.84, 0)',
easeOutExpo:    'cubic-bezier(0.16, 1, 0.3, 1)',
easeInOutExpo:  'cubic-bezier(0.87, 0, 0.13, 1)',
easeInCirc:     'cubic-bezier(0.55, 0, 1, 0.45)',
easeOutCirc:    'cubic-bezier(0, 0.55, 0.45, 1)',
easeInOutCirc:  'cubic-bezier(0.85, 0, 0.15, 1)',
easeInBack:     'cubic-bezier(0.36, 0, 0.66, -0.56)',
easeOutBack:    'cubic-bezier(0.34, 1.56, 0.64, 1)',
easeInOutBack:  'cubic-bezier(0.68, -0.6, 0.32, 1.6)'
};
easings['jswing']=easings['swing'];
$.flexslider=function(el, options){
var slider=$(el);
if(typeof options.rtl=='undefined'&&$('html').attr('dir')=='rtl'){
options.rtl=true;
}
slider.vars=$.extend({}, $.flexslider.defaults, options);
var namespace=slider.vars.namespace,
touch=(("ontouchstart" in window)||window.DocumentTouch&&document instanceof DocumentTouch)&&slider.vars.touch,
eventType="click touchend keyup flexslider-click",
watchedEvent="",
watchedEventClearTimer,
easing=easings[slider.vars.easing]||"ease",
vertical=slider.vars.direction==="vertical",
reverse=slider.vars.reverse,
carousel=(slider.vars.itemWidth > 0),
fade=slider.vars.animation==="fade",
asNav=slider.vars.asNavFor!=="",
methods={};
$.data(el, "flexslider", slider);
methods={
init: function(){
slider.animating=false;
slider.currentSlide=parseInt(( slider.vars.startAt ? slider.vars.startAt:0), 10);
if(isNaN(slider.currentSlide)){ slider.currentSlide=0; }
slider.animatingTo=slider.currentSlide;
slider.atEnd=(slider.currentSlide===0||slider.currentSlide===slider.last);
slider.containerSelector=slider.vars.selector.substr(0,slider.vars.selector.search(' '));
slider.slides=$(slider.vars.selector, slider);
slider.container=$(slider.containerSelector, slider);
slider.count=slider.slides.length;
slider.syncExists=$(slider.vars.sync).length > 0;
if(slider.vars.animation==="slide"){ slider.vars.animation="swing"; }
slider.prop=(vertical) ? "top":(slider.vars.rtl ? "marginRight":"marginLeft");
slider.args={};
slider.manualPause=false;
slider.stopped=false;
slider.started=false;
slider.startTimeout=null;
slider.transforms=slider.transitions = !slider.vars.video&&!fade&&slider.vars.useCSS;
if(slider.transforms) slider.prop="transform";
slider.isFirefox=navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
slider.ensureAnimationEnd='';
if(slider.vars.controlsContainer!=="") slider.controlsContainer=$(slider.vars.controlsContainer).length > 0&&$(slider.vars.controlsContainer);
if(slider.vars.manualControls!=="") slider.manualControls=$(slider.vars.manualControls).length > 0&&$(slider.vars.manualControls);
if(slider.vars.customDirectionNav!=="") slider.customDirectionNav=$(slider.vars.customDirectionNav).length===2&&$(slider.vars.customDirectionNav);
if(slider.vars.randomize){
slider.slides.sort(function(){ return (Math.round(Math.random())-0.5); });
slider.container.empty().append(slider.slides);
}
slider.doMath();
slider.setup("init");
if(slider.vars.controlNav){ methods.controlNav.setup(); }
if(slider.vars.directionNav){ methods.directionNav.setup(); }
if(slider.vars.keyboard&&($(slider.containerSelector).length===1||slider.vars.multipleKeyboard)){
$(document).on('keyup', function(event){
var keycode=event.keyCode;
if(!slider.animating&&(keycode===39||keycode===37)){
var target=(slider.vars.rtl?
((keycode===37) ? slider.getTarget('next') :
(keycode===39) ? slider.getTarget('prev'):false)
:
((keycode===39) ? slider.getTarget('next') :
(keycode===37) ? slider.getTarget('prev'):false)
)
;
slider.flexAnimate(target, slider.vars.pauseOnAction);
}});
}
if(slider.vars.mousewheel){
slider.on('mousewheel', function(event, delta, deltaX, deltaY){
event.preventDefault();
var target=(delta < 0) ? slider.getTarget('next'):slider.getTarget('prev');
slider.flexAnimate(target, slider.vars.pauseOnAction);
});
}
if(slider.vars.pausePlay){ methods.pausePlay.setup(); }
if(slider.vars.slideshow&&slider.vars.pauseInvisible){ methods.pauseInvisible(); }
if(slider.vars.slideshow){
if(slider.vars.pauseOnHover){
slider.on('mouseenter', function(){
if(!slider.manualPlay&&!slider.manualPause){ slider.pause(); }}).on('mouseleave', function(){
if(!slider.manualPause&&!slider.manualPlay&&!slider.stopped){ slider.play(); }});
}
if(!slider.vars.pauseInvisible||document.visibilityState==='visible'){
(slider.vars.initDelay > 0) ? slider.startTimeout=setTimeout(slider.play, slider.vars.initDelay):slider.play();
}}
if(asNav){ methods.asNav.setup(); }
if(touch&&slider.vars.touch){ methods.touch(); }
if(!fade||(fade&&slider.vars.smoothHeight)){ $(window).on("resize orientationchange focus", methods.resize); }
slider.find("img").attr("draggable", "false");
setTimeout(function(){
slider.vars.start(slider);
}, 200);
},
asNav: {
setup: function(){
slider.asNav=true;
slider.animatingTo=Math.floor(slider.currentSlide/slider.move);
slider.currentItem=slider.currentSlide;
slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
slider.slides.on(eventType, function(e){
e.preventDefault();
var $slide=$(this),
target=$slide.index();
var posFromX;
if(slider.vars.rtl){
posFromX=-1*($slide.offset().right - $(slider).scrollLeft());
}else{
posFromX=$slide.offset().left - $(slider).scrollLeft();
}
if(posFromX <=0&&$slide.hasClass(namespace + 'active-slide')){
slider.flexAnimate(slider.getTarget("prev"), true);
}else if(!$(slider.vars.asNavFor).data('flexslider').animating&&!$slide.hasClass(namespace + "active-slide")){
slider.direction=(slider.currentItem < target) ? "next":"prev";
slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
}});
}},
controlNav: {
setup: function(){
if(!slider.manualControls){
methods.controlNav.setupPaging();
}else{
methods.controlNav.setupManual();
}},
setupPaging: function(){
var type=(slider.vars.controlNav==="thumbnails") ? 'control-thumbs':'control-paging',
j=1,
item,
slide;
slider.controlNavScaffold=$('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
if(slider.pagingCount > 1){
for (var i=0; i < slider.pagingCount; i++){
slide=slider.slides.eq(i);
if(undefined===slide.attr('data-thumb-alt')){
slide.attr('data-thumb-alt', '');
}
item=$('<a></a>').attr('href', '#').text(j);
if(slider.vars.controlNav==="thumbnails"){
if(slide.attr('data-woocommerce_gallery_thumbnail_url')||slide.attr('data-woocommerce_thumbnail_url')){
item=$('<img/>', {
onload: 'this.width=this.naturalWidth; this.height=this.naturalHeight',
src: (this.clientWidth < 100) ? slide.attr('data-woocommerce_gallery_thumbnail_url'):slide.attr('data-woocommerce_thumbnail_url'),
srcset: slide.attr('data-thumb-srcset'),
alt: slide.attr('alt'),
class: 'vwg-generated-thumb'
})
}else{
item=$('<img/>', {
onload: 'this.width=this.naturalWidth; this.height=this.naturalHeight',
src: slide.attr('data-thumb'),
srcset: slide.attr('data-thumb-srcset'),
alt: slide.attr('alt')
})
}
}
if(''!==slide.attr('data-thumb-alt')){
item.attr('alt', slide.attr('data-thumb-alt'));
}
if('thumbnails'===slider.vars.controlNav&&true===slider.vars.thumbCaptions){
var captn=slide.attr('data-thumbcaption');
if(''!==captn&&undefined!==captn){
var caption=$('<span></span>').addClass(namespace + 'caption').text(captn);
item.append(caption);
}}
var liElement=$('<li>');
item.appendTo(liElement);
liElement.append('</li>');
slider.controlNavScaffold.append(liElement);
j++;
}}
(slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold):slider.append(slider.controlNavScaffold);
methods.controlNav.set();
methods.controlNav.active();
slider.controlNavScaffold.on(eventType, 'a, img', function(event){
event.preventDefault();
if(watchedEvent===""||watchedEvent===event.type||event.type==="flexslider-click"){
var $this=$(this),
target=slider.controlNav.index($this);
if(!$this.hasClass(namespace + 'active')){
slider.direction=(target > slider.currentSlide) ? "next":"prev";
slider.flexAnimate(target, slider.vars.pauseOnAction);
}}
if(watchedEvent===""&&event.type!=="flexslider-click"){
watchedEvent=event.type;
}
methods.setToClearWatchedEvent();
});
},
setupManual: function(){
slider.controlNav=slider.manualControls;
methods.controlNav.active();
slider.controlNav.on(eventType, function(event){
event.preventDefault();
if(watchedEvent===""||watchedEvent===event.type||event.type==="flexslider-click"){
var $this=$(this),
target=slider.controlNav.index($this);
if(!$this.hasClass(namespace + 'active')){
(target > slider.currentSlide) ? slider.direction="next":slider.direction="prev";
slider.flexAnimate(target, slider.vars.pauseOnAction);
}}
if(watchedEvent===""&&event.type!=="flexslider-click"){
watchedEvent=event.type;
}
methods.setToClearWatchedEvent();
});
},
set: function(){
var selector=(slider.vars.controlNav==="thumbnails") ? 'img':'a';
slider.controlNav=$('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer:slider);
},
active: function(){
slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
},
update: function(action, pos){
if(slider.pagingCount > 1&&action==="add"){
slider.controlNavScaffold.append($('<li><a href="#">' + slider.count + '</a></li>'));
}else if(slider.pagingCount===1){
slider.controlNavScaffold.find('li').remove();
}else{
slider.controlNav.eq(pos).closest('li').remove();
}
methods.controlNav.set();
(slider.pagingCount > 1&&slider.pagingCount!==slider.controlNav.length) ? slider.update(pos, action):methods.controlNav.active();
}},
directionNav: {
setup: function(){
var directionNavScaffold=$('<ul class="' + namespace + 'direction-nav"><li class="' + namespace + 'nav-prev"><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li class="' + namespace + 'nav-next"><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');
if(slider.customDirectionNav){
slider.directionNav=slider.customDirectionNav;
}else if(slider.controlsContainer){
$(slider.controlsContainer).append(directionNavScaffold);
slider.directionNav=$('.' + namespace + 'direction-nav li a', slider.controlsContainer);
}else{
slider.append(directionNavScaffold);
slider.directionNav=$('.' + namespace + 'direction-nav li a', slider);
}
methods.directionNav.update();
slider.directionNav.on(eventType, function(event){
event.preventDefault();
var target;
if(watchedEvent===""||watchedEvent===event.type||event.type==="flexslider-click"){
target=($(this).hasClass(namespace + 'next')) ? slider.getTarget('next'):slider.getTarget('prev');
slider.flexAnimate(target, slider.vars.pauseOnAction);
}
if(watchedEvent===""&&event.type!=="flexslider-click"){
watchedEvent=event.type;
}
methods.setToClearWatchedEvent();
});
},
update: function(){
var disabledClass=namespace + 'disabled';
if(slider.pagingCount===1){
slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
}else if(!slider.vars.animationLoop){
if(slider.animatingTo===0){
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
}else if(slider.animatingTo===slider.last){
slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
}else{
slider.directionNav.removeClass(disabledClass).prop('tabindex', '-1');
}}else{
slider.directionNav.removeClass(disabledClass).prop('tabindex', '-1');
}}
},
pausePlay: {
setup: function(){
var pausePlayScaffold=$('<div class="' + namespace + 'pauseplay"><a href="#"></a></div>');
if(slider.controlsContainer){
slider.controlsContainer.append(pausePlayScaffold);
slider.pausePlay=$('.' + namespace + 'pauseplay a', slider.controlsContainer);
}else{
slider.append(pausePlayScaffold);
slider.pausePlay=$('.' + namespace + 'pauseplay a', slider);
}
methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause':namespace + 'play');
slider.pausePlay.on(eventType, function(event){
event.preventDefault();
if(watchedEvent===""||watchedEvent===event.type||event.type==="flexslider-click"){
if($(this).hasClass(namespace + 'pause')){
slider.manualPause=true;
slider.manualPlay=false;
slider.pause();
}else{
slider.manualPause=false;
slider.manualPlay=true;
slider.play();
}}
if(watchedEvent===""&&event.type!=="flexslider-click"){
watchedEvent=event.type;
}
methods.setToClearWatchedEvent();
});
},
update: function(state){
(state==="play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText):slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
}},
touch: function(){
var startX,
startY,
offset,
cwidth,
dx,
startT,
onTouchStart,
onTouchMove,
onTouchEnd,
scrolling=false,
localX=0,
localY=0,
accDx=0;
onTouchStart=function(e){
if(slider.animating){
e.preventDefault();
}else if(e.touches.length===1){
slider.pause();
cwidth=(vertical) ? slider.h:slider. w;
startT=Number(new Date());
localX=e.touches[0].pageX;
localY=e.touches[0].pageY;
offset=(carousel&&reverse&&slider.animatingTo===slider.last) ? 0 :
(carousel&&reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
(carousel&&slider.currentSlide===slider.last) ? slider.limit :
(carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
(reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth:(slider.currentSlide + slider.cloneOffset) * cwidth;
startX=(vertical) ? localY:localX;
startY=(vertical) ? localX:localY;
el.addEventListener('touchmove', onTouchMove, false);
el.addEventListener('touchend', onTouchEnd, false);
}};
onTouchMove=function(e){
localX=e.touches[0].pageX;
localY=e.touches[0].pageY;
dx=(vertical) ? startX - localY:(slider.vars.rtl?-1:1)*(startX - localX);
scrolling=(vertical) ? (Math.abs(dx) < Math.abs(localX - startY)):(Math.abs(dx) < Math.abs(localY - startY));
var fxms=500;
if(! scrolling||Number(new Date()) - startT > fxms){
e.preventDefault();
if(!fade){
if(!slider.vars.animationLoop){
dx=dx/((slider.currentSlide===0&&dx < 0||slider.currentSlide===slider.last&&dx > 0) ? (Math.abs(dx)/cwidth+2):1);
}
slider.setProps(offset + dx, "setTouch");
}}
};
onTouchEnd=function(e){
el.removeEventListener('touchmove', onTouchMove, false);
if(slider.animatingTo===slider.currentSlide&&!scrolling&&!(dx===null)){
var updateDx=(reverse) ? -dx:dx,
target=(updateDx > 0) ? slider.getTarget('next'):slider.getTarget('prev');
if(slider.canAdvance(target)&&(Number(new Date()) - startT < 550&&Math.abs(updateDx) > 50||Math.abs(updateDx) > cwidth/2)){
slider.flexAnimate(target, slider.vars.pauseOnAction);
}else{
if(!fade){ slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }}
}
el.removeEventListener('touchend', onTouchEnd, false);
startX=null;
startY=null;
dx=null;
offset=null;
};
el.addEventListener('touchstart', onTouchStart, false);
},
resize: function(){
if(!slider.animating&&slider.is(':visible')){
if(!carousel){ slider.doMath(); }
if(fade){
methods.smoothHeight();
}else if(carousel){
slider.slides.width(slider.computedW);
slider.update(slider.pagingCount);
slider.setProps();
}
else if(vertical){
slider.viewport.height(slider.h);
slider.setProps(slider.h, "setTotal");
}else{
slider.setProps(slider.computedW, "setTotal");
slider.newSlides.width(slider.computedW);
if(slider.vars.smoothHeight){ methods.smoothHeight(); }}
}},
smoothHeight: function(dur){
if(!vertical||fade){
var $obj=(fade) ? slider:slider.viewport;
$obj.css({"height": slider.slides.eq(slider.animatingTo).innerHeight(), "transition": dur ? ("height " + dur + "ms"):"none"});
}},
sync: function(action){
var $obj=$(slider.vars.sync).data("flexslider"),
target=slider.animatingTo;
switch (action){
case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
case "play": if(!$obj.playing&&!$obj.asNav){ $obj.play(); } break;
case "pause": $obj.pause(); break;
}},
uniqueID: function($clone){
$clone.filter('[id]').add($clone.find('[id]')).each(function(){
var $this=$(this);
$this.attr('id', $this.attr('id') + '_clone');
});
return $clone;
},
pauseInvisible: function(){
document.addEventListener('visibilitychange', function(){
if(document.visibilityState==='hidden'){
if(slider.startTimeout){
clearTimeout(slider.startTimeout);
}else{
slider.pause();
}}else{
if(slider.started){
slider.play();
}else{
if(slider.vars.initDelay > 0){
setTimeout(slider.play, slider.vars.initDelay);
}else{
slider.play();
}}
}});
},
setToClearWatchedEvent: function(){
clearTimeout(watchedEventClearTimer);
watchedEventClearTimer=setTimeout(function(){
watchedEvent="";
}, 3000);
}};
slider.flexAnimate=function(target, pause, override, withSync, fromNav){
if(!slider.vars.animationLoop&&target!==slider.currentSlide){
slider.direction=(target > slider.currentSlide) ? "next":"prev";
}
if(asNav&&slider.pagingCount===1) slider.direction=(slider.currentItem < target) ? "next":"prev";
if(!slider.animating&&(slider.canAdvance(target, fromNav)||override)&&slider.is(":visible")){
if(asNav&&withSync){
var master=$(slider.vars.asNavFor).data('flexslider');
slider.atEnd=target===0||target===slider.count - 1;
master.flexAnimate(target, true, false, true, fromNav);
slider.direction=(slider.currentItem < target) ? "next":"prev";
master.direction=slider.direction;
if(Math.ceil((target + 1)/slider.visible) - 1!==slider.currentSlide&&target!==0){
slider.currentItem=target;
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
target=Math.floor(target/slider.visible);
}else{
slider.currentItem=target;
slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
return false;
}}
slider.animating=true;
slider.animatingTo=target;
if(pause){ slider.pause(); }
slider.vars.before(slider);
if(slider.syncExists&&!fromNav){ methods.sync("animate"); }
if(slider.vars.controlNav){ methods.controlNav.active(); }
if(!carousel){ slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); }
slider.atEnd=target===0||target===slider.last;
if(slider.vars.directionNav){ methods.directionNav.update(); }
if(target===slider.last){
slider.vars.end(slider);
if(!slider.vars.animationLoop){ slider.pause(); }}
if(!fade){
var dimension=(vertical) ? slider.slides.filter(':first').height():slider.computedW,
margin, slideString, calcNext;
if(carousel){
margin=slider.vars.itemMargin;
calcNext=((slider.itemW + margin) * slider.move) * slider.animatingTo;
slideString=(calcNext > slider.limit&&slider.visible!==1) ? slider.limit:calcNext;
}else if(slider.currentSlide===0&&target===slider.count - 1&&slider.vars.animationLoop&&slider.direction!=="next"){
slideString=(reverse) ? (slider.count + slider.cloneOffset) * dimension:0;
}else if(slider.currentSlide===slider.last&&target===0&&slider.vars.animationLoop&&slider.direction!=="prev"){
slideString=(reverse) ? 0:(slider.count + 1) * dimension;
}else{
slideString=(reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension:(target + slider.cloneOffset) * dimension;
}
slider.setProps(slideString, "", slider.vars.animationSpeed);
if(!slider.vars.animationLoop||!slider.atEnd){
slider.animating=false;
slider.currentSlide=slider.animatingTo;
}
slider.container.off("transitionend");
slider.container.on("transitionend", function(){
clearTimeout(slider.ensureAnimationEnd);
slider.wrapup(dimension);
});
clearTimeout(slider.ensureAnimationEnd);
slider.ensureAnimationEnd=setTimeout(function(){
slider.wrapup(dimension);
}, slider.vars.animationSpeed + 100);
}else{
if(!touch){
slider.slides.eq(slider.currentSlide).off("transitionend");
slider.slides.eq(target).off("transitionend").on("transitionend", slider.wrapup);
}
slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
if(touch){
slider.wrapup(dimension);
}}
if(slider.vars.smoothHeight){ methods.smoothHeight(slider.vars.animationSpeed); }}
};
slider.wrapup=function(dimension){
if(!fade&&!carousel){
if(slider.currentSlide===0&&slider.animatingTo===slider.last&&slider.vars.animationLoop){
slider.setProps(dimension, "jumpEnd");
}else if(slider.currentSlide===slider.last&&slider.animatingTo===0&&slider.vars.animationLoop){
slider.setProps(dimension, "jumpStart");
}}
slider.animating=false;
slider.currentSlide=slider.animatingTo;
slider.vars.after(slider);
};
slider.animateSlides=function(){
if(!slider.animating&&focused){ slider.flexAnimate(slider.getTarget("next")); }};
slider.pause=function(){
clearInterval(slider.animatedSlides);
slider.animatedSlides=null;
slider.playing=false;
if(slider.vars.pausePlay){ methods.pausePlay.update("play"); }
if(slider.syncExists){ methods.sync("pause"); }};
slider.play=function(){
if(slider.playing){ clearInterval(slider.animatedSlides); }
slider.animatedSlides=slider.animatedSlides||setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
slider.started=slider.playing=true;
if(slider.vars.pausePlay){ methods.pausePlay.update("pause"); }
if(slider.syncExists){ methods.sync("play"); }};
slider.stop=function (){
slider.pause();
slider.stopped=true;
};
slider.canAdvance=function(target, fromNav){
var last=(asNav) ? slider.pagingCount - 1:slider.last;
return (fromNav) ? true :
(asNav&&slider.currentItem===slider.count - 1&&target===0&&slider.direction==="prev") ? true :
(asNav&&slider.currentItem===0&&target===slider.pagingCount - 1&&slider.direction!=="next") ? false :
(target===slider.currentSlide&&!asNav) ? false :
(slider.vars.animationLoop) ? true :
(slider.atEnd&&slider.currentSlide===0&&target===last&&slider.direction!=="next") ? false :
(slider.atEnd&&slider.currentSlide===last&&target===0&&slider.direction==="next") ? false :
true;
};
slider.getTarget=function(dir){
slider.direction=dir;
if(dir==="next"){
return (slider.currentSlide===slider.last) ? 0:slider.currentSlide + 1;
}else{
return (slider.currentSlide===0) ? slider.last:slider.currentSlide - 1;
}};
slider.setProps=function(pos, special, dur){
var target=(function(){
var posCheck=(pos) ? pos:((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
posCalc=(function(){
if(carousel){
return (special==="setTouch") ? pos :
(reverse&&slider.animatingTo===slider.last) ? 0 :
(reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
(slider.animatingTo===slider.last) ? slider.limit:posCheck;
}else{
switch (special){
case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos:(slider.currentSlide + slider.cloneOffset) * pos;
case "setTouch": return (reverse) ? pos:pos;
case "jumpEnd": return (reverse) ? pos:slider.count * pos;
case "jumpStart": return (reverse) ? slider.count * pos:pos;
default: return pos;
}}
}());
return (posCalc * ((slider.vars.rtl)?1:-1)) + "px";
}());
dur=(dur!==undefined) ? (dur/1000) + "s":"0s";
slider.container.css("transition-duration", dur);
if(slider.transforms){
target=(vertical) ? "translate3d(0," + target + ",0)":"translate3d(" + (parseInt(target)+'px') + ",0,0)";
}else{
slider.container.css("transition-timing-function", easing);
}
slider.args[slider.prop]=target;
slider.container.css(slider.args);
};
slider.setup=function(type){
if(!fade){
var sliderOffset, arr;
if(type==="init"){
slider.viewport=$('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
slider.cloneCount=0;
slider.cloneOffset=0;
if(reverse){
arr=$.makeArray(slider.slides).reverse();
slider.slides=$(arr);
slider.container.empty().append(slider.slides);
}}
if(slider.vars.animationLoop&&!carousel){
slider.cloneCount=2;
slider.cloneOffset=1;
if(type!=="init"){ slider.container.find('.clone').remove(); }
slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
.prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
}
slider.newSlides=$(slider.vars.selector, slider);
sliderOffset=(reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset:slider.currentSlide + slider.cloneOffset;
if(vertical&&!carousel){
slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
setTimeout(function(){
slider.newSlides.css({"display": "block"});
slider.doMath();
slider.viewport.height(slider.h);
slider.setProps(sliderOffset * slider.h, "init");
}, (type==="init") ? 100:0);
}else{
slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
slider.setProps(sliderOffset * slider.computedW, "init");
setTimeout(function(){
slider.doMath();
if(slider.vars.rtl){
slider.newSlides.css({"width": slider.computedW, "marginRight":slider.computedM, "float": "right", "display": "block"});
}else{
slider.newSlides.css({"width": slider.computedW, "marginRight":slider.computedM, "float": "left", "display": "block"});
}
if(slider.vars.smoothHeight){ methods.smoothHeight(); }}, (type==="init") ? 100:0);
}}else{
if(slider.vars.rtl){
slider.slides.css({"width": "100%", "float": 'right', "marginLeft": "-100%", "position": "relative"});
}else{
slider.slides.css({"width": "100%", "float": 'left', "marginRight": "-100%", "position": "relative"});
}
if(type==="init"){
if(!touch){
if(slider.vars.fadeFirstSlide==false){
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2 });
slider.slides.outerWidth();
}else{
slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).outerWidth();
slider.slides.eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2 });
}
slider.slides.css({ "transition": "opacity " + slider.vars.animationSpeed / 1000 + "s " + easing });
}else{
slider.slides.css({ "opacity": 0, "display": "block", "transition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2 });
}}
if(slider.vars.smoothHeight){ methods.smoothHeight(); }}
if(!carousel){ slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); }
slider.vars.init(slider);
};
slider.doMath=function(){
var slide=slider.slides.first(),
slideMargin=slider.vars.itemMargin,
minItems=slider.vars.minItems,
maxItems=slider.vars.maxItems;
slider.w=(slider.viewport===undefined) ? slider.width():slider.viewport.width();
if(slider.isFirefox){ slider.w=slider.width(); }
slider.h=slide.height();
slider.boxPadding=slide.outerWidth() - slide.width();
if(carousel){
slider.itemT=slider.vars.itemWidth + slideMargin;
slider.itemM=slideMargin;
slider.minW=(minItems) ? minItems * slider.itemT:slider.w;
slider.maxW=(maxItems) ? (maxItems * slider.itemT) - slideMargin:slider.w;
slider.itemW=(slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
(slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
(slider.vars.itemWidth > slider.w) ? slider.w:slider.vars.itemWidth;
slider.visible=Math.floor(slider.w/(slider.itemW));
slider.move=(slider.vars.move > 0&&slider.vars.move < slider.visible) ? slider.vars.move:slider.visible;
slider.pagingCount=Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
slider.last=slider.pagingCount - 1;
slider.limit=(slider.pagingCount===1) ? 0 :
(slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)):((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
}else{
slider.itemW=slider.w;
slider.itemM=slideMargin;
slider.pagingCount=slider.count;
slider.last=slider.count - 1;
}
slider.computedW=slider.itemW - slider.boxPadding;
slider.computedM=slider.itemM;
};
slider.update=function(pos, action){
slider.doMath();
if(!carousel){
if(pos < slider.currentSlide){
slider.currentSlide +=1;
}else if(pos <=slider.currentSlide&&pos!==0){
slider.currentSlide -=1;
}
slider.animatingTo=slider.currentSlide;
}
if(slider.vars.controlNav&&!slider.manualControls){
if((action==="add"&&!carousel)||slider.pagingCount > slider.controlNav.length){
methods.controlNav.update("add");
}else if((action==="remove"&&!carousel)||slider.pagingCount < slider.controlNav.length){
if(carousel&&slider.currentSlide > slider.last){
slider.currentSlide -=1;
slider.animatingTo -=1;
}
methods.controlNav.update("remove", slider.last);
}}
if(slider.vars.directionNav){ methods.directionNav.update(); }};
slider.addSlide=function(obj, pos){
var $obj=$(obj);
slider.count +=1;
slider.last=slider.count - 1;
if(vertical&&reverse){
(pos!==undefined) ? slider.slides.eq(slider.count - pos).after($obj):slider.container.prepend($obj);
}else{
(pos!==undefined) ? slider.slides.eq(pos).before($obj):slider.container.append($obj);
}
slider.update(pos, "add");
slider.slides=$(slider.vars.selector + ':not(.clone)', slider);
slider.setup();
slider.vars.added(slider);
};
slider.removeSlide=function(obj){
var pos=(isNaN(obj)) ? slider.slides.index($(obj)):obj;
slider.count -=1;
slider.last=slider.count - 1;
if(isNaN(obj)){
$(obj, slider.slides).remove();
}else{
(vertical&&reverse) ? slider.slides.eq(slider.last).remove():slider.slides.eq(obj).remove();
}
slider.doMath();
slider.update(pos, "remove");
slider.slides=$(slider.vars.selector + ':not(.clone)', slider);
slider.setup();
slider.vars.removed(slider);
};
methods.init();
};
$(window).on('blur', function(e){
focused=false;
}).on('focus', function(e){
focused=true;
});
$.flexslider.defaults={
namespace: "flex-",
selector: ".slides > li",
animation: "fade",
easing: "swing",
direction: "horizontal",
reverse: false,
animationLoop: true,
smoothHeight: false,
startAt: 0,
slideshow: true,
slideshowSpeed: 7000,
animationSpeed: 600,
initDelay: 0,
randomize: false,
fadeFirstSlide: true,
thumbCaptions: false,
pauseOnAction: true,
pauseOnHover: false,
pauseInvisible: true,
useCSS: true,
touch: true,
video: false,
controlNav: true,
directionNav: true,
prevText: "Previous",
nextText: "Next",
keyboard: true,
multipleKeyboard: false,
mousewheel: false,
pausePlay: false,
pauseText: "Pause",
playText: "Play",
controlsContainer: "",
manualControls: "",
customDirectionNav: "",
sync: "",
asNavFor: "",
itemWidth: 0,
itemMargin: 0,
minItems: 1,
maxItems: 0,
move: 0,
allowOneSlide: true,
isFirefox: false,
start: function(){},
before: function(){},
after: function(){},
end: function(){},
added: function(){},
removed: function(){},
init: function(){},
rtl: false
};
$.fn.flexslider=function(options){
if(options===undefined){ options={};}
if(typeof options==="object"){
return this.each(function(){
var $this=$(this),
selector=(options.selector) ? options.selector:".slides > li",
$slides=$this.find(selector);
if(( $slides.length===1&&options.allowOneSlide===false)||$slides.length===0){
var fadeIn=[{ opacity: 0 }, { opacity: 1 }];
if($slides.length){ $slides[0].animate(fadeIn, 400); }
if(options.start){ options.start($this); }}else if($this.data('flexslider')===undefined){
new $.flexslider(this, options);
}});
}else{
var $slider=$(this).data('flexslider');
switch (options){
case "play": $slider.play(); break;
case "pause": $slider.pause(); break;
case "stop": $slider.stop(); break;
case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
case "prev":
case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
default: if(typeof options==="number"){ $slider.flexAnimate(options, true); }}
}};})(jQuery);