1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9508],{1322:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var r,s,i=a(14232);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e}).apply(null,arguments)}let l=function(e){return i.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),r||(r=i.createElement("path",{fill:"none",d:"M0 0h24v24H0z"})),s||(s=i.createElement("path",{d:"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54z"})))}},9276:e=>{e.exports={favorites:"MyFavorites_favorites__gJHYr",favorites_content:"MyFavorites_favorites_content__W4jdS"}},17377:(e,t,a)=>{"use strict";a.d(t,{F:()=>s,V:()=>i});var r=a(21293);function s(e){if(e?.text?.boolVal===!0)return!0;let t=e?.text?.strVal;if(!t)return!1;try{let e=JSON.parse(t);return!0===e.machineTranslated}catch{return!1}}function i(e,t,a,n={}){let l=n.includeMachineTranslated??!1;if(!e?.length)return;let d=function(e,t){let a=(0,r.F)(e),s=a.find(e=>e.locale===t)??a.find(e=>t.startsWith(e.locale||""));if(s?.id!=null)return s.id;let i=t.substring(0,2),n=a.find(e=>e.locale?.startsWith(i));return n?.id}(t,a);if(null!=d){let t=e.filter(e=>e.data1?.intVal===d),a=t.find(e=>!s(e));return a||(l&&t[0]?t[0]:void 0)}let c=e.find(e=>!s(e));return c||(l?e[0]:void 0)}},23012:()=>{},38571:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(37876),s=a(15039),i=a.n(s);let n=({variant:e="light",count:t=1})=>{let a="dark"===e,s=i()("animate-pulse rounded-2xl overflow-hidden",a?"bg-[hsl(30,10%,20%)]":"bg-gray-200"),n=i()("rounded",a?"bg-[hsl(30,10%,25%)]":"bg-gray-300"),l=()=>(0,r.jsxs)("div",{className:s,children:[(0,r.jsx)("div",{className:`h-48 ${a?"bg-[hsl(30,10%,25%)]":"bg-gray-300"}`}),(0,r.jsxs)("div",{className:"p-4 space-y-3",children:[(0,r.jsx)("div",{className:`h-4 ${n} w-1/3`}),(0,r.jsx)("div",{className:`h-5 ${n} w-3/4`}),(0,r.jsx)("div",{className:`h-4 ${n} w-1/2`}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:`h-4 ${n} w-12`}),(0,r.jsx)("div",{className:`h-4 ${n} w-12`})]})]})]});return(0,r.jsx)(r.Fragment,{children:Array.from({length:t}).map((e,t)=>(0,r.jsx)(l,{},t))})}},43425:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>q});var r=a(37876),s=a(14232),i=a(31777),n=a(64832),l=a(54783),d=a(60510),c=a(55290),o=a(59212),_=a.n(o),u=a(1322),m=a(54587),x=a.n(m),h=a(18325),f=a(48230),v=a.n(f),p=a(67227),g=a(17377),j=a(89099);let N=({handleDeleteFavoriteProp:e,currenciesData:t,squareMeter:a,address:n,index:o,propertyId:m,id:f,country:N,proposalName:b,propertyName:y,userImg:P,fieldList:V})=>{let w=(0,j.useRouter)().query.lang,{languages:I,globalLang:S}=(0,l.G)(({home:e,locales:t})=>({languages:e.data.language,globalLang:t.data.selectedLang}),i.bN),[F,L]=(0,s.useState)(),[M,C]=(0,s.useState)(),[U,$]=(0,s.useState)(),[A,O]=(0,s.useState)(),[E,q]=(0,s.useState)(!0),D=(0,g.V)(U?.fieldValueList,I,w||S||"en-US")?.data2?.strVal;(0,s.useEffect)(()=>
1{V.forEach(e=>{"Images"===e.name?L(e):"Market Price"===e.name?C(e):"Title"===e.name?$(e):"Square Meters Total"===e.name&&O(e)})},[]);let k=(0,p.X_)(y.name,N.name,n?.fieldValueList?.[0]?.text?.strVal,D,m);return(0,r.jsxs)("div",{"data-testid":`favorite-card-${o}`,className:_().card,children:[(0,r.jsxs)("div",{className:_().card_imgPart,children:[(0,r.jsx)(d.A,{currenciesData:t,data:F,link:k,currencyId:M?.fieldValueList?.[0]?.data1?.intVal??0,price:M?.fieldValueList?.[0]?.data2?.doubleVal?.toString()??M?.fieldValueList?.[0]?.data2?.strVal??"0",index:o}),(0,r.jsx)("div",{"data-testid":`favorite-icon-${o}`,className:`${_().card_imgPart_favIcon} ${E?_().showFavIcon:""}`,onClick:()=>{e(f,o),q(!1)},children:(0,r.jsx)(u.A,{})})]}),(0,r.jsx)(v(),{legacyBehavior:!0,href:k,children:(0,r.jsxs)("div",{className:_().card_content,children:[P&&(0,r.jsx)("div",{className:_().card_content_userImage,children:(0,r.jsx)(x(),{fill:!0,className:"h-full",src:c.M3+P,alt:"",style:{objectFit:"cover",borderRadius:"50%"}})}),(0,r.jsx)("div",{className:_().card_content_title,children:D?.length&&D.length>22?D.substring(0,22)+"...":D}),(0,r.jsxs)("div",{className:_().card_content_button,children:[(0,r.jsx)("div",{className:_().card_content_info_types,children:(0,r.jsx)("div",{className:_().card_content_info_types_item,children:y?.name})}),(0,r.jsx)("button",{children:b?.name})]}),(0,r.jsxs)("div",{className:_().card_content_info,children:[(0,r.jsx)("div",{className:_().card_content_info_square,children:"Ft"===a&&A?.fieldValueList?.[0]?.data1?.intVal===1?(0,r.jsxs)("div",{children:[(0,h.st)(`${Math.round(11*Number(A?.fieldValueList[0]?.text?.bigIntVal))}`)," ",a,(0,r.jsx)("sup",{children:"2"})]}):"Ft"===a&&A?.fieldValueList?.[0]?.data1?.intVal===2?(0,r.jsxs)("div",{children:[(0,h.st)(`${A?.fieldValueList[0]?.text?.bigIntVal}`)," ",a,(0,r.jsx)("sup",{children:"2"})]}):"M2"===a&&A?.fieldValueList?.[0]?.data1?.intVal===2?(0,r.jsxs)("div",{children:[(0,h.st)(`${Math.round(.1*Number(A?.fieldValueList[0]?.text?.bigIntVal))}`)," ",a]}):"M2"===a&&A?.fieldValueList?.[0]?.data1?.intVal===1?(0,r.jsxs)("div",{children:[(0,h.st)(`${A?.fieldValueList[0]?.text?.bigIntVal}`)," ",a]}):void 0}),(0,r.jsx)("div",{className:_().card_content_info_address,children:N.name})]})]})})]})};var b=a(9276),y=a.n(b),P=a(66110),V=a(7784),w=a(38571);let I=()=>{let{currenciesData:e,t,squareMeter:a}=(0,l.G)(({home:e,locales:t})=>({t:t.data.translation,squareMeter:t.data.squareMeter,currenciesData:e.data.currencies}),i.bN),d=(0,l.j)(),[c,o]=(0,s.useState)([]),[_,u]=(0,s.useState)(!0),m=(0,s.useCallback)(async()=>{let e=localStorage.getItem("user");if(!e)return void u(!1);let t=JSON.parse(e);if(t.id)try{let e=await (0,P.dE)(t.id);o(e??[])}catch(e){console.log("error == ",e)}finally{u(!1)}else u(!1)},[]);(0,s.useEffect)(()=>{m();let e=localStorage.getItem("user");if(!e)return;let{id:t}=JSON.parse(e);0===c.length&&d((0,n.Yp)(t))},[m]);let x=async(e,t)=>{c.splice(t,1);let a=localStorage.getItem("user");if(!a)return;let r=JSON.parse(a);await d((0,V.r8)(r.id,e))};return(0,r.jsx)("div",{className:y().favorites,children:(0,r.jsx)("div",{className:y().favorites_content,children:_&&0===c.length?(0,r.jsx)("div",{className:"flex flex-wrap justify-center gap-6 w-full",children:(0,r.jsx)(w.A,{variant:"light",count:3})}):c.length>0?c.map(({resource:t,id:s},i)=>(0,r.jsx)("div",{className:y().favorites_content_item,children:t&&(0,r.jsx)(N,{currenciesData:e,squareMeter:a,index:i,handleDeleteFavoriteProp:x,id:s??0,propertyId:t.id,country:t.country,fieldList:t.fieldList,propertyName:t.propertyType,proposalName:t.propertyProposal,userImg:t.user.imageLink,address:t.fieldList.find(e=>"Location"===e.name)})},i)):(0,r.jsx)("h1",{children:t["Properties.none.favoriteProperties"]})})})};var S=a(15173),F=a(20650),L=a(33431),M=a(53814),C=a.n(M),U=a(22747),$=a(81951),A=a(97661),O=a(29843),E=a(45364);let q=()=>{let e=(0,l.j)(),t=(0,j.useRouter)(),a=`${c.oO}/static/hallocasa_logo_blue.webp`,{isOpenLoginModal:i,t:n}=(0,l.G)(({login:e,locales:t})=>({isOpenLoginModal:e.data.isOpenLoginModal,t:t.data.translation})),{isSigned:d,isLoading:o}
1=(0,O.A)(),[_,u]=(0,s.useState)(!1),m=(0,s.useMemo)(()=>{let e=t.asPath?.slice(-2);return e&&L.x.home[e]?e:"en-US"},[t.asPath]),x=(0,s.useMemo)(()=>L.x.home[m],[m]);return(0,s.useEffect)(()=>{!o&&(d?i&&e((0,U.bJ)(!1)):e((0,U.bJ)(!0)))},[o,d,i,e]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(F.A,{title:x?.title,description:x?.desc,image:a}),(0,r.jsxs)("div",{className:C().profile,children:[(0,r.jsx)(S.A,{}),(0,r.jsx)("div",{className:C().profile_content,children:o?(0,r.jsx)(E.A,{}):d?(0,r.jsx)(I,{}):(0,r.jsx)("div",{className:"flex items-center justify-center min-h-[400px]",children:(0,r.jsx)("div",{className:"text-center",children:(0,r.jsx)("h1",{className:"text-2xl font-semibold mb-4",children:(0,p.BV)("Please login to access your favorites",n)})})})})]}),(0,r.jsx)($.A,{isOpenModal:i,setOpenModal:t=>{let a="function"==typeof t?t(i):t;e((0,U.bJ)(a))},setOpenRegisterModal:u}),_&&(0,r.jsx)(A.A,{isOpenModal:_,setOpenModal:u})]})}},45364:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(37876),s=a(15039),i=a.n(s);let n=({className:e})=>(0,r.jsxs)("div",{className:i()("animate-pulse space-y-4 p-6 min-h-[400px] max-w-4xl mx-auto w-full",e),"aria-hidden":!0,children:[(0,r.jsx)("div",{className:"h-8 w-1/3 rounded bg-gray-200"}),(0,r.jsx)("div",{className:"h-4 w-2/3 rounded bg-gray-200"}),(0,r.jsx)("div",{className:"h-64 w-full rounded bg-gray-200"})]})},48771:(e,t,a)=>{"use strict";a.d(t,{p:()=>s});var r=a(30455);let s=(e,t,a,s)=>{if(null==s||""===s)return"";let i=String(s);if(!Number.isFinite(Number(i)))return i;let n=a[t]?.USD??NaN,l=a?.USD?.[e]??NaN;return e!==t&&Number.isFinite(n)&&Number.isFinite(l)?new r.A(i).times(n).times(l).ceil().toString():i}},53732:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/profile/my-favorites",function(){return a(43425)}])},59212:e=>{e.exports={card:"FavoritePropCard_card__etd8D",card_price:"FavoritePropCard_card_price__4Ubx3",card_imgPart:"FavoritePropCard_card_imgPart__RH7ay",card_imgPart_favIcon:"FavoritePropCard_card_imgPart_favIcon__UOxJN",card_content:"FavoritePropCard_card_content__ovpoY",card_content_userImage:"FavoritePropCard_card_content_userImage__gAlKa",card_content_button:"FavoritePropCard_card_content_button___7MyV",card_content_info:"FavoritePropCard_card_content_info__duzGb",card_content_info_types:"FavoritePropCard_card_content_info_types__IHEBt",card_content_info_types_item:"FavoritePropCard_card_content_info_types_item__3QIYL",card_content_info_address:"FavoritePropCard_card_content_info_address__NIz8E",card_content_info_divider:"FavoritePropCard_card_content_info_divider__vCuwG",card_content_info_square:"FavoritePropCard_card_content_info_square__ozP_D",card_content_title:"FavoritePropCard_card_content_title___cuhM",showFavIcon:"FavoritePropCard_showFavIcon__ja565"}},60510:(e,t,a)=>{"use strict";a.d(t,{A:()=>j});var r=a(37876),s=a(27888);a(97603),a(73797);var i=a(52851),n=a(90624),l=a(14232),d=a(55290),c=a(73463),o=a.n(c),_=a(18325),u=a(54783),m=a(48771),x=a(54587),h=a.n(x),f=a(14e3),v=a(51524);let p="/static/hallocasa_logo_blue.jpeg",g=({curr:e,price:t,currenciesData:a,currencyId:s,exchangeRates:i})=>(0,r.jsx)("div",{children:(0,_.qL)((0,m.p)(e,a?.filter(({id:e})=>e===s)[0]?.abbreviation??"",i,t),e)}),j=({currenciesData:e,currencyId:t,data:a,price:c,link:_,index:m})=>{let{exchangeRates:x}=(0,u.G)(({home:e})=>({exchangeRates:e.data.exchangeRates})),j=(0,f.useSearchParams)(),N=(0,u.j)(),[b,y]=(0,l.useState)(2),P=j?.get("curr")??"USD";(0,l.useEffect)(()=>{x.USD||N((0,v.Rm)())},[]);let V=()=>(0,r.jsx)("div",{className:o().card_price,children:c&&(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)("div",{"data-testid":`my-property-price-${m}`,children:(0,r.jsx)(g,{curr:P,price:c,currencyId:t,currenciesData:e,exchangeRates:x})}),(0,r.jsx)("div",{"data-testid":`my-property-currency-${m}`,children:P})]})}),w=({index:e,slideIndex:t=0,imageUrl:a})=>{let s=a||p;return(0,r.jsxs)("div",{children:[(0,r.jsx)(V,{}),(0,r.jsx)("div",{className:o().slider,children:(0,r.jsx)(h(),{"data-testid":0===t?`my-property-${e}`:void 0,fill:!0,src:s,alt:""})})]})},I=(e,t)=>e&&0!==e.length?e.map(({data1:e},a)=>(0,r.jsx)(s.qr,{children:_?(0,r.jsx)("a",{href:_,children:(0,r.jsx)(w,{index:t,slideIndex:a,imageUrl:d.U$+(e?.strVal||"")})}):(0,r.jsx)(w,{index:t,slideIndex:a,imageUrl:d.U$+(e?.strVal||"")})},`${t}-${a}`)):(0,r.jsx)(s.qr,{children:_?(0,r.jsx)("a",{href:_,children:(0,r.jsx)(w,{index:t,slideIndex:0,imageUrl:p})}):(0,r.jsx)(w,{index:t,slideIndex:0,imageUrl:p})},`${t}-default`),S=a?.fieldValueList?.length&&a?.fieldValueList?.length>1,F=a?.fieldValueList??[];return(0,r.jsx)(r.Fragment,{children:S?(0,r.jsx)(s.RC,{grabCursor:!0,slidesPerView:1,loop:!0,navigation:!0,modules:[i.A,n.A],autoplay:!0,className:o().UserPropImgSlider,onSlideChange:e=>{e.activeIndex===b-1&&y(b+1)},children:I(F.slice(0,b),m)}):I(F,m)})}},73463:e=>{e.exports={UserPropImgSlider:"UserPropImgSlider_UserPropImgSlider__bcNdD",slider:"UserPropImgSlider_slider__Ljtso",slider_arrowNext:"UserPropImgSlider_slider_arrowNext__H2Egq",slider_arrowPrev:"UserPropImgSlider_slider_arrowPrev__Glsim",card_price:"UserPropImgSlider_card_price__UM_uM"}}},e=>{e.O(0,[4409,455,9279,5173,636,6593,8792],()=>e(e.s=53732)),_N_E=e.O()}]);
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.