1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1389],{91903:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/favorites",function(){return r(13538)}])},82860:function(e,t,r){"use strict";r.d(t,{A6:function(){return x},Ly:function(){return u},M1:function(){return v},_y:function(){return p},aJ:function(){return f},bC:function(){return d},di:function(){return m},fM:function(){return l},h_:function(){return s},hb:function(){return a},iL:function(){return c},tm:function(){return g}});var n=r(67294),i=r(95038);let o={Terrible:[0,20],"Not Good":[21,40],OK:[41,60],Good:[61,80],Excellent:[81,100]};function a(e){let t="number"==typeof e?e:parseFloat(String(e));if(isNaN(t)||t<=0)return"OK";let r=Math.max(0,Math.min(5,t))/5*100;return r<=20?"Terrible":r<=40?"Not Good":r<=60?"OK":r<=80?"Good":"Excellent"}function l(e){return"Not Good"===e||"Not good"===e?"NotGood":e}function s(e,t){var r,n,i,a;let l=[...e];return t.year&&(r=l,n=t.year,l=r.filter(e=>new Date(e.dateStay||e.datePublished).getFullYear()===n)),t.rating&&(l=function(e,t){let[r,n]=o[t];return e.filter(e=>{let t=e.rating/5*100;return t>=r&&t<=n})}(l,t.rating)),t.listingId&&(i=l,a=t.listingId,l=i.filter(e=>{var t;return(null===(t=e.listing)||void 0===t?void 0:t.id)===a})),t.searchTerm.trim()?function(e,t){let r=t.toLowerCase().trim();if(!r)return e;let n=r.split(/\s+/);return e.map(e=>{let t=[e.comment,e.commentOriginal,e.commentLocalized].filter(Boolean).join("\n").toLowerCase(),i=t.includes(r),o=n.every(e=>t.includes(e)),a=n.map(e=>t.indexOf(e)),l=o&&a.every((e,t,r)=>{if(0===t)return!0;let n=r[t-1];return void 0!==n&&e>=n}),s=0;return s=i?1e3:l?500:o?100:10*n.filter(e=>t.includes(e)).length,{...e,__searchScore:s,__exactMatch:i,__hasAllTerms:o}}).filter(e=>e.__searchScore>0).sort((e,t)=>t.__searchScore-e.__searchScore)}(l,t.searchTerm):l.sort((e,t)=>new Date(t.datePublished).getTime()-new Date(e.datePublished).getTime())}function c(e){return Number.isFinite(e)&&e>0}function u(e){if(!1===e.available)return!1;let t=e.listingStatus;return null==t||""===String(t).trim()||"active"===String(t).trim().toLowerCase()}function d(e,t){let r=new Set(t);return e.filter(e=>{if(r.has(e.id))return!1;let t=e.reviewsCount;return null!=t&&!!Number.isFinite(t)&&!(t<1)&&!u(e)})}function f(e,t,r){let n=function(e,t){var r,n,i,o,a;if(!e)return Number.POSITIVE_INFINITY;let l=null!==(i=null!==(n=e.host.totalReviews)&&void 0!==n?n:e.total)&&void 0!==i?i:null===(r=e.reviews)||void 0===r?void 0:r.length;return null==l?Number.POSITIVE_INFINITY:t&&"all"!==e.universe?l+(null!==(a=null===(o=e.archive)||void 0===o?void 0:o.reviewCount)&&void 0!==a?a:0):l}(e,t);return Number.isFinite(n)&&n<=r}function h(e){let t={Terrible:0,"Not Good":0,OK:0,Good:0,Excellent:0};e.forEach(e=>{let r=e.rating/5*100;r<=20?t.Terrible++:r<=40?t["Not Good"]++:r<=60?t.OK++:r<=80?t.Good++:t.Excellent++});let r=e.length||1;return Object.entries(t).map(e=>{let[t,n]=e;return{band:t,count:n,percentage:Math.round(n/r*100)}})}function g(e,t){if(!e)return h(t);let r=(e[1]||0)+(e[2]||0)+(e[3]||0)+(e[4]||0)+(e[5]||0);if(0===r)return h(t);let n={Terrible:e[1]||0,"Not Good":e[2]||0,OK:e[3]||0,Good:e[4]||0,Excellent:e[5]||0};return Object.keys(n).map(e=>({band:e,count:n[e],percentage:Math.round(n[e]/r*100)}))}function p(e,t,r){if(r&&r.length>0)return[...r].sort((e,t)=>t.year-e.year);let n=function(e){let t=new Map;return e.forEach((e,r)=>{try{let n=e.dateStay||e.datePublished,i=new Date(n);if(isNaN(i.getTime())){console.warn("Invalid date for review ".concat(r,":"),n);return}let o=i.getFullYear();if(o<2e3||o>new Date().getFullYear()+1){console.warn("Unusual year for review ".concat(r,": ").concat(o));return}t.set(o,(t.get(o)||0)+1)}catch(e){console.error("Error parsing date for review ".concat(r,":"),e)}}),Array.from(t.entries()).map(e=>{let[t,r]=e;return{year:t,count:r}}).sort((e,t)=>t.year-e.year)}(t);if(!e||0===e.length)return n;let i=new Map(n.map(e=>[e.year,e.count]));return[...e].sort((e,t)=>t-e).map(e=>{var t;return{year:e,count:null!==(t=i.get(e))&&void 0!==t?t:0}})}function m(e){switch(e){case"Excellent":return 5;case"Good":return 4;case"OK":return 3;case"Not Good":return 2;case"Terrible":return 1;default:return}}function v(e,t){let r;let o=(0,i.TX)(e);if(!t.trim())return[o];let a=t.toLowerCase().trim(),l=a.split(/\s+/),s=RegExp(a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi").exec(o);if(s){let e=s.index,t=e+a.length;return[o.slice(0,e),n.createElement("mark",{key:"exact-".concat(e),style:{backgroundColor:"#C6F6D5",fontWeight:"bold",padding:"0 2px",borderRadius:"2px"}},o.slice(e,t)),o.slice(t)]}let c=[],u=0,d=RegExp("(".concat(l.join("|"),")"),"gi");for(;null!==(r=d.exec(o));)r.index>u&&c.push(o.slice(u,r.index)),c.push(n.createElement("mark",{key:"term-".concat(r.index),style:{backgroundColor:"#FEFCBF",fontWeight:500,padding:"0 2px",borderRadius:"2px"}},r[0])),u=r.index+r[0].length;return u<o.length&&c.push(o.slice(u)),c.length>0?c:[o]}function x(e){return null==e?"0.0":e.toFixed(1)}},21631:function(e,t,r){"use strict";function n(e){var t,r;if(!e||"object"!=typeof e)return"";let n=null===(t=e.nameSlug)||void 0===t?void 0:t.trim();if(n)return n;let i=null===(r=e.guestFacingName)||void 0===r?void 0:r.trim();return i?function(e){let t=e.trim().toLowerCase(),r="\xe5\xe0\xe1\xe3\xe4\xe2\xe8\xe9\xeb\xea\xec\xed\xef\xee\xf2\xf3\xf6\xf4\xf9\xfa\xfc\xfb\xf1\xe7\xb7/_,:;";for(let e=0;e<r.length;e++)t=t.replace(RegExp(r.charAt(e),"g"),"aaaaaaeeeeiiiioooouuuunc------".charAt(e));return t.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}(i):""}function i(e,t,r){let i=function(e){var t;if("identifierExternal"in e&&(null===(t=e.identifierExternal)||void 0===t?void 0:t.trim()))return e.identifierExternal.trim();if("identifier"in e){let t=e.identifier;if("string"==typeof t&&""!==t.trim())return t.trim()}let r="idAbnb"in e?e.idAbnb:null;return r&&"string"==typeof r&&""!==r.trim()?r:""}(e),o=n(e),a=o?"/rent/".concat(i,"/").concat(o):"/rent/".concat(i);t&&(a+="/".concat(t));let l=new URLSearchParams,s=null==r?void 0:r.photoId;"number"==typeof s&&Number.isFinite(s)&&s>0&&l.set("photo",String(s)),(null==r?void 0:r.mode)!=="sale"||t||l.set("mode","sale");let c=l.toString();return c?"".concat(a,"?").concat(c):a}r.d(t,{B_:function(){return i},o3:function(){return n}})},7450:function(e,t,r){"use strict";r.d(t,{F:function(){return i}});var n=r(84867);function i(e,t){var r,i,o,a;let l=null!==(r=null==t?void 0:t.origin)&&void 0!==r?r:window.location.origin;if((null!==(i=null==t?void 0:t.standalone)&&void 0!==i?i:(0,n.n)({matchMedia:window.matchMedia.bind(window),navigator}))&&l&&function(e,t){let r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/";try{r=new URL(e,t)}catch(e){return!1}if(r.origin!==t)return!1;let i=n.endsWith("/")?n:"".concat(n,"/");return"/"===i||r.pathname===i.slice(0,-1)||r.pathname.startsWith(i)}(e,l)){window.location.assign(new URL(e,l).href);return}window.open(e,null!==(o=null==t?void 0:t.target)&&void 0!==o?o:"_blank",null!==(a=null==t?void 0:t.features)&&void 0!==a?a:"noopener,noreferrer")}},84138:function(e,t,r){"use strict";var n=r(85893);r(67294);var i=r(89993),o=r(36948),a=r(93965),l=r(8004),s=r(19582),c=r(55263),u=r(63543),d=r(32852);t.Z=e=>{let{contentId:t,contentType:r,size:f="lg",color:h,boxSize:g="1.5em",mt:p=0,mr:m,appearance:v="ghost",onToggleFavorite:x,bangListing:b,bangPhoto:y,bangImageSize:w}=e,{t:j}=(0,a.$G)("common"),{toggleFavorite:S}=(0,l.s)(),{favorites:k}=(0,d.E)(),T=k[(0,s.PY)(r,t)],E="pill"===v,I=E?"#1A202C":h;return(0,n.jsx)(i.h,{mt:p,mr:m,"aria-label":T?j("favorites.removeAria"):j("favorites.addAria"),isRound:!0,boxSize:E?void 0:g,icon:T?(0,n.jsx)(o.J,{as:u.M_L,boxSize:g,style:{color:I}}):(0,n.jsx)(o.J,{as:u.lo,boxSize:g,style:{color:I}}),onClick:e=>{e.preventDefault(),e.stopPropagation(),S(t,r,b||y?(0,c.AQ)(b,{photo:y,imageSize:w,t:j}):null),x&&x(!T)},size:f,variant:"ghost",bg:E?"white":"transparent",color:E?"gray.800":void 0,boxShadow:E?"0 2px 8px rgba(0,0,0,0.15)":void 0,_hover:{bg:E?"gray.50":"transparent"},_active:{bg:E?"gray.100":"transparent"},_focus:{bg:E?"gray.50":"transparent",boxShadow:E?"0 2px 8px rgba(0,0,0,0.15)":"none"},_focusVisible:{bg:E?"gray.50":"transparent",boxShadow:E?"0 2px 8px rgba(0,0,0,0.15)":"none"}})}},17202:function(e,t,r){"use strict";var n=r(85893);r(67294);var i=r(9008),o=r.n(i);t.Z=e=>{let{title:t}=e;return(0,n.jsxs)(o(),{children:[t&&(0,n.jsx)("title",{children:t}),(0,n.jsx)("meta",{name:"robots",content:"noindex, nofollow"}),(0,n.jsx)("meta",{name:"googlebot",content:"noindex, nofollow"})]})}},13315:function(e,t,r){"use strict";var n=r(85893);r(67294);var i=r(34292),o=r(24880),a=r(93965),l=r(30010),s=r(45320);let c=new Set(["available","under_offer","sold","withdrawn"]);t.Z=e=>{let{forSale:t,showPrice:r=!0,mb:u=1}=e,{t:d}=(0,a.$G)("rentals"),f=(0,s.useLocaleStore)(e=>e.locale);if(null==t)return null;let h=r?(0,l.FT)(t.askingPrice,f,t.currency):null,g=null!=t.status&&c.has(t.status)?t.status:null;return(0,n.jsxs)(i.U,{spacing:1.5,flexWrap:"wrap",mb:u,children:[(0,n.jsxs)(o.C,{colorScheme:"green",variant:"subtle",fontSize:"10px",textTransform:"uppercase",letterSpacing:"wide",px:1.5,py:0,borderRadius:"md",children:[d("forSale.badge"),h?" \xb7 ".concat(h):null]}),g&&"available"!==g?(0,n.jsx)(o.C,{colorScheme:"gray",variant:"outline",fontSize:"10px",textTransform:"none",px:1.5,py:0,borderRadius:"md",children:d("forSale.status.".concat(g))}):null]})}},35969:function(e,t,r){"use strict";var n=r(85893),i=r(67294),o=r(37255),a=r(12216);let l=new Set,s=new Map,c=0,u=[];function d(){return new Promise(e=>{let t=()=>{c+=1,e(()=>{c=Math.max(0,c-1),function(){for(;c<10&&u.length>0;){let e=u.shift();null==e||e()}}()})};c<10?t():u.push(t)})}let f=e=>/^https:\/\/storage\.googleapis\.com\/[^/]+\/(photos|destination-images|photos-ops)\//.test(e),h=(e,t)=>
1f(e)?"race"===t?4e3:1500:"race"===t?3500:1500;function g(e,t){let r=!1,n=null,i=new window.Image;return(0,o.VS)(i,e),{promise:new Promise(o=>{let a=()=>{n&&clearTimeout(n),i.onload=null,i.onerror=null};i.onload=()=>{a(),r||o(!0)},i.onerror=()=>{a(),r||o(!1)},n=setTimeout(()=>{a(),i.src="",r||o(!1)},t),i.src=e}),cancel:()=>{r=!0,n&&clearTimeout(n),i.onload=null,i.onerror=null,i.src=""}}}async function p(e,t){for(let r of e){if(t())break;if(l.has(r))continue;let e=await d();if(t()){e();break}try{let{promise:e}=g(r,h(r,"fallback")),n=await e;if(t())return null;if(n)return r;l.add(r)}finally{e()}}return null}t.Z=e=>{let{host:t,name:r,imageSize:c="small",...u}=e,f=(0,i.useMemo)(()=>(0,o.w6)(t,c),[null==t?void 0:t.photoBreasyGuid,null==t?void 0:t.photoUrlManual,null==t?void 0:t.photoUrl,null==t?void 0:t.avatarUrl,c]),m=r||(null==t?void 0:t.name)||void 0,[v,x]=(0,i.useState)(()=>{if(!f.key)return;let e=s.get(f.key);if(e&&!l.has(e))return e}),b=(0,i.useRef)(0);return(0,i.useEffect)(()=>{let e=++b.current,t=!1,r=null,n=()=>t||e!==b.current,i=e=>{n()||(e?(s.set(f.key,e),x(e)):(f.key&&s.delete(f.key),x(void 0)))};return(async()=>{if(!f.key){i(null);return}let e=s.get(f.key);if(e&&!l.has(e)){i(e);return}let t=f.race.filter(e=>!l.has(e)),o=f.fallbacks.filter(e=>!l.has(e));if(1===t.length&&0===o.length){i(t[0]);return}if(0===t.length&&0===o.length){i(null);return}if(x(void 0),t.length>0){let{promise:e,cancel:o}=function(e){if(0===e.length)return{promise:Promise.resolve(null),cancel:()=>void 0};let t=!1,r=[],n=()=>void 0;return{promise:new Promise(i=>{let o=e.length;n=e=>{t||(t=!0,r.forEach(e=>e()),i(e))},e.forEach(e=>{(async()=>{let i=await d();if(t){i();return}let a=!1,s=()=>{a||(a=!0,i())},{promise:c,cancel:u}=g(e,h(e,"race"));r.push(()=>{u(),s()});let f=await c;if(s(),!t){if(f){n(e);return}l.add(e),(o-=1)<=0&&n(null)}})()})}),cancel:()=>n(null)}}(t);r=o;let a=await e;if(r=null,n())return;if(a){i(a);return}}i(await p(o,n))})(),()=>{t=!0,null==r||r()}},[f]),(0,n.jsx)(a.Z,{...u,name:m,src:v,onError:()=>{if(!v)return;l.add(v),f.key&&s.get(f.key)===v&&s.delete(f.key);let e=[...f.race,...f.fallbacks].filter(e=>e!==v&&!l.has(e));if(0===e.length){x(void 0);return}let t=b.current;p(e,()=>t!==b.current).then(e=>{t===b.current&&(e?(f.key&&s.set(f.key,e),x(e)):(f.key&&s.delete(f.key),x(void 0)))})}})}},12216:function(e,t,r){"use strict";var n=r(85893),i=r(67294),o=r(87874),a=r(5460),l=r(37255);t.Z=e=>{let{src:t,children:r,onError:s,...c}=e,[u,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{d(!1)},[t]);let f=!!t&&(0,l.hx)(t)&&!u;return(0,n.jsxs)(o.q,{...c,src:f?void 0:u?void 0:t,onError:f?void 0:s,children:[f&&t?(0,n.jsx)(a.E,{src:t,alt:"",referrerPolicy:"no-referrer",loading:"eager",onError:()=>{d(!0),null==s||s()},position:"absolute",inset:0,w:"100%",h:"100%",objectFit:"cover",borderRadius:"inherit",zIndex:0}):null,r]})}},8004:function(e,t,r){"use strict";r.d(t,{s:function(){return m}});var n=r(67294),i=r(11163),o=r(19582),a=r(55263),l=r(88182);let s=new Set,c=new Map;async function u(e,t,r,n){if(c.set(e,n),!s.has(e)){s.add(e);try{for(;c.has(e);){let n=c.get(e);if(void 0===n)break;try{await (0,l.mN)(t,r)}catch(e){}if(c.get(e)===n){c.delete(e);break}}}finally{s.delete(e)}}}var d=r(17168),f=r(7914),h=r(17718),g=r(32852),p=r(45532);let m=()=>{let e=(0,i.useRouter)(),t=(0,p.J)();return{favorites:(0,g.E)(e=>e.favorites),isFavoritesLoading:!1,toggleFavorite:(0,n.useCallback)((r,n,i)=>{let l=(0,o.PY)(n,r),s=!g.E.getState().favorites[l];g.E.getState().toggleFavorite(l,s),f.useAuthStore.getState().isLoggedIn?u(l,r,n,s):(0,d.WX)(l,s),(0,a.Kp)(t,e.pathname)&&h.S.getState().show(s,null!=i?i:null)},[t,e.pathname])}}},98113:function(e,t,r){"use strict";r.d(t,{s:function(){return o}});var n=r(67294),i=r(99097);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{topOffset:r=120,updateHashOnScroll:o=!0}=t,a=(0,n.useRef)(new Map),[l,s]=(0,n.useState)(null),c=(0,n.useRef)(null);(0,n.useEffect)(()=>{c.current=l},[l]);let u=(0,n.useMemo)(()=>{let t=new Map;for(let r of e)t.set(r,e=>{e?a.current.set(r,e):a.current.delete(r)});return t},[e]),d=(0,n.useCallback)(e=>u.get(e)||(t=>{t?a.current.set(e,t):a.current.delete(e)}),[u]),f=(0,n.useCallback)((e,t)=>{let r=a.current.get(e);if(!r)return;r.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"});let n=new URL(window.location.href);n.hash=e,(null==t?void 0:t.replace)!==!1?(0,i.Lk)(n.toString()):window.history.pushState(window.history.state,"",n.toString()),s(e)},[]);return(0,n.useEffect)(()=>{let t=window.location.hash.replace(/^#/,"");if(!t||!e.includes(t))return;let r=window.requestAnimationFrame(()=>{let e=a.current.get(t);e&&(e.scrollIntoView({behavior:"auto",block:"start",inline:"nearest"}),s(t))});return()=>window.cancelAnimationFrame(r)},[e.join("|")]),(0,n.useEffect)(()=>{let e=new IntersectionObserver(e=>{var t;let r=e.filter(e=>e.isIntersecting).sort((e,t)=>
1e.boundingClientRect.top-t.boundingClientRect.top);if(0===r.length)return;let n=r[0].target,l=null===(t=Array.from(a.current.entries()).find(e=>{let[,t]=e;return t===n}))||void 0===t?void 0:t[0];if(l&&l!==c.current&&(s(l),o)){let e=new URL(window.location.href);e.hash=l,(0,i.Lk)(e.toString())}},{rootMargin:"-".concat(r,"px 0px -50% 0px"),threshold:[0,.01,.5,1]});return a.current.forEach(t=>e.observe(t)),()=>e.disconnect()},[e.join("|"),r,o]),{activeId:l,register:d,goTo:f}}},13538:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return er}});var n=r(85893),i=r(67294),o=r(57747),a=r(5674),l=r(93717),s=r(8449),c=r(91774),u=r(19582),d=r(88182),f=r(45545),h=r(17168),g=r(53829);async function p(e){let t=[...new Set(e.filter(e=>Number.isInteger(e)&&e>0))];if(0===t.length)return[];let r=[];for(let e=0;e<t.length;e+=100){var n;let i=t.slice(e,e+100),o=await g.ZP.post("/rental/public/minimal-by-ids",{ids:i});r.push(...Array.isArray(n=(0,g.w$)(o.data))?n.filter(e=>!!e&&"object"==typeof e&&Number.isInteger(e.id)):[])}return r}var m=r(82860);async function v(e,t){let r=(0,u.Lt)(e);if(0===r.length)return[];if(!(null==t?void 0:t.publicOnly))try{let t=await (0,d.$J)(e),r=(0,u.lH)(t).filter(e=>!!e&&"object"==typeof e&&Number.isInteger(e.id)).filter(m.Ly);if(r.length>0)return r}catch(e){console.error("Error hydrating favorites by-type:",e)}return(await p(r)).filter(m.Ly)}var x=r(8004),b=r(32852),y=r(74201),w=r(43333),j=r(45532),S=r(71950),k=r(7914),T=r(78407),E=r(98113),I=r(93965),_=r(95533),N=r(42869),L=r(17202),C=r(22757),M=r(32883),z=r(41664),R=r.n(z),A=r(77513);let O={base:1,sm:1,md:2,lg:3,xl:4},F={base:3,md:4,lg:5},G=e=>{let{cards:t,onToggleFavorite:r,priorityCount:i=0}=e;return(0,n.jsx)(a.M,{columns:O,spacing:F,children:t.map((e,t)=>(0,n.jsx)(o.xu,{children:(0,n.jsx)(A.Z,{listing:e.listing,variant:"showcase",onHover:()=>{},onToggleFavorite:r,imagePriority:t<i})},e.listing.id))})},P=e=>{let{id:t,name:r,href:i,register:a,isFirst:l=!1,scrollMarginTop:s}=e,c=(0,n.jsx)(C.X,{as:"h2",fontSize:{base:"xs",md:"sm"},fontWeight:"semibold",letterSpacing:"0.14em",textTransform:"uppercase",color:"gray.500",children:r});return(0,n.jsx)(o.xu,{ref:a(t),id:t,mt:l?0:{base:8,md:10},mb:2,scrollMarginTop:s,children:i?(0,n.jsx)(M.r,{as:R(),href:i,_hover:{textDecoration:"none",color:"gray.600"},children:c}):c})};var W=e=>{let{group:t,register:r,onToggleFavorite:i,priorityCount:a=0,isFirst:l=!1,hideHeading:s=!1,scrollMarginTop:c}=e,u=(0,n.jsx)(C.X,{as:"h3",fontSize:{base:"xl",md:"2xl"},fontWeight:"semibold",color:"gray.800",letterSpacing:"-0.02em",children:t.name});return(0,n.jsxs)(o.xu,{ref:r(t.anchorId),id:t.anchorId,mb:{base:8,md:10},scrollMarginTop:c,children:[!s&&(0,n.jsx)(o.xu,{mb:4,children:t.href?(0,n.jsx)(M.r,{as:R(),href:t.href,_hover:{textDecoration:"none",color:"gray.600"},children:u}):u}),(0,n.jsx)(G,{cards:t.listings,onToggleFavorite:i,priorityCount:l?a:0})]})},$=r(48783),U=r(71293),Y=r(93108),D=()=>{let{t:e}=(0,I.$G)("common");return(0,n.jsxs)($.g,{align:"flex-start",spacing:4,py:{base:6,md:10},children:[(0,n.jsx)(U.x,{fontSize:{base:"md",md:"lg"},color:"gray.600",children:e("favorites.empty")}),(0,n.jsx)(Y.z,{as:R(),href:"/rent",variant:"outline",children:e("favorites.browseStays")})]})},H=r(45161),Z=r(20192),B=e=>{var t;let{groups:r,showCountryHeaders:a,activeId:s,onSelect:c,variant:u,stickyTop:d,transition:f,flushTop:h=!1}=e,{t:g}=(0,I.$G)("common"),[p,m]=(0,i.useState)(!1),v=(0,H.ff)("gray.300","gray.600"),x=(0,H.ff)("white","gray.800"),b=(0,H.ff)("gray.900","gray.100"),w=(0,H.ff)("gray.600","gray.300"),j=(0,H.ff)("gray.700","gray.200"),S=(0,H.ff)("gray.100","whiteAlpha.200"),k=(0,i.useMemo)(()=>r.flatMap(e=>e.places.map(t=>({country:e,place:t}))),[r]),T=null!==(t=k.find(e=>{let{place:t,country:r}=e;return s===t.anchorId||s===r.anchorId}))&&void 0!==t?t:k[0],E=T?T.place.isCountryOnly?T.country.name:T.place.name:g("favorites.jumpTo"),_=(0,n.jsx)($.g,{align:"stretch",spacing:1,children:r.map(e=>{let t=e.places.filter(e=>!e.isCountryOnly),r=t.length>0;return(0,n.jsxs)(o.xu,{children:[a&&(0,n.jsx)(Y.z,{variant:"ghost",size:"sm",justifyContent:"flex-start",w:"100%",px:2,h:"auto",py:2,fontWeight:"semibold",fontSize:"xs",letterSpacing:"0.12em",textTransform:"uppercase",color:s===e.anchorId?b:w,onClick:()=>{c(e.anchorId),m(!1)},_hover:{bg:S},children:(0,n.jsx)(U.x,{as:"span",noOfLines:1,textAlign:"left",children:e.name})}),r&&(0,n.jsx)($.g,{align:"stretch",spacing:0,pl:a?2:0,children:t.map(e=>{let t=s===e.anchorId;return(0,n.jsx)(Y.z,{variant:"ghost",size:"sm",justifyContent:"flex-start",w:"100%",px:2,h:"auto",py:2,fontWeight:t?"semibold":"medium",color:t?b:w,bg:t?S:"transparent",onClick:()=>{c(e.anchorId),m(!1)},_hover:{bg:S},children:(0,n.jsx)(U.x,{as:"span",noOfLines:1,textAlign:"left",children:e.name})},e.key)})})]},e.key)})});return"rail"===u?(0,n.jsx)(o.xu,{as:"nav","aria-label":g("favorites.jumpTo"),position:"sticky",top:d,transition:f,flexShrink:0,w:"220px",maxH:"calc(100vh - 140px)",overflowY:"auto",pr:2,children:_}):(0,n.jsxs)(o.xu,{position:"sticky",top:d,zIndex:20,mb:4,bg:x,borderBottomWidth:"1px",borderColor:v,boxShadow:"0 1px 2px rgba(0,0,0,0.04)",mx:{base:-3,sm:0},px:{base:3,sm:0},pt:h?y.zG:0,transition:f,_before:{content:'""',position:"absolute",left:0,right:0,bottom:"100%",height:"".concat(40,"px"),bg:x,pointerEvents:"none"},children:[(0,n.jsxs)(Y.z,{variant:"ghost",w:"100%",justifyContent:"space-between",minH:"".concat(56,"px"),h:"auto",py:3,px:1,onClick:()=>m(e=>!e),"aria-expanded":p,"aria-label":g("favorites.jumpTo"),children:[(0,n.jsxs)(l.k,{direction:"column",align:"flex-start",ga
1p:0,minW:0,children:[(0,n.jsx)(U.x,{fontSize:"xs",color:w,fontWeight:"semibold",children:g("favorites.jumpTo")}),(0,n.jsx)(U.x,{fontWeight:"bold",noOfLines:1,color:b,fontSize:"md",children:E})]}),(0,n.jsx)(o.xu,{as:"span",color:j,flexShrink:0,children:p?(0,n.jsx)(Z.rH8,{size:22}):(0,n.jsx)(Z.bTu,{size:22})})]}),p&&(0,n.jsx)(o.xu,{pb:3,role:"navigation","aria-label":g("favorites.jumpTo"),bg:x,children:_})]})},J=r(89993),K=r(1679);let V="breasy.favoritesPersistBanner.dismissed";function X(){try{return window.sessionStorage}catch(e){return null}}var q=e=>{let{onLogIn:t}=e,{t:r}=(0,I.$G)("common"),[a,l]=(0,i.useState)(!1),s=(0,H.ff)("gray.200","whiteAlpha.300"),c=(0,H.ff)("white","gray.800"),u=(0,H.ff)("gray.800","gray.100");return((0,i.useEffect)(()=>{l(!function(){let e=X();if(!e)return!1;try{return"1"===e.getItem(V)}catch(e){return!1}}())},[]),a)?(0,n.jsxs)(o.xu,{position:"relative",mb:{base:6,md:8},px:{base:4,md:5},py:{base:4,md:5},pr:{base:12,md:14},borderWidth:"1px",borderColor:s,borderRadius:"xl",bg:c,children:[(0,n.jsx)(J.h,{"aria-label":r("modal.close"),icon:(0,n.jsx)(K.T,{boxSize:2.5}),size:"sm",variant:"ghost",position:"absolute",top:2,right:2,onClick:()=>{!function(){let e=X();if(e)try{!function(e){e.setItem(V,"1")}(e)}catch(e){}}(),l(!1)}}),(0,n.jsxs)($.g,{align:"flex-start",spacing:3,children:[(0,n.jsx)(U.x,{color:u,children:r("favorites.persistTitle")}),(0,n.jsx)(Y.z,{colorScheme:"black",variant:"solid",size:"sm",onClick:t,children:r("favorites.logIn")})]})]}):null},Q=r(34292);let ee={unavailableOne:"1 saved stay is no longer available",unavailableMany:e=>"".concat(e," saved stays are no longer available"),remove:"Remove"};var et=e=>{let{count:t,onRemove:r}=e;return t<=0?null:(0,n.jsxs)(Q.U,{mt:8,py:3,justify:"space-between",align:"center",spacing:4,borderTop:"1px solid",borderColor:"gray.200",children:[(0,n.jsx)(U.x,{fontSize:"sm",color:"gray.500",children:1===t?ee.unavailableOne:ee.unavailableMany(t)}),(0,n.jsx)(Y.z,{size:"sm",variant:"ghost",onClick:r,children:ee.remove})]})},er=()=>{let{t:e}=(0,I.$G)("common"),{isLoggedIn:t,authLoading:r}=(0,k.useAuthStore)(),g=(0,b.E)(e=>e.favorites),{openModal:p}=(0,T.a)(),C=(0,j.J)(),M=(0,u.Lt)((0,u.ji)(g)).length,z=M>0&&(!t||!r),{status:R,cards:A,expectedCount:$,missingIds:U,dismissListing:Y,removeUnavailable:H}=function(e,t){let r=(0,b.E)(e=>e.favorites),{toggleFavorite:n}=(0,x.s)(),[o,a]=(0,i.useState)("idle"),[l,s]=(0,i.useState)([]),[g,p]=(0,i.useState)([]),y=(0,i.useRef)(new Set),w=(0,i.useRef)(0),j=(0,i.useMemo)(()=>(0,u.Lt)((0,u.ji)(r)).length,[r]),S=(0,i.useMemo)(()=>l.filter(e=>!y.current.has((0,u.PY)(f.zc.RENTAL_LISTING,e.listing.id))),[l]),k=(0,i.useMemo)(()=>g.filter(e=>!y.current.has((0,u.PY)(f.zc.RENTAL_LISTING,e))),[g]),T=Math.max(j,S.length+k.length);return(0,i.useEffect)(()=>{if(!e){w.current+=1,a("idle"),s([]),p([]),y.current=new Set;return}let r=++w.current,n=!1;return a("loading"),(async()=>{let e=[];
1if(t){let t=[];try{t=await (0,d.Ox)()}catch(e){console.error("Error fetching favorites:",e)}if(n||r!==w.current)return;e=(0,u.NZ)(t,b.E.getState().favorites)}else e=(0,h.zg)();let i=(e=e.filter(e=>!y.current.has((0,u.PY)(e.contentType,e.contentId)))).filter(e=>e.contentType===f.zc.RENTAL_LISTING||"RENTAL"===e.contentType);if(0===i.length){s([]),p([]),a("ready");return}try{let e=(await v(i,{publicOnly:!t})).filter(m.Ly);if(n||r!==w.current)return;let l=new Map;for(let e of i){var o;let t=null!==(o=l.get(e.contentId))&&void 0!==o?o:0;l.set(e.contentId,Math.max(t,(0,c.Aj)(e.favoritedAt)))}let d=new Set(e.map(e=>e.id));s(e.map(e=>{var t;return{listing:e,favoritedAt:null!==(t=l.get(e.id))&&void 0!==t?t:0}})),p((0,u.Lt)(i).filter(e=>!d.has(e))),a("ready")}catch(e){if(console.error("Error hydrating favorites:",e),n||r!==w.current)return;s([]),p((0,u.Lt)(i)),a("ready")}})(),()=>{n=!0}},[e,t]),{status:o,cards:S,expectedCount:T,missingIds:k,dismissListing:(0,i.useCallback)((e,t)=>{y.current.add((0,u.PY)(t,e)),s(r=>r.filter(r=>r.listing.id!==e||t!==f.zc.RENTAL_LISTING)),p(r=>t===f.zc.RENTAL_LISTING?r.filter(t=>t!==e):r)},[]),removeUnavailable:(0,i.useCallback)(()=>{for(let e of g.filter(e=>!y.current.has((0,u.PY)(f.zc.RENTAL_LISTING,e))))y.current.add((0,u.PY)(f.zc.RENTAL_LISTING,e)),n(e,f.zc.RENTAL_LISTING);p([])},[g,n])}}(z,t),Z=(0,i.useMemo)(()=>(0,c._z)(A),[A]),J=(0,i.useMemo)(()=>(0,c.tH)(Z),[Z]),K=Z.length>=2,V=function(e){let t=(0,S.H)(e=>e.isNavbarVisible),r=(0,j.J)();return(0,i.useMemo)(()=>(function(e){let{sectioned:t,isMobile:r,isNavbarVisible:n}=e,i=t&&r?56:0,o=r?90:110,a=r?0:16,l=(n?o:a)+i,s=!n&&r;return{stickyTop:n?{base:y.Uy.public.base,md:y.Uy.public.md}:{base:"0px",md:"calc(16px + ".concat(y.zG,")")},flushTop:s,scrollMargin:"calc(".concat(n?o:a,"px + ").concat(i,"px + ").concat(y.zG,")"),topOffset:l+8,transition:w.SCROLL_CHROME_LAYOUT.chromeTransition,gapBleedPx:40}})({sectioned:e,isMobile:r,isNavbarVisible:t}),[r,t,e])}(J),X=(0,i.useMemo)(()=>J?(0,c.Px)(Z,K):[],[J,Z,K]),{activeId:Q,register:ee,goTo:er}=(0,E.s)(X,{topOffset:V.topOffset,updateHashOnScroll:J}),en=(e,t,r)=>{e||Y(t,r)},ei=t&&r||z&&"ready"!==R,eo=!ei&&0===A.length&&0===U.length&&0===M,ea=!t&&A.length>0,el=(0,i.useMemo)(()=>J?[]:(0,c.zo)(Z),[J,Z]);return(0,n.jsxs)(s.Z,{children:[(0,n.jsx)(L.Z,{title:"Favorites | Breasy"}),(0,n.jsxs)(o.xu,{children:[ea&&(0,n.jsx)(q,{onLogIn:()=>{p((0,n.jsx)(_.B,{mode:_.v.LOGIN}),{mode:C?"fullScreen":"normal",showCloseButton:!0,isMobileDisplay:C})}}),ei?(0,n.jsx)(a.M,{columns:O,spacing:F,"aria-busy":"true","aria-label":e("favorites.loading"),children:Array.from({length:Math.max($,"loading"===R?4:0)},(e,t)=>(0,n.jsx)(N.Z,{variant:"showcase",index:t},t))}):eo?(0,n.jsx)(D,{}):J?(0,n.jsxs)(l.k,{align:"flex-start",gap:{base:0,lg:10},children:[!C&&(0,n.jsx)(B,{groups:Z,showCountryHeaders:K,activeId:Q,onSelect:er,variant:"rail",stickyTop:V.stickyTop,transition:V.transition}),(0,n.jsxs)(o.xu,{flex:"1",minW:0,children:[C&&(0,n.jsx)(B,{groups:Z,showCountryHeaders:K,activeId:Q,onSelect:er,variant:"pill",stickyTop:V.stickyTop,transition:V.transition,flushTop:V.flushTop}),Z.map(e=>{var t;return(0,n.jsxs)(o.xu,{children:[K&&(0,n.jsx)(P,{id:e.anchorId,name:e.name,href:e.href,register:ee,isFirst:e.key===(null===(t=Z[0])||void 0===t?void 0:t.key),scrollMarginTop:V.scrollMargin}),e.places.map((t,r)=>{var i;return(0,n.jsx)(W,{group:t,register:ee,onToggleFavorite:en,priorityCount:4,isFirst:0===r&&e.key===(null===(i=Z[0])||void 0===i?void 0:i.key),hideHeading:t.isCountryOnly&&K,scrollMarginTop:V.scrollMargin},t.key)})]},e.key)}),(0,n.jsx)(et,{count:U.length,onRemove:H})]})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(G,{cards:el,onToggleFavorite:en,priorityCount:4}),(0,n.jsx)(et,{count:U.length,onRemove:H})]})]})]})}},65028:function(e,t,r){"use strict";r.d(t,{L:function(){return n}});var n=(0,r(16914).m)("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});n.displayName="Spacer"},49429:function(e,t,r){"use strict";r.d(t,{o:function(){return c}});var n=r(16554),i=r(16914),o=r(33951),a=r(25432),l=r(67294),s=r(85893),c=(0,n.G)(function(e,t){let{ratio:r=4/3,children:n,className:c,...u}=e,d=l.Children.only(n),f=(0,a.cx)("chakra-aspect-ratio",c);return(0,s.jsx)(i.m.div,{ref:t,position:"relative",className:f,_before:{height:0,content:'""',dis
1play:"block",paddingBottom:(0,o.XQ)(r,e=>`${1/e*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...u,children:d})});c.displayName="AspectRatio"},96854:function(e,t,r){"use strict";r.d(t,{O:function(){return v}});var n=r(67294),i=r(25432),o=r(16914),a=r(33179),l=r(70917),s=r(16554),c=r(77030),u=r(7634),d=r(85893),f=(0,o.m)("div",{baseStyle:{boxShadow:"none",backgroundClip:"padding-box",cursor:"default",color:"transparent",pointerEvents:"none",userSelect:"none","&::before, &::after, *":{visibility:"hidden"}}}),h=(0,a.gJ)("skeleton-start-color"),g=(0,a.gJ)("skeleton-end-color"),p=(0,l.F4)({from:{opacity:0},to:{opacity:1}}),m=(0,l.F4)({from:{borderColor:h.reference,background:h.reference},to:{borderColor:g.reference,background:g.reference}}),v=(0,s.G)((e,t)=>{let r={...e,fadeDuration:"number"==typeof e.fadeDuration?e.fadeDuration:.4,speed:"number"==typeof e.speed?e.speed:.8},l=(0,c.mq)("Skeleton",r),s=function(){let e=(0,n.useRef)(!0);return(0,n.useEffect)(()=>{e.current=!1},[]),e.current}(),{startColor:v="",endColor:x="",isLoaded:b,fadeDuration:y,speed:w,className:j,fitContent:S,...k}=(0,a.Lr)(r),[T,E]=(0,u.dQ)("colors",[v,x]),I=function(e){let t=(0,n.useRef)();return(0,n.useEffect)(()=>{t.current=e},[e]),t.current}(b),_=(0,i.cx)("chakra-skeleton",j),N={...T&&{[h.variable]:T},...E&&{[g.variable]:E}};if(b){let e=s||I?"none":`${p} ${y}s`;return(0,d.jsx)(o.m.div,{ref:t,className:_,__css:{animation:e},...k})}return(0,d.jsx)(f,{ref:t,className:_,...k,__css:{width:S?"fit-content":void 0,...l,...N,_dark:{...l._dark,...N},animation:`${w}s linear infinite alternate ${m}`}})});v.displayName="Skeleton"}},function(e){e.O(0,[8391,4738,9317,4817,594,123,6132,4321,3365,8151,8845,7665,8551,109,8668,1664,1302,4858,9323,8449,4432,2888,9774,179],function(){return e(e.s=91903)}),_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.