!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s="transitionend",n=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},o=t=>{const e=n(t);return e&&document.querySelector(e)?e:null},r=t=>{const e=n(t);return e?document.querySelector(e):null},a=t=>{t.dispatchEvent(new Event(s))},l=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>l(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,h=t=>{if(!l(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},d=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),u=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u(t.parentNode):null},_=()=>{},g=t=>{t.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,p=[],m=()=>"rtl"===document.documentElement.dir,b=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of p)t()})),p.push(e)):e()},v=t=>{"function"==typeof t&&t()},y=(t,e,i=!0)=>{if(!i)return void v(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let o=!1;const r=({target:i})=>{i===e&&(o=!0,e.removeEventListener(s,r),v(t))};e.addEventListener(s,r),setTimeout((()=>{o||a(e)}),n)},w=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},A=/[^.]*(?=\..*)\.|.*/,E=/\..*/,C=/::\d+$/,T={};let k=1;const L={mouseenter:"mouseover",mouseleave:"mouseout"},O=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function I(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function S(t){const e=I(t);return t.uidEvent=e,T[e]=T[e]||{},T[e]}function D(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function N(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=j(t);return O.has(o)||(o=t),[s,n,o]}function P(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=N(e,i,s);if(e in L){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=S(t),c=l[a]||(l[a]={}),h=D(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=I(r,e.replace(A,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return F(n,{delegateTarget:r}),s.oneOff&&$.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return F(s,{delegateTarget:t}),i.oneOff&&$.off(t,s.type,e),e.apply(t,[s])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function x(t,e,i,s,n){const o=D(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function M(t,e,i,s){const n=e[i]||{};for(const o of Object.keys(n))if(o.includes(s)){const s=n[o];x(t,e,i,s.callable,s.delegationSelector)}}function j(t){return t=t.replace(E,""),L[t]||t}const $={on(t,e,i,s){P(t,e,i,s,!1)},one(t,e,i,s){P(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=N(e,i,s),a=r!==e,l=S(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))M(t,l,i,e.slice(1));for(const i of Object.keys(c)){const s=i.replace(C,"");if(!a||e.includes(s)){const e=c[i];x(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;x(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=f();let n=null,o=!0,r=!0,a=!1;e!==j(e)&&s&&(n=s.Event(e,i),s(t).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=F(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function F(t,e){for(const[i,s]of Object.entries(e||{}))try{t[i]=s}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}const z=new Map,H={set(t,e,i){z.has(t)||z.set(t,new Map);const s=z.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>z.has(t)&&z.get(t).get(e)||null,remove(t,e){if(!z.has(t))return;const i=z.get(t);i.delete(e),0===i.size&&z.delete(t)}};function q(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function B(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const W={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${B(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${B(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=q(t.dataset[s])}return e},getDataAttribute:(t,e)=>q(t.getAttribute(`data-bs-${B(e)}`))};class R{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=l(e)?W.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...l(e)?W.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const s of Object.keys(e)){const n=e[s],o=t[s],r=l(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`)}var i}}class V extends R{constructor(t,e){super(),(t=c(t))&&(this._element=t,this._config=this._getConfig(e),H.set(this._element,this.constructor.DATA_KEY,this))}dispose(){H.remove(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){y(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return H.get(c(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const K=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;$.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),d(this))return;const n=r(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))};class Q extends V{static get NAME(){return"alert"}close(){if($.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),$.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}K(Q,"close"),b(Q);const X='[data-bs-toggle="button"]';class Y extends V{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Y.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}$.on(document,"click.bs.button.data-api",X,(t=>{t.preventDefault();const e=t.target.closest(X);Y.getOrCreateInstance(e).toggle()})),b(Y);const U={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!d(t)&&h(t)))}},G={endCallback:null,leftCallback:null,rightCallback:null},J={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Z extends R{constructor(t,e){super(),this._element=t,t&&Z.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return G}static get DefaultType(){return J}static get NAME(){return"swipe"}dispose(){$.off(this._element,".bs.swipe")}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),v(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&v(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?($.on(this._element,"pointerdown.bs.swipe",(t=>this._start(t))),$.on(this._element,"pointerup.bs.swipe",(t=>this._end(t))),this._element.classList.add("pointer-event")):($.on(this._element,"touchstart.bs.swipe",(t=>this._start(t))),$.on(this._element,"touchmove.bs.swipe",(t=>this._move(t))),$.on(this._element,"touchend.bs.swipe",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const tt="next",et="prev",it="left",st="right",nt="slid.bs.carousel",ot="carousel",rt="active",at={ArrowLeft:st,ArrowRight:it},lt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ct={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ht extends V{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=U.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ot&&this.cycle()}static get Default(){return lt}static get DefaultType(){return ct}static get NAME(){return"carousel"}next(){this._slide(tt)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(et)}pause(){this._isSliding&&a(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?$.one(this._element,nt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void $.one(this._element,nt,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?tt:et;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&$.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&($.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),$.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&Z.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of U.find(".carousel-item img",this._element))$.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(it)),rightCallback:()=>this._slide(this._directionToOrder(st)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Z(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=at[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=U.findOne(".active",this._indicatorsElement);e.classList.remove(rt),e.removeAttribute("aria-current");const i=U.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(rt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),s=t===tt,n=e||w(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),r=e=>$.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r("slide.bs.carousel").defaultPrevented)return;if(!i||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),g(n),i.classList.add(l),n.classList.add(l),this._queueCallback((()=>{n.classList.remove(l,c),n.classList.add(rt),i.classList.remove(rt,c,l),this._isSliding=!1,r(nt)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return U.findOne(".active.carousel-item",this._element)}_getItems(){return U.find(".carousel-item",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return m()?t===it?et:tt:t===it?tt:et}_orderToDirection(t){return m()?t===et?it:st:t===et?st:it}static jQueryInterface(t){return this.each((function(){const e=ht.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}$.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(t){const e=r(this);if(!e||!e.classList.contains(ot))return;t.preventDefault();const i=ht.getOrCreateInstance(e),s=this.getAttribute("data-bs-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===W.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),$.on(window,"load.bs.carousel.data-api",(()=>{const t=U.find('[data-bs-ride="carousel"]');for(const e of t)ht.getOrCreateInstance(e)})),b(ht);const dt="show",ut="collapse",_t="collapsing",gt='[data-bs-toggle="collapse"]',ft={parent:null,toggle:!0},pt={parent:"(null|element)",toggle:"boolean"};class mt extends V{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=U.find(gt);for(const t of i){const e=o(t),i=U.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ft}static get DefaultType(){return pt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>mt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if($.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(ut),this._element.classList.add(_t),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(_t),this._element.classList.add(ut,dt),this._element.style[e]="",$.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if($.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(_t),this._element.classList.remove(ut,dt);for(const t of this._triggerArray){const e=r(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(_t),this._element.classList.add(ut),$.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(dt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=c(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(gt);for(const e of t){const t=r(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=U.find(":scope .collapse .collapse",this._config.parent);return U.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=mt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}$.on(document,"click.bs.collapse.data-api",gt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=o(this),i=U.find(e);for(const t of i)mt.getOrCreateInstance(t,{toggle:!1}).toggle()})),b(mt);const bt="dropdown",vt="ArrowUp",yt="ArrowDown",wt="click.bs.dropdown.data-api",At="keydown.bs.dropdown.data-api",Et="show",Ct='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Tt=`${Ct}.show`,kt=".dropdown-menu",Lt=m()?"top-end":"top-start",Ot=m()?"top-start":"top-end",It=m()?"bottom-end":"bottom-start",St=m()?"bottom-start":"bottom-end",Dt=m()?"left-start":"right-start",Nt=m()?"right-start":"left-start",Pt={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},xt={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Mt extends V{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=U.next(this._element,kt)[0]||U.prev(this._element,kt)[0]||U.findOne(kt,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Pt}static get DefaultType(){return xt}static get NAME(){return bt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(d(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!$.trigger(this._element,"show.bs.dropdown",t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))$.on(t,"mouseover",_);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Et),this._element.classList.add(Et),$.trigger(this._element,"shown.bs.dropdown",t)}}hide(){if(d(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!$.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))$.off(t,"mouseover",_);this._popper&&this._popper.destroy(),this._menu.classList.remove(Et),this._element.classList.remove(Et),this._element.setAttribute("aria-expanded","false"),W.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,"hidden.bs.dropdown",t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!l(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${bt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:l(this._config.reference)?t=c(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=i.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Et)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Dt;if(t.classList.contains("dropstart"))return Nt;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Ot:Lt:e?St:It}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(W.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=U.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>h(t)));i.length&&w(i,e,t===yt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Mt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=U.find(Tt);for(const i of e){const e=Mt.getInstance(i);if(!e||!1===e._config.autoClose)continue;const s=t.composedPath(),n=s.includes(e._menu);if(s.includes(e._element)||"inside"===e._config.autoClose&&!n||"outside"===e._config.autoClose&&n)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,s=[vt,yt].includes(t.key);if(!s&&!i)return;if(e&&!i)return;t.preventDefault();const n=this.matches(Ct)?this:U.prev(this,Ct)[0]||U.next(this,Ct)[0]||U.findOne(Ct,t.delegateTarget.parentNode),o=Mt.getOrCreateInstance(n);if(s)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),n.focus())}}$.on(document,At,Ct,Mt.dataApiKeydownHandler),$.on(document,At,kt,Mt.dataApiKeydownHandler),$.on(document,wt,Mt.clearMenus),$.on(document,"keyup.bs.dropdown.data-api",Mt.clearMenus),$.on(document,wt,Ct,(function(t){t.preventDefault(),Mt.getOrCreateInstance(this).toggle()})),b(Mt);const jt=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",$t=".sticky-top",Ft="padding-right",zt="margin-right";class Ht{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Ft,(e=>e+t)),this._setElementAttributes(jt,Ft,(e=>e+t)),this._setElementAttributes($t,zt,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ft),this._resetElementAttributes(jt,Ft),this._resetElementAttributes($t,zt)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&W.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=W.getDataAttribute(t,e);null!==i?(W.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(l(t))e(t);else for(const i of U.find(t,this._element))e(i)}}const qt="show",Bt="mousedown.bs.backdrop",Wt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Rt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Vt extends R{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Wt}static get DefaultType(){return Rt}static get NAME(){return"backdrop"}show(t){if(!this._config.isVisible)return void v(t);this._append();const e=this._getElement();this._config.isAnimated&&g(e),e.classList.add(qt),this._emulateAnimation((()=>{v(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(qt),this._emulateAnimation((()=>{this.dispose(),v(t)}))):v(t)}dispose(){this._isAppended&&($.off(this._element,Bt),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=c(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),$.on(t,Bt,(()=>{v(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){y(t,this._getElement(),this._config.isAnimated)}}const Kt=".bs.focustrap",Qt="backward",Xt={autofocus:!0,trapElement:null},Yt={autofocus:"boolean",trapElement:"element"};class Ut extends R{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Xt}static get DefaultType(){return Yt}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),$.off(document,Kt),$.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),$.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,$.off(document,Kt))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=U.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Qt?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Qt:"forward")}}const Gt="hidden.bs.modal",Jt="show.bs.modal",Zt="modal-open",te="show",ee="modal-static",ie={backdrop:!0,focus:!0,keyboard:!0},se={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class ne extends V{constructor(t,e){super(t,e),this._dialog=U.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Ht,this._addEventListeners()}static get Default(){return ie}static get DefaultType(){return se}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||$.trigger(this._element,Jt,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Zt),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&($.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(te),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])$.off(t,".bs.modal");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Vt({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ut({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=U.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),g(this._element),this._element.classList.add(te),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,$.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){$.on(this._element,"keydown.dismiss.bs.modal",(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),$.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),$.on(this._element,"mousedown.dismiss.bs.modal",(t=>{$.one(this._element,"click.dismiss.bs.modal",(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Zt),this._resetAdjustments(),this._scrollBar.reset(),$.trigger(this._element,Gt)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if($.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(ee)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(ee),this._queueCallback((()=>{this._element.classList.remove(ee),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=m()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=m()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=ne.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}$.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=r(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),$.one(e,Jt,(t=>{t.defaultPrevented||$.one(e,Gt,(()=>{h(this)&&this.focus()}))}));const i=U.findOne(".modal.show");i&&ne.getInstance(i).hide(),ne.getOrCreateInstance(e).toggle(this)})),K(ne),b(ne);const oe="show",re="showing",ae="hiding",le=".offcanvas.show",ce="hidePrevented.bs.offcanvas",he="hidden.bs.offcanvas",de={backdrop:!0,keyboard:!0,scroll:!1},ue={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class _e extends V{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return de}static get DefaultType(){return ue}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||$.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Ht).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(re),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(oe),this._element.classList.remove(re),$.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&($.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ae),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(oe,ae),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Ht).reset(),$.trigger(this._element,he)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Vt({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():$.trigger(this._element,ce)}:null})}_initializeFocusTrap(){return new Ut({trapElement:this._element})}_addEventListeners(){$.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():$.trigger(this._element,ce))}))}static jQueryInterface(t){return this.each((function(){const e=_e.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}$.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=r(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this))return;$.one(e,he,(()=>{h(this)&&this.focus()}));const i=U.findOne(le);i&&i!==e&&_e.getInstance(i).hide(),_e.getOrCreateInstance(e).toggle(this)})),$.on(window,"load.bs.offcanvas.data-api",(()=>{for(const t of U.find(le))_e.getOrCreateInstance(t).show()})),$.on(window,"resize.bs.offcanvas",(()=>{for(const t of U.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&_e.getOrCreateInstance(t).hide()})),K(_e),b(_e);const ge=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),fe=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,pe=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,me=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!ge.has(i)||Boolean(fe.test(t.nodeValue)||pe.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},be={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},ve={allowList:be,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},ye={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},we={entry:"(string|element|function|null)",selector:"(string|element)"};class Ae extends R{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ve}static get DefaultType(){return ye}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},we)}_setContent(t,e,i){const s=U.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?l(e)?this._putElementInTemplate(c(e),s):this._config.html?s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const t of n){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const s=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[i]||[]);for(const e of s)me(e,n)||t.removeAttribute(e.nodeName)}return s.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Ee=new Set(["sanitize","allowList","sanitizeFn"]),Ce="fade",Te="show",ke=".modal",Le="hide.bs.modal",Oe="hover",Ie="focus",Se={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},De={allowList:be,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Ne={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Pe extends V{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return De}static get DefaultType(){return Ne}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),$.off(this._element.closest(ke),Le,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=$.trigger(this._element,this.constructor.eventName("show")),e=(u(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),$.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(Te),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))$.on(t,"mouseover",_);this._queueCallback((()=>{$.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!$.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Te),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))$.off(t,"mouseover",_);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Ce,Te),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Ce),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ae({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ce)}_isShown(){return this.tip&&this.tip.classList.contains(Te)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,s=Se[e.toUpperCase()];return i.createPopper(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)$.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Oe?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===Oe?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");$.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Ie:Oe]=!0,e._enter()})),$.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Ie:Oe]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest(ke),Le,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=W.getDataAttributes(this._element);for(const t of Object.keys(e))Ee.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:c(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=Pe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Pe);const xe={...Pe.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Me={...Pe.DefaultType,content:"(null|string|element|function)"};class je extends Pe{static get Default(){return xe}static get DefaultType(){return Me}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=je.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(je);const $e="click.bs.scrollspy",Fe="active",ze="[href]",He={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},qe={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Be extends V{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return He}static get DefaultType(){return qe}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=c(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&($.off(this._config.target,$e),$.on(this._config.target,$e,ze,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},s=(this._rootElement||document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=U.find(ze,this._config.target);for(const e of t){if(!e.hash||d(e))continue;const t=U.findOne(e.hash,this._element);h(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Fe),this._activateParents(t),$.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))U.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Fe);else for(const e of U.parents(t,".nav, .list-group"))for(const t of U.prev(e,".nav-link, .nav-item > .nav-link, .list-group-item"))t.classList.add(Fe)}_clearActiveClass(t){t.classList.remove(Fe);const e=U.find("[href].active",t);for(const t of e)t.classList.remove(Fe)}static jQueryInterface(t){return this.each((function(){const e=Be.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(window,"load.bs.scrollspy.data-api",(()=>{for(const t of U.find('[data-bs-spy="scroll"]'))Be.getOrCreateInstance(t)})),b(Be);const We="ArrowLeft",Re="ArrowRight",Ve="ArrowUp",Ke="ArrowDown",Qe="active",Xe="fade",Ye="show",Ue='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ge=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Ue}`;class Je extends V{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),$.on(this._element,"keydown.bs.tab",(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?$.trigger(e,"hide.bs.tab",{relatedTarget:t}):null;$.trigger(t,"show.bs.tab",{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Qe),this._activate(r(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),$.trigger(t,"shown.bs.tab",{relatedTarget:e})):t.classList.add(Ye)}),t,t.classList.contains(Xe)))}_deactivate(t,e){t&&(t.classList.remove(Qe),t.blur(),this._deactivate(r(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),$.trigger(t,"hidden.bs.tab",{relatedTarget:e})):t.classList.remove(Ye)}),t,t.classList.contains(Xe)))}_keydown(t){if(![We,Re,Ve,Ke].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Re,Ke].includes(t.key),i=w(this._getChildren().filter((t=>!d(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),Je.getOrCreateInstance(i).show())}_getChildren(){return U.find(Ge,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=r(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const s=(t,s)=>{const n=U.findOne(t,i);n&&n.classList.toggle(s,e)};s(".dropdown-toggle",Qe),s(".dropdown-menu",Ye),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Qe)}_getInnerElement(t){return t.matches(Ge)?t:U.findOne(Ge,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Je.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(document,"click.bs.tab",Ue,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this)||Je.getOrCreateInstance(this).show()})),$.on(window,"load.bs.tab",(()=>{for(const t of U.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Je.getOrCreateInstance(t)})),b(Je);const Ze="hide",ti="show",ei="showing",ii={animation:"boolean",autohide:"boolean",delay:"number"},si={animation:!0,autohide:!0,delay:5e3};class ni extends V{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return si}static get DefaultType(){return ii}static get NAME(){return"toast"}show(){$.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Ze),g(this._element),this._element.classList.add(ti,ei),this._queueCallback((()=>{this._element.classList.remove(ei),$.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&($.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(ei),this._queueCallback((()=>{this._element.classList.add(Ze),this._element.classList.remove(ei,ti),$.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ti),super.dispose()}isShown(){return this._element.classList.contains(ti)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),$.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),$.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),$.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ni.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return K(ni),b(ni),{Alert:Q,Button:Y,Carousel:ht,Collapse:mt,Dropdown:Mt,Modal:ne,Offcanvas:_e,Popover:je,ScrollSpy:Be,Tab:Je,Toast:ni,Tooltip:Pe}}));
(function ($){
"use strict";
$.fn.menumaker=function (options){
var nav=$(this),
settings=$.extend({
format: "dropdown",
sticky: false
}, options);
return this.each(function (){
$(this).find(".navbar-toggler").on('click', function (){
$(this).toggleClass('menu-opened');
var mainmenu=$(this).next('ul');
if(mainmenu.hasClass('open')){
mainmenu.slideToggle().removeClass('open');
}else{
mainmenu.slideToggle().addClass('open');
if(settings.format==="dropdown"){
mainmenu.find('ul').show();
}}
});
nav.find('.navbar-nav li ul').parent().addClass('has-sub');
nav.find('.navbar-nav li ul li').parent().addClass('sub-menu');
var multiTg=function (){
nav.find(".has-sub").prepend('<span class="submenu-button"></span>');
nav.find('.navbar-nav > li.has-sub > .submenu-button').on('click', function (){
$(this).next('.sub-menu').slideToggle();
$(this).siblings('ul').addClass('open').slideToggle();
$(this).parents('.navbar-nav > li.has-sub').toggleClass('active').siblings('.has-sub').children('.sub-menu').slideUp().removeClass('open').parents('li').removeClass('active');
});
nav.find('.sub-menu > li.has-sub > .submenu-button').on('click', function (){
$(this).next('.sub-menu').slideToggle();
$(this).siblings('ul').addClass('open').slideToggle();
$(this).parents('.sub-menu > li').toggleClass('active').siblings('.has-sub').children('.sub-menu').slideUp().removeClass('open').parents('li').removeClass('active');
if($(this).siblings('ul').hasClass('open')){
$(this).parents('li').eq(1).addClass('active');
}});
};
if(settings.format==='multitoggle') multiTg();
else nav.addClass('dropdown');
if(settings.sticky===true) nav.css('position', 'fixed');
var resizeFix=function (){
var mediasize=991;
if($(window).width() > mediasize){
nav.find('ul').show();
}};
resizeFix();
return $(window).on('resize', resizeFix);
});
};
$(document).ready(function (){
$(".navbar-default nav").menumaker({
format: "multitoggle"
});
var urlparam=window.location.pathname.split('/');
var menuselctor=window.location.pathname;
if(urlparam[urlparam.length - 1].length > 0) menuselctor=urlparam[urlparam.length - 1];
else menuselctor=urlparam[urlparam.length - 2];
$('.navbar-nav li').find('a[href="' + menuselctor + '"]').closest('li').addClass('active').parents().eq(1).addClass('current');
$('.navbar-nav li.has-sub ul li').find('a[href="' + menuselctor + '"]').parents().eq(4).addClass('current');
});
$(".navbar-default .attr-nav").each(function (){
$("li.search > a", this).on("click", function (e){
e.preventDefault();
$(".top-search").slideToggle();
});
});
$(".input-group-addon.close-search").on("click", function (){
$(".top-search").slideUp();
});
})(jQuery);
;(function($, window, document, undefined){
function Owl(element, options){
this.settings=null;
this.options=$.extend({}, Owl.Defaults, options);
this.$element=$(element);
this._handlers={};
this._plugins={};
this._supress={};
this._current=null;
this._speed=null;
this._coordinates=[];
this._breakpoint=null;
this._width=null;
this._items=[];
this._clones=[];
this._mergers=[];
this._widths=[];
this._invalidated={};
this._pipe=[];
this._drag={
time: null,
target: null,
pointer: null,
stage: {
start: null,
current: null
},
direction: null
};
this._states={
current: {},
tags: {
'initializing': [ 'busy' ],
'animating': [ 'busy' ],
'dragging': [ 'interacting' ]
}};
$.each([ 'onResize', 'onThrottledResize' ], $.proxy(function(i, handler){
this._handlers[handler]=$.proxy(this[handler], this);
}, this));
$.each(Owl.Plugins, $.proxy(function(key, plugin){
this._plugins[key.charAt(0).toLowerCase() + key.slice(1)]
= new plugin(this);
}, this));
$.each(Owl.Workers, $.proxy(function(priority, worker){
this._pipe.push({
'filter': worker.filter,
'run': $.proxy(worker.run, this)
});
}, this));
this.setup();
this.initialize();
}
Owl.Defaults={
items: 3,
loop: false,
center: false,
rewind: false,
checkVisibility: true,
mouseDrag: true,
touchDrag: true,
pullDrag: true,
freeDrag: false,
margin: 0,
stagePadding: 0,
merge: false,
mergeFit: true,
autoWidth: false,
startPosition: 0,
rtl: false,
smartSpeed: 250,
fluidSpeed: false,
dragEndSpeed: false,
responsive: {},
responsiveRefreshRate: 200,
responsiveBaseElement: window,
fallbackEasing: 'swing',
slideTransition: '',
info: false,
nestedItemSelector: false,
itemElement: 'div',
stageElement: 'div',
refreshClass: 'owl-refresh',
loadedClass: 'owl-loaded',
loadingClass: 'owl-loading',
rtlClass: 'owl-rtl',
responsiveClass: 'owl-responsive',
dragClass: 'owl-drag',
itemClass: 'owl-item',
stageClass: 'owl-stage',
stageOuterClass: 'owl-stage-outer',
grabClass: 'owl-grab'
};
Owl.Width={
Default: 'default',
Inner: 'inner',
Outer: 'outer'
};
Owl.Type={
Event: 'event',
State: 'state'
};
Owl.Plugins={};
Owl.Workers=[ {
filter: [ 'width', 'settings' ],
run: function(){
this._width=this.$element.width();
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
cache.current=this._items&&this._items[this.relative(this._current)];
}}, {
filter: [ 'items', 'settings' ],
run: function(){
this.$stage.children('.cloned').remove();
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
var margin=this.settings.margin||'',
grid = !this.settings.autoWidth,
rtl=this.settings.rtl,
css={
'width': 'auto',
'margin-left': rtl ? margin:'',
'margin-right': rtl ? '':margin
};
!grid&&this.$stage.children().css(css);
cache.css=css;
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
var width=(this.width() / this.settings.items).toFixed(3) - this.settings.margin,
merge=null,
iterator=this._items.length,
grid = !this.settings.autoWidth,
widths=[];
cache.items={
merge: false,
width: width
};
while (iterator--){
merge=this._mergers[iterator];
merge=this.settings.mergeFit&&Math.min(merge, this.settings.items)||merge;
cache.items.merge=merge > 1||cache.items.merge;
widths[iterator] = !grid ? this._items[iterator].width():width * merge;
}
this._widths=widths;
}}, {
filter: [ 'items', 'settings' ],
run: function(){
var clones=[],
items=this._items,
settings=this.settings,
view=Math.max(settings.items * 2, 4),
size=Math.ceil(items.length / 2) * 2,
repeat=settings.loop&&items.length ? settings.rewind ? view:Math.max(view, size):0,
append='',
prepend='';
repeat /=2;
while (repeat > 0){
clones.push(this.normalize(clones.length / 2, true));
append=append + items[clones[clones.length - 1]][0].outerHTML;
clones.push(this.normalize(items.length - 1 - (clones.length - 1) / 2, true));
prepend=items[clones[clones.length - 1]][0].outerHTML + prepend;
repeat -=1;
}
this._clones=clones;
$(append).addClass('cloned').appendTo(this.$stage);
$(prepend).addClass('cloned').prependTo(this.$stage);
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(){
var rtl=this.settings.rtl ? 1:-1,
size=this._clones.length + this._items.length,
iterator=-1,
previous=0,
current=0,
coordinates=[];
while (++iterator < size){
previous=coordinates[iterator - 1]||0;
current=this._widths[this.relative(iterator)] + this.settings.margin;
coordinates.push(previous + current * rtl);
}
this._coordinates=coordinates;
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(){
var padding=this.settings.stagePadding,
coordinates=this._coordinates,
css={
'width': Math.ceil(Math.abs(coordinates[coordinates.length - 1])) + padding * 2,
'padding-left': padding||'',
'padding-right': padding||''
};
this.$stage.css(css);
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
var iterator=this._coordinates.length,
grid = !this.settings.autoWidth,
items=this.$stage.children();
if(grid&&cache.items.merge){
while (iterator--){
cache.css.width=this._widths[this.relative(iterator)];
items.eq(iterator).css(cache.css);
}}else if(grid){
cache.css.width=cache.items.width;
items.css(cache.css);
}}
}, {
filter: [ 'items' ],
run: function(){
this._coordinates.length < 1&&this.$stage.removeAttr('style');
}}, {
filter: [ 'width', 'items', 'settings' ],
run: function(cache){
cache.current=cache.current ? this.$stage.children().index(cache.current):0;
cache.current=Math.max(this.minimum(), Math.min(this.maximum(), cache.current));
this.reset(cache.current);
}}, {
filter: [ 'position' ],
run: function(){
this.animate(this.coordinates(this._current));
}}, {
filter: [ 'width', 'position', 'items', 'settings' ],
run: function(){
var rtl=this.settings.rtl ? 1:-1,
padding=this.settings.stagePadding * 2,
begin=this.coordinates(this.current()) + padding,
end=begin + this.width() * rtl,
inner, outer, matches=[], i, n;
for (i=0, n=this._coordinates.length; i < n; i++){
inner=this._coordinates[i - 1]||0;
outer=Math.abs(this._coordinates[i]) + padding * rtl;
if((this.op(inner, '<=', begin)&&(this.op(inner, '>', end)))
|| (this.op(outer, '<', begin)&&this.op(outer, '>', end))){
matches.push(i);
}}
this.$stage.children('.active').removeClass('active');
this.$stage.children(':eq(' + matches.join('), :eq(') + ')').addClass('active');
this.$stage.children('.center').removeClass('center');
if(this.settings.center){
this.$stage.children().eq(this.current()).addClass('center');
}}
} ];
Owl.prototype.initializeStage=function(){
this.$stage=this.$element.find('.' + this.settings.stageClass);
if(this.$stage.length){
return;
}
this.$element.addClass(this.options.loadingClass);
this.$stage=$('<' + this.settings.stageElement + '>', {
"class": this.settings.stageClass
}).wrap($('<div/>', {
"class": this.settings.stageOuterClass
}));
this.$element.append(this.$stage.parent());
};
Owl.prototype.initializeItems=function(){
var $items=this.$element.find('.owl-item');
if($items.length){
this._items=$items.get().map(function(item){
return $(item);
});
this._mergers=this._items.map(function(){
return 1;
});
this.refresh();
return;
}
this.replace(this.$element.children().not(this.$stage.parent()));
if(this.isVisible()){
this.refresh();
}else{
this.invalidate('width');
}
this.$element
.removeClass(this.options.loadingClass)
.addClass(this.options.loadedClass);
};
Owl.prototype.initialize=function(){
this.enter('initializing');
this.trigger('initialize');
this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl);
if(this.settings.autoWidth&&!this.is('pre-loading')){
var imgs, nestedSelector, width;
imgs=this.$element.find('img');
nestedSelector=this.settings.nestedItemSelector ? '.' + this.settings.nestedItemSelector:undefined;
width=this.$element.children(nestedSelector).width();
if(imgs.length&&width <=0){
this.preloadAutoWidthImages(imgs);
}}
this.initializeStage();
this.initializeItems();
this.registerEventHandlers();
this.leave('initializing');
this.trigger('initialized');
};
Owl.prototype.isVisible=function(){
return this.settings.checkVisibility
? this.$element.is(':visible')
: true;
};
Owl.prototype.setup=function(){
var viewport=this.viewport(),
overwrites=this.options.responsive,
match=-1,
settings=null;
if(!overwrites){
settings=$.extend({}, this.options);
}else{
$.each(overwrites, function(breakpoint){
if(breakpoint <=viewport&&breakpoint > match){
match=Number(breakpoint);
}});
settings=$.extend({}, this.options, overwrites[match]);
if(typeof settings.stagePadding==='function'){
settings.stagePadding=settings.stagePadding();
}
delete settings.responsive;
if(settings.responsiveClass){
this.$element.attr('class',
this.$element.attr('class').replace(new RegExp('(' + this.options.responsiveClass + '-)\\S+\\s', 'g'), '$1' + match)
);
}}
this.trigger('change', { property: { name: 'settings', value: settings }});
this._breakpoint=match;
this.settings=settings;
this.invalidate('settings');
this.trigger('changed', { property: { name: 'settings', value: this.settings }});
};
Owl.prototype.optionsLogic=function(){
if(this.settings.autoWidth){
this.settings.stagePadding=false;
this.settings.merge=false;
}};
Owl.prototype.prepare=function(item){
var event=this.trigger('prepare', { content: item });
if(!event.data){
event.data=$('<' + this.settings.itemElement + '/>')
.addClass(this.options.itemClass).append(item)
}
this.trigger('prepared', { content: event.data });
return event.data;
};
Owl.prototype.update=function(){
var i=0,
n=this._pipe.length,
filter=$.proxy(function(p){ return this[p] }, this._invalidated),
cache={};
while (i < n){
if(this._invalidated.all||$.grep(this._pipe[i].filter, filter).length > 0){
this._pipe[i].run(cache);
}
i++;
}
this._invalidated={};
!this.is('valid')&&this.enter('valid');
};
Owl.prototype.width=function(dimension){
dimension=dimension||Owl.Width.Default;
switch (dimension){
case Owl.Width.Inner:
case Owl.Width.Outer:
return this._width;
default:
return this._width - this.settings.stagePadding * 2 + this.settings.margin;
}};
Owl.prototype.refresh=function(){
this.enter('refreshing');
this.trigger('refresh');
this.setup();
this.optionsLogic();
this.$element.addClass(this.options.refreshClass);
this.update();
this.$element.removeClass(this.options.refreshClass);
this.leave('refreshing');
this.trigger('refreshed');
};
Owl.prototype.onThrottledResize=function(){
window.clearTimeout(this.resizeTimer);
this.resizeTimer=window.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate);
};
Owl.prototype.onResize=function(){
if(!this._items.length){
return false;
}
if(this._width===this.$element.width()){
return false;
}
if(!this.isVisible()){
return false;
}
this.enter('resizing');
if(this.trigger('resize').isDefaultPrevented()){
this.leave('resizing');
return false;
}
this.invalidate('width');
this.refresh();
this.leave('resizing');
this.trigger('resized');
};
Owl.prototype.registerEventHandlers=function(){
if($.support.transition){
this.$stage.on($.support.transition.end + '.owl.core', $.proxy(this.onTransitionEnd, this));
}
if(this.settings.responsive!==false){
this.on(window, 'resize', this._handlers.onThrottledResize);
}
if(this.settings.mouseDrag){
this.$element.addClass(this.options.dragClass);
this.$stage.on('mousedown.owl.core', $.proxy(this.onDragStart, this));
this.$stage.on('dragstart.owl.core selectstart.owl.core', function(){ return false });
}
if(this.settings.touchDrag){
this.$stage.on('touchstart.owl.core', $.proxy(this.onDragStart, this));
this.$stage.on('touchcancel.owl.core', $.proxy(this.onDragEnd, this));
}};
Owl.prototype.onDragStart=function(event){
var stage=null;
if(event.which===3){
return;
}
if($.support.transform){
stage=this.$stage.css('transform').replace(/.*\(|\)| /g, '').split(',');
stage={
x: stage[stage.length===16 ? 12:4],
y: stage[stage.length===16 ? 13:5]
};}else{
stage=this.$stage.position();
stage={
x: this.settings.rtl ?
stage.left + this.$stage.width() - this.width() + this.settings.margin :
stage.left,
y: stage.top
};}
if(this.is('animating')){
$.support.transform ? this.animate(stage.x):this.$stage.stop()
this.invalidate('position');
}
this.$element.toggleClass(this.options.grabClass, event.type==='mousedown');
this.speed(0);
this._drag.time=new Date().getTime();
this._drag.target=$(event.target);
this._drag.stage.start=stage;
this._drag.stage.current=stage;
this._drag.pointer=this.pointer(event);
$(document).on('mouseup.owl.core touchend.owl.core', $.proxy(this.onDragEnd, this));
$(document).one('mousemove.owl.core touchmove.owl.core', $.proxy(function(event){
var delta=this.difference(this._drag.pointer, this.pointer(event));
$(document).on('mousemove.owl.core touchmove.owl.core', $.proxy(this.onDragMove, this));
if(Math.abs(delta.x) < Math.abs(delta.y)&&this.is('valid')){
return;
}
event.preventDefault();
this.enter('dragging');
this.trigger('drag');
}, this));
};
Owl.prototype.onDragMove=function(event){
var minimum=null,
maximum=null,
pull=null,
delta=this.difference(this._drag.pointer, this.pointer(event)),
stage=this.difference(this._drag.stage.start, delta);
if(!this.is('dragging')){
return;
}
event.preventDefault();
if(this.settings.loop){
minimum=this.coordinates(this.minimum());
maximum=this.coordinates(this.maximum() + 1) - minimum;
stage.x=(((stage.x - minimum) % maximum + maximum) % maximum) + minimum;
}else{
minimum=this.settings.rtl ? this.coordinates(this.maximum()):this.coordinates(this.minimum());
maximum=this.settings.rtl ? this.coordinates(this.minimum()):this.coordinates(this.maximum());
pull=this.settings.pullDrag ? -1 * delta.x / 5:0;
stage.x=Math.max(Math.min(stage.x, minimum + pull), maximum + pull);
}
this._drag.stage.current=stage;
this.animate(stage.x);
};
Owl.prototype.onDragEnd=function(event){
var delta=this.difference(this._drag.pointer, this.pointer(event)),
stage=this._drag.stage.current,
direction=delta.x > 0 ^ this.settings.rtl ? 'left':'right';
$(document).off('.owl.core');
this.$element.removeClass(this.options.grabClass);
if(delta.x!==0&&this.is('dragging')||!this.is('valid')){
this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed);
this.current(this.closest(stage.x, delta.x!==0 ? direction:this._drag.direction));
this.invalidate('position');
this.update();
this._drag.direction=direction;
if(Math.abs(delta.x) > 3||new Date().getTime() - this._drag.time > 300){
this._drag.target.one('click.owl.core', function(){ return false; });
}}
if(!this.is('dragging')){
return;
}
this.leave('dragging');
this.trigger('dragged');
};
Owl.prototype.closest=function(coordinate, direction){
var position=-1,
pull=30,
width=this.width(),
coordinates=this.coordinates();
if(!this.settings.freeDrag){
$.each(coordinates, $.proxy(function(index, value){
if(direction==='left'&&coordinate > value - pull&&coordinate < value + pull){
position=index;
}else if(direction==='right'&&coordinate > value - width - pull&&coordinate < value - width + pull){
position=index + 1;
}else if(this.op(coordinate, '<', value)
&& this.op(coordinate, '>', coordinates[index + 1]!==undefined ? coordinates[index + 1]:value - width)){
position=direction==='left' ? index + 1:index;
}
return position===-1;
}, this));
}
if(!this.settings.loop){
if(this.op(coordinate, '>', coordinates[this.minimum()])){
position=coordinate=this.minimum();
}else if(this.op(coordinate, '<', coordinates[this.maximum()])){
position=coordinate=this.maximum();
}}
return position;
};
Owl.prototype.animate=function(coordinate){
var animate=this.speed() > 0;
this.is('animating')&&this.onTransitionEnd();
if(animate){
this.enter('animating');
this.trigger('translate');
}
if($.support.transform3d&&$.support.transition){
this.$stage.css({
transform: 'translate3d(' + coordinate + 'px,0px,0px)',
transition: (this.speed() / 1000) + 's' + (
this.settings.slideTransition ? ' ' + this.settings.slideTransition:''
)
});
}else if(animate){
this.$stage.animate({
left: coordinate + 'px'
}, this.speed(), this.settings.fallbackEasing, $.proxy(this.onTransitionEnd, this));
}else{
this.$stage.css({
left: coordinate + 'px'
});
}};
Owl.prototype.is=function(state){
return this._states.current[state]&&this._states.current[state] > 0;
};
Owl.prototype.current=function(position){
if(position===undefined){
return this._current;
}
if(this._items.length===0){
return undefined;
}
position=this.normalize(position);
if(this._current!==position){
var event=this.trigger('change', { property: { name: 'position', value: position }});
if(event.data!==undefined){
position=this.normalize(event.data);
}
this._current=position;
this.invalidate('position');
this.trigger('changed', { property: { name: 'position', value: this._current }});
}
return this._current;
};
Owl.prototype.invalidate=function(part){
if($.type(part)==='string'){
this._invalidated[part]=true;
this.is('valid')&&this.leave('valid');
}
return $.map(this._invalidated, function(v, i){ return i });
};
Owl.prototype.reset=function(position){
position=this.normalize(position);
if(position===undefined){
return;
}
this._speed=0;
this._current=position;
this.suppress([ 'translate', 'translated' ]);
this.animate(this.coordinates(position));
this.release([ 'translate', 'translated' ]);
};
Owl.prototype.normalize=function(position, relative){
var n=this._items.length,
m=relative ? 0:this._clones.length;
if(!this.isNumeric(position)||n < 1){
position=undefined;
}else if(position < 0||position >=n + m){
position=((position - m / 2) % n + n) % n + m / 2;
}
return position;
};
Owl.prototype.relative=function(position){
position -=this._clones.length / 2;
return this.normalize(position, true);
};
Owl.prototype.maximum=function(relative){
var settings=this.settings,
maximum=this._coordinates.length,
iterator,
reciprocalItemsWidth,
elementWidth;
if(settings.loop){
maximum=this._clones.length / 2 + this._items.length - 1;
}else if(settings.autoWidth||settings.merge){
iterator=this._items.length;
if(iterator){
reciprocalItemsWidth=this._items[--iterator].width();
elementWidth=this.$element.width();
while (iterator--){
reciprocalItemsWidth +=this._items[iterator].width() + this.settings.margin;
if(reciprocalItemsWidth > elementWidth){
break;
}}
}
maximum=iterator + 1;
}else if(settings.center){
maximum=this._items.length - 1;
}else{
maximum=this._items.length - settings.items;
}
if(relative){
maximum -=this._clones.length / 2;
}
return Math.max(maximum, 0);
};
Owl.prototype.minimum=function(relative){
return relative ? 0:this._clones.length / 2;
};
Owl.prototype.items=function(position){
if(position===undefined){
return this._items.slice();
}
position=this.normalize(position, true);
return this._items[position];
};
Owl.prototype.mergers=function(position){
if(position===undefined){
return this._mergers.slice();
}
position=this.normalize(position, true);
return this._mergers[position];
};
Owl.prototype.clones=function(position){
var odd=this._clones.length / 2,
even=odd + this._items.length,
map=function(index){ return index % 2===0 ? even + index / 2:odd - (index + 1) / 2 };
if(position===undefined){
return $.map(this._clones, function(v, i){ return map(i) });
}
return $.map(this._clones, function(v, i){ return v===position ? map(i):null });
};
Owl.prototype.speed=function(speed){
if(speed!==undefined){
this._speed=speed;
}
return this._speed;
};
Owl.prototype.coordinates=function(position){
var multiplier=1,
newPosition=position - 1,
coordinate;
if(position===undefined){
return $.map(this._coordinates, $.proxy(function(coordinate, index){
return this.coordinates(index);
}, this));
}
if(this.settings.center){
if(this.settings.rtl){
multiplier=-1;
newPosition=position + 1;
}
coordinate=this._coordinates[position];
coordinate +=(this.width() - coordinate + (this._coordinates[newPosition]||0)) / 2 * multiplier;
}else{
coordinate=this._coordinates[newPosition]||0;
}
coordinate=Math.ceil(coordinate);
return coordinate;
};
Owl.prototype.duration=function(from, to, factor){
if(factor===0){
return 0;
}
return Math.min(Math.max(Math.abs(to - from), 1), 6) * Math.abs((factor||this.settings.smartSpeed));
};
Owl.prototype.to=function(position, speed){
var current=this.current(),
revert=null,
distance=position - this.relative(current),
direction=(distance > 0) - (distance < 0),
items=this._items.length,
minimum=this.minimum(),
maximum=this.maximum();
if(this.settings.loop){
if(!this.settings.rewind&&Math.abs(distance) > items / 2){
distance +=direction * -1 * items;
}
position=current + distance;
revert=((position - minimum) % items + items) % items + minimum;
if(revert!==position&&revert - distance <=maximum&&revert - distance > 0){
current=revert - distance;
position=revert;
this.reset(current);
}}else if(this.settings.rewind){
maximum +=1;
position=(position % maximum + maximum) % maximum;
}else{
position=Math.max(minimum, Math.min(maximum, position));
}
this.speed(this.duration(current, position, speed));
this.current(position);
if(this.isVisible()){
this.update();
}};
Owl.prototype.next=function(speed){
speed=speed||false;
this.to(this.relative(this.current()) + 1, speed);
};
Owl.prototype.prev=function(speed){
speed=speed||false;
this.to(this.relative(this.current()) - 1, speed);
};
Owl.prototype.onTransitionEnd=function(event){
if(event!==undefined){
event.stopPropagation();
if((event.target||event.srcElement||event.originalTarget)!==this.$stage.get(0)){
return false;
}}
this.leave('animating');
this.trigger('translated');
};
Owl.prototype.viewport=function(){
var width;
if(this.options.responsiveBaseElement!==window){
width=$(this.options.responsiveBaseElement).width();
}else if(window.innerWidth){
width=window.innerWidth;
}else if(document.documentElement&&document.documentElement.clientWidth){
width=document.documentElement.clientWidth;
}else{
console.warn('Can not detect viewport width.');
}
return width;
};
Owl.prototype.replace=function(content){
this.$stage.empty();
this._items=[];
if(content){
content=(content instanceof jQuery) ? content:$(content);
}
if(this.settings.nestedItemSelector){
content=content.find('.' + this.settings.nestedItemSelector);
}
content.filter(function(){
return this.nodeType===1;
}).each($.proxy(function(index, item){
item=this.prepare(item);
this.$stage.append(item);
this._items.push(item);
this._mergers.push(item.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1);
}, this));
this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition:0);
this.invalidate('items');
};
Owl.prototype.add=function(content, position){
var current=this.relative(this._current);
position=position===undefined ? this._items.length:this.normalize(position, true);
content=content instanceof jQuery ? content:$(content);
this.trigger('add', { content: content, position: position });
content=this.prepare(content);
if(this._items.length===0||position===this._items.length){
this._items.length===0&&this.$stage.append(content);
this._items.length!==0&&this._items[position - 1].after(content);
this._items.push(content);
this._mergers.push(content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1);
}else{
this._items[position].before(content);
this._items.splice(position, 0, content);
this._mergers.splice(position, 0, content.find('[data-merge]').addBack('[data-merge]').attr('data-merge') * 1||1);
}
this._items[current]&&this.reset(this._items[current].index());
this.invalidate('items');
this.trigger('added', { content: content, position: position });
};
Owl.prototype.remove=function(position){
position=this.normalize(position, true);
if(position===undefined){
return;
}
this.trigger('remove', { content: this._items[position], position: position });
this._items[position].remove();
this._items.splice(position, 1);
this._mergers.splice(position, 1);
this.invalidate('items');
this.trigger('removed', { content: null, position: position });
};
Owl.prototype.preloadAutoWidthImages=function(images){
images.each($.proxy(function(i, element){
this.enter('pre-loading');
element=$(element);
$(new Image()).one('load', $.proxy(function(e){
element.attr('src', e.target.src);
element.css('opacity', 1);
this.leave('pre-loading');
!this.is('pre-loading')&&!this.is('initializing')&&this.refresh();
}, this)).attr('src', element.attr('src')||element.attr('data-src')||element.attr('data-src-retina'));
}, this));
};
Owl.prototype.destroy=function(){
this.$element.off('.owl.core');
this.$stage.off('.owl.core');
$(document).off('.owl.core');
if(this.settings.responsive!==false){
window.clearTimeout(this.resizeTimer);
this.off(window, 'resize', this._handlers.onThrottledResize);
}
for (var i in this._plugins){
this._plugins[i].destroy();
}
this.$stage.children('.cloned').remove();
this.$stage.unwrap();
this.$stage.children().contents().unwrap();
this.$stage.children().unwrap();
this.$stage.remove();
this.$element
.removeClass(this.options.refreshClass)
.removeClass(this.options.loadingClass)
.removeClass(this.options.loadedClass)
.removeClass(this.options.rtlClass)
.removeClass(this.options.dragClass)
.removeClass(this.options.grabClass)
.attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), ''))
.removeData('owl.carousel');
};
Owl.prototype.op=function(a, o, b){
var rtl=this.settings.rtl;
switch (o){
case '<':
return rtl ? a > b:a < b;
case '>':
return rtl ? a < b:a > b;
case '>=':
return rtl ? a <=b:a >=b;
case '<=':
return rtl ? a >=b:a <=b;
default:
break;
}};
Owl.prototype.on=function(element, event, listener, capture){
if(element.addEventListener){
element.addEventListener(event, listener, capture);
}else if(element.attachEvent){
element.attachEvent('on' + event, listener);
}};
Owl.prototype.off=function(element, event, listener, capture){
if(element.removeEventListener){
element.removeEventListener(event, listener, capture);
}else if(element.detachEvent){
element.detachEvent('on' + event, listener);
}};
Owl.prototype.trigger=function(name, data, namespace, state, enter){
var status={
item: { count: this._items.length, index: this.current() }}, handler=$.camelCase($.grep([ 'on', name, namespace ], function(v){ return v })
.join('-').toLowerCase()
), event=$.Event([ name, 'owl', namespace||'carousel' ].join('.').toLowerCase(),
$.extend({ relatedTarget: this }, status, data)
);
if(!this._supress[name]){
$.each(this._plugins, function(name, plugin){
if(plugin.onTrigger){
plugin.onTrigger(event);
}});
this.register({ type: Owl.Type.Event, name: name });
this.$element.trigger(event);
if(this.settings&&typeof this.settings[handler]==='function'){
this.settings[handler].call(this, event);
}}
return event;
};
Owl.prototype.enter=function(name){
$.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){
if(this._states.current[name]===undefined){
this._states.current[name]=0;
}
this._states.current[name]++;
}, this));
};
Owl.prototype.leave=function(name){
$.each([ name ].concat(this._states.tags[name]||[]), $.proxy(function(i, name){
this._states.current[name]--;
}, this));
};
Owl.prototype.register=function(object){
if(object.type===Owl.Type.Event){
if(!$.event.special[object.name]){
$.event.special[object.name]={};}
if(!$.event.special[object.name].owl){
var _default=$.event.special[object.name]._default;
$.event.special[object.name]._default=function(e){
if(_default&&_default.apply&&(!e.namespace||e.namespace.indexOf('owl')===-1)){
return _default.apply(this, arguments);
}
return e.namespace&&e.namespace.indexOf('owl') > -1;
};
$.event.special[object.name].owl=true;
}}else if(object.type===Owl.Type.State){
if(!this._states.tags[object.name]){
this._states.tags[object.name]=object.tags;
}else{
this._states.tags[object.name]=this._states.tags[object.name].concat(object.tags);
}
this._states.tags[object.name]=$.grep(this._states.tags[object.name], $.proxy(function(tag, i){
return $.inArray(tag, this._states.tags[object.name])===i;
}, this));
}};
Owl.prototype.suppress=function(events){
$.each(events, $.proxy(function(index, event){
this._supress[event]=true;
}, this));
};
Owl.prototype.release=function(events){
$.each(events, $.proxy(function(index, event){
delete this._supress[event];
}, this));
};
Owl.prototype.pointer=function(event){
var result={ x: null, y: null };
event=event.originalEvent||event||window.event;
event=event.touches&&event.touches.length ?
event.touches[0]:event.changedTouches&&event.changedTouches.length ?
event.changedTouches[0]:event;
if(event.pageX){
result.x=event.pageX;
result.y=event.pageY;
}else{
result.x=event.clientX;
result.y=event.clientY;
}
return result;
};
Owl.prototype.isNumeric=function(number){
return !isNaN(parseFloat(number));
};
Owl.prototype.difference=function(first, second){
return {
x: first.x - second.x,
y: first.y - second.y
};};
$.fn.owlCarousel=function(option){
var args=Array.prototype.slice.call(arguments, 1);
return this.each(function(){
var $this=$(this),
data=$this.data('owl.carousel');
if(!data){
data=new Owl(this, typeof option=='object'&&option);
$this.data('owl.carousel', data);
$.each([
'next', 'prev', 'to', 'destroy', 'refresh', 'replace', 'add', 'remove'
], function(i, event){
data.register({ type: Owl.Type.Event, name: event });
data.$element.on(event + '.owl.carousel.core', $.proxy(function(e){
if(e.namespace&&e.relatedTarget!==this){
this.suppress([ event ]);
data[event].apply(this, [].slice.call(arguments, 1));
this.release([ event ]);
}}, data));
});
}
if(typeof option=='string'&&option.charAt(0)!=='_'){
data[option].apply(data, args);
}});
};
$.fn.owlCarousel.Constructor=Owl;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var AutoRefresh=function(carousel){
this._core=carousel;
this._interval=null;
this._visible=null;
this._handlers={
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoRefresh){
this.watch();
}}, this)
};
this._core.options=$.extend({}, AutoRefresh.Defaults, this._core.options);
this._core.$element.on(this._handlers);
};
AutoRefresh.Defaults={
autoRefresh: true,
autoRefreshInterval: 500
};
AutoRefresh.prototype.watch=function(){
if(this._interval){
return;
}
this._visible=this._core.isVisible();
this._interval=window.setInterval($.proxy(this.refresh, this), this._core.settings.autoRefreshInterval);
};
AutoRefresh.prototype.refresh=function(){
if(this._core.isVisible()===this._visible){
return;
}
this._visible = !this._visible;
this._core.$element.toggleClass('owl-hidden', !this._visible);
this._visible&&(this._core.invalidate('width')&&this._core.refresh());
};
AutoRefresh.prototype.destroy=function(){
var handler, property;
window.clearInterval(this._interval);
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.AutoRefresh=AutoRefresh;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var Lazy=function(carousel){
this._core=carousel;
this._loaded=[];
this._handlers={
'initialized.owl.carousel change.owl.carousel resized.owl.carousel': $.proxy(function(e){
if(!e.namespace){
return;
}
if(!this._core.settings||!this._core.settings.lazyLoad){
return;
}
if((e.property&&e.property.name=='position')||e.type=='initialized'){
var settings=this._core.settings,
n=(settings.center&&Math.ceil(settings.items / 2)||settings.items),
i=((settings.center&&n * -1)||0),
position=(e.property&&e.property.value!==undefined ? e.property.value:this._core.current()) + i,
clones=this._core.clones().length,
load=$.proxy(function(i, v){ this.load(v) }, this);
if(settings.lazyLoadEager > 0){
n +=settings.lazyLoadEager;
if(settings.loop){
position -=settings.lazyLoadEager;
n++;
}}
while (i++ < n){
this.load(clones / 2 + this._core.relative(position));
clones&&$.each(this._core.clones(this._core.relative(position)), load);
position++;
}}
}, this)
};
this._core.options=$.extend({}, Lazy.Defaults, this._core.options);
this._core.$element.on(this._handlers);
};
Lazy.Defaults={
lazyLoad: false,
lazyLoadEager: 0
};
Lazy.prototype.load=function(position){
var $item=this._core.$stage.children().eq(position),
$elements=$item&&$item.find('.owl-lazy');
if(!$elements||$.inArray($item.get(0), this._loaded) > -1){
return;
}
$elements.each($.proxy(function(index, element){
var $element=$(element), image,
url=(window.devicePixelRatio > 1&&$element.attr('data-src-retina'))||$element.attr('data-src')||$element.attr('data-srcset');
this._core.trigger('load', { element: $element, url: url }, 'lazy');
if($element.is('img')){
$element.one('load.owl.lazy', $.proxy(function(){
$element.css('opacity', 1);
this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
}, this)).attr('src', url);
}else if($element.is('source')){
$element.one('load.owl.lazy', $.proxy(function(){
this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
}, this)).attr('srcset', url);
}else{
image=new Image();
image.onload=$.proxy(function(){
$element.css({
'background-image': 'url("' + url + '")',
'opacity': '1'
});
this._core.trigger('loaded', { element: $element, url: url }, 'lazy');
}, this);
image.src=url;
}}, this));
this._loaded.push($item.get(0));
};
Lazy.prototype.destroy=function(){
var handler, property;
for (handler in this.handlers){
this._core.$element.off(handler, this.handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Lazy=Lazy;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var AutoHeight=function(carousel){
this._core=carousel;
this._previousHeight=null;
this._handlers={
'initialized.owl.carousel refreshed.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoHeight){
this.update();
}}, this),
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoHeight&&e.property.name==='position'){
this.update();
}}, this),
'loaded.owl.lazy': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoHeight
&& e.element.closest('.' + this._core.settings.itemClass).index()===this._core.current()){
this.update();
}}, this)
};
this._core.options=$.extend({}, AutoHeight.Defaults, this._core.options);
this._core.$element.on(this._handlers);
this._intervalId=null;
var refThis=this;
$(window).on('load', function(){
if(refThis._core.settings.autoHeight){
refThis.update();
}});
$(window).resize(function(){
if(refThis._core.settings.autoHeight){
if(refThis._intervalId!=null){
clearTimeout(refThis._intervalId);
}
refThis._intervalId=setTimeout(function(){
refThis.update();
}, 250);
}});
};
AutoHeight.Defaults={
autoHeight: false,
autoHeightClass: 'owl-height'
};
AutoHeight.prototype.update=function(){
var start=this._core._current,
end=start + this._core.settings.items,
lazyLoadEnabled=this._core.settings.lazyLoad,
visible=this._core.$stage.children().toArray().slice(start, end),
heights=[],
maxheight=0;
$.each(visible, function(index, item){
heights.push($(item).height());
});
maxheight=Math.max.apply(null, heights);
if(maxheight <=1&&lazyLoadEnabled&&this._previousHeight){
maxheight=this._previousHeight;
}
this._previousHeight=maxheight;
this._core.$stage.parent()
.height(maxheight)
.addClass(this._core.settings.autoHeightClass);
};
AutoHeight.prototype.destroy=function(){
var handler, property;
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!=='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.AutoHeight=AutoHeight;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var Video=function(carousel){
this._core=carousel;
this._videos={};
this._playing=null;
this._handlers={
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace){
this._core.register({ type: 'state', name: 'playing', tags: [ 'interacting' ] });
}}, this),
'resize.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.video&&this.isInFullScreen()){
e.preventDefault();
}}, this),
'refreshed.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.is('resizing')){
this._core.$stage.find('.cloned .owl-video-frame').remove();
}}, this),
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name==='position'&&this._playing){
this.stop();
}}, this),
'prepared.owl.carousel': $.proxy(function(e){
if(!e.namespace){
return;
}
var $element=$(e.content).find('.owl-video');
if($element.length){
$element.css('display', 'none');
this.fetch($element, $(e.content));
}}, this)
};
this._core.options=$.extend({}, Video.Defaults, this._core.options);
this._core.$element.on(this._handlers);
this._core.$element.on('click.owl.video', '.owl-video-play-icon', $.proxy(function(e){
this.play(e);
}, this));
};
Video.Defaults={
video: false,
videoHeight: false,
videoWidth: false
};
Video.prototype.fetch=function(target, item){
var type=(function(){
if(target.attr('data-vimeo-id')){
return 'vimeo';
}else if(target.attr('data-vzaar-id')){
return 'vzaar'
}else{
return 'youtube';
}})(),
id=target.attr('data-vimeo-id')||target.attr('data-youtube-id')||target.attr('data-vzaar-id'),
width=target.attr('data-width')||this._core.settings.videoWidth,
height=target.attr('data-height')||this._core.settings.videoHeight,
url=target.attr('href');
if(url){
id=url.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/);
if(id[3].indexOf('youtu') > -1){
type='youtube';
}else if(id[3].indexOf('vimeo') > -1){
type='vimeo';
}else if(id[3].indexOf('vzaar') > -1){
type='vzaar';
}else{
throw new Error('Video URL not supported.');
}
id=id[6];
}else{
throw new Error('Missing video URL.');
}
this._videos[url]={
type: type,
id: id,
width: width,
height: height
};
item.attr('data-video', url);
this.thumbnail(target, this._videos[url]);
};
Video.prototype.thumbnail=function(target, video){
var tnLink,
icon,
path,
dimensions=video.width&&video.height ? 'width:' + video.width + 'px;height:' + video.height + 'px;':'',
customTn=target.find('img'),
srcType='src',
lazyClass='',
settings=this._core.settings,
create=function(path){
icon='<div class="owl-video-play-icon"></div>';
if(settings.lazyLoad){
tnLink=$('<div/>',{
"class": 'owl-video-tn ' + lazyClass,
"srcType": path
});
}else{
tnLink=$('<div/>', {
"class": "owl-video-tn",
"style": 'opacity:1;background-image:url(' + path + ')'
});
}
target.after(tnLink);
target.after(icon);
};
target.wrap($('<div/>', {
"class": "owl-video-wrapper",
"style": dimensions
}));
if(this._core.settings.lazyLoad){
srcType='data-src';
lazyClass='owl-lazy';
}
if(customTn.length){
create(customTn.attr(srcType));
customTn.remove();
return false;
}
if(video.type==='youtube'){
path="//img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
create(path);
}else if(video.type==='vimeo'){
$.ajax({
type: 'GET',
url: '//vimeo.com/api/v2/video/' + video.id + '.json',
jsonp: 'callback',
dataType: 'jsonp',
success: function(data){
path=data[0].thumbnail_large;
create(path);
}});
}else if(video.type==='vzaar'){
$.ajax({
type: 'GET',
url: '//vzaar.com/api/videos/' + video.id + '.json',
jsonp: 'callback',
dataType: 'jsonp',
success: function(data){
path=data.framegrab_url;
create(path);
}});
}};
Video.prototype.stop=function(){
this._core.trigger('stop', null, 'video');
this._playing.find('.owl-video-frame').remove();
this._playing.removeClass('owl-video-playing');
this._playing=null;
this._core.leave('playing');
this._core.trigger('stopped', null, 'video');
};
Video.prototype.play=function(event){
var target=$(event.target),
item=target.closest('.' + this._core.settings.itemClass),
video=this._videos[item.attr('data-video')],
width=video.width||'100%',
height=video.height||this._core.$stage.height(),
html,
iframe;
if(this._playing){
return;
}
this._core.enter('playing');
this._core.trigger('play', null, 'video');
item=this._core.items(this._core.relative(item.index()));
this._core.reset(item.index());
html=$('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>');
html.attr('height', height);
html.attr('width', width);
if(video.type==='youtube'){
html.attr('src', '//www.youtube.com/embed/' + video.id + '?autoplay=1&rel=0&v=' + video.id);
}else if(video.type==='vimeo'){
html.attr('src', '//player.vimeo.com/video/' + video.id + '?autoplay=1');
}else if(video.type==='vzaar'){
html.attr('src', '//view.vzaar.com/' + video.id + '/player?autoplay=true');
}
iframe=$(html).wrap('<div class="owl-video-frame" />').insertAfter(item.find('.owl-video'));
this._playing=item.addClass('owl-video-playing');
};
Video.prototype.isInFullScreen=function(){
var element=document.fullscreenElement||document.mozFullScreenElement ||
document.webkitFullscreenElement;
return element&&$(element).parent().hasClass('owl-video-frame');
};
Video.prototype.destroy=function(){
var handler, property;
this._core.$element.off('click.owl.video');
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Video=Video;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var Animate=function(scope){
this.core=scope;
this.core.options=$.extend({}, Animate.Defaults, this.core.options);
this.swapping=true;
this.previous=undefined;
this.next=undefined;
this.handlers={
'change.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name=='position'){
this.previous=this.core.current();
this.next=e.property.value;
}}, this),
'drag.owl.carousel dragged.owl.carousel translated.owl.carousel': $.proxy(function(e){
if(e.namespace){
this.swapping=e.type=='translated';
}}, this),
'translate.owl.carousel': $.proxy(function(e){
if(e.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)){
this.swap();
}}, this)
};
this.core.$element.on(this.handlers);
};
Animate.Defaults={
animateOut: false,
animateIn: false
};
Animate.prototype.swap=function(){
if(this.core.settings.items!==1){
return;
}
if(!$.support.animation||!$.support.transition){
return;
}
this.core.speed(0);
var left,
clear=$.proxy(this.clear, this),
previous=this.core.$stage.children().eq(this.previous),
next=this.core.$stage.children().eq(this.next),
incoming=this.core.settings.animateIn,
outgoing=this.core.settings.animateOut;
if(this.core.current()===this.previous){
return;
}
if(outgoing){
left=this.core.coordinates(this.previous) - this.core.coordinates(this.next);
previous.one($.support.animation.end, clear)
.css({ 'left': left + 'px' })
.addClass('animated owl-animated-out')
.addClass(outgoing);
}
if(incoming){
next.one($.support.animation.end, clear)
.addClass('animated owl-animated-in')
.addClass(incoming);
}};
Animate.prototype.clear=function(e){
$(e.target).css({ 'left': '' })
.removeClass('animated owl-animated-out owl-animated-in')
.removeClass(this.core.settings.animateIn)
.removeClass(this.core.settings.animateOut);
this.core.onTransitionEnd();
};
Animate.prototype.destroy=function(){
var handler, property;
for (handler in this.handlers){
this.core.$element.off(handler, this.handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Animate=Animate;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var Autoplay=function(carousel){
this._core=carousel;
this._call=null;
this._time=0;
this._timeout=0;
this._paused=true;
this._handlers={
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name==='settings'){
if(this._core.settings.autoplay){
this.play();
}else{
this.stop();
}}else if(e.namespace&&e.property.name==='position'&&this._paused){
this._time=0;
}}, this),
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.autoplay){
this.play();
}}, this),
'play.owl.autoplay': $.proxy(function(e, t, s){
if(e.namespace){
this.play(t, s);
}}, this),
'stop.owl.autoplay': $.proxy(function(e){
if(e.namespace){
this.stop();
}}, this),
'mouseover.owl.autoplay': $.proxy(function(){
if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){
this.pause();
}}, this),
'mouseleave.owl.autoplay': $.proxy(function(){
if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){
this.play();
}}, this),
'touchstart.owl.core': $.proxy(function(){
if(this._core.settings.autoplayHoverPause&&this._core.is('rotating')){
this.pause();
}}, this),
'touchend.owl.core': $.proxy(function(){
if(this._core.settings.autoplayHoverPause){
this.play();
}}, this)
};
this._core.$element.on(this._handlers);
this._core.options=$.extend({}, Autoplay.Defaults, this._core.options);
};
Autoplay.Defaults={
autoplay: false,
autoplayTimeout: 5000,
autoplayHoverPause: false,
autoplaySpeed: false
};
Autoplay.prototype._next=function(speed){
this._call=window.setTimeout($.proxy(this._next, this, speed),
this._timeout * (Math.round(this.read() / this._timeout) + 1) - this.read()
);
if(this._core.is('interacting')||document.hidden){
return;
}
this._core.next(speed||this._core.settings.autoplaySpeed);
}
Autoplay.prototype.read=function(){
return new Date().getTime() - this._time;
};
Autoplay.prototype.play=function(timeout, speed){
var elapsed;
if(!this._core.is('rotating')){
this._core.enter('rotating');
}
timeout=timeout||this._core.settings.autoplayTimeout;
elapsed=Math.min(this._time % (this._timeout||timeout), timeout);
if(this._paused){
this._time=this.read();
this._paused=false;
}else{
window.clearTimeout(this._call);
}
this._time +=this.read() % timeout - elapsed;
this._timeout=timeout;
this._call=window.setTimeout($.proxy(this._next, this, speed), timeout - elapsed);
};
Autoplay.prototype.stop=function(){
if(this._core.is('rotating')){
this._time=0;
this._paused=true;
window.clearTimeout(this._call);
this._core.leave('rotating');
}};
Autoplay.prototype.pause=function(){
if(this._core.is('rotating')&&!this._paused){
this._time=this.read();
this._paused=true;
window.clearTimeout(this._call);
}};
Autoplay.prototype.destroy=function(){
var handler, property;
this.stop();
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.autoplay=Autoplay;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
'use strict';
var Navigation=function(carousel){
this._core=carousel;
this._initialized=false;
this._pages=[];
this._controls={};
this._templates=[];
this.$element=this._core.$element;
this._overrides={
next: this._core.next,
prev: this._core.prev,
to: this._core.to
};
this._handlers={
'prepared.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.dotsData){
this._templates.push('<div class="' + this._core.settings.dotClass + '">' +
$(e.content).find('[data-dot]').addBack('[data-dot]').attr('data-dot') + '</div>');
}}, this),
'added.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.dotsData){
this._templates.splice(e.position, 0, this._templates.pop());
}}, this),
'remove.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.dotsData){
this._templates.splice(e.position, 1);
}}, this),
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name=='position'){
this.draw();
}}, this),
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace&&!this._initialized){
this._core.trigger('initialize', null, 'navigation');
this.initialize();
this.update();
this.draw();
this._initialized=true;
this._core.trigger('initialized', null, 'navigation');
}}, this),
'refreshed.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._initialized){
this._core.trigger('refresh', null, 'navigation');
this.update();
this.draw();
this._core.trigger('refreshed', null, 'navigation');
}}, this)
};
this._core.options=$.extend({}, Navigation.Defaults, this._core.options);
this.$element.on(this._handlers);
};
Navigation.Defaults={
nav: false,
navText: [
'<span aria-label="' + 'Previous' + '">&#x2039;</span>',
'<span aria-label="' + 'Next' + '">&#x203a;</span>'
],
navSpeed: false,
navElement: 'button type="button" role="presentation"',
navContainer: false,
navContainerClass: 'owl-nav',
navClass: [
'owl-prev',
'owl-next'
],
slideBy: 1,
dotClass: 'owl-dot',
dotsClass: 'owl-dots',
dots: true,
dotsEach: false,
dotsData: false,
dotsSpeed: false,
dotsContainer: false
};
Navigation.prototype.initialize=function(){
var override,
settings=this._core.settings;
this._controls.$relative=(settings.navContainer ? $(settings.navContainer)
: $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');
this._controls.$previous=$('<' + settings.navElement + '>')
.addClass(settings.navClass[0])
.html(settings.navText[0])
.prependTo(this._controls.$relative)
.on('click', $.proxy(function(e){
this.prev(settings.navSpeed);
}, this));
this._controls.$next=$('<' + settings.navElement + '>')
.addClass(settings.navClass[1])
.html(settings.navText[1])
.appendTo(this._controls.$relative)
.on('click', $.proxy(function(e){
this.next(settings.navSpeed);
}, this));
if(!settings.dotsData){
this._templates=[ $('<button role="button">')
.addClass(settings.dotClass)
.append($('<span>'))
.prop('outerHTML') ];
}
this._controls.$absolute=(settings.dotsContainer ? $(settings.dotsContainer)
: $('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');
this._controls.$absolute.on('click', 'button', $.proxy(function(e){
var index=$(e.target).parent().is(this._controls.$absolute)
? $(e.target).index():$(e.target).parent().index();
e.preventDefault();
this.to(index, settings.dotsSpeed);
}, this));
/*$el.on('focusin', function(){
$(document).off(".carousel");
$(document).on('keydown.carousel', function(e){
if(e.keyCode==37){
$el.trigger('prev.owl')
}
if(e.keyCode==39){
$el.trigger('next.owl')
}});
});*/
for (override in this._overrides){
this._core[override]=$.proxy(this[override], this);
}};
Navigation.prototype.destroy=function(){
var handler, control, property, override, settings;
settings=this._core.settings;
for (handler in this._handlers){
this.$element.off(handler, this._handlers[handler]);
}
for (control in this._controls){
if(control==='$relative'&&settings.navContainer){
this._controls[control].html('');
}else{
this._controls[control].remove();
}}
for (override in this.overides){
this._core[override]=this._overrides[override];
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
Navigation.prototype.update=function(){
var i, j, k,
lower=this._core.clones().length / 2,
upper=lower + this._core.items().length,
maximum=this._core.maximum(true),
settings=this._core.settings,
size=settings.center||settings.autoWidth||settings.dotsData
? 1:settings.dotsEach||settings.items;
if(settings.slideBy!=='page'){
settings.slideBy=Math.min(settings.slideBy, settings.items);
}
if(settings.dots||settings.slideBy=='page'){
this._pages=[];
for (i=lower, j=0, k=0; i < upper; i++){
if(j >=size||j===0){
this._pages.push({
start: Math.min(maximum, i - lower),
end: i - lower + size - 1
});
if(Math.min(maximum, i - lower)===maximum){
break;
}
j=0, ++k;
}
j +=this._core.mergers(this._core.relative(i));
}}
};
Navigation.prototype.draw=function(){
var difference,
settings=this._core.settings,
disabled=this._core.items().length <=settings.items,
index=this._core.relative(this._core.current()),
loop=settings.loop||settings.rewind;
this._controls.$relative.toggleClass('disabled', !settings.nav||disabled);
if(settings.nav){
this._controls.$previous.toggleClass('disabled', !loop&&index <=this._core.minimum(true));
this._controls.$next.toggleClass('disabled', !loop&&index >=this._core.maximum(true));
}
this._controls.$absolute.toggleClass('disabled', !settings.dots||disabled);
if(settings.dots){
difference=this._pages.length - this._controls.$absolute.children().length;
if(settings.dotsData&&difference!==0){
this._controls.$absolute.html(this._templates.join(''));
}else if(difference > 0){
this._controls.$absolute.append(new Array(difference + 1).join(this._templates[0]));
}else if(difference < 0){
this._controls.$absolute.children().slice(difference).remove();
}
this._controls.$absolute.find('.active').removeClass('active');
this._controls.$absolute.children().eq($.inArray(this.current(), this._pages)).addClass('active');
}};
Navigation.prototype.onTrigger=function(event){
var settings=this._core.settings;
event.page={
index: $.inArray(this.current(), this._pages),
count: this._pages.length,
size: settings&&(settings.center||settings.autoWidth||settings.dotsData
? 1:settings.dotsEach||settings.items)
};};
Navigation.prototype.current=function(){
var current=this._core.relative(this._core.current());
return $.grep(this._pages, $.proxy(function(page, index){
return page.start <=current&&page.end >=current;
}, this)).pop();
};
Navigation.prototype.getPosition=function(successor){
var position, length,
settings=this._core.settings;
if(settings.slideBy=='page'){
position=$.inArray(this.current(), this._pages);
length=this._pages.length;
successor ? ++position:--position;
position=this._pages[((position % length) + length) % length].start;
}else{
position=this._core.relative(this._core.current());
length=this._core.items().length;
successor ? position +=settings.slideBy:position -=settings.slideBy;
}
return position;
};
Navigation.prototype.next=function(speed){
$.proxy(this._overrides.to, this._core)(this.getPosition(true), speed);
};
Navigation.prototype.prev=function(speed){
$.proxy(this._overrides.to, this._core)(this.getPosition(false), speed);
};
Navigation.prototype.to=function(position, speed, standard){
var length;
if(!standard&&this._pages.length){
length=this._pages.length;
$.proxy(this._overrides.to, this._core)(this._pages[((position % length) + length) % length].start, speed);
}else{
$.proxy(this._overrides.to, this._core)(position, speed);
}};
$.fn.owlCarousel.Constructor.Plugins.Navigation=Navigation;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
'use strict';
var Hash=function(carousel){
this._core=carousel;
this._hashes={};
this.$element=this._core.$element;
this._handlers={
'initialized.owl.carousel': $.proxy(function(e){
if(e.namespace&&this._core.settings.startPosition==='URLHash'){
$(window).trigger('hashchange.owl.navigation');
}}, this),
'prepared.owl.carousel': $.proxy(function(e){
if(e.namespace){
var hash=$(e.content).find('[data-hash]').addBack('[data-hash]').attr('data-hash');
if(!hash){
return;
}
this._hashes[hash]=e.content;
}}, this),
'changed.owl.carousel': $.proxy(function(e){
if(e.namespace&&e.property.name==='position'){
var current=this._core.items(this._core.relative(this._core.current())),
hash=$.map(this._hashes, function(item, hash){
return item===current ? hash:null;
}).join();
if(!hash||window.location.hash.slice(1)===hash){
return;
}
window.location.hash=hash;
}}, this)
};
this._core.options=$.extend({}, Hash.Defaults, this._core.options);
this.$element.on(this._handlers);
$(window).on('hashchange.owl.navigation', $.proxy(function(e){
var hash=window.location.hash.substring(1),
items=this._core.$stage.children(),
position=this._hashes[hash]&&items.index(this._hashes[hash]);
if(position===undefined||position===this._core.current()){
return;
}
this._core.to(this._core.relative(position), false, true);
}, this));
};
Hash.Defaults={
URLhashListener: false
};
Hash.prototype.destroy=function(){
var handler, property;
$(window).off('hashchange.owl.navigation');
for (handler in this._handlers){
this._core.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Hash=Hash;
})(window.Zepto||window.jQuery, window, document);
;(function($, window, document, undefined){
var style=$('<support>').get(0).style,
prefixes='Webkit Moz O ms'.split(' '),
events={
transition: {
end: {
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'transitionend',
OTransition: 'oTransitionEnd',
transition: 'transitionend'
}},
animation: {
end: {
WebkitAnimation: 'webkitAnimationEnd',
MozAnimation: 'animationend',
OAnimation: 'oAnimationEnd',
animation: 'animationend'
}}
},
tests={
csstransforms: function(){
return !!test('transform');
},
csstransforms3d: function(){
return !!test('perspective');
},
csstransitions: function(){
return !!test('transition');
},
cssanimations: function(){
return !!test('animation');
}};
function test(property, prefixed){
var result=false,
upper=property.charAt(0).toUpperCase() + property.slice(1);
$.each((property + ' ' + prefixes.join(upper + ' ') + upper).split(' '), function(i, property){
if(style[property]!==undefined){
result=prefixed ? property:true;
return false;
}});
return result;
}
function prefixed(property){
return test(property, true);
}
if(tests.csstransitions()){
$.support.transition=new String(prefixed('transition'))
$.support.transition.end=events.transition.end[ $.support.transition ];
}
if(tests.cssanimations()){
$.support.animation=new String(prefixed('animation'))
$.support.animation.end=events.animation.end[ $.support.animation ];
}
if(tests.csstransforms()){
$.support.transform=new String(prefixed('transform'));
$.support.transform3d=tests.csstransforms3d();
}})(window.Zepto||window.jQuery, window, document);
(function ($, window, document, undefined){
'use strict';
var Thumbs=function (carousel){
this.owl=carousel;
this._thumbcontent=[];
this._identifier=0;
this.owl_currentitem=this.owl.options.startPosition;
this.$element=this.owl.$element;
this._handlers={
'prepared.owl.carousel': $.proxy(function (e){
if(e.namespace&&this.owl.options.thumbs&&!this.owl.options.thumbImage&&!this.owl.options.thumbsPrerendered&&!this.owl.options.thumbImage){
if($(e.content).find('[data-thumb]').attr('data-thumb')!==undefined){
this._thumbcontent.push($(e.content).find('[data-thumb]').attr('data-thumb'));
}}else if(e.namespace&&this.owl.options.thumbs&&this.owl.options.thumbImage){
var innerImage=$(e.content).find('img');
this._thumbcontent.push(innerImage);
}}, this),
'initialized.owl.carousel': $.proxy(function (e){
if(e.namespace&&this.owl.options.thumbs){
this.render();
this.listen();
this._identifier=this.owl.$element.data('slider-id');
this.setActive();
}}, this),
'changed.owl.carousel': $.proxy(function (e){
if(e.namespace&&e.property.name==='position'&&this.owl.options.thumbs){
this._identifier=this.owl.$element.data('slider-id');
this.setActive();
}}, this)
};
this.owl.options=$.extend({}, Thumbs.Defaults, this.owl.options);
this.owl.$element.on(this._handlers);
};
Thumbs.Defaults={
thumbs: true,
thumbImage: false,
thumbContainerClass: 'owl-thumbs',
thumbItemClass: 'owl-thumb-item',
moveThumbsInside: false
};
Thumbs.prototype.listen=function (){
var options=this.owl.options;
if(options.thumbsPrerendered){
this._thumbcontent._thumbcontainer=$('.' + options.thumbContainerClass);
}
$(this._thumbcontent._thumbcontainer).on('click', this._thumbcontent._thumbcontainer.children(), $.proxy(function (e){
this._identifier=$(e.target).closest('.' + options.thumbContainerClass).data('slider-id');
var index=$(e.target).parent().is(this._thumbcontent._thumbcontainer) ? $(e.target).index():$(e.target).closest('.'+options.thumbItemClass).index();
if(options.thumbsPrerendered){
$('[data-slider-id=' + this._identifier + ']').trigger('to.owl.carousel', [index, options.dotsSpeed, true]);
}else{
this.owl.to(index, options.dotsSpeed);
}
e.preventDefault();
}, this));
};
Thumbs.prototype.render=function (){
var options=this.owl.options;
if(!options.thumbsPrerendered){
this._thumbcontent._thumbcontainer=$('<div>').addClass(options.thumbContainerClass).appendTo(this.$element);
}else{
this._thumbcontent._thumbcontainer=$('.' + options.thumbContainerClass + '');
if(options.moveThumbsInside){
this._thumbcontent._thumbcontainer.appendTo(this.$element);
}}
var i;
if(!options.thumbImage){
for (i=0; i < this._thumbcontent.length; ++i){
this._thumbcontent._thumbcontainer.append('<button class=' + options.thumbItemClass + '>' + this._thumbcontent[i] + '</button>');
}}else{
for (i=0; i < this._thumbcontent.length; ++i){
this._thumbcontent._thumbcontainer.append('<button class=' + options.thumbItemClass + '><img src="' + this._thumbcontent[i].attr('src') + '" alt="' + this._thumbcontent[i].attr('alt') + '" /></button>');
}}
};
Thumbs.prototype.setActive=function (){
this.owl_currentitem=this.owl._current - (this.owl._clones.length / 2);
if(this.owl_currentitem===this.owl._items.length){
this.owl_currentitem=0;
}
var options=this.owl.options;
var thumbContainer=options.thumbsPrerendered ? $('.' + options.thumbContainerClass + '[data-slider-id="' + this._identifier + '"]'):this._thumbcontent._thumbcontainer;
thumbContainer.children().filter('.active').removeClass('active');
thumbContainer.children().eq(this.owl_currentitem).addClass('active');
};
Thumbs.prototype.destroy=function (){
var handler, property;
for (handler in this._handlers){
this.owl.$element.off(handler, this._handlers[handler]);
}
for (property in Object.getOwnPropertyNames(this)){
typeof this[property]!=='function'&&(this[property]=null);
}};
$.fn.owlCarousel.Constructor.Plugins.Thumbs=Thumbs;
})(window.Zepto||window.jQuery, window, document);
(function ($){
$.fn.extend({
easyResponsiveTabs: function (options){
var defaults={
type: 'default',
width: 'auto',
fit: true,
closed: false,
tabidentify: '',
activate: function (){
}}
var options=$.extend(defaults, options);
var opt=options, jtype=opt.type, jfit=opt.fit, jwidth=opt.width, vtabs='vertical', accord='accordion';
var hash=window.location.hash;
var historyApi = !!(window.history&&history.replaceState);
$(this).on("bind", 'tabactivate', function (e, currentTab){
if(typeof options.activate==='function'){
options.activate.call(currentTab, e)
}});
this.each(function (){
var $respTabs=$(this);
var $respTabsList=$respTabs.find('ul.resp-tabs-list.' + options.tabidentify);
var respTabsId=$respTabs.attr('id');
$respTabs.find('ul.resp-tabs-list.' + options.tabidentify + ' li').addClass('resp-tab-item').addClass(options.tabidentify);
$respTabs.css({
'display': 'block',
'width': jwidth
});
if(options.type=='vertical')
$respTabs.find('.resp-tabs-container.' + options.tabidentify).css('border-color', options.active_content_border_color);
$respTabs.find('.resp-tabs-container.' + options.tabidentify + ' > div').addClass('resp-tab-content').addClass(options.tabidentify);
jtab_options();
function jtab_options(){
if(jtype==vtabs){
$respTabs.addClass('resp-vtabs').addClass(options.tabidentify);
}
if(jfit==true){
$respTabs.css({ width: '100%', margin: '0px' });
}
if(jtype==accord){
$respTabs.addClass('resp-easy-accordion').addClass(options.tabidentify);
$respTabs.find('.resp-tabs-list').css('display', 'none');
}}
var $tabItemh2;
$respTabs.find('.resp-tab-content.' + options.tabidentify).before("<h2 class='resp-accordion " + options.tabidentify + "' role='tab'><span class='resp-arrow'></span></h2>");
$respTabs.find('.resp-tab-content.' + options.tabidentify).prev("h2").css({
'background-color': options.inactive_bg,
'border-color': options.active_border_color
});
var itemCount=0;
$respTabs.find('.resp-accordion').each(function (){
$tabItemh2=$(this);
var $tabItem=$respTabs.find('.resp-tab-item:eq(' + itemCount + ')');
var $accItem=$respTabs.find('.resp-accordion:eq(' + itemCount + ')');
$accItem.append($tabItem.html());
$accItem.data($tabItem.data());
$tabItemh2.attr('aria-controls', options.tabidentify + '_tab_item-' + (itemCount));
itemCount++;
});
var count=0,
$tabContent;
$respTabs.find('.resp-tab-item').each(function (){
$tabItem=$(this);
$tabItem.attr('aria-controls', options.tabidentify + '_tab_item-' + (count));
$tabItem.attr('role', 'tab');
$tabItem.css({
'background-color': options.inactive_bg,
'border-color': 'none'
});
var tabcount=0;
$respTabs.find('.resp-tab-content.' + options.tabidentify).each(function (){
$tabContent=$(this);
$tabContent.attr('aria-labelledby', options.tabidentify + '_tab_item-' + (tabcount)).css({
'border-color': options.active_border_color
});
tabcount++;
});
count++;
});
var tabNum=0;
if(hash!=''){
var matches=hash.match(new RegExp(respTabsId + "([0-9]+)"));
if(matches!==null&&matches.length===2){
tabNum=parseInt(matches[1], 10) - 1;
if(tabNum > count){
tabNum=0;
}}
}
$($respTabs.find('.resp-tab-item.' + options.tabidentify)[tabNum]).addClass('resp-tab-active').css({
'background-color': options.activetab_bg,
'border-color': options.active_border_color
});
if(options.closed!==true&&!(options.closed==='accordion'&&!$respTabsList.is(':visible'))&&!(options.closed==='tabs'&&$respTabsList.is(':visible'))){
$($respTabs.find('.resp-accordion.' + options.tabidentify)[tabNum]).addClass('resp-tab-active').css({
'background-color': options.activetab_bg + ' !important',
'border-color': options.active_border_color,
'background': 'none'
});
$($respTabs.find('.resp-tab-content.' + options.tabidentify)[tabNum]).addClass('resp-tab-content-active').addClass(options.tabidentify).attr('style', 'display:block');
}else{
}
$respTabs.find("[role=tab]").each(function (){
var $currentTab=$(this);
$currentTab.on("click", function(){
var $currentTab=$(this);
var $tabAria=$currentTab.attr('aria-controls');
if($currentTab.hasClass('resp-accordion')&&$currentTab.hasClass('resp-tab-active')){
$respTabs.find('.resp-tab-content-active.' + options.tabidentify).slideUp('', function (){
$(this).addClass('resp-accordion-closed');
});
$currentTab.removeClass('resp-tab-active').css({
});
return false;
}
if(!$currentTab.hasClass('resp-tab-active')&&$currentTab.hasClass('resp-accordion')){
$respTabs.find('.resp-tab-active.' + options.tabidentify).removeClass('resp-tab-active').css({
});
$respTabs.find('.resp-tab-content-active.' + options.tabidentify).slideUp().removeClass('resp-tab-content-active resp-accordion-closed');
$respTabs.find("[aria-controls=" + $tabAria + "]").addClass('resp-tab-active').css({
});
$respTabs.find('.resp-tab-content[aria-labelledby=' + $tabAria + '].' + options.tabidentify).slideDown().addClass('resp-tab-content-active');
}else{
$respTabs.find('.resp-tab-active.' + options.tabidentify).removeClass('resp-tab-active').css({
});
$respTabs.find('.resp-tab-content-active.' + options.tabidentify).removeAttr('style').removeClass('resp-tab-content-active').removeClass('resp-accordion-closed');
$respTabs.find("[aria-controls=" + $tabAria + "]").addClass('resp-tab-active').css({
});
$respTabs.find('.resp-tab-content[aria-labelledby=' + $tabAria + '].' + options.tabidentify).addClass('resp-tab-content-active').attr('style', 'display:block');
}
$currentTab.trigger('tabactivate', $currentTab);
if(historyApi){
var currentHash=window.location.hash;
var tabAriaParts=$tabAria.split('tab_item-');
var newHash="";
if(currentHash!=""){
var re=new RegExp(respTabsId + "[0-9]+");
if(currentHash.match(re)!=null){
newHash=currentHash.replace(re, newHash);
}else{
newHash=currentHash + "|" + newHash;
}}else{
newHash=''+newHash;
}
history.replaceState(null, null, newHash);
}});
});
$(window).resize(function (){
$respTabs.find('.resp-accordion-closed').removeAttr('style');
});
});
}});
})(jQuery);
(function($){
"use strict";
$.fn.counterUp=function(options){
var settings=$.extend({
'time': 400,
'delay': 10
}, options);
return this.each(function(){
var $this=$(this);
var $settings=settings;
var counterUpper=function(){
var nums=[];
var divisions=$settings.time / $settings.delay;
var num=$this.text();
var isComma=/[0-9]+,[0-9]+/.test(num);
num=num.replace(/,/g, '');
var isInt=/^[0-9]+$/.test(num);
var isFloat=/^[0-9]+\.[0-9]+$/.test(num);
var decimalPlaces=isFloat ? (num.split('.')[1]||[]).length:0;
for (var i=divisions; i >=1; i--){
var newNum=parseInt(num / divisions * i);
if(isFloat){
newNum=parseFloat(num / divisions * i).toFixed(decimalPlaces);
}
if(isComma){
while (/(\d+)(\d{3})/.test(newNum.toString())){
newNum=newNum.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2');
}}
nums.unshift(newNum);
}
$this.data('counterup-nums', nums);
$this.text('0');
var f=function(){
$this.text($this.data('counterup-nums').shift());
if($this.data('counterup-nums').length){
setTimeout($this.data('counterup-func'), $settings.delay);
}else{
delete $this.data('counterup-nums');
$this.data('counterup-nums', null);
$this.data('counterup-func', null);
}};
$this.data('counterup-func', f);
setTimeout($this.data('counterup-func'), $settings.delay);
this.destroy();
};
$this.waypoint(counterUpper, { offset: '100%' });
});
};})(jQuery);
;(function($, window, document, undefined){
var pluginName='stellar',
defaults={
scrollProperty: 'scroll',
positionProperty: 'position',
horizontalScrolling: true,
verticalScrolling: true,
horizontalOffset: 0,
verticalOffset: 0,
responsive: false,
parallaxBackgrounds: true,
parallaxElements: true,
hideDistantElements: true,
hideElement: function($elem){ $elem.hide(); },
showElement: function($elem){ $elem.show(); }},
scrollProperty={
scroll: {
getLeft: function($elem){ return $elem.scrollLeft(); },
setLeft: function($elem, val){ $elem.scrollLeft(val); },
getTop: function($elem){ return $elem.scrollTop();	},
setTop: function($elem, val){ $elem.scrollTop(val); }},
position: {
getLeft: function($elem){ return parseInt($elem.css('left'), 10) * -1; },
getTop: function($elem){ return parseInt($elem.css('top'), 10) * -1; }},
margin: {
getLeft: function($elem){ return parseInt($elem.css('margin-left'), 10) * -1; },
getTop: function($elem){ return parseInt($elem.css('margin-top'), 10) * -1; }},
transform: {
getLeft: function($elem){
var computedTransform=getComputedStyle($elem[0])[prefixedTransform];
return (computedTransform!=='none' ? parseInt(computedTransform.match(/(-?[0-9]+)/g)[4], 10) * -1:0);
},
getTop: function($elem){
var computedTransform=getComputedStyle($elem[0])[prefixedTransform];
return (computedTransform!=='none' ? parseInt(computedTransform.match(/(-?[0-9]+)/g)[5], 10) * -1:0);
}}
},
positionProperty={
position: {
setLeft: function($elem, left){ $elem.css('left', left); },
setTop: function($elem, top){ $elem.css('top', top); }},
transform: {
setPosition: function($elem, left, startingLeft, top, startingTop){
$elem[0].style[prefixedTransform]='translate3d(' + (left - startingLeft) + 'px, ' + (top - startingTop) + 'px, 0)';
}}
},
vendorPrefix=(function(){
var prefixes=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,
style=$('script')[0].style,
prefix='',
prop;
for (prop in style){
if(prefixes.test(prop)){
prefix=prop.match(prefixes)[0];
break;
}}
if('WebkitOpacity' in style){ prefix='Webkit'; }
if('KhtmlOpacity' in style){ prefix='Khtml'; }
return function(property){
return prefix + (prefix.length > 0 ? property.charAt(0).toUpperCase() + property.slice(1):property);
};}()),
prefixedTransform=vendorPrefix('transform'),
supportsBackgroundPositionXY=$('<div />', { style: 'background:#fff' }).css('background-position-x')!==undefined,
setBackgroundPosition=(supportsBackgroundPositionXY ?
function($elem, x, y){
$elem.css({
'background-position-x': x,
'background-position-y': y
});
} :
function($elem, x, y){
$elem.css('background-position', x + ' ' + y);
}
),
getBackgroundPosition=(supportsBackgroundPositionXY ?
function($elem){
return [
$elem.css('background-position-x'),
$elem.css('background-position-y')
];
} :
function($elem){
return $elem.css('background-position').split(' ');
}
),
requestAnimFrame=(
window.requestAnimationFrame       ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame    ||
window.oRequestAnimationFrame      ||
window.msRequestAnimationFrame     ||
function(callback){
setTimeout(callback, 1000 / 60);
}
);
function Plugin(element, options){
this.element=element;
this.options=$.extend({}, defaults, options);
this._defaults=defaults;
this._name=pluginName;
this.init();
}
Plugin.prototype={
init: function(){
this.options.name=pluginName + '_' + Math.floor(Math.random() * 1e9);
this._defineElements();
this._defineGetters();
this._defineSetters();
this._handleWindowLoadAndResize();
this._detectViewport();
this.refresh({ firstLoad: true });
if(this.options.scrollProperty==='scroll'){
this._handleScrollEvent();
}else{
this._startAnimationLoop();
}},
_defineElements: function(){
if(this.element===document.body) this.element=window;
this.$scrollElement=$(this.element);
this.$element=(this.element===window ? $('body'):this.$scrollElement);
this.$viewportElement=(this.options.viewportElement!==undefined ? $(this.options.viewportElement):(this.$scrollElement[0]===window||this.options.scrollProperty==='scroll' ? this.$scrollElement:this.$scrollElement.parent()));
},
_defineGetters: function(){
var self=this,
scrollPropertyAdapter=scrollProperty[self.options.scrollProperty];
this._getScrollLeft=function(){
return scrollPropertyAdapter.getLeft(self.$scrollElement);
};
this._getScrollTop=function(){
return scrollPropertyAdapter.getTop(self.$scrollElement);
};},
_defineSetters: function(){
var self=this,
scrollPropertyAdapter=scrollProperty[self.options.scrollProperty],
positionPropertyAdapter=positionProperty[self.options.positionProperty],
setScrollLeft=scrollPropertyAdapter.setLeft,
setScrollTop=scrollPropertyAdapter.setTop;
this._setScrollLeft=(typeof setScrollLeft==='function' ? function(val){
setScrollLeft(self.$scrollElement, val);
}:$.noop);
this._setScrollTop=(typeof setScrollTop==='function' ? function(val){
setScrollTop(self.$scrollElement, val);
}:$.noop);
this._setPosition=positionPropertyAdapter.setPosition ||
function($elem, left, startingLeft, top, startingTop){
if(self.options.horizontalScrolling){
positionPropertyAdapter.setLeft($elem, left, startingLeft);
}
if(self.options.verticalScrolling){
positionPropertyAdapter.setTop($elem, top, startingTop);
}};},
_handleWindowLoadAndResize: function(){
var self=this,
$window=$(window);
if(self.options.responsive){
$window.bind('load.' + this.name, function(){
self.refresh();
});
}
$window.bind('resize.' + this.name, function(){
self._detectViewport();
if(self.options.responsive){
self.refresh();
}});
},
refresh: function(options){
var self=this,
oldLeft=self._getScrollLeft(),
oldTop=self._getScrollTop();
if(!options||!options.firstLoad){
this._reset();
}
this._setScrollLeft(0);
this._setScrollTop(0);
this._setOffsets();
this._findParticles();
this._findBackgrounds();
if(options&&options.firstLoad&&/WebKit/.test(navigator.userAgent)){
$(window).on("load",function (){
var oldLeft=self._getScrollLeft(),
oldTop=self._getScrollTop();
self._setScrollLeft(oldLeft + 1);
self._setScrollTop(oldTop + 1);
self._setScrollLeft(oldLeft);
self._setScrollTop(oldTop);
});
}
this._setScrollLeft(oldLeft);
this._setScrollTop(oldTop);
},
_detectViewport: function(){
var viewportOffsets={
left: this.$viewportElement.scrollLeft(),
top: this.$viewportElement.scrollTop()
};
var hasOffsets=viewportOffsets!==null&&viewportOffsets!==undefined;
this.viewportWidth=this.$viewportElement.width();
this.viewportHeight=this.$viewportElement.height();
this.viewportOffsetTop=(hasOffsets ? viewportOffsets.top:0);
this.viewportOffsetLeft=(hasOffsets ? viewportOffsets.left:0);
},
_findParticles: function(){
var self=this,
scrollLeft=this._getScrollLeft(),
scrollTop=this._getScrollTop();
if(this.particles!==undefined){
for (var i=this.particles.length - 1; i >=0; i--){
this.particles[i].$element.data('stellar-elementIsActive', undefined);
}}
this.particles=[];
if(!this.options.parallaxElements) return;
this.$element.find('[data-stellar-ratio]').each(function(i){
var $this=$(this),
horizontalOffset,
verticalOffset,
positionLeft,
positionTop,
marginLeft,
marginTop,
$offsetParent,
offsetLeft,
offsetTop,
parentOffsetLeft=0,
parentOffsetTop=0,
tempParentOffsetLeft=0,
tempParentOffsetTop=0;
if(!$this.data('stellar-elementIsActive')){
$this.data('stellar-elementIsActive', this);
}else if($this.data('stellar-elementIsActive')!==this){
return;
}
self.options.showElement($this);
if(!$this.data('stellar-startingLeft')){
$this.data('stellar-startingLeft', $this.css('left'));
$this.data('stellar-startingTop', $this.css('top'));
}else{
$this.css('left', $this.data('stellar-startingLeft'));
$this.css('top', $this.data('stellar-startingTop'));
}
positionLeft=$this.position().left;
positionTop=$this.position().top;
marginLeft=($this.css('margin-left')==='auto') ? 0:parseInt($this.css('margin-left'), 10);
marginTop=($this.css('margin-top')==='auto') ? 0:parseInt($this.css('margin-top'), 10);
offsetLeft=$this.offset().left - marginLeft;
offsetTop=$this.offset().top - marginTop;
$this.parents().each(function(){
var $this=$(this);
if($this.data('stellar-offset-parent')===true){
parentOffsetLeft=tempParentOffsetLeft;
parentOffsetTop=tempParentOffsetTop;
$offsetParent=$this;
return false;
}else{
tempParentOffsetLeft +=$this.position().left;
tempParentOffsetTop +=$this.position().top;
}});
horizontalOffset=($this.data('stellar-horizontal-offset')!==undefined ? $this.data('stellar-horizontal-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-horizontal-offset')!==undefined ? $offsetParent.data('stellar-horizontal-offset'):self.horizontalOffset));
verticalOffset=($this.data('stellar-vertical-offset')!==undefined ? $this.data('stellar-vertical-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-vertical-offset')!==undefined ? $offsetParent.data('stellar-vertical-offset'):self.verticalOffset));
self.particles.push({
$element: $this,
$offsetParent: $offsetParent,
isFixed: $this.css('position')==='fixed',
horizontalOffset: horizontalOffset,
verticalOffset: verticalOffset,
startingPositionLeft: positionLeft,
startingPositionTop: positionTop,
startingOffsetLeft: offsetLeft,
startingOffsetTop: offsetTop,
parentOffsetLeft: parentOffsetLeft,
parentOffsetTop: parentOffsetTop,
stellarRatio: ($this.data('stellar-ratio')!==undefined ? $this.data('stellar-ratio'):1),
width: $this.outerWidth(true),
height: $this.outerHeight(true),
isHidden: false
});
});
},
_findBackgrounds: function(){
var self=this,
scrollLeft=this._getScrollLeft(),
scrollTop=this._getScrollTop(),
$backgroundElements;
this.backgrounds=[];
if(!this.options.parallaxBackgrounds) return;
$backgroundElements=this.$element.find('[data-stellar-background-ratio]');
if(this.$element.data('stellar-background-ratio')){
$backgroundElements=$backgroundElements.add(this.$element);
}
$backgroundElements.each(function(){
var $this=$(this),
backgroundPosition=getBackgroundPosition($this),
horizontalOffset,
verticalOffset,
positionLeft,
positionTop,
marginLeft,
marginTop,
offsetLeft,
offsetTop,
$offsetParent,
parentOffsetLeft=0,
parentOffsetTop=0,
tempParentOffsetLeft=0,
tempParentOffsetTop=0;
if(!$this.data('stellar-backgroundIsActive')){
$this.data('stellar-backgroundIsActive', this);
}else if($this.data('stellar-backgroundIsActive')!==this){
return;
}
if(!$this.data('stellar-backgroundStartingLeft')){
$this.data('stellar-backgroundStartingLeft', backgroundPosition[0]);
$this.data('stellar-backgroundStartingTop', backgroundPosition[1]);
}else{
setBackgroundPosition($this, $this.data('stellar-backgroundStartingLeft'), $this.data('stellar-backgroundStartingTop'));
}
marginLeft=($this.css('margin-left')==='auto') ? 0:parseInt($this.css('margin-left'), 10);
marginTop=($this.css('margin-top')==='auto') ? 0:parseInt($this.css('margin-top'), 10);
offsetLeft=$this.offset().left - marginLeft - scrollLeft;
offsetTop=$this.offset().top - marginTop - scrollTop;
$this.parents().each(function(){
var $this=$(this);
if($this.data('stellar-offset-parent')===true){
parentOffsetLeft=tempParentOffsetLeft;
parentOffsetTop=tempParentOffsetTop;
$offsetParent=$this;
return false;
}else{
tempParentOffsetLeft +=$this.position().left;
tempParentOffsetTop +=$this.position().top;
}});
horizontalOffset=($this.data('stellar-horizontal-offset')!==undefined ? $this.data('stellar-horizontal-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-horizontal-offset')!==undefined ? $offsetParent.data('stellar-horizontal-offset'):self.horizontalOffset));
verticalOffset=($this.data('stellar-vertical-offset')!==undefined ? $this.data('stellar-vertical-offset'):($offsetParent!==undefined&&$offsetParent.data('stellar-vertical-offset')!==undefined ? $offsetParent.data('stellar-vertical-offset'):self.verticalOffset));
self.backgrounds.push({
$element: $this,
$offsetParent: $offsetParent,
isFixed: $this.css('background-attachment')==='fixed',
horizontalOffset: horizontalOffset,
verticalOffset: verticalOffset,
startingValueLeft: backgroundPosition[0],
startingValueTop: backgroundPosition[1],
startingBackgroundPositionLeft: (isNaN(parseInt(backgroundPosition[0], 10)) ? 0:parseInt(backgroundPosition[0], 10)),
startingBackgroundPositionTop: (isNaN(parseInt(backgroundPosition[1], 10)) ? 0:parseInt(backgroundPosition[1], 10)),
startingPositionLeft: $this.position().left,
startingPositionTop: $this.position().top,
startingOffsetLeft: offsetLeft,
startingOffsetTop: offsetTop,
parentOffsetLeft: parentOffsetLeft,
parentOffsetTop: parentOffsetTop,
stellarRatio: ($this.data('stellar-background-ratio')===undefined ? 1:$this.data('stellar-background-ratio'))
});
});
},
_reset: function(){
var particle,
startingPositionLeft,
startingPositionTop,
background,
i;
for (i=this.particles.length - 1; i >=0; i--){
particle=this.particles[i];
startingPositionLeft=particle.$element.data('stellar-startingLeft');
startingPositionTop=particle.$element.data('stellar-startingTop');
this._setPosition(particle.$element, startingPositionLeft, startingPositionLeft, startingPositionTop, startingPositionTop);
this.options.showElement(particle.$element);
particle.$element.data('stellar-startingLeft', null).data('stellar-elementIsActive', null).data('stellar-backgroundIsActive', null);
}
for (i=this.backgrounds.length - 1; i >=0; i--){
background=this.backgrounds[i];
background.$element.data('stellar-backgroundStartingLeft', null).data('stellar-backgroundStartingTop', null);
setBackgroundPosition(background.$element, background.startingValueLeft, background.startingValueTop);
}},
destroy: function(){
this._reset();
this.$scrollElement.unbind('resize.' + this.name).unbind('scroll.' + this.name);
this._animationLoop=$.noop;
$(window).unbind('load.' + this.name).unbind('resize.' + this.name);
},
_setOffsets: function(){
var self=this,
$window=$(window);
$window.unbind('resize.horizontal-' + this.name).unbind('resize.vertical-' + this.name);
if(typeof this.options.horizontalOffset==='function'){
this.horizontalOffset=this.options.horizontalOffset();
$window.bind('resize.horizontal-' + this.name, function(){
self.horizontalOffset=self.options.horizontalOffset();
});
}else{
this.horizontalOffset=this.options.horizontalOffset;
}
if(typeof this.options.verticalOffset==='function'){
this.verticalOffset=this.options.verticalOffset();
$window.bind('resize.vertical-' + this.name, function(){
self.verticalOffset=self.options.verticalOffset();
});
}else{
this.verticalOffset=this.options.verticalOffset;
}},
_repositionElements: function(){
var scrollLeft=this._getScrollLeft(),
scrollTop=this._getScrollTop(),
horizontalOffset,
verticalOffset,
particle,
fixedRatioOffset,
background,
bgLeft,
bgTop,
isVisibleVertical=true,
isVisibleHorizontal=true,
newPositionLeft,
newPositionTop,
newOffsetLeft,
newOffsetTop,
i;
if(this.currentScrollLeft===scrollLeft&&this.currentScrollTop===scrollTop&&this.currentWidth===this.viewportWidth&&this.currentHeight===this.viewportHeight){
return;
}else{
this.currentScrollLeft=scrollLeft;
this.currentScrollTop=scrollTop;
this.currentWidth=this.viewportWidth;
this.currentHeight=this.viewportHeight;
}
for (i=this.particles.length - 1; i >=0; i--){
particle=this.particles[i];
fixedRatioOffset=(particle.isFixed ? 1:0);
if(this.options.horizontalScrolling){
newPositionLeft=(scrollLeft + particle.horizontalOffset + this.viewportOffsetLeft + particle.startingPositionLeft - particle.startingOffsetLeft + particle.parentOffsetLeft) * -(particle.stellarRatio + fixedRatioOffset - 1) + particle.startingPositionLeft;
newOffsetLeft=newPositionLeft - particle.startingPositionLeft + particle.startingOffsetLeft;
}else{
newPositionLeft=particle.startingPositionLeft;
newOffsetLeft=particle.startingOffsetLeft;
}
if(this.options.verticalScrolling){
newPositionTop=(scrollTop + particle.verticalOffset + this.viewportOffsetTop + particle.startingPositionTop - particle.startingOffsetTop + particle.parentOffsetTop) * -(particle.stellarRatio + fixedRatioOffset - 1) + particle.startingPositionTop;
newOffsetTop=newPositionTop - particle.startingPositionTop + particle.startingOffsetTop;
}else{
newPositionTop=particle.startingPositionTop;
newOffsetTop=particle.startingOffsetTop;
}
if(this.options.hideDistantElements){
isVisibleHorizontal = !this.options.horizontalScrolling||newOffsetLeft + particle.width > (particle.isFixed ? 0:scrollLeft)&&newOffsetLeft < (particle.isFixed ? 0:scrollLeft) + this.viewportWidth + this.viewportOffsetLeft;
isVisibleVertical = !this.options.verticalScrolling||newOffsetTop + particle.height > (particle.isFixed ? 0:scrollTop)&&newOffsetTop < (particle.isFixed ? 0:scrollTop) + this.viewportHeight + this.viewportOffsetTop;
}
if(isVisibleHorizontal&&isVisibleVertical){
if(particle.isHidden){
this.options.showElement(particle.$element);
particle.isHidden=false;
}
this._setPosition(particle.$element, newPositionLeft, particle.startingPositionLeft, newPositionTop, particle.startingPositionTop);
}else{
if(!particle.isHidden){
this.options.hideElement(particle.$element);
particle.isHidden=true;
}}
}
for (i=this.backgrounds.length - 1; i >=0; i--){
background=this.backgrounds[i];
fixedRatioOffset=(background.isFixed ? 0:1);
bgLeft=(this.options.horizontalScrolling ? (scrollLeft + background.horizontalOffset - this.viewportOffsetLeft - background.startingOffsetLeft + background.parentOffsetLeft - background.startingBackgroundPositionLeft) * (fixedRatioOffset - background.stellarRatio) + 'px':background.startingValueLeft);
bgTop=(this.options.verticalScrolling ? (scrollTop + background.verticalOffset - this.viewportOffsetTop - background.startingOffsetTop + background.parentOffsetTop - background.startingBackgroundPositionTop) * (fixedRatioOffset - background.stellarRatio) + 'px':background.startingValueTop);
setBackgroundPosition(background.$element, bgLeft, bgTop);
}},
_handleScrollEvent: function(){
var self=this,
ticking=false;
var update=function(){
self._repositionElements();
ticking=false;
};
var requestTick=function(){
if(!ticking){
requestAnimFrame(update);
ticking=true;
}};
this.$scrollElement.bind('scroll.' + this.name, requestTick);
requestTick();
},
_startAnimationLoop: function(){
var self=this;
this._animationLoop=function(){
requestAnimFrame(self._animationLoop);
self._repositionElements();
};
this._animationLoop();
}};
$.fn[pluginName]=function (options){
var args=arguments;
if(options===undefined||typeof options==='object'){
return this.each(function (){
if(!$.data(this, 'plugin_' + pluginName)){
$.data(this, 'plugin_' + pluginName, new Plugin(this, options));
}});
}else if(typeof options==='string'&&options[0]!=='_'&&options!=='init'){
return this.each(function (){
var instance=$.data(this, 'plugin_' + pluginName);
if(instance instanceof Plugin&&typeof instance[options]==='function'){
instance[options].apply(instance, Array.prototype.slice.call(args, 1));
}
if(options==='destroy'){
$.data(this, 'plugin_' + pluginName, null);
}});
}};
$[pluginName]=function(options){
var $window=$(window);
return $window.stellar.apply($window, Array.prototype.slice.call(arguments, 0));
};
$[pluginName].scrollProperty=scrollProperty;
$[pluginName].positionProperty=positionProperty;
window.Stellar=Plugin;
}(jQuery, this, document));
!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(y+l-f),h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}();
(function($){
'use strict';
$.fn.countdown=function(options, callback){
var thisEl=$(this);
var settings={
'date': null,
'format': null
};
if(options){
$.extend(settings, options);
}
function countdown_proc(){
var eventDate=Date.parse(settings['date']) / 1000;
var currentDate=Math.floor($.now() / 1000);
if(eventDate <=currentDate){
callback.call(this);
clearInterval(interval);
}
var seconds=eventDate - currentDate;
var days=Math.floor(seconds / (60 * 60 * 24));
seconds -=days * 60 * 60 * 24;
var hours=Math.floor(seconds / (60 * 60));
seconds -=hours * 60 * 60;
var minutes=Math.floor(seconds / 60);
seconds -=minutes * 60;
if(days==1){ thisEl.find(".timeRefDays").text("day"); }else{ thisEl.find(".timeRefDays").text("days"); }
if(hours==1){ thisEl.find(".timeRefHours").text("hour"); }else{ thisEl.find(".timeRefHours").text("hours"); }
if(minutes==1){ thisEl.find(".timeRefMinutes").text("minute"); }else{ thisEl.find(".timeRefMinutes").text("minutes"); }
if(seconds==1){ thisEl.find(".timeRefSeconds").text("second"); }else{ thisEl.find(".timeRefSeconds").text("seconds"); }
if(settings['format']=="on"){
var days=(String(days).length >=2) ? days:"0" + days;
var hours=(String(hours).length >=2) ? hours:"0" + hours;
var minutes=(String(minutes).length >=2) ? minutes:"0" + minutes;
var seconds=(String(seconds).length >=2) ? seconds:"0" + seconds;
}
if(!isNaN(eventDate)){
thisEl.find(".days").text(days);
thisEl.find(".hours").text(hours);
thisEl.find(".minutes").text(minutes);
thisEl.find(".seconds").text(seconds);
}else{
alert("Invalid date. Here's an example: 12 Tuesday 2012 17:30:00");
clearInterval(interval);
}}
countdown_proc();
var interval=setInterval(countdown_proc, 1000);
}}) (jQuery);
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof module==='object'&&module.exports){
module.exports=factory(require('jquery'));
}else{
factory(root["jQuery"]);
}}(this, function ($){
(function(){
'use strict';
var defaults={
mode: 'lg-slide',
cssEasing: 'ease',
easing: 'linear',
speed: 600,
height: '100%',
width: '100%',
addClass: '',
startClass: 'lg-start-zoom',
backdropDuration: 150,
hideBarsDelay: 6000,
useLeft: false,
ariaLabelledby: '',
ariaDescribedby: '',
closable: true,
loop: true,
escKey: true,
keyPress: true,
controls: true,
slideEndAnimatoin: true,
hideControlOnEnd: false,
mousewheel: true,
getCaptionFromTitleOrAlt: true,
appendSubHtmlTo: '.lg-sub-html',
subHtmlSelectorRelative: false,
preload: 1,
showAfterLoad: true,
selector: '',
selectWithin: '',
nextHtml: '',
prevHtml: '',
index: false,
iframeMaxWidth: '100%',
download: true,
counter: true,
appendCounterTo: '.lg-toolbar',
swipeThreshold: 50,
enableSwipe: true,
enableDrag: true,
dynamic: false,
dynamicEl: [],
galleryId: 1,
supportLegacyBrowser: true
};
function Plugin(element, options){
this.el=element;
this.$el=$(element);
this.s=$.extend({}, defaults, options);
if(this.s.dynamic&&this.s.dynamicEl!=='undefined'&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length){
throw ('When using dynamic mode, you must also define dynamicEl as an Array.');
}
this.modules={};
this.lGalleryOn=false;
this.lgBusy=false;
this.hideBarTimeout=false;
this.isTouch=('ontouchstart' in document.documentElement);
if(this.s.slideEndAnimatoin){
this.s.hideControlOnEnd=false;
}
if(this.s.dynamic){
this.$items=this.s.dynamicEl;
}else{
if(this.s.selector==='this'){
this.$items=this.$el;
}else if(this.s.selector!==''){
if(this.s.selectWithin){
this.$items=$(this.s.selectWithin).find(this.s.selector);
}else{
this.$items=this.$el.find($(this.s.selector));
}}else{
this.$items=this.$el.children();
}}
this.$slide='';
this.$outer='';
this.init();
return this;
}
Plugin.prototype.init=function(){
var _this=this;
if(_this.s.preload > _this.$items.length){
_this.s.preload=_this.$items.length;
}
var _hash=window.location.hash;
if(_hash.indexOf('lg=' + this.s.galleryId) > 0){
_this.index=parseInt(_hash.split('&slide=')[1], 10);
$('body').addClass('lg-from-hash');
if(!$('body').hasClass('lg-on')){
setTimeout(function(){
_this.build(_this.index);
});
$('body').addClass('lg-on');
}}
if(_this.s.dynamic){
_this.$el.trigger('onBeforeOpen.lg');
_this.index=_this.s.index||0;
if(!$('body').hasClass('lg-on')){
setTimeout(function(){
_this.build(_this.index);
$('body').addClass('lg-on');
});
}}else{
_this.$items.on('click.lgcustom', function(event){
try {
event.preventDefault();
event.preventDefault();
} catch (er){
event.returnValue=false;
}
_this.$el.trigger('onBeforeOpen.lg');
_this.index=_this.s.index||_this.$items.index(this);
if(!$('body').hasClass('lg-on')){
_this.build(_this.index);
$('body').addClass('lg-on');
}});
}};
Plugin.prototype.build=function(index){
var _this=this;
_this.structure();
$.each($.fn.lightGallery.modules, function(key){
_this.modules[key]=new $.fn.lightGallery.modules[key](_this.el);
});
_this.slide(index, false, false, false);
if(_this.s.keyPress){
_this.keyPress();
}
if(_this.$items.length > 1){
_this.arrow();
setTimeout(function(){
_this.enableDrag();
_this.enableSwipe();
}, 50);
if(_this.s.mousewheel){
_this.mousewheel();
}}else{
_this.$slide.on('click.lg', function(){
_this.$el.trigger('onSlideClick.lg');
});
}
_this.counter();
_this.closeGallery();
_this.$el.trigger('onAfterOpen.lg');
if(_this.s.hideBarsDelay > 0){
_this.$outer.on('mousemove.lg click.lg touchstart.lg', function (){
_this.$outer.removeClass('lg-hide-items');
clearTimeout(_this.hideBarTimeout);
_this.hideBarTimeout=setTimeout(function (){
_this.$outer.addClass('lg-hide-items');
}, _this.s.hideBarsDelay);
});
}
_this.$outer.trigger('mousemove.lg');
};
Plugin.prototype.structure=function(){
var list='';
var controls='';
var i=0;
var subHtmlCont='';
var template;
var _this=this;
$('body').append('<div class="lg-backdrop"></div>');
$('.lg-backdrop').css('transition-duration', this.s.backdropDuration + 'ms');
for (i=0; i < this.$items.length; i++){
list +='<div class="lg-item"></div>';
}
if(this.s.controls&&this.$items.length > 1){
controls='<div class="lg-actions">' +
'<button type="button" aria-label="Previous slide" class="lg-prev lg-icon">' + this.s.prevHtml + '</button>' +
'<button type="button" aria-label="Next slide" class="lg-next lg-icon">' + this.s.nextHtml + '</button>' +
'</div>';
}
if(this.s.appendSubHtmlTo==='.lg-sub-html'){
subHtmlCont='<div role="status" aria-live="polite" class="lg-sub-html"></div>';
}
var ariaLabelledby=this.s.ariaLabelledby ?
'aria-labelledby="' + this.s.ariaLabelledby + '"':'';
var ariaDescribedby=this.s.ariaDescribedby ?
'aria-describedby="' + this.s.ariaDescribedby + '"':'';
template='<div tabindex="-1" aria-modal="true" ' + ariaLabelledby + ' ' + ariaDescribedby + ' role="dialog" class="lg-outer ' + this.s.addClass + ' ' + this.s.startClass + '">' +
'<div class="lg" style="width:' + this.s.width + '; height:' + this.s.height + '">' +
'<div class="lg-inner">' + list + '</div>' +
'<div class="lg-toolbar lg-group">' +
'<button type="button" aria-label="Close gallery" class="lg-close lg-icon"></button>' +
'</div>' +
controls +
subHtmlCont +
'</div>' +
'</div>';
$('body').append(template);
this.$outer=$('.lg-outer');
this.$outer.focus();
this.$slide=this.$outer.find('.lg-item');
if(this.s.useLeft){
this.$outer.addClass('lg-use-left');
this.s.mode='lg-slide';
}else{
this.$outer.addClass('lg-use-css3');
}
_this.setTop();
$(window).on('resize.lg orientationchange.lg', function(){
setTimeout(function(){
_this.setTop();
}, 100);
});
this.$slide.eq(this.index).addClass('lg-current');
if(this.doCss()){
this.$outer.addClass('lg-css3');
}else{
this.$outer.addClass('lg-css');
this.s.speed=0;
}
this.$outer.addClass(this.s.mode);
if(this.s.enableDrag&&this.$items.length > 1){
this.$outer.addClass('lg-grab');
}
if(this.s.showAfterLoad){
this.$outer.addClass('lg-show-after-load');
}
if(this.doCss()){
var $inner=this.$outer.find('.lg-inner');
$inner.css('transition-timing-function', this.s.cssEasing);
$inner.css('transition-duration', this.s.speed + 'ms');
}
setTimeout(function(){
$('.lg-backdrop').addClass('in');
});
setTimeout(function(){
_this.$outer.addClass('lg-visible');
}, this.s.backdropDuration);
if(this.s.download){
this.$outer.find('.lg-toolbar').append('<a id="lg-download" aria-label="Download" target="_blank" download class="lg-download lg-icon"></a>');
}
this.prevScrollTop=$(window).scrollTop();
};
Plugin.prototype.setTop=function(){
if(this.s.height!=='100%'){
var wH=$(window).height();
var top=(wH - parseInt(this.s.height, 10)) / 2;
var $lGallery=this.$outer.find('.lg');
if(wH >=parseInt(this.s.height, 10)){
$lGallery.css('top', top + 'px');
}else{
$lGallery.css('top', '0px');
}}
};
Plugin.prototype.doCss=function(){
var support=function(){
var transition=['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];
var root=document.documentElement;
var i=0;
for (i=0; i < transition.length; i++){
if(transition[i] in root.style){
return true;
}}
};
if(support()){
return true;
}
return false;
};
Plugin.prototype.isVideo=function(src, index){
var html;
if(this.s.dynamic){
html=this.s.dynamicEl[index].html;
}else{
html=this.$items.eq(index).attr('data-html');
}
if(!src){
if(html){
return {
html5: true
};}else{
console.error('lightGallery :- data-src is not provided on slide item ' + (index + 1) + '. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');
return false;
}}
var youtube=src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);
var vimeo=src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);
var dailymotion=src.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);
var vk=src.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);
if(youtube){
return {
youtube: youtube
};}else if(vimeo){
return {
vimeo: vimeo
};}else if(dailymotion){
return {
dailymotion: dailymotion
};}else if(vk){
return {
vk: vk
};}};
Plugin.prototype.counter=function(){
if(this.s.counter){
$(this.s.appendCounterTo).append('<div id="lg-counter" role="status" aria-live="polite"><span id="lg-counter-current">' + (parseInt(this.index, 10) + 1) + '</span> / <span id="lg-counter-all">' + this.$items.length + '</span></div>');
}};
Plugin.prototype.addHtml=function(index){
var subHtml=null;
var subHtmlUrl;
var $currentEle;
if(this.s.dynamic){
if(this.s.dynamicEl[index].subHtmlUrl){
subHtmlUrl=this.s.dynamicEl[index].subHtmlUrl;
}else{
subHtml=this.s.dynamicEl[index].subHtml;
}}else{
$currentEle=this.$items.eq(index);
if($currentEle.attr('data-sub-html-url')){
subHtmlUrl=$currentEle.attr('data-sub-html-url');
}else{
subHtml=$currentEle.attr('data-sub-html');
if(this.s.getCaptionFromTitleOrAlt&&!subHtml){
subHtml=$currentEle.attr('title')||$currentEle.find('img').first().attr('alt');
}}
}
if(!subHtmlUrl){
if(typeof subHtml!=='undefined'&&subHtml!==null){
var fL=subHtml.substring(0, 1);
if(fL==='.'||fL==='#'){
if(this.s.subHtmlSelectorRelative&&!this.s.dynamic){
subHtml=$currentEle.find(subHtml).html();
}else{
subHtml=$(subHtml).html();
}}
}else{
subHtml='';
}}
if(this.s.appendSubHtmlTo==='.lg-sub-html'){
if(subHtmlUrl){
this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl);
}else{
this.$outer.find(this.s.appendSubHtmlTo).html(subHtml);
}}else{
if(subHtmlUrl){
this.$slide.eq(index).load(subHtmlUrl);
}else{
this.$slide.eq(index).append(subHtml);
}}
if(typeof subHtml!=='undefined'&&subHtml!==null){
if(subHtml===''){
this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html');
}else{
this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html');
}}
this.$el.trigger('onAfterAppendSubHtml.lg', [index]);
};
Plugin.prototype.preload=function(index){
var i=1;
var j=1;
for (i=1; i <=this.s.preload; i++){
if(i >=this.$items.length - index){
break;
}
this.loadContent(index + i, false, 0);
}
for (j=1; j <=this.s.preload; j++){
if(index - j < 0){
break;
}
this.loadContent(index - j, false, 0);
}};
Plugin.prototype.loadContent=function(index, rec, delay){
var _this=this;
var _hasPoster=false;
var _$img;
var _src;
var _poster;
var _srcset;
var _sizes;
var _html;
var _alt;
var getResponsiveSrc=function(srcItms){
var rsWidth=[];
var rsSrc=[];
for (var i=0; i < srcItms.length; i++){
var __src=srcItms[i].split(' ');
if(__src[0]===''){
__src.splice(0, 1);
}
rsSrc.push(__src[0]);
rsWidth.push(__src[1]);
}
var wWidth=$(window).width();
for (var j=0; j < rsWidth.length; j++){
if(parseInt(rsWidth[j], 10) > wWidth){
_src=rsSrc[j];
break;
}}
};
if(_this.s.dynamic){
if(_this.s.dynamicEl[index].poster){
_hasPoster=true;
_poster=_this.s.dynamicEl[index].poster;
}
_html=_this.s.dynamicEl[index].html;
_src=_this.s.dynamicEl[index].src;
_alt=_this.s.dynamicEl[index].alt;
if(_this.s.dynamicEl[index].responsive){
var srcDyItms=_this.s.dynamicEl[index].responsive.split(',');
getResponsiveSrc(srcDyItms);
}
_srcset=_this.s.dynamicEl[index].srcset;
_sizes=_this.s.dynamicEl[index].sizes;
}else{
var $currentEle=_this.$items.eq(index);
if($currentEle.attr('data-poster')){
_hasPoster=true;
_poster=$currentEle.attr('data-poster');
}
_html=$currentEle.attr('data-html');
_src=$currentEle.attr('href')||$currentEle.attr('data-src');
_alt=$currentEle.attr('title')||$currentEle.find('img').first().attr('alt');
if($currentEle.attr('data-responsive')){
var srcItms=$currentEle.attr('data-responsive').split(',');
getResponsiveSrc(srcItms);
}
_srcset=$currentEle.attr('data-srcset');
_sizes=$currentEle.attr('data-sizes');
}
var iframe=false;
if(_this.s.dynamic){
if(_this.s.dynamicEl[index].iframe){
iframe=true;
}}else{
if(_this.$items.eq(index).attr('data-iframe')==='true'){
iframe=true;
}}
var _isVideo=_this.isVideo(_src, index);
if(!_this.$slide.eq(index).hasClass('lg-loaded')){
if(iframe){
_this.$slide.eq(index).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:' + _this.s.iframeMaxWidth + '"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="' + _src + '"  allowfullscreen="true"></iframe></div></div>');
}else if(_hasPoster){
var videoClass='';
if(_isVideo&&_isVideo.youtube){
videoClass='lg-has-youtube';
}else if(_isVideo&&_isVideo.vimeo){
videoClass='lg-has-vimeo';
}else{
videoClass='lg-has-html5';
}
_this.$slide.eq(index).prepend('<div class="lg-video-cont ' + videoClass + ' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="' + _poster + '" /></div></div>');
}else if(_isVideo){
_this.$slide.eq(index).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>');
_this.$el.trigger('hasVideo.lg', [index, _src, _html]);
}else{
_alt=_alt ? 'alt="' + _alt + '"':'';
_this.$slide.eq(index).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" ' + _alt + ' src="' + _src + '" /></div>');
}
_this.$el.trigger('onAferAppendSlide.lg', [index]);
_$img=_this.$slide.eq(index).find('.lg-object');
if(_sizes){
_$img.attr('sizes', _sizes);
}
if(_srcset){
_$img.attr('srcset', _srcset);
if(this.s.supportLegacyBrowser){
try {
picturefill({
elements: [_$img[0]]
});
} catch (e){
console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.');
}}
}
if(this.s.appendSubHtmlTo!=='.lg-sub-html'){
_this.addHtml(index);
}
_this.$slide.eq(index).addClass('lg-loaded');
}
_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function(){
var _speed=0;
if(delay&&!$('body').hasClass('lg-from-hash')){
_speed=delay;
}
setTimeout(function(){
_this.$slide.eq(index).addClass('lg-complete');
_this.$el.trigger('onSlideItemLoad.lg', [index, delay||0]);
}, _speed);
});
if(_isVideo&&_isVideo.html5&&!_hasPoster){
_this.$slide.eq(index).addClass('lg-complete');
}
if(rec===true){
if(!_this.$slide.eq(index).hasClass('lg-complete')){
_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function(){
_this.preload(index);
});
}else{
_this.preload(index);
}}
};
Plugin.prototype.slide=function(index, fromTouch, fromThumb, direction){
var _prevIndex=this.$outer.find('.lg-current').index();
var _this=this;
if(_this.lGalleryOn&&(_prevIndex===index)){
return;
}
var _length=this.$slide.length;
var _time=_this.lGalleryOn ? this.s.speed:0;
if(!_this.lgBusy){
if(this.s.download){
var _src;
if(_this.s.dynamic){
_src=_this.s.dynamicEl[index].downloadUrl!==false&&(_this.s.dynamicEl[index].downloadUrl||_this.s.dynamicEl[index].src);
}else{
_src=_this.$items.eq(index).attr('data-download-url')!=='false'&&(_this.$items.eq(index).attr('data-download-url')||_this.$items.eq(index).attr('href')||_this.$items.eq(index).attr('data-src'));
}
if(_src){
$('#lg-download').attr('href', _src);
_this.$outer.removeClass('lg-hide-download');
}else{
_this.$outer.addClass('lg-hide-download');
}}
this.$el.trigger('onBeforeSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
_this.lgBusy=true;
clearTimeout(_this.hideBarTimeout);
if(this.s.appendSubHtmlTo==='.lg-sub-html'){
setTimeout(function(){
_this.addHtml(index);
}, _time);
}
this.arrowDisable(index);
if(!direction){
if(index < _prevIndex){
direction='prev';
}else if(index > _prevIndex){
direction='next';
}}
if(!fromTouch){
_this.$outer.addClass('lg-no-trans');
this.$slide.removeClass('lg-prev-slide lg-next-slide');
if(direction==='prev'){
this.$slide.eq(index).addClass('lg-prev-slide');
this.$slide.eq(_prevIndex).addClass('lg-next-slide');
}else{
this.$slide.eq(index).addClass('lg-next-slide');
this.$slide.eq(_prevIndex).addClass('lg-prev-slide');
}
setTimeout(function(){
_this.$slide.removeClass('lg-current');
_this.$slide.eq(index).addClass('lg-current');
_this.$outer.removeClass('lg-no-trans');
}, 50);
}else{
this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');
var touchPrev;
var touchNext;
if(_length > 2){
touchPrev=index - 1;
touchNext=index + 1;
if((index===0)&&(_prevIndex===_length - 1)){
touchNext=0;
touchPrev=_length - 1;
}else if((index===_length - 1)&&(_prevIndex===0)){
touchNext=0;
touchPrev=_length - 1;
}}else{
touchPrev=0;
touchNext=1;
}
if(direction==='prev'){
_this.$slide.eq(touchNext).addClass('lg-next-slide');
}else{
_this.$slide.eq(touchPrev).addClass('lg-prev-slide');
}
_this.$slide.eq(index).addClass('lg-current');
}
if(_this.lGalleryOn){
setTimeout(function(){
_this.loadContent(index, true, 0);
}, this.s.speed + 50);
setTimeout(function(){
_this.lgBusy=false;
_this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
}, this.s.speed);
}else{
_this.loadContent(index, true, _this.s.backdropDuration);
_this.lgBusy=false;
_this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
}
_this.lGalleryOn=true;
if(this.s.counter){
$('#lg-counter-current').text(index + 1);
}}
_this.index=index;
};
Plugin.prototype.goToNextSlide=function(fromTouch){
var _this=this;
var _loop=_this.s.loop;
if(fromTouch&&_this.$slide.length < 3){
_loop=false;
}
if(!_this.lgBusy){
if((_this.index + 1) < _this.$slide.length){
_this.index++;
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
_this.slide(_this.index, fromTouch, false, 'next');
}else{
if(_loop){
_this.index=0;
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
_this.slide(_this.index, fromTouch, false, 'next');
}else if(_this.s.slideEndAnimatoin&&!fromTouch){
_this.$outer.addClass('lg-right-end');
setTimeout(function(){
_this.$outer.removeClass('lg-right-end');
}, 400);
}}
}};
Plugin.prototype.goToPrevSlide=function(fromTouch){
var _this=this;
var _loop=_this.s.loop;
if(fromTouch&&_this.$slide.length < 3){
_loop=false;
}
if(!_this.lgBusy){
if(_this.index > 0){
_this.index--;
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
_this.slide(_this.index, fromTouch, false, 'prev');
}else{
if(_loop){
_this.index=_this.$items.length - 1;
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
_this.slide(_this.index, fromTouch, false, 'prev');
}else if(_this.s.slideEndAnimatoin&&!fromTouch){
_this.$outer.addClass('lg-left-end');
setTimeout(function(){
_this.$outer.removeClass('lg-left-end');
}, 400);
}}
}};
Plugin.prototype.keyPress=function(){
var _this=this;
if(this.$items.length > 1){
$(window).on('keyup.lg', function(e){
if(_this.$items.length > 1){
if(e.keyCode===37){
e.preventDefault();
_this.goToPrevSlide();
}
if(e.keyCode===39){
e.preventDefault();
_this.goToNextSlide();
}}
});
}
$(window).on('keydown.lg', function(e){
if(_this.s.escKey===true&&e.keyCode===27){
e.preventDefault();
if(!_this.$outer.hasClass('lg-thumb-open')){
_this.destroy();
}else{
_this.$outer.removeClass('lg-thumb-open');
}}
});
};
Plugin.prototype.arrow=function(){
var _this=this;
this.$outer.find('.lg-prev').on('click.lg', function(){
_this.goToPrevSlide();
});
this.$outer.find('.lg-next').on('click.lg', function(){
_this.goToNextSlide();
});
};
Plugin.prototype.arrowDisable=function(index){
if(!this.s.loop&&this.s.hideControlOnEnd){
if((index + 1) < this.$slide.length){
this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled');
}else{
this.$outer.find('.lg-next').attr('disabled', 'disabled').addClass('disabled');
}
if(index > 0){
this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled');
}else{
this.$outer.find('.lg-prev').attr('disabled', 'disabled').addClass('disabled');
}}
};
Plugin.prototype.setTranslate=function($el, xValue, yValue){
if(this.s.useLeft){
$el.css('left', xValue);
}else{
$el.css({
transform: 'translate3d(' + (xValue) + 'px, ' + yValue + 'px, 0px)'
});
}};
Plugin.prototype.touchMove=function(startCoords, endCoords){
var distance=endCoords - startCoords;
if(Math.abs(distance) > 15){
this.$outer.addClass('lg-dragging');
this.setTranslate(this.$slide.eq(this.index), distance, 0);
this.setTranslate($('.lg-prev-slide'), -this.$slide.eq(this.index).width() + distance, 0);
this.setTranslate($('.lg-next-slide'), this.$slide.eq(this.index).width() + distance, 0);
}};
Plugin.prototype.touchEnd=function(distance){
var _this=this;
if(_this.s.mode!=='lg-slide'){
_this.$outer.addClass('lg-slide');
}
this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity', '0');
setTimeout(function(){
_this.$outer.removeClass('lg-dragging');
if((distance < 0)&&(Math.abs(distance) > _this.s.swipeThreshold)){
_this.goToNextSlide(true);
}else if((distance > 0)&&(Math.abs(distance) > _this.s.swipeThreshold)){
_this.goToPrevSlide(true);
}else if(Math.abs(distance) < 5){
_this.$el.trigger('onSlideClick.lg');
}
_this.$slide.removeAttr('style');
});
setTimeout(function(){
if(!_this.$outer.hasClass('lg-dragging')&&_this.s.mode!=='lg-slide'){
_this.$outer.removeClass('lg-slide');
}}, _this.s.speed + 100);
};
Plugin.prototype.enableSwipe=function(){
var _this=this;
var startCoords=0;
var endCoords=0;
var isMoved=false;
if(_this.s.enableSwipe&&_this.doCss()){
_this.$slide.on('touchstart.lg', function(e){
if(!_this.$outer.hasClass('lg-zoomed')&&!_this.lgBusy){
e.preventDefault();
_this.manageSwipeClass();
startCoords=e.originalEvent.targetTouches[0].pageX;
}});
_this.$slide.on('touchmove.lg', function(e){
if(!_this.$outer.hasClass('lg-zoomed')){
e.preventDefault();
endCoords=e.originalEvent.targetTouches[0].pageX;
_this.touchMove(startCoords, endCoords);
isMoved=true;
}});
_this.$slide.on('touchend.lg', function(){
if(!_this.$outer.hasClass('lg-zoomed')){
if(isMoved){
isMoved=false;
_this.touchEnd(endCoords - startCoords);
}else{
_this.$el.trigger('onSlideClick.lg');
}}
});
}};
Plugin.prototype.enableDrag=function(){
var _this=this;
var startCoords=0;
var endCoords=0;
var isDraging=false;
var isMoved=false;
if(_this.s.enableDrag&&_this.doCss()){
_this.$slide.on('mousedown.lg', function(e){
if(!_this.$outer.hasClass('lg-zoomed')&&!_this.lgBusy&&!$(e.target).text().trim()){
e.preventDefault();
_this.manageSwipeClass();
startCoords=e.pageX;
isDraging=true;
_this.$outer.scrollLeft +=1;
_this.$outer.scrollLeft -=1;
_this.$outer.removeClass('lg-grab').addClass('lg-grabbing');
_this.$el.trigger('onDragstart.lg');
}});
$(window).on('mousemove.lg', function(e){
if(isDraging){
isMoved=true;
endCoords=e.pageX;
_this.touchMove(startCoords, endCoords);
_this.$el.trigger('onDragmove.lg');
}});
$(window).on('mouseup.lg', function(e){
if(isMoved){
isMoved=false;
_this.touchEnd(endCoords - startCoords);
_this.$el.trigger('onDragend.lg');
}else if($(e.target).hasClass('lg-object')||$(e.target).hasClass('lg-video-play')){
_this.$el.trigger('onSlideClick.lg');
}
if(isDraging){
isDraging=false;
_this.$outer.removeClass('lg-grabbing').addClass('lg-grab');
}});
}};
Plugin.prototype.manageSwipeClass=function(){
var _touchNext=this.index + 1;
var _touchPrev=this.index - 1;
if(this.s.loop&&this.$slide.length > 2){
if(this.index===0){
_touchPrev=this.$slide.length - 1;
}else if(this.index===this.$slide.length - 1){
_touchNext=0;
}}
this.$slide.removeClass('lg-next-slide lg-prev-slide');
if(_touchPrev > -1){
this.$slide.eq(_touchPrev).addClass('lg-prev-slide');
}
this.$slide.eq(_touchNext).addClass('lg-next-slide');
};
Plugin.prototype.mousewheel=function(){
var _this=this;
_this.$outer.on('mousewheel.lg', function(e){
if(!e.deltaY){
return;
}
if(e.deltaY > 0){
_this.goToPrevSlide();
}else{
_this.goToNextSlide();
}
e.preventDefault();
});
};
Plugin.prototype.closeGallery=function(){
var _this=this;
var mousedown=false;
this.$outer.find('.lg-close').on('click.lg', function(){
_this.destroy();
});
if(_this.s.closable){
_this.$outer.on('mousedown.lg', function(e){
if($(e.target).is('.lg-outer')||$(e.target).is('.lg-item ')||$(e.target).is('.lg-img-wrap')){
mousedown=true;
}else{
mousedown=false;
}});
_this.$outer.on('mousemove.lg', function(){
mousedown=false;
});
_this.$outer.on('mouseup.lg', function(e){
if($(e.target).is('.lg-outer')||$(e.target).is('.lg-item ')||$(e.target).is('.lg-img-wrap')&&mousedown){
if(!_this.$outer.hasClass('lg-dragging')){
_this.destroy();
}}
});
}};
Plugin.prototype.destroy=function(d){
var _this=this;
if(!d){
_this.$el.trigger('onBeforeClose.lg');
$(window).scrollTop(_this.prevScrollTop);
}
if(d){
if(!_this.s.dynamic){
this.$items.off('click.lg click.lgcustom');
}
$.removeData(_this.el, 'lightGallery');
}
this.$el.off('.lg.tm');
$.each($.fn.lightGallery.modules, function(key){
if(_this.modules[key]){
_this.modules[key].destroy();
}});
this.lGalleryOn=false;
clearTimeout(_this.hideBarTimeout);
this.hideBarTimeout=false;
$(window).off('.lg');
$('body').removeClass('lg-on lg-from-hash');
if(_this.$outer){
_this.$outer.removeClass('lg-visible');
}
$('.lg-backdrop').removeClass('in');
setTimeout(function(){
if(_this.$outer){
_this.$outer.remove();
}
$('.lg-backdrop').remove();
if(!d){
_this.$el.trigger('onCloseAfter.lg');
}
_this.$el.focus();
}, _this.s.backdropDuration + 50);
};
$.fn.lightGallery=function(options){
return this.each(function(){
if(!$.data(this, 'lightGallery')){
$.data(this, 'lightGallery', new Plugin(this, options));
}else{
try {
$(this).data('lightGallery').init();
} catch (err){
console.error('lightGallery has not initiated properly', err);
}}
});
};
$.fn.lightGallery.modules={};})();
}));
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof module==='object'&&module.exports){
module.exports=factory(require('jquery'));
}else{
factory(root["jQuery"]);
}}(this, function ($){
(function(){
'use strict';
var defaults={
autoplay: false,
pause: 5000,
progressBar: true,
fourceAutoplay: false,
autoplayControls: true,
appendAutoplayControlsTo: '.lg-toolbar'
};
var Autoplay=function(element){
this.core=$(element).data('lightGallery');
this.$el=$(element);
if(this.core.$items.length < 2){
return false;
}
this.core.s=$.extend({}, defaults, this.core.s);
this.interval=false;
this.fromAuto=true;
this.canceledOnTouch=false;
this.fourceAutoplayTemp=this.core.s.fourceAutoplay;
if(!this.core.doCss()){
this.core.s.progressBar=false;
}
this.init();
return this;
};
Autoplay.prototype.init=function(){
var _this=this;
if(_this.core.s.autoplayControls){
_this.controls();
}
if(_this.core.s.progressBar){
_this.core.$outer.find('.lg').append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>');
}
_this.progress();
if(_this.core.s.autoplay){
_this.$el.one('onSlideItemLoad.lg.tm', function(){
_this.startlAuto();
});
}
_this.$el.on('onDragstart.lg.tm touchstart.lg.tm', function(){
if(_this.interval){
_this.cancelAuto();
_this.canceledOnTouch=true;
}});
_this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', function(){
if(!_this.interval&&_this.canceledOnTouch){
_this.startlAuto();
_this.canceledOnTouch=false;
}});
};
Autoplay.prototype.progress=function(){
var _this=this;
var _$progressBar;
var _$progress;
_this.$el.on('onBeforeSlide.lg.tm', function(){
if(_this.core.s.progressBar&&_this.fromAuto){
_$progressBar=_this.core.$outer.find('.lg-progress-bar');
_$progress=_this.core.$outer.find('.lg-progress');
if(_this.interval){
_$progress.removeAttr('style');
_$progressBar.removeClass('lg-start');
setTimeout(function(){
_$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
_$progressBar.addClass('lg-start');
}, 20);
}}
if(!_this.fromAuto&&!_this.core.s.fourceAutoplay){
_this.cancelAuto();
}
_this.fromAuto=false;
});
};
Autoplay.prototype.controls=function(){
var _this=this;
var _html='<button type="button" aria-label="Toggle autoplay" class="lg-autoplay-button lg-icon"></button>';
$(this.core.s.appendAutoplayControlsTo).append(_html);
_this.core.$outer.find('.lg-autoplay-button').on('click.lg', function(){
if($(_this.core.$outer).hasClass('lg-show-autoplay')){
_this.cancelAuto();
_this.core.s.fourceAutoplay=false;
}else{
if(!_this.interval){
_this.startlAuto();
_this.core.s.fourceAutoplay=_this.fourceAutoplayTemp;
}}
});
};
Autoplay.prototype.startlAuto=function(){
var _this=this;
_this.core.$outer.find('.lg-progress').css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
_this.core.$outer.addClass('lg-show-autoplay');
_this.core.$outer.find('.lg-progress-bar').addClass('lg-start');
_this.interval=setInterval(function(){
if(_this.core.index + 1 < _this.core.$items.length){
_this.core.index++;
}else{
_this.core.index=0;
}
_this.fromAuto=true;
_this.core.slide(_this.core.index, false, false, 'next');
}, _this.core.s.speed + _this.core.s.pause);
};
Autoplay.prototype.cancelAuto=function(){
clearInterval(this.interval);
this.interval=false;
this.core.$outer.find('.lg-progress').removeAttr('style');
this.core.$outer.removeClass('lg-show-autoplay');
this.core.$outer.find('.lg-progress-bar').removeClass('lg-start');
};
Autoplay.prototype.destroy=function(){
this.cancelAuto();
this.core.$outer.find('.lg-progress-bar').remove();
};
$.fn.lightGallery.modules.autoplay=Autoplay;
})();
}));
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof module==='object'&&module.exports){
module.exports=factory(require('jquery'));
}else{
factory(root["jQuery"]);
}}(this, function ($){
(function(){
'use strict';
var defaults={
fullScreen: true
};
function isFullScreen(){
return (
document.fullscreenElement ||
document.mozFullScreenElement ||
document.webkitFullscreenElement ||
document.msFullscreenElement
);
}
var Fullscreen=function(element){
this.core=$(element).data('lightGallery');
this.$el=$(element);
this.core.s=$.extend({}, defaults, this.core.s);
this.init();
return this;
};
Fullscreen.prototype.init=function(){
var fullScreen='';
if(this.core.s.fullScreen){
if(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled &&
!document.mozFullScreenEnabled&&!document.msFullscreenEnabled){
return;
}else{
fullScreen='<button type="button" aria-label="Toggle fullscreen" class="lg-fullscreen lg-icon"></button>';
this.core.$outer.find('.lg-toolbar').append(fullScreen);
this.fullScreen();
}}
};
Fullscreen.prototype.requestFullscreen=function(){
var el=document.documentElement;
if(el.requestFullscreen){
el.requestFullscreen();
}else if(el.msRequestFullscreen){
el.msRequestFullscreen();
}else if(el.mozRequestFullScreen){
el.mozRequestFullScreen();
}else if(el.webkitRequestFullscreen){
el.webkitRequestFullscreen();
}};
Fullscreen.prototype.exitFullscreen=function(){
if(document.exitFullscreen){
document.exitFullscreen();
}else if(document.msExitFullscreen){
document.msExitFullscreen();
}else if(document.mozCancelFullScreen){
document.mozCancelFullScreen();
}else if(document.webkitExitFullscreen){
document.webkitExitFullscreen();
}};
Fullscreen.prototype.fullScreen=function(){
var _this=this;
$(document).on('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg', function(){
_this.core.$outer.toggleClass('lg-fullscreen-on');
});
this.core.$outer.find('.lg-fullscreen').on('click.lg', function(){
if(isFullScreen()){
_this.exitFullscreen();
}else{
_this.requestFullscreen();
}});
};
Fullscreen.prototype.destroy=function(){
if(isFullScreen()){
this.exitFullscreen();
}
$(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg');
};
$.fn.lightGallery.modules.fullscreen=Fullscreen;
})();
}));
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof exports==='object'){
module.exports=factory(require('jquery'));
}else{
factory(jQuery);
}}(this, function ($){
(function(){
'use strict';
var defaults={
pager: false
};
var Pager=function(element){
this.core=$(element).data('lightGallery');
this.$el=$(element);
this.core.s=$.extend({}, defaults, this.core.s);
if(this.core.s.pager&&this.core.$items.length > 1){
this.init();
}
return this;
};
Pager.prototype.init=function(){
var _this=this;
var pagerList='';
var $pagerCont;
var $pagerOuter;
var timeout;
_this.core.$outer.find('.lg').append('<div class="lg-pager-outer"></div>');
if(_this.core.s.dynamic){
for (var i=0; i < _this.core.s.dynamicEl.length; i++){
pagerList +='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + _this.core.s.dynamicEl[i].thumb + '" /></div></span>';
}}else{
_this.core.$items.each(function(){
if(!_this.core.s.exThumbImage){
pagerList +='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + $(this).find('img').attr('src') + '" /></div></span>';
}else{
pagerList +='<span class="lg-pager-cont"> <span class="lg-pager"></span><div class="lg-pager-thumb-cont"><span class="lg-caret"></span> <img src="' + $(this).attr(_this.core.s.exThumbImage) + '" /></div></span>';
}});
}
$pagerOuter=_this.core.$outer.find('.lg-pager-outer');
$pagerOuter.html(pagerList);
$pagerCont=_this.core.$outer.find('.lg-pager-cont');
$pagerCont.on('click.lg touchend.lg', function(){
var _$this=$(this);
_this.core.index=_$this.index();
_this.core.slide(_this.core.index, false, true, false);
});
$pagerOuter.on('mouseover.lg', function(){
clearTimeout(timeout);
$pagerOuter.addClass('lg-pager-hover');
});
$pagerOuter.on('mouseout.lg', function(){
timeout=setTimeout(function(){
$pagerOuter.removeClass('lg-pager-hover');
});
});
_this.core.$el.on('onBeforeSlide.lg.tm', function(e, prevIndex, index){
$pagerCont.removeClass('lg-pager-active');
$pagerCont.eq(index).addClass('lg-pager-active');
});
};
Pager.prototype.destroy=function(){
};
$.fn.lightGallery.modules.pager=Pager;
})();
}));
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof module==='object'&&module.exports){
module.exports=factory(require('jquery'));
}else{
factory(root["jQuery"]);
}}(this, function ($){
(function(){
'use strict';
var defaults={
thumbnail: true,
animateThumb: true,
currentPagerPosition: 'middle',
thumbWidth: 100,
thumbHeight: '80px',
thumbContHeight: 100,
thumbMargin: 5,
exThumbImage: false,
showThumbByDefault: true,
toogleThumb: true,
pullCaptionUp: true,
enableThumbDrag: true,
enableThumbSwipe: true,
swipeThreshold: 50,
loadYoutubeThumbnail: true,
youtubeThumbSize: 1,
loadVimeoThumbnail: true,
vimeoThumbSize: 'thumbnail_small',
loadDailymotionThumbnail: true
};
var Thumbnail=function(element){
this.core=$(element).data('lightGallery');
this.core.s=$.extend({}, defaults, this.core.s);
this.$el=$(element);
this.$thumbOuter=null;
this.thumbOuterWidth=0;
this.thumbTotalWidth=(this.core.$items.length * (this.core.s.thumbWidth + this.core.s.thumbMargin));
this.thumbIndex=this.core.index;
if(this.core.s.animateThumb){
this.core.s.thumbHeight='100%';
}
this.left=0;
this.init();
return this;
};
Thumbnail.prototype.init=function(){
var _this=this;
if(this.core.s.thumbnail&&this.core.$items.length > 1){
if(this.core.s.showThumbByDefault){
setTimeout(function(){
_this.core.$outer.addClass('lg-thumb-open');
}, 700);
}
if(this.core.s.pullCaptionUp){
this.core.$outer.addClass('lg-pull-caption-up');
}
this.build();
if(this.core.s.animateThumb&&this.core.doCss()){
if(this.core.s.enableThumbDrag){
this.enableThumbDrag();
}
if(this.core.s.enableThumbSwipe){
this.enableThumbSwipe();
}
this.thumbClickable=false;
}else{
this.thumbClickable=true;
}
this.toogle();
this.thumbkeyPress();
}};
Thumbnail.prototype.build=function(){
var _this=this;
var thumbList='';
var vimeoErrorThumbSize='';
var $thumb;
var html='<div class="lg-thumb-outer">' +
'<div class="lg-thumb lg-group">' +
'</div>' +
'</div>';
switch (this.core.s.vimeoThumbSize){
case 'thumbnail_large':
vimeoErrorThumbSize='640';
break;
case 'thumbnail_medium':
vimeoErrorThumbSize='200x150';
break;
case 'thumbnail_small':
vimeoErrorThumbSize='100x75';
}
_this.core.$outer.addClass('lg-has-thumb');
_this.core.$outer.find('.lg').append(html);
_this.$thumbOuter=_this.core.$outer.find('.lg-thumb-outer');
_this.thumbOuterWidth=_this.$thumbOuter.width();
if(_this.core.s.animateThumb){
_this.core.$outer.find('.lg-thumb').css({
width: _this.thumbTotalWidth + 'px',
position: 'relative'
});
}
if(this.core.s.animateThumb){
_this.$thumbOuter.css('height', _this.core.s.thumbContHeight + 'px');
}
function getThumb(src, thumb, index){
var isVideo=_this.core.isVideo(src, index)||{};
var thumbImg;
var vimeoId='';
if(isVideo.youtube||isVideo.vimeo||isVideo.dailymotion){
if(isVideo.youtube){
if(_this.core.s.loadYoutubeThumbnail){
thumbImg='//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.jpg';
}else{
thumbImg=thumb;
}}else if(isVideo.vimeo){
if(_this.core.s.loadVimeoThumbnail){
thumbImg='//i.vimeocdn.com/video/error_' + vimeoErrorThumbSize + '.jpg';
vimeoId=isVideo.vimeo[1];
}else{
thumbImg=thumb;
}}else if(isVideo.dailymotion){
if(_this.core.s.loadDailymotionThumbnail){
thumbImg='//www.dailymotion.com/thumbnail/video/' + isVideo.dailymotion[1];
}else{
thumbImg=thumb;
}}
}else{
thumbImg=thumb;
}
thumbList +='<div data-vimeo-id="' + vimeoId + '" class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; height: ' + _this.core.s.thumbHeight + '; margin-right: ' + _this.core.s.thumbMargin + 'px"><img src="' + thumbImg + '" /></div>';
vimeoId='';
}
if(_this.core.s.dynamic){
for (var i=0; i < _this.core.s.dynamicEl.length; i++){
getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i);
}}else{
_this.core.$items.each(function(i){
if(!_this.core.s.exThumbImage){
getThumb($(this).attr('href')||$(this).attr('data-src'), $(this).find('img').attr('src'), i);
}else{
getThumb($(this).attr('href')||$(this).attr('data-src'), $(this).attr(_this.core.s.exThumbImage), i);
}});
}
_this.core.$outer.find('.lg-thumb').html(thumbList);
$thumb=_this.core.$outer.find('.lg-thumb-item');
$thumb.each(function(){
var $this=$(this);
var vimeoVideoId=$this.attr('data-vimeo-id');
if(vimeoVideoId){
$.getJSON('//www.vimeo.com/api/v2/video/' + vimeoVideoId + '.json?callback=?', {
format: 'json'
}, function(data){
$this.find('img').attr('src', data[0][_this.core.s.vimeoThumbSize]);
});
}});
$thumb.eq(_this.core.index).addClass('active');
_this.core.$el.on('onBeforeSlide.lg.tm', function(){
$thumb.removeClass('active');
$thumb.eq(_this.core.index).addClass('active');
});
$thumb.on('click.lg touchend.lg', function(){
var _$this=$(this);
setTimeout(function(){
if((_this.thumbClickable&&!_this.core.lgBusy)||!_this.core.doCss()){
_this.core.index=_$this.index();
_this.core.slide(_this.core.index, false, true, false);
}}, 50);
});
_this.core.$el.on('onBeforeSlide.lg.tm', function(){
_this.animateThumb(_this.core.index);
});
$(window).on('resize.lg.thumb orientationchange.lg.thumb', function(){
setTimeout(function(){
_this.animateThumb(_this.core.index);
_this.thumbOuterWidth=_this.$thumbOuter.width();
}, 200);
});
};
Thumbnail.prototype.setTranslate=function(value){
this.core.$outer.find('.lg-thumb').css({
transform: 'translate3d(-' + (value) + 'px, 0px, 0px)'
});
};
Thumbnail.prototype.animateThumb=function(index){
var $thumb=this.core.$outer.find('.lg-thumb');
if(this.core.s.animateThumb){
var position;
switch (this.core.s.currentPagerPosition){
case 'left':
position=0;
break;
case 'middle':
position=(this.thumbOuterWidth / 2) - (this.core.s.thumbWidth / 2);
break;
case 'right':
position=this.thumbOuterWidth - this.core.s.thumbWidth;
}
this.left=((this.core.s.thumbWidth + this.core.s.thumbMargin) * index - 1) - position;
if(this.left > (this.thumbTotalWidth - this.thumbOuterWidth)){
this.left=this.thumbTotalWidth - this.thumbOuterWidth;
}
if(this.left < 0){
this.left=0;
}
if(this.core.lGalleryOn){
if(!$thumb.hasClass('on')){
this.core.$outer.find('.lg-thumb').css('transition-duration', this.core.s.speed + 'ms');
}
if(!this.core.doCss()){
$thumb.animate({
left: -this.left + 'px'
}, this.core.s.speed);
}}else{
if(!this.core.doCss()){
$thumb.css('left', -this.left + 'px');
}}
this.setTranslate(this.left);
}};
Thumbnail.prototype.enableThumbDrag=function(){
var _this=this;
var startCoords=0;
var endCoords=0;
var isDraging=false;
var isMoved=false;
var tempLeft=0;
_this.$thumbOuter.addClass('lg-grab');
_this.core.$outer.find('.lg-thumb').on('mousedown.lg.thumb', function(e){
if(_this.thumbTotalWidth > _this.thumbOuterWidth){
e.preventDefault();
startCoords=e.pageX;
isDraging=true;
_this.core.$outer.scrollLeft +=1;
_this.core.$outer.scrollLeft -=1;
_this.thumbClickable=false;
_this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing');
}});
$(window).on('mousemove.lg.thumb', function(e){
if(isDraging){
tempLeft=_this.left;
isMoved=true;
endCoords=e.pageX;
_this.$thumbOuter.addClass('lg-dragging');
tempLeft=tempLeft - (endCoords - startCoords);
if(tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)){
tempLeft=_this.thumbTotalWidth - _this.thumbOuterWidth;
}
if(tempLeft < 0){
tempLeft=0;
}
_this.setTranslate(tempLeft);
}});
$(window).on('mouseup.lg.thumb', function(){
if(isMoved){
isMoved=false;
_this.$thumbOuter.removeClass('lg-dragging');
_this.left=tempLeft;
if(Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold){
_this.thumbClickable=true;
}}else{
_this.thumbClickable=true;
}
if(isDraging){
isDraging=false;
_this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');
}});
};
Thumbnail.prototype.enableThumbSwipe=function(){
var _this=this;
var startCoords=0;
var endCoords=0;
var isMoved=false;
var tempLeft=0;
_this.core.$outer.find('.lg-thumb').on('touchstart.lg', function(e){
if(_this.thumbTotalWidth > _this.thumbOuterWidth){
e.preventDefault();
startCoords=e.originalEvent.targetTouches[0].pageX;
_this.thumbClickable=false;
}});
_this.core.$outer.find('.lg-thumb').on('touchmove.lg', function(e){
if(_this.thumbTotalWidth > _this.thumbOuterWidth){
e.preventDefault();
endCoords=e.originalEvent.targetTouches[0].pageX;
isMoved=true;
_this.$thumbOuter.addClass('lg-dragging');
tempLeft=_this.left;
tempLeft=tempLeft - (endCoords - startCoords);
if(tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)){
tempLeft=_this.thumbTotalWidth - _this.thumbOuterWidth;
}
if(tempLeft < 0){
tempLeft=0;
}
_this.setTranslate(tempLeft);
}});
_this.core.$outer.find('.lg-thumb').on('touchend.lg', function(){
if(_this.thumbTotalWidth > _this.thumbOuterWidth){
if(isMoved){
isMoved=false;
_this.$thumbOuter.removeClass('lg-dragging');
if(Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold){
_this.thumbClickable=true;
}
_this.left=tempLeft;
}else{
_this.thumbClickable=true;
}}else{
_this.thumbClickable=true;
}});
};
Thumbnail.prototype.toogle=function(){
var _this=this;
if(_this.core.s.toogleThumb){
_this.core.$outer.addClass('lg-can-toggle');
_this.$thumbOuter.append('<button type="button" aria-label="Toggle thumbnails" class="lg-toogle-thumb lg-icon"></button>');
_this.core.$outer.find('.lg-toogle-thumb').on('click.lg', function(){
_this.core.$outer.toggleClass('lg-thumb-open');
});
}};
Thumbnail.prototype.thumbkeyPress=function(){
var _this=this;
$(window).on('keydown.lg.thumb', function(e){
if(e.keyCode===38){
e.preventDefault();
_this.core.$outer.addClass('lg-thumb-open');
}else if(e.keyCode===40){
e.preventDefault();
_this.core.$outer.removeClass('lg-thumb-open');
}});
};
Thumbnail.prototype.destroy=function(){
if(this.core.s.thumbnail&&this.core.$items.length > 1){
$(window).off('resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb');
this.$thumbOuter.remove();
this.core.$outer.removeClass('lg-has-thumb');
}};
$.fn.lightGallery.modules.Thumbnail=Thumbnail;
})();
}));
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof module==='object'&&module.exports){
module.exports=factory(require('jquery'));
}else{
factory(root["jQuery"]);
}}(this, function ($){
(function(){
'use strict';
var defaults={
videoMaxWidth: '855px',
autoplayFirstVideo: true,
youtubePlayerParams: false,
vimeoPlayerParams: false,
dailymotionPlayerParams: false,
vkPlayerParams: false,
videojs: false,
videojsOptions: {}};
var Video=function(element){
this.core=$(element).data('lightGallery');
this.$el=$(element);
this.core.s=$.extend({}, defaults, this.core.s);
this.videoLoaded=false;
this.init();
return this;
};
Video.prototype.init=function(){
var _this=this;
_this.core.$el.on('hasVideo.lg.tm', onHasVideo.bind(this));
_this.core.$el.on('onAferAppendSlide.lg.tm', onAferAppendSlide.bind(this));
if(_this.core.doCss()&&(_this.core.$items.length > 1)&&(_this.core.s.enableSwipe||_this.core.s.enableDrag)){
_this.core.$el.on('onSlideClick.lg.tm', function(){
var $el=_this.core.$slide.eq(_this.core.index);
_this.loadVideoOnclick($el);
});
}else{
_this.core.$slide.on('click.lg', function(){
_this.loadVideoOnclick($(this));
});
}
_this.core.$el.on('onBeforeSlide.lg.tm', onBeforeSlide.bind(this));
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex){
_this.core.$slide.eq(prevIndex).removeClass('lg-video-playing');
});
if(_this.core.s.autoplayFirstVideo){
_this.core.$el.on('onAferAppendSlide.lg.tm', function (e, index){
if(!_this.core.lGalleryOn){
var $el=_this.core.$slide.eq(index);
setTimeout(function (){
_this.loadVideoOnclick($el);
}, 100);
}});
}};
Video.prototype.loadVideo=function(src, addClass, noPoster, index, html){
var _this=this;
var video='';
var autoplay=1;
var a='';
var isVideo=this.core.isVideo(src, index)||{};
var videoTitle;
if(_this.core.s.dynamic){
videoTitle=_this.core.s.dynamicEl[_this.core.index].title;
}else{
videoTitle=_this.core.$items.eq(_this.core.index).attr('title')||_this.core.$items.eq(_this.core.index).find('img').first().attr('alt');
}
videoTitle=videoTitle ? 'title="' + videoTitle + '"':'';
if(noPoster){
if(this.videoLoaded){
autoplay=0;
}else{
autoplay=this.core.s.autoplayFirstVideo ? 1:0;
}}
if(isVideo.youtube){
a='?wmode=opaque&autoplay=' + autoplay + '&enablejsapi=1';
if(this.core.s.youtubePlayerParams){
a=a + '&' + $.param(this.core.s.youtubePlayerParams);
}
video='<iframe class="lg-video-object lg-youtube ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//www.youtube.com/embed/' + isVideo.youtube[1] + a + '" frameborder="0" allowfullscreen></iframe>';
}else if(isVideo.vimeo){
a='?autoplay=' + autoplay + '&api=1';
if(this.core.s.vimeoPlayerParams){
a=a + '&' + $.param(this.core.s.vimeoPlayerParams);
}
video='<iframe class="lg-video-object lg-vimeo ' + addClass + '" ' + videoTitle + ' width="560" height="315"  src="//player.vimeo.com/video/' + isVideo.vimeo[1] + a + '" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
}else if(isVideo.dailymotion){
a='?wmode=opaque&autoplay=' + autoplay + '&api=postMessage';
if(this.core.s.dailymotionPlayerParams){
a=a + '&' + $.param(this.core.s.dailymotionPlayerParams);
}
video='<iframe class="lg-video-object lg-dailymotion ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//www.dailymotion.com/embed/video/' + isVideo.dailymotion[1] + a + '" frameborder="0" allowfullscreen></iframe>';
}else if(isVideo.html5){
var fL=html.substring(0, 1);
if(fL==='.'||fL==='#'){
html=$(html).html();
}
video=html;
}else if(isVideo.vk){
a='&autoplay=' + autoplay;
if(this.core.s.vkPlayerParams){
a=a + '&' + $.param(this.core.s.vkPlayerParams);
}
video='<iframe class="lg-video-object lg-vk ' + addClass + '" ' + videoTitle + ' width="560" height="315" src="//vk.com/video_ext.php?' + isVideo.vk[1] + a + '" frameborder="0" allowfullscreen></iframe>';
}
return video;
};
Video.prototype.loadVideoOnclick=function($el){
var _this=this;
if($el.find('.lg-object').hasClass('lg-has-poster')&&$el.find('.lg-object').is(':visible')){
if(!$el.hasClass('lg-has-video')){
$el.addClass('lg-video-playing lg-has-video');
var _src;
var _html;
var _loadVideo=function(_src, _html){
$el.find('.lg-video').append(_this.loadVideo(_src, '', false, _this.core.index, _html));
if(_html){
if(_this.core.s.videojs){
try {
videojs(_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function(){
this.play();
});
} catch (e){
console.error('Make sure you have included videojs');
}}else{
_this.core.$slide.eq(_this.core.index).find('.lg-html5').get(0).play();
}}
};
if(_this.core.s.dynamic){
_src=_this.core.s.dynamicEl[_this.core.index].src;
_html=_this.core.s.dynamicEl[_this.core.index].html;
_loadVideo(_src, _html);
}else{
_src=_this.core.$items.eq(_this.core.index).attr('href')||_this.core.$items.eq(_this.core.index).attr('data-src');
_html=_this.core.$items.eq(_this.core.index).attr('data-html');
_loadVideo(_src, _html);
}
var $tempImg=$el.find('.lg-object');
$el.find('.lg-video').append($tempImg);
if(!$el.find('.lg-video-object').hasClass('lg-html5')){
$el.removeClass('lg-complete');
$el.find('.lg-video-object').on('load.lg error.lg', function(){
$el.addClass('lg-complete');
});
}}else{
var youtubePlayer=$el.find('.lg-youtube').get(0);
var vimeoPlayer=$el.find('.lg-vimeo').get(0);
var dailymotionPlayer=$el.find('.lg-dailymotion').get(0);
var html5Player=$el.find('.lg-html5').get(0);
if(youtubePlayer){
youtubePlayer.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
}else if(vimeoPlayer){
try {
$f(vimeoPlayer).api('play');
} catch (e){
console.error('Make sure you have included froogaloop2 js');
}}else if(dailymotionPlayer){
dailymotionPlayer.contentWindow.postMessage('play', '*');
}else if(html5Player){
if(_this.core.s.videojs){
try {
videojs(html5Player).play();
} catch (e){
console.error('Make sure you have included videojs');
}}else{
html5Player.play();
}}
$el.addClass('lg-video-playing');
}}
};
Video.prototype.destroy=function(){
this.videoLoaded=false;
};
function onHasVideo(event, index, src, html){
var _this=this;
_this.core.$slide.eq(index).find('.lg-video').append(_this.loadVideo(src, 'lg-object', true, index, html));
if(html){
if(_this.core.s.videojs){
try {
videojs(_this.core.$slide.eq(index).find('.lg-html5').get(0), _this.core.s.videojsOptions, function(){
if(!_this.videoLoaded&&_this.core.s.autoplayFirstVideo){
this.play();
}});
} catch (e){
console.error('Make sure you have included videojs');
}}else{
if(!_this.videoLoaded&&_this.core.s.autoplayFirstVideo){
_this.core.$slide.eq(index).find('.lg-html5').get(0).play();
}}
}}
function onAferAppendSlide(event, index){
var $videoCont=this.core.$slide.eq(index).find('.lg-video-cont');
if(!$videoCont.hasClass('lg-has-iframe')){
$videoCont.css('max-width', this.core.s.videoMaxWidth);
this.videoLoaded=true;
}}
function onBeforeSlide(event, prevIndex, index){
var _this=this;
var $videoSlide=_this.core.$slide.eq(prevIndex);
var youtubePlayer=$videoSlide.find('.lg-youtube').get(0);
var vimeoPlayer=$videoSlide.find('.lg-vimeo').get(0);
var dailymotionPlayer=$videoSlide.find('.lg-dailymotion').get(0);
var vkPlayer=$videoSlide.find('.lg-vk').get(0);
var html5Player=$videoSlide.find('.lg-html5').get(0);
if(youtubePlayer){
youtubePlayer.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
}else if(vimeoPlayer){
try {
$f(vimeoPlayer).api('pause');
} catch (e){
console.error('Make sure you have included froogaloop2 js');
}}else if(dailymotionPlayer){
dailymotionPlayer.contentWindow.postMessage('pause', '*');
}else if(html5Player){
if(_this.core.s.videojs){
try {
videojs(html5Player).pause();
} catch (e){
console.error('Make sure you have included videojs');
}}else{
html5Player.pause();
}} if(vkPlayer){
$(vkPlayer).attr('src', $(vkPlayer).attr('src').replace('&autoplay', '&noplay'));
}
var _src;
if(_this.core.s.dynamic){
_src=_this.core.s.dynamicEl[index].src;
}else{
_src=_this.core.$items.eq(index).attr('href')||_this.core.$items.eq(index).attr('data-src');
}
var _isVideo=_this.core.isVideo(_src, index)||{};
if(_isVideo.youtube||_isVideo.vimeo||_isVideo.dailymotion||_isVideo.vk){
_this.core.$outer.addClass('lg-hide-download');
}}
$.fn.lightGallery.modules.video=Video;
})();
}));
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof module==='object'&&module.exports){
module.exports=factory(require('jquery'));
}else{
factory(root["jQuery"]);
}}(this, function ($){
(function(){
'use strict';
var getUseLeft=function(){
var useLeft=false;
var isChrome=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
if(isChrome&&parseInt(isChrome[2], 10) < 54){
useLeft=true;
}
return useLeft;
};
var defaults={
scale: 1,
zoom: true,
actualSize: true,
enableZoomAfter: 300,
useLeftForZoom: getUseLeft()
};
var Zoom=function(element){
this.core=$(element).data('lightGallery');
this.core.s=$.extend({}, defaults, this.core.s);
if(this.core.s.zoom&&this.core.doCss()){
this.init();
this.zoomabletimeout=false;
this.pageX=$(window).width() / 2;
this.pageY=($(window).height() / 2) + $(window).scrollTop();
}
return this;
};
Zoom.prototype.init=function(){
var _this=this;
var zoomIcons='<button type="button" aria-label="Zoom in" id="lg-zoom-in" class="lg-icon"></button><button type="button" aria-label="Zoom out" id="lg-zoom-out" class="lg-icon"></button>';
if(_this.core.s.actualSize){
zoomIcons +='<button type="button" aria-label="Actual size" id="lg-actual-size" class="lg-icon"></button>';
}
if(_this.core.s.useLeftForZoom){
_this.core.$outer.addClass('lg-use-left-for-zoom');
}else{
_this.core.$outer.addClass('lg-use-transition-for-zoom');
}
this.core.$outer.find('.lg-toolbar').append(zoomIcons);
_this.core.$el.on('onSlideItemLoad.lg.tm.zoom', function(event, index, delay){
var _speed=_this.core.s.enableZoomAfter + delay;
if($('body').hasClass('lg-from-hash')&&delay){
_speed=0;
}else{
$('body').removeClass('lg-from-hash');
}
_this.zoomabletimeout=setTimeout(function(){
_this.core.$slide.eq(index).addClass('lg-zoomable');
}, _speed + 30);
});
var scale=1;
var zoom=function(scaleVal){
var $image=_this.core.$outer.find('.lg-current .lg-image');
var _x;
var _y;
var offsetX=($(window).width() - $image.prop('offsetWidth')) / 2;
var offsetY=(($(window).height() - $image.prop('offsetHeight')) / 2) + $(window).scrollTop();
_x=_this.pageX - offsetX;
_y=_this.pageY - offsetY;
var x=(scaleVal - 1) * (_x);
var y=(scaleVal - 1) * (_y);
$image.css('transform', 'scale3d(' + scaleVal + ', ' + scaleVal + ', 1)').attr('data-scale', scaleVal);
if(_this.core.s.useLeftForZoom){
$image.parent().css({
left: -x + 'px',
top: -y + 'px'
}).attr('data-x', x).attr('data-y', y);
}else{
$image.parent().css('transform', 'translate3d(-' + x + 'px, -' + y + 'px, 0)').attr('data-x', x).attr('data-y', y);
}};
var callScale=function(){
if(scale > 1){
_this.core.$outer.addClass('lg-zoomed');
}else{
_this.resetZoom();
}
if(scale < 1){
scale=1;
}
zoom(scale);
};
var actualSize=function(event, $image, index, fromIcon){
var w=$image.prop('offsetWidth');
var nw;
if(_this.core.s.dynamic){
nw=_this.core.s.dynamicEl[index].width||$image[0].naturalWidth||w;
}else{
nw=_this.core.$items.eq(index).attr('data-width')||$image[0].naturalWidth||w;
}
var _scale;
if(_this.core.$outer.hasClass('lg-zoomed')){
scale=1;
}else{
if(nw > w){
_scale=nw / w;
scale=_scale||2;
}}
if(fromIcon){
_this.pageX=$(window).width() / 2;
_this.pageY=($(window).height() / 2) + $(window).scrollTop();
}else{
_this.pageX=event.pageX||event.originalEvent.targetTouches[0].pageX;
_this.pageY=event.pageY||event.originalEvent.targetTouches[0].pageY;
}
callScale();
setTimeout(function(){
_this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
}, 10);
};
var tapped=false;
_this.core.$el.on('onAferAppendSlide.lg.tm.zoom', function(event, index){
var $image=_this.core.$slide.eq(index).find('.lg-image');
$image.on('dblclick', function(event){
actualSize(event, $image, index);
});
$image.on('touchstart', function(event){
if(!tapped){
tapped=setTimeout(function(){
tapped=null;
}, 300);
}else{
clearTimeout(tapped);
tapped=null;
actualSize(event, $image, index);
}
event.preventDefault();
});
});
$(window).on('resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom', function(){
_this.pageX=$(window).width() / 2;
_this.pageY=($(window).height() / 2) + $(window).scrollTop();
zoom(scale);
});
$('#lg-zoom-out').on('click.lg', function(){
if(_this.core.$outer.find('.lg-current .lg-image').length){
scale -=_this.core.s.scale;
callScale();
}});
$('#lg-zoom-in').on('click.lg', function(){
if(_this.core.$outer.find('.lg-current .lg-image').length){
scale +=_this.core.s.scale;
callScale();
}});
$('#lg-actual-size').on('click.lg', function(event){
actualSize(event, _this.core.$slide.eq(_this.core.index).find('.lg-image'), _this.core.index, true);
});
_this.core.$el.on('onBeforeSlide.lg.tm', function(){
scale=1;
_this.resetZoom();
});
_this.zoomDrag();
_this.zoomSwipe();
};
Zoom.prototype.getCurrentTransform=function (el){
if(!el){
return 0;
}
var st=window.getComputedStyle(el, null);
var tm=st.getPropertyValue('-webkit-transform') ||
st.getPropertyValue('-moz-transform') ||
st.getPropertyValue('-ms-transform') ||
st.getPropertyValue('-o-transform') ||
st.getPropertyValue('transform') ||
'none';
if(tm!=='none'){
return tm.split('(')[1].split(')')[0].split(',');
}
return 0;
};
Zoom.prototype.getCurrentRotation=function (el){
if(!el){
return 0;
}
var values=this.getCurrentTransform(el);
if(values){
return Math.round(Math.atan2(values[1], values[0]) * (180 / Math.PI));
}
return 0;
};
Zoom.prototype.getModifier=function (rotateValue, axis, el){
var originalRotate=rotateValue;
rotateValue=Math.abs(rotateValue);
var transformValues=this.getCurrentTransform(el);
if(!transformValues){
return 1;
}
var modifier=1;
if(axis==='X'){
var flipHorizontalValue=Math.sign(parseFloat(transformValues[0]));
if(rotateValue===0||rotateValue===180){
modifier=1;
}else if(rotateValue===90){
if((originalRotate===-90&&flipHorizontalValue===1)||(originalRotate===90&&flipHorizontalValue===-1)){
modifier=-1;
}else{
modifier=1;
}}
modifier=modifier * flipHorizontalValue;
}else{
var flipVerticalValue=Math.sign(parseFloat(transformValues[3]));
if(rotateValue===0||rotateValue===180){
modifier=1;
}else if(rotateValue===90){
var sinX=parseFloat(transformValues[1]);
var sinMinusX=parseFloat(transformValues[2]);
modifier=Math.sign(sinX * sinMinusX * originalRotate * flipVerticalValue);
}
modifier=modifier * flipVerticalValue;
}
return modifier;
};
Zoom.prototype.getImageSize=function ($image, rotateValue, axis){
var imageSizes={
y: 'offsetHeight',
x: 'offsetWidth'
};
if(rotateValue===90){
if(axis==='x'){
axis='y';
}else{
axis='x';
}}
return $image.prop(imageSizes[axis]);
};
Zoom.prototype.getDragCords=function (e, rotateValue){
if(rotateValue===90){
return {
x: e.pageY,
y: e.pageX
};}else{
return {
x: e.pageX,
y: e.pageY
};}};
Zoom.prototype.getSwipeCords=function (e, rotateValue){
var x=e.originalEvent.targetTouches[0].pageX;
var y=e.originalEvent.targetTouches[0].pageY;
if(rotateValue===90){
return {
x: y,
y: x
};}else{
return {
x: x,
y: y
};}};
Zoom.prototype.getPossibleDragCords=function ($image, rotateValue){
var minY=(this.core.$outer.find('.lg').height() - this.getImageSize($image, rotateValue, 'y')) / 2;
var maxY=Math.abs((this.getImageSize($image, rotateValue, 'y') * Math.abs($image.attr('data-scale'))) - this.core.$outer.find('.lg').height() + minY);
var minX=(this.core.$outer.find('.lg').width() - this.getImageSize($image, rotateValue, 'x')) / 2;
var maxX=Math.abs((this.getImageSize($image, rotateValue, 'x') * Math.abs($image.attr('data-scale'))) - this.core.$outer.find('.lg').width() + minX);
if(rotateValue===90){
return {
minY: minX,
maxY: maxX,
minX: minY,
maxX: maxY,
};}else{
return {
minY: minY,
maxY: maxY,
minX: minX,
maxX: maxX,
};}};
Zoom.prototype.getDragAllowedAxises=function ($image, rotateValue){
var allowY=this.getImageSize($image, rotateValue, 'y') * $image.attr('data-scale') > this.core.$outer.find('.lg').height();
var allowX=this.getImageSize($image, rotateValue, 'x') * $image.attr('data-scale') > this.core.$outer.find('.lg').width();
if(rotateValue===90){
return {
allowX: allowY,
allowY: allowX
};}else{
return {
allowX: allowX,
allowY: allowY
};}};
Zoom.prototype.resetZoom=function(){
this.core.$outer.removeClass('lg-zoomed');
this.core.$slide.find('.lg-img-wrap').removeAttr('style data-x data-y');
this.core.$slide.find('.lg-image').removeAttr('style data-scale');
this.pageX=$(window).width() / 2;
this.pageY=($(window).height() / 2) + $(window).scrollTop();
};
Zoom.prototype.zoomSwipe=function(){
var _this=this;
var startCoords={};
var endCoords={};
var isMoved=false;
var allowX=false;
var allowY=false;
var rotateValue=0;
var rotateEl;
_this.core.$slide.on('touchstart.lg', function(e){
if(_this.core.$outer.hasClass('lg-zoomed')){
var $image=_this.core.$slide.eq(_this.core.index).find('.lg-object');
rotateEl=_this.core.$slide.eq(_this.core.index).find('.lg-img-rotate')[0];
rotateValue=_this.getCurrentRotation(rotateEl);
var dragAllowedAxises=_this.getDragAllowedAxises($image, Math.abs(rotateValue));
allowY=dragAllowedAxises.allowY;
allowX=dragAllowedAxises.allowX;
if((allowX||allowY)){
e.preventDefault();
startCoords=_this.getSwipeCords(e, Math.abs(rotateValue));
}}
});
_this.core.$slide.on('touchmove.lg', function(e){
if(_this.core.$outer.hasClass('lg-zoomed')){
var _$el=_this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
var distanceX;
var distanceY;
e.preventDefault();
isMoved=true;
endCoords=_this.getSwipeCords(e, Math.abs(rotateValue));
_this.core.$outer.addClass('lg-zoom-dragging');
if(allowY){
distanceY=(-Math.abs(_$el.attr('data-y'))) + ((endCoords.y - startCoords.y) * _this.getModifier(rotateValue, 'Y', rotateEl));
}else{
distanceY=-Math.abs(_$el.attr('data-y'));
}
if(allowX){
distanceX=(-Math.abs(_$el.attr('data-x'))) + ((endCoords.x - startCoords.x) * _this.getModifier(rotateValue, 'X', rotateEl));
}else{
distanceX=-Math.abs(_$el.attr('data-x'));
}
if((Math.abs(endCoords.x - startCoords.x) > 15)||(Math.abs(endCoords.y - startCoords.y) > 15)){
if(_this.core.s.useLeftForZoom){
_$el.css({
left: distanceX + 'px',
top: distanceY + 'px'
});
}else{
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
}}
}});
_this.core.$slide.on('touchend.lg', function(){
if(_this.core.$outer.hasClass('lg-zoomed')){
if(isMoved){
isMoved=false;
_this.core.$outer.removeClass('lg-zoom-dragging');
_this.touchendZoom(startCoords, endCoords, allowX, allowY, rotateValue);
}}
});
};
Zoom.prototype.zoomDrag=function(){
var _this=this;
var startCoords={};
var endCoords={};
var isDraging=false;
var isMoved=false;
var allowX=false;
var allowY=false;
var rotateValue=0;
var rotateEl;
_this.core.$slide.on('mousedown.lg.zoom', function(e){
rotateEl=_this.core.$slide.eq(_this.core.index).find('.lg-img-rotate')[0];
rotateValue=_this.getCurrentRotation(rotateEl);
var $image=_this.core.$slide.eq(_this.core.index).find('.lg-object');
var dragAllowedAxises=_this.getDragAllowedAxises($image, Math.abs(rotateValue));
allowY=dragAllowedAxises.allowY;
allowX=dragAllowedAxises.allowX;
if(_this.core.$outer.hasClass('lg-zoomed')){
if($(e.target).hasClass('lg-object')&&(allowX||allowY)){
e.preventDefault();
startCoords=_this.getDragCords(e, Math.abs(rotateValue));
isDraging=true;
_this.core.$outer.scrollLeft +=1;
_this.core.$outer.scrollLeft -=1;
_this.core.$outer.removeClass('lg-grab').addClass('lg-grabbing');
}}
});
$(window).on('mousemove.lg.zoom', function(e){
if(isDraging){
var _$el=_this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
var distanceX;
var distanceY;
isMoved=true;
endCoords=_this.getDragCords(e, Math.abs(rotateValue));
_this.core.$outer.addClass('lg-zoom-dragging');
if(allowY){
distanceY=(-Math.abs(_$el.attr('data-y'))) + ((endCoords.y - startCoords.y) * _this.getModifier(rotateValue, 'Y', rotateEl));
}else{
distanceY=-Math.abs(_$el.attr('data-y'));
}
if(allowX){
distanceX=(-Math.abs(_$el.attr('data-x'))) + ((endCoords.x - startCoords.x) * _this.getModifier(rotateValue, 'X', rotateEl));
}else{
distanceX=-Math.abs(_$el.attr('data-x'));
}
if(_this.core.s.useLeftForZoom){
_$el.css({
left: distanceX + 'px',
top: distanceY + 'px'
});
}else{
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
}}
});
$(window).on('mouseup.lg.zoom', function(e){
if(isDraging){
isDraging=false;
_this.core.$outer.removeClass('lg-zoom-dragging');
if(isMoved&&((startCoords.x!==endCoords.x)||(startCoords.y!==endCoords.y))){
endCoords=_this.getDragCords(e, Math.abs(rotateValue));
_this.touchendZoom(startCoords, endCoords, allowX, allowY, rotateValue);
}
isMoved=false;
}
_this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
});
};
Zoom.prototype.touchendZoom=function(startCoords, endCoords, allowX, allowY, rotateValue){
var _this=this;
var _$el=_this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
var $image=_this.core.$slide.eq(_this.core.index).find('.lg-object');
var rotateEl=_this.core.$slide.eq(_this.core.index).find('.lg-img-rotate')[0];
var distanceX=(-Math.abs(_$el.attr('data-x'))) + ((endCoords.x - startCoords.x) * _this.getModifier(rotateValue, 'X', rotateEl));
var distanceY=(-Math.abs(_$el.attr('data-y'))) + ((endCoords.y - startCoords.y) * _this.getModifier(rotateValue, 'Y', rotateEl));
var possibleDragCords=_this.getPossibleDragCords($image, Math.abs(rotateValue));
if((Math.abs(endCoords.x - startCoords.x) > 15)||(Math.abs(endCoords.y - startCoords.y) > 15)){
if(allowY){
if(distanceY <=-possibleDragCords.maxY){
distanceY=-possibleDragCords.maxY;
}else if(distanceY >=-possibleDragCords.minY){
distanceY=-possibleDragCords.minY;
}}
if(allowX){
if(distanceX <=-possibleDragCords.maxX){
distanceX=-possibleDragCords.maxX;
}else if(distanceX >=-possibleDragCords.minX){
distanceX=-possibleDragCords.minX;
}}
if(allowY){
_$el.attr('data-y', Math.abs(distanceY));
}else{
distanceY=-Math.abs(_$el.attr('data-y'));
}
if(allowX){
_$el.attr('data-x', Math.abs(distanceX));
}else{
distanceX=-Math.abs(_$el.attr('data-x'));
}
if(_this.core.s.useLeftForZoom){
_$el.css({
left: distanceX + 'px',
top: distanceY + 'px'
});
}else{
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
}}
};
Zoom.prototype.destroy=function(){
var _this=this;
_this.core.$el.off('.lg.zoom');
$(window).off('.lg.zoom');
_this.core.$slide.off('.lg.zoom');
_this.core.$el.off('.lg.tm.zoom');
_this.resetZoom();
clearTimeout(_this.zoomabletimeout);
_this.zoomabletimeout=false;
};
$.fn.lightGallery.modules.zoom=Zoom;
})();
}));
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof exports==='object'){
module.exports=factory(require('jquery'));
}else{
factory(jQuery);
}}(this, function ($){
(function(){
'use strict';
var defaults={
hash: true
};
var Hash=function(element){
this.core=$(element).data('lightGallery');
this.core.s=$.extend({}, defaults, this.core.s);
if(this.core.s.hash){
this.oldHash=window.location.hash;
this.init();
}
return this;
};
Hash.prototype.init=function(){
var _this=this;
var _hash;
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index){
if(history.replaceState){
history.replaceState(null, null, window.location.pathname + window.location.search + '#lg=' + _this.core.s.galleryId + '&slide=' + index);
}else{
window.location.hash='lg=' + _this.core.s.galleryId + '&slide=' + index;
}});
$(window).on('hashchange.lg.hash', function(){
_hash=window.location.hash;
var _idx=parseInt(_hash.split('&slide=')[1], 10);
if((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)){
_this.core.slide(_idx, false, false);
}else if(_this.core.lGalleryOn){
_this.core.destroy();
}});
};
Hash.prototype.destroy=function(){
if(!this.core.s.hash){
return;
}
if(this.oldHash&&this.oldHash.indexOf('lg=' + this.core.s.galleryId) < 0){
if(history.replaceState){
history.replaceState(null, null, this.oldHash);
}else{
window.location.hash=this.oldHash;
}}else{
if(history.replaceState){
history.replaceState(null, document.title, window.location.pathname + window.location.search);
}else{
window.location.hash='';
}}
this.core.$el.off('.lg.hash');
};
$.fn.lightGallery.modules.hash=Hash;
})();
}));
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof module==='object'&&module.exports){
module.exports=factory(require('jquery'));
}else{
factory(root["jQuery"]);
}}(this, function ($){
(function(){
'use strict';
var defaults={
share: true,
facebook: true,
facebookDropdownText: 'Facebook',
twitter: true,
twitterDropdownText: 'Twitter',
pinterest: true,
pinterestDropdownText: 'Pinterest'
};
var Share=function(element){
this.core=$(element).data('lightGallery');
this.core.s=$.extend({}, defaults, this.core.s);
if(this.core.s.share){
this.init();
}
return this;
};
Share.prototype.init=function(){
var _this=this;
var shareHtml='<button type="button" aria-label="Share" id="lg-share" class="lg-icon" aria-haspopup="true" aria-expanded="false">' +
'<ul class="lg-dropdown" style="position: absolute;">';
shareHtml +=_this.core.s.facebook ? '<li><a id="lg-share-facebook" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.facebookDropdownText + '</span></a></li>':'';
shareHtml +=_this.core.s.twitter ? '<li><a id="lg-share-twitter" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.twitterDropdownText + '</span></a></li>':'';
shareHtml +=_this.core.s.pinterest ? '<li><a id="lg-share-pinterest" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.pinterestDropdownText + '</span></a></li>':'';
shareHtml +='</ul></button>';
this.core.$outer.find('.lg-toolbar').append(shareHtml);
this.core.$outer.find('.lg').append('<div id="lg-dropdown-overlay"></div>');
$('#lg-share').on('click.lg', function(){
_this.core.$outer.toggleClass('lg-dropdown-active');
var ariaExpanded=$('#lg-share').attr('aria-expanded');
$('#lg-share').attr('aria-expanded', ariaExpanded==='true' ? false: true);
});
$('#lg-dropdown-overlay').on('click.lg', function(){
_this.core.$outer.removeClass('lg-dropdown-active');
$('#lg-share').attr('aria-expanded', false);
});
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index){
setTimeout(function(){
$('#lg-share-facebook').attr('href', 'https://www.facebook.com/sharer/sharer.php?u=' + (encodeURIComponent(_this.getSahreProps(index, 'facebookShareUrl')||window.location.href)));
$('#lg-share-twitter').attr('href', 'https://twitter.com/intent/tweet?text=' + _this.getSahreProps(index, 'tweetText') + '&url=' + (encodeURIComponent(_this.getSahreProps(index, 'twitterShareUrl')||window.location.href)));
$('#lg-share-pinterest').attr('href', 'http://www.pinterest.com/pin/create/button/?url=' + (encodeURIComponent(_this.getSahreProps(index, 'pinterestShareUrl')||window.location.href)) + '&media=' + encodeURIComponent(_this.getSahreProps(index, 'src')) + '&description=' + _this.getSahreProps(index, 'pinterestText'));
}, 100);
});
};
Share.prototype.getSahreProps=function(index, prop){
var shareProp='';
if(this.core.s.dynamic){
shareProp=this.core.s.dynamicEl[index][prop];
}else{
var _href=this.core.$items.eq(index).attr('href');
var _prop=this.core.$items.eq(index).data(prop);
shareProp=prop==='src' ? _href||_prop:_prop;
}
return shareProp;
};
Share.prototype.destroy=function(){
};
$.fn.lightGallery.modules.share=Share;
})();
}));
(function (root, factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], function (a0){
return (factory(a0));
});
}else if(typeof module==='object'&&module.exports){
module.exports=factory(require('jquery'));
}else{
factory(root["jQuery"]);
}}(this, function ($){
(function (){
'use strict';
var defaults={
rotate: true,
rotateLeft: true,
rotateRight: true,
flipHorizontal: true,
flipVertical: true,
};
var Rotate=function (element){
this.core=$(element).data('lightGallery');
this.core.s=$.extend({}, defaults, this.core.s);
if(this.core.s.rotate&&this.core.doCss()){
this.init();
}
return this;
};
Rotate.prototype.buildTemplates=function (){
var rotateIcons='';
if(this.core.s.flipVertical){
rotateIcons +='<button aria-label="Flip vertical" class="lg-flip-ver lg-icon"></button>';
}
if(this.core.s.flipHorizontal){
rotateIcons +='<button aria-label="flip horizontal" class="lg-flip-hor lg-icon"></button>';
}
if(this.core.s.rotateLeft){
rotateIcons +='<button aria-label="Rotate left" class="lg-rotate-left lg-icon"></button>';
}
if(this.core.s.rotateRight){
rotateIcons +='<button aria-label="Rotate right" class="lg-rotate-right lg-icon"></button>';
}
this.core.$outer.find('.lg-toolbar').append(rotateIcons);
};
Rotate.prototype.init=function (){
var _this=this;
this.buildTemplates();
this.rotateValuesList={};
this.core.$el.on('onAferAppendSlide.lg.tm.rotate', function (event, index){
var $imageWrap=_this.core.$slide.eq(index).find('.lg-img-wrap');
$imageWrap.wrap('<div class="lg-img-rotate"></div>');
});
this.core.$outer
.find('.lg-rotate-left')
.on('click.lg', this.rotateLeft.bind(this));
this.core.$outer
.find('.lg-rotate-right')
.on('click.lg', this.rotateRight.bind(this));
this.core.$outer
.find('.lg-flip-hor')
.on('click.lg', this.flipHorizontal.bind(this));
this.core.$outer
.find('.lg-flip-ver')
.on('click.lg', this.flipVertical.bind(this));
this.core.$el.on('onBeforeSlide.lg.tm.rotate', function (event, prevIndex, index){
if(!_this.rotateValuesList[index]){
_this.rotateValuesList[index]={
rotate: 0,
flipHorizontal: 1,
flipVertical: 1,
};}});
};
Rotate.prototype.applyStyles=function (){
var $image=this.core.$slide.eq(this.core.index).find('.lg-img-rotate');
$image.css('transform',
'rotate(' + this.rotateValuesList[this.core.index].rotate + 'deg)' +
' scale3d(' + this.rotateValuesList[this.core.index].flipHorizontal +
', ' + this.rotateValuesList[this.core.index].flipVertical + ', 1)'
);
};
Rotate.prototype.getCurrentRotation=function (el){
if(!el){
return 0;
}
var st=window.getComputedStyle(el, null);
var tm=st.getPropertyValue('-webkit-transform') ||
st.getPropertyValue('-moz-transform') ||
st.getPropertyValue('-ms-transform') ||
st.getPropertyValue('-o-transform') ||
st.getPropertyValue('transform') ||
'none';
if(tm!=='none'){
var values=tm.split('(')[1].split(')')[0].split(',');
if(values){
var angle=Math.round(Math.atan2(values[1], values[0]) * (180 / Math.PI));
return (angle < 0 ? angle + 360:angle);
}}
return 0;
};
Rotate.prototype.rotateLeft=function (){
this.rotateValuesList[this.core.index].rotate -=90;
this.applyStyles();
};
Rotate.prototype.rotateRight=function (){
this.rotateValuesList[this.core.index].rotate +=90;
this.applyStyles();
};
Rotate.prototype.flipHorizontal=function (){
var $image=this.core.$slide.eq(this.core.index).find('.lg-img-rotate')[0];
var currentRotation=this.getCurrentRotation($image);
var rotateAxis='flipHorizontal';
if(currentRotation===90||currentRotation===270){
rotateAxis='flipVertical';
}
this.rotateValuesList[this.core.index][rotateAxis] *=-1;
this.applyStyles();
};
Rotate.prototype.flipVertical=function (){
var $image=this.core.$slide.eq(this.core.index).find('.lg-img-rotate')[0];
var currentRotation=this.getCurrentRotation($image);
var rotateAxis='flipVertical';
if(currentRotation===90||currentRotation===270){
rotateAxis='flipHorizontal';
}
this.rotateValuesList[this.core.index][rotateAxis] *=-1;
this.applyStyles();
};
Rotate.prototype.destroy=function (){
this.core.$el.off('.lg.tm.rotate');
this.rotateValuesList={};};
$.fn.lightGallery.modules.rotate=Rotate;
})();
}));
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});
!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){var o=0,n=i[o];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];n;){var r=s&&s[n];r&&(this.off(t,n),delete s[n]),n.apply(this,e),o+=r?0:1,n=i[o]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return 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 http://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);s.isBoxSizeOuter=r=200==t(n.width),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,I=a.borderTopWidth+a.borderBottomWidth,z=d&&r,x=t(s.width);x!==!1&&(a.width=x+(z?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(z?0:y+I)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+I),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},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"object"==typeof t&&"number"==typeof t.length)for(var i=0;i<t.length;i++)e.push(t[i]);else e.push(t);return e},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){var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];t&&clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i||100)}},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 o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var s=i.toDashed(n),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(o&&o.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,n,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=this.layout.size,r=o.indexOf("%")!=-1?parseFloat(o)/100*s.width:parseInt(o,10),a=n.indexOf("%")!=-1?parseFloat(n)/100*s.height:parseInt(n,10);r=isNaN(r)?0:r,a=isNaN(a)?0:a,r-=e?s.paddingLeft:s.paddingRight,a-=i?s.paddingTop:s.paddingBottom,this.position.x=r,this.position.y=a},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=parseInt(t,10),s=parseInt(e,10),r=n===this.position.x&&s===this.position.y;if(this.setPosition(t,e),r&&!this.isTransitioning)return void this.layoutPosition();var a=t-i,u=e-o,h={};h.transform=this.getTranslate(a,u),this.transition({to:h,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=parseInt(t,10),this.position.y=parseInt(e,10)},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/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/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/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/js/layout-modes/masonry",["../layout-mode","masonry/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/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/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/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/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/js/item"),require("isotope/js/layout-mode"),require("isotope/js/layout-modes/masonry"),require("isotope/js/layout-modes/fit-rows"),require("isotope/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(){var t,e,n,i,o,r=function(t,e){return function(){return t.apply(e,arguments)}},s=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};e=function(){function t(){}return t.prototype.extend=function(t,e){var n,i;for(n in e)i=e[n],null==t[n]&&(t[n]=i);return t},t.prototype.isMobile=function(t){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)},t.prototype.createEvent=function(t,e,n,i){var o;return null==e&&(e=!1),null==n&&(n=!1),null==i&&(i=null),null!=document.createEvent?(o=document.createEvent("CustomEvent")).initCustomEvent(t,e,n,i):null!=document.createEventObject?(o=document.createEventObject(),o.eventType=t):o.eventName=t,o},t.prototype.emitEvent=function(t,e){return null!=t.dispatchEvent?t.dispatchEvent(e):e in(null!=t)?t[e]():"on"+e in(null!=t)?t["on"+e]():void 0},t.prototype.addEvent=function(t,e,n){return null!=t.addEventListener?t.addEventListener(e,n,!1):null!=t.attachEvent?t.attachEvent("on"+e,n):t[e]=n},t.prototype.removeEvent=function(t,e,n){return null!=t.removeEventListener?t.removeEventListener(e,n,!1):null!=t.detachEvent?t.detachEvent("on"+e,n):delete t[e]},t.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},t}(),n=this.WeakMap||this.MozWeakMap||(n=function(){function t(){this.keys=[],this.values=[]}return t.prototype.get=function(t){var e,n,i,o;for(e=n=0,i=(o=this.keys).length;i>n;e=++n)if(o[e]===t)return this.values[e]},t.prototype.set=function(t,e){var n,i,o,r;for(n=i=0,o=(r=this.keys).length;o>i;n=++i)if(r[n]===t)return void(this.values[n]=e);return this.keys.push(t),this.values.push(e)},t}()),t=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(t=function(){function t(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return t.notSupported=!0,t.prototype.observe=function(){},t}()),i=this.getComputedStyle||function(t,e){return this.getPropertyValue=function(e){var n;return"float"===e&&(e="styleFloat"),o.test(e)&&e.replace(o,function(t,e){return e.toUpperCase()}),(null!=(n=t.currentStyle)?n[e]:void 0)||null},this},o=/(\-([a-z]){1})/g,this.WOW=function(){function o(t){null==t&&(t={}),this.scrollCallback=r(this.scrollCallback,this),this.scrollHandler=r(this.scrollHandler,this),this.resetAnimation=r(this.resetAnimation,this),this.start=r(this.start,this),this.scrolled=!0,this.config=this.util().extend(t,this.defaults),null!=t.scrollContainer&&(this.config.scrollContainer=document.querySelector(t.scrollContainer)),this.animationNameCache=new n,this.wowEvent=this.util().createEvent(this.config.boxClass)}return o.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},o.prototype.init=function(){var t;return this.element=window.document.documentElement,"interactive"===(t=document.readyState)||"complete"===t?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},o.prototype.start=function(){var e,n,i,o;if(this.stopped=!1,this.boxes=function(){var t,n,i,o;for(o=[],t=0,n=(i=this.element.querySelectorAll("."+this.config.boxClass)).length;n>t;t++)e=i[t],o.push(e);return o}.call(this),this.all=function(){var t,n,i,o;for(o=[],t=0,n=(i=this.boxes).length;n>t;t++)e=i[t],o.push(e);return o}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(o=this.boxes,n=0,i=o.length;i>n;n++)e=o[n],this.applyStyle(e,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new t(function(t){return function(e){var n,i,o,r,s;for(s=[],n=0,i=e.length;i>n;n++)r=e[n],s.push(function(){var t,e,n,i;for(i=[],t=0,e=(n=r.addedNodes||[]).length;e>t;t++)o=n[t],i.push(this.doSync(o));return i}.call(t));return s}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},o.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},o.prototype.sync=function(e){return t.notSupported?this.doSync(this.element):void 0},o.prototype.doSync=function(t){var e,n,i,o,r;if(null==t&&(t=this.element),1===t.nodeType){for(r=[],n=0,i=(o=(t=t.parentNode||t).querySelectorAll("."+this.config.boxClass)).length;i>n;n++)e=o[n],s.call(this.all,e)<0?(this.boxes.push(e),this.all.push(e),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(e,!0),r.push(this.scrolled=!0)):r.push(void 0);return r}},o.prototype.show=function(t){return this.applyStyle(t),t.className=t.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(t),this.util().emitEvent(t,this.wowEvent),this.util().addEvent(t,"animationend",this.resetAnimation),this.util().addEvent(t,"oanimationend",this.resetAnimation),this.util().addEvent(t,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(t,"MSAnimationEnd",this.resetAnimation),t},o.prototype.applyStyle=function(t,e){var n,i,o;return i=t.getAttribute("data-wow-duration"),n=t.getAttribute("data-wow-delay"),o=t.getAttribute("data-wow-iteration"),this.animate(function(r){return function(){return r.customStyle(t,e,i,n,o)}}(this))},o.prototype.animate="requestAnimationFrame"in window?function(t){return window.requestAnimationFrame(t)}:function(t){return t()},o.prototype.resetStyle=function(){var t,e,n,i,o;for(o=[],e=0,n=(i=this.boxes).length;n>e;e++)t=i[e],o.push(t.style.visibility="visible");return o},o.prototype.resetAnimation=function(t){var e;return t.type.toLowerCase().indexOf("animationend")>=0?(e=t.target||t.srcElement,e.className=e.className.replace(this.config.animateClass,"").trim()):void 0},o.prototype.customStyle=function(t,e,n,i,o){return e&&this.cacheAnimationName(t),t.style.visibility=e?"hidden":"visible",n&&this.vendorSet(t.style,{animationDuration:n}),i&&this.vendorSet(t.style,{animationDelay:i}),o&&this.vendorSet(t.style,{animationIterationCount:o}),this.vendorSet(t.style,{animationName:e?"none":this.cachedAnimationName(t)}),t},o.prototype.vendors=["moz","webkit"],o.prototype.vendorSet=function(t,e){var n,i,o,r;i=[];for(n in e)o=e[n],t[""+n]=o,i.push(function(){var e,i,s,l;for(l=[],e=0,i=(s=this.vendors).length;i>e;e++)r=s[e],l.push(t[""+r+n.charAt(0).toUpperCase()+n.substr(1)]=o);return l}.call(this));return i},o.prototype.vendorCSS=function(t,e){var n,o,r,s,l,a;for(s=(l=i(t)).getPropertyCSSValue(e),n=0,o=(r=this.vendors).length;o>n;n++)a=r[n],s=s||l.getPropertyCSSValue("-"+a+"-"+e);return s},o.prototype.animationName=function(t){var e;try{e=this.vendorCSS(t,"animation-name").cssText}catch(n){e=i(t).getPropertyValue("animation-name")}return"none"===e?"":e},o.prototype.cacheAnimationName=function(t){return this.animationNameCache.set(t,this.animationName(t))},o.prototype.cachedAnimationName=function(t){return this.animationNameCache.get(t)},o.prototype.scrollHandler=function(){return this.scrolled=!0},o.prototype.scrollCallback=function(){var t;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var e,n,i,o;for(o=[],e=0,n=(i=this.boxes).length;n>e;e++)(t=i[e])&&(this.isVisible(t)?this.show(t):o.push(t));return o}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},o.prototype.offsetTop=function(t){for(var e;void 0===t.offsetTop;)t=t.parentNode;for(e=t.offsetTop;t=t.offsetParent;)e+=t.offsetTop;return e},o.prototype.isVisible=function(t){var e,n,i,o,r;return n=t.getAttribute("data-wow-offset")||this.config.offset,r=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,o=r+Math.min(this.element.clientHeight,this.util().innerHeight())-n,i=this.offsetTop(t),e=i+t.clientHeight,o>=i&&e>=r},o.prototype.util=function(){return null!=this._util?this._util:this._util=new e},o.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},o.prototype.removeBox=function(t){var e=this.boxes.indexOf(t);e>-1&&this.boxes.splice(e,1)},o}()}).call(this);
(function($){
"use strict";
var $window=$(window);
$('#preloader').fadeOut('normall', function(){
$(this).remove();
});
$window.on('scroll', function(){
var scroll=$window.scrollTop();
if(scroll <=175){
$("header").removeClass("scrollHeader").addClass("fixedHeader");
}else{
$("header").removeClass("fixedHeader").addClass("scrollHeader");
}});
$window.on('scroll', function(){
if($(this).scrollTop() > 500){
$(".scroll-to-top").fadeIn(400);
}else{
$(".scroll-to-top").fadeOut(400);
}});
$(".scroll-to-top").on('click', function(event){
event.preventDefault();
$("html, body").animate({
scrollTop: 0
}, 600);
});
var pageSection=$(".parallax,.bg-img");
pageSection.each(function(indx){
if($(this).attr("data-background")){
$(this).css("background-image", "url(" + $(this).data("background") + ")");
}});
var wow=new WOW({
boxClass: 'wow',
animateClass: 'animated',
offset: 0,
mobile: false,
live: true
})
wow.init();
$('.story-video').magnificPopup({
delegate: '.video',
type: 'iframe'
});
$('.source-modal').magnificPopup({
type: 'inline',
mainClass: 'mfp-fade',
removalDelay: 160
});
$('.current-year').text(new Date().getFullYear());
$window.resize(function(event){
setTimeout(function(){
SetResizeContent();
}, 500);
event.preventDefault();
});
function fullScreenHeight(){
var element=$(".full-screen");
var $minheight=$window.height();
element.css('min-height', $minheight);
}
function ScreenFixedHeight(){
var $headerHeight=$("header").height();
var element=$(".screen-height");
var $screenheight=$window.height() - $headerHeight;
element.css('height', $screenheight);
}
function SetResizeContent(){
fullScreenHeight();
ScreenFixedHeight();
if($(window).width() < 992){
$(".navbar-nav .dropdown-menu.sub-menu").css("display", "none");
}}
SetResizeContent();
$(document).ready(function(){
$('.testimonial-carousel1').owlCarousel({
loop: true,
responsiveClass: true,
autoplay: true,
smartSpeed: 1500,
nav: false,
dots: false,
thumbs: true,
thumbsPrerendered: true,
center:false,
margin: 50,
responsive: {
0: {
items: 1,
margin: 0
},
768: {
items: 1
},
992: {
items: 1
},
1200: {
items: 1
}}
});
$('.testimonial-carousel2').owlCarousel({
loop: true,
responsiveClass: true,
autoplay: true,
smartSpeed: 1500,
nav: false,
dots: true,
thumbs: false,
thumbsPrerendered: true,
center:false,
margin: 30,
responsive: {
0: {
items: 1
},
992: {
items: 2
}}
});
$('.testimonial-carousel3').owlCarousel({
loop: true,
responsiveClass: true,
autoplay: true,
autoplayTimeout: 5000,
smartSpeed: 1500,
nav: false,
dots: false,
thumbs: false,
thumbsPrerendered: false,
center:false,
margin: 50,
items: 1
});
$('.portfolio-carousel').owlCarousel({
loop: true,
responsiveClass: true,
autoplay: true,
autoplayTimeout: 5000,
smartSpeed: 1500,
nav: false,
dots: true,
center:false,
margin: 30,
responsive: {
0: {
items: 1
},
576: {
items: 2
},
768: {
items: 3
},
992: {
items: 3
},
1200: {
items: 3
}}
});
$('.portfolio-carousel2').owlCarousel({
loop: true,
responsiveClass: true,
autoplay: true,
autoplayTimeout: 5000,
smartSpeed: 1500,
nav: false,
dots: false,
center:false,
margin: 0,
responsive: {
0: {
items: 1
},
576: {
items: 2
},
768: {
items: 2
},
992: {
items: 3
},
1400: {
items: 3
}}
});
$('.client-carousel').owlCarousel({
loop: true,
responsiveClass: true,
autoplay: true,
autoplayTimeout: 5000,
smartSpeed: 1500,
nav: false,
dots: false,
center:false,
margin: 30,
responsive: {
0: {
items: 1
},
481: {
items: 2
},
768: {
items: 3
},
992: {
items: 4
},
1200:{
items: 6
}}
});
$('.client-carousel2').owlCarousel({
loop: true,
responsiveClass: true,
autoplay: true,
autoplayTimeout: 5000,
smartSpeed: 1500,
nav: false,
dots: false,
center:false,
margin: 30,
responsive: {
0: {
items: 1
},
481: {
items: 2
},
768: {
items: 3
},
992: {
items: 4
},
1200: {
items: 5,
margin: 40
},
1400:{
items: 6,
margin: 40
}}
});
$('.why-choose-carousel').owlCarousel({
loop: true,
responsiveClass: true,
autoplay: true,
smartSpeed: 900,
nav: false,
dots: true,
center: false,
margin: 30,
responsive: {
0: {
items: 1
},
768: {
items: 2
},
1200: {
items: 3
}}
});
$('.slider-fade').owlCarousel({
items: 1,
loop:true,
dots: true,
margin: 0,
nav: false,
navText: ["<span class='ti-arrow-left'></span>", "<span class='ti-arrow-right'></span>"],
autoplay: true,
smartSpeed:1500,
mouseDrag:true,
animateIn: 'fadeIn',
animateOut: 'fadeOut',
responsive: {
992: {
nav: true,
dots: false
}}
});
$('.owl-carousel').owlCarousel({
items: 1,
loop:true,
dots: false,
margin: 0,
autoplay:true,
smartSpeed:500
});
var owl=$('.slider-fade');
owl.on('changed.owl.carousel', function(event){
var item=event.item.index - 2;
$('span').removeClass('animated fadeInUp');
$('h1').removeClass('animated fadeInUp');
$('p').removeClass('animated fadeInUp');
$('a').removeClass('animated fadeInUp');
$('.owl-item').not('.cloned').eq(item).find('span').addClass('animated fadeInUp');
$('.owl-item').not('.cloned').eq(item).find('h1').addClass('animated fadeInUp');
$('.owl-item').not('.cloned').eq(item).find('p').addClass('animated fadeInUp');
$('.owl-item').not('.cloned').eq(item).find('a').addClass('animated fadeInUp');
});
if($(".horizontaltab").length!==0){
$('.horizontaltab').easyResponsiveTabs({
type: 'default',
width: 'auto',
fit: true,
tabidentify: 'hor_1',
activate: function(event){
var $tab=$(this);
var $info=$('#nested-tabInfo');
var $name=$('span', $info);
$name.text($tab.text());
$info.show();
}});
}
$('.countup').counterUp({
delay: 25,
time: 2000
});
$(".countdown").countdown({
date: "01 Nov 2025 00:01:00",
format: "on"
});
$(".navbar-nav li.has-sub").removeClass("active");
if($(".cursor-helper").length){
var cursor=document.querySelector('.cursor-helper-outer');
var cursorinner=document.querySelector('.cursor-helper-inner');
var a=document.querySelectorAll('a');
var footer=document.querySelectorAll('footer');
var owlcarousel=document.querySelectorAll('.owl-carousel');
document.addEventListener('mousemove', function (e){
var x=e.clientX;
var y=e.clientY;
cursor.style.transform=`translate3d(calc(${e.clientX}px - 50%), calc(${e.clientY}px - 50%), 0)`
});
document.addEventListener('mousemove', function (e){
var x=e.clientX;
var y=e.clientY;
cursorinner.style.left=x + 'px';
cursorinner.style.top=y + 'px';
});
document.addEventListener('mousedown', function (){
cursor.classList.add('click');
cursorinner.classList.add('cursor-helper-innerhover')
});
document.addEventListener('mouseup', function (){
cursor.classList.remove('click')
cursorinner.classList.remove('cursor-helper-innerhover')
});
a.forEach(item=> {
item.addEventListener('mouseover', ()=> {
cursor.classList.add('cursor-link');
});
item.addEventListener('mouseleave', ()=> {
cursor.classList.remove('cursor-link');
});
});
footer.forEach(item=> {
item.addEventListener('mouseover', ()=> {
cursor.classList.add('cursor-light');
});
item.addEventListener('mouseleave', ()=> {
cursor.classList.remove('cursor-light');
});
});
owlcarousel.forEach(item=> {
item.addEventListener('mouseover', ()=> {
cursor.classList.add('cursor-slider');
});
item.addEventListener('mouseleave', ()=> {
cursor.classList.remove('cursor-slider');
});
});
}});
$window.on("load", function(){
var $PortfolioGallery=$('.portfolio-gallery-isotope').isotope({
});
$('.filtering').on('click', 'span', function(){
var filterValue=$(this).attr('data-filter');
$PortfolioGallery.isotope({
filter: filterValue
});
});
$('.filtering').on('click', 'span', function(){
$(this).addClass('active').siblings().removeClass('active');
});
$('.portfolio-gallery,.portfolio-gallery-isotope').lightGallery();
$('.portfolio-link').on('click', (e)=> {
e.stopPropagation();
});
});
})(jQuery);
jQuery(document).ready(function(e){ jQuery('.whatsappBtn').on('click',function(event){	jQuery('.whChatSec').toggleClass('wh-active');	jQuery('.whTxt').toggleClass('downTooltip'); });jQuery('.whtCls').on('click',function(){	jQuery('.whChatSec').removeClass('wh-active'); });if($(window).width() > 993){ $.fn.scrollEnd=function(callback, timeout){ jQuery(this).scroll(function(){ var $this=jQuery(this); if($this.data('scrollTimeout')){ clearTimeout($this.data('scrollTimeout')); } $this.data('scrollTimeout', setTimeout(callback,timeout)); });}; jQuery(window).scroll(function(){ jQuery('.whatsappBtn').addClass('wh-close'); });jQuery(window).scrollEnd(function(){ jQuery('.whatsappBtn').removeClass('wh-close'); }, 1800); };});
var PUM,PUM_Accessibility,PUM_Analytics,pm_cookie,pm_cookie_json,pm_remove_cookie;!function(i){"use strict";void 0===i.fn.on&&(i.fn.on=function(e,o,t){return this.delegate(o,e,t)}),void 0===i.fn.off&&(i.fn.off=function(e,o,t){return this.undelegate(o,e,t)}),void 0===i.fn.bindFirst&&(i.fn.bindFirst=function(e,o){var t=i(this);t.unbind(e,o),t.bind(e,o),(t=(o=i._data(t[0]).events)[e]).unshift(t.pop()),o[e]=t}),void 0===i.fn.outerHtml&&(i.fn.outerHtml=function(){var e=i(this).clone();return i("<div/>").append(e).html()}),void 0===i.fn.isInViewport&&(i.fn.isInViewport=function(){var e=i(this).offset().top,o=e+i(this).outerHeight(),t=i(window).scrollTop(),n=t+i(window).height();return t<o&&e<n}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery),function(a,r,s){"use strict";function n(e,o){function t(e,o,t){return o?e[o.slice(0,t?-1:o.length)]:e}return o.split(".").reduce(function(e,o){return o?o.split("[").reduce(t,e):e},e)}window.pum_vars=window.pum_vars||{default_theme:"0",home_url:"/",version:1.7,pm_dir_url:"",ajaxurl:"",restapi:!1,analytics_api:!1,rest_nonce:null,debug_mode:!1,disable_tracking:!0,message_position:"top",core_sub_forms_enabled:!0,popups:{}},window.pum_popups=window.pum_popups||{},window.pum_vars.popups=window.pum_popups,PUM={get:new function(){function e(e,o,t){"boolean"==typeof o&&(t=o,o=!1);var n=o?o.selector+" "+e:e;return s!==i[n]&&!t||(i[n]=o?o.find(e):jQuery(e)),i[n]}var i={};return e.elementCache=i,e},getPopup:function(e){var o;return o=e,(e=isNaN(o)||parseInt(Number(o))!==parseInt(o)||isNaN(parseInt(o,10))?"current"===e?PUM.get(".pum-overlay.pum-active:eq(0)",!0):"open"===e?PUM.get(".pum-overlay.pum-active",!0):"closed"===e?PUM.get(".pum-overlay:not(.pum-active)",!0):e instanceof jQuery?e:a(e):PUM.get("#pum-"+e)).hasClass("pum-overlay")?e:e.hasClass("popmake")||e.parents(".pum-overlay").length?e.parents(".pum-overlay"):a()},open:function(e,o){PUM.getPopup(e).popmake("open",o)},close:function(e,o){PUM.getPopup(e).popmake("close",o)},preventOpen:function(e){PUM.getPopup(e).addClass("preventOpen")},getSettings:function(e){return PUM.getPopup(e).popmake("getSettings")},getSetting:function(e,o,t){o=n(PUM.getSettings(e),o);return void 0!==o?o:t!==s?t:null},checkConditions:function(e){return PUM.getPopup(e).popmake("checkConditions")},getCookie:function(e){return a.pm_cookie(e)},getJSONCookie:function(e){return a.pm_cookie_json(e)},setCookie:function(e,o){PUM.getPopup(e).popmake("setCookie",jQuery.extend({name:"pum-"+PUM.getSetting(e,"id"),expires:"+30 days"},o))},clearCookie:function(e,o){a.pm_remove_cookie(e),"function"==typeof o&&o()},clearCookies:function(e,o){var t,n=PUM.getPopup(e).popmake("getSettings").cookies;if(n!==s&&n.length)for(t=0;n.length>t;t+=1)a.pm_remove_cookie(n[t].settings.name);"function"==typeof o&&o()},getClickTriggerSelector:function(e,o){var t=PUM.getPopup(e),e=PUM.getSettings(e),e=[".popmake-"+e.id,".popmake-"+decodeURIComponent(e.slug),'a[href$="#popmake-'+e.id+'"]'];return o.extra_selectors&&""!==o.extra_selectors&&e.push(o.extra_selectors),(e=pum.hooks.applyFilters("pum.trigger.click_open.selectors",e,o,t)).join(", ")},disableClickTriggers:function(e,o){if(e!==s)if(o!==s){var t=PUM.getClickTriggerSelector(e,o);a(t).removeClass("pum-trigger"),a(r).off("click.pumTrigger click.popmakeOpen",t)}else{var n=PUM.getSetting(e,"triggers",[]);if(n.length)for(var i=0;n.length>i;i++)-1!==pum.hooks.applyFilters("pum.disableClickTriggers.clickTriggerTypes",["click_open"]).indexOf(n[i].type)&&(t=PUM.getClickTriggerSelector(e,n[i].settings),a(t).removeClass("pum-trigger"),a(r).off("click.pumTrigger click.popmakeOpen",t))}},actions:{stopIframeVideosPlaying:function(){var e=PUM.getPopup(this),o=e.popmake("getContainer");e.hasClass("pum-has-videos")||(o.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var e=a(this),o=e.attr("src"),t=o.replace("autoplay=1","1=1");t!==o&&(o=t),e.prop("src",o)}),o.find("video").each(function(){this.pause()}))}}},a.fn.popmake=function(e){return a.fn.popmake.methods[e]?(a(r).trigger("pumMethodCall",arguments),a.fn.popmake.methods[e].apply(this,Array.prototype.slice.call(arguments,1))):"object"!=typeof e&&e?void(window.console&&console.warn("Method "+e+" does not exist on $.fn.popmake")):a.fn.popmake.methods.init.apply(this,arguments)},a.fn.popmake.methods={init:function(){return this.each(function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings");return t.theme_id<=0&&(t.theme_id=pum_vars.default_theme),t.disable_reposition!==s&&t.disable_reposition||a(window).on("resize",function(){(o.hasClass("pum-active")||o.find(".popmake.active").length)&&a.fn.popmake.utilities.throttle(setTimeout(function(){o.popmake("reposition")},25),500,!1)}),o.find(".pum-container").data("popmake",t),o.data("popmake",t).trigger("pumInit"),t.open_sound&&"none"!==t.open_sound&&((e="custom"!==t.open_sound?new Audio(pum_vars.pm_dir_url+"assets/sounds/"+t.open_sound):new Audio(t.custom_sound)).addEventListener("canplaythrough",function(){o.data("popAudio",e)}),e.addEventListener("error",function(){console.warn("Error occurred when trying to load Popup opening sound.")}),e.load()),this})},getOverlay:function(){return PUM.getPopup(this)},getContainer:function(){return PUM.getPopup(this).find(".pum-container")},getTitle:function(){return PUM.getPopup(this).find(".pum-title")||null},getContent:function(){return PUM.getPopup(this).find(".pum-content")||null},getClose:function(){return PUM.getPopup(this).find(".pum-content + .pum-close")||null},getSettings:function(){var e=PUM.getPopup(this);return a.extend(!0,{},a.fn.popmake.defaults,e.data("popmake")||{},"object"==typeof pum_popups&&void 0!==pum_popups[e.attr("id")]?pum_popups[e.attr("id")]:{})},state:function(e){var o=PUM.getPopup(this);if(s!==e)switch(e){case"isOpen":return o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active");case"isClosed":return!o.hasClass("pum-open")&&!o.popmake("getContainer").hasClass("active")}},open:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer"),n=o.popmake("getClose"),i=o.popmake("getSettings"),r=a("html");return o.trigger("pumBeforeOpen"),o.hasClass("preventOpen")||t.hasClass("preventOpen")?(console.log("prevented"),o.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented")):(i.stackable||o.popmake("close_all"),o.addClass("pum-active"),0<i.close_button_delay&&n.fadeOut(0),r.addClass("pum-open"),i.overlay_disabled?r.addClass("pum-open-overlay-disabled"):r.addClass("pum-open-overlay"),i.position_fixed?r.addClass("pum-open-fixed"):r.addClass("pum-open-scrollable"),o.popmake("setup_close").popmake("reposition").popmake("animate",i.animation_type,function(){0<i.close_button_delay&&setTimeout(function(){n.fadeIn()},i.close_button_delay),o.trigger("pumAfterOpen"),a(window).trigger("resize"),a.fn.popmake.last_open_popup=o,e!==s&&e()}),void 0!==o.data("popAudio")&&o.data("popAudio").play().catch(function(e){console.warn("Sound was not able to play when popup opened. Reason: "+e)})),this},setup_close:function(){var t=PUM.getPopup(this),e=t.popmake("getClose"),n=t.popmake("getSettings");return(e=e.add(a(".popmake-close, .pum-close",t).not(e))).off("click.pum").on("click.pum",function(e){var o=a(this);o.hasClass("pum-do-default")||o.data("do-default")!==s&&o.data("do-default")||e.preventDefault(),a.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(n.close_on_esc_press||n.close_on_f4_press)&&a(window).off("keyup.popmake").on("keyup.popmake",function(e){27===e.keyCode&&n.close_on_esc_press&&(a.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===e.keyCode&&n.close_on_f4_press&&(a.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),n.close_on_overlay_click&&(t.on("pumAfterOpen",function(){a(r).on("click.pumCloseOverlay",function(e){a(e.target).closest(".pum-container").length||(a.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))})}),t.on("pumAfterClose",function(){a(r).off("click.pumCloseOverlay")})),n.close_on_form_submission&&PUM.hooks.addAction("pum.integration.form.success",function(e,o){o.popup&&o.popup[0]===t[0]&&setTimeout(function(){a.fn.popmake.last_close_trigger="Form Submission",t.popmake("close")},n.close_on_form_submission_delay||0)}),t.trigger("pumSetupClose"),this},close:function(n){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getContainer"),t=(t=e.popmake("getClose")).add(a(".popmake-close, .pum-close",e).not(t));return e.trigger("pumBeforeClose"),e.hasClass("preventClose")||o.hasClass("preventClose")?e.removeClass("preventClose").trigger("pumClosePrevented"):o.fadeOut("fast",function(){e.is(":visible")&&e.fadeOut("fast"),a(window).off("keyup.popmake"),e.off("click.popmake"),t.off("click.popmake"),1===a(".pum-active").length&&a("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),e.removeClass("pum-active").trigger("pumAfterClose"),n!==s&&n()}),this})},close_all:function(){return a(".pum-active").popmake("close"),this},reposition:function(e){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),t=o.popmake("getContainer"),n=o.popmake("getSettings"),i=n.location,r={my:"",at:"",of:window,collision:"none",using:"function"==typeof e?e:a.fn.popmake.callbacks.reposition_using},e={overlay:null,container:null},s=null;try{s=a(a.fn.popmake.last_open_trigger)}catch(e){s=a()}return n.position_from_trigger&&s.length?(r.of=s,0<=i.indexOf("left")&&(r.my+=" right",r.at+=" left"+(0!==n.position_left?"-"+n.position_left:"")),0<=i.indexOf("right")&&(r.my+=" left",r.at+=" right"+(0!==n.position_right?"+"+n.position_right:"")),0<=i.indexOf("center")&&(r.my="center"===i?"center":r.my+" center",r.at="center"===i?"center":r.at+" center"),0<=i.indexOf("top")&&(r.my+=" bottom",r.at+=" top"+(0!==n.position_top?"-"+n.position_top:"")),0<=i.indexOf("bottom")&&(r.my+=" top",r.at+=" bottom"+(0!==n.position_bottom?"+"+n.position_bottom:""))):(0<=i.indexOf("left")&&(r.my+=" left"+(0!==n.position_left?"+"+n.position_left:""),r.at+=" left"),0<=i.indexOf("right")&&(r.my+=" right"+(0!==n.position_right?"-"+n.position_right:""),r.at+=" right"),0<=i.indexOf("center")&&(r.my="center"===i?"center":r.my+" center",r.at="center"===i?"center":r.at+" center"),0<=i.indexOf("top")&&(r.my+=" top"+(0!==n.position_top?"+"+(a("body").hasClass("admin-bar")?parseInt(n.position_top,10)+32:n.position_top):""),r.at+=" top"),0<=i.indexOf("bottom")&&(r.my+=" bottom"+(0!==n.position_bottom?"-"+n.position_bottom:""),r.at+=" bottom")),r.my=a.trim(r.my),r.at=a.trim(r.at),o.is(":hidden")&&(e.overlay=o.css("opacity"),o.css({opacity:0}).show(0)),t.is(":hidden")&&(e.container=t.css("opacity"),t.css({opacity:0}).show(0)),n.position_fixed&&t.addClass("fixed"),"custom"===n.size?t.css({width:n.custom_width,height:n.custom_height_auto?"auto":n.custom_height}):"auto"!==n.size&&t.addClass("responsive").css({minWidth:""!==n.responsive_min_width?n.responsive_min_width:"auto",maxWidth:""!==n.responsive_max_width?n.responsive_max_width:"auto"}),o.trigger("pumAfterReposition"),t.addClass("custom-position").position(r).trigger("popmakeAfterReposition"),"center"===i&&t[0].offsetTop<0&&t.css({top:a("body").hasClass("admin-bar")?42:10}),e.overlay&&o.css({opacity:e.overlay}).hide(0),e.container&&t.css({opacity:e.container}).hide(0),this},animation_origin:function(e){var o=PUM.getPopup(this).popmake("getContainer"),t={my:"",at:""};switch(e){case"top":t={my:"left+"+o.offset().left+" bottom-100",at:"left top"};break;case"bottom":t={my:"left+"+o.offset().left+" top+100",at:"left bottom"};break;case"left":t={my:"right top+"+o.offset().top,at:"left top"};break;case"right":t={my:"left top+"+o.offset().top,at:"right top"};break;default:0<=e.indexOf("left")&&(t={my:t.my+" right",at:t.at+" left"}),0<=e.indexOf("right")&&(t={my:t.my+" left",at:t.at+" right"}),0<=e.indexOf("center")&&(t={my:t.my+" center",at:t.at+" center"}),0<=e.indexOf("top")&&(t={my:t.my+" bottom-100",at:t.at+" top"}),(t=0<=e.indexOf("bottom")?{my:t.my+" top+100",at:t.at+" bottom"}:t).my=a.trim(t.my),t.at=a.trim(t.at)}return t.of=window,t.collision="none",t}}}(jQuery,document),function(e){"use strict";e.fn.popmake.version=1.8,e.fn.popmake.last_open_popup=null,window.ajaxurl=window.pum_vars.ajaxurl,window.PUM.init=function(){console.log("init popups ✔"),e(void 0).trigger("pumBeforeInit"),e(".pum").popmake(),e(void 0).trigger("pumInitialized"),"object"==typeof pum_vars.form_success&&(pum_vars.form_success=e.extend({popup_id:null,settings:{}}),PUM.forms.success(pum_vars.form_success.popup_id,pum_vars.form_success.settings)),PUM.integrations.init()},e(function(){var e=PUM.hooks.applyFilters("pum.initHandler",PUM.init),o=PUM.hooks.applyFilters("pum.initPromises",[]);Promise.all(o).then(e)}),e(".pum").on("pumInit",function(){var e=PUM.getPopup(this),o=PUM.getSetting(e,"id"),e=e.find("form");e.length&&e.append('<input type="hidden" name="pum_form_popup_id" value="'+o+'" />')}).on("pumAfterClose",window.PUM.actions.stopIframeVideosPlaying)}(jQuery),function(i,t){"use strict";var n,r,s="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",e=".pum:not(.pum-accessibility-disabled)";PUM_Accessibility={forceFocus:function(e){r&&r.length&&!r[0].contains(e.target)&&(e.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(e){var o,t,n;9===e.keyCode&&(o=r.find(".pum-container *").filter(s).filter(":visible"),n=i(":focus"),t=o.length,n=o.index(n),e.shiftKey?0===n&&(o.get(t-1).focus(),e.preventDefault()):n===t-1&&(o.get(0).focus(),e.preventDefault()))},setFocusToFirstItem:function(){r.find(".pum-container *").filter(s).filter(":visible").first().focus()},initiateFocusLock:function(){var e=PUM.getPopup(this),o=i(":focus");e.has(o).length||(n=o),r=e.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey),i(t).one("focusin.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}},i(t).on("pumInit",e,function(){PUM.getPopup(this).find("[tabindex]").each(function(){var e=i(this);e.data("tabindex",e.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",e,function(){}).on("pumAfterOpen",e,PUM_Accessibility.initiateFocusLock).on("pumAfterOpen",e,function(){var e=PUM.getPopup(this);r=e.attr("aria-modal","true")}).on("pumBeforeClose",e,function(){}).on("pumAfterClose",e,function(){PUM.getPopup(this).off("keydown.pum_accessibility").attr("aria-modal","false"),void 0!==n&&n.length&&n.focus(),r=null,i(t).off("focusin.pum_accessibility")}).on("pumSetupClose",e,function(){}).on("pumOpenPrevented",e,function(){}).on("pumClosePrevented",e,function(){}).on("pumBeforeReposition",e,function(){})}(jQuery,document),function(i){"use strict";i.fn.popmake.last_open_trigger=null,i.fn.popmake.last_close_trigger=null,i.fn.popmake.conversion_trigger=null;var r=!(void 0===pum_vars.analytics_api||!pum_vars.analytics_api);PUM_Analytics={beacon:function(e,o){var t=new Image,n=r?pum_vars.analytics_api:pum_vars.ajaxurl,o={route:pum.hooks.applyFilters("pum.analyticsBeaconRoute","/"+pum_vars.analytics_route+"/"),data:pum.hooks.applyFilters("pum.AnalyticsBeaconData",i.extend(!0,{event:"open",pid:null,_cache:+new Date},e)),callback:"function"==typeof o?o:function(){}};r?n+=o.route:o.data.action="pum_analytics",n&&(i(t).on("error success load done",o.callback),t.src=n+"?"+i.param(o.data))}},void 0!==pum_vars.disable_tracking&&pum_vars.disable_tracking||void 0!==pum_vars.disable_core_tracking&&pum_vars.disable_core_tracking||(i(document).on("pumAfterOpen.core_analytics",".pum",function(){var e=PUM.getPopup(this),e={pid:parseInt(e.popmake("getSettings").id,10)||null};0<e.pid&&!i("body").hasClass("single-popup")&&PUM_Analytics.beacon(e)}),i(function(){PUM.hooks.addAction("pum.integration.form.success",function(e,o){!1!==o.ajax&&(0===o.popup.length||0<(o={pid:parseInt(o.popup.popmake("getSettings").id,10)||null,event:"conversion"}).pid&&!i("body").hasClass("single-popup")&&PUM_Analytics.beacon(o))})}))}(jQuery),function(n,r){"use strict";function s(e){var o=e.popmake("getContainer"),t={display:"",opacity:""};e.css(t),o.css(t)}function a(e){return e.overlay_disabled?0:e.animation_speed/2}function p(e){return e.overlay_disabled?parseInt(e.animation_speed):e.animation_speed/2}n.fn.popmake.methods.animate_overlay=function(e,o,t){return PUM.getPopup(this).popmake("getSettings").overlay_disabled?n.fn.popmake.overlay_animations.none.apply(this,[o,t]):n.fn.popmake.overlay_animations[e]?n.fn.popmake.overlay_animations[e].apply(this,[o,t]):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.methods.animate=function(e){return n.fn.popmake.animations[e]?n.fn.popmake.animations[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.animations={none:function(e){var o=PUM.getPopup(this);return o.popmake("getContainer").css({opacity:1,display:"block"}),o.popmake("animate_overlay","none",0,function(){e!==r&&e()}),this},slide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=e.popmake("animation_origin",n.animation_origin);return s(e),t.position(i),e.popmake("animate_overlay","fade",a(n),function(){t.popmake("reposition",function(e){t.animate(e,p(n),"swing",function(){o!==r&&o()})})}),this},fade:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer"),n=o.popmake("getSettings");return s(o),o.css({opacity:0,display:"block"}),t.css({opacity:0,display:"block"}),o.popmake("animate_overlay","fade",a(n),function(){t.animate({opacity:1},p(n),"swing",function(){e!==r&&e()})}),this},fadeAndSlide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=e.popmake("animation_origin",n.animation_origin);return s(e),e.css({display:"block",opacity:0}),t.css({display:"block",opacity:0}),t.position(i),e.popmake("animate_overlay","fade",a(n),function(){t.popmake("reposition",function(e){e.opacity=1,t.animate(e,p(n),"swing",function(){o!==r&&o()})})}),this},grow:function(e){return n.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(e){return n.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},n.fn.popmake.overlay_animations={none:function(e,o){PUM.getPopup(this).css({opacity:1,display:"block"}),"function"==typeof o&&o()},fade:function(e,o){PUM.getPopup(this).css({opacity:0,display:"block"}).animate({opacity:1},e,"swing",o)},slide:function(e,o){PUM.getPopup(this).slideDown(e,o)}}}(jQuery,void document),function(e,o){"use strict";e(o).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(o){"use strict";o.fn.popmake.callbacks={reposition_using:function(e){o(this).css(e)}}}(jQuery,document),function(p){"use strict";function u(){return e=void 0===e?"undefined"!=typeof MobileDetect?new MobileDetect(window.navigator.userAgent):{phone:function(){return!1},tablet:function(){return!1}}:e}var e;p.extend(p.fn.popmake.methods,{checkConditions:function(){var e,o,t,n,i,r=PUM.getPopup(this),s=r.popmake("getSettings"),a=!0;if(s.disable_on_mobile&&u().phone())return!1;if(s.disable_on_tablet&&u().tablet())return!1;if(s.conditions.length)for(o=0;s.conditions.length>o;o++){for(n=s.conditions[o],e=!1,t=0;n.length>t;t++)if("boolean"!=typeof n[t]){if((!(i=p.extend({},{not_operand:!1},n[t])).not_operand&&r.popmake("checkCondition",i)||i.not_operand&&!r.popmake("checkCondition",i))&&(e=!0),p(this).trigger("pumCheckingCondition",[e,i]),e)break}else if(n[t]){e=!0;break}e||(a=!1)}return a},checkCondition:function(e){var o=e.target||null;e.settings;return o?p.fn.popmake.conditions[o]?p.fn.popmake.conditions[o].apply(this,[e]):window.console?(console.warn("Condition "+o+" does not exist."),!0):void 0:(console.warn("Condition type not set."),!1)}}),p.fn.popmake.conditions=p.fn.popmake.conditions||{}}(jQuery,document),function(c){"use strict";function d(e,o,t){var n,i=new Date;if("undefined"!=typeof document){if(1<arguments.length){switch(typeof(t=c.extend({path:pum_vars.home_url},d.defaults,t)).expires){case"number":i.setMilliseconds(i.getMilliseconds()+864e5*t.expires),t.expires=i;break;case"string":i.setTime(1e3*c.fn.popmake.utilities.strtotime("+"+t.expires)),t.expires=i}try{n=JSON.stringify(o),/^[\{\[]/.test(n)&&(o=n)}catch(e){}return o=f.write?f.write(o,e):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",o,t.expires?"; expires="+t.expires.toUTCString():"",t.path?"; path="+t.path:"",t.domain?"; domain="+t.domain:"",t.secure?"; secure":""].join("")}e||(n={});for(var r=document.cookie?document.cookie.split("; "):[],s=/(%[0-9A-Z]{2})+/g,a=0;a<r.length;a++){var p=r[a].split("=");'"'===(l=p.slice(1).join("=")).charAt(0)&&(l=l.slice(1,-1));try{var u=p[0].replace(s,decodeURIComponent),l=f.read?f.read(l,u):f(l,u)||l.replace(s,decodeURIComponent);if(this.json)try{l=JSON.parse(l)}catch(e){}if(e===u){n=l;break}e||(n[u]=l)}catch(e){}}return n}}var f;c.extend(c.fn.popmake,{cookie:(void 0===f&&(f=function(){}),(d.set=d).get=function(e){return d.call(d,e)},d.getJSON=function(){return d.apply({json:!0},[].slice.call(arguments))},d.defaults={domain:pum_vars.cookie_domain||""},d.remove=function(e,o){d(e,"",c.extend({},o,{expires:-1,path:""})),d(e,"",c.extend({},o,{expires:-1}))},d.process=function(e,o,t,n){return d.apply(d,3<arguments.length&&"object"!=typeof t&&void 0!==o?[e,o,{expires:t,path:n}]:[].slice.call(arguments,[0,2]))},d.withConverter=c.fn.popmake.cookie,d)}),pm_cookie=c.pm_cookie=c.fn.popmake.cookie.process,pm_cookie_json=c.pm_cookie_json=c.fn.popmake.cookie.getJSON,pm_remove_cookie=c.pm_remove_cookie=c.fn.popmake.cookie.remove}(jQuery),function(i,e,n){"use strict";function r(e){i.pm_cookie(e.name,!0,e.session?null:e.time,e.path?pum_vars.home_url||"/":null),pum.hooks.doAction("popmake.setCookie",e)}i.extend(i.fn.popmake.methods,{addCookie:function(e){return pum.hooks.doAction("popmake.addCookie",arguments),i.fn.popmake.cookies[e]?i.fn.popmake.cookies[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+e+" does not exist."),this)},setCookie:r,checkCookies:function(e){var o,t=!1;if(e.cookie_name===n||null===e.cookie_name||""===e.cookie_name)return!1;switch(typeof e.cookie_name){case"object":case"array":for(o=0;e.cookie_name.length>o;o+=1)i.pm_cookie(e.cookie_name[o])!==n&&(t=!0);break;case"string":i.pm_cookie(e.cookie_name)!==n&&(t=!0)}return pum.hooks.doAction("popmake.checkCookies",e,t),t}}),i.fn.popmake.cookies=i.fn.popmake.cookies||{},i.extend(i.fn.popmake.cookies,{on_popup_open:function(e){var o=PUM.getPopup(this);o.on("pumAfterOpen",function(){o.popmake("setCookie",e)})},on_popup_close:function(e){var o=PUM.getPopup(this);o.on("pumBeforeClose",function(){o.popmake("setCookie",e)})},form_submission:function(t){var n=PUM.getPopup(this);t=i.extend({form:"",formInstanceId:"",only_in_popup:!1},t),PUM.hooks.addAction("pum.integration.form.success",function(e,o){t.form.length&&PUM.integrations.checkFormKeyMatches(t.form,t.formInstanceId,o)&&(t.only_in_popup&&o.popup.length&&o.popup.is(n)||!t.only_in_popup)&&n.popmake("setCookie",t)})},manual:function(e){var o=PUM.getPopup(this);o.on("pumSetCookie",function(){o.popmake("setCookie",e)})},form_success:function(e){var o=PUM.getPopup(this);o.on("pumFormSuccess",function(){o.popmake("setCookie",e)})},pum_sub_form_success:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},pum_sub_form_already_subscribed:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},ninja_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)},cf7_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)},gforms_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)}}),i(e).on("pumInit",".pum",function(){var e,o,t=PUM.getPopup(this),n=t.popmake("getSettings").cookies||[];if(n.length)for(o=0;o<n.length;o+=1)e=n[o],t.popmake("addCookie",e.event,e.settings)}),i(function(){var e=i(".pum-cookie");e.each(function(){var o=i(this),t=e.index(o),n=o.data("cookie-args");!o.data("only-onscreen")||o.isInViewport()&&o.is(":visible")?r(n):i(window).on("scroll.pum-cookie-"+t,i.fn.popmake.utilities.throttle(function(e){o.isInViewport()&&o.is(":visible")&&(r(n),i(window).off("scroll.pum-cookie-"+t))},100))})})}(jQuery,document);var pum_debug,pum_debug_mode=!1;!function(s,e){var a,o,p;e=window.pum_vars||{debug_mode:!1},(pum_debug_mode=!(pum_debug_mode=void 0!==e.debug_mode&&e.debug_mode)&&-1!==window.location.href.indexOf("pum_debug")?!0:pum_debug_mode)&&(o=a=!1,p=window.pum_debug_vars||{debug_mode_enabled:"Popup Maker: Debug Mode Enabled",debug_started_at:"Debug started at:",debug_more_info:"For more information on how to use this information visit https://docs.wppopupmaker.com/?utm_medium=js-debug-info&utm_campaign=contextual-help&utm_source=browser-console&utm_content=more-info",global_info:"Global Information",localized_vars:"Localized variables",popups_initializing:"Popups Initializing",popups_initialized:"Popups Initialized",single_popup_label:"Popup: #",theme_id:"Theme ID: ",label_method_call:"Method Call:",label_method_args:"Method Arguments:",label_popup_settings:"Settings",label_triggers:"Triggers",label_cookies:"Cookies",label_delay:"Delay:",label_conditions:"Conditions",label_cookie:"Cookie:",label_settings:"Settings:",label_selector:"Selector:",label_mobile_disabled:"Mobile Disabled:",label_tablet_disabled:"Tablet Disabled:",label_event:"Event: %s",triggers:[],cookies:[]},pum_debug={odump:function(e){return s.extend({},e)},logo:function(){console.log(" -------------------------------------------------------------\n|  ____                           __  __       _              |\n| |  _ \\ ___  _ __  _   _ _ __   |  \\/  | __ _| | _____ _ __  |\n| | |_) / _ \\| '_ \\| | | | '_ \\  | |\\/| |/ _` | |/ / _ \\ '__| |\n| |  __/ (_) | |_) | |_| | |_) | | |  | | (_| |   <  __/ |    |\n| |_|   \\___/| .__/ \\__,_| .__/  |_|  |_|\\__,_|_|\\_\\___|_|    |\n|            |_|         |_|                                  |\n -------------------------------------------------------------")},initialize:function(){a=!0,pum_debug.logo(),console.debug(p.debug_mode_enabled),console.log(p.debug_started_at,new Date),console.info(p.debug_more_info),pum_debug.divider(p.global_info),console.groupCollapsed(p.localized_vars),console.log("pum_vars:",pum_debug.odump(e)),s(document).trigger("pum_debug_initialize_localized_vars"),console.groupEnd(),s(document).trigger("pum_debug_initialize")},popup_event_header:function(e){e=e.popmake("getSettings");o!==e.id&&(o=e.id,pum_debug.divider(p.single_popup_label+e.id+" - "+e.slug))},divider:function(e){try{var o,t=0,n=" "+new Array(63).join("-")+" ",i=e;"string"==typeof e?(o=62-(i=62<e.length?i.substring(0,62):i).length,(t={left:Math.floor(o/2),right:Math.floor(o/2)}).left+t.right===o-1&&t.right++,t.left=new Array(t.left+1).join(" "),t.right=new Array(t.right+1).join(" "),console.log(n+"\n|"+t.left+i+t.right+"|\n"+n)):console.log(n)}catch(e){console.error("Got a '"+e+"' when printing out the heading divider to the console.")}},click_trigger:function(e,o){var t=e.popmake("getSettings"),t=[".popmake-"+t.id,".popmake-"+decodeURIComponent(t.slug),'a[href$="#popmake-'+t.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&t.push(o.extra_selectors),t=(t=pum.hooks.applyFilters("pum.trigger.click_open.selectors",t,o,e)).join(", "),console.log(p.label_selector,t)},trigger:function(e,o){if("string"==typeof p.triggers[o.type]){switch(console.groupCollapsed(p.triggers[o.type]),o.type){case"auto_open":console.log(p.label_delay,o.settings.delay),console.log(p.label_cookie,o.settings.cookie_name);break;case"click_open":pum_debug.click_trigger(e,o.settings),console.log(p.label_cookie,o.settings.cookie_name)}s(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}},cookie:function(e,o){if("string"==typeof p.cookies[o.event]){switch(console.groupCollapsed(p.cookies[o.event]),o.event){case"on_popup_open":case"on_popup_close":case"manual":case"ninja_form_success":console.log(p.label_cookie,pum_debug.odump(o.settings))}s(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}}},s(document).on("pumInit",".pum",function(){var e=PUM.getPopup(s(this)),o=e.popmake("getSettings"),t=o.triggers||[],n=o.cookies||[],i=o.conditions||[],r=0;if(a||(pum_debug.initialize(),pum_debug.divider(p.popups_initializing)),console.groupCollapsed(p.single_popup_label+o.id+" - "+o.slug),console.log(p.theme_id,o.theme_id),t.length){for(console.groupCollapsed(p.label_triggers),r=0;r<t.length;r++)pum_debug.trigger(e,t[r]);console.groupEnd()}if(n.length){for(console.groupCollapsed(p.label_cookies),r=0;r<n.length;r+=1)pum_debug.cookie(e,n[r]);console.groupEnd()}i.length&&(console.groupCollapsed(p.label_conditions),console.log(i),console.groupEnd()),console.groupCollapsed(p.label_popup_settings),console.log(p.label_mobile_disabled,!1!==o.disable_on_mobile),console.log(p.label_tablet_disabled,!1!==o.disable_on_tablet),console.log(p.label_display_settings,pum_debug.odump(o)),e.trigger("pum_debug_popup_settings"),console.groupEnd(),console.groupEnd()}).on("pumBeforeOpen",".pum",function(){var e=PUM.getPopup(s(this)),o=s.fn.popmake.last_open_trigger;pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeOpen"));try{o=(o=s(s.fn.popmake.last_open_trigger)).length?o:s.fn.popmake.last_open_trigger.toString()}catch(e){o=""}finally{console.log(p.label_triggers,[o])}console.groupEnd()}).on("pumOpenPrevented",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumOpenPrevented")),console.groupEnd()}).on("pumAfterOpen",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterOpen")),console.groupEnd()}).on("pumSetupClose",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumSetupClose")),console.groupEnd()}).on("pumClosePrevented",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumClosePrevented")),console.groupEnd()}).on("pumBeforeClose",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeClose")),console.groupEnd()}).on("pumAfterClose",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterClose")),console.groupEnd()}).on("pumBeforeReposition",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeReposition")),console.groupEnd()}).on("pumAfterReposition",".pum",function(){var e=PUM.getPopup(s(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterReposition")),console.groupEnd()}).on("pumCheckingCondition",".pum",function(e,o,t){var n=PUM.getPopup(s(this));pum_debug.popup_event_header(n),console.groupCollapsed(p.label_event.replace("%s","pumCheckingCondition")),console.log((t.not_operand?"(!) ":"")+t.target+": "+o,t),console.groupEnd()}))}(jQuery),function(e){"use strict";e.fn.popmake.defaults={id:null,slug:"",theme_id:null,cookies:[],triggers:[],conditions:[],mobile_disabled:null,tablet_disabled:null,custom_height_auto:!1,scrollable_content:!1,position_from_trigger:!1,position_fixed:!1,overlay_disabled:!1,stackable:!1,disable_reposition:!1,close_on_overlay_click:!1,close_on_form_submission:!1,close_on_form_submission_delay:0,close_on_esc_press:!1,close_on_f4_press:!1,disable_on_mobile:!1,disable_on_tablet:!1,size:"medium",responsive_min_width:"0%",responsive_max_width:"100%",custom_width:"640px",custom_height:"380px",animation_type:"fade",animation_speed:"350",animation_origin:"center top",location:"center top",position_top:"100",position_bottom:"0",position_left:"0",position_right:"0",zindex:"1999999999",close_button_delay:"0",meta:{display:{stackable:!1,overlay_disabled:!1,size:"medium",responsive_max_width:"100",responsive_max_width_unit:"%",responsive_min_width:"0",responsive_min_width_unit:"%",custom_width:"640",custom_width_unit:"px",custom_height:"380",custom_height_unit:"px",custom_height_auto:!1,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:!1,animation_type:"fade",animation_speed:350,animation_origin:"center top",scrollable_content:!1,disable_reposition:!1,position_from_trigger:!1,overlay_zindex:!1,zindex:"1999999999"},close:{overlay_click:!1,esc_press:!1,f4_press:!1,text:"",button_delay:0},click_open:[]},container:{active_class:"active",attr:{class:"popmake"}},title:{attr:{class:"popmake-title"}},content:{attr:{class:"popmake-content"}},close:{close_speed:0,attr:{class:"popmake-close"}},overlay:{attr:{id:"popmake-overlay",class:"popmake-overlay"}}}}(jQuery,document),function(r){"use strict";var i={openpopup:!1,openpopup_id:0,closepopup:!1,closedelay:0,redirect_enabled:!1,redirect:"",cookie:!1};window.PUM=window.PUM||{},window.PUM.forms=window.PUM.forms||{},r.extend(window.PUM.forms,{form:{validation:{errors:[]},responseHandler:function(e,o){var t=o.data;o.success?window.PUM.forms.form.success(e,t):window.PUM.forms.form.errors(e,t)},display_errors:function(e,o){window.PUM.forms.messages.add(e,o||this.validation.errors,"error")},beforeAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");window.PUM.forms.messages.clear_all(e),t.length||(t=r('<span class="pum-form__loader"></span>'),""!==o.attr("value")?t.insertAfter(o):o.append(t)),o.prop("disabled",!0),t.show(),e.addClass("pum-form--loading").removeClass("pum-form--errors")},afterAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");o.prop("disabled",!1),t.hide(),e.removeClass("pum-form--loading")},success:function(e,o){void 0!==o.message&&""!==o.message&&window.PUM.forms.messages.add(e,[{message:o.message}]),e.trigger("success",[o]),!e.data("noredirect")&&void 0!==e.data("redirect_enabled")&&o.redirect&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))},errors:function(e,o){void 0!==o.errors&&o.errors.length&&(console.log(o.errors),window.PUM.forms.form.display_errors(e,o.errors),window.PUM.forms.messages.scroll_to_first(e),e.addClass("pum-form--errors").trigger("errors",[o]))},submit:function(e){var o=r(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.forms.form.beforeAjax(o),r.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_form",values:t}}).always(function(){window.PUM.forms.form.afterAjax(o)}).done(function(e){window.PUM.forms.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}},messages:{add:function(e,o,t){var n=e.find(".pum-form__messages"),i=0;if(t=t||"success",o=o||[],!n.length)switch(n=r('<div class="pum-form__messages">').hide(),pum_vars.message_position){case"bottom":e.append(n.addClass("pum-form__messages--bottom"));break;case"top":e.prepend(n.addClass("pum-form__messages--top"))}if(0<=["bottom","top"].indexOf(pum_vars.message_position))for(;o.length>i;i++)this.add_message(n,o[i].message,t);else for(;o.length>i;i++)void 0!==o[i].field?this.add_field_error(e,o[i]):this.add_message(n,o[i].message,t);n.is(":hidden")&&r(".pum-form__message",n).length&&n.slideDown()},add_message:function(e,o,t){o=r('<p class="pum-form__message">').html(o);t=t||"success",o.addClass("pum-form__message--"+t),e.append(o),e.is(":visible")&&o.hide().slideDown()},add_field_error:function(e,o){e=r('[name="'+o.field+'"]',e).parents(".pum-form__field").addClass("pum-form__field--error");this.add_message(e,o.message,"error")},clear_all:function(e,o){var t=e.find(".pum-form__messages"),n=t.find(".pum-form__message"),e=e.find(".pum-form__field.pum-form__field--error");o=o||!1,t.length&&n.slideUp("fast",function(){r(this).remove(),o&&t.hide()}),e.length&&e.removeClass("pum-form__field--error").find("p.pum-form__message").remove()},scroll_to_first:function(e){window.PUM.utilities.scrollTo(r(".pum-form__field.pum-form__field--error",e).eq(0))}},success:function(e,o){var t,n;(o=r.extend({},i,o))&&(t=PUM.getPopup(e),e={},n=function(){o.openpopup&&PUM.getPopup(o.openpopup_id).length?PUM.open(o.openpopup_id):o.redirect_enabled&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))},t.length&&(t.trigger("pumFormSuccess"),o.cookie&&(e=r.extend({name:"pum-"+PUM.getSetting(t,"id"),expires:"+1 year"},"object"==typeof o.cookie?o.cookie:{}),PUM.setCookie(t,e))),t.length&&o.closepopup?setTimeout(function(){t.popmake("close",n)},1e3*parseInt(o.closedelay)):n())}})}(jQuery),function(e){"use strict";e.pum=e.pum||{},e.pum.hooks=e.pum.hooks||new function(){var t=Array.prototype.slice,i={removeFilter:function(e,o){"string"==typeof e&&n("filters",e,o);return i},applyFilters:function(){var e=t.call(arguments),o=e.shift();return"string"!=typeof o?i:s("filters",o,e)},addFilter:function(e,o,t,n){"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),r("filters",e,o,t,n));return i},removeAction:function(e,o){"string"==typeof e&&n("actions",e,o);return i},doAction:function(){var e=t.call(arguments),o=e.shift();"string"==typeof o&&s("actions",o,e);return i},addAction:function(e,o,t,n){"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),r("actions",e,o,t,n));return i}},a={actions:{},filters:{}};function n(e,o,t,n){var i,r,s;if(a[e][o])if(t)if(i=a[e][o],n)for(s=i.length;s--;)(r=i[s]).callback===t&&r.context===n&&i.splice(s,1);else for(s=i.length;s--;)i[s].callback===t&&i.splice(s,1);else a[e][o]=[]}function r(e,o,t,n,i){n={callback:t,priority:n,context:i},i=(i=a[e][o])?(i.push(n),function(e){for(var o,t,n,i=1,r=e.length;i<r;i++){for(o=e[i],t=i;(n=e[t-1])&&n.priority>o.priority;)e[t]=e[t-1],--t;e[t]=o}return e}(i)):[n];a[e][o]=i}function s(e,o,t){var n,i,r=a[e][o];if(!r)return"filters"===e&&t[0];if(i=r.length,"filters"===e)for(n=0;n<i;n++)t[0]=r[n].callback.apply(r[n].context,t);else for(n=0;n<i;n++)r[n].callback.apply(r[n].context,t);return"filters"!==e||t[0]}return i},e.PUM=e.PUM||{},e.PUM.hooks=e.pum.hooks}(window),function(t){"use strict";function n(e){return e}window.PUM=window.PUM||{},window.PUM.integrations=window.PUM.integrations||{},t.extend(window.PUM.integrations,{init:function(){var e;void 0!==pum_vars.form_submission&&((e=pum_vars.form_submission).ajax=!1,e.popup=0<e.popupId?PUM.getPopup(e.popupId):null,PUM.integrations.formSubmission(null,e))},formSubmission:function(e,o){(o=t.extend({popup:PUM.getPopup(e),formProvider:null,formId:null,formInstanceId:null,formKey:null,ajax:!0,tracked:!1},o)).formKey=o.formKey||[o.formProvider,o.formId,o.formInstanceId].filter(n).join("_"),o.popup&&o.popup.length&&(o.popupId=PUM.getSetting(o.popup,"id")),window.PUM.hooks.doAction("pum.integration.form.success",e,o)},checkFormKeyMatches:function(e,o,t){o=""===o&&o;var n=-1!==["any"===e,"pumsubform"===e&&"pumsubform"===t.formProvider,e===t.formProvider+"_any",!o&&new RegExp("^"+e+"(_[d]*)?").test(t.formKey),!!o&&e+"_"+o===t.formKey].indexOf(!0);return window.PUM.hooks.applyFilters("pum.integration.checkFormKeyMatches",n,{formIdentifier:e,formInstanceId:o,submittedFormArgs:t})}})}(window.jQuery),function(s){"use strict";pum_vars&&void 0!==pum_vars.core_sub_forms_enabled&&!pum_vars.core_sub_forms_enabled||(window.PUM=window.PUM||{},window.PUM.newsletter=window.PUM.newsletter||{},s.extend(window.PUM.newsletter,{form:s.extend({},window.PUM.forms.form,{submit:function(e){var o=s(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.newsletter.form.beforeAjax(o),s.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_sub_form",values:t}}).always(function(){window.PUM.newsletter.form.afterAjax(o)}).done(function(e){window.PUM.newsletter.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}})}),s(document).on("submit","form.pum-sub-form",window.PUM.newsletter.form.submit).on("success","form.pum-sub-form",function(e,o){var t=s(e.target),n=t.data("settings")||{},i=t.pumSerializeObject(),r=PUM.getPopup(t),e=PUM.getSetting(r,"id"),r=s("form.pum-sub-form",r).index(t)+1;window.PUM.integrations.formSubmission(t,{formProvider:"pumsubform",formId:e,formInstanceId:r,extras:{data:o,values:i,settings:n}}),t.trigger("pumNewsletterSuccess",[o]).addClass("pum-newsletter-success"),t[0].reset(),window.pum.hooks.doAction("pum-sub-form.success",o,t),"string"==typeof n.redirect&&""!==n.redirect&&(n.redirect=atob(n.redirect)),window.PUM.forms.success(t,n)}).on("error","form.pum-sub-form",function(e,o){e=s(e.target);e.trigger("pumNewsletterError",[o]),window.pum.hooks.doAction("pum-sub-form.errors",o,e)}))}(jQuery),function(r,o){"use strict";r.extend(r.fn.popmake.methods,{addTrigger:function(e){return r.fn.popmake.triggers[e]?r.fn.popmake.triggers[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+e+" does not exist."),this)}}),r.fn.popmake.triggers={auto_open:function(e){var o=PUM.getPopup(this);setTimeout(function(){o.popmake("state","isOpen")||!o.popmake("checkCookies",e)&&o.popmake("checkConditions")&&(r.fn.popmake.last_open_trigger="Auto Open - Delay: "+e.delay,o.popmake("open"))},e.delay)},click_open:function(n){var i=PUM.getPopup(this),e=i.popmake("getSettings"),e=[".popmake-"+e.id,".popmake-"+decodeURIComponent(e.slug),'a[href$="#popmake-'+e.id+'"]'];n.extra_selectors&&""!==n.extra_selectors&&e.push(n.extra_selectors),e=(e=pum.hooks.applyFilters("pum.trigger.click_open.selectors",e,n,i)).join(", "),r(e).addClass("pum-trigger").css({cursor:"pointer"}),r(o).on("click.pumTrigger",e,function(e){var o=r(this),t=n.do_default||!1;0<i.has(o).length||i.popmake("state","isOpen")||!i.popmake("checkCookies",n)&&i.popmake("checkConditions")&&(o.data("do-default")?t=o.data("do-default"):(o.hasClass("do-default")||o.hasClass("popmake-do-default")||o.hasClass("pum-do-default"))&&(t=!0),e.ctrlKey||pum.hooks.applyFilters("pum.trigger.click_open.do_default",t,i,o)||(e.preventDefault(),e.stopPropagation()),r.fn.popmake.last_open_trigger=o,i.popmake("open"))})},form_submission:function(t){var n=PUM.getPopup(this);t=r.extend({form:"",formInstanceId:"",delay:0},t);PUM.hooks.addAction("pum.integration.form.success",function(e,o){t.form.length&&PUM.integrations.checkFormKeyMatches(t.form,t.formInstanceId,o)&&setTimeout(function(){n.popmake("state","isOpen")||!n.popmake("checkCookies",t)&&n.popmake("checkConditions")&&(r.fn.popmake.last_open_trigger="Form Submission",n.popmake("open"))},t.delay)})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},r(o).on("pumInit",".pum",function(){var e,o,t=PUM.getPopup(this),n=t.popmake("getSettings").triggers||[];if(n.length)for(o=0;o<n.length;o+=1)e=n[o],t.popmake("addTrigger",e.type,e.settings)})}(jQuery,document),function(a){"use strict";var n="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),i="select,textarea".split(","),r=/\[([^\]]*)\]/g;Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null==this)throw new TypeError;var o=Object(this),t=o.length>>>0;if(0==t)return-1;var n=0;if(0<arguments.length&&((n=Number(arguments[1]))!=n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(0<n||-1)*Math.floor(Math.abs(n)))),t<=n)return-1;for(var i=0<=n?n:Math.max(t-Math.abs(n),0);i<t;i++)if(i in o&&o[i]===e)return i;return-1}),a.fn.popmake.utilities={scrollTo:function(e,o){var t=a(e)||a();t.length&&a("html, body").animate({scrollTop:t.offset().top-100},1e3,"swing",function(){var e=t.find(':input:not([type="button"]):not([type="hidden"]):not(button)').eq(0);e.hasClass("wp-editor-area")?tinyMCE.execCommand ("mceFocus",!1,e.attr("id")):e.focus(),"function"==typeof o&&o()})},inArray:function(e,o){return!!~o.indexOf(e)},convert_hex:function(e,o){return e=e.replace("#",""),"rgba("+parseInt(e.substring(0,2),16)+","+parseInt(e.substring(2,4),16)+","+parseInt(e.substring(4,6),16)+","+o/100+")"},debounce:function(t,n){var i;return function(){var e=this,o=arguments;window.clearTimeout(i),i=window.setTimeout(function(){t.apply(e,o)},n)}},throttle:function(e,o){function t(){n=!1}var n=!1;return function(){n||(e.apply(this,arguments),window.setTimeout(t,o),n=!0)}},getXPath:function(e){var t,n,i,r,s=[];return a.each(a(e).parents(),function(e,o){return r=a(o),t=r.attr("id")||"",n=r.attr("class")||"",i=r.get(0).tagName.toLowerCase(),r=r.parent().children(i).index(r),"body"!==i&&(0<n.length&&(n=(n=n.split(" "))[0]),void s.push(i+(0<t.length?"#"+t:0<n.length?"."+n.split(" ").join("."):":eq("+r+")")))}),s.reverse().join(" > ")},strtotime:function(e,o){var t,n,i,r,s,a,p,u,l;if(!e)return!1;if((n=(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase()).match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/))&&n[2]===n[4])if(1901<n[1])switch(n[2]){case"-":return 12<n[3]||31<n[5]?!1:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return!1;case"/":return 12<n[3]||31<n[5]?!1:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(1901<n[5])switch(n[2]){case"-":case".":return 12<n[3]||31<n[1]?!1:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return 12<n[1]||31<n[3]?!1:new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return 12<n[3]||31<n[5]||n[1]<70&&38<n[1]?!1:(r=0<=n[1]&&n[1]<=38?+n[1]+2e3:n[1],new Date(r,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return 70<=n[5]?!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]&&(!(23<n[1]||59<n[3])&&(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3));case"/":return 12<n[1]||31<n[3]||n[5]<70&&38<n[5]?!1:(r=0<=n[5]&&n[5]<=38?+n[5]+2e3:n[5],new Date(r,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return 23<n[1]||59<n[3]||59<n[5]?!1:(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===e)return null===o||isNaN(o)?(new Date).getTime()/1e3||0:o||0;if(t=Date.parse(e),!isNaN(t))return t/1e3||0;function c(e){var o=e.split(" "),t=o[0],n=o[1].substring(0,3),i=/\d+/.test(t),e=("last"===t?-1:1)*("ago"===o[2]?-1:1);if(i&&(e*=parseInt(t,10)),p.hasOwnProperty(n)&&!o[1].match(/^mon(day|\.)?$/i))return s["set"+p[n]](s["get"+p[n]]()+e);if("wee"===n)return s.setDate(s.getDate()+7*e);if("next"===t||"last"===t)t=t,e=e,void 0!==(n=a[n=n])&&(0===(n=n-s.getDay())?n=7*e:0<n&&"last"===t?n-=7:n<0&&"next"===t&&(n+=7),s.setDate(s.getDate()+n));else if(!i)return;return 1}if(s=o?new Date(1e3*o):new Date,a={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},p={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},o="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",!(n=e.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?","gi"))))return!1;for(l=0,u=n.length;l<u;l+=1)if(!c(n[l]))return!1;return s.getTime()/1e3},serializeObject:function(e){a.extend({},e);var o={},t=a.extend(!0,{include:[],exclude:[],includeByClass:""},e);return this.find(":input").each(function(){var e;!this.name||this.disabled||window.PUM.utilities.inArray(this.name,t.exclude)||t.include.length&&!window.PUM.utilities.inArray(this.name,t.include)||-1===this.className.indexOf(t.includeByClass)||(e=this.name.replace(r,"[$1").split("["))[0]&&(this.checked||window.PUM.utilities.inArray(this.type,n)||window.PUM.utilities.inArray(this.nodeName.toLowerCase(),i))&&("checkbox"===this.type&&e.push(""),function e(o,t,n){var i=t[0];1<t.length?(o[i]||(o[i]=t[1]?{}:[]),e(o[i],t.slice(1),n)):o[i=i||o.length]=n}(o,e,a(this).val()))}),o}},a.fn.popmake.utilies=a.fn.popmake.utilities,window.PUM=window.PUM||{},window.PUM.utilities=window.PUM.utilities||{},window.PUM.utilities=a.extend(window.PUM.utilities,a.fn.popmake.utilities)}(jQuery,document),function(e){function o(n,o){var t={},i={};function r(e,o,t){return e[o]=t,e}function s(e,o){var t,n=e.match(p.key);try{o=JSON.parse(o)}catch(e){}for(;void 0!==(t=n.pop());)p.push.test(t)?o=r([],function(e){void 0===i[e]&&(i[e]=0);return i[e]++}(e.replace(/\[\]$/,"")),o):p.fixed.test(t)?o=r([],t,o):p.named.test(t)&&(o=r({},t,o));return o}function e(){return t}this.addPair=function(e){return p.validate.test(e.name)&&(e=s(e.name,"checkbox"===a('[name="'+(e=e).name+'"]',o).attr("type")&&"1"===e.value||e.value),t=n.extend(!0,t,e)),this},this.addPairs=function(e){if(!n.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var o=0,t=e.length;o<t;o++)this.addPair(e[o]);return this},this.serialize=e,this.serializeJSON=function(){return JSON.stringify(t)}}var t,a,p;a=(t=e).jQuery||e.Zepto||e.ender||e.$,o.patterns=p={validate:/^[a-z_][a-z0-9_]*(?:\[(?:\d*|[a-z0-9_]+)\])*$/i,key:/[a-z0-9_]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_]+$/i},o.serializeObject=function(){var e=(this.is("form")?this:this.find(":input")).serializeArray();return new o(a,this).addPairs(e).serialize()},o.serializeJSON=function(){var e=(this.is("form")?this:this.find(":input")).serializeArray();return new o(a,this).addPairs(e).serializeJSON()},void 0!==a.fn&&(a.fn.pumSerializeObject=o.serializeObject,a.fn.pumSerializeJSON=o.serializeJSON),t.FormSerializer=o}(this),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s="./assets/js/src/integration/calderaforms.js")}({"./assets/js/src/integration/calderaforms.js":function(e,o,t){"use strict";t.r(o);var n,o=t("./node_modules/@babel/runtime/helpers/slicedToArray.js"),i=t.n(o);(0,window.jQuery)(document).on("cf.ajax.request",function(e,o){return n=o.$form}).on("cf.submission",function(e,o){var t;"complete"!==o.data.status&&"success"!==o.data.status||(t=n.attr("id").split("_"),t=(o=i()(t,2))[0],o=void 0===(o=o[1])?null:o,window.PUM.integrations.formSubmission(n,{formProvider:"calderaforms",formId:t,formInstanceId:o,extras:{state:window.cfstate.hasOwnProperty(t)?window.cfstate[t]:null}}))})},"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":function(e,o){e.exports=function(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}},"./node_modules/@babel/runtime/helpers/arrayWithHoles.js":function(e,o){e.exports=function(e){if(Array.isArray(e))return e}},"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":function(e,o){e.exports=function(e,o){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,i=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(t.push(s.value),!o||t.length!==o);n=!0);}catch(e){i=!0,r=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw r}}return t}}},"./node_modules/@babel/runtime/helpers/nonIterableRest.js":function(e,o){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},"./node_modules/@babel/runtime/helpers/slicedToArray.js":function(e,o,t){var n=t("./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),i=t("./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"),r=t("./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),s=t("./node_modules/@babel/runtime/helpers/nonIterableRest.js");e.exports=function(e,o){return n(e)||i(e,o)||r(e,o)||s()}},"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":function(e,o,t){var n=t("./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");e.exports=function(e,o){if(e){if("string"==typeof e)return n(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(t="Object"===t&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,o):void 0}}}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s="./assets/js/src/integration/contactform7.js")}({"./assets/js/src/integration/contactform7.js":function(e,o,t){"use strict";t.r(o);var o=t("./node_modules/@babel/runtime/helpers/typeof.js"),i=t.n(o),r=window.jQuery;r(document).on("wpcf7mailsent",function(e,o){var t=e.detail.contactFormId,n=r(e.target),e=(e.detail.id||e.detail.unitTag).split("-").pop().replace("o","");window.PUM.integrations.formSubmission(n,{formProvider:"contactform7",formId:t,formInstanceId:e,extras:{details:o}});o=n.find("input.wpcf7-pum"),o=!!o.length&&JSON.parse(o.val());"object"===i()(o)&&void 0!==o.closedelay&&3<=o.closedelay.toString().length&&(o.closedelay=o.closedelay/1e3),window.PUM.forms.success(n,o)})},"./node_modules/@babel/runtime/helpers/typeof.js":function(o,e){function t(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?o.exports=t=function(e){return typeof e}:o.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}o.exports=t}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s="./assets/js/src/integration/formidableforms.js")}({"./assets/js/src/integration/formidableforms.js":function(e,o){var r=window.jQuery;r(document).on("frmFormComplete",function(e,o,t){var n=r(o),i=n.find('input[name="form_id"]').val(),o=PUM.getPopup(n.find('input[name="pum_form_popup_id"]').val());window.PUM.integrations.formSubmission(n,{popup:o,formProvider:"formidableforms",formId:i,extras:{response:t}})})}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s="./assets/js/src/integration/gravityforms.js")}({"./assets/js/src/integration/gravityforms.js":function(e,o,t){"use strict";t.r(o);var o=t("./node_modules/@babel/runtime/helpers/typeof.js"),n=t.n(o),i=window.jQuery,r={};i(document).on("gform_confirmation_loaded",function(e,o){var t=i("#gform_confirmation_wrapper_"+o+",#gforms_confirmation_message_"+o)[0];window.PUM.integrations.formSubmission(t,{formProvider:"gravityforms",formId:o}),window.PUM.forms.success(t,r[o]||{})}),i(function(){i(".gform_wrapper > form").each(function(){var e=i(this),o=e.attr("id").replace("gform_",""),e=e.find("input.gforms-pum"),e=!!e.length&&JSON.parse(e.val());e&&"object"===n()(e)&&("object"===n()(e)&&void 0!==e.closedelay&&3<=e.closedelay.toString().length&&(e.closedelay=e.closedelay/1e3),r[o]=e)})})},"./node_modules/@babel/runtime/helpers/typeof.js":function(o,e){function t(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?o.exports=t=function(e){return typeof e}:o.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}o.exports=t}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s="./assets/js/src/integration/mc4wp.js")}({"./assets/js/src/integration/mc4wp.js":function(e,o){var r=window.jQuery;r(function(){"undefined"!=typeof mc4wp&&mc4wp.forms.on("success",function(e,o){var t=r(e.element),n=e.id,i=r(".mc4wp-form-"+e.id).index(t)+1;window.PUM.integrations.formSubmission(t,{formProvider:"mc4wp",formId:n,formInstanceId:i,extras:{form:e,data:o}})})})}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s="./assets/js/src/integration/ninjaforms.js")}({"./assets/js/src/integration/ninjaforms.js":function(e,o,t){"use strict";t.r(o);var o=t("./node_modules/@babel/runtime/helpers/slicedToArray.js"),a=t.n(o),p=window.jQuery,n=!1;p(function(){"undefined"!=typeof Marionette&&"undefined"!=typeof nfRadio&&!1===n&&new(n=Marionette.Object.extend({initialize:function(){this.listenTo(nfRadio.channel("forms"),"submit:response",this.popupMaker)},popupMaker:function(e,o,t,n){var i=p("#nf-form-"+n+"-cont"),r=n.split("_"),s=a()(r,2),n=s[0],r=s[1],s=void 0===r?null:r,r={};e.errors&&e.errors.length||(window.PUM.integrations.formSubmission(i,{formProvider:"ninjaforms",formId:n,formInstanceId:s,extras:{response:e}}),e.data&&e.data.actions&&(r.openpopup=void 0!==e.data.actions.openpopup,r.openpopup_id=r.openpopup?parseInt(e.data.actions.openpopup):0,r.closepopup=void 0!==e.data.actions.closepopup,r.closedelay=r.closepopup?parseInt(e.data.actions.closepopup):0,r.closepopup&&e.data.actions.closedelay&&(r.closedelay=parseInt(e.data.actions.closedelay))),window.PUM.forms.success(i,r))}}))})},"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":function(e,o){e.exports=function(e,o){(null==o||o>e.length)&&(o=e.length);for(var t=0,n=new Array(o);t<o;t++)n[t]=e[t];return n}},"./node_modules/@babel/runtime/helpers/arrayWithHoles.js":function(e,o){e.exports=function(e){if(Array.isArray(e))return e}},"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":function(e,o){e.exports=function(e,o){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,i=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(t.push(s.value),!o||t.length!==o);n=!0);}catch(e){i=!0,r=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw r}}return t}}},"./node_modules/@babel/runtime/helpers/nonIterableRest.js":function(e,o){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},"./node_modules/@babel/runtime/helpers/slicedToArray.js":function(e,o,t){var n=t("./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),i=t("./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"),r=t("./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),s=t("./node_modules/@babel/runtime/helpers/nonIterableRest.js");e.exports=function(e,o){return n(e)||i(e,o)||r(e,o)||s()}},"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":function(e,o,t){var n=t("./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");e.exports=function(e,o){if(e){if("string"==typeof e)return n(e,o);var t=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(t="Object"===t&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,o):void 0}}}}),function(t){var n={};function i(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=n,i.d=function(e,o,t){i.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(o,e){if(1&e&&(o=i(o)),8&e)return o;if(4&e&&"object"==typeof o&&o&&o.__esModule)return o;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:o}),2&e&&"string"!=typeof o)for(var n in o)i.d(t,n,function(e){return o[e]}.bind(null,n));return t},i.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(o,"a",o),o},i.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},i.p="",i(i.s="./assets/js/src/integration/wpforms.js")}({"./assets/js/src/integration/wpforms.js":function(e,o){var r=window.jQuery;r(document).on("wpformsAjaxSubmitSuccess",".wpforms-ajax-form",function(e,o){var t=r(this),n=t.data("formid"),i=r("form#"+t.attr("id")).index(t)+1;window.PUM.integrations.formSubmission(t,{formProvider:"wpforms",formId:n,formInstanceId:i})})}}),function(e){("object"!=typeof exports||"undefined"==typeof module)&&"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(o){var t=this.constructor;return this.then(function(e){return t.resolve(o()).then(function(){return e})},function(e){return t.resolve(o()).then(function(){return t.reject(e)})})}var o=setTimeout;function p(e){return Boolean(e&&void 0!==e.length)}function n(){}function r(e){if(!(this instanceof r))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],c(e,this)}function i(t,n){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,r._immediateFn(function(){var e,o=1===t._state?n.onFulfilled:n.onRejected;if(null!==o){try{e=o(t._value)}catch(e){return void a(n.promise,e)}s(n.promise,e)}else(1===t._state?s:a)(n.promise,t._value)})):t._deferreds.push(n)}function s(o,e){try{if(e===o)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if(e instanceof r)return o._state=3,o._value=e,void u(o);if("function"==typeof t)return void c((n=t,i=e,function(){n.apply(i,arguments)}),o)}o._state=1,o._value=e,u(o)}catch(e){a(o,e)}var n,i}function a(e,o){e._state=2,e._value=o,u(e)}function u(e){2===e._state&&0===e._deferreds.length&&r._immediateFn(function(){e._handled||r._unhandledRejectionFn(e._value)});for(var o=0,t=e._deferreds.length;o<t;o++)i(e,e._deferreds[o]);e._deferreds=null}function l(e,o,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof o?o:null,this.promise=t}function c(e,o){var t=!1;try{e(function(e){t||(t=!0,s(o,e))},function(e){t||(t=!0,a(o,e))})}catch(e){if(t)return;t=!0,a(o,e)}}r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,o){var t=new this.constructor(n);return i(this,new l(e,o,t)),t},r.prototype.finally=e,r.all=function(o){return new r(function(i,r){if(!p(o))return r(new TypeError("Promise.all accepts an array"));var s=Array.prototype.slice.call(o);if(0===s.length)return i([]);var a=s.length;for(var e=0;e<s.length;e++)!function o(t,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void n.call(e,function(e){o(t,e)},r)}s[t]=e,0==--a&&i(s)}catch(e){r(e)}}(e,s[e])})},r.resolve=function(o){return o&&"object"==typeof o&&o.constructor===r?o:new r(function(e){e(o)})},r.reject=function(t){return new r(function(e,o){o(t)})},r.race=function(i){return new r(function(e,o){if(!p(i))return o(new TypeError("Promise.race accepts an array"));for(var t=0,n=i.length;t<n;t++)r.resolve(i[t]).then(e,o)})},r._immediateFn="function"==typeof setImmediate?function(e){setImmediate(e)}:function(e){o(e,0)},r._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var t=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"Promise"in t?t.Promise.prototype.finally||(t.Promise.prototype.finally=e):t.Promise=r});
(function($){
var WidgethfeSearchButton=function($scope, $){
if('undefined'==typeof $scope)
return;
var $input=$scope.find("input.hfe-search-form__input");
var $clear=$scope.find("button#clear");
var $clear_with_button=$scope.find("button#clear-with-button");
var $search_button=$scope.find(".hfe-search-submit");
var $toggle_search=$scope.find(".hfe-search-icon-toggle input");
$scope.find('.hfe-search-icon-toggle').on('click', function(){
$scope.find(".hfe-search-form__input").trigger('focus');
});
$scope.find(".hfe-search-form__input").on('focus', function(){
$scope.find(".hfe-search-button-wrapper").addClass("hfe-input-focus");
});
$scope.find(".hfe-search-form__input").blur(function(){
$scope.find(".hfe-search-button-wrapper").removeClass("hfe-input-focus");
});
$search_button.on('touchstart click', function(){
$input.submit();
});
$toggle_search.css('padding-right', $toggle_search.next().outerWidth() + 'px');
$input.on('keyup', function(){
$clear.style=(this.value.length) ? $clear.css('visibility','visible'): $clear.css('visibility','hidden');
$clear_with_button.style=(this.value.length) ? $clear_with_button.css('visibility','visible'): $clear_with_button.css('visibility','hidden');
$clear_with_button.css('right', $search_button.outerWidth() + 'px');
});
$clear.on("click",function(){
this.style=$clear.css('visibility','hidden');
$input.value="";
});
$clear_with_button.on("click",function(){
this.style=$clear_with_button.css('visibility','hidden');
$input.value="";
});
};
var WidgethfeNavMenuHandler=function($scope, $){
if('undefined'==typeof $scope)
return;
var id=$scope.data('id');
var wrapper=$scope.find('.elementor-widget-hfe-nav-menu ');
var layout=$('.elementor-element-' + id + ' .hfe-nav-menu').data('layout');
var flyout_data=$('.elementor-element-' + id + ' .hfe-flyout-wrapper').data('flyout-class');
var last_item=$('.elementor-element-' + id + ' .hfe-nav-menu').data('last-item');
var last_item_flyout=$('.elementor-element-' + id + ' .hfe-flyout-wrapper').data('last-item');
var menu_items_links=$('.elementor-element-' + id + ' .hfe-nav-menu nav li a');
var menu_items_links_flyout=$('.elementor-element-' + id + ' .hfe-flyout-wrapper li a');
if(menu_items_links.length > 0){
_handle_current_menu_item_class(menu_items_links);
}
if(menu_items_links_flyout.length > 0){
_handle_current_menu_item_class(menu_items_links_flyout);
}
$('div.hfe-has-submenu-container').removeClass('sub-menu-active');
_toggleClick(id);
_handlePolylangSwitcher($scope);
_handleSinglePageMenu(id, layout);
if('horizontal'!==layout){
_eventClick(id);
}else if('horizontal'===layout&&window.matchMedia("(max-width: 767px)").matches){
_eventClick(id);
}else if('horizontal'===layout&&window.matchMedia("(max-width: 1024px)").matches){
_eventClick(id);
}
$('.elementor-element-' + id + ' .hfe-flyout-trigger .hfe-nav-menu-icon').off('click keyup').on('click keyup', function(){
_openMenu(id);
});
$('.elementor-element-' + id + ' .hfe-flyout-close').off('click keyup').on('click keyup', function(){
_closeMenu(id);
});
$('.elementor-element-' + id + ' .hfe-flyout-overlay').off('click').on('click', function(){
_closeMenu(id);
});
$scope.find('.sub-menu').each(function(){
var parent=$(this).closest('.menu-item');
$scope.find(parent).addClass('parent-has-child');
$scope.find(parent).removeClass('parent-has-no-child');
});
if(( 'cta'==last_item||'cta'==last_item_flyout)&&'expandible'!=layout){
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').parent().addClass('elementor-button-wrapper');
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').addClass('elementor-button');
}
_borderClass(id);
$(window).on('resize', function(){
if('horizontal'!==layout){
_eventClick(id);
}else if('horizontal'===layout&&window.matchMedia("(max-width: 767px)").matches){
_eventClick(id);
}else if('horizontal'===layout&&window.matchMedia("(max-width: 1024px)").matches){
_eventClick(id);
}
if('horizontal'==layout&&window.matchMedia("(min-width: 977px)").matches){
$('.elementor-element-' + id + ' div.hfe-has-submenu-container').next().css('position', 'absolute');
}
if('expandible'==layout||'flyout'==layout){
_toggleClick(id);
}else if('vertical'==layout||'horizontal'==layout){
if(window.matchMedia("(max-width: 767px)").matches&&($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile'))){
_toggleClick(id);
}else if(window.matchMedia("(max-width: 1024px)").matches&&$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')){
_toggleClick(id);
}}
_borderClass(id);
});
$scope.find('.parent-has-child .hfe-has-submenu-container a').attr('aria-haspopup', 'true');
$scope.find('.parent-has-child .hfe-has-submenu-container a').attr('aria-expanded', 'false');
var hef_navmenu_toggle=$scope.find('.hfe-nav-menu__toggle');
hef_navmenu_toggle.attr('aria-haspopup', 'true');
hef_navmenu_toggle.attr('aria-expanded', 'false');
if(window.matchMedia("(max-width: 1024px)").matches&&$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')){
hef_navmenu_toggle.find('i').attr('aria-hidden', 'false');
}
if(window.matchMedia("(max-width: 768px)").matches&&$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile')){
hef_navmenu_toggle.find('i').attr('aria-hidden', 'false');
}
$(document).trigger('hfe_nav_menu_init', id);
$('.elementor-element-' + id + ' div.hfe-has-submenu-container').on('keyup', function(e){
var $this=$(this);
if($this.parent().hasClass('menu-active')){
$this.parent().removeClass('menu-active');
$this.parent().next().find('ul').css({ 'visibility': 'hidden', 'opacity': '0', 'height': '0' });
$this.parent().prev().find('ul').css({ 'visibility': 'hidden', 'opacity': '0', 'height': '0' });
$this.parent().next().find('div.hfe-has-submenu-container').removeClass('sub-menu-active');
$this.parent().prev().find('div.hfe-has-submenu-container').removeClass('sub-menu-active');
}else{
$this.parent().next().find('ul').css({ 'visibility': 'hidden', 'opacity': '0', 'height': '0' });
$this.parent().prev().find('ul').css({ 'visibility': 'hidden', 'opacity': '0', 'height': '0' });
$this.parent().next().find('div.hfe-has-submenu-container').removeClass('sub-menu-active');
$this.parent().prev().find('div.hfe-has-submenu-container').removeClass('sub-menu-active');
$this.parent().siblings().find('.hfe-has-submenu-container a').attr('aria-expanded', 'false');
$this.parent().next().removeClass('menu-active');
$this.parent().prev().removeClass('menu-active');
event.preventDefault();
$this.parent().addClass('menu-active');
if('horizontal'!==layout){
$this.addClass('sub-menu-active');
}
$this.find('a').attr('aria-expanded', 'true');
$this.next().css({ 'visibility': 'visible', 'opacity': '1', 'height': 'auto' });
if('horizontal'!==layout){
$this.next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 767px)").matches&&($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile'))){
$this.next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 1024px)").matches){
if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')){
$this.next().css('position', 'relative');
}else if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-none')){
$this.next().css('position', 'absolute');
}}
}});
$('.elementor-element-' + id + ' li.menu-item').on('keyup', function(e){
var $this=$(this);
$this.next().find('a').attr('aria-expanded', 'false');
$this.prev().find('a').attr('aria-expanded', 'false');
$this.next().find('ul').css({ 'visibility': 'hidden', 'opacity': '0', 'height': '0' });
$this.prev().find('ul').css({ 'visibility': 'hidden', 'opacity': '0', 'height': '0' });
$this.siblings().removeClass('menu-active');
$this.next().find('div.hfe-has-submenu-container').removeClass('sub-menu-active');
$this.prev().find('div.hfe-has-submenu-container').removeClass('sub-menu-active');
});
};
function _handle_current_menu_item_class(layout_links){
layout_links.each(function (){
var $this=$(this);
if($this.is('[href*="#"]')){
var menu_item_parent=$this.parent();
menu_item_parent.removeClass('current-menu-item current-menu-ancestor');
$this.click(function (){
var current_index=menu_item_parent.index(),
parent_element=$this.closest('ul');
parent_element.find('li').not(':eq(' + current_index + ')').removeClass('current-menu-item current-menu-ancestor');
menu_item_parent.addClass('current-menu-item current-menu-ancestor');
}
)
}}
);
}
function _openMenu(id){
var flyout_content=$('#hfe-flyout-content-id-' + id);
var layout=$('#hfe-flyout-content-id-' + id).data('layout');
var layout_type=$('#hfe-flyout-content-id-' + id).data('flyout-type');
var wrap_width=flyout_content.width() + 'px';
var container=$('.elementor-element-' + id + ' .hfe-flyout-container .hfe-side.hfe-flyout-' + layout);
$('.elementor-element-' + id + ' .hfe-flyout-overlay').fadeIn(100);
if('left'==layout){
$('body').css('margin-left' , '0');
container.css('left', '0');
if('push'==layout_type){
$('body').addClass('hfe-flyout-animating').css({
position: 'absolute',
width: '100%',
'margin-left':wrap_width,
'margin-right':'auto'
});
}
container.addClass('hfe-flyout-show');
}else{
$('body').css('margin-right', '0');
container.css('right', '0');
if('push'==layout_type){
$('body').addClass('hfe-flyout-animating').css({
position: 'absolute',
width: '100%',
'margin-left':'-' + wrap_width,
'margin-right':'auto',
});
}
container.addClass('hfe-flyout-show');
}}
function _closeMenu(id){
var flyout_content=$('#hfe-flyout-content-id-' + id);
var layout=$('#hfe-flyout-content-id-' + id).data('layout');
var wrap_width=flyout_content.width() + 'px';
var layout_type=$('#hfe-flyout-content-id-' + id).data('flyout-type');
var container=$('.elementor-element-' + id + ' .hfe-flyout-container .hfe-side.hfe-flyout-' + layout);
$('.elementor-element-' + id + ' .hfe-flyout-overlay').fadeOut(100);
if('left'==layout){
container.css('left', '-' + wrap_width);
if('push'==layout_type){
$('body').css({
position: '',
'margin-left':'',
'margin-right':'',
});
setTimeout(function(){
$('body').removeClass('hfe-flyout-animating').css({
width: '',
});
});
}
container.removeClass('hfe-flyout-show');
}else{
container.css('right', '-' + wrap_width);
if('push'==layout_type){
$('body').css({
position: '',
'margin-right':'',
'margin-left':'',
});
setTimeout(function(){
$('body').removeClass('hfe-flyout-animating').css({
width: '',
});
});
}
container.removeClass('hfe-flyout-show');
}}
function _eventClick(id){
var layout=$('.elementor-element-' + id + ' .hfe-nav-menu').data('layout');
$('.elementor-element-' + id + ' div.hfe-has-submenu-container').off('click').on('click', function(event){
var $this=$(this);
if($('.elementor-element-' + id).hasClass('hfe-link-redirect-child')){
if($this.hasClass('sub-menu-active')){
if(! $this.next().hasClass('sub-menu-open')){
$this.find('a').attr('aria-expanded', 'false');
if('horizontal'!==layout){
event.preventDefault();
$this.next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 767px)").matches&&($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile'))){
event.preventDefault();
$this.next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 1024px)").matches&&($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile'))){
event.preventDefault();
$this.next().css('position', 'relative');
}
$this.removeClass('sub-menu-active');
$this.nextAll('.sub-menu').removeClass('sub-menu-open');
$this.nextAll('.sub-menu').css({ 'visibility': 'hidden', 'opacity': '0', 'height': '0' });
$this.nextAll('.sub-menu').css({ 'transition': 'none'});
}else{
$this.find('a').attr('aria-expanded', 'false');
$this.removeClass('sub-menu-active');
$this.nextAll('.sub-menu').removeClass('sub-menu-open');
$this.nextAll('.sub-menu').css({ 'visibility': 'hidden', 'opacity': '0', 'height': '0' });
$this.nextAll('.sub-menu').css({ 'transition': 'none'});
if('horizontal'!==layout){
$this.next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 767px)").matches&&($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile'))){
$this.next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 1024px)").matches&&($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile'))){
$this.next().css('position', 'absolute');
}}
}else{
$this.find('a').attr('aria-expanded', 'true');
if('horizontal'!==layout){
event.preventDefault();
$this.next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 767px)").matches&&($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile'))){
event.preventDefault();
$this.next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 1024px)").matches){
event.preventDefault();
if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')){
$this.next().css('position', 'relative');
}else if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-none')){
$this.next().css('position', 'absolute');
}}
$this.addClass('sub-menu-active');
$this.nextAll('.sub-menu').addClass('sub-menu-open');
$this.nextAll('.sub-menu').css({ 'visibility': 'visible', 'opacity': '1', 'height': 'auto' });
$this.nextAll('.sub-menu').css({ 'transition': '0.3s ease'});
}}
});
$('.elementor-element-' + id + ' .hfe-menu-toggle').off('click keyup').on('click keyup',function(event){
var $this=$(this);
if($this.parent().parent().hasClass('menu-active')){
event.preventDefault();
$this.parent().parent().removeClass('menu-active');
$this.parent().parent().next().css({ 'visibility': 'hidden', 'opacity': '0', 'height': '0' });
if('horizontal'!==layout){
$this.parent().parent().next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 767px)").matches&&($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile'))){
$this.parent().parent().next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 1024px)").matches){
if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')){
$this.parent().parent().next().css('position', 'relative');
}else if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-none')){
$this.parent().parent().next().css('position', 'absolute');
}}
}else{
event.preventDefault();
$this.parent().parent().addClass('menu-active');
$this.parent().parent().next().css({ 'visibility': 'visible', 'opacity': '1', 'height': 'auto' });
if('horizontal'!==layout){
$this.parent().parent().next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 767px)").matches&&($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile'))){
$this.parent().parent().next().css('position', 'relative');
}else if('horizontal'===layout&&window.matchMedia("(max-width: 1024px)").matches){
if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')){
$this.parent().parent().next().css('position', 'relative');
}else if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-none')){
$this.parent().parent().next().css('position', 'absolute');
}}
}});
}
function _borderClass(id){
var last_item=$('.elementor-element-' + id + ' .hfe-nav-menu').data('last-item');
var last_item_flyout=$('.elementor-element-' + id + ' .hfe-flyout-wrapper').data('last-item');
var layout=$('.elementor-element-' + id + ' .hfe-nav-menu').data('layout');
$('.elementor-element-' + id + ' nav').removeClass('hfe-dropdown');
if(window.matchMedia("(max-width: 767px)").matches){
if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-mobile')||$('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')){
$('.elementor-element-' + id + ' nav').addClass('hfe-dropdown');
if(( 'cta'==last_item||'cta'==last_item_flyout)&&'expandible'!=layout){
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').parent().removeClass('elementor-button-wrapper');
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').removeClass('elementor-button');
}}else{
$('.elementor-element-' + id + ' nav').removeClass('hfe-dropdown');
if(( 'cta'==last_item||'cta'==last_item_flyout)&&'expandible'!=layout){
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').parent().addClass('elementor-button-wrapper');
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').addClass('elementor-button');
}}
}else if(window.matchMedia("(max-width: 1024px)").matches){
if($('.elementor-element-' + id).hasClass('hfe-nav-menu__breakpoint-tablet')){
$('.elementor-element-' + id + ' nav').addClass('hfe-dropdown');
if(( 'cta'==last_item||'cta'==last_item_flyout)&&'expandible'!=layout){
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').parent().removeClass('elementor-button-wrapper');
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').removeClass('elementor-button');
}}else{
$('.elementor-element-' + id + ' nav').removeClass('hfe-dropdown');
if(( 'cta'==last_item||'cta'==last_item_flyout)&&'expandible'!=layout){
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').parent().addClass('elementor-button-wrapper');
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').addClass('elementor-button');
}}
}else{
var $parent_element=$('.elementor-element-' + id);
$parent_element.find('nav').removeClass('hfe-dropdown');
if(( 'cta'==last_item||'cta'==last_item_flyout)&&'expandible'!=layout){
$parent_element.find('li.menu-item:last-child a.hfe-menu-item').parent().addClass('elementor-button-wrapper');
$parent_element.find('li.menu-item:last-child a.hfe-menu-item').addClass('elementor-button');
}}
var layout=$('.elementor-element-' + id + ' .hfe-nav-menu').data('layout');
if('expandible'==layout){
if(( 'cta'==last_item||'cta'==last_item_flyout)&&'expandible'!=layout){
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').parent().removeClass('elementor-button-wrapper');
$('.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item').removeClass('elementor-button');
}}
}
function _toggleClick(id){
if($('.elementor-element-' + id + ' .hfe-nav-menu__toggle').hasClass('hfe-active-menu-full-width')){
$('.elementor-element-' + id + ' .hfe-nav-menu__toggle').next().css('left', '0');
var width=$('.elementor-element-' + id).closest('.elementor-section').outerWidth();
var sec_pos=$('.elementor-element-' + id).closest('.elementor-section').offset().left - $('.elementor-element-' + id + ' .hfe-nav-menu__toggle').next().offset().left;
$('.elementor-element-' + id + ' .hfe-nav-menu__toggle').next().css('width', width + 'px');
$('.elementor-element-' + id + ' .hfe-nav-menu__toggle').next().css('left', sec_pos + 'px');
}
$('.elementor-element-' + id + ' .hfe-nav-menu__toggle').off('click keyup').on('click keyup', function(event){
var $this=$(this);
var $selector=$this.next();
if($this.hasClass('hfe-active-menu')){
var layout=$('.elementor-element-' + id + ' .hfe-nav-menu').data('layout');
var full_width=$selector.data('full-width');
var toggle_icon=$('.elementor-element-' + id + ' nav').data('toggle-icon');
$('.elementor-element-' + id).find('.hfe-nav-menu-icon').html(toggle_icon);
$this.removeClass('hfe-active-menu');
$this.attr('aria-expanded', 'false');
if('yes'==full_width){
$this.removeClass('hfe-active-menu-full-width');
$selector.css('width', 'auto');
$selector.css('left', '0');
$selector.css('z-index', '0');
}}else{
var layout=$('.elementor-element-' + id + ' .hfe-nav-menu').data('layout');
var full_width=$selector.data('full-width');
var close_icon=$('.elementor-element-' + id + ' nav').data('close-icon');
$('.elementor-element-' + id).find('.hfe-nav-menu-icon').html(close_icon);
$this.addClass('hfe-active-menu');
$this.attr('aria-expanded', 'true');
if('yes'==full_width){
$this.addClass('hfe-active-menu-full-width');
var width=$('.elementor-element-' + id).closest('.elementor-section').outerWidth();
var sec_pos=$('.elementor-element-' + id).closest('.elementor-section').offset().left - $selector.offset().left;
$selector.css('width', width + 'px');
$selector.css('left', sec_pos + 'px');
$selector.css('z-index', '9999');
}}
if($('.elementor-element-' + id + ' nav').hasClass('menu-is-active')){
$('.elementor-element-' + id + ' nav').removeClass('menu-is-active');
}else{
$('.elementor-element-' + id + ' nav').addClass('menu-is-active');
}});
}
function _handleSinglePageMenu(id, layout){
$('.elementor-element-' + id + ' ul.hfe-nav-menu li a').on('click',
function (){
var $this=$(this);
var link=$this.attr('href');
var linkValue='';
if(link.includes('#')){
var index=link.indexOf('#');
linkValue=link.slice(index + 1);
}
if(linkValue.length > 0){
if('expandible'==layout){
$('.elementor-element-' + id + ' .hfe-nav-menu__toggle').trigger("click");
if($this.hasClass('hfe-sub-menu-item')){
$('.elementor-element-' + id + ' .hfe-menu-toggle').trigger("click");
}}else{
if(window.matchMedia('(max-width: 1024px)').matches&&('horizontal'==layout||'vertical'==layout)){
$('.elementor-element-' + id + ' .hfe-nav-menu__toggle').trigger("click");
if($this.hasClass('hfe-sub-menu-item')){
$('.elementor-element-' + id + ' .hfe-menu-toggle').trigger("click");
}}else{
if($this.hasClass('hfe-sub-menu-item')){
_closeMenu(id);
$('.elementor-element-' + id + ' .hfe-menu-toggle').trigger("click");
}
_closeMenu(id);
}}
}}
);
}
function _handlePolylangSwitcher($scope){
var polylangSwitcher=$scope.find('.hfe-nav-menu nav .pll-parent-menu-item a.hfe-menu-item');
var hrefProperty=polylangSwitcher.prop('href');
if(undefined!==hrefProperty&&hrefProperty.includes('#')){
var index=hrefProperty.indexOf('#');
var value=hrefProperty.slice(index);
if(value==='#pll_switcher'){
polylangSwitcher.prop('href', '#');
}}
}
$(window).on('elementor/frontend/init', function (){
elementorFrontend.hooks.addAction('frontend/element_ready/navigation-menu.default', WidgethfeNavMenuHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/hfe-search-button.default', WidgethfeSearchButton);
});
})(jQuery);