(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=global||self,global.PerfectScrollbar=factory())})(this,function(){"use strict";function get(element){return getComputedStyle(element)}function set(element,obj){for(var key in obj){var val=obj[key];if(typeof val==="number"){val=val+"px"}element.style[key]=val}return element}function div(className){var div=document.createElement("div");div.className=className;return div}var elMatches=typeof Element!=="undefined"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function matches(element,query){if(!elMatches){throw new Error("No element matching method supported")}return elMatches.call(element,query)}function remove(element){if(element.remove){element.remove()}else{if(element.parentNode){element.parentNode.removeChild(element)}}}function queryChildren(element,selector){return Array.prototype.filter.call(element.children,function(child){return matches(child,selector)})}var cls={main:"ps",rtl:"ps__rtl",element:{thumb:function(x){return"ps__thumb-"+x},rail:function(x){return"ps__rail-"+x},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(x){return"ps--active-"+x},scrolling:function(x){return"ps--scrolling-"+x}}};var scrollingClassTimeout={x:null,y:null};function addScrollingClass(i,x){var classList=i.element.classList;var className=cls.state.scrolling(x);if(classList.contains(className)){clearTimeout(scrollingClassTimeout[x])}else{classList.add(className)}}function removeScrollingClass(i,x){scrollingClassTimeout[x]=setTimeout(function(){return i.isAlive&&i.element.classList.remove(cls.state.scrolling(x))},i.settings.scrollingThreshold)}function setScrollingClassInstantly(i,x){addScrollingClass(i,x);removeScrollingClass(i,x)}var EventElement=function EventElement(element){this.element=element;this.handlers={}};var prototypeAccessors={isEmpty:{configurable:true}};EventElement.prototype.bind=function bind(eventName,handler){if(typeof this.handlers[eventName]==="undefined"){this.handlers[eventName]=[]}this.handlers[eventName].push(handler);this.element.addEventListener(eventName,handler,false)};EventElement.prototype.unbind=function unbind(eventName,target){var this$1=this;this.handlers[eventName]=this.handlers[eventName].filter(function(handler){if(target&&handler!==target){return true}this$1.element.removeEventListener(eventName,handler,false);return false})};EventElement.prototype.unbindAll=function unbindAll(){for(var name in this.handlers){this.unbind(name)}};prototypeAccessors.isEmpty.get=function(){var this$1=this;return Object.keys(this.handlers).every(function(key){return this$1.handlers[key].length===0})};Object.defineProperties(EventElement.prototype,prototypeAccessors);var EventManager=function EventManager(){this.eventElements=[]};EventManager.prototype.eventElement=function eventElement(element){var ee=this.eventElements.filter(function(ee){return ee.element===element})[0];if(!ee){ee=new EventElement(element);this.eventElements.push(ee)}return ee};EventManager.prototype.bind=function bind(element,eventName,handler){this.eventElement(element).bind(eventName,handler)};EventManager.prototype.unbind=function unbind(element,eventName,handler){var ee=this.eventElement(element);ee.unbind(eventName,handler);if(ee.isEmpty){this.eventElements.splice(this.eventElements.indexOf(ee),1)}};EventManager.prototype.unbindAll=function unbindAll(){this.eventElements.forEach(function(e){return e.unbindAll()});this.eventElements=[]};EventManager.prototype.once=function once(element,eventName,handler){var ee=this.eventElement(element);var onceHandler=function(evt){ee.unbind(eventName,onceHandler);handler(evt)};ee.bind(eventName,onceHandler)};function createEvent(name){if(typeof window.CustomEvent==="function"){return new CustomEvent(name)}else{var evt=document.createEvent("CustomEvent");evt.initCustomEvent(name,false,false,undefined);return evt}}function processScrollDiff(i,axis,diff,useScrollingClass,forceFireReachEvent){if(useScrollingClass===void 0)useScrollingClass=true;if(forceFireReachEvent===void 0)forceFireReachEvent=false;var fields;if(axis==="top"){fields=["contentHeight","containerHeight","scrollTop","y","up","down"]}else if(axis==="left"){fields=["contentWidth","containerWidth","scrollLeft","x","left","right"]}else{throw new Error("A proper axis should be provided")}processScrollDiff$1(i,diff,fields,useScrollingClass,forceFireReachEvent)}function processScrollDiff$1(i,diff,ref,useScrollingClass,forceFireReachEvent){var contentHeight=ref[0];var containerHeight=ref[1];var scrollTop=ref[2];var y=ref[3];var up=ref[4];var down=ref[5];if(useScrollingClass===void 0)useScrollingClass=true;if(forceFireReachEvent===void 0)forceFireReachEvent=false;var element=i.element;i.reach[y]=null;if(element[scrollTop]<1){i.reach[y]="start"}if(element[scrollTop]>i[contentHeight]-i[containerHeight]-1){i.reach[y]="end"}if(diff){element.dispatchEvent(createEvent("ps-scroll-"+y));if(diff<0){element.dispatchEvent(createEvent("ps-scroll-"+up))}else if(diff>0){element.dispatchEvent(createEvent("ps-scroll-"+down))}if(useScrollingClass){setScrollingClassInstantly(i,y)}}if(i.reach[y]&&(diff||forceFireReachEvent)){element.dispatchEvent(createEvent("ps-"+y+"-reach-"+i.reach[y]))}}function toInt(x){return parseInt(x,10)||0}function isEditable(el){return matches(el,"input,[contenteditable]")||matches(el,"select,[contenteditable]")||matches(el,"textarea,[contenteditable]")||matches(el,"button,[contenteditable]")}function outerWidth(element){var styles=get(element);return toInt(styles.width)+toInt(styles.paddingLeft)+toInt(styles.paddingRight)+toInt(styles.borderLeftWidth)+toInt(styles.borderRightWidth)}var env={isWebKit:typeof document!=="undefined"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window!=="undefined"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator!=="undefined"&&navigator.msMaxTouchPoints,isChrome:typeof navigator!=="undefined"&&/Chrome/i.test(navigator&&navigator.userAgent)};function updateGeometry(i){var element=i.element;var roundedScrollTop=Math.floor(element.scrollTop);var rect=element.getBoundingClientRect();i.containerWidth=Math.round(rect.width);i.containerHeight=Math.round(rect.height);i.contentWidth=element.scrollWidth;i.contentHeight=element.scrollHeight;if(!element.contains(i.scrollbarXRail)){queryChildren(element,cls.element.rail("x")).forEach(function(el){return remove(el)});element.appendChild(i.scrollbarXRail)}if(!element.contains(i.scrollbarYRail)){queryChildren(element,cls.element.rail("y")).forEach(function(el){return remove(el)});element.appendChild(i.scrollbarYRail)}if(!i.settings.suppressScrollX&&i.containerWidth+i.settings.scrollXMarginOffset<i.contentWidth){i.scrollbarXActive=true;i.railXWidth=i.containerWidth-i.railXMarginWidth;i.railXRatio=i.containerWidth/i.railXWidth;i.scrollbarXWidth=getThumbSize(i,toInt(i.railXWidth*i.containerWidth/i.contentWidth));i.scrollbarXLeft=toInt((i.negativeScrollAdjustment+element.scrollLeft)*(i.railXWidth-i.scrollbarXWidth)/(i.contentWidth-i.containerWidth))}else{i.scrollbarXActive=false}if(!i.settings.suppressScrollY&&i.containerHeight+i.settings.scrollYMarginOffset<i.contentHeight){i.scrollbarYActive=true;i.railYHeight=i.containerHeight-i.railYMarginHeight;i.railYRatio=i.containerHeight/i.railYHeight;i.scrollbarYHeight=getThumbSize(i,toInt(i.railYHeight*i.containerHeight/i.contentHeight));i.scrollbarYTop=toInt(roundedScrollTop*(i.railYHeight-i.scrollbarYHeight)/(i.contentHeight-i.containerHeight))}else{i.scrollbarYActive=false}if(i.scrollbarXLeft>=i.railXWidth-i.scrollbarXWidth){i.scrollbarXLeft=i.railXWidth-i.scrollbarXWidth}if(i.scrollbarYTop>=i.railYHeight-i.scrollbarYHeight){i.scrollbarYTop=i.railYHeight-i.scrollbarYHeight}updateCss(element,i);if(i.scrollbarXActive){element.classList.add(cls.state.active("x"))}else{element.classList.remove(cls.state.active("x"));i.scrollbarXWidth=0;i.scrollbarXLeft=0;element.scrollLeft=i.isRtl===true?i.contentWidth:0}if(i.scrollbarYActive){element.classList.add(cls.state.active("y"))}else{element.classList.remove(cls.state.active("y"));i.scrollbarYHeight=0;i.scrollbarYTop=0;element.scrollTop=0}}function getThumbSize(i,thumbSize){if(i.settings.minScrollbarLength){thumbSize=Math.max(thumbSize,i.settings.minScrollbarLength)}if(i.settings.maxScrollbarLength){thumbSize=Math.min(thumbSize,i.settings.maxScrollbarLength)}return thumbSize}function updateCss(element,i){var xRailOffset={width:i.railXWidth};var roundedScrollTop=Math.floor(element.scrollTop);if(i.isRtl){xRailOffset.left=i.negativeScrollAdjustment+element.scrollLeft+i.containerWidth-i.contentWidth}else{xRailOffset.left=element.scrollLeft}if(i.isScrollbarXUsingBottom){xRailOffset.bottom=i.scrollbarXBottom-roundedScrollTop}else{xRailOffset.top=i.scrollbarXTop+roundedScrollTop}set(i.scrollbarXRail,xRailOffset);var yRailOffset={top:roundedScrollTop,height:i.railYHeight};if(i.isScrollbarYUsingRight){if(i.isRtl){yRailOffset.right=i.contentWidth-(i.negativeScrollAdjustment+element.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth-9}else{yRailOffset.right=i.scrollbarYRight-element.scrollLeft}}else{if(i.isRtl){yRailOffset.left=i.negativeScrollAdjustment+element.scrollLeft+i.containerWidth*2-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth}else{yRailOffset.left=i.scrollbarYLeft+element.scrollLeft}}set(i.scrollbarYRail,yRailOffset);set(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth});set(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}function clickRail(i){var element=i.element;i.event.bind(i.scrollbarY,"mousedown",function(e){return e.stopPropagation()});i.event.bind(i.scrollbarYRail,"mousedown",function(e){var positionTop=e.pageY-window.pageYOffset-i.scrollbarYRail.getBoundingClientRect().top;var direction=positionTop>i.scrollbarYTop?1:-1;i.element.scrollTop+=direction*i.containerHeight;updateGeometry(i);e.stopPropagation()});i.event.bind(i.scrollbarX,"mousedown",function(e){return e.stopPropagation()});i.event.bind(i.scrollbarXRail,"mousedown",function(e){var positionLeft=e.pageX-window.pageXOffset-i.scrollbarXRail.getBoundingClientRect().left;var direction=positionLeft>i.scrollbarXLeft?1:-1;i.element.scrollLeft+=direction*i.containerWidth;updateGeometry(i);e.stopPropagation()})}function dragThumb(i){bindMouseScrollHandler(i,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]);bindMouseScrollHandler(i,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function bindMouseScrollHandler(i,ref){var containerHeight=ref[0];var contentHeight=ref[1];var pageY=ref[2];var railYHeight=ref[3];var scrollbarY=ref[4];var scrollbarYHeight=ref[5];var scrollTop=ref[6];var y=ref[7];var scrollbarYRail=ref[8];var element=i.element;var startingScrollTop=null;var startingMousePageY=null;var scrollBy=null;function mouseMoveHandler(e){if(e.touches&&e.touches[0]){e[pageY]=e.touches[0].pageY}element[scrollTop]=startingScrollTop+scrollBy*(e[pageY]-startingMousePageY);addScrollingClass(i,y);updateGeometry(i);e.stopPropagation();if(e.type.startsWith("touch")&&e.changedTouches.length>1){e.preventDefault()}}function mouseUpHandler(){removeScrollingClass(i,y);i[scrollbarYRail].classList.remove(cls.state.clicking);i.event.unbind(i.ownerDocument,"mousemove",mouseMoveHandler)}function bindMoves(e,touchMode){startingScrollTop=element[scrollTop];if(touchMode&&e.touches){e[pageY]=e.touches[0].pageY}startingMousePageY=e[pageY];scrollBy=(i[contentHeight]-i[containerHeight])/(i[railYHeight]-i[scrollbarYHeight]);if(!touchMode){i.event.bind(i.ownerDocument,"mousemove",mouseMoveHandler);i.event.once(i.ownerDocument,"mouseup",mouseUpHandler);e.preventDefault()}else{i.event.bind(i.ownerDocument,"touchmove",mouseMoveHandler)}i[scrollbarYRail].classList.add(cls.state.clicking);e.stopPropagation()}i.event.bind(i[scrollbarY],"mousedown",function(e){bindMoves(e)});i.event.bind(i[scrollbarY],"touchstart",function(e){bindMoves(e,true)})}function keyboard(i){var element=i.element;var elementHovered=function(){return matches(element,":hover")};var scrollbarFocused=function(){return matches(i.scrollbarX,":focus")||matches(i.scrollbarY,":focus")};function shouldPreventDefault(deltaX,deltaY){var scrollTop=Math.floor(element.scrollTop);if(deltaX===0){if(!i.scrollbarYActive){return false}if(scrollTop===0&&deltaY>0||scrollTop>=i.contentHeight-i.containerHeight&&deltaY<0){return!i.settings.wheelPropagation}}var scrollLeft=element.scrollLeft;if(deltaY===0){if(!i.scrollbarXActive){return false}if(scrollLeft===0&&deltaX<0||scrollLeft>=i.contentWidth-i.containerWidth&&deltaX>0){return!i.settings.wheelPropagation}}return true}i.event.bind(i.ownerDocument,"keydown",function(e){if(e.isDefaultPrevented&&e.isDefaultPrevented()||e.defaultPrevented){return}if(!elementHovered()&&!scrollbarFocused()){return}var activeElement=document.activeElement?document.activeElement:i.ownerDocument.activeElement;if(activeElement){if(activeElement.tagName==="IFRAME"){activeElement=activeElement.contentDocument.activeElement}else{while(activeElement.shadowRoot){activeElement=activeElement.shadowRoot.activeElement}}if(isEditable(activeElement)){return}}var deltaX=0;var deltaY=0;switch(e.which){case 37:if(e.metaKey){deltaX=-i.contentWidth}else if(e.altKey){deltaX=-i.containerWidth}else{deltaX=-30}break;case 38:if(e.metaKey){deltaY=i.contentHeight}else if(e.altKey){deltaY=i.containerHeight}else{deltaY=30}break;case 39:if(e.metaKey){deltaX=i.contentWidth}else if(e.altKey){deltaX=i.containerWidth}else{deltaX=30}break;case 40:if(e.metaKey){deltaY=-i.contentHeight}else if(e.altKey){deltaY=-i.containerHeight}else{deltaY=-30}break;case 32:if(e.shiftKey){deltaY=i.containerHeight}else{deltaY=-i.containerHeight}break;case 33:deltaY=i.containerHeight;break;case 34:deltaY=-i.containerHeight;break;case 36:deltaY=i.contentHeight;break;case 35:deltaY=-i.contentHeight;break;default:return}if(i.settings.suppressScrollX&&deltaX!==0){return}if(i.settings.suppressScrollY&&deltaY!==0){return}element.scrollTop-=deltaY;element.scrollLeft+=deltaX;updateGeometry(i);if(shouldPreventDefault(deltaX,deltaY)){e.preventDefault()}})}function wheel(i){var element=i.element;function shouldPreventDefault(deltaX,deltaY){var roundedScrollTop=Math.floor(element.scrollTop);var isTop=element.scrollTop===0;var isBottom=roundedScrollTop+element.offsetHeight===element.scrollHeight;var isLeft=element.scrollLeft===0;var isRight=element.scrollLeft+element.offsetWidth===element.scrollWidth;var hitsBound;if(Math.abs(deltaY)>Math.abs(deltaX)){hitsBound=isTop||isBottom}else{hitsBound=isLeft||isRight}return hitsBound?!i.settings.wheelPropagation:true}function getDeltaFromEvent(e){var deltaX=e.deltaX;var deltaY=-1*e.deltaY;if(typeof deltaX==="undefined"||typeof deltaY==="undefined"){deltaX=-1*e.wheelDeltaX/6;deltaY=e.wheelDeltaY/6}if(e.deltaMode&&e.deltaMode===1){deltaX*=10;deltaY*=10}if(deltaX!==deltaX&&deltaY!==deltaY){deltaX=0;deltaY=e.wheelDelta}if(e.shiftKey){return[-deltaY,-deltaX]}return[deltaX,deltaY]}function shouldBeConsumedByChild(target,deltaX,deltaY){if(!env.isWebKit&&element.querySelector("select:focus")){return true}if(!element.contains(target)){return false}var cursor=target;while(cursor&&cursor!==element){if(cursor.classList.contains(cls.element.consuming)){return true}var style=get(cursor);if(deltaY&&style.overflowY.match(/(scroll|auto)/)){var maxScrollTop=cursor.scrollHeight-cursor.clientHeight;if(maxScrollTop>0){if(cursor.scrollTop>0&&deltaY<0||cursor.scrollTop<maxScrollTop&&deltaY>0){return true}}}if(deltaX&&style.overflowX.match(/(scroll|auto)/)){var maxScrollLeft=cursor.scrollWidth-cursor.clientWidth;if(maxScrollLeft>0){if(cursor.scrollLeft>0&&deltaX<0||cursor.scrollLeft<maxScrollLeft&&deltaX>0){return true}}}cursor=cursor.parentNode}return false}function mousewheelHandler(e){var ref=getDeltaFromEvent(e);var deltaX=ref[0];var deltaY=ref[1];if(shouldBeConsumedByChild(e.target,deltaX,deltaY)){return}var shouldPrevent=false;if(!i.settings.useBothWheelAxes){element.scrollTop-=deltaY*i.settings.wheelSpeed;element.scrollLeft+=deltaX*i.settings.wheelSpeed}else if(i.scrollbarYActive&&!i.scrollbarXActive){if(deltaY){element.scrollTop-=deltaY*i.settings.wheelSpeed}else{element.scrollTop+=deltaX*i.settings.wheelSpeed}shouldPrevent=true}else if(i.scrollbarXActive&&!i.scrollbarYActive){if(deltaX){element.scrollLeft+=deltaX*i.settings.wheelSpeed}else{element.scrollLeft-=deltaY*i.settings.wheelSpeed}shouldPrevent=true}updateGeometry(i);shouldPrevent=shouldPrevent||shouldPreventDefault(deltaX,deltaY);if(shouldPrevent&&!e.ctrlKey){e.stopPropagation();e.preventDefault()}}if(typeof window.onwheel!=="undefined"){i.event.bind(element,"wheel",mousewheelHandler)}else if(typeof window.onmousewheel!=="undefined"){i.event.bind(element,"mousewheel",mousewheelHandler)}}function touch(i){if(!env.supportsTouch&&!env.supportsIePointer){return}var element=i.element;function shouldPrevent(deltaX,deltaY){var scrollTop=Math.floor(element.scrollTop);var scrollLeft=element.scrollLeft;var magnitudeX=Math.abs(deltaX);var magnitudeY=Math.abs(deltaY);if(magnitudeY>magnitudeX){if(deltaY<0&&scrollTop===i.contentHeight-i.containerHeight||deltaY>0&&scrollTop===0){return window.scrollY===0&&deltaY>0&&env.isChrome}}else if(magnitudeX>magnitudeY){if(deltaX<0&&scrollLeft===i.contentWidth-i.containerWidth||deltaX>0&&scrollLeft===0){return true}}return true}function applyTouchMove(differenceX,differenceY){element.scrollTop-=differenceY;element.scrollLeft-=differenceX;updateGeometry(i)}var startOffset={};var startTime=0;var speed={};var easingLoop=null;function getTouch(e){if(e.targetTouches){return e.targetTouches[0]}else{return e}}function shouldHandle(e){if(e.pointerType&&e.pointerType==="pen"&&e.buttons===0){return false}if(e.targetTouches&&e.targetTouches.length===1){return true}if(e.pointerType&&e.pointerType!=="mouse"&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE){return true}return false}function touchStart(e){if(!shouldHandle(e)){return}var touch=getTouch(e);startOffset.pageX=touch.pageX;startOffset.pageY=touch.pageY;startTime=(new Date).getTime();if(easingLoop!==null){clearInterval(easingLoop)}}function shouldBeConsumedByChild(target,deltaX,deltaY){if(!element.contains(target)){return false}var cursor=target;while(cursor&&cursor!==element){if(cursor.classList.contains(cls.element.consuming)){return true}var style=get(cursor);if(deltaY&&style.overflowY.match(/(scroll|auto)/)){var maxScrollTop=cursor.scrollHeight-cursor.clientHeight;if(maxScrollTop>0){if(cursor.scrollTop>0&&deltaY<0||cursor.scrollTop<maxScrollTop&&deltaY>0){return true}}}if(deltaX&&style.overflowX.match(/(scroll|auto)/)){var maxScrollLeft=cursor.scrollWidth-cursor.clientWidth;if(maxScrollLeft>0){if(cursor.scrollLeft>0&&deltaX<0||cursor.scrollLeft<maxScrollLeft&&deltaX>0){return true}}}cursor=cursor.parentNode}return false}function touchMove(e){if(shouldHandle(e)){var touch=getTouch(e);var currentOffset={pageX:touch.pageX,pageY:touch.pageY};var differenceX=currentOffset.pageX-startOffset.pageX;var differenceY=currentOffset.pageY-startOffset.pageY;if(shouldBeConsumedByChild(e.target,differenceX,differenceY)){return}applyTouchMove(differenceX,differenceY);startOffset=currentOffset;var currentTime=(new Date).getTime();var timeGap=currentTime-startTime;if(timeGap>0){speed.x=differenceX/timeGap;speed.y=differenceY/timeGap;startTime=currentTime}if(shouldPrevent(differenceX,differenceY)){e.preventDefault()}}}function touchEnd(){if(i.settings.swipeEasing){clearInterval(easingLoop);easingLoop=setInterval(function(){if(i.isInitialized){clearInterval(easingLoop);return}if(!speed.x&&!speed.y){clearInterval(easingLoop);return}if(Math.abs(speed.x)<.01&&Math.abs(speed.y)<.01){clearInterval(easingLoop);return}if(!i.element){clearInterval(easingLoop);return}applyTouchMove(speed.x*30,speed.y*30);speed.x*=.8;speed.y*=.8},10)}}if(env.supportsTouch){i.event.bind(element,"touchstart",touchStart);i.event.bind(element,"touchmove",touchMove);i.event.bind(element,"touchend",touchEnd)}else if(env.supportsIePointer){if(window.PointerEvent){i.event.bind(element,"pointerdown",touchStart);i.event.bind(element,"pointermove",touchMove);i.event.bind(element,"pointerup",touchEnd)}else if(window.MSPointerEvent){i.event.bind(element,"MSPointerDown",touchStart);i.event.bind(element,"MSPointerMove",touchMove);i.event.bind(element,"MSPointerUp",touchEnd)}}}var defaultSettings=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:false,suppressScrollY:false,swipeEasing:true,useBothWheelAxes:false,wheelPropagation:true,wheelSpeed:1}};var handlers={"click-rail":clickRail,"drag-thumb":dragThumb,keyboard:keyboard,wheel:wheel,touch:touch};var PerfectScrollbar=function PerfectScrollbar(element,userSettings){var this$1=this;if(userSettings===void 0)userSettings={};if(typeof element==="string"){element=document.querySelector(element)}if(!element||!element.nodeName){throw new Error("no element is specified to initialize PerfectScrollbar")}this.element=element;element.classList.add(cls.main);this.settings=defaultSettings();for(var key in userSettings){this.settings[key]=userSettings[key]}this.containerWidth=null;this.containerHeight=null;this.contentWidth=null;this.contentHeight=null;var focus=function(){return element.classList.add(cls.state.focus)};var blur=function(){return element.classList.remove(cls.state.focus)};this.isRtl=get(element).direction==="rtl";if(this.isRtl===true){element.classList.add(cls.rtl)}this.isNegativeScroll=function(){var originalScrollLeft=element.scrollLeft;var result=null;element.scrollLeft=-1;result=element.scrollLeft<0;element.scrollLeft=originalScrollLeft;return result}();this.negativeScrollAdjustment=this.isNegativeScroll?element.scrollWidth-element.clientWidth:0;this.event=new EventManager;this.ownerDocument=element.ownerDocument||document;this.scrollbarXRail=div(cls.element.rail("x"));element.appendChild(this.scrollbarXRail);this.scrollbarX=div(cls.element.thumb("x"));this.scrollbarXRail.appendChild(this.scrollbarX);this.scrollbarX.setAttribute("tabindex",0);this.event.bind(this.scrollbarX,"focus",focus);this.event.bind(this.scrollbarX,"blur",blur);this.scrollbarXActive=null;this.scrollbarXWidth=null;this.scrollbarXLeft=null;var railXStyle=get(this.scrollbarXRail);this.scrollbarXBottom=parseInt(railXStyle.bottom,10);if(isNaN(this.scrollbarXBottom)){this.isScrollbarXUsingBottom=false;this.scrollbarXTop=toInt(railXStyle.top)}else{this.isScrollbarXUsingBottom=true}this.railBorderXWidth=toInt(railXStyle.borderLeftWidth)+toInt(railXStyle.borderRightWidth);set(this.scrollbarXRail,{display:"block"});this.railXMarginWidth=toInt(railXStyle.marginLeft)+toInt(railXStyle.marginRight);set(this.scrollbarXRail,{display:""});this.railXWidth=null;this.railXRatio=null;this.scrollbarYRail=div(cls.element.rail("y"));element.appendChild(this.scrollbarYRail);this.scrollbarY=div(cls.element.thumb("y"));this.scrollbarYRail.appendChild(this.scrollbarY);this.scrollbarY.setAttribute("tabindex",0);this.event.bind(this.scrollbarY,"focus",focus);this.event.bind(this.scrollbarY,"blur",blur);this.scrollbarYActive=null;this.scrollbarYHeight=null;this.scrollbarYTop=null;var railYStyle=get(this.scrollbarYRail);this.scrollbarYRight=parseInt(railYStyle.right,10);if(isNaN(this.scrollbarYRight)){this.isScrollbarYUsingRight=false;this.scrollbarYLeft=toInt(railYStyle.left)}else{this.isScrollbarYUsingRight=true}this.scrollbarYOuterWidth=this.isRtl?outerWidth(this.scrollbarY):null;this.railBorderYWidth=toInt(railYStyle.borderTopWidth)+toInt(railYStyle.borderBottomWidth);set(this.scrollbarYRail,{display:"block"});this.railYMarginHeight=toInt(railYStyle.marginTop)+toInt(railYStyle.marginBottom);set(this.scrollbarYRail,{display:""});this.railYHeight=null;this.railYRatio=null;this.reach={x:element.scrollLeft<=0?"start":element.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:element.scrollTop<=0?"start":element.scrollTop>=this.contentHeight-this.containerHeight?"end":null};this.isAlive=true;this.settings.handlers.forEach(function(handlerName){return handlers[handlerName](this$1)});this.lastScrollTop=Math.floor(element.scrollTop);this.lastScrollLeft=element.scrollLeft;this.event.bind(this.element,"scroll",function(e){return this$1.onScroll(e)});updateGeometry(this)};PerfectScrollbar.prototype.update=function update(){if(!this.isAlive){return}this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0;set(this.scrollbarXRail,{display:"block"});set(this.scrollbarYRail,{display:"block"});this.railXMarginWidth=toInt(get(this.scrollbarXRail).marginLeft)+toInt(get(this.scrollbarXRail).marginRight);this.railYMarginHeight=toInt(get(this.scrollbarYRail).marginTop)+toInt(get(this.scrollbarYRail).marginBottom);set(this.scrollbarXRail,{display:"none"});set(this.scrollbarYRail,{display:"none"});updateGeometry(this);processScrollDiff(this,"top",0,false,true);processScrollDiff(this,"left",0,false,true);set(this.scrollbarXRail,{display:""});set(this.scrollbarYRail,{display:""})};PerfectScrollbar.prototype.onScroll=function onScroll(e){if(!this.isAlive){return}updateGeometry(this);processScrollDiff(this,"top",this.element.scrollTop-this.lastScrollTop);processScrollDiff(this,"left",this.element.scrollLeft-this.lastScrollLeft);this.lastScrollTop=Math.floor(this.element.scrollTop);this.lastScrollLeft=this.element.scrollLeft};PerfectScrollbar.prototype.destroy=function destroy(){if(!this.isAlive){return}this.event.unbindAll();remove(this.scrollbarX);remove(this.scrollbarY);remove(this.scrollbarXRail);remove(this.scrollbarYRail);this.removePsClasses();this.element=null;this.scrollbarX=null;this.scrollbarY=null;this.scrollbarXRail=null;this.scrollbarYRail=null;this.isAlive=false};PerfectScrollbar.prototype.removePsClasses=function removePsClasses(){this.element.className=this.element.className.split(" ").filter(function(name){return!name.match(/^ps([-_].+|)$/)}).join(" ")};return PerfectScrollbar});
!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}));
(function($){"use strict";var g5core__PrettyTabs=function(element,options){var defaults={elementSelector:"li:not(.dropdown)",menuContainerClass:"dropdown",more_text:'<span class="fa fa-plus"></span>',append_tabs:""};this.$element=$(element);this.element=element;this.options=$.extend({},defaults,typeof options==="object"&&options);this.options=$.extend({},this.options,this.$element.data("pretty-tabs-options"));this.init()};g5core__PrettyTabs.prototype={init:function(){var _that=this;if(_that.options.append_tabs!==""){var $appendTabs=$(_that.options.append_tabs);if($appendTabs.length){_that.$element.detach().appendTo($appendTabs)}}_that.processTabs();setTimeout(function(){_that.processTabs()},1e3);$(window).on("resize",function(){_that.processTabs()})},processTabs:function(){var _that=this;_that.revertElements();var totalWidth=_that.getTotalWidth(),elementWidth=_that.getElementsWidth();_that.$element.removeClass("g5core__pretty-tabs-initialized").removeClass("g5core__pretty-tabs-has-dropdown");if(elementWidth>totalWidth){_that.createMenuContainer();var _width=0,$menuContainer=_that.getMenuContainer();if($menuContainer.length>0){_width+=_that.getElementWidth($menuContainer)}_that.getElements().each(function(){_width+=_that.getElementWidth($(this));if(_width>totalWidth){$(this).appendTo($menuContainer.find("ul.dropdown-menu"))}});_that.$element.addClass("g5core__pretty-tabs-has-dropdown")}_that.$element.addClass("g5core__pretty-tabs-initialized")},createMenuContainer:function(){var _that=this,$menuContainer=_that.getMenuContainer();if($menuContainer.length===0){var $container=$('<li class="dropdown">'+'<a href="#" class="dropdown-toggle" data-toggle="dropdown">'+_that.options.more_text+"</a>"+'<ul class="dropdown-menu dropdown-menu-right">'+"</ul>"+"</li>");_that.$element.append($container)}},revertElements:function(){var _that=this,$menuContainer=_that.getMenuContainer();if($menuContainer.length>0){$menuContainer.find("li").each(function(){$(this).appendTo(_that.$element)});$menuContainer.remove()}},getMenuContainer:function(){return this.$element.find("."+this.options.menuContainerClass)},getTotalWidth:function(){return this.$element.width()},getElementsWidth:function(){var _that=this,$menuContainer=_that.getMenuContainer(),elementsWidth=0;if($menuContainer.length>0){elementsWidth+=_that.getElementWidth($menuContainer)}_that.getElements().each(function(){elementsWidth+=_that.getElementWidth($(this))});return elementsWidth},getElements:function(){return this.$element.find(this.options.elementSelector)},getElementWidth:function($element){return $element.outerWidth()+parseInt($element.css("margin-left").replace("px",""),10)+parseInt($element.css("margin-right").replace("px",""),10)}};$.fn.extend({g5core__PrettyTabs:function(options){return this.each(function(){new g5core__PrettyTabs(this,options)})}});if($("body").hasClass("elementor-page")){window.addEventListener("elementor/frontend/init",()=>{elementorFrontend.hooks.addAction("frontend/element_ready/widget",function(){$(".g5core__pretty-tabs").g5core__PrettyTabs()})})}else{$(document).ready(function(){$(".g5core__pretty-tabs").g5core__PrettyTabs()})}})(jQuery);
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);r=200==Math.round(t(n.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,I=d&&r,x=t(s.width);x!==!1&&(a.width=x+(I?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(I?0:y+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+z),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var o=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?o.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,o){t=i.makeArray(t);var n=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!o)return void n.push(t);e(t,o)&&n.push(t);for(var i=t.querySelectorAll(o),s=0;s<i.length;s++)n.push(i[s])}}),n},i.debounceMethod=function(t,e,i){i=i||100;var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,o){i.docReady(function(){var s=i.toDashed(o),r="data-"+s,a=document.querySelectorAll("["+r+"]"),u=document.querySelectorAll(".js-"+s),h=i.makeArray(a).concat(i.makeArray(u)),d=r+"-options",l=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(r)||t.getAttribute(d);try{i=s&&JSON.parse(s)}catch(a){return void(n&&n.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,o,u)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],h={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},d=o.prototype=Object.create(t.prototype);d.constructor=o,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var o=h[i]||i;e[o]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=t[e?"left":"right"],n=t[i?"top":"bottom"],s=parseFloat(o),r=parseFloat(n),a=this.layout.size;o.indexOf("%")!=-1&&(s=s/100*a.width),n.indexOf("%")!=-1&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?a.paddingLeft:a.paddingRight,r-=i?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[s]=this.getXValue(a),e[r]="";var u=o?"paddingTop":"paddingBottom",h=o?"top":"bottom",d=o?"bottom":"top",l=this.position.y+t[u];e[h]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),n&&!this.isTransitioning)return void this.layoutPosition();var s=t-i,r=e-o,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=i?t:-t,e=o?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+n(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(u,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var f={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var c={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(c)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,s){return e(t,i,o,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n){"use strict";function s(t,e){var i=o.getQueryElement(t);if(!i)return void(u&&u.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++l;this.element.outlayerGUID=n,f[n]=this,this._create();var s=this._getOption("initLayout");s&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],o=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var n=m[o]||1;return i*n}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=n,s.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=s.prototype;o.extend(c,e.prototype),c.option=function(t){o.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},s.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0;n<e.length;n++){var s=e[n],r=new i(s,this);o.push(r)}return o},c._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var o,n=this.options[t];n?("string"==typeof n?o=this.element.querySelector(n):n instanceof HTMLElement&&(o=n),this[t]=o?i(o)[e]:n):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var o=this._getItemLayoutPosition(t);o.item=t,o.isInstant=e||t.isLayoutInstant,i.push(o)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},c._positionItem=function(t,e,i,o,n){o?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},c._getContainerSize=d,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function o(){r++,r==s&&i()}var n=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,o)})},c.dispatchEvent=function(t,e,i){var o=e?[e].concat(i):i;if(this.emitEvent(t,o),h)if(this.$element=this.$element||h(this.element),e){var n=h.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){o.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=d,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),o=this._boundingRect,n=i(t),s={left:e.left-o.left-n.marginLeft,top:e.top-o.top-n.marginTop,right:o.right-e.right-n.marginRight,bottom:o.bottom-e.bottom-n.marginBottom};return s},c.handleEvent=o.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},o.debounceMethod(s,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=o.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),o.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.compatOptions=o.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(n),o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=n,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),o=i._create;i._create=function(){this.id=this.layout.itemGUID++,o.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=i.prototype,n=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return n.forEach(function(t){o[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},o.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(o),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var o=i.prototype;return o._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},o.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,s=n/o,r=o-n%o,a=r&&r<1?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},o.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,o=e(i);this.containerWidth=o&&o.innerWidth},o._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var n=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",s=this[n](o,t),r={x:this.columnWidth*s.col,y:s.y},a=s.y+t.size.outerHeight,u=o+s.col,h=s.col;h<u;h++)this.colYs[h]=a;return r},o._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},o._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;o<i;o++)e[o]=this._getColGroupY(o,t);return e},o._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},o._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,o=t>1&&i+t>this.cols;i=o?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},o._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this._getOption("originLeft"),s=n?o.left:o.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?o.top:o.bottom)+i.outerHeight,l=a;l<=u;l++)this.colYs[l]=Math.max(d,this.colYs[l])},o._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},o._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),o=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)n[s]||(o[s]=e.prototype[s]);var r=o.measureColumns;o.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=o._getOption;return o._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(i,o,n,s,r,a){return e(t,i,o,n,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,s,r){function a(t,e){return function(i,o){for(var n=0;n<t.length;n++){var s=t[n],r=i.sortData[s],a=o.sortData[s];if(r>a||r<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var o=t[i];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){function t(){e&&i&&o&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?o.push(a):u||a.isHidden||n.push(a)}}return{matches:i,needReveal:o,needHide:n}},l._getFilterTest=function(t){return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
(function(factory){"use strict";if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else{factory(jQuery)}})(function($){"use strict";var instances=[],matchers=[],defaultOptions={precision:100,elapse:false,defer:false};matchers.push(/^[0-9]*$/.source);matchers.push(/([0-9]{1,2}\/){2}[0-9]{4}([0-9]{1,2}(:[0-9]{2}){2})?/.source);matchers.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}([0-9]{1,2}(:[0-9]{2}){2})?/.source);matchers=new RegExp(matchers.join("|"));function parseDateString(dateString){if(dateString instanceof Date){return dateString}if(String(dateString).match(matchers)){if(String(dateString).match(/^[0-9]*$/)){dateString=Number(dateString)}if(String(dateString).match(/\-/)){dateString=String(dateString).replace(/\-/g,"/")}return new Date(dateString)}else{throw new Error("Couldn't cast `"+dateString+"` to a date object.")}}var DIRECTIVE_KEY_MAP={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"};function escapedRegExp(str){var sanitize=str.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(sanitize)}function strftime(offsetObject){return function(format){var directives=format.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(directives){for(var i=0,len=directives.length;i<len;++i){var directive=directives[i].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),regexp=escapedRegExp(directive[0]),modifier=directive[1]||"",plural=directive[3]||"",value=null;directive=directive[2];if(DIRECTIVE_KEY_MAP.hasOwnProperty(directive)){value=DIRECTIVE_KEY_MAP[directive];value=Number(offsetObject[value])}if(value!==null){if(modifier==="!"){value=pluralize(plural,value)}if(modifier===""){if(value<10){value="0"+value.toString()}}format=format.replace(regexp,value.toString())}}}format=format.replace(/%%/,"%");return format}}function pluralize(format,count){var plural="s",singular="";if(format){format=format.replace(/(:|;|\s)/gi,"").split(/\,/);if(format.length===1){plural=format[0]}else{singular=format[0];plural=format[1]}}if(Math.abs(count)>1){return plural}else{return singular}}var Countdown=function(el,finalDate,options){this.el=el;this.$el=$(el);this.interval=null;this.offset={};this.options=$.extend({},defaultOptions);this.instanceNumber=instances.length;instances.push(this);this.$el.data("countdown-instance",this.instanceNumber);if(options){if(typeof options==="function"){this.$el.on("update.countdown",options);this.$el.on("stoped.countdown",options);this.$el.on("finish.countdown",options)}else{this.options=$.extend({},defaultOptions,options)}}this.setFinalDate(finalDate);if(this.options.defer===false){this.start()}};$.extend(Countdown.prototype,{start:function(){if(this.interval!==null){clearInterval(this.interval)}var self=this;this.update();this.interval=setInterval(function(){self.update.call(self)},this.options.precision)},stop:function(){clearInterval(this.interval);this.interval=null;this.dispatchEvent("stoped")},toggle:function(){if(this.interval){this.stop()}else{this.start()}},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this);instances[this.instanceNumber]=null;delete this.$el.data().countdownInstance},setFinalDate:function(value){this.finalDate=parseDateString(value)},update:function(){if(this.$el.closest("html").length===0){this.remove();return}var hasEventsAttached=$._data(this.el,"events")!==undefined,now=new Date,newTotalSecsLeft;newTotalSecsLeft=this.finalDate.getTime()-now.getTime();newTotalSecsLeft=Math.ceil(newTotalSecsLeft/1e3);newTotalSecsLeft=!this.options.elapse&&newTotalSecsLeft<0?0:Math.abs(newTotalSecsLeft);if(this.totalSecsLeft===newTotalSecsLeft||!hasEventsAttached){return}else{this.totalSecsLeft=newTotalSecsLeft}this.elapsed=now>=this.finalDate;this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-now.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft};if(!this.options.elapse&&this.totalSecsLeft===0){this.stop();this.dispatchEvent("finish")}else{this.dispatchEvent("update")}},dispatchEvent:function(eventName){var event=$.Event(eventName+".countdown");event.finalDate=this.finalDate;event.elapsed=this.elapsed;event.offset=$.extend({},this.offset);event.strftime=strftime(this.offset);this.$el.trigger(event)}});$.fn.countdown=function(){var argumentsArray=Array.prototype.slice.call(arguments,0);return this.each(function(){var instanceNumber=$(this).data("countdown-instance");if(instanceNumber!==undefined){var instance=instances[instanceNumber],method=argumentsArray[0];if(Countdown.prototype.hasOwnProperty(method)){instance[method].apply(instance,argumentsArray.slice(1))}else if(String(method).match(/^[$A-Z_][0-9A-Z_$]*$/i)===null){instance.setFinalDate.call(instance,method);instance.start()}else{$.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,method))}}else{new Countdown(this,argumentsArray[0],argumentsArray[1])}})}});
(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],factory)}else if(typeof exports==="object"){module.exports=factory(require("jquery"))}else{factory(jQuery)}})(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{s=decodeURIComponent(s.replace(pluses," "));return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var config=$.cookie=function(key,value,options){if(arguments.length>1&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==="number"){var days=options.expires,t=options.expires=new Date;t.setMilliseconds(t.getMilliseconds()+days*864e5)}return document.cookie=[encode(key),"=",stringifyCookieValue(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")}var result=key?undefined:{},cookies=document.cookie?document.cookie.split("; "):[],i=0,l=cookies.length;for(;i<l;i++){var parts=cookies[i].split("="),name=decode(parts.shift()),cookie=parts.join("=");if(key===name){result=read(cookie,value);break}if(!key&&(cookie=read(cookie))!==undefined){result[name]=cookie}}return result};config.defaults={};$.removeCookie=function(key,options){$.cookie(key,"",$.extend({},options,{expires:-1}));return!$.cookie(key)}});
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(g){var r=function(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:g('<div class="spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t};r.prototype.getSuffix=function(t,i){var e,s;for(e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},r.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},r.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},r.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)){if(0===this.settings.sizeRangeSuffixes[i].length)continue;if(this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i]}return""},r.prototype.newSrc=function(t,i,e,s){var n;if(this.settings.thumbnailPath)n=this.settings.thumbnailPath(t,i,e,s);else{var r=t.match(this.settings.extension),o=null!==r?r[0]:"";n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+o}return n},r.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},r.prototype.extractImgSrcFromImage=function(t){var i=void 0!==t.data("safe-src")?t.data("safe-src"):t.attr("src");return t.data("jg.originalSrc",i),i},r.prototype.imgFromEntry=function(t){var i=t.find(this.settings.imgSelector);return 0===i.length?null:i},r.prototype.captionFromEntry=function(t){var i=t.find("> .caption");return 0===i.length?null:i},r.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o=this.imgFromEntry(t);if(null!==o){o.css("width",s),o.css("height",n),o.css("margin-left",-s/2),o.css("margin-top",-n/2);var a=o.attr("src"),h=this.newSrc(a,s,n,o[0]);o.one("error",function(){o.attr("src",o.data("jg.originalSrc"))});var l=function(){a!==h&&o.attr("src",h)};"skipped"===t.data("jg.loaded")?this.onImageEvent(a,g.proxy(function(){this.showImg(t,l),t.data("jg.loaded",!0)},this)):this.showImg(t,l)}else this.showImg(t);this.displayEntryCaption(t)},r.prototype.displayEntryCaption=function(t){var i=this.imgFromEntry(t);if(null!==i&&this.settings.captions){var e=this.captionFromEntry(t);if(null===e){var s=i.attr("alt");this.isValidCaption(s)||(s=t.attr("title")),this.isValidCaption(s)&&(e=g('<div class="caption">'+s+"</div>"),t.append(e),t.data("jg.createdCaption",!0))}null!==e&&(this.settings.cssAnimation||e.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))}else this.removeCaptionEventsHandlers(t)},r.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},r.prototype.onEntryMouseEnterForCaption=function(t){var i=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?i.addClass("caption-visible").removeClass("caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},r.prototype.onEntryMouseLeaveForCaption=function(t){var i=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?i.removeClass("caption-visible").removeClass("caption-hidden"):i.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},r.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:g.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:g.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},r.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},r.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},r.prototype.prepareBuildingRow=function(t){var i,e,s,n,r,o=!0,a=0,h=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,l=h/this.buildingRow.aspectRatio,g=this.settings.rowHeight,u=this.buildingRow.width/h>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!u){for(i=0;i<this.buildingRow.entriesBuff.length;i++)e=this.buildingRow.entriesBuff[i],this.settings.cssAnimation?e.removeClass("entry-visible"):(e.stop().fadeTo(0,.1),e.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!u&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(o=!1,0<this.rows&&(o=(g=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/h>this.settings.justifyThreshold)),i=0;i<this.buildingRow.entriesBuff.length;i++)s=(e=this.buildingRow.entriesBuff[i]).data("jg.width")/e.data("jg.height"),o?(n=i===this.buildingRow.entriesBuff.length-1?h:l*s,r=l):(n=g*s,r=g),h-=Math.round(n),e.data("jg.jwidth",Math.round(n)),e.data("jg.jheight",Math.ceil(r)),(0===i||r<a)&&(a=r);return this.buildingRow.height=a,o},r.prototype.flushRow=function(t){var i,e,s,n=this.settings,r=this.border;if(e=this.prepareBuildingRow(t),t&&"hide"===n.lastRow&&-1===e)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===n.lastRow||"right"===n.lastRow)){var o=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*n.margins;for(s=0;s<this.buildingRow.entriesBuff.length;s++)o-=(i=this.buildingRow.entriesBuff[s]).data("jg.jwidth");"center"===n.lastRow?r+=o/2:"right"===n.lastRow&&(r+=o)}var a=this.buildingRow.entriesBuff.length-1;for(s=0;s<=a;s++)i=this.buildingRow.entriesBuff[this.settings.rtl?a-s:s],this.displayEntry(i,r,this.offY,i.data("jg.jwidth"),i.data("jg.jheight"),this.buildingRow.height),r+=i.data("jg.jwidth")+n.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=n.rowHeight&&e)&&(this.offY+=this.buildingRow.height+n.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;function e(){return g("body").height()>g(window).height()}r.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},r.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},r.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},r.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(g.proxy(function(){if(this.$gallery.is(":visible")){var t=parseFloat(this.$gallery.width());e()===this.scrollBarOn?Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)):(this.scrollBarOn=e(),this.galleryWidth=t)}},this),this.settings.refreshTime)},r.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},r.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},r.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},r.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},r.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},r.prototype.updateEntries=function(t){var i;return t&&null!=this.lastFetchedEntry?i=g(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],i=this.$gallery.children(this.settings.selector).toArray()),0<i.length&&(g.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0},r.prototype.insertToGallery=function(t){var i=this;g.each(t,function(){g(this).appendTo(i.$gallery)})},r.prototype.shuffleArray=function(t){var i,e,s;for(i=t.length-1;0<i;i--)e=Math.floor(Math.random()*(i+1)),s=t[i],t[i]=t[e],t[e]=s;return this.insertToGallery(t),t},r.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},r.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)g(t[i]).removeClass("jg-filtered")},r.prototype.filterArray=function(t){var e=this.settings;if("string"===g.type(e.filter))return t.filter(function(t){var i=g(t);return i.is(e.filter)?(i.removeClass("jg-filtered"),!0):(i.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(g.isFunction(e.filter)){for(var i=t.filter(e.filter),s=0;s<t.length;s++)-1===i.indexOf(t[s])?g(t[s]).addClass("jg-filtered").removeClass("jg-visible"):g(t[s]).removeClass("jg-filtered");return i}},r.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),g.each(this.entries,g.proxy(function(t,i){var e=g(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry");var s=this.imgFromEntry(e);s.css("width",""),s.css("height",""),s.css("margin-left",""),s.css("margin-top",""),s.attr("src",s.data("jg.originalSrc")),s.data("jg.originalSrc",void 0),this.removeCaptionEventsHandlers(e);var n=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==n&&n.remove()):null!==n&&n.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0)},r.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=g(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete"),this.setGalleryFinalHeight(this.galleryHeightToSet)},r.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},r.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},r.prototype.onImageEvent=function(t,i,e){if(i||e){var s=new Image,n=g(s);i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t}},r.prototype.init=function(){var a=!1,h=!1,l=this;g.each(this.entries,function(t,i){var e=g(i),s=l.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==l.settings.rel&&e.attr("rel",l.settings.rel),null!==l.settings.target&&e.attr("target",l.settings.target),null!==s){var n=l.extractImgSrcFromImage(s);if(s.attr("src",n),!1===l.settings.waitThumbnailsLoad){var r=parseFloat(s.prop("width")),o=parseFloat(s.prop("height"));if(!isNaN(r)&&!isNaN(o))return e.data("jg.width",r),e.data("jg.height",o),e.data("jg.loaded","skipped"),h=!0,l.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),a=!0,l.isSpinnerActive()||l.startLoadingSpinnerAnimation(),l.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),l.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),l.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),a||h||this.startImgAnalyzer(!1),this.checkWidth()},r.prototype.checkOrConvertNumber=function(t,i){if("string"===g.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==g.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},r.prototype.checkSizeRangesSuffixes=function(){if("object"!==g.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&t.push(i);for(var e={0:""},s=0;s<t.length;s++)if("string"===g.type(t[s]))try{e[parseInt(t[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[t[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[t[s]]=this.settings.sizeRangeSuffixes[t[s]];this.settings.sizeRangeSuffixes=e},r.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===g.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==g.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},r.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==g.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==g.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==g.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==g.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!g.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!g.isFunction(this.settings.filter)&&"string"!==g.type(this.settings.filter))throw"filter must be false, a string or a filter function"},r.prototype.retrieveSuffixRanges=function(){var t=[];for(var i in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&t.push(parseInt(i,10));return t.sort(function(t,i){return i<t?1:t<i?-1:0}),t},r.prototype.updateSettings=function(t){this.settings=g.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},r.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)",imgSelector:"> img, > a > img",triggerEvent:function(t){this.$gallery.trigger(t)}},g.fn.justifiedGallery=function(n){return this.each(function(t,i){var e=g(i);e.addClass("justified-gallery");var s=e.data("jg.controller");if(void 0===s){if(null!=n&&"object"!==g.type(n)){if("destroy"===n)return;throw"The argument must be an object"}s=new r(e,g.extend({},r.prototype.defaults,n)),e.data("jg.controller",s)}else if("norewind"===n);else{if("destroy"===n)return void s.destroy();s.updateSettings(n),s.rewind()}s.updateEntries("norewind"===n)&&s.init()})}});
var G5CORE=G5CORE||{},G5CORE_Animation=window.G5CORE_Animation||{};(function($){"use strict";var $body=$("body"),$window=$(window),$siteWrapper=$("#site-wrapper"),$document=$(document),changeMediaResponsive=false,beforeMedia="",isRTL=$body.hasClass("rtl"),_init=false;G5CORE.isHeaderMobile=function(){var responsive_breakpoint=991;if($("#site-header").data("responsive-breakpoint")){responsive_breakpoint=$("#site-header").data("responsive-breakpoint")}return window.matchMedia("(max-width: "+responsive_breakpoint+"px)").matches};G5CORE.getAdminBarHeight=function(){var adminBarHeight=0;if($body.hasClass("admin-bar")){var $adminBar=$("#wpadminbar");if($adminBar.css("position")==="fixed"){adminBarHeight=$adminBar.outerHeight()}}return adminBarHeight};G5CORE.lazyLoader={instanceImage:null,instanceBackground:null,init:function(){if(typeof LazyLoad==="undefined"){return}var _self=this;$(".g5core__lazy-image").each(function(){var $parent=$(this).closest(".g5core__lazy-image").parent();$parent.addClass("fs-0")});this.handleLazyImages();this.handleLazyBackgrounds();setTimeout(function(){_self.update()},1e3)},handleLazyImages:function(){this.instanceImage=new LazyLoad({elements_selector:".g5core__ll-image",use_native:true,callback_loaded:function($el){$($el).unwrap(".g5core__lazy-image");$($el).parent().removeClass("fs-0")},callback_error:function($el){console.log($el)}})},handleLazyBackgrounds:function(){this.instanceBackground=new LazyLoad({elements_selector:".g5core__ll-background",callback_loaded:function($el){$($el).removeClass("g5core__ll-background")}})},update:function(){$(".g5core__lazy-image").each(function(){var $parent=$(this).closest(".g5core__lazy-image").parent();$parent.addClass("fs-0")});if(this.instanceImage!==null){this.instanceImage.update()}if(this.instanceBackground!==null){this.instanceBackground.update()}}};G5CORE.util={init:function(){this.slickSlider();this.mfpEvent();this.backToTop();this.tooltip();this.svgIcon();$body.on("g5core_pagination_ajax_success g5core_pagination_ajax_before_update_sidebar",function(event,_data,$ajaxHTML,target,loadMore){setTimeout(function(){G5CORE.util.mfpEvent();G5CORE.util.svgIcon();G5CORE.util.slickSlider();G5CORE.util.mfpEvent();G5CORE.util.tooltip();G5CORE.lazyLoader.update()},5)})},svgIcon:function($wrap){if(typeof $wrap==="undefined"){$wrap=$("body")}$wrap.find(".svg-icon").each(function(){var $this=$(this),_class=$this.attr("class"),id=_class.replace("svg-icon svg-icon-",""),_html='<svg class="'+_class+'" aria-hidden="true" role="img"> <use href="#'+id+'" xlink:href="#'+id+'"></use> </svg>';$this.html(_html)})},mfpEvent:function(){$(".gel-slider-container").each(function(){var $this=$(this),$images=$this.find(".wpb_single_image [data-g5core-mfp]");if($images.length){var galleryId=(new Date).getTime();$images.each(function(){$(this).attr("data-gallery-id",galleryId)})}});$("[data-g5core-mfp]").each(function(){var $this=$(this),defaults={type:"image",closeOnBgClick:true,closeBtnInside:false,mainClass:"mfp-zoom-in",midClick:true,removalDelay:500,callbacks:{beforeOpen:function(){switch(this.st.type){case"image":this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim");break;case"iframe":this.st.iframe.markup=this.st.iframe.markup.replace("mfp-iframe-scaler","mfp-iframe-scaler mfp-with-anim");break}},beforeClose:function(){this.container.trigger("g5core_mfp_beforeClose")},close:function(){this.container.trigger("g5core_mfp_close")},change:function(){var _this=this;if(this.isOpen){this.wrap.removeClass("mfp-ready");setTimeout(function(){_this.wrap.addClass("mfp-ready")},10)}}}},mfpConfig=$.extend({},defaults,$this.data("mfp-options"));var galleryId=$this.data("gallery-id"),gallery=$this.data("gallery");if(typeof galleryId!=="undefined"||typeof gallery!=="undefined"){var items=[],items_src=[];if(typeof galleryId!=="undefined"){var $imageLinks=$('[data-gallery-id="'+galleryId+'"]');$imageLinks.each(function(){var src=$(this).attr("href");if(items_src.indexOf(src)<0){items_src.push(src);items.push({src:src})}})}else{for(var i=0;i<gallery.length;i++){var src=gallery[i];if(items_src.indexOf(src)<0){items_src.push(src);items.push({src:src})}}}mfpConfig.items=items;mfpConfig.gallery={enabled:true};mfpConfig.callbacks.beforeOpen=function(){switch(this.st.type){case"image":this.st.image.markup=this.st.image.markup.replace("mfp-figure","mfp-figure mfp-with-anim");break;case"iframe":this.st.iframe.markup=this.st.iframe.markup.replace("mfp-iframe-scaler","mfp-iframe-scaler mfp-with-anim");break}if(typeof galleryId!=="undefined"){var index=items_src.indexOf(this.st.el[0].href);if(-1!==index){this.goTo(index)}}}}$this.magnificPopup(mfpConfig)})},tooltip:function(){$('[data-toggle="tooltip"]').each(function(){var configs={container:$(this).parent()};if($(this).closest(".g5core__tooltip-wrap").length){configs=$.extend({},configs,$(this).closest(".g5core__tooltip-wrap").data("tooltip-options"))}$(this).tooltip(configs)})},backToTop:function(){var $backToTop=$(".g5core-back-to-top");if($backToTop.length>0){$backToTop.on("click",function(event){event.preventDefault();$("html,body").animate({scrollTop:"0px"},800)});$window.on("scroll",function(event){var scrollPosition=$window.scrollTop(),windowHeight=$window.height()/2;if(scrollPosition>windowHeight){$backToTop.addClass("in")}else{$backToTop.removeClass("in")}})}},slickSlider:function($wrapper){if(typeof $wrapper==="undefined"){$wrapper=$body}var options_default={slidesToScroll:1,slidesToShow:1,adaptiveHeight:true,arrows:true,dots:true,autoplay:false,autoplaySpeed:3e3,centerMode:false,centerPadding:"50px",draggable:true,fade:false,focusOnSelect:false,infinite:false,pauseOnHover:false,responsive:[],rtl:false,speed:300,vertical:false,prevArrow:'<div class="slick-prev" aria-label="Previous"><i class="fas fa-chevron-left"></i></div>',nextArrow:'<div class="slick-next" aria-label="Next"><i class="fas fa-chevron-right"></i></div>',customPaging:function(slider,i){return $("<span></span>")}};$(".slick-slider:not(.manual)",$wrapper).each(function(){var $this=$(this);if(!$this.hasClass("slick-initialized")){var options=$this.data("slick-options");options=$.extend({},options_default,options);$this.slick(options);$this.on("setPosition",function(event,slick){var max_height=0;slick.$slides.each(function(){var $slide=$(this);if($slide.hasClass("slick-active")){if(slick.options.adaptiveHeight&&slick.options.slidesToShow>1&&slick.options.vertical===false){if(max_height<$slide.outerHeight()){max_height=$slide.outerHeight()}}}});if(max_height!==0){$this.find("> .slick-list").animate({height:max_height},500)}});setTimeout(function(){G5CORE.util.mfpEvent();G5CORE.util.tooltip()},10);$this.on("breakpoint",function(event,slick,breakpoint){setTimeout(function(){G5CORE.util.mfpEvent();G5CORE.util.tooltip()},10)})}})}};G5CORE.page={init:function(){this.pageLoading()},pageLoading:function(){var that=this;$window.on("load",function(){that.fadePageIn()});setTimeout(function(){that.fadePageIn()},2e3)},fadePageIn:function(){if($body.hasClass("g5core-page-loading")){var preloadTime=1e3,$loading=$(".g5core-site-loading");$loading.animate({opacity:0,delay:200},preloadTime,"linear",function(){$loading.css("display","none")})}}};G5CORE.header={init:function(){this.menuPopupEvent();this.onePage()},menuPopupEvent:function(){$(".g5core-menu-popup .menu-item-has-children").find(" > a").on("click",function(event){var $this=$(this);if($this.attr("href")!=="#"){return}event.preventDefault();$this.parent().find(" > .sub-menu").slideToggle()})},onePage:function(){if(typeof $().onePageNav==="function"){$(".g5core-menu-one-page").onePageNav({currentClass:"menu-current",changeHash:false,scrollSpeed:750,scrollThreshold:0,filter:"",easing:"swing"})}}};G5CORE.searchAjax={timeOutSearch:null,xhrSearchAjax:null,init:function(){$(".g5core-search-ajax").each(function(){var $this=$(this),$input=$this.find('input[type="search"]'),$result=$this.find(".result"),$icon=$this.find("button > i"),$remove=$this.find(".remove");$remove.on("click",function(){$input.val("").focus();$result.html("");$remove.removeClass("in");$this.removeClass("in")});$input.on("keyup",function(event){if(event.altKey||event.ctrlKey||event.shiftKey||event.metaKey){return}var keys=["Control","Alt","Shift"];if(keys.indexOf(event.key)!=-1)return;switch(event.which){case 27:$input.val("");$result.html("");$remove.removeClass("in");$this.removeClass("in");break;case 38:case 40:case 13:break;default:clearTimeout(G5CORE.searchAjax.timeOutSearch);G5CORE.searchAjax.timeOutSearch=setTimeout(G5CORE.searchAjax.search,500,$this,$input,$icon,$remove,$result);break}});$this.on("submit",function(event){event.preventDefault();$(':input[name="action"]',$(this)).attr("disabled",true);$(':input[name="_g5core_search_nonce"]',$(this)).attr("disabled",true);$(this).unbind("submit").submit()})})},search:function($this,$input,$icon,$remove,$result){var keyword=$input.val();if(keyword.length<1){$result.html("");$remove.removeClass("in");$this.removeClass("in");return}$icon.addClass("fa-spinner fa-spin");$icon.removeClass("fa-search");if(G5CORE.searchAjax.xhrSearchAjax){G5CORE.searchAjax.xhrSearchAjax.abort()}G5CORE.searchAjax.xhrSearchAjax=$.ajax({type:"POST",data:$this.serialize(),url:g5_variable.ajax_url,dataType:"html",success:function(response){$icon.removeClass("fa-spinner fa-spin");$icon.addClass("fa-search");$result.html(response);$remove.addClass("in");$this.addClass("in")},error:function(response){if(response.statusText=="abort"){return}$icon.removeClass("fa-spinner fa-spin");$icon.addClass("fa-search")}})}};G5CORE.offCanvas={init:function(){$("[data-off-canvas-target]").on("click",function(){var moveStyle="from-right";if($($(this).data("off-canvas-target")).hasClass("from-left")){moveStyle="from-left"}$body.toggleClass("g5core-off-canvas-in").toggleClass("g5core-off-canvas-in-"+moveStyle)});$(".off-canvas-close").on("click",function(){$body.removeClass("g5core-off-canvas-in").removeClass("g5core-off-canvas-in-from-left").removeClass("g5core-off-canvas-in-from-right")});$(".g5core-off-canvas-wrapper > .off-canvas-overlay").on("click",function(event){$body.removeClass("g5core-off-canvas-in").removeClass("g5core-off-canvas-in-from-left").removeClass("g5core-off-canvas-in-from-right")})}};G5CORE.login={_isSubmitting:false,$loginPopup:$("#g5core_login_popup"),init:function(){this.formEvent()},formEvent:function(){jQuery("[data-parsley-validate]").each(function(){var $form=jQuery(this);var instance=$form.parsley();instance.refresh()});var $loginPopup=$("#g5core_login_popup"),$loginWrap=$loginPopup.find(".popup-login-wrap"),$forgotWrap=$loginPopup.find(".popup-forgot-wrap"),$popupRegisterWrap=$loginPopup.find(".popup-register-wrap"),$back=$loginPopup.find(".back");$loginPopup.find(".forgot-pass-link").on("click",function(){$loginWrap.hide();$back.show();$forgotWrap.fadeIn()});$loginPopup.find(".popup-btn-register").on("click",function(){$loginWrap.hide();$back.show();$popupRegisterWrap.fadeIn()});$back.on("click",function(){$forgotWrap.hide();$popupRegisterWrap.hide();$back.hide();$loginWrap.fadeIn()});$loginPopup.find("form").on("submit",function(event){event.preventDefault();if(G5CORE.login._isSubmitting){return false}G5CORE.login._isSubmitting=true;var formData=new FormData(this),$currentForm=$(this).closest(".g5core-login-popup-inner"),$button=$currentForm.find("button"),btnLadda=$button.ladda();btnLadda.ladda("start");$.ajax({type:"POST",url:this.action,data:formData,processData:false,contentType:false,success:function(response){if(response.success){$currentForm.find(".popup-login-error").html('<div class="alert alert-success">'+response.data+"</div>");if($currentForm.hasClass("popup-login-wrap")){window.location.reload()}}else{$currentForm.find(".popup-login-error").html('<div class="alert alert-danger">'+response.data+"</div>")}},complete:function(){btnLadda.ladda("stop");G5CORE.login._isSubmitting=false}});return false});$document.on("g5core_mfp_beforeClose",function(event){var $loginPopup=$(event.target).find(".g5core-login-popup");if($loginPopup.length){setTimeout(function(){$loginPopup.find("form").each(function(){this.reset();var instance=$(this).parsley().reset()});$loginPopup.find(".popup-login-error").html("")},1e3)}})}};G5CORE.headerSticky={scroll_offset_before:0,init:function(){this.sticky();this.scroll();this.resize();this.processSticky()},sticky:function(){$(".header-sticky .sticky-area").each(function(){var $this=$(this);if(!$this.is(":visible")){return}if(!$this.parent().hasClass("sticky-area-wrap")){$this.wrap('<div class="sticky-area-wrap"></div>')}var $wrap=$this.parent();if($wrap.attr("style")===undefined){$wrap.css("height",$this.css("height"))}})},resize:function(){$window.resize(function(){G5CORE.headerSticky.sticky();G5CORE.headerSticky.processSticky()})},scroll:function(){$window.on("scroll",function(){G5CORE.headerSticky.processSticky()})},processSticky:function(){var current_scroll_top=$window.scrollTop();$(".header-sticky .sticky-area").each(function(){var $this=$(this);if(!$this.is(":visible")){return}var $wrap=$this.parent(),sticky_top=G5CORE.getAdminBarHeight(),sticky_current_top=$wrap.offset().top;sticky_top+=parseInt($body.css("border-top-width"));if(sticky_current_top-sticky_top<current_scroll_top){$this.css("position","fixed");$this.css("top",sticky_top+"px");$wrap.addClass("sticky")}else{if($wrap.hasClass("sticky")){$this.css("position","").css("top","");$wrap.removeClass("sticky")}}});if(G5CORE.headerSticky.scroll_offset_before>current_scroll_top){$(".header-sticky-smart .sticky-area").each(function(){if($(this).hasClass("header-hidden")){$(this).removeClass("header-hidden")}})}else{$(".header-sticky-smart .sticky-area").each(function(){var $wrapper=$(this).parent();if($wrapper.length){if(G5CORE.headerSticky.scroll_offset_before>$wrapper.offset().top+$(this).outerHeight()&&!$(this).hasClass("header-hidden")){$(this).addClass("header-hidden")}}})}G5CORE.headerSticky.scroll_offset_before=current_scroll_top}};G5CORE.menuMobile={init:function(){$(".g5core-menu-mobile .menu-item-has-children > a").on("click",function(event){var $this=$(this);if($this.attr("href")==="#"||$(event.target).closest(".x-caret").length){event.preventDefault();var $sub=$this.parent().find(" > .sub-menu");if($sub.is(":visible")){$this.parent().find(" > .sub-menu").slideUp()}else{$this.parent().parent().find(" > li > .sub-menu").slideUp();$this.parent().find(" > .sub-menu").slideDown()}$this.find(".x-caret").toggleClass("in")}})}};G5CORE.sidebarSticky={init:function(){var header_sticky_height=0;if($("#site-header.header-sticky").length>0){header_sticky_height=60}$(".primary-sidebar.sidebar-sticky > .primary-sidebar-inner").hcSticky({stickTo:"#sidebar",top:G5CORE.getAdminBarHeight()+header_sticky_height+30})}};G5CORE.sticky={init:function(){this.initSticky()},initSticky:function($wrapper){if(!$.fn.hcSticky){return}if(typeof $wrapper==="undefined"){$wrapper=$body}var header_sticky_height=0;if($("#site-header.header-sticky").length>0){header_sticky_height=60}var defaults={top:G5CORE.getAdminBarHeight()+header_sticky_height+30};$(".g5core-sticky").each(function(){var $this=$(this);var config=$.extend({},defaults,$this.data("sticky-options"));$this.hcSticky(config)})}};G5CORE.footer={init:function(){this.footer_fixed();this.resize()},footer_fixed:function(){var $footer_boxed=$(".g5core-site-footer-fixed");if($footer_boxed.length){if(window.matchMedia("(min-width: 992px)").matches){var $footer_height=$footer_boxed.outerHeight();var $header_sticky=$(".g5core-site-header.header-sticky .sticky-area"),body_border_width=parseInt($body.css("border-bottom-width"));if($footer_height+G5CORE.getAdminBarHeight()+$header_sticky.outerHeight()+body_border_width*2>=$window.height()){$siteWrapper.css("margin-bottom","");$footer_boxed.addClass("static")}else{$siteWrapper.css("margin-bottom",$footer_boxed.css("height"))}}else{$siteWrapper.css("margin-bottom","")}}},resize:function(){$window.resize(function(){G5CORE.footer.footer_fixed()})}};G5CORE.isotope={config_default:{isOriginLeft:!isRTL},init:function($wrapper){if(typeof $wrapper==="undefined"){$wrapper=$body}var _that=this;$(".isotope",$wrapper).each(function(){var $this=$(this);$this.imagesLoaded({background:true},function(){var config=$.extend({},_that.config_default,$this.data("isotope-options")),columns_gutter=$this.attr("class").match(/g5core__gutter-(\d{0,2})/);if(columns_gutter!==null){columns_gutter=parseInt(columns_gutter[1])}else{columns_gutter=0}if(typeof config.masonry!=="undefined"&&typeof config.masonry.columnWidth!=="undefined"&&config.masonry.columnWidth===".g5core__col-base"){if($this.closest(".g5element__gallery").length){$this.append('<div class="g5element__gallery-item g5core__col-base"></div>')}else{$this.append('<article class="g5core__col-base"></article>')}}if(typeof config.masonry!=="undefined"&&typeof config.masonry.columnWidth!=="undefined"&&typeof config.metro!=="undefined"){config=$.extend({},config,{masonry:{columnWidth:_that.metro_width($this,columns_gutter)},resize:false})}if(G5CORE.ELEMENTOR.isEditor()){setTimeout(function(){$this.isotope(config)},G5CORE.ELEMENTOR.editorTimeout)}else{$this.isotope(config)}})});$window.on("resize",function(){$(".isotope",$wrapper).each(function(){var $this=$(this),config=$.extend({},_that.config_default,$this.data("isotope-options")),columns_gutter=$this.attr("class").match(/g5core__gutter-(\d{0,2})/);if(columns_gutter!==null){columns_gutter=parseInt(columns_gutter[1])}else{columns_gutter=0}if(typeof config.masonry!=="undefined"&&typeof config.masonry.columnWidth!=="undefined"&&typeof config.metro!=="undefined"){config=$.extend({},config,{masonry:{columnWidth:_that.metro_width($this,columns_gutter)},resize:false});$this.isotope(config)}_that.layout($this)})})},layout:function($target){if($target.data("isotope")){$target.isotope("layout")}setTimeout(function(){if($target.data("isotope")){$target.isotope("layout")}},500);setTimeout(function(){if($target.data("isotope")){$target.isotope("layout")}},1e3)},metro_width:function($target,columns_gutter){var _that=this,options=$target.data("isotope-options"),$container=$target.closest("[data-isotope-wrapper]"),baseColumns=1,imageSizeBase=$target.data("image-size-base"),ratioBase=1;if(imageSizeBase){imageSizeBase=imageSizeBase.split("x");ratioBase=parseInt(imageSizeBase[1],10)/parseInt(imageSizeBase[0],10);if(isNaN(ratioBase)){ratioBase=1}}$target.find(options.itemSelector).each(function(){var $item=$(this),multiplier_w=_that.get_multiplier_width($item),columns=1;if(multiplier_w!=0){columns=60/multiplier_w}if(baseColumns<columns){baseColumns=columns}});var baseWidth=($container.width()-columns_gutter*(baseColumns-1))/baseColumns,baseHeight=Math.floor(baseWidth*ratioBase);$target.find(options.itemSelector).each(function(){var $item=$(this),$itemInner=$item.find(" > [data-ratio]"),ratio=$itemInner.data("ratio");var _multiplier_w=$item.data("multiplier_w");if(_multiplier_w===60){ratio="1x1"}if(ratio){ratio=ratio.split("x");var ratioH=ratio[1],height=baseHeight*ratioH+Math.ceil(ratioH-1)*columns_gutter,$image=$itemInner.find(".g5core__entry-thumbnail");$image.addClass("g5core__thumbnail-size-none").css("height",height)}});return options.masonry.columnWidth},get_multiplier_width:function($item){var multiplier_w=60;if($item.is("[class]")&&!$item.hasClass("g5core__col-base")){var _class=$item.attr("class"),multiplier_mb_w=_class.match(/col-(\d{1,2})/),multiplier_xs_w=_class.match(/col-sm-(\d{1,2})/),multiplier_sm_w=_class.match(/col-md-(\d{1,2})/),multiplier_md_w=_class.match(/col-lg-(\d{1,2})/),multiplier_lg_w=_class.match(/col-xl-(\d{1,2})/);if(_class.match(/col-12-5/)){multiplier_w=12}else if(multiplier_mb_w!==null){multiplier_w=multiplier_mb_w[1]*5}if(window.matchMedia("(min-width: 576px)").matches){if(_class.match(/col-sm-12-5/)){multiplier_w=12}else if(multiplier_xs_w!==null){multiplier_w=multiplier_xs_w[1]*5}}if(window.matchMedia("(min-width: 768px)").matches){if(_class.match(/col-md-12-5/)){multiplier_w=12}else if(multiplier_sm_w!==null){multiplier_w=multiplier_sm_w[1]*5}}if(window.matchMedia("(min-width: 992px)").matches){if(_class.match(/col-lg-12-5/)){multiplier_w=12}else if(multiplier_md_w!==null){multiplier_w=multiplier_md_w[1]*5}}if(window.matchMedia("(min-width: 1200px)").matches){if(_class.match(/col-xl-12-5/)){multiplier_w=12}else if(multiplier_lg_w!==null){multiplier_w=multiplier_lg_w[1]*5}}}$item.data("multiplier_w",multiplier_w);return multiplier_w}};G5CORE.modernGrid={init:function($wrapper){if(typeof $wrapper==="undefined"){$wrapper=$body}var _that=this;$("[data-modern-grid]",$wrapper).each(function(){var $this=$(this);$this.imagesLoaded({background:true},function(){_that.layout($this)})});$window.off("resize.mordern.grid").on("resize.mordern.grid",function(){$("[data-modern-grid]",$wrapper).each(function(){var $this=$(this);$this.imagesLoaded({background:true},function(){_that.layout($this);if($this.closest(".slick-slider").length){$this.closest(".slick-slider").slick("refresh")}})})});$body.on("g5core_pagination_ajax_success",function(event,_data,$ajaxHTML,target,loadMore){$("[data-modern-grid]",$wrapper).each(function(){var $this=$(this);$this.imagesLoaded({background:true},function(){_that.layout($this)})})})},layout:function($target){var _that=this,options=$target.data("modern-options"),baseColumns=1,imageSizeBase=options["image_size_base"],ratioBase=1,columns_gutter=parseInt(options["columns_gutter"],10),total_item=$target.find(options.itemSelector).length;if(imageSizeBase){imageSizeBase=imageSizeBase.split("x");ratioBase=parseInt(imageSizeBase[1],10)/parseInt(imageSizeBase[0],10);if(isNaN(ratioBase)){ratioBase=1}}if(total_item===0)return;if(total_item===1){$target.find(options.itemSelector).each(function(){var $item=$(this),$itemInner=$item.find(" > [data-ratio]"),$image=$itemInner.find(".g5core__entry-thumbnail");$image.removeClass("g5core__thumbnail-size-none").css("height","")})}else{$target.find(options.itemSelector).each(function(){var $item=$(this),multiplier_w=_that.get_multiplier_width($item),columns=12/multiplier_w;if(baseColumns<columns){baseColumns=columns}});var baseWidth=($target.width()-columns_gutter*(baseColumns-1))/baseColumns,baseHeight=Math.floor(baseWidth*ratioBase);$target.find(options.itemSelector).each(function(){var $item=$(this),$itemInner=$item.find(" > [data-ratio]"),ratio=$itemInner.data("ratio"),$image=$itemInner.find(".g5core__entry-thumbnail"),multiplier_w=_that.get_multiplier_width($item);if(baseColumns===1||multiplier_w===12){$image.removeClass("g5core__thumbnail-size-none").css("height","")}else if(ratio){ratio=ratio.split("x");var ratioH=ratio[1],height=baseHeight*ratioH+Math.ceil(ratioH-1)*columns_gutter;$image.addClass("g5core__thumbnail-size-none").css("height",height)}})}},get_multiplier_width:function($item){var multiplier_w=12,$itemInner=$item.find(".g5core__post-item-inner"),$col=$item.closest(".g5core__modern-grid-col"),_class="";if($itemInner.is("[data-class]")){_class=$itemInner.data("class")}else if($col.length>0){_class=$col.attr("class")}if(_class!==""){var multiplier_mb_w=_class.match(/col-(\d{1,2})/),multiplier_xs_w=_class.match(/col-sm-(\d{1,2})/),multiplier_sm_w=_class.match(/col-md-(\d{1,2})/),multiplier_md_w=_class.match(/col-lg-(\d{1,2})/),multiplier_lg_w=_class.match(/col-xl-(\d{1,2})/);if(multiplier_mb_w!==null){multiplier_w=multiplier_mb_w[1]}if(window.matchMedia("(min-width: 576px)").matches){if(multiplier_xs_w!==null){multiplier_w=multiplier_xs_w[1]}}if(window.matchMedia("(min-width: 768px)").matches){if(multiplier_sm_w!==null){multiplier_w=multiplier_sm_w[1]}}if(window.matchMedia("(min-width: 992px)").matches){if(multiplier_md_w!==null){multiplier_w=multiplier_md_w[1]}}if(window.matchMedia("(min-width: 1200px)").matches){if(multiplier_lg_w!==null){multiplier_w=multiplier_lg_w[1]}}}return multiplier_w}};G5CORE.justifiedGallery={config_default:{border:0,captions:false},init:function($wrapper){if(typeof $wrapper==="undefined"){$wrapper=$body}var self=this;$(".g5core__justified-gallery",$wrapper).each(function(){var $this=$(this);$this.imagesLoaded({background:true},function(){var config=$.extend({},self.config_default,$this.data("justified-options"));$this.justifiedGallery(config)})})}};G5CORE.paginationAjax={cache:{},ajax:false,prefix:"g5_ajax_pagination_",timeOutLoadPost:null,paging:{pagination:"pagination",paginationAjax:"pagination-ajax",loadMore:"load-more",nextPrev:"next-prev",infiniteScroll:"infinite-scroll"},addCache:function(key,value,group){if(typeof this.cache[group]==="undefined"){this.cache[group]={}}if(typeof this.cache[group][key]!=="undefined")return;this.cache[group][key]=value},getCache:function(key,group){if(typeof this.cache[group]!=="undefined"&&typeof this.cache[group][key]!=="undefined"){return this.cache[group][key]}return""},getVariable:function(settingId){var varName=this.prefix+settingId;if(typeof window[varName]!=="undefined"){return window[varName]}return""},showLoading:function($wrapper,_data,target){var _that=this;if(_that.ajax)return;_that.ajax=true;var $container=$wrapper.find("[data-items-container]"),$wrapper_height=$wrapper.outerHeight(),$loading=$wrapper.children(".g5-loading"),itemSelector=_data.settings["itemSelector"],loadMore=$(target).closest("[data-items-paging]").length>0&&(_data.settings["post_paging"]===_that.paging.loadMore||_data.settings["post_paging"]===_that.paging.infiniteScroll);if($(target).closest(".x-mega-sub-menu").length===0&&loadMore===false){var wrapperOffset=$wrapper.offset().top-100;var bodyTop=document.documentElement["scrollTop"]||document.body["scrollTop"],delta=bodyTop-wrapperOffset,scrollSpeed=Math.abs(delta)/2;if(scrollSpeed<800)scrollSpeed=800;$("html,body").animate({scrollTop:wrapperOffset},scrollSpeed,"easeInOutCubic")}if(loadMore===false){var $top=$container.offset().top-$wrapper.offset().top;$loading.css("top",$top+100);$wrapper.css("height",$wrapper_height).addClass("loading");$container.find(itemSelector).animate({opacity:0},500,"easeOutQuad");$wrapper.find("[data-items-paging]").animate({opacity:0},500,"easeOutQuad")}else{if(_data.settings["post_paging"]===_that.paging.loadMore){var l=$(target).ladda();l.ladda("start")}else{var $top=$wrapper.height();$loading.css("top",$top);$wrapper.css("height",$wrapper_height).addClass("loading")}}},hideLoading:function($wrapper){var _that=this;setTimeout(function(){$wrapper.removeClass("loading").css("height","");_that.ajax=false},500)},getCurrentPage:function($this,pagination){var _that=this,url=$this.attr("href"),paged=1;if(pagination===_that.paging.paginationAjax){if(/[\?&amp;]paged=\d+/gi.test(url)){paged=/[\?&amp;]paged=\d+/gi.exec(url)[0];paged=parseInt(/\d+/gi.exec(paged)[0],10)}else if(/page\/\d+/gi.test(url)){paged=/page\/\d+/gi.exec(url)[0];paged=parseInt(/\d+/gi.exec(paged)[0],10)}}else if(pagination===_that.paging.infiniteScroll||pagination===_that.paging.nextPrev||pagination===_that.paging.loadMore){paged=parseInt($this.data("paged"),10)}return{paged:paged,url:url}},setPushState:function(url){var title=document.title;if(typeof window.history.pushState==="function"){window.history.pushState(null,title,url)}},init:function(){var _that=this;$('[data-items-paging="pagination-ajax"],[data-items-paging="next-prev"],[data-items-tabs],[data-items-cate]').each(function(){var settingId=$(this).data("id"),_data=_that.getVariable(settingId);if(_data!==""){var paged=typeof _data.query["paged"]!=="undefined"?_data.query["paged"]:1,$wrapper=_data.settings["isMainQuery"]&&$(this).closest("#wrapper-content").length?$(this).closest("#wrapper-content"):$('[data-items-wrapper="'+settingId+'"]'),_html=$wrapper[0].outerHTML,$currentCate=$wrapper.find("[data-items-cate] > li.active a"),cat=$currentCate.length>0?parseInt($currentCate.data("id"),10):-1,cacheKey=cat+"_"+paged;if(_that.getCache(cacheKey,settingId)===""){_that.addCache(cacheKey,_html,settingId)}}});$("[data-items-wrapper]").each(function(){if($(this).find(".g5-loading").length===0){$(this).prepend('<div class="g5-loading"><div class="g5-loading-inner"></div></div>')}});$(document).on("click",'[data-items-paging="pagination-ajax"] a,[data-items-paging="load-more"] > a,[data-items-paging="next-prev"] > a,[data-items-paging="infinite-scroll"] > a',function(event){event.preventDefault();var $this=$(this),$pagingWrapper=$this.closest("[data-items-paging]"),settingId=$pagingWrapper.data("id");_that.loadPosts(settingId,this)});if($('[data-items-paging="infinite-scroll"]').length>0){$window.on("scroll",function(event){$('[data-items-paging="infinite-scroll"]').each(function(){var $navigation=$(this);if($navigation.length===0||_that.ajax)return;if($window.scrollTop()+$window.height()>$navigation.offset().top){var $this=$("> a",$navigation);$this.trigger("click")}})})}$(document).on("click","[data-items-cate] li:not(.dropdown) > a",function(event){event.preventDefault();var _this=this,settingId=$(this).closest("[data-items-cate]").data("id");_that.loadPosts(settingId,_this)});$(document).on("click","[data-items-tabs] li:not(.dropdown) > a",function(event){event.preventDefault();var $this=$(this),settingId=$this.data("id"),$tabs=$this.closest("[data-items-tabs]"),$currentTab=$tabs.find("li.active:not(.dropdown) > a"),currentSettingId=$currentTab.data("id"),$wrapper=$('[data-items-wrapper="'+currentSettingId+'"]');if($this.closest("li.active:not(.dropdown)").length)return;$wrapper.attr("data-items-wrapper",settingId);_that.loadPosts(settingId,this)});$body.on("g5core_pagination_ajax_success",function(event,_data,$ajaxHTML,target,loadMore){_that.updatePageTitle(_data,$ajaxHTML,target,loadMore);_that.updateSideBar(_data,$ajaxHTML,target,loadMore);_that.updateCategory(_data,$ajaxHTML,target,loadMore);_that.updateCustomCss(_data,$ajaxHTML,target,loadMore)})},loadPosts:function(settingId,target,_urlRequest){if($(target).hasClass("active")||$(target).hasClass("disable")||$(target).parent().hasClass("active")||$(target).hasClass("dropdown-toggle"))return;var _that=this,_data=_that.getVariable(settingId);if(_data==="")return;var type=$(target).closest("[data-items-paging]").length>0?"paging":$(target).closest("[data-items-cate]").length>0?"cat":$(target).closest("[data-items-tabs]").length>0?"tab":"",$wrapper=$('[data-items-wrapper="'+settingId+'"]'),$currentCate=$wrapper.find("[data-items-cate] > li.active a"),paged=1,cat=$currentCate.length>0?parseInt($currentCate.data("id"),10):-1,cat_slug="",taxonomy=typeof _data.settings["taxonomy"]!=="undefined"?_data.settings["taxonomy"]:"category";_that.showLoading($wrapper,_data,target);if(type==="paging"){var pagination=typeof _data.settings["post_paging"]!=="undefined"?_data.settings["post_paging"]:_that.paging.pagination,currentPage=_that.getCurrentPage($(target),pagination);paged=currentPage.paged;_data.settings["currentPage"]=currentPage;if(pagination===_that.paging.loadMore||pagination===_that.paging.infiniteScroll){_data.settings["index"]=$wrapper.find(_data.settings["itemSelector"]).not(".g5core__col-base").length}else{delete _data.settings["index"]}if(typeof _data.settings.cat!=="undefined"&&_data.settings.cat!==""&&(typeof _data.settings.current_cat==="undefined"||_data.settings.current_cat===-1)){if(_data.settings["post_type"]==="post"){delete _data.query["category_name"];delete _data.query["cat"]}else{delete _data.query["term"];delete _data.query[taxonomy];delete _data.query["taxonomy"];_data.query["post_type"]=_data.settings["post_type"]}}}else if(type==="cat"){currentPage=_that.getCurrentPage($(target),"");_data.settings["currentPage"]=currentPage;paged=1;cat=parseInt($(target).data("id"),10);cat_slug=$(target).data("name");if(cat>0){_data.settings["current_cat"]=cat;delete _data.query["s"];delete _data.query["search_terms_count"];delete _data.query["search_terms"];if(_data.settings["post_type"]==="post"){_data.query["category_name"]=cat_slug;_data.query["cat"]=cat}else{_data.query[taxonomy]=cat_slug;_data.query["term"]=cat_slug;_data.query["taxonomy"]=taxonomy}delete _data.query["post_type"]}else{_data.settings["current_cat"]=-1;if(_data.settings["post_type"]==="post"){delete _data.query["category_name"];delete _data.query["cat"]}else{delete _data.query["term"];delete _data.query[taxonomy];delete _data.query["taxonomy"];_data.query["post_type"]=_data.settings["post_type"]}}}else if(type==="tab"){if(_data.settings["post_type"]==="post"){delete _data.query["category_name"];delete _data.query["cat"]}else{delete _data.query["term"];delete _data.query[taxonomy];delete _data.query["taxonomy"];_data.query["post_type"]=_data.settings["post_type"]}}else{if(_data.settings["post_type"]==="post"){delete _data.query["category_name"];delete _data.query["cat"]}else{delete _data.query["term"];delete _data.query[taxonomy];delete _data.query["taxonomy"];_data.query["post_type"]=_data.settings["post_type"]}}if(type===""){if(typeof _urlRequest==="undefined"){currentPage=_that.getCurrentPage($(target),"")}else{currentPage={paged:1,url:_urlRequest}}_data.settings["currentPage"]=currentPage;delete _data.settings["current_cat"]}var cacheKey=cat+"_"+paged;if(_data.settings["isMainQuery"]){if(typeof _urlRequest!=="undefined"){cacheKey=_urlRequest}else{cacheKey=$(target).attr("href")}}var cacheData=_that.getCache(cacheKey,settingId);if(cacheData!==""){_that.ajax=true;_that.onSuccess(cacheData,_data,target,type,$wrapper);_that.ajax=false}else{if(typeof _urlRequest==="undefined"){_urlRequest=g5_variable.ajax_url;if(_data.settings["isMainQuery"]){_urlRequest=$(target).attr("href")}}_data.action="pagination_ajax";_data.query["paged"]=paged;_data.settings["settingId"]=settingId;if($(target).closest(".g5shop__switch-layout").length){_data.view=$(target).data("layout")}if($(target).closest(".g5ere__switch-layout").length){_data.view=$(target).data("layout")}_that.ajax=$.ajax({type:"POST",data:_data,url:_urlRequest,dataType:"text",success:function(response){_that.addCache(cacheKey,response,settingId);_that.onSuccess(response,_data,target,type,$wrapper);_that.ajax=false},error:function(XMLHttpRequest,textStatus,errorThrown){_that.hideLoading($wrapper);_that.ajax=false}})}},onSuccess:function(response,_data,target,type,$wrapper){if(type==="cat"){$(target).closest("[data-items-cate]").find("li").removeClass("active");$(target).closest("li").addClass("active");$(target).closest(".dropdown").addClass("active")}if(type==="tab"){$(target).closest("[data-items-tabs]").find("li").removeClass("active");$(target).closest("li").addClass("active");$(target).closest(".dropdown").addClass("active")}var _that=this,$container=$wrapper.find("[data-items-container]"),$paging=$wrapper.find("[data-items-paging]"),$ajaxHTML=$("<div>"+response+"</div>"),itemSelector=_data.settings["itemSelector"],$resultWrapper=_data.settings["isMainQuery"]?$ajaxHTML.find("[data-archive-wrapper]"):$ajaxHTML,$resultElements=$resultWrapper.find(itemSelector),resultElementsLength=$resultElements.length,$resultPaging=$resultWrapper.find("[data-items-paging]"),loadMore=$(target).closest("[data-items-paging]").length>0&&(_data.settings["post_paging"]===_that.paging.loadMore||_data.settings["post_paging"]===_that.paging.infiniteScroll),isotope=$container.hasClass("isotope"),slick=$container.hasClass("slick-slider"),justified=$container.hasClass("justified-gallery"),animation=typeof _data.settings["post_animation"]!=="undefined"?_data.settings["post_animation"]:"none";_that.hideLoading($wrapper);if(resultElementsLength===0){if(typeof _data.settings["noFoundSelector"]!=="undefined"){$resultElements=$ajaxHTML.find(_data.settings["noFoundSelector"])}}if(isotope){var config=$container.data("isotope-options");if(loadMore){$container.append($resultElements).isotope("appended",$resultElements);if(animation!=="none"){new G5CORE_Animation($wrapper)}$wrapper.trigger("g5core_pagination_ajax_success",[_data,$ajaxHTML,target,loadMore])}else{$container.find(itemSelector).animate({opacity:0},500,"easeOutQuad");if(animation==="none"){$resultElements.css({opacity:0})}setTimeout(function(){$container.html($resultElements);if(typeof config!=="undefined"&&typeof config.masonry!=="undefined"&&typeof config.masonry.columnWidth!=="undefined"&&config.masonry.columnWidth===".g5core__col-base"){$container.append('<article class="g5core__col-base"></article>')}$container.isotope("reloadItems").isotope();if(animation==="none"){$container.find(itemSelector).animate({opacity:1},500,"easeOutQuad")}else{new G5CORE_Animation($wrapper)}$wrapper.trigger("g5core_pagination_ajax_success",[_data,$ajaxHTML,target,loadMore])},500)}G5CORE.isotope.layout($container);if(typeof config!=="undefined"&&typeof config.masonry!=="undefined"&&typeof config.masonry.columnWidth!=="undefined"&&config.masonry.columnWidth===".g5core__col-base"){$(window).trigger("resize")}}else if(slick){var $slick=$container.slick("getSlick");$slick.unslick();if(loadMore){$container.append($resultElements).addClass("slick-slider")}else{$container.html($resultElements).addClass("slick-slider")}G5CORE.util.slickSlider();if(animation!=="none"){new G5CORE_Animation($wrapper)}$wrapper.trigger("g5core_pagination_ajax_success",[_data,$ajaxHTML,target,loadMore])}else if(justified){if(loadMore){$container.append($resultElements).justifiedGallery("norewind")}else{$container.find(itemSelector).animate({opacity:0},500,"easeOutQuad");$container.justifiedGallery("destroy").html($resultElements);G5CORE.justifiedGallery.init($wrapper)}if(animation!=="none"){new G5CORE_Animation($wrapper)}}else{if(loadMore){if(animation==="none"){$resultElements.css({opacity:0})}$container.append($resultElements);G5CORE.isotope.init($container);if(animation==="none"){$resultElements.animate({opacity:1},500,"easeInQuad")}else{new G5CORE_Animation($wrapper,100)}$wrapper.trigger("g5core_pagination_ajax_success",[_data,$ajaxHTML,target,loadMore])}else{$container.find(itemSelector).animate({opacity:0},500,"easeOutQuad");if(animation==="none"){$resultElements.css({opacity:0})}setTimeout(function(){$container.html($resultElements);G5CORE.isotope.init($container);if(animation==="none"){$resultElements.animate({opacity:1},500,"easeInQuad")}else{new G5CORE_Animation($wrapper,100)}$wrapper.trigger("g5core_pagination_ajax_success",[_data,$ajaxHTML,target,loadMore])},500)}}if(!loadMore){if(typeof _data.settings["isMainQuery"]!=="undefined"&&_data.settings["isMainQuery"]===true){_that.setPushState(_data.settings["currentPage"].url)}}if($paging.length>0){$paging.remove()}$wrapper.append($resultPaging)},updatePageTitle:function(_data,$ajaxHTML,target,loadMore){var $pageTitle=$(".g5core-page-title");if($pageTitle.length&&!loadMore&&typeof _data.settings["isMainQuery"]!=="undefined"){var $resultPageTitle=$ajaxHTML.find(".g5core-page-title");if($resultPageTitle.length){$pageTitle.replaceWith($resultPageTitle.prop("outerHTML"));if("function"==typeof window.vc_js){vc_js()}if(typeof elementorModules==="object"&&typeof elementorFrontend==="object"){$(".elementor-section-stretched",".g5core-page-title").each(function(){var $element=$(this);var stretchElement=new elementorModules.frontend.tools.StretchElement({element:$element,selectors:{container:elementorFrontend.getKitSettings("stretched_section_container")||window}});stretchElement.stretch();$window.resize(function(){stretchElement.stretch()})})}$body.trigger("g5core_pagination_ajax_before_update_page_title",[_data,$ajaxHTML,target,loadMore])}}},updateSideBar:function(_data,$ajaxHTML,target,loadMore){var $sidebar=$(".primary-sidebar");if($sidebar.length&&!loadMore&&typeof _data.settings["isMainQuery"]!=="undefined"){var $resultSidebar=$ajaxHTML.find(".primary-sidebar");if($resultSidebar.length){$sidebar.replaceWith($resultSidebar.prop("outerHTML"));$body.trigger("g5core_pagination_ajax_before_update_sidebar",[_data,$ajaxHTML,target,loadMore]);G5CORE.sidebarSticky.init()}}},updateCategory:function(_data,$ajaxHTML,target,loadMore){var settingId=_data.settings.settingId,$resultWrapper=_data.settings["isMainQuery"]&&$ajaxHTML.find("[data-archive-wrapper]").length?$ajaxHTML.find("[data-archive-wrapper]"):$ajaxHTML,$resultCategory=$resultWrapper.find("[data-items-cate]");if($resultCategory.length&&$resultCategory.closest(".g5shop__shop-toolbar").length===0&&$resultCategory.closest(".g5ere__property-toolbar").length===0){var $wrapper=$('[data-items-wrapper="'+settingId+'"]'),$category=$wrapper.find("[data-items-cate]");if($category.length===0){$category=$('[data-items-cate][data-id="'+_data.settings.settingId+'"]');if($category.length){$category.remove()}$wrapper.prepend($resultCategory);$(".g5core__pretty-tabs").g5core__PrettyTabs()}}},updateCustomCss:function(_data,$ajaxHTML,target,loadMore){if(!loadMore&&typeof _data.settings["isMainQuery"]!=="undefined"){var $custom_css=$ajaxHTML.find("#g5core_custom_css_data");if($custom_css.length>0){eval($custom_css.html())}}}};G5CORE_Animation=function($wrapper,delay){if(typeof $wrapper!=="undefined"){$wrapper=$body}this.$wrapper=$wrapper;this.init(delay)};G5CORE_Animation.prototype={itemQueue:[],delay:100,queueTimer:null,init:function(delay){var _self=this;_self.itemQueue=[];_self.queueTimer=null;if(typeof delay!=="undefined"){_self.delay=delay}setTimeout(function(){_self.registerAnimation()},200)},registerAnimation:function(){var _self=this;$(".g5core__animate-when-almost-visible:not(.animated)",_self.$wrapper).waypoint(function(){var $this=this.element?this.element:$(this);_self.itemQueue.push($this);_self.processItemQueue()},{offset:"90%",triggerOnce:true})},processItemQueue:function(){var _self=this;if(_self.queueTimer)return;_self.queueTimer=window.setInterval(function(){if(_self.itemQueue.length){$(_self.itemQueue.shift()).addClass("animated");_self.processItemQueue()}else{window.clearInterval(_self.queueTimer);_self.queueTimer=null}},_self.delay)}};G5CORE.ELEMENTOR={editorTimeout:1e4,isActive:function(){return $body.hasClass("elementor-page")},isEditor:function(){return $body.hasClass("elementor-editor-active")}};G5CORE.init=function(){if(_init===false){_init=true;G5CORE.util.init();G5CORE.header.init();G5CORE.footer.init();G5CORE.searchAjax.init();G5CORE.offCanvas.init();G5CORE.login.init();G5CORE.headerSticky.init();G5CORE.menuMobile.init();G5CORE.sidebarSticky.init();G5CORE.isotope.init();G5CORE.paginationAjax.init();G5CORE.modernGrid.init();G5CORE.justifiedGallery.init();G5CORE.sticky.init();G5CORE.page.init();new G5CORE_Animation;G5CORE.lazyLoader.init()}};if(G5CORE.ELEMENTOR.isActive()){window.addEventListener("elementor/frontend/init",()=>{G5CORE.init()})}$document.ready(function(){G5CORE.init()})})(jQuery);
(()=>{var t={507:(t,e,r)=>{"use strict";r.d(e,{A:()=>A});var n=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var i=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var o=function(t,e){return function(r,o,s,c=10){const l=t[e];if(!i(r))return;if(!n(o))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof c)return void console.error("If specified, the hook priority must be a number.");const a={callback:s,priority:c,namespace:o};if(l[r]){const t=l[r].handlers;let e;for(e=t.length;e>0&&!(c>=t[e-1].priority);e--);e===t.length?t[e]=a:t.splice(e,0,a),l.__current.forEach((t=>{t.name===r&&t.currentIndex>=e&&t.currentIndex++}))}else l[r]={handlers:[a],runs:0};"hookAdded"!==r&&t.doAction("hookAdded",r,o,s,c)}};var s=function(t,e,r=!1){return function(o,s){const c=t[e];if(!i(o))return;if(!r&&!n(s))return;if(!c[o])return 0;let l=0;if(r)l=c[o].handlers.length,c[o]={runs:c[o].runs,handlers:[]};else{const t=c[o].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===s&&(t.splice(e,1),l++,c.__current.forEach((t=>{t.name===o&&t.currentIndex>=e&&t.currentIndex--})))}return"hookRemoved"!==o&&t.doAction("hookRemoved",o,s),l}};var c=function(t,e){return function(r,n){const i=t[e];return void 0!==n?r in i&&i[r].handlers.some((t=>t.namespace===n)):r in i}};var l=function(t,e,r,n){return function(i,...o){const s=t[e];s[i]||(s[i]={handlers:[],runs:0}),s[i].runs++;const c=s[i].handlers;if(!c||!c.length)return r?o[0]:void 0;const l={name:i,currentIndex:0};return(n?async function(){try{s.__current.add(l);let t=r?o[0]:void 0;for(;l.currentIndex<c.length;){const e=c[l.currentIndex];t=await e.callback.apply(null,o),r&&(o[0]=t),l.currentIndex++}return r?t:void 0}finally{s.__current.delete(l)}}:function(){try{s.__current.add(l);let t=r?o[0]:void 0;for(;l.currentIndex<c.length;){t=c[l.currentIndex].callback.apply(null,o),r&&(o[0]=t),l.currentIndex++}return r?t:void 0}finally{s.__current.delete(l)}})()}};var a=function(t,e){return function(){const r=t[e],n=Array.from(r.__current);return n.at(-1)?.name??null}};var d=function(t,e){return function(r){const n=t[e];return void 0===r?n.__current.size>0:Array.from(n.__current).some((t=>t.name===r))}};var u=function(t,e){return function(r){const n=t[e];if(i(r))return n[r]&&n[r].runs?n[r].runs:0}};class h{actions;filters;addAction;addFilter;removeAction;removeFilter;hasAction;hasFilter;removeAllActions;removeAllFilters;doAction;doActionAsync;applyFilters;applyFiltersAsync;currentAction;currentFilter;doingAction;doingFilter;didAction;didFilter;constructor(){this.actions=Object.create(null),this.actions.__current=new Set,this.filters=Object.create(null),this.filters.__current=new Set,this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=s(this,"actions"),this.removeFilter=s(this,"filters"),this.hasAction=c(this,"actions"),this.hasFilter=c(this,"filters"),this.removeAllActions=s(this,"actions",!0),this.removeAllFilters=s(this,"filters",!0),this.doAction=l(this,"actions",!1,!1),this.doActionAsync=l(this,"actions",!1,!0),this.applyFilters=l(this,"filters",!0,!1),this.applyFiltersAsync=l(this,"filters",!0,!0),this.currentAction=a(this,"actions"),this.currentFilter=a(this,"filters"),this.doingAction=d(this,"actions"),this.doingFilter=d(this,"filters"),this.didAction=u(this,"actions"),this.didFilter=u(this,"filters")}}var A=function(){return new h}},8770:()=>{}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{actions:()=>x,addAction:()=>s,addFilter:()=>c,applyFilters:()=>m,applyFiltersAsync:()=>v,createHooks:()=>t.A,currentAction:()=>y,currentFilter:()=>F,defaultHooks:()=>o,didAction:()=>b,didFilter:()=>k,doAction:()=>f,doActionAsync:()=>p,doingAction:()=>_,doingFilter:()=>g,filters:()=>w,hasAction:()=>d,hasFilter:()=>u,removeAction:()=>l,removeAllActions:()=>h,removeAllFilters:()=>A,removeFilter:()=>a});var t=r(507),e=r(8770),i={};for(const t in e)["default","actions","addAction","addFilter","applyFilters","applyFiltersAsync","createHooks","currentAction","currentFilter","defaultHooks","didAction","didFilter","doAction","doActionAsync","doingAction","doingFilter","filters","hasAction","hasFilter","removeAction","removeAllActions","removeAllFilters","removeFilter"].indexOf(t)<0&&(i[t]=()=>e[t]);r.d(n,i);const o=(0,t.A)(),{addAction:s,addFilter:c,removeAction:l,removeFilter:a,hasAction:d,hasFilter:u,removeAllActions:h,removeAllFilters:A,doAction:f,doActionAsync:p,applyFilters:m,applyFiltersAsync:v,currentAction:y,currentFilter:F,doingAction:_,doingFilter:g,didAction:b,didFilter:k,actions:x,filters:w}=o})(),(window.wp=window.wp||{}).hooks=n})();
(()=>{"use strict";var t={d:(n,e)=>{for(var r in e)t.o(e,r)&&!t.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:e[r]})},o:(t,n)=>Object.prototype.hasOwnProperty.call(t,n),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},n={};t.r(n),t.d(n,{__:()=>F,_n:()=>L,_nx:()=>D,_x:()=>w,createI18n:()=>h,defaultI18n:()=>b,getLocaleData:()=>g,hasTranslation:()=>O,isRTL:()=>P,resetLocaleData:()=>x,setLocaleData:()=>v,sprintf:()=>l,subscribe:()=>m});var e,r,a,i,o=/%(((\d+)\$)|(\(([$_a-zA-Z][$_a-zA-Z0-9]*)\)))?[ +0#-]*\d*(\.(\d+|\*))?(ll|[lhqL])?([cduxXefgsp%])/g;function l(t,...n){return function(t,...n){var e=0;return Array.isArray(n[0])&&(n=n[0]),t.replace(o,(function(){var t,r,a,i,o;return t=arguments[3],r=arguments[5],"%"===(i=arguments[9])?"%":("*"===(a=arguments[7])&&(a=n[e],e++),void 0===r?(void 0===t&&(t=e+1),e++,o=n[t-1]):n[0]&&"object"==typeof n[0]&&n[0].hasOwnProperty(r)&&(o=n[0][r]),"f"===i?o=parseFloat(o)||0:"d"===i&&(o=parseInt(o)||0),void 0!==a&&("f"===i?o=o.toFixed(a):"s"===i&&(o=o.substr(0,a))),null!=o?o:"")}))}(t,...n)}e={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},r=["(","?"],a={")":["("],":":["?","?:"]},i=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var s={"!":function(t){return!t},"*":function(t,n){return t*n},"/":function(t,n){return t/n},"%":function(t,n){return t%n},"+":function(t,n){return t+n},"-":function(t,n){return t-n},"<":function(t,n){return t<n},"<=":function(t,n){return t<=n},">":function(t,n){return t>n},">=":function(t,n){return t>=n},"==":function(t,n){return t===n},"!=":function(t,n){return t!==n},"&&":function(t,n){return t&&n},"||":function(t,n){return t||n},"?:":function(t,n,e){if(t)throw n;return e}};function u(t){var n=function(t){for(var n,o,l,s,u=[],d=[];n=t.match(i);){for(o=n[0],(l=t.substr(0,n.index).trim())&&u.push(l);s=d.pop();){if(a[o]){if(a[o][0]===s){o=a[o][1]||o;break}}else if(r.indexOf(s)>=0||e[s]<e[o]){d.push(s);break}u.push(s)}a[o]||d.push(o),t=t.substr(n.index+o.length)}return(t=t.trim())&&u.push(t),u.concat(d.reverse())}(t);return function(t){return function(t,n){var e,r,a,i,o,l,u=[];for(e=0;e<t.length;e++){if(o=t[e],i=s[o]){for(r=i.length,a=Array(r);r--;)a[r]=u.pop();try{l=i.apply(null,a)}catch(t){return t}}else l=n.hasOwnProperty(o)?n[o]:+o;u.push(l)}return u[0]}(n,t)}}var d={contextDelimiter:"",onMissingKey:null};function c(t,n){var e;for(e in this.data=t,this.pluralForms={},this.options={},d)this.options[e]=void 0!==n&&e in n?n[e]:d[e]}c.prototype.getPluralForm=function(t,n){var e,r,a,i=this.pluralForms[t];return i||("function"!=typeof(a=(e=this.data[t][""])["Plural-Forms"]||e["plural-forms"]||e.plural_forms)&&(r=function(t){var n,e,r;for(n=t.split(";"),e=0;e<n.length;e++)if(0===(r=n[e].trim()).indexOf("plural="))return r.substr(7)}(e["Plural-Forms"]||e["plural-forms"]||e.plural_forms),a=function(t){var n=u(t);return function(t){return+n({n:t})}}(r)),i=this.pluralForms[t]=a),i(n)},c.prototype.dcnpgettext=function(t,n,e,r,a){var i,o,l;return i=void 0===a?0:this.getPluralForm(t,a),o=e,n&&(o=n+this.options.contextDelimiter+e),(l=this.data[t][o])&&l[i]?l[i]:(this.options.onMissingKey&&this.options.onMissingKey(e,t),0===i?e:r)};const p={plural_forms:t=>1===t?0:1},f=/^i18n\.(n?gettext|has_translation)(_|$)/,h=(t,n,e)=>{const r=new c({}),a=new Set,i=()=>{a.forEach((t=>t()))},o=(t,n="default")=>{r.data[n]={...r.data[n],...t},r.data[n][""]={...p,...r.data[n]?.[""]},delete r.pluralForms[n]},l=(t,n)=>{o(t,n),i()},s=(t="default",n,e,a,i)=>(r.data[t]||o(void 0,t),r.dcnpgettext(t,n,e,a,i)),u=t=>t||"default",d=(t,n,r)=>{let a=s(r,n,t);return e?(a=e.applyFilters("i18n.gettext_with_context",a,t,n,r),e.applyFilters("i18n.gettext_with_context_"+u(r),a,t,n,r)):a};if(t&&l(t,n),e){const t=t=>{f.test(t)&&i()};e.addAction("hookAdded","core/i18n",t),e.addAction("hookRemoved","core/i18n",t)}return{getLocaleData:(t="default")=>r.data[t],setLocaleData:l,addLocaleData:(t,n="default")=>{r.data[n]={...r.data[n],...t,"":{...p,...r.data[n]?.[""],...t?.[""]}},delete r.pluralForms[n],i()},resetLocaleData:(t,n)=>{r.data={},r.pluralForms={},l(t,n)},subscribe:t=>(a.add(t),()=>a.delete(t)),__:(t,n)=>{let r=s(n,void 0,t);return e?(r=e.applyFilters("i18n.gettext",r,t,n),e.applyFilters("i18n.gettext_"+u(n),r,t,n)):r},_x:d,_n:(t,n,r,a)=>{let i=s(a,void 0,t,n,r);return e?(i=e.applyFilters("i18n.ngettext",i,t,n,r,a),e.applyFilters("i18n.ngettext_"+u(a),i,t,n,r,a)):i},_nx:(t,n,r,a,i)=>{let o=s(i,a,t,n,r);return e?(o=e.applyFilters("i18n.ngettext_with_context",o,t,n,r,a,i),e.applyFilters("i18n.ngettext_with_context_"+u(i),o,t,n,r,a,i)):o},isRTL:()=>"rtl"===d("ltr","text direction"),hasTranslation:(t,n,a)=>{const i=n?n+""+t:t;let o=!!r.data?.[a??"default"]?.[i];return e&&(o=e.applyFilters("i18n.has_translation",o,t,n,a),o=e.applyFilters("i18n.has_translation_"+u(a),o,t,n,a)),o}}},_=window.wp.hooks,y=h(void 0,void 0,_.defaultHooks);var b=y;const g=y.getLocaleData.bind(y),v=y.setLocaleData.bind(y),x=y.resetLocaleData.bind(y),m=y.subscribe.bind(y),F=y.__.bind(y),w=y._x.bind(y),L=y._n.bind(y),D=y._nx.bind(y),P=y.isRTL.bind(y),O=y.hasTranslation.bind(y);(window.wp=window.wp||{}).i18n=n})();