1import{_ as de}from"./B9koY5uP.js";import{aY as X,bC as xe,a_ as ke,bh as le,bU as $e,bB as Ee,bt as $,b2 as Ce,b1 as R,bK as ge,ez as Ve,b4 as m,b5 as o,b6 as n,ba as a,b9 as l,b8 as f,bf as I,bp as te,bc as s,be as V,bd as k,bu as G,bS as ue,b7 as C,bq as H,bl as J,bm as K,bk as d,bn as Z,bv as Pe,dB as je,aZ as Ie,bo as Ae,bE as _e,cw as Te,a$ as Me,dh as De,bO as q,e2 as be,bw as Le,b0 as Se,br as Ne,bg as ae,bi as Re,bj as he}from"./Dl8XQm3y.js";import{u as Oe}from"./B2LKWPmm.js";import{u as se}from"./DqVc5FfM.js";import{V as ce}from"./kVLD5Owz.js";import{a as ve,V as we}from"./CQSb-Dst.js";import{_ as Be}from"./CYoUvYuo.js";import{u as ye}from"./CItQlBA3.js";import{V as ze}from"./CFaZT7i9.js";import{V as Ye,a as Ue,b as Je,c as Fe}from"./DrOdvh63.js";import"./C3UGFiA3.js";import"./BtaBD884.js";import"./DXVEsO9p.js";const Ke={class:"d-flex align-center justify-end ga-2 mb-15 apartment-main-image__buttons"},Ze={key:0,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},We={key:1,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},Ge={key:0,class:"d-flex align-center justify-space-between ga-9 mb-sm-14 mb-4"},He={key:1,class:"w-100 apartment-main-image__swiper"},Qe={class:"d-flex justify-center"},qe={class:"d-flex justify-end align-center mb-9 position-relative ga-6"},Xe={class:"position-absolute apartment-main-image__buttonswrapper"},et={class:"d-flex flex-md-column align-center justify-end ga-4 apartment-main-image__buttons"},tt={key:0,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},at={key:1,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},st={class:"d-flex flex-column align-center justify-space-between ga-9 mb-4 apartment-main-image__bigwrapper"},lt={class:"d-flex justify-center"},nt=X({__name:"MainImage",props:{flat:{},like:{type:Boolean}},setup(g){var u;const{mdAndDown:A}=xe(),v=ke(),{t:b}=le(),y=$e(),{user:p}=Ee(y),w=$(null),W=$(null),j=$(!1),_=$(!1),T=$(!0),c=$([]);g.flat.attributes.final_finishing_picture?c.value.push({id:1,title:"ÐланиÑовка",image:g.flat.attributes.final_finishing_picture}):(T.value=!1,c.value.push({id:1,title:"ÐланиÑовка",image:"/_images/flat.png"})),g.flat.attributes.floor_image&&c.value.push({id:2,title:"ÐÑаж",image:g.flat.attributes.floor_image}),g.flat.attributes.map_image&&c.value.push({id:3,title:"Ðа каÑÑе",image:g.flat.attributes.map_image}),g.flat.attributes.window_image&&c.value.push({id:4,title:"Ðид из окна",image:g.flat.attributes.window_image});const S=$(0),z=$(0),t=se(w),F=se(W),O=(r=0)=>{t.to(r)},ne=(r=0)=>{F.to(r)};Ce(()=>{setTimeout(()=>{if(c.value.length&&t.instance.value){if(window.customElements&&window.customElements.get("swiper-container"))_.value=!0;else{const r=new MutationObserver(()=>{window.customElements.get("swiper-container")&&(_.value=!0,r.disconnect())});r.observe(document.documentElement,{childList:!0,subtree:!0})}t.instance.value.on("slideChange",()=>{var r;S.value=((r=t.instance.value)==null?void 0:r.activeIndex)||0})}},0)});const N=$(!1),oe=R(()=>window.location.href),ie=()=>{navigator.clipboard&&navigator.clipboard.writeText(oe.value).then(()=>{N.value=!0,setTimeout(()=>{N.value=!1},2e3)}).catch(r=>{console.error("Ðе ÑдалоÑÑ ÑкопиÑоваÑÑ ÑÑÑлкÑ:",r)})},ee=async()=>{if(navigator.share&&A.value)try{await navigator.share({title:`${g.flat.attributes.room_count==0?"СÑÑдиÑ":`${g.flat.attributes.room_count} ${je(g.flat.attributes.room_count,["комнаÑа","комнаÑÑ","комнаÑ"])}`}, ${g.flat.attributes.total_area} м², ÐÐ ${g.flat.attributes.project.name}`,url:window.location.href})}catch(r){console.log("Error sharing:",r)}else ie()},re=()=>{j.value=!0},M=$(g.like||!1),i=async r=>{if(r.preventDefault(),r.stopPropagation(),M.value=!M.value,p.value)try{const{$repositories:e}=Ie();await e.like.likeAction(g.flat.id.toString(),"product",M.value?"like":"unlike")}catch(e){M.value=!M.value,alert(e.message||b("error_like_action","ÐÑоизоÑла оÑибка пÑи вÑполнении дейÑÑÐ²Ð¸Ñ Ð»Ð°Ð¹ÐºÐ°"))}else{const e=JSON.parse(localStorage.getItem("likedApartments")||"{}");e[g.flat.id]?delete e[g.flat.id]:e[g.flat.id]={entity_type:"product",element_id:g.flat.id},localStorage.setItem("likedApartments",JSON.stringify(e))}};return ge(()=>j.value,r=>{r&&setTimeout(()=>{F.instance.value&&(F.instance.value.slideTo(S.value),z.value=S.value,F.instance.value.on("slideChange",()=>{var e;z.value=((e=F.instance.value)==null?void 0:e.activeIndex)||0}))},0)}),ge(()=>g.like,r=>{M.value=r||!1}),Ve(()=>{if(c.value.length>0){const r=new Image;r.src=c.value[0].image}}),Oe({link:[{rel:"preload",href:((u=c.value[0])==null?void 0:u.image)||"",as:"image"}]}),(r,e)=>{const x=de;return o(),m(J,null,[n(Z,{color:"white",rounded:"24",class:"page-apartment-slug__col pt-6 pt-sm-12 pt-lg-6 px-8 pb-sm-11 pb-4 d-flex flex-column apartment-main-image"},{default:a(()=>{var h,E,Y,Q;
1return[l("div",Ke,[n(I,{density:"compact",height:"44",width:"44",icon:"",color:"secondary",class:te(["px-0 like-btn",{"like-btn--liked":s(M)}]),onClick:i},{default:a(()=>[s(M)?(o(),m("svg",We,e[10]||(e[10]=[l("path",{d:"M12.001 4.52853C14.35 2.42 17.98 2.49 20.2426 4.75736C22.5053 7.02472 22.583 10.637 20.4786 12.993L11.9999 21.485L3.52138 12.993C1.41705 10.637 1.49571 7.01901 3.75736 4.75736C6.02157 2.49315 9.64519 2.41687 12.001 4.52853Z",fill:"#4772FF"},null,-1)]))):(o(),m("svg",Ze,e[9]||(e[9]=[l("path",{d:"M12.001 4.52853C14.35 2.42 17.98 2.49 20.2426 4.75736C22.5053 7.02472 22.583 10.637 20.4786 12.993L11.9999 21.485L3.52138 12.993C1.41705 10.637 1.49571 7.01901 3.75736 4.75736C6.02157 2.49315 9.64519 2.41687 12.001 4.52853ZM18.827 6.1701C17.3279 4.66794 14.9076 4.60701 13.337 6.01687L12.0019 7.21524L10.6661 6.01781C9.09098 4.60597 6.67506 4.66808 5.17157 6.17157C3.68183 7.66131 3.60704 10.0473 4.97993 11.6232L11.9999 18.6543L19.0201 11.6232C20.3935 10.0467 20.319 7.66525 18.827 6.1701Z",fill:"#828BA8"},null,-1)])))]),_:1},8,["class"]),n(I,{to:s(v)(`/apartments/${r.flat.id}/print`),density:"compact",height:"44",width:"44",icon:"",color:"secondary",class:"d-none d-md-flex"},{default:a(()=>[n(V,{size:"20",class:"font-weight-medium"},{default:a(()=>e[11]||(e[11]=[k("printer-fill")])),_:1})]),_:1},8,["to"]),n(ce,{modelValue:s(N),"onUpdate:modelValue":e[0]||(e[0]=P=>G(N)?N.value=P:null),"open-on-hover":!1,location:"top"},{activator:a(({props:P})=>[n(I,ue(P,{density:"compact",height:"44",width:"44",icon:"",color:"secondary",onClick:ee}),{default:a(()=>[n(V,{size:"20",class:"font-weight-medium"},{default:a(()=>e[12]||(e[12]=[k("share-fill")])),_:1})]),_:2},1040)]),default:a(()=>[e[13]||(e[13]=l("span",null,"СкопиÑовано!",-1))]),_:1},8,["modelValue"])]),(h=s(c))!=null&&h.length?(o(),m("div",Ge,[((E=s(c))==null?void 0:E.length)>1?(o(),C(I,{key:0,class:"ml-n2 d-none d-md-flex",height:"44",width:"44",icon:"",color:"white",onClick:e[1]||(e[1]=P=>s(t).prev())},{default:a(()=>[n(V,{size:"24",color:"neutral2-400",class:"font-weight-medium"},{default:a(()=>e[14]||(e[14]=[k(" arrow-left-s-line ")])),_:1})]),_:1})):f("",!0),s(_)?f("",!0):(o(),m("div",He,[n(H,{class:"apartment-main-image__image",width:"100%",height:"335px",src:(Y=s(c)[0])==null?void 0:Y.image,contain:""},null,8,["src"])])),n(x,null,{default:a(()=>{var P;return[l("swiper-container",{ref_key:"containerRefApartmentImages",ref:w,class:te(["apartment-main-image__swiper",{"w-100":((P=s(c))==null?void 0:P.length)===1}])},[(o(!0),m(J,null,K(s(c),(U,D)=>(o(),m("swiper-slide",{key:D,class:"apartment-main-image__slide",onClick:e[2]||(e[2]=B=>s(T)?re():null)},[n(H,{class:te(["apartment-main-image__image",{"zoom-disabled":!s(T)}]),width:"100%",height:"335px",src:U.image,contain:""},null,8,["class","src"]),s(T)?(o(),C(I,{key:0,rounded:"8",class:"position-absolute apartment-main-image__zoom",color:"secondary",icon:"",height:"56",width:"56"},{default:a(()=>[n(V,{size:"24"},{default:a(()=>e[15]||(e[15]=[k("zoom-in-line")])),_:1})]),_:1})):f("",!0)]))),128))],2)]}),_:1}),((Q=s(c))==null?void 0:Q.length)>1?(o(),C(I,{key:2,class:"mr-n2 d-none d-md-flex",height:"44",width:"44",icon:"",color:"white",onClick:e[3]||(e[3]=P=>s(t).next())},{default:a(()=>[n(V,{size:"24",color:"neutral2-400",class:"font-weight-medium"},{default:a(()=>e[16]||(e[16]=[k(" arrow-right-s-line ")])),_:1})]),_:1})):f("",!0)])):f("",!0),l("div",Qe,[n(ve,{modelValue:s(S),"onUpdate:modelValue":e[4]||(e[4]=P=>G(S)?S.value=P:null),density:"compact","align-tabs":"center",color:"white",mandatory:"","hide-slider":"","bg-color":"background",class:"pa-1 bg-neutral2-50 rounded-full apartment-main-image__tabs",height:"38"},{default:a(()=>[(o(!0),m(J,null,K(s(c),(P,U)=>(o(),C(we,{key:`main-image-tab-${U}`,rounded:"full",height:"30",variant:"flat",value:U,class:"text-body-1 font-weight-medium px-2",onClick:D=>O(U)},{default:a(()=>[k(d(P.title),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["modelValue"])])]}),_:1}),n(Pe,{modelValue:s(j),"onUpdate:modelValue":e[8]||(e[8]=h=>G(j)?j.value=h:null),"max-width":"1200"},{default:a(()=>[n(Z,{color:"white",rounded:"16",class:"position-relative pa-lg-4 pa-md-4 pa-4 d-flex flex-column"},{default:a(()=>[l("div",qe,[n(I,{height:"44",width:"44",color:"transparent",icon:"",onClick:e[5]||(e[5]=h=>j.value=!1)},{default:a(()=>[n(V,{size:"24",class:"font-weight-medium",color:"neutral-400"},{default:a(()=>e[17]||(e[17]=[k(" close-line ")])),_:1})]),_:1}
1)]),l("div",Xe,[l("div",et,[n(I,{density:"compact",height:"44",width:"44",icon:"",color:"secondary",class:te(["px-0 like-btn",{"like-btn--liked":s(M)}]),onClick:i},{default:a(()=>[s(M)?(o(),m("svg",at,e[19]||(e[19]=[l("path",{d:"M12.001 4.52853C14.35 2.42 17.98 2.49 20.2426 4.75736C22.5053 7.02472 22.583 10.637 20.4786 12.993L11.9999 21.485L3.52138 12.993C1.41705 10.637 1.49571 7.01901 3.75736 4.75736C6.02157 2.49315 9.64519 2.41687 12.001 4.52853Z",fill:"#4772FF"},null,-1)]))):(o(),m("svg",tt,e[18]||(e[18]=[l("path",{d:"M12.001 4.52853C14.35 2.42 17.98 2.49 20.2426 4.75736C22.5053 7.02472 22.583 10.637 20.4786 12.993L11.9999 21.485L3.52138 12.993C1.41705 10.637 1.49571 7.01901 3.75736 4.75736C6.02157 2.49315 9.64519 2.41687 12.001 4.52853ZM18.827 6.1701C17.3279 4.66794 14.9076 4.60701 13.337 6.01687L12.0019 7.21524L10.6661 6.01781C9.09098 4.60597 6.67506 4.66808 5.17157 6.17157C3.68183 7.66131 3.60704 10.0473 4.97993 11.6232L11.9999 18.6543L19.0201 11.6232C20.3935 10.0467 20.319 7.66525 18.827 6.1701Z",fill:"#828BA8"},null,-1)])))]),_:1},8,["class"]),n(I,{to:s(v)(`/apartments/${r.flat.id}/print`),density:"compact",height:"44",width:"44",icon:"",color:"secondary",class:"order-2 d-none d-md-flex"},{default:a(()=>[n(V,{size:"20",class:"font-weight-medium"},{default:a(()=>e[20]||(e[20]=[k("printer-fill")])),_:1})]),_:1},8,["to"]),n(ce,{modelValue:s(N),"onUpdate:modelValue":e[6]||(e[6]=h=>G(N)?N.value=h:null),"open-on-hover":!1,location:"top"},{activator:a(({props:h})=>[n(I,ue(h,{density:"compact",height:"44",width:"44",icon:"",color:"secondary",onClick:ee}),{default:a(()=>[n(V,{size:"20",class:"font-weight-medium"},{default:a(()=>e[21]||(e[21]=[k("share-fill")])),_:1})]),_:2},1040)]),default:a(()=>[e[22]||(e[22]=l("span",null,"СкопиÑовано!",-1))]),_:1},8,["modelValue"])])]),l("div",st,[n(x,null,{default:a(()=>[l("swiper-container",{ref_key:"containerRefApartmentImagesDialog",ref:W,class:"apartment-main-image__swiper w-100"},[(o(!0),m(J,null,K(s(c),(h,E)=>(o(),m("swiper-slide",{key:E,class:"apartment-main-image__slide --big"},[n(H,{class:"apartment-main-image__image --big",src:h.image,width:"100%",height:"500px",contain:""},null,8,["src"])]))),128))],512)]),_:1}),l("div",lt,[n(ve,{modelValue:s(z),"onUpdate:modelValue":e[7]||(e[7]=h=>G(z)?z.value=h:null),density:"compact","align-tabs":"center",color:"white",mandatory:"","hide-slider":"","bg-color":"background",class:"pa-1 rounded-full apartment-main-image__tabs",height:"38"},{default:a(()=>[(o(!0),m(J,null,K(s(c),(h,E)=>(o(),C(we,{key:`main-image-tab-${E}`,rounded:"full",height:"30",variant:"flat",value:E,class:"text-body-1 font-weight-medium px-2 mr-4",onClick:Y=>ne(E)},{default:a(()=>[k(d(h.title),1)]),_:2},1032,["value","onClick"]))),128))]),_:1},8,["modelValue"])])])]),_:1})]),_:1},8,["modelValue"])],64)}}}),ot={key:0,class:"d-flex flex-column ga-8 payments-methods"},it={class:"text-h2-2 text-primary font-weight-bold mb-6"},rt={class:"text-h3 text-neutral2-600 font-weight-semibold mb-2"},ut={key:0,class:"text-body-1 text-neutral2-400 pr-15"},ct=X({__name:"PaymentMethods",props:{project:{}},setup(g){const A=$(null);se(A);const v=R(()=>{if(!g.project.attributes)return[];const b=g.project.attributes,y=[];return b.PEYMENT_FULLPAY&&y.push({id:"fullpay",title:"ÐÐ¾Ð»Ð½Ð°Ñ Ð¾Ð¿Ð»Ð°Ñа",value:b.PEYMENT_FULLPAY,description:b.PEYMENT_FULLPAY_DESC,icon:"/_images/payment_methods/full.png",priority:1}),b.PEYMENT_IPLAN&&y.push({id:"installment",title:"РаÑÑÑоÑка",value:b.PEYMENT_IPLAN,description:b.PEYMENT_IPLAN_DESC,icon:"/_images/payment_methods/half.png",priority:2}),b.PEYMENT_IPOTEKA&&y.push({id:"mortgage",title:"ÐпоÑека",value:b.PEYMENT_IPOTEKA,description:b.PEYMENT_IPOTEKA_DESC,icon:"/_images/payment_methods/percent.png",priority:3}),b.PEYMENT_IPOTEKA2&&y.push({id:"mortgage2",title:"ÐпоÑека",value:b.PEYMENT_IPOTEKA2,description:b.PEYMENT_IPOTEKA2_DESC,icon:"/_images/payment_methods/percent.png",priority:4}),y.sort((p,w)=>p.priority-w.priority)});return(b,y)=>{const p=de;return s(v).length>0?(o(),m("div",ot,[y[0]||(y[0]=l("h3",{class:"text-h2-2 text-neutral2-800 font-weight-bold d-none d-sm-block"}," СпоÑÐ¾Ð±Ñ Ð¾Ð¿Ð»Ð°ÑÑ ",-1)),n(p,null,{default:a(()=>[l("swiper-container",{ref_key:"containerRefPaymentMethods",ref:A,style:{width:"100%"},"slides-per-view":1.1,spaceBetween:24,breakpoints:{640:{slidesPerView:1.8},960:{slidesPerView:3}}},[(o(!0),m(J,null,K(s(v),w=>(o(),m("swiper-slide",{key:`paymentMethods-${w.id}`},[n(Z,{color:"white",rounded:"16",class:"pa-8 d-flex flex-column payments-methods__card h-100"},{default:a(()=>[l("span",it,d(w.value),1),l("span",rt,d(w.title),1),w.description?(o(),m("span",ut,d(w.description),1)):f("",!0),n(H,{src:w.icon,height:"100%",width:"188px",cover:"",class:"position-absolute top-0 right-0"},null,8,["src"])]),_:2},1024)]))),128))],512)]),_:1})])):f("",!0)}}}),dt={class:"d-flex flex-column ga-3"},mt={key:0,class:"text-sm-h2-2 text-h2 font-weight-bold"},pt={key:1,class:"text-body-1"},ft={class:"d-flex align-center ga-3"},gt={class:"d-flex align-center ga-2"},_t=X({__name:"JkBanner",props:{project:{}},setup(g){const{t:A}=le();return(v,b)=>{var y,p;return(p=(y=v.project)==null?void 0:y.attributes)!=null&&p.CODE?(o(),C(Z,{key:0,color:"black-body",class:"pa-8 jk-banner d-flex flex-column flex-sm-row align-start justify-space-between",rounded:"16","min-height":"441",href:`/projects/${v.project.attributes.CODE}`},{default:a(()=>[v.project.attributes.PROJECT_SLIDER[0]?(o(),m("div",{key:0,class:"jk-banner-image",style:Ae(`--jk-banner: url(${v.project.attributes.PROJECT_SLIDER[0]})`)},null,4)):f("",!0),l("div",dt,[v.project.attributes.NAME?(o(),m("h4",mt,d(v.project.attributes.NAME),1)):f("",!0),v.project.attributes.PROJECT_ADDRESS?(o(),m("p",pt,d(v.project.attributes.PROJECT_ADDRESS),1)):f("",!0),l("div",ft,[v.project.attributes.PROJECT_PRICE?(o(),C(_e,{key:0,density:"compact",class:"text-white text-caption py-1 px-2 line-height-1",rounded:"full"},{default:a(()=>[k(d(v.project.attributes.PROJECT_PRICE),1)]),_:1})):f("",!0),v.project.attributes.PROJECT_TYPE?(o(),C(_e,{key:1,density:"compact",class:"text-white text-caption py-1 px-2 line-height-1",rounded:"full"},{default:a(()=>[k(d(v.project.attributes.PROJECT_TYPE.join(", ")),1)]),_:1})):f("",!0)])]),n(I,{density:"compact",size:"large",color:"black",class:"jk-banner-button px-4",rounded:"full"},{default:a(()=>
1[l("div",gt,[k(d(s(A)("go-to-project","ÐеÑейÑи к пÑоекÑÑ"))+" ",1),n(V,{class:"font-weight-medium",size:"24"},{default:a(()=>b[0]||(b[0]=[k(" arrow-right-up-line ")])),_:1})])]),_:1})]),_:1},8,["href"])):f("",!0)}}}),bt={class:"construction-progress"},ht={class:"d-none d-sm-flex justify-space-between align-center mb-8"},vt={class:"text-h2-2 font-weight-bold"},wt={key:0,class:"d-flex align-center ga-4"},yt=["onClick"],xt={key:1,class:"d-flex align-end h-100 construction-progress__card__content"},kt={class:"text-h3 font-weight-semibold text-white"},$t={class:"d-flex justify-space-between align-center mb-9 position-relative ga-6"},Et={class:"text-lg-h2-2 text-md-h2 text-h3 font-weight-bold text-neutral-800 text-lg-center w-100 flex-1 pl-lg-11"},Ct={key:0,class:"d-flex"},Pt=["src"],jt={class:"d-flex"},It=X({__name:"ConstructionProgress",props:{construction:{}},setup(g){const{smAndDown:A}=xe(),{t:v}=le(),b=$(null),y=se(b),p=$(!1),w=$(null),W=j=>{w.value=j,p.value=!0};return(j,_)=>{const T=de;return o(),m("div",bt,[l("div",ht,[l("h3",vt,d(s(v)("construction-progress","Ход ÑÑÑоиÑелÑÑÑва")),1),j.construction.length>(s(A)?2:3)?(o(),m("div",wt,[n(I,{color:"white",height:"44",width:"44",rounded:"full",icon:"",onClick:_[0]||(_[0]=c=>s(y).prev())},{default:a(()=>[n(V,{size:"20",color:"primary"},{default:a(()=>_[4]||(_[4]=[k("arrow-left-s-line")])),_:1})]),_:1}),n(I,{color:"white",height:"44",width:"44",rounded:"full",icon:"",onClick:_[1]||(_[1]=c=>s(y).next())},{default:a(()=>[n(V,{size:"20",color:"primary"},{default:a(()=>_[5]||(_[5]=[k("arrow-right-s-line")])),_:1})]),_:1})])):f("",!0)]),n(T,null,{default:a(()=>[l("swiper-container",{ref_key:"containerRefConstructionProgress",ref:b,style:{width:"100%"},"slides-per-view":1.4,spaceBetween:24,breakpoints:{640:{slidesPerView:1.9},960:{slidesPerView:3},1920:{slidesPerView:4}}},[(o(!0),m(J,null,K(j.construction,(c,S)=>(o(),m("swiper-slide",{key:S,class:"d-flex",onClick:z=>W(c)},[n(Z,{rounded:"16",height:"336",width:"100%",class:"position-relative py-8 px-4 px-sm-10 construction-progress__card"},{default:a(()=>[c.attributes.PC_IMAGE_PREVIEW?(o(),C(H,{key:0,src:c.attributes.PC_IMAGE_PREVIEW,width:"100%",height:"100%",cover:"",class:"position-absolute construction-progress__card__image"},null,8,["src"])):f("",!0),c.attributes.NAME?(o(),m("div",xt,[l("h5",kt,d(c.attributes.NAME),1)])):f("",!0)]),_:2},1024)],8,yt))),128))],512)]),_:1}),s(w)?(o(),C(Pe,{key:0,modelValue:s(p),"onUpdate:modelValue":_[3]||(_[3]=c=>G(p)?p.value=c:null),"max-width":"1360"},{default:a(()=>[n(Z,{color:"white",rounded:"16",class:"position-relative pa-lg-11 pa-md-8 pa-6 d-fle flex-column"},{default:a(()=>[l("div",$t,[l("h5",Et,d(s(w).attributes.NAME),1),n(I,{height:"44",width:"44",color:"transparent",icon:"",onClick:_[2]||(_[2]=c=>p.value=!1)},{default:a(()=>[n(V,{size:"24",class:"font-weight-medium",color:"neutral-400"},{default:a(()=>_[6]||(_[6]=[k(" close-line ")])),_:1})]),_:1})]),n(T,null,{default:a(()=>[l("swiper-container",{ref_key:"containerRefConstructionProgress",ref:b,style:{width:"100%"},"slides-per-view":1,spaceBetween:24},[s(w).attributes.PC_VIDEO_ID?(o(),m("swiper-slide",Ct,[l("iframe",{id:"ytplayer1118",width:"100%",height:"auto",style:{"min-height":"500px"},src:`https://www.youtube.com/embed/${s(w).attributes.PC_VIDEO_ID}`,title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:"",class:"rounded-16"},null,8,Pt)])):f("",!0),l("swiper-slide",jt,[s(w).attributes.PC_IMAGE_PREVIEW?(o(),C(H,{key:0,src:s(w).attributes.PC_IMAGE_PREVIEW,width:"100%",height:"100%",cover:"","max-height":"746px",class:"rounded-16"},null,8,["src"])):f("",!0)])],512)]),_:1})]),_:1})]),_:1},8,["modelValue"])):f("",!0)])}}}),Vt={class:"d-flex flex-column"},At={class:"d-flex flex-column flex-sm-row flex-md-column justify-space-between align-start ga-4 ga-sm-15 ga-md-4"},Tt={class:"flex-1 w-100 d-flex flex-column ga-4"},Mt={class:"text-neutral2-800 text-h3 font-weight-semibold"},Dt={class:"d-flex flex-column gap-10"},Lt={class:"text-h6 text-neutral2-700 font-weight-semibold"},St={class:"d-flex flex-column"},Nt={key:0,class:"d-flex justify-space-between align-start py-2 border-b-sm border-neutral2-400"},Rt={class:"text-body-1 text-neutral2-400"},Ot={class:"text-body-1 text-neutral2-600"},Bt={key:1,class:"d-flex justify-space-between align-start py-2 border-b-sm border-neutral2-400"},zt={class:"text-body-1 text-neutral2-400"},Yt={class:"text-body-1 text-neutral2-600"},Ut={key:2,class:"d-flex justify-space-between align-start py-2 border-b-sm border-neutral2-400"},Jt={class:"text-body-1 text-neutral2-400"},Ft={class:"text-body-1 text-neutral2-600"},Kt={key:3,class:"d-flex justify-space-between align-start py-2"},Zt={class:"text-body-1 text-neutral2-400"},Wt={class:"text-body-1 text-neutral2-600"},Gt={class:"d-flex flex-column border-sm rounded-8 border-neutral2-400 pa-4 gap-10 w-100 flex-1"},Ht={class:"d-flex align-center ga-1"},Qt={class:"text-neutral2-700 text-h6 font-weight-semibold"},qt={class:"d-flex flex-column gap-6"},Xt={class:"text-body-1 text-neutral2-400"},ea={class:"text-body-1 text-neutral2-600"},ta={class:"d-flex justify-space-between align-end ga-2"},aa={class:"text-h3 text-neutral2-700 font-weight-semibold"},sa={class:"text-body-1 text-neutral2-400 mb-2px"},la={class:"d-flex flex-column ga-3"},na={key:0,class:"d-flex align-center justify-space-between"},oa={class:"d-flex ga-1 align-center"},ia={class:"text-body-1 text-neutral2-400"},ra={class:"text-body-1 text-neutral2-600"},ua={class:"d-flex flex-column ga-2"},ca={class:"bg-neutral2-50 py-md-11 py-8"},$a=X({__name:"index",async setup(g){let A,v;const b=Te(),{$repositories:y}=Ie(),{t:p}=le(),w=ke(),W=$e(),{user:j}=Ee(W),_=$(null),T=$([]),c=R(()=>b.params.slug),{data:S,error:z}=([A,v]=Me(async()=>Se(`apartment-${c.value}`,async()=>{try{return await y.apartments.getBySlug(c.value)}catch(i){throw console.error("Error fetching apartment:",i),i}})),A=await A,v(),A),t=R(()=>S.value||{});if(z.value||!t.value)throw De({statusCode:404,message:p("news_not_found","ÐваÑÑиÑа не найдена"),fatal:!0});const F=R(()=>[{title:p("home","ÐлавнаÑ"),disabled:!1,href:w("/")},{title:p("apartments","ÐваÑÑиÑÑ"),disabled:!1,to:w("/apartments")},{title:"â"+t.value.attributes.flat_number,disabled:!0,to:w(`/apartments/${c.value}`)}]),O=$({}),ne=async()=>{var i;if((i=j.value)!=null&&i.id){const u=await y.like.getAll(),r=(u==null?void 0:u.reduce((e,x)=>(e[x.UF_ELEMENT_ID]={entity_type:x.UF_ENTITY_TYPE,element_id:x.UF_ELEMENT_ID},e),{}))||{};O.value=r}else O.value=localStorage.getItem("likedApartments")?JSON.parse(localStorage.getItem("likedApartments")||"{}"):{}};Ce(async()=>{setTimeout(async()=>{var i;if(t.value.attributes.bus_code){try{_.value=await y.newbuildings.getById(t.value.attributes.bus_code)}catch(u){console.log("Error fetching project data:",u)}try{T.value=await y.newbuildings.getConstructions(+t.value.attributes.bus_code)}catch(u){console.log("Error fetching project data:",u)}}if((i=j.value)!=null&&i.id&&localStorage.getItem("likedApartments")){O.value=JSON.parse(localStorage.getItem("likedApartments")||"{}");try{await y.like.likeActionMultiply(Object.keys(O.value).map(u=>({element_id:O.value[u].element_id,entity_type:O.value[u].entity_type}))),localStorage.removeItem("likedApartments")}catch(u){console.log(u,"ÐÑибка пÑи оÑпÑавке лайков из localStorage")}}await ne()},0)});const N=R(()=>{var x;
1const i=t.value.attributes.room_count===0?"СÑÑдиÑ":`${t.value.attributes.room_count}-комнаÑÐ½Ð°Ñ ÐºÐ²Ð°ÑÑиÑа`,u=t.value.attributes.total_area?`, ${t.value.attributes.total_area} м²`:"",r=(x=t.value.attributes.project)!=null&&x.name?` в ÐÐ "${t.value.attributes.project.name}"`:"",e=t.value.attributes.block?`, ${t.value.attributes.block}`:"";return`${i}${u}${r}${e}`}),oe=R(()=>{var E,Y;const i=t.value.attributes.room_count===0?"СÑÑдиÑ":`${t.value.attributes.room_count}-комнаÑÐ½Ð°Ñ ÐºÐ²Ð°ÑÑиÑа`,u=t.value.attributes.total_area?`плоÑадÑÑ ${t.value.attributes.total_area} м²`:"",r=(E=t.value.attributes.project)!=null&&E.name?` в жилом комплекÑе "${t.value.attributes.project.name}"`:"",e=t.value.attributes.floor?`, ${t.value.attributes.floor}`:"",x=t.value.attributes.price?`. СÑоимоÑÑÑ: ${q(t.value.attributes.price)}.`:"",h=(Y=t.value.attributes.due_date)!=null&&Y.name?` СдаÑа: ${be(t.value.attributes.due_date.name)}.`:"";return`${i} ${u}${r}${e}${x}${h} ÐÐ¾Ð»Ð½Ð°Ñ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð¾ кваÑÑиÑе, планиÑовка и ÑÑÐ»Ð¾Ð²Ð¸Ñ Ð¿Ð¾ÐºÑпки.`}),ie=R(()=>{const i=[...t.value.attributes.layout_images||[],...t.value.attributes.floor_images||[],...t.value.attributes.map_images||[],...t.value.attributes.window_images||[]];return i.length>0?i[0]:null}),ee=R(()=>{var r,e;if(!((r=t.value.attributes)!=null&&r.down_payments)||t.value.attributes.down_payments.length===0)return{percentage:100,price:((e=t.value.attributes)==null?void 0:e.price)||0};const i=t.value.attributes.down_payments;let u=i.find(x=>x.percentage===50);if(!u){const x=i.filter(h=>h.percentage<50);x.length>0&&(u=x.reduce((h,E)=>h.percentage>E.percentage?h:E))}return u||(u=i.find(x=>x.percentage===100)||i[0]),{percentage:u.percentage,price:u.price}}),re=R(()=>`/apartments/${c.value}`),{generateAlternateUrls:M}=ye();return ye({title:N.value,description:oe.value,image:ie.value||"",alternateUrls:M(re.value)}),(i,u)=>{const r=nt,e=Ne("v-btn-2"),x=ct,h=Be,E=_t,Y=It;return o(),C(Le,{class:"d-flex flex-column page-apartment-slug overflow-hidden gap-80"},{default:a(()=>{var Q,P,U;return[l("div",Vt,[n(ae,{class:"d-flex flex-column gap-80 px-0 px-sm-8 px-md-4 pb-0 rounded-16"},{default:a(()=>[n(ze,{class:"mb-sm-6 mb-4 px-sm-0 px-4",items:F.value},null,8,["items"])]),_:1}),n(ae,{class:"d-flex flex-column gap-80 px-0 pt-0 px-sm-8 px-md-4 pb-6 page-apartment-slug__container rounded-16"},{default:a(()=>[l("div",null,[n(Re,null,{default:a(()=>[n(he,{lg:"8",md:"12",cols:"12",class:"pb-3 pb-sm-0 pb-md-3"},{default:a(()=>{var D,B;return[n(r,{like:!!((B=(D=s(O))==null?void 0:D[t.value.id])!=null&&B.element_id),flat:t.value},null,8,["like","flat"])]}),_:1}),n(he,{lg:"4",md:"12",cols:"12",class:"pt-3 pt-sm-0 pt-md-3"},{default:a(()=>[n(Z,{color:"white",rounded:"24",class:"page-apartment-slug__col py-sm-6 px-sm-8 px-4 pb-0 pb-sm-6 d-flex flex-column ga-4 properties-card"},{default:a(()=>{var D,B;return[l("div",At,[l("div",Tt,[l("h1",Mt,d(t.value.attributes.room_count==0?"СÑÑдиÑ":`${t.value.attributes.room_count} ${("sklonenie"in i?i.sklonenie:s(je))(t.value.attributes.room_count,["комнаÑа","комнаÑÑ","комнаÑ"])}`)+", "+d(t.value.attributes.total_area)+" м² ",1),l("div",Dt,[l("h4",Lt,d(s(p)("flat-characteristics","ХаÑакÑеÑиÑÑики")),1),l("div",St,[t.value.attributes.flat_number?(o(),m("div",Nt,[l("span",Rt,d(s(p)("flat-number","ÐÐ¾Ð¼ÐµÑ ÐºÐ²Ð°ÑÑиÑÑ")),1),l("span",Ot,d(t.value.attributes.flat_number),1)])):f("",!0),t.value.attributes.floor?(o(),m("div",Bt,[l("span",zt,d(s(p)("flat-floor","ÐÑаж")),1),l("span",Yt,d(t.value.attributes.floor.replace("ÐÑаж",""))+" из "+d(t.value.attributes.max_floor),1)])):f("",!0),t.value.attributes.block?(o(),m("div",Ut,[l("span",Jt,d(s(p)("flat-block","Ðлок")),1),l("span",Ft,d((D=t.value.attributes.block)==null?void 0:D.replace("Ðлок","")),1)])):f("",!0),t.value.attributes.project?(o(),m("div",Kt,[l("span",Zt,d(s(p)("flat-project","ÐовоÑÑÑойка")),1),l("span",Wt,d((B=t.value.attributes.project)==null?void 0:B.name),1)])):f("",!0)])])]),l("div",Gt,[n(Ye,{flat:""},{default:a(()=>[n(Ue,null,{default:a(()=>[n(Je,{class:"px-0 py-1","min-height":"auto",static:""},{actions:a(({expanded:L})=>[l("div",Ht,[n(V,{color:"neutral2-200",size:"18",icon:L?"arrow-down-s-line":"arrow-up-s-line"},null,8,["icon"])])]),default:a(()=>[l("span",Qt,d(s(p)("flat-price","СÑоимоÑÑÑ Ð½ÐµÐ´Ð²Ð¸Ð¶Ð¸Ð¼Ð¾ÑÑи")),1)]),_:1}),n(Fe,{class:"pa-0"},{default:a(()=>[l("div",qt,[(o(!0),m(J,null,K(t.value.attributes.down_payments,L=>(o(),m("div",{key:`payment.offer_id-${L.offer_id}`,class:"d-flex justify-space-between align-center"},[l("span",Xt,d(s(p)("flat-down-payment","пÑи ÐÐ"))+" "+d(L.percentage)+"% ",1),l("span",ea,d(("formatPrice"in i?i.formatPrice:s(q))(L.price)),1)]))),128))])]),_:1})]),_:1})]),_:1}),u[1]||(u[1]=l("div",{class:"border-b-sm border-neutral2-400"},null,-1)),l("div",ta,[l("span",aa,d(("formatPrice"in i?i.formatPrice:s(q))(t.value.attributes.price)),1),l("span",sa,d(("formatPrice"in i?i.formatPrice:s(q))(t.value.attributes.price_per_m2))+" за м² ",1)])])]),l("div",la,[t.value.attributes.due_date?(o(),m("div",na,[l("div",oa,[l("span",ia,d(s(p)("flat-due-date","ÐаÑа ÑдаÑи")),1),n(ce,{location:"top",text:s(p)("tooltip_date","ÐаÑа ÑдаÑи")},{activator:a(({props:L})=>[n(V,ue(L,{size:"16",color:"neutral2-200"}),{default:a(()=>u[2]||(u[2]=[k(" information-fill ")])),_:2},1040)]),_:1},8,["text"])]),l("span",ra,d(("formatQuarter"in i?i.formatQuarter:s(be))(t.value.attributes.due_date.name)),1)])):f("",!0),l("div",ua,[n(e,{color:"primary",rounded:"16",onClick:u[0]||(u[0]=L=>{var me,pe,fe;return i.$openModal("call-back",{project:t.value.attributes.bus_code,hidden_comment:`ÐаÑвка Ñ ÑÑÑаниÑÑ ÐºÐ²Ð°ÑÑиÑÑ â${t.value.id}, ÐÐ: ${(fe=(pe=(me=t.value)==null?void 0:me.attributes)==null?void 0:pe.project)==null?void 0:fe.name}
1, колиÑеÑÑво комнаÑ: ${t.value.attributes.room_count}, плоÑадÑ: ${t.value.attributes.total_area} м², ÑÑоимоÑÑÑ: ${("formatPrice"in i?i.formatPrice:s(q))(t.value.attributes.price)}`})})},{default:a(()=>[k(d(s(p)("flat-leave-request","ÐÑÑавиÑÑ Ð·Ð°ÑвкÑ")),1)]),_:1})])])]}),_:1})]),_:1})]),_:1})]),s(_)?(o(),C(x,{key:0,project:s(_),class:"px-4 px-sm-0"},null,8,["project"])):f("",!0)]),_:1})]),l("section",ca,[n(ae,{class:"d-flex flex-column gap-80 pt-0"},{default:a(()=>[n(h,{"apartment-price":ee.value.price},null,8,["apartment-price"])]),_:1})]),(P=(Q=s(_))==null?void 0:Q.attributes)!=null&&P.CODE||(U=s(T))!=null&&U.length?(o(),C(ae,{key:0,class:"d-flex flex-column gap-80 pt-0"},{default:a(()=>{var D,B,L;return[(B=(D=s(_))==null?void 0:D.attributes)!=null&&B.CODE?(o(),C(E,{key:0,project:s(_)},null,8,["project"])):f("",!0),(L=s(T))!=null&&L.length?(o(),C(Y,{key:1,construction:s(T)},null,8,["construction"])):f("",!0),u[3]||(u[3]=l("div",null,null,-1))]}),_:1})):f("",!0)]}),_:1})}}});
1export{$a as default};
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.