PageSourceSearch

https://iampho.ru/var/cache/asset20_2dbf4a76f9c1ac1f1dc777b2e5f9aef3.js

js iampho.ru collected 2026-10-07 18:09:25 UTC 6,387 bytes, 23 lines download raw bytes

1app.addModule(function(){var el=document.querySelector('.hlang');if(!el){return}
2var langs=JSON.parse(el.dataset.store);app.tippyDropdown({arrow:!1,element:el,theme:'lang',trigger:'click',placement:'bottom-start',offset:[-20,10],list:langs,onSelect:function(lang){var payload={meta:{company:app.store.state.company.id,},lang:lang.id};app.fetch('/lang/change',payload,function(response){if(response.error){app.alert(response.message,'danger');return}
3var urlLang=app.store.state.urlLang;if(urlLang){var url=new URL(window.location.href);url.pathname=url.pathname.replace(new RegExp('^/'+urlLang+'(/|$)'),'$1');window.location.href=url.toString()}else{window.location.reload()}})}})});app.addModule(function(){const el=document.querySelector('.headerCity--city');if(!el){return}
4const showCities=()=>{PubSub.publish('showCities')};el.addEventListener('click',showCities)});app.addModule(function(){var el=document.querySelector('.hlink--user');if(!el){return}
5var dataStore=JSON.parse(el.dataset.store);window.onProfileAction=(e)=>{const type=e.target.dataset.type;if(type==='profile'){PubSub.publish('showProfile')}}
6tippy(el,{triggerTarget:el,animation:'shift-toward-subtle',inertia:!0,interactive:!0,allowHTML:!0,placement:'bottom-end',theme:'usermenu',content:function(){var html=[];var list=dataStore.options;for(var i=0;i<list.length;i++){var item=list[i];if(item.url){html.push('<a class="usermenu__item" href="'+item.url+'">'+item.name+'</a>')}else{html.push('<div class="usermenu__item" onclick="onProfileAction(event)" data-type="'+item.type+'">'+item.name+'</div>')}}
7return'<div class="usermenu">'+html.join('')+'</div>'}})});app.addModule(function(){const el=document.querySelector('#hlink__cartModule');if(!el){return}
8new Vue({components:{promoGrade:app.cartPromoGradeComponent},computed:Object.assign({total(){return this.cart&&this.cart.amount&&this.cart.amount.total?this.cart.amount.totalFormatted:'0 '+this.company.currency}},Vuex.mapState(['cart','company'])),mounted(){this.recalc()},methods:{recalc(){PubSub.publish('recalcCart',{formData:this.cart?JSON.parse(JSON.stringify(this.cart)):null})},showCart(){PubSub.publish('showCart')}},store:app.store,template:`
9            <div class="hlink__cart" @click="showCart">
10
11                <div class="hlink hlink--cart">
12                    <svg width="21" height="19" viewBox="0 0 21 19" class="hlink__cart-ico" data-fly-to-cart><path d="M1.98691 15.7322C2.22402 16.6663 2.77117 17.4956 3.54082 18.0876C4.31044 18.6799 5.25887 19.0009 6.23476 19H14.7656C15.7415 19.0009 16.69 18.6799 17.4596 18.0876C18.2292 17.4956 18.7763 16.6663 19.0135 15.7322L20.9736 7.98797H20.9733C21.0395 7.72991 20.9812 7.45589 20.8152 7.2457C20.6495 7.03582 20.3947 6.91296 20.1246 6.91296H16.4324L14.8487 0.658007C14.7278 0.195482 14.2499 -0.083059 13.7812 0.0361876C13.3125 0.155434 13.0305 0.626994 13.1514 1.08951L14.6299 6.91293H6.3701L7.84894 1.0808H7.84864C7.96948 0.618276 7.68751 0.146732 7.21878 0.0274774C6.75005 -0.0914686 6.27218 0.18677 6.15133 0.649295L4.56757 6.91296H0.875392C0.605326 6.91296 0.350509 7.03583 0.184813 7.2457C0.0188048 7.45589 -0.0394822 7.72991 0.0267414 7.98797L1.98691 15.7322ZM19.0049 8.63951L17.3119 15.3133C17.1696 15.8734 16.8416 16.3702 16.3805 16.7252C15.9191 17.0805 15.3508 17.2733 14.7659 17.2733H6.235C5.65 17.2733 5.08177 17.0805 4.62038 16.7252C4.15929 16.3702 3.8312 15.8733 3.68902 15.3133L1.99597 8.63951H19.0049Z"></path> <path d="M7.00074 11.2285C7.00074 11.7055 6.60922 12.0921 6.12586 12.0921C5.6425 12.0921 5.25098 11.7055 5.25098 11.2285C5.25098 10.7519 5.6425 10.3652 6.12586 10.3652C6.60922 10.3652 7.00074 10.7519 7.00074 11.2285Z"></path> <path d="M15.7527 11.2285C15.7527 11.7055 15.3612 12.0921 14.8778 12.0921C14.3945 12.0921 14.0029 11.7055 14.0029 11.2285C14.0029 10.7519 14.3945 10.3652 14.8778 10.3652C15.3612 10.3652 15.7527 10.7519 15.7527 11.2285Z"></path></svg>
13                    <span class="hlink__a hlink__a--cart" v-html="total"></span>
14                </div>
15        
16                <promoGrade mode="preview" :cart="cart" :white="true"/>
17            </div>
18
19        
20        `}).$mount(el)});app.addModule(function(){[{selector:'.hlink--auth',event:'showLoginModalWindow',action:null},{selector:'.hlink__a--worktime',event:'showWorktimeModalWindow',action:(el)=>
20{PubSub.subscribe('changeWorkTime',(e,newWorkTime)=>{el.innerHTML=newWorkTime})}},{selector:'.hlink__a--address',event:'showMapModalWindow',action:null},{selector:'.hlink__a--contact',event:'showContactModalWindow',action:null},{selector:'.hlink__a--showProfile',event:'showProfile',action:null},].forEach((link)=>{const el=document.querySelector(link.selector);if(!el){return}
21el.addEventListener('click',(event)=>{PubSub.publish(link.event);event.stopImmediatePropagation();event.preventDefault()});link.action&&link.action(el)})});app.addModule(function(){var dataStore=JSON.parse(document.querySelector('.hsearch').dataset.store);new Vue({data:function(){return{tippySuggest:null}},mounted:function(){var _this=this;var searchInput=this.$refs.input;this.tippySuggest=app.tippySuggest({element:searchInput,fetch:function(q,cb){return app.fetch('/search/v2',{search:q,forceUrl:dataStore.mainModule!=='company'},cb)},onSelect:function(item){if(item.url){window.location.assign(item.url)}else{_this.navigateToDish(item.id)}},onHide:function(){searchInput.value=''},onHighlight:function(item){searchInput.value=item.name},option:function(item,i){return['<div class="tdrop__option hsearch__suggest-item '+(item.photo?'search__suggest-item--with-photo':'')+'" data-item="'+i+'">','  <div class="hsearch__suggest-name">'+item.name+'</div>',item.orderScheduleLabel?'  <div class="hsearch__suggest-schedule">'+item.orderScheduleLabel+'</div>':'','</div>'].join('')}});if(window.location.href.indexOf('?dish=')!==-1){var dishId=window.location.href.split('?dish=')[1].replace(/[^0-9]/gi,'');if(window.history&&window.history.replaceState){window.history.replaceState(null,null,window.location.href.split('?')[0])}
22this.navigateToDish(dishId)}},methods:{clear:function(){this.tippySuggest.hide()},navigateToDish:function(dishId){var dish=document.querySelector('.ddish[data-id="'+dishId+'"]');if(!dish){return}
23window.scrollTo({top:dish.offsetTop-65,behavior:"smooth"});dish.classList.add('ddish--highlight');setTimeout(function(){dish.classList.remove('ddish--highlight')},1500)}}}).$mount('.hsearch')});;

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.