PageSourceSearch

https://megaberezka.com/var/cache/asset20_c8f5da2bde9313c9762c6b9fa9caceeb.js

js megaberezka.com collected 2026-10-07 17:36:25 UTC 11,436 bytes, 86 lines download raw bytes

1app.addModule(function(){var show=function(params){PubSub.publish('sendAnalytics',{type:'promo',event:'open',payload:{promoId:params.promo.id,},});if(params&&params.promo&&params.promo.gameSlug){PubSub.publish('showGameViewer',{slug:params.promo.gameSlug});return}
2if(params&&params.promo&&params.promo.url){window.open(params.promo.url,'_blank');return}
3if(params&&params.promo&&params.promo.link){window.location.href=`${params.promo.link}#promo${params.promo.id}`;return}
4var vr=app.viewer({bgClose:!0,class:"vr--big-prviewer",html:'<div id="big-prviewer__module"></div>',historyURL:`${window.location.pathname}${window.location.search}#promo${params.promo.id}`,onClose(){PubSub.publish('sendAnalytics',{type:'promo',event:'close',payload:{promoId:params.promo.id},})}});new Vue({data:{promo:params.promo,isShareOpen:!1,},computed:Object.assign({locApply(){return this.loc['promo/apply']},locToCart(){return this.loc['btn/to-cart']},shareOptions(){return[{svg:`<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 13 13" fill="none">
5<path d="M9.7691 5.03361L11.7146 6.97915C12.0303 7.29065 12.2813 7.66152 12.4531 8.07041C12.6249 8.4793 12.7141 8.91813 12.7156 9.36163C12.717 9.80514 12.6308 10.2446 12.4617 10.6546C12.2927 11.0646 12.0442 11.4372 11.7306 11.7508C11.417 12.0644 11.0445 12.3129 10.6344 12.4819C10.2244 12.6509 9.785 12.7372 9.34149 12.7357C8.89799 12.7342 8.45916 12.645 8.05027 12.4732C7.64138 12.3015 7.2705 12.0505 6.95901 11.7348L6.3109 11.0867C6.22327 11.0021 6.15335 10.9009 6.10523 10.7891C6.05711 10.6772 6.03176 10.5569 6.03064 10.4351C6.02953 10.3133 6.05268 10.1925 6.09874 10.0798C6.1448 9.96708 6.21285 9.86465 6.29892 9.7785C6.38499 9.69234 6.48736 9.6242 6.60005 9.57803C6.71274 9.53186 6.83349 9.5086 6.95527 9.5096C7.07705 9.5106 7.1974 9.53584 7.30932 9.58385C7.42124 9.63187 7.52247 9.70169 7.60711 9.78924L8.25644 10.438C8.54357 10.7225 8.93172 10.8817 9.33596 10.8808C9.7402 10.8798 10.1276 10.7188 10.4134 10.4329C10.6992 10.1471 10.8601 9.7596 10.8609 9.35537C10.8618 8.95113 10.7024 8.56302 10.4178 8.27597L8.47227 6.33043C8.26199 6.12006 7.99489 5.9756 7.70372 5.91479C7.41256 5.85397 7.10997 5.87942 6.83305 5.98804C6.73441 6.02717 6.64188 6.06711 6.55547 6.10787L6.27177 6.24055C5.89269 6.41175 5.60104 6.48512 5.22991 6.1146C4.69675 5.58144 4.83493 5.08925 5.48487 4.64107C6.13231 4.19557 6.91534 3.9909 7.69797 4.0626C8.4806 4.13431 9.2134 4.47787 9.7691 5.03361ZM6.09446 1.35897L6.74256 2.00707C6.90971 2.17997 7.00226 2.41159 7.00029 2.65206C6.99831 2.89253 6.90197 3.12261 6.732 3.29273C6.56204 3.46286 6.33205 3.55942 6.09158 3.56162C5.85112 3.56383 5.6194 3.47149 5.44635 3.30451L4.79763 2.6564C4.65667 2.51037 4.48803 2.39387 4.30157 2.31371C4.1151 2.23355 3.91454 2.19133 3.71158 2.1895C3.50862 2.18768 3.30733 2.2263 3.11945 2.30311C2.93158 2.37991 2.76088 2.49336 2.61732 2.63684C2.47376 2.78032 2.36021 2.95095 2.2833 3.13878C2.20639 3.32662 2.16766 3.52788 2.16937 3.73084C2.17107 3.9338 2.21318 4.13439 2.29324 4.32091C2.37329 4.50742 2.4897 4.67612 2.63565 4.81716L4.58119 6.76271C4.79147 6.97308 5.05857 7.11753 5.34974 7.17835C5.64091 7.23917 5.9435 7.21371 6.22041 7.1051C6.31905 7.06597 6.41158 7.02603 6.49799 6.98526L6.78169 6.85259C7.16078 6.68139 7.45303 6.60802 7.82356 6.97854C8.35672 7.5117 8.21853 8.00389 7.56859 8.45206C6.92115 8.89757 6.13813 9.10224 5.3555 9.03054C4.57286 8.95883 3.84007 8.61527 3.28436 8.05953L1.33882 6.11399C1.02312 5.80249 0.772156 5.43162 0.600376 5.02273C0.428596 4.61384 0.339395 4.17501 0.337909 3.7315C0.336424 3.288 0.422682 2.84858 0.591719 2.43855C0.760755 2.02852 1.00923 1.65598 1.32284 1.34237C1.63644 1.02876 2.00899 0.780286 2.41902 0.61125C2.82905 0.442213 3.26847 0.355955 3.71197 0.357441C4.15548 0.358927 4.59431 0.448127 5.0032 0.619907C5.41209 0.791687 5.78296 1.04326 6.09446 1.35897Z" fill="white"/>
6</svg>`,name:this.loc['common/copyLink'],url:window.location.href,method:this.handleCopyLink,}]}},Vuex.mapState(['loc'])),mounted(){document.addEventListener('click',this.clickOutside)},unmounted(){document.removeEventListener('click',this.clickOutside)},methods:{handleOpenShare(){this.isShareOpen=!0},clickOutside(event){if(this.$refs.shareList.contains(event.target)){return}
7this.isShareOpen=!1},handleCopyLink(){navigator.clipboard.writeText(`${window.location.href}`).then(()=>{}).catch(()=>console.log('Не получилось скопировать'));this.isShareOpen=!1},toCart(){vr.close();let forceAddress=!1;if(app.store.state.address&&app.store.state.address.warning){forceAddress='showUserAddress'}
8const action=this.promo.actions[0];if(action.type==='product'){const dish=action.meta;PubSub.publish('showTopping',{dish:{id:dish.id,name:dish.name,ingredients:dish.ingredients,nutrients:dish.nutrients?dish.nutrients:'',prices:dish.prices,price:dish.priceFromFormatted?dis
8h.priceFromFormatted:dish.priceCoreFormatted,balance:dish.balance||'',media:dish.media?dish.media:null,size:dish.sizeCoreFormatted?dish.sizeCoreFormatted:'',params:dish.params,photo:{full:dish.photo&&dish.photo.full||'',low:dish.photo&&dish.photo.low||'',ratio:dish.photo&&dish.photo.ratio||'',},extraPhotos:dish.extraPhotos?dish.extraPhotos:null},forceAddress:forceAddress,modifiers:dish.modifiers?JSON.parse(JSON.stringify(dish.modifiers)):null,})}},applyPromocode:function(){vr.close();setTimeout(()=>{PubSub.publish("recalcCart",{cartSwitchConfirmed:!0,changePromocode:this.promo.promocode,})},500);PubSub.publish('sendAnalytics',{type:'promo',event:'apply',payload:{promoId:params.promo.id},})},},store:app.store,el:"#big-prviewer__module",template:"#big-prviewer__template",})};PubSub.subscribe("showBigPromo",function(e,params){show(params)})});app.bigPromoItemComponent={props:["item"],computed:{lowSrc:function(){return this.item.photo.low},highSrc:function(){return this.item.photo.high},alt(){return this.item.name}},data:function(){return{isMobile:!1}},methods:{navigate:function(){PubSub.publish("showBigPromo",{promo:this.item,})},},template:"#big-pritem__template",};app.aggregatorBigPromoComponent={props:['promos'],components:{'big-promo-item':app.bigPromoItemComponent},mounted(){const promoIdFromUrl=window.location.hash;const findPromo=this.promos&&this.promos.find(promo=>`#promo${promo.id}`===promoIdFromUrl);if(findPromo){history.replaceState(null,'',window.location.pathname+window.location.search);setTimeout(()=>{PubSub.publish("showBigPromo",{promo:findPromo,})},0)}
9const params={direction:'horizontal',slidesPerView:1,spaceBetween:5,grabCursor:!0,pagination:{el:".big-promo__pagination",clickable:!0,},allowTouchMove:!0};if(this.promos&&this.promos.length>1){params.autoplay={delay:5000};params.loop=!0}
10new Swiper(this.$refs.container,params);app.swiperCloneClick(this.$refs.container)},template:"#big-promo",};app.aggregatorRubricsComponent={props:['rubrics','activeRubricId','loc'],computed:{isVisible(){return Array.isArray(this.rubrics)&&this.rubrics.length>0},},methods:{onSelect(rubricId){this.activeRubricId=this.activeRubricId===rubricId?null:rubricId;this.$emit('change',this.activeRubricId)},},template:`
11        <div v-if="isVisible" class="agRubrics">
12            <div class="agRubrics__item"
13                 :class="{'agRubrics__item--active': activeRubricId === null}"
14                 @click="onSelect(null)">
15                <div class="agRubrics__itemWrap">{{ loc['common/all'] }}</div>
16            </div>
17            <div v-for="rubric in rubrics"
18                 :key="rubric.id"
19                 class="agRubrics__item"
20                 :class="{'agRubrics__item--active': activeRubricId === rubric.id}"
21                 @click="onSelect(rubric.id)">
22                <div class="agRubrics__itemWrap">{{ rubric.name }}</div>
23            </div>
24        </div>
25    `,};app.aggregatorCompanyComponent={props:['company'],computed:{visible:function(){return!app.mobile}},mounted:function(){!app.mobile&&window.addEventListener('resize',this.changeHeight)},methods:{changeHeight:function(){if(app.mobile){return}
26var height=this.$refs.logo.clientHeight;this.$refs.block.style.height=height+'px'},},template:`
27        <div class="agcom">
28
29            <a :href="company.link"
30               ref="logo"
31               class="agcom__logo lazyload__wrap">
32
33                <img v-if="visible"
34                     :src="company.logoHover"
35                     alt=""
36                     class="agcom__img-hover">
37
38                <div v-if="visible"
39                     class="agcom__background"
40                     ref="block"></div>
41
42                <img class="agcom__image lazyload"
43                     @load="changeHeight()"
44                     :data-lowsrc="company.logoLow"
45                     :data-src="company.logoHigh">
46
47            </a>
48
49            <a :href="company.link" class="agcom__name">{{company.name}}</a>
50
51            <div class="agcom__description" v-html="company.description"></div>
52
53        </div>
54    `};app.addModule(()=>{const dataStore=JSON.parse(document.querySelector('#ag__module').dataset.store);new Vue({components:{'aggregator-company':app.aggregatorCompanyComponent,'aggregator-promos':app.aggregatorBigPromoComponent,'promo-stories':app.promoStoriesComponent,'aggregator-rubrics':app.aggregatorRubricsComponent,},data(){return{companies:dataStore.companies,promos:dataStore.promos,rubrics:dataStore.rubrics,activeRubricId:null,bookingButtonUrl:dataStore.bookingButtonUrl||null,}},computed:{...Vuex.mapState(['loc']),promoTemplate(){return dataStore.promoTemplate},isPresentation(){return this.promoTemplate==='1800x680'},isAir(){return this.promoTemplate==='2360x710'},isStories(){return this.promoTemplate==='stories'},isStoriesPresentation(){return!!document.querySelector('.html--presentation')},aggregatorLayoutClass(){if(!app.mobile){if(this.isPresentation){return'ag__promoPresentation'}
55if(this.isAir){return'ag__promoAir'}}
56const layout=dataStore.aggregatorLayout;return layout==='two-column'?'ag--two-column':''},filteredCompanies(){if(!this.activeRubricId){return this.companies}
57return this.companies.filter((company)=>company.rubricIds&&company.rubricIds.indexOf(this.activeRubricId)!==-1)},},methods:{onRubricChange(rubricId){this.activeRubricId=rubricId},booking(){if(this.bookingButtonUrl){window.location.href=this.bookingButtonUrl}},},store:app.store,template:`
58        <div class="ag" :class="aggregatorLayoutClass">
59        
60            <promo-stories v-if="isStories" :promos="promos" :is-presentation="isStoriesPresentation" />
61    
62            <aggregator-promos v-else :promos="promos"></aggregator-promos>
63            
64            <aggregator-rubrics :rubrics="rubrics" 
65                                :activeRubricId="activeRubricId"
66                                :loc="loc" 
67                                @change="onRubricChange"></aggregator-rubrics>
68    
69    
70            <aggregator-company v-for="company in filteredCompanies"
71                                :key="company.id"
72                                :company="company">
73            </aggregator-company>
74    
75            <div class="agcom__dummy"></div>
76            <div class="agcom__dummy"></div>
77            <div class="agcom__dummy"></div>
78
79            <div v-if="bookingButtonUrl" class="agBooking">
80                <div class="agBooking__btn" @click="booking()">
81                    {{ loc['aggregatorHome/bookingButton'] }}
82                </div>
83            </div>
84
85        </div>
86        `}).$mount('.ag__module')});

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.