(function(){window.Element.prototype.removeClass=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=this;return!(t instanceof HTMLElement)&&t!==null&&(t=document.querySelector(t)),this.isVariableDefined(t)&&e&&t.classList.remove(e),this},window.Element.prototype.addClass=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=this;return!(t instanceof HTMLElement)&&t!==null&&(t=document.querySelector(t)),this.isVariableDefined(t)&&e&&t.classList.add(e),this},window.Element.prototype.toggleClass=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=this;return!(t instanceof HTMLElement)&&t!==null&&(t=document.querySelector(t)),this.isVariableDefined(t)&&e&&t.classList.toggle(e),this},window.Element.prototype.isVariableDefined=function(){return!!this&&typeof this<"u"&&this!=null}})();var a={init:function(){a.preLoader(),a.dropdownHover(),a.toolTipFunc(),a.popOverFunc(),a.backTotop(),a.lightBox(),a.aosFunc(),a.stepper(),a.pricing(),a.stickyElement(),a.pswMeter(),a.fakePwd(),a.autoTabinput(),a.parallaxBG(),a.enableIsotope(),a.swiperSlider(),a.mouseMove(),a.pCounter()},isVariableDefined:function(e){return typeof!!e&&e!="undefined"&&e!=null},getParents:function(e,t,n){const i=[],o=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;for(e=e.parentElement;e&&!o.call(e,t);){if(n)o.call(e,n)&&i.push(e);else if(t){if(o.call(e,t))return i.push(e)}else i.push(e);if(e=e.parentElement,a.isVariableDefined(e)&&o.call(e,t))return e}return i},getNextSiblings:function(e,t,n){let i=[],o=e.parentNode.firstChild;const r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;do if(o.nodeType!==3&&o!==e&&o===e.nextElementSibling&&(!n||n(e))){if(t){if(r.call(o,t))return o}else i.push(o);e=o}while(o=o.nextSibling);return i},on:function(e,t,n){document.addEventListener("DOMContentLoaded",()=>{!(e instanceof HTMLElement)&&e!==null&&(e=document.querySelector(e)),e.addEventListener(t,n)})},onAll:function(e,t,n){document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(e).forEach(i=>{t.indexOf(",")>-1?t.split(",").forEach(r=>{i.addEventListener(r,n)}):i.addEventListener(t,n)})})},removeClass:function(e,t){!(e instanceof HTMLElement)&&e!==null&&(e=document.querySelector(e)),a.isVariableDefined(e)&&e.removeClass(t)},removeAllClass:function(e,t){a.isVariableDefined(e)&&e instanceof HTMLElement&&document.querySelectorAll(e).forEach(n=>{n.removeClass(t)})},toggleClass:function(e,t){!(e instanceof HTMLElement)&&e!==null&&(e=document.querySelector(e)),a.isVariableDefined(e)&&e.toggleClass(t)},toggleAllClass:function(e,t){a.isVariableDefined(e)&&e instanceof HTMLElement&&document.querySelectorAll(e).forEach(n=>{n.toggleClass(t)})},addClass:function(e,t){!(e instanceof HTMLElement)&&e!==null&&(e=document.querySelector(e)),a.isVariableDefined(e)&&e.addClass(t)},select:function(e){return document.querySelector(e)},selectAll:function(e){return document.querySelectorAll(e)},preLoader:function(){window.onload=function(){var e=a.select(".preloader");a.isVariableDefined(e)&&(e.className+=" animate__animated animate__fadeOut",setTimeout(function(){e.style.display="none"},200))}},dropdownHover:function(){window.matchMedia("(min-width: 992px)").matches&&function(e){document.querySelectorAll(".dropdown-hover .dropdown").forEach(function(t){t.addEventListener("mouseenter",function(n){let i=n.target.querySelector(':scope>[data-bs-toggle="dropdown"]');i.classList.contains("show")||e.Dropdown.getOrCreateInstance(i).toggle()}),t.addEventListener("mouseleave",function(n){let i=n.target.querySelector(':scope>[data-bs-toggle="dropdown"]');i.classList.contains("show")&&e.Dropdown.getOrCreateInstance(i).toggle()})})}(bootstrap)},stickyHeader:function(){if(window.matchMedia("(min-width: 768px)").matches){var e=a.select(".header-sticky");a.isVariableDefined(e)&&document.addEventListener("scroll",function(t){var n=window.scrollY||document.documentElement.scrollTop;n>=400?e.addClass("header-sticky-on"):e.removeClass("header-sticky-on")})}},stickyBar:function(){var e=a.select("[data-sticky]");a.isVariableDefined(e)&&new Sticky("[data-sticky]")},toolTipFunc:function(){var e=[].slice.call(a.selectAll('[data-bs-toggle="tooltip"]'));e.map(function(t){return new bootstrap.Tooltip(t)})},popOverFunc:function(){var e=[].slice.call(a.selectAll('[data-bs-toggle="popover"]'));e.map(function(t){return new bootstrap.Popover(t)})},backTotop:function(){var e=window.scrollY,t=a.select(".back-top");if(a.isVariableDefined(t)){var n=()=>t.addClass("back-top-show"),i=()=>t.removeClass("back-top-show");window.addEventListener("scroll",function(){e=window.scrollY,e>=800?n():i()}),t.addEventListener("click",()=>window.scrollTo({top:0,behavior:"smooth"}))}},lightBox:function(){var e=a.select("[data-glightbox]");a.isVariableDefined(e)&&GLightbox({selector:"*[data-glightbox]",openEffect:"fade",closeEffect:"fade",autoplayVideos:!1})},aosFunc:function(){var e=a.select(".aos");a.isVariableDefined(e)&&AOS.init({duration:500,easing:"ease-out-quart",once:!0})},stepper:function(){var e=a.select("#stepper");if(a.isVariableDefined(e)){var t=document.querySelectorAll(".next-btn"),n=document.querySelectorAll(".prev-btn"),i=new Stepper(document.querySelector("#stepper"),{linear:!1,animation:!0});t.forEach(function(o){o.addEventListener("click",()=>{i.next()})}),n.forEach(function(o){o.addEventListener("click",()=>{i.previous()})})}},pricing:function(){var e=a.select(".price-wrap");if(a.isVariableDefined(e)){var t=a.selectAll(".price-wrap");t.forEach(n=>{var i=n.querySelector(".price-toggle"),o=n.querySelectorAll(".plan-price");i.addEventListener("change",function(){i.checked?o.forEach(r=>{var s=r.getAttribute("data-annual-price");r.innerHTML=s}):o.forEach(r=>{var s=r.getAttribute("data-monthly-price");r.innerHTML=s})})})}},stickyElement:function(){var e=window.scrollY,t=a.select(".sticky-element");if(a.isVariableDefined(t)){var n=()=>t.addClass("sticky-element-sticked"),i=()=>t.removeClass("sticky-element-sticked");window.addEventListener("scroll",function(){e=window.scrollY,e>=800?n():i()})}},pswMeter:function(){a.isVariableDefined(a.select("#pswmeter"))&&passwordStrengthMeter({containerElement:"#pswmeter",passwordInput:"#psw-input",showMessage:!0,messageContainer:"#pswmeter-message",messagesList:["Write your password...","Easy peasy!","That is a simple one","That is better","Yeah! that password rocks ;)"],height:8,borderRadius:4,pswMinLength:8,colorScore1:"#dc3545",colorScore2:"#f7c32e",colorScore3:"#4f9ef8",colorScore4:"#0cbc87"})},fakePwd:function(){if(a.isVariableDefined(a.select(".fakepassword"))){var e=document.querySelector(".fakepassword"),t=document.querySelector(".fakepasswordicon"),n=()=>{e.type=="password"?(e.setAttribute("type","text"),t.classList.add("fa-eye")):(t.classList.remove("fa-eye"),e.setAttribute("type","password"))};t.addEventListener("click",n)}},autoTabinput:function(){var e=document.getElementsByClassName("autotab")[0];a.isVariableDefined(e)&&(e.onkeyup=function(t){var n=t.srcElement,i=parseInt(n.attributes.maxlength.value,10),o=n.value.length;if(o>=i){for(var r=n;(r=r.nextElementSibling)&&r!=null;)if(r.tagName.toLowerCase()=="input"){r.focus();break}}})},parallaxBG:function(){var e=a.select(".bg-parallax");a.isVariableDefined(e)&&jarallax(a.selectAll(".bg-parallax"),{speed:.6})},enableIsotope:function(){var e=a.select(".grid-item");if(a.isVariableDefined(e)){var t=a.select("[data-isotope]");if(a.isVariableDefined(t)){var n=a.selectAll("[data-isotope]");n.forEach(r=>{var s=r.getAttribute("data-isotope"),l=JSON.parse(s),c=new Isotope(r,{itemSelector:".grid-item",layoutMode:l.layoutMode});imagesLoaded(r).on("progress",function(){c.layout()})})}var i=a.select(".grid-menu");if(a.isVariableDefined(i)){var o=a.selectAll(".grid-menu");o.forEach(r=>{var s=r.getAttribute("data-target"),l=r.dataset.target,c=a.select(l),d=c.getAttribute("data-isotope"),m=JSON.parse(d),f=new Isotope(s,{itemSelector:".grid-item",transitionDuration:"0.7s",layoutMode:m.layoutMode}),p=r.querySelectorAll("li a");p.forEach(u=>{u.addEventListener("click",function(w){var g=u.getAttribute("data-filter");f.arrange({filter:g}),p.forEach(v=>v.removeClass("active")),u.addClass("active")})}),imagesLoaded(s).on("progress",function(){f.layout()})})}}},swiperSlider:function(){var e=a.select("[data-swiper-options]");if(a.isVariableDefined(e)){let i=function(o={},r=".swiper"){document.querySelectorAll(r).forEach(l=>{let c=l.getAttribute("data-swiper-options")?JSON.parse(l.getAttribute("data-swiper-options")):{},d={...o,...c};new Swiper(l,d)})};var t=i;i({spaceBetween:0,slidesPerView:1,loop:!0,autoplay:{delay:2e3,disableOnInteraction:!1,pauseOnMouseEnter:!1},freeMode:!1})}},mouseMove:function(){document.addEventListener("mousemove",e);function e(t){this.querySelectorAll(".parallax-wrap .layer").forEach(n=>{const i=n.getAttribute("data-depth"),o=(window.innerWidth-t.pageX*i)/90,r=(window.innerHeight-t.pageY*i)/90;n.style.transform=`translateX(${o}px) translateY(${r}px)`})}},pCounter:function(){var e=a.select(".purecounter");a.isVariableDefined(e)&&new PureCounter}};a.init();
