1/******************************************************************************************* 2* ___ _ ______ _ _ _ * 3* / _ \| | | ___ \ | (_) | | © 2021 * 4* / /_\ | | _____ _| |_/ /_ __ __ _ _ __ __| |_ _ __ __ _ | |_ ___ __ _ _ __ ___ * 5* | _ | |/ _ \ \/ / ___ \ '__/ _` | '_ \ / _` | | '_ \ / _` | | __/ _ \/ _` | '_ ` _ \ * 6* | | | | | __/> <| |_/ / | | (_| | | | | (_| | | | | | (_| | | || __/ (_| | | | | | | * 7* \_| |_/_|\___/_/\_\____/|_| \__,_|_| |_|\__,_|_|_| |_|\__, | \___\___|\__,_|_| |_| |_| * 8* __/ | * 9* |___/ * 10* ---------------------------------------------------------------------------------------- * 11* This is commercial software, only users who have purchased a valid license and accept * 12* to the terms of the License Agreement can install and use this program. * 13* ---------------------------------------------------------------------------------------- * 14* website: https://cs-cart.alexbranding.com * 15* email: [email protected] * 16*******************************************************************************************/ 17(function(_, $) { 18_.abt__yt.temporary.menu_columns = {}; 19var prev_width = 0; 20 21var resize = function(_force) { 22var force = _force | false; 23var one_col_width = 170; 24var new_width = window.innerWidth; 25if ((new_width === prev_width && !force) || new_width <= 767) { 26return true; 27} 28prev_width = new_width; 29$(".ty-menu__item.cm-menu-item-responsive").each(function (menu_id) { 30var first_lvl_parent = $(this); 31var parent = first_lvl_parent.find(".ty-menu__submenu-items:not(.tree-level-dropdown)"); 32if (parent.length) { 33var settings_columns = first_lvl_parent.data("settingsCols"); 34var parent_width = parent.width(); 35var columns = Math.floor(parent_width / one_col_width); 36if (settings_columns >= columns && _.abt__yt.temporary.menu_columns[menu_id] !== columns) { 37_.abt__yt.temporary.menu_columns[menu_id] = columns; 38var subcols = parent.find(".ty-menu__submenu-col"); 39if (subcols.length >= columns) { 40var subitems_count = first_lvl_parent.data("subitemsCount"); 41var items_in_cols = Math.ceil(subitems_count / columns); 42var big_cols_count = subitems_count % columns; 43var index = 0; 44for (var i = 0; i < columns; i++) { 45if (i === big_cols_count && big_cols_count !== 0) { 46items_in_cols--; 47} 48var column = subcols.eq(i); 49for (var j = 0; j < items_in_cols; j++) { 50var li = parent.find("[data-elem-index=" + index++ + "]"); 51li.appendTo(column); 52} 53} 54} 55} 56} 57}); 58}; 59$('.ypi-menu__inbox').parent().prev().on('click', function(){ 60if (!this.classList.contains('open')) { 61setTimeout(function() { 62resize(true); 63}, 10); 64} 65}); 66$(window).on('resize', resize); 67}(Tygh, Tygh.$));
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.