PageSourceSearch

https://www.evalandgo.com/wp-content/plugins/happy-elementor-addon…/assets/js/happy-addons-pro.js?ver=2.13.0

js evalandgo.com collected 2026-10-01 10:16:39 UTC 154,393 bytes, 3,871 lines download raw bytes

1"use strict";
2
3function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4window.Happy = window.Happy || {};
5(function ($, Happy, w) {
6  var $window = $(w);
7  $(function () {
8    var $container = $('.ha-fsb-container');
9    if ($container.length > 0) {
10      if (window.history && window.history.pushState) {
11        ha_manage_fsb();
12      }
13      ;
14      $(document.body).on("added_to_cart", function (event, fragments, cart_hash, $button) {
15        ha_manage_fsb();
16      });
17      $(document.body).on("removed_from_cart", function (event, fragments, cart_hash, $button) {
18        ha_manage_fsb();
19      });
20    }
21    function ha_manage_fsb() {
22      $.ajax({
23        url: HappyProLocalize.ajax_url,
24        type: "POST",
25        data: {
26          action: "ha_get_cart_subtotal_action",
27          security: HappyProLocalize.nonce
28        },
29        success: function success(response) {
30          var $data = JSON.parse(response);
31          var $subTotalAmount = $data.subTotalAmount;
32          if ($data.status == 'true' && $subTotalAmount >= 0) {
33            var $container = $('.ha-fsb-container');
34            var $elem = $container.find('.ha-fsb-size');
35            var $settings = $container.data('fsb_settings');
36            if ($settings != undefined) {
37              var $aimationSpeed = $settings.hasOwnProperty('ha_fsb_animation_speed') ? $settings.ha_fsb_animation_speed : 15;
38              var $progressType = $settings.hasOwnProperty('progress_type') ? $settings.progress_type : 'percent';
39              var $currencySymbol = $settings.hasOwnProperty('currencySymbol') && $progressType == 'percent' ? '%' : $settings.currencySymbol;
40              var $targetAmount = $settings.hasOwnProperty('target_amount') ? $settings.target_amount : 0;
41              var $totalPercent = 0;
42              if (parseFloat($subTotalAmount) >= parseFloat($targetAmount)) {
43                $totalPercent = 100;
44              } else {
45                if (parseFloat($targetAmount) == 0) {
46                  $totalPercent = 0;
47                } else {
48                  $totalPercent = parseFloat($subTotalAmount) * 100 / parseFloat($targetAmount);
49                }
50              }
51              $totalPercent = parseFloat(Math.round($totalPercent)) >= 100 ? 100 : parseFloat(Math.round($totalPercent));
52              var $progressText = $progressType == 'percent' ? $totalPercent : $subTotalAmount;
53              var defaultWidth = $(window).width() <= 768 ? 12 : 5;
54              if ($totalPercent > 0) {
55                $elem.text($progressText + $currencySymbol);
56                $elem.css({
57                  'width': $totalPercent + "%",
58                  'transition': 'width ' + $aimationSpeed + 'ms ease-in-out'
59                });
60              }
61              fsbMessageControl($totalPercent);
62              if ($progressText <= 0) {
63                $elem.css('width', +defaultWidth + "%");
64                $elem.text('0' + $currencySymbol);
65              }
66            }
67          }
68        },
69        error: function error(_error) {}
70      });
71    }
72    ;
73    function fsbMessageControl() {
74      var totalPercent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
75      var fsbContainer = $('.ha-fsb-container');
76      var settings = fsbContainer.data('fsb_settings');
77      if (fsbContainer && settings) {
78        if (totalPercent >= 100) {
79          $('.ha-fsb-inner-content').html(settings.fsb_success_message);
80        } else {
81          $('.ha-fsb-inner-content').html(settings.announcement);
82        }
83      }
84    }
85    ;
86    function log(event, item, level) {
87      $(document).on(event, item, level);
88    }
89    var e;
90    e = $(".ha-menu-container");
91    $(e).each(function () {
92      var button = $(this);
93      if ("yes" != button.attr("ha-dom-added")) {
94        if (0 === button.parents(".elementor-widget-ha-nav-menu").length) {
95          button.parents(".ha-wid-con").addClass("ha_menu_responsive_tablet");
96        }
97        button.attr("ha-dom-added", "yes");
98      }
99    });
100    $(".ha-dropdown-has > a").on("click", function (event) {
101      if (!$(this).parents(".ha-navbar-nav, .ha-vertical-navbar-nav").hasClass("submenu-click-on-icon") || $(event.target).hasClass("ha-submenu-indicator-wrap")) {
102        event.preventDefault();
103        var $oElemDragged = $(this).parent().find(">.ha-dropdown, >.ha-megamenu-panel");
104        $oElemDragged.find(".ha-dropdown-open").removeClass("ha-dropdown-open");
105        if ($oElemDragged.hasClass("ha-dropdown-open")) {
106          $oElemDragged.removeClass("ha-dropdown-open");
107        } else {
108          $oElemDragged.addClass("ha-dropdown-open");
109        }
110      }
111    });
112
113    // $(".ha-menu-toggler").on("click", function(event) {
114    //     event.preventDefault();
115
116    //     var el_form_group = $(this).parents(".ha-menu-container").parent();
117    //     if (el_form_group.length < 1) {
118    //         el_form_group = $(this).parent();
119    //     }
120    //     var $wrapElement = el_form_group.find(".ha-menu-offcanvas-elements");
121    //     if ($wrapElement.hasClass("active")) {
122    //         $wrapElement.removeClass("active");
123    //     } else {
124    //         $wrapElement.addClass("active");
125    //     }
126    // });
127
128    $(".ha-navbar-nav li a").on("click", function (event) {
129      if (!$(this).attr("href") && "ha-submenu-indicator-wrap" == event.target.className) {
130        var thirdItem = $(this);
131        var lnk = thirdItem.get(0);
132        var oldUrl = lnk.href;
133        var sepor = oldUrl.indexOf("#");
134        var s = thirdItem.parents(".ha-menu-container").hasClass("ha-nav-menu-one-page-yes");
135        if (-1 !== sepor && oldUrl.length > 1 && s && lnk.pathname == window.location.pathname) {
136          event.preventDefault();
137          thirdItem.parents(".ha-wid-con").find(".ha-menu-close").trigger("click");
138        }
139      }
140    });
141  });
142  function debounce(func, wait, immediate) {
143    var timeout;
144    return function () {
145      var context = this,
146        args = arguments;
147      var later = function later() {
148        timeout = null;
149        if (!immediate) func.apply(context, args);
150      };
151      var callNow = immediate && !timeout;
152      clearTimeout(timeout);
153      timeout = setTimeout(later, wait);
154      if (callNow) func.apply(context, args);
155    };
156  }
157  $window.on("elementor/frontend/init", function () {
158    if (typeof haDisplayCondition != "undefined" && haDisplayCondition.status == "true") {
159      // Set user time in cookie
160      var HappyLocalTimeZone = new Date().toString().match(/([A-Z]+[\+-][0-9]+.*)/)[1];
161      var ha_secure = document.location.protocol === "https:" ? "secure" : "";
162      document.cookie = "HappyLocalTimeZone=" + HappyLocalTimeZone + ";SameSite=Strict;" + ha_secure;
163    } else {
164      var now = new Date();
165      now.setTime(now.getTime() - 1000 * 3600);
166      document.cookie = "HappyLocalTimeZone=;expires=" + now.toUTCString() + ";";
167    }
168    var CountDown = function CountDown($scope) {
169      var $item = $scope.find(".ha-countdown");
170      var $countdown_item = $item.find(".ha-countdown-item");
171      var $end_action = $item.data("end-action");
172      var $redirect_link = $item.data("redirect-link");
173      var $end_action_div = $item.find(".ha-countdown-end-action");
174      var $editor_mode_on = $scope.hasClass("elementor-element-edit-mode");
175      $item.countdown({
176        end: function end() {
177          if (("message" === $end_action || "img" === $end_action) && $end_action_div !== undefined) {
178            $countdown_item.css("display", "none");
179            $end_action_div.css("display", "block");
180          } else if ("url" === $end_action && $redirect_link !== undefined && $editor_mode_on !== true) {
181            window.location.replace($redirect_link);
182          }
183        }
184      });
185    };
186    var SliderBase = elementorModules.frontend.handlers.Base.extend({
187      onInit: function onInit() {
188        elementorModules.frontend.handlers.Base.prototype.onInit.apply(this, arguments);
189        this.run();
190      },
191      getDefaultSettings: function getDefaultSettings() {
192        return {
193          selectors: {
194            container: ".ha-slider-container"
195          }
196        };
197      },
198      getDefaultElements: function getDefaultElements() {
199        var selectors = this.getSettings("selectors");
200        return {
201          $container: this.$element.find(selectors.container)
202        };
203      },
204      getReadySettings: function getReadySettings() {
205        var $this = this;
206        var slidesPerView = parseInt(this.getElementSettings("slides_per_view")) || 1;
207        if (this.getElementSettings("thumbs_navigation") == "yes") {
208          var selectorThumbs = this.elements.$container.find(".ha-slider-gallery-thumbs");
209          var haGallaryThumbs = new HaSwiper(selectorThumbs[0], {
210            spaceBetween: this.getElementSettings("space_between_thumbs"),
211            freeMode: true,
212            watchSlidesVisibility: true,
213            watchSlidesProgress: true
214          });
215        }
216        // TODO: Need to fix that in future. Currently, Disabled
217        var tempEffect = this.getElementSettings("effect");
218        if (tempEffect == 'cube') {
219          tempEffect = false;
220        }
221        var settings = {
222          direction: this.getElementSettings("slider_direction"),
223          slidesPerView: slidesPerView || 1,
224          spaceBetween: parseInt(this.getElementSettings("space_between_slides")) || 0,
225          loop: !!(this.getElementSettings("infinity_loop") || false),
226          speed: parseInt(this.getElementSettings("effect_speed")),
227          effect: this.getElementSettings("slider_type") == "multiple" ? this.getElementSettings("effect_multiple") : tempEffect,
228          ha_animation: this.getElementSettings("slider_content_animation"),
229          sliderType: this.getElementSettings("slider_type")
230        };
231        if (this.getElementSettings("effect") == "flip") {
232          settings.flipEffect = {
233            limitRotation: true,
234            slideShadows: true
235          };
236        }
237        // TODO: Need to fix that in future. Currently, Disabled
238        // if (this.getElementSettings("effect") == "cube") {
239        //     settings.cubeEffect = {
240        //         shadow: true,
241        //         slideShadows: true,
242        //         shadowOffset: 20,
243        //         shadowScale: 0.94,
244        //     };
245        // }
246        if (this.getElementSettings("effect_multiple") == "coverflow") {
247          settings.coverflowEffect = {
248            rotate: 50,
249            stretch: 0,
250            depth: 100,
251            modifier: 1,
252            slideShadows: true
253          };
254        }
255        if (this.getElementSettings("slider_type") == "multiple") {
256          var bpObj = {
257            desktop: {
258              slidesPerView: slidesPerView || 1,
259              spaceBetween: parseInt(this.getElementSettings("space_between_slides")) || 0
260            }
261          };
262          var breakpoints = elementorFrontend.config.responsive.breakpoints;
263          $.each(breakpoints, function (idx, val) {
264            if (val.is_enabled) {
265              bpObj[idx] = {
266                screenSize: val.value,
267                slidesPerView: parseInt($this.getElementSettings("slides_per_view_" + idx)) || slidesPerView,
268                spaceBetween: parseInt($this.getElementSettings("space_between_slides_" + idx)) || 0
269              };
270            }
271          });
272          settings.customBreakpoints = bpObj;
273          settings.customMultiple = true;
274        }
275        if (this.getElementSettings("autoplay") == "yes") {
276          settings.autoplay = {
277            delay: this.getElementSettings("autoplay_speed"),
278            disableOnInteraction: false,
279            stopOnLastSlide: !(this.getElementSettings("infinity_loop") || false)
280          };
281        }
282        if (this.getElementSettings("arrow_navigation") == "yes") {
283          var selectorNext = this.elements.$container.find(".ha-slider-next");
284          var selectorPrev = this.elements.$container.find(".ha-slider-prev");
285          settings.navigation = {
286            nextEl: selectorNext[0],
287            prevEl: selectorPrev[0]
288          };
289        }
290        if (this.getElementSettings("pagination_type") == "dots") {
291          var selectorPagi = this.elements.$container.find(".ha-slider-pagination");
292          settings.pagination = {
293            el: selectorPagi[0],
294            clickable: true
295          };
296        }
297        if (this.getElementSettings("pagination_type") == "progressbar") {
298          var selectorPagi = this.elements.$container.find(".ha-slider-pagination");
299          settings.pagination = {
300            el: selectorPagi[0],
301            clickable: true,
302            type: "progressbar"
303          };
304        }
305        if (this.getElementSettings("pagination_type") == "numbers") {
306          var selectorPagi = this.elements.$container.find(".ha-slider-pagination");
307          settings.pagination = {
308            el: selectorPagi[0],
309            clickable: true,
310            type: this.getElementSettings("number_pagination_type"),
311            renderBullet: function renderBullet(index, className) {
312              return '<span class="' + className + '">' + (index + 1) + "</span>";
313            },
314            renderFraction: function renderFraction(currentClass, totalClass) {
315              return '<span class="' + currentClass + '"></span>' + "<span>/</span>" + '<span class="' + totalClass + '"></span>';
316            }
317          };
318        }
319        if (this.getElementSettings("scroll_bar") == "yes") {
320          var selectorScroll = this.elements.$container.find(".ha-slider-scrollbar");
321          settings.scrollbar = {
322            el: selectorScroll[0],
323            hide: this.getElementSettings("scroll_bar_visibility") == "true",
324            draggable: true
325          };
326        }
327        if (this.getElementSettings("thumbs_navigation") == "yes") {
328          settings.thumbs = {
329            swiper: haGallaryThumbs
330          };
331        }
332        return $.extend({}, settings);
333      },
334      run: function run() {
335        var elContainer = this.elements.$container;
336        var slider = elContainer.find(".ha-slider-container");
337        var readySettings = this.getReadySettings();
338        var sliderObj = new HaSwiper(slider[0], readySettings);
339        if (readySettings.customMultiple) {
340          $(window).on('resize', function () {
341            var mode = $('body').attr('data-elementor-device-mode');
342            sliderObj.params.slidesPerView = readySettings.customBreakpoints[mode].slidesPerView;
343            sliderObj.params.spaceBetween = readySettings.customBreakpoints[mode].spaceBetween;
344            sliderObj.update();
345          }).resize();
346        }
347        sliderObj.on("slideChange", function () {
348          if (readySettings.sliderType == "multiple") {
349            return;
350          }
351          var aI = sliderObj.activeIndex;
352          var elSlide = elContainer.find(".ha-slider-slide");
353          var elSlideContent = elContainer.find(".ha-slider-content");
354          var currentSlide = elSlideContent.eq(aI);
355          currentSlide.hide();
356          if (currentSlide.length <= 0) {}
357          setTimeout(function () {
358            currentSlide.show();
359          }, readySettings.speed);
360          elSlide.eq(aI).find(".elementor-invisible, .animated").each(function (e, t) {
361            var i = $(this).data("settings");
362            if (i && (i._animation || i.animation)) {
363              var n = i._animation_delay ? i._animation_delay : 0,
364                a = i._animation || i.animation;
365              $(this).removeClass("elementor-invisible");
366              $(this).addClass(a + " animated");
367            }
368          });
369        });
370        sliderObj.on("transitionEnd", function () {
371          var aI = sliderObj.activeIndex;
372          var elSlide = elContainer.find(".ha-slider-slide");
373          var elSlideContent = elContainer.find(".ha-slider-content");
374          var currentSlide = elSlideContent.eq(aI);
375          setTimeout(function () {
376            elSlide.eq(aI).find(".animated").each(function (e, t) {
377              var i = $(this).data("settings");
378              if (i && (i._animation || i.animation)) {
379                var n = i._animation_delay ? i._animation_delay : 0,
380                  a = i._animation || i.animation;
381                $(this).removeClass(a);
382              }
383            });
384          }, readySettings.speed);
385        });
386      }
387    });
388    var CarouselBase = elementorModules.frontend.handlers.Base.extend({
389      onInit: function onInit() {
390        elementorModules.frontend.handlers.Base.prototype.onInit.apply(this, arguments);
391        this.run();
392      },
393      getDefaultSettings: function getDefaultSettings() {
394        return {
395          selectors: {
396            container: ".ha-carousel-container"
397          },
398          arrows: false,
399          dots: false,
400          checkVisible: false,
401          infinite: true,
402          slidesToShow: 3,
403          rows: 0,
404          prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-chevron-left"></i></button>',
405          nextArrow: '<button type="button" class="slick-next"><i class="fa fa-chevron-right"></i></button>'
406        };
407      },
408      getDefaultElements: function getDefaultElements() {
409        var selectors = this.getSettings("selectors");
410        return {
411          $container: this.findElement(selectors.container)
412        };
413      },
414      onElementChange: function onElementChange() {
415        this.elements.$container.slick("unslick");
416        this.run();
417      },
418      getReadySettings: function getReadySettings() {
419        var $rtl = $('html[dir="rtl"]').length == 1 || $('body').hasClass('rtl');
420        if ('yes' == this.getElementSettings('vertical')) {
421          $rtl = false; // for vertical direction rtl is off
422        }
423        var settings = {
424          infinite: !!this.getElementSettings("loop"),
425          autoplay: !!this.getElementSettings("autoplay"),
426          autoplaySpeed: this.getElementSettings("autoplay_speed"),
427          speed: this.getElementSettings("animation_speed"),
428          centerMode: !!this.getElementSettings("center"),
429          vertical: !!this.getElementSettings("vertical"),
430          //slidesToScroll: 1,
431          rtl: $rtl
432        };
433        switch (this.getElementSettings("navigation")) {
434          case "arrow":
435            settings.arrows = true;
436            break;
437          case "dots":
438            settings.dots = true;
439            break;
440          case "both":
441            settings.arrows = true;
442            settings.dots = true;
443            break;
444        }
445        var slides_to_scroll = !!this.getElementSettings('slides_to_scroll');
446        settings.slidesToShow = parseInt(this.getElementSettings("slides_to_show")) || 1;
447        settings.slidesToScroll = slides_to_scroll ? parseInt(this.getElementSettings('slides_to_show')) || 1 : 1;
448        settings.responsive = [{
449          breakpoint: elementorFrontend.config.breakpoints.lg,
450          settings: {
451            slidesToShow: parseInt(this.getElementSettings("slides_to_show_tablet")) || settings.slidesToShow,
452            slidesToScroll: slides_to_scroll ? parseInt(this.getElementSettings('slides_to_show_tablet')) || settings.slidesToShow : 1
453          }
454        }, {
455          breakpoint: elementorFrontend.config.breakpoints.md,
456          settings: {
457            slidesToShow: parseInt(this.getElementSettings("slides_to_show_mobile")) || parseInt(this.getElementSettings("slides_to_show_tablet")) || settings.slidesToShow,
458            slidesToScroll: slides_to_scroll ? parseInt(this.getElementSettings('slides_to_show_mobile')) || parseInt(this.getElementSettings('slides_to_show_tablet')) || settings.slidesToShow : 1
459          }
460        }];
461        return $.extend({}, this.getSettings(), settings);
462      },
463      run: function run() {
464        this.elements.$container.slick(this.getReadySettings());
465      }
466    });
467
468    // Source Code
469    var SourceCode = function SourceCode($scope) {
470      var $item = $scope.find('.ha-source-code');
471      var $lng_type = $item.data('lng-type');
472      var $after_copy_text = $item.data('after-copy');
473      var $code = $item.find('code.language-' + $lng_type);
474      var $copy_btn = $scope.find('.ha-copy-code-button');
475      $copy_btn.on('click', function () {
476        var $temp = $("<textarea>");
477        $(this).append($temp);
478        $temp.val($code.text()).select();
479        document.execCommand("copy");
480        $temp.remove();
481        if ($after_copy_text.length) {
482          $(this).text($after_copy_text);
483        }
484      });
485      if ($lng_type !== undefined && $code !== undefined) {
486        Prism.highlightElement($code.get(0));
487      }
488    };
489
490    // Animated text
491    var AnimatedText = function AnimatedText($scope) {
492      var $item = $scope.find(".cd-headline"),
493        $animationDelay = $item.data("animation-delay");
494      happyAnimatedText({
495        selector: $item,
496        animationDelay: $animationDelay
497      });
498    };
499    //Instagram Feed
500    var InstagramFeed = function InstagramFeed($scope) {
501      var button = $scope.find(".ha-insta-load-more");
502      var instagram_wrap = $scope.find(".ha-insta-default");
503      button.on("click", function (e) {
504        e.preventDefault();
505        var $self = $(this),
506          query_settings = $self.data("settings"),
507          total = $self.data("total"),
508          items = $scope.find(".ha-insta-item").length;
509        $.ajax({
510          url: HappyProLocalize.ajax_url,
511          type: "POST",
512          data: {
513            action: "ha_instagram_feed_action",
514            security: HappyProLocalize.nonce,
515            query_settings: query_settings,
516            loaded_item: items
517          },
518          success: function success(response) {
519            if (total > items) {
520              $(response).appendTo(instagram_wrap);
521            } else {
522              $self.text("All Loaded").addClass("loaded");
523              setTimeout(function () {
524                $self.css({
525                  display: "none"
526                });
527              }, 800);
528            }
529          },
530          error: function error(_error2) {}
531        });
532      });
533    };
534    //Scrolling Image
535    var ScrollingImage = elementorModules.frontend.handlers.Base.extend({
536      onInit: function onInit() {
537        elementorModules.frontend.handlers.Base.prototype.onInit.apply(this, arguments);
538        this.wrapper = this.$element.find(".ha-scrolling-image-wrapper");
539        this.run();
540      },
541      onElementChange: function onElementChange() {
542        this.run();
543      },
544      run: function run() {
545        var container_height = this.wrapper.innerHeight(),
546          container_width = this.wrapper.innerWidth(),
547          image_align = this.wrapper.data("align"),
548          scroll_direction = this.wrapper.data("scroll-direction"),
549          items = this.wrapper.find(".ha-scrolling-image-container"),
550          single_image_box = items.find(".ha-scrolling-image-item"),
551          scroll = "scroll" + image_align + scroll_direction + parseInt(container_height) + parseInt(container_width),
552          duration = this.wrapper.data("duration"),
553          direction = "normal",
554          horizontal_align_width = 10,
555          vertical_align_height = 10;
556        var start = {
557            transform: "translateY(" + container_height + "px)"
558          },
559          end = {
560            transform: "translateY(-101%)"
561          };
562        if ("bottom" === scroll_direction || "right" === scroll_direction) {
563          direction = "reverse";
564        }
565        if ("ha-horizontal" === image_align) {
566          start = {
567            transform: "translateX(" + container_width + "px)"
568          };
569          end = {
570            transform: "translateX(-101%)"
571          };
572          single_image_box.each(function () {
573            horizontal_align_width += $(this).outerWidth(true);
574          });
575          items.css({
576            width: horizontal_align_width,
577            display: "flex"
578          });
579          items.find("img").css({
580            "max-width": "100%"
581          });
582          single_image_box.css({
583            display: "inline-flex"
584          });
585        }
586        if ("ha-vertical" === image_align) {
587          single_image_box.each(function () {
588            vertical_align_height += $(this).outerHeight(true);
589          });
590        }
591        $.keyframe.define([{
592          name: scroll,
593          "0%": start,
594          "100%": end
595        }]);
596        items.playKeyframe({
597          name: scroll,
598          duration: duration.toString() + "ms",
599          timingFunction: "linear",
600          delay: "0s",
601          iterationCount: "infinite",
602          direction: direction,
603          fillMode: "none",
604          complete: function complete() {}
605        });
606      }
607    });
608    //Pricing Table ToolTip
609    var PricingTableToolTip = function PricingTableToolTip($scope) {
610      var tooltip_area = $scope.find(".ha-pricing-table-feature-tooltip");
611      tooltip_area.on({
612        mouseenter: function mouseenter(e) {
613          var $this = $(this),
614            direction = $this[0].getBoundingClientRect(),
615            tooltip = $this.find(".ha-pricing-table-feature-tooltip-text"),
616            tooltipW = tooltip.outerWidth(true),
617            tooltipH = tooltip.outerHeight(true),
618            W_width = $(window).width(),
619            W_height = $(window).height();
620          tooltip.css({
621            left: "0",
622            right: "auto",
623            top: "calc(100% + 1px)",
624            bottom: "auto"
625          });
626          if (W_width - direction.left < tooltipW && direction.right < tooltipW) {
627            tooltip.css({
628              left: "calc(50% - (" + tooltipW + "px/2))"
629            });
630          } else if (W_width - direction.left < tooltipW) {
631            tooltip.css({
632              left: "auto",
633              right: "0"
634            });
635          }
636          if (W_height - direction.bottom < tooltipH) {
637            tooltip.css({
638              top: "auto",
639              bottom: "calc(100% + 1px)"
640            });
641          }
642        }
643      });
644    };
645    var TabHandlerBase = elementorModules.frontend.handlers.Base.extend({
646      $activeContent: null,
647      getDefaultSettings: function getDefaultSettings() {
648        return {
649          selectors: {
650            tabTitle: ".ha-tab__title",
651            tabContent: ".ha-tab__content"
652          },
653          classes: {
654            active: "ha-tab--active"
655          },
656          showTabFn: "show",
657          hideTabFn: "hide",
658          toggleSelf: false,
659          hidePrevious: true,
660          autoExpand: true
661        };
662      },
663      getDefaultElements: function getDefaultElements() {
664        var selectors = this.getSettings("selectors");
665        return {
666          $tabTitles: this.findElement(selectors.tabTitle),
667          $tabContents: this.findElement(selectors.tabContent)
668        };
669      },
670      activateDefaultTab: function activateDefaultTab() {
671        var settings = this.getSettings();
672        if (!settings.autoExpand || "editor" === settings.autoExpand && !this.isEdit) {
673          return;
674        }
675        var defaultActiveTab = this.getEditSettings("activeItemIndex") || 1,
676          originalToggleMethods = {
677            showTabFn: settings.showTabFn,
678            hideTabFn: settings.hideTabFn
679          };
680        // Toggle tabs without animation to avoid jumping
681        this.setSettings({
682          showTabFn: "show",
683          hideTabFn: "hide"
684        });
685        this.changeActiveTab(defaultActiveTab);
686        // Return back original toggle effects
687        this.setSettings(originalToggleMethods);
688      },
689      deactivateActiveTab: function deactivateActiveTab(tabIndex) {
690        var settings = this.getSettings(),
691          activeClass = settings.classes.active,
692          activeFilter = tabIndex ? '[data-tab="' + tabIndex + '"]' : "." + activeClass,
693          $activeTitle = this.elements.$tabTitles.filter(activeFilter),
694          $activeContent = this.elements.$tabContents.filter(activeFilter);
695        $activeTitle.add($activeContent).removeClass(activeClass);
696        $activeContent[settings.hideTabFn]();
697      },
698      activateTab: function activateTab(tabIndex) {
699        var settings = this.getSettings(),
700          activeClass = settings.classes.active,
701          $requestedTitle = this.elements.$tabTitles.filter('[data-tab="' + tabIndex + '"]'),
702          $requestedContent = this.elements.$tabContents.filter('[data-tab="' + tabIndex + '"]');
703        $requestedTitle.add($requestedContent).addClass(activeClass);
704        $requestedContent[settings.showTabFn]();
705      },
706      isActiveTab: function isActiveTab(tabIndex) {
707        return this.elements.$tabTitles.filter('[data-tab="' + tabIndex + '"]').hasClass(this.getSettings("classes.active"));
708      },
709      bindEvents: function bindEvents() {
710        var _this = this;
711        this.elements.$tabTitles.on({
712          keydown: function keydown(event) {
713            if ("Enter" === event.key) {
714              if ('A' == event.currentTarget.tagName && event.currentTarget.classList.contains('ha-tab__title')) {
715                //this conditional scope in only for advance tab widget
716                return;
717              }
718              event.preventDefault();
719              _this.changeActiveTab(event.currentTarget.getAttribute("data-tab"));
720            }
721          },
722          click: function click(event) {
723            if ('A' == event.currentTarget.tagName && event.currentTarget.classList.contains('ha-tab__title')) {
724              //this conditional scope in only for advance tab widget
725              return;
726            }
727            event.preventDefault();
728            _this.changeActiveTab(event.currentTarget.getAttribute("data-tab"));
729          }
730        });
731      },
732      onInit: function onInit() {
733        elementorModules.frontend.handlers.Base.prototype.onInit.apply(this, arguments);
734        this.activateDefaultTab();
735      },
736      onEditSettingsChange: function onEditSettingsChange(propertyName) {
737        if ("activeItemIndex" === propertyName) {
738          this.activateDefaultTab();
739        }
740      },
741      changeActiveTab: function changeActiveTab(tabIndex) {
742        var isActiveTab = this.isActiveTab(tabIndex),
743          settings = this.getSettings();
744        if ((settings.toggleSelf || !isActiveTab) && settings.hidePrevious) {
745          this.deactivateActiveTab();
746        }
747        if (!settings.hidePrevious && isActiveTab) {
748          this.deactivateActiveTab(tabIndex);
749        }
750        if (!isActiveTab) {
751          this.activateTab(tabIndex);
752        }
753        $(window).trigger("resize");
754      }
755    });
756    var TimeLine = function TimeLine($scope) {
757      var T_ID = $scope.data("id");
758      var timeline = $scope.find(".ha-timeline-wrap");
759      var dataScroll = timeline.data("scroll");
760      var timeline_block = timeline.find(".ha-timeline-block");
761      var event = "scroll.timelineScroll" + T_ID + " resize.timelineScroll" + T_ID;
762      function scroll_tree() {
763        timeline_block.each(function () {
764          var block_height = $(this).outerHeight(true);
765          var $offsetTop = $(this).offset().top;
766          var window_middle_p = $window.scrollTop() + $window.height() / 2;
767          if ($offsetTop < window_middle_p) {
768            $(this).addClass("ha-timeline-scroll-tree");
769          } else {
770            $(this).removeClass("ha-timeline-scroll-tree");
771          }
772          var scroll_tree_wrap = $(this).find(".ha-timeline-tree-inner");
773          var scroll_height = $window.scrollTop() - scroll_tree_wrap.offset().top + $window.outerHeight() / 2;
774          if ($offsetTop < window_middle_p && timeline_block.hasClass("ha-timeline-scroll-tree")) {
775            if (block_height > scroll_height) {
776              scroll_tree_wrap.css({
777                height: scroll_height * 1.5 + "px"
778              });
779            } else {
780              scroll_tree_wrap.css({
781                height: block_height * 1.2 + "px"
782              });
783            }
784          } else {
785            scroll_tree_wrap.css("height", "0px");
786          }
787        });
788      }
789      if ("yes" === dataScroll) {
790        scroll_tree();
791        $window.on(event, scroll_tree);
792      } else {
793        $window.off(event);
794      }
795    };
796    var HotSpots = elementorModules.frontend.handlers.Base.extend({
797      onInit: function onInit() {
798        elementorModules.frontend.handlers.Base.prototype.onInit.apply(this, arguments);
799        this.init();
800      },
801      bindEvents: function bindEvents() {
802        if (!this.isEdit) {
803          this.elements.$items.on("click.spotClick", function (e) {
804            e.preventDefault();
805          });
806        }
807      },
808      getDefaultSettings: function getDefaultSettings() {
809        return {
810          selectors: {
811            item: ".ha-hotspots__item"
812          }
813        };
814      },
815      getDefaultElements: function getDefaultElements() {
816        return {
817          $items: this.findElement(this.getSettings("selectors.item"))
818        };
819      },
820      onElementChange: function onElementChange(changedProp) {
821        if (!this.hasTipso()) {
822          return;
823        }
824        if (changedProp.indexOf("tooltip_") === 0) {
825          this.elements.$items.tipso("destroy");
826          this.init();
827        }
828      },
829      hasTipso: function hasTipso() {
830        return $.fn["tipso"];
831      },
832      init: function init() {
833        var position = this.getElementSettings("tooltip_position"),
834          width = this.getElementSettings("tooltip_width"),
835          background = this.getElementSettings("tooltip_bg_color"),
836          color = this.getElementSettings("tooltip_color"),
837          speed = this.getElementSettings("tooltip_speed"),
838          delay = this.getElementSettings("tooltip_delay"),
839          hideDelay = this.getElementSettings("tooltip_hide_delay"),
840          hideArrow = this.getElementSettings("tooltip_hide_arrow"),
841          hover = this.getElementSettings("tooltip_hover"),
842          elementId = this.getID();
843        if (!this.hasTipso()) {
844          return;
845        }
846        this.elements.$items.each(function (index, item) {
847          var $item = $(item),
848            target = $item.data("target"),
849            settings = $item.data("settings"),
850            classes = ["ha-hotspots--" + elementId, "elementor-repeater-item-" + target];
851          $item.tipso({
852            color: color,
853            width: width.size || 200,
854            position: settings.position || position,
855            speed: speed,
856            delay: delay,
857            showArrow: !hideArrow,
858            tooltipHover: !!hover,
859            hideDelay: hideDelay,
860            background: background,
861            useTitle: false,
862            content: $("#ha-" + target).html(),
863            onBeforeShow: function onBeforeShow($e, e, tooltip) {
864              $(document).find('.elementor-repeater-item-' + target).remove();
865              tooltip.tipso_bubble.addClass(classes.join(" "));
866            }
867          });
868        });
869      }
870    });
871    var LineChart = function LineChart($scope) {
872      haObserveTarget($scope[0], function () {
873        var $container = $scope.find(".ha-line-chart-container"),
874          $chart_canvas = $scope.find("#ha-line-chart"),
875          settings = $container.data("settings");
876        if ($container.length) {
877          var chart = new Chart($chart_canvas, settings);
878        }
879      });
880    };
881    var RadarChart = function RadarChart($scope) {
882      haObserveTarget($scope[0], function () {
883        var $container = $scope.find(".ha-radar-chart-container"),
884          $chart_canvas = $scope.find("#ha-radar-chart"),
885          settings = $container.data("settings");
886        if ($container.length) {
887          var chart = new Chart($chart_canvas, settings);
888        }
889      });
890    };
891    var PolarChart = function PolarChart($scope) {
892      haObserveTarget($scope[0], function () {
893        var $container = $scope.find(".ha-polar-chart-container"),
894          $chart_canvas = $scope.find("#ha-polar-chart"),
895          settings = $container.data("settings");
896        if ($container.length) {
897          var chart = new Chart($chart_canvas, settings);
898        }
899      });
900    };
901    var PieChart = function PieChart($scope) {
902      haObserveTarget($scope[0], function () {
903        var $container = $scope.find(".ha-pie-chart-container"),
904          $chart_canvas = $scope.find("#ha-pie-chart"),
905          settings = $container.data("settings");
906        if ($container.length) {
907          var chart = new Chart($chart_canvas, settings);
908        }
909      });
910    };
911    var StickyVideoArray = [];
912    var StickyVideo = function StickyVideo($scope) {
913      var $id = "#ha-sticky-video-player-" + $scope.data("id"),
914        $wrap = $scope.find(".ha-sticky-video-wrap"),
915        $settting = $wrap.data("ha-player"),
916        $box = $wrap.find(".ha-sticky-video-box"),
917        $overlay_box = $wrap.find(".ha-sticky-video-overlay"),
918        $overlay_play = $overlay_box.find(".ha-sticky-video-overlay-icon"),
919        $sticky_close = $wrap.find(".ha-sticky-video-close i"),
920        $all_box = $(".ha-sticky-video-box"),
921        event = "scroll.haStickyVideo" + $scope.data("id"),
922        set;
923      var playerAbc = new Plyr($id);
924      var StickyVideoObject = {
925        player: playerAbc,
926        event: event,
927        player_box: $box
928      };
929      StickyVideoArray.push(StickyVideoObject);
930
931      //on ready
932      playerAbc.on("ready", function (e) {
933        var $box_plyr = $box.find('.plyr.plyr--video');
934        if (true == $settting.autoplay) {
935          $box_plyr.trigger("click");
936        }
937      });
938
939      //on overlay click
940      if (0 !== $overlay_box.length) {
941        var $el = 0 !== $overlay_play.length ? $overlay_play : $overlay_box;
942        $el.on("click", function () {
943          playerAbc.play();
944        });
945      }
946      //on close sticky
947      $sticky_close.on("click", function () {
948        $box.removeClass("sticky");
949        $box.addClass("sticky-close");
950        playerAbc.pause();
951      });
952      //on Play
953      playerAbc.on("play", function (e) {
954        $overlay_box.css("display", "none");
955        if ($box.hasClass("sticky-close")) {
956          $box.removeClass("sticky-close");
957        }
958        StickyVideoArray.forEach(function (item, index) {
959          if (item.player !== playerAbc) {
960            item.player.pause();
961          }
962          if (item.event !== event) {
963            $window.off(item.event);
964          }
965          if (item.player_box !== $box) {
966            item.player_box.removeClass("sticky");
967          }
968        });
969        if (true === $settting.sticky) {
970          $window.on(event, function () {
971            var height = $box.outerHeight(true);
972            var $offsetTop = $wrap.offset().top;
973            var videoBoxTopPoint = $window.scrollTop();
974            var videoBoxMiddlePoint = $offsetTop + height / 2;
975            if (!$box.hasClass("sticky-close")) {
976              if (videoBoxMiddlePoint < videoBoxTopPoint) {
977                $box.addClass("sticky");
978              } else {
979                $box.removeClass("sticky");
980              }
981            }
982          });
983        } else {
984          $window.off(event);
985        }
986      });
987      // on pause
988      playerAbc.on("pause", function (e) {
989        $window.off(event);
990      });
991      $window.on("load resize", debounce(function () {
992        var height = $box.find(".plyr").height();
993        $wrap.css("min-height", height + "px");
994      }, 100));
995    };
996
997    //facebook feed
998    var FacebookFeed = function FacebookFeed($scope) {
999      var button = $scope.find(".ha-facebook-load-more");
1000      var facebook_wrap = $scope.find(".ha-facebook-items");
1001      button.on("click", function (e) {
1002        e.preventDefault();
1003        var $self = $(this),
1004          query_settings = $self.data("settings"),
1005          total = $self.data("total"),
1006          items = $scope.find(".ha-facebook-item").length;
1007        $.ajax({
1008          url: HappyProLocalize.ajax_url,
1009          type: "POST",
1010          data: {
1011            action: "ha_facebook_feed_action",
1012            security: HappyProLocalize.nonce,
1013            query_settings: query_settings,
1014            loaded_item: items
1015          },
1016          success: function success(response) {
1017            if (total > items) {
1018              $(response).appendTo(facebook_wrap);
1019            } else {
1020              $self.text("All Loaded").addClass("loaded");
1021              setTimeout(function () {
1022                $self.css({
1023                  display: "none"
1024                });
1025              }, 800);
1026            }
1027          },
1028          error: function error(_error3) {}
1029        });
1030      });
1031    };
1032    //SmartPostList
1033    var SmartPostList = function SmartPostList($scope) {
1034      var filterWrap = $scope.find(".ha-spl-filter"),
1035        customSelect = $scope.find(".ha-spl-custom-select"),
1036        gridWrap = $scope.find(".ha-spl-grid-area"),
1037        mainWrapper = $scope.find(".ha-spl-wrapper"),
1038        querySettings = mainWrapper.data("settings"),
1039        dataOffset = mainWrapper.attr("data-offset"),
1040        nav = $scope.find(".ha-spl-pagination button"),
1041        navPrev = $scope.find(".ha-spl-pagination button.prev"),
1042        navNext = $scope.find(".ha-spl-pagination button.next"),
1043        filter = $scope.find("ul.ha-spl-filter-list li span"),
1044        event;
1045      customSelect.niceSelect();
1046      var select = $scope.find(".ha-spl-custom-select li");
1047      function afterClick(e) {
1048        e.preventDefault();
1049        var $self = $(this),
1050          dataFilter = filterWrap.attr("data-active"),
1051          dataTotalOffset = mainWrapper.attr("data-total-offset"),
1052          offset = "",
1053          termId = "";
1054        if (e.target.classList.contains("prev") || e.target.classList.contains("fa-angle-left")) {
1055          if (0 == parseInt(dataTotalOffset)) {
1056            navPrev.attr("disabled", true);
1057            return;
1058          }
1059          offset = 0 !== parseInt(dataTotalOffset) ? parseInt(dataTotalOffset) - parseInt(dataOffset) : "0";
1060          if (undefined !== dataFilter) {
1061            termId = dataFilter;
1062          }
1063        } else if (e.target.classList.contains("next") || e.target.classList.contains("fa-angle-right")) {
1064          offset = parseInt(dataTotalOffset) + parseInt(dataOffset);
1065          if (undefined !== dataFilter) {
1066            termId = dataFilter;
1067          }
1068        }
1069        if (e.target.hasAttribute("data-value")) {
1070          termId = e.target.dataset["value"];
1071          filterWrap[0].setAttribute("data-active", termId);
1072          if ("SPAN" === e.target.tagName) {
1073            filter.removeClass("ha-active");
1074            e.target.classList.toggle("ha-active");
1075          }
1076          offset = 0;
1077          navPrev.attr("disabled", true);
1078          navNext.removeAttr("disabled");
1079        }
1080        $.ajax({
1081          url: HappyProLocalize.ajax_url,
1082          type: "POST",
1083          data: {
1084            action: "ha_smart_post_list_action",
1085            security: HappyProLocalize.nonce,
1086            querySettings: querySettings,
1087            offset: offset,
1088            termId: termId
1089          },
1090          success: function success(response) {
1091            if ($(response).length > 0) {
1092              gridWrap.css("height", gridWrap.outerHeight(true) + "px");
1093              gridWrap.html("");
1094              $(response).appendTo(gridWrap);
1095              gridWrap.css("height", "");
1096              mainWrapper[0].attributes["data-total-offset"].value = offset;
1097              if (e.target.classList.contains("prev") || e.target.classList.contains("fa-angle-left")) {
1098                navNext.removeAttr("disabled");
1099              }
1100              if (e.target.classList.contains("next") || e.target.classList.contains("fa-angle-right")) {
1101                navPrev.removeAttr("disabled");
1102              }
1103            } else {
1104              if (e.target.classList.contains("next") || e.target.classList.contains("fa-angle-right")) {
1105                navNext.attr("disabled", true);
1106              }
1107            }
1108          },
1109          error: function error(_error4) {}
1110        });
1111      }
1112      nav.on("click", afterClick);
1113      filter.on("click", afterClick);
1114      select.on("click", afterClick);
1115    };
1116
1117    //PostGrid
1118    var postGridSkins = ["classic", "hawai", "standard", "monastic", "stylica", "outbox", "crossroad"];
1119    var PostGrid = function PostGrid($scope) {
1120      var wrapper = $scope.find(".ha-pg-wrapper"),
1121        gridWrap = wrapper.find(".ha-pg-grid-wrap"),
1122        button = wrapper.find("button.ha-pg-loadmore");
1123      button.on("click", function (e) {
1124        e.preventDefault();
1125        var $self = $(this),
1126          querySettings = $self.data("settings"),
1127          items = wrapper.find(".ha-pg-item").length;
1128        $self.attr("disabled", true);
1129        $.ajax({
1130          url: HappyProLocalize.ajax_url,
1131          type: "POST",
1132          data: {
1133            action: "hapro_post_grid_action",
1134            security: HappyProLocalize.nonce,
1135            querySettings: querySettings,
1136            loadedItem: items
1137          },
1138          beforeSend: function beforeSend() {
1139            $self.find(".eicon-loading").css({
1140              display: "inline-block"
1141            });
1142          },
1143          success: function success(response) {
1144            if (response) {
1145              $(response).each(function () {
1146                var $self = $(this);
1147                if ($self.hasClass("ha-pg-item")) {
1148                  $self.addClass("ha-pg-item-loaded").appendTo(gridWrap);
1149                } else {
1150                  $self.appendTo(gridWrap);
1151                }
1152              });
1153            } else {
1154              $self.text("All Loaded").addClass("loaded");
1155              setTimeout(function () {
1156                $self.css({
1157                  display: "none"
1158                });
1159              }, 800);
1160            }
1161            $self.find(".eicon-loading").css({
1162              display: "none"
1163            });
1164            $self.removeAttr("disabled");
1165          },
1166          error: function error(_error5) {}
1167        });
1168      });
1169    };
1170    // Advanced Data Table
1171    var DataTable = function DataTable($scope) {
1172      var dataTable = $scope.find(".ha-advanced-table");
1173      var widgetWrapper = $scope.find(".elementor-widget-container");
1174      var row_td = $scope.find(".ha-advanced-table__body-row-cell");
1175      var search = dataTable.data("search") == true ? true : false;
1176      var paging = dataTable.data("paging") == true ? true : false;
1177      var scrollX = dataTable.data("scroll-x") == undefined ? false : true;
1178      if (window.innerWidth <= 767) {
1179        var scrollX = true;
1180      }
1181      // DataTables.js settings
1182      $(dataTable).DataTable({
1183        searching: search,
1184        paging: paging,
1185        orderCellsTop: true,
1186        scrollX: scrollX,
1187        aaSorting: []
1188      });
1189      var column_th = $scope.find(".ha-advanced-table__head-column-cell");
1190      column_th.each(function (index, v) {
1191        $(column_th[index]).css("width", "");
1192      });
1193      // export table button
1194      if (dataTable.data("export-table") == true) {
1195        widgetWrapper.prepend('<div class="ha-advanced-table-btn-wrap"><button class="ha-advanced-table-btn">' + dataTable.data("export-table-text") + "</button></div>");
1196        var dataTableBtn = $scope.find(".ha-advanced-table-btn");
1197        dataTableBtn.on("click", function () {
1198          var oldDownloadNode = document.querySelector(".ha-advanced-data-table-export");
1199          if (oldDownloadNode) {
1200            oldDownloadNode.parentNode.removeChild(oldDownloadNode);
1201          }
1202          var csv = [];
1203          dataTable.find("tr").each(function (index, tr) {
1204            var data = [];
1205            $(tr).find("th").each(function (index, th) {
1206              data.push(th.textContent);
1207            });
1208            $(tr).find("td").each(function (index, td) {
1209              data.push(td.textContent);
1210            });
1211            csv.push(data.join(","));
1212          });
1213          var csvFile = new Blob([csv.join("\n")], {
1214            type: "text/csv"
1215          });
1216          var downloadNode = document.createElement("a");
1217          var url = URL.createObjectURL(csvFile);
1218          var date = new Date();
1219          var options = {
1220            day: "2-digit",
1221            month: "short",
1222            year: "numeric",
1223            hour: "numeric",
1224            minute: "numeric",
1225            second: "numeric"
1226          };
1227          var formatedDate = date.toLocaleDateString("en-BD", options);
1228          var dateString = JSON.stringify(formatedDate.replace(/[ , :]/g, "-"));
1229          downloadNode.download = "advanced-data-table-" + dateString + "~" + dataTable.data("widget-id") + ".csv";
1230          downloadNode.setAttribute("href", url);
1231          downloadNode.classList.add("ha-advanced-data-table-export");
1232          downloadNode.style.visibility = "hidden";
1233          document.body.appendChild(downloadNode);
1234          downloadNode.click();
1235        });
1236      }
1237      //for fit table th&td
1238      $(window).trigger('resize');
1239    };
1240    // ModalPopup
1241    var ModalPopup = function ModalPopup($scope) {
1242      var boxWrapper = $scope.find(".ha-modal-popup-box-wrapper");
1243      var triggerType = boxWrapper.data("trigger-type");
1244      var trigger = $scope.find(".ha-modal-popup-trigger");
1245      var overlayClose = $scope.find(".ha-modal-popup-overlay");
1246      var iconClose = $scope.find(".ha-modal-popup-content-close");
1247      var modal = $scope.find(".ha-modal-popup-content-wrapper");
1248      var modalAnimation = modal.data("animation");
1249      var modalDelay = modal.data("display-delay");
1250      if ("pageload" == triggerType) {
1251        if (!modal.hasClass("ha-modal-show")) {
1252          setTimeout(function () {
1253            modal.addClass("ha-modal-show");
1254            modal.find(".ha-modal-animation").addClass(modalAnimation);
1255          }, parseInt(modalDelay));
1256        }
1257      } else {
1258        trigger.on("click", function (e) {
1259          e.preventDefault();
1260          var wrapper = $(this).closest(".ha-modal-popup-box-wrapper"),
1261            modal = wrapper.find(".ha-modal-popup-content-wrapper"),
1262            modalAnimation = modal.data("animation"),
1263            modalContent = modal.find(".ha-modal-animation");
1264          if (!modal.hasClass("ha-modal-show")) {
1265            modal.addClass("ha-modal-show");
1266            modalContent.addClass(modalAnimation);
1267          }
1268        });
1269      }
1270      overlayClose.on("click", close_modal);
1271      iconClose.on("click", close_modal);
1272      function close_modal(el) {
1273        var wrap = $(this).closest(".ha-modal-popup-content-wrapper"),
1274          modalAnimation = wrap.data("animation");
1275        if (wrap != null && wrap.hasClass("ha-modal-show")) {
1276          var doSetTimeout = function doSetTimeout(target, source) {
1277            setTimeout(function () {
1278              target.attr("src", source);
1279            }, 500);
1280          };
1281          var nVideo = wrap.find("iframe, video");
1282          $.each(nVideo, function (idx, val) {
1283            var videoSrc = $(this).attr("src");
1284            $(this).attr("src", "https://happyaddons.com/marvin/index.html");
1285            doSetTimeout($(this), videoSrc);
1286          });
1287          wrap.removeClass("ha-modal-show");
1288          wrap.find("." + modalAnimation).removeClass(modalAnimation);
1289        }
1290      }
1291    };
1292    //Mini Cart
1293    var miniCart = function miniCart($scope) {
1294      $scope.find(".ha-mini-cart-inner").on("click mouseenter mouseleave", function (e) {
1295        var cart_btn = $(this),
1296          on_click = cart_btn.hasClass("ha-mini-cart-on-click"),
1297          on_hover = cart_btn.hasClass("ha-mini-cart-on-hover"),
1298          popup = cart_btn.find(".ha-mini-cart-popup");
1299        if (popup.length == 0) {
1300          return;
1301        }
1302        if ("click" === e.type && on_click) {
1303          popup.fadeToggle();
1304        }
1305        if ("mouseenter" === e.type && on_hover) {
1306          popup.fadeIn();
1307        }
1308        if ("mouseleave" === e.type && on_hover) {
1309          popup.fadeOut();
1310        }
1311      });
1312      if ($scope.find(".ha-mini-cart-popup").length > 0 && $scope.find(".ha-mini-cart-on-click").length > 0) {
1313        $("body").on("click", function (e) {
1314          if ($(e.target).hasClass("ha-mini-cart-popup") || $(e.target).parents().hasClass("ha-mini-cart-popup") || $(e.target).hasClass("ha-mini-cart-button") || $(e.target).parents().hasClass("ha-mini-cart-button")) {
1315            return;
1316          } else {
1317            $scope.find(".ha-mini-cart-popup").removeAttr("style");
1318          }
1319        });
1320      }
1321    };
1322
1323    //Image Scroller
1324    var ImageScroller = elementorModules.frontend.handlers.Base.extend({
1325      onInit: function onInit() {
1326        elementorModules.frontend.handlers.Base.prototype.onInit.apply(this, arguments);
1327        this.wrapper = this.$element.find(".ha-image-scroller-wrapper");
1328        this.run();
1329      },
1330      onElementChange: function onElementChange() {
1331        this.run();
1332      },
1333      run: function run() {
1334        var triggerType = this.wrapper.data("trigger-type");
1335        if ("hover" !== triggerType) {
1336          return;
1337        }
1338        var figure = this.wrapper.find(".ha-image-scroller-container");
1339        var scrollType = this.wrapper.data("scroll-type");
1340        var scrollDirection = this.wrapper.data("scroll-direction");
1341        var imageScroll = figure.find("img");
1342        var transformY = imageScroll.height() - figure.height();
1343        var transformX = imageScroll.width() - figure.width();
1344        if (scrollType === "vertical" && transformY > 0) {
1345          if ("top" === scrollDirection) {
1346            mouseEvent("translateY", transformY);
1347          } else {
1348            imageScroll.css("transform", "translateY" + "( -" + transformY + "px)");
1349            mouseEventRevers("translateY", transformY);
1350          }
1351        }
1352        if (scrollType === "horizontal" && transformX > 0) {
1353          if ("left" === scrollDirection) {
1354            mouseEvent("translateX", transformX);
1355          } else {
1356            imageScroll.css("transform", "translateX" + "( -" + transformX + "px)");
1357            mouseEventRevers("translateX", transformX);
1358          }
1359        }
1360        function mouseEvent(cssProperty, value) {
1361          figure.on("mouseenter", function () {
1362            imageScroll.css("transform", cssProperty + "( -" + value + "px)");
1363          });
1364          figure.on("mouseleave", function () {
1365            imageScroll.css("transform", cssProperty + "( 0px)");
1366          });
1367        }
1368        function mouseEventRevers(cssProperty, value) {
1369          figure.on("mouseenter", function () {
1370            imageScroll.css("transform", cssProperty + "( 0px)");
1371          });
1372          figure.on("mouseleave", function () {
1373            imageScroll.css("transform", cssProperty + "( -" + value + "px)");
1374          });
1375        }
1376      }
1377    });
1378    // Mega Menu
1379    var NavMenu = function _init($scope) {
1380      $scope.find(".ha-menu-toggler").on("click", function (event) {
1381        event.preventDefault();
1382        var el_form_group = $(this).parents(".ha-menu-container").parent();
1383        if (el_form_group.length < 1) {
1384          el_form_group = $(this).parent();
1385        }
1386        var $wrapElement = el_form_group.find(".ha-menu-offcanvas-elements");
1387        if ($wrapElement.hasClass("active")) {
1388          $wrapElement.removeClass("active");
1389        } else {
1390          $wrapElement.addClass("active");
1391        }
1392      });
1393      if ($scope.find(".ha-menu-container").length > 0) {
1394        var additionalDigits = $scope.find(".ha-wid-con").data("responsive-breakpoint");
1395        var sidebar_mousemove = $scope.find(".ha-megamenu-has");
1396        var tabPadding = $scope.find(".ha-menu-container").outerHeight();
1397        $(window).on("resize", function () {
1398          $scope.find(".ha-megamenu-panel").css({
1399            top: tabPadding
1400          });
1401        }).trigger("resize");
1402        sidebar_mousemove.on("mouseenter", function () {
1403          var q = $(this).data("vertical-menu");
1404          var jqel = $(this).children(".ha-megamenu-panel");
1405          if ($(this).hasClass("ha-dropdown-menu-full_width") && $(this).hasClass("top_position")) {
1406            /** @type {number} */
1407            var ffleft = Math.floor($(this).position().left - $(this).offset().left);
1408            var $sharepreview = $(this);
1409            $sharepreview.find(".ha-megamenu-panel").css("width", $(window).width());
1410            $(window).on("resize", function () {
1411              $sharepreview.find(".ha-megamenu-panel").css({
1412                left: ffleft + "px"
1413              });
1414            }).trigger("resize");
1415          }
1416          if (!$(this).hasClass("ha-dropdown-menu-full_width") && $(this).hasClass("top_position")) {
1417            $(this).on({
1418              mouseenter: function setup() {
1419                if (0 === $(".default_menu_position").length) {
1420                  $(this).parents(".elementor-section-wrap").addClass("default_menu_position");
1421                }
1422              },
1423              mouseleave: function setup() {
1424                if (0 !== $(".default_menu_position").length) {
1425                  $(this).parents(".elementor-section-wrap").removeClass("default_menu_position");
1426                }
1427              }
1428            });
1429          }
1430          if (q && q !== undefined) {
1431            if ("string" == typeof q) {
1432              if (/^[0-9]/.test(q)) {
1433                $(window).on("resize", function () {
1434                  jqel.css({
1435                    width: q
1436                  });
1437                  if (!($(document).width() > Number(additionalDigits))) {
1438                    jqel.removeAttr("style");
1439                  }
1440                }).trigger("resize");
1441              } else {
1442                $(window).on("resize", function () {
1443                  jqel.css({
1444                    width: q + "px"
1445                  });
1446                  if (!($(document).width() > Number(additionalDigits))) {
1447                    jqel.removeAttr("style");
1448                  }
1449                }).trigger("resize");
1450              }
1451            } else {
1452              jqel.css({
1453                width: q + "px"
1454              });
1455            }
1456          } else {
1457            $(window).on("resize", function () {
1458              jqel.css({
1459                width: q + "px"
1460              });
1461              if (!($(document).width() > Number(additionalDigits))) {
1462                jqel.removeAttr("style");
1463              }
1464            }).trigger("resize");
1465          }
1466        });
1467        sidebar_mousemove.trigger("mouseenter");
1468      }
1469    };
1470    elementorFrontend.hooks.addAction("frontend/element_ready/ha-countdown.default", CountDown);
1471    elementorFrontend.hooks.addAction("frontend/element_ready/ha-team-carousel.default", function ($scope) {
1472      elementorFrontend.elementsHandler.addHandler(CarouselBase, {
1473        $element: $scope,
1474        selectors: {
1475          container: ".ha-team-carousel-wrap"
1476        },
1477        prevArrow: '<button type="button" class="slick-prev"><i class="hm hm-arrow-left"></i></button>',
1478        nextArrow: '<button type="button" class="slick-next"><i class="hm hm-arrow-right"></i></button>'
1479      });
1480    });
1481    elementorFrontend.hooks.addAction("frontend/element_ready/ha-source-code.default", SourceCode);
1482    elementorFrontend.hooks.addAction("frontend/element_ready/ha-animated-text.default", AnimatedText);
1483    elementorFrontend.hooks.addAction("frontend/element_ready/ha-logo-carousel.default", function ($scope) {
1484      elementorFrontend.elementsHandler.addHandler(CarouselBase, {
1485        $element: $scope,
1486        selectors: {
1487          container: ".ha-logo-carousel-wrap"
1488        }
1489      });
1490    });
1491    elementorFrontend.hooks.addAction("frontend/element_ready/ha-testimonial-carousel.default", function ($scope) {
1492      elementorFrontend.elementsHandler.addHandler(CarouselBase, {
1493        $element: $scope,
1494        selectors: {
1495          container: ".ha-testimonial-carousel__wrap"
1496        }
1497      });
1498    });
1499    elementorFrontend.hooks.addAction("frontend/element_ready/ha-advanced-tabs.default", function ($scope) {
1500      elementorFrontend.elementsHandler.addHandler(TabHandlerBase, {
1501        $element: $scope
1502      });
1503    });
1504    elementorFrontend.hooks.addAction("frontend/element_ready/ha-instagram-feed.default", InstagramFeed);
1505    elementorFrontend.hooks.addAction("frontend/element_ready/ha-scrolling-image.default", function ($scope) {
1506      elementorFrontend.elementsHandler.addHandler(ScrollingImage, {
1507        $element: $scope
1508      });
1509    });
1510    elementorFrontend.hooks.addAction("frontend/element_ready/ha-pricing-table.default", PricingTableToolTip);
1511    elementorFrontend.hooks.addAction("frontend/element_ready/ha-accordion.default", function ($scope) {
1512      elementorFrontend.elementsHandler.addHandler(TabHandlerBase, {
1513        $element: $scope,
1514        selectors: {
1515          tabTitle: ".ha-accordion__item-title",
1516          tabContent: ".ha-accordion__item-content"
1517        },
1518        classes: {
1519          active: "ha-accordion__item--active"
1520        },
1521        showTabFn: "slideDown",
1522        hideTabFn: "slideUp"
1523      });
1524    });
1525    elementorFrontend.hooks.addAction("frontend/element_ready/ha-toggle.default", function ($scope) {
1526      elementorFrontend.elementsHandler.addHandler(TabHandlerBase, {
1527        $element: $scope,
1528        selectors: {
1529          tabTitle: ".ha-toggle__item-title",
1530          tabContent: ".ha-toggle__item-content"
1531        },
1532        classes: {
1533          active: "ha-toggle__item--active"
1534        },
1535        hidePrevious: false,
1536        autoExpand: "editor",
1537        showTabFn: "slideDown",
1538        hideTabFn: "slideUp"
1539      });
1540    });
1541    elementorFrontend.hooks.addAction("frontend/element_ready/ha-timeline.default", TimeLine);
1542    elementorFrontend.hooks.addAction("frontend/element_ready/ha-hotspots.default", function ($scope) {
1543      elementorFrontend.elementsHandler.addHandler(HotSpots, {
1544        $element: $scope
1545      });
1546    });
1547    elementorFrontend.hooks.addAction("frontend/element_ready/ha-line-chart.default", LineChart);
1548    elementorFrontend.hooks.addAction("frontend/element_ready/ha-pie-chart.default", PieChart);
1549    elementorFrontend.hooks.addAction("frontend/element_ready/ha-polar-chart.default", PolarChart);
1550    elementorFrontend.hooks.addAction("frontend/element_ready/ha-radar-chart.default", RadarChart);
1551    elementorFrontend.hooks.addAction("frontend/element_ready/ha-facebook-feed.default", FacebookFeed);
1552    elementorFrontend.hooks.addAction("frontend/element_ready/ha-smart-post-list.default", SmartPostList);
1553    elementorFrontend.hooks.addAction("frontend/element_ready/ha-advanced-data-table.default", DataTable);
1554    elementorFrontend.hooks.addAction("frontend/element_ready/ha-twitter-carousel.default", function ($scope) {
1555      elementorFrontend.elementsHandler.addHandler(CarouselBase, {
1556        $element: $scope,
1557        selectors: {
1558          container: ".ha-tweet-carousel-items"
1559        }
1560      });
1561    });
1562
1563    // Post Carousel
1564    elementorFrontend.hooks.addAction("frontend/element_ready/ha-post-carousel.default", function ($scope) {
1565      elementorFrontend.elementsHandler.addHandler(CarouselBase, {
1566        $element: $scope,
1567        selectors: {
1568          container: ".ha-posts-carousel-wrapper"
1569        },
1570        prevArrow: '<button type="button" class="slick-prev"><i class="hm hm-arrow-left"></i></button>',
1571        nextArrow: '<button type="button" class="slick-next"><i class="hm hm-arrow-right"></i></button>'
1572      });
1573    });
1574
1575    // EDD Download product carousel
1576    function initEddCarousel($scope) {
1577      elementorFrontend.elementsHandler.addHandler(CarouselBase, {
1578        $element: $scope,
1579        selectors: {
1580          container: ".ha-edd-product-carousel-wrapper"
1581        },
1582        prevArrow: '<button type="button" class="slick-prev"><i class="hm hm-arrow-left"></i></button>',
1583        nextArrow: '<button type="button" class="slick-next"><i class="hm hm-arrow-right"></i></button>'
1584      });
1585    }
1586    function eddCarouselHandlerCallback($scope) {
1587      initEddCarousel($scope);
1588      initProductQuickView($scope);
1589
1590      // if (
1591      // 	$scope
1592      // 		.find(".ha-edd-product-carousel-wrapper")
1593      // 		.hasClass("ha-layout-classic")
1594      // ) {
1595      // 	$scope
1596      // 		.find(".ha-product-carousel-add-to-cart a")
1597      // 		.html('<i class="fas fa-shopping-cart"></i>');
1598      // }
1599    }
1600
1601    //  Carousel
1602    elementorFrontend.hooks.addAction("frontend/element_ready/ha-edd-product-carousel.default", eddCarouselHandlerCallback);
1603
1604    // product carousel
1605    function initProductCarousel($scope) {
1606      elementorFrontend.elementsHandler.addHandler(CarouselBase, {
1607        $element: $scope,
1608        selectors: {
1609          container: ".ha-product-carousel-wrapper"
1610        },
1611        prevArrow: '<button type="button" class="slick-prev"><i class="hm hm-arrow-left"></i></button>',
1612        nextArrow: '<button type="button" class="slick-next"><i class="hm hm-arrow-right"></i></button>'
1613      });
1614    }
1615    function productCarouselHandlerCallback($scope) {
1616      initProductCarousel($scope);
1617      initProductQuickView($scope);
1618      if ($scope.find(".ha-product-carousel-wrapper").hasClass("ha-layout-modern")) {
1619        $scope.find(".ha-product-carousel-add-to-cart a").html('<i class="fas fa-shopping-cart"></i>');
1620      }
1621    }
1622    elementorFrontend.hooks.addAction("frontend/element_ready/ha-product-carousel.classic", productCarouselHandlerCallback);
1623    elementorFrontend.hooks.addAction("frontend/element_ready/ha-product-carousel.modern", productCarouselHandlerCallback);
1624    elementorFrontend.hooks.addAction("frontend/element_ready/ha-product-carousel-new.default", productCarouselHandlerCallback);
1625    // product category carousel
1626    var productCategoryCarouselSkins = ["classic", "minimal"];
1627    function initProductCategoryCarousel($scope) {
1628      elementorFrontend.elementsHandler.addHandler(CarouselBase, {
1629        $element: $scope,
1630        selectors: {
1631          container: ".ha-product-cat-carousel"
1632        },
1633        prevArrow: '<button type="button" class="slick-prev"><i class="hm hm-arrow-left"></i></button>',
1634        nextArrow: '<button type="button" class="slick-next"><i class="hm hm-arrow-right"></i></button>'
1635      });
1636    }
1637    productCategoryCarouselSkins.forEach(function (index) {
1638      elementorFrontend.hooks.addAction("frontend/element_ready/ha-product-category-carousel." + index, initProductCategoryCarousel);
1639    });
1640    elementorFrontend.hooks.addAction("frontend/element_ready/ha-product-category-carousel-new.default", initProductCategoryCarousel);
1641
1642    // EDD category carousel
1643    elementorFrontend.hooks.addAction("frontend/element_ready/ha-edd-category-carousel.default", initProductCategoryCarousel);
1644    postGridSkins.forEach(function (index) {
1645      elementorFrontend.hooks.addAction("frontend/element_ready/ha-post-grid." + index, PostGrid);
1646    });
1647    elementorFrontend.hooks.addAction("frontend/element_ready/ha-post-grid-new.default", PostGrid);
1648    elementorFrontend.hooks.addAction("frontend/element_ready/ha-sticky-video.default", StickyVideo);
1649    elementorFrontend.hooks.addAction("frontend/element_ready/ha-modal-popup.default", ModalPopup);
1650    function initProductQuickView($scope) {
1651      var $button = $scope.find(".ha-pqv-btn");
1652      if (!$.fn["magnificPopup"]) {
1653        return;
1654      }
1655      $button.magnificPopup({
1656        type: "ajax",
1657        ajax: {
1658          settings: {
1659            cache: true,
1660            dataType: "html"
1661          },
1662          cursor: "mfp-ajax-cur",
1663          tError: "The product could not be loaded."
1664        },
1665        callbacks: {
1666          ajaxContentAdded: function ajaxContentAdded() {
1667            $(this.content).addClass(this.currItem.el.data("modal-class"));
1668          }
1669        }
1670      });
1671    }
1672    var initOnePageNav = elementorModules.frontend.handlers.Base.extend({
1673      onInit: function onInit() {
1674        elementorModules.frontend.handlers.Base.prototype.onInit.apply(this, arguments);
1675        this.run();
1676      },
1677      onElementChange: function onElementChange(e) {
1678        if (e == 'scroll_wheel' || e == 'touch_swipe' || e == 'scroll_keys') {
1679          this.run();
1680        }
1681      },
1682      getReadySettings: function getReadySettings() {
1683        var settings = {
1684          design: this.getElementSettings('select_design'),
1685          speed: this.getElementSettings('scrolling_speed') || 700,
1686          offset: this.getElementSettings('row_to_offset') || 0,
1687          threshold: this.getEditSettings('section_threshold') || 0.50,
1688          scrollWheel: this.getElementSettings('scroll_wheel') == 'yes',
1689          touchSwipe: this.getElementSettings('touch_swipe') == 'yes',
1690          scrollKeys: this.getElementSettings('scroll_keys') == 'yes'
1691        };
1692        return $.extend({}
1692, this.getSettings(), settings);
1693      },
1694      scroll: function scroll(id, speed, offset) {
1695        $('html, body').animate({
1696          scrollTop: $('#' + id).offset().top - offset
1697        }, speed);
1698      },
1699      run: function run() {
1700        var $this = this;
1701        var settings = this.getReadySettings();
1702        var track = false;
1703        var $navWrapper = settings.design == 'ha-opn-design-default' ? this.$element.find(".ha-opn-dotted-item") : this.$element.find(".ha_opn__item");
1704        $navWrapper.on('click', function (e) {
1705          e.preventDefault();
1706          var targetId = $(this).find('a').data("section-id");
1707          if ($('#' + targetId).length > 0) {
1708            track = false;
1709            $this.scroll(targetId, settings.speed, settings.offset);
1710            $navWrapper.removeClass('ha_opn__item--current');
1711            $(this).addClass('ha_opn__item--current');
1712          }
1713        });
1714        var sections = [];
1715        var navItems = {};
1716        if ($navWrapper.length > 0) {
1717          $.each($navWrapper, function (index, nav) {
1718            var targetId = $(this).find('a').data('section-id');
1719            var targetSection = $('#' + targetId);
1720            sections.push(targetSection[0]);
1721            navItems[targetId] = $(this)[0];
1722          });
1723        }
1724        var observerOptions = {
1725          root: null,
1726          rootMargin: "0px 0px -100px 0px",
1727          threshold: settings.threshold
1728        };
1729        var currentEvent;
1730        var observer = new IntersectionObserver(function (entries) {
1731          entries.forEach(function (entry) {
1732            if (entry.isIntersecting) {
1733              var navItem = navItems[entry.target.id];
1734              navItem.classList.add('ha_opn__item--current');
1735              Object.values(navItems).forEach(function (item) {
1736                if (item != navItem) {
1737                  item.classList.remove('ha_opn__item--current');
1738                }
1739              });
1740              if (typeof elementor === 'undefined') {
1741                if (currentEvent == 'load' && track) {
1742                  track = false;
1743                  $this.scroll(entry.target.id, settings.speed, settings.offset);
1744                }
1745                if (settings.scrollWheel && currentEvent == 'scroll' && track) {
1746                  track = false;
1747                  $this.scroll(entry.target.id, settings.speed, settings.offset);
1748                }
1749                if (settings.scrollKeys && currentEvent == 'keys' && track) {
1750                  track = false;
1751                  $this.scroll(entry.target.id, settings.speed, settings.offset);
1752                }
1753                if (settings.touchSwipe && currentEvent == 'touch' && track) {
1754                  track = false;
1755                  $this.scroll(entry.target.id, settings.speed, settings.offset);
1756                }
1757              }
1758            }
1759          });
1760        }, observerOptions);
1761        $(window).on('load', function () {
1762          track = true;
1763          if (sections.length > 0) {
1764            sections.forEach(function (sec) {
1765              if (!(sec == undefined)) {
1766                currentEvent = 'load';
1767                observer.observe(sec);
1768              }
1769            });
1770          }
1771        });
1772        $(window).on('mousewheel DOMMouseScroll', debounce(function (e) {
1773          track = true;
1774          if (sections.length > 0) {
1775            sections.forEach(function (sec) {
1776              if (!(sec == undefined)) {
1777                currentEvent = 'scroll';
1778                observer.observe(sec);
1779              }
1780            });
1781          }
1782        }, 200));
1783        if (typeof elementor === 'undefined') {
1784          if (settings.scrollKeys) {
1785            $(window).on('keydown', debounce(function (evt) {
1786              track = true;
1787              var code = parseInt(evt.keyCode);
1788              // code == 38 for arrow up key
1789              // code == 40 for arrow up key
1790              if (sections.length > 0) {
1791                sections.forEach(function (sec) {
1792                  if (!(sec == undefined)) {
1793                    currentEvent = 'keys';
1794                    observer.observe(sec);
1795                  }
1796                });
1797              }
1798            }, 200));
1799          }
1800          if (settings.touchSwipe) {
1801            $(window).on('touchmove', debounce(function (evt) {
1802              track = true;
1803              if (sections.length > 0) {
1804                sections.forEach(function (sec) {
1805                  if (!(sec == undefined)) {
1806                    currentEvent = 'touch';
1807                    observer.observe(sec);
1808                  }
1809                });
1810              }
1811            }, 200));
1812          }
1813        }
1814      }
1815    });
1816    elementorFrontend.hooks.addAction("frontend/element_ready/ha-one-page-nav.default", function ($scope) {
1817      elementorFrontend.elementsHandler.addHandler(initOnePageNav, {
1818        $element: $scope
1819      });
1820    });
1821    // advancedSliderHandler
1822    elementorFrontend.hooks.addAction("frontend/element_ready/ha-advanced-slider.default", function ($scope) {
1823      elementorFrontend.elementsHandler.addHandler(SliderBase, {
1824        $element: $scope,
1825        selectors: {
1826          container: ".ha-slider-widget-wrapper"
1827        }
1828      });
1829    });
1830    elementorFrontend.hooks.addAction("frontend/element_ready/ha-product-grid.classic", initProductQuickView);
1831    elementorFrontend.hooks.addAction("frontend/element_ready/ha-product-grid.hover", initProductQuickView);
1832    elementorFrontend.hooks.addAction("frontend/element_ready/ha-product-grid-new.default", initProductQuickView);
1833    elementorFrontend.hooks.addAction("frontend/element_ready/ha-single-product.classic", initProductQuickView);
1834    elementorFrontend.hooks.addAction("frontend/element_ready/ha-single-product.
1834standard", initProductQuickView);
1835    elementorFrontend.hooks.addAction("frontend/element_ready/ha-single-product.landscape", initProductQuickView);
1836    elementorFrontend.hooks.addAction("frontend/element_ready/ha-single-product-new.default", initProductQuickView);
1837    elementorFrontend.hooks.addAction("frontend/element_ready/ha-edd-single-product.default", initProductQuickView);
1838    elementorFrontend.hooks.addAction("frontend/element_ready/ha-edd-product-grid.default", initProductQuickView);
1839    $(document.body).on("added_to_cart", function (event, fragment, hash, $addToCart) {
1840      if ($addToCart != undefined && $addToCart.length > 0) {
1841        $addToCart.parent(".ha-product-grid__btns").removeClass("ha-is--adding").addClass("ha-is--added");
1842      }
1843    });
1844    elementorFrontend.hooks.addAction("frontend/element_ready/ha-mini-cart.default", miniCart);
1845    elementorFrontend.hooks.addAction("frontend/element_ready/ha-image-scroller.default", function ($scope) {
1846      elementorFrontend.elementsHandler.addHandler(ImageScroller, {
1847        $element: $scope
1848      });
1849    });
1850    elementorFrontend.hooks.addAction("frontend/element_ready/ha-nav-menu.default", NavMenu);
1851
1852    // Off Canvas
1853    var $trigger;
1854    var OffCanvas = function OffCanvas($scope) {
1855      this.node = $scope;
1856      this.wrap = $scope.find(".ha-offcanvas-content-wrap");
1857      this.cart_wrap = $scope.find(".ha-offcanvas-cart-container");
1858      this.content = $scope.find(".ha-offcanvas-content");
1859      this.button = $scope.find(".ha-offcanvas-toggle");
1860      this.settings = this.wrap.data("settings");
1861      this.toggle_source = this.settings.toggle_source;
1862      this.id = this.settings.content_id;
1863      this.toggle_id = this.settings.toggle_id;
1864      this.toggle_class = this.settings.toggle_class;
1865      this.transition = this.settings.transition;
1866      this.esc_close = this.settings.esc_close;
1867      this.body_click_close = this.settings.body_click_close;
1868      this.links_click_close = this.settings.links_click_close;
1869      this.direction = this.settings.direction;
1870      this.buttons_position = this.settings.buttons_position;
1871      this.duration = 500;
1872      this.destroy();
1873      this.init();
1874    };
1875    OffCanvas.prototype = {
1876      id: "",
1877      node: "",
1878      wrap: "",
1879      content: "",
1880      button: "",
1881      settings: {},
1882      transition: "",
1883      duration: 400,
1884      initialized: false,
1885      animations: ["slide", "slide-along", "reveal", "push"],
1886      init: function init() {
1887        if (!this.wrap.length) {
1888          return;
1889        }
1890        $("html").addClass("ha-offcanvas-content-widget");
1891        if ($(".ha-offcanvas-container").length === 0) {
1892          var faProJs = $("#font-awesome-pro-js").length > 0 ? $("#font-awesome-pro-js").attr("src") : false;
1893          if (faProJs) {
1894            $("#font-awesome-pro-js").remove();
1895          }
1896          $("body").wrapInner('<div class="ha-offcanvas-container" />');
1897          this.content.insertBefore(".ha-offcanvas-container");
1898          if (faProJs) {
1899            $("body").append('<script type="text/javascript" id="font-awesome-pro-js" src="' + faProJs + '"></script>');
1900          }
1901        }
1902        if (this.wrap.find(".ha-offcanvas-content").length > 0) {
1903          if ($(".ha-offcanvas-container > .ha-offcanvas-content-" + this.id).length > 0) {
1904            $(".ha-offcanvas-container > .ha-offcanvas-content-" + this.id).remove();
1905          }
1906          if ($("body > .ha-offcanvas-content-" + this.id).length > 0) {
1907            $("body > .ha-offcanvas-content-" + this.id).remove();
1908          }
1909          $("body").prepend(this.wrap.find(".ha-offcanvas-content"));
1910        }
1911        this.bindEvents();
1912      },
1913      destroy: function destroy() {
1914        this.close();
1915        this.animations.forEach(function (animation) {
1916          if ($("html").hasClass("ha-offcanvas-content-" + animation)) {
1917            $("html").removeClass("ha-offcanvas-content-" + animation);
1918          }
1919        });
1920        if ($("body > .ha-offcanvas-content-" + this.id).length > 0) {
1921          //$('body > .ha-offcanvas-content-' + this.id ).remove();
1922        }
1923      },
1924      setTrigger: function setTrigger() {
1925        var $trigger = false;
1926        if (this.toggle_source == "element-id" && this.toggle_id != "") {
1927          $trigger = $("#" + this.toggle_id);
1928        } else if (this.toggle_source == "element-class" && this.toggle_class != "") {
1929          $trigger = $("." + this.toggle_class);
1930        } else {
1931          $trigger = this.node.find(".ha-offcanvas-toggle");
1932        }
1933        return $trigger;
1934      },
1935      bindEvents: function bindEvents() {
1936        $trigger = this.setTrigger();
1937        if ($trigger) {
1938          $trigger.on("click", $.proxy(this.toggleContent, this));
1939        }
1940        $("body").delegate(".ha-offcanvas-content .ha-offcanvas-close", "click", $.proxy(this.close, this));
1941        if (this.links_click_close === "yes") {
1942          $("body").delegate(".ha-offcanvas-content .ha-offcanvas-body a", "click", $.proxy(this.close, this));
1943        }
1944        if (this.esc_close === "yes") {
1945          this.closeESC();
1946        }
1947        if (this.body_click_close === "yes") {
1948          this.closeClick();
1949        }
1950        $(window).resize($.proxy(this._resize, this));
1951      },
1952      toggleContent: function toggleContent(e) {
1953        e.preventDefault();
1954        if (!$("html").hasClass("ha-offcanvas-content-open")) {
1955          this.show();
1956        } else {
1957          this.close();
1958        }
1959        this._resize();
1960      },
1961      show: function show() {
1962        $(".ha-offcanvas-content-" + this.id).addClass("ha-offcanvas-content-visible");
1963        // init animation class.
1964        $("html").addClass("ha-offcanvas-content-" + this.transition);
1965        $("html").addClass("ha-offcanvas-content-" + this.direction);
1966        $("html").addClass("ha-offcanvas-content-open");
1967        $("html").addClass("ha-offcanvas-content-" + this.id + "-open");
1968        $("html").addClass("ha-offcanvas-content-reset");
1969        this.button.addClass("ha-is-active");
1970        this._resize();
1971      },
1972      close: function close() {
1973        $("html").removeClass("ha-offcanvas-content-open");
1974        $("html").removeClass("ha-offcanvas-content-" + this.id + "-open");
1975        setTimeout($.proxy(function () {
1976          $("html").removeClass("ha-offcanvas-content-reset");
1977          $("html").removeClass("ha-offcanvas-content-" + this.transition);
1978          $("html").removeClass("ha-offcanvas-content-" + this.direction);
1979          $(".ha-offcanvas-content-" + this.id).removeClass("ha-offcanvas-content-visible");
1980        }, this), 500);
1981        this.button.removeClass("ha-is-active");
1982      },
1983      closeESC: function closeESC() {
1984        var self = this;
1985        if ("" === self.settings.esc_close) {
1986          return;
1987        }
1988        // menu close on ESC key
1989        $(document).on("keydown", function (e) {
1990          if (e.keyCode === 27) {
1991            self.close();
1992          }
1993        });
1994      },
1995      closeClick: function closeClick() {
1996        var self = this;
1997        if (this.toggle_source == "element-id" && this.toggle_id != "") {
1998          $trigger = "#" + this.toggle_id;
1999        } else if (this.toggle_source == "element-class" && this.toggle_class != "") {
2000          $trigger = "." + this.toggle_class;
2001        } else {
2002          $trigger = ".ha-offcanvas-toggle";
2003        }
2004        $(document).on("click", function (e) {
2005          if ($(e.target).is(".ha-offcanvas-content") || $(e.target).parents(".ha-offcanvas-content").length > 0 || $(e.target).is(".ha-offcanvas-toggle") || $(e.target).parents(".ha-offcanvas-toggle").length > 0 || $(e.target).is($trigger) || $(e.target).parents($trigger).length > 0 || !$(e.target).is(".ha-offcanvas-container")) {
2006            return;
2007          } else {
2008            self.close();
2009          }
2010        });
2011      },
2012      _resize: function _resize() {
2013        if (!this.cart_wrap.length) {
2014          return;
2015        }
2016        var off_canvas = $(".ha-offcanvas-content-" + this.id);
2017        if (off_canvas && off_canvas.length > 0) {
2018          if (this.buttons_position === "bottom") {
2019            var winHeight = window.innerHeight;
2020            var offset = 0;
2021            if ($("body").hasClass("admin-bar")) {
2022              offset = 32;
2023            }
2024            winHeight = winHeight - offset;
2025            off_canvas.find(".ha-offcanvas-inner").css({
2026              height: winHeight + "px",
2027              top: offset
2028            });
2029            headerHeight = off_canvas.find(".ha-offcanvas-cart-header").outerHeight(true);
2030            wrapHeight = off_canvas.find(".ha-offcanvas-wrap").outerHeight();
2031            cartTotalHeight = off_canvas.find(".woocommerce-mini-cart__total").outerHeight();
2032            cartButtonsHeight = off_canvas.find(".woocommerce-mini-cart__buttons").outerHeight();
2033            cartMessageHeight = off_canvas.find(".ha-woo-menu-cart-message").outerHeight();
2034            itemsHeight = winHeight - (headerHeight + cartTotalHeight + cartButtonsHeight + cartMessageHeight);
2035            finalItemsHeight = itemsHeight - (winHeight - wrapHeight);
2036            finalItemsHeight += "px";
2037          } else {
2038            finalItemsHeight = "auto";
2039          }
2040          var style = '<style id="ha-woo-style-' + this.id + '">';
2041          style += "#" + off_canvas.attr("id") + " .woocommerce-mini-cart.cart_list {";
2042          style += "height: " + finalItemsHeight;
2043          style += "}";
2044          style += "</style>";
2045          if ($("#ha-woopack-style-" + this.id).length > 0) {
2046            $("#ha-woopack-style-" + this.id).remove();
2047          }
2048          $("head").append(style);
2049        }
2050      }
2051    };
2052    var initOffCanvas = function initOffCanvas($scope, $) {
2053      var content_wrap = $scope.find(".ha-offcanvas-content-wrap");
2054      if ($(content_wrap).length > 0) {
2055        new OffCanvas($scope);
2056      }
2057    };
2058    elementorFrontend.hooks.addAction("frontend/element_ready/ha-off-canvas.default", initOffCanvas);
2059    var Unfold = elementorModules.frontend.handlers.Base.extend({
2060      onInit: function onInit() {
2061        elementorModules.frontend.handlers.Base.prototype.onInit.apply(this, arguments);
2062        this.run();
2063      },
2064      onElementChange: function onElementChange(e) {
2065        if (e == "unfold_text" || e == "unfold_icon" || e == "fold_text" || e == "fold_icon" || e == "fold_height" || e == "transition_duration" || e == "trigger") {
2066          this.run();
2067          if (e == "fold_height") {
2068            this.$element.find(".ha-unfold-data").css("height", this.getCollapseHeight() + "px");
2069          }
2070        }
2071      },
2072      getReadySettings: function getReadySettings() {
2073        var settings = {
2074          collapse_height: this.getElementSettings("fold_height") || 50,
2075          collapse_height_tablet: this.getElementSettings("fold_height_tablet") || this.getElementSettings("fold_height") || 50,
2076          collapse_height_mobile: this.getElementSettings("fold_height_mobile") || this.getElementSettings("fold_height_tablet") || this.getElementSettings("fold_height") || 50,
2077          trigger: this.getElementSettings("trigger"),
2078          transition_duration: this.getElementSettings("transition_duration") || 500,
2079          collapse_text: this.getElementSettings("unfold_text"),
2080          collapse_icon: this.getElementSettings("unfold_icon"),
2081          expand_text: this.getElementSettings("fold_text"),
2082          expand_icon: this.getElementSettings("fold_icon")
2083        };
2084        return $.extend({}, settings);
2085      },
2086      getCollapseHeight: function getCollapseHeight() {
2087        var body = this.$element.parents("body");
2088        var unfoldSettings = this.getReadySettings();
2089        var collapse_height = 50;
2090        if (body.attr("data-elementor-device-mode") == "desktop") {
2091          collapse_height = unfoldSettings.collapse_height;
2092        }
2093        if (body.attr("data-elementor-device-mode") == "tablet") {
2094          collapse_height = unfoldSettings.collapse_height_tablet;
2095        }
2096        if (body.attr("data-elementor-device-mode") == "mobile") {
2097          collapse_height = unfoldSettings.collapse_height_mobile;
2098        }
2099        return collapse_height;
2100      },
2101      fold: function fold(unfoldData, button, collapse_height, unfoldRender) {
2102        var unfoldSettings = this.getReadySettings();
2103        var html = unfoldSettings.collapse_icon ? unfoldSettings.collapse_icon.value ? '<i aria-hidden="true" class="' + unfoldSettings.collapse_icon.value + '"></i>' : "" : "";
2104        html += unfoldSettings.collapse_text ? "<span>" + unfoldSettings.collapse_text + "</span>" : "";
2105        unfoldData.css({
2106          "transition-duration": unfoldSettings.transition_duration + "ms",
2107          "height": unfoldRender.outerHeight(true) + 'px'
2108        });
2109        unfoldData.animate({
2110          height: collapse_height
2111        }, 0);
2112        var timeOut = setTimeout(function () {
2113          button.html(html);
2114          clearTimeout(timeOut);
2115        }, unfoldSettings.transition_duration);
2116        unfoldData.removeClass("folded");
2117      },
2118      unfold: function unfold(unfoldData, unfoldRender, button) {
2119        var unfoldSettings = this.getReadySettings();
2120        var html = unfoldSettings.expand_icon ? unfoldSettings.expand_icon.value ? '<i aria-hidden="true" class="' + unfoldSettings.expand_icon.value + '"></i>' : "" : "";
2121        html += unfoldSettings.expand_text ? "<span>" + unfoldSettings.expand_text + "</span>" : "";
2122        unfoldData.css("transition-duration", unfoldSettings.transition_duration + "ms");
2123        unfoldData.animate({
2124          height: unfoldRender.outerHeight(true)
2125        }, 0);
2126        var timeOut = setTimeout(function () {
2127          unfoldData.css("height", 'auto');
2128          button.html(html);
2129          clearTimeout(timeOut);
2130        }, unfoldSettings.transition_duration);
2131        unfoldData.addClass("folded");
2132      },
2133      run: function run() {
2134        var $this = this;
2135        var button = this.$element.find(".ha-unfold-btn"),
2136          unfoldData = this.$element.find(".ha-unfold-data"),
2137          unfoldRender = this.$element.find(".ha-unfold-data-render");
2138        var unfoldSettings = this.getReadySettings();
2139        var collapse_height = $this.getCollapseHeight();
2140        unfoldData.css("height", collapse_height + "px");
2141        if (unfoldSettings.trigger == "click") {
2142          button.on("click", function () {
2143            collapse_height = $this.getCollapseHeight();
2144            if (unfoldData.hasClass("folded")) {
2145              $this.fold(unfoldData, button, collapse_height, unfoldRender);
2146            } else {
2147              $this.unfold(unfoldData, unfoldRender, button);
2148            }
2149          });
2150        } else if (unfoldSettings.trigger == "hover") {
2151          unfoldData.on("mouseenter", function () {
2152            $this.unfold(unfoldData, unfoldRender, button);
2153          });
2154          unfoldData.on("mouseleave", function () {
2155            collapse_height = $this.getCollapseHeight();
2156            $this.fold(unfoldData, button, collapse_height, unfoldRender);
2157          });
2158        }
2159      }
2160    });
2161    var Maps = elementorModules.frontend.handlers.Base.extend({
2162      onInit: function onInit() {
2163        elementorModules.frontend.handlers.Base.prototype.onInit.apply(this, arguments);
2164        this.runMap();
2165      },
2166      defaultStyle: function defaultStyle() {
2167        var defaultStyles = {
2168          standard: "",
2169          silver: [{
2170            elementType: "geometry",
2171            stylers: [{
2172              color: "#f5f5f5"
2173            }]
2174          }, {
2175            elementType: "labels.icon",
2176            stylers: [{
2177              visibility: "off"
2178            }]
2179          }, {
2180            elementType: "labels.text.fill",
2181            stylers: [{
2182              color: "#616161"
2183            }]
2184          }, {
2185            elementType: "labels.text.stroke",
2186            stylers: [{
2187              color: "#f5f5f5"
2188            }]
2189          }, {
2190            featureType: "administrative.land_parcel",
2191            elementType: "labels.text.fill",
2192            stylers: [{
2193              color: "#bdbdbd"
2194            }]
2195          }, {
2196            featureType: "poi",
2197            elementType: "geometry",
2198            stylers: [{
2199              color: "#eeeeee"
2200            }]
2201          }, {
2202            featureType: "poi",
2203            elementType: "labels.text.fill",
2204            stylers: [{
2205              color: "#757575"
2206            }]
2207          }, {
2208            featureType: "poi.park",
2209            elementType: "geometry",
2210            stylers: [{
2211              color: "#e5e5e5"
2212            }]
2213          }, {
2214            featureType: "poi.park",
2215            elementType: "labels.text.fill",
2216            stylers: [{
2217              color: "#9e9e9e"
2218            }]
2219          }, {
2220            featureType: "road",
2221            elementType: "geometry",
2222            stylers: [{
2223              color: "#ffffff"
2224            }]
2225          }, {
2226            featureType: "road.arterial",
2227            elementType: "labels.text.fill",
2228            stylers: [{
2229              color: "#757575"
2230            }]
2231          }, {
2232            featureType: "road.highway",
2233            elementType: "geometry",
2234            stylers: [{
2235              color: "#dadada"
2236            }]
2237          }, {
2238            featureType: "road.highway",
2239            elementType: "labels.text.fill",
2240            stylers: [{
2241              color: "#616161"
2242            }]
2243          }, {
2244            featureType: "road.local",
2245            elementType: "labels.text.fill",
2246            stylers: [{
2247              color: "#9e9e9e"
2248            }]
2249          }, {
2250            featureType: "transit.line",
2251            elementType: "geometry",
2252            stylers: [{
2253              color: "#e5e5e5"
2254            }]
2255          }, {
2256            featureType: "transit.station",
2257            elementType: "geometry",
2258            stylers: [{
2259              color: "#eeeeee"
2260            }]
2261          }, {
2262            featureType: "water",
2263            elementType: "geometry",
2264            stylers: [{
2265              color: "#c9c9c9"
2266            }]
2267          }, {
2268            featureType: "water",
2269            elementType: "labels.text.fill",
2270            stylers: [{
2271              color: "#9e9e9e"
2272            }]
2273          }],
2274          retro: [{
2275            elementType: "geometry",
2276            stylers: [{
2277              color: "#ebe3cd"
2278            }]
2279          }, {
2280            elementType: "labels.text.fill",
2281            stylers: [{
2282              color: "#523735"
2283            }]
2284          }, {
2285            elementType: "labels.text.stroke",
2286            stylers: [{
2287              color: "#f5f1e6"
2288            }]
2289          }, {
2290            featureType: "administrative",
2291            elementType: "geometry.stroke",
2292            stylers: [{
2293              color: "#c9b2a6"
2294            }]
2295          }, {
2296            featureType: "administrative.land_parcel",
2297            elementType: "geometry.stroke",
2298            stylers: [{
2299              color: "#dcd2be"
2300            }]
2301          }, {
2302            featureType: "administrative.land_parcel",
2303            elementType: "labels.text.fill",
2304            stylers: [{
2305              color: "#ae9e90"
2306            }]
2307          }, {
2308            featureType: "landscape.natural",
2309            elementType: "geometry",
2310            stylers: [{
2311              color: "#dfd2ae"
2312            }]
2313          }, {
2314            featureType: "poi",
2315            elementType: "geometry",
2316            stylers: [{
2317              color: "#dfd2ae"
2318            }]
2319          }, {
2320            featureType: "poi",
2321            elementType: "labels.text.fill",
2322            stylers: [{
2323              color: "#93817c"
2324            }]
2325          }, {
2326            featureType: "poi.park",
2327            elementType: "geometry.fill",
2328            stylers: [{
2329              color: "#a5b076"
2330            }]
2331          }, {
2332            featureType: "poi.park",
2333            elementType: "labels.text.fill",
2334            stylers: [{
2335              color: "#447530"
2336            }]
2337          }, {
2338            featureType: "road",
2339            elementType: "geometry",
2340            stylers: [{
2341              color: "#f5f1e6"
2342            }]
2343          }, {
2344            featureType: "road.arterial",
2345            elementType: "geometry",
2346            stylers: [{
2347              color: "#fdfcf8"
2348            }]
2349          }, {
2350            featureType: "road.highway",
2351            elementType: "geometry",
2352            stylers: [{
2353              color: "#f8c967"
2354            }]
2355          }, {
2356            featureType: "road.highway",
2357            elementType: "geometry.stroke",
2358            stylers: [{
2359              color: "#e9bc62"
2360            }]
2361          }, {
2362            featureType: "road.highway.controlled_access",
2363            elementType: "geometry",
2364            stylers: [{
2365              color: "#e98d58"
2366            }]
2367          }, {
2368            featureType: "road.highway.controlled_access",
2369            elementType: "geometry.stroke",
2370            stylers: [{
2371              color: "#db8555"
2372            }]
2373          }, {
2374            featureType: "road.local",
2375            elementType: "labels.text.fill",
2376            stylers: [{
2377              color: "#806b63"
2378            }]
2379          }, {
2380            featureType: "transit.line",
2381            elementType: "geometry",
2382            stylers: [{
2383              color: "#dfd2ae"
2384            }]
2385          }, {
2386            featureType: "transit.line",
2387            elementType: "labels.text.fill",
2388            stylers: [{
2389              color: "#8f7d77"
2390            }]
2391          }, {
2392            featureType: "transit.line",
2393            elementType: "labels.text.stroke",
2394            stylers: [{
2395              color: "#ebe3cd"
2396            }]
2397          }, {
2398            featureType: "transit.station",
2399            elementType: "geometry",
2400            stylers: [{
2401              color: "#dfd2ae"
2402            }]
2403          }, {
2404            featureType: "water",
2405            elementType: "geometry.fill",
2406            stylers: [{
2407              color: "#b9d3c2"
2408            }]
2409          }, {
2410            featureType: "water",
2411            elementType: "labels.text.fill",
2412            stylers: [{
2413              color: "#92998d"
2414            }]
2415          }],
2416          dark: [{
2417            elementType: "geometry",
2418            stylers: [{
2419              color: "#212121"
2420            }]
2421          }, {
2422            elementType: "labels.icon",
2423            stylers: [{
2424              visibility: "off"
2425            }]
2426          }, {
2427            elementType: "labels.text.fill",
2428            stylers: [{
2429              color: "#757575"
2430            }]
2431          }, {
2432            elementType: "labels.text.stroke",
2433            stylers: [{
2434              color: "#212121"
2435            }]
2436          }, {
2437            featureType: "administrative",
2438            elementType: "geometry",
2439            stylers: [{
2440              color: "#757575"
2441            }]
2442          }, {
2443            featureType: "administrative.country",
2444            elementType: "labels.text.fill",
2445            stylers: [{
2446              color: "#9e9e9e"
2447            }]
2448          }, {
2449            featureType: "administrative.land_parcel",
2450            stylers: [{
2451              visibility: "off"
2452            }]
2453          }, {
2454            featureType: "administrative.locality",
2455            elementType: "labels.text.fill",
2456            stylers: [{
2457              color: "#bdbdbd"
2458            }]
2459          }, {
2460            featureType: "poi",
2461            elementType: "labels.text.fill",
2462            stylers: [{
2463              color: "#757575"
2464            }]
2465          }, {
2466            featureType: "poi.park",
2467            elementType: "geometry",
2468            stylers: [{
2469              color: "#181818"
2470            }]
2471          }, {
2472            featureType: "poi.park",
2473            elementType: "labels.text.fill",
2474            stylers: [{
2475              color: "#616161"
2476            }]
2477          }, {
2478            featureType: "poi.park",
2479            elementType: "labels.text.stroke",
2480            stylers: [{
2481              color: "#1b1b1b"
2482            }]
2483          }, {
2484            featureType: "road",
2485            elementType: "geometry.fill",
2486            stylers: [{
2487              color: "#2c2c2c"
2488            }]
2489          }, {
2490            featureType: "road",
2491            elementType: "labels.text.fill",
2492            stylers: [{
2493              color: "#8a8a8a"
2494            }]
2495          }, {
2496            featureType: "road.arterial",
2497            elementType: "geometry",
2498            stylers: [{
2499              color: "#373737"
2500            }]
2501          }, {
2502            featureType: "road.highway",
2503            elementType: "geometry",
2504            stylers: [{
2505              color: "#3c3c3c"
2506            }]
2507          }, {
2508            featureType: "road.highway.controlled_access",
2509            elementType: "geometry",
2510            stylers: [{
2511              color: "#4e4e4e"
2512            }]
2513          }, {
2514            featureType: "road.local",
2515            elementType: "labels.text.fill",
2516            stylers: [{
2517              color: "#616161"
2518            }]
2519          }, {
2520            featureType: "transit",
2521            elementType: "labels.text.fill",
2522            stylers: [{
2523              color: "#757575"
2524            }]
2525          }, {
2526            featureType: "water",
2527            elementType: "geometry",
2528            stylers: [{
2529              color: "#000000"
2530            }]
2531          }, {
2532            featureType: "water",
2533            elementType: "labels.text.fill",
2534            stylers: [{
2535              color: "#3d3d3d"
2536            }]
2537          }],
2538          night: [{
2539            elementType: "geometry",
2540            stylers: [{
2541              color: "#242f3e"
2542            }]
2543          }, {
2544            elementType: "labels.text.fill",
2545            stylers: [{
2546              color: "#746855"
2547            }]
2548          }, {
2549            elementType: "labels.text.stroke",
2550            stylers: [{
2551              color: "#242f3e"
2552            }]
2553          }, {
2554            featureType: "administrative.locality",
2555            elementType: "labels.text.fill",
2556            stylers: [{
2557              color: "#d59563"
2558            }]
2559          }, {
2560            featureType: "poi",
2561            elementType: "labels.text.fill",
2562            stylers: [{
2563              color: "#d59563"
2564            }]
2565          }, {
2566            featureType: "poi.park",
2567            elementType: "geometry",
2568            stylers: [{
2569              color: "#263c3f"
2570            }]
2571          }, {
2572            featureType: "poi.park",
2573            elementType: "labels.text.fill",
2574            stylers: [{
2575              color: "#6b9a76"
2576            }]
2577          }, {
2578            featureType: "road",
2579            elementType: "geometry",
2580            stylers: [{
2581              color: "#38414e"
2582            }]
2583          }, {
2584            featureType: "road",
2585            elementType: "geometry.stroke",
2586            stylers: [{
2587              color: "#212a37"
2588            }]
2589          }, {
2590            featureType: "road",
2591            elementType: "labels.text.fill",
2592            stylers: [{
2593              color: "#9ca5b3"
2594            }]
2595          }, {
2596            featureType: "road.highway",
2597            elementType
2597: "geometry",
2598            stylers: [{
2599              color: "#746855"
2600            }]
2601          }, {
2602            featureType: "road.highway",
2603            elementType: "geometry.stroke",
2604            stylers: [{
2605              color: "#1f2835"
2606            }]
2607          }, {
2608            featureType: "road.highway",
2609            elementType: "labels.text.fill",
2610            stylers: [{
2611              color: "#f3d19c"
2612            }]
2613          }, {
2614            featureType: "transit",
2615            elementType: "geometry",
2616            stylers: [{
2617              color: "#2f3948"
2618            }]
2619          }, {
2620            featureType: "transit.station",
2621            elementType: "labels.text.fill",
2622            stylers: [{
2623              color: "#d59563"
2624            }]
2625          }, {
2626            featureType: "water",
2627            elementType: "geometry",
2628            stylers: [{
2629              color: "#17263c"
2630            }]
2631          }, {
2632            featureType: "water",
2633            elementType: "labels.text.fill",
2634            stylers: [{
2635              color: "#515c6d"
2636            }]
2637          }, {
2638            featureType: "water",
2639            elementType: "labels.text.stroke",
2640            stylers: [{
2641              color: "#17263c"
2642            }]
2643          }],
2644          aubergine: [{
2645            elementType: "geometry",
2646            stylers: [{
2647              color: "#1d2c4d"
2648            }]
2649          }, {
2650            elementType: "labels.text.fill",
2651            stylers: [{
2652              color: "#8ec3b9"
2653            }]
2654          }, {
2655            elementType: "labels.text.stroke",
2656            stylers: [{
2657              color: "#1a3646"
2658            }]
2659          }, {
2660            featureType: "administrative.country",
2661            elementType: "geometry.stroke",
2662            stylers: [{
2663              color: "#4b6878"
2664            }]
2665          }, {
2666            featureType: "administrative.land_parcel",
2667            elementType: "labels.text.fill",
2668            stylers: [{
2669              color: "#64779e"
2670            }]
2671          }, {
2672            featureType: "administrative.province",
2673            elementType: "geometry.stroke",
2674            stylers: [{
2675              color: "#4b6878"
2676            }]
2677          }, {
2678            featureType: "landscape.man_made",
2679            elementType: "geometry.stroke",
2680            stylers: [{
2681              color: "#334e87"
2682            }]
2683          }, {
2684            featureType: "landscape.natural",
2685            elementType: "geometry",
2686            stylers: [{
2687              color: "#023e58"
2688            }]
2689          }, {
2690            featureType: "poi",
2691            elementType: "geometry",
2692            stylers: [{
2693              color: "#283d6a"
2694            }]
2695          }, {
2696            featureType: "poi",
2697            elementType: "labels.text.fill",
2698            stylers: [{
2699              color: "#6f9ba5"
2700            }]
2701          }, {
2702            featureType: "poi",
2703            elementType: "labels.text.stroke",
2704            stylers: [{
2705              color: "#1d2c4d"
2706            }]
2707          }, {
2708            featureType: "poi.park",
2709            elementType: "geometry.fill",
2710            stylers: [{
2711              color: "#023e58"
2712            }]
2713          }, {
2714            featureType: "poi.park",
2715            elementType: "labels.text.fill",
2716            stylers: [{
2717              color: "#3C7680"
2718            }]
2719          }, {
2720            featureType: "road",
2721            elementType: "geometry",
2722            stylers: [{
2723              color: "#304a7d"
2724            }]
2725          }, {
2726            featureType: "road",
2727            elementType: "labels.text.fill",
2728            stylers: [{
2729              color: "#98a5be"
2730            }]
2731          }, {
2732            featureType: "road",
2733            elementType: "labels.text.stroke",
2734            stylers: [{
2735              color: "#1d2c4d"
2736            }]
2737          }, {
2738            featureType: "road.highway",
2739            elementType: "geometry",
2740            stylers: [{
2741              color: "#2c6675"
2742            }]
2743          }, {
2744            featureType: "road.highway",
2745            elementType: "geometry.stroke",
2746            stylers: [{
2747              color: "#255763"
2748            }]
2749          }, {
2750            featureType: "road.highway",
2751            elementType: "labels.text.fill",
2752            stylers: [{
2753              color: "#b0d5ce"
2754            }]
2755          }, {
2756            featureType: "road.highway",
2757            elementType: "labels.text.stroke",
2758            stylers: [{
2759              color: "#023e58"
2760            }]
2761          }, {
2762            featureType: "transit",
2763            elementType: "labels.text.fill",
2764            stylers: [{
2765              color: "#98a5be"
2766            }]
2767          }, {
2768            featureType: "transit",
2769            elementType: "labels.text.stroke",
2770            stylers: [{
2771              color: "#1d2c4d"
2772            }]
2773          }, {
2774            featureType: "transit.line",
2775            elementType: "geometry.fill",
2776            stylers: [{
2777              color: "#283d6a"
2778            }]
2779          }, {
2780            featureType: "transit.station",
2781            elementType: "geometry",
2782            stylers: [{
2783              color: "#3a4762"
2784            }]
2785          }, {
2786            featureType: "water",
2787            elementType: "geometry",
2788            stylers: [{
2789              color: "#0e1626"
2790            }]
2791          }, {
2792            featureType: "water",
2793            elementType: "labels.text.fill",
2794            stylers: [{
2795              color: "#4e6d70"
2796            }]
2797          }]
2798        };
2799        return defaultStyles;
2800      },
2801      settings: function settings(wrapper) {
2802        var item = document.querySelector(wrapper);
2803        var settings = {
2804          latitude: parseFloat(item.dataset.latitude),
2805          longitude: parseFloat(item.dataset.longitude),
2806          mapType: item.dataset.mapType,
2807          markers: item.dataset.markers,
2808          polylines: item.dataset.polylines,
2809          mapZoom: parseInt(item.dataset.mapZoom),
2810          mapZoomMobile: parseInt(item.dataset.mapZoomMobile),
2811          mapZoomTablet: parseInt(item.dataset.mapZoomTablet),
2812          scrollWheelZoom: item.dataset.scrollWheelZoom,
2813          zoomControl: item.dataset.zoomControl,
2814          fullscreenControl: item.dataset.fullScreen,
2815          mapDraggable: item.dataset.disableMapDrag,
2816          showLegend: item.dataset.showLegend,
2817          showRoute: item.dataset.showRoute,
2818          googleMapType: item.dataset.googleMapType,
2819          mapTypeControl: item.dataset.mapTypeControl,
2820          streetViewControl: item.dataset.streetView,
2821          infoOpen: item.dataset.infoOpen,
2822          infoOpenHover: item.dataset.infoOpenHover,
2823          mapStyle: item.dataset.mapStyle,
2824          customMapStyles: item.dataset.customMapStyle,
2825          defaultStyle: this.defaultStyle(),
2826          strokeColor: item.dataset.strokeColor,
2827          strokeOpacity: item.dataset.strokeOpacity,
2828          strokeWeight: item.dataset.strokeWeight,
2829          strokeFill: item.dataset.strokeFill,
2830          strokeFillOpacity: item.dataset.strokeFillOpacity,
2831          originLat: item.dataset.originLat,
2832          originLng: item.dataset.originLng,
2833          destLat: item.dataset.destLat,
2834          destLng: item.dataset.destLng,
2835          travelMode: item.dataset.travelMode
2836        };
2837        return settings;
2838      },
2839      isValidJsonString: function isValidJsonString(jsonString) {
2840        try {
2841          JSON.parse(jsonString);
2842        } catch (e) {
2843          return false;
2844        }
2845        return true;
2846      },
2847      mapInit: function mapInit(wrapper) {
2848        var settings = this.settings(wrapper);
2849        var markersOptionsArray = JSON.parse(settings.markers);
2850        var map;
2851        var directionsService = new google.maps.DirectionsService();
2852        var directionsRenderer = new google.maps.DirectionsRenderer();
2853        var finalZoomLevel = settings.mapZoom;
2854        window.addEventListener("resize", function () {
2855          if (elementorFrontend.getCurrentDeviceMode() == "mobile") {
2856            finalZoomLevel = settings.mapZoomMobile;
2857          } else if (elementorFrontend.getCurrentDeviceMode() == "tablet") {
2858            finalZoomLevel = settings.mapZoomTablet;
2859          } else {
2860            finalZoomLevel = settings.mapZoom;
2861          }
2862        });
2863        map = new google.maps.Map(document.querySelector(".ha-adv-google-map__wrapper" + wrapper), {
2864          center: {
2865            lat: settings.latitude === "" ? -34.391 : settings.latitude,
2866            lng: settings.longitude === "" ? 150.644 : settings.longitude
2867          },
2868          zoom: finalZoomLevel,
2869          mapTypeId: settings.mapType,
2870          zoomControl: settings.zoomControl === "yes",
2871          mapTypeControl: settings.mapTypeControl === "yes",
2872          fullscreenControl: settings.fullscreenControl === "yes",
2873          streetViewControl: settings.streetViewControl === "yes",
2874          gestureHandling: settings.scrollWheelZoom === "yes" ? "greedy" : "cooperative",
2875          draggable: settings.mapDraggable !== "yes",
2876          styles: settings.mapStyle !== "custom" ? settings.defaultStyle[settings.mapStyle] : !this.isValidJsonString(settings.customMapStyles) ? "" : JSON.parse(settings.customMapStyles)
2877        });
2878        if (settings.mapDraggable === "yes") {
2879          map.setOptions({
2880            draggableCursor: "default"
2881          });
2882        }
2883
2884        // adding markers and info window on map
2885        markersOptionsArray.forEach(function (option) {
2886          var marker = new google.maps.Marker({
2887            icon: option.pin_icon.url === "" ? "" : {
2888              url: option.pin_icon.url,
2889              scaledSize: new google.maps.Size(option.rectangular_image === "yes" ? +option.rectangular_pin_size_width.size : +option.square_pin_size.size, option.rectangular_image === "yes" ? +option.rectangular_pin_size_height.size : +option.square_pin_size.size)
2890            },
2891            map: map,
2892            position: {
2893              lat: +option.pin_latitude,
2894              lng: +option.pin_longitude
2895            }
2896          });
2897          var infoWindow = new google.maps.InfoWindow({
2898            content: '<div class="ha-adv-google-map__marker-wrapper">' + '<div class="ha-adv-google-map__marker-title-wrapper">' + '<div class="ha-adv-google-map__marker-title" style="display: inline-block">' + option.pin_item_title + "</div>" + "</div>" + '<div class="ha-adv-google-map__marker-description-wrapper">' + '<div class="ha-adv-google-map__marker-description">' + option.pin_item_description + "</div>" + "</div>" + "</div>"
2899          });
2900          if (settings.infoOpen === "yes") {
2901            infoWindow.open(map, marker);
2902          }
2903          if (settings.infoOpenHover === "yes") {
2904            marker.addListener("mouseover", function (e) {
2905              infoWindow.open(map, marker);
2906            });
2907            marker.addListener("mouseout", function (e) {
2908              var timeOut = setTimeout(function () {
2909                infoWindow.close();
2910                clearTimeout(timeOut);
2911              }, 1000);
2912            });
2913          } else {
2914            marker.addListener("click", function () {
2915              infoWindow.open(map, marker);
2916            });
2917          }
2918        });
2919
2920        // adding map legend
2921        if (settings.showLegend === "yes") {
2922          var legend = document.querySelector(wrapper).nextElementSibling;
2923          map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(legend);
2924        }
2925        if (settings.googleMapType == "polyline") {
2926          var polylines_data = JSON.parse(settings.polylines);
2927          var polylines_arr = [];
2928          polylines_data.forEach(function (polyline) {
2929            polylines_arr.push({
2930              lat: parseFloat(polyline.ha_gmap_polyline_lat),
2931              lng: parseFloat(polyline.ha_gmap_polyline_lng)
2932            });
2933          });
2934          var polyLinePath = JSON.parse(JSON.stringify(polylines_arr));
2935          var polyPath = new google.maps.Polyline({
2936            path: polyLinePath,
2937            strokeColor: settings.strokeColor,
2938            strokeOpacity: settings.strokeOpacity,
2939            strokeWeight: settings.strokeWeight
2940          });
2941          polyPath.setMap(map);
2942        }
2943        if (settings.googleMapType == "polygon") {
2944          var polylines_data = JSON.parse(settings.polylines);
2945          var polylines_arr = [];
2946          polylines_data.forEach(function (polyline) {
2947            polylines_arr.push({
2948              lat: parseFloat(polyline.ha_gmap_polyline_lat),
2949              lng: parseFloat(polyline.ha_gmap_polyline_lng)
2950            });
2951          });
2952          var polyLinePath = JSON.parse(JSON.stringify(polylines_arr));
2953          var polygon = new google.maps.Polygon({
2954            path: polyLinePath,
2955            strokeColor: settings.strokeColor,
2956            strokeOpacity: settings.strokeOpacity,
2957            strokeWeight: settings.strokeWeight,
2958            fillColor: settings.strokeFill,
2959            fillOpacity: settings.strokeFillOpacity
2960          });
2961          polygon.setMap(map);
2962        }
2963        if (settings.googleMapType == "routes") {
2964          this.routeDraw(directionsService, directionsRenderer, settings);
2965          directionsRenderer.setMap(map);
2966        }
2967        google.maps.event.addDomListener(window, "resize", function () {
2968          var center = map.getCenter();
2969          google.maps.event.trigger(map, "resize");
2970          map.setCenter(center);
2971          map.setZoom(finalZoomLevel);
2972        });
2973      },
2974      routeDraw: function routeDraw(directionsService, directionsRenderer, settings) {
2975        var start = settings.originLat + "," + settings.originLng;
2976        var end = settings.destLat + "," + settings.destLng;
2977        directionsService.route({
2978          origin: {
2979            query: start
2980          },
2981          destination: {
2982            query: end
2983          },
2984          travelMode: settings.travelMode.toUpperCase()
2985        }, function (response, status) {
2986          if (status === "OK") {
2987            directionsRenderer.setDirections(response);
2988          } else {}
2989        });
2990      },
2991      runMap: function runMap() {
2992        var gmaper = document.querySelectorAll(".ha-adv-google-map__wrapper");
2993        for (var i = 0; i < gmaper.length; i++) {
2994          gmaper[i].classList.add("ha-adv-google-map__wrapper--item" + i);
2995          this.mapInit(".ha-adv-google-map__wrapper--item" + i);
2996        }
2997      }
2998    });
2999    elementorFrontend.hooks.addAction("frontend/element_ready/ha-google-map.default", function ($scope) {
3000      elementorFrontend.elementsHandler.addHandler(Maps, {
3001        $element: $scope,
3002        selectors: {
3003          container: ".ha-adv-google-map__wrapper"
3004        }
3005      });
3006    });
3007    elementorFrontend.hooks.addAction("frontend/element_ready/ha-unfold.default", function ($scope) {
3008      elementorFrontend.elementsHandler.addHandler(Unfold, {
3009        $element: $scope
3010      });
3011    });
3012    var EddCart = function EddCart($scope) {
3013      var optionEL = $scope.find('.ha-edd-table-wrap');
3014      var settings = optionEL.data('options');
3015      var removeEl = $scope.find('.edd-remove-from-cart');
3016      if (settings.cart_btn_type == 'icon') {
3017        removeEl.html("<i class=\"".concat(settings.icon.value, "\"></i>"));
3018      } else {
3019        removeEl.text(settings.btn_text);
3020      }
3021    };
3022    elementorFrontend.hooks.addAction('frontend/element_ready/ha-edd-cart.default', EddCart);
3023    var EddCheckout = function EddCheckout($scope) {
3024      var optionEL = $scope.find('.ha-edd-table-wrap');
3025      var settings = optionEL.data('options');
3026      var removeEl = $scope.find('.edd_cart_remove_item_btn');
3027      if (settings.cart_btn_type == 'icon') {
3028        removeEl.html("<i class=\"".concat(settings.icon.value, "\"></i>"));
3029      } else {
3030        removeEl.text(settings.btn_text);
3031      }
3032    };
3033    elementorFrontend.hooks.addAction('frontend/element_ready/ha-edd-checkout.default', EddCheckout);
3034    var EddAjaxBtn = function EddAjaxBtn($scope) {
3035      var btn = $scope.find(".ha_edd_ajax_btn");
3036      btn.on('click', function (event) {
3037        event.preventDefault();
3038        var $self = $(this),
3039          download_id = $self.data('download-id'),
3040          nonce = $self.data('nonce');
3041        $.ajax({
3042          url: HappyProLocalize.ajax_url,
3043          type: "POST",
3044          data: {
3045            action: "ha_edd_ajax_add_to_cart_link",
3046            security: HappyProLocalize.nonce,
3047            download_id: download_id
3048          },
3049          success: function success(response) {
3050            if (response.success == true) {
3051              $self.html("<i class=\"fas fa-cart-plus\"></i>");
3052            }
3053          }
3054        });
3055      });
3056    };
3057    elementorFrontend.hooks.addAction('frontend/element_ready/ha-edd-product-grid.default', EddAjaxBtn);
3058    elementorFrontend.hooks.addAction('frontend/element_ready/ha-edd-product-carou
3058sel.default', EddAjaxBtn);
3059    elementorFrontend.hooks.addAction('frontend/element_ready/ha-edd-single-product.default', EddAjaxBtn);
3060    var Image_Swap = function Image_Swap($scope) {
3061      var element = $scope.find('.ha-image-swap-wrapper');
3062      var trigger_type = element.data('trigger');
3063      var status;
3064      if (trigger_type === 'click') {
3065        element.on('click', element, function () {
3066          var self = $(this);
3067          var click = self.attr('data-click');
3068          if ('inactive' == click) {
3069            status = 'active';
3070          } else {
3071            status = 'inactive';
3072          }
3073          self.attr('data-click', status);
3074          var first_img = self.find('.img_swap_first');
3075          var second_img = self.find('.img_swap_second');
3076        });
3077      }
3078      var elm = $scope.find('.ha-image-swap-ctn');
3079      var elm_img = $scope.find('.ha-image-swap-item');
3080      var trigger = elm.data('trigger');
3081      if (elm.length > 0) {
3082        $('.ha-image-swap-ctn').on('click', '.ha-image-swap-item', function (e) {
3083          var elem = $(this);
3084          var parent = elem.parent('.ha-image-swap-insider');
3085          var firstChild = parent.children('.ha-image-swap-item:first-of-type');
3086          var secondChild = parent.children('.ha-image-swap-item:nth-of-type(2)');
3087          if (!elem.is(':first-child')) {
3088            parent.addClass('changed');
3089            setTimeout(function () {
3090              firstChild.remove();
3091              parent.append(firstChild);
3092              parent.removeClass('changed');
3093            }, 400);
3094          }
3095        });
3096      }
3097      // if( trigger == 'hover'){
3098      //     elm.hover(function (e){
3099      //         var target = e.target;
3100
3101      //         if(!$(target).hasClass('active')){
3102
3103      //             var $self = $(this);
3104      //             var parent = $self.find('.ha-image-swap-insider');
3105      //             var firstChild = parent.children('.ha-image-swap-item:first-of-type');
3106      //             var secondChild = parent.children('.ha-image-swap-item:nth-of-type(2)');
3107
3108      //             firstChild.toggleClass('active');
3109      //             secondChild.toggleClass('active');
3110      //         }
3111      //     });
3112      // }
3113    };
3114    var FlipBox = function FlipBox($scope) {
3115      var element = $scope.find('.ha-flip-box-inner');
3116      // touchstart
3117      element.on('mouseenter mouseleave touchstart', function (e) {
3118        if (('mouseenter' == e.type || 'touchstart' == e.type) && !$(this).hasClass('flip')) {
3119          $(this).addClass('flip');
3120        } else if (('mouseleave' == e.type || 'touchstart' == e.type) && $(this).hasClass('flip')) {
3121          $(this).removeClass('flip');
3122        } else if ('touchstart' == e.type && $(this).hasClass('flip')) {
3123          $(this).removeClass('flip');
3124        }
3125      });
3126    };
3127    elementorFrontend.hooks.addAction('frontend/element_ready/ha-image-swap.default', Image_Swap);
3128    var FreeShippingBar = function FreeShippingBar($scope) {
3129      var $fsbContainer = $scope.find('.ha-fsb-container');
3130      if ($fsbContainer) {
3131        var $settings = $fsbContainer.data('fsb_settings');
3132        if ($settings != undefined) {
3133          var $aimationSpeed = $settings.hasOwnProperty('ha_fsb_animation_speed') ? $settings.ha_fsb_animation_speed : 15;
3134          var $achivePercent = $settings.hasOwnProperty('achive_percent') ? $settings.achive_percent : 0;
3135          var $progressType = $settings.hasOwnProperty('progress_type') ? $settings.progress_type : 'percent';
3136          var $currencySymbol = $settings.hasOwnProperty('currencySymbol') && $progressType == 'percent' ? '%' : $settings.currencySymbol;
3137          var $cartTotal = $settings.hasOwnProperty('cart_total') ? $settings.cart_total : 0;
3138          var $totalPercent = parseFloat(Math.round($achivePercent)) >= 100 ? 100 : parseFloat(Math.round($achivePercent));
3139          var $progressText = $progressType == 'percent' ? $totalPercent : $cartTotal;
3140          var $elem = $fsbContainer.find('.ha-fsb-size');
3141          $elem.text($progressText + $currencySymbol);
3142          var defaultWidth = $(window).width() <= 768 ? 12 : 5;
3143          $totalPercent > 0 ? $elem.css({
3144            'width': $totalPercent + "%",
3145            'transition': 'width ' + $aimationSpeed + 'ms ease-in-out'
3146          }) : $elem.css('width', +defaultWidth + "%");
3147        }
3148      }
3149    };
3150    elementorFrontend.hooks.addAction('frontend/element_ready/ha-shipping-bar.default', FreeShippingBar);
3151    $('.fsb-close-icon').on('click', function () {
3152      document.cookie = "ha_close_fsb = yes;path=/";
3153      $('.ha-fsb-container').hide();
3154    });
3155    elementorFrontend.hooks.addAction('frontend/element_ready/ha-flip-box.default', FlipBox
3155);
3156    var HaRemoteCarousel = function HaRemoteCarousel($scope) {
3157      var $rcContainer = $scope.find('.ha-remote-carousel-container');
3158      if ($rcContainer) {
3159        var $rcBtn = $($rcContainer).find('.ha-custom-nav-remote-carousel');
3160        if ($rcBtn) {
3161          var $prevSliderIndex = 0;
3162          var $slides_to_show = 0;
3163          var $ha_show_thumbnail = $($rcBtn).parent().data('show_thumbnail');
3164          var $ha_rc_unique_id = $($rcBtn).parent().data('ha_rc_id');
3165          var $haRcSelector = $ha_rc_unique_id ? $('[data-ha_rcc_uid="' + $ha_rc_unique_id + '"]') : '';
3166          if ($ha_show_thumbnail && $ha_show_thumbnail == 'yes') {
3167            $haRcSelector.on('init', function (event, slick, currentSlide) {
3168              var $dataSettingsSelector = $haRcSelector.parent().parent();
3169              var $dataSettings = $dataSettingsSelector.data('settings');
3170              $slides_to_show = typeof $dataSettings === "undefined" ? $slides_to_show : $dataSettings.slides_to_show;
3171              $prevSliderIndex = (currentSlide ? currentSlide : 0) - 1;
3172              var $nextIndex = parseInt($slides_to_show) + parseInt($prevSliderIndex) + 1;
3173              var $nextItem = $haRcSelector.find('[data-slick-index="' + $nextIndex + '"]');
3174              var $nextImg = $nextItem.find('img').attr('src');
3175              var $prevItem = $haRcSelector.find('[data-slick-index="' + $prevSliderIndex + '"]');
3176              var $prevImg = $prevItem.find('img').attr('src');
3177              var $nextBtn = $rcContainer.find('.ha-remote-carousel-btn-next');
3178              var $prevBtn = $rcContainer.find('.ha-remote-carousel-btn-prev');
3179              $nextBtn.css({
3180                'background-image': 'url(' + $nextImg + ')',
3181                'background-position': 'center'
3182              });
3183              $prevBtn.css({
3184                'background-image': 'url(' + $prevImg + ')',
3185                'background-position': 'center'
3186              });
3187            });
3188            $haRcSelector.trigger('init');
3189            $($rcBtn).on("click", function (e) {
3190              e.preventDefault();
3191              $haRcSelector.on('afterChange', function (event, slick, currentSlideIndex) {
3192                var $dataSettingsSelector = $haRcSelector.parent().parent();
3193                var $dataSettings = $dataSettingsSelector.data('settings');
3194                var $slides_to_show = $dataSettings ? $dataSettings.slides_to_show : currentSlideIndex;
3195                $prevSliderIndex = parseInt(currentSlideIndex - 1);
3196                var $nextIndex = parseInt($slides_to_show) + parseInt($prevSliderIndex) + 1;
3197                var $nextItem = $haRcSelector.find('[data-slick-index="' + $nextIndex + '"]');
3198                var $nextImg = $nextItem.find('img').attr('src');
3199                var $prevItem = $haRcSelector.find('[data-slick-index="' + $prevSliderIndex + '"]');
3200                var $prevImg = $prevItem.find('img').attr('src');
3201                var $nextBtn = $rcContainer.find('.ha-remote-carousel-btn-next');
3202                var $prevBtn = $rcContainer.find('.ha-remote-carousel-btn-prev');
3203                if ($nextBtn) {
3204                  $nextBtn.css({
3205                    'background-image': 'url(' + $nextImg + ')',
3206                    'background-position': 'center'
3207                  });
3208                }
3209                if ($prevBtn) {
3210                  $prevBtn.css({
3211                    'background-image': 'url(' + $prevImg + ')',
3212                    'background-position': 'center'
3213                  });
3214                }
3215              });
3216              if ($(this).data("ha_rc_nav") == 'ha_rc_next_btn') {
3217                $haRcSelector.slick("slickNext");
3218              } else if ($(this).data("ha_rc_nav") == 'ha_rc_prev_btn') {
3219                $haRcSelector.slick("slickPrev");
3220              }
3221            });
3222          } else {
3223            $($rcBtn).on("click", function (e) {
3224              e.preventDefault();
3225              if ($(this).data("ha_rc_nav") == 'ha_rc_next_btn') {
3226                $haRcSelector.slick("slickNext");
3227              } else if ($(this).data("ha_rc_nav") == 'ha_rc_prev_btn') {
3228                $haRcSelector.slick("slickPrev");
3229              }
3230            });
3231          }
3232        }
3233      }
3234    };
3235    elementorFrontend.hooks.addAction('frontend/element_ready/ha-remote-carousel.default', HaRemoteCarousel);
3236    var HaTOC = elementorModules.frontend.handlers.Base.extend({
3237      getDefaultSettings: function getDefaultSettings() {
3238        var elementSettings = this.getElementSettings(),
3239          listWrapperTag = "numbers" === elementSettings.marker_view ? "ol" : "ul";
3240        return {
3241          selectors: {
3242            widgetContainer: ".ha-toc-wrapper",
3243            container: '.elementor:not([data-elementor-type="header"]):not([data-elementor-type="footer"])',
3244            expandButton: ".ha-toc__header",
3245            collapseButton: ".ha-toc__header",
3246            body: ".ha-toc__body",
3247            headerTitle: ".ha-toc__header-title",
3248            scrollTop: ".ha-toc__scroll-to-top--container"
3249          },
3250          classes: {
3251            anchor: "ha-toc-menu-anchor",
3252            listWrapper: "ha-toc__list-wrapper",
3253            listItem: "ha-toc__list-item",
3254            listTextWrapper: "ha-toc__list-item-text-wrapper",
3255            firstLevelListItem: "ha-toc__top-level",
3256            listItemText: "ha-toc__list-item-text",
3257            activeItem: "ha-toc-item-active",
3258            headingAnchor: "ha-toc__heading-anchor",
3259            collapsed: "ha-toc--collapsed"
3260          },
3261          listWrapperTag: listWrapperTag
3262        };
3263      },
3264      getDefaultElements: function getDefaultElements() {
3265        var settings = this.getSettings(),
3266          elementSettings = this.getElementSettings();
3267        return {
3268          $pageContainer: jQuery(elementSettings.container || settings.selectors.container),
3269          $widgetContainer: this.$element.find(settings.selectors.widgetContainer),
3270          $expandButton: this.$element.find(settings.selectors.expandButton),
3271          $collapseButton: this.$element.find(settings.selectors.collapseButton),
3272          $tocBody: this.$element.find(settings.selectors.body),
3273          $listItems: this.$element.find("." + settings.classes.listItem),
3274          $scrollTop: this.$element.find(settings.selectors.scrollTop)
3275        };
3276      },
3277      bindEvents: function bindEvents() {
3278        var $self = this;
3279        var elementSettings = this.getElementSettings();
3280        if (elementSettings.minimize_box) {
3281          this.elements.$expandButton.on("click", function () {
3282            if (!$($self.$element).hasClass($self.getSettings("classes.collapsed"))) {
3283              return $self.collapseBox();
3284            } else {
3285              return $self.expandBox();
3286            }
3287          });
3288        }
3289        if (elementSettings.collapse_subitems) {
3290          this.elements.$listItems.hover(function (event) {
3291            return jQuery(event.target).slideToggle();
3292          });
3293        }
3294        if (elementSettings.sticky_toc_toggle) {
3295          elementorFrontend.elements.$window.on("resize", this.handleStickyToc);
3296        }
3297        if (elementSettings.scroll_to_top_toggle) {
3298          this.elements.$scrollTop.on("click", function () {
3299            $self.scrollToTop();
3300          });
3301        }
3302      },
3303      getHeadings: function getHeadings() {
3304        // Get all headings from document by user-selected tags
3305        var elementSettings = this.getElementSettings(),
3306          tags = elementSettings.headings_by_tags.join(","),
3307          selectors = this.getSettings("selectors"),
3308          excludedSelectors = elementSettings.exclude_headings_by_selector;
3309        return this.elements.$pageContainer.find(tags).not(selectors.headerTitle).filter(function (index, heading) {
3310          return !jQuery(heading).closest(excludedSelectors).length; // Handle excluded selectors if there are any
3311        });
3312      },
3313      addAnchorsBeforeHeadings: function addAnchorsBeforeHeadings() {
3314        var $this = this;
3315        // Add an anchor element right before each TOC heading to create anchors for TOC links
3316        var classes = this.getSettings("classes");
3317        this.elements.$headings.before(function (index) {
3318          var anchorLink = $this.getHeadingAnchorLink(index, classes);
3319          return '<span id="' + anchorLink + '" class="' + classes.anchor + ' "></span>';
3320        });
3321      },
3322      activateItem: function activateItem($listItem) {
3323        var classes = this.getSettings("classes");
3324        this.deactivateActiveItem($listItem);
3325        $listItem.addClass(classe
3325s.activeItem);
3326        this.$activeItem = $listItem;
3327        if (!this.getElementSettings("sticky_toc_toggle")) {
3328          //Note:- The "Collapse" option will not work unless you make the Table of Contents sticky.
3329          return;
3330        }
3331        if (!this.getElementSettings("collapse_subitems")) {
3332          return;
3333        }
3334        var $activeList = void 0;
3335        if ($listItem.hasClass(classes.firstLevelListItem)) {
3336          $activeList = $listItem.parent().next();
3337        } else {
3338          $activeList = $listItem.parents("." + classes.listWrapper).eq(-2);
3339        }
3340        if (!$activeList.length) {
3341          delete this.$activeList;
3342          return;
3343        }
3344        this.$activeList = $activeList;
3345        this.$activeList.stop().slideDown();
3346      },
3347      deactivateActiveItem: function deactivateActiveItem($activeToBe) {
3348        if (!this.$activeItem || this.$activeItem.is($activeToBe)) {
3349          return;
3350        }
3351        var _getSettings = this.getSettings(),
3352          classes = _getSettings.classes;
3353        this.$activeItem.removeClass(classes.activeItem);
3354        if (this.$activeList && (!$activeToBe || !this.$activeList[0].contains($activeToBe[0]))) {
3355          this.$activeList.slideUp();
3356        }
3357      },
3358      followAnchor: function followAnchor($element, index) {
3359        var $self = this;
3360        var anchorSelector = $element[0].hash;
3361        var $anchor = void 0;
3362        try {
3363          // `decodeURIComponent` for UTF8 characters in the hash.
3364          $anchor = jQuery(decodeURIComponent(anchorSelector));
3365        } catch (e) {
3366          return;
3367        }
3368        if (0 === index) {
3369          haObserveTarget($anchor[0], function (direction) {
3370            if ($self.itemClicked) {
3371              return;
3372            }
3373            if ("down" === direction) {
3374              $self.activateItem($element);
3375            } else {
3376              $self.deactivateActiveItem();
3377            }
3378          });
3379        }
3380        haObserveTarget($anchor[0], function (direction) {
3381          if ($self.itemClicked) {
3382            return;
3383          }
3384          if ("down" === direction) {
3385            $self.activateItem($self.$listItemTexts.eq(index + 1));
3386          } else {
3387            $self.activateItem($element);
3388          }
3389        });
3390      },
3391      followAnchors: function followAnchors() {
3392        var $self = this;
3393        this.$listItemTexts.each(function (index, element) {
3394          return $self.followAnchor(jQuery(element), index);
3395        });
3396      },
3397      setOffset: function setOffset($listItem) {
3398        var $this = this;
3399        var settings = this.getSettings();
3400        var list = this.$element.find("." + settings.classes.listItem);
3401        var offset = this.getCurrentDeviceSetting("scroll_offset");
3402        list.each(function () {
3403          $('a', this).on('click', function (e) {
3404            e.preventDefault();
3405            var hash = this.hash;
3406            $('html, body').animate({
3407              scrollTop: $(hash).offset().top - parseInt(offset.size)
3408            }, 800);
3409          });
3410        });
3411      },
3412      populateTOC: function populateTOC() {
3413        var $self = this;
3414        this.listItemPointer = 0;
3415        var elementSettings = this.getElementSettings();
3416        if (elementSettings.custom_style == 'yes') {
3417          this.elements.$widgetContainer.html(this.createSideDot());
3418        } else {
3419          if (elementSettings.hierarchical_view) {
3420            this.createNestedList();
3421          } else {
3422            this.createFlatList();
3423          }
3424        }
3425        this.$listItemTexts = this.$element.find(".ha-toc__list-item-text");
3426        this.$listItemTexts.on("click", this.onListItemClick.bind(this));
3427        if (!elementorFrontend.isEditMode()) {
3428          this.followAnchors();
3429        }
3430        $(window).on('scroll', function () {
3431          if ("window_top" === elementSettings.scroll_to_top_option) {
3432            if ($(window).scrollTop() > 0) {
3433              $self.elements.$scrollTop.show();
3434            } else {
3435              $self.elements.$scrollTop.hide();
3436            }
3437          } else {
3438            var $id = $self.getID().parents('.elementor-element');
3439            if ($id.offset().top >= $(window).scrollTop()) {
3440              $self.elements.$scrollTop.hide();
3441            } else {
3442              $self.elements.$scrollTop.show();
3443            }
3444          }
3445        });
3446      },
3447      createNestedList: function createNestedList() {
3448        var $self = this;
3449        this.headingsData.forEach(function (heading, index) {
3450          heading.level = 0;
3451          for (var i = index - 1; i >= 0; i--) {
3452            var currentOrderedItem = $self.headingsData[i];
3453            if (currentOrderedItem.tag <= heading.tag) {
3454              heading.level = currentOrderedItem.level;
3455              if (currentOrderedItem.tag < heading.tag) {
3456                heading.level++;
3457              }
3458              break;
3459            }
3460          }
3461        });
3462        this.elements.$tocBody.html(this.getNestedLevel(0));
3463      },
3464      createFlatList: function createFlatList() {
3465        this.elements.$tocBody.html(this.getNestedLevel());
3466      },
3467      createSideDot: function createSideDot(level) {
3468        var settings = this.getSettings(),
3469          elementSettings = this.getElementSettings(),
3470          icon = this.getElementSettings("icon"),
3471          htmlul = '';
3472        if (elementSettings.custom_style == 'yes') {
3473          htmlul += "<div class=\"".concat(elementSettings.custom_style_list, "\">\n                    <div class=\"hm-toc \">\n                    <ul class=\"hm-toc-items\" style=\"list-style: none;\">\n                        <li>");
3474          if (elementSettings.custom_style_list == 'hm-toc-slide-style') {
3475            htmlul += "<".concat(elementSettings.html_tag, " class=\"hm-toc-title\"><span>").concat(elementSettings.widget_title, "<span></").concat(elementSettings.html_tag, ">");
3476          } else {
3477            htmlul += "<".concat(elementSettings.html_tag, " class=\"hm-toc-title\">").concat(elementSettings.widget_title, "</").concat(elementSettings.html_tag, ">");
3478          }
3479          htmlul += "<".concat(settings.listWrapperTag, " class=\"hm-toc-items-inner\">");
3480          for (var i = 0; i < this.headingsData.length; i++) {
3481            var list = '';
3482            var currentItemDot = this.headingsData[i];
3483            if (level > currentItemDot.level) {
3484              break;
3485            }
3486            var listItemTextClasses = settings.classes.listItemText;
3487            if (0 === currentItemDot.level) {
3488              // If the current list item is a top level item, give it the first level class
3489              listItemTextClasses += " " + settings.classes.firstLevelListItem;
3490            }
3491            if (level === currentItemDot.level) {
3492              list += "<li class=\"hm-toc-entry ".concat(settings.classes.listItem, "\">");
3493              if ('bullets' === elementSettings.marker_view && icon && elementSettings.custom_style_list == 'hm-toc-slide-style') {
3494                list += "<i class=\"".concat(icon.value, "\"></i>");
3495              }
3496              list += "<a href=\"#".concat(currentItemDot.anchorLink, "\" class=\"").concat(listItemTextClasses, "\"><span>").concat(currentItemDot.text, "</span></a>");
3497              list += "</li>";
3498            }
3499            htmlul += list;
3500          }
3501          htmlul += "</".concat(settings.listWrapperTag, ">");
3502          htmlul += "</li>\n                    </ul>";
3503        }
3504        return htmlul;
3505      },
3506      getNestedLevel: function getNestedLevel(level) {
3507        var settings = this.getSettings(),
3508          elementSettings = this.getElementSettings(),
3509          icon = this.getElementSettings("icon");
3510        var html = '';
3511
3512        // Open new list/nested list
3513        html += "<" + settings.listWrapperTag + ' class="' + settings.classes.listWrapper + '">';
3514
3515        // for each list item, build its markup.
3516        while (this.listItemPointer < this.headingsData.length) {
3517          var currentItem = this.headingsData[this.listItemPointer];
3518          var listItemTextClasses = settings.classes.listItemText;
3519          if (0 === currentItem.level) {
3520            // If the current list item is a top level item, give it the first level class
3521            listItemTextClasses += " " + settings.classes.firstLevelListItem;
3522          }
3523          if (level > currentItem.level) {
3524            break;
3525          }
3526          if (level === currentItem.level) {
3527            html += '<li class="' + settings.classes.listItem + " " + "level-" + level + '">';
3528            html += '<div class="' + settings.classes.listTextWrapper + '">';
3529            var liContent = '<a href="#' + currentItem.anchorLink + '" class="' + listItemTextClasses + '">' + currentItem.text + "</a>";
3530
3531            // If list type is bullets, add the bullet icon as an <i> tag
3532            if ("bullets" === elementSettings.marker_view && icon) {
3533              liContent = '<i class="' + icon.value + '"></i>' + liContent;
3534            }
3535            html += liContent;
3536            html += "</div>";
3537            this.listItemPointer++;
3538            var nextItem = this.headingsData[this.listItemPointer];
3539            if (nextItem && level < nextItem.level) {
3540              // If a new nested list has to be created under the current item,
3541              // this entire method is called recursively (outside the while loop, a list wrapper is created)
3542              html += this.getNestedLevel(nextItem.level);
3543            }
3544            html += "</li>";
3545          }
3546        }
3547        html += "</" + settings.listWrapperTag + ">";
3548        return html;
3549      },
3550      handleNoHeadingsFound: function handleNoHeadingsFound() {
3551        var _messages = 'No headings were found on this page.';
3552        if (elementorFrontend.isEditMode()) {
3553          return this.elements.$tocBody.html(_messages);
3554        }
3555      },
3556      collapseOnInit: function collapseOnInit() {
3557        var $self = this;
3558        var minimizedOn = this.getElementSettings("minimized_on"),
3559          currentDeviceMode = elementorFrontend.getCurrentDeviceMode();
3560        if ("" !== minimizedOn && "array" !== typeof minimizedOn) {
3561          minimizedOn = [minimizedOn];
3562        }
3563        if (0 !== minimizedOn.length && "object" === _typeof(minimizedOn)) {
3564          minimizedOn.forEach(function (value) {
3565            if ("desktop" === value[0] && "desktop" == currentDeviceMode && $(window).width() < elementorFrontend.config.breakpoints.xxl || "tablet" === value[0] && "tablet" === currentDeviceMode && $(window).width() < elementorFrontend.config.breakpoints.lg || "mobile" === value[0] && "mobile" === currentDeviceMode && $(window).width() < elementorFrontend.config.breakpoints.md) {
3566              $self.collapseBox();
3567            }
3568          });
3569        }
3570      },
3571      getHeadingAnchorLink: function getHeadingAnchorLink(index, classes) {
3572        var headingID = this.elements.$headings[index].id,
3573          wrapperID = this.elements.$headings[index].closest('.elementor-widget').id;
3574        var anchorLink = '';
3575        if (headingID) {
3576          anchorLink = headingID;
3577        } else if (wrapperID) {
3578          // If the heading itself has an ID, we don't want to overwrite it
3579          anchorLink = wrapperID;
3580        } // If there is no existing ID, use the heading text to create a semantic ID
3581
3582        if (headingID || wrapperID) {
3583          jQuery(this.elements.$headings[index]).data('hasOwnID', true);
3584        } else {
3585          anchorLink = "".concat(classes.headingAnchor, "-").concat(index);
3586        }
3587        return anchorLink;
3588      },
3589      setHeadingsData: function setHeadingsData() {
3590        var $this = this;
3591        this.headingsData = [];
3592        var classes = this.getSettings("classes");
3593
3594        // Create an array for simplifying TOC list creation
3595        this.elements.$headings.each(function (index, element) {
3596          var anchorLink = $this.getHeadingAnchorLink(index, classes);
3597          $this.headingsData.push({
3598            tag: +element.nodeName.slice(1),
3599            text: element.textContent,
3600            anchorLink: anchorLink
3601          });
3602        });
3603      },
3604      run: function run() {
3605        var elementSettings = this.getElementSettings();
3606        this.elements.$headings = this.getHeadings();
3607        if (!this.elements.$headings.length) {
3608          return this.handleNoHeadingsFound();
3609        }
3610        this.setHeadingsData();
3611        if (!elementorFrontend.isEditMode()) {
3612          this.addAnchorsBeforeHeadings();
3613        }
3614        this.populateTOC();
3615        if (elementSettings.minimize_box) {
3616          this.collapseOnInit();
3617        }
3618        if (elementSettings.sticky_toc_toggle) {
3619          this.handleStickyToc();
3620        }
3621        if ("" !== elementSettings.scroll_offset.size) {
3622          this.setOffset();
3623        }
3624      },
3625      expandBox: function expandBox() {
3626        var boxHeight = this.getCurrentDeviceSetting("min_height");
3627        this.$element.removeClass(this.getSettings("classes.collapsed"));
3628        this.elements.$tocBody.slideDown();
3629
3630        // return container to the full height in case a min-height is defined by the user
3631        this.elements.$widgetContainer.css("min-height", boxHeight.size + boxHeight.unit);
3632      },
3633      collapseBox: function collapseBox() {
3634        this.$element.addClass(this.getSettings("classes.collapsed"));
3635        this.elements.$tocBody.slideUp();
3636
3637        // close container in case a min-height is defined by the user
3638        this.elements.$widgetContainer.css("min-height", "0px");
3639      },
3640      onInit: function onInit() {
3641        var $self = this;
3642        this.initElements();
3643        this.bindEvents();
3644        jQuery(document).ready(function () {
3645          $self.run();
3646        });
3647      },
3648      onListItemClick: function onListItemClick(event) {
3649        var $self = this;
3650        this.itemClicked = true;
3651        setTimeout(function () {
3652          return $self.itemClicked = false;
3653        }, 2000);
3654        var $clickedItem = jQuery(event.target),
3655          $list = $clickedItem.parent().next(),
3656          collapseNestedList = this.getElementSettings("collapse_subitems");
3657        if ("SPAN" == $clickedItem[0].tagName && 'yes' == this.getElementSettings("custom_style")) {
3658          $clickedItem = jQuery(event.currentTarget);
3659        }
3660        var listIsActive = void 0;
3661        if (collapseNestedList && $clickedItem.hasClass(this.getSettings("classes.firstLevelListItem"))) {
3662          if ($list.is(":visible")) {
3663            listIsActive = true;
3664          }
3665        }
3666        this.activateItem($clickedItem);
3667        if (collapseNestedList && listIsActive) {
3668          $list.slideUp();
3669        }
3670      },
3671      handleStickyToc: function handleStickyToc() {
3672        var elementSettings = this.getElementSettings();
3673        var currentDeviceMode = elementorFrontend.getCurrentDeviceMode();
3674        var $devices = elementSettings.sticky_toc_disable_on;
3675        var target = this.getID();
3676        var type = elementSettings.sticky_toc_type;
3677        if ("in-place" === type) {
3678          var parentWidth = target.parent().parent().outerWidth();
3679          target.css("width", parentWidth);
3680        } else if ("custom-position" === type) {
3681          var parentWidth = target.parent().parent().outerWidth();
3682          target.css("width", parentWidth);
3683        }
3684        if (-1 == $.inArray(currentDeviceMode, $devices)) {
3685          target.removeClass('floating-toc');
3686          $(window).off('scroll', this.stickyScroll);
3687          return;
3688        }
3689        $(window).on('scroll', $.proxy(this.stickyScroll, this));
3690      },
3691      stickyScroll: function stickyScroll() {
3692        var target = this.getID();
3693        var elementSettings = this.getElementSettings();
3694        var item = document.querySelector(".ha-table-of-contents");
3695        var bound, tocHeight;
3696        bound = item.getBoundingClientRect();
3697        tocHeight = target.outerHeight();
3698        if (target.hasClass("floating-toc")) {
3699          target.parent().parent().css("height", tocHeight);
3700        } else {
3701          target.parent().parent().css("height", '');
3702        }
3703        if (bound.y + bound.height / 2 < 0) {
3704          if (target.hasClass('floating-toc')) {
3705            return;
3706          }
3707          target.addClass("floating-toc");
3708        } else {
3709          if (!target.hasClass('floating-toc')) {
3710            return;
3711          }
3712          target.removeClass("floating-toc");
3713        }
3714      },
3715      scrollToTop: function scrollToTop() {
3716        var $self = this;
3717        var scrollTo = this.getElementSettings("scroll_to_top_option");
3718        if ("window_top" === scrollTo) {
3719          $("html, body").animate({
3720            scrollTop: 0
3721          }, 250);
3722        } else {
3723          var $id = this.getID().parents('.ha-table-of-contents');
3724          $("html, body").animate({
3725            scrollTop: $($id).offset().top - 60
3726          }, 1000);
3727        }
3728      },
3729      getID: function getID() {
3730        return $("#ha-toc-" + this.$element[0].attributes["data-id"].nodeValue);
3731      }
3732    });
3733    elementorFrontend.hooks.addAction("frontend/element_ready/ha-table-of-contents.default", function ($scope) {
3734      elementorFrontend.elementsHandler.addHandler(HaTOC, {
3735        $element: $scope
3736      });
3737    });
3738
3739    //creativeSlider
3740    var HaCreativeSlider = function HaCreativeSlider($scope) {
3741      var $rcContainer = $scope.find('.ha-creative-slider-container');
3742      if ($rcContainer) {
3743        var $haCsWidth = window.innerWidth;
3744        var $haCsNextSelector = parseInt($haCsWidth) <= 767 ? $rcContainer.find('.ha_cs_mobile_next') : $rcContainer.find('.ha_cc_next_wrapper');
3745        var $haCsPrevSelector = parseInt($haCsWidth) <= 767 ? $rcContainer.find('.ha_cs_mobile_prev') : $rcContainer.find('.ha_cc_prev_wrapper');
3746        var csTextItemDelay = parseInt($haCsWidth) <= 767 ? 40 : 30;
3747        var csImageItemDelay = 40;
3748        var csPrevItemsOwl = $rcContainer.find('.ha_cc_prev_items');
3749        var csTextItemsOwl = $rcContainer.find('.ha_cc_text_items');
3750        var csImageItemsOwl = $rcContainer.find('.ha_cc_inner_image_items');
3751        var csNextItemsOwl = $rcContainer.find('.ha_cc_next_items');
3752        var csPrevNavOptions = {
3753          loop: true,
3754          dots: false,
3755          nav: false,
3756          items: 1,
3757          autoplay: false,
3758          smartSpeed: 500,
3759          touchDrag: false,
3760          mouseDrag: false,
3761          rewind: true,
3762          startPosition: -1
3763        };
3764        var csNextNavOptions = {
3765          loop: true,
3766          dots: false,
3767          nav: false,
3768          items: 1,
3769          autoplay: false,
3770          smartSpeed: 500,
3771          touchDrag: false,
3772          mouseDrag: false,
3773          rewind: true,
3774          startPosition: 1
3775        };
3776        var csGeneralOptions = {
3777          loop: true,
3778          dots: false,
3779          nav: false,
3780          items: 1,
3781          autoplay: false,
3782          smartSpeed: 1000,
3783          touchDrag: false,
3784          mouseDrag: false,
3785          singleItem: true,
3786          animateOut: 'fadeOutRight',
3787          animateIn: 'fadeInLeft',
3788          rewind: true
3789        };
3790      }
3791      csPrevItemsOwl.owlCarousel(csPrevNavOptions);
3792      csNextItemsOwl.owlCarousel(csNextNavOptions);
3793      csTextItemsOwl.owlCarousel(csGeneralOptions);
3794      csImageItemsOwl.owlCarousel(csGeneralOptions);
3795      window.parent.addEventListener('message', function (e) {
3796        if ('ha_cs_reinit' == e.data) {
3797          csTextItemsOwl.owlCarousel('refresh');
3798          csImageItemsOwl.owlCarousel('refresh');
3799        }
3800      });
3801      $($haCsPrevSelector).click(function (e) {
3802        e.preventDefault();
3803        csPrevItemsOwl.trigger('prev.owl.carousel');
3804        csNextItemsOwl.trigger('prev.owl.carousel');
3805        setTimeout(function () {
3806          csTextItemsOwl.trigger('prev.owl.carousel');
3807        }, csTextItemDelay);
3808        setTimeout(function () {
3809          csImageItemsOwl.trigger('prev.owl.carousel');
3810        }, csTextItemDelay + csImageItemDelay);
3811      });
3812      $($haCsNextSelector).click(function (e) {
3813        e.preventDefault();
3814        csPrevItemsOwl.trigger('next.owl.carousel');
3815        csNextItemsOwl.trigger('next.owl.carousel');
3816        setTimeout(function () {
3817          csTextItemsOwl.trigger('next.owl.carousel');
3818        }, csTextItemDelay);
3819        setTimeout(function () {
3820          csImageItemsOwl.trigger('next.owl.carousel');
3821        }, csTextItemDelay + csImageItemDelay);
3822      });
3823    };
3824    elementorFrontend.hooks.addAction('frontend/element_ready/ha-creative-slider.default', HaCreativeSlider);
3825
3826    //Advanced Comparison Table
3827    var AdvancedComparisonTable = function AdvancedComparisonTable($scope) {
3828      var nav = $scope.find('ul.ha-adct-table-responsive-nav');
3829      var rows = $scope.find(".ha-adct-row, .ha-adct-child-row");
3830      var collapse = $scope.find(".ha-adct-collapse-icon-wrap");
3831
3832      // console.log(rows);
3833
3834      var pos = 2;
3835      nav.on("click", "li", function () {
3836        var pos = $(this).index() + 2;
3837        // console.log( pos );
3838
3839        rows.find(".ha-adct-column:not(:eq(0))").hide();
3840        $scope.find(".ha-adct-column:nth-child(" + pos + ")").css("display", "flex");
3841        nav.find("li").removeClass("active");
3842        $(this).addClass("active");
3843      });
3844      collapse.on("click", function () {
3845        var row_wrap = $(this).closest('.ha-adct-row-wrap');
3846        // console.log( row_wrap );
3847        $(this).toggleClass('open');
3848        row_wrap.find('.ha-adct-child-row-wrap').slideToggle("slow");
3849        // row_wrap.find('.ha-adct-child-row-wrap .ha-adct-column').slideToggle("slow");
3850        // $('.ha-adct-heading').slideToggle("slow");
3851      });
3852
3853      // Initialize the media query
3854      //var mediaQuery = window.matchMedia("(min-width: 767px)");
3855      // console.log(mediaQuery);
3856
3857      $(window).on('resize', function () {
3858        var mode = $('body').attr('data-elementor-device-mode');
3859        // console.log(mode);
3860
3861        if ('tablet' == mode || 'mobile_extra' == mode || 'mobile' == mode) {
3862          rows.find(".ha-adct-column:not(:eq(0))").hide();
3863          $scope.find(".ha-adct-column:nth-child(" + pos + ")").css("display", "flex");
3864        } else {
3865          rows.find(".ha-adct-column").removeAttr("style");
3866        }
3867      });
3868    };
3869    elementorFrontend.hooks.addAction('frontend/element_ready/ha-advanced-comparison-table.default', AdvancedComparisonTable);
3870  });
3871})(jQuery, Happy, window);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.