PageSourceSearch

https://rostec.ru/local/templates/rostec2/assets/local/custom.js

js rostec.ru collected 2026-10-01 08:28:08 UTC 33,523 bytes, 787 lines download raw bytes

1$(document).ready(function() {
2    let searchParams = new URLSearchParams(window.location.search);
3    let searchQuery = searchParams.get('q');
4    let searchQueryMedia = searchParams.get('query');
5    let searchDate = searchParams.get('date');
6    let searchSection = searchParams.get('section');
7    let searchDirection = searchParams.get('direction');
8
9    $(document).on('click', '.news-list__more', function(){
10        const btn = $(this);
11
12        if ($('.result-search').length) {
13            var targetContainer = $('.result-search__items');  // Контейнер, в котором хранятся элементы
14        } else {
15            var targetContainer = $('.news-list__items');
16        }
17
18        var url =  $('.news-list__more').attr('data-url-load');    //  URL, из которого будем брать элементы
19        if (url !== undefined) {
20            $.ajax({
21                type: 'GET',
22                url: url,
23                data: {
24                    query: searchQueryMedia,
25                    date: searchDate,
26                    section: searchSection,
27                    direction: searchDirection
28                },
29                dataType: 'html',
30                beforeSend: function () {
31                    btn.addClass('_is-loading');
32                    btn.click(false);
33                },
34                success: function(data){
35                    $('.news-list__more').remove();  //  Удаляем старую навигацию
36                    pagination = $(data).find('.news-list__more');//  Ищем навигацию
37                    if ($('.result-search').length) {
38                        var elements = $(data).find('.result-search__item');  //  Ищем элементы
39                        targetContainer.append(elements);   //  Добавляем посты в конец контейнера
40                        $('.result-search__bottom').append(pagination); //  добавляем навигацию следом
41                    } else {
42                        var elements = $(data).find('.news-list__item');  //  Ищем элементы
43                        targetContainer.append(elements);   //  Добавляем посты в конец контейнера
44                        $('.news-list__section').after(pagination); //  добавляем навигацию следом
45                    }
46                    btn.removeClass('_is-loading');
47                }
48            })
49        }
50    });
51    $('.js-news-category').on('click', function () {
52        var newsSectionIdPrevious = $('input[name=section]').val();
53        var newsSectionId = $(this).data('id');
54        $('input[name=section]').val(newsSectionId);
55        if (newsSectionId.toString() == newsSectionIdPrevious.toString()) {
56            $('input[name=section]').val('');
57        }
58        document.getElementsByClassName('sorting-panel__form')[0].submit();
59    });
60
61    $(".js-news-direction").on("click", function () {
62        var newsDirectionIdPrevious = $("input[name=direction]").val();
63        var newsDirectionId = $(this).data("code");
64        $("input[name=direction]").val(newsDirectionId);
65        if (newsDirectionId.toString() == newsDirectionIdPrevious.toString()) {
66            $("input[name=direction]").val("");
67        }
68        document.getElementsByClassName("sorting-panel__form")[0].submit();
69    });
70
71    $(document).on('click', '.js-button-filter', function () {
72        $('button.inner-header__button-filter._is-active').not('[data-value=' + $(this).data('value') + ']').removeClass('_is-active');
73        let urlParts = window.location.href.split('?');
74
75        if ($(this).hasClass('_is-active')) {
76            window.location.href = urlParts[0] + '?' + $(this).data('prop-code') + '=' + $(this).data('value');
77        } else {
78            window.location.href = urlParts[0];
79        }
80    });
81	
82    if(window.location.href.split('/')[4] == "multimedia") {
83        $('.nav-direction__nav ul li._is-active').addClass('_is_active_and_clickable');
84	}
85
86    var newsDatepicker;
87
88    function newsDatepickerInit() {
89        if($('.js-choice-date').length > 0) {
90            newsDatepicker = new AirDatepicker('.js-choice-date', {
91                autoClose: true,
92                position: 'bottom left'
93            });
94        }
95    }
96	
97    function newsDatepickerUpdate() {
98        if($('.js-choice-date').length > 0) {
99            newsDatepicker.update({
100            autoClose: true,
101            position: 'bottom left',
102            onSelect: function onSelect(fd, date, inst) {
103                document.getElementsByClassName('sorting-panel__form')[0].submit();
104            }
105            });
106        }
107    }
108
109    if ($('.news-list').length) {
110        newsDatepickerInit();
111        if (searchDate && searchDate !== "") {
112            var datePattern = /(\d{2})\.(\d{2})\.(\d{4})/;
113            var dt = new Date(searchDate.replace(datePattern,'$3-$2-$1'));
114            newsDatepicker.selectDate(dt);
115            setTimeout(function() { 
116                newsDatepickerUpdate();
117            }, 300);
118        } else {
119            newsDatepickerUpdate();
120        }
121    }
122
123    if (searchQueryMedia && searchQueryMedia !== "") {
124        $('input[name=query]').val(searchQueryMedia);
125    }
126
127    if (searchSection && searchSection !== "") {
128        var $selectedSection = $(`.js-news-category[data-id=${searchSection}]`);
129        $('input[name=section]').val(searchSection);
130        $selectedSection.addClass('_is-checked');
131        var newsCategory = $selectedSection.data('category');
132        $('.js-choice-category > span').html(newsCategory);
133    }
134
135    if (searchDirection && searchDirection !== "") {
136        var $selectedDirection = $(`.js-news-direction[data-code=${searchDirection}]`);
137        $("input[name=direction]").val(searchDirection);
138        $selectedDirection.addClass("_is-checked");
139        var searchNewsDirection = $selectedDirection.data("category");
140        $(".js-choice-news-direction > span").html(searchNewsDirection);
141    }
142
143    $('.search-panel__button-clear').on('click', function() {
144        $('.search-panel__form input[name=q]').val('');
145    });
146
147    $('.result-search__button-clear').on('click', function() {
148        window.location.href = "/search";
149    });
150	
151    if (searchQuery && searchQuery !== "") {
152        $('input[name=q]').val(searchQuery);
153        if ($('.result-search__title').length) {
154            $('.result-search__title span').prepend(searchQuery);
155        }
156    }
157
158    $(document).on('click', '.js-subscribe-direction', function () {
159        let checked = $(this).hasClass('_is-checked');
160        let form = $(this).closest('form');
161        let container = $(form).find('.subscribe-news__fields');
162        let id = $(this).data('id');
163
164        if (checked) {
165            container.append('<input type="hidden" name="rubrics[]" value="' + id + '" id="rubric_' + id + '"/>');
166        } else {
167            $('#rubric_' + id).remove();
168        }
169    });
170
171    $(document).on('submit', '.subscribe-news__form', function (e) {
172        let action = $(this).attr('action');
173        let email = $(this).find('.subscribe-news__input > input').val();
174        let data = $(this).serialize();
175        let fieldsContainer = $(this).find('.subscribe-news__fields');
176        let successContainer = $(this).find('.subscribe-news__success');
177        let errorContainer = $(this).find('.subscribe-news__text-error');
178
179        if (!email) {
180            errorContainer.text(JS_MESS.SUBSCRIBE_ERROR_EMAIL);
181            errorContainer.show();
182
183            return false;
184        }
185
186        $.post(action, data, function (result) {
187            if (result.success) {
188                fieldsContainer.hide();
189                successContainer.show();
190            } else {
191                errorContainer.text(result.error);
192                errorContainer.show();
193            }
194        });
195
196        return false;
197    });
198    if ($(".about-direction__content").find(".about-direction__info").length == 0){ 
199        $(".about-direction__content").addClass('about-direction__content--no-info');
200    }
201});
202function quoteMarginAdjust() {
203    var quoteMarginLeft = $('.media-news-detailed__content_text').css('marginLeft');
204    $('.quote').css('marginLeft', quoteMarginLeft);
205}
206$(window).on('load', function() {
207    setTimeout(function() { 
208        quoteMarginAdjust();
209    }, 150);
210});
211$(window).on('resize orientationchange', function() {
212    quoteMarginAdjust();
213});
214const isInViewport = (el) => {
215    var elementTop = $(el).offset().top;
216    var elementBottom = elementTop + $(el).outerHeight();
217    var viewportTop = $(window).scrollTop();
218    var viewportBottom = viewportTop + $(window).height();
219    return elementBottom > viewportTop && elementTop < viewportBottom;
220};
221function adjustStickyTop() {
222    if(($('.nav-direction').length > 0) && ($('.left_column_content').length > 0)) {
223        let nav = $('.nav-direction')[0];
224        let stickyElem = $('.left_column_content')[0];
225        var bottomPos = nav.getBoundingClientRect().bottom;
226        if (bottomPos > 0) {
227            $(stickyElem).css('top', bottomPos + 20);
228        } else {
229            $(stickyElem).css('top', '0');
230        }
231    }
232};
233var bigPercent1IsActive = false;
234var bigPercent2IsActive = false;
235const percentSpeed = 100;
236var cnt1 = document.getElementById('big_percent_1');
237var cnt2 = document.getElementById('big_percent_2');
238var cnt1D1 = document.getElementById("big_percent_1_digit_1");
239var cnt1D2 = document.getElementById("big_percent_1_digit_2");
240var cnt2D1 = document.getElementById("big_percent_2_digit_1");
241var cnt2D2 = document.getElementById("big_percent_2_digit_2");
242if((cnt1 !== null) && (cnt2 !== null)) {
243    var cnt1D1t = cnt1.getAttribute("target")[0];
244    var cnt1D2t = cnt1.getAttribute("target")[1];
245    var cnt2D1t = cnt2.getAttribute("target")[0];
246    var cnt2D2t = cnt2.getAttribute("target")[1];
247}
248const animateCounter1_1 = () => {
249    const value = +cnt1D1t;
250    const data = +cnt1D1.innerText;
251    const time = value / percentSpeed;
252    if (data < value) {
253        cnt1D1.innerText = Math.ceil(data + time);
254        $(cnt1).parent().removeClass("blurred");
255        setTimeout(animateCounter1_1, 200);
256    } else {
257        cnt1D1.innerText = value;
258    }
259};
260const animateCounter1_2 = () => {
261    const value = +cnt1D2t;
262    const data = +cnt1D2.innerText;
263    const time = value / percentSpeed;
264    if (data < value) {
265        cnt1D2.innerText = Math.ceil(data + time);
266        $(cnt1).parent().removeClass("blurred");
267        setTimeout(animateCounter1_2, 200);
268    } else {
269        cnt1D2.innerText = value;
270    }
271};
272const animateCounter2_1 = () => {
273    const value = +cnt2D1t;
274    const data = +cnt2D1.innerText;
275    const time = value / percentSpeed;
276    if (data < value) {
277        cnt2D1.innerText = Math.ceil(data + time);
278        $(cnt2).parent().removeClass("blurred");
279        setTimeout(animateCounter2_1, 200);
280    } else {
281        cnt2D1.innerText = value;
282    }
283};
284const animateCounter2_2 = () => {
285    const value = +cnt2D2t;
286    const data = +cnt2D2.innerText;
287    const time = value / percentSpeed;
288    if (data < value) {
289        cnt2D2.innerText = Math.ceil(data + time);
290        $(cnt2).parent().removeClass("blurred");
291        setTimeout(animateCounter2_2, 200);
292    } else {
293        cnt2D2.innerText = value;
294    }
295};
296const adjustDirectionFullscreenBackground = () => {
297    if($('.about_text_directions_wrapper').length > 0) {
298        if(!$('.about_text_directions_wrapper').hasClass('about_text_directions_wrapper_bg_without_adjustment')) {
299            let directionsWidth = $('.about_text_directions_wrapper').width();
300            let scrollWidth = document.querySelector('.about_text_directions_wrapper').offsetWidth - document.querySelector('.about_text_directions_wrapper').clientWidth;
301            let windowWidth = $(window).width();
302            let adjustToLeft = ((windowWidth - directionsWidth) / -2) - scrollWidth;
303            $('.about_text_directions_wrapper_bg').css('left', adjustToLeft);
304        }
305    }
306};
307
308const handleHashtagsOnScroll = (actualHashtag) => {
309    const documentScroll = $(window).scrollTop();
310    const viewportHeight = $(window).height();
311
312    // Подготовка списка всех видимых якорей на странице
313    var hashTags = [];
314    $("a[name]").each(function (index) {
315        hashTags.push({
316            top: $(this).offset().top,
317            left: $(this).offset().left,
318            hash: $(this).attr("name"),
319        });
320    });
321
322    if (hashTags.length > 0) {
323        // Сортируем якоря по расстоянию скролла до них
324        var hashtagSorted = hashTags.sort(function (a, b) {
325            return a.top - b.top;
326        });
327        
328        // Выборка якорей, расположенных в пределах окна
329        var hashtagsWatchedSorted = hashtagSorted.filter(
330            (index) => ((documentScroll < index.top) && (documentScroll > (index.top - viewportHeight))));
331        
332        if (hashtagsWatchedSorted.length > 0) {
333            let newHashtag = hashtagsWatchedSorted.shift().hash; // Самый верхний из якорей в окне в данный момент
334
335            // Если доскроллили до конца экрана, на экране есть якорь конца новости и он не единственный - то его и будем подставлять в url
336            if ((documentScroll + viewportHeight > $(document).height() - 100) && (hashtagsWatchedSorted.length > 1)) { 
337                if (hashtagsWatchedSorted.some((item) => item.hash === "#end")) {
338                    let newHashtag = "#end"; // Якорь конца новости
339                }
340            }
341            
342            if (actualHashtag !== newHashtag) {
343                // Меняем хеш в url, только если он отличается от самого верхнего якоря в окне
344                history.pushState(null,null,newHashtag);
345            }
346        }       
347    }
348};
349
350const handleHashtagsOnLoad = (actualHashtag) => {
351    if($('a[name=\"'+actualHashtag+'\"]').length > 0) {
352        $([document.documentElement, document.body]).animate(
353            {
354                scrollTop: $('a[name="' + actualHashtag + '"]').offset().top,
355            },
356            2000
357        );
358    }
359    if($('a[href=\"'+actualHashtag+'_direction\"]').length > 0) {
360        $([document.documentElement, document.body]).animate(
361            {
362                scrollTop: $(
363                    "#" + actualHashtag.slice(1) + "_direction"
364                ).offset().top,
365            },
366            2000
367        );
368    }
369};
370
371const addAnchorsToPage = () => {
372    if(($('.news-page').length > 0) && ($(".media-news-detailed").length > 0)) { // Добавление якорей на страницу детального просмотра новостей
373        $(".media-news-detailed").each(function (index) {
374            let newsContent = $(this).find(".media-news-detailed__content");
375            let newsContentPCount = newsContent.find('p').length;
376            if (newsContentPCount == 0) {
377                // Ничего не добавляем, когда нет абзацев в новости
378            } else {
379                // #start добавляем, если отсутствует
380                if (!(newsContent.find('a[name="#start"]').length > 0)) {
381                    newsContent.prepend('<a name="#start"></a>');
382                }
383                // #end добавляем, если отсутствует
384                if (!(newsContent.find('a[name="#end"]').length > 0)) {
385                    newsContent.append('<a name="#end"></a>');
386                }
387                if (newsContentPCount > 1) {
388                    // #middle добавляем, если его нет, и абзацев больше 1                    
389                    let middleP = parseInt(newsContentPCount / 2);
390                    if (!(newsContent.find('a[name="#middle"]').length > 0)) {
391                        $('<a name="#middle"></a>').insertAfter(newsContent.find(`p:nth-of-type(${middleP})`));
392                    }
393                }
394            }
395        }); 
396    }
397}
398
399const disableOtherNewsScroll = () => {
400    if($(".other-news__items.ss-container").length > 0) {
401        $(".other-news__items.ss-container").each(function (index) {
402            let scrollbar = $(this).find(".ss-scroll");
403            if(scrollbar.length < 1) {
404                $(this).addClass("ss-container-no-scrollbar");
405            } else {
406                if (scrollbar.hasClass("ss-hidden")) {
407                    $(this).addClass("ss-container-no-scrollbar");
408                } else {
409                    $(this).removeClass("ss-container-no-scrollbar");
410                }
411            }
412        });
413    }
414}
415
416const adjustHeightOtherNewsScroll = () => {
417    if ($(".other-news__items .ss-content").length > 0) {
418        $(".other-news__items .ss-content").each(function (index) {
419            var totalHeight = 0;
420            $(this).children().each(function () {
421                totalHeight += $(this).outerHeight(true); // true = include margins
422            });
423            if (totalHeight < 375) {
424                $(this).parent().parent().parent().parent().css('maxHeight', totalHeight);
425            } else {
426                $(this).parent().parent().css("maxHeight", "");
427            }
428        });
429    } else {
430        if ($(".other-news").length > 0) {
431            $(".other-news").each(function (index) {
432                if($(this).find('.other-news__items').length == 0) {
433                    $(this).css('maxHeight', '0');
434                }
435            });
436        }
437    }
438};
439
440const adjustCalendarPopupPosition = () => {
441    if($('.news-calendar').length > 0) {
442        let windowWidth = $(window).width();
443        $('.news-calendar').each(function (index) {
444            let calendarSection = $(this);
445            let calendarContainer = $(this).find('.news-calendar__container');
446            let calendarWeekDays = $(this).find('.news-calendar__date-nav');
447            let calendarPopup = $(this).find('.popup-news-day');
448            calendarPopup.css('top', calendarWeekDays.offset().top - calendarSection.offset().top + calendarWeekDays.outerHeight());
449            if(windowWidth > 767) {
450                calendarPopup.css('right', ($(window).width() - calendarContainer.width()) / 2);
451            } else {
452                calendarPopup.css('right', 0);
453            }
454
455            calendarPopupEventsContainer = $('#popup-events-items');
456            if(calendarPopupEventsContainer.length > 0) {
457                if(windowWidth > 767) {
458                    $('#events').css('overflow-y', 'hidden');
459                    if(($('.multimedia-block').length > 0) && (calendarPopupEventsContainer.length > 0)) {
460                        let multimediaBlockTopEdge = $('.multimedia-block').offset().top;
461                        let calendarItemsBottomEdge =
462                            calendarPopupEventsContainer.offset().top +
463                            calendarPopupEventsContainer.prop("scrollHeight");
464                        let calendarItemsTopEdge = calendarPopupEventsContainer.offset().top;
465                        if ((calendarItemsTopEdge < multimediaBlockTopEdge) && (multimediaBlockTopEdge < calendarItemsBottomEdge)) {
466
467                            $('.popup-news-day__items').css('height', $('.multimedia-block').offset().top - calendarPopupEventsContainer.offset().top);
468                            calendarPopupEventsContainer.css('overflow-y', 'scroll');
469                        } else {
470                            calendarPopupEventsContainer.css('overflow-y', 'visible');
471                        }
472                    }
473                    else if(($('.news-block').length > 0) && (calendarPopupEventsContainer.length > 0)) {
474                        let newsBlockTopEdge = $('.news-block').offset().top;
475                        let calendarItemsBottomEdge =
476                            calendarPopupEventsContainer.offset().top +
477                            calendarPopupEventsContainer.prop("scrollHeight");
478                        let calendarItemsTopEdge = calendarPopupEventsContainer.offset().top;
479                        if ((calendarItemsTopEdge < newsBlockTopEdge) && (newsBlockTopEdge < calendarItemsBottomEdge)) {
480                            $('.popup-news-day__items').css('height', $('.news-block').offset().top - calendarPopupEventsContainer.offset().top);
481                            calendarPopupEventsContainer.css('overflow-y', 'scroll');
482                        } else {
483                            calendarPopupEventsContainer.css('overflow-y', 'visible');
484                        }
485                    }
486
487                    calendarPopupEventsContainer.css('max-height', '');
488                } else {
489                    if(calendarPopupEventsContainer.find('.popup-news-day__item').length > 2) {
490                        $('#events').css('overflow', 'visible');
491                        $('.popup-news-day__items').css('max-height', '370px');
492                    } else {
493                        $('#events').css('overflow', 'visible');
494                        $('.popup-news-day__items').css('max-height', '');
495                        calendarPopupEventsContainer.css('height', '');
496                    }
497                }
498            }
499        });
500    }
501}
502
503const hideProductsProjectsFilter = () => {
504    if($('.inner-header__filter').length > 0) {
505        let productsProjectsFilter = $('.inner-header__filter');
506        let productsProjectsItems = $('.projects-block__items');
507        if(productsProjectsItems.length > 0) {
508            let projectsCount = productsProjectsItems.find('.projects-block__item[data-type="1"]').length || productsProjectsItems.find('.projects-block__item[data-type="18"]').length;  // 17 - продукт для EN версии, 1 - продукт для RU версии
509            let productsCount = productsProjectsItems.find('.projects-block__item[data-type="2"]').length || productsProjectsItems.find('.projects-block__item[data-type="17"]').length; // 18 - проект для EN версии, 2 - проект для RU версии
510            if ((projectsCount == 0) || (productsCount == 0)) {
511                productsProjectsFilter.css('display', 'none');
512            } else {
513                productsProjectsFilter.css('display', '');
514            }
515        } else {
516            productsProjectsFilter.css('display', 'none');
517        }
518    }
519}
520
521const setBackLink = () => {
522    if($('#back-link').length > 0) {
523        let element = document.getElementById('back-link');
524        element.setAttribute('href', document.referrer);
525        element.onclick = function() {
526            history.back();
527            return false;
528        }
529    }
530}
531
532const adjustCookiesPopupPosition = () => {
533    if($('#cookies_popup').length > 0) {        
534        let footerRightEdge = $(".footer__inner.contain").width() + $(".footer__inner.contain").offset().left;
535        let popupWidth = $("#cookies_popup").width();
536        if (($(window).width() > 767) && ($(window).width() < 1435)) {           
537            $("#cookies_popup").css("left", footerRightEdge - popupWidth - 30);
538        } else {
539            if($(window).width() < 767) {
540                $("#cookies_popup").css("left", "");
541            } else {
542                $("#cookies_popup").css("left", footerRightEdge - popupWidth);
543            }
544        }        
545    }   
546};
547
548$(window).on('load resize scroll orientationchange', function() {
549    if ($('#bg_window_1').length > 0) {
550        if (isInViewport($('#bg_window_1'))) {
551            $('.fixed_bg_img_1').css('opacity', '1');
552        } else {
553            $('.fixed_bg_img_1').css('opacity', '0');
554        }
555    }
556    if ($('#bg_window_2').length > 0) {
557        if (isInViewport($('#bg_window_2'))) {
558                $('.fixed_bg_img_2').css('opacity', '1');
559        } else {
560            $('.fixed_bg_img_2').css('opacity', '0');
561        }
562    }
563    if ($('#bg_window_3').length > 0) {
564        if (isInViewport($('#bg_window_3'))) {
565                $('.fixed_bg_img_3').css('opacity', '1');
566        } else {
567            $('.fixed_bg_img_3').css('opacity', '0');
568        }
569    }
570    if ($('#bg_window_activity').length > 0) {
571        if (isInViewport($('#bg_window_activity'))) {
572            $('.fixed_bg_img_activities').css('opacity', '1');
573        } else {
574            $('.fixed_bg_img_activities').css('opacity', '0');
575        }
576    }
577    if (($('#big_percent_1').length > 0) && ($('#big_percent_2').length > 0)) {
578        if (isInViewport($('#big_percent_1')) && !bigPercent1IsActive) {
579            bigPercent1IsActive = true;
580            if((cnt1 !== null) && (cnt2 !== null)) {
581                animateCounter1_1();
582                animateCounter1_2();
583            }
584        }
585        if (isInViewport($('#big_percent_2')) && !bigPercent2IsActive) {
586            bigPercent2IsActive = true;
587            if((cnt1 !== null) && (cnt2 !== null)) {
588                animateCounter2_1();
589                animateCounter2_2();
590            }
591        }
592    }
593    adjustStickyTop();
594    adjustDirectionFullscreenBackground();
595});
596
597$(document).on("click", ".technology_list_item_title", function (e) {
598    e.preventDefault();
599    $(this).toggleClass("_is-opened")
600        .parent()
601        .find('.technology_list_item_description')
602        .slideToggle();
603});
604
605$(window).on('load', function() {
606    addAnchorsToPage();
607    setInterval(addAnchorsToPage, 1000);
608    const targetHashtag = $(location).prop("hash");
609    handleHashtagsOnLoad(targetHashtag);
610    disableOtherNewsScroll();
611    setInterval(disableOtherNewsScroll, 1000);
612    setInterval(adjustCalendarPopupPosition, 1000);
613    hideProductsProjectsFilter();
614    setBackLink();
615    setInterval(adjustHeightOtherNewsScroll, 1000);
616
617    var newActivitiesSlider;
618    function initActivitiesSlider() {
619        newActivitiesSlider = new Swiper(".js-activities-slider", {
620            speed: 1000,
621            allowTouchMove: true,
622            loop: false,
623            spaceBetween: 32,
624            slidesPerView: 'auto',
625            watchSlidesProgress: true,
626            autoplay: {
627            delay: 5000,
628                disableOnInteraction: false
629            },
630            pagination: {
631                el: ".js-activities-slider .swiper-pagination",
632                clickable: true,
633                renderBullet: function renderBullet(index, className) {
634                    return '<span class="' + className + '">' + '<span></span>' + '</span>';
635                }
636            },
637            navigation: {
638                nextEl: ".swiper-button-next",
639                prevEl: ".swiper-button-prev"
640            },
641            breakpoints: {
642                320: {
643                    centeredSlides: true,
644                    spaceBetween: 10
645                },
646                375: {
647                    centeredSlides: true,
648                    spaceBetween: 32
649                },
650                768: {
651                    centeredSlides: false,
652                    spaceBetween: 32
653                }
654            }
655        });
656    }
657    if ($('.js-activities-slider').length) {
658        initActivitiesSlider();
659    }
660    function initDirectionTitlesSlider() {
661        var newDirectionTitlesSlider = new Swiper(".js-directions-titles-list-slider", {
662            speed: 1000,
663            allowTouchMove: true,
664            loop: false,
665            spaceBetween: 16,
666            slidesPerView: 'auto',
667            watchSlidesProgress: true,
668            centeredSlides: false,
669            autoplay: {
670                delay: 5000,
671                disableOnInteraction: false
672            }
673        });
674        /*
675        newDirectionTitlesSlider.on('click', function(e) {
676            let clickedDirection = newDirectionTitlesSlider.clickedIndex;
677            if (newActivitiesSlider) {
678                newActivitiesSlider.slideTo(clickedDirection);
679            }
680        });
681         */
682    }
683    if ($('.directions-titles-list-slider').length) {
684        initDirectionTitlesSlider();
685    }
686    $('.directions-index .production-block__item.swiper-slide').mouseenter(function () {
687        if($(this).find('.production-thumb__text').length) {
688            $(this).find('.production-thumb__text').stop();
689            $(this).find('.production-thumb__text').slideDown(300);
690            $(this).find('.production-thumb__content').addClass('_has-description');
691        }
692    });
693    $('.directions-index .production-block__item.swiper-slide').mouseleave(function () {
694        if($(this).find('.production-thumb__text').length) {
695            $(this).find('.production-thumb__text').stop();
696            $(this).find('.production-thumb__text').slideUp(300);
697            $(this).find('.production-thumb__content').removeClass('_has-description');
698        }
699    });    
700    if(!($.cookie("visited"))) {        
701        if ($("#cookies_popup").length > 0) {
702            $("#cookies_popup").addClass("cookies_popup--show");
703        }
704    }
705    if(!($.cookie("promrostectour"))) {        
706        if ($("#promrostectour_banner").length > 0) {
707            $("#promrostectour_banner").addClass("promrostectour_banner--show");
708        }
709    }
710});
711$(document).ready(function() {
712    $(window).on("resize scroll orientationchange", function () {
713        const currentHashtag = $(location).prop("hash");
714        handleHashtagsOnScroll(currentHashtag);
715    });
716    $(document).on("click", ".cookies_popup-btn", function (e) {
717        e.preventDefault();
718        if ($("#cookies_popup").length > 0) {
719            $("#cookies_popup").removeClass("cookies_popup--show");
720            $.cookie("visited", "yes", { expires: 365 });
721        }
722    });
723    $(document).on("click", ".promrostectour_banner-close", function (e) {
724        e.preventDefault();
725        if ($("#promrostectour_banner").length > 0) {
726            $("#promrostectour_banner").slideUp("fast", function() {                
727                $("#promrostectour_banner").removeClass("promrostectour_banner--show");
728                $.cookie("promrostectour", "yes", { expires: 365 });               
729            });
730        }
731    });
732
733    if(($('#popup-is-medicine').length > 0) && (!($.cookie("medicine")))) {
734        $.fancybox.open({
735            src: "#popup-is-medicine",
736            closeButton: false,
737            opts: {
738                closeBtn: false,
739                closeClick: false,
740                focus: false,
741                helpers: {
742                    overlay: { closeClick: false },
743                },
744                keys: {
745                    close: null,
746                },
747                afterClose: function () {
748                    $.cookie("medicine", "yes", { expires: 365 });
749                },
750            },
751            fullScreen: {
752                autoStart: false,
753            },
754            margin: [32, 32, 32, 32],
755        });
756    }
757});
758const numberTextIsWrapped = (element) => {
759    let numberTopElementOffsetTop = element.offset().top;
760    let numberBottomElementOffsetTop = element.find('.number_text').offset().top;
761    let numberTopElementOffsetLeft = element.offset().left;
762    let numberBottomElementOffsetLeft = element.find('.number_text').offset().left;
763    console.log(numberBottomElementOffsetLeft - numberTopElementOffsetLeft);
764    return ((numberBottomElementOffsetTop > numberTopElementOffsetTop) && (numberBottomElementOffsetLeft == numberTopElementOffsetLeft));
765}
766const directionsListAdjust = () => {
767    if ($('.footer__inner.contain').length && $('.directions-titles-list').length) {
768        var footerMarginLeft = $('.footer__inner.contain').css('margin-left');
769        var footerPaddingLeft = $('.footer__inner.contain').css('padding-left');
770        var newMargin = parseInt(footerMarginLeft) + parseInt(footerPaddingLeft) + 'px';
771    }
772    $('.directions-titles-list li:first-child').css('marginLeft', newMargin);
773    $('.directions-titles-list li:last').css('marginRight', newMargin);
774}
775$(window).on("load resize orientationchange", function () {
776    if($('.two-numbers-about-company-2 .number').length > 0 && $(window).width > 767) {
777        $('.two-numbers-about-company-2 .number').each(function (index, element) {
778            if(numberTextIsWrapped($(element))) {
779                console.log("fw");
780                $(element).find('.number_text').addClass("flex-element-wrapped");
781            } else {
782                $(element).find('.number_text').removeClass("flex-element-wrapped");
783            }
784        });
785    }
786    directionsListAdjust();
787});

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.