PageSourceSearch

https://endorfin.pro/wp-content/themes/hello-elementor/assets/js/hello-frontend.min.js?ver=3.1.0

js endorfin.pro collected 2026-10-06 05:22:57 UTC 6,268 bytes, 146 lines download raw bytes

1/******/ (() => { // webpackBootstrap
2/******/ 	"use strict";
3var __webpack_exports__ = {};
4
5
6class elementorHelloThemeHandler {
7  constructor() {
8    this.initSettings();
9    this.initElements();
10    this.bindEvents();
11  }
12  initSettings() {
13    this.settings = {
14      selectors: {
15        menuToggle: '.site-header .site-navigation-toggle',
16        menuToggleHolder: '.site-header .site-navigation-toggle-holder',
17        dropdownMenu: '.site-header .site-navigation-dropdown'
18      }
19    };
20  }
21  initElements() {
22    this.elements = {
23      window,
24      menuToggle: document.querySelector(this.settings.selectors.menuToggle),
25      menuToggleHolder: document.querySelector(this.settings.selectors.menuToggleHolder),
26      dropdownMenu: document.querySelector(this.settings.selectors.dropdownMenu)
27    };
28  }
29  bindEvents() {
30    var _this$elements$menuTo;
31    if (!this.elements.menuToggleHolder || (_this$elements$menuTo = this.elements.menuToggleHolder) !== null && _this$elements$menuTo !== void 0 && _this$elements$menuTo.classList.contains('hide')) {
32      return;
33    }
34    this.elements.menuToggle.addEventListener('click', () => this.handleMenuToggle());
35    this.elements.dropdownMenu.querySelectorAll('.menu-item-has-children > a').forEach(anchorElement => anchorElement.addEventListener('click', event => this.handleMenuChildren(event)));
36  }
37  closeMenuItems() {
38    this.elements.menuToggleHolder.classList.remove('elementor-active');
39    this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
40  }
41  handleMenuToggle() {
42    const isDropdownVisible = !this.elements.menuToggleHolder.classList.contains('elementor-active');
43    this.elements.menuToggle.setAttribute('aria-expanded', isDropdownVisible);
44    this.elements.dropdownMenu.setAttribute('aria-hidden', !isDropdownVisible);
45    this.elements.dropdownMenu.inert = !isDropdownVisible;
46    this.elements.menuToggleHolder.classList.toggle('elementor-active', isDropdownVisible);
47
48    // Always close all sub active items.
49    this.elements.dropdownMenu.querySelectorAll('.elementor-active').forEach(item => item.classList.remove('elementor-active'));
50    if (isDropdownVisible) {
51      this.elements.window.addEventListener('resize', () => this.closeMenuItems());
52    } else {
53      this.elements.window.removeEventListener('resize', () => this.closeMenuItems());
54    }
55  }
56  handleMenuChildren(event) {
57    const anchor = event.currentTarget;
58    const parentLi = anchor.parentElement;
59    if (!(parentLi !== null && parentLi !== void 0 && parentLi.classList)) {
60      return;
61    }
62    parentLi.classList.toggle('elementor-active');
63  }
64}
65document.addEventListener('DOMContentLoaded', () => {
66  new elementorHelloThemeHandler();
67});
68/******/ })()
69;
70
71
72
73
74
75
76document.addEventListener('DOMContentLoaded', function () {
77    // Функция для обработки отправки формы
78    function handleFormSubmission(form) {
79        form.addEventListener('submit', function (event) {
80            event.preventDefault(); // Останавливаем стандартное поведение формы
81
82            // Получаем данные из полей формы
83            const name = form.querySelector('#form-field-name').value;
84            const phone = form.querySelector('#form-field-phone').value;
85            // Наблюдаем за появлением popup с сообщением
86            const observer = new MutationObserver(function (mutationsList, observer) {
87                for (const mutation of mutationsList) {
88                    if (mutation.type === 'childList') {
89                        const popupNameField = document.querySelector('.popup-name');
90                        const popupPhoneField = document.querySelector('.popup-phone');
91
92                        // Если поля найдены в popup, передаем данные
93                        if (popupNameField && popupPhoneField) {
94                            popupNameField.textContent = name + ',';
95                            popupPhoneField.textContent = phone;
96                            observer.disconnect(); // Останавливаем наблюдение
97                        }
98                    }
99                }
100            });
101
102            // Запускаем наблюдатель на всем доÐ
102ºÑƒÐ¼ÐµÐ½Ñ‚е
103            observer.observe(document.body, { childList: true, subtree: true });
104        });
105    }
106
107    // Наблюдение за появлением формы в popup
108    function observePopupForms() {
109        const popupObserver = new MutationObserver(function (mutationsList, observer) {
110            for (const mutation of mutationsList) {
111                if (mutation.type === 'childList') {
112                    // Ищем форму в новом popup
113                    const formInPopup = mutation.target.querySelector('.elementor-form');
114                    if (formInPopup) {
115                        handleFormSubmission(formInPopup); // Если форма найдена, добавляем обработчик
116                    }
117                }
118            }
119        });
120
121        // Запускаем наблюдатель за изменениями в DOM (появление новых popup)
122        popupObserver.observe(document.body, { childList: true, subtree: true });
123    }
124
125    // Ищем все формы на странице, включая те, что могут быть в popup
126    document.querySelectorAll('.elementor-form').forEach(function (form) {
127        handleFormSubmission(form);  // Для каждой формы на странице добавляем обработчик
128    });
129
130    // Запускаем наблюдатель за появлением форм в popup
131    observePopupForms();
132	
133});
134
135
136document.querySelectorAll('.elementor-button-link').forEach(link => {
137	  link.addEventListener('mousedown', function() {
138		// Сразу после нажатия убираем фокус, чтобы сбросить hover
139		this.blur();
140	  });
141
142	  // Снимаем фокус после открытия попапа или новой вкладки
143	  link.addEventListener('focusout', function() {
144		this.blur();
145	  });
146});

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.