PageSourceSearch

https://balticinox.by/bitrix/templates/aspro_max/js/asproFilterHelper.min.js?16662587237548

js balticinox.by collected 2026-10-08 16:19:38 UTC 7,548 bytes, 1 lines download raw bytes

1function asproFilterHelper(e,t){if(this.resultDiv=$("#filter-helper"),this.smart=e,this.noAjax=t,this.resultDiv.length){this.resultDiv.empty(),this.smartFilter=$(".bx_filter.bx_filter_vertical"),this.filterHelper=[],this.getInputsInfo(this.smartFilter);var l=this;$(document).on("click","#filter-helper .filterHelperItem .delete_filter, #filter-helper .filterHelperItem:not(.multiple) .title-wrapper",function(e){var t=$(e.target),i=t.closest(".filterHelperItem").data("id"),r={};r.ID=i,t.closest(".filterHelperItem").hasClass("multiple")&&(r.MULTIPLE=!0),t.closest(".filterHelperItem").hasClass("price")&&(r.PRICE=!0),l.clearValue(r)}),$(document).on("click","#filter-helper .filterHelperItem .select-wrapper .select-value",function(e){var t=$(e.target).closest(".select-value").data("id");l.clearValue({ID:t})})}}asproFilterHelper.prototype.check=function(){return this.resultDiv.length&&this.smartFilter.length},asproFilterHelper.prototype.getInputsInfo=function(d){if(d.length&&this.check()){var f=this;this.inputs=d.find("input"),this.inputs.length&&this.inputs.each(function(e,t){var i=$(t),r=i.hasClass("min-price")||i.hasClass("max-price");if(i.attr("checked")&&!i.attr("disabled")||r&&i.val()){var l="",a="",s=i.closest(".bx_filter_parameters_box");if(s.length){a=s.data("prop_code")?s.data("prop_code"):"";var n=s.data("property_name");void 0!==n&&(l=n)}var c=void 0===i.data("title")?"":i.data("title");if(!c){var h=d.find("label[for="+i.attr("name")+"]"),p=d.find("label[for="+i.attr("id")+"]");h.length?c=(c=h.find("[title]")).length?c.attr("title"):"":p.length&&(c=p.find("[title]"),c=p.length?c.attr("title"):"")}r&&(i.hasClass("min-price")?c=BX.message("FROM"):i.hasClass("max-price")&&(c=BX.message("BEFORE")),c+=" "+i.val(),a=i.attr("name").replace(/_MIN|_MAX/,""));var o={NAME:i.attr("id"),VALUE:c,INPUT:i,TITLE:l.trim(),CODE:a,TYPE:r?"price":i.attr("type")};f.add(o)}})}},asproFilterHelper.prototype.reload=function(){if(!this.check())return!1;this.filterHelper=[],this.resultDiv.length&&(this.resultDiv.empty(),this.resultDiv.hide())},asproFilterHelper.prototype.add=function(e){if(!this.check())return!1;void 0===this.filterHelper&&this.reload(),void 0===this.filterHelper[e.CODE]&&(this.filterHelper[e.CODE]=[]),this.filterHelper[e.CODE].push(e)},asproFilterHelper.prototype.show=function(){if(!this.check())return!1;if(this.resultDiv.length&&this.filterHelper&&Object.keys(this.filterHelper).length){this.resultDiv.empty();'<div class="bx_filter_parameters_box_title filter_title  active-filter">','<i class="svg  svg-inline-icon" aria-hidden="true">','<svg xmlns="http://www.w3.org/2000/svg" width="12" height="10" viewBox="0 0 12 10">','<path class="cls-1" d="M574.593,665.783L570,670.4V674l-2-1v-2.6l-4.6-4.614a0.94,0.94,0,0,1-.2-1.354,0.939,0.939,0,0,1,.105-0.16,0.969,0.969,0,0,1,.82-0.269h9.747a0.968,0.968,0,0,1,.82.269,0.94,0.94,0,0,1,.087.132A0.945,0.945,0,0,1,574.593,665.783Zm-8.164.216L569,668.581,571.571,666h-5.142Z" transform="translate(-563 -664)"></path>',"</svg>","</i>","</div>",this.resultDiv.append('<div class="bx_filter_parameters_box_title filter_title  active-filter"><i class="svg  svg-inline-icon" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="12" height="10" viewBox="0 0 12 10"><path class="cls-1" d="M574.593,665.783L570,670.4V674l-2-1v-2.6l-4.6-4.614a0.94,0.94,0,0,1-.2-1.354,0.939,0.939,0,0,1,.105-0.16,0.969,0.969,0,0,1,.82-0.269h9.747a0.968,0.968,0,0,1,.82.269,0.94,0.94,0,0,1,.087.132A0.945,0.945,0,0,1,574.593,665.783Zm-8.164.216L569,668.581,571.571,666h-5.142Z" transform="translate(-563 -664)"></path></svg></i></div>');var e=$('<div class="filterHelperItemsWrapper"></div>');this.resultDiv.append(e);var t=this;for(var i in t.filterHelper){var r=t.getResultHTML(t.filterHelper[i]);r&&e.append(r)}this.resultDiv.css("display","flex")}},asproFilterHelper.prototype.clearValue=function(e){if(!this.check())return!1;if(void 0!==e.MULTIPLE&&e.MULTIPLE||void 0!==e.PRICE&&e.PRICE)if(void 0!==e.PRICE&&e.PRICE){var t=this.smartFilter.find("input.min-price#"+e.ID+"_MIN"),i=this.smartFilter.find("input.max-price#"+e.ID+"_MAX"),r=t.closest(".bx_filter_parameters_box_container");if(r.length){var l=r.find("[id^=colorUnavailableActive_]").attr("id").replace("colorUnavailableActive_",""),a=window["trackBar"+l];a.leftPercent=a.rightPercent=0,r.find("[id^=left_slider_]").css({left:"0%"}),r.find("[id^=colorUnavailableActive_]").css({left:"0%",right:"0%"}),r.find("[id^=colorAvailableInactive_]").css({left:"0%",right:"0%"}),r.find("[id^=colorAvailableActive_]").css({left:"0%",right:"0%"}),r.find("[id^=right_slider_]").css({right:"0%"})}if(t.length&&(t.val(""),smartFilter.keyup(t[0]),$("#"+e.ID+"_MIN").val("")),i.length){i.attr("placeholder");i.val(""),smartFilter.keyup(i[0]),$("#"+e.ID+"_MAX").val("")}}else{var s=this.smartFilter.find("[data-prop_code="+e.ID+"]");if(s.length){var n=s.find("input");n.length&&n.each(function(e,t){var i=$(t),r=i.siblings("label[for="+i.attr("id")+"]");r.length&&r.hasClass("active")?r.trigger("click"):t.checked&&i.trigger("click")})}}else{var c=$("#"+e.ID);if(c.length){var h=c.attr("type");if("checkbox"==h){var p=$("label[for="+e.ID+"]");p.length&&p.hasClass("active")?p.trigger("click"):c[0].checked&&c.trigger("click")}else if("radio"==h){var o=c.closest(".bx_filter_parameters_box_container");if(o.length){var d=o.siblings(".popup-window").length?o.siblings(".popup-window"):!!o.find(".bx_filter_select_popup").length&&o.find(".bx_filter_select_popup"),f=!!d,v=o.find("[id^=all_]");if(v.length){var g=v.attr("id");if(f){var _=d.find("label[for="+g+"]");if(_.length){_.trigger("click"),d.hide();var u=d.find(".bx_filter_select_popup");u.length&&u.show()}}else v.trigger("click")}}}}}this.noAjax&&(this.reloadPage=!0)},asproFilterHelper.prototype.apply=function(){if(!this.check())return!1;if(this.noAjax&&this.reloadPage){var e=this.smartFilter.find("#set_filter");e.length&&e.trigger("click")}},asproFilterHelper.prototype.getResultHTML=function(e){if(!this.check())return!1;if(1==e.length){(t=e[0]).ITEM_CLASS=" colored_theme_bg_hovered_hover ","price"==e[0].TYPE&&(t.ITEM_CLASS+=" price",t.NAME=t.NAME.replace(/_MIN|_MAX/,""))}else{if(!(1<e.length))return!1;var t={NAME:e[0].CODE,TITLE:e[0].TITLE,VALUE:e.length+BX.message("FILTER_HELPER_VALUES"),ITEM_CLASS:"price"==e[0].TYPE?"price colored_theme_bg_hovered_hover":"multiple",TYPE:e[0].TYPE,VALUES:e}}"in_stock"==t.CODE&&(t.TITLE="");var i="";i+='<svg xmlns="http://www.w3.org/2000/svg" width="8.031" height="8" viewBox="0 0 8.031 8">',i+='<path class="cls-1" d="M756.41,668.967l2.313,2.315a1,1,0,0,1-1.415,1.409L755,670.379l-2.309,2.312a1,1,0,0,1-1.414-1.409l2.312-2.315-2.281-2.284a1,1,0,1,1,1.414-1.409L755,667.555l2.277-2.281a1,1,0,1,1,1.414,1.409Z" transform="translate(-751 -66
15)"></path>',i+="</svg>";var r="";return r+='<div class="filterHelperItem colored_theme_bg rounded3'+(void 0===t.ITEM_CLASS?"":" "+t.ITEM_CLASS)+'" data-id="'+t.NAME+'">',r+='<div class="title-wrapper colored_theme_bg_hovered_hover">',t.TITLE&&(r+='<span class="title">',r+=t.TITLE+": ",r+="</span>"),r+='<span class="value">',"price"==t.TYPE&&void 0!==t.VALUES?t.VALUES.forEach(function(e,t){r+=e.VALUE+" "}):r+=t.VALUE,r+="</span>",r+="</div>",r+='<span class="delete_filter colored_theme_bg_hovered_hover">',r+=i,r+="</span>",void 0!==t.VALUES&&"price"!=t.TYPE&&(r+='<div class="select-wrapper">',r+='<div class="select-inner rounded3">',t.VALUES.forEach(function(e,t){r+='<div class="select-value" data-id="'+e.NAME+'">',r+=e.VALUE,r+=i,r+="</div>"}),r+="</div>",r+="</div>"),r+="</div>"};

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.