PageSourceSearch

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

js iampho.ru collected 2026-10-07 18:10:05 UTC 94,897 bytes, 821 lines download raw bytes

1app.addressSubmitComponent={props:['loc','submitting','fetchingLocation','geocoderLoading'],data(){return{isShowSpinner:!1,preventArrowAnimation:!0,timer:null,}},computed:{isLoading(){return this.geocoderLoading||this.fetchingLocation||this.submitting},text(){return this.loc['btn/continue']},isArrowAnimating(){return this.isLoading&&!this.preventArrowAnimation}},watch:{isLoading(flag){clearTimeout(this.timer);if(flag&&!this.preventArrowAnimation){this.timer=setTimeout(()=>{this.isShowSpinner=!0;this.preventArrowAnimation=!0},300);return}
2this.isShowSpinner=flag}},methods:{submit(){if(this.submitting){return}
3this.preventArrowAnimation=!1;this.$emit('submit')}},template:`
4    <div class="asubmit btload btload--white"
5         @click="submit()">
6        <transition name="asubmit__fade" mode="out-in">
7            <div v-if="isShowSpinner" :key="0" class="btload--white btload--loading">
8                <i class="btload__ico"></i>
9                <i class="btload__ico"></i>
10                <i class="btload__ico"></i>
11            </div>
12            <div v-else :key="1">
13                {{ text }}
14                <svg v-show="!isShowSpinner" class="asubmit__svg" :class="{'asubmit__svg--move': isArrowAnimating}"  width="37" height="16" viewBox="0 0 37 16" fill="currentColor">
15                    <path d="M29.049 0C28.7864 6.97316e-05 28.5298 0.0790813 28.3119 0.226934C28.0941 0.374787 27.925 0.584763 27.8261 0.830016C27.7273 1.07527 27.7033 1.34466 27.7572 1.60374C27.811 1.86282 27.9403 2.09982 28.1285 2.28444L32.4757 6.66621H1.33894C1.16401 6.66372 0.990328 6.69629 0.827992 6.76204C0.665657 6.8278 0.517905 6.92541 0.393324 7.04922C0.268742 7.17303 0.169816 7.32056 0.102294 7.48324C0.0347715 7.64593 0 7.82051 0 7.99685C0 8.1732 0.0347715 8.34778 0.102294 8.51046C0.169816 8.67315 0.268742 8.82068 0.393324 8.94449C0.517905 9.06829 0.665657 9.16591 0.827992 9.23166C0.990328 9.29742 1.16401 9.32999 1.33894 9.3275H32.4757L28.1285 13.7093C28.0018 13.8319 27.9007 13.9787 27.831 14.1412C27.7613 14.3038 27.7245 14.4786 27.7227 14.6557C27.7209 14.8327 27.7542 15.0083 27.8206 15.1722C27.887 15.3361 27.9852 15.485 28.1094 15.6102C28.2335 15.7354 28.3813 15.8344 28.5439 15.9013C28.7065 15.9682 28.8807 16.0017 29.0564 15.9999C29.232 15.9981 29.4055 15.961 29.5667 15.8908C29.728 15.8205 29.8737 15.7186 29.9953 15.5909L36.48 9.05461C36.6412 8.93077 36.772 8.77117 36.8622 8.58819C36.9523 8.40521 36.9995 8.20375 37 7.99944C37.0005 7.79512 36.9543 7.59344 36.865 7.41001C36.7757 7.22658 36.6458 7.06634 36.4851 6.9417C36.4826 6.93995 36.48 6.93822 36.4774 6.9365L29.9953 0.402831C29.8723 0.275363 29.7252 0.174042 29.5626 0.104852C29.4001 0.0356633 29.2255 1.03308e-05 29.049 0Z"/>
16                </svg>
17            </div>
18        </transition>
19    </div>
20    `};app.addressInputComponent={props:['value','caption','withTick','maxlength','locTick',],data(){return{autogrowFn:null,text:this.value}},computed:{isFilled(){return this.text.length>0}},mounted(){this.autogrowFn=app.autogrow(this.$refs.textarea);this.$watch('value',(value)=>{this.text=value},{immediate:!0});this.$watch('text',()=>{this.autogrowFn.recalc()},{immediate:!0})},methods:{focus(){this.$refs.textarea.focus()},onInput(){if(this.text.indexOf("\n")!==-1){this.text=this.text.replace(/\n/g,'')}
21this.$emit('input',this.text)},onTickClick(){this.$emit('tick')}},template:`
22
23    <label class="ainput" :class="{'ainput--filled': isFilled, 'ainput--with-tick': withTick}">
24        <textarea class="ainput__text"
25                  ref="textarea"
26                  :maxlength="maxlength"
27                  v-model="text"
28                  @input="onInput()"
29                  @focus="$emit('focus')"
30                  @blur="$emit('blur')"></textarea>
31        <div class="ainput__caption"><slot name="caption"><span v-html="caption"></span></slot></div>
32
33        <div
34            v-if="withTick"
35            class="ainput__tick"
36            @click.prevent="onTickClick">
37            <span class="ainput__tickText" v-html="locTick"></span>
38        </div>
39
40    </label>
41
42    `};app.addressDeliveryZoneInfoComponent={props:['currentZone','ui'],computed:{isVisible(){return this.ui.cartZoneHintVisibility&&this.hint},hint(){return this.currentZone&&this.currentZone.hint}},template:`
43        <div v-if="isVisible"
44            class="adrZone">
45            
46            <div class="adrZone__wrap">
47            
48                <div class="adrZone__bg">
49                    <svg class="adrZone__ico" width="24" height="24" viewBox="0 0 24 24" fill="none">
50                        <path d="M10.2679 3C11.0377 1.66667 12.9623 1.66667 13.7321 3L20.6603 15C21.4301 16.3333 20.4678 18 18.9282 18H5.0718C3.5322 18 2.56995 16.3333 3.33975 15L10.2679 3Z" fill="#F4CC5A"/>
51                        <rect x="11" y="6" width="2" height="7" rx="1" fill="white"/>
52                        <rect x="11" y="14" width="2" height="2" rx="1" fill="white"/>
53                    </svg>
54                    
55                    {{hint}}                
56                </div>
57  
58            </div>
59            
60        </div>
61    `};app.addressSearchSuggestComponent={props:['suggest','name'],methods:{select:function(){this.$emit('selected',this.suggest)}},template:`
62    <div class="asuggest"
63        @click="select()">
64        <div class="asuggest__name">{{name}}</div>
65    </div>
66    `};app.addressSearchComponent={components:{addressSuggest:app.addressSearchSuggestComponent,addressInput
66:app.addressInputComponent,zoneInfo:app.addressDeliveryZoneInfoComponent,},props:['locAddressSaved','caption','withSavedAddress','resDeliveryAddress','savedAddresses','selectedSavedAddress','ui','currentZone','mapSettings','geocoder','city','didDragging',],data(){return{q:this.getName(this.resDeliveryAddress),results:[],}},computed:{suggests(){return this.results.slice(0,20)},},watch:{selectedSavedAddress(address){this.selectAddress(address)},},methods:{updateFromMap(address){this.results=[];this.q=this.getName(address)},onTick(){this.$emit('navigate',{type:'savedAddresses',savedAddresses:this.savedAddresses,currentAddressId:this.resDeliveryAddress.id||'',})},hasActiveSuggests(){return this.results&&this.results.length>0},applyFirstSuggest(onSuccess){if(this.results&&this.results.length){this.selectAddress(this.results[0],onSuccess)}else{onSuccess&&onSuccess()}},getName(address){const res=[];if(address.city){res.push(address.city)}
67if(address.district){res.push(address.district)}
68if(address.street){let street=address.street;street=street.replace('улица','ул.').replace('проезд ','пр-д ').replace(' проезд',' пр-д').replace('переулок','пер.').replace('набережная','наб.').replace('площадь','пл.').replace('шоссе','ш.').replace('проспект','пр-т');res.push(street)}
69if(address.house){res.push(address.house)}
70let name=res.join(', ')||address.name||'';if(!name&&!this.mapSettings.isGeolocationByCoords){name=this.city.name+', '}
71return name},selectAddress(address,onSuccess){let name=this.getName(address);const isStreetSuggest=address.name&&address.type==='street';const isIncompleteAddress=!address.house&&address.street&&address.type!=='business';if(isStreetSuggest||isIncompleteAddress){name+=', '}
72this.q=name;this.results=[];if(!address.fullSwitch){this.$refs.input.focus()}
73if(address.name&&address.type){const needExactCoords=['house','business'].includes(address.type);this.geocodeAddress(name,needExactCoords,onSuccess,!0)}else{this.$emit('addressSelected',address);onSuccess&&onSuccess()}},geocodeAddress(inputValue,skipSuggest,onSuccess,isSuggestSelected=!1){const isDescriptionInput=this.didDragging&&this.mapSettings.isGeolocationByCoords&&!isSuggestSelected;if(isDescriptionInput){this.resDeliveryAddress.name=inputValue}
74if(this.mapSettings.disableGeocoder){return}
75this.results=[];if(!inputValue){this.$emit('geocoderLoadingChange',!1);if(!isDescriptionInput){this.$emit('addressSelected',null)}
76return}
77this.$emit('geocoderLoadingChange',!0);this.geocoder.geocode({skipSuggest:skipSuggest,search:inputValue,ll:this.city,throttle:500,onResponse:(response)=>{this.$emit('geocoderLoadingChange',!1);if(!skipSuggest){this.results=response}
78if(!isDescriptionInput){const address=response.length&&response[0].lat?response[0]:null;this.$emit('addressSelected',address)}
79onSuccess&&onSuccess()}})}},template:`
80    <div class="asearch">
81
82        <addressInput
83                v-model="q"
84                autogrow="true"
85                :withTick="withSavedAddress"
86                :locTick="locAddressSaved"
87                @input="geocodeAddress"
88                @tick="onTick"
89                ref="input"
90                :caption="caption"/>
91
92        <div v-if="results.length"
93             class="asearch__suggests">
94            <addressSuggest
95                    v-for="(suggest, index) in suggests"
96                    :key="suggest.name || index"
97                    :suggest="suggest"
98                    :name="getName(suggest)"
99                    @selected="selectAddress"/>
100        </div>
101
102        <zoneInfo
103            :ui="ui"
104            :currentZone="currentZone"/>
105
106    </div>
107    `};app.addressTypeIcons={house:{cls:'typeHome',viewBox:'0 0 14 14',markup:`
108            <g class="typeHome__g1" transform="translate(6.9999 6.9422)">
109                <g class="typeHome__g3">
110                    <path class="typeHome__p4" d="M-0.743 -5.096C-0.346 -5.558 0.346 -5.558 0.743 -5.096C0.743 -5.096 4.243 -1.024 4.243 -1.024C4.408 -0.831 4.5 -0.582 4.5 -0.323C4.5 -0.323 4.5 4.511 4.5 4.511C4.5 5.089 4.052 5.558 3.5 5.558C3.5 5.558 -3.5 5.558 -3.5 5.558C-4.052 5.558 -4.5 5.089 -4.5 4.511C-4.5 4.511 -4.5 -0.323 -4.5 -0.323C-4.5 -0.582 -4.408 -0.831 -4.243 -1.024C-4.243 -1.024 -0.743 -5.096 -0.743 -5.096ZM0.5 2.415L0.5 5.557L2.5 5.557L2.5 2.415L0.5 2.415Z" fill-rule="evenodd" fill="#000000"/>
111                </g>
112            </g>`,},apartment:{cls:'typeFlat',viewBox:'0 0 14 14',markup:`
113            <g transform="translate(7 7)">
114                <g class="typeFlat__g3">
115                    <path class="typeFlat__p4" d="M4.5 -5.5C5.052 -5.5 5.5 -5.052 5.5 -4.5C5.5 -3.948 5.052 -3.5 4.5 -3.5C4.5 -3.5 4.5 4.5 4.5 4.5C4.5 5.052 4.052 5.5 3.5 5.5C3.5 5.5 -3.5 5.5 -3.5 5.5C-4.052 5.5 -4.5 5.052 -4.5 4.5C-4.5 4.5 -4.5 -3.5 -4.5 -3.5C-5.052 -3.5 -5.5 -3.948 -5.5 -4.5C-5.5 -5.052 -5.052 -5.5 -4.5 -5.5C-4.5 -5.5 4.5 -5.5 4.5 -5.5ZM-2.5 3.5L-0.5 3.5L-0.5 1.5L-2.5 1.5L-2.5 3.5ZM0.5 1.5L0.5 3.5L2.5 3.5L2.5 1.5L0.5 1.5ZM-2.5 0.5L-0.5 0.5L-0.5 -1.5L-2.5 -1.5L-2.5 0.5ZM0.5 0.5L2.5 0.5L2.5 -1.5L0.5 -1.5L0.5 0.5Z" fill="#000000"/>
116                </g>
117            </g>`,},office:{cls:'typeOffice',viewBox:'0 0 14 14',markup:`
118            <g transform="translate(7 7)">
119                <g class="typeOffice__g3">
120                    <path class="typeOffice__p4" d="M1 -5.5C1.276 -5.5 1.5 -5.276 1.5 -5C1.5 -5 1.5 -4.5 1.5 -4.5C1.5 -4.5 3 -4.5 3 -4.5C3.276 -4.5 3.5 -4.276 3.5 -4C3.5 -4 3.5 -2.5 3.5 -2.5L4.5 -2.5C4.5 -2.5 4.5 4.5 4.5 4.5C4.5 5.052 4.052 5.5 3.5 5.5C3.5 5.5 -3.5 5.5 -3.5 5.5C-4.052 5.5 -4.5 5.052 -4.5 4.5C-4.5 4.5 -4.5 -2.5 -4.5 -2.5L-3.5 -2.5C-3.5 -2.5 -3.5 -4 -3.5 -4C-3.5 -4.276 -3.276 -4.5 -3 -4.5C-3 -4.5 -1.5 -4.5 -1.5 -4.5C-1.5 -4.5 -1.5 -5 -1.5 -5C-1.5 -5.276 -1.276 -5.5 -1 -5.5C-1 -5.5 1 -5.5 1 -5.5ZM-3.5 3.5L-2.5 3.5L-2.5 2.5L-3.5 2.5L-3.5 3.5ZM-1.5 3.5L-0.5 3.5L-0.5 2.5L-1.5 2.5L-1.5 3.5ZM0.5 3.5L1.5 3.5L1.5 2.5L0.5 2.5L0.5 3.5ZM2.5 3.5L3.5 3.5L3.5 2.5L2.5 2.5L2.5 3.5ZM-3.5 1.5L-2.5 1.5L-2.5 0.5L-3.5 0.5L-3.5 1.5ZM-1.5 1.5L-0.5 1.5L-0.5 0.5L-1.5 0.5L-1.5 1.5ZM0.5 1.5L1.5 1.5L1.5 0.5L0.5 0.5L0.5 1.5ZM2.5 1.5L3.5 1.5L3.5 0.5L2.5 0.5L2.5 1.5ZM-3.5 -0.5L-2.5 -0.5L-2.5 -1.5L-3.5 -1.5L-3.5 -0.5ZM-1.5 -0.5L-0.5 -0.5L-0.5 -1.5L-1.5 -1.5L-1.5 -0.5ZM0.5 -0.5L1.5 -0.5L1.5 -1.5L0.5 -1.5L0.5 -0.5ZM2.5 -0.5L3.5 -0.5L3.5 -1.5L2.5 -1.5L2.5 -0.5Z" fill="#000000"/>
121                </g>
122            </g>`,},other:{cls:'typeOther',viewBox:'0 0 15 14',markup:`
123            <path class="typeOther__p1" d="M13.898 10C13.932 10 13.966 10.003 13.998 10.01C14.194 10.05 14.348 10.204 14.388 10.399C14.394 10.432 14.398 10.466 14.398 10.5C14.398 10.5 14.398 11.5 14.398 11.5C14.398 11.776 14.174 12 13.898 12C13.621 12 13.398 11.776 13.398 11.5C13.398 11.5 13.398 11 13.398 11L10.398 11C10.398 11 10.398 11.5 10.398 11.5C10.398 11.776 10.174 12 9.898 12C9.621 12 9.398 11.776 9.398 11.5C9.398 11.5 9.398 10.5 9.398 10.5C9.398 10.466 9.401 10.432 9.407 10.399C9.454 10.171 9.656 10 9.898 10C9.898 10 13.898 10 13.898 10Z" fill="#000000"/>
124            <path class="typeOther__p2" d="M13.398 2C13.95 2 14.398 2.448 14.398 3C14.398 3.552 13.95 4 13.398 4C12.845 4 12.398 3.552 12.398 3C12.398 2.448 12.845 2 13.398 2Z" fill="#d9d9d9"/>
125            <path class="typeOther__p3" d="M5.191 3.25L4.616 3.25L6.054 5.75L5.479 5.75L6.9
12517 8.25L6.342 8.25L7.793 10.75L4.397 10.75C4.397 10.75 4.397 11.5 4.397 11.5C4.397 11.776 4.173 12 3.897 12C3.621 12 3.398 11.776 3.398 11.5C3.398 11.5 3.398 10.75 3.398 10.75L0.002 10.75L1.452 8.25L0.877 8.25L2.315 5.75L1.74 5.75L3.178 3.25L2.603 3.25L3.897 1L5.191 3.25Z" fill="#000000">
126                <animate attributeName="d" class="typeOther__activeLight typeOther__activeDark" begin="indefinite" dur="1s" fill="freeze" calcMode="linear" keyTimes="0;0.05;0.0833;0.1333;0.1667;0.2167;0.25;0.3;0.3333;0.3833;0.4167;0.4667;0.5;0.55;0.5833;0.6167;0.6333;0.6667;0.7167;0.75;0.8333;0.9167;0.9667;1" values="M5.191 3.25L4.616 3.25L6.054 5.75L5.479 5.75L6.917 8.25L6.342 8.25L7.793 10.75L4.397 10.75C4.397 10.75 4.397 11.5 4.397 11.5C4.397 11.776 4.173 12 3.897 12C3.621 12 3.398 11.776 3.398 11.5C3.398 11.5 3.398 10.75 3.398 10.75L0.002 10.75L1.452 8.25L0.877 8.25L2.315 5.75L1.74 5.75L3.178 3.25L2.603 3.25L3.897 1L5.191 3.25Z;M5.279 3.268L4.704 3.26L6.106 5.78L5.531 5.772L6.932 8.292L6.357 8.284L7.798 10.781L4.402 10.755C4.402 10.755 4.396 11.505 4.396 11.505C4.394 11.78 4.168 12.003 3.892 12.001C3.616 11.998 3.394 11.773 3.396 11.497C3.396 11.497 3.402 10.747 3.402 10.747L0.006 10.72L1.468 8.214L0.893 8.205L2.367 5.726L1.792 5.718L3.266 3.239L2.691 3.231L4.018 0.999L5.279 3.268Z;M5.441 3.304L4.866 3.28L6.2 5.837L5.625 5.813L6.959 8.37L6.385 8.347L7.805 10.838L4.41 10.763C4.41 10.763 4.393 11.513 4.393 11.513C4.387 11.789 4.159 12.008 3.882 12.001C3.607 11.995 3.388 11.767 3.394 11.491C3.394 11.491 3.41 10.741 3.41 10.741L0.015 10.666L1.498 8.146L0.924 8.122L2.464 5.683L1.889 5.66L3.429 3.221L2.855 3.197L4.241 1.002L5.441 3.304Z;M5.827 3.405L5.255 3.344L6.421 5.981L5.849 5.921L7.015 8.558L6.443 8.497L7.819 10.975L4.429 10.783C4.429 10.783 4.387 11.531 4.387 11.531C4.371 11.807 4.135 12.018 3.859 12.002C3.584 11.986 3.373 11.75 3.389 11.475C3.389 11.475 3.431 10.726 3.431 10.726L0.041 10.533L1.581 7.981L1.009 7.921L2.703 5.587L2.131 5.526L3.826 3.192L3.254 3.132L4.778 1.031L5.827 3.405Z;M6.142 3.504L5.575 3.413L6.597 6.108L6.029 6.017L7.052 8.712L6.484 8.621L7.827 11.089L4.445 10.799C4.445 10.799 4.381 11.546 4.381 11.546C4.357 11.821 4.115 12.025 3.84 12.001C3.565 11.977 3.361 11.735 3.385 11.46C3.385 11.46 3.449 10.713 3.449 10.713L0.067 10.423L1.658 7.846L1.09 7.755L2.906 5.515L2.339 5.424L4.155 3.185L3.588 3.094L5.222 1.078L6.142 3.504Z;M6.59 3.672L6.032 3.537L6.841 6.303L6.282 6.168L7.091 8.933L6.533 8.798L7.833 11.253L4.467 10.822C4.467 10.822 4.372 11.565 4.372 11.565C4.337 11.839 4.086 12.032 3.813 11.997C3.539 11.962 3.346 11.712 3.381 11.438C3.381 11.438 3.476 10.695 3.476 10.695L0.11 10.264L1.783 7.65L1.225 7.515L3.209 5.425L2.651 5.29L4.635 3.2L4.076 3.064L5.862 1.183L6.59 3.672Z;M6.816 3.77L6.264 3.613L6.96 6.408L6.408 6.25L7.105 9.045L6.553 8.888L7.832 11.337L4.478 10.833C4.478 10.833 4.367 11.574 4.367 11.574C4.326 11.847 4.071 12.035 3.799 11.994C3.526 11.953 3.338 11.699 3.379 11.426C3.379 11.426 3.49 10.685 3.49 10.685L0.136 10.182L1.855 7.55L1.302 7.392L3.368 5.385L2.816 5.227L4.882 3.219L4.33 3.062L6.189 1.255L6.816 3.77Z;M7.009 3.861L6.462 3.684L7.061 6.501L6.514 6.324L7.113 9.141L6.567 8.965L7.831 11.409L4.487 10.843C4.487 10.843 4.362 11.582 4.362 11.582C4.316 11.854 4.059 12.037 3.787 11.991C3.515 11.945 3.332 11.687 3.378 11.415C3.378 11.415 3.503 10.677 3.503 10.677L0.159 10.111L1.92 7.464L1.373 7.287L3.508 5.353L2.961 5.177L5.096 3.243L4.549 3.066L6.47 1.326L7.009 3.861Z;M7.043 3.877L6.498 3.698L7.079 6.518L6.533 6.338L7.114 9.158L6.569 8.978L7.831 11.422L4.489 10.845C4.489 10.845 4.362 11.583 4.362 11.583C4.314 11.855 4.056 12.037 3.785 11.99C3.513 11.943 3.331 11.685 3.378 11.413C3.378 11.413 3.505 10.675 3.505 10.675L0.164 10.098L1.932 7.449L1.387 7.269L3.533 5.348L2.988 5.168L5.134 3.248L4.589 3.068L6.52 1.339L7.043 3.877Z;M6.915 3.808L6.365 3.642L7.018 6.447L6.468 6.282L7.122 9.087L6.572 8.921L7.835 11.378L4.486 10.839C4.486 10.839 4.367 11.579 4.367 11.579C4.323 11.851 4.067 12.037 3.794 11.993C3.522 11.949 3.337 11.693 3.381 11.421C3.381 11.421 3.5 10.681 3.5 10.681L0.151 10.142L1.896 7.511L1.346 7.345L3.443 5.369L2.893 5.203L4.989 3.228L4.44 3.062L6.327 1.284L6.915 3.808Z;M6.671 3.687L6.114 3.547L6.901 6.319L6.343 6.18L7.131 8.951L6.573 8.812L7.84 11.296L4.479 10.829C4.479 10.829 4.376 11.571 4.376 11.571C4.338 11.844 4.086 12.035 3.813 11.997C3.539 11.959 3.349 11.707 3.387 11.433C3.387 11.433 3.49 10.691 3.49 10.691L0.129 10.224L1.833 7.626L1.276 7.487L3.276 5.412L2.719 5.273L4.72 3.198L4.162 3.059L5.963 1.192L6.671 3.687Z;M6.062 3.432L5.492 3.358L6.593 6.022L6.023 5.948L7.125 8.613L6.555 8.538L7.846 11.093L4.463 10.8C4.463 10.8 4.399 11.547 4.399 11.547C4.375 11.822 4.133 12.026 3.858 12.002C3.583 11.978 3.379 11.736 3.403 11.461C3.403 11.461 3.468 10.714 3.468 10.714L0.085 10.421L1.706 7.905L1.136 7.831L2.886 5.538L2.316 5.464L4.066 3.172L3.496 3.097L5.07 1.034L6.062 3.432Z;M5.536 3.266L4.961 3.246L6.313 5.794L5.738 5.774L7.089 8.322L6.515 8.302L7.842 10.921L4.449 10.774C4.449 10.774 4.417 11.523 4.417 11.523C4.405 11.799 4.171 12.013 3.896 12.001C3.62 11.989 3.406 11.756 3.418 11.48C3.418 11.48 3.451 10.731 3.451 10.731L0.058 10.583L1.627 8.135L1.052 8.115L2.576 5.666L2.001 5.646L3.524 3.197L2.949 3.177L4.32 0.973L5.536 3.266Z;M4.747 3.098L4.175 3.159L5.866 5.493L5.295 5.553L6.985 7.888L6.414 7.948L7.82 10.669L4.426 10.733C4.426 10.733 4.441 11.482 4.441 11.482C4.446 11.758 4.226 11.986 3.951 11.992C3.675 11.997 3.447 11.777 3.442 11.501C3.442 11.501 3.428 10.752 3.428 10.752L0.034 10.816L1.553 8.46L0.981 8.52L2.149 5.885L1.578 5.945L2.746 3.309L2.174 3.369L3.225 0.997L4.747 3.098Z;M4.332 3.048L3.766 3.149L5.619 5.355L5.054 5.456L6.907 7.662L6.341 7.763L7.801 10.537L4.413 10.71C4.413 10.71 4.452 11.459 4.452 11.459C4.466 11.734 4.254 11.969 3.978 11.983C3.703 11.997 3.468 11.785 3.454 11.51C3.454 11.51 3.416 10.761 3.416 10.761L0.028 10.935L1.532 8.622L0.967 8.723L1.942 6.012L1.377 6.113L2.352 3.402L1.786 3.503L2.664 1.063L4.332 3.048Z;M4.053 3.028L3.494 3.156L5.449 5.27L4.889 5.398L6.845 7.511L6.285 7.639L7.786 10.449L4.404 10.695C4.404 10.695 4.458 11.441 4.458 11.441C4.478 11.716 4.271 11.956 3.997 11.976C3.722 11.996 3.483 11.789 3.463 11.514C3.463 11.514 3.408 10.767 3.408 10.767L0.026 11.013L1.525 8.727L0.966 8.855L1.81 6.101L1.25 6.229L2.094 3.476L1.534 3.604L2.294 1.126L4.053 3.028Z;M3.969 3.025L3.411 3.16L5.397 5.245L4.839 5.381L6.825 7.466L6.267 7.602L7.78 10.422L4.401 10.69C4.401 10.69 4.46 11.436 4.46 11.436C4.482 11.711 4.277 11.951 4.002 11.973C3.727 11.995 3.487 11.79 3.465 11.515C3.465 11.515 3.406 10.769 3.406 10.769L0.026 11.037L1.524 8.758L0.966 8.894L1.77 6.129L1.212 6.265L2.017 3.501L1.459 3.636L2.182 1.148L3.969 3.025Z;M3.903 3.022L3.347 3.165L5.356 5.227L4.8 5.369L6.808 7.431L6.252 7.573L7.776 10.401L4.399 10.686C4.399 10.686 4.461 11.432 4.461 11.432C4.485 11.707 4.281 11.948 4.006 11.971C3.732 11.994 3.49 11.79 3.467 11.516C3.467 11.516 3.404 10.77 3.404 10.77L0.026 11.055L1.523 8.782L0.967 8.924L1.74 6.151L1.184 6.293L1.957 3.52L1.401 3.662L2.096 1.167L3.903 3.022Z;M3.963 3.027L3.405 3.163L5.39 5.247L4.833 5.383L6.818 7.468L6.26 7.604L7.778 10.418L4.399 10.689C4.399 10.689 4.459 11.436 4.459 11.436C4.481 11.71 4.276 11.951 4.002 11.973C3.727 11.995 3.48
1266 11.79 3.464 11.516C3.464 11.516 3.404 10.77 3.404 10.77L0.025 11.041L1.517 8.76L0.96 8.896L1.764 6.131L1.206 6.267L2.01 3.502L1.452 3.638L2.176 1.15L3.963 3.027Z;M4.073 3.036L3.512 3.16L5.454 5.287L4.893 5.411L6.835 7.538L6.274 7.662L7.781 10.447L4.399 10.695C4.399 10.695 4.454 11.442 4.454 11.442C4.474 11.717 4.268 11.957 3.993 11.977C3.718 11.997 3.478 11.79 3.458 11.515C3.458 11.515 3.403 10.768 3.403 10.768L0.021 11.017L1.506 8.718L0.946 8.842L1.808 6.095L1.248 6.219L2.11 3.471L1.549 3.595L2.325 1.122L4.073 3.036Z;M4.555 3.101L3.985 3.173L5.723 5.473L5.152 5.545L6.89 7.844L6.32 7.916L7.791 10.578L4.399 10.72C4.399 10.72 4.431 11.47 4.431 11.47C4.442 11.745 4.228 11.978 3.953 11.99C3.677 12.002 3.444 11.787 3.432 11.511C3.432 11.511 3.401 10.763 3.401 10.763L0.009 10.905L1.47 8.526L0.9 8.598L2.014 5.939L1.444 6.011L2.559 3.352L1.988 3.424L2.991 1.031L4.555 3.101Z;M5.029 3.205L4.454 3.224L5.972 5.676L5.397 5.694L6.915 8.146L6.34 8.165L7.794 10.706L4.398 10.743C4.398 10.743 4.406 11.493 4.406 11.493C4.409 11.769 4.188 11.995 3.912 11.998C3.636 12.001 3.409 11.78 3.406 11.504C3.406 11.504 3.398 10.754 3.398 10.754L0.003 10.791L1.453 8.323L0.878 8.342L2.235 5.797L1.66 5.815L3.017 3.27L2.442 3.289L3.663 0.998L5.029 3.205Z;M5.167 3.243L4.592 3.246L6.042 5.738L5.467 5.741L6.917 8.234L6.342 8.237L7.793 10.743L4.397 10.749C4.397 10.749 4.399 11.499 4.399 11.499C4.399 11.775 4.176 11.999 3.9 12C3.623 12 3.399 11.777 3.399 11.501C3.399 11.501 3.398 10.751 3.398 10.751L0.002 10.756L1.452 8.261L0.877 8.264L2.303 5.757L1.728 5.76L3.154 3.253L2.579 3.256L3.862 0.999L5.167 3.243Z;M5.191 3.25L4.616 3.25L6.054 5.75L5.479 5.75L6.917 8.25L6.342 8.25L7.793 10.75L4.397 10.75C4.397 10.75 4.397 11.5 4.397 11.5C4.397 11.776 4.173 12 3.897 12C3.621 12 3.398 11.776 3.398 11.5C3.398 11.5 3.398 10.75 3.398 10.75L0.002 10.75L1.452 8.25L0.877 8.25L2.315 5.75L1.74 5.75L3.178 3.25L2.603 3.25L3.897 1L5.191 3.25Z"/>
127            </path>
128            <path class="typeOther__p4" d="M9.196 4.25L8.619 4.25L10.063 6.75L9.485 6.75L10.929 9.25L4.866 9.25L6.31 6.75L5.732 6.75L7.176 4.25L6.599 4.25L7.897 2L9.196 4.25Z" fill="#696969">
129                <animate attributeName="d" class="typeOther__activeLight typeOther__activeDark" begin="indefinite" dur="1s" fill="freeze" calcMode="spline" keyTimes="0;0.05;0.0833;0.1667;0.2167;0.25;0.3;0.3333;0.3833;0.4167;0.4667;0.5;0.55;0.5833;0.6333;0.6667;1" values="M9.196 4.25L8.619 4.25L10.063 6.75L9.485 6.75L10.929 9.25L4.866 9.25L6.31 6.75L5.732 6.75L7.176 4.25L6.599 4.25L7.897 2L9.196 4.25Z;M9.26 4.271L8.683 4.261L10.083 6.785L9.506 6.775L10.941 9.264L4.878 9.236L6.331 6.721L5.754 6.711L7.24 4.236L6.663 4.226L8 1.999L9.26 4.271Z;M9.378 4.311L8.801 4.283L10.12 6.851L9.544 6.823L10.963 9.291L4.901 9.21L6.372 6.667L5.795 6.639L7.36 4.212L6.783 4.184L8.191 2.001L9.378 4.311Z;M9.88 4.522L9.313 4.413L10.258 7.141L9.692 7.032L11.058 9.41L5.003 9.098L6.573 6.433L6.006 6.324L7.895 4.141L7.329 4.032L9.029 2.068L9.88 4.522Z;M10.193 4.688L9.639 4.527L10.328 7.33L9.773 7.169L11.118 9.491L5.073 9.026L6.724 6.283L6.169 6.122L8.253 4.124L7.699 3.963L9.573 2.165L10.193 4.688Z;M10.349 4.781L9.803 4.593L10.357 7.426L9.811 7.239L11.148 9.533L5.11 8.99L6.807 6.208L6.261 6.021L8.438 4.125L7.892 3.937L9.851 2.231L10.349 4.781Z;M10.48 4.865L9.943 4.655L10.378 7.509L9.841 7.299L11.174 9.57L5.143 8.959L6.882 6.144L6.345 5.934L8.598 4.131L8.061 3.921L10.089 2.297L10.48 4.865Z;M10.504 4.881L9.968 4.667L10.382 7.524L9.846 7.31L11.179 9.577L5.148 8.953L6.896 6.133L6.36 5.919L8.627 4.132L8.091 3.918L10.131 2.31L10.504 4.881Z;M10.426 4.824L9.884 4.625L10.377 7.469L9.835 7.27L11.165 9.557L5.132 8.969L6.854 6.175L6.312 5.976L8.529 4.127L7.987 3.928L9.982 2.264L10.426 4.824Z;M10.277 4.721L9.726 4.551L10.364 7.366L9.813 7.195L11.14 9.522L5.101 8.999L6.78 6.255L6.228 6.084L8.347 4.123L7.796 3.952L9.703 2.188L10.277 4.721Z;M9.898 4.497L9.33 4.396L10.312 7.11L9.744 7.009L11.079 9.437L5.027 9.073L6.617 6.452L6.049 6.351L7.909 4.143L7.34 4.041L9.014 2.054L9.898 4.497Z;M9.564 4.338L8.989 4.295L10.245 6.894L9.669 6.852L11.025 9.368L4.967 9.136L6.502 6.619L5.926 6.577L7.549 4.189L6.973 4.147L8.434 1.998L9.564 4.338Z;M9.053 4.152L8.477 4.196L10.107 6.578L9.532 6.622L10.946 9.27L4.883 9.23L6.365 6.865L5.79 6.909L7.038 4.306L6.463 4.35L7.586 2.007L9.053 4.152Z;M8.778 4.079L8.208 4.167L10.017 6.416L9.447 6.505L10.903 9.22L4.841 9.28L6.309 6.991L5.738 7.08L6.782 4.388L6.211 4.477L7.15 2.054L8.778 4.079Z;M8.537 4.028L7.973 4.155L9.93 6.278L9.366 6.404L10.866 9.178L4.805 9.323L6.268 7.1L5.705 7.226L6.565 4.471L6.002 4.597L6.777 2.117L8.537 4.028Z;M8.493 4.021L7.931 4.154L9.913 6.253L9.351 6.386L10.859 9.17L4.799 9.331L6.261 7.119L5.699 7.253L6.527 4.487L5.965 4.62L6.71 2.131L8.493 4.021Z;M9.196 4.25L8.619 4.25L10.063 6.75L9.485 6.75L10.929 9.25L4.866 9.25L6.31 6.75L5.732 6.75L7.176 4.25L6.599 4.25L7.897 2L9.196 4.25Z" keySplines="0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0.42 0 0.58 1"/>
130            </path>
131            <path class="typeOther__p5" d="M7.397 2.999C7.397 5.171 8.552 7.074 10.281 8.127C10.281 8.127 10.929 9.249 10.929 9.249L8.398 9.249C8.398 9.249 8.398 11.5 8.398 11.5C8.398 11.776 8.174 12 7.897 12C7.621 12 7.397 11.776 7.397 11.5C7.397 11.5 7.397 9.249 7.397 9.249L4.866 9.249L6.31 6.749L5.732 
1316.749L7.176 4.249L6.599 4.249C6.599 4.249 7.4 2.859 7.4 2.859C7.399 2.906 7.397 2.952 7.397 2.999C7.397 2.999 7.397 2.999 7.397 2.999Z" fill="#464646">
132                <animate attributeName="d" class="typeOther__activeLight typeOther__activeDark" begin="indefinite" dur="1s" fill="freeze" calcMode="spline" keyTimes="0;0.05;0.0833;0.1667;0.25;0.3;0.3333;0.3833;0.4167;0.4667;0.5;0.55;0.5833;0.6333;0.6667;1" values="M7.397 2.999C7.397 5.171 8.552 7.074 10.281 8.127C10.281 8.127 10.929 9.249 10.929 9.249L8.398 9.249C8.398 9.249 8.398 11.5 8.398 11.5C8.398 11.776 8.174 12 7.897 12C7.621 12 7.397 11.776 7.397 11.5C7.397 11.5 7.397 9.249 7.397 9.249L4.866 9.249L6.31 6.749L5.732 6.749L7.176 4.249L6.599 4.249C6.599 4.249 7.4 2.859 7.4 2.859C7.399 2.906 7.397 2.952 7.397 2.999C7.397 2.999 7.397 2.999 7.397 2.999Z;M7.483 2.989C7.446 5.161 8.568 7.083 10.278 8.166C10.278 8.166 10.941 9.263 10.941 9.263L8.409 9.251C8.409 9.251 8.399 11.502 8.399 11.502C8.398 11.778 8.173 12.001 7.897 12C7.621 11.999 7.398 11.774 7.399 11.498C7.399 11.498 7.41 9.247 7.41 9.247L4.878 9.235L6.331 6.72L5.754 6.71L7.24 4.235L6.663 4.225C6.663 4.225 7.488 2.849 7.488 2.849C7.487 2.896 7.484 2.942 7.483 2.989C7.483 2.989 7.483 2.989 7.483 2.989Z;M7.642 2.974C7.536 5.144 8.596 7.101 10.271 8.237C10.271 8.237 10.963 9.29 10.963 9.29L8.432 9.256C8.432 9.256 8.402 11.507 8.402 11.507C8.398 11.783 8.171 12.004 7.895 12C7.619 11.996 7.398 11.77 7.402 11.493C7.402 11.493 7.432 9.243 7.432 9.243L4.901 9.209L6.372 6.666L5.795 6.638L7.36 4.211L6.783 4.183C6.783 4.183 7.652 2.834 7.652 2.834C7.649 2.881 7.645 2.927 7.642 2.974C7.642 2.974 7.642 2.974 7.642 2.974Z;M8.349 2.954C7.939 5.088 8.714 7.174 10.213 8.534C10.213 8.534 11.058 9.409 11.058 9.409L8.53 9.279C8.53 9.279 8.414 11.527 8.414 11.527C8.4 11.802 8.165 12.014 7.889 12C7.613 11.986 7.401 11.751 7.415 11.475C7.415 11.475 7.531 9.227 7.531 9.227L5.003 9.097L6.573 6.432L6.006 6.323L7.896 4.14L7.329 4.031C7.329 4.031 8.378 2.818 8.378 2.818C8.369 2.863 8.358 2.909 8.349 2.954C8.349 2.954 8.349 2.954 8.349 2.954Z;M9.054 3.014C8.348 5.068 8.823 7.243 10.117 8.8C10.117 8.8 11.148 9.532 11.148 9.532L8.627 9.305C8.627 9.305 8.426 11.547 8.426 11.547C8.401 11.822 8.158 12.025 7.883 12C7.608 11.976 7.405 11.732 7.43 11.457C7.43 11.457 7.631 9.216 7.631 9.216L5.11 8.989L6.807 6.207L6.261 6.02L8.438 4.124L7.892 3.936C7.892 3.936 9.102 2.882 9.102 2.882C9.086 2.926 9.069 2.969 9.054 3.014C9.054 3.014 9.054 3.014 9.054 3.014Z;M9.26 3.046C8.47 5.07 8.854 7.262 10.081 8.871C10.081 8.871 11.174 9.569 11.174 9.569L8.656 9.314C8.656 9.314 8.429 11.553 8.429 11.553C8.401 11.828 8.156 12.028 7.881 12C7.606 11.972 7.406 11.727 7.434 11.452C7.434 11.452 7.661 9.213 7.661 9.213L5.143 8.957L6.883 6.144L6.345 5.934L8.599 4.13L8.061 3.92C8.061 3.92 9.313 2.917 9.313 2.917C9.295 2.96 9.277 3.002 9.26 3.046C9.26 3.046 9.26 3.046 9.26 3.046Z;M9.297 3.052C8.492 5.07 8.859 7.265 10.075 8.884C10.075 8.884 11.179 9.576 11.179 9.576L8.661 9.315C8.661 9.315 8.43 11.554 8.43 11.554C8.401 11.829 8.155 12.028 7.881 12C7.606 11.972 7.406 11.726 7.435 11.451C7.435 11.451 7.666 9.212 7.666 9.212L5.149 8.952L6.896 6.132L6.36 5.918L8.627 4.131L8.091 3.917C8.091 3.917 9.351 2.924 9.351 2.924C9.333 2.966 9.314 3.009 9.297 3.052C9.297 3.052 9.297 3.052 9.297 3.052Z;M9.169 3.029C8.42 5.069 8.848 7.253 10.108 8.837C10.108 8.837 11.165 9.556 11.165 9.556L8.646 9.311C8.646 9.311 8.428 11.551 8.428 11.551C8.401 11.826 8.156 12.027 7.882 12C7.607 11.973 7.406 11.729 7.433 11.454C7.433 11.454 7.651 9.214 7.651 9.214L5.132 8.968L6.854 6.174L6.313 5.975L8.53 4.126L7.988 3.927C7.988 3.927 9.219 2.899 9.219 2.899C9.202 2.942 9.185 2.985 9.169 3.029C9.169 3.029 9.169 3.029 9.169 3.029Z;M8.929 2.994C8.286 5.069 8.826 7.228 10.166 8.746C10.166 8.746 11.14 9.521 11.14 9.521L8.619 9.303C8.619 9.303 8.425 11.545 8.425 11.545C8.401 11.82 8.159 12.024 7.883 12C7.608 11.976 7.405 11.734 7.428 11.459C7.428 11.459 7.622 9.216 7.622 9.216L5.101 8.998L6.78 6.254L6.229 6.083L8.347 4.122L7.796 3.951C7.796 3.951 8.973 2.861 8.973 2.861C8.959 2.905 8.943 2.949 8.929 2.994C8.929 2.994 8.929 2.994 8.929 2.994Z;M8.347 2.95C7.965 5.089 8.768 7.164 10.286 8.504C10.286 8.504 11.079 9.436 11.079 9.436L8.552 9.284C8.552 9.284 8.417 11.531 8.417 11.531C8.4 11.807 8.163 12.017 7.888 12C7.612 11.984 7.402 11.747 7.419 11.471C7.419 11.471 7.554 9.224 7.554 9.224L5.027 9.072L6.617 6.451L6.049 6.35L7.909 4.142L7.341 4.04C7.341 4.04 8.374 2.813 8.374 2.813C8.365 2.858 8.355 2.904 8.347 2.95C8.347 2.95 8.347 2.95 8.347 2.95Z;M7.862 2.958C7.703 5.125 8.715 7.107 10.362 8.284C10.362 8.284 11.025 9.3
13267 11.025 9.367L8.496 9.27C8.496 9.27 8.41 11.52 8.41 11.52C8.399 11.796 8.167 12.011 7.891 12C7.615 11.99 7.4 11.757 7.411 11.482C7.411 11.482 7.497 9.232 7.497 9.232L4.967 9.135L6.502 6.618L5.926 6.576L7.549 4.188L6.973 4.146C6.973 4.146 7.875 2.819 7.875 2.819C7.871 2.865 7.865 2.912 7.862 2.958C7.862 2.958 7.862 2.958 7.862 2.958Z;M7.163 3.042C7.329 5.208 8.626 7.017 10.43 7.935C10.43 7.935 10.946 9.269 10.946 9.269L8.414 9.252C8.414 9.252 8.4 11.503 8.4 11.503C8.398 11.779 8.172 12.002 7.896 12C7.62 11.998 7.398 11.773 7.4 11.497C7.4 11.497 7.414 9.246 7.414 9.246L4.883 9.229L6.365 6.864L5.79 6.908L7.038 4.305L6.462 4.349C6.462 4.349 7.156 2.902 7.156 2.902C7.158 2.949 7.16 2.995 7.163 3.042C7.163 3.042 7.163 3.042 7.163 3.042Z;M6.809 3.118C7.142 5.265 8.575 6.968 10.444 7.744C10.444 7.744 10.903 9.219 10.903 9.219L8.372 9.244C8.372 9.244 8.394 11.495 8.394 11.495C8.397 11.771 8.175 11.997 7.899 12C7.623 12.003 7.397 11.781 7.394 11.505C7.394 11.505 7.372 9.254 7.372 9.254L4.841 9.279L6.309 6.99L5.738 7.079L6.782 4.387L6.211 4.476C6.211 4.476 6.791 2.98 6.791 2.98C6.797 3.026 6.802 3.072 6.809 3.118C6.809 3.118 6.809 3.118 6.809 3.118Z;M6.508 3.202C6.983 5.321 8.527 6.925 10.444 7.573C10.444 7.573 10.866 9.177 10.866 9.177L8.335 9.238C8.335 9.238 8.389 11.488 8.389 11.488C8.396 11.764 8.177 11.993 7.901 12C7.625 12.006 7.396 11.788 7.389 11.512C7.389 11.512 7.335 9.261 7.335 9.261L4.805 9.322L6.268 7.099L5.704 7.225L6.565 4.47L6.002 4.596C6.002 4.596 6.48 3.065 6.48 3.065C6.489 3.11 6.497 3.156 6.508 3.202C6.508 3.202 6.508 3.202 6.508 3.202Z;M6.454 3.219C6.955 5.332 8.518 6.917 10.443 7.542C10.443 7.542 10.859 9.169 10.859 9.169L8.329 9.236C8.329 9.236 8.388 11.487 8.388 11.487C8.396 11.763 8.178 
13211.992 7.902 12C7.626 12.007 7.396 11.789 7.389 11.513C7.389 11.513 7.329 9.263 7.329 9.263L4.798 9.33L6.261 7.118L5.699 7.252L6.527 4.486L5.965 4.619C5.965 4.619 6.424 3.082 6.424 3.082C6.434 3.127 6.443 3.173 6.454 3.219C6.454 3.219 6.454 3.219 6.454 3.219Z;M7.397 2.999C7.397 5.171 8.552 7.074 10.281 8.127C10.281 8.127 10.929 9.249 10.929 9.249L8.398 9.249C8.398 9.249 8.398 11.5 8.398 11.5C8.398 11.776 8.174 12 7.897 12C7.621 12 7.397 11.776 7.397 11.5C7.397 11.5 7.397 9.249 7.397 9.249L4.866 9.249L6.31 6.749L5.732 6.749L7.176 4.249L6.599 4.249C6.599 4.249 7.4 2.859 7.4 2.859C7.399 2.906 7.397 2.952 7.397 2.999C7.397 2.999 7.397 2.999 7.397 2.999Z" keySplines="0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0 0 1 1;0.42 0 0.58 1"/>
133            </path>`,},};app.addressDeliveryTypeComponent={props:['value','loc','colorScheme','isDesktop'],computed:{isDarkTheme(){return this.colorScheme==='dark'},isScrollable(){return!!this.value&&!this.isDesktop},types(){const types=[{icon:app.addressTypeIcons.house,name:this.loc['address/delivery/type/house'],id:'house',},{icon:app.addressTypeIcons.apartment,name:this.loc['cart/address/room2'],id:'apartment',},{icon:app.addressTypeIcons.office,name:this.loc['address/office'],id:'office',},{icon:app.addressTypeIcons.other,name:this.loc['address/delivery/type/other'],id:'other',},];types.forEach(type=>{type.active=this.value===type.id;type.icoState=(type.active?'active':'idle')+(this.isDarkTheme?'Dark':'Light')})
134return types},locDeliveryTitle(){return this.loc['address/delivery/type/title']}},watch:{value(){this.$nextTick(this.scrollToActive)},types(types,before){this.$nextTick(()=>this.bendIcons(types,before))}},mounted(){this.scrollToActive();this.bendIcons(this.types)},methods:{change(type){this.$emit('input',type.id);this.$emit('changed')},scrollToActive(){if(!this.isScrollable){return}
135const wrap=this.$refs.types;const active=wrap&&wrap.querySelector('.adrTypes__item--active');if(!active){return}
136const paddingLeft=parseFloat(getComputedStyle(wrap).paddingLeft)||0;wrap.scrollTo({left:active.offsetLeft-paddingLeft,behavior:'smooth'})},bendIcons(types,before){types.forEach((type,i)=>{if(before&&before[i]&&before[i].icoState===type.icoState){return}
137this.$el.querySelectorAll('.'+type.icon.cls+'__'+type.icoState).forEach((el)=>el.beginElement())})},},template:`
138        <div class="adrTypes__wrap">
139
140            <div v-show="!isScrollable" class="adrTypes__title">{{ locDeliveryTitle }}</div>
141
142            <div ref="types"
143                 class="adrTypes"
144                 :class="{'adrTypes--scroll': isScrollable}">
145                <div v-for="type in types"
146                    :key="type.id"
147                    class="adrTypes__item"
148                    :class="{'adrTypes__item--active': type.active}"
149                    @click="change(type)">
150                    <svg class="adrTypes__itemIco"
151                         :class="[type.icon.cls, type.icon.cls + '--' + type.icoState]"
152                         :viewBox="type.icon.viewBox"
153                         aria-hidden="true"
154                         v-html="type.icon.markup"></svg>
155
156                    <div class="adrTypes__itemName">{{type.name}}</div>
157                </div>
158            </div>
159        </div>
160
161    
162    `};app.addressDeliveryComponent={components:{deliverySearch:app.addressSearchComponent,deliverySubmit:app.addressSubmitComponent,deliveryInput:app.addressInputComponent,deliveryType:app.addressDeliveryTypeComponent,},props:['resDeliveryAddress','addressType','loc','mapSettings','geocoder','city','ui','savedAddresses','isWeb','isDesktop','submitting','selectedSavedAddress','colorScheme','currentZone','didDragging','fetchingLocation','geocoderLoading',],data(){return{isCommentOpened:!1,commentTypedText:'',isCommentFocused:!1,}},watch:{'resDeliveryAddress.comment':function(value){if(value){this.isCommentOpened=!0}}},created(){if(this.resDeliveryAddress.comment){this.isCommentOpened=!0}['flat','floor','entrance','comment','city','street','house','buildingName','block','intercom','type'].forEach(k=>{if(typeof(this.resDeliveryAddress[k])==='undefined'){this.$set(this.resDeliveryAddress,k,'')}})
163if(this.mapSettings.disableGeocoder){if(!this.resDeliveryAddress.city){this.resDeliveryAddress.city=this.city.name}}
164let exampleIndex=0;let charIndex=0;let pauseTicks=0;this.commentExampleTimer=setInterval(()=>{const examples=this.commentExamples;if(!examples.length){return}
165if(pauseTicks>0){pauseTicks--;if(pauseTicks===0){exampleIndex=(exampleIndex+1)%examples.length;charIndex=0}
166return}
167const example=examples[exampleIndex%examples.length];charIndex++;this.commentTypedText=example.slice(0,charIndex);if(charIndex>=example.length){pauseTicks=25}},80)},beforeDestroy(){clearInterval(this.commentExampleTimer)},computed:{isVisible(){return this.addressType==='delivery'||this.addressType==='express'},isHongKongAppearance(){return this.ui.addressDeliveryFormAppearance==='hongkong'&&!this.isManually},isByTypeAppearance(){return this.ui.addressDeliveryFormAppearance==='byType'&&!this.isManually},isPlainAppearance(){return this.ui.addressDeliveryFormAppearance==='plainAddress'&&!this.isManually},isDefaultAppearance(){return!this.isHongKongAppearance&&!this.isPlainAppearance&&!this.isByTypeAppearance},isTypeApartment(){return this.resDeliveryAddress.type==='apartment'},isTypeOffice(){return this.resDeliveryAddress.type==='office'},isCommentVisible(){if(this.isByTypeAppearance&&!this.resDeliveryAddress.type){return!1}
168return!!this.ui.isShowAddressComment},isCommentRequired(){return!!this.ui.isShowAddressComment&&!this.isManually&&!this.resDeliveryAddress.street&&!this.resDeliveryAddress.house},isCommentAsLink(){return this.ui.addressCommentAppearance==='link'},isCommentFieldVisible(){if(this.isCommentRequired){return!0}
169return this.isCommentVisible&&(!this.isCommentAsLink||this.isCommentOpened)},isCommentLinkVisible(){return this.isCommentVisible&&this.isCommentAsLink&&!this.isCommentOpened&&!this.isCommentRequired},isSearchVisible(){if(this.isByTypeAppearance){return!!this.resDeliveryAddress.type}
170return!this.isManually},isManually(){return this.mapSettings.disableGeocoder},withSavedAddress(){if(this.isWeb){return!1}
171if(this.addressType==='courierPoint'){return!1}
172return!this.ui.isAddressMoreHidden},locAddress(){if(this.isHongKongAppearance){return this.loc['address/streetNameAndNumber']}
173return this.loc['cart/address']},locFlat(){return this.loc['cart/address/room2']},locOffice(){return this.loc['address/office']},locCity(){return this.loc['cart/address/cityShort']},locStreet(){return this.loc['cart/address/street']}
173,locHouse(){return this.loc['cart/address/house']},locEntrance(){return this.loc['cart/address/entrance']},locOfficeEntrance(){return this.loc['address/officeEntrance']},locFloor(){return this.loc['cart/address/floor']},locBuildingName(){return this.loc['cart/address/buildingName']},locBlock(){return this.loc['address/block']},locIntercom(){return this.loc['address/intercom']},locAddressSaved(){return this.loc['address/saved']},locComment(){return this.loc['cart/address/comment']},isCommentTyping(){return this.isCommentRequired&&!this.isCommentFocused&&!this.resDeliveryAddress.comment&&!!this.commentExamples.length},commentTypedPrefix(){return this.commentTypedText.slice(0,-1)},commentTypedLastChar(){return this.commentTypedText.slice(-1)},commentExamples(){return[this.loc['address/comment/required/example1'],this.loc['address/comment/required/example2'],this.loc['address/comment/required/example3'],].filter(Boolean)}},methods:{submit(){const searchComponent=this.$refs.searchComponent;if(searchComponent&&searchComponent.hasActiveSuggests()){searchComponent.applyFirstSuggest(()=>{this.$emit('submit')});return}
174if(this.geocoderLoading){if(!this.awaitingGeocodeSubmit){this.awaitingGeocodeSubmit=!0;const unwatch=this.$watch('geocoderLoading',(loading)=>{if(!loading){unwatch();this.awaitingGeocodeSubmit=!1;this.$emit('submit')}})}
175return}
176this.$emit('submit')},addressTypeChanged(){const type=this.resDeliveryAddress.type;if(['house','other'].includes(type)){this.resDeliveryAddress.flat='';this.resDeliveryAddress.floor='';this.resDeliveryAddress.entrance=''}
177if(['house','other','office'].includes(type)){this.resDeliveryAddress.intercom=''}},openComment(){this.isCommentOpened=!0},onCommentFocus(){this.isCommentFocused=!0},onCommentBlur(){this.isCommentFocused=!1},navigate(params){this.$emit('navigate',params)},onGeocoderLoadingChange(value){this.$emit('geocoderLoadingChange',value)},onAddressSelected(address){this.$emit('addressSelected',address)},updateSearchFromMap(address){const search=this.$refs.searchComponent;if(search){search.updateFromMap(address)}}},template:`
178    
179    <div v-if="isVisible"
180         class="adelivery"> 
181
182         <deliveryType 
183            v-if="isByTypeAppearance"
184            v-model="resDeliveryAddress.type"
185            :loc="loc"
186            :colorScheme="colorScheme"
187            :isDesktop="isDesktop"
188            @changed="addressTypeChanged"/>
189         
190         <div class="adelivery__form">
191    
192            <div v-if="isManually" class="adelivery__field adelivery__cols">
193                <div class="adelivery__col">
194                    <deliveryInput 
195                        v-model="resDeliveryAddress.city" 
196                        :caption="locCity" />
197                </div>
198                <div class="adelivery__col">
199                    <deliveryInput 
200                        v-model="resDeliveryAddress.street" 
201                        :caption="locStreet"/>
202                </div>
203                <div class="adelivery__col">
204                    <deliveryInput 
205                        v-model="resDeliveryAddress.house" 
206                        :caption="locHouse"/>
207                </div>
208            </div>
209    
210    
211            <div v-if="isSearchVisible" 
212                class="adelivery__field">
213                <deliverySearch
214                    ref="searchComponent"
215                    :resDeliveryAddress="resDeliveryAddress"
216                    :savedAddresses="savedAddresses"
217                    :withSavedAddress="withSavedAddress"
218                    :locAddressSaved="locAddressSaved"
219                    :selectedSavedAddress="selectedSavedAddress"
220                    :caption="locAddress"
221                    :ui="ui"
222                    :currentZone="currentZone"
223                    :mapSettings="mapSettings"
224                    :geocoder="geocoder"
225                    :city="city"
226                    :didDragging="didDragging"
227                    @navigate="navigate"
228                    @geocoderLoadingChange="onGeocoderLoadingChange"
229                    @addressSelected="onAddressSelected"/>
230            </div>
231
232            <div v-if="isDefaultAppearance" 
233                class="adelivery__field adelivery__cols">
234                
235                <div class="adelivery__col">
236                    <deliveryInput 
237                        v-model="resDeliveryAddress.flat" 
238                        :caption="locFlat" 
239                        maxlength="9" />
240                </div>
241                <div class="adelivery__col">
242                    <deliveryInput 
243                        v-model="resDeliveryAddress.entrance" 
244                        :caption="locEntrance" 
245                        maxlength="9" />
246                </div>
247                <div class="adelivery__col">
248                    <deliveryInput 
249                        v-model="resDeliveryAddress.floor" 
250                        :caption="locFloor" 
251                        maxlength="9" />
252                </div>
253
254            </div>
255            
256            <template v-if="isHongKongAppearance">
257                <div class="adelivery__field">
258                    <deliveryInput 
259                        v-model="resDeliveryAddress.buildingName" 
260                        :caption="locBuildingName" 
261                        maxlength="50" />
262                </div>
263                <div class="adelivery__field adelivery__cols">
264                    <div class="adelivery__col">
265                        <deliveryInput 
266                            v-model="resDeliveryAddress.block" 
267                            :caption="locBlock" 
268                            maxlength="50" />
269                    </div>
270                    <div class="adelivery__col">
271                        <deliveryInput 
272                            v-model="resDeliveryAddress.floor" 
273                            :caption="locFloor" 
274                            maxlength="20" />
275                    </div>
276    
277                </div>
278            </template>
279 
280            <template v-if="isByTypeAppearance">
281            
282                <div v-if="isTypeOffice" 
283                     class="adelivery__field adelivery__cols">
284                
285                    <div class="adelivery__col">
286                        <deliveryInput 
287                            v-model="resDeliveryAddress.flat" 
288                            :caption="locOffice" 
289                            maxlength="9" />
290                    </div>
291                    <div class="adelivery__col">
292                        <deliveryInput 
293                            v-model="resDeliveryAddress.entrance" 
294                            :caption="locOfficeEntrance" 
295                            maxlength="9" />
296                    </div>
297                    <div class="adelivery__col">
298                        <deliveryInput 
299                            v-model="resDeliveryAddress.floor" 
300                            :caption="locFloor" 
301                            maxlength="9" />
302                    </div>                
303                
304                </div>
305                
306                <template v-if="isTypeApartment">
307                    <div class="adelivery__field adelivery__cols">
308                    
309                        <div class="adelivery__col">
310                            <deliveryInput 
311                                v-model="resDeliveryAddress.flat" 
312                                :caption="locFlat" 
313                                maxlength="9" />
314                        </div>
315                        <div class="adelivery__col">
316                            <deliveryInput 
317                                v-model="resDeliveryAddress.floor" 
318                                :caption="locFloor" 
319                                maxlength="9" />
320                        </div>                
321                    
322                    </div>  
323                    <div class="adelivery__field adelivery__cols">
324                    
325                        <div class="adelivery__col">
326                            <deliveryInput 
327                                v-model="resDeliveryAddress.entrance" 
328                                :caption="locEntrance" 
329                                maxlength="9" />
330                        </div>
331                        <div class="adelivery__col">
332                            <deliveryInput 
333                                v-model="resDeliveryAddress.intercom" 
334                                :caption="locIntercom" 
335                                maxlength="9" />
336                        </div>                
337                    
338                    </div>                      
339                                  
340                </template>
341                
342
343            
344            
345            </template>
346 
347 
348        </div>
349
350        <div v-if="isCommentLinkVisible"
351            class="adelivery__commentLink"
352            @click="openComment">{{ locComment }}</div>
353
354        <div v-if="isCommentFieldVisible"
355            class="adelivery__field adelivery__comment">
356            <deliveryInput
357                v-model="resDeliveryAddress.comment"
358                :caption="locComment"
359                autogrow="true"
360                @focus="onCommentFocus"
361                @blur="onCommentBlur">
362                <template v-if="isCommentTyping" slot="caption">{{ commentTypedPrefix }}<span :key="commentTypedText.length" class="adelivery__commentChar">{{ commentTypedLastChar }}</span></template>
363            </deliveryInput>
364        </div>
365
366        <div class="adelivery__submit">
367            <deliverySubmit
368                :loc="loc"
369                :submitting="submitting"
370                :fetchingLocation="fetchingLocation"
371                :geocoderLoading="geocoderLoading"
372                @submit="submit"/>
373        </div>
374
375    </div>
376    
377    `};app.addressPickupRestaurantComponent={props:['restaurant','withPhoto','isActive',],computed:{name(){return this.restaurant.name},workTime(){return this.restaurant.today||''},photo(){if(!this.withPhoto){return!1}
378return this.restaurant.photo},hash(){return this.restaurant.hash}},methods:{select(){this.$emit('selectRestaurant',this.restaurant)}},template:`
379        <div class="aRest"
380            :data-hash="hash"
381            :class="{'aRest--withPhoto': !!this.photo, 'aRest--noPhoto': !this.photo}"
382            @click="select">
383
384            <div v-if="photo" class="aRest__photoWrap">
385                <div class="aRest__photoRatio lazyload__wrap">
386                    <img :data-lowsrc="photo.low"
387                         :data-src="photo.high"
388                         class="aRest__img lazyload">
389                </div>
390            </div>
391
392            <div class="aRest__radio" :class="{'aRest__radio--selected': isActive}"></div>
393            <div class="aRest__address">{{name}}</div>
394            <div class="aRest__worktime">{{workTime}}</div>
395
396        </div>
397    `};app.addressPickupComponent={components:{pickupSubmit:app.addressSubmitComponent,pickupRestaurant:app.addressPickupRestaurantComponent,},props:['addressType','pickupAddress','restaurantsForCurrentAddressType','ui','loc','submitting','fetchingLocation','geocoderLoading',],computed:{isVisible(){return app.isPointDeliveryType(this.addressType)},withPhoto(){if(!this.ui.displayRestaurantPhoto){return!1}
398return this.restaurantsForCurrentAddressType.every(restaurant=>!!(restaurant.photo&&restaurant.photo.high))}},methods:{selectRestaurant(restaurant){this.$emit('selectRestaurant',restaurant)},submit(){this.$emit('submit')}},template:`
399        <div v-if="isVisible" class="apickup">
400
401            <div class="apickup__restaurants" data-swipable-scrollable>
402                <pickupRestaurant
403                    v-for="restaurant in restaurantsForCurrentAddressType"
404                    :key="restaurant.companyId + '-' + restaurant.pos"
405                    :withPhoto="withPhoto"
406                    :isActive="pickupAddress.pos === restaurant.pos && pickupAddress.companyId === restaurant.companyId"
407                    :restaurant="restaurant"
408                    @selectRestaurant="selectRestaurant"/>
409            </div>
410
411            <div class="apickup__submit">
412                <pickupSubmit
413                    :loc="loc"
414                    :submitting="submitting"
415                    :fetchingLocation="fetchingLocation"
416                    :geocoderLoading="geocoderLoading"
417                    @submit="submit"/>
418            </div>
419
420        </div>
421    `};app.addressTabComponent={props:['loc','addressType','enabledDeliveryTypes','deliveryZones','emptyZonesDueToAggregator','restaurantsForCurrentAddressType'],computed:{isSingle(){return this.items.length===1},items(){const items=[];
421this.enabledDeliveryTypes.forEach(item=>{const type=item.id;const active=type===this.addressType;if(type==='delivery'||type==='express'){if(!this.deliveryZones.length&&!this.emptyZonesDueToAggregator){return}}else{if(!this.restaurantsForCurrentAddressType.length){return}}
422items.push({type,name:item.name,active})})
423if(items.length===1){const type=items[0].type;items[0].active=!1;if(type==='delivery'){items[0].name=this.loc['cart/onlyDelivery']}else if(type==='pickup'){items[0].name=this.loc['cart/onlyPickup']}}
424return items},isMany(){return this.items.length>3},pointerStyle(){let index=0;for(let i=0;i<this.items.length;i++){if(this.items[i].active){index=i;break}}
425let x=index*100;return{transform:"translateX("+x+"%)"}},itemStyle(){return{width:'calc(100% / '+this.items.length+')'}}},methods:{changeAddressType(item){this.$emit('selectType',item.type)}},template:`
426    
427    <div class="atab"
428         :class="{'atab--many': isMany, 'atab--single': isSingle}">
429
430        <div v-for="(item, i) in items"
431             :key="item.type"
432             class="atab__item"
433             :class="{'atab__item--active': item.active, 'atab__item--hoverable': !item.active}"
434             :style="itemStyle"
435             @click="changeAddressType(item)">
436
437            <div class="atab__name">{{item.name}}</div>
438
439            <div v-if="i === 0 && !isSingle"
440                 ref="pointer"
441                 class="atab__pointer"
442                 :style="pointerStyle"></div>
443
444        </div>
445
446    </div>
447    
448    
449    `};app.addressBarComponent={props:['isDesktop','loc','ui','fetchedLocation','fetchingLocation','mapSettings','isHuawei','blocking',],computed:{visible(){return!0},isCloseVisible(){return!!this.isDesktop&&!this.blocking},isGeolocationVisible(){return!this.mapSettings.forceInputMode&&!this.isHuawei},},watch:{fetchedLocation:function(value){if(value){this.onLocationFetched(value)}}},mounted(){if(this.ui.addressFindMe==='auto'&&this.isGeolocationVisible){this.findMe()}},methods:{onLocationFetched(location){if(!this.fetchingLocation){return}
450this.$emit('fetchingLocationChange',!1);if(location.error){this.$emit('navigate',{type:'geolocationError'})
451return}
452this.$emit('locationFetched',{lat:location.coords.latitude,lng:location.coords.longitude})},findMe(){if(this.fetchingLocation){this.$emit('fetchingLocationChange',!1)}else{this.$emit('fetchingLocationChange',!0);this.$emit('navigate',{type:'sendLocation'})}},changeZoom(action){this.$emit('zoom',action)},close(){this.$emit('navigate',{type:'close'})}},template:`
453    <div v-show="visible"
454         class="abar">
455         
456        <div v-if="isCloseVisible" class="abar__button abar__button--close" @click="close">
457            <svg fill="currentColor" width="27" height="28" viewBox="0 0 27 28"><path d="M8.70711 7.32707C8.31658 6.93655 7.68342 6.93655 7.29289 7.32707C6.90237 7.7176 6.90237 8.35076 7.29289 8.74129L12.2428 13.6912L7.29315 18.6408C6.90263 19.0313 6.90263 19.6645 7.29315 20.055C7.68367 20.4455 8.31684 20.4455 8.70736 20.055L13.657 15.1054L18.6066 20.055C18.9971 20.4455 19.6303 20.4455 20.0208 20.055C20.4113 19.6645 20.4113 19.0313 20.0208 18.6408L15.0712 13.6912L20.0211 8.74129C20.4116 8.35076 20.4116 7.7176 20.0211 7.32707C19.6305 6.93655 18.9974 6.93655 18.6069 7.32707L13.657 12.2769L8.70711 7.32707Z"></path></svg>
458        </div>
459         
460
461        <div class="abar__box abar__box--zoom">
462            <div class="abar__button"
463                 @click="changeZoom('plus')">
464                 
465                <svg width="14" height="14" viewBox="0 0 14 14" fill="none">
466                    <path d="M7 1V13" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
467                    <path d="M13 7L1 7" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
468                </svg>
469                 
470            </div>
471            <div class="abar__button"
472                 @click="changeZoom('minus')">
473                 
474                <svg width="14" height="2" viewBox="0 0 14 2" fill="none">
475                    <path d="M13 1L1 0.999999" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
476                </svg>
477
478                 
479            </div>
480        </div>
481
482
483        <div v-show="isGeolocationVisible"
484             class="abar__box abar__box--location"
485             @click="findMe">
486
487            <div class="abar__button" :class="{'abar__button--fetching': fetchingLocation}">
488            
489                <svg width="13" height="13" viewBox="0 0 13 13" fill="none">
490                    <path d="M12.947 1.02866C13.1844 0.417355 12.5822 -0.184905 11.9716 0.0532851L0.357294 4.56911C0.141712 4.65353 0 4.86082 0 5.09222C0 5.31684 0.13342 5.51961 0.339957 5.6078L5.27649 7.72363L7.39237 12.6601C7.48056 12.8666 7.68333 13 7.9
4900796 13C8.13937 13 8.34666 12.8583 8.43108 12.642L12.947 1.02866Z" fill="currentColor"/>
491                </svg>
492      
493            </div>
494            
495        </div>
496
497        <slot/>
498
499    </div>
500    
501    `};app.addModule(function(){app.createRestaurantMarker=function(params){const iconInactive=L.divIcon({className:'restaurant__marker',iconSize:[23,38],iconAnchor:[10,38],html:'<div class="restaurant__ico--inactive"></div>'});const iconActive=L.divIcon({className:'restaurant__marker',iconSize:[30,47],iconAnchor:[15,47],html:'<div class="restaurant__ico--active"></div>'});const marker=L.marker([params.lat,params.lng],{pane:'pickupPane',icon:iconInactive}).on('click',params.onClick).addTo(params.map);const highlight=(isHighlighted)=>{if(isHighlighted){marker.setIcon(iconActive)}else{marker.setIcon(iconInactive)}};return{highlight}}});app.createRestaurantMarkers=function(params){const map=params.map;const restaurants=params.restaurants;const markers=new Map();restaurants.forEach((restaurant)=>{const key=restaurant.companyId+'-'+restaurant.pos;const marker=app.createRestaurantMarker({lat:restaurant.lat,lng:restaurant.lng,map:map,onClick:()=>{params.onSelectRestaurant(restaurant)}});markers.set(key,marker)});const highlight=(activeRestaurant)=>{const activeKey=activeRestaurant?activeRestaurant.companyId+'-'+activeRestaurant.pos:null;markers.forEach((marker,key)=>{marker.highlight(key===activeKey)})};const fitBounds=()=>{const bounds=[];restaurants.forEach((item)=>{bounds.push([item.lat,item.lng])});if(bounds.length===1){map.setView(bounds[0],15)}else{map.fitBounds(bounds)}};const destroy=()=>{markers.forEach((marker)=>{if(marker&&marker.remove){marker.remove()}});markers.clear()};return{highlight,fitBounds,destroy}};app.addressMapComponent={props:['closeIntentionPercent','restaurantsForCurrentAddressType','addressType','pickupAddress','resDeliveryAddress','deliveryZones','currentZone','isDesktop','mapSettings','geocoder','city','locationFetched',],data(){return{isShown:!1,dragging:!1,map:null,marker:null,restaurantsComponent:null,restaurantsPickupWatcher:null,deliveryPane:null,pickupPane:null,deliveryBounds:null,forceInputMode:this.mapSettings.forceInputMode}},computed:{isBarVisible(){return this.isDesktop},zoneFillOpacity(){return document.documentElement.classList.contains('html--dark')?0.08:0.2},bgOpacity(){if(!this.isShown){return{}}
502return{opacity:1-(this.closeIntentionPercent/100)}},},destroyed(){this.map.remove()},mounted(){const mapTiles=this.mapSettings.tiles||this.mapSettings.t;const mapKeys=this.mapSettings.keys||this.mapSettings.k;const crs=['google','osm','mapy'].includes(mapTiles)?L.CRS.EPSG3857:L.CRS.EPSG3395;this.map=L.map(this.$refs.map,{crs,scrollWheelZoom:!1,zoomControl:!1,attributionControl:!1,fadeAnimation:!0,markerZoomAnimation:!0,zoomAnimation:!0});this.map.setActiveArea({position:'absolute',top:'0',left:this.isDesktop?'488px':'0',right:'0',bottom:this.isDesktop?'0':'370px',})
503this.map.setView([this.city.lat,this.city.lng],15);if(mapTiles==='osm'){L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{subdomains:['a','b','c'],}).addTo(this.map)}else if(mapTiles==='google'){L.tileLayer('https://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',{subdomains:['mt0','mt1','mt2','mt3']}).addTo(this.map)}else if(mapTiles==='mapy'&&mapKeys&&mapKeys.length){L.tileLayer('https://api.mapy.cz/v1/maptiles/basic/256/{z}/{x}/{y}?apikey='+mapKeys[0]).addTo(this.map)}else{const isDark=document.documentElement.classList.contains('html--dark');L.tileLayer(`https://core-renderer-tiles.maps.yandex.net/tiles?${isDark ? 'theme=dark&' : ''}l=map&x={x}&y={y}&z={z}&scale=2&lang=ru_RU`).addTo(this.map)}
504this.deliveryPane=this.map.createPane('deliveryPane');this.pickupPane=this.map.createPane('pickupPane');this.zoneLayerGroup=L.layerGroup().addTo(this.map);if(!this.forceInputMode){this.map.addEventListener('move',this.setCenterMarker);this.map.addEventListener('dragend',this.onDragEnd);this.map.addEventListener('dragstart',this.onDragStart);this.map.addEventListener('zoomend',this.onZoomEnd)}
505this.addMarkerToMap();setTimeout(()=>{this.isShown=!0},100)},watch:{'addressType':{handler:function(activeType){setTimeout(()=>{this.onTypeChanged(activeType)},50)},immediate:!0},'deliveryZones':function(deliveryZones){if(this.zoneLayerGroup){this.zoneLayerGroup.clearLayers();this.deliveryBounds=null}
506if(deliveryZones&&deliveryZones.length){this.addZonesToMap(deliveryZones)}},'currentZone':{handler:function(newZone){if(['delivery','express'].includes(this.addressType)&&this.marker){this.getCurrentMarker()}},immediate:!0},'restaurantsForCurrentAddressType':function(restaurants){if(this.restaurantsPickupWatcher){this.restaurantsPickupWatcher();this.restaurantsPickupWatcher=null}
507if(this.restaurantsComponent){this.restaurantsComponent.destroy();this.restaurantsComponent=null}
508if(restaurants&&restaurants.length&&this.map){this.addRestaurantsToMap(restaurants);this.onTypeChanged(this.addressType)}},locationFetched(coords){if(!coords)return;
508this.map.setView([coords.lat,coords.lng],this.map.getZoom(),{animate:!1});setTimeout(()=>{this.reverseGeocode({fromGeolocation:!0,cb:()=>{this.map.setZoom(15)}})},30)},},methods:{zoom(action){if(action==='plus'){this.map.zoomIn()}else{this.map.zoomOut()}},getCenter(){return this.map.getCenter()},centerOn(address){address=address||{};if(address.lat){this.map.setView([address.lat,address.lng])}else{this.map.setView([this.city.lat,this.city.lng])}
509if(this.forceInputMode&&address.lat){this.marker.setLatLng({lat:address.lat,lng:address.lng})}},onTypeChanged(activeType){if(!['delivery','express'].includes(activeType)){this.pickupPane.style.display='';this.deliveryPane.style.display='none';if(this.pickupAddress&&this.pickupAddress.lat){this.map.setView([this.pickupAddress.lat,this.pickupAddress.lng],15)}else{if(this.restaurantsComponent){this.restaurantsComponent.fitBounds()}}}else{this.pickupPane.style.display='none';this.deliveryPane.style.display='';const lat=(this.resDeliveryAddress&&this.resDeliveryAddress.lat)||this.city.lat;const lng=(this.resDeliveryAddress&&this.resDeliveryAddress.lng)||this.city.lng;this.map.setView([lat,lng],15);this.fitZoneBounds()}
510setTimeout(()=>{this.map.invalidateSize()},100)},addRestaurantsToMap(restaurants){this.restaurantsComponent=app.createRestaurantMarkers({map:this.map,restaurants:restaurants,onSelectRestaurant:(restaurant)=>{this.selectRestaurant(restaurant)}});this.restaurantsPickupWatcher=this.$watch('pickupAddress',(activeRestaurant)=>{this.restaurantsComponent.highlight(activeRestaurant);if(activeRestaurant&&activeRestaurant.lat){this.map.setView([activeRestaurant.lat,activeRestaurant.lng],15)}},{immediate:!0,deep:!0})},addMarkerToMap(){this.createPinMarker(this.city.lat,this.city.lng);this.marker.addTo(this.map);const lat=(this.resDeliveryAddress&&this.resDeliveryAddress.lat)||this.city.lat;const lng=(this.resDeliveryAddress&&this.resDeliveryAddress.lng)||this.city.lng;this.map.setView([lat,lng],15);if(this.forceInputMode){this.marker.setLatLng({lat:lat,lng:lng})}},createPinMarker(lat,lng){this.marker=L.marker([lat,lng],{pane:'deliveryPane',riseOnHover:!1,zIndexOffset:10000,icon:this.pinIcon(),})},pinIcon(){return L.divIcon({className:'amap__marker amap__marker--pin',iconSize:[46,62],iconAnchor:[23,62],html:`
511                <svg class="amap__markerPin mapMarker" viewBox="0 0 46 68" aria-hidden="true">
512                    <g transform="translate(23 0)">
513                        <g class="mapMarker__g2" transform="translate(0 40.5)">
514                            <g class="mapMarker__g4">
515                                <path d="M15 -8C15 0.284 8.284 7 0 7C-8.284 7 -15 0.284 -15 -8C-15 -16.284 -8.284 -23 0 -23C8.284 -23 15 -16.284 15 -8Z" fill="#000000"/>
516                                <path d="M0 5C0.552 5 1 5.448 1 6C1 6 1 22 1 22C1 22.552 0.552 23 0 23C-0.552 23 -1 22.552 -1 22C-1 22 -1 6 -1 6C-1 5.448 -0.552 5 0 5Z" fill-rule="evenodd" fill="#000000"/>
517                            </g>
518                        </g>
519                    </g>
520                </svg>`,})},liftPin(isUp){const el=this.marker&&this.marker.getElement();const pin=el&&el.querySelector('.mapMarker');if(!pin){return}
521pin.classList.toggle('mapMarker--up',isUp);pin.classList.toggle('mapMarker--down',!isUp)},addZonesToMap(deliveryZones){if(this.mapSettings&&this.mapSettings.hideDeliveryZones){return}
522const colors={green:'rgba(7, 157, 4, 0.9)',blue:'rgba(0, 163, 255, 0.9)',grey:'#989898',orange:'#FF8C61',violet:'#944BBB',lightBlue:'#51E5FF',yellow:'#FFD447',pink:'#F497DA',aqua:'#00FFFF'};if(this.mapSettings&&this.mapSettings.zoneLayerMode==='restaurant'){this.addUnionZoneToMap(deliveryZones,colors.green);return}
523deliveryZones.forEach((zone)=>{const color=colors[zone.color]||colors.green;try{L.geoJSON(zone.poly,{pane:'deliveryPane',onEachFeature:(feature,l)=>{if(!this.deliveryBounds){this.deliveryBounds=l.getBounds()}else{this.deliveryBounds.extend(l.getBounds())}
524l.setStyle({fillColor:color,color:color,weight:1,fillOpacity:this.zoneFillOpacity})}}).addTo(this.zoneLayerGroup)}catch(e){console.log(e.toString(),zone)}});this.fitZoneBounds()},addUnionZoneToMap(deliveryZones,color){const features=[];
524(deliveryZones||[]).forEach((zone)=>{try{this.extractZonePolygons(zone.poly).forEach(f=>features.push(f))}catch(e){console.log(e.toString(),zone)}});if(!features.length){this.fitZoneBounds();return}
525let unioned=null;if(features.length>1){try{unioned=turf.union(turf.featureCollection(features))}catch(e){console.log(e.toString())}}
526const drawFeatures=unioned?[unioned]:features;drawFeatures.forEach((feature)=>{try{L.geoJSON(feature,{pane:'deliveryPane',onEachFeature:(f,l)=>{if(!this.deliveryBounds){this.deliveryBounds=l.getBounds()}else{this.deliveryBounds.extend(l.getBounds())}
527l.setStyle({fillColor:color,color:color,weight:1,fillOpacity:this.zoneFillOpacity})}}).addTo(this.zoneLayerGroup)}catch(e){console.log(e.toString())}});this.fitZoneBounds()},extractZonePolygons(geojson){if(!geojson){return[]}
528const toNumbers=(arr)=>arr.map(el=>Array.isArray(el)?toNumbers(el):Number(el));const makeFeature=(geometry)=>({type:'Feature',properties:{},geometry:{type:geometry.type,coordinates:toNumbers(geometry.coordinates)}});const result=[];const pushGeometry=(geometry)=>{if(!geometry||(geometry.type!=='Polygon'&&geometry.type!=='MultiPolygon')){return}
529result.push(makeFeature(geometry))};if(geojson.type==='FeatureCollection'){(geojson.features||[]).forEach(f=>pushGeometry(f&&f.geometry))}else if(geojson.type==='Feature'){pushGeometry(geojson.geometry)}else{pushGeometry(geojson)}
530return result},fitZoneBounds(){let issetAddress=this.resDeliveryAddress&&this.resDeliveryAddress.lat;if(this.deliveryBounds&&!issetAddress&&['delivery','express'].includes(this.addressType)){this.map.fitBounds(this.deliveryBounds)}},selectRestaurant(restaurant){this.$emit('selectRestaurant',restaurant)},onDragStart(){this.$emit('didDrag');this.dragging=!0;this.liftPin(!0)},onDragEnd(){this.dragging=!1;this.liftPin(!1);if(['delivery','express'].includes(this.addressType)){this.reverseGeocode()}},onZoomEnd(){if(['delivery','express'].includes(this.addressType)){if(this.resDeliveryAddress&&this.resDeliveryAddress.lat){this.map.setView([this.resDeliveryAddress.lat,this.resDeliveryAddress.lng])}}},reverseGeocode(params){this.$emit('geocoderLoadingChange',!0);const coords=this.map.getCenter();this.geocoder.reverseGeocode({notifyYandexKeyLimitReached:!0,coords:coords,onResponse:(response)=>{if(!response.lat){response.lat=coords.lat;response.lng=coords.lng}
531this.$emit('geocoderLoadingChange',!1);this.$emit('addressFoundByDrag',response,{fromGeolocation:!!(params&&params.fromGeolocation)});params&&params.cb&&params.cb(response)}})}
531,setCenterMarker(){if(this.marker){this.marker.setLatLng(this.map.getCenter())}},getCurrentMarker(){let defaultIcon=null
532if(this.currentZone&&this.currentZone.highDemand&&this.currentZone.highDemand.isActive){defaultIcon=L.divIcon({className:'amap__marker amap__marker--auto',iconSize:[90,52],iconAnchor:[0,52],html:`<div class="amap__markerDeliveryTime amap__markerHighDeliveryTime">
533                        <div class="amap__markerHighDeliveryIco">
534                            <svg width="6" height="10" viewBox="0 0 6 10" fill="none" xmlns="http://www.w3.org/2000/svg">
535                                <path fill-rule="evenodd" clip-rule="evenodd" d="M2.28835 0.75C2.21138 0.75 2.13648 0.777006 2.0749 0.826965C2.01332 0.876924 1.96839 0.947141 1.94683 1.02707L0.70173 5.64499C0.686266 5.70234 0.683359 5.7628 0.693238 5.82158C0.703118 5.88036 0.725512 5.93584 0.758649 5.98364C0.791785 6.03143 0.834753 6.07022 0.88415 6.09694C0.933547 6.12366 0.988017 6.13757 1.04324 6.13757H2.41891L2.11297 8.78363C2.10289 8.86974 2.12001 8.957 2.16156 9.03125C2.20311 9.1055 2.26665 9.16238 2.34184 9.19264C2.41704 9.22291 2.49949 9.22478 2.5758 9.19797C2.65211 9.17116 2.7178 9.11722 2.7622 9.04493L5.60815 4.42702C5.6439 4.36906 5.66443 4.3017 5.66755 4.23211C5.67067 4.16252 5.65628 4.09332 5.62589 4.03189C5.59551 3.97046 5.55028 3.9191 5.49503 3.8833C5.43978 3.8475 5.37658 3.8286 5.31217 3.82861H4.04679L4.93366 1.2699C4.95383 1.21169 4.96067 1.14906 4.95358 1.08737C4.94649 1.02568 4.9257 0.966768 4.89297 0.91567C4.86024 0.864571 4.81656 0.822809 4.76566 0.793958C4.71476 0.765106 4.65815 0.750023 4.60068 0.75H2.28835Z" fill="currentColor"/>
536                            </svg>       
537                        </div>
538                        ${this.currentZone.highDemand.deliveryTime}
539                    </div>`})}else if(this.currentZone&&this.currentZone.deliveryTime){defaultIcon=L.divIcon({className:'amap__marker amap__marker--auto',iconSize:[90,52],iconAnchor:[0,52],html:`<div class="amap__markerDeliveryTime">${this.currentZone.deliveryTime}</div>`})}else{if(this.marker.getIcon().options.className.includes('amap__marker--pin')){return}
540defaultIcon=this.pinIcon()}
541this.marker.setIcon(defaultIcon)}},template:`
542    
543   <div class="amap"
544         :class="{'amap--dragging': dragging, 'amap--shown': isShown}"
545         :style="bgOpacity">
546         
547         <div v-if="isBarVisible" 
548            class="amap__bar">
549            <slot name="bar"/>            
550         </div>
551
552
553        <div class="amap__leaflet" ref="map"></div>
554
555   </div>
556    
557    `};app.addressSwipableComponent={props:['isDesktop','insets','disableClose',],data(){return{isShown:this.isDesktop,isSwipeProcessing:!1,swipeDirectionChecked:!1,offsetY:0,touchStartX:0,touchStartY:0,withTransition:!1,scrollTop:0,maxOffsetToClose:100,}},computed:{isBarVisible(){return!this.isDesktop},closeIntention(){let v=this.offsetY>this.maxOffsetToClose?this.maxOffsetToClose:this.offsetY;return v*100/this.maxOffsetToClose},scrollableStyle(){let offsetY=this.offsetY;let opacity=1-(this.closeIntention/100)*0.03;return{transform:'translateY('+offsetY+'px)',transition:this.withTransition?'transform 100ms':'unset',opacity:opacity,}},insetsStyle(){if(!this.insets){return null}
558return{paddingBottom:this.insets.bottom+'px'}},barStyle(){return{opacity:1-(this.closeIntention/100)}},},watch:{offsetY:function(){this.$emit('closeIntention',this.closeIntention)},},mounted(){document.documentElement.addEventListener('touchend',this.onTouchEnd,!1);document.documentElement.addEventListener('touchmove',this.onTouchMove,!1);setTimeout(()=>{this.isShown=!0},700);if(typeof ResizeObserver!=='undefined'){const scrollable=this.$refs.refScrollable;this._resizeObserver=new ResizeObserver(()=>this.resizeHeight());this._resizeObserver.observe(scrollable);this._mutationObserver=new MutationObserver(()=>{this._mutationFrame=this._mutationFrame||requestAnimationFrame(()=>{this._mutationFrame=0;this.resizeHeight()})});this._mutationObserver.observe(scrollable,{childList:!0,subtree:!0})}},destroyed(){document.documentElement.removeEventListener('touchend',this.onTouchEnd,!1);document.documentElement.removeEventListener('touchmove',this.onTouchMove,!1);if(this._resizeObserver){this._resizeObserver.disconnect();this._mutationObserver.disconnect();cancelAnimationFrame(this._mutationFrame)}},methods:{resizeHeight(){const height=this.$refs.refScrollable.scrollHeight;if(height===this._height){return}
559this._height=height;const grow=this.$refs.grow;const edgeBefore=grow.getBoundingClientRect().top;if(this._resizeAnimation){this._resizeAnimation.cancel()}
560grow.style.height=height+'px';if(!this.isShown){return}
561const shift=edgeBefore-grow.getBoundingClientRect().top;if(Math.abs(shift)<1){return}
562this._resizeAnimation=grow.animate([{transform:`translateY(${shift}px)`},{transform:'none'}],{duration:500,easing:'ease'})},onTouchStart(e){if(this.disableClose){return}
563if(this.isSwipeProcessing){this.isSwipeProcessing=!1;return}
564let scrollable=e.target.closest('[data-swipable-scrollable]');if(scrollable&&scrollable.scrollTop>0){return}
565this.isSwipeProcessing=!0;this.swipeDirectionChecked=!1;this.withTransition=!1;this.offsetY=0;this.touchStartX=e.touches[0].clientX;this.touchStartY=e.touches[0].clientY},onTouchEnd(){if(!this.isSwipeProcessing){return}
566this.withTransition=!0;if(this.offsetY<this.maxOffsetToClose){this.offsetY=0}else{this.$emit('navigate',{type:'close'});this.isShown=!1}
567this.isSwipeProcessing=!1},onTouchMove(e){if(!this.isSwipeProcessing){return}
568if(this.scrollTop>0){this.touchStartY=e.touches[0].clientY}else{let offsetX=e.touches[0].clientX-this.touchStartX;let offsetY=e.touches[0].clientY-this.touchStartY;if(!this.swipeDirectionChecked&&(Math.abs(offsetX)>=3||Math.abs(offsetY)>
568=3)){if(Math.abs(offsetX)>Math.abs(offsetY)){this.isSwipeProcessing=!1;this.offsetY=0;return}
569this.swipeDirectionChecked=!0}
570if(offsetY<=2){offsetY=0}
571this.offsetY=offsetY}}},template:`
572    
573        <div class="asw" 
574             :class="{'asw--shown': isShown, 'asw--disableClose': disableClose}" 
575             @touchstart="onTouchStart">
576             
577            <div class="asw__autogrow" ref="grow">
578            
579                <div v-if="isBarVisible" class="asw__bar" :style="barStyle">
580                    <slot name="bar"/>            
581                </div>
582            
583                <div class="asw__scrollable" 
584                    ref="refScrollable"
585                    :style="scrollableStyle">
586    
587                    <div v-if="!disableClose" class="asw__tick"></div>
588                    
589                    <slot/>  
590                    
591                    <div class="asw__insets" :style="insetsStyle"></div> 
592                
593                </div>             
594             </div>
595        
596
597        
598        </div>
599    
600    `};(function(){app.addressCurrentZoneComponent={props:['deliveryZones','resDeliveryAddress',],watch:{deliveryZones:{handler:function(){this.updateZone()},},resDeliveryAddress:{handler:function(){this.updateZone()},deep:!0,immediate:!0,},},methods:{updateZone(){this.$emit('input',this.findZone())},findZone(){if(!this.deliveryZones||!this.deliveryZones.length||!this.resDeliveryAddress||!this.resDeliveryAddress.lat){return null}
601const lat=this.resDeliveryAddress.lat;const lng=this.resDeliveryAddress.lng;const point=[lng,lat];const targeted=this.deliveryZones.filter(z=>isTargetedZone(z));return this.findZoneInList(targeted,point)||this.findZoneInList(this.deliveryZones,point)},findZoneInList(zones,point){for(const zone of zones){try{const geometry=zone.poly&&zone.poly.geometry;if(!geometry||!geometry.coordinates){continue}
602const polygons=geometry.type==='MultiPolygon'?geometry.coordinates:[geometry.coordinates];for(const rings of polygons){if(pointInPoly(point,rings)){return zone}}}catch(e){console.error(e)}}
603return null},}};function isTargetedZone(zone){const segmentIds=zone&&zone.audience&&zone.audience.segmentIds;return Array.isArray(segmentIds)&&segmentIds.length>0}
604function pointInPoly(pt,rings){if(!inRing(pt,rings[0]))return!1;for(let i=1;i<rings.length;i++){if(inRing(pt,rings[i]))return!1}
605return!0}
606function inRing(pt,ring){const x=pt[0],y=pt[1];let inside=!1;for(let i=0,j=ring.length-1;i<ring.length;j=i++){const xi=ring[i][0],yi=ring[i][1];const xj=ring[j][0],yj=ring[j][1];if(((yi>y)!==(yj>y))&&(x<(xj-xi)*(y-yi)/(yj-yi)+xi)){inside=!inside}}
607return inside}})();app.addressCityComponent={props:['name','insets','blocking'],computed:{isVisible(){return this.name&&this.blocking},blockStyle(){if(!this.insets){return{}}
608return{top:this.insets.top+'px'}}},methods:{navigate(){this.$emit('navigate',{type:'cities'})}},template:`
609        <div v-if="isVisible" class="acity" :style="blockStyle">
610            <div class="acity__button" @click="navigate">
611                 {{name}}
612                 
613                <svg class="acity__tick" viewBox="0 0 10 7">
614                    <g stroke="none" stroke-width="1" fill-rule="evenodd">
615                        <g transform="translate(-206.000000, -49.000000)" fill-rule="nonzero">
616                            <polygon id="Path-20" points="214.292893 49.2928932 215.707107 50.7071068 211 55.4142136 206.292893 50.7071068 207.707107 49.2928932 211 52.585"></polygon>
617                        </g>
618                    </g>
619                </svg>
620            </div>
621        </div>
622    
623    `};app.addressComponent={components:{addressMap:app.addressMapComponent,addressCity:app.addressCityComponent,addressTab:app.addressTabComponent,addressDelivery:app.addressDeliveryComponent,addressPickup:app.addressPickupComponent,addressSwipable:app.addressSwipableComponent,mapBar:app.addressBarComponent,addressCurrentZone:app.addressCurrentZoneComponent,spinner:app.commonSpinnerComponent},props:['isWeb','isDesktop','loc','ui','fetchUrl','restrictCompany','address','refScreen','addressDeliveryType','fetchedLocation','selectedSavedAddress','city','enabledDeliveryTypes','mapSettings','multicityName','submitting','insets','isHuawei','configHost','disableClose','blocking','company','colorScheme','lang',],data(){const resAddress=JSON.parse(JSON.stringify(this.address));const deliveryAddress=!resAddress.delivery||Array.isArray(resAddress.delivery)?{}:resAddress.delivery;const courierPointAddress=!resAddress.courierPoint||Array.isArray(resAddress.courierPoint)?{}:resAddress.courierPoint;const pickupAddress=!resAddress.pickup||Array.isArray(resAddress.pickup)?{}:resAddress.pickup;const resDeliveryAddress=this.addressDeliveryType==='courierPoint'?courierPointAddress:deliveryAddress;const addressType=resAddress.type;resAddress.delivery=deliveryAddress;resAddress.courierPoint=courierPointAddress;resAddress.pickup=pickupAddress;return{isFetching:!1,deliveryAddress,courierPointAddress,pickupAddress,resDeliveryAddress,addressType,resAddress,restaurantsForCurrentAddressType:[],deliveryZones:[],emptyZonesDueToAggregator:!1,savedAddresses:[],restaurants:[],currentZone:null,geocoder:app.geocoder({provider:this.mapSettings.geocoder||this.mapSettings.g,apiKeys:this.mapSettings.keys||this.mapSettings.k,throttle:500,configHost:this.configHost,lang:this.lang,yandexLang:this.mapSettings.y}),closeIntentionPercent:0,didDragging:!1,isPointConfirmed:!1,fetchingLocation:!1,locationFetched:null,geocoderLoading:!1,}}
623,mounted(){this.fetch()},computed:{filteredDeliveryZones(){if(this.addressType==='express'){return this.deliveryZones.filter(z=>z.type==='express')}
624if(this.addressType==='delivery'){return this.deliveryZones.filter(z=>z.type!=='express')}
625return[]},},watch:{geocoderLoading(value){this.$emit('loading',value)},addressType:{handler:function(){this.updateRestaurantsForCurrentAddressType()},immediate:!0},},methods:{fetch(){this.isFetching=!0;const payload={restrictCompany:this.restrictCompany,refScreen:this.refScreen,};app.fetch(this.fetchUrl,payload,(response)=>{if(response.error){this.$emit('alert',response.message);this.isFetching=!1;return}
626this.deliveryZones=response.deliveryZones;this.restaurants=response.restaurants;this.emptyZonesDueToAggregator=response.emptyZonesDueToAggregator;this.savedAddresses=response.savedAddresses||[];if(this.addressType==='delivery'&&!this.deliveryZones.length&&!this.emptyZonesDueToAggregator){this.selectAddressType('pickup')}
627if(this.addressType==='pickup'&&!this.restaurants.length){if(this.deliveryZones.length){this.selectAddressType('delivery')}else{this.selectAddressType('drive')}}
628this.updateRestaurantsForCurrentAddressType();this.isFetching=!1})},updateRestaurantsForCurrentAddressType(){this.restaurantsForCurrentAddressType=this.restaurants.filter((item)=>{if(this.addressType==='drive'&&item.isDriveOff){return!1}else if(this.addressType==='inside'&&item.isInsideOff){return!1}else if(this.addressType==='pickup'&&item.isPickupOff){return!1}else if(this.addressType==='banquet'&&item.isBanquetOff){return!1}
629return!0});if(this.restaurantsForCurrentAddressType.length===1&&app.isPointDeliveryType(this.addressType)){const singleRestaurant=this.restaurantsForCurrentAddressType[0];const isAlreadySelected=this.pickupAddress.pos===singleRestaurant.pos&&this.pickupAddress.companyId===singleRestaurant.companyId;if(!isAlreadySelected){this.selectRestaurant(singleRestaurant)}}},submit(){if(this.addressType==='delivery'&&this.ui.addressDeliveryFormAppearance==='byType'&&!this.mapSettings.disableGeocoder&&!this.resDeliveryAddress.type){this.$emit('alert',this.loc['address/delivery/type/required']);return}
630if(['delivery','express'].includes(this.addressType)&&this.mapSettings.isGeolocationByCoords&&!this.resDeliveryAddress.house&&!this.didDragging&&!this.isPointConfirmed){this.$emit('alert',this.loc['address/house/notFound/confirmPoint']);return}
631if(['delivery','express'].includes(this.addressType)&&this.ui.isShowAddressComment&&!this.mapSettings.disableGeocoder&&!this.resDeliveryAddress.street&&!this.resDeliveryAddress.house&&!String(this.resDeliveryAddress.comment||'').trim()){this.$emit('alert',this.loc['address/comment/required']);return}
632this.$emit('submit',this.resAddress)},onCloseIntention(p){this.closeIntentionPercent=p},selectRestaurant(restaurant){this.pickupAddress=JSON.parse(JSON.stringify(restaurant));this.resAddress.pickup=this.pickupAddress},selectAddressType(addressType){this.addressType=addressType;this.resAddress.type=addressType},onZoom(action){this.$refs.mapComponent.zoom(action)},onDidDrag(){this.didDragging=!0;this.fetchingLocation=!1},onFetchingLocationChange(value){this.fetchingLocation=value},onLocationFetched(coords){this.locationFetched=coords},onGeocoderLoadingChange(value){this.geocoderLoading=value},updateDeliveryAddress(address,useMapCoords=null){address=address||{};if(!address.house){const hasOwnConfirmedCoords=address.fullSwitch&&address.lat&&address.lng;if(hasOwnConfirmedCoords){}else if(useMapCoords){address.lat=useMapCoords.lat;address.lng=useMapCoords.lng}else{address.lat='';address.lng=''}}
633this.resDeliveryAddress.lat=address.lat||'';this.resDeliveryAddress.lng=address.lng||'';this.resDeliveryAddress.city=address.city||'';this.resDeliveryAddress.street=address.street||'';this.resDeliveryAddress.house=address.house||'';this.resDeliveryAddress.name=this.buildDeliveryAddressName(address);if(this.mapSettings.displayDistrict){this.resDeliveryAddress.district=address.district||''}
634if(address.fullSwitch){this.resDeliveryAddress.id=address.id||0;this.resDeliveryAddress.flat=address.flat||'';this.resDeliveryAddress.floor=address.floor||'';this.resDeliveryAddress.entrance=address.entrance||'';
634this.resDeliveryAddress.comment=address.comment||'';this.isPointConfirmed=!0}else{this.resDeliveryAddress.flat='';this.resDeliveryAddress.floor='';this.resDeliveryAddress.entrance='';this.resDeliveryAddress.intercom='';this.resDeliveryAddress.comment='';this.isPointConfirmed=!1}},buildDeliveryAddressName(address){if(address.house&&address.lat){return[address.city,address.street,address.house].join(', ')}
635if(this.mapSettings.isGeolocationByCoords&&address.lat){return[address.city,address.street].filter(Boolean).join(', ')}
636return''},onAddressSelected(address){if(this.mapSettings.isGeolocationByCoords){const mapCenter=this.$refs.mapComponent.getCenter();this.updateDeliveryAddress(address,mapCenter)}else{this.updateDeliveryAddress(address,null)}
637this.$refs.mapComponent.centerOn(address)},onAddressFoundByDrag(address,meta={}){if(this.mapSettings.isGeolocationByCoords){this.updateDeliveryAddress(address,{lat:address.lat,lng:address.lng});if(meta.fromGeolocation){this.isPointConfirmed=!0}}else{this.updateDeliveryAddress(address,null)}
638if(this.ui.addressDeliveryFormAppearance==='byType'&&!this.resDeliveryAddress.type){this.resDeliveryAddress.type='apartment'}
639const delivery=this.$refs.deliveryComponent;if(delivery){delivery.updateSearchFromMap(address)}},navigate(params){this.$emit('navigate',params)}},template:`
640    
641    <div class="amain">
642    
643        <addressCurrentZone
644            v-model="currentZone"
645            :resDeliveryAddress="resDeliveryAddress"
646            :deliveryZones="filteredDeliveryZones"/>
647    
648        <addressCity
649            :insets="insets"
650            :name="multicityName"
651            :blocking="blocking"
652            @navigate="navigate"/>
653
654        <addressMap
655            ref="mapComponent"
656            :closeIntentionPercent="closeIntentionPercent"
657            :addressType="addressType"
658            :restaurantsForCurrentAddressType="restaurantsForCurrentAddressType"
659            :pickupAddress="pickupAddress"
660            :deliveryZones="filteredDeliveryZones"
661            :currentZone="currentZone"
662            :resDeliveryAddress="resDeliveryAddress"
663            :isDesktop="isDesktop"
664            :mapSettings="mapSettings"
665            :geocoder="geocoder"
666            :city="city"
667            :locationFetched="locationFetched"
668            @selectRestaurant="selectRestaurant"
669            @didDrag="onDidDrag"
670            @geocoderLoadingChange="onGeocoderLoadingChange"
671            @addressFoundByDrag="onAddressFoundByDrag">
672            <template v-slot:bar>
673                <mapBar
674                    :fetchedLocation="fetchedLocation"
675                    :fetchingLocation="fetchingLocation"
676                    :loc="loc"
677                    :ui="ui"
678                    :isDesktop="isDesktop"
679                    :isHuawei="isHuawei"
680                    :mapSettings="mapSettings"
681                    :blocking="blocking"
682                    @navigate="navigate"
683                    @zoom="onZoom"
684                    @fetchingLocationChange="onFetchingLocationChange"
685                    @locationFetched="onLocationFetched">
686                    <slot/>
687                </mapBar>
688            </template>
689        </addressMap>    
690        
691        <addressSwipable
692            :insets="insets"
693            :disableClose="disableClose" 
694            :isDesktop="isDesktop"
695            @navigate="navigate" 
696            @closeIntention="onCloseIntention">
697        
698            <template v-slot:bar>
699                <mapBar
700                    :fetchedLocation="fetchedLocation"
701                    :fetchingLocation="fetchingLocation"
702                    :loc="loc"
703                    :ui="ui"
704                    :isHuawei="isHuawei"
705                    :mapSettings="mapSettings"
706                    :blocking="blocking"
707                    @navigate="navigate"
708                    @zoom="onZoom"
709                    @fetchingLocationChange="onFetchingLocationChange"
710                    @locationFetched="onLocationFetched">
711                    <slot/>
712                </mapBar>
713            </template>
714
715            <template v-slot:default>
716                <addressTab
717                    @selectType="selectAddressType"
718                    :addressType="addressType"
719                    :enabledDeliveryTypes="enabledDeliveryTypes"
720                    :deliveryZones="deliveryZones"
721                    :restaurantsForCurrentAddressType="restaurantsForCurrentAddressType"
722                    :emptyZonesDueToAggregator="emptyZonesDueToAggregator"
723                    :loc="loc"/>
724                
725                <addressDelivery
726                    ref="deliveryComponent"
727                    :addressType="addressType"
728                    :resDeliveryAddress="resDeliveryAddress"
729                    :selectedSavedAddress="selectedSavedAddress"
730                    :loc="loc"
731                    :ui="ui"
732                    :mapSettings="mapSettings"
733                    :geocoder="geocoder"
734                    :city="city"
735                    :savedAddresses="savedAddresses"
736                    :colorScheme="colorScheme"
737                    :isWeb="isWeb"
738                    :isDesktop="isDesktop"
739                    :submitting="submitting"
740                    :currentZone="currentZone"
741                    :didDragging="didDragging"
742                    :fetchingLocation="fetchingLocation"
743                    :geocoderLoading="geocoderLoading"
744                    @submit="submit"
745                    @navigate="navigate"
746                    @geocoderLoadingChange="onGeocoderLoadingChange"
747                    @addressSelected="onAddressSelected"/>
748                    
749                <addressPickup
750                    :ui="ui"
751                    :loc="loc"
752                    :addressType="addressType"
753                    :pickupAddress="pickupAddress"
754                    :restaurantsForCurrentAddressType="restaurantsForCurrentAddressType"
755                    :submitting="submitting"
756                    :fetchingLocation="fetchingLocation"
757                    :geocoderLoading="geocoderLoading"
758                    @submit="submit"
759                    @selectRestaurant="selectRestaurant"/>     
760            </template>
761       
762        
763        </addressSwipable>
764
765        <transition name="amain__fade">
766            <div v-if="isFetching" class="amain__loading">
767                <spinner/>
768            </div>
769        </transition>
770
771    </div>
772
773    `};app.addModule(function(){let opened=!1;const activeCityName=(function(){try{const el=document.getElementById('cities__module');return el?(JSON.parse(el.innerHTML).cityName||''):''}catch(e){return''}})();const showAddress=function(params){if(opened){return}
774opened=!0;const refScreen=params&&params.refScreen&&params.refScreen;const closeWithNoReload=refScreen==='cart';const addressComponent={components:{addr:app.addressComponent,},data(){return{fetchedLocation:null,submitting:!1,addressDeliveryType:'delivery',isVisible:!1,isDesktop:!app.mobile,blocking:!!(params&&params.blocking),menuSwitchConfirmed:!1,colorScheme:document.documentElement.classList.contains('html--dark')?'dar
774k':'light',refScreen,}},computed:{...Vuex.mapState(['loc','ui','city','address','map','company','useExpressDelivery','lang']),multicityName(){if(!this.company.multicity){return''}
775return activeCityName||(this.city&&this.city.name)||''},resAddress(){const address=JSON.parse(JSON.stringify(this.address));if(params&&params.type&&address){address.type=params.type}
776return address},enabledDeliveryTypes(){const types=this.company.enabledDeliveryTypes;const res=[];if(types.courier){res.push({id:'delivery',name:this.loc['cart/delivery']})
777if(this.useExpressDelivery){res.push({id:'express',name:'Express'})}}
778if(types.pickup){res.push({id:'pickup',name:this.loc['cart/pickup']})}
779if(types.inside){res.push({id:'inside',name:this.loc['cart/inside']})}
780if(types.drive){res.push({id:'drive',name:this.loc['cart/drive']})}
781if(types.banquet){res.push({id:'banquet',name:this.loc['cart/banquet']})}
782return res}},methods:{onClose(){opened=!1;this.$emit('close')},onAlert(message){app.alert(message,'danger')},onSubmit(address){this.submitting=!0;const payload={address,menuSwitchConfirmed:this.menuSwitchConfirmed,meta:{company:this.company.id}};app.fetch('/address/change',payload,(response)=>{if(response.error){if(response.error==='confirmMenuSwitch'){if(window.confirm(response.message)){this.menuSwitchConfirmed=!0;this.onSubmit(address)}else{this.submitting=!1}
783return}
784app.alert(response.message,'danger');this.submitting=!1;return}
785if(params&&params.forceReload){if(params.openDishAfterReload){sessionStorage.setItem('openDishAfterReload',JSON.stringify(params.openDishAfterReload))}
786if(response.cityUrl){window.location.assign(response.cityUrl)}else{window.location.reload()}}else if(response.reload||response.cityUrl){if(response.cityUrl){window.location.assign(response.cityUrl)}else{window.location.reload()}}else if(closeWithNoReload){if(response.fullWorktime){PubSub.publish('changeWorkTime',response.fullWorktime)}
787app.updateStore({address:response.address});PubSub.publish('recalcCart',{formData:this.cart?JSON.parse(JSON.stringify(this.cart)):null,cb:()=>{PubSub.publish('addressChanged');this.onClose()}})}else{window.location.reload()}})},navigate(params){const type=params.type;if(type==='geolocationError'){app.alert('Geolocation is disabled','danger')}else if(type==='close'){this.onClose()}else if(type==='cities'){PubSub.publish('showCities')}else if(type==='sendLocation'){navigator.geolocation.getCurrentPosition((location)=>{this.fetchedLocation=location},(error)=>{this.fetchedLocation={error:error.message}})}}},store:app.store,template:`
788                <div>
789                   <addr
790                        :loc="loc"
791                        :ui="ui"
792                        fetchUrl="/address/get2"
793                        :company="company"
794                        :mapSettings="map"
795                        :lang="lang"
796                        :address="resAddress"
797                        :city="city"
798                        :multicityName="multicityName"
799                        :refScreen="refScreen"
800                        :enabledDeliveryTypes="enabledDeliveryTypes"
801                        :addressDeliveryType="addressDeliveryType"
802                        :submitting="submitting"
803                        :fetchedLocation="fetchedLocation"
804                        :isWeb="true"
805                        :isDesktop="isDesktop"
806                        :disableClose="isDesktop || blocking"
807                        :blocking="blocking"
808                        :colorScheme="colorScheme"
809                        @alert="onAlert"
810                        @submit="onSubmit"
811                        @navigate="navigate"/>                
812                </div>
813
814
815            `};app.openViewer({desktop:{maxWidth:'1000px',disableAutogrow:!0,withClose:!1,},mobile:{withTick:!1,withClose:!1,swipeDisabled:!0,minHeight:'100vh',maxHeight:'100vh',backgroundColor:'transparent',},component:addressComponent,})};PubSub.subscribe('showUserAddress',function(e,params){showAddress(params)})});app.addModule(function(){var state=(app.store&&app.store.state)||{};var ui=state.ui||{};if(ui.showAddressRequiredScreen!=='on'){return}
816var company=state.company||{};if(company.qrMenu||state.isKiosk||state.mainModule==='aggregator'){return}
817function isCityConfirmed(){return(app.cookie&&app.cookie.has('cityConfirmed'))||(app.localStorage&&app.localStorage.migrate('isCorrectCity'))}
818function tryOpenAddress(){var address=state.address||{};if(!address.warning){return}
819if(company.multicity&&!isCityConfirmed()){return}
820PubSub.publish('showUserAddress',{forceReload:!0,blocking:!0})}
821tryOpenAddress();if(company.multicity){PubSub.subscribe('cityConfirmed',function(){tryOpenAddress()})}});

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.