"use strict";

function _defineProperty(e, t, a) {
    return t in e ? Object.defineProperty(e, t, {
        value: a,
        enumerable: !0,
        configurable: !0,
        writable: !0
    }) : e[t] = a, e
}! function(e) {
    var t = e(window),
        a = e("body"),
        i = 1199,
        n = null,
        o = null,
        s = 0,
        r = 0,
        l = [],
        d = document.getElementsByClassName("swiper-container swiper_aheto_diff_slider");

    function c() {
        n = window.innerWidth, o = window.innerHeight, a.hasClass("admin-bar") && 782 < t.width() ? s = 32 : a.hasClass("admin-bar") && (s = 46), r = Math.max(document.documentElement.clientHeight, window.innerHeight || 0)
    }

    function h(e, t, a) {
        var i = new Date;
        a ? (i.setTime(i.getTime() + 24 * a * 60 * 60 * 1e3), document.cookie = e + "=" + t + ";path=/;expires=" + i.toUTCString()) : document.cookie = e + "=" + t + ";path=/;expires=0;"
    }

    function u(e) {
        var t = document.cookie.match("(^|;) ?" + e + "=([^;]*)(;|$)");
        return t ? t[2] : null
    }

    function p(e) {
        document.cookie = e + "=;path=/;expires=-1;"
    }

    function g() {
        e("header .main-header[data-mobile-menu]").length && (i = e("header .main-header[data-mobile-menu]").data("mobile-menu"), t.width() <= i ? (e("header .main-header[data-mobile-menu]").addClass("main-header--mobile").removeClass("main-header--desktop"), e("body").addClass("aheto-menu--mobile").removeClass("aheto-menu--desktop")) : (e("header .main-header[data-mobile-menu]").removeClass("main-header--mobile").addClass("main-header--desktop"), e("body").removeClass("aheto-menu--mobile").addClass("aheto-menu--desktop")))
    }

    function f(t) {
        e(t.target).closest(".main-header__menu-box").is(".main-header__menu-box") || t.preventDefault()
    }
    document.addEventListener("touchend", (function() {})), c(), g(), t.on("load resize orientationchange", (function() {
        c(), setTimeout(g, 100)
    })), t.on("orientationchange", (function() {
        e("html, body").animate({
            scrollTop: e(window).scrollTop() - 100
        })
    })), window.elementorFrontend && c(), window.addEventListener("load", (function() {
        e(".aheto-preloader").length && e(".aheto-preloader").fadeOut(400), a.hasClass("aheto-lazyload") && e("img[data-lazy-src]").ahetolazy()
    }));

    function m() {
        null
    }
    if (window.addEventListener("scroll", (function() {})), e(".aheto-header").length) {
        var w = e(".aheto-header .js-toggle-mobile-menu");
        e(".aheto-header .menu-item-has-children > a").after('<span class="dropdown-btn"></span>'), e(".aheto-header .menu-item-has-children .mega-menu__title").after('<span class="dropdown-btn"></span>');
        var v = e(".main-header").find(".main-header__menu-box");
        e(".aheto-header").append('<span class="body-overlay"></span>'), w.on("click", (function() {
            e("body").addClass("sidebar-open"), v.addClass("menu-open"), window.scrollX, window.scrollY
        }))
    }

    function b() {
        if (e(".aheto-header--fixed").length && a.hasClass("admin-bar")) {
            var t = 782 < n ? 32 : 46;
            e(".aheto-header--fixed").css("top", t)
        }
    }

    function C() {
        if (e(".aheto-header").length && t.width() <= i) {
            var a = e(".main-header").find(".main-header__menu-box");
            a.css("top", s), a.find(".btn-close").length || a.append('<span class="btn-close"><i class="ion-android-close"></i></span>'), e(".btn-close").on("click", (function() {
                a.removeClass("menu-open"), e("body").removeClass("sidebar-open"), m()
            })), e(".main-header").each((function() {
                var t = r - s;
                navigator.userAgent.match(/(iPod|iPad)/) && e(".aheto-header--fixed").length ? e(this).find(".main-header__menu-box").css({
                    height: 100 + t,
                    "padding-bottom": "156px"
                }) : e(this).find(".main-header__menu-box").css({
                    height: 100 + t,
                    "padding-bottom": "100px"
                })
            }))
        } else {
            e(".main-header").each((function() {
                e(this).find(".main-header__menu-box").css({
                    top: "auto",
                    height: "auto",
                    "padding-bottom": "0"
                })
            }));
            var n = e(".main-header").find(".main-header__menu-box");
            n.length && (n.removeClass("menu-open"), e("body").removeClass("sidebar-open"), m())
        }
    }

    function y(t, a, i) {
        return t.find(a).filter((function() {
            return e(this).closest(i).is(t)
        }))
    }

    function x(t, a) {
        var i, n = "swiper-unique-".concat(a);
        if (void 0 === t) return !1;
        t.classList.add(n), t.setAttribute("id", n);
        var o = e(t).parent(),
            s = y(o, ".swiper-button-prev", ".swiper"),
            r = y(o, ".swiper-button-next", ".swiper"),
            d = t.parentNode.querySelector(":not(.swiper-slide) .swiper-pagination");
        d && d.classList.add("swiper-pagination-" + n);
        var c = +t.getAttribute("data-speed") || 500,
            h = +t.getAttribute("data-initial_slide") || 0,
            u = +t.getAttribute("data-autoplay") || 0,
            p = +t.getAttribute("data-spaces") || 0,
            g = !!t.getAttribute("data-simulate_touch"),
            f = t.getAttribute("data-direction") || "horizontal",
            m = t.getAttribute("data-effect") || "slide",
            w = !!t.getAttribute("data-loop"),
            v = !!t.getAttribute("data-progress-move"),
            b = !!t.getAttribute("data-slideToClickedSlide"),
            C = !!t.getAttribute("data-centeredSlides"),
            x = +t.getAttribute("data-slidesPerColumn") || 1,
            k = t.getAttribute("data-pagination-type") || "bullets",
            P = t.getAttribute("data-slidesPerColumnFill") || "column",
            A = !!t.getAttribute("data-autoHeight") || !1,
            T = +t.getAttribute("data-lazy") || 0,
            z = +t.getAttribute("data-thumbs") || 0,
            S = +t.getAttribute("data-mousewheel") || 0;
        S = S && {
            invert: !1
        }, T = T && {
            loadPrevNext: !0,
            loadPrevNextAmount: T,
            loadOnTransitionStart: !0
        }, z = z && {
            swiper: l["swiper-unique-".concat(a - 1)]
        };
        var I = !1,
            L = !1,
            B = !1,
            E = !1,
            D = u / 100,
            H = 1;
        u && (I = {
            delay: u,
            disableOnInteraction: !1
        }), v && (o.find("#aheto-progress-" + n).length || o.prepend('<div id="aheto-progress-' + n + '" class="swiper__progress-line"></div>')), w && (L = 1);
        var O = t.getAttribute("data-slides") || 1,
            M = +t.getAttribute("data-slides_group") || 1,
            G = +t.getAttribute("data-slides_lg") || O,
            V = +t.getAttribute("data-slides_md") || G,
            q = +t.getAttribute("data-slides_sm") || V,
            F = +t.getAttribute("data-slides_xs") || q,
            N = +t.getAttribute("data-slides_group_lg") || M,
            W = +t.getAttribute("data-slides_group_md") || N,
            U = +t.getAttribute("data-slides_group_sm") || W,
            $ = +t.getAttribute("data-slides_group_xs") || U,
            R = +t.getAttribute("data-spaces_lg") || p,
            Q = +t.getAttribute("data-spaces_md") || R,
            X = +t.getAttribute("data-spaces_sm") || Q,
            Y = (_defineProperty(i = {}, 0, {
                slidesPerView: F,
                slidesPerGroup: $,
                spaceBetween: +t.getAttribute("data-spaces_xs") || X,
                slidesPerColumn: x
            }), _defineProperty(i, 575, {
                slidesPerView: q,
                slidesPerGroup: U,
                spaceBetween: X,
                slidesPerColumn: x
            }), _defineProperty(i, 768, {
                slidesPerView: V,
                slidesPerGroup: W,
                spaceBetween: Q,
                slidesPerColumn: x
            }), _defineProperty(i, 992, {
                slidesPerView: G,
                slidesPerGroup: N,
                spaceBetween: R,
                slidesPerColumn: x
            }), _defineProperty(i, 1200, {
                slidesPerView: O,
                slidesPerGroup: M,
                spaceBetween: p,
                slidesPerColumn: x
            }), i);
        l[n] = new Swiper("." + n, {
            simulateTouch: g,
            direction: f,
            initialSlide: h,
            speed: c,
            autoplay: I,
            spaceBetween: p,
            loop: w,
            autoHeight: A,
            lazy: T,
            thumbs: z,
            effect: m,
            slidesPerView: O,
            slideToClickedSlide: b,
            centeredSlides: C,
            breakpoints: Y,
            mousewheel: S,
            slidesPerColumn: x,
            slidesPerColumnFill: P,
            slidesPerGroup: M,
            loopFillGroupWithBlank: !1,
            slidesPerGroupSkip: L,
            loopAdditionalSlides: 4,
            roundLengths: !0,
            noSwiping: !0,
            updateOnWindowResize: !0,
            noSwipingClass: "swiper-no-swiping",
            watchSlidesVisibility: !0,
            slideVisibleClass: "swiper-slide-visible",
            coverflowEffect: {
                rotate: 30,
                slideShadows: !1
            },
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev'
            },
            pagination: {
                el: ".swiper-pagination-" + n,
                type: k,
                clickable: !0,
                renderBullet: function(e, a) {
                    return t.querySelector(".swiper-pagination--numeric") ? '<span class="' + a + '">' + (e < 9 ? "0" : "") + (e + 1) + "</span>" : '<span class="' + a + '"></span>'
                }
            },
            on: {
                init: function() {
                    if (r.length && r.hasClass("swiper-button-next--number") && (_(t, !1), j(this, t, !1)), r.length && r.hasClass("swiper-button-next--number-zero") && (_(t, !0), j(this, t, !0)), v) {
                        var a = 0;
                        B = setInterval((function() {
                            100 < a ? (e("#aheto-progress-" + n).width("0%"), clearInterval(B)) : (e("#aheto-progress-" + n).width(a + "%"), a++)
                        }), D)
                    }
                },
                slideChangeTransitionStart: function() {
                    v && 1 < H && (clearInterval(E), clearInterval(B), e("#aheto-progress-" + n).width("0%"), setTimeout((function() {
                        var t = 0;
                        E = setInterval((function() {
                            100 < t ? (e("#aheto-progress-" + n).width("0%"), clearInterval(E)) : (e("#aheto-progress-" + n).width(t + "%"), t++)
                        }), D)
                    }), c)), H++
                },
                slideChange: function() {
                    r.length && r.hasClass("swiper-button-next--number") && j(this, t, !1), r.length && r.hasClass("swiper-button-next--number-zero") && j(this, t, !0)
                },
                lazyImageReady: function(e, t) {
                    t.classList.contains("js-bg-swiper") && changeImgToBg(t)
                }
            }
        })
    }

    function _(t, a) {
        var i = e(t).parent(),
            n = i.find(".swiper-slide:not(.swiper-slide-duplicate)").length;
        a && (n = n < 10 ? "0" + n : n), i.find(".swiper-slides-total").html(n)
    }

    function j(t, a, i) {
        var n = e(a).parent(),
            o = t.realIndex + 1,
            s = n.find(".swiper-slide:not(.swiper-slide-duplicate)").length,
            r = o + 1;
        r = s < r ? r - s : r;
        var l = o - 1;
        l = l <= 0 ? s - l : l, i && (r = r < 10 ? "0" + r : r, l = l < 10 ? "0" + l : l), n.find(".swiper-slides-prev").html(l), n.find(".swiper-slides-next").html(r)
    }

    function k(a) {
        var i = t.scrollTop(),
            n = i + t.height(),
            o = e(a).offset().top;
        return i <= o && o <= n
    }

    function P() {
        e(".js-tab-list").on("click", (function(t) {
            t.preventDefault();
            var a = e(this).parent().index();
            e(this).parent().addClass("active").siblings().removeClass("active").closest(".js-tab").find(".js-tab-box").removeClass("active").eq(a).addClass("active")
        }))
    }
    if (window.addEventListener("load", (function() {
            b(), C(), e(".aheto-header").length && t.width() <= i && e(".main-header").each((function() {
                e(this).find(".menu-item-has-children .dropdown-btn").on("click", (function(t) {
                    t.stopPropagation(), e(this).parent().parent().parent().hasClass("menu-home-page-container") && e(this).closest(".menu-home-page-container").find(".dropdown-btn").not(this).next(".sub-menu,.mega-menu__list").slideUp(), e(this).next(".sub-menu,.mega-menu__list").slideToggle()
                }))
            }))
        })), e(window).on("resize orientationchange", (function() {
            b(), C(), i < n ? (a.removeClass("overflow-hidden"), document.body.removeEventListener("touchmove", f, {
                passive: !1
            })) : e(".aheto-header .js-toggle-mobile-menu").length && e(".aheto-header .js-toggle-mobile-menu").hasClass("is-active") && (a.addClass("overflow-hidden"), document.body.addEventListener("touchmove", f, {
                passive: !1
            }))
        })), e(".multi-lang").length && e(".multi-lang .js-lang").on("click", (function(t) {
            t.preventDefault(), e(this).closest(".multi-lang").find(".js-lang-list").slideToggle(100)
        })), e(window).on("load resize orientationchange", (function() {
            ! function() {
                var t = e(".aheto-header:not(.aheto-header--absolute):not(.aheto-header--fixed)"),
                    a = e(".aheto-footer"),
                    i = e("body.admin-bar").length ? 32 : 0,
                    n = t.length ? t.outerHeight() : 0,
                    o = a.length ? a.outerHeight() : 0;
                e(".aheto-full-min-height-js").length && e(".aheto-full-min-height-js").css("min-height", e(window).innerHeight() - n - i), e(".aheto-page-min-height-js").length && e(".aheto-page-min-height-js").css("min-height", e(window).innerHeight() - n - i - o), e(".aheto-page-height-js").length && e(".aheto-page-height-js").css("height", e(window).innerHeight() - n - i - o)
            }()
        })), window.changeImgToBg = function(t, a) {
            if (!t) return console.info("no img selector"), !1;
            e(t).each((function() {
                var t, i = e(this);
                if (i.hasClass("is-complete")) return !0;
                (t = (t = i.closest(a)).length ? t : i.parent()).css("background-image", "url(" + this.src + ")").addClass("s-back-switch"), i.addClass("is-complete").hide()
            }))
        }, changeImgToBg(".js-bg"), window.lazyLoadImg = function(e) {
            a.hasClass("aheto-lazyload") && e.ahetolazy()
        }, e(window).on("scroll load", (function() {
            30 <= e(this).scrollTop() ? e(".aheto-header--fixed").length && e(".aheto-header--fixed").addClass("header-scroll") : e(".aheto-header--fixed").length && e(".aheto-header--fixed").removeClass("header-scroll")
        })), window.initSwiper = function(e) {
            e && Array.prototype.forEach.call(e, x)
        }, e(window).on("load ", (function() {
            setTimeout((function() {
                e(window).trigger("resize")
            }), 200), initSwiper(d), changeImgToBg(".js-bg")
        })), e((function() {
            var t = e(".site-search");
            e(".js-open-search").on("click", (function() {
                t.addClass("open")
            })), e(".js-close-search").on("click", (function(e) {
                e.stopPropagation(), t.addClass("closing"), setTimeout((function() {
                    t.removeClass("open closing")
                }), 300)
            }))
        })), P(), e(".js-counter").length) {
        var A = function() {
                if (!z && k(T)) {
                    z = !0;
                    var t = [];
                    e(".js-counter").each((function() {
                        t.push(e(this).html())
                    })), T.each((function() {
                        e(this).prop("Counter", 0).animate({
                            Counter: e(this).text()
                        }, {
                            duration: 2500,
                            easing: "swing",
                            step: function(t) {
                                var a = e(this);
                                a.hasClass("js-percent") ? a.text(Math.floor(t) + "%") : a.hasClass("js-k") ? a.text(S(Math.floor(t) + "k")) : a.hasClass("js-plus") ? a.text("+" + Math.floor(t).toLocaleString("en")) : a.hasClass("js-whole") ? a.text(Math.floor(t)) : a.text(S(Math.floor(t)))
                            },
                            complete: function() {
                                var a = e(this);
                                a.hasClass("js-percent") || a.hasClass("js-k") || a.hasClass("js-plus") ? t.shift() : a.hasClass("js-whole") ? a.text(t.shift()) : a.text(S(t.shift()))
                            }
                        })
                    }))
                }
            },
            T = e(".js-counter"),
            z = !1;
        A(), t.scroll((function() {
            A()
        }))
    }

    function S(e) {
        for (;
            /(\d+)(\d{3})/.test(e.toString());) e = e.toString().replace(/(\d+)(\d{3})/, "$1,$2");
        return e
    }

    function I() {
        var a = e(".prog-bar");
        if (a.length) {
            var i = function() {
                    n || k(a) && (n = !0, a.each((function() {
                        var t = e(this).addClass("active"),
                            a = t.find(".prog-bar-perc").html();
                        t.find(".prog-bar-hldr").animate({
                            left: a + "%"
                        }, 2e3), t.find(".prog-bar-val").animate({
                            width: a + "%"
                        }, 2e3)
                    })))
                },
                n = !1;
            i(), t.scroll((function() {
                i()
            }))
        }
        var o = e(".js-chart-circle");
        if (o.length) {
            var s = function() {
                    r || k(o) && (o.addClass("active"), r = !0)
                },
                r = !1;
            s(), t.scroll((function() {
                s()
            }))
        }
    }
    I(), e(".aheto-content-block--bgImg").hover((function() {
        e(this).find(".aheto-content-block__info").slideDown(200)
    }), (function() {
        e(this).find(".aheto-content-block__info").slideUp(200)
    })), e(".js-accordion").on("click", (function(t) {
        t.preventDefault(), e(this).parent().find(".js-accordion-text").slideToggle((function() {
            e(this).is(":hidden") ? e(this).parent().removeClass("is-open") : e(this).parent().addClass("is-open")
        })), e(this).closest(".js-accordion-parent").data("multiple") || e(this).parent().siblings().removeClass("is-open").find(".js-accordion-text").hide(350)
    }));
    var L, B, E = e(".js-typed");

    function D() {
        if (L = e(".js-coming-soon").attr("data-dates"), B = new Date(L).getTime(), L) {
            e(".js-coming-soon-caption").each((function() {
                var a = 576 <= t.width() ? e(this).attr("data-desktop") : e(this).attr("data-mobile");
                e(this).html(a)
            }));
            var a = setInterval((function() {
                var t = (new Date).getTime(),
                    i = B - t,
                    n = Math.floor(i / 864e5),
                    o = Math.floor(i % 864e5 / 36e5);
                o = o < 10 ? "0" + o : o;
                var s = Math.floor(i % 36e5 / 6e4);
                s = s < 10 ? "0" + s : s;
                var r = Math.floor(i % 6e4 / 1e3);
                r = r < 10 ? "0" + r : r, e(".js-coming-soon-number.days").html(n), e(".js-coming-soon-number.hours").html(o), e(".js-coming-soon-number.minutes").html(s), e(".js-coming-soon-number.seconds").html(r), i < 0 && (clearInterval(a), e(".js-coming-soon-number").html("00"))
            }), 1e3)
        }
    }

    function H() {
        e(".aheto-coming-soon--default").length && e(".aheto-coming-soon--default").each((function() {
            var t = e(this).find(".aheto-coming-soon__number").css("font-size");
            e(this).find(".aheto-coming-soon__dots").css("line-height", t)
        }))
    }
    E.length && e(E).each((function(t) {
        var a = "js-typed-" + t,
            i = "#" + a,
            n = e(this).text();
        e(this).attr("id", a).attr("data-text", n).text("").addClass("init");
        var o = e(this).attr("data-text").split(","),
            s = 1 < o.length;
        new Typed(i, {
            strings: o,
            typeSpeed: 50,
            startDelay: 0,
            loop: s
        })
    })), t.on("load", (function() {
        D(), H()
    })), t.on("resize orientationchange", (function() {
        H()
    }));
    var O = e(".wpcf7-form-control.wpcf7-select");
    O.length && (O[0].onchange = function() {
        O.addClass("cf7-selected")
    }), e("select").change((function() {
        e(this).addClass("selected")
    }));
    var M = e(".js-video-btn");
    M.length && void 0 !== e.fn.magnificPopup && M.magnificPopup({
        disableOn: 700,
        type: "iframe",
        mainClass: "mfp-fade",
        removalDelay: 160,
        preloader: !1,
        fixedContentPos: !0,
        fixedBgPos: !0
    });
    var G = e(".js-popup-gallery");
    G.length && void 0 !== e.fn.magnificPopup && G.magnificPopup({
        delegate: ".js-popup-gallery-link",
        type: "image",
        tLoading: "Loading image #%curr%...",
        mainClass: "mfp-img-mobile",
        gallery: {
            enabled: !0,
            navigateByImgClick: !0,
            preload: [0, 1]
        },
        image: {
            tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
            titleSrc: function(e) {
                return e.el.attr("data-title") || ""
            }
        }
    });
    var V = e(".js-pricing-items");
    V && (N(V), e(window).on("resize", (function() {
        N(V)
    })));
    var q = e(".js-pricing-content");
    q && (N(q), e(window).on("resize", (function() {
        N(q)
    })));
    var F = e(".js-pricing-height");

    function N(t) {
        var a = [];
        t.css("min-height", "auto"), t.each((function() {
            var t = e(this).outerHeight(),
                i = e(this).attr("data-height-key") || "key";
            a[i] = t > (a[i] || 0) ? t : a[i]
        })), t.each((function() {
            var t = e(this).attr("data-height-key") || "key";
            e(this).css("min-height", a[t])
        }))
    }
    F && (N(F), e(window).on("resize", (function() {
        N(V)
    })));
    var W = e(".js-isotope"),
        U = e(".js-lazyload-button a"),
        $ = e(".js-lazyload-infinity p"),
        R = [];

    function Q() {
        W.length && (W.each((function() {
            var t = e(this).attr("data-layout") || "masonry",
                a = e(this).attr("data-cpt-id"),
                i = e(this).find(".aheto-cpt-article--static").length && "aheto-cpt__list--static-height";
            e(this).addClass(i), R[a] = e(this).isotope({
                percentPosition: !0,
                layoutMode: t,
                masonry: {
                    columnWidth: ".aheto-cpt-article--size"
                }
            })
        })), a.hasClass("aheto-lazyload") && W.find("[data-lazy-src]").ahetolazy("", (function() {
            setTimeout((function() {
                W.isotope("layout")
            }), 200)
        })))
    }
    e(window).on("load", (function() {
        Q()
    })), e(document).on("ready", (function() {
        ! function() {
            var t = null !== u("aheto-cpt-filter-page") ? u("aheto-cpt-filter-page") : "no-cookie-page";
            if (-1 === window.location.href.indexOf(t) && (p("aheto-cpt-filter"), p("aheto-cpt-filter-page")), null !== u("aheto-cpt-filter") && "" !== u("aheto-cpt-filter")) {
                var a = u("aheto-cpt-filter"),
                    i = e('.aheto-cpt-filter a[data-filter="' + a + '"]').closest(".aheto-cpt-filter");
                i.find("a").removeClass("is-active"), i.find('a[data-filter="' + a + '"]').addClass("is-active")
            }
        }()
    })), window.elementorFrontend && Q(), e("[data-filter]").on("click", (function(t) {
        t.preventDefault();
        var a = e(this),
            i = a.attr("data-filter"),
            n = a.attr("data-cpt-id");
        if (e("[data-cpt-id=" + n + "]").removeClass("is-active"), a.addClass("is-active"), a.closest(".aheto-cpt").find(".aheto-cpt-pagination").length) h("aheto-cpt-filter", i), u("aheto-cpt-filter-page") || h("aheto-cpt-filter-page", window.location.href), window.location.href = u("aheto-cpt-filter-page");
        else if (p("aheto-cpt-filter"), p("aheto-cpt-filter-page"), a.closest(".swiper-filter").length) {
            var o = a.closest(".swiper-filter").prev().find(".swiper-container").attr("id"),
                s = o.replace("swiper-unique-", "");
            e('.swiper-container[id="' + o + '"] .swiper-slide').addClass("non-swiper-slide").removeClass("swiper-slide"), e('.swiper-container[id="' + o + '"] .aheto-cpt-article' + i).parent().removeClass("non-swiper-slide").addClass("swiper-slide"), l[o].destroy(), x(document.getElementById(o), s)
        } else R[n].isotope({
            filter: i
        })
    })), U.on("click", (function(t) {
        t.preventDefault(), Z(e(this))
    }));
    var X, Y, J, K = (X = function() {
        $.each((function() {
            e(this).outerHeight() + e(this).offset().top < t.scrollTop() + o && Z(e(this))
        }))
    }, 250, function() {
        var e = this,
            t = arguments,
            a = Y;
        clearTimeout(J), J = setTimeout((function() {
            J = null, X.apply(e, t)
        }), 250), a && X.apply(e, t)
    });

    function Z(t) {
        var a = t.parent(),
            i = a.attr("data-cpt-id"),
            n = a.attr("data-loading-text"),
            o = a.attr("data-static-text"),
            s = e(".js-isotope[data-cpt-id=".concat(i, "]")),
            r = window[i];
        s.length && !s.hasClass("is-loading") && r && e.ajax({
            url: r.nextLink,
            type: "get",
            beforeSend: function() {
                s.addClass("is-loading"), t.addClass("is-loading").find("span").text(n)
            },
            success: function(a) {
                if (a) {
                    var n = e(a).find(".aheto-cpt-load").parent().find(".aheto-cpt-article").not(".aheto-cpt-article--size");
                    s.append(n), s.isotope("appended", n), s.isotope("layout"), s.imagesLoaded().progress((function() {
                        R[i].isotope("layout")
                    })), changeImgToBg(s.find(".js-bg")), r.nextPage = +r.nextPage + 1, r.nextLink = r.nextLink.replace(/\/page\/[0-9]?/, "/page/" + r.nextPage), r.nextPage > r.maxPage ? (s.addClass("is-all"), t.parent().hide()) : (s.removeClass("is-loading"), t.removeClass("is-loading").find("span").text(o))
                }
            }
        })
    }

    function ee(t) {
        void 0 !== e.fn.mediaelementplayer && e(t).mediaelementplayer()
    }
    e(window).on("scroll", K), window.initAudio = function(e) {
        e && Array.prototype.forEach.call(e, ee)
    }, e(window).on("load", (function() {
        initAudio(document.getElementsByClassName("js-audio"))
    })), e(".aht-page__socials__icon").on("click", (function() {
        e(this).toggleClass("active")
    })), e("[data-share]").on("click", (function(e) {
        e.preventDefault();
        var t = window,
            a = this.getAttribute("data-share"),
            i = void 0 !== t.screenLeft ? t.screenLeft : screen.left,
            n = void 0 !== t.screenTop ? t.screenTop : screen.top,
            o = t.innerWidth / 2 - 300 + i,
            s = t.innerHeight / 2 - 300 + n,
            r = t.open(a, "", "scrollbars=yes, width=600, height=600, top=" + s + ", left=" + o);
        return t.focus && r.focus(), !1
    })), t.on("elementor/frontend/init", (function() {
        var t = !1; - 1 < window.location.href.indexOf("elementor-preview") && elementorFrontend.hooks.addAction("frontend/element_ready/widget", (function(a) {
            if (void 0 !== a.context) {
                var i = a.context.dataset.widget_type;
                if (-1 < i.indexOf("progress-bar")) I();
                else if (-1 < i.indexOf("custom-post-types") && !t) {
                    var n = document.createElement("script");
                    n.src = "//cdnjs.cloudflare.com/ajax/libs/jquery.isotope/3.0.6/isotope.pkgd.min.js?ver=1", document.getElementsByTagName("head")[0].appendChild(n), t = !0, Q()
                } else -1 < i.indexOf("coming-soon") ? (D(), H()) : -1 < i.indexOf("title-bar") && P()
            }
            e(".swiper-container").length && (initSwiper(d), x())
        }))
    })), e(".js-aheto-lg").length && e(".js-aheto-lg").each((function() {
        e(this).lightGallery({
            selector: ".js-popup-gallery-link",
            mode: "lg-zoom-out",
            preload: 3,
            hash: !1,
            closable: !0,
            speed: 1e3,
            backdropDuration: 400,
            thumbnail: !1,
            share: !1,
            startClass: "lg-start-fade",
            download: !1
        })
    })), e(".widget_media_gallery").length && e(".widget_media_gallery").each((function() {
        e(this).lightGallery({
            selector: ".gallery-item a",
            mode: "lg-zoom-out",
            preload: 3,
            hash: !1,
            closable: !0,
            speed: 1e3,
            backdropDuration: 400,
            thumbnail: !1,
            share: !1,
            startClass: "lg-start-fade",
            download: !1
        })
    }))
}(jQuery);