PageSourceSearch

https://tezido.com/bitrix/templates/aspro-premier/js/autoload/counter.min.js?17709598303760

js tezido.com collected 2026-10-08 14:11:33 UTC 3,760 bytes, 1 lines download raw bytes

1$(document).on("click",".counter__action--plus",(function(){if($(this).closest(".counter--basket").length)return;let t=$(this).closest(".counter").find(".counter__count"),o=t.val(),a=$(this).closest(".buy_block").find(".item-action .to_cart"),e=a.data("float_ratio"),n=a.data("ratio");n=e?parseFloat(n):parseInt(n,10),e&&(n=Math.round(n*arAsproOptions.JS_ITEM_CLICK.precisionFactor)/arAsproOptions.JS_ITEM_CLICK.precisionFactor);let r=parseFloat(a.data("max")?a.data("max"):$(this).data("max")?$(this).data("max"):0),s=e?parseFloat(o):parseInt(o,10);s+=n,e&&(s=Math.round(s*arAsproOptions.JS_ITEM_CLICK.precisionFactor)/arAsproOptions.JS_ITEM_CLICK.precisionFactor),parseFloat(r)>0&&s>r&&(s=r),t.val(s),t.change()})),$(document).on("click",".counter__action--minus",(function(){if($(this).closest(".counter--basket").length)return;let t=$(this).closest(".counter").find(".counter__count"),o=t.val(),a=$(this).closest(".buy_block").find(".item-action .to_cart"),e=a.data("float_ratio"),n=a.data("ratio");n=e?parseFloat(n):parseInt(n,10),e&&(n=Math.round(n*arAsproOptions.JS_ITEM_CLICK.precisionFactor)/arAsproOptions.JS_ITEM_CLICK.precisionFactor),n<=0&&(n=1);let r=parseFloat(a.data("min")?a.data("min"):$(this).data("min")?$(this).data("min"):0);r<n&&(r=n);let s=e?parseFloat(o):parseInt(o,10);s-=n,e&&(s=Math.round(s*arAsproOptions.JS_ITEM_CLICK.precisionFactor)/arAsproOptions.JS_ITEM_CLICK.precisionFactor),parseFloat(r)>0&&s<r&&(s=0),t.val(s),t.change()})),$(document).on("focus",".counter__count",(function(t){$(this).addClass("focus")})),$(document).on("blur",".counter__count",(function(t){$(this).removeClass("focus")}));let timerChangeCounterValue=!1;$(document).on("change",".counter__count",(function(t){if($(this).closest(".counter--basket").length)return;let o=$(this).closest(".buy_block").find(".item-action .to_cart"),a=JItemAction.factory(o[0]),e=$(this).val();if(0===parseFloat(e))return a.state=!1,a.resetQuantity(),BX.onCustomEvent("onCounterGoals",[{goal:a.getStateGoalCode(!1),params:{id:a.node.getAttribute("data-id")}}]),"function"==typeof JNoticeSurface&&JNoticeSurface.get().node.remove(),a.updateState(!0);let n=o.data("float_ratio"),r=o.data("ratio");r=n?parseFloat(r):parseInt(r,10);let s=e%r;n&&(r=Math.round(r*arAsproOptions.JS_ITEM_CLICK.precisionFactor)/arAsproOptions.JS_ITEM_CLICK.precisionFactor,Math.round(s*arAsproOptions.JS_ITEM_CLICK.precisionFactor)/arAsproOptions.JS_ITEM_CLICK.precisionFactor==r&&(s=0)),$(this).hasClass("focus")&&(intCount=Math.round(Math.round(e*arAsproOptions.JS_ITEM_CLICK.precisionFactor/r)/arAsproOptions.JS_ITEM_CLICK.precisionFactor)||1,0!==parseFloat(e)&&(e=intCount<=1?r:intCount*r),e=Math.round(e*arAsproOptions.JS_ITEM_CLICK.precisionFactor)/arAsproOptions.JS_ITEM_CLICK.precisionFactor);let i=o.data("max")?o.data("max"):$(this).closest(".counter").find(".counter__action--plus").data("max");i&&parseFloat(i)>0&&e>parseFloat(i)&&(e=parseFloat(i));let c=void 0!==o.data("min")?o.data("min"):$(this).closest(".counter").find(".counter__action--minus").data("min");c&&parseFloat(c)>0&&e<parseFloat(c)&&(e=parseFloat(c)),timerChangeCounterValue&&clearTimeout(timerChangeCounterValue),e<r?e=r:parseFloat(e)||(e=1),o.attr("data-quantity",e);const u=this.closest(".js-config-btns[data-btn-config]");if(u){const t=document.querySelectorAll(`[data-btn-config='${u.dataset.btnConfig}']`);t.length&&t.forEach((t=>{const o=t.querySelector(".counter__count");o!==this&&(o.value=e)}))}a.abortPrevRequest(),timerChangeCounterValue=setTimeout((function(){a.updateState(),timerChangeCounterValue=!1}),300),BX.onCustomEvent("onCounterProductAction",[{type:"change",params:{id:$(this),value:e}}]),$(this).closest(".complect-block").length&&"function"==typeof setNewPriceComplect&&setNewPriceComplect()}));

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.