1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1794],{11279:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[...search]",function(){return n(18858)}])},64960:function(e,t,n){"use strict";n.d(t,{R:function(){return d}});var r=n(85893),a=n(24693),s=n.n(a),o=n(85237),i=n(67294),l=n(45491),c=n(6084),u=n(46230);let d=e=>{let{yandexIdClientId:t,onAuth:n}=e,a=(0,i.useRef)(null),d=(0,u.Gq)("https://yastatic.net/s3/passport-sdk/autofill/v1/sdk-suggest-with-polyfills-latest.js"),{context:m}=(0,i.useContext)(c.k),f=m&&m.host?m.host:"",p={client_id:t,response_type:"token",redirect_uri:"https://".concat(f,"/account/auth/yandex/")},h=async()=>{if(a.current)try{let e=window.YaAuthSuggest,t=await e.init(p,"https://".concat(f));if(t.handler){let r=await t.handler();await n(r)}}catch(s){s instanceof l._7?setTimeout(()=>h(),0):o.Tb(s)}};return(0,i.useEffect)(()=>{"ready"===d&&h()},[d]),(0,r.jsx)("div",{className:s().yandexAuthWidgetContent,children:(0,r.jsx)("div",{id:"yandexAuthWidget",className:s().yandexAuthWidget,ref:a})})}},58087:function(e,t,n){"use strict";n.d(t,{O:function(){return y}});var r=n(85893),a=n(23502),s=n.n(a),o=n(9008),i=n.n(o),l=n(45363),c=n(78695),u=n.n(c),d=n(67294),m=n(2121),f=n(6084),p=n(63370);let h=e=>{let t,{breadcrumb:n}=e,{context:a}=(0,d.useContext)(f.k);return(null==a?void 0:a.isApp)&&(t=new m.$().add(m.$.title,n.title).add(m.$.screensBack,1)),(0,r.jsxs)("li",{className:u().root,children:[n.slug&&(0,r.jsx)(p.Z,{href:n.slug,variant:"black",underlined:!0,external:!0,appParams:t,children:(0,r.jsx)("span",{children:n.title})}),!n.slug&&(0,r.jsx)("span",{children:n.title})]},n.title)},x=e=>{let{breadcrumbs:t,host:n}=e,a={"@type":"BreadcrumbList",itemListElement:t.map((e,t)=>{let r={"@type":"ListItem",position:t+1,name:e.title};return e.slug&&(r.item="https://".concat(n||"kvartirka.com").concat(e.slug)),r})};return(0,r.jsx)(i(),{children:(0,r.jsx)(l.hg,{item:{"@context":"https://schema.org",...a}})})};function y(e){let{breadcrumbs:t}=e;return(0,r.jsxs)("nav",{children:[x({breadcrumbs:t}),(0,r.jsx)("ul",{className:s().root,children:t.map((e,t)=>(0,r.jsx)(h,{breadcrumb:e,index:t},e.title))})]})}},6369:function(e,t,n){"use strict";n.d(t,{S:function(){return c}});var r=n(85893),a=n(9553),s=n.n(a),o=n(84031),i=n(36090),l=n(10637);let c=e=>{let{calendarError:t,dates:n,onSkip:a}=e;return(0,r.jsxs)("div",{className:s().calenderFooterChildren,children:[(0,r.jsx)("div",{className:s().calenderSkipButton,children:(0,r.jsx)(i.z,{variant:"text",text:o.p2,onClick:a,block:!0})}),(0,r.jsx)(l.z,{dates:n,calendarError:t,withSkipBtn:!0})]})}},89841:function(e,t,n){"use strict";n.d(t,{I:function(){return l}});var r=n(85893),a=n(62185),s=n.n(a),o=n(94184),i=n.n(o);n(67294);let l=e=>(0,r.jsx)("div",{className:i()(s().root,e.className),dangerouslySetInnerHTML:{__html:e.html}})},22824:function(e,t,n){"use strict";n.d(t,{M:function(){return r}});let r={serverError:"ÐÑоизоÑла оÑибка ÑеÑвеÑа. ÐеÑезагÑÑзиÑе ÑÑÑаниÑÑ Ð¸ попÑобÑйÑе Ñнова.",defaultError:"ЧÑо-Ñо ÑломалоÑÑ, Ð¼Ñ Ð¸ÑпÑавим ÑÑо в ближайÑее вÑемÑ",defaultLoginTextError:"ЧÑо-Ñо ÑломалоÑÑ, попÑобÑйÑе позже или вÑбеÑиÑе дÑÑгой ÑпоÑоб вÑ
ода"}},45491:function(e,t,n){"use strict";n.d(t,{Oe:function(){return u},_7:function(){return i},e8:function(){return l},lx:function(){return c}});var r=n(85237),a=n(27361),s=n.n(a),o=n(11740);class i extends Error{constructor(e){super(e),this.name="AuthenticationError"}}class l extends o.t{constructor(...e){super(...e),this.fetchAccessToken=async e=>{try{let t=await this.execute("/api/v3/auth/tokens","GET",{customHeaders:{Cookie:e}}),n=s()(t,"headers.x-access-token",null);return n}catch(a){let r=s()(a,"response.status",0);if(401===r)throw new i("Unauthorized user");throw a}},this.generateAuthUrl=async e=>{let t=await this.execute("/api/v3/auth/generate_url","POST",{payload:{next:e},withCredentials:!0});return{url:s()(t,"data.url",{})}}}}class c extends o.t{async authWithVKId(e){try{let t=await this.execute("https://".concat(this.host,"/api/v3/auth/vk/register"),"POST",{payload:e,withCredentials:!0}),n=s()(t,"data",null);return n}catch(o){let a=s()(o,"response.data.verbose","");throw r.Tb(o),new i(a)}}async linkVkAccount(e){try{let t=await this.execute("/api/v3/profile/vk_id","POST",{payload:{...e},withCredentials:!0}),n=s()(t,"data",null);return n}catch(o){let a=s()(o,"response.data.verbose","");throw r.Tb(o),new i(a)}}async unlinkVkAccount(e){try{let t=await this.execute("/api/v3/profile/vk_id","DELETE",{payload:{vkKey:e},withCredentials:!0}),n=s()(t,"data",null)||{ok:!1};return n}catch(o){let a=s()(o,"response.data.verbose","");throw r.Tb(o),new i(a)}}async fetchVkAccount(){try{let e=await this.execute("/api/v3/profile/vk_id","GET",{withCredentials:!0}),t=s()(e,"data.vkUserAccounts",null);return t}catch(a){let n=s()(a,"response.data.verbose","");throw r.Tb(a),new i(n)}return[]}}class u extends o.t{async authWithYandexId(e){try{let t=await this.execute("/api/v3/auth/yandex/register","POST",{payload:e,withCredentials:!0}),n=s()(t,"data",null);return n}catch(o){let a=s()(o,"response.data.verbose","");throw r.Tb(o),new i(a)}}async linkYandexAccount(e){try{let t=await this.execute("/api/v3/profile/yandex_id","POST",{payload:{accessToken:e.access_token,expiresIn:e.expires_in,tokenType:e.token_type},withCredentials:!0}),n=s()(t,"data",null);return n}catch(o){let a=s()(o,"response.data.verbose","");throw r.Tb(o),new i(a)}}async unlinkYandexAccount(e){try{let t=await this.execute("/api/v3/profile/yandex_id","DELETE",{payload:{yandexKey:e},withCredentials:!0}),n=s()(t,"data",null)||{ok:!1};return n}catch(o){let a=s()(o,"response.data.verbose","");throw r.Tb(o),new i(a)}}async fetchYandexAccount(){try{let e=await this.execute("/api/v3/profile/yandex_id","GET",{withCredentials:!0}),t=s()(e,"data.yandexUserAccounts",null);return t}catch(a){let n=s()(a,"response.data.verbose","");throw r.Tb(a),new i(n)}}}},75190:function(e,t,n){"use strict";n.d(t,{By:function(){return s},jl:function(){return o}});var r=n(67294);let a={get:(e,t)=>{if("undefined"==typeof document)return t;try{let n=document.cookie.match(RegExp("(^| )"+e+"=([^;]+)"));if(!n)return t;let r=decodeURIComponent(n[2]);return JSON.parse(r)}catch(a){return t}},set:(e,t,n)=>{if("undefined"==typeof document)return!1;try{let r=JSON.stringify(t),a=encodeURIComponent(r),s="".concat(e,"=").concat(a);if(null==n?void 0:n.expires){let o=n.expires instanceof Date?n.expires.toUTCString():new Date(Date.now()+1e3*n.expires).toUTCString();s+="; expires=".concat(o)}return(null==n?void 0:n.path)&&(s+="; path=".concat(n.path)),(null==n?void 0:n.domain)&&(s+="; domain=".concat(n.domain)),(null==n?void 0:n.secure)&&(s+="; secure"),(null==n?void 0:n.sameSite)&&(s+="; samesite=".concat(n.sameSite)),document.cookie=s,!0}catch(i){return!1}},remove:(e,t)=>
1{if("undefined"==typeof document)return!1;try{let n="".concat(e,"=; expires=").concat(new Date(0).toUTCString());return(null==t?void 0:t.path)&&(n+="; path=".concat(t.path)),(null==t?void 0:t.domain)&&(n+="; domain=".concat(t.domain)),document.cookie=n,!0}catch(r){return!1}}};function s(e){let{key:t,defaultValue:n,overrideValue:s,preferOverride:o=!1,validate:i,debounceMs:l=300,cookieOptions:c={path:"/"},enabled:u=!0,persist:d=!1}=e,[m,f]=(0,r.useState)(n),p=(0,r.useRef)(null),h=(0,r.useRef)(!0),x=(0,r.useRef)(o&&void 0!==s),y=(0,r.useRef)(i),g=(0,r.useRef)(n),b=(0,r.useRef)(s),k=(0,r.useRef)(o),v=(0,r.useRef)(t),C=(0,r.useRef)(c),_=(0,r.useRef)(u),w=(0,r.useRef)(d);(0,r.useEffect)(()=>{y.current=i,g.current=n,b.current=s,k.current=o,v.current=t,C.current=c,_.current=u,w.current=d});let j=(0,r.useCallback)(()=>{p.current&&(clearTimeout(p.current),p.current=null)},[]);(0,r.useEffect)(()=>{j()},[d,u,j]),(0,r.useEffect)(()=>{h.current=!0,f((()=>{if(k.current&&void 0!==b.current)return b.current;let e=a.get(v.current,g.current);if(y.current&&!y.current(e))return void 0!==b.current?b.current:g.current;if("undefined"!=typeof document){let t=document.cookie.split(";").some(e=>e.trim().startsWith("".concat(v.current,"=")));if(!t&&void 0!==b.current)return b.current}return e})())},[]);let S=(0,r.useCallback)(e=>{_.current&&!x.current&&f(t=>{let n=e instanceof Function?e(t):e;return y.current&&!y.current(n)?t:w.current?(j(),p.current=setTimeout(()=>{h.current&&w.current&&a.set(v.current,n,C.current)},l),n):(j(),n)})},[l,j]);return(0,r.useEffect)(()=>()=>{j(),h.current=!1},[j]),[m,S]}let o=e=>e?e.split(";").map(e=>e.split("=")).reduce((e,t)=>(e[decodeURIComponent(t[0].trim())]=decodeURIComponent(t[1].trim()),e),{}):null},20429:function(e,t,n){"use strict";n.d(t,{J:function(){return l}});var r=n(27361),a=n.n(r),s=n(67294),o=n(22824),i=n(45491);function l(e,t,n){let r=(0,s.useCallback)(async r=>{let s=null,l=new i.Oe(e,t);try{s=await l.authWithYandexId({accessToken:r.access_token,expiresIn:Number(r.expires_in),tokenType:r.token_type})}catch(u){if(u instanceof i._7){let c=a()(u,"message",o.M.defaultError);throw new i._7(c)}throw new i._7(o.M.defaultLoginTextError)}s&&n()},[n]);return r}},63734:function(e,t,n){"use strict";n.d(t,{q:function(){return a}});let r=null,a=e=>window.ymaps?Promise.resolve(window.ymaps):r||(r=new Promise((t,n)=>{let r=document.createElement("script");r.src="https://api-maps.yandex.ru/2.1/?apikey=".concat(e,"&lang=ru_RU"),r.async=!0,r.onload=async()=>{await window.ymaps.ready(()=>t(window.ymaps))},r.onerror=n,document.head.appendChild(r)}))},18586:function(e,t,n){"use strict";n.d(t,{U:function(){return o}});var r=n(67294),a=n(56718),s=n(6084);let o=e=>{let{context:t}=(0,r.useContext)(s.k);if(t){if(e){let n=t.currencies.entries.filter(t=>t.id===e);if(n)return n[0]}return t.currencies.current}return a.a7}},18858:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return tV},default:function(){return tJ}});var r,a,s,o,i=n(85893);n(21082);var l=n(27361),c=n.n(l),u=n(11163),d=n(67294),m=n(74044),f=n(43914);let p=(0,d.createContext)({selectedFlatCalendar:{opened:!1,onOpen:m.d,onClose:m.d},unavailableFlatModal:{opened:!1,onOpen:m.d,onClose:m.d}}),h=e=>{let{children:t}=e,[n,r]=(0,d.useState)(!1),[a,s]=(0,d.useState)(!1),{setLocked:o}=(0,f.N)(),l=(0,d.useCallback)(()=>{r(!0),o(!0)},[]),c=(0,d.useCallback)(()=>{r(!1),o(!1)},[n]),u=(0,d.useCallback)(()=>{s(!0),o(!0)},[a]),m=(0,d.useCallback)(()=>{s(!1),o(!1)},[a]);return(0,i.jsx)(p.Provider,{value:{selectedFlatCalendar:{opened:n,onOpen:l,onClose:c},unavailableFlatModal:{opened:a,onOpen:u,onClose:m}},children:t})},x={next:{nearest:0,limit:0,offset:0},total:0,filters:{},breadcrumbs:[]},y=d.createContext({meta:x,defaultMeta:x,flats:[],totalFlats:0,setFlats:m.d,resetFlats:m.d,setMeta:m.d});(r=s||(s={})).SET_META="SET_META",r.SET_FLATS="SET_FLATS",r.RESET_FLATS="RESET_FLATS";let g=(e,t)=>{switch(t.type){case s.SET_META:return{...e,meta:t.payload,totalFlats:t.payload.total+t.payload.next.nearest};case s.SET_FLATS:return{...e,flats:e.flats.concat(...t.payload)};case s.RESET_FLATS:return{...e,flats:[]};default:return e}},b=e=>{let[t,n]=d.useReducer(g,e.initialState),r={...t,setFlats:d.useCallback(e=>n({type:s.SET_FLATS,payload:e}),[]),resetFlats:d.useCallback(()=>n({type:s.RESET_FLATS}),[]),setMeta:d.useCallback(e=>n({type:s.SET_META,payload:e}),[])};return(0,i.jsx)(y.Provider,{value:r,children:e.children})},k=()=>d.useContext(y),v=e=>({meta:e.meta,defaultMeta:e.meta,totalFlats:e.meta.total+e.meta.next.nearest,flats:e.flats,setFlats:m.d,resetFlats:m.d,setMeta:m.d});var C=n(20429),_=n(94301),w=n(64960),j=n(2858),S=n.n(j),L=n(9008),E=n.n(L),F=n(45363),T=n(85176),A=n(29880),R=n(39061),N=n(91850),M=n(96033),I=n(30325),P=n(53543),D=n(27884),H=n(85237),B=n(78945);let{Axios:O,AxiosError:z,CanceledError:U,isCancel:K,CancelToken:W,VERSION:q,all:G,Cancel:Z,isAxiosError:Y,spread:V,toFormData:J,AxiosHeaders:Q,HttpStatusCode:X,formToJSON:$,mergeConfig:ee}=B.Z;var et=n(18446),en=n.n(et),er=n(56718),ea=n(57557),es=n.n(ea),eo=n(11740);class ei extends eo.t{async fetch(){let e=await this.execute("/api/v2/cities");return this.processResponse(e)}async fetchBySlug(e){let t=await this.execute("/api/v2/cities","GET",{params:{slug:e}});return this.processResponse(t)}async fetchByCoords(e,t){let n=await this.execute("/api/v2/cities","GET",{params:{lat:e,lng:t}});return this.processResponse(n)}processResponse(e){return{cities:c()(e,"data.cities",{})}}}class el extends eo.t{async fetchFlatsByPath(e,t,n,r,a,s,o){let i=n.split("/")[2];if(i){let l=await this.citiesService.fetchBySlug(i);this.city=l.cities[0]}this.cancelRequests();let c=await this.execute("/api/v3/context/search","GET",{params:{currency:this.currentCurrencyId,...es()(t,["zoom","pointName"]),path:n,limit:r,offset:a,nearest:s,newCalendar:o},customHeaders:{Accept:e,Cookie:this.cookies,"User-Agent":this.ua},controller:this.abortController});return this.processResponse(c,this.city)}async fetchFlatsByBox(e,t,n,r,a,s,o){let i=await this.citiesService.fetchByCoords(t.point.lat,t.point.lng);this.city=i.cities[0],this.cancelRequests();let l=await this.execute("/api/v3/context/search","GET",{params:{currency:this.currentCurrencyId,...es()(n,["lat","lng","zoom","pointName"]),minLat:t.box[0][0],minLng:t.box[0][1],maxLat:t.box[1][0],maxLng:t.box[1][1],limit:r,offset:a,nearest:s,newCalendar:o,boundaryKey:t.boundaryKey},customHeaders:{Accept:e,Cookie:this.cookies,"User-Agent":this.ua},controller:this.abortController});return this.processResponse(l,this.city)}async fetchFlatsByCenter(e,t,n,r,a,s,o,i){let l=await this.citiesService.fetchByCoords(t.lat,t.lng);this.city=l.cities[0],this.cancelRequests();let c=await this.execute("/api/v3/context/search","GET",{params:{currency:this.currentCurrencyId,...es()(n,["minLat","minLng","maxLat","maxLng","zoom","pointName"]),lat:t.lat,lng:t.lng,limit:r,offset:a,nearest:s,newCalendar:o,boundaryKey:i},customHeaders:{Accept:e,Cookie:this.cookies,"User-Agent":this.ua},controller:this.abortController});return this.processResponse(c,this.city)}cancelRequests(){var e;null===(e=this.abortController)||void 0===e||e.abort(),this.abortController=new AbortController}processResponse(e,t){return{meta:c()(e,"data.meta",{}),flats:c()(e,"data.flats",[]),city:t||null}}constructor(e,t,n=null,r=null,a=null,s=null){super(e,n,r),this.citiesService=new ei(this.host,this.correlationID),this.city=null,this.cookies=a,this.abortController=null,this.ua=s,this.currentCurrencyId=t}}(a=o||(o={})).flatCalendar="ÐоказÑваÑÑ Ð¾ÐºÐ½Ð¾ календаÑÑ Ð¿Ñи клике на обÑÑвление",a.newCalendar="ÐоказÑваÑÑ Ð½Ð¾Ð²ÑÑ Ð²ÐµÑÑÐ¸Ñ ÐºÐ°Ð»ÐµÐ½Ð´Ð°ÑÑ",a.yandexWidget="ÐоказÑваÑÑ Ð²Ð¸Ð´Ð¶ÐµÑ Ð¼Ð³Ð½Ð¾Ð²ÐµÐ½Ð½Ð¾Ð³Ð¾ вÑ
ода ЯндекÑ";let ec=()=>({flatCalendar:void 0,newCalendar:void 0,yandexWidget:void 0}),eu=e=>{let{query:t,setFiltersLoading:n}=e,{meta:r,setMeta:a,flats:s,setFlats:o,resetFlats:i}=k(),{newCalendar:l}=ec(),[c,u]=d.useState(!1),[m,f]=d.useState(!1),[p,h]=d.useState(""),[x,y]=d.use
1State(0),[g,b]=d.useState(!1),[v,C]=d.useState(e.query),[_,w]=d.useState(0),j=d.useRef(!1),S=d.useRef(new el(e.mainHost,e.currentCurrencyId,null,null,e.cookies)),L=d.useCallback(()=>{let e=Math.ceil((r.next.offset-r.next.limit)/r.next.limit)+1;return{currentPage:e,offset:30*e}},[r]),E=d.useCallback(async function(){let r,s=!(arguments.length>0)||void 0===arguments[0]||arguments[0],c=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{offset:d}=L();if(w(d),d===_)return;let m=s?d:0,p=(0,M._9)(t),x=(0,M.oU)(t);try{b(!1),h(""),u(!0),r=p&&!x?await S.current.fetchFlatsByCenter(e.accept,p,t,30,m,void 0,l,e.boundaryKey):x&&p?await S.current.fetchFlatsByBox(e.accept,{point:p,box:x,boundaryKey:e.boundaryKey},t,30,m,void 0,l):await S.current.fetchFlatsByPath(e.accept,t,e.path,30,m,void 0,l),a(r.meta),c&&i(),o(r.flats),u(!1),f(!1),y(e=>e+1),n(er.xC)}catch(g){g instanceof U||(u(!1),h(String(g)),H.Tb(g))}},[L,S,s,r,t,_]);d.useEffect(()=>{j.current&&!en()(t,v)?(f(!0),E(!1,!0).then(()=>{window.scrollTo(0,0),f(!1)}),y(0),w(0),C(t)):j.current=!0},[t,v]),d.useEffect(()=>{0!==x&&x%3==0?b(!0):b(!1)},[x]);let F=d.useCallback(()=>{let{currentPage:e}=L(),t=Math.ceil(r.total/r.next.limit);return e===t},[L,r]);return d.useEffect(()=>{let t=new IntersectionObserver(e=>{let[t]=e;t&&t.isIntersecting&&s.length>0&&!F()&&!c&&!g&&E().then()},{rootMargin:"10px"});return e.bottomOfListRef.current&&t.observe(e.bottomOfListRef.current),()=>{e.bottomOfListRef.current&&t.unobserve(e.bottomOfListRef.current)}},[E,s,x,r,g]),{showSkeleton:m,isLoading:c,errorValue:p,showLoadButton:g,meta:r,fetchFlats:E}};var ed=n(22824),em=n(31786);let ef=e=>{let{filters:t,setFilters:n,setLoading:r}=(0,d.useContext)(P.o),{unavailableFlatModal:a}=(0,d.useContext)(p),[s,o]=(0,d.useState)(!1),[i,l]=(0,d.useState)(null),[u,m]=(0,d.useState)(null),[f,h]=(0,d.useState)(null),[x,y]=(0,d.useState)(""),g=(0,d.useCallback)(e=>{l(e)},[]),b=(0,d.useCallback)(async(t,n)=>{if(!i||!t.arrival||!t.departure)return;let r=new em.N(e);y("");try{let a=await r.check(i.id,new Date(t.arrival),new Date(t.departure));a&&h(null)}catch(l){let s=c()(l,"response.status"),o=c()(l,"response.data.error",ed.M.defaultError);422===s||404===s?h(i):H.Tb(l),y(o)}finally{setTimeout(()=>{n(!1)},300)}},[i]),k=(0,d.useCallback)(e=>{f?setTimeout(()=>{a.onOpen(),r(e=>({...e,calendar:!1}))},0):(n({...t,dates:e}),window.open(null==i?void 0:i.url,"_blank"))},[i,f]);return{flatsWithDatesError:x,isRefusedSelectDates:s,selectedDates:u,selectedFlat:i,unavailableSelectedFlat:f,checkFlat:b,handleFlatClick:g,handleFlatPickWithDates:k,setSelectedDates:m,setIsRefusedSelectDates:o,setUnavailableSelectedFlat:h}},ep=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=es()(e,["search","utm_url","referer"]),[n,r]=(0,d.useState)(t),{asPath:a}=(0,u.useRouter)();return(0,d.useEffect)(()=>{let e=a.split("?")[1];e?r(()=>({...(0,M.ub)(e)})):r(t)},[a]),{query:n}};var eh=n(58087),ex=n(89841),ey=n(41393),eg=n.n(ey),eb=n(86225),ek=n.n(eb),ev=n(63370),eC=n(41571);let e_=e=>{let{item:t,hidden:n}=e,r=n?ek().hidden:ek().item;return(0,i.jsx)("li",{className:r,children:(0,i.jsx)(ev.Z,{href:t.url||"",variant:"black",underlined:!0,external:!0,children:t.text||""})})},ew=e=>{let{items:t,name:n}=e,r=t.length>=30,[a,s]=(0,d.useState)(r),o=(0,d.useCallback)(e=>{e.preventDefault(),s(!1)},[]);return(0,i.jsxs)("div",{className:ek().root,children:[(0,i.jsx)(eC.x,{As:"h3",size:16,children:n}),(0,i.jsxs)("ul",{className:ek().list,children:[t.map((e,t)=>(0,i.jsx)(e_,{item:e,hidden:r&&t>=20&&a},e.url)),a&&(0,i.jsx)("li",{className:ek().item,onClick:o,children:(0,i.jsx)("span",{className:ek().more,children:"ÐоказаÑÑ ÐµÑе..."})})]})]})},ej=e=>{let{nearestCities:t}=e;return t&&0!==t.length?(0,i.jsx)("div",{className:eg().root,children:(0,i.jsx)(ew,{name:T.PL,items:t.map(e=>{let{name:t,url:n}=e;return{text:t,url:n}})})}):null};var eS=n(42661),eL=n(81929),eE=n.n(eL),eF=n(94184),eT=n.n(eF),eA=n(68987),eR=n(58970);let eN=(e,t)=>{let[n,r]=(0,d.useState)([]),[a,s]=(0,d.useState)([]),[o,i]=(0,d.useState)([]),[l,u]=(0,d.useState)([]),m=(0,d.useRef)(null),f=()=>r=>{let s=c()(t,"id",0),i={addIds:n.filter(e=>!a.includes(e)),addPositions:o.filter(e=>!l.includes(e)),cityId:s,filtersEnabled:e};
1s&&(i.addIds.length||i.addPositions.length)&&(r.send(i),h(i.addIds,i.addPositions))},p=(0,d.useRef)(f());(0,d.useEffect)(()=>{p.current=f()},[n,a,o,l]);let h=(0,d.useCallback)((e,t)=>{s(t=>t.concat(e)),u(e=>e.concat(t)),r([]),i([])},[]),x=(0,d.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;m.current=setInterval(()=>p.current(e),t)},[p,m]),y=(0,d.useCallback)(e=>{p.current(e),r([]),s([]),i([]),u([]),m.current&&clearInterval(m.current)},[p,m]),g=(0,d.useCallback)(e=>{p.current(e)},[p]),b=(0,d.useCallback)((e,t)=>{e&&(r(e=>[...e,t.id]),i(e=>[...e,t.id]))},[]);return{handleVisibilityChange:b,startVisibilityWatcher:x,stopVisibilityWatcher:y,immediateVisibilityUpdate:g}};var eM=n(97946),eI=n(84031),eP=n(6369),eD=n(87103);let eH=e=>{let{mainHost:t,calendarHook:n}=e,{filters:r,setFilters:a,setLoading:s}=(0,d.useContext)(P.o),{selectedFlatCalendar:o}=(0,d.useContext)(p),[l,c]=(0,d.useState)(r.dates),[u,m]=(0,d.useState)(!1),[f,h]=(0,d.useState)(!0),[x,y]=(0,d.useState)(null),g=(0,d.useCallback)(()=>{n.setSelectedDates(l),n.handleFlatPickWithDates(l)},[l,n.setSelectedDates,n.handleFlatPickWithDates]),b=(0,d.useCallback)(async e=>{await n.checkFlat(e,m)},[n.checkFlat]),k=()=>{n.setSelectedDates(null),n.setIsRefusedSelectDates(!0),o.onClose(),n.selectedFlat&&window.open(n.selectedFlat.url,"_blank")},v=(0,i.jsx)(eP.S,{calendarError:x,dates:l,onSkip:k});return(0,d.useEffect)(()=>{l.duration?(h(!1),m(!0)):(h(!0),m(!1))},[l.duration]),(0,i.jsx)(eD.D,{btnText:eI.PQ,calendar:o,calendarError:x,dates:l,mainHost:t,filters:r,footerChildren:v,setCalendarError:y,setDates:c,withSkipBtn:!0,setFilters:a,setLoading:s,onApply:g,onChange:b,isBtnDisabled:f,isBtnLoading:u})};var eB=n(10671),eO=n(32825),ez=n.n(eO),eU=n(36090);let eK=e=>{let{onClick:t}=e;return(0,i.jsx)("div",{className:ez().root,children:(0,i.jsx)(eU.z,{className:ez().button,text:"ÐоказаÑÑ ÐµÑе...",onClick:t})})};var eW=n(38059),eq=n.n(eW),eG=n(61971);let eZ=e=>{let{calendarHook:t}=e,{filters:n,setFilters:r,setLoading:a}=(0,d.useContext)(P.o),{unavailableFlatModal:s}=(0,d.useContext)(p),o=()=>{t.selectedDates&&(r({...n,dates:t.selectedDates}),a(e=>({...e,calendar:!0}))),s.onClose()},l=()=>{t.selectedFlat&&window.open(t.selectedFlat.url,"_blank"),o()},c=(0,i.jsx)("div",{className:eq().footerChildren,children:(0,i.jsx)(eU.z,{className:eq().footerGoAnywayBtn,text:T.J8,variant:"smoothBlue",size:"lg",onClick:l})});return(0,i.jsx)(eG.u,{title:T.V4,opened:s.opened,onClose:s.onClose,onApply:o,hasFooter:!0,footerChildren:c,footerClassName:eq().modalFooter,btnText:T.$e,children:(0,i.jsx)("div",{className:eq().modalChildren,children:(0,i.jsx)(eC.x,{As:"p",size:16,children:t.flatsWithDatesError})})})},eY=e=>{let{filters:t,adultChecked:n}=(0,d.useContext)(P.o),{calendar:r,guestsModal:a,guestsDropdown:s}=(0,d.useContext)(eR.u),{selectedFlatCalendar:o}=(0,d.useContext)(p),{isSmallDesktop:l,isDesktop:c}=(0,eM.k)(),{filtersApplied:u,hasChekedCalendar:m,hasChekedGuests:f}=(0,D.Y)(t,e.currency,n),{meta:h,flats:x}=k(),y=(0,d.useRef)(new eA.w(e.mainHost)),{handleVisibilityChange:g,startVisibilityWatcher:b,stopVisibilityWatcher:v}=eN(u,e.city||h.filters.city),C=t=>{if(e.calendarHook.isRefusedSelectDates){window.open(t.url,"_blank");return}o.onOpen(),e.calendarHook.handleFlatClick(t)};return(0,d.useEffect)(()=>(b(y.current),()=>{v(y.current)}),[t]),(0,i.jsxs)("div",{className:eE().root,children:[(0,i.jsx)(eB.O,{className:eT()({[eE().withPreview]:e.infinityListHook.showLoadButton}),flatList:x,mainHost:e.mainHost,isMobileDevice:e.isMobileDevice,city:e.city||h.filters.city,starredIdList:e.starredIdList,dateDuration:t.dates.duration,seoCards:e.seoCards,withPreview:e.infinityListHook.showLoadButton,filtersApplied:u,showCalendarFilter:!m,onCalendarFilterClick:r.onOpen,onFlatClick:C,showGuestsFilter:!f,onGuestsFilterClick:c||l?s.onOpen:a.onOpen,onVisibilityChange:g,showSkeleton:e.infinityListHook.showSkeleton}),(0,i.jsx)(eV,{errorValue:e.infinityListHook.errorValue,isLoading:e.infinityListHook.isLoading,flatsLength:x.length,filtersApplied:u,city:e.city||h.filters.city,noticeTop:e.noticeTop}),e.infinityListHook.showLoadButton&&!e.infinityListHook.showSkeleton&&(0,i.jsx)(eK,{onClick:e.infinityListHook.fetchFlats}),(0,i.jsx)(eH,{mainHost:e.mainHost,calendarHook:e.calendarHook}),(0,i.jsx)(eZ,{calendarHook:e.calendarHook})]})};function eV(e){return e.errorValue||e.isLoading||0!==e.flatsLength||""!==e.n
1oticeTop?e.errorValue&&!e.isLoading?(0,i.jsx)(eC.x,{size:16,color:eC.g.error,children:e.errorValue}):null:e.filtersApplied?(0,i.jsx)(eC.x,{size:16,children:"РаÑÑиÑÑÑе облаÑÑÑ ÐºÐ°ÑÑÑ Ð¸Ð»Ð¸ измениÑе паÑамеÑÑÑ Ð¿Ð¾Ð¸Ñка."}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(eC.x,{size:16,As:"p",children:["СейÑÐ°Ñ Ð¾Ð±ÑекÑов ",e.city&&e.city.namePrep?"в ".concat(e.city.namePrep):""," неÑ."]}),(0,i.jsxs)(eC.x,{size:16,As:"p",children:[(0,i.jsx)(ev.Z,{href:"/account/registration/",external:!0,children:"ÐобавÑÑе ÑÐ²Ð¾Ñ Ð¾Ð±ÑÑвление"})," ","о ÑдаÑе жилÑÑ."]})]})}var eJ=n(36664),eQ=n.n(eJ);let eX=e=>{let{landings:t,totalFlats:n}=e,r=[];return 0===(r=(0,d.useMemo)(()=>{let e=t.reduce((e,t)=>{let n=t.group||T.gS;return e.hasOwnProperty(n)||(e[n]={name:n,priority:t.priority||-1,items:[]}),e[n].items.push({text:t.text,url:t.url}),e},{}),n=Object.values(e).sort((e,t)=>e.priority-t.priority);return n},[n])).length?null:(0,i.jsx)("div",{className:eQ().root,children:r.map(e=>(0,i.jsx)(ew,{items:e.items,name:e.name},e.name))})};var e$=n(40991),e0=n.n(e$);let e1=e=>{let{path:t,meta:n,limit:r,hidden:a}=e,s=Math.ceil((n.next.offset-n.next.limit)/n.next.limit)+1,o=s-r,l=Math.ceil(n.total/n.next.limit);if(n.isLanding)return null;let c=Array(2*r).fill(0).map((e,t)=>o+t).filter(e=>e>0&&e<=l),u=[];for(let d of(o>1&&u.push((0,i.jsx)("a",{rel:"prev",href:"".concat(t,"page").concat(s-r-1,"/"),children:"< "},0)),c))if(d===s)u.push((0,i.jsxs)("span",{children:[d," "]},d));else{let m=function(e,t){let n=null;return e-1===t?n="next":e+1===t&&(n="prev"),n}(d,s);m?u.push((0,i.jsxs)("a",{rel:m,href:"".concat(t,"page").concat(d,"/"),children:[d," "]},d)):u.push((0,i.jsxs)("a",{href:"".concat(t,"page").concat(d,"/"),children:[d," "]},d))}return s+r<l&&u.push((0,i.jsx)("a",{href:"".concat(t,"page").concat(s+r,"/"),children:">"},l)),(0,i.jsxs)("div",{className:eT()(e0().root,{[e0().hidden]:a||!n||!n.next||!n.next.limit||n.isLanding}),children:[(0,i.jsxs)(E(),{children:[s>1?(0,i.jsx)("link",{rel:"prev",href:"".concat(t,"page").concat(s-1,"/")}):null,s<l?(0,i.jsx)("link",{rel:"next",href:"".concat(t,"page").concat(s+1,"/")}):null]}),(0,i.jsx)("div",{children:u})]})},e8=e=>{if(!e.flats.length)return null;let t=e.seo.minPrice&&e.seo.maxPrice&&e.seo.minPrice<=A.XQ&&e.seo.maxPrice>A.XQ?A.XQ:e.seo.minPrice,n=null;e.flats.length>10&&(n=e.flats.slice(0,4).filter(e=>{var t;return e.photos&&e.photos.length>0&&(null===(t=e.photos[0].thumbs)||void 0===t?void 0:t.list)}).map(e=>({"@type":"ImageObject",contentUrl:e.photos[0].thumbs.list,thumbnailUrl:e.photos[0].thumbs.list})));let r=e.flats.reduce((e,t)=>Math.min(e,t.prices.min),1/0);r===1/0&&(r=0);let a=e.flats.reduce((e,t)=>Math.max(e,t.prices.max||t.prices.total),1/0);a===1/0&&(a=0);let s={"@type":"AggregateOffer",priceCurrency:e.currency.codename,lowPrice:r||null,highPrice:a||null,...e.meta.total&&{offerCount:e.meta.total.toString()},...n&&{image:n}};e.seo.maxPrice&&e.seo.minPrice&&(s={"@type":"AggregateOffer",lowPrice:t.toString(),highPrice:e.seo.maxPrice.toString(),priceCurrency:e.currency.codename,...e.meta.total&&{offerCount:e.meta.total.toString()},...n&&{image:n}});let o={};e.seo.reviewsCount&&e.seo.reviewsAverage&&e.seo.reviewsAverage>A.ZA&&(o={aggregateRating:{"@type":"AggregateRating",ratingValue:e.seo.reviewsAverage.toFixed(1),reviewCount:e.seo.reviewsCount.toString(),bestRating:A.wU.toString()}});let l={"@type":"Product",name:e.city?e.city.name:e.seo.headline,url:e.seo.canonical,description:e.seo.description,offers:s,...e.city&&{hasMap:"https://yandex.ru/maps/?ll=".concat(e.city.center.lng,",").concat(e.city.center.lat,"&z=12"),address:{"@type":"PostalAddress",streetAddress:e.city.name,addressLocality:e.city.name,...e.city.region&&{addressRegion:e.city.region.name},addressCountry:e.city.country.name},geo:{"@type":"GeoCoordinates",latitude:e.city.center.lat.toString(),longitude:e.city.center.lng.toString()}},...o};return(0,i.jsx)(E(),{children:(0,i.jsx)(F.hg,{item:{"@context":"https://schema.org",...l}})})},e3=e=>{let[t,n]=(0,d.useState)(e.seo.headline),[r,a]=(0,d.useState)(e.seo.noticeTop),[s]=(0,d.useState)(e.seo.noticeTop),{adultChecked:o,set
1Loading:l}=(0,d.useContext)(P.o),c=k(),{query:u}=ep(e.query),m=(0,d.useRef)(null),f=(0,M._0)(u,e.currency),p=(0,D.Y)(f,e.currency,o),h=eu({bottomOfListRef:m,cookies:e.cookies,path:e.path,query:u,accept:e.accept,mainHost:e.mainHost,currentCurrencyId:e.currency.id,boundaryKey:e.meta.filters.boundaryKey,setFiltersLoading:l}),x=ef(e.mainHost),y=p.filtersApplied?r:s;(0,d.useEffect)(()=>{p.filtersApplied?(n("".concat(new I.w(R.Kd.ONE,R.Kd.FEW,R.Kd.MANY).choosePlural(c.totalFlats)," ").concat(new I.w(R.Mp.ONE,R.Mp.FEW,R.Mp.MANY).getPlural(c.totalFlats,"\xa0",!0))),a((0,N.D$)(f,p,e.currency))):n(e.seo.headline)},[p,f,c.meta]),(0,d.useEffect)(()=>{0===c.totalFlats&&p.filtersApplied&&n(T.iM)},[p,c.totalFlats,c.meta]);let g=e8({seo:e.seo,currency:e.currency,city:e.city,meta:e.meta,flats:c.flats});return(0,i.jsxs)("div",{className:S().root,children:[g,(0,i.jsxs)("div",{className:S().content,children:[(0,i.jsx)(eC.x,{As:"h1",size:20,desktopSize:36,children:h.isLoading?T.F5:t}),(0,i.jsx)("div",{className:S().noticeTop,children:y}),(0,i.jsx)(eY,{mainHost:e.mainHost,accept:e.accept,path:e.path||"",seoCards:e.seo.seoCards.cards,noticeTop:s,starredIdList:e.bookmarksList?e.bookmarksList:[],defaultQuery:e.query,currency:e.currency,city:e.city,isMobileDevice:e.isMobileDevice,cookies:e.cookies,infinityListHook:h,calendarHook:x}),h.isLoading&&!h.showSkeleton&&(0,i.jsx)(eS.$,{size:32}),(0,i.jsx)("div",{ref:m}),(0,i.jsx)(e1,{path:e.seo.canonical,meta:c.meta,limit:5,hidden:!0})]}),(0,i.jsxs)("div",{children:[e.meta.breadcrumbs&&e.meta.breadcrumbs.length>1&&(0,i.jsx)(eh.O,{breadcrumbs:(()=>{let t=e.meta.breadcrumbs.map((t,n)=>n+1===e.meta.breadcrumbs.length?{title:t.text}:{title:t.text,slug:t.url});return t})()}),e.meta.landings&&(0,i.jsx)(eX,{landings:e.meta.landings,totalFlats:c.totalFlats}),e.meta.nearestCities&&(0,i.jsx)(ej,{nearestCities:e.meta.nearestCities}),!p.filtersApplied&&e.seo.noticeDown&&(0,i.jsx)(ex.I,{className:S().noticeDown,html:e.seo.noticeDown})]})]})};var e4=n(87948),e5=n.n(e4);let e2=d.createContext({bookmarksList:[],add:m.d,remove:m.d}),e9=e=>{let[t,n]=d.useState(e.bookmarksList),r=d.useCallback(e=>{n(t=>[...t,e])},[t]),a=d.useCallback(e=>{let r=t.filter(t=>t!==e);n(r)},[t]);return(0,i.jsx)(e2.Provider,{value:{bookmarksList:t,add:r,remove:a},children:e.children})};var e6=n(52814),e7=n.n(e6),te=n(42298),tt=n(75594),tn=n(75190);class tr extends eo.t{async fetchDots(e,t){let n=await this.execute("/api/v3/context/location","GET",{params:{currency:this.getCurrencyId(this.cookies),...es()(t,["zoom","pointName"]),path:e,limit:90}});return this.processResponse(n)}async fetchDotsByBox(e,t,n,r,a){let s=await this.execute("/api/v3/context/location","GET",{params:{currency:this.getCurrencyId(this.cookies),...es()(n,["lat","lng","zoom","pointName"]),minLat:t[0][0],minLng:t[0][1],maxLat:t[1][0],maxLng:t[1][1],limit:200,newCalendar:r,boundaryKey:a}});return this.processResponse(s)}async fetchDotsByCenter(e,t,n){let r=await this.execute("/api/v3/context/location","GET",{params:{currency:this.getCurrencyId(this.cookies),...es()(t,["minLat","minLng","maxLat","maxLng","zoom","pointName"]),lat:e.lat,lng:e.lng,limit:90,boundaryKey:n}});return this.processResponse(r)}getCurrencyId(e){let t=(0,tn.jl)(e);return t&&t.currency?Number(t.currency):tt.A}processResponse(e){return{meta:c()(e,"data.meta",{}),flats:c()(e,"data.flats",[])}}constructor(e,t=null,n=null,r=null){super(e,t,n),this.cookies=r}}var ta=n(6084),ts=n(11689),to=n(994),ti=n(63734),tl=n(7739),tc=n.n(tl),tu=n(49659),td=n(84454);let tm="flat-placemark",tf="".concat(tm,"--hover"),tp="".concat(tm,"--active"),th="".concat(tm,"-starred"),tx={clusterize:!0,clusterOpenBalloonOnClick:!1,clusterDisableClickZoom:!0,minClusterSize:3,gridSize:128},ty=e=>{let{setShowFilters:t}=(0,d.useContext)(ts.OT),[n,r]=(0,d.useState)(null),a=(0,d.useRef)(null),s=(0,d.useRef)(null),o=(0,d.useRef)(null),i=(0,d.useRef)(null),[l,c]=(0,d.useState)(null),[u,m]=(0,d.useState)(e.state.center),[f,p]=(0,d.useState)(null),h=e.state.zoom&&e.state.zoom>16&&e.flats.length<25,x=(0,d.useCallback)(()=>{c(null)},[]),y=(0,d.useCallback)(()=>{i.current&&i.current.classList.remove(tp)},[i]),g=(0,d.useCallback)(e=>!!n&&!!a.current&&n.util.bounds.containsPoint(a.current.getBounds(),e),[n,a.current]),b=(0,d.useCallback)(()=>{let t=document.querySelectorAll("div.".concat(tm));for(let n=0;n<t.length;n+=1){var r,a;let s=t[n].id||"";s=s.replace("flat-","");let o=(r=e.bookmarksList,a=Number(s),r.includes(a));o?t[n].classList.add(th):t[n].classList.remove(th)}},[e.bookmarksList]),k=(0,d.useCallback)(()=>{let t=null;return e.bbox&&(t=[[e.bbox.pointMin.lat,e.bbox.pointMin.lng],[e.bbox.pointMax.lat,e.bbox.pointMax.lng]]),!e.bbox&&a.current&&(t=a.current.getBounds()),t}
1,[a.current]),v=(0,d.useCallback)(()=>{if(s.current&&a.current){let e=s.current.objects;return e.getAll().filter(e=>!!e.geometry&&g(e.geometry.coordinates))}return[]},[g]),C=(0,d.useCallback)(t=>{s.current&&n&&tC(v(),e.currency.entity,e.bookmarksList,e.duration,s.current,n,t)},[tC,v,n]),_=()=>{a.current&&a.current.events.add("boundschange",e=>{if(s.current){let t=s.current.objects,n=t.getAll().flat();n.length>50&&n.forEach((e,t)=>{t<50&&s.current&&s.current.objects.remove(n[t])})}if(o.current){let r=o.current.objects,a=r.getAll().flat();a.length>200&&a.forEach((e,t)=>{t<200&&o.current&&o.current.objects.remove(a[t])})}m(e.get("newCenter")),p(e.get("newBounds"))})},w=t=>{let n=t.get("newZoom"),r=v();a.current&&s.current&&r.length<25&&n>16?(s.current.options.set({clusterize:!1}),C(e.showApproximatePrice)):(s.current.options.set(tx),b())};(0,d.useEffect)(()=>{n&&e.mapRef.current&&a.current&&a.current.events.add("boundschange",w)},[e.showApproximatePrice,n]);let j=(0,d.useCallback)(()=>{if(n&&e.mapRef.current){a.current=ne
1w n.Map(e.mapRef.current,e.state,e.options),s.current=new n.ObjectManager(h?{}:tx),o.current=new n.ObjectManager({}),a.current.geoObjects.add(s.current),a.current.geoObjects.add(o.current),p(k()),a.current.events.add("boundschange",w),_(),a.current.events.add("boundschange",()=>{e.onCloseModal(),y(),setTimeout(()=>{t(!1)},500)}),a.current.events.add("boundschange",()=>{e.onMoveMap&&e.onMoveMap()}),a.current.events.add("click",()=>{e.onCloseModal(),y()});let r=e=>{if(!s.current)return;let t=e.get("objectId"),n=s.current.objects.getById(t);if(!n)return;let r=document.getElementById("flat-".concat(n.id?n.id:0));if(r)switch(e.get("type")){case"mouseenter":r.classList.add(tf);break;case"mouseleave":r.classList.remove(tf);break;case"click":y(),i.current=r,c(n)}},l=t=>{if(!s.current)return;let r=s.current.clusters.getById(t.get("objectId"));if(!r)return;let a=r.features[0],o=a.options?a.options.flat:{},l=document.getElementById("flat-".concat(o.id?o.id:0)),u=!!a.options&&a.options.showApproximatePrice;switch(t.get("type")){case"add":s.current.clusters.setClusterOptions(r.id,tk(n,o,e.bookmarksList,Number(s.current.duration)||e.duration,e.currency.entity,0,u));break;case"mouseenter":l.classList.add(tf);break;case"mouseleave":l.classList.remove(tf);break;case"click":y(),i.current=l,c(a)}};s.current.objects.events.add(["mouseenter","mouseleave","click"],r),s.current.clusters.events.add(["add","mouseenter","mouseleave","click"],l),(e.bbox||e.mapFilters.maxLat&&e.mapFilters.maxLng&&e.mapFilters.minLat&&e.mapFilters.minLng)&&(tw(o.current,n,e.dots),t_(s.current,n,e.flats,e.currency.entity,e.bookmarksList,e.duration,e.showApproximatePrice)),s.current.clusters.events.add("add",()=>{if(a.current){let t=a.current.getZoom(),n=v();a.current&&s.current&&n.length<25&&t>17?(s.current.options.set({clusterize:!1}),C(e.showApproximatePrice)):(s.current.options.set(tx),b())}}),h&&C(e.showApproximatePrice)}},[n,e.mapRef.current]);return(0,d.useEffect)(()=>{l&&i.current&&i.current&&i.current.classList.add(tp)},[l,i]),(0,d.useEffect)(()=>{b()},[b]),(0,d.useEffect)(()=>{s&&s.current&&(s.current.duration=e.duration)},[e.duration]),(0,d.useEffect)(()=>{n&&!a.current&&n.ready(j).then()},[n,a.current]),(0,d.useEffect)(()=>{(0,ti.q)(tu.pU).then(e=>{r(e)}).catch(()=>{})},[]),{box:f,yandexMap:n,mapInstance:a,selectedObject:l,resetSelectedObject:x,center:u,setCenter:m,dotObjectManager:o,mapObjectManager:s,resetActiveElement:y}},tg=function(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5?arguments[5]:void 0;return"\n <div\n id='flat-".concat(e,"'\n class='").concat(tm," ").concat(t.includes(e)?th:"","'\n style='transform: translateY(-").concat(a,"px)'\n >\n <span class='flat-placemark__price'>").concat(s?"ÐÑ ".concat(n):n,"</span> ").concat(r,"\n </div>\n ")},tb=()=>'<div class="flat-dot"></div>',tk=function(e,t,n,r,a){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6?arguments[6]:void 0;return{flat:{...t},iconLayout:e.templateLayoutFactory.createClass(tg(t.id,n,(0,td.C)(t.prices,r),a,s,o)),iconShape:{type:"Rectangle",coordinates:[[0,-s],[o?89:64,32-s]]},zIndex:200,showApproximatePrice:o}},tv=e=>({iconLayout:e.templateLayoutFactory.createClass(tb()),iconShape:{type:"Rectangle",coordinates:[[0,0],[5,5]]},zIndex:100}),tC=(e,t,n,r,a,s,o)=>{let i=tc()(e,e=>{var t;return null===(t=e.geometry)||void 0===t?void 0:t.coordinates});Object.values(i).forEach(e=>{e.length>1&&e.forEach((e,i)=>{a&&e&&e.options&&a.objects.setObjectOptions(String(e.id),tk(s,e.options.flat,n,r,t,34*i,o))})})};function t_(e,t,n,r,a,s,o){e.add(n.map(e=>({type:"Feature",id:e.id,geometry:{type:"Point",coordinates:[e.point.lat,e.point.lng]},options:tk(t,e,a,s,r,0,o)})))}function tw(e,t,n){e.add(n.map(e=>({type:"Feature",id:e.id,geometry:{type:"Point",coordinates:[e.point.lat,e.point.lng]},options:tv(t)})))}var tj=n(56348),tS=n.n(tj),tL=n(19664),tE=n(64114),tF=n(42610),tT=n.n(tF),tA=n(38e3),tR=n(63780),tN=n(49396),tM=n(54486),tI=n(16314),tP=n(47357);let tD=e=>{let{addToStarred:t,removeFromStarred:n}=(0,tA.y)(e.mainHost),r=(0,d.useContext)(e2),a=(0,d.useCallback)(t=>!e.bookmarksList||e.bookmarksList.some(e=>e===t),[]),s=(0,d.useCallback)(async e=>{r.add(e),await t(e)},[t,r.add]),o=(0,d.useCallback)(async e=>{r.remove(e),await n(e)},[n,r.remove]);
1return e.flat?(0,i.jsxs)("div",{className:eT()(tT().root,tT().mapCard,e.className),children:[(0,i.jsxs)("div",{className:tT().top,children:[(0,i.jsx)(tP._,{className:tT().favoriteBtn,flatId:e.flat.id,isActive:a(e.flat.id),onAdd:s,onRemove:o}),(0,i.jsx)(tM.v,{mainHost:e.mainHost,config:{id:e.flat.id,url:e.flat.url,analytics:{Filter:"on",GeneralRatingPos:c()(e,"flat.positionInCity",0),CityId:c()(e,"flat.city.id",0),URL:window.location.href}},ownProps:{className:tT().link},dateDuration:e.duration,sendAnalytics:!0,onFlatClick:e.onFlatClick,children:(0,i.jsx)(tN.j,{flat:e.flat,isRetina:e.isRetina,isMobileDevice:e.isMobileDevice,isMap:!0})}),"owner"in e.flat&&e.flat.owner.profile.avatar&&(0,i.jsx)(tI.j,{className:tT().avatar,ownerId:e.flat.owner.id,thumbs:e.flat.owner.profile.avatar.thumbs,isRetina:e.isRetina})]}),(0,i.jsx)(tR.D,{className:tT().bottom,flat:e.flat,currency:e.currency,duration:e.duration})]},e.flat.id):null},tH=e=>{let[t,n]=(0,d.useState)(!1),r=(0,tL.d)(),a=()=>{e.onFlatClick&&e.onFlatClick(e.flat)};return((0,d.useEffect)(()=>{e.flat?n(!0):n(!1)},[e.flat]),(0,tE.$)(e.onClose),t)?(0,i.jsx)("div",{className:tS().root,children:(0,i.jsxs)("div",{className:tS().content,children:[(0,i.jsx)("button",{className:tS().closeBtn,onClick:e.onClose,children:(0,i.jsx)("div",{className:tS().closeBtnIcon})}),(0,i.jsx)(tD,{mainHost:e.mainHost,flat:e.flat,bookmarksList:e.bookmarksList,currency:e.currency,duration:e.duration,isRetina:r,isMobileDevice:e.isMobileDevice,onFlatClick:a})]})}):null};var tB=n(79807),tO=n.n(tB),tz=n(49026),tU=n(18586);let tK=e=>{let[t,n]=(0,d.useState)(!1),{goToFlatsListPage:r}=(0,tz.b)(e.mainHost),a=(0,tU.U)(),{filterWithoutMapApplied:s}=(0,D.Y)(e.filters,a),o=(0,d.useCallback)(()=>{n(!0),r(e.filters)},[r,e.filters]),l=(0,d.useCallback)(()=>{let t=s||e.mapShifted||!e.meta.filters.city?e.totalFlats:e.meta.total,n=Math.min(t,500),r=new I.w("обÑекÑ","обÑекÑа","обÑекÑов").getPlural(n,"".concat(t>n?"+":"","\xa0"),!0);return!e.mapShifted&&e.meta.filters.city?r+=" в ".concat(e.meta.filters.city.namePrep):r+=" на каÑÑе",r},[e.mapShifted,e.totalFlats,s]);return(0,i.jsxs)("div",{className:eT()(tO().root,e.className),children:[e.totalFlats?(0,i.jsx)(eC.x,{className:tO().heading,As:"p",size:20,bold:!0,children:l()}):(0,i.jsx)(eC.x,{className:tO().heading,As:"p",size:20,bold:!0,children:"ÐÐµÑ Ð¾Ð±ÑекÑов на каÑÑе"}),(0,i.jsx)("div",{className:tO().wrapper,children:(0,i.jsx)(eU.z,{className:tO().button,onClick:o,isLoading:e.loading||t,text:"ÐоказаÑÑ ÑпиÑком",block:!0})})]})},tW={maxZoom:te.Z.maxZoom,minZoom:te.Z.minZoom,avoidFractionalZoom:!1,yandexMapDisablePoiInteractivity:!0},tq=e=>{let t,n;let{filters:r,setFilters:a,mapShifted:s,setMapShifted:o,setLoading:l}=(0,d.useContext)(P.o),c=(0,d.useContext)(ts.OT),{bookmarksList:u}=(0,d.useContext)(e2),{context:m}=(0,d.useContext)(ta.k),{selectedFlatCalendar:h,unavailableFlatModal:x}=(0,d.useContext)(p),{query:y}=ep(),{setLocked:g}=(0,f.N)(),{newCalendar:b}=ec(),[k,v]=(0,d.useState)((0,M.nn)(r)),C=ef(e.mainHost),_=e=>{if(C.isRefusedSelectDates){window.open(e.url,"_blank");return}h.onOpen(),C.handleFlatClick(e)},[w,j]=(0,d.useState)(e.meta.total),[S,L]=(0,d.useState)(null),[E,F]=(0,d.useState)(!1),[T,A]=(0,d.useState)(""),R=m?m.currencies.current:er.a7,{showApproximatePrice:N}=(0,to.D)(),I=(0,d.useCallback)(()=>{if(r.map.lat&&r.map.lng)return[r.map.lat,r.map.lng];if(e.meta.filters.point)return[e.meta.filters.point.lat,e.meta.filters.point.lng];let t=e.meta.filters.regions?e.meta.filters.regions[0]:null,n=e.meta.filters.country;return e.city?[e.city.center.lat,e.city.center.lng]:t?[t.center.lat,t.center.lng]:n?[n.center.lat,n.center.lng]:[0,0]},[]),D=(0,d.useCallback)(()=>{let t=te.Z.zoomForCity;return e.isLanding&&e.meta.filters.point&&(t=te.Z.zoomForPlace),r.map.zoom&&(t=r.map.zoom),t},[r]),B=(0,d.useCallback)(()=>{let t;return e.meta.bbox&&(t=[[e.meta.bbox.pointMin.lat,e.meta.bbox.pointMin.lng],[e.meta.bbox.pointMax.lat,e.meta.bbox.pointMax.lng]]),t},[]);e.meta.bbox||(t=I(),n=D());let O={center:t,zoom:n,bounds:B(),controls:[]},z=(0,d.useRef)(null),U=(0,d.useRef)(new el(e.mainHost,e.currentCurrencyId,null,null,e.cookies)),K=(0,d.useRef)(new tr(e.mainHost,null,null,e.cookies)),W=d.useRef(null),q=(0,d.useCallback)(()=>{g(!1),ee(),L(null),ea()},[]),G=(0,d.useCallback)(()=>{o(!0),c.setMode(ts.Mi.MAP_AREA),c.setSavedValue(""),c.setSuggests([])},[]),{box:Z,center:Y,setCenter:V,mapInstance:J,dotObjectManager:Q,mapObjectManager:X,selectedObject:$,resetSelectedObject:ee,yandexMap:et,resetActiveElement:ea}=ty({mapRef:z,flats:e.flats,dots:e.flats,state:O,options:tW,mapFilters:r.map,currency:R,bookmarksList:u,duration:r.dates.duration,bbox:e.meta.bbox,onCloseModal:q,onMoveMap:G,showApproximatePrice:N});(0,d.useEffect)(()=>{$&&$.options&&(g(!0),L($.options.flat),c.setShowFilters(!1))},[$]),(0,d.useEffect)(()=>{c.showFilters&&q()},[c.showFilters]),(0,d.useEffect)(()=>{x.opened||q()},[x.opened]);let es=(0,d.useCallback)(async()=>
1{if(Z&&Y&&J.current)try{F(!0),A("");let t=[new Promise(t=>{t(U.current.fetchFlatsByBox(e.accept,{point:{lat:Y[0],lng:Y[1]},box:Z,boundaryKey:e.meta.filters.boundaryKey},y,e.isMobileDevice?50:70,void 0,void 0,b))}),new Promise(t=>{t(K.current.fetchDotsByBox({lat:Y[0],lng:Y[1]},Z,y,b,e.meta.filters.boundaryKey))})],n=await Promise.all(t),a=n[0],s=n[1];X.current&&Q.current&&et&&(j(a.meta.total+s.meta.total),tw(Q.current,et,s.flats),t_(X.current,et,a.flats,R.entity,u,r.dates.duration,N))}catch(o){A(String(o)),H.Tb(o)}finally{l(er.xC),F(!1)}},[y]),eo=(0,d.useCallback)(()=>{W.current&&clearTimeout(W.current),W.current=setTimeout(es,1250)},[es,W]);return(0,d.useEffect)(()=>{en()((0,M.nn)(r),k)||v((0,M.nn)(r))},[y]),(0,d.useEffect)(()=>{X.current&&Q.current&&(X.current.removeAll(),Q.current.removeAll())},[k]),(0,d.useEffect)(()=>{if(Y&&Z&&J.current){let e=J.current.getZoom(),t={lat:Y[0],lng:Y[1],minLat:Z[0][0],minLng:Z[0][1],maxLat:Z[1][0],maxLng:Z[1][1],zoom:e};a(e=>({...e,map:{...e.map,...t}}))}},[Z,k]),(0,d.useEffect)(()=>{if(J.current){let e=J.current.getCenter();V(e),a(t=>({...t,map:{...t.map,lat:e[0],lng:e[1]}}))}},[k]),(0,d.useEffect)(()=>{s&&a(e=>({...e,pointName:""}))},[s]),(0,d.useEffect)(()=>{J.current&&r.map.lng&&r.map.lat&&r.map.zoom&&J.current.setCenter([r.map.lat,r.map.lng],r.map.zoom)},[r]),(0,d.useEffect)(()=>{eo()},[eo]),(0,i.jsxs)("div",{className:e7().root,children:[S?(0,i.jsx)(tH,{mainHost:e.mainHost,filters:r,flat:S,bookmarksList:u,currency:R,duration:r.dates.duration,onClose:q,isMobileDevice:e.isMobileDevice,onFlatClick:_}):(0,i.jsx)(tK,{className:e7().info,mainHost:e.mainHost,filters:r,meta:e.meta,totalFlats:w,mapShifted:s,loading:E,errorValue:T}),(0,i.jsx)("div",{className:e7().map,ref:z}),(0,i.jsx)(eH,{mainHost:e.mainHost,calendarHook:C}),(0,i.jsx)(eZ,{calendarHook:C})]})},tG=e=>{let t=(0,eM.k)(),n=(0,eM.d)(),[r,a]=(0,d.useState)(0);return(0,d.useEffect)(()=>{let e={mobile:104,tablet:200,desktop:154};t.isMobile&&a(n.height-e.mobile),t.isTablet&&a(n.height-e.tablet),(t.isSmallDesktop||t.isDesktop)&&a(n.height-e.desktop)},[t,n.height]),(0,i.jsx)(e9,{bookmarksList:e.bookmarksList,children:(0,i.jsx)("div",{className:e5().root,style:{height:r},children:(0,i.jsx)(tq,{flats:e.flats,meta:e.meta,city:e.city,accept:e.accept,mainHost:e.mainHost,isMobileDevice:e.isMobileDevice,cookies:e.cookies,isLanding:e.isLanding,currentCurrencyId:e.currentCurrencyId})})})};var tZ=n(58549);let tY=e=>{var t;if(e.errorCode)return(0,i.jsx)(_.default,{statusCode:e.errorCode});if(!e.context)return null;let n=e.context.common.host?e.context.common.host:"",r=e.context.extra.path||"",a=e.context.extra.bookmarksList||[],s=c()(e.context,"req.headers.x-request-id",""),o=(0,u.useRouter)(),l=null;e.context.extra.meta.filters.city&&(l=e.context.extra.meta.filters.city),e.context.extra.city&&(l=e.context.extra.city);let d=()=>{o.reload()},m=(0,C.J)(n,s,d),f=Boolean(o.query.fromMap),p=!e.context.extra.flats.length,x={searchFilters:e.query,apiFilters:e.context.extra.meta.filters,isLanding:Boolean(e.context.extra.meta.isLanding),meta:e.context.extra.meta,city:l,seoFilters:e.context.common.seo.filter_params};return(0,i.jsx)(tZ.T,{ctx:e.context.common,...!p||f?{searchOptions:x}:{},noFooter:e.isMap,noIndex:r.includes("/page"),withoutLoading:!0,children:(0,i.jsx)(h,{children:(0,i.jsxs)(i.Fragment,{children:[e.isMap?(0,i.jsx)(tG,{flats:e.context.extra.flats,bookmarksList:a,city:l,meta:e.context.extra.meta,accept:e.accept,mainHost:n,isMobileDevice:e.isMobileDevice,cookies:e.cookies,isLanding:e.context.extra.meta.isLanding,currentCurrencyId:e.context.common.currencies.current.id}):(0,i.jsx)(b,{initialState:v({meta:e.context.extra.meta,flats:e.context.extra.flats}),children:(0,i.jsx)(e3,{meta:e.context.extra.meta,seo:e.context.common.seo,bookmarksList:a,query:e.query,path:r,accept:e.accept,mainHost:n,isMobileDevice:e.isMobileDevice,city:e.context.extra.city,currency:e.context.common.currencies.current,cookies:e.cookies})}),(null===(t=e.context.common.user)||void 0===t?void 0:t.id)?null:(0,i.jsx)(w.R,{yandexIdClientId:e.context.common.yandexIdClientId,onAuth:m})]})})})};var tV=!0,tJ=tY},94301:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return i}});var r=n(85893),a=n(58551),s=n.n(a);let o=e=>{let{statusCode:t}=e;return(0,r.jsx)("div",{className:s().root,children:(0,r.jsxs)("div",{className:s().wrapper,children:[(0,r.jsx)("img",{className:s().img,src:"/s/modern/logo/mobile/kvartirka-logo-4.png",alt:"ÐваÑÑиÑка"}),(0,r.jsxs)("h3",{children:["У Ð½Ð°Ñ Ð¿ÑоизоÑла какаÑ-Ñо оÑибка (",t,")"]}),(0,r.jsx)("p",{children:"ÐÑ Ñже знаем о ней и ÑкоÑо вÑе поÑиним. ÐожалÑйÑÑа, попÑобÑйÑе зайÑи немного позже."})]})})};var i=!0;t.default=o},24693:function(){},78695:function(e){e.exports={root:"breadcrumb-item_root__7r9tx"}},23502:function(e){e.exports={root:"breadcrumbs_root__YNyrW"}},9553:function(e){e.exports={calenderFooterChildren:"calendar-footer-with-skip_calenderFooterChildren__K6x5d",calender
1SkipButton:"calendar-footer-with-skip_calenderSkipButton__913ek"}},86225:function(e){e.exports={root:"flat-list-footer-linking_root__CxfOx",list:"flat-list-footer-linking_list__pDN5B",item:"flat-list-footer-linking_item__nrwjE",more:"flat-list-footer-linking_more__jM2AH",hidden:"flat-list-footer-linking_hidden__UdS2p"}},62185:function(e){e.exports={root:"html-block_root__KIKkK"}},41393:function(e){e.exports={root:"nearest-cities_root__3Wbbb"}},2858:function(e){e.exports={root:"flat-list-page_root__W6XjQ",content:"flat-list-page_content__lblm4",noticeTop:"flat-list-page_noticeTop__8PpNK",noticeDown:"flat-list-page_noticeDown__mhkem",hidden:"flat-list-page_hidden__eMpMY"}},87948:function(e){e.exports={root:"flat-map-page_root__oJpg0"}},32825:function(e){e.exports={root:"flat-list-load-more_root__c9kEz",button:"flat-list-load-more_button__qjXfb"}},81929:function(e){e.exports={root:"infinity-flat-list_root__tkRv8"}},36664:function(e){e.exports={root:"landing-list_root__DYBWM"}},38059:function(e){e.exports={modalChildren:"unavailable-flat-modal_modalChildren__i1dCk",modalFooter:"unavailable-flat-modal_modalFooter__0Yjra",footerChildren:"unavailable-flat-modal_footerChildren__mvtq_"}},40991:function(e){e.exports={root:"flat-list_root__v4mWV",hidden:"flat-list_hidden__3dOQe"}},56348:function(e){e.exports={root:"search-flat-modal_root__vWIya",content:"search-flat-modal_content__F9sdu",closeBtn:"search-flat-modal_closeBtn__9PZTS",closeBtnIcon:"search-flat-modal_closeBtnIcon__7wO03"}},79807:function(e){e.exports={root:"search-info_root__riB_0",heading:"search-info_heading__cuqAe",wrapper:"search-info_wrapper__NGS2H",filtersInfo:"search-info_filtersInfo__j6tO8"}},52814:function(e){e.exports={root:"search-map_root__Ur8nY",map:"search-map_map__ZnGeu",info:"search-map_info__efL0L"}},58551:function(e){e.exports={root:"_error_root__HG2Wi",wrapper:"_error_wrapper__yT8zx",img:"_error_img__KdESJ"}}},function(e){e.O(0,[4493,7361,3955,6844,1517,3082,5846,7157,3909,5283,3780,8263,88,9774,2888,179],function(){return e(e.s=11279)}),_N_E=e.O()}]); 2//# sourceMappingURL=[...search]-5befb836055b5acd.js.map
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.