!function(){function t(){if(this.complete){const e=this.getAttribute("data-lazy-src");if(e&&this.src!==e)return void this.addEventListener("onload",t);const n=this.width,d=this.height;n&&n>0&&d&&d>0&&(this.setAttribute("width",n),this.setAttribute("height",d),i(this))}else this.addEventListener("onload",t)}var e=function(){const e=document.querySelectorAll("img[data-recalc-dims]");for(let i=0;i (http://jedrzejchalubek.com/) * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Glide=e()}(this,function(){"use strict";var n={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perTouch:!1,touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(.165, .840, .440, 1)",throttle:10,direction:"ltr",peek:0,breakpoints:{},classes:{direction:{ltr:"glide--ltr",rtl:"glide--rtl"},slider:"glide--slider",carousel:"glide--carousel",swipeable:"glide--swipeable",dragging:"glide--dragging",cloneSlide:"glide__slide--clone",activeNav:"glide__bullet--active",activeSlide:"glide__slide--active",disabledArrow:"glide__arrow--disabled"}};function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t=function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t};function o(t,e){for(var n=0;n":"<","<":">","=":"="};function A(t,e){return{modify:function(t){return e.Direction.is("rtl")?-t:t}}}function M(i,r,o){var s=[function(e,n){return{modify:function(t){return t+n.Gaps.value*e.index}}},function(t,e){return{modify:function(t){return t+e.Clones.grow/2}}},function(n,i){return{modify:function(t){if(0<=n.settings.focusAt){var e=i.Peek.value;return u(e)?t-e.before:t-e}return t}}},function(o,s){return{modify:function(t){var e=s.Gaps.value,n=s.Sizes.width,i=o.settings.focusAt,r=s.Sizes.slideWidth;return"center"===i?t-(n/2-r/2):t-r*i-e*i}}}].concat(i._t,[A]);return{mutate:function(t){for(var e=0;e")?(o.Transition.after(function(){s.emit("translate.jump"),u.set(0)}),u.set(i*n+e*n)):u.set(t.movement)}),s.on("destroy",function(){u.remove()}),u},Transition:function(n,i,t){var r=!1,e={compose:function(t){var e=n.settings;return r?t+" 0ms "+e.animationTimingFunc:t+" "+this.duration+"ms "+e.animationTimingFunc},set:function(t){var e=0"))&&(e._o=!1,i.emit("run.offset",e.move)),i.emit("run.after",e.move),o.enable()}))},calculate:function(){var t=this.move,e=this.length,n=t.steps,i=t.direction,r=function(t){return"number"==typeof t}(y(n))&&0!==y(n);switch(i){case">":">"===n?o.index=e:this.isEnd()?o.isType("slider")&&!o.settings.rewind||(this._o=!0,o.index=0):r?o.index+=Math.min(e-o.index,-y(n)):o.index++;break;case"<":"<"===n?o.index=0:this.isStart()?o.isType("slider")&&!o.settings.rewind||(this._o=!0,o.index=e):r?o.index-=Math.min(o.index,y(n)):o.index--;break;case"=":o.index=n}},isStart:function(){return 0===o.index},isEnd:function(){return o.index===this.length},isOffset:function(t){return this._o&&this.move.direction===t}};return d(t,"move",{get:function(){return this._m},set:function(t){var e=t.substr(1);this._m={direction:t.substr(0,1),steps:e?y(e)?y(e):e:0}}}),d(t,"length",{get:function(){var t=o.settings,e=n.Html.slides.length;return o.isType("slider")&&"center"!==t.focusAt&&t.bound?e-1-(y(t.perView)-1)+y(t.focusAt):e-1}}),d(t,"offset",{get:function(){return this._o}}),t},Swipe:function(d,h,v){var n=new H,p=0,m=0,g=0,i=!1,r=!!L&&{passive:!0},t={mount:function(){this.bindSwipeStart()},start:function(t){if(!i&&!d.disabled){this.disable();var e=this.touches(t);p=null,m=y(e.pageX),g=y(e.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),v.emit("swipe.start")}},move:function(t){if(!d.disabled){var e=d.settings,n=e.touchAngle,i=e.touchRatio,r=e.classes,o=this.touches(t),s=y(o.pageX)-m,u=y(o.pageY)-g,a=Math.abs(s<<2),c=Math.abs(u<<2),l=Math.sqrt(a+c),f=Math.sqrt(c);if(!(180*(p=Math.asin(f/l))/Math.PI"+s))):h.Move.make(),h.Html.root.classList.remove(e.classes.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),v.emit("swipe.end")}},bindSwipeStart:function(){var e=this,t=d.settings;t.swipeThreshold&&n.on(z[0],h.Html.wrapper,function(t){e.start(t)},r),t.dragThreshold&&n.on(z[1],h.Html.wrapper,function(t){e.start(t)},r)},unbindSwipeStart:function(){n.off(z[0],h.Html.wrapper,r),n.off(z[1],h.Html.wrapper,r)},bindSwipeMove:function(){var e=this;n.on(j,h.Html.wrapper,b(function(t){e.move(t)},d.settings.throttle),r)},unbindSwipeMove:function(){n.off(j,h.Html.wrapper,r)},bindSwipeEnd:function(){var e=this;n.on(D,h.Html.wrapper,function(t){e.end(t)})},unbindSwipeEnd:function(){n.off(D,h.Html.wrapper)},touches:function(t){return-1")),37===t.keyCode&&e.Run.make(e.Direction.resolve("<"))}};return n.on(["destroy","update"],function(){r.unbind()}),n.on("update",function(){r.mount()}),n.on("destroy",function(){i.destroy()}),r},Autoplay:function(e,n,t){var i=new H,r={mount:function(){this.start(),e.settings.hoverpause&&this.bind()},start:function(){var t=this;e.settings.autoplay&&l(this._i)&&(this._i=setInterval(function(){t.stop(),n.Run.make(">"),t.start()},this.time))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var t=this;i.on("mouseover",n.Html.root,function(){t.stop()}),i.on("mouseout",n.Html.root,function(){t.start()})},unbind:function(){i.off(["mouseover","mouseout"],n.Html.root)}};return d(r,"time",{get:function(){var t=n.Html.slides[e.index].getAttribute("data-glide-autoplay");return y(t||e.settings.autoplay)}}),t.on(["destroy","update"],function(){r.unbind()}),t.on(["run.before","pause","destroy","swipe.start","update"],function(){r.stop()}),t.on(["run.after","play","swipe.end"],function(){r.start()}),t.on("update",function(){r.mount()}),t.on("destroy",function(){i.destroy()}),r},Breakpoints:function(t,e,n){var i=new H,r=t.settings,o=R(r.breakpoints),s=a({},r),u={match:function(t){if(void 0!==window.matchMedia)for(var e in t)if(t.hasOwnProperty(e)&&window.matchMedia("(max-width: "+e+"px)").matches)return t[e];return s}};return a(r,u.match(o)),i.on("resize",window,b(function(){t.settings=h(r,u.match(o))},t.settings.throttle)),n.on("update",function(){o=R(o),s=a({},r)}),n.on("destroy",function(){i.off("resize",window)}),u}};function G(){return i(this,G),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(G.__proto__||Object.getPrototypeOf(G)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(G,p),t(G,[{key:"mount",value:function(t){var e=0e.json()).then(e=>{e&&setTimeout(()=>{window.location.reload(!0)},2e3)}).catch((function(e){console.log(JSON.stringify(e))}))}function i(e){e.preventDefault(),fetch(o+"wp-json/subscription/v2/signup",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:"Rttdc35@abc.com",birthdate:"01-01-2001",source:"News",optin:["ASY"]})}).then(e=>e.json()).then((function(){})).catch((function(e){console.log(JSON.stringify(e))}))}document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelector(".kserv-logout a");e&&(e.onclick=r)}),!1),document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelector(".kserv-subscribe a");e&&(e.onclick=i)}),!1),t(5)}]);; (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{8:function(e,t,o){"use strict";o.r(t)}}]),function(e){function t(t){for(var r,s,l=t[0],i=t[1],u=t[2],d=0,p=[];d{e.addEventListener("click",e=>{e.preventDefault()})}),c&&c.forEach(e=>{e.addEventListener("keyup",e=>{e.preventDefault();const t=e.target;switch(e.keyCode){case 13:l(t)}})}),s&&s.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),l(e.target)})})},function(e,t){document.querySelector(".js-search-bar-trigger-primary").onclick=function(e){const t=document.querySelector(".js-search-bar"),o=document.querySelector(".js-search-bar-trigger-primary"),r=document.querySelector(".js-search-bar-trigger-secondary");t.classList.toggle("active"),o.classList.toggle("opened"),r.classList.toggle("opened"),e.preventDefault()},document.querySelector(".js-search-bar-trigger-secondary").onclick=function(e){const t=document.querySelector(".js-search-bar"),o=document.querySelector(".js-search-bar-trigger-primary"),r=document.querySelector(".js-search-bar-trigger-secondary");t.classList.toggle("active"),o.classList.toggle("opened"),r.classList.toggle("opened"),e.preventDefault()}},function(e,t){function o(e){const t=function(e){const t=document.querySelector(`.js-glide-carousel[data-carousel_config="${e}"]`).getAttribute("data-num-to-display"),o={classes:{slide:"js-carousel__slide"},config:{type:"slider",startAt:0,perView:1,bound:!0,gap:0,autoplay:7e3,hoverpause:!0,animationTimingFunc:"ease-out",animationDuration:400}};return e.includes("content-carousel-block")||e.includes("post-carousel-block")?{...o,classes:{...o.classes},config:{...o.config,perView:t,breakpoints:{544:{perView:1},900:{perView:2}},gap:20}}:e.includes("related-posts-carousel")?{...o,classes:{...o.classes},config:{...o.config,perView:3,breakpoints:{544:{perView:1},900:{perView:2}},gap:20}}:void 0}(e.dataset.carousel_config);new Glide(e,t.config).mount()}function r(){const e=document.querySelectorAll(".js-glide-carousel");if(e.length)for(let t=0,r=e.length;t{e.addEventListener("click",t=>{t.preventDefault(),function(e,t){const r=document.querySelector(".js-kserv-login-modal-close-button");e.classList.add("open"),o=t,r.focus()}(n,e)})}),c&&(c.forEach(e=>{e.addEventListener("click",()=>{s(n,o)})}),c.forEach(e=>{e.addEventListener("keyup",e=>{27===e.keyCode&&s(n,o)})}))},function(e,t){const o=document.querySelector(".js-back-button");o&&o.addEventListener("click",()=>{window.history.back()})},function(e,t){const o=document.querySelector("#colophon"),r=document.querySelector(".js-scroll-top-button"),n=document.documentElement;r.addEventListener("click",(function(){n.scrollTo({top:0,behavior:"smooth"})})),new IntersectionObserver((function(e){e.forEach(e=>{e.isIntersecting?r.classList.add("active"):r.classList.remove("active")})})).observe(o)},,,function(e,t,o){"use strict";o.r(t),o(1),o(2),o(3),o(4),o(5);const r=kserv_endpoint.base_url+"/",n=document.querySelector("#login-form"),c=n.querySelector(".js-kserv-login-button");c&&c.addEventListener("click",(function(){const e=function(){let e;const t=n.querySelector("#email").value,o=n.querySelector("#email-error");return o.setAttribute("style","display: none;"),e=""!==t&&/\S+@\S+\.\S+/.test(t),!1===e?(o.setAttribute("style",""),e):t}(),t=function(){const e=n.querySelector("#pass").value,t=n.querySelector("#pass-error");return t.setAttribute("style","display: none;"),""===e?(t.setAttribute("style",""),!1):e}();var o,s;!1!==e&&!1!==t&&(n.querySelector("#login-response").textContent="",c.setAttribute("disabled","true"),o=e,s=t,fetch(r+"wp-json/kserv/v2/login",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:o,pass:s})}).then(e=>e.json()).then(e=>{const t=document.querySelector(".js-kserv-login-modal"),o=t.querySelector(".js-kserv-login-button"),r=t.querySelector("#login-response");e?setTimeout(()=>{window.location.reload(!0)},2e3):r.textContent="Sorry, but it looks like your credentials are incorrect. Please check your user name and password and try again.",o.removeAttribute("disabled")}).catch((function(e){console.log(JSON.stringify(e))})))}));const s=[];let l="",i="",u="",a="",d="",p="",f=document.querySelector("#gform_3");f&&(document.addEventListener("click",(function(e){e.target.matches("#gform_submit_button_3")&&(f=document.querySelector("#gform_3"),function(e){l=e.querySelector("#input_3_1_3").value,i=e.querySelector("#input_3_1_6").value,u=e.querySelector("#input_3_3").value,a=e.querySelector("#input_3_4").value,d=e.querySelector("#input_3_5").value.replace(/\//g,"-"),p=e.querySelectorAll("#input_3_9 input:checked"),p.forEach(e=>{s.push(e.value)})}(f))}),!1),jQuery(document).on("gform_confirmation_loaded",(function(e,t){var o,n,c,p,f,y;t===Number("3")&&(o=l,n=i,c=u,p=a,f=d,y=s,fetch(r+"wp-json/kserv/v2/login",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:c,pass:p,firstname:o,lastname:n,birthdate:f,newsletters:y})}).then(e=>e.json()).then(e=>{e&&document.body.classList.replace("kserv-logged-out","kserv-logged-in")}).catch((function(e){console.log(JSON.stringify(e))})))}))),o(6),o(7)}]);; /** * File primary-navigation.js. * * Required to open and close the mobile navigation. */ ( function() { /** * Menu Toggle Behaviors * * @param {Element} element */ var navMenu = function ( id ){ var wrapper = document.body; // this is the element to which a CSS class is added when a mobile nav menu is open var openButton = document.getElementById( id + '-open-menu' ); var closeButton = document.getElementById( id + '-close-menu' ); if ( openButton && closeButton ){ openButton.onclick = function() { wrapper.classList.add( id + '-navigation-open' ); wrapper.classList.add( 'lock-scrolling' ); closeButton.focus(); } closeButton.onclick = function() { wrapper.classList.remove( id + '-navigation-open' ); wrapper.classList.remove( 'lock-scrolling' ); openButton.focus(); } } /** * Trap keyboard navigation in the menu modal. * Adapted from TwentyTwenty */ document.addEventListener( 'keydown', function( event ) { if ( ! wrapper.classList.contains( id + '-navigation-open' ) ){ return; } var modal, elements, selectors, lastEl, firstEl, activeEl, tabKey, shiftKey, escKey; modal = document.querySelector( '.' + id + '-navigation' ); selectors = "input, a, button"; elements = modal.querySelectorAll( selectors ); elements = Array.prototype.slice.call( elements ); elements = elements.filter( function( el ) { return ! el.classList.contains( 'woocommerce-cart-link' ); // ignore this element because it's hidden on mobile }); tabKey = event.keyCode === 9; shiftKey = event.shiftKey; escKey = event.keyCode === 27; activeEl = document.activeElement; lastEl = elements[ elements.length - 1 ]; firstEl = elements[0]; if ( escKey ) { event.preventDefault(); wrapper.classList.remove( id + '-navigation-open', 'lock-scrolling' ); openButton.focus(); } if ( ! shiftKey && tabKey && lastEl === activeEl ) { event.preventDefault(); firstEl.focus(); } if ( shiftKey && tabKey && firstEl === activeEl ) { event.preventDefault(); lastEl.focus(); } // If there are no elements in the menu, don't move the focus if ( tabKey && firstEl === lastEl ) { event.preventDefault(); } }); } window.addEventListener( 'load', function() { new navMenu( 'primary' ); new navMenu( 'woo' ); }); } )();;