(f=f||new e)||!f.update)return!1;var t=u.get("map");if(!t)return!1;t.register("change",function(e){e&&e.bounds&&Object.keys(e.bounds).length>0&&f&&f.update&&f.update({set:{bounds:e.bounds}})}),f.update({set:{layer:{propertyAddresses:{min:18,max:100}}},search:!1,register:{new:function(e){if(!e)return!1;var t=u.get("map").controller;if(!t)return!1;e.listings&&t.show("HSPropertyAddressListingItem",{data:e.listings}),e.propertyAddresses&&t.show("HSPropertyAddressItem",{data:e.propertyAddresses,showMini:!0})}}})}))}var i=e("ControllerObjects"),p=new i.Unique(t),d=new i.Callbacks,u=new i.ChildControllerManager,c=new i.StateManager(u);u.add("map",new i.ChildController({type:"controllers/Map",namespace:p.get(),register:{bubble:r}}));var g,m,f,y,h,b=new i.Getter({namespace:p.get(),success:function(e){try{s(e)}catch(e){throw void 0!==c&&null!==c&&console.info(c),e}},failure:function(){try{throw new Error("PropertyMap controller: Unhandled Error")}catch(e){throw void 0!==c&&null!==c&&console.info(c),e}},template:{url:"controllers/Property/PropertyMap.html",dom:["h3MapLabel","divMapCollapse","spanMapCollapseChevron","divMapItem"]}});return{update:n,restore:function(e){c.restore(e,a)},uninit:function(){u.uninit()},getState:c.getState.bind(c),register:d.register.bind(d),event:function(e,t){u.event(e,t)}}}}); define("controllers/Property/PropertyFollow",["require","ControllerObjects","Application"],function(e){return function(t){function r(e){g.call("bubble",e)}function o(e){y.update(e),n()}function n(){if(!y.$dom)throw"No state.$dom";if(!y.get("propertyAddressItem"))throw"No state.data.propertyAddressItem";d=y.get("propertyAddressItem").status.isFollowed,m.showFavorite.get({$dom:y.$dom,data:y.get("propertyAddressItem")})}function s(e){l=e.$dom;var t={propertyAddressID:y.get("propertyAddressItem").id,propertyID:y.get("propertyAddressItem").propertyID?y.get("propertyAddressItem").propertyID:0,listingID:y.get("propertyAddressItem").listing?y.get("propertyAddressItem").listing.id:null};b.done(function(){l.btnFollow.click(function(e){c&&c.registrationStatus&&!c.registrationStatus.registered?r({type:"account.mode"}):d?m.unFollow.get({data:t,success:function(e){e.data&&(d=!1,l.btnFollow.text("Notify Me of Price Changes").addClass("btn-notify-off"))}}):m.follow.get({data:t,success:function(e){e.data&&(d=!0,l.btnFollow.text("Turn off notifications").removeClass("btn-notify-off"))}})})})}function i(){w.uninit()}function a(e,t){w.event(e,t)}var l,d,c,p=e("ControllerObjects"),u=e("Application"),f=new p.Unique(t),g=new p.Callbacks,w=new p.ChildControllerManager,y=new p.StateManager(w,{}),m={showFavorite:new p.Getter({namespace:f.get(),success:s,template:{url:"controllers/Property/PropertyFollow.html",dom:["btnFollow"]}}),follow:new p.Getter({type:Boolean,webService:"/service/PropertyAddresses/Follow",namespace:f.get(),success:s,cache:{expire:0}}),unFollow:new p.Getter({type:Boolean,webService:"/service/PropertyAddresses/Unfollow",namespace:f.get(),success:s,cache:{expire:0}})},b=function(){var e=$.Deferred();return u.getCurrentUser(function(t){c=t.user,e.resolve()},!0),e}();return{update:o,restore:function(e){y.restore(e,n)},uninit:i,getState:y.getState.bind(y),register:g.register.bind(g),event:a}}}); ".concat(t))})})}if(r.data&&r.data.statusBar&&(u.divSecondaryStatusBar.length>0||u.divLikelihoodStatusBar.length>0)){var T=u.divStatusBar.width(),D=0,F=0,$=u.divStatusBar.length>0?1:0;u.divSecondaryStatusBar.length>0&&(D=u.divSecondaryStatusBar.width(),$+=1),u.divLikelihoodStatusBar.length>0&&(F=u.divLikelihoodStatusBar.width(),$+=1);var z=Math.max(T,D,F);u.divStatusBar.css("width",z).attr("data-status-bar-count",$),D&&u.divSecondaryStatusBar.css("width",z).attr("data-status-bar-count",$),F&&u.divLikelihoodStatusBar.css("width",z).attr("data-status-bar-count",$),T=A.bottom+j,n=t.left>=A.right+j;i||a||s||n?D||l():o()}else l()}function m(){var e;null!==(e=B)&&void 0!==e&&e.id&&a({type:"listing.hover.show",data:{pa:B}})}function v(e,t){e&&e.spanFavorite.length&&t&&t.item&&(E.add("propertyFavorite",new $.ChildController({type:"controllers/Property/PropertyFavorite",namespace:N.get(),register:{bubble:a}}),!0),V.updateController("propertyFavorite",{$dom:e.spanFavorite,data:{propertyAddressItem:t.item,showText:!1}}))}function h(e){var t,r,i,a=(null===(t=B)||void 0===t?void 0:null===(r=t.listing)||void 0===r?void 0:r.id)===(null===e||void 0===e?void 0:null===(i=e.ids)||void 0===i?void 0:i.listingID),s=B&&!B.listing&&(null===e||void 0===e?void 0:e.ids)&&!e.ids.listingID&&B.propertyID===e.ids.propertyID,o=B&&!B.listing&&(null===e||void 0===e?void 0:e.ids)&&!e.ids.listingID&&!B.propertyID&&!e.ids.propertyID&&B.id===e.ids.propertyAddressID;(a||s||o)&&(!0===(null===e||void 0===e?void 0:e.favoriteStatus)? [0]}}" alt="" loading="lazy" width="555" height="416"/> {{/if}}