PageSourceSearch

https://xn--18-6kcau5c3a9c.xn--p1ai/bitrix/templates/megamart_defa…/compact/script.min.js?16273009593809

js xn--18-6kcau5c3a9c.xn--p1ai collected 2026-10-08 16:57:28 UTC 3,809 bytes, 1 lines download raw bytes

1function CompactTitleSearch(t){var e=this;this.arParams={AJAX_PAGE:t.AJAX_PAGE,CONTAINER_ID:t.CONTAINER_ID,INPUT_ID:t.INPUT_ID,MIN_QUERY_LEN:parseInt(t.MIN_QUERY_LEN)},t.WAIT_IMAGE&&(this.arParams.WAIT_IMAGE=t.WAIT_IMAGE),t.MIN_QUERY_LEN<=0&&(t.MIN_QUERY_LEN=1),this.cache=[],this.cache_key=null,this.startText="",this.running=!1,this.currentRow=-1,this.RESULT=null,this.CONTAINER=null,this.INPUT=null,this.WAIT=null,this.ShowResult=function(t){if(BX.type.isString(t)&&(e.RESULT.innerHTML=t),!$(e.CONTAINER).is(":hidden")&&$(e.INPUT).is(":focus")){e.RESULT.style.display=""!==e.RESULT.innerHTML?"block":"none";e.adjustResultNode()}},this.onKeyPress=function(t){},this.onChange=function(t){if(!e.running){if(e.running=!0,e.INPUT.value!=e.oldValue&&e.INPUT.value!=e.startText)if(e.oldValue=e.INPUT.value,e.INPUT.value.length>=e.arParams.MIN_QUERY_LEN){if(e.cache_key=e.arParams.INPUT_ID+"|"+e.INPUT.value,null==e.cache[e.cache_key]){if(e.WAIT){var n=BX.pos(e.INPUT),s=n.bottom-n.top-2;e.WAIT.style.top=n.top+1+"px",e.WAIT.style.height=s+"px",e.WAIT.style.width=s+"px",e.WAIT.style.left=n.right-s+2+"px",e.WAIT.style.display="block"}return void BX.ajax.post(e.arParams.AJAX_PAGE,{ajax_call:"y",INPUT_ID:e.arParam
1s.INPUT_ID,q:e.INPUT.value,l:e.arParams.MIN_QUERY_LEN},function(n){e.cache[e.cache_key]=n,e.ShowResult(n),e.currentRow=-1,e.EnableMouseEvents(),e.WAIT&&(e.WAIT.style.display="none"),t&&t(),e.running=!1})}e.ShowResult(e.cache[e.cache_key]),e.currentRow=-1,e.EnableMouseEvents()}else e.RESULT.style.display="none",e.currentRow=-1,e.UnSelectAll();t&&t(),e.running=!1}},this.onScroll=function(){BX.type.isElementNode(e.RESULT)&&"none"!==e.RESULT.style.display&&""!==e.RESULT.innerHTML&&e.adjustResultNode()},this.UnSelectAll=function(){},this.EnableMouseEvents=function(){},this.onFocusLost=function(t){setTimeout(function(){e.RESULT.style.display="none"},250)},this.onFocusGain=function(){e.RESULT.innerHTML.length&&e.ShowResult()},this.onKeyDown=function(t){if(t||(t=window.event),"block"==e.RESULT.style.display&&e.onKeyPress(t.keyCode))return BX.PreventDefault(t)},this.adjustResultNode=function(){if(!BX.type.isElementNode(e.RESULT)||!BX.type.isElementNode(e.CONTAINER))return{top:0,right:0,bottom:0,left:0,width:0,height:0};var t=BX.pos(e.CONTAINER);return e.RESULT.style.position="absolute",e.RESULT.style.top=t.bottom+2+"px",e.RESULT.style.left=t.left+"px",e.RESULT.style.width=t.width+"px",e.RESULT.style.overflowY="auto",e.RESULT.style.maxHeight=$(window).outerHeight()-t.height+"px",t},this._onContainerLayoutChange=function(){BX.type.isElementNode(e.RESULT)&&"none"!==e.RESULT.style.display&&""!==e.RESULT.innerHTML&&e.adjustResultNode()},this.Init=function(){this.CONTAINER=document.getElementById(this.arParams.CONTAINER_ID),BX.addCustomEvent(this.CONTAINER,"OnNodeLayoutChange",this._onContainerLayoutChange),this.RESULT=document.body.appendChild(document.createElement("DIV")),this.RESULT.className="title-search-result",this.INPUT=document.getElementById(this.arParams.INPUT_ID),this.startText=this.oldValue=this.INPUT.value,BX.bind(this.INPUT,"focus",function(){e.onFocusGain()}),BX.bind(this.INPUT,"blur",function(){e.onFocusLost()}),this.INPUT.onkeydown=this.onKeyDown,this.arParams.WAIT_IMAGE&&(this.WAIT=document.body.appendChild(document.createElement("DIV")),this.WAIT.style.backgroundImage="url('"+this.arParams.WAIT_IMAGE+"')",BX.browser.IsIE()||(this.WAIT.style.backgroundRepeat="none"),this.WAIT.style.display="none",this.WAIT.style.position="absolute",this.WAIT.style.zIndex="1100"),BX.bind(this.INPUT,"bxchange",function(){e.onChange()}),RS.Options.fixingCompactHeader&&(BX.bind(window,"scroll",BX.proxy(this.onScroll,this)),$(RS.Options.compactHeaderSelector).on("unfixed.compact-header",function(){RS.Utils.isDesktop()&&e.onFocusLost()}))},BX.ready(function(){e.Init(t)})}

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.