(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[56],{RzUL:function(t,e,n){"use strict";var i=n("nKUr"),c=n("R14j"),s=n("q1tI"),a=n("09jD"),o=n("OYkj"),r=n("up7I");e.a=function(t){var e=Object(a.b)().height,n=Object(s.useState)(20),l=n[0],u=n[1],d=Object(s.useState)(!1),j=d[0],b=d[1];return Object(s.useEffect)((function(){var n=j?Object(o.c)(e)/2:20;u(n),t.onGetListHeight&&t.onGetListHeight(n)}),[j]),Object(i.jsxs)(c.a,{animationIn:"slideInUp",animationInDuration:1e3,animationOut:"fadeOut",isVisible:!0,className:"listing-sidebar-bottom",style:{height:l},children:[Object(i.jsx)(r.a,{isExpanded:j,onClick:function(){var e=!j;b(e),t.onListExpandChange&&t.onListExpandChange(e)}}),t.children]})}},TsnT:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("nKUr"),c=(n("liYs"),n("Shw8")),s=function(t){var e=t.onClick,n=t.showBtn,s=void 0!==n&&n;return Object(i.jsx)(c.a,{icon:"cancel",title:"\u0e1b\u0e34\u0e14",extraClassName:"close-popup-btn ".concat(s?"show-btn":""),onClick:e})}},VZFj:function(t,e,n){"use strict";n.d(e,"b",(function(){return N})),n.d(e,"c",(function(){return T.a})),n.d(e,"a",(function(){return v.a}));var i=n("nKUr"),c=n("o0o1"),s=n.n(c),a=n("KQm4"),o=n("rePB"),r=n("HaE+"),l=n("q1tI"),u=n("Vvt1"),d=n.n(u),j=n("pb7X"),b=n("20a2"),O=n("cEZL"),f=n("v+8C"),p=n("2t/4"),g=n("loEb"),v=n("RzUL"),h=n("UIT7");function m(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function x(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var P=d()((function(){return n.e(260).then(n.bind(null,"Nn/s"))}),j.a),y=d()((function(){return Promise.all([n.e(18),n.e(20),n.e(21),n.e(22),n.e(65)]).then(n.bind(null,"zFNh"))}),j.a),C=d()((function(){return Promise.resolve().then(n.bind(null,"11+w")).then((function(t){return t.Mobile}))}),j.a),w=d()((function(){return Promise.resolve().then(n.bind(null,"11+w")).then((function(t){return t.IsNotMobile}))}),j.a),N=function(t){var e,n=Object(b.useRouter)(),c=Object(l.useContext)(f.a).setLayoutFixedHeight,o=Object(g.a)(),u=Object(l.useState)(),d=u[0],j=u[1],m=Object(l.useState)(),N=m[0],T=m[1],I=Object(l.useState)(!1),S=I[0],D=I[1],L=Object(l.useState)(!1),E=L[0],k=L[1],R=Object(l.useState)("Overview"),U=R[0],F=R[1];Object(l.useEffect)((function(){document.body.addEventListener("touchmove",(function(t){t.preventDefault()}))}),[]);var q=Object(l.useState)({isLoading:!1,listingPoints:[],listingItems:[]}),_=q[0],G=q[1],B=Object(l.useState)({listingTypes:["PROP","PROP_POST","LOC_POST","CONDO"],bbox:null}),K=B[0],Z=B[1],z=Object(l.useState)({pageSize:10,pageNo:0,sortOptions:[]}),A=z[0],W=z[1],H=Object(l.useState)({totalItemCount:0,totalPageCount:0}),V=H[0],M=H[1],J=Object(l.useCallback)(function(){var t=Object(r.a)(s.a.mark((function t(e){var n,i,c,r,l,u,d,j;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!K.bbox){t.next=12;break}return G((function(t){return x(x({},t),{},{isLoading:!0})})),t.next=5,p.f({criteria:K,pagination:e});case 5:n=t.sent,i=n.value,c=i.mapResults,r=i.listResults,l=r.items,u=r.totalPageCount,d=r.totalItemCount,M({totalPageCount:u,totalItemCount:d}),c,_.listingPoints.length&&(j=c.filter((function(t){return!_.listingPoints.some((function(e){return e.id===t.id}))})),[].concat(Object(a.a)(_.listingPoints.filter((function(t){return K.listingTypes.includes(t.listingType)}))),Object(a.a)(j))),G((function(t){return{isLoading:!1,listingPoints:c,listingItems:0===e.pageNo?l:[].concat(Object(a.a)(t.listingItems),Object(a.a)(l))}}));case 12:t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),o(t.t0);case 17:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(e){return t.apply(this,arguments)}}(),[K]),Y=function(t){W((function(e){return x(x({},e),{},{pageNo:t})}))};Object(l.useEffect)((function(){J(A)}),[J]),Object(l.useEffect)((function(){var t=n.query;null!==t&&void 0!==t&&t.listingId&&(k(!0),setTimeout((function(){T(t.listingId),F(t.activeTab)}),3e3))}),[n.query]),Object(l.useEffect)((function(){c(!0)}),[]);var Q=Object(i.jsx)(P,{isLoading:_.isLoading,items:_.listingItems,currentPageNo:A.pageNo,paginate:V,listingTypes:K.listingTypes,onGetPageNo:function(t){Y(t),J(x(x({},A),{},{pageNo:t}))},onGetListRef:j,onChangeListingTypes:function(t){Y(0),Z((function(e){return x(x({},e),{},{listingTypes:t})}))}});return Object(i.jsxs)(O.a.Provider,{value:{activeListingId:N,setActiveListingId:function(t){T(t),n.replace(n.pathname,void 0,{shallow:!0}),F("Overview"),k(!1)}},children:[Object(i.jsx)(h.a,{}),Object(i.jsx)("div",{id:"listing-page",children:Object(i.jsx)("div",{className:"container-fluid",children:Object(i.jsxs)("div",{className:"row",children:[Object(i.jsx)("div",{className:"col-xs-12 col-sm-7 col-md-8 col-lg-9 map-wrapper",children:Object(i.jsx)("div",{className:"row",children:Object(i.jsx)(y,{isListExpanded:S,data:_.listingPoints,onGetBBox:function(t){d&&d.scrollTo(0,0),Y(0),Z((function(e){return x(x({},e),{},{bbox:t})}))},defaultListingTab:U,defaultCityPlanDraftType:null===(e=n.query)||void 0===e?void 0:e.showCityPlan,isForceZoomOut:E,onSetIsForceZoomOut:k})})}),Object(i.jsx)(w,{children:Object(i.jsx)("div",{className:"col-xs-12 col-sm-5 col-md-4 col-lg-3 listing-sidebar-wrapper",children:Object(i.jsx)("div",{className:"row",children:Q})})}),Object(i.jsx)(C,{children:Object(i.jsx)(v.a,{onListExpandChange:function(t){return D(t)},children:Q})})]})})})]})},T=n("tG51")},cEZL:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var i=n("q1tI"),c=Object(i.createContext)(null)},cl4u:function(t,e,n){"use strict";var i=n("nKUr"),c=n("q1tI"),s=n("Iw9p"),a=n("TsnT");e.a=function(t){var e=t.title,n=t.subtitle,o=t.location,r=t.cardIconContent,l=t.cardExtraContent,u=t.containerClassName,d=void 0===u?"":u,j=t.cardContentClassName,b=void 0===j?"":j,O=t.cardContentStyle,f=t.getCardContentWidth,p=t.onClickTitle,g=t.onClosePopup,v=Object(c.useState)(null),h=v[0],m=v[1],x=Object(c.useRef)(null);return Object(c.useEffect)((function(){var t;if(null!==(t=x.current)&&void 0!==t&&t.clientWidth){var e=x.current.clientWidth-10;f&&f(e),m(e)}})),Object(i.jsxs)("div",{className:"lando-card ".concat(d),children:[Object(i.jsx)("div",{className:"card-icon",children:Object(i.jsx)("div",{className:"card-icon-inner",children:Object(i.jsx)("div",{className:"card-icon-content",children:r})})}),Object(i.jsxs)("div",{className:"card-content",ref:x,children:[Object(i.jsxs)("div",{className:"card-content-title ".concat(b," ").concat(p?"has-click":""),onClick:null!==p&&void 0!==p?p:void 0,style:O,children:[g&&Object(i.jsx)(a.a,{onClick:g}),Object(i.jsx)("h3",{className:"title",children:Object(i.jsx)(s.a,{width:null!==h&&void 0!==h?h:"auto",content:e})}),Object(i.jsx)("h4",{className:"subtitle",children:n})]}),Object(i.jsxs)("div",{className:"card-content-desc",children:[Object(i.jsx)("div",{className:"show-location",children:o?Object(i.jsx)(s.a,{width:null!==h&&void 0!==h?h:"auto",content:o}):"-"}),l]})]})]})}},tG51:function(t,e,n){"use strict";var i=n("rePB"),c=n("nKUr"),s=n("q1tI"),a=n("cEZL"),o=n("Isfm"),r=n("cl4u"),l=n("t8yO"),u=n("lgvz"),d=n("Rqsn"),j=n("Shw8");function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function O(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){Object(i.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e.a=function(t){var e=t.item,n=t.isFavorite,i=t.overrideFeatureImage,b=t.onSaveFavorite,f=Object(s.useContext)(a.a).setActiveListingId,p=Object(s.useState)(null),g=p[0],v=p[1];return Object(c.jsx)(r.a,{onClickTitle:function(){f(e.id)},getCardContentWidth:v,cardContentClassName:Object(l.h)(e.listingType,e.listingUseType),cardIconContent:Object(c.jsxs)(c.Fragment,{children:[Object(c.jsx)(j.a,{icon:n?"favorite":"favorite_border",onClick:b,extraClassName:"listing-favorite ".concat(n?"saved":""),tipMsg:n?"Favorite":"Save to Favorite"}),i||(e.featuredImageId?Object(c.jsx)(d.e,{mode:"BG",fileUploadId:e.featuredImageId,className:"bg-image-cover",isWrapContainer:!1}):Object(u.d)(e.listingType))]}),title:e.title,subtitle:"PROP"===e.listingType||"CONDO"===e.listingType?Object(c.jsxs)("span",{children:[Object(o.f)(e.latestFairValue,0)," \u0e1a\u0e32\u0e17"]}):"PROP_POST"===e.listingType?Object(c.jsxs)("span",{children:[Object(o.f)(e.propPostDetail.price,0)," \u0e1a\u0e32\u0e17"]}):"LOC_POST"===e.listingType&&e.locPostDetail?Object(c.jsxs)("span",{children:[Object(o.f)(e.locPostDetail.minAreaRai,1)," -"," ",Object(o.f)(e.locPostDetail.maxAreaRai,1)," \u0e44\u0e23\u0e48"]}):null,location:e.fullAddress,cardExtraContent:"PROP"===e.listingType?Object(c.jsx)(l.d,{deedDetail:e.deedDetail,buildingDetail:e.buildingDetail}):"LOC_POST"===e.listingType?Object(c.jsx)(l.b,{width:null!==g&&void 0!==g?g:"auto",type:e.listingUseType,maxPrice:e.locPostDetail.maxPrice,specification:e.locPostDetail.specification}):"CONDO"===e.listingType?Object(c.jsx)(l.a,O({},e.condoDetail)):"PROP_POST"===e.listingType?Object(c.jsx)(l.e,{width:null!==g&&void 0!==g?g:"auto",type:e.listingUseType,areaSqw:e.propPostDetail.areaSqw,specification:e.propPostDetail.specification}):null})}}}]);