"use strict";(self.webpackChunkbongacams=self.webpackChunkbongacams||[]).push([[571],{76736:function(i,e,n){n.r(e),n.d(e,{MenuResize:function(){return h},init:function(){return r}});var t=n(41669),h=function(){function i(){this.wrapperPadding=10}return i.prototype.init=function(){var i=this;this.$container=t(".header_nav_wrp"),this.$spaNav=t(".js-spa_nav"),this.$wrapper=this.$container.find(".header_nav"),this.listOfHiding=[this.$wrapper.find(".js-buy_link")],this.onWindowResizeHandler=function(){i.checkMenu()},this.onHeaderChangeHandler=function(){i.checkMenu()},this.checkMenu(),this.attachHandlers()},i.prototype.attachHandlers=function(){t(document).on("header:change",this.onHeaderChangeHandler),t(window).on("resize.menuWatch",this.onWindowResizeHandler)},i.prototype.detachHandlers=function(){t(document).off("header:change",this.onHeaderChangeHandler),t(window).off(".menuWatch")},i.prototype.checkMenu=function(){if(this.difference=null,this.diff()<=this.wrapperPadding||this.$wrapper.height()>this.$container.height())for(var i=0;ithis.wrapperPadding))break}else for(i=this.listOfHiding.length-1;i>=0;i--){var e;if((e=this.listOfHiding[i]).length&&!e.is(":visible")){if(this.diff()<=e.outerWidth(!0)+this.wrapperPadding)break;this.showElement(e)}}},i.prototype.diff=function(){return null==this.difference&&(this.difference=this.$container.width()-this.$wrapper.width()),this.difference},i.prototype.hideElement=function(i){i.hide(),this.difference=null},i.prototype.showElement=function(i){i.show(),this.difference=null},i}();function r(){(new h).init()}}}]);