1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32],{26360:(e,t,a)=>{a.d(t,{D:()=>i.D,S:()=>i.S});var i=a(43182)},34461:(e,t,a)=>{a.d(t,{_z:()=>f,eb:()=>v,ST:()=>m.S});var i=a(95531),r=a(37876),s=a(14232),n=a(30533),o=a(19081),l=a(88954),d=a(81961);let c=(0,a(2014).AH)({color:"inherit",_hover:{color:"inherit"}});class h extends s.Component{createCards(){let{schools:e=[],noLimit:t,endCard:a,i18n:i}=this.props,{t:s}=i,o=(0,r.jsx)(n.ZpM,{style:{width:"225px",height:"352px"},"data-testid":"school-nocard","overflow-y":"auto",tabindex:"0",children:(0,r.jsxs)(n._Ny,{lowlight:!0,align:"center",justify:"center",style:{width:"210px",height:"340px"},children:[(0,r.jsx)(n.sQA,{size:"small"}),(0,r.jsx)("br",{}),(0,r.jsx)(n.T33,{color:"lowlight",bold:!0,size:"caption",children:s("schools.noSchoolsAvailable")})]})});if(0===e.length)return o;let l=([e,...t])=>e.toUpperCase()+t.join("").toLowerCase(),d=(e,t)=>{var a;let i,o,d=e?.reviews?.[0];return(0,r.jsx)(n.u31,{className:c,href:e.url,onClick:()=>this.onSchoolCardClick(t),target:"_blank","data-testid":"school-card",children:(0,r.jsx)(n.Jnc,{fluid:!0,name:e.name,gradeRange:e.gradesRange,type:"string"==typeof(o=s((i=a=e.enrollmentType,`schools.enrollmentTypes.${i.toLowerCase()}`),l(a)))?o:l(a),studentCount:e.studentCount,studentsLabel:s("schools.students","Students"),greatSchoolsRating:e.providerRating&&e.providerRating.rating,parentRating:e.averageParentRating&&e.averageParentRating.rating,review:e.reviewCount?{content:`${d.reviewText}`,timeAgo:`${d.relativeDate}`,label:`${l(d.type)}`,totalCount:`${e.reviewCount}`}:void 0,districtName:e.districtName,greatSchoolsRatingLabel:s("schools.greatSchoolsRatingLabel","GreatSchools Rating"),parentRatingLabel:s("schools.parentRatingAverageLabel","Parent Rating Average"),reviewLabel:s("schools.reviewLabel","Review"),reviewsLabel:s("schools.reviewsLabel","Reviews")})},e.id)},h=Object.values(e.reduce((e,t)=>(e[t.id]=t,e),{}));if(t){let e=h.map(d);return a&&e.push(a),e}return h.slice(0,8).map(d)}render(){let{slider:e,tracking:t}=this.props;return(0,r.jsx)(n.iX2,{ref:e,itemType:"schoolCard",itemNumber:[1,1,2,3,4],nextOnClick:()=>t.trackAction({interactedWith:"school module:right scroll"}),previousOnClick:()=>t.trackAction({interactedWith:"school module:left scroll"}),children:this.createCards()})}constructor(...e){super(...e),this.onSchoolCardClick=e=>{let{tracking:t}=this.props;t.saveInteractedWith(`school module:schools card ${e+1}`)}}}h=(0,i.Cg)([(0,o.W)({tracking:l.fu})],h);let p=(0,d.z)(h);class g extends s.Component{static getDerivedStateFromProps(e){return{choices:e.categories.map(t=>({text:t.displayName,id:t.name,active:t.name===e.selected}))}}render(){let{onChange:e,selected:t,i18n:a}=this.props,{t:i}=a,{choices:s}=this.state;return(0,r.jsx)("div",{"data-testid":"school-navigation","data-test-value":t,children:(0,r.jsx)(n.Nz1,{"aria-label":i("schools.ariaLabels.nearbySchools"),onChange:e,items:s})})}constructor(...e){super(...e),this.state={choices:[]}}}let u=(0,d.z)(g);var m=a(43182);class x extends s.Component{static{this.fragments={schools:m.S,school:m.D}}static getDerivedStateFromProps(e,t){if(e.noLimit)return{schoolsForCategory:e.schools};if(t.categorySelected.name)return null;if(e.schools&&e.schools.length>0){let t=e.categories.find(e=>e.count>0);return t||(t=e.categories.find(e=>"ELEMENTARY"===e.name)),{schoolsForCategory:e.schools.filter(e=>e.categories.includes(t?.name)),categorySelected:{name:t?.name}}}return null}render(){let{categories:e,endCard:t,noLimit:a,nearbySchoolsUrl:i,i18n:s}=this.props,{schoolsForCategory:o}=this.state,{t:l}=s;return(0,r.jsxs)("div",{"data-testid":"school-container",children:[Array.isArray(e)&&e.length>0?(0,r.jsx)(u,{categories:e,onChange:this.handleCategoryChange,selected:this.state.categorySelected.name}):null,(0,r.jsx)(p,{slider:this.schoolsSlider,schools:o,noLimit:a,endCard:t}),i&&(0,r.jsx)(n.Yqy,{v:"s",children:(0,r.jsx)(n.A$k,{left:(0,r.jsx)(n.Vz,{width:20,height:20,color:"lowlight"}),children:(0,r.jsx)(n.MzZ,{href:i,target:"_blank",rel:"nofollow noopener noreferrer",children:l("schools.viewNearbySchools")})})}),(0,r.jsxs)(n.EYj,{color:"lowlight",size:"caption",children:[l("schools.greatSchoolsRating"),(0,r.jsxs)(n.MzZ,{href:"https://www.trulia.com/disclaimers",target:"_blank",children:[" ",l("schools.learnMore")]}),"."]})]})}constructor(...e){super(...e),this.state={schoolsForCategory:[],categorySelected:{name:""}},this.schoolsSlider=(0,s.createRef)(),this.handleCategoryChange=e=>{let{tracking:t,categories:a,schools:i}=this.props,r=a.find(t=>t.name===e),s=i.filter(t=>t.categories.includes(e));this.setState({schoolsForCategory:s,categorySelected:{name:r.name}}),this.schoolsSlider.current?.transitionToStart?.(),t.trackAction({interactedWith:`school module:nav ${r.name.toLowerCase()} school`})}}}x=(0,i.Cg)([(0,o.W)({tracking:l.fu})],x);let f=(0,d.z)(x),v={ALL_SCHOOLS_ID:"ALL",CategoryName:{ELEMENTARY:"Elementary",MIDDLE:"Middle",HIGH:"High School",ALL:"All Grades"},EnrollmentTypes:{ASSIGNED:"Assigned",PUBLIC:"Public",PRIVATE:"Private",CHARTER:"Charter",ALL:"All Types"}}},43182:(e,t,a)=>{a.d(t,{D:()=>r,S:()=>s});var i=a(3219);let r=(0,i.Ay)` 2 fragment SchoolFragment on School { 3 id 4 name 5 districtName 6 categories 7 enrollmentType 8 reviews(limit: 1) { 9 rating 10 maxRating 11 reviewText 12 type 13 relativeDate 14 date 15 } 16 reviewCount 17 providerRating { 18 rating 19 maxRating 20 } 21 studentCount 22 gradesRange 23 streetAddress 24 cityName 25 stateCode 26 zipCode 27 providerUrl 28 url 29 latitude 30 longitude 31 averageParentRating { 32 rating 33 maxRating 34 } 35 } 36`,s=(0,i.Ay)` 37 fragment SchoolsFragment on SCHOOLS_Schools { 38 categories { 39 displayName 40 name 41 count 42 } 43 schoolsList { 44 ...SchoolFragment 45 } 46 } 47 48 ${r} 49`},60042:(e,t,a)=>{a.d(t,{B9:()=>n,Mz:()=>
49o,ed:()=>r,zS:()=>s});var i=a(54312);let r=new Set([...Object.values(i),"PR"]),s=new Map(Object.entries(i).map(([e,t])=>[e.toLowerCase(),t]));function n(e){return e.split(/[-_\s]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join("_")}function o(e){let t=e||"";try{t=decodeURIComponent(t)}catch(e){}return t.split(/[?#]/,1)[0].split("/").filter(Boolean)}},96196:(e,t,a)=>{a.d(t,{k:()=>o,o3:()=>s,qv:()=>l});var i=a(53413),r=a(60042);async function s(e,t){let a=i.$?.server?.endpoints?.searchApiBaseUrl;if(!a)return{status:"unavailable"};let r=JSON.stringify({searchType:t,location:e,filters:{}}),s=new AbortController,n=setTimeout(()=>s.abort(),2e3);try{let e=await fetch(`${a}/v1/generate?details=${encodeURIComponent(r)}`,{signal:s.signal});if(400===e.status)return{status:"unknown-location"};if(!e.ok)return{status:"unavailable"};let t=await e.json();if("string"==typeof t?.canonicalUrl&&t.canonicalUrl.startsWith("/"))return{status:"ok",canonicalUrl:t.canonicalUrl};return{status:"unavailable"}}catch(e){return{status:"unavailable"}}finally{clearTimeout(n)}}let n={for_sale:"",for_rent:"/for_rent"};function o(e,t){return`${n[t]}/${e}/`}async function l(e,t){let a=(e||"").toUpperCase(),i=(t||"").split(/[-_\s]+/).filter(Boolean);if(!r.ed.has(a)||0===i.length)return null;let n=await s({cities:[{city:i.join(" "),state:a}]},"for_sale");return"ok"===n.status?n.canonicalUrl:"unknown-location"===n.status?o(a,"for_sale"):`/${a}/${(0,r.B9)(i.join("_"))}/`}},97334:(e,t,a)=>{a.r(t),a.d(t,{GridGalleryOverlay:()=>eh,default:()=>ep});var i=a(37876),r=a(30533),s=a(14232),n=a(50389),o=a(2014),l=a(46585);let d=(0,o.Fj)({base:{paddingTop:"s",paddingX:"s",paddingBottom:"xs",width:"100%",color:"white"},variants:{isMobile:{true:{position:"absolute",paddingTop:"xs",paddingRight:"xs",paddingBottom:"xs",paddingLeft:"s",zIndex:"10"}}}}),c=(0,o.AH)({display:"inline-block",minWidth:"230px",_medium:{margin:"0",minWidth:"0","& button":{display:"none"},"& span > .box:last-of-type":{display:"block"}}}),h=(0,o.AH)({_medium:{display:"none"}}),p=(0,o.AH)({padding:"xs",_medium:{padding:"0"}}),g=o.AH.raw({_medium:{filter:"drop-shadow( 0px 2px 4px rgba(0, 0, 0, .5))"}}),u=({address:e,bedrooms:t,bathrooms:a,price:s,size:n="small",priceAttributes:o})=>{let l=[t,a].filter(Boolean).join(" "),d=o?.typeDescription,c=d?[e,l,s].filter(Boolean):[e,s,l].filter(Boolean);return(0,i.jsx)("div",{className:p,children:(0,i.jsxs)(r.DZT,{margin:"0",as:"h2",size:n,children:[c.map((e,t)=>(0,i.jsxs)("span",{className:h,children:[e,t<c.length-1?(0,i.jsx)("span",{"aria-hidden":"true",children:" | "}):null]},e)),d?(0,i.jsx)(r.h_x,{size:"small",css:{marginLeft:"xxs",display:"inline-block",fontWeight:"normal"},typeDescription:o?.typeDescription,typeDescriptionDetails:o?.typeDescriptionDetails,typeDescriptionIcon:o?.typeDescriptionIcon,placement:"bottom"}):null]})})},m=({price:e,counterText:t,onCloseClick:a,bedrooms:s,bathrooms:n,showLeadForm:o,renderUserActionButtons:h,address:p,isMobile:m,providerLogoUrl:x,priceAttributes:f})=>{let v=h("overlay",{pageDetails:"overlay",pageType:"media player photos"},m?"inverse":"default"),y=(0,i.jsx)("div",{className:c,children:v});return(0,i.jsx)("div",{className:d({isMobile:m}),children:m?(0,i.jsx)(r.A$k,{right:(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(r.T33,{css:g,children:[y,(0,i.jsx)(r.K0,{"aria-label":"Close gallery overlay",onClick:a,children:(0,i.jsx)(r.USm,{color:"inverse"})})]})}),left:(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(r.T33,{css:g,size:"subHeader",color:"inverse",bold:!0,"aria-live":"polite",children:[(0,i.jsx)(r.hdT,{children:"Viewing photo"}),t]})}),fill:!0}):(0,i.jsx)(r.A$k,{right:(0,i.jsxs)(i.Fragment,{children:[o&&(0,i.jsx)(l.ly,{breakpoint:r.LOf.large}),y,(0,i.jsx)(r.K0,{"aria-label":"Close gallery overlay",onClick:a,children:(0,i.jsx)(r.USm,{color:"inverse"})})]}),fill:!0,children:(0,i.jsxs)(r.xA9,{spacing:"none",align:"left",children:[(0,i.jsx)(r.fhW,{width:"100%",children:(0,i.jsx)(u,{address:p,price:e,bedrooms:s,bathrooms:n,size:"title",priceAttributes:f})}),x?(0,i.jsx)(r.fhW,{children:(0,i.jsx)(r._V3,{alt:"",height:"24px",src:x})}):null]})})})};var x=a(43968),f=a(87240),v=a(76721);let y=(0,o.Fj)({base:{maxWidth:"100%",minWidth:"100%",maxHeight:"calc(100vh - 125px)",marginY:"0",marginX:"auto",width:"100%",height:"100%"},variants:{isLoaded:{false:{filter:"blur(5px)"}}}}),b=o.AH.raw({position:"relative",zIndex:"0",maxWidth:"100%",minWidth:"100%",width:"100%",height:"100%",maxHeight:"calc(100vh - 125px)"}),j=o.AH.raw({display:"flex",width:"80%",height:"19px",overflow:"hidden",flexWrap:"wrap",position:"absolute",bottom:"8px",left:"8px"}),w=o.AH.raw({display:"inline-flex",paddingY:"xxxs",paddingX:"xs",borderRadius:"4px",cursor:"default",backgroundColor:"grey",color:"white",textTransform:"uppercase"}),C=(0,v.kg)(({isInView:e,image:t,position:a,createAnalyticsEvent:n,onClick:o,size:l,trackMediaView:d})=>{let c=l===W.MEDIUM?{mediumSrc:t.url.mediumSrc,mediumWebpSrc:t.webpUrl.mediumWebpSrc}:l===W.SMALL?{extraSmallSrc:t.url.extraSmallSrc,extraSmallWebpSrc:t.webpUrl.extraSmallWebpSrc}:{...t.url,...t.webpUrl}
49,[h,p]=(0,s.useState)(!1),[g,u]=(0,s.useState)(!1),[m,f]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e&&!h&&(p(!0),setTimeout(()=>f(!0),200))},[e,h]);let v=e||h,C=t&&t.url&&t.url.thumbnail,S=t.caption||t.photoCategoryKey?.[0]&&`Property ${t.photoCategoryKey[0]}`||t.alt,L=t&&t.url&&(t.url.largeSrc||t.url.original);return(0,i.jsxs)(r.Uik,{css:b,style:{height:"100%"},onClick:m?()=>o(a):()=>{},children:[(0,i.jsx)(r.VIg,{css:y.raw({isLoaded:g}),alt:S||`view ${x.oy.ordinal(a+1)} full size image of this home`,id:`photo-gallery-${a}`,"data-testid":`photo-gallery-${a}`,src:v?L:C,onLoad:()=>{v&&(u(!0),"function"==typeof d&&d(n,a))},objectFit:"cover",loading:"auto",decoding:"auto",...v?c:{}}),t.caption&&(0,i.jsx)(r.azJ,{css:j,children:(0,i.jsx)(r.T33,{css:w,size:"caption",truncate:!0,children:t.caption})})]})});var S=a(95531);let L=(0,o.Fj)({base:{zIndex:"4",position:"absolute",top:"calc(50% - 12px)","@media (any-hover: none)":{display:"none"}},variants:{alignLeft:{true:{left:"20px",right:"auto"}},alignRight:{true:{right:"20px",left:"auto"}}}}),k=(0,o.Fj)({base:{top:"0",height:"calc(100% - 100px)",width:"40px",position:"absolute",zIndex:"4"},variants:{alignLeft:{true:{left:"0",right:"auto"}},alignRight:{true:{right:"0",left:"auto"}}}}),A=(0,r.WjH)(({onLeftButtonClick:e,onRightButtonClick:t,breakpoint:a})=>(0,i.jsx)(r.Sxu,{background:"dark",children:(0,x.xl)(a)||(0,x.v1)(a)?(0,i.jsxs)(s.Fragment,{children:[(0,i.jsx)(r.fdE,{css:L.raw({alignLeft:!0}),"data-testid":"media-prev-button",large:!0,onClick:e,"aria-label":"Previous image",children:(0,i.jsx)(r.rZr,{width:24,height:24})}),(0,i.jsx)(r.fdE,{css:L.raw({alignRight:!0}),"data-testid":"media-next-button",large:!0,onClick:t,"aria-label":"Next image",children:(0,i.jsx)(r.wFI,{width:24,height:24})})]}):(0,i.jsxs)(s.Fragment,{children:[(0,i.jsx)("div",{className:k({alignLeft:!0}),onClick:e,"data-testid":"media-prev-target"}),(0,i.jsx)("div",{className:k({alignRight:!0}),onClick:t,"data-testid":"media-next-target"})]})}));var R=a(18847),M=a.n(R);let I=(0,o.Fj)({base:{objectFit:"contain",width:"100%",height:"100%",WebkitTouchCallout:"none",backgroundColor:"transparent"},variants:{isTransparent:{false:{backgroundColor:"black"}}}}),H=M()(()=>Promise.all([a.e(5227),a.e(8522),a.e(2909),a.e(2126),a.e(7695)]).then(a.bind(a,56664)),{loadableGenerated:{webpack:()=>[56664]},ssr:!1}),_=({mediaSrc:e,mediaSrcs:t,mediaIndex:a,mediaCount:s,isTransparent:n,muted:o,currentIndex:l})=>(0,i.jsx)(i.Fragment,{children:e&&(e.match(/\.(jpeg|jpg|gif|png|webp)$/)||e.startsWith("//maps.googleapis.com/maps/api/streetview"))?(0,i.jsx)(r.VIg,{css:I.raw({isTransparent:n}),src:e,webpSrc:t.largeWebpSrc,objectFit:"contain","data-testid":`media-carousel-image-${a}`,alt:`Viewing photo ${a+1} of ${s}`,loading:"auto",decoding:"auto"}):(0,i.jsx)(H,{videoSrc:e,"data-testid":`media-carousel-video-${a}`,muted:o,playVideo:a===l})}),T=(0,o.AH)({display:"flex",flex:"1",flexDirection:"column",outline:"none",_hover:{"&.floating-action-button":{display:"flex"}}});class N extends s.Component{static{this.defaultProps={mediaCollection:[],currentMediaIndex:0,style:{},onMediaIndexChanged:()=>{},withFooter:!0,isTransparent:!1}}static{this.constrainIndex=(e,t)=>e>=0&&e<t?e:0}constructor(e){super(e),this.state={currentMediaIndex:N.constrainIndex(e.currentMediaIndex,e.mediaCollection.length)},this.handleSlideUpdate=this.handleSlideUpdate.bind(this),this.contentRef=s.createRef()}componentDidMount(){let{mediaCollection:e,createAnalyticsEvent:t,currentMediaIndex:a,trackMediaView:i}=this.props;e&&e.length>0&&a<e.length&&"function"==typeof i&&i(t,a)}handleSlideUpdate(e){"function"==typeof this.props.onMediaIndexChanged&&this.props.onMediaIndexChanged(e),this.setState({currentMediaIndex:e})}render(){let{mediaCollection:e,createAnalyticsEvent:t,style:a,isTransparent:s,trackMediaView:n}=this.props;if(!e||e.length<=0)return null;let o=0===this.state.currentMediaIndex?e.length-1:this.state.currentMediaIndex-1,l=this.state.currentMediaIndex===e.length-1?0:this.state.currentMediaIndex+1;return(0,i.jsx)("div",{className:T,tabIndex:-1,ref:this.contentRef,style:a,"data-testid":"media-carousel-container",children:(0,i.jsx)(r.GYK,{onMediaIndexChanged:this.handleSlideUpdate,withKeyboardSupport:!0,currentMediaIndex:N.constrainIndex(this.props.currentMediaIndex,e.length),slidesCount:e.length,renderNavigationControls:(e,a)=>(0,i.jsx)(A,{onLeftButtonClick:a=>{"function"==typeof n&&n(t,o),this.contentRef.current.focus(),e(a)},onRightButtonClick:e=>{"function"==typeof n&&n(t,l),this.contentRef.current.focus(),a(e)}}),children:e.map((t,a)=>(0,i.jsx)(_,{mediaSrc:t.url&&(t.url.largeSrc||t.url.original),mediaSrcs:{...t.url,...t.webpUrl},mediaIndex:a,isTransparent:s,currentIndex:this.state.currentMediaIndex,mediaCount:e.length},`media-carousel-slide-${a}`))})})}}let $=N=(0,S.Cg)([(0,v.u4)(),(0,S.Sn)("design:type",Function),(0,S.Sn)("design:paramtypes",["u"<typeof Props?Object:Props])],N),E=(0,o.AH)({height:"100%",marginBottom:"s"}),F=(0,v.kg)(({mediaUrl:e,position:t,mediaCount:a,createAnalyticsEvent:r,trackMediaView:n})=>((0,s.useEffect)(()=>{"function"==typeof n&&n(r,t)}
49,[]),(0,i.jsx)("div",{className:E,children:(0,i.jsx)(H,{videoSrc:e,muted:!0,className:(0,o.AH)({height:"100%"})})}))),D=({position:e,scrollRef:t,mediaEntry:a,mediaCount:r,...s})=>{let n=a&&a.url&&(a.url.largeSrc||a.url.original);return(0,i.jsx)(f.ND,{root:t,rootMargin:"40%",style:{width:"100%"},renderComponent:({isInView:t})=>n?n&&(n.match(/\.(jpeg|jpg|gif|png|webp)$/)||n.startsWith("//maps.googleapis.com/maps/api/streetview"))?(0,i.jsx)(C,{image:a,isInView:t,position:e,mediaCount:r,...s}):(0,i.jsx)(F,{mediaUrl:n,position:e,mediaCount:r,...s}):null},`home-details-gallery-${e}`)},W={LARGE:"large",MEDIUM:"medium",SMALL:"small"},z={"100%":W.LARGE,"50%":W.MEDIUM,"33.3%":W.SMALL},U={1:"70vh",2:"50vh",3:"40vh"},O={1:"60vh",2:"30vh",3:"20vh"},B={1:"30vh",2:"20vh"},Y={1:"40vh",2:"28vh"},P=(0,o.AH)({display:"grid",gridTemplateColumns:"repeat(18, 1fr)",gridGap:"0",paddingBottom:"xs"}),V=(0,o.AH)({display:"flex",gridColumn:"1 / 4",gridColumnStart:"1",overflow:"hidden",padding:"xxs",_hover:{cursor:"pointer"},"@media only screen and (max-device-width: 450px) and (orientation : landscape)":{height:"60vh"}}),X=(0,o.AH)({marginTop:"m",marginRight:"s",marginBottom:"xs",marginLeft:"xxs",_medium:{marginLeft:"s"},_large:{marginLeft:"12px"}}),G=[1],K=[2,2],J=[3,3,3],Z=[...K,...J,...G,...K,...J,...K,...G,...J,...K,...G,...J],q=[...G,...K,...G,...G,...G,...K,...G],Q=(e,t)=>{let a=`${Math.round(100/e*10)/10}%`,i=1;return Array.from({length:e},(r,s)=>{let n=Math.floor((19-i)/(e-s)),o=`${i}/${i+n}`;return i+=n,{gridColumn:o,maxHeight:t?U[e]:Y[e],minHeight:t?O[e]:B[e],width:a}})},ee=(0,r.WjH)(({mediaCollection:e,breakpoint:t,onClick:a,mediaCount:s,scrollRef:n,baseIndex:o,trackMediaView:l})=>{let d=t===r.LOf.XXL||t===r.LOf.XXXL,c=t===r.LOf.small||t===r.LOf.extraSmall,h=((e,t,a)=>{let i=[],r=0,s=e,n=t?Z:a?[1]:q;for(;s>0;){let e=n[r%n.length],a=Math.min(e,s);r+=e,s-=a,i.push(...Q(a,t))}return i})(Array.isArray(e)?e.length:0,d,c);return(0,i.jsxs)(i.Fragment,{children:[e.heading&&(0,i.jsx)("div",{className:X,children:e.heading}),(0,i.jsx)("div",{className:P,"data-testid":"grid-gallery",children:Array.isArray(e)&&e.map((e,t)=>{let{gridColumn:r,maxHeight:d,width:c,minHeight:p}=h[t];return(0,i.jsx)("div",{className:V,style:{gridColumn:r,maxHeight:d,minHeight:p},children:(0,i.jsx)(D,{mediaEntry:e,position:o+t,onClick:a,mediaCount:s,size:z[c],scrollRef:n,trackMediaView:l})},`media-cell-${o}-${t}`)})})]})}),et=s.createRef(),ea=(0,o.Fj)({base:{position:"fixed",width:"50px",height:"50px",marginY:"0",marginX:"auto",right:"0",left:"0",transition:"all 300ms",transform:"translateY(0%)",opacity:"0","& svg":{filter:"drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.7))"}},variants:{isDesktop:{true:{bottom:"10px"},false:{bottom:"60px"}}}}),ei=(0,o.Fj)({base:{height:"100%",overflowY:"auto",WebkitOverflowScrolling:"touch",position:"relative",borderRadius:"m",marginY:"0",marginX:"xxs",willChange:"transform",_large:{width:"auto",borderRadius:"0",margin:"-4px"},"& .scroll-indicator-appear-done":{transitionDelay:"1s",opacity:"1",transform:"translateY(20%)"},"& .scroll-indicator-exit":{opacity:"1",transform:"translate3d(0%, 20%, 0)"},"& .scroll-indicator-exit-done":{opacity:"0",transform:"translate3d(0%, -20%, 0)"}},variants:{hasMedia:{true:{maxHeight:"calc(100vh - 274px)"},false:{maxHeight:"calc(100vh - 200px)"}},hasLeadForm:{true:{width:"calc(100% - 348px)"},false:{width:"calc(100% - 16px)"}}},compoundVariants:[{hasMedia:!0,hasLeadForm:!0,css:{_large:{maxHeight:"calc(100% - 134px)"}}},{hasMedia:!1,hasLeadForm:!0,css:{_large:{maxHeight:"calc(100% - 60px)"}}},{hasMedia:!1,hasLeadForm:!1,css:{_large:{maxHeight:"100%"}}}]}),er=(0,o.AH)({width:"100%",height:"100%",_medium:{display:"flex",flexDirection:"column"}}),es=o.AH.raw({position:"absolute",bottom:"16px",left:"32px",textShadow:"0px 0px 3px rgba(0, 0, 0, 0.7)",_medium:{display:"none"}}),en=o.AH.raw({bottom:"16px",display:"flex",position:"absolute",width:"100%",_medium:{bottom:"100px"}}),eo=o.AH.raw({margin:"auto",justifyContent:"center",backgroundColor:"grey",paddingY:"xxxs",paddingX:"xs",borderRadius:"4px",_medium:{backgroundColor:"transparent",marginLeft:"s",padding:"0"}}),el=(0,o.AH)({_medium:{backgroundColor:"grey",paddingY:"xxxs",paddingX:"xxs",borderRadius:"4px",display:"inline"}}),ed=o.AH.raw({_before:{content:'" - "'},_medium:{display:"block",textShadow:"0px 2px 4px rgba(0, 0, 0, .5)",paddingY:"xxxs",paddingX:"xxs"}}),ec=(0,v.ED)({pageDetails:"overlay",pageType:"media player photos"})((0,v.u4)()(({mediaCollection:e,onClick:t=()=>{},price:a,breakpoint:n,onCloseClick:o,hasLeadForm:d,isOffMarket:c,createAnalyticsEvent:h,currentMediaIndex:
49p,onMediaIndexChanged:g,address:u,bedrooms:f,bathrooms:y,renderUserActionButtons:b,trackMediaView:j,providerLogoUrl:w})=>{let C=e.length,S=(0,x.Fr)(n),L=(0,x.xl)(n),k=(0,s.useRef)(null),A=()=>{h(v.c.ACTION,{interactedWith:"top right:close button"}).track(),o()};(0,s.useEffect)(()=>{let e=e=>{e.target===k.current&&A()};k.current.addEventListener("click",e),h(v.c.STATE,{}).track();let t=k.current;return()=>{t?.removeEventListener("scroll",e)}},[]);let R=`${p+1} of ${C}`,M=e[p];return(0,i.jsxs)("div",{className:er,ref:k,children:[(0,i.jsx)(m,{address:u,price:a,bedrooms:f,bathrooms:y,onCloseClick:A,counterText:R,showLeadForm:d&&!c,renderUserActionButtons:b,isMobile:S,providerLogoUrl:w}),(0,i.jsx)($,{mediaCollection:e,onClick:t,style:{overflow:"hidden",height:L?"90%":"100%",width:L?"80%":"100%",position:"relative",margin:"auto",padding:"8px 0 16px"},onMediaIndexChanged:g,currentMediaIndex:p,price:a,isTransparent:!0,trackMediaView:j}),(0,i.jsxs)(r.T33,{css:es,size:"body",bold:!0,color:"inverse","aria-live":"polite","data-testid":"grid-gallery-overlay-counter-text",children:[(0,i.jsx)(r.hdT,{children:"Viewing photo"}),R]}),M.caption&&(0,i.jsx)(r.azJ,{css:en,children:(0,i.jsxs)(r.azJ,{css:eo,children:[(0,i.jsx)(r.EYj,{className:el,css:{fontSize:["caption","caption","caption","body"]},bold:!0,color:"inverse",children:M.caption}),(0,i.jsx)(r.EYj,{css:ed,size:"body",color:"inverse",children:M.collectionHeading})]})}),!L&&d&&!c&&(0,i.jsx)(r.Yqy,{v:"xxs",h:"xs",style:{background:"white"},children:(0,i.jsx)(l.ly,{breakpoint:n})})]})})),eh=(0,r.WjH)(ec),ep=({mediaCollectionList:e,breakpoint:t,address:a,price:o,isOffMarket:l,hasLeadForm:d,bedrooms:c,bathrooms:h,onImageClick:p,trackMediaView:g,providerLogoUrl:m,priceAttributes:f,hasMedia:v,scrollResetKey:y})=>{let b=(0,x.xl)(t),j=s.useRef(null),[w,C]=(0,s.useState)(!1),[S,L]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let e=()=>{C(!0),et.current.removeEventListener("scroll",e)};return et?.current?.scrollHeight>window.innerHeight&&(L(!0),et.current.addEventListener("scroll",e)),()=>{et.current&&et.current.removeEventListener("scroll",e)}},[]),(0,s.useEffect)(()=>{et.current&&(et.current.scrollTop=0)},[y]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.xA9,{spacing:"none",align:"center",children:[(0,i.jsx)(r.fhW,{children:(0,i.jsx)(u,{address:a,price:o,breakpoint:t,bedrooms:c,bathrooms:h,priceAttributes:f})}),m?(0,i.jsx)(r.fhW,{children:(0,i.jsx)(r._V3,{alt:"",height:"16px",src:m})}):null]}),(0,i.jsxs)("div",{className:ei({hasMedia:!!v,hasLeadForm:d&&!l}),ref:et,children:[e.map((e,t,r)=>{let s=0;for(let e=0;e<t;e+=1)s+=r[e].length;return(0,i.jsx)(ee,{mediaCollection:e,scrollRef:et,mediaCount:e.length??0,onClick:p,baseIndex:s,trackMediaView:g},`${a}-media-collection-${t}`)}),S&&(0,i.jsx)(n.A,{appear:!0,in:!w,timeout:300,classNames:"scroll-indicator",nodeRef:j,children:(0,i.jsx)("div",{ref:j,className:ea({isDesktop:b}),children:(0,i.jsx)(r.k57,{color:"inverse",width:50,height:50,"data-testid":"grid-gallery-scroll-indicator"})})})]})]})}}}]);
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.