1"use strict";function BitrixSmallCart(){}BitrixSmallCart.prototype={activate:function(){if(this.cartElement=BX(this.cartId),this.fixedPosition="Y"==this.arParams.POSITION_FIXED,this.fixedPosition){this.cartClosed=!0,this.maxHeight=!1,this.itemRemoved=!1,this.verticalPosition=this.arParams.POSITION_VERTICAL,this.horizontalPosition=this.arParams.POSITION_HORIZONTAL,this.topPanelElement=BX("bx-panel"),this.fixAfterRender(),this.fixAfterRenderClosure=this.closure("fixAfterRender");var t=this.closure("fixCart");this.fixCartClosure=t,this.topPanelElement&&"top"==this.verticalPosition&&BX.addCustomEvent(window,"onTopPanelCollapse",t);var e=null;BX.bind(window,"resize",function(){clearTimeout(e),e=setTimeout(t,200)})}this.setCartBodyClosure=this.closure("setCartBody"),BX.addCustomEvent(window,"OnBasketChange",this.closure("refreshCart",{}))},fixAfterRender:function(){this.statusElement=BX(this.cartId+"status"),this.statusElement&&(this.cartClosed?this.statusElement.innerHTML=this.openMessage:this.statusElement.innerHTML=this.closeMessage),this.productsElement=BX(this.cartId+"products"),this.fixCart()},closure:function(t,e){var s=this;return e?function(){s[t](e)}:function(e){s[t](e)}},toggleOpenCloseCart:function(){if(this.cartClosed)BX.removeClass(this.cartElement,"bx-closed"),BX.addClass(this.cartElement,"bx-opener"),this.statusElement.innerHTML=this.closeMessage,this.cartClosed=!1,this.fixCart();else{BX.addClass(this.cartElement,"bx-closed"),BX.removeClass(this.cartElement,"bx-opener"),BX.removeClass(this.cartElement,"bx-max-height"),this.statusElement.innerHTML=this.openMessage,this.cartClosed=!0;var t=this.cartElement.querySelector("[data-role='basket-item-list']");t&&(t.style.top="auto")}setTimeout(this.fixCartClosure,100)},setVerticalCenter:function(t){var e=t/2-this.cartElement.offsetHeight/2;e<5&&(e=5),this.cartElement.style.top=e+"px"},fixCart:function(){if("hcenter"==this.horizontalPosition){var t=("innerWidth"in window?window.innerWidth:document.documentElement.offsetWidth)/2-this.cartElement.offsetWidth/2;t<5&&(t=5),this.cartElement.style.left=t+"px"}var e="innerHeight"in window?window.innerHeight:document.documentElement.offsetHeight;switch(this.verticalPosition){case"top":this.topPanelElement&&(this.cartElement.style.top=this.topPanelElement.offsetHeight+5+"px");break;case"vcenter":this.setVerticalCenter(e)}if(this.productsElement){var s=this.cartElement.querySelector("[data-role='basket-item-list']");this.cartClosed?this.maxHeight&&(BX.removeClass(this.cartElement,"bx-max-height"),s&&(s.style.top="auto"),this.maxHeight=!1):this.maxHeight?this.productsElement.scrollHeight==this.productsElement.clientHeight&&(BX.removeClass(this.cartElement,"bx-max-height"),s&&(s.style.top="auto"),this.maxHeight=!1):"top"==this.verticalPosition||"vcenter"==this.verticalPosition?this.cartElement.offsetTop+this.cartElement.offsetHeight>=e&&(BX.addClass(this.cartElement,"bx-max-height"),s&&(s.style.top="82px"),this.maxHeight=!0):this.cartElement.offsetHeight>=e&&(BX.addClass(this.cartElement,"bx-max-height"),s&&(s.style.top="82px"),this.maxHeight=!0),"vcenter"==this.verticalPosition&&this.setVerticalCenter(e)}},refreshCart:function(t){if(this.itemRemoved){this.itemRemoved=!1;return}t.sessid=BX.bitrix_sessid(),t.siteId=this.siteId,t.templateName=this.templateName,t.arParam
1s=this.arParams,BX.ajax({url:this.ajaxPath,method:"POST",dataType:"html",data:t,onsuccess:this.setCartBodyClosure})},setCartBody:function(t){this.cartElement&&(this.cartElement.innerHTML=t.replace(/#CURRENT_URL#/g,this.currentUrl)),this.fixedPosition&&setTimeout(this.fixAfterRenderClosure,100),"function"==typeof unlockSubmitBtn&&unlockSubmitBtn()},removeItemFromCart:function(t){BX.onCustomEvent("OnBasketChange")}};
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.