Plugin Directory

Changeset 3393989


Ignore:
Timestamp:
11/12/2025 04:13:05 AM (3 months ago)
Author:
loftylisting
Message:

update code to trunk

Location:
lofty-idx/trunk
Files:
3 added
17 edited

Legend:

Unmodified
Added
Removed
  • lofty-idx/trunk/assets/.vite/manifest.json

    r3393952 r3393989  
    122122    ]
    123123  },
    124   "_house-format.Bvy9O_Yy.js": {
    125     "file": "house-format.Bvy9O_Yy.js",
     124  "_house-format.CcB19moP.js": {
     125    "file": "house-format.CcB19moP.js",
    126126    "name": "house-format",
    127127    "imports": [
     
    418418    ]
    419419  },
    420   "_popup-trigger.Clg3jXpa.js": {
    421     "file": "popup-trigger.Clg3jXpa.js",
     420  "_popup-trigger.C9dAVRHW.js": {
     421    "file": "popup-trigger.C9dAVRHW.js",
    422422    "name": "popup-trigger",
    423423    "imports": [
    424424      "__plugin-vue_export-helper.C-JQ4LYv.js",
     425      "_house-format.CcB19moP.js",
    425426      "_user.BF73KgDm.js",
    426427      "_index.C1-1XiZ9.js"
     
    456457    "src": "_styleConfig.!~{00E}~.js"
    457458  },
    458   "_styleConfig.Dyq3MnHm.js": {
    459     "file": "styleConfig.Dyq3MnHm.js",
     459  "_styleConfig.Bp18tYB4.js": {
     460    "file": "styleConfig.Bp18tYB4.js",
    460461    "name": "styleConfig",
    461462    "imports": [
     
    472473      "_service.BOwSreoa.js",
    473474      "_index.DAwEVGKX.js",
    474       "_house-format.Bvy9O_Yy.js",
     475      "_house-format.CcB19moP.js",
    475476      "_SubmitJs.cJWSj2Zz.js",
    476477      "_checkBox.ls7NZy2i.js",
     
    572573      "_vendor.DSMCY3-_.js",
    573574      "_SubmitJs.cJWSj2Zz.js",
    574       "_styleConfig.Dyq3MnHm.js",
     575      "_styleConfig.Bp18tYB4.js",
    575576      "_PluginUpdate.DDB1CEnu.js",
    576577      "_useCopy.CluLpl8Z.js",
     
    593594      "_service.BOwSreoa.js",
    594595      "_index.DAwEVGKX.js",
    595       "_house-format.Bvy9O_Yy.js",
     596      "_house-format.CcB19moP.js",
    596597      "_user.BF73KgDm.js"
    597598    ],
     
    635636      "_vendor.DSMCY3-_.js",
    636637      "_SubmitJs.cJWSj2Zz.js",
    637       "_styleConfig.Dyq3MnHm.js",
     638      "_styleConfig.Bp18tYB4.js",
    638639      "_useCopy.CluLpl8Z.js",
    639640      "_date-format.BrUodQAJ.js",
     
    655656      "_index.d_VP6W-1.js",
    656657      "_service.BOwSreoa.js",
    657       "_house-format.Bvy9O_Yy.js",
     658      "_house-format.CcB19moP.js",
    658659      "_checkBox.ls7NZy2i.js",
    659660      "_tooltip.CnRrvdDV.js"
     
    702703      "_vendor.DSMCY3-_.js",
    703704      "_module.CKjUdtPN.js",
    704       "_house-format.Bvy9O_Yy.js",
    705       "_popup-trigger.Clg3jXpa.js",
     705      "_house-format.CcB19moP.js",
     706      "_popup-trigger.C9dAVRHW.js",
    706707      "_feature-listing-slider.QgT9uoot.js",
    707708      "_houseSlider.ptuPATjg.js",
     
    757758      "_popup-mls.BZWi9Sqc.js",
    758759      "_user.BF73KgDm.js",
    759       "_house-format.Bvy9O_Yy.js",
     760      "_house-format.CcB19moP.js",
    760761      "_index.qpyE7W-K.js",
    761762      "_index.C1-1XiZ9.js",
    762763      "_verify-email.B_du1TfR.js",
    763764      "_vendor.DSMCY3-_.js",
    764       "_popup-trigger.Clg3jXpa.js",
     765      "_popup-trigger.C9dAVRHW.js",
    765766      "_tooltip.CnRrvdDV.js",
    766767      "_index.BAT38o-R.js",
     
    795796      "_loading.BdqyMKJZ.js",
    796797      "_index.d_VP6W-1.js",
    797       "_house-format.Bvy9O_Yy.js",
     798      "_house-format.CcB19moP.js",
    798799      "_verify-email.B_du1TfR.js",
    799800      "_index.C1-1XiZ9.js",
    800       "_popup-trigger.Clg3jXpa.js",
     801      "_popup-trigger.C9dAVRHW.js",
    801802      "_mobileFilter.C7HBrZa9.js",
    802803      "_index.BAT38o-R.js",
     
    840841      "_feature-listing-slider.QgT9uoot.js",
    841842      "_houseSlider.ptuPATjg.js",
    842       "_house-format.Bvy9O_Yy.js",
     843      "_house-format.CcB19moP.js",
    843844      "_index.CzlBbxbG.js",
    844845      "_index.DMIL01Q7.js",
     
    861862      "_vendor.DSMCY3-_.js",
    862863      "_index.jjVwSEkV.js",
    863       "_house-format.Bvy9O_Yy.js",
     864      "_house-format.CcB19moP.js",
    864865      "_index.CzlBbxbG.js",
    865866      "_index.BAT38o-R.js",
  • lofty-idx/trunk/assets/admin-search.js

    r3393952 r3393989  
    1 import{_ as G,h as _,d as me}from"./_plugin-vue_export-helper.C-JQ4LYv.js";/* empty css               */import{o as k,g as N,e,K as fe,L as ve,r as f,c as D,p as ye,F as W,f as K,t as A,u as g,q as Y,v as X,j as re,y as F,G as Z,k as M,U as ae,d as B,w as V,z as j,m as p,P as ne,V as oe,a as ue,s as we,R as he,h as be,i as Ce,D as de}from"./vendor.DSMCY3-_.js";import{L as z,P as J,m as ie,J as _e,S as Te}from"./SubmitJs.cJWSj2Zz.js";import{M as q,L as ge,a as se,S as Se,I as le,b as Ve,c as Le}from"./styleConfig.Dyq3MnHm.js";import{s as $,P as ke}from"./PluginUpdate.DDB1CEnu.js";import{u as $e}from"./useCopy.CluLpl8Z.js";import{T as te}from"./tooltip.CnRrvdDV.js";import{p as Pe}from"./standard.Cshs06GJ.js";import{_ as Ee}from"./index.BdhGsZUN.js";import{u as Re}from"./useConfirm.BQXs6K30.js";import{s as Ue}from"./loading.BdqyMKJZ.js";import"./number-format.CLdvQh6j.js";import"./index.BAT38o-R.js";import"./outsideclick.Bw_hMuzW.js";import"./index.D8-cPlTE.js";import"./date-format.BrUodQAJ.js";import"./index.DNn1etY9.js";import"./index.DMIL01Q7.js";import"./multiSelect.-BPOHIQS.js";import"./checkBox.ls7NZy2i.js";import"./index.qpyE7W-K.js";import"./index.d_VP6W-1.js";import"./service.BOwSreoa.js";import"./index.DAwEVGKX.js";import"./house-format.Bvy9O_Yy.js";import"./user.BF73KgDm.js";const xe={},He={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Me(P,a){return k(),N("svg",He,a[0]||(a[0]=[e("path",{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632C3.32931 12.6635 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z",fill:"#757575"},null,-1)]))}const Ie=G(xe,[["render",Me]]),De=[{title:"Listings",visible:!0,items:[{title:"Search",path:"search-page",component:"SearchPage",visible:!0},{title:"Featured Listings",path:"featured-listings",component:"FeaturedListings",visible:!0},{title:"Listing Detail",path:"listing-detail",component:"ListingDetail",visible:!0},{title:"Sold Listings",path:"sold-listings",component:"SoldListings",visible:!0},{title:"Sold Listing Detail",path:"sold-listing-detail",component:"SoldListingDetail",visible:!0}]},{title:"Marketing",visible:!0,items:[{title:"Market Report Collection",path:"market-report-collection",component:"MarketReport",visible:!0}]},{title:"Lead Capture",visible:!0,items:[{title:"Lead Center",path:"lead-center",component:"LeadCenter",visible:!0}]}],Ne={key:0},Ae={class:"domain"},Fe=["readonly"],Oe={class:"action-btns"},Q={__name:"PageUrl",props:fe({initialVal:String,canEdit:{type:Boolean,default:!0},pageConfig:{type:Object,default:()=>({})}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(P,{expose:a}){const o=ve(P,"modelValue"),t=f(!0),w=D(()=>{var v;return(v=P.pageConfig.domain)!=null&&v.startsWith("http")?P.pageConfig.domain:"https://"+P.pageConfig.domain});ye(()=>P.initialVal,v=>{o.value=v});const L=()=>{t.value=!0,o.value=P.initialVal},E=()=>{t.value=!0},y=()=>{window.open(`${w.value}/${o.value}`,"_blank")},{copyCode:c}=$e(),b=()=>{c(`${w.value}/${o.value}`)};return a({cancel:L,confirm:E}),(v,T)=>(k(),N("div",{class:F(["page-url",{readOnly:t.value}])},[P.initialVal?(k(),N(W,{key:1},[e("span",Ae,[K(A(g(w))+" ",1),T[2]||(T[2]=e("span",{class:"separator"},"/",-1))]),Y(e("input",{type:"text","onUpdate:modelValue":T[0]||(T[0]=H=>o.value=H),readonly:t.value,class:"suffix"},null,8,Fe),[[X,o.value]]),e("div",Oe,[t.value?(k(),N(W,{key:0},[P.canEdit?(k(),N("i",{key:0,class:"lofty_iconfont lofty-icon-edit font-16",onClick:T[1]||(T[1]=H=>t.value=!1)})):re("",!0),e("i",{class:"lofty_iconfont lofty-icon-website font-16",onClick:y})],64)):(k(),N(W,{key:1},[e("span",{class:"btn",onClick:L},T[3]||(T[3]=[e("i",{class:"lofty_iconfont lofty-icon-cancel_bold"},null,-1)])),e("span",{class:"btn",onClick:E},T[4]||(T[4]=[e("i",{class:"lofty_iconfont lofty-icon-checked_bold"},null,-1)]))],64)),e("i",{class:"lofty_iconfont lofty-icon-copy_02",onClick:b})])],64)):(k(),N("div",Ne,"Loading page url.."))],2))}},Ke={class:"form-groups"},Ge={class:"form-group"},Be=["readonly"],je={class:"form-group"},ze={class:"form-group"},Je={__name:"index",setup(P){const a=f([]);Z("allConditions",a);const o=f({}),t=f(""),w=M("page-url"),L=M("listingRef");async function E(){var l,i;const s="/wp-plugin/admin/listing-search/searchCondition/init-info";try{const r=await _.get(s);if(((l=r==null?void 0:r.status)==null?void 0:l.code)!==0)throw new Error(`HTTP error! status: ${(i=r==null?void 0:r.status)==null?void 0:i.msg}`);const n=r.data,{allListingId:d,pluginPage:m={},allListingValues:h=[],sort:S}=n,x={pageName:"Property Search",uri:"listing",layout:"map-grid",metaTagHtml:""};o.value=ie({...m,id:d,sort:S},x,{overrideEmpty:!0}),t.value=o.value.uri,a.value=h.map(U=>{var O;const I=Object.keys(U.data);return"orderKeys"in U?((O=U.orderKeys)==null?void 0:O.length)!==I.length?{...U,orderKeys:I}:U:{...U,orderKeys:I}})}catch(r){console.error("Error fetching initial page info:",r)}}const y=f(!1);ae(async()=>{y.value=!0;try{await E()}catch(s){$("Error fetching page info:"+s.message,{err:!0})}finally{y.value=!1}});const c=f(!1),b=D(()=>{var s,l,i;return!((s=o.value)!=null&&s.id)||!((l=o.value)!=null&&l.pageName)||c.value||!((i=o.value)!=null&&i.uri)}),v=D(()=>y.value||c.value),T=M("metaTags");async function H(){var d,m;const{pageName:s,layout:l,metaTagHtml:i,uri:r}=o.value,n=await _.post("/wp-plugin/admin/common/page/setting/update",{data:{type:"search",pageName:s,metaTag:T.value.getValueString(),metaTagHtml:i,layout:l,uri:r}});if(((d=n==null?void 0:n.status)==null?void 0:d.code)!==0)throw new Error((m=n==null?void 0:n.status)==null?void 0:m.msg);n.data&&(o.value={...o.value,pageName:s,metaTagHtml:i,layout:l,uri:r},t.value=r)}async function R(){var r,n;const s=a.value.map(d=>{const m=ne(d);let{data:h={},orderKeys:S=[]}=m;const x=Object.keys(h);return S=S.filter(U=>x.includes(U)),{data:h,onlyId:oe(),orderKeys:S}}).filter(Boolean),l={id:o.value.id,name:"All Listings",sort:L.value.sortCondition,listingType:1,values:s},i=await _.post("/wp-plugin/admin/listing-search/searchCondition/saveOrUpdate",{data:l});if(((r=i==null?void 0:i.status)==null?void 0:r.code)!==0)throw new Error((n=i==null?void 0:i.status)==null?void 0:n.msg)}async function C(){await _.get("/update-routes")}async function u(){if(!b.value){w.value.confirm();try{c.value=!0,await Promise.all([H(),R()]),await C(),$("Saved Successfully")}catch(s){console.error("Error save page:",s),$("Error save page:"+s.message,{err:!0})}finally{c.value=!1}}}return(s,l)=>(k(),B(J,{title:"Search Page",description:"Configure and optimize a powerful real estate search page, delivering an enhanced user experience and driving lead generation through seamless property discovery."},{button:V(()=>[e("button",{class:F(["btn-save",{disable:g(b)}]),onClick:j(u,["prevent"])},A(c.value?"Saving..":"Save"),3)]),default:V(()=>[e("div",Ke,[e("div",Ge,[l[4]||(l[4]=e("label",null,"PAGE NAME",-1)),Y(e("input",{type:"text",placeholder:"Type something...","onUpdate:modelValue":l[0]||(l[0]=i=>o.value.pageName=i),class:"page-name",maxlength:"100",readonly:g(v)},null,8,Be),[[X,o.value.pageName]])]),e("div",je,[l[5]||(l[5]=e("label",null,"PAGE URL",-1)),p(Q,{modelValue:o.value.uri,"onUpdate:modelValue":l[1]||(l[1]=i=>o.value.uri=i),"page-config":o.value,"initial-val":t.value,ref:"page-url"},null,8,["modelValue","page-config","initial-val"])]),p(q,{class:"form-group",ref:"metaTags",modelValue:o.value.metaTagHtml,"onUpdate:modelValue":l[2]||(l[2]=i=>o.value.metaTagHtml=i),readonly:g(v)},null,8,["modelValue","readonly"]),e("div",ze,[l[6]||(l[6]=e("label",null,"LAYOUT",-1)),p(ge,{modelValue:o.value.layout,"onUpdate:modelValue":l[3]||(l[3]=i=>o.value.layout=i)},null,8,["modelValue"])])]),p(se,{"site-config":o.value,ref:"listingRef"},null,8,["site-config"]),p(z,{loading:y.value},null,8,["loading"])]),_:1}))}},qe=G(Je,[["__scopeId","data-v-96cbb891"]]),Ye={class:"form-groups"},Xe={class:"form-group"},We=["value"],Ze={__name:"index",setup(P){const a=ue({domain:"",uri:"",metaTagHtml:""}),o=f(!1),t=f(!1),w=D(()=>o.value||t.value),L=D(()=>`https://${a.domain}/${a.uri}`);E();async function E(){t.value=!0;const v=(await _.get("/wp-plugin/admin/listing-detail/active-init-info")).data.pluginPage;a.domain=v.domain,a.metaTagHtml=v.metaTagHtml||"",a.uri=v.uri,t.value=!1}const y=M("metaTags");async function c(){if(!w.value)try{o.value=!0,await _.post("/wp-plugin/admin/common/page/setting/update",{data:{type:"listing_detail",metaTag:y.value.getValueString(),metaTagHtml:a.metaTagHtml}}),$("Saved Successfully")}catch(b){console.error("Error save page:",b),$("Error save page:"+b.message,{err:!0})}finally{o.value=!1}}return(b,v)=>(k(),B(J,{title:"Listing Detail",description:`The Listing Detail page is included by default and does not require configuration of the page content. To preview the page, you can click on any listing
     1import{_ as G,h as _,d as me}from"./_plugin-vue_export-helper.C-JQ4LYv.js";/* empty css               */import{o as k,g as N,e,K as fe,L as ve,r as f,c as D,p as ye,F as W,f as K,t as A,u as g,q as Y,v as X,j as re,y as F,G as Z,k as M,U as ae,d as B,w as V,z as j,m as p,P as ne,V as oe,a as ue,s as we,R as he,h as be,i as Ce,D as de}from"./vendor.DSMCY3-_.js";import{L as z,P as J,m as ie,J as _e,S as Te}from"./SubmitJs.cJWSj2Zz.js";import{M as q,L as ge,a as se,S as Se,I as le,b as Ve,c as Le}from"./styleConfig.Bp18tYB4.js";import{s as $,P as ke}from"./PluginUpdate.DDB1CEnu.js";import{u as $e}from"./useCopy.CluLpl8Z.js";import{T as te}from"./tooltip.CnRrvdDV.js";import{p as Pe}from"./standard.Cshs06GJ.js";import{_ as Ee}from"./index.BdhGsZUN.js";import{u as Re}from"./useConfirm.BQXs6K30.js";import{s as Ue}from"./loading.BdqyMKJZ.js";import"./number-format.CLdvQh6j.js";import"./index.BAT38o-R.js";import"./outsideclick.Bw_hMuzW.js";import"./index.D8-cPlTE.js";import"./date-format.BrUodQAJ.js";import"./index.DNn1etY9.js";import"./index.DMIL01Q7.js";import"./multiSelect.-BPOHIQS.js";import"./checkBox.ls7NZy2i.js";import"./index.qpyE7W-K.js";import"./index.d_VP6W-1.js";import"./service.BOwSreoa.js";import"./index.DAwEVGKX.js";import"./house-format.CcB19moP.js";import"./user.BF73KgDm.js";const xe={},He={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Me(P,a){return k(),N("svg",He,a[0]||(a[0]=[e("path",{d:"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632C3.32931 12.6635 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z",fill:"#757575"},null,-1)]))}const Ie=G(xe,[["render",Me]]),De=[{title:"Listings",visible:!0,items:[{title:"Search",path:"search-page",component:"SearchPage",visible:!0},{title:"Featured Listings",path:"featured-listings",component:"FeaturedListings",visible:!0},{title:"Listing Detail",path:"listing-detail",component:"ListingDetail",visible:!0},{title:"Sold Listings",path:"sold-listings",component:"SoldListings",visible:!0},{title:"Sold Listing Detail",path:"sold-listing-detail",component:"SoldListingDetail",visible:!0}]},{title:"Marketing",visible:!0,items:[{title:"Market Report Collection",path:"market-report-collection",component:"MarketReport",visible:!0}]},{title:"Lead Capture",visible:!0,items:[{title:"Lead Center",path:"lead-center",component:"LeadCenter",visible:!0}]}],Ne={key:0},Ae={class:"domain"},Fe=["readonly"],Oe={class:"action-btns"},Q={__name:"PageUrl",props:fe({initialVal:String,canEdit:{type:Boolean,default:!0},pageConfig:{type:Object,default:()=>({})}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(P,{expose:a}){const o=ve(P,"modelValue"),t=f(!0),w=D(()=>{var v;return(v=P.pageConfig.domain)!=null&&v.startsWith("http")?P.pageConfig.domain:"https://"+P.pageConfig.domain});ye(()=>P.initialVal,v=>{o.value=v});const L=()=>{t.value=!0,o.value=P.initialVal},E=()=>{t.value=!0},y=()=>{window.open(`${w.value}/${o.value}`,"_blank")},{copyCode:c}=$e(),b=()=>{c(`${w.value}/${o.value}`)};return a({cancel:L,confirm:E}),(v,T)=>(k(),N("div",{class:F(["page-url",{readOnly:t.value}])},[P.initialVal?(k(),N(W,{key:1},[e("span",Ae,[K(A(g(w))+" ",1),T[2]||(T[2]=e("span",{class:"separator"},"/",-1))]),Y(e("input",{type:"text","onUpdate:modelValue":T[0]||(T[0]=H=>o.value=H),readonly:t.value,class:"suffix"},null,8,Fe),[[X,o.value]]),e("div",Oe,[t.value?(k(),N(W,{key:0},[P.canEdit?(k(),N("i",{key:0,class:"lofty_iconfont lofty-icon-edit font-16",onClick:T[1]||(T[1]=H=>t.value=!1)})):re("",!0),e("i",{class:"lofty_iconfont lofty-icon-website font-16",onClick:y})],64)):(k(),N(W,{key:1},[e("span",{class:"btn",onClick:L},T[3]||(T[3]=[e("i",{class:"lofty_iconfont lofty-icon-cancel_bold"},null,-1)])),e("span",{class:"btn",onClick:E},T[4]||(T[4]=[e("i",{class:"lofty_iconfont lofty-icon-checked_bold"},null,-1)]))],64)),e("i",{class:"lofty_iconfont lofty-icon-copy_02",onClick:b})])],64)):(k(),N("div",Ne,"Loading page url.."))],2))}},Ke={class:"form-groups"},Ge={class:"form-group"},Be=["readonly"],je={class:"form-group"},ze={class:"form-group"},Je={__name:"index",setup(P){const a=f([]);Z("allConditions",a);const o=f({}),t=f(""),w=M("page-url"),L=M("listingRef");async function E(){var l,i;const s="/wp-plugin/admin/listing-search/searchCondition/init-info";try{const r=await _.get(s);if(((l=r==null?void 0:r.status)==null?void 0:l.code)!==0)throw new Error(`HTTP error! status: ${(i=r==null?void 0:r.status)==null?void 0:i.msg}`);const n=r.data,{allListingId:d,pluginPage:m={},allListingValues:h=[],sort:S}=n,x={pageName:"Property Search",uri:"listing",layout:"map-grid",metaTagHtml:""};o.value=ie({...m,id:d,sort:S},x,{overrideEmpty:!0}),t.value=o.value.uri,a.value=h.map(U=>{var O;const I=Object.keys(U.data);return"orderKeys"in U?((O=U.orderKeys)==null?void 0:O.length)!==I.length?{...U,orderKeys:I}:U:{...U,orderKeys:I}})}catch(r){console.error("Error fetching initial page info:",r)}}const y=f(!1);ae(async()=>{y.value=!0;try{await E()}catch(s){$("Error fetching page info:"+s.message,{err:!0})}finally{y.value=!1}});const c=f(!1),b=D(()=>{var s,l,i;return!((s=o.value)!=null&&s.id)||!((l=o.value)!=null&&l.pageName)||c.value||!((i=o.value)!=null&&i.uri)}),v=D(()=>y.value||c.value),T=M("metaTags");async function H(){var d,m;const{pageName:s,layout:l,metaTagHtml:i,uri:r}=o.value,n=await _.post("/wp-plugin/admin/common/page/setting/update",{data:{type:"search",pageName:s,metaTag:T.value.getValueString(),metaTagHtml:i,layout:l,uri:r}});if(((d=n==null?void 0:n.status)==null?void 0:d.code)!==0)throw new Error((m=n==null?void 0:n.status)==null?void 0:m.msg);n.data&&(o.value={...o.value,pageName:s,metaTagHtml:i,layout:l,uri:r},t.value=r)}async function R(){var r,n;const s=a.value.map(d=>{const m=ne(d);let{data:h={},orderKeys:S=[]}=m;const x=Object.keys(h);return S=S.filter(U=>x.includes(U)),{data:h,onlyId:oe(),orderKeys:S}}).filter(Boolean),l={id:o.value.id,name:"All Listings",sort:L.value.sortCondition,listingType:1,values:s},i=await _.post("/wp-plugin/admin/listing-search/searchCondition/saveOrUpdate",{data:l});if(((r=i==null?void 0:i.status)==null?void 0:r.code)!==0)throw new Error((n=i==null?void 0:i.status)==null?void 0:n.msg)}async function C(){await _.get("/update-routes")}async function u(){if(!b.value){w.value.confirm();try{c.value=!0,await Promise.all([H(),R()]),await C(),$("Saved Successfully")}catch(s){console.error("Error save page:",s),$("Error save page:"+s.message,{err:!0})}finally{c.value=!1}}}return(s,l)=>(k(),B(J,{title:"Search Page",description:"Configure and optimize a powerful real estate search page, delivering an enhanced user experience and driving lead generation through seamless property discovery."},{button:V(()=>[e("button",{class:F(["btn-save",{disable:g(b)}]),onClick:j(u,["prevent"])},A(c.value?"Saving..":"Save"),3)]),default:V(()=>[e("div",Ke,[e("div",Ge,[l[4]||(l[4]=e("label",null,"PAGE NAME",-1)),Y(e("input",{type:"text",placeholder:"Type something...","onUpdate:modelValue":l[0]||(l[0]=i=>o.value.pageName=i),class:"page-name",maxlength:"100",readonly:g(v)},null,8,Be),[[X,o.value.pageName]])]),e("div",je,[l[5]||(l[5]=e("label",null,"PAGE URL",-1)),p(Q,{modelValue:o.value.uri,"onUpdate:modelValue":l[1]||(l[1]=i=>o.value.uri=i),"page-config":o.value,"initial-val":t.value,ref:"page-url"},null,8,["modelValue","page-config","initial-val"])]),p(q,{class:"form-group",ref:"metaTags",modelValue:o.value.metaTagHtml,"onUpdate:modelValue":l[2]||(l[2]=i=>o.value.metaTagHtml=i),readonly:g(v)},null,8,["modelValue","readonly"]),e("div",ze,[l[6]||(l[6]=e("label",null,"LAYOUT",-1)),p(ge,{modelValue:o.value.layout,"onUpdate:modelValue":l[3]||(l[3]=i=>o.value.layout=i)},null,8,["modelValue"])])]),p(se,{"site-config":o.value,ref:"listingRef"},null,8,["site-config"]),p(z,{loading:y.value},null,8,["loading"])]),_:1}))}},qe=G(Je,[["__scopeId","data-v-96cbb891"]]),Ye={class:"form-groups"},Xe={class:"form-group"},We=["value"],Ze={__name:"index",setup(P){const a=ue({domain:"",uri:"",metaTagHtml:""}),o=f(!1),t=f(!1),w=D(()=>o.value||t.value),L=D(()=>`https://${a.domain}/${a.uri}`);E();async function E(){t.value=!0;const v=(await _.get("/wp-plugin/admin/listing-detail/active-init-info")).data.pluginPage;a.domain=v.domain,a.metaTagHtml=v.metaTagHtml||"",a.uri=v.uri,t.value=!1}const y=M("metaTags");async function c(){if(!w.value)try{o.value=!0,await _.post("/wp-plugin/admin/common/page/setting/update",{data:{type:"listing_detail",metaTag:y.value.getValueString(),metaTagHtml:a.metaTagHtml}}),$("Saved Successfully")}catch(b){console.error("Error save page:",b),$("Error save page:"+b.message,{err:!0})}finally{o.value=!1}}return(b,v)=>(k(),B(J,{title:"Listing Detail",description:`The Listing Detail page is included by default and does not require configuration of the page content. To preview the page, you can click on any listing
    22        and view it through the Search Page or other IDX pages. However, you can set the Meta tags below to optimize SEO.`},{button:V(()=>[e("button",{class:F(["btn-save",{disable:g(w)}]),onClick:j(c,["prevent"])},A(g(o)?"Saving..":"Save"),3)]),default:V(()=>[e("div",Ye,[e("div",Xe,[v[1]||(v[1]=e("label",null,"PAGE URL",-1)),e("input",{type:"text",value:g(L),readonly:"",class:"suffix"},null,8,We)]),p(q,{class:"form-group",ref:"metaTags",type:"listingDetail",modelValue:g(a).metaTagHtml,"onUpdate:modelValue":v[0]||(v[0]=T=>g(a).metaTagHtml=T)},null,8,["modelValue"]),p(z,{loading:g(t)},null,8,["loading"])])]),_:1}))}},Qe=G(Ze,[["__scopeId","data-v-322f86e5"]]),et={class:"form-groups"},tt={class:"form-group"},at=["readonly"],lt={class:"form-group"},nt={__name:"index",setup(P){const a=f([]);Z("allConditions",a);const o=f({}),t=f({}),w=f(""),L=M("page-url");async function E(){var d,m;const n="/wp-plugin/admin/featured-listing/init-info";try{const h=await _.get(n);if(((d=h==null?void 0:h.status)==null?void 0:d.code)!==0)throw new Error(`HTTP error! status: ${(m=h==null?void 0:h.status)==null?void 0:m.msg}`);const S=h.data,{featureListingId:x,featureListingName:U,pluginPage:I={},pageConfigMap:O={},featuredListingValue:ee=[],sort:ce}=S;o.value=S;const pe={pageName:"Featured Listings Page",uri:"feature-listing",layout:"map-grid",metaTagHtml:""};t.value=ie({...I,id:x,name:U,styleConfig:O,sort:ce},pe,{overrideEmpty:!0}),w.value=t.value.uri,a.value=ee}catch(h){console.error("Error fetching initial page info:",h)}}const y=f(!1);ae(async()=>{y.value=!0;try{await E()}catch(n){console.error("Error fetching page info:",n.message),$("Error fetching page info:"+n.message,{err:!0})}finally{y.value=!1}});const c=f(!1),b=D(()=>{var n,d,m;return!((n=t.value)!=null&&n.id)||!((d=t.value)!=null&&d.pageName)||c.value||!((m=t.value)!=null&&m.uri)}),v=D(()=>y.value||c.value),T=M("metaTags"),H=M("listingRef");async function R(){var x,U;const{pageName:n,metaTagHtml:d,layout:m,uri:h}=t.value,S=await _.post("/wp-plugin/admin/common/page/setting/update",{data:{type:"featured_listing",pageName:n,metaTag:T.value.getValueString(),metaTagHtml:d,layout:m,uri:h}});if(((x=S==null?void 0:S.status)==null?void 0:x.code)!==0)throw new Error((U=S==null?void 0:S.status)==null?void 0:U.msg);S.data&&(t.value={...t.value,pageName:n,metaTagHtml:d,layout:m,uri:h},w.value=h)}async function C(){var h,S;const n=a.value.map(x=>({data:ne(x).data||{},onlyId:oe()})).filter(Boolean),d={id:t.value.id,name:t.value.name,sort:H.value.sortCondition,listingType:1,values:n},m=await _.post("/wp-plugin/admin/listing-search/searchCondition/saveOrUpdate",{data:d});if(((h=m==null?void 0:m.status)==null?void 0:h.code)!==0)throw new Error((S=m==null?void 0:m.status)==null?void 0:S.msg)}let u=f({});function s(n){u.value=n}async function l(){var d,m,h;const n=await _.post("/wp-plugin/admin/common/page/page-config/update/FEATURED_LISTING",{data:{...u.value}});if(((d=n==null?void 0:n.status)==null?void 0:d.code)!==0)throw new Error((m=n==null?void 0:n.status)==null?void 0:m.msg);n.data&&(t.value.styleConfig=((h=n.data)==null?void 0:h.pageConfigMap)||{})}async function i(){await _.get("/update-routes")}async function r(){if(!b.value){L.value.confirm();try{c.value=!0;let n=[R(),C()];Object.keys(u.value).length>0&&n.push(l()),await Promise.all(n),await i(),$("Saved Successfully")}catch(n){console.error("Error save page:",n),$("Save failed. Please try again.",{duration:3e3,err:!0})}finally{c.value=!1}}}return(n,d)=>(k(),B(J,{title:"Featured Listings",description:`Create and display a curated selection of featured properties on IDX
    33              pages, enhancing property visibility and driving engagement to boost
  • lofty-idx/trunk/assets/admin-shortcodes.js

    r3393952 r3393989  
    1 import{h as F,_ as L}from"./_plugin-vue_export-helper.C-JQ4LYv.js";/* empty css               */import{r as v,G as M,k as w,o as c,d as U,w as k,u as o,g as h,z as N,e,m as C,s as R,t as S,l as ce,p as ie,W as me,F as ee,h as te,q as b,x as V,Q as ae,j as B,f as I,y as G,P as se,L as re,c as ge,a as fe,v as $,X as E,i as ve,D as ue}from"./vendor.DSMCY3-_.js";import{P as D,f as ye,J as _e,L as he,S as Ce}from"./SubmitJs.cJWSj2Zz.js";import{M as H,L as de,a as W,d as be,S as Se,c as ke}from"./styleConfig.Dyq3MnHm.js";import{u as O}from"./useCopy.CluLpl8Z.js";import{f as le}from"./date-format.BrUodQAJ.js";import{M as Ve}from"./multiSelect.-BPOHIQS.js";import{s as A,P as we}from"./PluginUpdate.DDB1CEnu.js";import{_ as ne}from"./index.DAwEVGKX.js";import{_ as xe}from"./index.jjVwSEkV.js";import{u as Te}from"./user.BF73KgDm.js";import{_ as Ue}from"./index.BIsjoQ8l.js";import{p as Le}from"./standard.Cshs06GJ.js";import{I as $e}from"./IconCopy.BP11gT8d.js";import"./number-format.CLdvQh6j.js";import"./index.BAT38o-R.js";import"./outsideclick.Bw_hMuzW.js";import"./index.D8-cPlTE.js";import"./index.DNn1etY9.js";import"./index.DMIL01Q7.js";import"./index.qpyE7W-K.js";import"./index.d_VP6W-1.js";import"./service.BOwSreoa.js";import"./house-format.Bvy9O_Yy.js";import"./checkBox.ls7NZy2i.js";import"./tooltip.CnRrvdDV.js";const Re=[{title:"ShortCode",visible:!0,items:[{title:"ShortCode Log",path:"shortcode-log",component:"ShortCodeLog",visible:!0}]},{title:"Listings",visible:!0,items:[{title:"Search",path:"search-page",component:"SearchPage",visible:!0},{title:"Quick Search",path:"quick-search",component:"QuickSearch",visible:!0},{title:"Featured Listings",path:"featured-listings",component:"FeaturedListings",visible:!0},{title:"Sold Listings",path:"sold-listings",component:"SoldListings",visible:!0}]},{title:"Marketing",visible:!0,items:[{title:"Market Report",path:"market-report",component:"MarketReport",visible:!0}]},{title:"Lead Capture",visible:!0,items:[{title:"Home Valuation",path:"home-valuation",component:"HomeValuation",visible:!0}]}];function Ie(m=","){const l=m.split(",");return l[0]&&(l[0]=le("yyyy/MM/dd",+l[0])),l[1]&&(l[1]=le("yyyy/MM/dd",+l[1])),l.join(",")}const q={Search:"Search",QuickSearch:"QuickSearch",FeaturedListings:"FeaturedListings",SoldListings:"SoldListings",MarketReport:"MarketReport",HomeValuation:"HomeValuation"},pe=[{label:"Search",value:"Search"},{label:"Quick Search",value:"QuickSearch"},{label:"Featured Listings",value:"FeaturedListings"},{label:"Sold Listings",value:"SoldListings"},{label:"Market Report",value:"MarketReport"},{label:"Home Valuation",value:"HomeValuation"}],Me=pe.reduce((m,l)=>(m[l.value]=l.label,m),{});function j(m,l){const n=[];return m.forEach(d=>{const a={};for(let f in d.data)l.includes(f)?a[`date_${f}`]=Ie(d.data[f]):a[f]=d.data[f];n.push(a)}),n}function Y(m,l){F.post("/admin/shortCodeLog/save",{data:{type:m,content:l}})}const Fe={key:0},Ne={class:"form-groups"},De={class:"form-group mt20"},Oe={__name:"index",setup(m){const{copyCode:l,copied:n}=O(),d=v("map-grid"),a=v([]);M("allConditions",a);const f=v(""),t=w("metaTags"),s=w("listingRef");let y=[];function _(){const p={layout:d.value,meta:t.value.getValueString(),conditions:j(a.value,y),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,sort:s.value.sortCondition},r=`[lofty_idx_listing_page][[${JSON.stringify(p,null,2)}]][/lofty_idx_listing_page]`;l(r),Y(q.Search,r)}return(p,r)=>(c(),U(D,{title:"Search",description:"Generate and configure the shortcode of search page, then create a new WordPress page and insert the shortcode into it."},{button:k(()=>[o(n)?(c(),h("span",Fe,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(_,["prevent"])},"Copy to clipboard"))]),default:k(()=>[e("div",Ne,[C(H,{class:"listing-groups",ref:"metaTags",modelValue:f.value,"onUpdate:modelValue":r[0]||(r[0]=i=>f.value=i),isShortCode:""},null,8,["modelValue"]),e("div",De,[r[3]||(r[3]=e("label",null,"LAYOUT",-1)),C(de,{modelValue:d.value,"onUpdate:modelValue":r[1]||(r[1]=i=>d.value=i)},null,8,["modelValue"])]),C(W,{class:"search-page-filter",onReady:r[2]||(r[2]=i=>R(y)?y.value=i:y=i),ref:"listingRef"},null,512)])]),_:1}))}},Pe=L(Oe,[["__scopeId","data-v-5cca0e8e"]]),Ee={key:0},Ae={class:"form-groups"},He={class:"form-group mt20"},qe={class:"form-group"},Ye={style:{width:"100%"}},ze={__name:"index",setup(m){const{copyCode:l,copied:n}=O(),d=v([]),a=v("universal"),f=v([]);M("allConditions",d);const t=v(""),s=w("metaTags"),y=w("listingRef");async function _(i){if(i.value.length>0)return;const u=await F.get("/wp-plugin/admin/listing-search/quickSearch/conditions");i.value=u.data}let p=[];function r(){const i={layout:a.value,quick_listing_filters:f.value.join(","),meta:s.value.getValueString(),conditions:j(d.value,p),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,sort:y.value.sortCondition},u=`[lofty_idx_quick_search][[${JSON.stringify(i,null,2)}]][/lofty_idx_quick_search]`;l(u),Y(q.QuickSearch,u)}return(i,u)=>(c(),U(D,{title:"Quick Search",description:"Integrate a streamlined and user-friendly search interface directly into your WordPress page, providing a clean, intuitive experience that allows users to easily find what they're looking for."},{button:k(()=>[o(n)?(c(),h("span",Ee,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(r,["prevent"])},"Copy to clipboard"))]),default:k(()=>[e("div",Ae,[C(H,{class:"listing-groups",ref:"metaTags",modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=g=>t.value=g),isShortCode:""},null,8,["modelValue"]),e("div",He,[u[4]||(u[4]=e("label",null,"LAYOUT",-1)),C(be,{options:[{label:"Universal",value:"universal"},{label:"Two-line layout",value:"two-line"}],"initial-condition":[a.value],"onUpdate:condition":u[1]||(u[1]=g=>a.value=g[0])},null,8,["initial-condition"])]),e("div",qe,[e("label",Ye,S("Show Listing Filter".toUpperCase()),1),C(Ve,{"initial-condition":f.value,"onUpdate:condition":u[2]||(u[2]=g=>f.value=g),"get-option-func":_,"any-label":"None"},null,8,["initial-condition"])]),C(W,{onReady:u[3]||(u[3]=g=>R(p)?p.value=g:p=g),class:"search-page-filter",ref:"listingRef"},null,512)])]),_:1}))}},Be=L(ze,[["__scopeId","data-v-5c22ec94"]]),Ge={featuredListingStyle:"grid",grid:{buttonText:"More",default:4,min:1,max:6,showButton:!0},slider:{duration:5,buttonText:"More",default:3,min:1,max:50,showButton:!0,autoPlay:!0,speed:1e3,layout:"full"},gallery:{buttonText:"More",default:3,min:1,max:8,showButton:!0,title:""}},We={key:0},je={class:"form-groups"},Je={__name:"index",setup(m){const l=v([]);M("allConditions",l);const n=v(""),d=w("metaTags"),{copied:a,copyCode:f}=O(),t=w("styleConfig"),s=w("listingRef"),y=v({});function _(i){y.value=i}let p=[];function r(){const i=t.value.getCurrentConfig(),u=i.featuredListingStyle,g=JSON.parse(JSON.stringify(i[u]||{})),x={layout:u,layout_config:g,meta:d.value.getValueString(),conditions:j(l.value,p),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,sort:s.value.sortCondition},P=`[lofty_idx_featured_listing][[${JSON.stringify(x,null,2)}]][/lofty_idx_featured_listing]`;f(P),Y(q.FeaturedListings,P)}return(i,u)=>(c(),U(D,{title:"Featured Listings",description:"Generate and configure the shortcode of various styles featured Listings page, then create a new WordPress page and insert the shortcode into it."},{button:k(()=>[o(a)?(c(),h("span",We,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(r,["prevent"])},"Copy to clipboard"))]),default:k(()=>[e("div",je,[C(H,{class:"listing-groups",ref:"metaTags",modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=g=>n.value=g),isShortCode:""},null,8,["modelValue"]),C(W,{onReady:u[1]||(u[1]=g=>R(p)?p.value=g:p=g),style:{"padding-left":"0"},ref:"listingRef"},null,512),C(Se,{config:o(Ge),onUpdate:_,ref:"styleConfig",style:{"padding-left":"0"}},null,8,["config"])])]),_:1}))}},Qe=L(Je,[["__scopeId","data-v-1ff2633b"]]),Ze=m=>[{key:"title",inputType:"text",label:"Title",value:m.title,maxLength:100},{key:"show_new",inputType:"radio",label:"Display New Listings (Last 30 Days)",value:m.show_new,options:[{label:"Yes",value:!0},{label:"No",value:!1}]},{key:"show_pending",inputType:"radio",label:"Display Pending Listings",value:m.show_pending,options:[{label:"Yes",value:!0},{label:"No",value:!1}]},{key:"show_sold",inputType:"radio",label:"Display Sold Listings (Last 30 Days)",value:m.show_sold,options:[{label:"Yes",value:!0},{label:"No",value:!1}]}],X={title:"",show_new:!0,show_pending:!0,show_sold:!0},Ke={class:"marketReport-config-content"},Xe={class:"config-item-name"},et=["type","onUpdate:modelValue","maxlength"],tt=["type","onUpdate:modelValue","name","value"],ot={__name:"report-config",props:{config:{type:Object,default:()=>({})}},emits:["update"],setup(m,{emit:l}){ce(()=>{d()});let n=v([]);function d(){n.value=Ze(X)}ie(()=>n.value,()=>{f()},{deep:!0});const a=l;function f(){const y=s();a("update",{diffData:y,configData:t()})}function t(){var _;let y={};return(_=n.value)==null||_.forEach(p=>{y[p.key]=p.value}),y}function s(){let y={},_=t();return me(X,_)||(y=ye(X,_)),y}return(y,_)=>(c(),h("div",Ke,[_[0]||(_[0]=e("div",{class:"config-name"},"Style Settings",-1)),(c(!0),h(ee,null,te(o(n),p=>b((c(),h("div",{class:"config-item",key:p.key},[e("div",Xe,S(p.label),1),e("div",{class:G(["config-item-content",{row:p.inputType==="radio"}])},[p.inputType==="text"?b((c(),h("input",{key:0,type:p.inputType,"onUpdate:modelValue":r=>p.value=r,maxlength:p.maxLength},null,8,et)),[[ae,p.value]]):B("",!0),p.inputType==="radio"?(c(!0),h(ee,{key:1},te(p.options,(r,i)=>(c(),h("label",{key:i},[b(e("input",{type:p.inputType,"onUpdate:modelValue":u=>p.value=u,name:m.config.type+"_"+p.key,value:r.value},null,8,tt),[[ae,p.value]]),I(" "+S(r.label),1)]))),128)):B("",!0)],2)])),[[V,p.show!==!1]])),128))]))}},at=L(ot,[["__scopeId","data-v-a8ce3903"]]),st={key:0},lt={__name:"index",setup(m){const l={title:"Market Criteria",tip:"Define the criteria used to generate the market report",criteriaUrl:"/wp-plugin/market-report/conditions",listingCountUrl:"/wp-plugin/market-report/match-count",isMarketReport:!0},n=v([{data:{location:{}},orderKeys:["location"]}]);M("allConditions",n);const{copied:d,copyCode:a}=O();let f=v({});function t({configData:u}){f.value=u}const s=v(""),y=w("metaTags");let _=[];function p(){var T,oe;const u=n.value.map(K=>({data:se(K.data||{})})).filter(Boolean);let g=[];(T=u[0])!=null&&T.data.location&&Object.values((oe=u[0])==null?void 0:oe.data.location).forEach(K=>{g=g.concat(K)});const{title:x,show_new:P,show_pending:J,show_sold:Q}=f.value,Z={title:x,location:g.join(","),show_new:P,show_pending:J,show_sold:Q,meta:y.value.getValueString(),conditions:j(n.value,_),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},z=`[lofty_idx_market_report][[${JSON.stringify(Z,null,2)}]][/lofty_idx_market_report]`;a(z),Y(q.MarketReport,z)}const r=v(!1);async function i(){if(r.value)return;const{title:u,show_new:g,show_pending:x,show_sold:P}=f.value;if(!u){A("Please fill the report title.",{duration:3e3,err:!0});return}if(!/^[a-zA-Z0-9_\- ]*$/.test(u)){A("Special characters are not allowed in the title.",{duration:3e3,err:!0});return}r.value=!0;const J=n.value.map(T=>({data:se(T.data||{})})).filter(Boolean),Q=await F.post("/admin/listing-search/short-code/saveOrUpdate",{data:{values:J}}),Z={title:u,filterName:Q.data,extraInfoMap:{displayNewListing:g,displayPendingListings:x,displaySoldListings:P}},z=await F.post("/admin/report/save",{data:Z});if(z.status.code===0)A("Add Successfully"),setTimeout(()=>{const T=new URLSearchParams(window.location.search);T.set("page","lofty-idx-pages"),T.set("sub","market-report-collection"),window.location.search=T.toString()},1e3);else{let T="A report with the same filters already exists. Please do not create a duplicate";z.status.code===230001&&(T="This report title is already in use. Please choose a different one"),A(T,{duration:5e3,err:!0}),r.value=!1}}return(u,g)=>(c(),U(D,{title:"Market Report",description:"Generate and configure the shortcode of Market Report, then create a new WordPress Page and insert the shortcode into it, improving market transparency and attracting investor attention to fuel business opportunities."},{button:k(()=>[e("button",{class:G(["btn-save","btn-add-report",{disable:r.value}]),onClick:N(i,["prevent"])},"Add To Report List",2),o(d)?(c(),h("span",st,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(p,["prevent"])}," Copy to clipboard "))]),default:k(()=>[C(H,{class:"market-form-groups",ref:"metaTags",modelValue:s.value,"onUpdate:modelValue":g[0]||(g[0]=x=>s.value=x),type:"marketReport",isShortCode:""},null,8,["modelValue"]),C(W,{class:"market-report-short-code",maxGroupNumber:1,config:l,onReady:g[1]||(g[1]=x=>R(_)?_.value=x:_=x)}),C(at,{onUpdate:t})]),_:1}))}},nt={key:0},it={class:"form-groups"},rt={class:"form-group"},ut={__name:"index",setup(m){const{copyCode:l,copied:n}=O(),d=v("map-grid"),a=v([]);M("allConditions",a),M("listingFilterExcludeFields",v(["listingStatus"])),M("listingFilterLabelMap",v({price:"Sold Price"}));const f=v(""),t=w("metaTags"),s=w("listingRef");let y=[];function _(){const p={layout:d.value,meta:t.value.getValueString(),conditions:j(a.value,y),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,sort:s.value.sortCondition},r=`[lofty_idx_sold_listing][[${JSON.stringify(p,null,2)}]][/lofty_idx_sold_listing]`;l(r),Y(q.SoldListings,r)}return(p,r)=>(c(),U(D,{title:"Sold Listings",description:"Generate and configure the shortcode of sold listings page, then create a new WordPress page and insert the shortcode into it."},{button:k(()=>[o(n)?(c(),h("span",nt,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(_,["prevent"])},"Copy to clipboard"))]),default:k(()=>[e("div",it,[e("div",rt,[r[3]||(r[3]=e("label",null,"LAYOUT",-1)),C(de,{modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=i=>d.value=i)},null,8,["modelValue"])]),C(H,{class:"listing-groups",ref:"metaTags",modelValue:f.value,"onUpdate:modelValue":r[1]||(r[1]=i=>f.value=i),isShortCode:""},null,8,["modelValue"]),C(W,{class:"filters-wrap","is-sold":!0,onReady:r[2]||(r[2]=i=>R(y)?y.value=i:y=i),ref:"listingRef"},null,512)])]),_:1}))}},dt=L(ut,[["__scopeId","data-v-74a6f2c5"]]),pt={class:"lofty-img-upload"},ct={key:0,class:"img-wrapper"},mt=["src"],gt={key:1,class:"upload-wrapper"},ft={key:1},vt={__name:"imgUpload",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(m){const l=re(m,"modelValue"),n=w("fileInput");function d(){n.value.click()}const a=v(!1);function f(){const t=n.value.files[0],s=new FileReader;a.value=!0,s.onload=async y=>{const _=y.target.result,p=await F.post("/wp-plugin/evaluation/upload-aws/image",{data:{base64File:_.split(",")[1]}});p.status.code===0&&(l.value=p.data),a.value=!1},s.readAsDataURL(t)}return(t,s)=>(c(),h("div",pt,[l.value?(c(),h("div",ct,[e("img",{src:l.value,alt:""},null,8,mt),e("div",{class:"img-btn edit",onClick:d},s[1]||(s[1]=[e("span",{class:"lofty_iconfont lofty-icon-Shape"},null,-1)])),e("div",{class:"img-btn delete",onClick:s[0]||(s[0]=y=>l.value="")},s[2]||(s[2]=[e("span",{class:"lofty_iconfont lofty-icon-delete2"},null,-1)])),o(a)?(c(),U(ne,{key:0,loading:o(a)},null,8,["loading"])):B("",!0)])):(c(),h("div",gt,[o(a)?(c(),U(ne,{key:0,loading:o(a)},null,8,["loading"])):(c(),h("div",ft,s[3]||(s[3]=[e("div",{class:"lofty_iconfont lofty-icon-plus_01"},null,-1),e("div",{class:"upload-text"},"Upload Image",-1),e("div",{class:"upload-tip"},"(1440×900)",-1),e("label",{for:"fileInput"},null,-1)])))])),e("input",{id:"fileInput",ref_key:"fileInput",ref:n,type:"file",onChange:f,accept:"image/png, image/jpeg, image/gif, image/jpg"},null,544)]))}},yt=L(vt,[["__scopeId","data-v-35cd6e29"]]),_t={class:"style-setting"},ht={__name:"style-setting",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(m){const l=v(""),n=re(m,"modelValue");return ie(l,()=>{n.value=l.value}),n.value=l.value,(d,a)=>(c(),h("div",_t,[a[1]||(a[1]=e("p",{class:"second-title"},"BACKGROUND IMAGE",-1)),C(yt,{modelValue:o(l),"onUpdate:modelValue":a[0]||(a[0]=f=>R(l)?l.value=f:null)},null,8,["modelValue"])]))}},Ct=L(ht,[["__scopeId","data-v-c79f239d"]]),bt="/home-valuation-step1.BcOghYip.png",St="/home-valuation-step2.C1GywpzI.png",kt="/home-valuation-step3-yes.C4P-9dZ9.png",Vt="/home-valuation-step3-no.OGxWnwZp.png",wt={class:"admin-home-valuation-preview"},xt=["src"],Tt=["src"],Ut={class:"title ellipsis"},Lt={class:"desc"},$t={class:"step-1-content"},Rt={class:"placeholder"},It={class:"button-text ellipsis"},Mt={class:"unit-field"},Ft={class:"step-2-content"},Nt={class:"form-title ellipsis"},Dt={class:"form-desc"},Ot={class:"ellipsis"},Pt={class:"name-required"},Et={class:"step-3-content"},At={__name:"preview",props:{stepValue:String,imgUrl:String,config:Object},setup(m){const{step1:l,step2:n,step3:d}=m.config,a=ge(()=>m.stepValue==="1"?LoftyIdxUtils.static_url(bt):m.stepValue==="2"?LoftyIdxUtils.static_url(St):d.autoValuation?LoftyIdxUtils.static_url(kt):LoftyIdxUtils.static_url(Vt));return(f,t)=>(c(),h("div",wt,[t[1]||(t[1]=e("div",{class:"preview-title"},"Preview",-1)),e("div",{class:G(["preview-content",["step-"+m.stepValue,o(d).autoValuation?"yes":"no"]])},[m.imgUrl?(c(),h("img",{key:0,src:m.imgUrl,alt:""},null,8,xt)):B("",!0),e("img",{src:o(a),alt:""},null,8,Tt),e("div",Ut,S(o(l).title),1),e("div",Lt,[e("span",null,S(o(l).desc),1)]),b(e("div",$t,[e("div",Rt,S(o(l).placeholder),1),e("div",It,S(o(l).buttonText),1),b(e("div",Mt,"| Unit",512),[[V,o(l).showUnit]])],512),[[V,m.stepValue==="1"]]),b(e("div",Ft,[e("div",Nt,S(o(n).title),1),e("div",Dt,[e("span",Ot,S(o(n).desc),1)]),b(e("div",Pt,t[0]||(t[0]=[e("span",null,"*",-1),e("span",{style:{"margin-left":"210px"}},"*",-1)]),512),[[V,o(n).nameRequired]])],512),[[V,m.stepValue==="2"]]),b(e("div",Et,[b(e("div",{class:"step3-title ellipsis"},S(o(d).title),513),[[V,o(d).autoValuation]]),b(e("div",{class:"thank-you"},S(o(d).thankYou),513),[[V,!o(d).autoValuation]])],512),[[V,m.stepValue==="3"]])],2)]))}},Ht=L(At,[["__scopeId","data-v-f37d07a7"]]),qt={class:"lofty-admin-step-config"},Yt={class:"step-content"},zt={class:"left-config"},Bt={style:{"margin-left":"30px"}},Gt={style:{"margin-left":"30px"}},Wt={class:"step-3"},jt={style:{"margin-left":"30px"}},Jt={class:"label mt20"},Qt={__name:"step-config",props:{imgUrl:String},setup(m,{expose:l}){const n=v("1"),d=[{label:"Step1",value:"1"},{label:"Step2",value:"2"},{label:"Step3",value:"3"}],a=fe({step1:{title:"What‘s your Home Worth?",desc:"Find out the worth of your home and get the most accurate valuation.",placeholder:"Enter your street address",buttonText:"GET REPORT",showUnit:!0},step2:{title:"Property Found!",desc:"Where would you like us to send your home valuation report?",nameRequired:!0},step3:{autoValuation:!0,title:"Estimated Home Value",thankYou:"At this time we can't provide an automated home value estimate, but we'll be reaching out to arrange a personalized quote based on market conditions and property information. Thank you!"}});return l({config:a}),(f,t)=>(c(),h("div",qt,[C(xe,{modelValue:o(n),"onUpdate:modelValue":t[0]||(t[0]=s=>R(n)?n.value=s:null),tabs:d},null,8,["modelValue"]),e("div",Yt,[e("div",zt,[b(e("div",null,[t[17]||(t[17]=e("div",{class:"title"},"Content",-1)),t[18]||(t[18]=e("div",{class:"label"},"TITLE",-1)),b(e("input",{"onUpdate:modelValue":t[1]||(t[1]=s=>o(a).step1.title=s),type:"text",maxlength:"100"},null,512),[[$,o(a).step1.title]]),t[19]||(t[19]=e("div",{class:"label mt20"},"DESCRIPTION",-1)),b(e("input",{"onUpdate:modelValue":t[2]||(t[2]=s=>o(a).step1.desc=s),type:"text",maxlength:"100"},null,512),[[$,o(a).step1.desc]]),t[20]||(t[20]=e("div",{class:"title mt30"},"Address Bar",-1)),t[21]||(t[21]=e("div",{class:"label"},"DEFAULT TEXT",-1)),b(e("input",{"onUpdate:modelValue":t[3]||(t[3]=s=>o(a).step1.placeholder=s),type:"text",maxlength:"50"},null,512),[[$,o(a).step1.placeholder]]),t[22]||(t[22]=e("div",{class:"label mt20"},"BUTTON TEXT",-1)),b(e("input",{"onUpdate:modelValue":t[4]||(t[4]=s=>o(a).step1.buttonText=s),type:"text",maxlength:"20"},null,512),[[$,o(a).step1.buttonText]]),t[23]||(t[23]=e("div",{class:"label mt20"},"SHOW UNIT FIELD",-1)),e("label",null,[b(e("input",{"onUpdate:modelValue":t[5]||(t[5]=s=>o(a).step1.showUnit=s),type:"radio",name:"unit",value:!0},null,512),[[E,o(a).step1.showUnit]]),t[15]||(t[15]=I("Yes "))]),e("label",Bt,[b(e("input",{"onUpdate:modelValue":t[6]||(t[6]=s=>o(a).step1.showUnit=s),type:"radio",name:"unit",value:!1},null,512),[[E,o(a).step1.showUnit]]),t[16]||(t[16]=I("No "))])],512),[[V,o(n)==="1"]]),b(e("div",null,[t[26]||(t[26]=e("div",{class:"title"},"Content",-1)),t[27]||(t[27]=e("div",{class:"label"},"FORM TITLE",-1)),b(e("input",{"onUpdate:modelValue":t[7]||(t[7]=s=>o(a).step2.title=s),type:"text",maxlength:"50"},null,512),[[$,o(a).step2.title]]),t[28]||(t[28]=e("div",{class:"label mt20"},"DESCRIPTION",-1)),b(e("input",{"onUpdate:modelValue":t[8]||(t[8]=s=>o(a).step2.desc=s),type:"text",maxlength:"100"},null,512),[[$,o(a).step2.desc]]),t[29]||(t[29]=e("div",{class:"title mt30"},"Form Settings",-1)),t[30]||(t[30]=e("div",{class:"label mt20"},"NAME",-1)),e("label",null,[b(e("input",{"onUpdate:modelValue":t[9]||(t[9]=s=>o(a).step2.nameRequired=s),type:"radio",name:"name",value:!0},null,512),[[E,o(a).step2.nameRequired]]),t[24]||(t[24]=I("Required "))]),e("label",Gt,[b(e("input",{"onUpdate:modelValue":t[10]||(t[10]=s=>o(a).step2.nameRequired=s),type:"radio",name:"name",value:!1},null,512),[[E,o(a).step2.nameRequired]]),t[25]||(t[25]=I("Optional "))])],512),[[V,o(n)==="2"]]),b(e("div",Wt,[t[33]||(t[33]=e("div",{class:"title"},"Form Settings",-1)),t[34]||(t[34]=e("div",{class:"label mt20"},"AUTO HOME VALUATION",-1)),e("label",null,[b(e("input",{"onUpdate:modelValue":t[11]||(t[11]=s=>o(a).step3.autoValuation=s),type:"radio",name:"autoValuation",value:!0},null,512),[[E,o(a).step3.autoValuation]]),t[31]||(t[31]=I("Yes "))]),e("label",jt,[b(e("input",{"onUpdate:modelValue":t[12]||(t[12]=s=>o(a).step3.autoValuation=s),type:"radio",name:"autoValuation",value:!1},null,512),[[E,o(a).step3.autoValuation]]),t[32]||(t[32]=I("No "))]),e("div",Jt,S(o(a).step3.autoValuation?"TITLE":"THANK YOU MESSAGE"),1),b(e("input",{"onUpdate:modelValue":t[13]||(t[13]=s=>o(a).step3.title=s),type:"text",maxlength:"60"},null,512),[[V,o(a).step3.autoValuation],[$,o(a).step3.title]]),b(e("textarea",{"onUpdate:modelValue":t[14]||(t[14]=s=>o(a).step3.thankYou=s),maxlength:"300"},null,512),[[V,!o(a).step3.autoValuation],[$,o(a).step3.thankYou]])],512),[[V,o(n)==="3"]])]),C(Ht,{class:"right-preview",stepValue:o(n),imgUrl:m.imgUrl,config:o(a)},null,8,["stepValue","imgUrl","config"])])]))}},Zt=L(Qt,[["__scopeId","data-v-3d9aec6c"]]),Kt={key:0},Xt={__name:"index",setup(m){const l=v(""),n=v(""),d=w("stepConfig"),a=v(""),f=w("metaTags"),{copied:t,copyCode:s}=O(),y=v(!0);function _(){if(!Te.permission){y.value=!1;return}const{step1:p,step2:r,step3:i}=d.value.config,u={img_url:l.value,step1:p,step2:r,step3:i,meta:f.value.getValueString(),submitJs:n.value},g=`[lofty_idx_home_valuation][[${JSON.stringify(u,null,2)}]][/lofty_idx_home_valuation]`;s(g),Y(q.HomeValuation,g)}return(p,r)=>(c(),U(D,{title:"Home Valuation",description:"Provide a curated and dynamic home valuation experience, showcasing featured properties to enhance visibility, engage users, and drive lead generation effectively."},{button:k(()=>[o(t)?(c(),h("span",Kt,"Copied!")):(c(),h("button",{key:1,class:G(["btn-save",{disable:!y.value}]),onClick:N(_,["prevent"])}," Copy to clipboard ",2))]),default:k(()=>[C(H,{class:"market-form-groups",ref:"metaTags",modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=i=>a.value=i),isShortCode:""},null,8,["modelValue"]),C(Ct,{class:"market-form-groups",modelValue:l.value,"onUpdate:modelValue":r[1]||(r[1]=i=>l.value=i)},null,8,["modelValue"]),C(_e,{modelValue:n.value,"onUpdate:modelValue":r[2]||(r[2]=i=>n.value=i),class:"market-form-groups",desc:"The following code will be executed after the report results are generated in step three."},null,8,["modelValue"]),C(Zt,{class:"market-form-groups",ref_key:"stepConfig",ref:d,imgUrl:l.value},null,8,["imgUrl"])]),_:1}))}},eo={class:"lofty-shortCode-log"},to={class:"short-log-table"},oo={class:"list-row"},ao={class:"header-type"},so=["textContent"],lo={class:"header-operation"},no={key:0,class:"no-log-data"},io={__name:"index",setup(m){const{copyCode:l}=O(),n=v(""),[d,a,f,t]=[v(1),v(1),v([]),v(!1)];_();function s(i){n.value=i,d.value=1,_()}function y(i){d.value=i.page,_()}async function _(){t.value=!0;const i=await F.get(`/admin/shortCodeLog/list?pageNum=${d.value}&pageSize=5&type=${n.value}`);a.value=Math.ceil(i.data.total/5),f.value=i.data.shortCodeList,t.value=!1}async function p(i){(await F.post("/admin/shortCodeLog/remove",{data:{id:i.id}})).status.code===0&&(A("Delete Successfully"),d.value=1,await _())}function r(i){l(i.content),A("Copy Successfully")}return(i,u)=>(c(),U(D,{title:"ShortCode Log",showHeader:!1,description:"Review the history and details of your Lofty WordPress ShortCode generation history on this log page."},{default:k(()=>[e("div",eo,[C(Ue,{modelValue:o(n),"onUpdate:modelValue":u[0]||(u[0]=g=>R(n)?n.value=g:null),list:o(pe),"show-all":"",class:"short-log-select",size:"small",onChange:s},{label:k(({label:g})=>[e("span",null,"Type: "+S(g||"All"),1)]),_:1},8,["modelValue","list"]),e("div",to,[u[2]||(u[2]=e("div",{class:"list-header"},[e("div",{class:"header-type"},"Type"),e("div",{class:"header-content"},"Content"),e("div",{class:"header-operation"}," Operations ")],-1)),e("div",{class:G(["list-body",{"has-pagination":o(a)>1}])},[(c(!0),h(ee,null,te(o(f),g=>(c(),h("div",oo,[e("div",ao,S(o(Me)[g.type]),1),e("div",{class:"header-content",textContent:S(g.content)},null,8,so),e("div",lo,[C(o($e),{onClick:x=>r(g),class:"icon"},null,8,["onClick"]),C(o(ke),{onClick:x=>p(g),class:"icon icon-trash"},null,8,["onClick"])])]))),256)),o(f).length===0?(c(),h("div",no,u[1]||(u[1]=[e("div",null,"No Data",-1)]))):B("",!0)],2),C(Le,{class:"admin-pagination",onPageChange:y,pageNum:o(d),pageSize:5,totalPage:o(a)},null,8,["pageNum","totalPage"]),C(he,{loading:o(t)},null,8,["loading"])])])]),_:1}))}},ro={SearchPage:Pe,QuickSearch:Be,FeaturedListings:Qe,MarketReport:lt,SoldListings:dt,HomeValuation:Xt,ShortCodeLog:io},uo={class:"lofty-admin-container lofty-reset-style"},po={class:"main-content"},co={__name:"app",setup(m){let l=v("");function n(d){l.value=ro[d.component]}return(d,a)=>(c(),h("div",uo,[C(Ce,{menuSections:o(Re),onMenuItemClick:n},null,8,["menuSections"]),e("main",po,[(c(),U(ve(o(l))))])]))}},mo=L(co,[["__scopeId","data-v-95cd220e"]]);ue(mo).mount("#app");ue(we).mount("#plugin-check");
     1import{h as F,_ as L}from"./_plugin-vue_export-helper.C-JQ4LYv.js";/* empty css               */import{r as v,G as M,k as w,o as c,d as U,w as k,u as o,g as h,z as N,e,m as C,s as R,t as S,l as ce,p as ie,W as me,F as ee,h as te,q as b,x as V,Q as ae,j as B,f as I,y as G,P as se,L as re,c as ge,a as fe,v as $,X as E,i as ve,D as ue}from"./vendor.DSMCY3-_.js";import{P as D,f as ye,J as _e,L as he,S as Ce}from"./SubmitJs.cJWSj2Zz.js";import{M as H,L as de,a as W,d as be,S as Se,c as ke}from"./styleConfig.Bp18tYB4.js";import{u as O}from"./useCopy.CluLpl8Z.js";import{f as le}from"./date-format.BrUodQAJ.js";import{M as Ve}from"./multiSelect.-BPOHIQS.js";import{s as A,P as we}from"./PluginUpdate.DDB1CEnu.js";import{_ as ne}from"./index.DAwEVGKX.js";import{_ as xe}from"./index.jjVwSEkV.js";import{u as Te}from"./user.BF73KgDm.js";import{_ as Ue}from"./index.BIsjoQ8l.js";import{p as Le}from"./standard.Cshs06GJ.js";import{I as $e}from"./IconCopy.BP11gT8d.js";import"./number-format.CLdvQh6j.js";import"./index.BAT38o-R.js";import"./outsideclick.Bw_hMuzW.js";import"./index.D8-cPlTE.js";import"./index.DNn1etY9.js";import"./index.DMIL01Q7.js";import"./index.qpyE7W-K.js";import"./index.d_VP6W-1.js";import"./service.BOwSreoa.js";import"./house-format.CcB19moP.js";import"./checkBox.ls7NZy2i.js";import"./tooltip.CnRrvdDV.js";const Re=[{title:"ShortCode",visible:!0,items:[{title:"ShortCode Log",path:"shortcode-log",component:"ShortCodeLog",visible:!0}]},{title:"Listings",visible:!0,items:[{title:"Search",path:"search-page",component:"SearchPage",visible:!0},{title:"Quick Search",path:"quick-search",component:"QuickSearch",visible:!0},{title:"Featured Listings",path:"featured-listings",component:"FeaturedListings",visible:!0},{title:"Sold Listings",path:"sold-listings",component:"SoldListings",visible:!0}]},{title:"Marketing",visible:!0,items:[{title:"Market Report",path:"market-report",component:"MarketReport",visible:!0}]},{title:"Lead Capture",visible:!0,items:[{title:"Home Valuation",path:"home-valuation",component:"HomeValuation",visible:!0}]}];function Ie(m=","){const l=m.split(",");return l[0]&&(l[0]=le("yyyy/MM/dd",+l[0])),l[1]&&(l[1]=le("yyyy/MM/dd",+l[1])),l.join(",")}const q={Search:"Search",QuickSearch:"QuickSearch",FeaturedListings:"FeaturedListings",SoldListings:"SoldListings",MarketReport:"MarketReport",HomeValuation:"HomeValuation"},pe=[{label:"Search",value:"Search"},{label:"Quick Search",value:"QuickSearch"},{label:"Featured Listings",value:"FeaturedListings"},{label:"Sold Listings",value:"SoldListings"},{label:"Market Report",value:"MarketReport"},{label:"Home Valuation",value:"HomeValuation"}],Me=pe.reduce((m,l)=>(m[l.value]=l.label,m),{});function j(m,l){const n=[];return m.forEach(d=>{const a={};for(let f in d.data)l.includes(f)?a[`date_${f}`]=Ie(d.data[f]):a[f]=d.data[f];n.push(a)}),n}function Y(m,l){F.post("/admin/shortCodeLog/save",{data:{type:m,content:l}})}const Fe={key:0},Ne={class:"form-groups"},De={class:"form-group mt20"},Oe={__name:"index",setup(m){const{copyCode:l,copied:n}=O(),d=v("map-grid"),a=v([]);M("allConditions",a);const f=v(""),t=w("metaTags"),s=w("listingRef");let y=[];function _(){const p={layout:d.value,meta:t.value.getValueString(),conditions:j(a.value,y),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,sort:s.value.sortCondition},r=`[lofty_idx_listing_page][[${JSON.stringify(p,null,2)}]][/lofty_idx_listing_page]`;l(r),Y(q.Search,r)}return(p,r)=>(c(),U(D,{title:"Search",description:"Generate and configure the shortcode of search page, then create a new WordPress page and insert the shortcode into it."},{button:k(()=>[o(n)?(c(),h("span",Fe,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(_,["prevent"])},"Copy to clipboard"))]),default:k(()=>[e("div",Ne,[C(H,{class:"listing-groups",ref:"metaTags",modelValue:f.value,"onUpdate:modelValue":r[0]||(r[0]=i=>f.value=i),isShortCode:""},null,8,["modelValue"]),e("div",De,[r[3]||(r[3]=e("label",null,"LAYOUT",-1)),C(de,{modelValue:d.value,"onUpdate:modelValue":r[1]||(r[1]=i=>d.value=i)},null,8,["modelValue"])]),C(W,{class:"search-page-filter",onReady:r[2]||(r[2]=i=>R(y)?y.value=i:y=i),ref:"listingRef"},null,512)])]),_:1}))}},Pe=L(Oe,[["__scopeId","data-v-5cca0e8e"]]),Ee={key:0},Ae={class:"form-groups"},He={class:"form-group mt20"},qe={class:"form-group"},Ye={style:{width:"100%"}},ze={__name:"index",setup(m){const{copyCode:l,copied:n}=O(),d=v([]),a=v("universal"),f=v([]);M("allConditions",d);const t=v(""),s=w("metaTags"),y=w("listingRef");async function _(i){if(i.value.length>0)return;const u=await F.get("/wp-plugin/admin/listing-search/quickSearch/conditions");i.value=u.data}let p=[];function r(){const i={layout:a.value,quick_listing_filters:f.value.join(","),meta:s.value.getValueString(),conditions:j(d.value,p),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,sort:y.value.sortCondition},u=`[lofty_idx_quick_search][[${JSON.stringify(i,null,2)}]][/lofty_idx_quick_search]`;l(u),Y(q.QuickSearch,u)}return(i,u)=>(c(),U(D,{title:"Quick Search",description:"Integrate a streamlined and user-friendly search interface directly into your WordPress page, providing a clean, intuitive experience that allows users to easily find what they're looking for."},{button:k(()=>[o(n)?(c(),h("span",Ee,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(r,["prevent"])},"Copy to clipboard"))]),default:k(()=>[e("div",Ae,[C(H,{class:"listing-groups",ref:"metaTags",modelValue:t.value,"onUpdate:modelValue":u[0]||(u[0]=g=>t.value=g),isShortCode:""},null,8,["modelValue"]),e("div",He,[u[4]||(u[4]=e("label",null,"LAYOUT",-1)),C(be,{options:[{label:"Universal",value:"universal"},{label:"Two-line layout",value:"two-line"}],"initial-condition":[a.value],"onUpdate:condition":u[1]||(u[1]=g=>a.value=g[0])},null,8,["initial-condition"])]),e("div",qe,[e("label",Ye,S("Show Listing Filter".toUpperCase()),1),C(Ve,{"initial-condition":f.value,"onUpdate:condition":u[2]||(u[2]=g=>f.value=g),"get-option-func":_,"any-label":"None"},null,8,["initial-condition"])]),C(W,{onReady:u[3]||(u[3]=g=>R(p)?p.value=g:p=g),class:"search-page-filter",ref:"listingRef"},null,512)])]),_:1}))}},Be=L(ze,[["__scopeId","data-v-5c22ec94"]]),Ge={featuredListingStyle:"grid",grid:{buttonText:"More",default:4,min:1,max:6,showButton:!0},slider:{duration:5,buttonText:"More",default:3,min:1,max:50,showButton:!0,autoPlay:!0,speed:1e3,layout:"full"},gallery:{buttonText:"More",default:3,min:1,max:8,showButton:!0,title:""}},We={key:0},je={class:"form-groups"},Je={__name:"index",setup(m){const l=v([]);M("allConditions",l);const n=v(""),d=w("metaTags"),{copied:a,copyCode:f}=O(),t=w("styleConfig"),s=w("listingRef"),y=v({});function _(i){y.value=i}let p=[];function r(){const i=t.value.getCurrentConfig(),u=i.featuredListingStyle,g=JSON.parse(JSON.stringify(i[u]||{})),x={layout:u,layout_config:g,meta:d.value.getValueString(),conditions:j(l.value,p),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,sort:s.value.sortCondition},P=`[lofty_idx_featured_listing][[${JSON.stringify(x,null,2)}]][/lofty_idx_featured_listing]`;f(P),Y(q.FeaturedListings,P)}return(i,u)=>(c(),U(D,{title:"Featured Listings",description:"Generate and configure the shortcode of various styles featured Listings page, then create a new WordPress page and insert the shortcode into it."},{button:k(()=>[o(a)?(c(),h("span",We,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(r,["prevent"])},"Copy to clipboard"))]),default:k(()=>[e("div",je,[C(H,{class:"listing-groups",ref:"metaTags",modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=g=>n.value=g),isShortCode:""},null,8,["modelValue"]),C(W,{onReady:u[1]||(u[1]=g=>R(p)?p.value=g:p=g),style:{"padding-left":"0"},ref:"listingRef"},null,512),C(Se,{config:o(Ge),onUpdate:_,ref:"styleConfig",style:{"padding-left":"0"}},null,8,["config"])])]),_:1}))}},Qe=L(Je,[["__scopeId","data-v-1ff2633b"]]),Ze=m=>[{key:"title",inputType:"text",label:"Title",value:m.title,maxLength:100},{key:"show_new",inputType:"radio",label:"Display New Listings (Last 30 Days)",value:m.show_new,options:[{label:"Yes",value:!0},{label:"No",value:!1}]},{key:"show_pending",inputType:"radio",label:"Display Pending Listings",value:m.show_pending,options:[{label:"Yes",value:!0},{label:"No",value:!1}]},{key:"show_sold",inputType:"radio",label:"Display Sold Listings (Last 30 Days)",value:m.show_sold,options:[{label:"Yes",value:!0},{label:"No",value:!1}]}],X={title:"",show_new:!0,show_pending:!0,show_sold:!0},Ke={class:"marketReport-config-content"},Xe={class:"config-item-name"},et=["type","onUpdate:modelValue","maxlength"],tt=["type","onUpdate:modelValue","name","value"],ot={__name:"report-config",props:{config:{type:Object,default:()=>({})}},emits:["update"],setup(m,{emit:l}){ce(()=>{d()});let n=v([]);function d(){n.value=Ze(X)}ie(()=>n.value,()=>{f()},{deep:!0});const a=l;function f(){const y=s();a("update",{diffData:y,configData:t()})}function t(){var _;let y={};return(_=n.value)==null||_.forEach(p=>{y[p.key]=p.value}),y}function s(){let y={},_=t();return me(X,_)||(y=ye(X,_)),y}return(y,_)=>(c(),h("div",Ke,[_[0]||(_[0]=e("div",{class:"config-name"},"Style Settings",-1)),(c(!0),h(ee,null,te(o(n),p=>b((c(),h("div",{class:"config-item",key:p.key},[e("div",Xe,S(p.label),1),e("div",{class:G(["config-item-content",{row:p.inputType==="radio"}])},[p.inputType==="text"?b((c(),h("input",{key:0,type:p.inputType,"onUpdate:modelValue":r=>p.value=r,maxlength:p.maxLength},null,8,et)),[[ae,p.value]]):B("",!0),p.inputType==="radio"?(c(!0),h(ee,{key:1},te(p.options,(r,i)=>(c(),h("label",{key:i},[b(e("input",{type:p.inputType,"onUpdate:modelValue":u=>p.value=u,name:m.config.type+"_"+p.key,value:r.value},null,8,tt),[[ae,p.value]]),I(" "+S(r.label),1)]))),128)):B("",!0)],2)])),[[V,p.show!==!1]])),128))]))}},at=L(ot,[["__scopeId","data-v-a8ce3903"]]),st={key:0},lt={__name:"index",setup(m){const l={title:"Market Criteria",tip:"Define the criteria used to generate the market report",criteriaUrl:"/wp-plugin/market-report/conditions",listingCountUrl:"/wp-plugin/market-report/match-count",isMarketReport:!0},n=v([{data:{location:{}},orderKeys:["location"]}]);M("allConditions",n);const{copied:d,copyCode:a}=O();let f=v({});function t({configData:u}){f.value=u}const s=v(""),y=w("metaTags");let _=[];function p(){var T,oe;const u=n.value.map(K=>({data:se(K.data||{})})).filter(Boolean);let g=[];(T=u[0])!=null&&T.data.location&&Object.values((oe=u[0])==null?void 0:oe.data.location).forEach(K=>{g=g.concat(K)});const{title:x,show_new:P,show_pending:J,show_sold:Q}=f.value,Z={title:x,location:g.join(","),show_new:P,show_pending:J,show_sold:Q,meta:y.value.getValueString(),conditions:j(n.value,_),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},z=`[lofty_idx_market_report][[${JSON.stringify(Z,null,2)}]][/lofty_idx_market_report]`;a(z),Y(q.MarketReport,z)}const r=v(!1);async function i(){if(r.value)return;const{title:u,show_new:g,show_pending:x,show_sold:P}=f.value;if(!u){A("Please fill the report title.",{duration:3e3,err:!0});return}if(!/^[a-zA-Z0-9_\- ]*$/.test(u)){A("Special characters are not allowed in the title.",{duration:3e3,err:!0});return}r.value=!0;const J=n.value.map(T=>({data:se(T.data||{})})).filter(Boolean),Q=await F.post("/admin/listing-search/short-code/saveOrUpdate",{data:{values:J}}),Z={title:u,filterName:Q.data,extraInfoMap:{displayNewListing:g,displayPendingListings:x,displaySoldListings:P}},z=await F.post("/admin/report/save",{data:Z});if(z.status.code===0)A("Add Successfully"),setTimeout(()=>{const T=new URLSearchParams(window.location.search);T.set("page","lofty-idx-pages"),T.set("sub","market-report-collection"),window.location.search=T.toString()},1e3);else{let T="A report with the same filters already exists. Please do not create a duplicate";z.status.code===230001&&(T="This report title is already in use. Please choose a different one"),A(T,{duration:5e3,err:!0}),r.value=!1}}return(u,g)=>(c(),U(D,{title:"Market Report",description:"Generate and configure the shortcode of Market Report, then create a new WordPress Page and insert the shortcode into it, improving market transparency and attracting investor attention to fuel business opportunities."},{button:k(()=>[e("button",{class:G(["btn-save","btn-add-report",{disable:r.value}]),onClick:N(i,["prevent"])},"Add To Report List",2),o(d)?(c(),h("span",st,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(p,["prevent"])}," Copy to clipboard "))]),default:k(()=>[C(H,{class:"market-form-groups",ref:"metaTags",modelValue:s.value,"onUpdate:modelValue":g[0]||(g[0]=x=>s.value=x),type:"marketReport",isShortCode:""},null,8,["modelValue"]),C(W,{class:"market-report-short-code",maxGroupNumber:1,config:l,onReady:g[1]||(g[1]=x=>R(_)?_.value=x:_=x)}),C(at,{onUpdate:t})]),_:1}))}},nt={key:0},it={class:"form-groups"},rt={class:"form-group"},ut={__name:"index",setup(m){const{copyCode:l,copied:n}=O(),d=v("map-grid"),a=v([]);M("allConditions",a),M("listingFilterExcludeFields",v(["listingStatus"])),M("listingFilterLabelMap",v({price:"Sold Price"}));const f=v(""),t=w("metaTags"),s=w("listingRef");let y=[];function _(){const p={layout:d.value,meta:t.value.getValueString(),conditions:j(a.value,y),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,sort:s.value.sortCondition},r=`[lofty_idx_sold_listing][[${JSON.stringify(p,null,2)}]][/lofty_idx_sold_listing]`;l(r),Y(q.SoldListings,r)}return(p,r)=>(c(),U(D,{title:"Sold Listings",description:"Generate and configure the shortcode of sold listings page, then create a new WordPress page and insert the shortcode into it."},{button:k(()=>[o(n)?(c(),h("span",nt,"Copied!")):(c(),h("button",{key:1,class:"btn-save",onClick:N(_,["prevent"])},"Copy to clipboard"))]),default:k(()=>[e("div",it,[e("div",rt,[r[3]||(r[3]=e("label",null,"LAYOUT",-1)),C(de,{modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=i=>d.value=i)},null,8,["modelValue"])]),C(H,{class:"listing-groups",ref:"metaTags",modelValue:f.value,"onUpdate:modelValue":r[1]||(r[1]=i=>f.value=i),isShortCode:""},null,8,["modelValue"]),C(W,{class:"filters-wrap","is-sold":!0,onReady:r[2]||(r[2]=i=>R(y)?y.value=i:y=i),ref:"listingRef"},null,512)])]),_:1}))}},dt=L(ut,[["__scopeId","data-v-74a6f2c5"]]),pt={class:"lofty-img-upload"},ct={key:0,class:"img-wrapper"},mt=["src"],gt={key:1,class:"upload-wrapper"},ft={key:1},vt={__name:"imgUpload",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(m){const l=re(m,"modelValue"),n=w("fileInput");function d(){n.value.click()}const a=v(!1);function f(){const t=n.value.files[0],s=new FileReader;a.value=!0,s.onload=async y=>{const _=y.target.result,p=await F.post("/wp-plugin/evaluation/upload-aws/image",{data:{base64File:_.split(",")[1]}});p.status.code===0&&(l.value=p.data),a.value=!1},s.readAsDataURL(t)}return(t,s)=>(c(),h("div",pt,[l.value?(c(),h("div",ct,[e("img",{src:l.value,alt:""},null,8,mt),e("div",{class:"img-btn edit",onClick:d},s[1]||(s[1]=[e("span",{class:"lofty_iconfont lofty-icon-Shape"},null,-1)])),e("div",{class:"img-btn delete",onClick:s[0]||(s[0]=y=>l.value="")},s[2]||(s[2]=[e("span",{class:"lofty_iconfont lofty-icon-delete2"},null,-1)])),o(a)?(c(),U(ne,{key:0,loading:o(a)},null,8,["loading"])):B("",!0)])):(c(),h("div",gt,[o(a)?(c(),U(ne,{key:0,loading:o(a)},null,8,["loading"])):(c(),h("div",ft,s[3]||(s[3]=[e("div",{class:"lofty_iconfont lofty-icon-plus_01"},null,-1),e("div",{class:"upload-text"},"Upload Image",-1),e("div",{class:"upload-tip"},"(1440×900)",-1),e("label",{for:"fileInput"},null,-1)])))])),e("input",{id:"fileInput",ref_key:"fileInput",ref:n,type:"file",onChange:f,accept:"image/png, image/jpeg, image/gif, image/jpg"},null,544)]))}},yt=L(vt,[["__scopeId","data-v-35cd6e29"]]),_t={class:"style-setting"},ht={__name:"style-setting",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(m){const l=v(""),n=re(m,"modelValue");return ie(l,()=>{n.value=l.value}),n.value=l.value,(d,a)=>(c(),h("div",_t,[a[1]||(a[1]=e("p",{class:"second-title"},"BACKGROUND IMAGE",-1)),C(yt,{modelValue:o(l),"onUpdate:modelValue":a[0]||(a[0]=f=>R(l)?l.value=f:null)},null,8,["modelValue"])]))}},Ct=L(ht,[["__scopeId","data-v-c79f239d"]]),bt="/home-valuation-step1.BcOghYip.png",St="/home-valuation-step2.C1GywpzI.png",kt="/home-valuation-step3-yes.C4P-9dZ9.png",Vt="/home-valuation-step3-no.OGxWnwZp.png",wt={class:"admin-home-valuation-preview"},xt=["src"],Tt=["src"],Ut={class:"title ellipsis"},Lt={class:"desc"},$t={class:"step-1-content"},Rt={class:"placeholder"},It={class:"button-text ellipsis"},Mt={class:"unit-field"},Ft={class:"step-2-content"},Nt={class:"form-title ellipsis"},Dt={class:"form-desc"},Ot={class:"ellipsis"},Pt={class:"name-required"},Et={class:"step-3-content"},At={__name:"preview",props:{stepValue:String,imgUrl:String,config:Object},setup(m){const{step1:l,step2:n,step3:d}=m.config,a=ge(()=>m.stepValue==="1"?LoftyIdxUtils.static_url(bt):m.stepValue==="2"?LoftyIdxUtils.static_url(St):d.autoValuation?LoftyIdxUtils.static_url(kt):LoftyIdxUtils.static_url(Vt));return(f,t)=>(c(),h("div",wt,[t[1]||(t[1]=e("div",{class:"preview-title"},"Preview",-1)),e("div",{class:G(["preview-content",["step-"+m.stepValue,o(d).autoValuation?"yes":"no"]])},[m.imgUrl?(c(),h("img",{key:0,src:m.imgUrl,alt:""},null,8,xt)):B("",!0),e("img",{src:o(a),alt:""},null,8,Tt),e("div",Ut,S(o(l).title),1),e("div",Lt,[e("span",null,S(o(l).desc),1)]),b(e("div",$t,[e("div",Rt,S(o(l).placeholder),1),e("div",It,S(o(l).buttonText),1),b(e("div",Mt,"| Unit",512),[[V,o(l).showUnit]])],512),[[V,m.stepValue==="1"]]),b(e("div",Ft,[e("div",Nt,S(o(n).title),1),e("div",Dt,[e("span",Ot,S(o(n).desc),1)]),b(e("div",Pt,t[0]||(t[0]=[e("span",null,"*",-1),e("span",{style:{"margin-left":"210px"}},"*",-1)]),512),[[V,o(n).nameRequired]])],512),[[V,m.stepValue==="2"]]),b(e("div",Et,[b(e("div",{class:"step3-title ellipsis"},S(o(d).title),513),[[V,o(d).autoValuation]]),b(e("div",{class:"thank-you"},S(o(d).thankYou),513),[[V,!o(d).autoValuation]])],512),[[V,m.stepValue==="3"]])],2)]))}},Ht=L(At,[["__scopeId","data-v-f37d07a7"]]),qt={class:"lofty-admin-step-config"},Yt={class:"step-content"},zt={class:"left-config"},Bt={style:{"margin-left":"30px"}},Gt={style:{"margin-left":"30px"}},Wt={class:"step-3"},jt={style:{"margin-left":"30px"}},Jt={class:"label mt20"},Qt={__name:"step-config",props:{imgUrl:String},setup(m,{expose:l}){const n=v("1"),d=[{label:"Step1",value:"1"},{label:"Step2",value:"2"},{label:"Step3",value:"3"}],a=fe({step1:{title:"What‘s your Home Worth?",desc:"Find out the worth of your home and get the most accurate valuation.",placeholder:"Enter your street address",buttonText:"GET REPORT",showUnit:!0},step2:{title:"Property Found!",desc:"Where would you like us to send your home valuation report?",nameRequired:!0},step3:{autoValuation:!0,title:"Estimated Home Value",thankYou:"At this time we can't provide an automated home value estimate, but we'll be reaching out to arrange a personalized quote based on market conditions and property information. Thank you!"}});return l({config:a}),(f,t)=>(c(),h("div",qt,[C(xe,{modelValue:o(n),"onUpdate:modelValue":t[0]||(t[0]=s=>R(n)?n.value=s:null),tabs:d},null,8,["modelValue"]),e("div",Yt,[e("div",zt,[b(e("div",null,[t[17]||(t[17]=e("div",{class:"title"},"Content",-1)),t[18]||(t[18]=e("div",{class:"label"},"TITLE",-1)),b(e("input",{"onUpdate:modelValue":t[1]||(t[1]=s=>o(a).step1.title=s),type:"text",maxlength:"100"},null,512),[[$,o(a).step1.title]]),t[19]||(t[19]=e("div",{class:"label mt20"},"DESCRIPTION",-1)),b(e("input",{"onUpdate:modelValue":t[2]||(t[2]=s=>o(a).step1.desc=s),type:"text",maxlength:"100"},null,512),[[$,o(a).step1.desc]]),t[20]||(t[20]=e("div",{class:"title mt30"},"Address Bar",-1)),t[21]||(t[21]=e("div",{class:"label"},"DEFAULT TEXT",-1)),b(e("input",{"onUpdate:modelValue":t[3]||(t[3]=s=>o(a).step1.placeholder=s),type:"text",maxlength:"50"},null,512),[[$,o(a).step1.placeholder]]),t[22]||(t[22]=e("div",{class:"label mt20"},"BUTTON TEXT",-1)),b(e("input",{"onUpdate:modelValue":t[4]||(t[4]=s=>o(a).step1.buttonText=s),type:"text",maxlength:"20"},null,512),[[$,o(a).step1.buttonText]]),t[23]||(t[23]=e("div",{class:"label mt20"},"SHOW UNIT FIELD",-1)),e("label",null,[b(e("input",{"onUpdate:modelValue":t[5]||(t[5]=s=>o(a).step1.showUnit=s),type:"radio",name:"unit",value:!0},null,512),[[E,o(a).step1.showUnit]]),t[15]||(t[15]=I("Yes "))]),e("label",Bt,[b(e("input",{"onUpdate:modelValue":t[6]||(t[6]=s=>o(a).step1.showUnit=s),type:"radio",name:"unit",value:!1},null,512),[[E,o(a).step1.showUnit]]),t[16]||(t[16]=I("No "))])],512),[[V,o(n)==="1"]]),b(e("div",null,[t[26]||(t[26]=e("div",{class:"title"},"Content",-1)),t[27]||(t[27]=e("div",{class:"label"},"FORM TITLE",-1)),b(e("input",{"onUpdate:modelValue":t[7]||(t[7]=s=>o(a).step2.title=s),type:"text",maxlength:"50"},null,512),[[$,o(a).step2.title]]),t[28]||(t[28]=e("div",{class:"label mt20"},"DESCRIPTION",-1)),b(e("input",{"onUpdate:modelValue":t[8]||(t[8]=s=>o(a).step2.desc=s),type:"text",maxlength:"100"},null,512),[[$,o(a).step2.desc]]),t[29]||(t[29]=e("div",{class:"title mt30"},"Form Settings",-1)),t[30]||(t[30]=e("div",{class:"label mt20"},"NAME",-1)),e("label",null,[b(e("input",{"onUpdate:modelValue":t[9]||(t[9]=s=>o(a).step2.nameRequired=s),type:"radio",name:"name",value:!0},null,512),[[E,o(a).step2.nameRequired]]),t[24]||(t[24]=I("Required "))]),e("label",Gt,[b(e("input",{"onUpdate:modelValue":t[10]||(t[10]=s=>o(a).step2.nameRequired=s),type:"radio",name:"name",value:!1},null,512),[[E,o(a).step2.nameRequired]]),t[25]||(t[25]=I("Optional "))])],512),[[V,o(n)==="2"]]),b(e("div",Wt,[t[33]||(t[33]=e("div",{class:"title"},"Form Settings",-1)),t[34]||(t[34]=e("div",{class:"label mt20"},"AUTO HOME VALUATION",-1)),e("label",null,[b(e("input",{"onUpdate:modelValue":t[11]||(t[11]=s=>o(a).step3.autoValuation=s),type:"radio",name:"autoValuation",value:!0},null,512),[[E,o(a).step3.autoValuation]]),t[31]||(t[31]=I("Yes "))]),e("label",jt,[b(e("input",{"onUpdate:modelValue":t[12]||(t[12]=s=>o(a).step3.autoValuation=s),type:"radio",name:"autoValuation",value:!1},null,512),[[E,o(a).step3.autoValuation]]),t[32]||(t[32]=I("No "))]),e("div",Jt,S(o(a).step3.autoValuation?"TITLE":"THANK YOU MESSAGE"),1),b(e("input",{"onUpdate:modelValue":t[13]||(t[13]=s=>o(a).step3.title=s),type:"text",maxlength:"60"},null,512),[[V,o(a).step3.autoValuation],[$,o(a).step3.title]]),b(e("textarea",{"onUpdate:modelValue":t[14]||(t[14]=s=>o(a).step3.thankYou=s),maxlength:"300"},null,512),[[V,!o(a).step3.autoValuation],[$,o(a).step3.thankYou]])],512),[[V,o(n)==="3"]])]),C(Ht,{class:"right-preview",stepValue:o(n),imgUrl:m.imgUrl,config:o(a)},null,8,["stepValue","imgUrl","config"])])]))}},Zt=L(Qt,[["__scopeId","data-v-3d9aec6c"]]),Kt={key:0},Xt={__name:"index",setup(m){const l=v(""),n=v(""),d=w("stepConfig"),a=v(""),f=w("metaTags"),{copied:t,copyCode:s}=O(),y=v(!0);function _(){if(!Te.permission){y.value=!1;return}const{step1:p,step2:r,step3:i}=d.value.config,u={img_url:l.value,step1:p,step2:r,step3:i,meta:f.value.getValueString(),submitJs:n.value},g=`[lofty_idx_home_valuation][[${JSON.stringify(u,null,2)}]][/lofty_idx_home_valuation]`;s(g),Y(q.HomeValuation,g)}return(p,r)=>(c(),U(D,{title:"Home Valuation",description:"Provide a curated and dynamic home valuation experience, showcasing featured properties to enhance visibility, engage users, and drive lead generation effectively."},{button:k(()=>[o(t)?(c(),h("span",Kt,"Copied!")):(c(),h("button",{key:1,class:G(["btn-save",{disable:!y.value}]),onClick:N(_,["prevent"])}," Copy to clipboard ",2))]),default:k(()=>[C(H,{class:"market-form-groups",ref:"metaTags",modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=i=>a.value=i),isShortCode:""},null,8,["modelValue"]),C(Ct,{class:"market-form-groups",modelValue:l.value,"onUpdate:modelValue":r[1]||(r[1]=i=>l.value=i)},null,8,["modelValue"]),C(_e,{modelValue:n.value,"onUpdate:modelValue":r[2]||(r[2]=i=>n.value=i),class:"market-form-groups",desc:"The following code will be executed after the report results are generated in step three."},null,8,["modelValue"]),C(Zt,{class:"market-form-groups",ref_key:"stepConfig",ref:d,imgUrl:l.value},null,8,["imgUrl"])]),_:1}))}},eo={class:"lofty-shortCode-log"},to={class:"short-log-table"},oo={class:"list-row"},ao={class:"header-type"},so=["textContent"],lo={class:"header-operation"},no={key:0,class:"no-log-data"},io={__name:"index",setup(m){const{copyCode:l}=O(),n=v(""),[d,a,f,t]=[v(1),v(1),v([]),v(!1)];_();function s(i){n.value=i,d.value=1,_()}function y(i){d.value=i.page,_()}async function _(){t.value=!0;const i=await F.get(`/admin/shortCodeLog/list?pageNum=${d.value}&pageSize=5&type=${n.value}`);a.value=Math.ceil(i.data.total/5),f.value=i.data.shortCodeList,t.value=!1}async function p(i){(await F.post("/admin/shortCodeLog/remove",{data:{id:i.id}})).status.code===0&&(A("Delete Successfully"),d.value=1,await _())}function r(i){l(i.content),A("Copy Successfully")}return(i,u)=>(c(),U(D,{title:"ShortCode Log",showHeader:!1,description:"Review the history and details of your Lofty WordPress ShortCode generation history on this log page."},{default:k(()=>[e("div",eo,[C(Ue,{modelValue:o(n),"onUpdate:modelValue":u[0]||(u[0]=g=>R(n)?n.value=g:null),list:o(pe),"show-all":"",class:"short-log-select",size:"small",onChange:s},{label:k(({label:g})=>[e("span",null,"Type: "+S(g||"All"),1)]),_:1},8,["modelValue","list"]),e("div",to,[u[2]||(u[2]=e("div",{class:"list-header"},[e("div",{class:"header-type"},"Type"),e("div",{class:"header-content"},"Content"),e("div",{class:"header-operation"}," Operations ")],-1)),e("div",{class:G(["list-body",{"has-pagination":o(a)>1}])},[(c(!0),h(ee,null,te(o(f),g=>(c(),h("div",oo,[e("div",ao,S(o(Me)[g.type]),1),e("div",{class:"header-content",textContent:S(g.content)},null,8,so),e("div",lo,[C(o($e),{onClick:x=>r(g),class:"icon"},null,8,["onClick"]),C(o(ke),{onClick:x=>p(g),class:"icon icon-trash"},null,8,["onClick"])])]))),256)),o(f).length===0?(c(),h("div",no,u[1]||(u[1]=[e("div",null,"No Data",-1)]))):B("",!0)],2),C(Le,{class:"admin-pagination",onPageChange:y,pageNum:o(d),pageSize:5,totalPage:o(a)},null,8,["pageNum","totalPage"]),C(he,{loading:o(t)},null,8,["loading"])])])]),_:1}))}},ro={SearchPage:Pe,QuickSearch:Be,FeaturedListings:Qe,MarketReport:lt,SoldListings:dt,HomeValuation:Xt,ShortCodeLog:io},uo={class:"lofty-admin-container lofty-reset-style"},po={class:"main-content"},co={__name:"app",setup(m){let l=v("");function n(d){l.value=ro[d.component]}return(d,a)=>(c(),h("div",uo,[C(Ce,{menuSections:o(Re),onMenuItemClick:n},null,8,["menuSections"]),e("main",po,[(c(),U(ve(o(l))))])]))}},mo=L(co,[["__scopeId","data-v-95cd220e"]]);ue(mo).mount("#app");ue(we).mount("#plugin-check");
  • lofty-idx/trunk/assets/feature-listing.js

    r3393952 r3393989  
    1 import{h as z,i as f}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{r as C,I as B,l as U,k as D,o as l,g as i,u as s,e,m as T,y as w,F as _,h as S,j as y,t as h,d as b,c as F,n as H,D as M}from"./vendor.DSMCY3-_.js";import{c as A}from"./module.CKjUdtPN.js";import{f as G}from"./house-format.Bvy9O_Yy.js";import{S as R,g as V,a as q,f as W}from"./popup-trigger.Clg3jXpa.js";import{E as K,_ as I}from"./feature-listing-slider.QgT9uoot.js";import{_ as E}from"./houseSlider.ptuPATjg.js";import{c as O}from"./verify-email.B_du1TfR.js";import{u as N}from"./user.BF73KgDm.js";import{a as Q,s as J}from"./popup-mls.BZWi9Sqc.js";import"./number-format.CLdvQh6j.js";import"./index.C1-1XiZ9.js";import"./google.Cnb9DEy-.js";import"./index.qpyE7W-K.js";import"./useConfirm.BQXs6K30.js";const x={};function X(t){const n=t.getModuleData(),r={module:t,data:n,layout:n.layout||"grid",featuredListingName:n.featuredListingName,list:C([]),showMore:C(n.layoutConfig.showButton),moreText:C(n.layoutConfig.buttonText),isShortCode:!!n.shortcode_config.layout,shortcode_config:n.shortcode_config},u={async searchList(){const a={action:"lofty_idx_api",data:{pageSize:n.layoutConfig.default,page:1,listingType:"featured-listing",featureListingName:n.featureListingName||"WP_CUSTOM_FEATURED_LISTING"},headers:{}};r.isShortCode||(a.headers.trackingpagekey="featured_listing");const g=(await z.get("/search/realTimeListings",a)).data.listings,c=[];for(const o of g)R.includes(o.mlsOrgId)&&c.push(o.id);if(c!=null&&c.length){const o=await V(c,!1);o&&Object.keys(o).length&&g.forEach((v,$)=>{const L=o[v.id]||!1;g[$]={...v,mlsOrg:{...v.mlsOrg,cardTemplate:q(v,L,"cardTemplate")}}})}g.forEach(o=>G(o)),r.list.value=g},moreClick(){const a=document.createElement("a");a.target=f?"_self":"_blank",a.href=`/listing/?featureListingName=${n.featureListingName}&pageKey=search`,document.body.appendChild(a),a.click(),document.body.removeChild(a)}};return{...r,...u,onload:u.searchList()}}function Y(t){x[t.id]=X(t)}const Z={key:0,class:"lofty-listing-slider"},tt=["src"],et={key:0,class:"lofty-single-house"},st={key:1,class:"lofty-listing-slider-empty"},ot={__name:"listingSlider",props:{id:String,config:Object},setup(t){B();const{onload:n,list:r,module:u,showMore:a,moreText:m,moreClick:g}=x[t.id],c=LoftyIdxUtils.static_url(K),o=t.config.layout,v=["prevNext","next"].includes(o);function $(){const k=r.value.length;if(f)return k>1;if(o==="full")return k>1;if(o==="next")return k>2;if(o==="prevNext")return k>3}U(()=>{n.then(()=>{L()})});function L(){if(r.value.length<2)return;r.value.length===2&&o==="next"&&r.value.push(...r.value);const k=u.$(".swiper-container");let d={navigation:{prevEl:".listing-slider-prev-button",nextEl:".listing-slider-next-button"},loop:$(),initialSlide:o==="prevNext"&&r.value.length>2?1:0,observer:!0,spaceBetween:f?10:0,speed:t.config.speed||1e3,centeredSlides:!f&&o!=="next",centeredSlidesBounds:!1,injectStyles:[`:host .swiper-button-disabled {
     1import{h as z,i as f}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{r as C,I as B,l as U,k as D,o as l,g as i,u as s,e,m as T,y as w,F as _,h as S,j as y,t as h,d as b,c as F,n as H,D as M}from"./vendor.DSMCY3-_.js";import{c as A}from"./module.CKjUdtPN.js";import{f as G}from"./house-format.CcB19moP.js";import{S as R,g as V,a as q,f as W}from"./popup-trigger.C9dAVRHW.js";import{E as K,_ as I}from"./feature-listing-slider.QgT9uoot.js";import{_ as E}from"./houseSlider.ptuPATjg.js";import{c as O}from"./verify-email.B_du1TfR.js";import{u as N}from"./user.BF73KgDm.js";import{a as Q,s as J}from"./popup-mls.BZWi9Sqc.js";import"./number-format.CLdvQh6j.js";import"./index.C1-1XiZ9.js";import"./google.Cnb9DEy-.js";import"./index.qpyE7W-K.js";import"./useConfirm.BQXs6K30.js";const x={};function X(t){const n=t.getModuleData(),r={module:t,data:n,layout:n.layout||"grid",featuredListingName:n.featuredListingName,list:C([]),showMore:C(n.layoutConfig.showButton),moreText:C(n.layoutConfig.buttonText),isShortCode:!!n.shortcode_config.layout,shortcode_config:n.shortcode_config},u={async searchList(){const a={action:"lofty_idx_api",data:{pageSize:n.layoutConfig.default,page:1,listingType:"featured-listing",featureListingName:n.featureListingName||"WP_CUSTOM_FEATURED_LISTING"},headers:{}};r.isShortCode||(a.headers.trackingpagekey="featured_listing");const g=(await z.get("/search/realTimeListings",a)).data.listings,c=[];for(const o of g)R.includes(o.mlsOrgId)&&c.push(o.id);if(c!=null&&c.length){const o=await V(c,!1);o&&Object.keys(o).length&&g.forEach((v,$)=>{const L=o[v.id]||!1;g[$]={...v,mlsOrg:{...v.mlsOrg,cardTemplate:q(v,L,"cardTemplate")}}})}g.forEach(o=>G(o)),r.list.value=g},moreClick(){const a=document.createElement("a");a.target=f?"_self":"_blank",a.href=`/listing/?featureListingName=${n.featureListingName}&pageKey=search`,document.body.appendChild(a),a.click(),document.body.removeChild(a)}};return{...r,...u,onload:u.searchList()}}function Y(t){x[t.id]=X(t)}const Z={key:0,class:"lofty-listing-slider"},tt=["src"],et={key:0,class:"lofty-single-house"},st={key:1,class:"lofty-listing-slider-empty"},ot={__name:"listingSlider",props:{id:String,config:Object},setup(t){B();const{onload:n,list:r,module:u,showMore:a,moreText:m,moreClick:g}=x[t.id],c=LoftyIdxUtils.static_url(K),o=t.config.layout,v=["prevNext","next"].includes(o);function $(){const k=r.value.length;if(f)return k>1;if(o==="full")return k>1;if(o==="next")return k>2;if(o==="prevNext")return k>3}U(()=>{n.then(()=>{L()})});function L(){if(r.value.length<2)return;r.value.length===2&&o==="next"&&r.value.push(...r.value);const k=u.$(".swiper-container");let d={navigation:{prevEl:".listing-slider-prev-button",nextEl:".listing-slider-next-button"},loop:$(),initialSlide:o==="prevNext"&&r.value.length>2?1:0,observer:!0,spaceBetween:f?10:0,speed:t.config.speed||1e3,centeredSlides:!f&&o!=="next",centeredSlidesBounds:!1,injectStyles:[`:host .swiper-button-disabled {
    22        pointer-events: auto;
    33      }`]};t.config.autoPlay&&(d.autoplay={delay:t.config.duration*1e3,pauseOnMouseEnter:!0}),(v||f)&&(d.slidesPerView="auto",d.effect="coverflow",d.coverflowEffect={rotate:0,depth:0,scale:f?1:(50-100/window.innerWidth*100)/50,slideShadows:!1}),Object.assign(k,d),k.initialize()}const j=D("swiperRef");return(k,d)=>(l(),i(_,null,[s(r).length>0?(l(),i("div",Z,[e("img",{class:"img-background",src:s(c),alt:""},null,8,tt),d[3]||(d[3]=e("div",{class:"mask"},null,-1)),s(r).length===1?(l(),i("div",et,[T(E,{house:s(r)[0]},null,8,["house"])])):(l(),i("swiper-container",{key:1,init:"false",ref_key:"swiperRef",ref:j,class:w([{"swiper-hide-prev":s(o)==="next"&&!s(f)},"swiper-container"])},[(l(!0),i(_,null,S(s(r),(p,P)=>(l(),i("swiper-slide",{class:w({"swiper-slide-flow":s(v)&&!s(f),"swiper-slide-mobile":s(f)}),key:P},[T(E,{house:p},null,8,["house"])],2))),128))],2)),s(r).length>1&&!s(f)?(l(),i(_,{key:2},[s(o)!=="next"?(l(),i("div",{key:0,class:w(["listing-slider-prev-button",{"sold-button":s(v)}])},d[1]||(d[1]=[e("i",{class:"lofty_iconfont lofty-icon-arrow_06_left"},null,-1)]),2)):y("",!0),e("div",{class:w(["listing-slider-next-button",{"sold-button":s(v),"hide-prev":s(o)==="next"}])},d[2]||(d[2]=[e("i",{class:"lofty_iconfont lofty-icon-arrow_06_right"},null,-1)]),2)],64)):y("",!0)])):(l(),i("div",st,d[4]||(d[4]=[e("div",{class:"lofty-no-listing"},[e("i",{class:"lofty_iconfont lofty-icon-house_02"}),e("div",{class:"no-listing-text"},"No Listing Found")],-1)]))),s(a)&&s(r).length>0?(l(),i("div",{key:2,onClick:d[0]||(d[0]=(...p)=>s(g)&&s(g)(...p)),class:"lofty-more"},h(s(m)),1)):y("",!0)],64))}},lt={class:"lofty-house-card-grid"},it={class:"lofty-house-img-grid"},nt=["href"],at=["src","alt"],rt={class:"lofty-house-info-grid"},ct={class:"lofty-house-price"},ut={class:"lofty-house-base"},dt={class:"lofty-feature-address"},ft=["href"],gt={key:0,class:"lofty-house-id"},ht={class:"lofty-mls-info-grid"},yt=["innerHTML"],mt={key:0,class:"lofty-mls-logo"},vt=["src","alt"],kt={__name:"houseGrid",props:{house:Object},setup(t){function n(){O(t.house.id,t.house.collectStatus,()=>{t.house.collectStatus=!t.house.collectStatus})}return(r,u)=>(l(),i("div",lt,[e("div",it,[e("a",{target:"_blank",href:t.house.detailUrl},[e("img",{src:t.house.previewPicture,loading:"lazy",alt:t.house.address},null,8,at),u[0]||(u[0]=e("div",{class:"img-mask"},null,-1))],8,nt)]),t.house.isProtected?(l(),b(I,{key:0,class:"lofty-house-mask-grid"})):y("",!0),e("div",rt,[e("p",ct,h(t.house.price),1),e("p",ut,[(l(!0),i(_,null,S(t.house.basic,a=>(l(),i("span",{key:a.key},h(a.text),1))),128))]),e("p",dt,[e("a",{target:"_blank",href:t.house.detailUrl},h(t.house.address),9,ft)]),t.house.showMls?(l(),i("p",gt," MLS# "+h(t.house.mlsListingId),1)):y("",!0)]),e("div",ht,[e("p",{class:"lofty-mls-text",innerHTML:t.house.provided},null,8,yt),t.house.mlsLogo?(l(),i("div",mt,[e("img",{src:t.house.mlsLogo,alt:t.house.mlsOrg.name},null,8,vt)])):y("",!0)]),e("i",{onClick:n,style:{"font-size":"24px"},class:w(["lofty_iconfont",t.house.collectStatus?"lofty-icon-heart-fill":"lofty-icon-heart"])},null,2)]))}},_t={key:0,class:"lofty-feature-listing-grid"},wt={class:"lofty-grid-house-list"},St={key:1,class:"lofty-feature-listing-grid-empty"},bt={__name:"listingGrid",props:{id:String},setup(t){const{list:n,showMore:r,moreText:u,moreClick:a}=x[t.id],m=F(()=>{if(!f)return{width:n.value.length===4?"50%":"33.33%","flex-grow":1}});return(g,c)=>s(n).length>0?(l(),i("div",_t,[e("div",wt,[(l(!0),i(_,null,S(s(n),o=>(l(),b(kt,{style:H(s(m)),house:o,key:o.id},null,8,["style","house"]))),128))]),s(r)?(l(),i("div",{key:0,class:"lofty-more",onClick:c[0]||(c[0]=(...o)=>s(a)&&s(a)(...o))},h(s(u)),1)):y("",!0)])):(l(),i("div",St,c[1]||(c[1]=[e("div",{class:"lofty-no-listing"},[e("i",{class:"lofty_iconfont lofty-icon-house_02"}),e("div",{class:"no-listing-text"},"No Listing Found")],-1)])))}},xt="/feature-listing-gallery.DAH8vgqo.jpg",$t={class:"lofty-house-card-gallery"},Lt={class:"lofty-house-img-gallery"},pt=["href"],Ct=["src","alt"],Mt={class:"lofty-house-info-gallery"},Tt={class:"lofty-house-price"},Et={class:"lofty-house-base"},Nt={class:"lofty-feature-address"},It=["href"],Ot={key:0,class:"lofty-house-id"},jt={class:"lofty-mls-info-gallery"},Pt=["innerHTML"],zt={key:0,class:"lofty-mls-logo"},Bt=["src","alt"],Ut={__name:"houseGallery",props:{house:Object},setup(t){function n(){O(t.house.id,t.house.collectStatus,()=>{t.house.collectStatus=!t.house.collectStatus})}return(r,u)=>(l(),i("div",$t,[e("div",Lt,[e("a",{target:"_blank",href:t.house.detailUrl},[e("img",{src:t.house.previewPicture,loading:"lazy",alt:t.house.address},null,8,Ct),u[0]||(u[0]=e("div",{class:"img-mask"},null,-1))],8,pt),t.house.isProtected?(l(),b(I,{key:0,"show-lock":!s(f)},null,8,["show-lock"])):y("",!0)]),e("div",Mt,[e("p",Tt,h(t.house.price),1),e("p",Et,[(l(!0),i(_,null,S(t.house.basic,a=>(l(),i("span",{key:a.key},h(a.text),1))),128))]),e("p",Nt,[e("a",{target:"_blank",href:t.house.detailUrl},h(t.house.address),9,It)]),t.house.showMls?(l(),i("p",Ot," MLS# "+h(t.house.mlsListingId),1)):y("",!0),e("div",jt,[e("p",{class:"lofty-mls-text",innerHTML:t.house.provided},null,8,Pt),t.house.mlsLogo?(l(),i("div",zt,[e("img",{src:t.house.mlsLogo,alt:t.house.mlsOrg.name},null,8,Bt)])):y("",!0)])]),e("i",{onClick:n,style:{"font-size":"24px"},class:w(["lofty_iconfont",t.house.collectStatus?"lofty-icon-heart-fill":"lofty-icon-heart"])},null,2)]))}},Dt={key:0,class:"lofty-feature-listing-gallery"},Ft=["src"],Ht={class:"gallery-house-content"},At={class:"title-info"},Gt={class:"title"},Rt={key:1,class:"lofty-feature-listing-gallery-empty"},Vt={__name:"listingGallery",props:{id:String,config:Object},setup(t){const{list:n,showMore:r,moreText:u,moreClick:a}=x[t.id],m=LoftyIdxUtils.static_url(xt);return(g,c)=>s(n).length>0?(l(),i("div",Dt,[e("img",{class:"img-background",src:s(m),alt:""},null,8,Ft),c[3]||(c[3]=e("div",{class:"mask"},null,-1)),e("div",Ht,[e("div",At,[e("div",Gt,h(t.config.title),1),c[2]||(c[2]=e("div",{class:"line"},null,-1)),s(r)&&!s(f)?(l(),i("div",{key:0,class:"lofty-more-btn",onClick:c[0]||(c[0]=(...o)=>s(a)&&s(a)(...o))},h(s(u)),1)):y("",!0)]),(l(!0),i(_,null,S(s(n),o=>(l(),b(Ut,{class:"gallery-house-card",key:o.id,house:o},null,8,["house"]))),128))]),s(r)&&s(f)?(l(),i("div",{key:0,class:"lofty-more-btn",onClick:c[1]||(c[1]=(...o)=>s(a)&&s(a)(...o))},h(s(u)),1)):y("",!0)])):(l(),i("div",Rt,c[4]||(c[4]=[e("div",{class:"lofty-no-listing"},[e("i",{class:"lofty_iconfont lofty-icon-house_02"}),e("div",{class:"no-listing-text"},"No Listing Found")],-1)])))}};(async()=>(Q(),N.initState(()=>{var t,n;W(),(n=(t=N.mlsList)==null?void 0:t.forEach)==null||n.call(t,r=>J(r))}),jQuery(".lofty-feature-listing-page").ready(function(){document.querySelectorAll(".lofty-feature-listing-page").forEach(n=>{const r=n.getAttribute("id"),u=A(r);Y(u);const{id:a,$:m,getModuleData:g}=u,c=g().layout||"grid",o=g().layoutConfig;c==="gallery"?M(Vt,{id:a,config:o}).mount(m("#lofty-feature-listing-container")):c==="slider"?M(ot,{id:a,config:o}).mount(m("#lofty-feature-listing-container")):M(bt,{id:a,config:o}).mount(m("#lofty-feature-listing-container"))})})))();
  • lofty-idx/trunk/assets/listing-detail.js

    r3393952 r3393989  
    1 import{s as Ct,h as Q,g as St,i as T,u as st,_ as J}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{c as At}from"./module.CKjUdtPN.js";import{s as It,a as xt}from"./popup-mls.BZWi9Sqc.js";import{u as rt}from"./user.BF73KgDm.js";import{g as Lt,f as Tt}from"./house-format.Bvy9O_Yy.js";import{P as ot}from"./index.qpyE7W-K.js";import{s as Mt,c as nt}from"./index.C1-1XiZ9.js";import{v as Dt,c as Pt}from"./verify-email.B_du1TfR.js";import{k as K,r as k,l as Z,o as s,d as j,w as E,u as e,g as d,e as t,f as N,t as C,j as V,a as it,c as X,D as q,H as pt,F as D,h as H,I as Et,z as vt,q as P,x as B,y as M,p as lt,m as O,s as tt,v as gt,J as Vt,n as et,i as $t,K as ft,L as Bt}from"./vendor.DSMCY3-_.js";import{S as Ht,g as Rt,a as qt,b as Gt}from"./popup-trigger.Clg3jXpa.js";import{T as Nt}from"./tooltip.CnRrvdDV.js";import{_ as at}from"./index.BAT38o-R.js";import{f as z}from"./date-format.BrUodQAJ.js";import{I as Ut}from"./IconCopy.BP11gT8d.js";import{u as zt}from"./useCopy.CluLpl8Z.js";import{_ as Ot}from"./index.d_VP6W-1.js";import{M as mt}from"./icon.idSegMJN.js";import{n as jt}from"./number-format.CLdvQh6j.js";import{_ as Zt}from"./index.CzlBbxbG.js";import{a as Yt}from"./auto-login.DOr0ALS4.js";import"./useConfirm.BQXs6K30.js";import"./google.Cnb9DEy-.js";import"./outsideclick.Bw_hMuzW.js";import"./marker.Gizt9EmX.js";import"./feature-listing-slider.QgT9uoot.js";const Kt={key:0,class:"pop-protect-container"},Ft={class:"protect-footer"},Qt={key:1,class:"pop-protect-container"},Jt={class:"protect-content"},Xt={class:"lofty-link"},Wt={class:"protect-footer"},te=["disabled"],ee={__name:"protectPop",props:{isDetailPage:{type:Boolean,default:!1}},setup(u){const{loginStatus:f,vowStatus:o,user:a}=rt,v=K("popRef");function l(r){Mt(()=>{u.isDetailPage||window.location.reload()},"",r)}const i=k(!1);function m(){i.value||Dt(()=>{i.value=!0})}return Z(()=>{v.value.open()}),(r,c)=>(s(),j(ot,{class:"lofty-under-mask-pop",ref_key:"popRef",ref:v,popMaskClass:"lofty-filter-blur-mask",allowClose:!1},{default:E(()=>[e(f)?e(o)?V("",!0):(s(),d("div",Qt,[c[6]||(c[6]=t("div",{class:"title"}," Email Verification Required ",-1)),t("div",Jt,[c[4]||(c[4]=N(" Go Verify your email at ")),t("span",Xt,C(e(a).account),1),c[5]||(c[5]=t("div",{class:"lofty-tip"}," If you failed to receive the code, please refresh the page and click on the button again to request another one. ",-1))]),t("div",Wt,[t("div",{class:"footer-confirm",style:{"margin-left":"auto"},disabled:e(i),onClick:m},"Verify Your Email",8,te)])])):(s(),d("div",Kt,[c[2]||(c[2]=t("div",{class:"title"}," Free Account Required ",-1)),c[3]||(c[3]=t("div",{class:"protect-content"},[t("ul",null,[t("li",null,"Instant access to listing photos & details"),t("li",null,"Save listings and searches"),t("li",null,"Access details for this property")])],-1)),t("div",Ft,[t("div",{class:"footer-cancel",onClick:c[0]||(c[0]=y=>l("login"))},"Sign In"),t("div",{class:"footer-confirm",onClick:c[1]||(c[1]=y=>l("register"))},"Register")])]))]),_:1},512))}},G={};function oe(u){const f=u.getModuleData(),o={module:u,listingId:f.listingId,sold:f.sold,collectStatus:k(!1),previewPictures:it(f.previewPictures),info:k({}),location:it({lat:0,lng:0,type:"location"}),schoolGroups:k([]),schoolMarkers:X(()=>{const v=[];return o.schoolGroups.value.forEach(l=>{l.data.forEach(i=>{v.push({id:i.id,hjId:i.hjId,key:`${i.latitude}-${i.longitude}`,lat:+i.latitude,lng:+i.longitude,name:i.name,icon:"lofty-icon-school2",group:l.label})})}),v}),tourType:k("tour_info"),dayList:it([]),dayIndex:k(0)},a={async getDetailInfo(){var _,g,A;if(!o.listingId){if(Ct()){console.error("listingId is not found",f);return}return}const v={data:{listingId:o.listingId,isSold:o.sold},headers:{trackingpagekey:o.sold?"sold_listing_detail":"listing_detail"}},{data:l}=await Q.get("/listing/detail",v);o.collectStatus.value=l.collectStatus,o.info.value=l.info,o.location.name=l.info.streetAddress,o.location.key=`house-${l.info.longitude}-${l.info.latitude}`,o.location.lng=l.info.longitude,o.location.lat=l.info.latitude;const i=(g=(_=rt.mlsList).find)==null?void 0:g.call(_,w=>w.id===l.info.mlsOrg.id),r=o.module.$(".lofty-detail-info").querySelector(".lofty-mls-info");if(i&&(It(i),Ht.includes(i.id))){const w=await Rt([o.listingId],o.sold);if(w&&Object.keys(w).length){const x=w[o.listingId]||!1;x||(o.info.value={...o.info.value,mlsOrg:{...(A=o.info.value)==null?void 0:A.mlsOrg,template:qt(o.info.value,x,"template")}},r&&(r.textContent=o.info.value.mlsOrg.template))}}r.style.display="block";const c=St(),{isPopup:y}=c;if(Lt(l.info)&&y!=="0"){const w=document.createElement("div");document.body.appendChild(w),q(ee,{isDetailPage:!0}).mount(w)}},async getNearBySchool(){const v={page:1,pageSize:10,status:o.sold?"sold":"active",miles:5},{data:l}=await Q.get(`/search/listing/detailNearBy/${o.listingId}`,{data:v});if(l&&l.length>0){const i=l.find(m=>m.type==="school");i!=null&&i.groups&&(o.schoolGroups.value=i.groups)}},getDayList(){const v=Date.now(),l=24*60*60*1e3;for(let i=0;i<30;i++){const m=new Date(v+i*l);m.setHours(0,0,0,0);const r=m.getDate();o.dayList.push({month:m.toLocaleString("en-US",{month:"short"}),week:m.toLocaleString("en-US",{weekday:"short"}),dayNum:r,date:m})}}};return a.getDayList(),a.getNearBySchool(),{...o,...a,onLoad:a.getDetailInfo()}}function se(u){G[u.id]=oe(u)}const ne={key:0,class:"mobile-previewImg-gallery-content"},ie=["src"],le=["initialSlide"],ae=["src"],re={__name:"previewImgPop",props:{imgList:{type:Array,default:()=>[]},previewImgIndex:{type:Number,default:0}},emits:["close"],setup(u,{emit:f}){const o=k(null),a=f;function v(){a("close"),o.value.$el.parentNode.remove()}function l(){const m=document.querySelector(".swiper-previewImg-container");Object.assign(m,{navigation:{prevEl:".previewImg-prev-button",nextEl:".previewImg-next-button"},injectStyles:[`:host svg {
     1import{s as Ct,h as Q,g as St,i as T,u as st,_ as J}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{c as At}from"./module.CKjUdtPN.js";import{s as It,a as xt}from"./popup-mls.BZWi9Sqc.js";import{u as rt}from"./user.BF73KgDm.js";import{g as Lt,f as Tt}from"./house-format.CcB19moP.js";import{P as ot}from"./index.qpyE7W-K.js";import{s as Mt,c as nt}from"./index.C1-1XiZ9.js";import{v as Dt,c as Pt}from"./verify-email.B_du1TfR.js";import{k as K,r as w,l as Z,o as s,d as j,w as E,u as e,g as c,e as t,f as N,t as C,j as V,a as it,c as X,D as q,H as pt,F as D,h as H,I as Et,z as vt,q as P,x as B,y as M,p as lt,m as z,s as tt,v as gt,J as Vt,n as et,i as $t,K as ft,L as Bt}from"./vendor.DSMCY3-_.js";import{b as Ht,S as Rt,g as qt,a as Gt,d as Nt}from"./popup-trigger.C9dAVRHW.js";import{T as Ot}from"./tooltip.CnRrvdDV.js";import{_ as at}from"./index.BAT38o-R.js";import{f as U}from"./date-format.BrUodQAJ.js";import{I as Ut}from"./IconCopy.BP11gT8d.js";import{u as zt}from"./useCopy.CluLpl8Z.js";import{_ as jt}from"./index.d_VP6W-1.js";import{M as mt}from"./icon.idSegMJN.js";import{n as Zt}from"./number-format.CLdvQh6j.js";import{_ as Yt}from"./index.CzlBbxbG.js";import{a as Kt}from"./auto-login.DOr0ALS4.js";import"./useConfirm.BQXs6K30.js";import"./google.Cnb9DEy-.js";import"./outsideclick.Bw_hMuzW.js";import"./marker.Gizt9EmX.js";import"./feature-listing-slider.QgT9uoot.js";const Ft={key:0,class:"pop-protect-container"},Qt={class:"protect-footer"},Jt={key:1,class:"pop-protect-container"},Xt={class:"protect-content"},Wt={class:"lofty-link"},te={class:"protect-footer"},ee=["disabled"],oe={__name:"protectPop",props:{isDetailPage:{type:Boolean,default:!1}},setup(f){const{loginStatus:m,vowStatus:o,user:a}=rt,v=K("popRef");function i(u){Mt(()=>{f.isDetailPage||window.location.reload()},"",u)}const l=w(!1);function d(){l.value||Dt(()=>{l.value=!0})}return Z(()=>{v.value.open()}),(u,r)=>(s(),j(ot,{class:"lofty-under-mask-pop",ref_key:"popRef",ref:v,popMaskClass:"lofty-filter-blur-mask",allowClose:!1},{default:E(()=>[e(m)?e(o)?V("",!0):(s(),c("div",Jt,[r[6]||(r[6]=t("div",{class:"title"}," Email Verification Required ",-1)),t("div",Xt,[r[4]||(r[4]=N(" Go Verify your email at ")),t("span",Wt,C(e(a).account),1),r[5]||(r[5]=t("div",{class:"lofty-tip"}," If you failed to receive the code, please refresh the page and click on the button again to request another one. ",-1))]),t("div",te,[t("div",{class:"footer-confirm",style:{"margin-left":"auto"},disabled:e(l),onClick:d},"Verify Your Email",8,ee)])])):(s(),c("div",Ft,[r[2]||(r[2]=t("div",{class:"title"}," Free Account Required ",-1)),r[3]||(r[3]=t("div",{class:"protect-content"},[t("ul",null,[t("li",null,"Instant access to listing photos & details"),t("li",null,"Save listings and searches"),t("li",null,"Access details for this property")])],-1)),t("div",Qt,[t("div",{class:"footer-cancel",onClick:r[0]||(r[0]=h=>i("login"))},"Sign In"),t("div",{class:"footer-confirm",onClick:r[1]||(r[1]=h=>i("register"))},"Register")])]))]),_:1},512))}},G={};function se(f){const m=f.getModuleData(),o={module:f,listingId:m.listingId,sold:m.sold,collectStatus:w(!1),previewPictures:it(m.previewPictures),info:w({}),location:it({lat:0,lng:0,type:"location"}),schoolGroups:w([]),schoolMarkers:X(()=>{const v=[];return o.schoolGroups.value.forEach(i=>{i.data.forEach(l=>{v.push({id:l.id,hjId:l.hjId,key:`${l.latitude}-${l.longitude}`,lat:+l.latitude,lng:+l.longitude,name:l.name,icon:"lofty-icon-school2",group:i.label})})}),v}),tourType:w("tour_info"),dayList:it([]),dayIndex:w(0)},a={async getDetailInfo(){var h,k,g,I,b;if(!o.listingId){if(Ct()){console.error("listingId is not found",m);return}return}const v={data:{listingId:o.listingId,isSold:o.sold},headers:{trackingpagekey:o.sold?"sold_listing_detail":"listing_detail"}},{data:i}=await Q.get("/listing/detail",v);o.collectStatus.value=i.collectStatus,o.info.value=i.info,o.location.name=i.info.streetAddress,o.location.key=`house-${i.info.longitude}-${i.info.latitude}`,o.location.lng=i.info.longitude,o.location.lat=i.info.latitude,(k=(h=i.info)==null?void 0:h.mlsOrg)!=null&&k.id&&Ht(i.info.mlsOrg.id);const l=(I=(g=rt.mlsList).find)==null?void 0:I.call(g,S=>S.id===i.info.mlsOrg.id),d=document.querySelector(".lofty-mls-info");if(l&&(It(l),Rt.includes(l.id))){const S=await qt([o.listingId],o.sold);if(S&&Object.keys(S).length){const _=S[o.listingId]||!1;_||(o.info.value={...o.info.value,mlsOrg:{...(b=o.info.value)==null?void 0:b.mlsOrg,template:Gt(o.info.value,_,"template")}},d&&(d.innerHTML=o.info.value.mlsOrg.template))}}d&&(d.style.display="block");const u=St(),{isPopup:r}=u;if(Lt(i.info)&&r!=="0"){const S=document.createElement("div");document.body.appendChild(S),q(oe,{isDetailPage:!0}).mount(S)}},async getNearBySchool(){const v={page:1,pageSize:10,status:o.sold?"sold":"active",miles:5},{data:i}=await Q.get(`/search/listing/detailNearBy/${o.listingId}`,{data:v});if(i&&i.length>0){const l=i.find(d=>d.type==="school");l!=null&&l.groups&&(o.schoolGroups.value=l.groups)}},getDayList(){const v=Date.now(),i=24*60*60*1e3;for(let l=0;l<30;l++){const d=new Date(v+l*i);d.setHours(0,0,0,0);const u=d.getDate();o.dayList.push({month:d.toLocaleString("en-US",{month:"short"}),week:d.toLocaleString("en-US",{weekday:"short"}),dayNum:u,date:d})}}};return a.getDayList(),a.getNearBySchool(),{...o,...a,onLoad:a.getDetailInfo()}}function ne(f){G[f.id]=se(f)}const ie={key:0,class:"mobile-previewImg-gallery-content"},le=["src"],ae=["initialSlide"],re=["src"],ce={__name:"previewImgPop",props:{imgList:{type:Array,default:()=>[]},previewImgIndex:{type:Number,default:0}},emits:["close"],setup(f,{emit:m}){const o=w(null),a=m;function v(){a("close"),o.value.$el.parentNode.remove()}function i(){const d=document.querySelector(".swiper-previewImg-container");Object.assign(d,{navigation:{prevEl:".previewImg-prev-button",nextEl:".previewImg-next-button"},injectStyles:[`:host svg {
    22        width: ${T?"6px":"8px"};
    33      }`,`:host .swiper-button-disabled {
    44        pointer-events: auto;
    5       }`]}),m.initialize()}Z(()=>{o.value.open(),T?pt(()=>{i()}):l()});function i(){const m=document.querySelectorAll(".mobile-previewImg-gallery-img")[u.previewImgIndex];m&&m.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})}return(m,r)=>(s(),j(ot,{ref_key:"popRef",ref:o,customClass:"listing-detail-preview-img","on-close":v,allowClose:!0,outClose:!0},{default:E(()=>[e(T)?(s(),d("div",ne,[(s(!0),d(D,null,H(u.imgList,(c,y)=>(s(),d("img",{class:"mobile-previewImg-gallery-img",src:c,alt:"",key:c+"_"+y},null,8,ie))),128))])):(s(),d(D,{key:1},[t("swiper-container",{class:"swiper-previewImg-container",init:!1,centeredSlides:!0,initialSlide:u.previewImgIndex},[(s(!0),d(D,null,H(u.imgList,(c,y)=>(s(),d("swiper-slide",{class:"previewImg-slide",key:c+"_"+y},[t("img",{src:c,alt:""},null,8,ae)]))),128))],8,le),u.imgList.length>1?(s(),d(D,{key:0},[r[0]||(r[0]=t("div",{class:"previewImg-prev-button"},[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_left"})],-1)),r[1]||(r[1]=t("div",{class:"previewImg-next-button"},[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_right"})],-1))],64)):V("",!0)],64))]),_:1},512))}},ce=["slides-per-view","space-between","centeredSlides"],de=["src","onClick"],ue={class:"listingDetail-prev-button"},fe={class:"listingDetail-next-button"},me={__name:"swiperPictures",props:{id:String},setup(u){Et();const f=u;let{previewPictures:o,module:a}=G[f.id];const v=k(3),l=X(()=>T?o.length>1:o.length>3);Z(()=>{i()});function i(){const c=a.$(".swiper-container");Object.assign(c,{navigation:{prevEl:".listingDetail-prev-button",nextEl:".listingDetail-next-button"},injectStyles:[`:host svg {
     5      }`]}),d.initialize()}Z(()=>{o.value.open(),T?pt(()=>{l()}):i()});function l(){const d=document.querySelectorAll(".mobile-previewImg-gallery-img")[f.previewImgIndex];d&&d.scrollIntoView({behavior:"smooth",block:"start",inline:"start"})}return(d,u)=>(s(),j(ot,{ref_key:"popRef",ref:o,customClass:"listing-detail-preview-img","on-close":v,allowClose:!0,outClose:!0},{default:E(()=>[e(T)?(s(),c("div",ie,[(s(!0),c(D,null,H(f.imgList,(r,h)=>(s(),c("img",{class:"mobile-previewImg-gallery-img",src:r,alt:"",key:r+"_"+h},null,8,le))),128))])):(s(),c(D,{key:1},[t("swiper-container",{class:"swiper-previewImg-container",init:!1,centeredSlides:!0,initialSlide:f.previewImgIndex},[(s(!0),c(D,null,H(f.imgList,(r,h)=>(s(),c("swiper-slide",{class:"previewImg-slide",key:r+"_"+h},[t("img",{src:r,alt:""},null,8,re)]))),128))],8,ae),f.imgList.length>1?(s(),c(D,{key:0},[u[0]||(u[0]=t("div",{class:"previewImg-prev-button"},[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_left"})],-1)),u[1]||(u[1]=t("div",{class:"previewImg-next-button"},[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_right"})],-1))],64)):V("",!0)],64))]),_:1},512))}},de=["slides-per-view","space-between","centeredSlides"],ue=["src","onClick"],fe={class:"listingDetail-prev-button"},me={class:"listingDetail-next-button"},pe={__name:"swiperPictures",props:{id:String},setup(f){Et();const m=f;let{previewPictures:o,module:a}=G[m.id];const v=w(3),i=X(()=>T?o.length>1:o.length>3);Z(()=>{l()});function l(){const r=a.$(".swiper-container");Object.assign(r,{navigation:{prevEl:".listingDetail-prev-button",nextEl:".listingDetail-next-button"},injectStyles:[`:host svg {
    66        width: ${T?"6px":"12px"};
    77      }`,`:host .swiper-button-disabled {
    88        pointer-events: auto;
    9       }`]}),o.length<=3&&(v.value=o.length>1?o.length:2),v.value=T?1:v.value,c.initialize()}const m=k(!0);function r(c){const y=document.createElement("div");document.body.appendChild(y),q(re,{imgList:o,previewImgIndex:c||0,onClose:()=>{m.value=!0}}).mount(y),m.value=!1}return(c,y)=>(s(),d(D,null,[t("swiper-container",{init:"false",class:"swiper-container","slides-per-view":e(v),"space-between":e(T)?0:2,centeredSlides:e(o).length==1},[(s(!0),d(D,null,H(e(o),(_,g)=>(s(),d("swiper-slide",{key:g},[t("img",{src:_,alt:"",onClick:vt(A=>r(g),["stop"])},null,8,de)]))),128))],8,ce),e(l)?(s(),d(D,{key:0},[P(t("div",ue,y[0]||(y[0]=[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_left"},null,-1)]),512),[[B,e(m)]]),P(t("div",fe,y[1]||(y[1]=[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_right"},null,-1)]),512),[[B,e(m)]])],64)):V("",!0)],64))}},pe={__name:"showMoreButton",props:{id:String},setup(u){const f=u,{module:o}=G[f.id],a=k(!1),v=X(()=>a.value?"Less":"More"),l=o.$(".lofty-other-fields");function i(){a.value=!a.value,l.style.display=a.value?"block":"none"}return(m,r)=>(s(),d("div",{class:"showMoreButton",onClick:i},[t("span",null,"Read "+C(e(v)),1),t("i",{class:M(["lofty_iconfont lofty-icon-arrow_01_right",{rotate:e(a)}])},null,2)]))}},ve={class:"lofty-swiper-calendar-view"},ge=["slides-per-view","slides-per-group","initialSlide"],he=["onClick"],ye={class:"day-num"},ht={__name:"swiperCalendar",props:{id:String,slidesPerView:{type:Number,default:3}},setup(u){const{dayList:f,dayIndex:o}=G[u.id],a=K("swiper"),v=K("prev"),l=K("next");function i(){const r={navigation:{prevEl:v.value,nextEl:l.value}};Object.assign(a.value,r),a.value.initialize()}function m(r){o.value=r}return Z(()=>{i()}),(r,c)=>(s(),d("div",ve,[t("swiper-container",{ref_key:"swiper",ref:a,class:"swiper-calendar-container",init:!1,"space-between":10,"slides-per-view":u.slidesPerView,"slides-per-group":u.slidesPerView,initialSlide:e(o)},[(s(!0),d(D,null,H(e(f),(y,_)=>(s(),d("swiper-slide",{class:M(["day-slide",{"day-active":e(o)===_}]),onClick:g=>m(_)},[t("div",null,C(y.week),1),t("div",ye,C(y.dayNum),1),t("div",null,C(y.month),1)],10,he))),256))],8,ge),t("div",{class:"day-prev-button",ref_key:"prev",ref:v},c[0]||(c[0]=[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_left"},null,-1)]),512),t("div",{class:"day-next-button",ref_key:"next",ref:l},c[1]||(c[1]=[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_right"},null,-1)]),512)]))}},we={class:"lofty-schedule-pop is-scheduled"},ke={class:"title"},_e={class:"scheduled-date"},be={class:"scheduled-time"},Ce={class:"lofty-schedule-pop"},Se={class:"lofty-tour-type-tab"},Ae={class:"lofty_iconfont lofty-icon-arrow_01_down"},Ie={class:"lofty_iconfont lofty-icon-arrow_01_up"},xe={class:"lofty-time-list"},Le=["onClick"],Te={class:"lofty_iconfont lofty-icon-arrow_01_down"},Me={class:"lofty_iconfont lofty-icon-arrow_01_up"},De={class:"lofty-time-list"},Pe=["onClick"],Ee={__name:"schedulePop",props:{id:String,formatDate:Function,isScheduled:Boolean},emits:["submit"],setup(u,{emit:f}){const o=K("popRef"),{tourType:a,dayIndex:v,dayList:l,listingId:i}=G[u.id],[m,r,c,y]=[k(0),k(0),k([]),k([])],_=T?3:5,g=X(()=>({startTime:m.value,endTime:r.value,listingId:i})),A=f;function w(){if(v.value===0)m.value=h();else{const n=l[v.value].date;m.value=+n}c.value=b(m.value)}function x(){const[n,p]=[new Date(m.value),new Date(m.value)];n.setMinutes(n.getMinutes()+15),p.setMinutes(p.getMinutes()+30),r.value=+n,y.value=[+n],L(n)||(y.value.push(+p),r.value=+p)}lt(v,w),lt(m,x);function b(n){const p=[],S=new Date(n).setHours(23,59,59,999);let $=new Date(n);for(;$<=S;)p.push(+$),$.setMinutes($.getMinutes()+15);return p}Z(()=>{w(),o.value.open()});function h(){const n=new Date;return n.setMinutes(Math.ceil(n.getMinutes()/15)*15),n.setSeconds(0),n.setMilliseconds(0),n.getMinutes()===0&&(n.setHours(n.getHours()),n.setMinutes(0)),+n}function L(n){return n.getHours()===0&&n.getMinutes()===0&&n.getSeconds()===0&&n.getMilliseconds()===0}const R=k(!1);function U(){A("submit",g.value),T?R.value=!0:F()}function F(){o.value.$el.parentNode.remove(),document.body.classList.remove("lofty-overflow-hidden")}const Y=k(!1),I=k(!1);return(n,p)=>(s(),j(ot,{ref_key:"popRef",ref:o,allowClose:!1},{default:E(()=>[P(t("div",we,[t("div",ke,[p[5]||(p[5]=N("Your Request was Received!")),t("i",{class:"lofty_iconfont lofty-icon-close",onClick:F}),p[6]||(p[6]=t("div",{class:"scheduled-desc"},"We'll be in touch to confirm our meeting",-1)),t("div",_e,C(u.formatDate(e(g).startTime)),1),t("div",be,C(e(z)("hh:mmp",e(g).startTime))+" - "+C(e(z)("hh:mmp",e(g).endTime)),1),t("div",{class:"lofty-btn lofty-schedule-tour",onClick:p[0]||(p[0]=S=>R.value=!1)},"Schedule Again")])],512),[[B,e(R)&&e(T)]]),P(t("div",Ce,[t("div",{class:"title"},[p[7]||(p[7]=N("REQUEST A TOUR")),t("i",{class:"lofty_iconfont lofty-icon-close",onClick:F})]),t("div",Se,[t("div",{class:M(["tab-type",{active:e(a)==="tour_info"}]),onClick:p[1]||(p[1]=S=>a.value="tour_info")},"In-Person",2),t("div",{class:M(["tab-type",{active:e(a)==="virtual_tour"}]),onClick:p[2]||(p[2]=S=>a.value="virtual_tour")},"Virtual Tour",2)]),O(ht,{class:"lofty-swiper-calendar",id:u.id,"slides-per-view":e(_)},null,8,["id","slides-per-view"]),p[10]||(p[10]=t("div",{class:"lofty-select-time"},"Start Time",-1)),O(at,{"hide-arrow":"",top:40,"menu-style":{padding:0},"mobile-fix":"",onToggle:p[3]||(p[3]=S=>Y.value=S)},{menu:E(()=>[t("ul",xe,[(s(!0),d(D,null,H(e(c),S=>(s(),d("li",{class:M([{active:S===e(m)},"time-item"]),onClick:$=>m.value=S},C(e(z)("hh:mm p",S)),11,Le))),256))])]),default:E(()=>[t("div",{class:M(["lofty-dropdown-time",{open:e(Y)}])},[p[8]||(p[8]=t("i",{class:"lofty_iconfont lofty-icon-time"},null,-1)),t("span",null,C(e(z)("hh:mm p",e(m))),1),P(t("i",Ae,null,512),[[B,!e(Y)]]),P(t("i",Ie,null,512),[[B,e(Y)]])],2)]),_:1}),p[11]||(p[11]=t("div",{class:"lofty-select-time"},"End Time",-1)),O(at,{"hide-arrow":"",top:40,"menu-style":{padding:0},"mobile-fix":"",onToggle:p[4]||(p[4]=S=>I.value=S)},{menu:E(()=>[t("ul",De,[(s(!0),d(D,null,H(e(y),S=>(s(),d("li",{class:M([{active:S===e(r)},"time-item"]),onClick:$=>r.value=S},C(e(z)("hh:mm p",S)),11,Pe))),256))])]),default:E(()=>[t("div",{class:M(["lofty-dropdown-time",{open:e(I)}])},[p[9]||(p[9]=t("i",{class:"lofty_iconfont lofty-icon-time"},null,-1)),t("span",null,C(e(z)("hh:mm p",e(r))),1),P(t("i",Te,null,512),[[B,!e(I)]]),P(t("i",Me,null,512),[[B,e(I)]])],2)]),_:1}),t("div",{class:"lofty-btn lofty-schedule-tour",onClick:U},"Schedule a Tour")],512),[[B,!u.isScheduled&&!e(R)]])]),_:1},512))}},Ve={class:"lofty-message-pop get-touch"},$e={key:0,class:"is-leaved"},Be={key:1},He={__name:"messagePop",props:{message:String},emits:["submit"],setup(u,{emit:f}){const o=f,a=K("popRef"),v=K("textarea"),l=k(u.message),i=k(!1);function m(){i.value=!0,o("submit",l.value)}Z(()=>{a.value.open(),pt(()=>{v.value.focus()})});function r(){a.value.$el.parentNode.remove(),document.body.classList.remove("lofty-overflow-hidden")}return(c,y)=>(s(),j(ot,{ref_key:"popRef",ref:a,allowClose:!1},{default:E(()=>[t("div",Ve,[t("div",{class:"title"},[y[1]||(y[1]=N("GET IN TOUCH")),t("i",{class:"lofty_iconfont lofty-icon-close",onClick:r})]),e(i)?(s(),d("div",$e,y[2]||(y[2]=[t("div",{class:"lofty_iconfont lofty-icon-success"},null,-1),t("div",null,"Thanks!I'll get back to you shortly.",-1)]))):(s(),d("div",Be,[P(t("textarea",{ref_key:"textarea",ref:v,"onUpdate:modelValue":y[0]||(y[0]=_=>tt(l)?l.value=_:null),class:"message-textarea",placeholder:"type something"},null,512),[[gt,e(l)]]),t("div",{class:"get-touch-submit-btn",onClick:m},"Submit")]))])]),_:1},512))}},Re={key:0,class:"lofty-mobile-fix-bottom lofty-request-tour-mobile"},qe={key:0,class:"lofty-request-tour lofty-right-container"},Ge={class:"title"},Ne={class:"lofty-tour-type-tab"},Ue={key:1,class:"is-scheduled lofty-right-container"},ze={class:"scheduled-date"},Oe={class:"scheduled-time"},je={class:"get-touch lofty-right-container"},Ze={key:0,class:"is-leaved"},Ye={key:1},Ke={__name:"requestTour",props:{id:String},setup(u){const{tourType:f,listingId:o,sold:a}=G[u.id],v=k(!1),l=k({});function i(b=Date.now()){return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric"}).format(new Date(b))}const m=st.getTimeZone();function r(b=!1){b&&(v.value=!1),nt(()=>{const h=document.createElement("div");document.body.appendChild(h),q(Ee,{id:u.id,animation:T?"bottomToUp":"fadeIn",formatDate:i,isScheduled:v.value,onSubmit:async L=>{l.value=L;const R={listingId:o,timeZone:m,appointmentStartTime:L.startTime,appointmentEndTime:L.endTime,recordFlag:f.value},U=await Q.post("/lead/operate/visitorInfo",{data:R});U.status.code===0?v.value=!0:st.toast(U.status.message,3e3)}}).mount(h)})}function c(){nt(()=>{const b=document.createElement("div");document.body.appendChild(b),q(He,{animation:"bottomToUp",message:_.value,onSubmit:h=>{_.value=h,A()}}).mount(b)})}function y(b){b.target.style.height="200px"}const _=k(a?"I like this property. Do you have any recommendations for similar ones?":"I'm interested in this listing"),g=k(!1);function A(){_.value&&nt(async()=>{const b={question:_.value,listingId:o,isSold:a},h=await Q.post("/lead/operate/leaveMsg",{data:b});h.status.code===0?g.value=!0:st.toast(h.status.message,3e3)})}const w=k("static"),x=new IntersectionObserver((b,h)=>{b.forEach(L=>{L.isIntersecting?w.value="static":L.boundingClientRect.top<0&&(w.value="sticky")})});return Z(()=>{T||x.observe(document.querySelector(".lofty-detail-address"))}),Vt(()=>{T||x.unobserve(document.querySelector(".lofty-detail-address"))}),(b,h)=>e(T)?(s(),d("div",Re,[t("div",{class:"get-touch-submit-btn",onClick:c},"GET IN TOUCH"),e(a)?V("",!0):(s(),d("div",{key:0,class:"lofty-btn schedule-tour-lofty",onClick:r},"Schedule a Tour"))])):(s(),d("div",{key:1,style:et({position:e(w)}),class:"lofty-right-panel"},[e(a)?V("",!0):(s(),d(D,{key:0},[e(v)?(s(),d("div",Ue,[h[7]||(h[7]=t("div",{class:"title"},"Your Request was Received!",-1)),h[8]||(h[8]=t("div",{class:"scheduled-desc"},"We'll be in touch to confirm our meeting",-1)),t("div",ze,C(i(e(l).startTime)),1),t("div",Oe,C(e(z)("hh:mmp",e(l).startTime))+" - "+C(e(z)("hh:mmp",e(l).endTime)),1),t("div",{class:"lofty-btn schedule-tour-lofty",onClick:h[2]||(h[2]=L=>r(!0))},"Schedule Again")])):(s(),d("div",qe,[t("div",Ge,[h[6]||(h[6]=N(" REQUEST A TOUR ")),O(Nt,null,{trigger:E(()=>h[4]||(h[4]=[t("span",{class:"lofty_iconfont lofty-icon-help"},null,-1)])),content:E(()=>h[5]||(h[5]=[t("span",{class:"help-tip"},' If you would like to see this home without being there in person, select the "Virtual Tour" option and your agent will contact you to discuss available opportunities. ',-1)])),_:1})]),t("div",Ne,[t("div",{class:M(["tab-type",{active:e(f)==="tour_info"}]),onClick:h[0]||(h[0]=L=>f.value="tour_info")},"In-Person",2),t("div",{class:M(["tab-type",{active:e(f)==="virtual_tour"}]),onClick:h[1]||(h[1]=L=>f.value="virtual_tour")},"Virtual Tour",2)]),O(ht,{class:"lofty-swiper-calendar",id:u.id},null,8,["id"]),t("div",{class:"lofty-btn schedule-tour-lofty",onClick:r},"Schedule a Tour")]))],64)),t("div",je,[h[10]||(h[10]=t("div",{class:"title"},"GET IN TOUCH",-1)),e(g)?(s(),d("div",Ze,h[9]||(h[9]=[t("div",{class:"lofty_iconfont lofty-icon-success"},null,-1),t("div",null,"Thanks!I'll get back to you shortly.",-1)]))):(s(),d("div",Ye,[P(t("textarea",{"onUpdate:modelValue":h[3]||(h[3]=L=>tt(_)?_.value=L:null),class:"message-textarea",style:et({height:e(a)?"70px":"40px"}),onFocus:y},null,36),[[gt,e(_)]]),t("div",{class:M(["get-touch-submit-btn",{disabled:!e(_)}]),onClick:A},"Submit",2)]))])],4))}},Fe={},Qe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Je(u,f){return s(),d("svg",Qe,f[0]||(f[0]=[t("circle",{cx:"10",cy:"10",r:"10",fill:"black"},null,-1),t("path",{d:"M11.0148 9.16585L14.9857 4.54999H14.0447L10.5968 8.55787L7.84294 4.54999H4.66669L8.83106 10.6106L4.66669 15.4511H5.60772L9.24883 11.2186L12.1571 15.4511H15.3334L11.0146 9.16585H11.0148ZM9.72593 10.664L9.30399 10.0605L5.94678 5.25838H7.39215L10.1015 9.13385L10.5234 9.73736L14.0452 14.7749H12.5998L9.72593 10.6642V10.664Z",fill:"white"},null,-1)]))}const Xe=J(Fe,[["render",Je]]),We={},to={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function eo(u,f){return s(),d("svg",to,f[0]||(f[0]=[t("path",{d:"M20 10C20 4.47715 15.5229 0 10 0C4.47715 0 0 4.47715 0 10C0 14.9913 3.65685 19.1283 8.4375 19.8785V12.8906H5.89844V10H8.4375V7.79688C8.4375 5.29062 9.93043 3.90626 12.2146 3.90626C13.3087 3.90626 14.4531 4.10156 14.4531 4.10156V6.5625H13.1922C11.9499 6.5625 11.5625 7.33335 11.5625 8.12417V10H14.3359L13.8926 12.8906H11.5625V19.8785C16.3431 19.1283 20 14.9913 20 10Z",fill:"#1877F2"},null,-1),t("path",{d:"M13.8926 12.8906L14.3359 10H11.5625V8.12415C11.5625 7.33334 11.9499 6.5625 13.1921 6.5625H14.4531V4.10156C14.4531 4.10156 13.3087 3.90625 12.2146 3.90625C9.93042 3.90625 8.4375 5.29062 8.4375 7.79688V10H5.89844V12.8906H8.4375V19.8785C8.95439 19.9595 9.4768 20.0001 10 20C10.5316 20 11.0534 19.9584 11.5625 19.8785V12.8906H13.8926Z",fill:"white"},null,-1)]))}const oo=J(We,[["render",eo]]),so={},no={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function io(u,f){return s(),d("svg",no,f[0]||(f[0]=[t("rect",{width:"20",height:"20",fill:"url(#pattern0_1988_3736)"},null,-1),t("defs",null,[t("pattern",{id:"pattern0_1988_3736",patternContentUnits:"objectBoundingBox",width:"1",height:"1"},[t("use",{"xlink:href":"#image0_1988_3736",transform:"scale(0.015625)"})]),t("image",{id:"image0_1988_3736",width:"64",height:"64","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABGUUKwAAANXUlEQVR4AdVbCXgURRZ+3XPnnMkYREQIIYsiiAoIKxA1XHIIGL8FORQFT2RBDjXggbgui8ii8O2niLpE8MBlEVAgKEciAgZQLgFdEELCKgghyRw55u6t19LjTE9VT/dkXHfr++brrvdevTq6jvf+V8PBr5zcC17tGKxzThCcjm6Cw5EbrL6YLbjcJqGpSSc0NHJYPZeaInAWS5DLSPfqsi+r5qzWCi7Tul9nyyxOL5r+3a/ZRLEByaxAEATO9af594TO/PC4/+SpTsHTVWYQhMSq4DjQtWvrMeS1P8a3ab0kY87s9ziOS1AZvQlJG4CGBX9r5fvxzDL/wcMDgpVVJnp1zaPqctp6DTdev9V4ZZtHUoumnG2etp9LN3sAHK++niscP17s27k7P+RyN1ufmk7xGemC8ZY+X3AdOky0Tn+sQk0ZlkzCDRZWr9Y59x58y7u19P5QnSNhPayGqaHzNmvINKDfO5k9b3iYGzUqqKaMXCahhrvnLSjw7ixf7z/2XYZc4W+RN3Tq6DLd2ntE+uwnP9dav+YBcBY9t6jp403ThYYGzWW1Nk6LPJeWJljuvOPVzPkvzNRUTq0wTnnHp2Xlnq2lN6kt81vImW/vt9868LaeapeEqq8orFyZWluy/ahv956c36JTWus09bm50ja4b2du/PiGeGXjDgB2vmbt5gr//gMt4in7X+IbunW9YL9rcG68QeCVGo3TvnZz6bH/t85jn7DNdZtLj2IflPqoV2I6tny+17ervK2STKI8LsUCXEoKcGZiKLrdEHK6ElXFLOfdVZ7jSE3ZSwS6s4SYS8A5a84rje//YzqroBY6n2UDY34vMN2aD/qOHUDf5irg0tOjVAg+H4SqayB04QL4DhwC345d4NvzFQgeT5RcIhnLuDGLrC/NfYJWljoA7vkL+zasWLWtOUcdOZYgZfxYMA8eAIbrOgHwiquN1jYQvF7w7fwS6l9bRqb0IaqMGiIekanjR/el2QkxA4Brpmb5B7WJGjk4tVPuuwdSJz0IvDVTTftUyfh2kYFY/Dr49n2tSl4uhMaSfeLYLPnxGPNZnHsPvZlo500D+0H27m2QPntmUjuPnTH26QVZa96DjLlPA+gVty5538U89sm57/AyOTNqBqBj4y1ecVKzbU/c1rSpkyBtxhTi3EeplNeXlLz/wGFwPDYNgmfPadKHvoNxwuj2tunTK6WCUUMpnDixXGvnOZMJMpcsBPOQgZJOxWfgu+MQqDoDoYtkw6u+KH5N3p4FBAgBQ7cbATfMeMnQ9Xqwb1wDNXeOhuCZf8cTD/NJ33g4XllMCAUSMfy50J+vX7niB60ubebil8Fy13BJH/XpP3wEmlavBe+2Mgie+4kqIxLJRmnofC2Yhw2BlHvHkGPSwpYlnEBFJdQWjgbSMUW5SCafmUE2xPtbpT01WWxIeA9AMENr51MfmqDY+SD50o5J06Bm2EhofHeVcuexlaEQ+L85Cu55L0N1737QWPwuKKFJ+twcsC1/A3AWqk3E3uD8P5x+U5IXBwBhLERyJKKap/HmHpD+NPVoFYt7Sj6DiwOGg2fTp2rUxciEamrB9fw8cDw8BYT6+hi+RDB0uwFSH31Ayqp6+g99MxD7jMLiACCGpwnGIhtdxvNkN9bpqBU2LH1L/PLJMGI8n22D2rvvUzSIUic9BLqWl1PbQiMSnNLkenHBOOSJA4AAJk2QRTMPHgj6a6+hsj3rN4J7/iLFqUstqED0HzkGzhmzmRK4V6TNmsHk0xihqjPTkC4OAKK3NCEqjWxUaU9MpbICJ06Cs+hZKq+5RM/GzeDZUMJUY7lzGPB2O5MvZ/hPVYh95kXcHqFrlclIjip9XnuqNK5ZoYluu+NRlzZzKmR9+A7YVr4l2gx8hjZEzf3XJWTrZ0B/5MMQMITaLhoxWFFpdi1YfDWPQQulnVZe2FRwi5wk5n3l+8C3u5zK07fPFc/ttMcfA2Ov34PptnxImzYZ7CUfAd8im1qGRiRrFzxbttNYIs00SMM+TmIV5Ph8gMeIDVMjhWFkDEDD2+9QpMk+2fpKyFr/IeiubBXD1xGvEAdCS/JuL2OKEyRIdK+ZAjKG4HJ25TFcJaMzs8SUBOJUxPDRlUVnhZbSpjwKxPigsUSa+fb+TB6N4S37gkb+mUZ8BL6leuBKcNTl8hirY2uM5vBXtIwmXMr5935NXfv49S0jC6llJCJPTGAERdQmNKGFejbUp7tcw3FYXdOCx0Cl2srRXqelwOlKGhnMuCbjeG44e9Dv15JwEFhJ0wwgfecxSstSJqfzl9EHgNUgPQIhcVLoLDHJNQZPQw627a/lZMG+81KIOk47RTaXlkoVY01JNZ6d/5sjVJ1KRBJOZ7K1YIuk3RzPMmdpNSB4SUscC/khzk28RIDLeCIxfD6TjTSFauti5JUIPIGt4rfykobgj+eounStrqDS1bipiPlpSsQP4RROFaFO/QCQGS3wZDQDahvg//Zf1PVq7EE3JQInTymqRn7wR21hfnSBldzf4E/nFeuMZOKtFGLYp9Jt10jJS++4BHxfH4jhoEGDDZMnPB6VkrdU4UxnFDR06czgECv51GlAN1ptwis5PGc2qS9BNHvWfkLVbxl3dwwdByt0/kIMXSJ4S3dIr6qfhu5dmbK+vV8xeTSGLtt+gSfW3Wkak0VDgEPw+2PYKWNGAn+5zAojeAFrveLJ4f9qf4weRQKxKcxDBzFFfOUYBFKfOKutgidTV9M8DDmc4Nn4aUwtGAjJ+POcKDoGRFhWnpeYzrSBjFIgy6ATxTpa0Qv1fb5TVkI5y2VkHuD113YpBr1qW0jU6H7xJSoQae5HwNYIlIi1OaIS9B41JbL7o1/BSk1r1mmLLxJ9ZPb/nbcM7Velz8trYimm0dHycz33YgzLf/QYQPAXf914E/10wIKh8+p3a5S3FA4DckMMX2MTsSQbl6+MpStQdLk5noyiacd5lNHntPlWQZbK8nyyCZrWbYjiYTAznMgIK21YMftFuGDsC54y6XPYkBjihngCaEmG9rnka12CxAy5OQTE056cM2ZB4werwwUjBwBBENZ6xQIYP4xcLmElshd0wW0rljF1hVwu6myUqYnJ8m3bLEaiOANSZ838UN+po6ZlIGok0901aw7U3fsgIBjqK98Trkhp/aMQ2g2IECklhLztJesAB5OV3HP/onjU0sqR26fejOeK3keeOAB4/dTYozv9gKdpkNG8JJbvmPpEFCZguIl9XkvFEQ2yLV8ahTEiwouwmfWNJWBf8z5BkuhmNuoQl+Ga9ZI61U/DDV22SFduw7FB3TW5j/Pp6aNC7uTc9iQDqqpBpv4FgD/RiyP2BX+ZXVU5DLw4pj2lSjZSCENjhtbtHpZo4gzATNrYseeNt/b5QmI054lBCt1VrakqxIAohYOwmerOE2PM8ccZbISYol8ikTD7DikuiLTwAGDGOKhgrO6Klqq9QyxDS0q7P34135faLDapDvRFyEVNMerEhMclYcqTbKghuDpnQiQragBSR4w4axo6eGmkQCLvrOmPoTJ0kOomPAKNK8gepBIJQovR8/EmqO47FJpW/TORJollTAP7F0feDUCiGCCM1EiChnzNiLtrSLDUGknX8m7fvI6KHqPvXztuYlgVmsqW0X8Qw+Hy6zR4vAWOfy+eLhgRQhO8OYl1RSa8CUrKye4YIpeh7wqerNieyIaIPoGh49WSuqinHP3BmB/+XM+8IJ7ziCKjTR88d04R+Y1SqiKDl6TwMrX8fhAWjVoCkq70Z4rKLGNGvpTIzS5j9xuJVqpaZuQI60UoC+8GBL4/mdTOo27ziGGv0G6IIY/eUsIghsLTKaMKtblXpBxrA8Rjzn9Us8WNbWxWEi9PM+4IomLmACAz4+V5txl79azCd7VJ/7s8qqi486sASamFEySa8m8+jTfHlYorDgDuB8FbenY25vemo6EUzfp2bSlUAO9WdlCTWqCZRLwsbRvU9zrauo9UHbMJRjLxvcXkyfVCWVmuw2I+TCKzHeR8eR6dF3nCHZ0GosjlkpXXcl1ecQZIDeIKCjzWt1/raB4+ND6GTbmw5Fm7QfGKi1RPMp645m2FQ/LiXZOX6lI1ACiMy8H22iu9yemwiJzZgqQg5snHmBbQuOoXlzlGPkkEPOrwUrTt7de7x5v2kVXGtjaSy3hvXLmqZ9OGkhLfnn1ZcpHs8tKouwD+/QehpnCMXCyp+f/qn6aklqPF6Hzy2Te9n22dSKy08EDKrcDakfeCVrhaqiPeE217NG8ze1z/iJavHqk37iYYKRz5jkuC5B9sXLH6ed+Rg8u923f0J1ghuXHiCoshVPVrdB5dWvTq0LGxRtz7DVes4SX85TSUoYq6S0qygzvKl1qGD+lGAI0cCATgYv87xOus1AIJEH/+62yXLejPR7q0CagKF0naAEgaL93A7Eq+/oz6hUsKA6cqLJFIsSSn6kmAVURvEcBEDA9hLDLz2BuwKqXRQkkfgGj1AE0fbWobqDgxIVBRlU/AkDzB67MKjQ1mslT0xDzmcXAwSvvL3+ftFzBiIwYtCG6P0LVcZzLz/wGn7fJnXXc03AAAAABJRU5ErkJggg=="})],-1)]))}const lo=J(so,[["render",io]]),ao={},ro={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function co(u,f){return s(),d("svg",ro,f[0]||(f[0]=[t("path",{d:"M18.75 2.5H1.25C0.918479 2.5 0.600537 2.6317 0.366117 2.86612C0.131696 3.10054 0 3.41848 0 3.75L0 16.25C0 16.5815 0.131696 16.8995 0.366117 17.1339C0.600537 17.3683 0.918479 17.5 1.25 17.5H18.75C19.0815 17.5 19.3995 17.3683 19.6339 17.1339C19.8683 16.8995 20 16.5815 20 16.25V3.75C20 3.41848 19.8683 3.10054 19.6339 2.86612C19.3995 2.6317 19.0815 2.5 18.75 2.5V2.5ZM18.4375 3.75L10 11.25L1.56875 3.75H18.4375ZM1.25 16.25V5.15625L9.175 12.1812C9.40311 12.3816 9.69636 12.4922 10 12.4922C10.3036 12.4922 10.5969 12.3816 10.825 12.1812L18.75 5.15625V16.25H1.25Z",fill:"black"},null,-1)]))}const uo=J(ao,[["render",co]]),fo={},mo={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function po(u,f){return s(),d("svg",mo,f[0]||(f[0]=[t("path",{d:"M18.75 5H16.25V0H3.75V5H1.25C0.918479 5 0.600537 5.1317 0.366117 5.36612C0.131696 5.60054 0 5.91848 0 6.25L0 15C0 15.3315 0.131696 15.6495 0.366117 15.8839C0.600537 16.1183 0.918479 16.25 1.25 16.25H3.75V20H16.25V16.25H18.75C19.0815 16.25 19.3995 16.1183 19.6339 15.8839C19.8683 15.6495 20 15.3315 20 15V6.25C20 5.91848 19.8683 5.60054 19.6339 5.36612C19.3995 5.1317 19.0815 5 18.75 5V5ZM5 1.25H15V5H5V1.25ZM15 18.75H5V11.25H15V18.75ZM18.75 15H16.25V10H3.75V15H1.25V6.25H18.75V15ZM15.625 8.75H16.875C17.0408 8.75 17.1997 8.68415 17.3169 8.56694C17.4342 8.44973 17.5 8.29076 17.5 8.125C17.5 7.95924 17.4342 7.80027 17.3169 7.68306C17.1997 7.56585 17.0408 7.5 16.875 7.5H15.625C15.4592 7.5 15.3003 7.56585 15.1831 7.68306C15.0658 7.80027 15 7.95924 15 8.125C15 8.29076 15.0658 8.44973 15.1831 8.56694C15.3003 8.68415 15.4592 8.75 15.625 8.75Z",fill:"black"},null,-1)]))}const vo=J(fo,[["render",po]]),go={class:"lofty-links"},ho=["onClick"],yo={__name:"detailBtns",props:{id:String},setup(u){const f=u,{collectStatus:o,listingId:a,info:v,sold:l}=G[f.id],{copyCode:i}=zt();async function m(){Pt(a,o.value,()=>{o.value=!o.value})}const r={twitter:"https://twitter.com/share?text=Instantly view all photos and details of this hot listing and own the perfect place before other buyers. &url=",facebook:"https://www.facebook.com/sharer/sharer.php?u=",pinterest:"https://pinterest.com/pin/create/button/?url="},c=[{icon:Xe,name:"X",fn:()=>y(r.twitter)},{icon:oo,name:"Facebook",fn:()=>y(r.facebook)},{icon:lo,name:"Pinterest",fn:()=>y(r.pinterest)},{icon:uo,name:"Email",fn:g},{icon:Ut,name:"Copy Link",fn:A},{icon:vo,name:"Print",fn:()=>{setTimeout(window.print,100)}}];function y(w=""){_(`${w}${window.location.href}`)}function _(w){const h=(window.screen.availWidth-800)/2,L=(window.screen.availHeight-600)/2,R=["width=800","height=600",`left=${h}`,`top=${L}`,"resizable=yes","scrollbars=yes"].join(",");window.open(w,"CenteredWindow",R)}function g(){var h;const w=document.createElement("a"),x=encodeURIComponent("Hot Listing - "+((h=v==null?void 0:v.value)==null?void 0:h.address)||""),b=encodeURIComponent("Hi. Take a look at this property: "+window.location.href);w.href=`mailto:?subject=${x}&body=${b}`,w.target="_blank",document.body.appendChild(w),w.click(),document.body.removeChild(w)}function A(){i(window.location.href)}return(w,x)=>(s(),d(D,null,[e(l)?V("",!0):(s(),d("div",{key:0,class:"lofty-btn-item lofty-save",onClick:m},[t("i",{class:M(["lofty_iconfont",e(o)?"lofty-icon-heart-fill":"lofty-icon-heart"])},null,2),x[0]||(x[0]=t("span",null,"Save",-1))])),O(at,{"menu-style":{padding:"0",width:"300px"},right:0,trigger:"click","hide-arrow":"","mobile-fix":"","fit-width":!1},{menu:E(()=>[t("ul",go,[(s(),d(D,null,H(c,b=>t("li",{onClick:vt(()=>{var h;return(h=b.fn)==null?void 0:h.call(b)},["prevent"])},[(s(),j($t(b.icon))),t("span",null,C(b.name),1)],8,ho)),64))])]),default:E(()=>[x[1]||(x[1]=t("div",{class:"lofty-btn-item lofty-share"},[t("i",{class:"lofty_iconfont lofty-icon-big-normal-share"}),t("span",null,"Share")],-1))]),_:1})],64))}},wo={class:"lofty-school-panel"},ko=["onClick"],_o=["onMouseenter","onClick"],bo={class:"score-circle"},Co={style:{"font-size":"24px"}},So={class:"school-info"},Ao={class:"school-name lofty-ellipsis"},Io={class:"school-type"},xo={key:1,class:"lofty-school-detail"},Lo={class:"school-title"},To={class:"detail-info"},Mo={class:"value"},Do={class:"item"},Po={class:"value"},Eo={key:0,class:"item"},Vo={class:"value"},$o={class:"item"},Bo={class:"value"},Ho={key:0,class:"mt20"},Ro={class:"value"},qo={key:1,class:"mt20"},Go={class:"value"},No={class:"mt20"},Uo={class:"value"},zo={class:"mt20"},Oo={class:"value"},jo={key:2,class:"no-school-data"},Zo={__name:"schoolPanel",props:ft({showContent:Boolean,id:String},{modelValue:{},modelModifiers:{}}),emits:ft(["mouseenter","changeSchoolType"],["update:modelValue"]),setup(u,{emit:f}){const{schoolGroups:o}=G[u.id],a=k(""),v=Bt(u,"modelValue"),l=f;function i(_){v.value=_.id,l("mouseenter")}function m(_){a.value=a.value===_.label?"":_.label,l("changeSchoolType",a.value)}const r=k({}),c=k(!1);function y(_){r.value=_,c.value=!0}return(_,g)=>(s(),d("div",wo,[e(c)?P((s(),d("div",xo,[t("div",{class:"back-to-list",onClick:g[0]||(g[0]=A=>c.value=!1)},g[3]||(g[3]=[t("span",{class:"lofty_iconfont lofty-icon-prev"},null,-1),N("Back To Previous ")])),t("div",Lo,C(e(r).name),1),t("div",To,[t("div",null,[g[4]||(g[4]=t("div",{class:"label"},"Admission",-1)),t("div",Mo,C(e(r).admission),1)]),t("div",Do,[g[5]||(g[5]=t("div",{class:"label"},"Level",-1)),t("div",Po,C(e(r).gradeRange),1)]),e(r).gsRating?(s(),d("div",Eo,[g[6]||(g[6]=t("div",{class:"label"},"Rating",-1)),t("div",Vo,C(e(r).gsRating),1)])):V("",!0),t("div",$o,[g[7]||(g[7]=t("div",{class:"label"},"Library",-1)),t("div",Bo,C(e(r).library?"YES":"NO"),1)])]),e(r).phone?(s(),d("div",Ho,[g[8]||(g[8]=t("div",{class:"label"},"Phone",-1)),t("div",Ro,C(e(r).phone),1)])):V("",!0),e(r).expenditure?(s(),d("div",qo,[g[9]||(g[9]=t("div",{class:"label"},"Expenditure",-1)),t("div",Go,C(e(jt)(e(r).expenditure,null,2,"$")),1)])):V("",!0),t("div",No,[g[10]||(g[10]=t("div",{class:"label"},"Address",-1)),t("div",Uo,C(e(r).address),1)]),t("div",zo,[g[11]||(g[11]=t("div",{class:"label"},"Ratio",-1)),t("div",Oo,C(e(r).ratio),1)])],512)),[[B,u.showContent]]):(s(!0),d(D,{key:0},H(e(o),A=>P((s(),d("div",null,[t("div",{class:"group-title",onClick:w=>m(A)},[t("span",null,[N(C(A.label)+" ",1),t("span",null,C(A.data.length),1)]),t("i",{class:M(["lofty_iconfont lofty-icon-arrow_03_up",{reverse:e(a)!==A.label}])},null,2)],8,ko),t("div",{class:M([e(a)===A.label?"show-school":"hide-school"])},[(s(!0),d(D,null,H(A.data,w=>(s(),d("div",{onMouseenter:x=>i(w),onClick:x=>y(w),class:M([{active:v.value===w.id},"school-item"]),key:w.id},[t("div",bo,[t("span",Co,C(w.gsRating),1),g[1]||(g[1]=t("span",{class:"small-number"},"/10",-1))]),t("div",So,[t("div",Ao,C(w.name),1),t("div",Io,[t("span",null,C(w.type),1),g[2]||(g[2]=t("span",{style:{margin:"0 6px"}},"|",-1)),t("span",null,C(w.gradeRange),1)])])],42,_o))),128))],2)],512)),[[B,u.showContent]])),256)),e(o).length===0?(s(),d("div",jo,g[12]||(g[12]=[t("div",{style:{"text-align":"center"}},[t("div",{class:"lofty_iconfont lofty-icon-school2"}),t("div",null,"No School Data")],-1)]))):V("",!0)]))}},Yo="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1736910598105'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='25931'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M797.26907%20115.696523a366.825715%20366.825715%200%200%201%2074.005104%20124.61323%20441.829159%20441.829159%200%200%201%2025.649642%20150.262872%20467.094824%20467.094824%200%200%201-32.049253%20163.702055%201044.493347%201044.493347%200%200%201-79.124793%20162.754912%201474.214441%201474.214441%200%200%201-104.134474%20152.822716%203186.724806%203186.724806%200%200%201-105.081616%20128.145816%20120.927054%20120.927054%200%200%201-15.051886%2013.439183A53.193568%2053.193568%200%200%201%20526.591114%201023.954947h-3.199806a53.50075%2053.50075%200%200%201-35.581838-12.492041%20108.793391%20108.793391%200%200%201-14.411925-13.439184c-34.583499-40.16396-72.085221-83.962899-112.42837-131.345621a1468.505988%201468.505988%200%200%201-112.121189-149.62291%20970.437046%20970.437046%200%200%201-86.189963-160.195068A429.925882%20429.925882%200%200%201%20128.023327%20390.572625c0-51.785654%2010.930536-102.982544%2032.049253-150.262872A402.714735%20402.714735%200%200%201%20243.037139%20115.722122a393.140917%20393.140917%200%200%201%20124.920412-83.63012A366.185754%20366.185754%200%200%201%20517.631658%200.042749c55.036657-0.511969%20109.561344%2010.392969%20160.16947%2032.023655a340.228931%20340.228931%200%200%201%20119.49354%2083.630119z'%20fill='%235F3808'%20p-id='25932'%3e%3c/path%3e%3cpath%20d='M518.297217%20140.347826l205.760301%20198.055168a19.070841%2019.070841%200%200%201%205.734051%2014.027948%2018.533274%2018.533274%200%200%201-18.354085%2018.635668h-19.070841v168.181783a37.296934%2037.296934%200%200%201-37.271336%2037.424926h-93.485521V445.942061a18.789259%2018.789259%200%200%200-18.661266-18.789259h-74.824255a18.789259%2018.789259%200%200%200-18.661266%2018.789259v130.756857h-93.485521a37.296934%2037.296934%200%200%201-37.271335-37.834502v-168.181783h-17.662927a18.507676%2018.507676%200%200%201-14.027948-5.75965%2018.942849%2018.942849%200%200%201%200-26.494391l205.7603-198.055168a18.354085%2018.354085%200%200%201%2025.521649%200z'%20fill='%23FFFFFF'%20p-id='25933'%3e%3c/path%3e%3c/svg%3e",Ko={class:"lofty-detail-map"},Fo={class:"lofty-school-map-container"},Qo={key:0,class:"marker-box icon"},Jo=["src"],Xo={__name:"detailMap",props:{id:String},setup(u){const f=u,{info:o,location:a,onLoad:v,schoolMarkers:l}=G[f.id],i=k(!0),m=k(""),r=X(()=>m.value?l.value.filter(I=>I.group===m.value):l.value),c=k(null),y={zoom:14,center:{lat:0,lng:0}},_=k(""),g={mouseEnter:function(I){_.value=I.id,U.value=!1}},A=k("");lt(_,I=>{const n=l.value.find(p=>p.id===I);A.value=n.key,setTimeout(()=>{R(n.hjId)},300)});const w=k(!1);function x(I){c.value=I,setTimeout(()=>{w.value=!0},3e3)}let b=[];function h(){b.forEach(I=>{c.value.removeObject(I)}),b=[]}const L={};async function R(I){if(h(),L[I]){let n=L[I];F(n)}else{const n=await Q.get(`search/hj-data/v1/boundary?type=school&hjId=${I}`);L[I]=n.data||[],F(n.data||[])}}const U=k(!1);function F(I){if(I.forEach(n=>{n.forEach(p=>{const S=new window.H.geo.LineString;p.forEach($=>{S.pushPoint($)}),b.push(new window.H.map.Polygon(new window.H.geo.Polygon(S),{style:{strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)",fillColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-bgColor")||"rgba(25, 25, 25, 0.2)",lineWidth:2}}))})}),b.forEach(n=>{c.value.addObject(n)}),b.length>0&&U.value){let n=1/0,p=1/0,S=-1/0,$=-1/0;b.forEach(bt=>{const W=bt.getGeometry().getBoundingBox();n=Math.min(n,W.getBottom()),S=Math.max(S,W.getTop()),p=Math.min(p,W.getLeft()),$=Math.max($,W.getRight())});const ct=c.value.getZoom(),dt=new window.H.geo.Rect(S,p,n,$);c.value.getViewModel().setLookAtData({bounds:dt},!1);const yt=c.value.getZoom(),ut=3,wt=Math.max(ct-ut,4),kt=Math.min(ct+ut,20),_t=Math.max(wt,Math.min(yt,kt));c.value.getViewModel().setLookAtData({bounds:dt,zoom:_t},!0)}}const Y=k(!1);return Z(()=>{v.then(()=>{y.center.lat=+o.value.latitude,y.center.lng=+o.value.longitude,Y.value=!0})}),(I,n)=>(s(),d("div",Ko,[n[7]||(n[7]=t("div",{class:"lofty-detail-title"},"NEARBY SCHOOLS",-1)),t("div",Fo,[e(Y)?(s(),j(Ot,{key:0,style:et({height:e(T)?"380px":"100%"}),config:y,onInit:x},{default:E(()=>[e(w)?(s(),d("div",Qo,[O(mt,{data:e(a),map:e(c)},{default:E(()=>[t("img",{src:e(Yo),width:"40",alt:"location"},null,8,Jo)]),_:1},8,["data","map"]),(s(!0),d(D,null,H(e(r),p=>(s(),j(mt,{class:"school",active:e(A),"onUpdate:active":n[0]||(n[0]=S=>tt(A)?A.value=S:null),key:p.key,map:e(c),data:p,events:g},null,8,["active","map","data"]))),128))])):V("",!0)]),_:1},8,["style"])):V("",!0),O(Zo,{modelValue:e(_),"onUpdate:modelValue":n[1]||(n[1]=p=>tt(_)?_.value=p:null),class:"school-area",onMouseenter:n[2]||(n[2]=p=>U.value=!0),onChangeSchoolType:n[3]||(n[3]=p=>m.value=p),showContent:e(i),style:et({width:e(i)?e(T)?"100%":"400px":"0",height:e(i)?e(T)?"fit-content":"460px":"0"}),id:u.id},null,8,["modelValue","showContent","style","id"]),P(t("div",{onClick:n[4]||(n[4]=p=>i.value=!1),class:"hide-school-button"},[t("span",{class:M(["lofty_iconfont lofty-icon-arrow_01_right",{reverse:e(i)}])},null,2),t("span",{style:{"margin-left":"-7px"},class:M(["lofty_iconfont lofty-icon-arrow_01_right",{reverse:e(i)}])},null,2)],512),[[B,!e(T)&&e(i)]]),P(t("div",{onClick:n[5]||(n[5]=p=>i.value=!0),class:"show-school-button"},n[6]||(n[6]=[t("span",{style:{"margin-right":"10px"}},"SCHOOLS",-1),t("span",{class:"lofty_iconfont lofty-icon-arrow_01_right"},null,-1),t("span",{style:{"margin-left":"-7px"},class:"lofty_iconfont lofty-icon-arrow_01_right"},null,-1)]),512),[[B,!e(T)&&!e(i)]])]),n[8]||(n[8]=t("div",{class:"school-disclaimer"},[N(" School data provided by "),t("a",{class:"disclaimer",target:"_blank",href:"https://www.greatschools.org",rel:"noopener"},"GreatSchools"),N(" for your convenience. Please contact schools directly for enrollment eligibility. ")],-1))]))}},Wo={key:0,class:"lofty-detail-title"},ts={class:"lofty-listing"},es={__name:"similarListing",props:{id:String},setup(u){const{listingId:f}=G[u.id];v();const o=k([]),a=k(!0);async function v(){const l={pageSize:4,detailId:f},i=await Q.get("/search/recommended-listings",{data:l});i.status.code===0&&(o.value=i.data.listings,o.value.forEach(Tt),a.value=o.value.length>0)}return(l,i)=>(s(),d("div",null,[e(a)?(s(),d("div",Wo,"SIMILAR LISTINGS")):V("",!0),t("div",ts,[(s(!0),d(D,null,H(e(o),m=>(s(),j(Zt,{house:m,class:"list-card"},null,8,["house"]))),256))])]))}};Yt();xt();rt.initState(()=>{Gt(),jQuery(".lofty-listing-detail-page").ready(function(){var l;const u=((l=document.querySelector(".lofty-listing-detail-page"))==null?void 0:l.getAttribute("id"))||"",f=At(u),{id:o,$:a}=f;se(f);const{mapCenter:v}=f.getModuleData();q(me,{id:o}).mount(a("#lofty-listing-pictures")),q(pe,{id:o}).mount(a("#lofty-open-fields")),q(yo,{id:o}).mount(a(".lofty-detail-btns")),q(Ke,{id:o}).mount(a("#lofty-request-tour")),v.lat&&v.lng&&q(Xo,{id:o}).mount(a("#lofty-detail-map-container")),q(es,{id:o}).mount(a("#lofty-detail-similar-listings"))})});
     9      }`]}),o.length<=3&&(v.value=o.length>1?o.length:2),v.value=T?1:v.value,r.initialize()}const d=w(!0);function u(r){const h=document.createElement("div");document.body.appendChild(h),q(ce,{imgList:o,previewImgIndex:r||0,onClose:()=>{d.value=!0}}).mount(h),d.value=!1}return(r,h)=>(s(),c(D,null,[t("swiper-container",{init:"false",class:"swiper-container","slides-per-view":e(v),"space-between":e(T)?0:2,centeredSlides:e(o).length==1},[(s(!0),c(D,null,H(e(o),(k,g)=>(s(),c("swiper-slide",{key:g},[t("img",{src:k,alt:"",onClick:vt(I=>u(g),["stop"])},null,8,ue)]))),128))],8,de),e(i)?(s(),c(D,{key:0},[P(t("div",fe,h[0]||(h[0]=[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_left"},null,-1)]),512),[[B,e(d)]]),P(t("div",me,h[1]||(h[1]=[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_right"},null,-1)]),512),[[B,e(d)]])],64)):V("",!0)],64))}},ve={__name:"showMoreButton",props:{id:String},setup(f){const m=f,{module:o}=G[m.id],a=w(!1),v=X(()=>a.value?"Less":"More"),i=o.$(".lofty-other-fields");function l(){a.value=!a.value,i.style.display=a.value?"block":"none"}return(d,u)=>(s(),c("div",{class:"showMoreButton",onClick:l},[t("span",null,"Read "+C(e(v)),1),t("i",{class:M(["lofty_iconfont lofty-icon-arrow_01_right",{rotate:e(a)}])},null,2)]))}},ge={class:"lofty-swiper-calendar-view"},he=["slides-per-view","slides-per-group","initialSlide"],ye=["onClick"],we={class:"day-num"},ht={__name:"swiperCalendar",props:{id:String,slidesPerView:{type:Number,default:3}},setup(f){const{dayList:m,dayIndex:o}=G[f.id],a=K("swiper"),v=K("prev"),i=K("next");function l(){const u={navigation:{prevEl:v.value,nextEl:i.value}};Object.assign(a.value,u),a.value.initialize()}function d(u){o.value=u}return Z(()=>{l()}),(u,r)=>(s(),c("div",ge,[t("swiper-container",{ref_key:"swiper",ref:a,class:"swiper-calendar-container",init:!1,"space-between":10,"slides-per-view":f.slidesPerView,"slides-per-group":f.slidesPerView,initialSlide:e(o)},[(s(!0),c(D,null,H(e(m),(h,k)=>(s(),c("swiper-slide",{class:M(["day-slide",{"day-active":e(o)===k}]),onClick:g=>d(k)},[t("div",null,C(h.week),1),t("div",we,C(h.dayNum),1),t("div",null,C(h.month),1)],10,ye))),256))],8,he),t("div",{class:"day-prev-button",ref_key:"prev",ref:v},r[0]||(r[0]=[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_left"},null,-1)]),512),t("div",{class:"day-next-button",ref_key:"next",ref:i},r[1]||(r[1]=[t("i",{class:"lofty_iconfont lofty-icon-arrow_08_right"},null,-1)]),512)]))}},ke={class:"lofty-schedule-pop is-scheduled"},_e={class:"title"},be={class:"scheduled-date"},Ce={class:"scheduled-time"},Se={class:"lofty-schedule-pop"},Ae={class:"lofty-tour-type-tab"},Ie={class:"lofty_iconfont lofty-icon-arrow_01_down"},xe={class:"lofty_iconfont lofty-icon-arrow_01_up"},Le={class:"lofty-time-list"},Te=["onClick"],Me={class:"lofty_iconfont lofty-icon-arrow_01_down"},De={class:"lofty_iconfont lofty-icon-arrow_01_up"},Pe={class:"lofty-time-list"},Ee=["onClick"],Ve={__name:"schedulePop",props:{id:String,formatDate:Function,isScheduled:Boolean},emits:["submit"],setup(f,{emit:m}){const o=K("popRef"),{tourType:a,dayIndex:v,dayList:i,listingId:l}=G[f.id],[d,u,r,h]=[w(0),w(0),w([]),w([])],k=T?3:5,g=X(()=>({startTime:d.value,endTime:u.value,listingId:l})),I=m;function b(){if(v.value===0)d.value=y();else{const n=i[v.value].date;d.value=+n}r.value=_(d.value)}function S(){const[n,p]=[new Date(d.value),new Date(d.value)];n.setMinutes(n.getMinutes()+15),p.setMinutes(p.getMinutes()+30),u.value=+n,h.value=[+n],L(n)||(h.value.push(+p),u.value=+p)}lt(v,b),lt(d,S);function _(n){const p=[],A=new Date(n).setHours(23,59,59,999);let $=new Date(n);for(;$<=A;)p.push(+$),$.setMinutes($.getMinutes()+15);return p}Z(()=>{b(),o.value.open()});function y(){const n=new Date;return n.setMinutes(Math.ceil(n.getMinutes()/15)*15),n.setSeconds(0),n.setMilliseconds(0),n.getMinutes()===0&&(n.setHours(n.getHours()),n.setMinutes(0)),+n}function L(n){return n.getHours()===0&&n.getMinutes()===0&&n.getSeconds()===0&&n.getMilliseconds()===0}const R=w(!1);function O(){I("submit",g.value),T?R.value=!0:F()}function F(){o.value.$el.parentNode.remove(),document.body.classList.remove("lofty-overflow-hidden")}const Y=w(!1),x=w(!1);return(n,p)=>(s(),j(ot,{ref_key:"popRef",ref:o,allowClose:!1},{default:E(()=>[P(t("div",ke,[t("div",_e,[p[5]||(p[5]=N("Your Request was Received!")),t("i",{class:"lofty_iconfont lofty-icon-close",onClick:F}),p[6]||(p[6]=t("div",{class:"scheduled-desc"},"We'll be in touch to confirm our meeting",-1)),t("div",be,C(f.formatDate(e(g).startTime)),1),t("div",Ce,C(e(U)("hh:mmp",e(g).startTime))+" - "+C(e(U)("hh:mmp",e(g).endTime)),1),t("div",{class:"lofty-btn lofty-schedule-tour",onClick:p[0]||(p[0]=A=>R.value=!1)},"Schedule Again")])],512),[[B,e(R)&&e(T)]]),P(t("div",Se,[t("div",{class:"title"},[p[7]||(p[7]=N("REQUEST A TOUR")),t("i",{class:"lofty_iconfont lofty-icon-close",onClick:F})]),t("div",Ae,[t("div",{class:M(["tab-type",{active:e(a)==="tour_info"}]),onClick:p[1]||(p[1]=A=>a.value="tour_info")},"In-Person",2),t("div",{class:M(["tab-type",{active:e(a)==="virtual_tour"}]),onClick:p[2]||(p[2]=A=>a.value="virtual_tour")},"Virtual Tour",2)]),z(ht,{class:"lofty-swiper-calendar",id:f.id,"slides-per-view":e(k)},null,8,["id","slides-per-view"]),p[10]||(p[10]=t("div",{class:"lofty-select-time"},"Start Time",-1)),z(at,{"hide-arrow":"",top:40,"menu-style":{padding:0},"mobile-fix":"",onToggle:p[3]||(p[3]=A=>Y.value=A)},{menu:E(()=>[t("ul",Le,[(s(!0),c(D,null,H(e(r),A=>(s(),c("li",{class:M([{active:A===e(d)},"time-item"]),onClick:$=>d.value=A},C(e(U)("hh:mm p",A)),11,Te))),256))])]),default:E(()=>[t("div",{class:M(["lofty-dropdown-time",{open:e(Y)}])},[p[8]||(p[8]=t("i",{class:"lofty_iconfont lofty-icon-time"},null,-1)),t("span",null,C(e(U)("hh:mm p",e(d))),1),P(t("i",Ie,null,512),[[B,!e(Y)]]),P(t("i",xe,null,512),[[B,e(Y)]])],2)]),_:1}),p[11]||(p[11]=t("div",{class:"lofty-select-time"},"End Time",-1)),z(at,{"hide-arrow":"",top:40,"menu-style":{padding:0},"mobile-fix":"",onToggle:p[4]||(p[4]=A=>x.value=A)},{menu:E(()=>[t("ul",Pe,[(s(!0),c(D,null,H(e(h),A=>(s(),c("li",{class:M([{active:A===e(u)},"time-item"]),onClick:$=>u.value=A},C(e(U)("hh:mm p",A)),11,Ee))),256))])]),default:E(()=>[t("div",{class:M(["lofty-dropdown-time",{open:e(x)}])},[p[9]||(p[9]=t("i",{class:"lofty_iconfont lofty-icon-time"},null,-1)),t("span",null,C(e(U)("hh:mm p",e(u))),1),P(t("i",Me,null,512),[[B,!e(x)]]),P(t("i",De,null,512),[[B,e(x)]])],2)]),_:1}),t("div",{class:"lofty-btn lofty-schedule-tour",onClick:O},"Schedule a Tour")],512),[[B,!f.isScheduled&&!e(R)]])]),_:1},512))}},$e={class:"lofty-message-pop get-touch"},Be={key:0,class:"is-leaved"},He={key:1},Re={__name:"messagePop",props:{message:String},emits:["submit"],setup(f,{emit:m}){const o=m,a=K("popRef"),v=K("textarea"),i=w(f.message),l=w(!1);function d(){l.value=!0,o("submit",i.value)}Z(()=>{a.value.open(),pt(()=>{v.value.focus()})});function u(){a.value.$el.parentNode.remove(),document.body.classList.remove("lofty-overflow-hidden")}return(r,h)=>(s(),j(ot,{ref_key:"popRef",ref:a,allowClose:!1},{default:E(()=>[t("div",$e,[t("div",{class:"title"},[h[1]||(h[1]=N("GET IN TOUCH")),t("i",{class:"lofty_iconfont lofty-icon-close",onClick:u})]),e(l)?(s(),c("div",Be,h[2]||(h[2]=[t("div",{class:"lofty_iconfont lofty-icon-success"},null,-1),t("div",null,"Thanks!I'll get back to you shortly.",-1)]))):(s(),c("div",He,[P(t("textarea",{ref_key:"textarea",ref:v,"onUpdate:modelValue":h[0]||(h[0]=k=>tt(i)?i.value=k:null),class:"message-textarea",placeholder:"type something"},null,512),[[gt,e(i)]]),t("div",{class:"get-touch-submit-btn",onClick:d},"Submit")]))])]),_:1},512))}},qe={key:0,class:"lofty-mobile-fix-bottom lofty-request-tour-mobile"},Ge={key:0,class:"lofty-request-tour lofty-right-container"},Ne={class:"title"},Oe={class:"lofty-tour-type-tab"},Ue={key:1,class:"is-scheduled lofty-right-container"},ze={class:"scheduled-date"},je={class:"scheduled-time"},Ze={class:"get-touch lofty-right-container"},Ye={key:0,class:"is-leaved"},Ke={key:1},Fe={__name:"requestTour",props:{id:String},setup(f){const{tourType:m,listingId:o,sold:a}=G[f.id],v=w(!1),i=w({});function l(_=Date.now()){return new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric"}).format(new Date(_))}const d=st.getTimeZone();function u(_=!1){_&&(v.value=!1),nt(()=>{const y=document.createElement("div");document.body.appendChild(y),q(Ve,{id:f.id,animation:T?"bottomToUp":"fadeIn",formatDate:l,isScheduled:v.value,onSubmit:async L=>{i.value=L;const R={listingId:o,timeZone:d,appointmentStartTime:L.startTime,appointmentEndTime:L.endTime,recordFlag:m.value},O=await Q.post("/lead/operate/visitorInfo",{data:R});O.status.code===0?v.value=!0:st.toast(O.status.message,3e3)}}).mount(y)})}function r(){nt(()=>{const _=document.createElement("div");document.body.appendChild(_),q(Re,{animation:"bottomToUp",message:k.value,onSubmit:y=>{k.value=y,I()}}).mount(_)})}function h(_){_.target.style.height="200px"}const k=w(a?"I like this property. Do you have any recommendations for similar ones?":"I'm interested in this listing"),g=w(!1);function I(){k.value&&nt(async()=>{const _={question:k.value,listingId:o,isSold:a},y=await Q.post("/lead/operate/leaveMsg",{data:_});y.status.code===0?g.value=!0:st.toast(y.status.message,3e3)})}const b=w("static"),S=new IntersectionObserver((_,y)=>{_.forEach(L=>{L.isIntersecting?b.value="static":L.boundingClientRect.top<0&&(b.value="sticky")})});return Z(()=>{T||S.observe(document.querySelector(".lofty-detail-address"))}),Vt(()=>{T||S.unobserve(document.querySelector(".lofty-detail-address"))}),(_,y)=>e(T)?(s(),c("div",qe,[t("div",{class:"get-touch-submit-btn",onClick:r},"GET IN TOUCH"),e(a)?V("",!0):(s(),c("div",{key:0,class:"lofty-btn schedule-tour-lofty",onClick:u},"Schedule a Tour"))])):(s(),c("div",{key:1,style:et({position:e(b)}),class:"lofty-right-panel"},[e(a)?V("",!0):(s(),c(D,{key:0},[e(v)?(s(),c("div",Ue,[y[7]||(y[7]=t("div",{class:"title"},"Your Request was Received!",-1)),y[8]||(y[8]=t("div",{class:"scheduled-desc"},"We'll be in touch to confirm our meeting",-1)),t("div",ze,C(l(e(i).startTime)),1),t("div",je,C(e(U)("hh:mmp",e(i).startTime))+" - "+C(e(U)("hh:mmp",e(i).endTime)),1),t("div",{class:"lofty-btn schedule-tour-lofty",onClick:y[2]||(y[2]=L=>u(!0))},"Schedule Again")])):(s(),c("div",Ge,[t("div",Ne,[y[6]||(y[6]=N(" REQUEST A TOUR ")),z(Ot,null,{trigger:E(()=>y[4]||(y[4]=[t("span",{class:"lofty_iconfont lofty-icon-help"},null,-1)])),content:E(()=>y[5]||(y[5]=[t("span",{class:"help-tip"},' If you would like to see this home without being there in person, select the "Virtual Tour" option and your agent will contact you to discuss available opportunities. ',-1)])),_:1})]),t("div",Oe,[t("div",{class:M(["tab-type",{active:e(m)==="tour_info"}]),onClick:y[0]||(y[0]=L=>m.value="tour_info")},"In-Person",2),t("div",{class:M(["tab-type",{active:e(m)==="virtual_tour"}]),onClick:y[1]||(y[1]=L=>m.value="virtual_tour")},"Virtual Tour",2)]),z(ht,{class:"lofty-swiper-calendar",id:f.id},null,8,["id"]),t("div",{class:"lofty-btn schedule-tour-lofty",onClick:u},"Schedule a Tour")]))],64)),t("div",Ze,[y[10]||(y[10]=t("div",{class:"title"},"GET IN TOUCH",-1)),e(g)?(s(),c("div",Ye,y[9]||(y[9]=[t("div",{class:"lofty_iconfont lofty-icon-success"},null,-1),t("div",null,"Thanks!I'll get back to you shortly.",-1)]))):(s(),c("div",Ke,[P(t("textarea",{"onUpdate:modelValue":y[3]||(y[3]=L=>tt(k)?k.value=L:null),class:"message-textarea",style:et({height:e(a)?"70px":"40px"}),onFocus:h},null,36),[[gt,e(k)]]),t("div",{class:M(["get-touch-submit-btn",{disabled:!e(k)}]),onClick:I},"Submit",2)]))])],4))}},Qe={},Je={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xe(f,m){return s(),c("svg",Je,m[0]||(m[0]=[t("circle",{cx:"10",cy:"10",r:"10",fill:"black"},null,-1),t("path",{d:"M11.0148 9.16585L14.9857 4.54999H14.0447L10.5968 8.55787L7.84294 4.54999H4.66669L8.83106 10.6106L4.66669 15.4511H5.60772L9.24883 11.2186L12.1571 15.4511H15.3334L11.0146 9.16585H11.0148ZM9.72593 10.664L9.30399 10.0605L5.94678 5.25838H7.39215L10.1015 9.13385L10.5234 9.73736L14.0452 14.7749H12.5998L9.72593 10.6642V10.664Z",fill:"white"},null,-1)]))}const We=J(Qe,[["render",Xe]]),to={},eo={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function oo(f,m){return s(),c("svg",eo,m[0]||(m[0]=[t("path",{d:"M20 10C20 4.47715 15.5229 0 10 0C4.47715 0 0 4.47715 0 10C0 14.9913 3.65685 19.1283 8.4375 19.8785V12.8906H5.89844V10H8.4375V7.79688C8.4375 5.29062 9.93043 3.90626 12.2146 3.90626C13.3087 3.90626 14.4531 4.10156 14.4531 4.10156V6.5625H13.1922C11.9499 6.5625 11.5625 7.33335 11.5625 8.12417V10H14.3359L13.8926 12.8906H11.5625V19.8785C16.3431 19.1283 20 14.9913 20 10Z",fill:"#1877F2"},null,-1),t("path",{d:"M13.8926 12.8906L14.3359 10H11.5625V8.12415C11.5625 7.33334 11.9499 6.5625 13.1921 6.5625H14.4531V4.10156C14.4531 4.10156 13.3087 3.90625 12.2146 3.90625C9.93042 3.90625 8.4375 5.29062 8.4375 7.79688V10H5.89844V12.8906H8.4375V19.8785C8.95439 19.9595 9.4768 20.0001 10 20C10.5316 20 11.0534 19.9584 11.5625 19.8785V12.8906H13.8926Z",fill:"white"},null,-1)]))}const so=J(to,[["render",oo]]),no={},io={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function lo(f,m){return s(),c("svg",io,m[0]||(m[0]=[t("rect",{width:"20",height:"20",fill:"url(#pattern0_1988_3736)"},null,-1),t("defs",null,[t("pattern",{id:"pattern0_1988_3736",patternContentUnits:"objectBoundingBox",width:"1",height:"1"},[t("use",{"xlink:href":"#image0_1988_3736",transform:"scale(0.015625)"})]),t("image",{id:"image0_1988_3736",width:"64",height:"64","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAABGUUKwAAANXUlEQVR4AdVbCXgURRZ+3XPnnMkYREQIIYsiiAoIKxA1XHIIGL8FORQFT2RBDjXggbgui8ii8O2niLpE8MBlEVAgKEciAgZQLgFdEELCKgghyRw55u6t19LjTE9VT/dkXHfr++brrvdevTq6jvf+V8PBr5zcC17tGKxzThCcjm6Cw5EbrL6YLbjcJqGpSSc0NHJYPZeaInAWS5DLSPfqsi+r5qzWCi7Tul9nyyxOL5r+3a/ZRLEByaxAEATO9af594TO/PC4/+SpTsHTVWYQhMSq4DjQtWvrMeS1P8a3ab0kY87s9ziOS1AZvQlJG4CGBX9r5fvxzDL/wcMDgpVVJnp1zaPqctp6DTdev9V4ZZtHUoumnG2etp9LN3sAHK++niscP17s27k7P+RyN1ufmk7xGemC8ZY+X3AdOky0Tn+sQk0ZlkzCDRZWr9Y59x58y7u19P5QnSNhPayGqaHzNmvINKDfO5k9b3iYGzUqqKaMXCahhrvnLSjw7ixf7z/2XYZc4W+RN3Tq6DLd2ntE+uwnP9dav+YBcBY9t6jp403ThYYGzWW1Nk6LPJeWJljuvOPVzPkvzNRUTq0wTnnHp2Xlnq2lN6kt81vImW/vt9868LaeapeEqq8orFyZWluy/ahv956c36JTWus09bm50ja4b2du/PiGeGXjDgB2vmbt5gr//gMt4in7X+IbunW9YL9rcG68QeCVGo3TvnZz6bH/t85jn7DNdZtLj2IflPqoV2I6tny+17ervK2STKI8LsUCXEoKcGZiKLrdEHK6ElXFLOfdVZ7jSE3ZSwS6s4SYS8A5a84rje//YzqroBY6n2UDY34vMN2aD/qOHUDf5irg0tOjVAg+H4SqayB04QL4DhwC345d4NvzFQgeT5RcIhnLuDGLrC/NfYJWljoA7vkL+zasWLWtOUcdOZYgZfxYMA8eAIbrOgHwiquN1jYQvF7w7fwS6l9bRqb0IaqMGiIekanjR/el2QkxA4Brpmb5B7WJGjk4tVPuuwdSJz0IvDVTTftUyfh2kYFY/Dr49n2tSl4uhMaSfeLYLPnxGPNZnHsPvZlo500D+0H27m2QPntmUjuPnTH26QVZa96DjLlPA+gVty5538U89sm57/AyOTNqBqBj4y1ecVKzbU/c1rSpkyBtxhTi3EeplNeXlLz/wGFwPDYNgmfPadKHvoNxwuj2tunTK6WCUUMpnDixXGvnOZMJMpcsBPOQgZJOxWfgu+MQqDoDoYtkw6u+KH5N3p4FBAgBQ7cbATfMeMnQ9Xqwb1wDNXeOhuCZf8cTD/NJ33g4XllMCAUSMfy50J+vX7niB60ubebil8Fy13BJH/XpP3wEmlavBe+2Mgie+4kqIxLJRmnofC2Yhw2BlHvHkGPSwpYlnEBFJdQWjgbSMUW5SCafmUE2xPtbpT01WWxIeA9AMENr51MfmqDY+SD50o5J06Bm2EhofHeVcuexlaEQ+L85Cu55L0N1737QWPwuKKFJ+twcsC1/A3AWqk3E3uD8P5x+U5IXBwBhLERyJKKap/HmHpD+NPVoFYt7Sj6DiwOGg2fTp2rUxciEamrB9fw8cDw8BYT6+hi+RDB0uwFSH31Ayqp6+g99MxD7jMLiACCGpwnGIhtdxvNkN9bpqBU2LH1L/PLJMGI8n22D2rvvUzSIUic9BLqWl1PbQiMSnNLkenHBOOSJA4AAJk2QRTMPHgj6a6+hsj3rN4J7/iLFqUstqED0HzkGzhmzmRK4V6TNmsHk0xihqjPTkC4OAKK3NCEqjWxUaU9MpbICJ06Cs+hZKq+5RM/GzeDZUMJUY7lzGPB2O5MvZ/hPVYh95kXcHqFrlclIjip9XnuqNK5ZoYluu+NRlzZzKmR9+A7YVr4l2gx8hjZEzf3XJWTrZ0B/5MMQMITaLhoxWFFpdi1YfDWPQQulnVZe2FRwi5wk5n3l+8C3u5zK07fPFc/ttMcfA2Ov34PptnxImzYZ7CUfAd8im1qGRiRrFzxbttNYIs00SMM+TmIV5Ph8gMeIDVMjhWFkDEDD2+9QpMk+2fpKyFr/IeiubBXD1xGvEAdCS/JuL2OKEyRIdK+ZAjKG4HJ25TFcJaMzs8SUBOJUxPDRlUVnhZbSpjwKxPigsUSa+fb+TB6N4S37gkb+mUZ8BL6leuBKcNTl8hirY2uM5vBXtIwmXMr5935NXfv49S0jC6llJCJPTGAERdQmNKGFejbUp7tcw3FYXdOCx0Cl2srRXqelwOlKGhnMuCbjeG44e9Dv15JwEFhJ0wwgfecxSstSJqfzl9EHgNUgPQIhcVLoLDHJNQZPQw627a/lZMG+81KIOk47RTaXlkoVY01JNZ6d/5sjVJ1KRBJOZ7K1YIuk3RzPMmdpNSB4SUscC/khzk28RIDLeCIxfD6TjTSFauti5JUIPIGt4rfykobgj+eounStrqDS1bipiPlpSsQP4RROFaFO/QCQGS3wZDQDahvg//Zf1PVq7EE3JQInTymqRn7wR21hfnSBldzf4E/nFeuMZOKtFGLYp9Jt10jJS++4BHxfH4jhoEGDDZMnPB6VkrdU4UxnFDR06czgECv51GlAN1ptwis5PGc2qS9BNHvWfkLVbxl3dwwdByt0/kIMXSJ4S3dIr6qfhu5dmbK+vV8xeTSGLtt+gSfW3Wkak0VDgEPw+2PYKWNGAn+5zAojeAFrveLJ4f9qf4weRQKxKcxDBzFFfOUYBFKfOKutgidTV9M8DDmc4Nn4aUwtGAjJ+POcKDoGRFhWnpeYzrSBjFIgy6ATxTpa0Qv1fb5TVkI5y2VkHuD113YpBr1qW0jU6H7xJSoQae5HwNYIlIi1OaIS9B41JbL7o1/BSk1r1mmLLxJ9ZPb/nbcM7Velz8trYimm0dHycz33YgzLf/QYQPAXf914E/10wIKh8+p3a5S3FA4DckMMX2MTsSQbl6+MpStQdLk5noyiacd5lNHntPlWQZbK8nyyCZrWbYjiYTAznMgIK21YMftFuGDsC54y6XPYkBjihngCaEmG9rnka12CxAy5OQTE056cM2ZB4werwwUjBwBBENZ6xQIYP4xcLmElshd0wW0rljF1hVwu6myUqYnJ8m3bLEaiOANSZ838UN+po6ZlIGok0901aw7U3fsgIBjqK98Trkhp/aMQ2g2IECklhLztJesAB5OV3HP/onjU0sqR26fejOeK3keeOAB4/dTYozv9gKdpkNG8JJbvmPpEFCZguIl9XkvFEQ2yLV8ahTEiwouwmfWNJWBf8z5BkuhmNuoQl+Ga9ZI61U/DDV22SFduw7FB3TW5j/Pp6aNC7uTc9iQDqqpBpv4FgD/RiyP2BX+ZXVU5DLw4pj2lSjZSCENjhtbtHpZo4gzATNrYseeNt/b5QmI054lBCt1VrakqxIAohYOwmerOE2PM8ccZbISYol8ikTD7DikuiLTwAGDGOKhgrO6Klqq9QyxDS0q7P34135faLDapDvRFyEVNMerEhMclYcqTbKghuDpnQiQragBSR4w4axo6eGmkQCLvrOmPoTJ0kOomPAKNK8gepBIJQovR8/EmqO47FJpW/TORJollTAP7F0feDUCiGCCM1EiChnzNiLtrSLDUGknX8m7fvI6KHqPvXztuYlgVmsqW0X8Qw+Hy6zR4vAWOfy+eLhgRQhO8OYl1RSa8CUrKye4YIpeh7wqerNieyIaIPoGh49WSuqinHP3BmB/+XM+8IJ7ziCKjTR88d04R+Y1SqiKDl6TwMrX8fhAWjVoCkq70Z4rKLGNGvpTIzS5j9xuJVqpaZuQI60UoC+8GBL4/mdTOo27ziGGv0G6IIY/eUsIghsLTKaMKtblXpBxrA8Rjzn9Us8WNbWxWEi9PM+4IomLmACAz4+V5txl79azCd7VJ/7s8qqi486sASamFEySa8m8+jTfHlYorDgDuB8FbenY25vemo6EUzfp2bSlUAO9WdlCTWqCZRLwsbRvU9zrauo9UHbMJRjLxvcXkyfVCWVmuw2I+TCKzHeR8eR6dF3nCHZ0GosjlkpXXcl1ecQZIDeIKCjzWt1/raB4+ND6GTbmw5Fm7QfGKi1RPMp645m2FQ/LiXZOX6lI1ACiMy8H22iu9yemwiJzZgqQg5snHmBbQuOoXlzlGPkkEPOrwUrTt7de7x5v2kVXGtjaSy3hvXLmqZ9OGkhLfnn1ZcpHs8tKouwD+/QehpnCMXCyp+f/qn6aklqPF6Hzy2Te9n22dSKy08EDKrcDakfeCVrhaqiPeE217NG8ze1z/iJavHqk37iYYKRz5jkuC5B9sXLH6ed+Rg8u923f0J1ghuXHiCoshVPVrdB5dWvTq0LGxRtz7DVes4SX85TSUoYq6S0qygzvKl1qGD+lGAI0cCATgYv87xOus1AIJEH/+62yXLejPR7q0CagKF0naAEgaL93A7Eq+/oz6hUsKA6cqLJFIsSSn6kmAVURvEcBEDA9hLDLz2BuwKqXRQkkfgGj1AE0fbWobqDgxIVBRlU/AkDzB67MKjQ1mslT0xDzmcXAwSvvL3+ftFzBiIwYtCG6P0LVcZzLz/wGn7fJnXXc03AAAAABJRU5ErkJggg=="})],-1)]))}const ao=J(no,[["render",lo]]),ro={},co={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function uo(f,m){return s(),c("svg",co,m[0]||(m[0]=[t("path",{d:"M18.75 2.5H1.25C0.918479 2.5 0.600537 2.6317 0.366117 2.86612C0.131696 3.10054 0 3.41848 0 3.75L0 16.25C0 16.5815 0.131696 16.8995 0.366117 17.1339C0.600537 17.3683 0.918479 17.5 1.25 17.5H18.75C19.0815 17.5 19.3995 17.3683 19.6339 17.1339C19.8683 16.8995 20 16.5815 20 16.25V3.75C20 3.41848 19.8683 3.10054 19.6339 2.86612C19.3995 2.6317 19.0815 2.5 18.75 2.5V2.5ZM18.4375 3.75L10 11.25L1.56875 3.75H18.4375ZM1.25 16.25V5.15625L9.175 12.1812C9.40311 12.3816 9.69636 12.4922 10 12.4922C10.3036 12.4922 10.5969 12.3816 10.825 12.1812L18.75 5.15625V16.25H1.25Z",fill:"black"},null,-1)]))}const fo=J(ro,[["render",uo]]),mo={},po={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vo(f,m){return s(),c("svg",po,m[0]||(m[0]=[t("path",{d:"M18.75 5H16.25V0H3.75V5H1.25C0.918479 5 0.600537 5.1317 0.366117 5.36612C0.131696 5.60054 0 5.91848 0 6.25L0 15C0 15.3315 0.131696 15.6495 0.366117 15.8839C0.600537 16.1183 0.918479 16.25 1.25 16.25H3.75V20H16.25V16.25H18.75C19.0815 16.25 19.3995 16.1183 19.6339 15.8839C19.8683 15.6495 20 15.3315 20 15V6.25C20 5.91848 19.8683 5.60054 19.6339 5.36612C19.3995 5.1317 19.0815 5 18.75 5V5ZM5 1.25H15V5H5V1.25ZM15 18.75H5V11.25H15V18.75ZM18.75 15H16.25V10H3.75V15H1.25V6.25H18.75V15ZM15.625 8.75H16.875C17.0408 8.75 17.1997 8.68415 17.3169 8.56694C17.4342 8.44973 17.5 8.29076 17.5 8.125C17.5 7.95924 17.4342 7.80027 17.3169 7.68306C17.1997 7.56585 17.0408 7.5 16.875 7.5H15.625C15.4592 7.5 15.3003 7.56585 15.1831 7.68306C15.0658 7.80027 15 7.95924 15 8.125C15 8.29076 15.0658 8.44973 15.1831 8.56694C15.3003 8.68415 15.4592 8.75 15.625 8.75Z",fill:"black"},null,-1)]))}const go=J(mo,[["render",vo]]),ho={class:"lofty-links"},yo=["onClick"],wo={__name:"detailBtns",props:{id:String},setup(f){const m=f,{collectStatus:o,listingId:a,info:v,sold:i}=G[m.id],{copyCode:l}=zt();async function d(){Pt(a,o.value,()=>{o.value=!o.value})}const u={twitter:"https://twitter.com/share?text=Instantly view all photos and details of this hot listing and own the perfect place before other buyers. &url=",facebook:"https://www.facebook.com/sharer/sharer.php?u=",pinterest:"https://pinterest.com/pin/create/button/?url="},r=[{icon:We,name:"X",fn:()=>h(u.twitter)},{icon:so,name:"Facebook",fn:()=>h(u.facebook)},{icon:ao,name:"Pinterest",fn:()=>h(u.pinterest)},{icon:fo,name:"Email",fn:g},{icon:Ut,name:"Copy Link",fn:I},{icon:go,name:"Print",fn:()=>{setTimeout(window.print,100)}}];function h(b=""){k(`${b}${window.location.href}`)}function k(b){const y=(window.screen.availWidth-800)/2,L=(window.screen.availHeight-600)/2,R=["width=800","height=600",`left=${y}`,`top=${L}`,"resizable=yes","scrollbars=yes"].join(",");window.open(b,"CenteredWindow",R)}function g(){var y;const b=document.createElement("a"),S=encodeURIComponent("Hot Listing - "+((y=v==null?void 0:v.value)==null?void 0:y.address)||""),_=encodeURIComponent("Hi. Take a look at this property: "+window.location.href);b.href=`mailto:?subject=${S}&body=${_}`,b.target="_blank",document.body.appendChild(b),b.click(),document.body.removeChild(b)}function I(){l(window.location.href)}return(b,S)=>(s(),c(D,null,[e(i)?V("",!0):(s(),c("div",{key:0,class:"lofty-btn-item lofty-save",onClick:d},[t("i",{class:M(["lofty_iconfont",e(o)?"lofty-icon-heart-fill":"lofty-icon-heart"])},null,2),S[0]||(S[0]=t("span",null,"Save",-1))])),z(at,{"menu-style":{padding:"0",width:"300px"},right:0,trigger:"click","hide-arrow":"","mobile-fix":"","fit-width":!1},{menu:E(()=>[t("ul",ho,[(s(),c(D,null,H(r,_=>t("li",{onClick:vt(()=>{var y;return(y=_.fn)==null?void 0:y.call(_)},["prevent"])},[(s(),j($t(_.icon))),t("span",null,C(_.name),1)],8,yo)),64))])]),default:E(()=>[S[1]||(S[1]=t("div",{class:"lofty-btn-item lofty-share"},[t("i",{class:"lofty_iconfont lofty-icon-big-normal-share"}),t("span",null,"Share")],-1))]),_:1})],64))}},ko={class:"lofty-school-panel"},_o=["onClick"],bo=["onMouseenter","onClick"],Co={class:"score-circle"},So={style:{"font-size":"24px"}},Ao={class:"school-info"},Io={class:"school-name lofty-ellipsis"},xo={class:"school-type"},Lo={key:1,class:"lofty-school-detail"},To={class:"school-title"},Mo={class:"detail-info"},Do={class:"value"},Po={class:"item"},Eo={class:"value"},Vo={key:0,class:"item"},$o={class:"value"},Bo={class:"item"},Ho={class:"value"},Ro={key:0,class:"mt20"},qo={class:"value"},Go={key:1,class:"mt20"},No={class:"value"},Oo={class:"mt20"},Uo={class:"value"},zo={class:"mt20"},jo={class:"value"},Zo={key:2,class:"no-school-data"},Yo={__name:"schoolPanel",props:ft({showContent:Boolean,id:String},{modelValue:{},modelModifiers:{}}),emits:ft(["mouseenter","changeSchoolType"],["update:modelValue"]),setup(f,{emit:m}){const{schoolGroups:o}=G[f.id],a=w(""),v=Bt(f,"modelValue"),i=m;function l(k){v.value=k.id,i("mouseenter")}function d(k){a.value=a.value===k.label?"":k.label,i("changeSchoolType",a.value)}const u=w({}),r=w(!1);function h(k){u.value=k,r.value=!0}return(k,g)=>(s(),c("div",ko,[e(r)?P((s(),c("div",Lo,[t("div",{class:"back-to-list",onClick:g[0]||(g[0]=I=>r.value=!1)},g[3]||(g[3]=[t("span",{class:"lofty_iconfont lofty-icon-prev"},null,-1),N("Back To Previous ")])),t("div",To,C(e(u).name),1),t("div",Mo,[t("div",null,[g[4]||(g[4]=t("div",{class:"label"},"Admission",-1)),t("div",Do,C(e(u).admission),1)]),t("div",Po,[g[5]||(g[5]=t("div",{class:"label"},"Level",-1)),t("div",Eo,C(e(u).gradeRange),1)]),e(u).gsRating?(s(),c("div",Vo,[g[6]||(g[6]=t("div",{class:"label"},"Rating",-1)),t("div",$o,C(e(u).gsRating),1)])):V("",!0),t("div",Bo,[g[7]||(g[7]=t("div",{class:"label"},"Library",-1)),t("div",Ho,C(e(u).library?"YES":"NO"),1)])]),e(u).phone?(s(),c("div",Ro,[g[8]||(g[8]=t("div",{class:"label"},"Phone",-1)),t("div",qo,C(e(u).phone),1)])):V("",!0),e(u).expenditure?(s(),c("div",Go,[g[9]||(g[9]=t("div",{class:"label"},"Expenditure",-1)),t("div",No,C(e(Zt)(e(u).expenditure,null,2,"$")),1)])):V("",!0),t("div",Oo,[g[10]||(g[10]=t("div",{class:"label"},"Address",-1)),t("div",Uo,C(e(u).address),1)]),t("div",zo,[g[11]||(g[11]=t("div",{class:"label"},"Ratio",-1)),t("div",jo,C(e(u).ratio),1)])],512)),[[B,f.showContent]]):(s(!0),c(D,{key:0},H(e(o),I=>P((s(),c("div",null,[t("div",{class:"group-title",onClick:b=>d(I)},[t("span",null,[N(C(I.label)+" ",1),t("span",null,C(I.data.length),1)]),t("i",{class:M(["lofty_iconfont lofty-icon-arrow_03_up",{reverse:e(a)!==I.label}])},null,2)],8,_o),t("div",{class:M([e(a)===I.label?"show-school":"hide-school"])},[(s(!0),c(D,null,H(I.data,b=>(s(),c("div",{onMouseenter:S=>l(b),onClick:S=>h(b),class:M([{active:v.value===b.id},"school-item"]),key:b.id},[t("div",Co,[t("span",So,C(b.gsRating),1),g[1]||(g[1]=t("span",{class:"small-number"},"/10",-1))]),t("div",Ao,[t("div",Io,C(b.name),1),t("div",xo,[t("span",null,C(b.type),1),g[2]||(g[2]=t("span",{style:{margin:"0 6px"}},"|",-1)),t("span",null,C(b.gradeRange),1)])])],42,bo))),128))],2)],512)),[[B,f.showContent]])),256)),e(o).length===0?(s(),c("div",Zo,g[12]||(g[12]=[t("div",{style:{"text-align":"center"}},[t("div",{class:"lofty_iconfont lofty-icon-school2"}),t("div",null,"No School Data")],-1)]))):V("",!0)]))}},Ko="data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1736910598105'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='25931'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M797.26907%20115.696523a366.825715%20366.825715%200%200%201%2074.005104%20124.61323%20441.829159%20441.829159%200%200%201%2025.649642%20150.262872%20467.094824%20467.094824%200%200%201-32.049253%20163.702055%201044.493347%201044.493347%200%200%201-79.124793%20162.754912%201474.214441%201474.214441%200%200%201-104.134474%20152.822716%203186.724806%203186.724806%200%200%201-105.081616%20128.145816%20120.927054%20120.927054%200%200%201-15.051886%2013.439183A53.193568%2053.193568%200%200%201%20526.591114%201023.954947h-3.199806a53.50075%2053.50075%200%200%201-35.581838-12.492041%20108.793391%20108.793391%200%200%201-14.411925-13.439184c-34.583499-40.16396-72.085221-83.962899-112.42837-131.345621a1468.505988%201468.505988%200%200%201-112.121189-149.62291%20970.437046%20970.437046%200%200%201-86.189963-160.195068A429.925882%20429.925882%200%200%201%20128.023327%20390.572625c0-51.785654%2010.930536-102.982544%2032.049253-150.262872A402.714735%20402.714735%200%200%201%20243.037139%20115.722122a393.140917%20393.140917%200%200%201%20124.920412-83.63012A366.185754%20366.185754%200%200%201%20517.631658%200.042749c55.036657-0.511969%20109.561344%2010.392969%20160.16947%2032.023655a340.228931%20340.228931%200%200%201%20119.49354%2083.630119z'%20fill='%235F3808'%20p-id='25932'%3e%3c/path%3e%3cpath%20d='M518.297217%20140.347826l205.760301%20198.055168a19.070841%2019.070841%200%200%201%205.734051%2014.027948%2018.533274%2018.533274%200%200%201-18.354085%2018.635668h-19.070841v168.181783a37.296934%2037.296934%200%200%201-37.271336%2037.424926h-93.485521V445.942061a18.789259%2018.789259%200%200%200-18.661266-18.789259h-74.824255a18.789259%2018.789259%200%200%200-18.661266%2018.789259v130.756857h-93.485521a37.296934%2037.296934%200%200%201-37.271335-37.834502v-168.181783h-17.662927a18.507676%2018.507676%200%200%201-14.027948-5.75965%2018.942849%2018.942849%200%200%201%200-26.494391l205.7603-198.055168a18.354085%2018.354085%200%200%201%2025.521649%200z'%20fill='%23FFFFFF'%20p-id='25933'%3e%3c/path%3e%3c/svg%3e",Fo={class:"lofty-detail-map"},Qo={class:"lofty-school-map-container"},Jo={key:0,class:"marker-box icon"},Xo=["src"],Wo={__name:"detailMap",props:{id:String},setup(f){const m=f,{info:o,location:a,onLoad:v,schoolMarkers:i}=G[m.id],l=w(!0),d=w(""),u=X(()=>d.value?i.value.filter(x=>x.group===d.value):i.value),r=w(null),h={zoom:14,center:{lat:0,lng:0}},k=w(""),g={mouseEnter:function(x){k.value=x.id,O.value=!1}},I=w("");lt(k,x=>{const n=i.value.find(p=>p.id===x);I.value=n.key,setTimeout(()=>{R(n.hjId)},300)});const b=w(!1);function S(x){r.value=x,setTimeout(()=>{b.value=!0},3e3)}let _=[];function y(){_.forEach(x=>{r.value.removeObject(x)}),_=[]}const L={};async function R(x){if(y(),L[x]){let n=L[x];F(n)}else{const n=await Q.get(`search/hj-data/v1/boundary?type=school&hjId=${x}`);L[x]=n.data||[],F(n.data||[])}}const O=w(!1);function F(x){if(x.forEach(n=>{n.forEach(p=>{const A=new window.H.geo.LineString;p.forEach($=>{A.pushPoint($)}),_.push(new window.H.map.Polygon(new window.H.geo.Polygon(A),{style:{strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)",fillColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-bgColor")||"rgba(25, 25, 25, 0.2)",lineWidth:2}}))})}),_.forEach(n=>{r.value.addObject(n)}),_.length>0&&O.value){let n=1/0,p=1/0,A=-1/0,$=-1/0;_.forEach(bt=>{const W=bt.getGeometry().getBoundingBox();n=Math.min(n,W.getBottom()),A=Math.max(A,W.getTop()),p=Math.min(p,W.getLeft()),$=Math.max($,W.getRight())});const ct=r.value.getZoom(),dt=new window.H.geo.Rect(A,p,n,$);r.value.getViewModel().setLookAtData({bounds:dt},!1);const yt=r.value.getZoom(),ut=3,wt=Math.max(ct-ut,4),kt=Math.min(ct+ut,20),_t=Math.max(wt,Math.min(yt,kt));r.value.getViewModel().setLookAtData({bounds:dt,zoom:_t},!0)}}const Y=w(!1);return Z(()=>{v.then(()=>{h.center.lat=+o.value.latitude,h.center.lng=+o.value.longitude,Y.value=!0})}),(x,n)=>(s(),c("div",Fo,[n[7]||(n[7]=t("div",{class:"lofty-detail-title"},"NEARBY SCHOOLS",-1)),t("div",Qo,[e(Y)?(s(),j(jt,{key:0,style:et({height:e(T)?"380px":"100%"}),config:h,onInit:S},{default:E(()=>[e(b)?(s(),c("div",Jo,[z(mt,{data:e(a),map:e(r)},{default:E(()=>[t("img",{src:e(Ko),width:"40",alt:"location"},null,8,Xo)]),_:1},8,["data","map"]),(s(!0),c(D,null,H(e(u),p=>(s(),j(mt,{class:"school",active:e(I),"onUpdate:active":n[0]||(n[0]=A=>tt(I)?I.value=A:null),key:p.key,map:e(r),data:p,events:g},null,8,["active","map","data"]))),128))])):V("",!0)]),_:1},8,["style"])):V("",!0),z(Yo,{modelValue:e(k),"onUpdate:modelValue":n[1]||(n[1]=p=>tt(k)?k.value=p:null),class:"school-area",onMouseenter:n[2]||(n[2]=p=>O.value=!0),onChangeSchoolType:n[3]||(n[3]=p=>d.value=p),showContent:e(l),style:et({width:e(l)?e(T)?"100%":"400px":"0",height:e(l)?e(T)?"fit-content":"460px":"0"}),id:f.id},null,8,["modelValue","showContent","style","id"]),P(t("div",{onClick:n[4]||(n[4]=p=>l.value=!1),class:"hide-school-button"},[t("span",{class:M(["lofty_iconfont lofty-icon-arrow_01_right",{reverse:e(l)}])},null,2),t("span",{style:{"margin-left":"-7px"},class:M(["lofty_iconfont lofty-icon-arrow_01_right",{reverse:e(l)}])},null,2)],512),[[B,!e(T)&&e(l)]]),P(t("div",{onClick:n[5]||(n[5]=p=>l.value=!0),class:"show-school-button"},n[6]||(n[6]=[t("span",{style:{"margin-right":"10px"}},"SCHOOLS",-1),t("span",{class:"lofty_iconfont lofty-icon-arrow_01_right"},null,-1),t("span",{style:{"margin-left":"-7px"},class:"lofty_iconfont lofty-icon-arrow_01_right"},null,-1)]),512),[[B,!e(T)&&!e(l)]])]),n[8]||(n[8]=t("div",{class:"school-disclaimer"},[N(" School data provided by "),t("a",{class:"disclaimer",target:"_blank",href:"https://www.greatschools.org",rel:"noopener"},"GreatSchools"),N(" for your convenience. Please contact schools directly for enrollment eligibility. ")],-1))]))}},ts={key:0,class:"lofty-detail-title"},es={class:"lofty-listing"},os={__name:"similarListing",props:{id:String},setup(f){const{listingId:m}=G[f.id];v();const o=w([]),a=w(!0);async function v(){const i={pageSize:4,detailId:m},l=await Q.get("/search/recommended-listings",{data:i});l.status.code===0&&(o.value=l.data.listings,o.value.forEach(Tt),a.value=o.value.length>0)}return(i,l)=>(s(),c("div",null,[e(a)?(s(),c("div",ts,"SIMILAR LISTINGS")):V("",!0),t("div",es,[(s(!0),c(D,null,H(e(o),d=>(s(),j(Yt,{house:d,class:"list-card"},null,8,["house"]))),256))])]))}};Kt();xt();rt.initState(()=>{Nt(),jQuery(".lofty-listing-detail-page").ready(function(){var i;const f=((i=document.querySelector(".lofty-listing-detail-page"))==null?void 0:i.getAttribute("id"))||"",m=At(f),{id:o,$:a}=m;ne(m);const{mapCenter:v}=m.getModuleData();q(pe,{id:o}).mount(a("#lofty-listing-pictures")),q(ve,{id:o}).mount(a("#lofty-open-fields")),q(wo,{id:o}).mount(a(".lofty-detail-btns")),q(Fe,{id:o}).mount(a("#lofty-request-tour")),v.lat&&v.lng&&q(Wo,{id:o}).mount(a("#lofty-detail-map-container")),q(os,{id:o}).mount(a("#lofty-detail-similar-listings"))})});
  • lofty-idx/trunk/assets/listing.js

    r3393952 r3393989  
    1 import{u as K,d as pe,g as le,h as F,o as Le,i as se,_ as Z}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{c as Ge}from"./module.CKjUdtPN.js";import{r as f,c as x,a as Q,b as ke,o as d,d as R,w as ie,e as a,t as S,u as c,f as Y,g as h,h as G,F as I,n as me,i as Ae,j as L,k as Ve,l as Ne,m as X,p as ge,q as E,v as Se,s as Pe,x as q,y as H,z as B,A as $e,B as Ce,C as be,T as fe,D as ue,E as Me,G as Te}from"./vendor.DSMCY3-_.js";import{i as Ie}from"./index.D8-cPlTE.js";import{s as ze}from"./loading.BdqyMKJZ.js";import{m as je,l as xe,_ as Je}from"./index.d_VP6W-1.js";import{g as Fe,f as qe}from"./house-format.Bvy9O_Yy.js";import{c as Ke,v as Ze}from"./verify-email.B_du1TfR.js";import{s as De,c as We}from"./index.C1-1XiZ9.js";import{S as Ye,g as Qe,a as Xe,l as et,c as tt}from"./popup-trigger.Clg3jXpa.js";import{c as Be,_ as ot,a as st}from"./mobileFilter.C7HBrZa9.js";import{_ as He}from"./index.BAT38o-R.js";import{P as it}from"./index.qpyE7W-K.js";import{_ as at}from"./index.BIsjoQ8l.js";import{p as nt}from"./standard.Cshs06GJ.js";import{M as ye}from"./marker.Gizt9EmX.js";import{d as Ue}from"./outsideclick.Bw_hMuzW.js";import{s as lt}from"./service.BOwSreoa.js";import{u as _e}from"./user.BF73KgDm.js";import{a as rt}from"./auto-login.DOr0ALS4.js";import{a as ut,s as ct}from"./popup-mls.BZWi9Sqc.js";import"./date-format.BrUodQAJ.js";import"./index.DNn1etY9.js";import"./index.DAwEVGKX.js";import"./number-format.CLdvQh6j.js";import"./google.Cnb9DEy-.js";import"./index.DMIL01Q7.js";import"./useConfirm.BQXs6K30.js";const Re=K.getTimeZone(),ae={};function dt(t){const e={cancelList:null,cancelMap:null,module:t,hasMap:f(!0),showMap:f(!K.isMobile),featureListingName:f(""),listingType:x(()=>e.featureListingName.value&&!e.sold.value?"featured-listing":e.sold.value?"sold-listing":""),counts:f(0),totalPage:f(0),searchType:f("All"),listings:f([]),mlsList:Q([]),listingSort:f("RELEVANCE"),currPage:f(1),pageSize:f(12),address:f(""),condition:Q({}),uiConfig:Q({}),sold:f(!1),map:f(null),zoom:f(14),mapSyncList:f(!1),rect:null,mapSyncType:f(""),mapPath:f(""),needMapPath:x(()=>["mapArea","polygon"].includes(e.mapSyncType.value)),mapRadius:f([]),polygonPath:f([]),markerData:Q({aggregation:[],house:[],school:[],activeHouse:null,activeHouseKey:1}),showSchool:f(!1),schoolData:{},drawing:f(!1),geometry:f([]),shortCodeConfig:f({}),isShortCode:x(()=>!!e.shortCodeConfig.value.layout)},l={searchList:pe(async function(){try{e.cancelList&&e.cancelList.cancel("search-list canceled due to new request."),e.cancelList=ke.CancelToken.source();const o={condition:JSON.stringify(n.formatCondition()),pageSize:e.pageSize.value,page:e.currPage.value,currPage:e.currPage.value,listingSort:e.listingSort.value,listingType:e.listingType.value,featureListingName:e.featureListingName.value,timeline:!0,mls_list_id:JSON.stringify(e.mlsList),uiConfig:JSON.stringify(e.uiConfig),timezone:Re};let s=le();if(s.mlsOrgId&&s.complianceCheck&&(o.mlsOrgId=s.mlsOrgId,o.complianceCheck=s.complianceCheck),e.mapSyncList.value){let M=n.formatCondition();if(e.mapSyncType.value==="radius")M.location={mapRadius:e.mapRadius.value};else if(e.needMapPath.value&&(M.location={mapPath:e.mapPath.value},!e.mapPath.value))return;o.condition=JSON.stringify(M)}const i={action:"lofty_idx_api",data:o,cancelToken:e.cancelList.token},r=e.module.$(".lofty-listing"),y=ze(r);r.classList.add("lofty-empty-listing"),n.asyncListConditionToUrl(o);const g=await F.get("/search/realTimeListings",i);y(),r.innerHTML=g.data.html,e.totalPage.value=g.data.totalPage,e.counts.value=g.data.counts,e.listings.value=g.data.listings,e.searchType.value=g.data.searchType;const P=r.querySelectorAll(".lofty-house-tag"),O=[];for(const M of g.data.listings)Ye.includes(M.mlsOrgId)&&O.push(M.id);if(O!=null&&O.length){const M=await Qe(O,e.listingType.value==="sold-listing");M&&Object.keys(M).length&&e.listings.value.forEach((U,V)=>{const ee=M[U.id]||!1;e.listings.value[V]={...U,mlsOrg:{...U.mlsOrg,cardTemplate:Xe(U,ee,"cardTemplate")}},P[V]&&(P[V].textContent=e.listings.value[V].mlsOrg.cardTemplate)})}P.forEach(M=>{M.style.display="block"}),r.classList.remove("lofty-empty-listing"),l.addCardEvents()}catch{}},300),searchMap:pe(async function(){if(!(!e.showMap.value||!e.map.value||!Number.isInteger(e.zoom.value)))try{e.cancelMap&&e.cancelMap.cancel("search-map canceled due to new request."),e.cancelMap=ke.CancelToken.source(),e.mapSyncList.value&&e.needMapPath.value&&(await l.getMapPath(),e.currPage.value=1,l.searchList());const o={mobile:K.isMobile,mapSearch:!0,layoutType:"map",listingSort:e.listingSort.value,listingType:e.listingType.value,featureListingName:e.featureListingName.value,zoom:e.zoom.value,rect:n.getRect(),condition:JSON.stringify(n.formatCondition()),timezone:Re};let s=le();s.mlsOrgId&&s.complianceCheck&&(o.mlsOrgId=s.mlsOrgId,o.complianceCheck=s.complianceCheck),n.formatLocation(o);const i={action:"lofty_idx_api",data:o,cancelToken:e.cancelMap.token};l.searchSchool(e.schoolData),n.asyncMapConditionToUrl();const r=await F.get("/search/realTimeListings",i);e.markerData.aggregation=n.dealAggregationData(r.data.aggregation||[]),e.markerData.house=n.dealHouseData(r.data.house||[]),e.markerData.activeHouse=null,e.markerData.activeHouseKey=Date.now()}catch{}},300),searchSchool:pe(async function(o){if(e.showSchool.value){e.schoolData=o;const s={...o,condition:JSON.stringify(n.formatCondition()),zoom:e.zoom.value,rect:n.getRect(),mapSearch:!1,t:Date.now()};if(e.mapSyncList.value){let r=n.formatCondition();r.location={},s.condition=JSON.stringify(r),n.formatLocation(s)}e.markerData.school=[];const i=await F.get("/search/schools",{data:s});i&&i.data&&(e.markerData.school=i.data.map(r=>(r.key=`school-${r.latitude}${r.longitude}${Date.now()}`,r.lat=+r.latitude,r.lng=+r.longitude,r)))}},300),async getMapPath(){const o={data:{mapPointList:je.getFormatBounds(e.map.value)}};e.mapSyncType.value==="polygon"&&(o.data.mapPointList=e.polygonPath.value);const s=await F.post("/search/mapPath",o);e.mapPath.value=s.data.regionId},removeMapTag(){e.mapSyncList.value=!1,e.mapSyncType.value="",e.mapPath.value=null,e.polygonPath.value=[],e.mapRadius.value=[]},addCardEvents(){const o=t.$all(".lofty-listing .lofty-house-item");Array.from(o).forEach(s=>{const i=s.querySelector(".collect-heart");i&&(i.onclick=()=>{const y=s.getAttribute("house-id"),g=i.classList.contains("lofty-icon-heart-fill");Ke(y,g,()=>{g?(i.classList.remove("lofty-icon-heart-fill"),i.classList.add("lofty-icon-heart")):(i.classList.remove("lofty-icon-heart"),i.classList.add("lofty-icon-heart-fill"))})});const r=s.querySelector(".lofty-house-login-box");r&&(r.querySelector(".lofty-register")&&(r.querySelector(".lofty-register").onclick=()=>{De(()=>{window.location.reload()},"","register")}),r.querySelector(".lofty-login")&&(r.querySelector(".lofty-login").onclick=()=>{De(()=>{window.location.reload()},"","login")}),r.querySelector(".lofty-verify")&&(r.querySelector(".lofty-verify").onclick=()=>{Ze()}))})}},n={formatCondition(){let o={};for(let s in e.condition){let i=e.condition[s];e.uiConfig[s]&&e.uiConfig[s].sqft==="acre"&&(i=i.split(",").map(r=>+r?+r*43560:"").toString()),Ie(i)&&(o[s]=i)}if(e.address.value="",o.location&&e.mapSyncList.value===!1){const s=Object.values(o.location).reduce((i,r)=>i.concat(r),[]);s.length===1&&(e.address.value=s[0].split(",")[0])}return o},formatLocation(o){if(e.mapSyncType.value==="polygon"){let s=n.formatCondition();s.location={mapPath:e.mapPath.value},o.condition=JSON.stringify(s)}else if(e.mapSyncType.value==="radius"){let s=n.formatCondition();s.location={mapRadius:e.mapRadius.value},o.condition=JSON.stringify(s)}},asyncListConditionToUrl(o){if(e.isShortCode.value)return;let s=window.location.pathname,i=le();Object.entries(o).forEach(([r,y])=>{let g=y;typeof y=="object"&&(g=JSON.stringify(y)),(r==="uiConfig"||r==="condition")&&(g=encodeURIComponent(g)),g&&["currPage","pageSize","listingSort","listingType","uiConfig","condition","featureListingName"].includes(r)&&(i[r]=g),i.address=encodeURIComponent(e.address.value),document.querySelector(".lofty-is-shortcode")||(i.pageKey=e.sold.value?"sold_listing":"search")}),i.hideMap=e.showMap.value?0:1,s=s+"?"+Le(i),window.history.pushState(null,"",s)},asyncMapConditionToUrl(){if(e.isShortCode.value)return;let o=window.location.pathname,s=le();delete s.rect,delete s.polygonPath,delete s.mapRadius,s.zoom=e.zoom.value,s.condition&&(s.condition=encodeURIComponent(s.condition)),s.uiConfig&&(s.uiConfig=encodeURIComponent(s.uiConfig)),e.mapSyncList.value&&(e.mapSyncType.value==="mapArea"?s.rect=encodeURIComponent(n.getRect()):e.mapSyncType.value==="polygon"?s.polygonPath=encodeURIComponent(JSON.stringify(e.polygonPath.value)):e.mapSyncType.value==="radius"&&(s.mapRadius=encodeURIComponent(JSON.stringify(e.mapRadius.value)))),o=o+"?"+Le(s),window.history.pushState(null,"",o)},initConditionFromUrl(){var s,i;const o=le();if(o.currPage||o.condition){let r=o.condition?JSON.parse(decodeURIComponent(o.condition)):{},y=o.uiConfig?JSON.parse(decodeURIComponent(o.uiConfig)):{};(s=r.location)!=null&&s.mapPath&&delete r.location.mapPath,(i=r.location)!=null&&i.mapRadius&&(o.mapRadius||(o.mapRadius=JSON.stringify(r.location.mapRadius)),delete r.location.mapRadius),o.rect?(e.rect=decodeURIComponent(o.rect),e.mapSyncType.value="mapArea",e.mapSyncList.value=!0):o.polygonPath?(e.polygonPath.value=JSON.parse(decodeURIComponent(o.polygonPath)),e.mapSyncType.value="polygon",e.mapSyncList.value=!0):o.mapRadius&&(e.mapSyncType.value="radius",e.mapRadius.value=JSON.parse(decodeURIComponent(o.mapRadius)),e.mapSyncList.value=!0),Object.keys(r).forEach(g=>{e.condition[g]=r[g]}),Object.keys(y).forEach(g=>{e.uiConfig[g]=y[g]}),e.address.value=decodeURIComponent(o.address||""),e.listingSort.value=o.listingSort||"RELEVANCE",e.currPage.value=+o.currPage||1,e.pageSize.value=+o.pageSize||12,e.zoom.value=+o.zoom||14,e.showMap.value=o.hideMap!=="1"}},dealAggregationData(o){return o.forEach(s=>{s.key=`key-${s.latitude}${s.longitude}${Date.now()}`,s.lat=+s.latitude,s.lng=+s.longitude,Array.isArray(s.bounds)&&(s.bounds=s.bounds.map(i=>({lat:i.latitude,lng:i.longitude})))}),o},dealHouseData(o){o=o.filter(r=>!Fe(r));function s(r){return r.reduce((y,g)=>{if(y===null)return g;let P=y.soldPrice||y.price;return(g.soldPrice||g.price)<P?g:y},null)}const i=xe.generateDataByLatlng(o);return i.forEach(r=>{const y=s(r.items);r.key=`key-${r.lat}${r.lng}${Date.now()}`,r.price=y.soldPrice||y.price,r.nodisclosureDes=y.nodisclosureDes,r.items.forEach(g=>qe(g))}),i},getRect(){const o=e.map.value.getViewModel().getLookAtData().bounds.getBoundingBox();if(o)return`${o.getTop()},${o.getLeft()},${o.getBottom()},${o.getRight()}`},toggleMap(){e.showMap.value=!e.showMap.value,e.currPage.value=1,e.pageSize.value=e.showMap.value?12:24,n.toggleClass(),l.searchList()},toggleClass(){e.hasMap.value&&(e.showMap.value?(t.$(".lofty-result-listing").classList.add("has-map"),t.$("#lofty-map-container").classList.remove("lofty-hidden")):(t.$(".lofty-result-listing").classList.remove("has-map"),t.$("#lofty-map-container").classList.add("lofty-hidden")))}},u=t.getModuleData();return e.counts.value=u.counts||0,e.mlsList=Q(u.mls_list),e.searchType.value=u.searchType,e.totalPage.value=u.totalPage||0,e.sold.value=u.sold,e.hasMap.value=u.hasMap,e.shortCodeConfig.value=u.shortcode_config||{},e.featureListingName.value=u.featureListingName||"",e.shortCodeConfig.value.layout||n.initConditionFromUrl(),l.searchList(),{...e,...l,formatCondition:n.formatCondition,formatLocation:n.formatLocation,getRect:n.getRect,toggleMap:n.toggleMap,toggleClass:n.toggleClass,dealHouseData:n.dealHouseData}}function ht(t){ae[t.id]=dt(t)}const pt={class:"lofty-show-more-name"},gt={key:0},mt={class:"lofty-more-panel"},ft={class:"lofty-more-filter-title"},yt={class:"lofty-more-filter-count"},vt={class:"lofty-group-name"},wt={class:"lofty-group-wrapper"},St={class:"lofty-condition-label"},Ct={__name:"moreFilter",props:{moreConfigs:{type:Array,required:!0},condition:Object,uiConfig:Object},setup(t){const e=t,l=x(()=>{const o=new Set;return e.moreConfigs.forEach(s=>{s.conditions.forEach(i=>{o.add(i.name)})}),o}),n=x(()=>{let o=0;for(let s in e.condition){const i=e.condition[s];if(Ie(i)&&l.value.has(s)&&(o++,typeof i=="string")){const r=i.split(",");r.length===2&&r.every(y=>!!y)&&o++}}return o});function u(){for(const o of l.value){const s=e.condition[o];Array.isArray(s)?e.condition[o]=[]:typeof s=="object"?e.condition[o]={}:typeof s=="boolean"?e.condition[o]=!1:typeof s=="string"&&(e.condition[o]="")}}return(o,s)=>(d(),R(He,{class:"lofty-more-box",right:0,menuStyle:{paddingRight:0},clickMenuClose:!1,"fit-width":!1},{menu:ie(()=>[a("div",mt,[a("div",ft,[a("div",yt,S(c(n))+" Filters Applied",1),a("div",{class:"lofty-clear-filter",onClick:u},s[1]||(s[1]=[a("i",{class:"lofty_iconfont lofty-icon-reset"},null,-1),Y(" Clear")]))]),(d(!0),h(I,null,G(t.moreConfigs,i=>(d(),h("div",{class:"lofty-condition-group",key:i.name},[a("p",vt,S(i.nameText),1),a("div",wt,[(d(!0),h(I,null,G(i.conditions,r=>(d(),h("div",{key:r.name,class:"lofty-condition-label-input",style:me({width:r.inputType==="keyWord"?"100%":""})},[a("p",St,[a("span",null,S(r.label),1)]),(d(),R(Ae(c(Be)[r.inputType]),{modelValue:t.condition[r.name],"onUpdate:modelValue":y=>t.condition[r.name]=y,key:r.name,uiConfig:t.uiConfig,config:r},null,8,["modelValue","onUpdate:modelValue","uiConfig","config"]))],4))),128))])]))),128))])]),default:ie(()=>[a("span",pt,[s[0]||(s[0]=Y("More ")),c(n)?(d(),h("span",gt,"("+S(c(n))+")",1)):L("",!0)])]),_:1}))}},bt={class:"lofty-listing-search"},Lt={key:1,class:"lofty-multi-filter"},kt=["disabled"],Pt={class:"save-search-pop-container"},Mt={class:"save-search-pop-content"},Tt={__name:"searchBar",props:{id:String},setup(t){const e=t,{counts:l,currPage:n,pageSize:u,searchList:o,condition:s,formatCondition:i,formatLocation:r,polygonPath:y,getRect:g,listingSort:P,uiConfig:O,sold:M,zoom:U,address:V,mapSyncList:ee,mapSyncType:A,removeMapTag:te,isShortCode:W}=ae[e.id],[T,k,N,ne]=[f([]),f([]),f([]),f([])],ce=x(()=>{if(ee.value){if(A.value==="mapArea")return["Map Area"];if(A.value==="polygon")return["Polygon Search"];if(A.value==="radius")return["Radius Search"]}return[]}),de=f({});async function ve(){const j={data:{isSold:M.value},headers:{}};W.value||(j.headers.trackingpagekey=M.value?"sold_listing":"search");const w=await F.get("/search/center/conditions",j);w.data.configs.forEach(b=>{let D=null;b.conditions.forEach(($,we)=>{$.name==="location"&&(D=we,de.value=$),$.inputType==="suggestion"&&!s[$.name]&&(s[$.name]={}),["multiSelect","singleSelect","keyWord"].includes($.inputType)&&!s[$.name]&&(s[$.name]=[])}),D!==null&&b.conditions.splice(D,1)}),T.value=w.data.configs.filter(b=>b.conditions.length>0),ne.value=JSON.parse(JSON.stringify(T.value));let _=0;T.value.forEach(b=>{b.conditions.forEach(D=>{_<4&&["singleSelect","multiSelect","inputBox","checkBox"].includes(D.inputType)&&(k.value.push(D),_++)}),b.conditions=b.conditions.filter(D=>!k.value.some($=>$.name===D.name)),b.conditions.length>0&&N.value.push(b)}),ge(s,()=>{n.value=1,o()})}const oe=Ve("popRef");function he(){We(()=>{oe.value.open()})}Ne(()=>{ve()});const v=x(()=>Object.values(i()).length===0&&!A.value),p=f(""),m=f(7),C=[{label:"Instantly",value:0},{label:"Daily",value:1},{label:"Weekly",value:7},{label:"Biweekly",value:14},{label:"Monthly",value:28}];async function z(){let j=p.value.trim();if(j){const w={condition:i(),uiConfig:O,address:V.value,listingSort:P.value,currPage:n.value,pageSize:u.value,zoom:U.value,timezone:K.getTimeZone()};if(A.value==="polygon"&&(w.polygonPath=y.value),A.value==="mapArea"){const b=g(),D=b.split(",");w.rect=b;let $=[{lat:D[0],lng:D[1]},{lat:D[0],lng:D[3]},{lat:D[2],lng:D[3]},{lat:D[2],lng:D[1]}];$=$.map(we=>JSON.stringify(we)),w.condition.location={mapPath:$}}r(w);const _={saveName:j,searchCondition:JSON.stringify(w),mailFrequency:m.value};try{const b=await F.post("/wp-plugin/save-search/saveSearch",{data:_});b.status.code===0&&(p.value="",K.toast(b.data),oe.value.close())}catch(b){console.error("save-search/saveSearch",b)}}}function J(){oe.value.close()}return(j,w)=>(d(),h("div",bt,[X(ot,{class:"location-suggestion",modelValue:c(s).location,"onUpdate:modelValue":w[0]||(w[0]=_=>c(s).location=_),config:c(de),"custom-tag":c(ce),onRemoveCustomTag:c(te)},null,8,["modelValue","config","custom-tag","onRemoveCustomTag"]),c(se)?(d(),R(st,{key:0,condition:c(s),mobileConfigs:c(ne),uiConfig:c(O),counts:c(l),onSaveSearch:he},null,8,["condition","mobileConfigs","uiConfig","counts"])):(d(),h("div",Lt,[(d(!0),h(I,null,G(c(k),_=>(d(),R(Ae(c(Be)[_.inputType]),{modelValue:c(s)[_.name],"onUpdate:modelValue":b=>c(s)[_.name]=b,class:"lofty-filter-block","show-default-label":!0,"fit-width":!1,uiConfig:c(O),config:_,outSide:""},null,8,["modelValue","onUpdate:modelValue","uiConfig","config"]))),256)),c(N).length>0?(d(),R(Ct,{key:0,class:"lofty-filter-block",moreConfigs:c(N),uiConfig:c(O),condition:c(s)},null,8,["moreConfigs","uiConfig","condition"])):L("",!0),c(M)?L("",!0):(d(),h("button",{key:1,class:"save-search lofty-btn",disabled:c(v),onClick:he},w[3]||(w[3]=[a("span",null,"Save Search",-1)]),8,kt))])),X(it,{ref_key:"popRef",ref:oe,class:"save-search-pop"},{default:ie(()=>[a("div",Pt,[w[6]||(w[6]=a("div",{class:"title"},"SAVE THIS SEARCH",-1)),a("div",Mt,[w[4]||(w[4]=a("div",{class:"label"},"Name This Search",-1)),E(a("input",{"onUpdate:modelValue":w[1]||(w[1]=_=>Pe(p)?p.value=_:null),placeholder:"Type Something"},null,512),[[Se,c(p)]]),w[5]||(w[5]=a("div",{class:"label mt20"},"Property Alert",-1)),X(at,{class:"mt20",modelValue:c(m),"onUpdate:modelValue":w[2]||(w[2]=_=>Pe(m)?m.value=_:null),list:C},null,8,["modelValue"])]),a("div",{class:"save-search-footer"},[a("div",{class:"footer-cancel",onClick:J},"Cancel"),a("div",{class:"footer-save lofty-btn",onClick:z},"Save")])])]),_:1},512)]))}},Dt={class:"lofty-listing-top"},_t={key:0,class:"lofty-page-title"},Rt={key:1,class:"lofty-page-title"},Et={key:0},Ot={key:0,class:"lofty-current-filter"},At={key:1,class:"lofty-map-filter"},Nt={style:{margin:"0 10px"}},$t={class:"lofty-sort-list"},It=["onClick"],jt={class:"lofty_iconfont lofty-icon-checked"},Bt={class:"lofty-filter-name"},Ht={__name:"listingFilter",props:{id:String},setup(t){const e=t,{counts:l,listingSort:n,currPage:u,searchType:o,searchList:s,hasMap:i,showMap:r,address:y,sold:g,toggleMap:P,toggleClass:O}=ae[e.id],M=x(()=>l.value?l.value.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):"0"),U=x(()=>o.value==="sold"?l.value===1?"Sold Property Available":"Sold Properties Available":o.value==="For Rent"?l.value===1?"Property ForRent":"Properties For Rent":o.value==="For Sale"?l.value===1?"Property ForSale":"Properties For Sale":o.value==="neighborhood"?l.value===1?"Property AvailableNearby":"Properties AvailableNearby":"Properties Available"),V=x(()=>g.value?A.value:ee.value),ee=f([{value:"RELEVANCE",label:"Default"},{value:"PRICE_DESC",label:"Price-High To Low"},{value:"PRICE_ASC",label:"Price-Low To High"},{value:"MLS_LIST_DATE_L_DESC",label:"Newest Listings"},{value:"BEDROOMS_DESC",label:"Beds (Most)"},{value:"BATHS_DESC",label:"Baths (Most)"},{value:"BUILT_YEAR_DESC",label:"Year Built (Newest)"},{value:"SQFT_DESC",label:"Square Feet (Biggest)"}]),A=f([{value:"RELEVANCE",label:"Default"},{value:"MLS_LIST_DATE_L_DESC",label:"Most Recent"},{value:"PRICE_DESC",label:"Price-Highest"},{value:"PRICE_ASC",label:"Price-Lowest"},{value:"BEDROOMS_DESC",label:"Beds (Most)"},{value:"BATHS_DESC",label:"Baths (Most)"},{value:"BUILT_YEAR_DESC",label:"Year Built (Newest)"}]),te=x(()=>{var T;return(T=V.value.find(k=>k.value===n.value))==null?void 0:T.label});function W(T){n.value!==T.value&&(n.value=T.value,u.value=1,s())}return Ne(()=>{O()}),(T,k)=>E((d(),h("div",Dt,[c(l)===0?(d(),h("p",_t,"0 Properties")):(d(),h("p",Rt,[Y(S(c(M))+" "+S(c(U))+" ",1),c(y)?(d(),h("span",Et," In "+S(c(y)),1)):L("",!0)])),X(He,{class:"lofty-sort-filter",top:40,right:c(se)?"auto":0,left:c(se)?0:"auto","fit-width":!1,hideArrow:!0},{menu:ie(()=>[a("ul",$t,[(d(!0),h(I,null,G(c(V),N=>(d(),h("li",{class:"lofty-filter-item",onClick:ne=>W(N)},[Y(S(N.label)+" ",1),E(a("i",jt,null,512),[[q,c(n)===N.value]])],8,It))),256))])]),default:ie(()=>[c(se)?(d(),h("span",Ot,[Y(S(c(te))+" ",1),k[2]||(k[2]=a("i",{class:"lofty_iconfont lofty-icon-sort_04"},null,-1))])):(d(),h("span",At,[k[3]||(k[3]=a("span",{style:{color:"#A8A8A8"}},"Sort by",-1)),a("span",Nt,S(c(te)),1),k[4]||(k[4]=a("i",{class:"lofty_iconfont lofty-icon-sort_04"},null,-1))]))]),_:1},8,["right","left"]),!c(se)&&c(i)?(d(),h("span",{key:2,class:"lofty-map-filter",onClick:k[0]||(k[0]=(...N)=>c(P)&&c(P)(...N))},[a("span",Bt,S(c(r)?"Hide Map":"Show Map"),1),k[5]||(k[5]=a("i",{class:"lofty_iconfont lofty-icon-map_01"},null,-1))])):L("",!0),c(se)&&c(i)?(d(),h("div",{key:3,class:"lofty-map-mobile-btn",onClick:k[1]||(k[1]=(...N)=>c(P)&&c(P)(...N))},k[6]||(k[6]=[a("i",{class:"lofty_iconfont lofty-icon-map_01"},null,-1),a("span",null,"Map",-1)]))):L("",!0)],512)),[[q,!c(se)||!c(r)||!c(i)]])}},Ut={__name:"listingPagination",props:{id:String},setup(t){const e=t,{currPage:l,totalPage:n,counts:u,searchList:o}=ae[e.id],s=i=>{l.value=i.page,o()};return(i,r)=>c(u)>1?(d(),R(nt,{key:0,totalPage:c(n),onPageChange:s,pageSize:24,noScroll:!0,pageNum:c(l)},null,8,["totalPage","pageNum"])):L("",!0)}},Gt={name:"Select",inject:["isMobile"],directives:{outSideClick:Ue},props:{value:{default:()=>({label:"1 Miles",value:1})},dataList:{type:Array,default:()=>[]}},data(){return{showList:!1}},methods:{changeSelect(t){this.$emit("change",t),this.showList=!1},switchDataList(){this.showList=!this.showList,this.$emit("closeSuggestion")},closeDataList(){this.showList=!1}},mounted(){this.isMobile?(this.$refs.switch.addEventListener("touchend",this.switchDataList),window.addEventListener("resize",this.closeDataList)):this.$refs.switch.addEventListener("click",this.switchDataList)},beforeDestroy(){this.isMobile&&window.removeEventListener("resize",this.closeDataList)}},Vt={class:"select-wrapper"},zt={ref:"switch"},xt={class:"label-txt"},Jt=["onClick"];function Ft(t,e,l,n,u,o){const s=$e("out-side-click");return E((d(),h("div",Vt,[a("div",zt,[a("span",xt,S(l.value.label),1),a("span",{class:H(["lofty_iconfont lofty-icon-arrow-down",{up:u.showList}])},null,2)],512),E(a("div",{class:"data-list",id:"select-radius-list",onWheel:B(()=>{},["stop"]),onDrag:B(()=>{},["stop"]),onTouchmove:B(()=>{},["stop"]),onTouchstart:B(()=>{},["stop"]),onTouchend:B(()=>{},["stop"])},[a("ul",null,[(d(!0),h(I,null,G(l.dataList,(i,r)=>(d(),h("li",{key:r,onClick:y=>o.changeSelect(i)},S(i.label),9,Jt))),128))])],544),[[q,u.showList]])])),[[s,()=>{u.showList=!1}]])}const qt=Z(Gt,[["render",Ft]]);let re="";const Kt={name:"radius-search",inject:["isMobile"],data(){return{location:re,suggestList:[],latlng:null,mileList:[1,1.5,2,2.5,3,3.5,4,4.5,5,10,15,20,25,30,50].map(t=>({value:t,label:t+(t>1?" miles":" mile")})),showSuggest:!1}},computed:{radiusValue(){return{value:this.radius,label:`${this.radius} ${this.radius>1?"miles":"mile"}`}}},props:{map:{type:Object},showRadiusOption:{type:Boolean},clearKey:{type:Number,default:1},radius:{type:Number,default:1}},components:{Select:qt},watch:{clearKey(){re=""}},methods:{searchSuggest:K.debounce(async function(t){const e={query:t.target.value,country:"usa",beginHighlight:encodeURIComponent("<mark>"),endHighlight:encodeURIComponent("</mark>"),maxresults:20},n=(await F.get("/search/home-j/here-api/autoSuggest",{data:e})).data.filter(o=>!!o.address.street),u=[];for(let o=0,s=0,i=n.length;s<5&&o<i;o++){let r=this.formatAddress(n[o]);r&&u.indexOf(r)===-1&&(u.push(r),s++)}this.suggestList=u,this.showSuggest=!0}),async changeLocation(t){re=t.replace(/<mark>|<\/mark>/g,""),this.location=re;let e=await lt.geocode(t.replace(/<mark>|<\/mark>/g,""),!0);this.latlng=e.center,this.$emit("submit",{location:this.latlng,radius:this.radiusValue.value}),this.showSuggest=!1},changeRadius(t){this.$emit("submit",{location:this.latlng,radius:t.value})},clearLocation(){re="",this.location="",this.showSuggest=!1},handleMutual(){this.$refs.select.showList=!1,this.showSuggest=!0},stopResizeEvent(t){return t&&t.preeventDefault?t.preeventDefault():window.event.returnValue=!1,!1},closeSuggestion(){this.showSuggest=!1},formatAddress(t){let e=t.address,l=this.getAddressItem(e,["houseNumber","street"])+this.getAddressItem(e,["city"]);return l?decodeURIComponent(l+this.getAddressItem(e,["state","postalCode"],!1)):null},getAddressItem(t,e,l){let n=[],u;for(let o=0,s=e.length;o<s;o++){let i=t[e[o]];i&&u!==i&&n.push(u=i)}return n.length?n.join(" ")+(l===!1?"":", "):""}},mounted(){this.isMobileSize&&window.addEventListener("resize",this.stopResizeEvent,!1)},beforeUnmount(){this.isMobile&&window.removeEventListener("resize",this.stopResizeEvent)}},Zt={class:"radius-search"},Wt={class:"position-wrapper"},Yt={class:"select-container"},Qt={class:"key-search"},Xt={class:"autocomplete"},eo=["onClick"],to=["innerHTML"];function oo(t,e,l,n,u,o){const s=Ce("Select");return E((d(),h("div",Zt,[e[12]||(e[12]=a("div",{class:"radius-search-title"},"Radius",-1)),a("div",Wt,[a("div",Yt,[X(s,{dataList:u.mileList,value:o.radiusValue,onChange:o.changeRadius,onCloseSuggestion:o.closeSuggestion,ref:"select"},null,8,["dataList","value","onChange","onCloseSuggestion"]),e[8]||(e[8]=a("span",{class:"select-tag"},"near",-1))]),a("div",Qt,[e[9]||(e[9]=a("i",{class:"lofty_iconfont lofty-icon-search"},null,-1)),E(a("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=i=>u.location=i),onMousedown:e[1]||(e[1]=B(()=>{},["stop"])),onDblclick:e[2]||(e[2]=B(()=>{},["stop"])),onFocus:e[3]||(e[3]=B((...i)=>o.handleMutual&&o.handleMutual(...i),["stop"])),onTouchstart:e[4]||(e[4]=B((...i)=>o.handleMutual&&o.handleMutual(...i),["stop"])),onInput:e[5]||(e[5]=B((...i)=>o.searchSuggest&&o.searchSuggest(...i),["stop"])),placeholder:"Input a location to center the map",ref:"input",class:H({"show-clear-content":u.location})},null,34),[[Se,u.location]]),u.location?(d(),h("i",{key:0,class:"lofty_iconfont lofty-icon-close",onClick:e[6]||(e[6]=(...i)=>o.clearLocation&&o.clearLocation(...i))})):L("",!0)]),e[11]||(e[11]=a("div",{class:"arrow-style"},null,-1)),E(a("ul",Xt,[(d(!0),h(I,null,G(u.suggestList,i=>(d(),h("li",{key:i,class:"item",onClick:r=>o.changeLocation(i)},[e[10]||(e[10]=a("i",{class:"lofty_iconfont lofty-icon-location_02"},null,-1)),a("span",{innerHTML:i},null,8,to)],8,eo))),128))],512),[[q,u.suggestList.length>0&&u.showSuggest]]),a("span",{class:"lofty_iconfont lofty-icon-close",id:"close_radius_search_form",onClick:e[7]||(e[7]=B(i=>t.$emit("onClose"),["stop"]))})])],512)),[[q,l.showRadiusOption]])}const so=Z(Kt,[["render",oo]]),io=1609.344,ao={mixins:[ye],inject:["isMobile"],props:{radius:{type:Number,default:1},clearKey:{type:Number,default:1}},components:{radiusOption:so},data(){return{showRadiusOption:!1,className:"search-radius"}},methods:{async initCircle(){this.circle&&this.map.removeObject(this.circle),this.circle=new window.H.map.Circle(this.data,this.radius*io,{style:{strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)",lineWidth:2,fillColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-bgColor")||"rgba(25, 25, 25, 0.2)"}}),this.circle.addEventListener("tap",()=>{this.showRadiusOption=!0}),this.circle.addEventListener("pointerenter",()=>{document.body.style.cursor="pointer"}),this.circle.addEventListener("pointerleave",()=>{document.body.style.cursor="default"}),this.map.addObject(this.circle),this.updateRadiusOption()},updateRadiusOption(){this.map&&this.circle&&this.map.getViewModel().setLookAtData({bounds:this.circle.getBoundingBox()},!0)},updateCircle(t){const e={location:t.location||this.data,radius:t.radius||this.radius};this.$emit("updateCircle",e)},onOpen(){this.showRadiusOption=!0},onClose(){this.showRadiusOption=!1}},mounted(){this.showRadiusOption=!0,this.initCircle()},unmounted(){this.circle&&this.map.removeObject(this.circle)}};function no(t,e,l,n,u,o){const s=Ce("radius-option");return t.parentDom?(d(),R(fe,{key:0,to:t.parentDom},[a("div",be({class:"radius-center",onClick:e[0]||(e[0]=(...i)=>o.onOpen&&o.onOpen(...i)),onTouch:e[1]||(e[1]=(...i)=>o.onOpen&&o.onOpen(...i)),id:"open_radius_search_form"},t.$attrs),[X(s,{showRadiusOption:u.showRadiusOption,map:t.map,radius:l.radius,clearKey:l.clearKey,onSubmit:o.updateCircle,onOnClose:o.onClose},null,8,["showRadiusOption","map","radius","clearKey","onSubmit","onOnClose"])],16)],8,["to"])):L("",!0)}const lo=Z(ao,[["render",no]]),ro={name:"tip"},uo={class:"draw-tip"};function co(t,e,l,n,u,o){return d(),h("div",uo,[a("p",null,[e[1]||(e[1]=Y("Click and drag to draw your search ")),a("span",{class:"cancel",onClick:e[0]||(e[0]=s=>t.$emit("cancel"))}," Cancel")])])}const ho=Z(ro,[["render",co]]),Ee=35,po={inject:["store","isMobile","mapbox"],props:{map:Object,showPolygon:{type:Boolean,default:!0},showRadius:{type:Boolean,default:!0}},data(){return{path:[],lines:[],points:[],showTip:!1,drawing:!1,outPath:[],showSelectDraw:!1,showCircle:!1,location:null,circleRadius:1,timer:null,clearKey:1}},watch:{mapSyncType:{handler(t){this.map&&(t==="mapArea"||!t)&&this.clearDraw()}},outPath(){if(this.outPath&&this.outPath.length>0){let t=JSON.stringify(this.outPath);this.store.polygonPath.value=JSON.parse(t),this.store.mapSyncType.value="polygon",this.store.mapSyncList.value=!0,this.store.geometry.value=[],this.store.condition.location={}}else{if(this.mapSyncType==="mapArea")return;this.store.mapPath.value="",this.store.mapSyncType.value="",this.store.mapSyncList.value=!1,this.store.searchMap(),this.store.searchList()}}},computed:{mapSyncType(){return this.store.mapSyncType.value}},methods:{handleMouseenter(){this.isMobile||(clearTimeout(this.timer),this.showSelectDraw=!0)},handleMouseleave(){this.isMobile||(this.timer=setTimeout(()=>{this.showSelectDraw=!1},300))},handleClick(){this.isMobile&&(this.showSelectDraw=!this.showSelectDraw)},outsidetouchstart(){this.isMobile&&(this.showSelectDraw=!1)},startDraw(){this.store.drawing.value||(this.store.drawing.value=!0,this.showTip=!0,this.tapCb||(this.tapCb=t=>{var e=this.map.screenToGeo(t.currentPointer.viewportX,t.currentPointer.viewportY);this.addPoint(e)}),this.pointermoveThrottle||(this.pointermoveThrottle=K.throttle(t=>{var e=this.map.screenToGeo(t.currentPointer.viewportX,t.currentPointer.viewportY);this.hoverPoint(e)},200)),this.pointermoveCb||(this.pointermoveCb=t=>{this.pointermoveThrottle(t)}),this.createTip(),this.map.addEventListener("pointerdown",this.tapCb),this.map.addEventListener("pointermove",this.pointermoveCb))},endDraw(){this.store.drawing.value=!1,this.showTip=!0,this.tapCb&&this.map.removeEventListener("pointerdown",this.tapCb),this.pointermoveCb&&this.map.removeEventListener("pointermove",this.pointermoveCb),this.clearDashedLine(),this.destroyTip()},clearDraw(){this.path=[],this.outPath=[],this.endDraw(),this.stopListenDragPoint(),this.mainGroup&&(this.pointGroup&&this.mainGroup.removeObject(this.pointGroup),this.mapPolygon&&this.mainGroup.removeObject(this.mapPolygon),this.mapPolyline&&this.mainGroup.removeObject(this.mapPolyline),this.map.removeObject(this.mainGroup)),this.mainGroup=null,this.pointGroup=null,this.mapPolygon=null,this.mapPolyline=null,this.geoLineString=null,this.clearKey=Date.now(),setTimeout(()=>{this.showCircle=!1},100),this.showTip=!1,this.store.drawing.value=!1,this.mapSyncType!=="mapArea"&&this.store.removeMapTag(),this.destroyTip(),this.showSelectDraw=!1},addLineStringPoint(t){this.geoLineString||(this.geoLineString=new window.H.geo.LineString),this.geoLineString.pushLatLngAlt(t.lat,t.lng,0)},closeLineString(t){var e=t.toGeoJSON().coordinates[0];t.pushLatLngAlt(e[1],e[0],e[2]),this.geoLineString.isClosed=!0},initDraw(){this.pointGroup=new window.H.map.Group({visibility:!0}),this.mainGroup=new window.H.map.Group({volatility:!0,objects:[this.pointGroup]}),this.map.addObject(this.mainGroup)},drawPoint(t,e){var l=`<svg width="12" height="12" version="1.1" xmlns="http://www.w3.org/2000/svg">
     1import{u as K,d as pe,g as le,h as F,o as Le,i as se,_ as Z}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{c as Ge}from"./module.CKjUdtPN.js";import{r as f,c as J,a as Q,b as ke,o as d,d as R,w as ie,e as a,t as S,u as c,f as Y,g as h,h as G,F as I,n as me,i as Ae,j as L,k as Ve,l as Ne,m as X,p as ge,q as E,v as Se,s as Pe,x as q,y as H,z as B,A as $e,B as Ce,C as be,T as fe,D as ue,E as Me,G as Te}from"./vendor.DSMCY3-_.js";import{i as Ie}from"./index.D8-cPlTE.js";import{s as ze}from"./loading.BdqyMKJZ.js";import{m as je,l as Je,_ as xe}from"./index.d_VP6W-1.js";import{g as Fe,f as qe}from"./house-format.CcB19moP.js";import{c as Ke,v as Ze}from"./verify-email.B_du1TfR.js";import{s as De,c as We}from"./index.C1-1XiZ9.js";import{S as Ye,g as Qe,a as Xe,l as et,c as tt}from"./popup-trigger.C9dAVRHW.js";import{c as Be,_ as ot,a as st}from"./mobileFilter.C7HBrZa9.js";import{_ as He}from"./index.BAT38o-R.js";import{P as it}from"./index.qpyE7W-K.js";import{_ as at}from"./index.BIsjoQ8l.js";import{p as nt}from"./standard.Cshs06GJ.js";import{M as ye}from"./marker.Gizt9EmX.js";import{d as Ue}from"./outsideclick.Bw_hMuzW.js";import{s as lt}from"./service.BOwSreoa.js";import{u as _e}from"./user.BF73KgDm.js";import{a as rt}from"./auto-login.DOr0ALS4.js";import{a as ut,s as ct}from"./popup-mls.BZWi9Sqc.js";import"./date-format.BrUodQAJ.js";import"./index.DNn1etY9.js";import"./index.DAwEVGKX.js";import"./number-format.CLdvQh6j.js";import"./google.Cnb9DEy-.js";import"./index.DMIL01Q7.js";import"./useConfirm.BQXs6K30.js";const Re=K.getTimeZone(),ae={};function dt(t){const e={cancelList:null,cancelMap:null,module:t,hasMap:f(!0),showMap:f(!K.isMobile),featureListingName:f(""),listingType:J(()=>e.featureListingName.value&&!e.sold.value?"featured-listing":e.sold.value?"sold-listing":""),counts:f(0),totalPage:f(0),searchType:f("All"),listings:f([]),mlsList:Q([]),listingSort:f("RELEVANCE"),currPage:f(1),pageSize:f(12),address:f(""),condition:Q({}),uiConfig:Q({}),sold:f(!1),map:f(null),zoom:f(14),mapSyncList:f(!1),rect:null,mapSyncType:f(""),mapPath:f(""),needMapPath:J(()=>["mapArea","polygon"].includes(e.mapSyncType.value)),mapRadius:f([]),polygonPath:f([]),markerData:Q({aggregation:[],house:[],school:[],activeHouse:null,activeHouseKey:1}),showSchool:f(!1),schoolData:{},drawing:f(!1),geometry:f([]),shortCodeConfig:f({}),isShortCode:J(()=>!!e.shortCodeConfig.value.layout)},l={searchList:pe(async function(){try{e.cancelList&&e.cancelList.cancel("search-list canceled due to new request."),e.cancelList=ke.CancelToken.source();const o={condition:JSON.stringify(n.formatCondition()),pageSize:e.pageSize.value,page:e.currPage.value,currPage:e.currPage.value,listingSort:e.listingSort.value,listingType:e.listingType.value,featureListingName:e.featureListingName.value,timeline:!0,mls_list_id:JSON.stringify(e.mlsList),uiConfig:JSON.stringify(e.uiConfig),timezone:Re};let s=le();if(s.mlsOrgId&&s.complianceCheck&&(o.mlsOrgId=s.mlsOrgId,o.complianceCheck=s.complianceCheck),e.mapSyncList.value){let M=n.formatCondition();if(e.mapSyncType.value==="radius")M.location={mapRadius:e.mapRadius.value};else if(e.needMapPath.value&&(M.location={mapPath:e.mapPath.value},!e.mapPath.value))return;o.condition=JSON.stringify(M)}const i={action:"lofty_idx_api",data:o,cancelToken:e.cancelList.token},r=e.module.$(".lofty-listing"),y=ze(r);r.classList.add("lofty-empty-listing"),n.asyncListConditionToUrl(o);const g=await F.get("/search/realTimeListings",i);y(),r.innerHTML=g.data.html,e.totalPage.value=g.data.totalPage,e.counts.value=g.data.counts,e.listings.value=g.data.listings,e.searchType.value=g.data.searchType;const P=r.querySelectorAll(".lofty-house-tag"),O=[];for(const M of g.data.listings)Ye.includes(M.mlsOrgId)&&O.push(M.id);if(O!=null&&O.length){const M=await Qe(O,e.listingType.value==="sold-listing");M&&Object.keys(M).length&&e.listings.value.forEach((U,V)=>{const ee=M[U.id]||!1;e.listings.value[V]={...U,mlsOrg:{...U.mlsOrg,cardTemplate:Xe(U,ee,"cardTemplate")}},P[V]&&(P[V].innerHTML=e.listings.value[V].mlsOrg.cardTemplate)})}P.forEach(M=>{M.style.display="block"}),r.classList.remove("lofty-empty-listing"),l.addCardEvents()}catch{}},300),searchMap:pe(async function(){if(!(!e.showMap.value||!e.map.value||!Number.isInteger(e.zoom.value)))try{e.cancelMap&&e.cancelMap.cancel("search-map canceled due to new request."),e.cancelMap=ke.CancelToken.source(),e.mapSyncList.value&&e.needMapPath.value&&(await l.getMapPath(),e.currPage.value=1,l.searchList());const o={mobile:K.isMobile,mapSearch:!0,layoutType:"map",listingSort:e.listingSort.value,listingType:e.listingType.value,featureListingName:e.featureListingName.value,zoom:e.zoom.value,rect:n.getRect(),condition:JSON.stringify(n.formatCondition()),timezone:Re};let s=le();s.mlsOrgId&&s.complianceCheck&&(o.mlsOrgId=s.mlsOrgId,o.complianceCheck=s.complianceCheck),n.formatLocation(o);const i={action:"lofty_idx_api",data:o,cancelToken:e.cancelMap.token};l.searchSchool(e.schoolData),n.asyncMapConditionToUrl();const r=await F.get("/search/realTimeListings",i);e.markerData.aggregation=n.dealAggregationData(r.data.aggregation||[]),e.markerData.house=n.dealHouseData(r.data.house||[]),e.markerData.activeHouse=null,e.markerData.activeHouseKey=Date.now()}catch{}},300),searchSchool:pe(async function(o){if(e.showSchool.value){e.schoolData=o;const s={...o,condition:JSON.stringify(n.formatCondition()),zoom:e.zoom.value,rect:n.getRect(),mapSearch:!1,t:Date.now()};if(e.mapSyncList.value){let r=n.formatCondition();r.location={},s.condition=JSON.stringify(r),n.formatLocation(s)}e.markerData.school=[];const i=await F.get("/search/schools",{data:s});i&&i.data&&(e.markerData.school=i.data.map(r=>(r.key=`school-${r.latitude}${r.longitude}${Date.now()}`,r.lat=+r.latitude,r.lng=+r.longitude,r)))}},300),async getMapPath(){const o={data:{mapPointList:je.getFormatBounds(e.map.value)}};e.mapSyncType.value==="polygon"&&(o.data.mapPointList=e.polygonPath.value);const s=await F.post("/search/mapPath",o);e.mapPath.value=s.data.regionId},removeMapTag(){e.mapSyncList.value=!1,e.mapSyncType.value="",e.mapPath.value=null,e.polygonPath.value=[],e.mapRadius.value=[]},addCardEvents(){const o=t.$all(".lofty-listing .lofty-house-item");Array.from(o).forEach(s=>{const i=s.querySelector(".collect-heart");i&&(i.onclick=()=>{const y=s.getAttribute("house-id"),g=i.classList.contains("lofty-icon-heart-fill");Ke(y,g,()=>{g?(i.classList.remove("lofty-icon-heart-fill"),i.classList.add("lofty-icon-heart")):(i.classList.remove("lofty-icon-heart"),i.classList.add("lofty-icon-heart-fill"))})});const r=s.querySelector(".lofty-house-login-box");r&&(r.querySelector(".lofty-register")&&(r.querySelector(".lofty-register").onclick=()=>{De(()=>{window.location.reload()},"","register")}),r.querySelector(".lofty-login")&&(r.querySelector(".lofty-login").onclick=()=>{De(()=>{window.location.reload()},"","login")}),r.querySelector(".lofty-verify")&&(r.querySelector(".lofty-verify").onclick=()=>{Ze()}))})}},n={formatCondition(){let o={};for(let s in e.condition){let i=e.condition[s];e.uiConfig[s]&&e.uiConfig[s].sqft==="acre"&&(i=i.split(",").map(r=>+r?+r*43560:"").toString()),Ie(i)&&(o[s]=i)}if(e.address.value="",o.location&&e.mapSyncList.value===!1){const s=Object.values(o.location).reduce((i,r)=>i.concat(r),[]);s.length===1&&(e.address.value=s[0].split(",")[0])}return o},formatLocation(o){if(e.mapSyncType.value==="polygon"){let s=n.formatCondition();s.location={mapPath:e.mapPath.value},o.condition=JSON.stringify(s)}else if(e.mapSyncType.value==="radius"){let s=n.formatCondition();s.location={mapRadius:e.mapRadius.value},o.condition=JSON.stringify(s)}},asyncListConditionToUrl(o){if(e.isShortCode.value)return;let s=window.location.pathname,i=le();Object.entries(o).forEach(([r,y])=>{let g=y;typeof y=="object"&&(g=JSON.stringify(y)),(r==="uiConfig"||r==="condition")&&(g=encodeURIComponent(g)),g&&["currPage","pageSize","listingSort","listingType","uiConfig","condition","featureListingName"].includes(r)&&(i[r]=g),i.address=encodeURIComponent(e.address.value),document.querySelector(".lofty-is-shortcode")||(i.pageKey=e.sold.value?"sold_listing":"search")}),i.hideMap=e.showMap.value?0:1,s=s+"?"+Le(i),window.history.pushState(null,"",s)},asyncMapConditionToUrl(){if(e.isShortCode.value)return;let o=window.location.pathname,s=le();delete s.rect,delete s.polygonPath,delete s.mapRadius,s.zoom=e.zoom.value,s.condition&&(s.condition=encodeURIComponent(s.condition)),s.uiConfig&&(s.uiConfig=encodeURIComponent(s.uiConfig)),e.mapSyncList.value&&(e.mapSyncType.value==="mapArea"?s.rect=encodeURIComponent(n.getRect()):e.mapSyncType.value==="polygon"?s.polygonPath=encodeURIComponent(JSON.stringify(e.polygonPath.value)):e.mapSyncType.value==="radius"&&(s.mapRadius=encodeURIComponent(JSON.stringify(e.mapRadius.value)))),o=o+"?"+Le(s),window.history.pushState(null,"",o)},initConditionFromUrl(){var s,i;const o=le();if(o.currPage||o.condition){let r=o.condition?JSON.parse(decodeURIComponent(o.condition)):{},y=o.uiConfig?JSON.parse(decodeURIComponent(o.uiConfig)):{};(s=r.location)!=null&&s.mapPath&&delete r.location.mapPath,(i=r.location)!=null&&i.mapRadius&&(o.mapRadius||(o.mapRadius=JSON.stringify(r.location.mapRadius)),delete r.location.mapRadius),o.rect?(e.rect=decodeURIComponent(o.rect),e.mapSyncType.value="mapArea",e.mapSyncList.value=!0):o.polygonPath?(e.polygonPath.value=JSON.parse(decodeURIComponent(o.polygonPath)),e.mapSyncType.value="polygon",e.mapSyncList.value=!0):o.mapRadius&&(e.mapSyncType.value="radius",e.mapRadius.value=JSON.parse(decodeURIComponent(o.mapRadius)),e.mapSyncList.value=!0),Object.keys(r).forEach(g=>{e.condition[g]=r[g]}),Object.keys(y).forEach(g=>{e.uiConfig[g]=y[g]}),e.address.value=decodeURIComponent(o.address||""),e.listingSort.value=o.listingSort||"RELEVANCE",e.currPage.value=+o.currPage||1,e.pageSize.value=+o.pageSize||12,e.zoom.value=+o.zoom||14,e.showMap.value=o.hideMap!=="1"}},dealAggregationData(o){return o.forEach(s=>{s.key=`key-${s.latitude}${s.longitude}${Date.now()}`,s.lat=+s.latitude,s.lng=+s.longitude,Array.isArray(s.bounds)&&(s.bounds=s.bounds.map(i=>({lat:i.latitude,lng:i.longitude})))}),o},dealHouseData(o){o=o.filter(r=>!Fe(r));function s(r){return r.reduce((y,g)=>{if(y===null)return g;let P=y.soldPrice||y.price;return(g.soldPrice||g.price)<P?g:y},null)}const i=Je.generateDataByLatlng(o);return i.forEach(r=>{const y=s(r.items);r.key=`key-${r.lat}${r.lng}${Date.now()}`,r.price=y.soldPrice||y.price,r.nodisclosureDes=y.nodisclosureDes,r.items.forEach(g=>qe(g))}),i},getRect(){const o=e.map.value.getViewModel().getLookAtData().bounds.getBoundingBox();if(o)return`${o.getTop()},${o.getLeft()},${o.getBottom()},${o.getRight()}`},toggleMap(){e.showMap.value=!e.showMap.value,e.currPage.value=1,e.pageSize.value=e.showMap.value?12:24,n.toggleClass(),l.searchList()},toggleClass(){e.hasMap.value&&(e.showMap.value?(t.$(".lofty-result-listing").classList.add("has-map"),t.$("#lofty-map-container").classList.remove("lofty-hidden")):(t.$(".lofty-result-listing").classList.remove("has-map"),t.$("#lofty-map-container").classList.add("lofty-hidden")))}},u=t.getModuleData();return e.counts.value=u.counts||0,e.mlsList=Q(u.mls_list),e.searchType.value=u.searchType,e.totalPage.value=u.totalPage||0,e.sold.value=u.sold,e.hasMap.value=u.hasMap,e.shortCodeConfig.value=u.shortcode_config||{},e.featureListingName.value=u.featureListingName||"",e.shortCodeConfig.value.layout||n.initConditionFromUrl(),l.searchList(),{...e,...l,formatCondition:n.formatCondition,formatLocation:n.formatLocation,getRect:n.getRect,toggleMap:n.toggleMap,toggleClass:n.toggleClass,dealHouseData:n.dealHouseData}}function ht(t){ae[t.id]=dt(t)}const pt={class:"lofty-show-more-name"},gt={key:0},mt={class:"lofty-more-panel"},ft={class:"lofty-more-filter-title"},yt={class:"lofty-more-filter-count"},vt={class:"lofty-group-name"},wt={class:"lofty-group-wrapper"},St={class:"lofty-condition-label"},Ct={__name:"moreFilter",props:{moreConfigs:{type:Array,required:!0},condition:Object,uiConfig:Object},setup(t){const e=t,l=J(()=>{const o=new Set;return e.moreConfigs.forEach(s=>{s.conditions.forEach(i=>{o.add(i.name)})}),o}),n=J(()=>{let o=0;for(let s in e.condition){const i=e.condition[s];if(Ie(i)&&l.value.has(s)&&(o++,typeof i=="string")){const r=i.split(",");r.length===2&&r.every(y=>!!y)&&o++}}return o});function u(){for(const o of l.value){const s=e.condition[o];Array.isArray(s)?e.condition[o]=[]:typeof s=="object"?e.condition[o]={}:typeof s=="boolean"?e.condition[o]=!1:typeof s=="string"&&(e.condition[o]="")}}return(o,s)=>(d(),R(He,{class:"lofty-more-box",right:0,menuStyle:{paddingRight:0},clickMenuClose:!1,"fit-width":!1},{menu:ie(()=>[a("div",mt,[a("div",ft,[a("div",yt,S(c(n))+" Filters Applied",1),a("div",{class:"lofty-clear-filter",onClick:u},s[1]||(s[1]=[a("i",{class:"lofty_iconfont lofty-icon-reset"},null,-1),Y(" Clear")]))]),(d(!0),h(I,null,G(t.moreConfigs,i=>(d(),h("div",{class:"lofty-condition-group",key:i.name},[a("p",vt,S(i.nameText),1),a("div",wt,[(d(!0),h(I,null,G(i.conditions,r=>(d(),h("div",{key:r.name,class:"lofty-condition-label-input",style:me({width:r.inputType==="keyWord"?"100%":""})},[a("p",St,[a("span",null,S(r.label),1)]),(d(),R(Ae(c(Be)[r.inputType]),{modelValue:t.condition[r.name],"onUpdate:modelValue":y=>t.condition[r.name]=y,key:r.name,uiConfig:t.uiConfig,config:r},null,8,["modelValue","onUpdate:modelValue","uiConfig","config"]))],4))),128))])]))),128))])]),default:ie(()=>[a("span",pt,[s[0]||(s[0]=Y("More ")),c(n)?(d(),h("span",gt,"("+S(c(n))+")",1)):L("",!0)])]),_:1}))}},bt={class:"lofty-listing-search"},Lt={key:1,class:"lofty-multi-filter"},kt=["disabled"],Pt={class:"save-search-pop-container"},Mt={class:"save-search-pop-content"},Tt={__name:"searchBar",props:{id:String},setup(t){const e=t,{counts:l,currPage:n,pageSize:u,searchList:o,condition:s,formatCondition:i,formatLocation:r,polygonPath:y,getRect:g,listingSort:P,uiConfig:O,sold:M,zoom:U,address:V,mapSyncList:ee,mapSyncType:A,removeMapTag:te,isShortCode:W}=ae[e.id],[T,k,N,ne]=[f([]),f([]),f([]),f([])],ce=J(()=>{if(ee.value){if(A.value==="mapArea")return["Map Area"];if(A.value==="polygon")return["Polygon Search"];if(A.value==="radius")return["Radius Search"]}return[]}),de=f({});async function ve(){const j={data:{isSold:M.value},headers:{}};W.value||(j.headers.trackingpagekey=M.value?"sold_listing":"search");const w=await F.get("/search/center/conditions",j);w.data.configs.forEach(b=>{let D=null;b.conditions.forEach(($,we)=>{$.name==="location"&&(D=we,de.value=$),$.inputType==="suggestion"&&!s[$.name]&&(s[$.name]={}),["multiSelect","singleSelect","keyWord"].includes($.inputType)&&!s[$.name]&&(s[$.name]=[])}),D!==null&&b.conditions.splice(D,1)}),T.value=w.data.configs.filter(b=>b.conditions.length>0),ne.value=JSON.parse(JSON.stringify(T.value));let _=0;T.value.forEach(b=>{b.conditions.forEach(D=>{_<4&&["singleSelect","multiSelect","inputBox","checkBox"].includes(D.inputType)&&(k.value.push(D),_++)}),b.conditions=b.conditions.filter(D=>!k.value.some($=>$.name===D.name)),b.conditions.length>0&&N.value.push(b)}),ge(s,()=>{n.value=1,o()})}const oe=Ve("popRef");function he(){We(()=>{oe.value.open()})}Ne(()=>{ve()});const v=J(()=>Object.values(i()).length===0&&!A.value),p=f(""),m=f(7),C=[{label:"Instantly",value:0},{label:"Daily",value:1},{label:"Weekly",value:7},{label:"Biweekly",value:14},{label:"Monthly",value:28}];async function z(){let j=p.value.trim();if(j){const w={condition:i(),uiConfig:O,address:V.value,listingSort:P.value,currPage:n.value,pageSize:u.value,zoom:U.value,timezone:K.getTimeZone()};if(A.value==="polygon"&&(w.polygonPath=y.value),A.value==="mapArea"){const b=g(),D=b.split(",");w.rect=b;let $=[{lat:D[0],lng:D[1]},{lat:D[0],lng:D[3]},{lat:D[2],lng:D[3]},{lat:D[2],lng:D[1]}];$=$.map(we=>JSON.stringify(we)),w.condition.location={mapPath:$}}r(w);const _={saveName:j,searchCondition:JSON.stringify(w),mailFrequency:m.value};try{const b=await F.post("/wp-plugin/save-search/saveSearch",{data:_});b.status.code===0&&(p.value="",K.toast(b.data),oe.value.close())}catch(b){console.error("save-search/saveSearch",b)}}}function x(){oe.value.close()}return(j,w)=>(d(),h("div",bt,[X(ot,{class:"location-suggestion",modelValue:c(s).location,"onUpdate:modelValue":w[0]||(w[0]=_=>c(s).location=_),config:c(de),"custom-tag":c(ce),onRemoveCustomTag:c(te)},null,8,["modelValue","config","custom-tag","onRemoveCustomTag"]),c(se)?(d(),R(st,{key:0,condition:c(s),mobileConfigs:c(ne),uiConfig:c(O),counts:c(l),onSaveSearch:he},null,8,["condition","mobileConfigs","uiConfig","counts"])):(d(),h("div",Lt,[(d(!0),h(I,null,G(c(k),_=>(d(),R(Ae(c(Be)[_.inputType]),{modelValue:c(s)[_.name],"onUpdate:modelValue":b=>c(s)[_.name]=b,class:"lofty-filter-block","show-default-label":!0,"fit-width":!1,uiConfig:c(O),config:_,outSide:""},null,8,["modelValue","onUpdate:modelValue","uiConfig","config"]))),256)),c(N).length>0?(d(),R(Ct,{key:0,class:"lofty-filter-block",moreConfigs:c(N),uiConfig:c(O),condition:c(s)},null,8,["moreConfigs","uiConfig","condition"])):L("",!0),c(M)?L("",!0):(d(),h("button",{key:1,class:"save-search lofty-btn",disabled:c(v),onClick:he},w[3]||(w[3]=[a("span",null,"Save Search",-1)]),8,kt))])),X(it,{ref_key:"popRef",ref:oe,class:"save-search-pop"},{default:ie(()=>[a("div",Pt,[w[6]||(w[6]=a("div",{class:"title"},"SAVE THIS SEARCH",-1)),a("div",Mt,[w[4]||(w[4]=a("div",{class:"label"},"Name This Search",-1)),E(a("input",{"onUpdate:modelValue":w[1]||(w[1]=_=>Pe(p)?p.value=_:null),placeholder:"Type Something"},null,512),[[Se,c(p)]]),w[5]||(w[5]=a("div",{class:"label mt20"},"Property Alert",-1)),X(at,{class:"mt20",modelValue:c(m),"onUpdate:modelValue":w[2]||(w[2]=_=>Pe(m)?m.value=_:null),list:C},null,8,["modelValue"])]),a("div",{class:"save-search-footer"},[a("div",{class:"footer-cancel",onClick:x},"Cancel"),a("div",{class:"footer-save lofty-btn",onClick:z},"Save")])])]),_:1},512)]))}},Dt={class:"lofty-listing-top"},_t={key:0,class:"lofty-page-title"},Rt={key:1,class:"lofty-page-title"},Et={key:0},Ot={key:0,class:"lofty-current-filter"},At={key:1,class:"lofty-map-filter"},Nt={style:{margin:"0 10px"}},$t={class:"lofty-sort-list"},It=["onClick"],jt={class:"lofty_iconfont lofty-icon-checked"},Bt={class:"lofty-filter-name"},Ht={__name:"listingFilter",props:{id:String},setup(t){const e=t,{counts:l,listingSort:n,currPage:u,searchType:o,searchList:s,hasMap:i,showMap:r,address:y,sold:g,toggleMap:P,toggleClass:O}=ae[e.id],M=J(()=>l.value?l.value.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):"0"),U=J(()=>o.value==="sold"?l.value===1?"Sold Property Available":"Sold Properties Available":o.value==="For Rent"?l.value===1?"Property ForRent":"Properties For Rent":o.value==="For Sale"?l.value===1?"Property ForSale":"Properties For Sale":o.value==="neighborhood"?l.value===1?"Property AvailableNearby":"Properties AvailableNearby":"Properties Available"),V=J(()=>g.value?A.value:ee.value),ee=f([{value:"RELEVANCE",label:"Default"},{value:"PRICE_DESC",label:"Price-High To Low"},{value:"PRICE_ASC",label:"Price-Low To High"},{value:"MLS_LIST_DATE_L_DESC",label:"Newest Listings"},{value:"BEDROOMS_DESC",label:"Beds (Most)"},{value:"BATHS_DESC",label:"Baths (Most)"},{value:"BUILT_YEAR_DESC",label:"Year Built (Newest)"},{value:"SQFT_DESC",label:"Square Feet (Biggest)"}]),A=f([{value:"RELEVANCE",label:"Default"},{value:"MLS_LIST_DATE_L_DESC",label:"Most Recent"},{value:"PRICE_DESC",label:"Price-Highest"},{value:"PRICE_ASC",label:"Price-Lowest"},{value:"BEDROOMS_DESC",label:"Beds (Most)"},{value:"BATHS_DESC",label:"Baths (Most)"},{value:"BUILT_YEAR_DESC",label:"Year Built (Newest)"}]),te=J(()=>{var T;return(T=V.value.find(k=>k.value===n.value))==null?void 0:T.label});function W(T){n.value!==T.value&&(n.value=T.value,u.value=1,s())}return Ne(()=>{O()}),(T,k)=>E((d(),h("div",Dt,[c(l)===0?(d(),h("p",_t,"0 Properties")):(d(),h("p",Rt,[Y(S(c(M))+" "+S(c(U))+" ",1),c(y)?(d(),h("span",Et," In "+S(c(y)),1)):L("",!0)])),X(He,{class:"lofty-sort-filter",top:40,right:c(se)?"auto":0,left:c(se)?0:"auto","fit-width":!1,hideArrow:!0},{menu:ie(()=>[a("ul",$t,[(d(!0),h(I,null,G(c(V),N=>(d(),h("li",{class:"lofty-filter-item",onClick:ne=>W(N)},[Y(S(N.label)+" ",1),E(a("i",jt,null,512),[[q,c(n)===N.value]])],8,It))),256))])]),default:ie(()=>[c(se)?(d(),h("span",Ot,[Y(S(c(te))+" ",1),k[2]||(k[2]=a("i",{class:"lofty_iconfont lofty-icon-sort_04"},null,-1))])):(d(),h("span",At,[k[3]||(k[3]=a("span",{style:{color:"#A8A8A8"}},"Sort by",-1)),a("span",Nt,S(c(te)),1),k[4]||(k[4]=a("i",{class:"lofty_iconfont lofty-icon-sort_04"},null,-1))]))]),_:1},8,["right","left"]),!c(se)&&c(i)?(d(),h("span",{key:2,class:"lofty-map-filter",onClick:k[0]||(k[0]=(...N)=>c(P)&&c(P)(...N))},[a("span",Bt,S(c(r)?"Hide Map":"Show Map"),1),k[5]||(k[5]=a("i",{class:"lofty_iconfont lofty-icon-map_01"},null,-1))])):L("",!0),c(se)&&c(i)?(d(),h("div",{key:3,class:"lofty-map-mobile-btn",onClick:k[1]||(k[1]=(...N)=>c(P)&&c(P)(...N))},k[6]||(k[6]=[a("i",{class:"lofty_iconfont lofty-icon-map_01"},null,-1),a("span",null,"Map",-1)]))):L("",!0)],512)),[[q,!c(se)||!c(r)||!c(i)]])}},Ut={__name:"listingPagination",props:{id:String},setup(t){const e=t,{currPage:l,totalPage:n,counts:u,searchList:o}=ae[e.id],s=i=>{l.value=i.page,o()};return(i,r)=>c(u)>1?(d(),R(nt,{key:0,totalPage:c(n),onPageChange:s,pageSize:24,noScroll:!0,pageNum:c(l)},null,8,["totalPage","pageNum"])):L("",!0)}},Gt={name:"Select",inject:["isMobile"],directives:{outSideClick:Ue},props:{value:{default:()=>({label:"1 Miles",value:1})},dataList:{type:Array,default:()=>[]}},data(){return{showList:!1}},methods:{changeSelect(t){this.$emit("change",t),this.showList=!1},switchDataList(){this.showList=!this.showList,this.$emit("closeSuggestion")},closeDataList(){this.showList=!1}},mounted(){this.isMobile?(this.$refs.switch.addEventListener("touchend",this.switchDataList),window.addEventListener("resize",this.closeDataList)):this.$refs.switch.addEventListener("click",this.switchDataList)},beforeDestroy(){this.isMobile&&window.removeEventListener("resize",this.closeDataList)}},Vt={class:"select-wrapper"},zt={ref:"switch"},Jt={class:"label-txt"},xt=["onClick"];function Ft(t,e,l,n,u,o){const s=$e("out-side-click");return E((d(),h("div",Vt,[a("div",zt,[a("span",Jt,S(l.value.label),1),a("span",{class:H(["lofty_iconfont lofty-icon-arrow-down",{up:u.showList}])},null,2)],512),E(a("div",{class:"data-list",id:"select-radius-list",onWheel:B(()=>{},["stop"]),onDrag:B(()=>{},["stop"]),onTouchmove:B(()=>{},["stop"]),onTouchstart:B(()=>{},["stop"]),onTouchend:B(()=>{},["stop"])},[a("ul",null,[(d(!0),h(I,null,G(l.dataList,(i,r)=>(d(),h("li",{key:r,onClick:y=>o.changeSelect(i)},S(i.label),9,xt))),128))])],544),[[q,u.showList]])])),[[s,()=>{u.showList=!1}]])}const qt=Z(Gt,[["render",Ft]]);let re="";const Kt={name:"radius-search",inject:["isMobile"],data(){return{location:re,suggestList:[],latlng:null,mileList:[1,1.5,2,2.5,3,3.5,4,4.5,5,10,15,20,25,30,50].map(t=>({value:t,label:t+(t>1?" miles":" mile")})),showSuggest:!1}},computed:{radiusValue(){return{value:this.radius,label:`${this.radius} ${this.radius>1?"miles":"mile"}`}}},props:{map:{type:Object},showRadiusOption:{type:Boolean},clearKey:{type:Number,default:1},radius:{type:Number,default:1}},components:{Select:qt},watch:{clearKey(){re=""}},methods:{searchSuggest:K.debounce(async function(t){const e={query:t.target.value,country:"usa",beginHighlight:encodeURIComponent("<mark>"),endHighlight:encodeURIComponent("</mark>"),maxresults:20},n=(await F.get("/search/home-j/here-api/autoSuggest",{data:e})).data.filter(o=>!!o.address.street),u=[];for(let o=0,s=0,i=n.length;s<5&&o<i;o++){let r=this.formatAddress(n[o]);r&&u.indexOf(r)===-1&&(u.push(r),s++)}this.suggestList=u,this.showSuggest=!0}),async changeLocation(t){re=t.replace(/<mark>|<\/mark>/g,""),this.location=re;let e=await lt.geocode(t.replace(/<mark>|<\/mark>/g,""),!0);this.latlng=e.center,this.$emit("submit",{location:this.latlng,radius:this.radiusValue.value}),this.showSuggest=!1},changeRadius(t){this.$emit("submit",{location:this.latlng,radius:t.value})},clearLocation(){re="",this.location="",this.showSuggest=!1},handleMutual(){this.$refs.select.showList=!1,this.showSuggest=!0},stopResizeEvent(t){return t&&t.preeventDefault?t.preeventDefault():window.event.returnValue=!1,!1},closeSuggestion(){this.showSuggest=!1},formatAddress(t){let e=t.address,l=this.getAddressItem(e,["houseNumber","street"])+this.getAddressItem(e,["city"]);return l?decodeURIComponent(l+this.getAddressItem(e,["state","postalCode"],!1)):null},getAddressItem(t,e,l){let n=[],u;for(let o=0,s=e.length;o<s;o++){let i=t[e[o]];i&&u!==i&&n.push(u=i)}return n.length?n.join(" ")+(l===!1?"":", "):""}},mounted(){this.isMobileSize&&window.addEventListener("resize",this.stopResizeEvent,!1)},beforeUnmount(){this.isMobile&&window.removeEventListener("resize",this.stopResizeEvent)}},Zt={class:"radius-search"},Wt={class:"position-wrapper"},Yt={class:"select-container"},Qt={class:"key-search"},Xt={class:"autocomplete"},eo=["onClick"],to=["innerHTML"];function oo(t,e,l,n,u,o){const s=Ce("Select");return E((d(),h("div",Zt,[e[12]||(e[12]=a("div",{class:"radius-search-title"},"Radius",-1)),a("div",Wt,[a("div",Yt,[X(s,{dataList:u.mileList,value:o.radiusValue,onChange:o.changeRadius,onCloseSuggestion:o.closeSuggestion,ref:"select"},null,8,["dataList","value","onChange","onCloseSuggestion"]),e[8]||(e[8]=a("span",{class:"select-tag"},"near",-1))]),a("div",Qt,[e[9]||(e[9]=a("i",{class:"lofty_iconfont lofty-icon-search"},null,-1)),E(a("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=i=>u.location=i),onMousedown:e[1]||(e[1]=B(()=>{},["stop"])),onDblclick:e[2]||(e[2]=B(()=>{},["stop"])),onFocus:e[3]||(e[3]=B((...i)=>o.handleMutual&&o.handleMutual(...i),["stop"])),onTouchstart:e[4]||(e[4]=B((...i)=>o.handleMutual&&o.handleMutual(...i),["stop"])),onInput:e[5]||(e[5]=B((...i)=>o.searchSuggest&&o.searchSuggest(...i),["stop"])),placeholder:"Input a location to center the map",ref:"input",class:H({"show-clear-content":u.location})},null,34),[[Se,u.location]]),u.location?(d(),h("i",{key:0,class:"lofty_iconfont lofty-icon-close",onClick:e[6]||(e[6]=(...i)=>o.clearLocation&&o.clearLocation(...i))})):L("",!0)]),e[11]||(e[11]=a("div",{class:"arrow-style"},null,-1)),E(a("ul",Xt,[(d(!0),h(I,null,G(u.suggestList,i=>(d(),h("li",{key:i,class:"item",onClick:r=>o.changeLocation(i)},[e[10]||(e[10]=a("i",{class:"lofty_iconfont lofty-icon-location_02"},null,-1)),a("span",{innerHTML:i},null,8,to)],8,eo))),128))],512),[[q,u.suggestList.length>0&&u.showSuggest]]),a("span",{class:"lofty_iconfont lofty-icon-close",id:"close_radius_search_form",onClick:e[7]||(e[7]=B(i=>t.$emit("onClose"),["stop"]))})])],512)),[[q,l.showRadiusOption]])}const so=Z(Kt,[["render",oo]]),io=1609.344,ao={mixins:[ye],inject:["isMobile"],props:{radius:{type:Number,default:1},clearKey:{type:Number,default:1}},components:{radiusOption:so},data(){return{showRadiusOption:!1,className:"search-radius"}},methods:{async initCircle(){this.circle&&this.map.removeObject(this.circle),this.circle=new window.H.map.Circle(this.data,this.radius*io,{style:{strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)",lineWidth:2,fillColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-bgColor")||"rgba(25, 25, 25, 0.2)"}}),this.circle.addEventListener("tap",()=>{this.showRadiusOption=!0}),this.circle.addEventListener("pointerenter",()=>{document.body.style.cursor="pointer"}),this.circle.addEventListener("pointerleave",()=>{document.body.style.cursor="default"}),this.map.addObject(this.circle),this.updateRadiusOption()},updateRadiusOption(){this.map&&this.circle&&this.map.getViewModel().setLookAtData({bounds:this.circle.getBoundingBox()},!0)},updateCircle(t){const e={location:t.location||this.data,radius:t.radius||this.radius};this.$emit("updateCircle",e)},onOpen(){this.showRadiusOption=!0},onClose(){this.showRadiusOption=!1}},mounted(){this.showRadiusOption=!0,this.initCircle()},unmounted(){this.circle&&this.map.removeObject(this.circle)}};function no(t,e,l,n,u,o){const s=Ce("radius-option");return t.parentDom?(d(),R(fe,{key:0,to:t.parentDom},[a("div",be({class:"radius-center",onClick:e[0]||(e[0]=(...i)=>o.onOpen&&o.onOpen(...i)),onTouch:e[1]||(e[1]=(...i)=>o.onOpen&&o.onOpen(...i)),id:"open_radius_search_form"},t.$attrs),[X(s,{showRadiusOption:u.showRadiusOption,map:t.map,radius:l.radius,clearKey:l.clearKey,onSubmit:o.updateCircle,onOnClose:o.onClose},null,8,["showRadiusOption","map","radius","clearKey","onSubmit","onOnClose"])],16)],8,["to"])):L("",!0)}const lo=Z(ao,[["render",no]]),ro={name:"tip"},uo={class:"draw-tip"};function co(t,e,l,n,u,o){return d(),h("div",uo,[a("p",null,[e[1]||(e[1]=Y("Click and drag to draw your search ")),a("span",{class:"cancel",onClick:e[0]||(e[0]=s=>t.$emit("cancel"))}," Cancel")])])}const ho=Z(ro,[["render",co]]),Ee=35,po={inject:["store","isMobile","mapbox"],props:{map:Object,showPolygon:{type:Boolean,default:!0},showRadius:{type:Boolean,default:!0}},data(){return{path:[],lines:[],points:[],showTip:!1,drawing:!1,outPath:[],showSelectDraw:!1,showCircle:!1,location:null,circleRadius:1,timer:null,clearKey:1}},watch:{mapSyncType:{handler(t){this.map&&(t==="mapArea"||!t)&&this.clearDraw()}},outPath(){if(this.outPath&&this.outPath.length>0){let t=JSON.stringify(this.outPath);this.store.polygonPath.value=JSON.parse(t),this.store.mapSyncType.value="polygon",this.store.mapSyncList.value=!0,this.store.geometry.value=[],this.store.condition.location={}}else{if(this.mapSyncType==="mapArea")return;this.store.mapPath.value="",this.store.mapSyncType.value="",this.store.mapSyncList.value=!1,this.store.searchMap(),this.store.searchList()}}},computed:{mapSyncType(){return this.store.mapSyncType.value}},methods:{handleMouseenter(){this.isMobile||(clearTimeout(this.timer),this.showSelectDraw=!0)},handleMouseleave(){this.isMobile||(this.timer=setTimeout(()=>{this.showSelectDraw=!1},300))},handleClick(){this.isMobile&&(this.showSelectDraw=!this.showSelectDraw)},outsidetouchstart(){this.isMobile&&(this.showSelectDraw=!1)},startDraw(){this.store.drawing.value||(this.store.drawing.value=!0,this.showTip=!0,this.tapCb||(this.tapCb=t=>{var e=this.map.screenToGeo(t.currentPointer.viewportX,t.currentPointer.viewportY);this.addPoint(e)}),this.pointermoveThrottle||(this.pointermoveThrottle=K.throttle(t=>{var e=this.map.screenToGeo(t.currentPointer.viewportX,t.currentPointer.viewportY);this.hoverPoint(e)},200)),this.pointermoveCb||(this.pointermoveCb=t=>{this.pointermoveThrottle(t)}),this.createTip(),this.map.addEventListener("pointerdown",this.tapCb),this.map.addEventListener("pointermove",this.pointermoveCb))},endDraw(){this.store.drawing.value=!1,this.showTip=!0,this.tapCb&&this.map.removeEventListener("pointerdown",this.tapCb),this.pointermoveCb&&this.map.removeEventListener("pointermove",this.pointermoveCb),this.clearDashedLine(),this.destroyTip()},clearDraw(){this.path=[],this.outPath=[],this.endDraw(),this.stopListenDragPoint(),this.mainGroup&&(this.pointGroup&&this.mainGroup.removeObject(this.pointGroup),this.mapPolygon&&this.mainGroup.removeObject(this.mapPolygon),this.mapPolyline&&this.mainGroup.removeObject(this.mapPolyline),this.map.removeObject(this.mainGroup)),this.mainGroup=null,this.pointGroup=null,this.mapPolygon=null,this.mapPolyline=null,this.geoLineString=null,this.clearKey=Date.now(),setTimeout(()=>{this.showCircle=!1},100),this.showTip=!1,this.store.drawing.value=!1,this.mapSyncType!=="mapArea"&&this.store.removeMapTag(),this.destroyTip(),this.showSelectDraw=!1},addLineStringPoint(t){this.geoLineString||(this.geoLineString=new window.H.geo.LineString),this.geoLineString.pushLatLngAlt(t.lat,t.lng,0)},closeLineString(t){var e=t.toGeoJSON().coordinates[0];t.pushLatLngAlt(e[1],e[0],e[2]),this.geoLineString.isClosed=!0},initDraw(){this.pointGroup=new window.H.map.Group({visibility:!0}),this.mainGroup=new window.H.map.Group({volatility:!0,objects:[this.pointGroup]}),this.map.addObject(this.mainGroup)},drawPoint(t,e){var l=`<svg width="12" height="12" version="1.1" xmlns="http://www.w3.org/2000/svg">
    22            <circle stroke="#fff" fill="rgb(25,25,25)" stroke-width="2" cx="6" cy="6" r="5"/>
    3             </svg>`,n=new window.H.map.Marker(t,{icon:new window.H.map.Icon(l,{anchor:{x:6,y:6}})});n.draggable=!0,n.setData({index:e}),this.pointGroup.addObject(n)},drawLines(t){this.mapPolyline?this.mapPolyline.setGeometry(t):(this.mapPolyline=new window.H.map.Polyline(t,{style:{lineWidth:2,strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)"}}),this.mainGroup.addObject(this.mapPolyline))},drawPolygon(t){var e=new window.H.geo.Polygon(t);this.mapPolygon?this.mapPolygon.setGeometry(e):(this.mapPolygon=new window.H.map.Polygon(e,{style:{fillColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-bgColor")||"rgba(25, 25, 25, 0.2)",lineWidth:0}}),this.mainGroup.addObject(this.mapPolygon))},addPoint(t){var e=this.path.length;if(e===0&&this.initDraw(),e>=3&&this.closeToFirstPoint(t)){this.closePath();return}if(e>=Ee){K.toast(`Maximum support for ${Ee} strokes`);return}var l=this.path.length;this.path.push(t),this.addLineStringPoint(t),e++,this.drawPoint(t,l),e>=2&&(this.drawLines(this.geoLineString),e>=3&&this.drawPolygon(this.geoLineString))},closeToFirstPoint(t){var e=this.path,l=je.distance(e[0],t),n=3e-6*Math.pow(2,22-this.map.getZoom());return l<n},drawDashedLine(t,e){var l=new window.H.geo.LineString;l.pushLatLngAlt(t.lat,t.lng,0),l.pushLatLngAlt(e.lat,e.lng,0),this.tempDashedline?this.tempDashedline.setGeometry(l):(this.tempDashedline=new window.H.map.Polyline(l,{style:{lineWidth:2,strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)",lineDash:[2,4]}}),this.mainGroup.addObject(this.tempDashedline))},clearDashedLine(){this.tempDashedline&&setTimeout(()=>{this.mainGroup&&this.mainGroup.removeObject(this.tempDashedline),this.tempDashedline=null},210)},hoverPoint(t){var e=this.path.length;if(e>=1){e>=3&&this.closeToFirstPoint(t)&&(t=this.path[0]);var l=this.path[this.path.length-1];if(this.drawDashedLine(l,t),e>=2){this.geoLineString.pushLatLngAlt(t.lat,t.lng,0),this.drawPolygon(this.geoLineString);var n=this.geoLineString.getPointCount();this.geoLineString.removePoint(n-1)}}},closePath(){this.closeLineString(this.geoLineString),this.drawLines(this.geoLineString),this.outPath=this.path,this.endDraw(),this.listenDragPoint()},listenDragPoint(){this.pointGroup&&(this.pointerenterCb||(this.pointerenterCb=()=>{document.body.style.cursor="pointer"}),this.pointGroup.addEventListener("pointerenter",this.pointerenterCb,!0),this.pointerleaveCb||(this.pointerleaveCb=()=>{document.body.style.cursor="default"}),this.pointGroup.addEventListener("pointerleave",this.pointerleaveCb,!0),this.dragCb||(this.dragCb=t=>{var e=t.currentPointer,l=this.map.screenToGeo(e.viewportX,e.viewportY);t.target.setGeometry(l);var n=t.target.getData().index;if(this.geoLineString.removePoint(n),this.geoLineString.insertPoint(n,l),n===0&&this.geoLineString.isClosed){var u=this.geoLineString.getPointCount()-1;this.geoLineString.removePoint(u),this.geoLineString.pushPoint(l)}this.drawLines(this.geoLineString),this.drawPolygon(this.geoLineString),t.stopPropagation()}),this.pointGroup.addEventListener("drag",this.dragCb,!0),this.dragendCb||(this.dragendCb=t=>{var e=t.currentPointer,l=this.map.screenToGeo(e.viewportX,e.viewportY),n=t.target.getData().index;this.path.splice(n,1,l),this.outPath=[...this.path]}),this.pointGroup.addEventListener("dragend",this.dragendCb,!0))},stopListenDragPoint(){this.pointGroup&&(this.pointerenterCb&&this.pointGroup.removeEventListener("pointerenter",this.pointerenterCb,!0),this.pointerleaveCb&&this.pointGroup.removeEventListener("pointerleave",this.pointerleaveCb,!0),this.dragCb&&this.pointGroup.removeEventListener("drag",this.dragCb,!0),this.dragendCb&&this.pointGroup.removeEventListener("dragend",this.dragendCb,!0))},drawPath(t,e=!1){this.initDraw(),this.path=t,this.geoLineString=new window.H.geo.LineString,t.forEach((l,n)=>{this.geoLineString.pushLatLngAlt(l.lat,l.lng,0),this.drawPoint(l,n)}),this.closeLineString(this.geoLineString),this.drawLines(this.geoLineString),this.drawPolygon(this.geoLineString),this.listenDragPoint(),this.showTip=!0,e&&this.map.getViewModel().setLookAtData({bounds:this.geoLineString.getBoundingBox()},!0)},openDrawCircle({location:t,radius:e}){var u,o;(o=(u=this.map)==null?void 0:u.clearBoundary)==null||o.call(u),e=e||1,this.circleRadius=e,t=t||this.map.getCenter();let{lng:l,lat:n}=t;Object.prototype.toString.call(l)==="[object Function]"&&(l=l(),n=n()),this.location={lng:l,lat:n},this.map.setCenter(this.location),this.showCircle=!0,this.showTip=!0,this.store.mapRadius.value=this.formatBackendQuery({location:this.location,radius:e}),this.store.mapSyncType.value="radius",this.store.mapSyncList.value=!0,this.store.geometry.value=[],this.store.condition.location={}},createTip(){if(this.destroyTip(),this.mapbox){const t=this.mapbox.parentElement.querySelector("#tip");this.tipComp=ue(ho,{onCancel:()=>{this.clearDraw()}}),this.tipComp.mount(t)}},destroyTip(){this.tipComp&&(this.tipComp.unmount(),this.tipComp=null)},updateCircle({location:t,radius:e}){this.map.setCenter(t),this.circleRadius=e,this.location=t,this.showCircle=!1,this.$nextTick(()=>{this.drawing=!1,this.showCircle=!0,this.showTip=!0,this.store.mapRadius.value=this.formatBackendQuery({location:this.location,radius:e}),this.store.searchMap(),this.store.searchList()})},formatBackendQuery({location:t,radius:e}){return[JSON.stringify({originPoint:t,radius:e,unit:"miles"})]}},mounted(){if(this.store.polygonPath.value.length>0&&this.drawPath(this.store.polygonPath.value,!0),this.store.mapRadius.value.length>0){let{originPoint:t,radius:e}=JSON.parse(this.store.mapRadius.value[0]);this.openDrawCircle({location:t,radius:e},!1)}},components:{circleSearch:lo}},go={class:"draw"},mo={class:"btn-lofty"},fo={class:"select-item"};function yo(t,e,l,n,u,o){const s=Ce("circle-search");return d(),h("div",go,[a("div",mo,[u.showTip?(d(),h("span",{key:1,class:"btn-lofty-txt clear",onClick:e[5]||(e[5]=(...i)=>o.clearDraw&&o.clearDraw(...i))},"Clear")):(d(),h("div",{key:0,class:H(["btn-lofty-select",{unfold:u.showSelectDraw}]),onMouseenter:e[2]||(e[2]=(...i)=>o.handleMouseenter&&o.handleMouseenter(...i)),onMouseleave:e[3]||(e[3]=(...i)=>o.handleMouseleave&&o.handleMouseleave(...i)),onClick:e[4]||(e[4]=(...i)=>o.handleClick&&o.handleClick(...i))},[e[7]||(e[7]=a("span",{class:"btn-lofty-txt"},"Draw",-1)),e[8]||(e[8]=a("span",{class:"lofty_iconfont lofty-icon-arrow-down"},null,-1)),E(a("div",fo,[l.showPolygon?(d(),h("p",{key:0,onClick:e[0]||(e[0]=(...i)=>o.startDraw&&o.startDraw(...i))},"Polygon")):L("",!0),l.showRadius?(d(),h("p",{key:1,onClick:e[1]||(e[1]=(...i)=>o.openDrawCircle&&o.openDrawCircle(...i))},"Radius")):L("",!0),e[6]||(e[6]=a("div",{class:"opacity"},null,-1))],512),[[q,u.showSelectDraw]])],34))]),u.showCircle?(d(),R(s,{key:0,map:l.map,clearKey:u.clearKey,data:u.location,radius:u.circleRadius,onUpdateCircle:o.updateCircle},null,8,["map","clearKey","data","radius","onUpdateCircle"])):L("",!0)])}const vo=Z(po,[["render",yo]]),wo={inject:["store","isMobile"],computed:{hideMapAreaButton(){return this.store.mapSyncList.value&&this.store.mapSyncType.value==="mapArea"}},methods:{handler(){this.store.mapSyncList.value=!0,this.store.mapSyncType.value="mapArea",this.store.condition.location={}},showList(){this.store.toggleMap()}}},So={key:0,class:"lofty-search"},Co={key:1,class:"lofty-search"},bo={class:"split-line"};function Lo(t,e,l,n,u,o){return o.isMobile?(d(),h("div",Co,[E(a("span",{class:"search-text",onClick:e[1]||(e[1]=(...s)=>o.handler&&o.handler(...s))},"Search this area",512),[[q,!o.hideMapAreaButton]]),E(a("span",bo,null,512),[[q,!o.hideMapAreaButton]]),a("span",{class:"change-grid",onClick:e[2]||(e[2]=(...s)=>o.showList&&o.showList(...s))},e[3]||(e[3]=[a("i",{class:"lofty_iconfont lofty-icon-grid-fill"},null,-1),a("span",null,"Grid",-1)]))])):E((d(),h("div",So,[a("span",{class:"search-text",onClick:e[0]||(e[0]=(...s)=>o.handler&&o.handler(...s))},"Redo Search On Map Area")],512)),[[q,!o.hideMapAreaButton]])}const ko=Z(wo,[["render",Lo]]),Po={inject:["store","isMobile"],data(){return{isPop:!1,rating:"0",schoolChecked:this.store.showSchool.value,level:Q({elementary:{label:"Elementary",value:!0},middle:{label:"Middle",value:!0},high:{label:"High",value:!0}}),timer:null}},computed:{ratingText(){let t=this.rating;return t==="0"?"All":t+(t==="10"?"":"+")},schoolData(){return{admission:"public,private",level:Object.keys(this.level).filter(t=>this.level[t].value).join(","),rating:this.rating}}},watch:{schoolData:{handler:pe(function(){this.searchSchool()},300)}},methods:{toggleSchool(t){const e=t.target.checked;this.store.showSchool.value=e,e?this.searchSchool():this.store.markerData.school=[]},searchSchool(){this.store.searchSchool(this.schoolData)},handleMouseenter(){this.isMobile||(clearTimeout(this.timer),this.isPop=!0)},handleMouseleave(){this.isMobile||(this.timer=setTimeout(()=>{this.isPop=!1},100))},handleClick(){this.isMobile&&(this.isPop=!this.isPop)},updateRangeStyle(){const t=100*+this.rating/10;this.$refs.range.style.background=`linear-gradient(to right, #191919 ${t}%, rgba(218, 218, 218, 0.5) ${t}%)`}},mounted(){this.updateRangeStyle()}},Mo={class:"school"},To={class:"switch"},Do={class:"school"},_o=["onUpdate:modelValue","value"],Ro={class:"rating"},Eo={class:"range"},Oo={class:"label"};function Ao(t,e,l,n,u,o){return d(),h("div",Mo,[a("div",{class:H(["school-btn",{unfold:u.isPop}]),onClick:e[0]||(e[0]=(...s)=>o.handleClick&&o.handleClick(...s)),onMouseenter:e[1]||(e[1]=(...s)=>o.handleMouseenter&&o.handleMouseenter(...s)),onMouseleave:e[2]||(e[2]=(...s)=>o.handleMouseleave&&o.handleMouseleave(...s))},e[9]||(e[9]=[a("span",{class:"btn-txt"},"School",-1),a("span",{class:"lofty_iconfont lofty-icon-arrow-down"},null,-1)]),34),E(a("div",{class:"pop-school-search",ref:"pop",onMouseenter:e[7]||(e[7]=(...s)=>o.handleMouseenter&&o.handleMouseenter(...s)),onMouseleave:e[8]||(e[8]=(...s)=>o.handleMouseleave&&o.handleMouseleave(...s))},[a("div",To,[a("label",null,[E(a("input",{type:"checkbox",name:"switch","onUpdate:modelValue":e[3]||(e[3]=s=>u.schoolChecked=s),onInput:e[4]||(e[4]=(...s)=>o.toggleSchool&&o.toggleSchool(...s))},null,544),[[Me,u.schoolChecked]]),a("span",{class:H(["lofty_iconfont lofty-icon-checked",{mobile:o.isMobile}])},null,2),e[10]||(e[10]=a("span",null,"Show Schools On Map",-1))])]),e[14]||(e[14]=a("div",{class:"divider"},null,-1)),a("div",Do,[(d(!0),h(I,null,G(Object.keys(u.level),s=>(d(),h("label",{key:s},[E(a("input",{type:"checkbox",name:"level","onUpdate:modelValue":i=>u.level[s].value=i,value:s},null,8,_o),[[Me,u.level[s].value]]),a("span",{class:H(["lofty_iconfont lofty-icon-checked",{mobile:o.isMobile}])},null,2),Y(" "+S(s),1)]))),128))]),e[15]||(e[15]=a("div",{class:"divider"},null,-1)),e[16]||(e[16]=a("p",{class:"rating-title"},"GreatSchools Rating",-1)),a("div",Ro,[a("div",Eo,[e[12]||(e[12]=a("span",null,"Low",-1)),a("div",null,[E(a("input",{ref:"range",type:"range",name:"rating",min:"0",max:"10","onUpdate:modelValue":e[5]||(e[5]=s=>u.rating=s),onInput:e[6]||(e[6]=(...s)=>o.updateRangeStyle&&o.updateRangeStyle(...s))},null,544),[[Se,u.rating]]),e[11]||(e[11]=a("div",{class:"bar"},null,-1))]),e[13]||(e[13]=a("span",null,"High",-1))]),a("span",Oo,S(o.ratingText),1)])],544),[[q,u.isPop]])])}const No=Z(Po,[["render",Ao]]),$o={mixins:[ye],data(){return{type:"house"}},computed:{houses(){return this.data.items},housesStatus(){return"house-status-"+(this.houses[0].listingStatus||"").toLowerCase()}}},Io={key:0,class:"house-header"},jo={class:"house-list"},Bo=["href"],Ho={class:"house-top"},Uo=["src"],Go={class:"house-info"},Vo={key:0,class:"price"},zo={key:1,class:"price"},xo={class:"info"},Jo={class:"addr"},Fo={class:"house-bottom"},qo={class:"detail"},Ko={key:0,class:"house-mls-id"},Zo=["src"];function Wo(t,e,l,n,u,o){return t.parentDom?(d(),R(fe,{key:0,to:t.parentDom},[a("div",be({ref:"marker",class:["marker-house map-marker",{active:t.active===t.fmLatlng,hidden:t.data.destroyed}],onMouseenter:e[0]||(e[0]=(...s)=>t.onMouseEnter&&t.onMouseEnter(...s)),onMouseleave:e[1]||(e[1]=(...s)=>t.onMouseLeave&&t.onMouseLeave(...s)),onClick:e[2]||(e[2]=(...s)=>t.onClick&&t.onClick(...s)),onWheel:e[3]||(e[3]=B(()=>{},["stop"])),onMousewheel:e[4]||(e[4]=B(()=>{},["stop"]))},t.$attrs),[a("span",{class:H(["marker-shape",[{highlight:t.data.keepHighlight},o.housesStatus]])},[t.data.nodisclosureDes?(d(),h(I,{key:0},[Y("﹡﹡﹡﹡﹡")],64)):L("",!0),t.data.nodisclosureDes?L("",!0):(d(),h(I,{key:1},[Y(S(t.showPrice),1)],64))],2),a("div",{ref:"pop",class:H(["marker-pop",{multi:o.houses.length>1,bottom:t.popBottom}]),style:me(t.popStyle)},[o.houses.length>1?(d(),h("div",Io,[a("span",null,S(o.houses.length)+" units here ",1)])):L("",!0),a("ul",jo,[(d(!0),h(I,null,G(o.houses,s=>(d(),h("li",{class:"house-item",key:s.id},[a("a",{href:s.detailLink||s.detailUrl,target:"_blank",rel:"noopener noreferrer"},[a("div",Ho,[a("img",{class:"img-container",src:s.previewPicture,alt:""},null,8,Uo),a("div",Go,[s.nodisclosureDes?(d(),h("p",zo,S(s.nodisclosureDes),1)):(d(),h("p",Vo,S(s.soldDate?s.soldPrice:s.price),1)),a("div",xo,[(d(!0),h(I,null,G(s.basic,i=>(d(),h("span",{class:"desc-span",key:i.key},S(i.text),1))),128))]),a("p",Jo,S(s.streetAddress),1)])]),a("div",Fo,[a("div",qo,[s.showMls?(d(),h("p",Ko," Listing # "+S(s.mlsListingId),1)):L("",!0)]),s.mlsLogo?(d(),h("img",{key:0,class:"house-mls-logo",height:"18",src:s.mlsLogo,alt:"house mls logo"},null,8,Zo)):L("",!0)])],8,Bo)]))),128))])],6)],16)],8,["to"])):L("",!0)}const Oe=Z($o,[["render",Wo]]),Yo={emits:["update:active"],mixins:[ye],inject:["store"],directives:{outSideClick:Ue},data(){return{type:"school"}},methods:{pushLocation(){const{location:t}=this.store.condition;this.store.removeMapTag();const{keywordType:e,label:l}=this.data;t[e]?t[e].includes(l)===-1&&t[e].push(l):t[e]=[l]},touchstart(t){this.active||t.preventDefault(),this.onClick()},outClick(){this.active&&this.$emit("update:active","")}}},Qo={class:"school-list"},Xo={class:"info"},es={class:"left"},ts={class:"name"},os={class:"tip"},ss={class:"right"};function is(t,e,l,n,u,o){const s=$e("out-side-click");return t.parentDom?(d(),R(fe,{key:0,to:t.parentDom},[a("div",{class:H(["marker-school map-marker",{active:t.active===t.fmLatlng}]),onMouseenter:e[1]||(e[1]=(...i)=>t.onMouseEnter&&t.onMouseEnter(...i)),onMouseleave:e[2]||(e[2]=(...i)=>t.onMouseLeave&&t.onMouseLeave(...i)),onTouchstart:e[3]||(e[3]=(...i)=>o.touchstart&&o.touchstart(...i))},[e[5]||(e[5]=a("i",{class:"lofty_iconfont lofty-icon-school2"},null,-1)),a("div",{ref:"pop",class:H(["marker-pop",{bottom:t.popBottom}]),style:me(t.popStyle)},[a("span",{ref:"pointer",class:"pointer",style:me(t.pointerStyle)},null,4),E((d(),h("ul",Qo,[a("li",null,[a("div",Xo,[a("div",es,[a("p",ts,S(t.data.name),1),a("span",os,S(t.data.type)+" · "+S(t.data.gradeRange),1)]),a("div",ss,[a("div",{class:H({rating:!0,high:t.data.gsRating>9,middle:t.data.gsRating>=6&&t.data.gsRating<=9})},S(t.data.gsRating),3),e[4]||(e[4]=a("span",{class:"tip"},"Out of 10",-1))])]),a("div",{class:"link",onClick:e[0]||(e[0]=(...i)=>o.pushLocation&&o.pushLocation(...i))},"View Homes in This School Area")])])),[[s,o.outClick]])],6)],34)],8,["to"])):L("",!0)}const as=Z(Yo,[["render",is]]),ns={mixins:[ye],data(){return{type:"aggre"}},methods:{showBoundary(){if(this.boundary&&!this.isMobile)this.boundary.setVisibility(!0);else{const t={strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)",fillColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-bgColor")||"rgba(25, 25, 25, 0.2)",lineWidth:2},e=new window.H.geo.LineString,l=[];this.data.bounds.forEach((o,s)=>{if(Array.isArray(o))if(s===0)o.forEach(i=>{e.pushPoint(i)});else{const i=new window.H.geo.LineString;o.forEach(r=>{i.pushPoint(r)}),l.push(i)}else e.pushPoint(o)});const u=new window.H.geo.Polygon(e,l);this.boundary=new window.H.map.Polygon(u,{style:t}),this.map.addObject(this.boundary),this.boundary.setVisibility(!0)}this.onMouseEnter()},hideBoundary(){this.boundary&&this.boundary.setVisibility(!1),this.onMouseLeave()},onClick(){const t=this.events&&this.events.click;t&&t.call(this),this.hideBoundary();let{lat:e,lng:l}=this.data,n=this.map.getZoom();this.isMobile?n+=2:n+=n<10?3:n<=16?2:1,this.map.getViewModel().setLookAtData({position:{lat:e,lng:l},zoom:n},!0)}},beforeUnmount(){this.boundary&&this.map&&this.map.removeObject(this.boundary)}},ls={class:"marker-shape"},rs={class:"info"},us={class:"count"};function cs(t,e,l,n,u,o){return t.parentDom?(d(),R(fe,{key:0,to:t.parentDom},[a("div",be({class:["marker-aggre map-marker",{active:t.active===t.fmLatlng}],onMouseenter:e[0]||(e[0]=(...s)=>o.showBoundary&&o.showBoundary(...s)),onMouseleave:e[1]||(e[1]=(...s)=>o.hideBoundary&&o.hideBoundary(...s)),onClick:e[2]||(e[2]=(...s)=>o.onClick&&o.onClick(...s))},t.$attrs),[a("div",ls,[a("div",rs,[a("span",us,S(t.data.count),1)])])],16)],8,["to"])):L("",!0)}const ds=Z(ns,[["render",cs]]),hs={class:"marker-box aggre"},ps={class:"marker-box house"},gs={class:"marker-box school"},ms={__name:"listingMap",props:{id:String},setup(t){const e=t,{module:l,zoom:n,map:u,sold:o,rect:s,geometry:i,drawing:r,searchMap:y,listings:g,markerData:P,mlsList:O,condition:M,showMap:U,mapSyncType:V,dealHouseData:ee}=ae[e.id],A=Q({aggre:"",house:"",school:""});Te("isMobile",K.isMobile),Te("store",ae[e.id]);const te=f(!1),W=Q({lat:0,lng:0}),T={minZoom:4,maxZoom:20,zoom:n.value,center:{lat:40.00267,lng:-75.3057}};k();async function k(){const v=l.getModuleData().mapCenter;if(s){const p=s.split(",");T.center.lat=(+p[0]+ +p[2])/2,T.center.lng=(+p[1]+ +p[3])/2}else if(v)T.center.lng=+v.lng,T.center.lat=+v.lat,T.zoom=11,n.value=11;else{const p=await F.get("search/centerPoint");p.centerLatitude&&p.centerLongitude&&(T.center.lat=p.centerLatitude,T.center.lng=p.centerLongitude,n.value=p.zoom)}te.value=!0}const N=["city","zipCode","neighborhood"];function ne(){ge([M,U],async()=>{if(!U.value)return;const v=M.location||{};Object.keys(v).filter(m=>m!=="mapPath"&&m!=="mapRadius").length>0&&await de(v),N.some(m=>!!v[m])?ve(v):i.value=[],y()},{immediate:!0})}ge(g,()=>{const v=l.$all(".lofty-listing .lofty-house-item");Array.from(v).forEach(p=>{p.onmouseenter=m=>{const C=m.target.getAttribute("house-id"),z=g.value.find(j=>String(j.id)===C),J=ee([JSON.parse(JSON.stringify(z))]);P.activeHouse=J[0],P.activeHouseKey=Date.now()}})}),ge(U,v=>{if(v&&g.value[0]){const p=g.value[0];W.lat=+p.latitude,W.lng=+p.longitude}});const ce=f([]);async function de(v){const p={mlsOrgIds:O};for(let C in v){let z=v[C];["streetAddress"].includes(C)&&(z=v[C].map(J=>J.split(",")[0])),p[C]=z.join(";")}const{data:m}=await F.post("search/listing/locationSearch",{data:p});if(m&&m.length===2){const[C,z,J,j]=[m[0].longitude,m[1].longitude,m[0].latitude,m[1].latitude],w=Math.min(C,z),_=Math.max(C,z),b=Math.min(J,j),D=Math.max(J,j);ce.value=[[w,b],[w,D],[_,D],[_,b]]}else m.length===1&&(W.lat=m[0].latitude,W.lng=m[0].longitude,n.value=18,u.value.setZoom(18))}async function ve(v){const p={};N.forEach(C=>{v[C]&&(p[C]=v[C].join(";"))});const m=await F.get("search/hj/getBoundary",{data:p});i.value=m.geometry}const oe=K.debounce(y,300);function he(v){u.value=v,v.addEventListener("dragend",()=>{["polygon","radius"].includes(V.value)||oe()}),v.addEventListener("dbltap",p=>{let m=v.getZoom(),{viewportX:C,viewportY:z}=p.currentPointer,J=v.screenToGeo(C,z);const j=T.maxZoom||20,w=Math.min(m+1,j);v.getViewModel().setLookAtData({position:J,zoom:w},!0),y()}),v.addEventListener("mapviewchangeend",()=>{const p=Math.round(u.value.getZoom());n.value!==p&&(n.value=p,oe())}),ne()}return(v,p)=>c(te)?(d(),R(Je,{key:0,onInit:he,config:T,center:c(W),boundary:c(ce),geometry:c(i),class:H({drawing:c(r)})},{default:ie(()=>[X(ko,{class:"map-tool"}),c(o)?L("",!0):(d(),R(No,{key:0,class:"map-tool"})),X(vo,{class:H(["map-tool",{"draw-is-sold":c(o)}]),map:c(u)},null,8,["class","map"]),p[3]||(p[3]=a("div",{id:"tip"},null,-1)),a("div",hs,[(d(!0),h(I,null,G(c(P).aggregation,m=>(d(),R(ds,{key:m.key,map:c(u),class:"map-marker",data:m,active:c(A).aggre,"onUpdate:active":p[0]||(p[0]=C=>c(A).aggre=C)},null,8,["map","data","active"]))),128))]),a("div",ps,[(d(!0),h(I,null,G(c(P).house,m=>(d(),R(Oe,{key:m.key,map:c(u),class:"map-marker",data:m,active:c(A).house,"onUpdate:active":p[1]||(p[1]=C=>c(A).house=C)},null,8,["map","data","active"]))),128)),c(P).activeHouse?(d(),R(Oe,{map:c(u),key:c(P).activeHouseKey,class:"map-marker active-house",data:c(P).activeHouse},null,8,["map","data"])):L("",!0)]),a("div",gs,[(d(!0),h(I,null,G(c(P).school,m=>(d(),R(as,{key:m.key,map:c(u),class:"map-marker",data:m,active:c(A).school,"onUpdate:active":p[2]||(p[2]=C=>c(A).school=C)},null,8,["map","data","active"]))),128))])]),_:1},8,["center","boundary","geometry","class"])):L("",!0)}};(async()=>(rt(),ut(),await _e.initState(()=>{var t,e;et(),(e=(t=_e.mlsList)==null?void 0:t.forEach)==null||e.call(t,l=>ct(l))}),tt(),jQuery(".lofty-listing-page").ready(function(){const t=document.querySelectorAll(".lofty-listing-page");t.length>0&&t.forEach(e=>{const l=e.getAttribute("id"),n=Ge(l),{id:u,$:o}=n;ht(n);const s=n.getModuleData();ue(Tt,{id:u}).mount(o("#lofty-listing-search")),ue(Ht,{id:u}).mount(o("#lofty_filter_container")),ue(Ut,{id:u}).mount(o("#lofty_pagination_container")),s.hasMap&&ue(ms,{id:u}).mount(o("#lofty-map-container"))})})))();
     3            </svg>`,n=new window.H.map.Marker(t,{icon:new window.H.map.Icon(l,{anchor:{x:6,y:6}})});n.draggable=!0,n.setData({index:e}),this.pointGroup.addObject(n)},drawLines(t){this.mapPolyline?this.mapPolyline.setGeometry(t):(this.mapPolyline=new window.H.map.Polyline(t,{style:{lineWidth:2,strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)"}}),this.mainGroup.addObject(this.mapPolyline))},drawPolygon(t){var e=new window.H.geo.Polygon(t);this.mapPolygon?this.mapPolygon.setGeometry(e):(this.mapPolygon=new window.H.map.Polygon(e,{style:{fillColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-bgColor")||"rgba(25, 25, 25, 0.2)",lineWidth:0}}),this.mainGroup.addObject(this.mapPolygon))},addPoint(t){var e=this.path.length;if(e===0&&this.initDraw(),e>=3&&this.closeToFirstPoint(t)){this.closePath();return}if(e>=Ee){K.toast(`Maximum support for ${Ee} strokes`);return}var l=this.path.length;this.path.push(t),this.addLineStringPoint(t),e++,this.drawPoint(t,l),e>=2&&(this.drawLines(this.geoLineString),e>=3&&this.drawPolygon(this.geoLineString))},closeToFirstPoint(t){var e=this.path,l=je.distance(e[0],t),n=3e-6*Math.pow(2,22-this.map.getZoom());return l<n},drawDashedLine(t,e){var l=new window.H.geo.LineString;l.pushLatLngAlt(t.lat,t.lng,0),l.pushLatLngAlt(e.lat,e.lng,0),this.tempDashedline?this.tempDashedline.setGeometry(l):(this.tempDashedline=new window.H.map.Polyline(l,{style:{lineWidth:2,strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)",lineDash:[2,4]}}),this.mainGroup.addObject(this.tempDashedline))},clearDashedLine(){this.tempDashedline&&setTimeout(()=>{this.mainGroup&&this.mainGroup.removeObject(this.tempDashedline),this.tempDashedline=null},210)},hoverPoint(t){var e=this.path.length;if(e>=1){e>=3&&this.closeToFirstPoint(t)&&(t=this.path[0]);var l=this.path[this.path.length-1];if(this.drawDashedLine(l,t),e>=2){this.geoLineString.pushLatLngAlt(t.lat,t.lng,0),this.drawPolygon(this.geoLineString);var n=this.geoLineString.getPointCount();this.geoLineString.removePoint(n-1)}}},closePath(){this.closeLineString(this.geoLineString),this.drawLines(this.geoLineString),this.outPath=this.path,this.endDraw(),this.listenDragPoint()},listenDragPoint(){this.pointGroup&&(this.pointerenterCb||(this.pointerenterCb=()=>{document.body.style.cursor="pointer"}),this.pointGroup.addEventListener("pointerenter",this.pointerenterCb,!0),this.pointerleaveCb||(this.pointerleaveCb=()=>{document.body.style.cursor="default"}),this.pointGroup.addEventListener("pointerleave",this.pointerleaveCb,!0),this.dragCb||(this.dragCb=t=>{var e=t.currentPointer,l=this.map.screenToGeo(e.viewportX,e.viewportY);t.target.setGeometry(l);var n=t.target.getData().index;if(this.geoLineString.removePoint(n),this.geoLineString.insertPoint(n,l),n===0&&this.geoLineString.isClosed){var u=this.geoLineString.getPointCount()-1;this.geoLineString.removePoint(u),this.geoLineString.pushPoint(l)}this.drawLines(this.geoLineString),this.drawPolygon(this.geoLineString),t.stopPropagation()}),this.pointGroup.addEventListener("drag",this.dragCb,!0),this.dragendCb||(this.dragendCb=t=>{var e=t.currentPointer,l=this.map.screenToGeo(e.viewportX,e.viewportY),n=t.target.getData().index;this.path.splice(n,1,l),this.outPath=[...this.path]}),this.pointGroup.addEventListener("dragend",this.dragendCb,!0))},stopListenDragPoint(){this.pointGroup&&(this.pointerenterCb&&this.pointGroup.removeEventListener("pointerenter",this.pointerenterCb,!0),this.pointerleaveCb&&this.pointGroup.removeEventListener("pointerleave",this.pointerleaveCb,!0),this.dragCb&&this.pointGroup.removeEventListener("drag",this.dragCb,!0),this.dragendCb&&this.pointGroup.removeEventListener("dragend",this.dragendCb,!0))},drawPath(t,e=!1){this.initDraw(),this.path=t,this.geoLineString=new window.H.geo.LineString,t.forEach((l,n)=>{this.geoLineString.pushLatLngAlt(l.lat,l.lng,0),this.drawPoint(l,n)}),this.closeLineString(this.geoLineString),this.drawLines(this.geoLineString),this.drawPolygon(this.geoLineString),this.listenDragPoint(),this.showTip=!0,e&&this.map.getViewModel().setLookAtData({bounds:this.geoLineString.getBoundingBox()},!0)},openDrawCircle({location:t,radius:e}){var u,o;(o=(u=this.map)==null?void 0:u.clearBoundary)==null||o.call(u),e=e||1,this.circleRadius=e,t=t||this.map.getCenter();let{lng:l,lat:n}=t;Object.prototype.toString.call(l)==="[object Function]"&&(l=l(),n=n()),this.location={lng:l,lat:n},this.map.setCenter(this.location),this.showCircle=!0,this.showTip=!0,this.store.mapRadius.value=this.formatBackendQuery({location:this.location,radius:e}),this.store.mapSyncType.value="radius",this.store.mapSyncList.value=!0,this.store.geometry.value=[],this.store.condition.location={}},createTip(){if(this.destroyTip(),this.mapbox){const t=this.mapbox.parentElement.querySelector("#tip");this.tipComp=ue(ho,{onCancel:()=>{this.clearDraw()}}),this.tipComp.mount(t)}},destroyTip(){this.tipComp&&(this.tipComp.unmount(),this.tipComp=null)},updateCircle({location:t,radius:e}){this.map.setCenter(t),this.circleRadius=e,this.location=t,this.showCircle=!1,this.$nextTick(()=>{this.drawing=!1,this.showCircle=!0,this.showTip=!0,this.store.mapRadius.value=this.formatBackendQuery({location:this.location,radius:e}),this.store.searchMap(),this.store.searchList()})},formatBackendQuery({location:t,radius:e}){return[JSON.stringify({originPoint:t,radius:e,unit:"miles"})]}},mounted(){if(this.store.polygonPath.value.length>0&&this.drawPath(this.store.polygonPath.value,!0),this.store.mapRadius.value.length>0){let{originPoint:t,radius:e}=JSON.parse(this.store.mapRadius.value[0]);this.openDrawCircle({location:t,radius:e},!1)}},components:{circleSearch:lo}},go={class:"draw"},mo={class:"btn-lofty"},fo={class:"select-item"};function yo(t,e,l,n,u,o){const s=Ce("circle-search");return d(),h("div",go,[a("div",mo,[u.showTip?(d(),h("span",{key:1,class:"btn-lofty-txt clear",onClick:e[5]||(e[5]=(...i)=>o.clearDraw&&o.clearDraw(...i))},"Clear")):(d(),h("div",{key:0,class:H(["btn-lofty-select",{unfold:u.showSelectDraw}]),onMouseenter:e[2]||(e[2]=(...i)=>o.handleMouseenter&&o.handleMouseenter(...i)),onMouseleave:e[3]||(e[3]=(...i)=>o.handleMouseleave&&o.handleMouseleave(...i)),onClick:e[4]||(e[4]=(...i)=>o.handleClick&&o.handleClick(...i))},[e[7]||(e[7]=a("span",{class:"btn-lofty-txt"},"Draw",-1)),e[8]||(e[8]=a("span",{class:"lofty_iconfont lofty-icon-arrow-down"},null,-1)),E(a("div",fo,[l.showPolygon?(d(),h("p",{key:0,onClick:e[0]||(e[0]=(...i)=>o.startDraw&&o.startDraw(...i))},"Polygon")):L("",!0),l.showRadius?(d(),h("p",{key:1,onClick:e[1]||(e[1]=(...i)=>o.openDrawCircle&&o.openDrawCircle(...i))},"Radius")):L("",!0),e[6]||(e[6]=a("div",{class:"opacity"},null,-1))],512),[[q,u.showSelectDraw]])],34))]),u.showCircle?(d(),R(s,{key:0,map:l.map,clearKey:u.clearKey,data:u.location,radius:u.circleRadius,onUpdateCircle:o.updateCircle},null,8,["map","clearKey","data","radius","onUpdateCircle"])):L("",!0)])}const vo=Z(po,[["render",yo]]),wo={inject:["store","isMobile"],computed:{hideMapAreaButton(){return this.store.mapSyncList.value&&this.store.mapSyncType.value==="mapArea"}},methods:{handler(){this.store.mapSyncList.value=!0,this.store.mapSyncType.value="mapArea",this.store.condition.location={}},showList(){this.store.toggleMap()}}},So={key:0,class:"lofty-search"},Co={key:1,class:"lofty-search"},bo={class:"split-line"};function Lo(t,e,l,n,u,o){return o.isMobile?(d(),h("div",Co,[E(a("span",{class:"search-text",onClick:e[1]||(e[1]=(...s)=>o.handler&&o.handler(...s))},"Search this area",512),[[q,!o.hideMapAreaButton]]),E(a("span",bo,null,512),[[q,!o.hideMapAreaButton]]),a("span",{class:"change-grid",onClick:e[2]||(e[2]=(...s)=>o.showList&&o.showList(...s))},e[3]||(e[3]=[a("i",{class:"lofty_iconfont lofty-icon-grid-fill"},null,-1),a("span",null,"Grid",-1)]))])):E((d(),h("div",So,[a("span",{class:"search-text",onClick:e[0]||(e[0]=(...s)=>o.handler&&o.handler(...s))},"Redo Search On Map Area")],512)),[[q,!o.hideMapAreaButton]])}const ko=Z(wo,[["render",Lo]]),Po={inject:["store","isMobile"],data(){return{isPop:!1,rating:"0",schoolChecked:this.store.showSchool.value,level:Q({elementary:{label:"Elementary",value:!0},middle:{label:"Middle",value:!0},high:{label:"High",value:!0}}),timer:null}},computed:{ratingText(){let t=this.rating;return t==="0"?"All":t+(t==="10"?"":"+")},schoolData(){return{admission:"public,private",level:Object.keys(this.level).filter(t=>this.level[t].value).join(","),rating:this.rating}}},watch:{schoolData:{handler:pe(function(){this.searchSchool()},300)}},methods:{toggleSchool(t){const e=t.target.checked;this.store.showSchool.value=e,e?this.searchSchool():this.store.markerData.school=[]},searchSchool(){this.store.searchSchool(this.schoolData)},handleMouseenter(){this.isMobile||(clearTimeout(this.timer),this.isPop=!0)},handleMouseleave(){this.isMobile||(this.timer=setTimeout(()=>{this.isPop=!1},100))},handleClick(){this.isMobile&&(this.isPop=!this.isPop)},updateRangeStyle(){const t=100*+this.rating/10;this.$refs.range.style.background=`linear-gradient(to right, #191919 ${t}%, rgba(218, 218, 218, 0.5) ${t}%)`}},mounted(){this.updateRangeStyle()}},Mo={class:"school"},To={class:"switch"},Do={class:"school"},_o=["onUpdate:modelValue","value"],Ro={class:"rating"},Eo={class:"range"},Oo={class:"label"};function Ao(t,e,l,n,u,o){return d(),h("div",Mo,[a("div",{class:H(["school-btn",{unfold:u.isPop}]),onClick:e[0]||(e[0]=(...s)=>o.handleClick&&o.handleClick(...s)),onMouseenter:e[1]||(e[1]=(...s)=>o.handleMouseenter&&o.handleMouseenter(...s)),onMouseleave:e[2]||(e[2]=(...s)=>o.handleMouseleave&&o.handleMouseleave(...s))},e[9]||(e[9]=[a("span",{class:"btn-txt"},"School",-1),a("span",{class:"lofty_iconfont lofty-icon-arrow-down"},null,-1)]),34),E(a("div",{class:"pop-school-search",ref:"pop",onMouseenter:e[7]||(e[7]=(...s)=>o.handleMouseenter&&o.handleMouseenter(...s)),onMouseleave:e[8]||(e[8]=(...s)=>o.handleMouseleave&&o.handleMouseleave(...s))},[a("div",To,[a("label",null,[E(a("input",{type:"checkbox",name:"switch","onUpdate:modelValue":e[3]||(e[3]=s=>u.schoolChecked=s),onInput:e[4]||(e[4]=(...s)=>o.toggleSchool&&o.toggleSchool(...s))},null,544),[[Me,u.schoolChecked]]),a("span",{class:H(["lofty_iconfont lofty-icon-checked",{mobile:o.isMobile}])},null,2),e[10]||(e[10]=a("span",null,"Show Schools On Map",-1))])]),e[14]||(e[14]=a("div",{class:"divider"},null,-1)),a("div",Do,[(d(!0),h(I,null,G(Object.keys(u.level),s=>(d(),h("label",{key:s},[E(a("input",{type:"checkbox",name:"level","onUpdate:modelValue":i=>u.level[s].value=i,value:s},null,8,_o),[[Me,u.level[s].value]]),a("span",{class:H(["lofty_iconfont lofty-icon-checked",{mobile:o.isMobile}])},null,2),Y(" "+S(s),1)]))),128))]),e[15]||(e[15]=a("div",{class:"divider"},null,-1)),e[16]||(e[16]=a("p",{class:"rating-title"},"GreatSchools Rating",-1)),a("div",Ro,[a("div",Eo,[e[12]||(e[12]=a("span",null,"Low",-1)),a("div",null,[E(a("input",{ref:"range",type:"range",name:"rating",min:"0",max:"10","onUpdate:modelValue":e[5]||(e[5]=s=>u.rating=s),onInput:e[6]||(e[6]=(...s)=>o.updateRangeStyle&&o.updateRangeStyle(...s))},null,544),[[Se,u.rating]]),e[11]||(e[11]=a("div",{class:"bar"},null,-1))]),e[13]||(e[13]=a("span",null,"High",-1))]),a("span",Oo,S(o.ratingText),1)])],544),[[q,u.isPop]])])}const No=Z(Po,[["render",Ao]]),$o={mixins:[ye],data(){return{type:"house"}},computed:{houses(){return this.data.items},housesStatus(){return"house-status-"+(this.houses[0].listingStatus||"").toLowerCase()}}},Io={key:0,class:"house-header"},jo={class:"house-list"},Bo=["href"],Ho={class:"house-top"},Uo=["src"],Go={class:"house-info"},Vo={key:0,class:"price"},zo={key:1,class:"price"},Jo={class:"info"},xo={class:"addr"},Fo={class:"house-bottom"},qo={class:"detail"},Ko={key:0,class:"house-mls-id"},Zo=["src"];function Wo(t,e,l,n,u,o){return t.parentDom?(d(),R(fe,{key:0,to:t.parentDom},[a("div",be({ref:"marker",class:["marker-house map-marker",{active:t.active===t.fmLatlng,hidden:t.data.destroyed}],onMouseenter:e[0]||(e[0]=(...s)=>t.onMouseEnter&&t.onMouseEnter(...s)),onMouseleave:e[1]||(e[1]=(...s)=>t.onMouseLeave&&t.onMouseLeave(...s)),onClick:e[2]||(e[2]=(...s)=>t.onClick&&t.onClick(...s)),onWheel:e[3]||(e[3]=B(()=>{},["stop"])),onMousewheel:e[4]||(e[4]=B(()=>{},["stop"]))},t.$attrs),[a("span",{class:H(["marker-shape",[{highlight:t.data.keepHighlight},o.housesStatus]])},[t.data.nodisclosureDes?(d(),h(I,{key:0},[Y("﹡﹡﹡﹡﹡")],64)):L("",!0),t.data.nodisclosureDes?L("",!0):(d(),h(I,{key:1},[Y(S(t.showPrice),1)],64))],2),a("div",{ref:"pop",class:H(["marker-pop",{multi:o.houses.length>1,bottom:t.popBottom}]),style:me(t.popStyle)},[o.houses.length>1?(d(),h("div",Io,[a("span",null,S(o.houses.length)+" units here ",1)])):L("",!0),a("ul",jo,[(d(!0),h(I,null,G(o.houses,s=>(d(),h("li",{class:"house-item",key:s.id},[a("a",{href:s.detailLink||s.detailUrl,target:"_blank",rel:"noopener noreferrer"},[a("div",Ho,[a("img",{class:"img-container",src:s.previewPicture,alt:""},null,8,Uo),a("div",Go,[s.nodisclosureDes?(d(),h("p",zo,S(s.nodisclosureDes),1)):(d(),h("p",Vo,S(s.soldDate?s.soldPrice:s.price),1)),a("div",Jo,[(d(!0),h(I,null,G(s.basic,i=>(d(),h("span",{class:"desc-span",key:i.key},S(i.text),1))),128))]),a("p",xo,S(s.streetAddress),1)])]),a("div",Fo,[a("div",qo,[s.showMls?(d(),h("p",Ko," Listing # "+S(s.mlsListingId),1)):L("",!0)]),s.mlsLogo?(d(),h("img",{key:0,class:"house-mls-logo",height:"18",src:s.mlsLogo,alt:"house mls logo"},null,8,Zo)):L("",!0)])],8,Bo)]))),128))])],6)],16)],8,["to"])):L("",!0)}const Oe=Z($o,[["render",Wo]]),Yo={emits:["update:active"],mixins:[ye],inject:["store"],directives:{outSideClick:Ue},data(){return{type:"school"}},methods:{pushLocation(){const{location:t}=this.store.condition;this.store.removeMapTag();const{keywordType:e,label:l}=this.data;t[e]?t[e].includes(l)===-1&&t[e].push(l):t[e]=[l]},touchstart(t){this.active||t.preventDefault(),this.onClick()},outClick(){this.active&&this.$emit("update:active","")}}},Qo={class:"school-list"},Xo={class:"info"},es={class:"left"},ts={class:"name"},os={class:"tip"},ss={class:"right"};function is(t,e,l,n,u,o){const s=$e("out-side-click");return t.parentDom?(d(),R(fe,{key:0,to:t.parentDom},[a("div",{class:H(["marker-school map-marker",{active:t.active===t.fmLatlng}]),onMouseenter:e[1]||(e[1]=(...i)=>t.onMouseEnter&&t.onMouseEnter(...i)),onMouseleave:e[2]||(e[2]=(...i)=>t.onMouseLeave&&t.onMouseLeave(...i)),onTouchstart:e[3]||(e[3]=(...i)=>o.touchstart&&o.touchstart(...i))},[e[5]||(e[5]=a("i",{class:"lofty_iconfont lofty-icon-school2"},null,-1)),a("div",{ref:"pop",class:H(["marker-pop",{bottom:t.popBottom}]),style:me(t.popStyle)},[a("span",{ref:"pointer",class:"pointer",style:me(t.pointerStyle)},null,4),E((d(),h("ul",Qo,[a("li",null,[a("div",Xo,[a("div",es,[a("p",ts,S(t.data.name),1),a("span",os,S(t.data.type)+" · "+S(t.data.gradeRange),1)]),a("div",ss,[a("div",{class:H({rating:!0,high:t.data.gsRating>9,middle:t.data.gsRating>=6&&t.data.gsRating<=9})},S(t.data.gsRating),3),e[4]||(e[4]=a("span",{class:"tip"},"Out of 10",-1))])]),a("div",{class:"link",onClick:e[0]||(e[0]=(...i)=>o.pushLocation&&o.pushLocation(...i))},"View Homes in This School Area")])])),[[s,o.outClick]])],6)],34)],8,["to"])):L("",!0)}const as=Z(Yo,[["render",is]]),ns={mixins:[ye],data(){return{type:"aggre"}},methods:{showBoundary(){if(this.boundary&&!this.isMobile)this.boundary.setVisibility(!0);else{const t={strokeColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-borderColor")||"rgb(25, 25, 25)",fillColor:getComputedStyle(document.documentElement).getPropertyValue("--lofty-map-polygon-bgColor")||"rgba(25, 25, 25, 0.2)",lineWidth:2},e=new window.H.geo.LineString,l=[];this.data.bounds.forEach((o,s)=>{if(Array.isArray(o))if(s===0)o.forEach(i=>{e.pushPoint(i)});else{const i=new window.H.geo.LineString;o.forEach(r=>{i.pushPoint(r)}),l.push(i)}else e.pushPoint(o)});const u=new window.H.geo.Polygon(e,l);this.boundary=new window.H.map.Polygon(u,{style:t}),this.map.addObject(this.boundary),this.boundary.setVisibility(!0)}this.onMouseEnter()},hideBoundary(){this.boundary&&this.boundary.setVisibility(!1),this.onMouseLeave()},onClick(){const t=this.events&&this.events.click;t&&t.call(this),this.hideBoundary();let{lat:e,lng:l}=this.data,n=this.map.getZoom();this.isMobile?n+=2:n+=n<10?3:n<=16?2:1,this.map.getViewModel().setLookAtData({position:{lat:e,lng:l},zoom:n},!0)}},beforeUnmount(){this.boundary&&this.map&&this.map.removeObject(this.boundary)}},ls={class:"marker-shape"},rs={class:"info"},us={class:"count"};function cs(t,e,l,n,u,o){return t.parentDom?(d(),R(fe,{key:0,to:t.parentDom},[a("div",be({class:["marker-aggre map-marker",{active:t.active===t.fmLatlng}],onMouseenter:e[0]||(e[0]=(...s)=>o.showBoundary&&o.showBoundary(...s)),onMouseleave:e[1]||(e[1]=(...s)=>o.hideBoundary&&o.hideBoundary(...s)),onClick:e[2]||(e[2]=(...s)=>o.onClick&&o.onClick(...s))},t.$attrs),[a("div",ls,[a("div",rs,[a("span",us,S(t.data.count),1)])])],16)],8,["to"])):L("",!0)}const ds=Z(ns,[["render",cs]]),hs={class:"marker-box aggre"},ps={class:"marker-box house"},gs={class:"marker-box school"},ms={__name:"listingMap",props:{id:String},setup(t){const e=t,{module:l,zoom:n,map:u,sold:o,rect:s,geometry:i,drawing:r,searchMap:y,listings:g,markerData:P,mlsList:O,condition:M,showMap:U,mapSyncType:V,dealHouseData:ee}=ae[e.id],A=Q({aggre:"",house:"",school:""});Te("isMobile",K.isMobile),Te("store",ae[e.id]);const te=f(!1),W=Q({lat:0,lng:0}),T={minZoom:4,maxZoom:20,zoom:n.value,center:{lat:40.00267,lng:-75.3057}};k();async function k(){const v=l.getModuleData().mapCenter;if(s){const p=s.split(",");T.center.lat=(+p[0]+ +p[2])/2,T.center.lng=(+p[1]+ +p[3])/2}else if(v)T.center.lng=+v.lng,T.center.lat=+v.lat,T.zoom=11,n.value=11;else{const p=await F.get("search/centerPoint");p.centerLatitude&&p.centerLongitude&&(T.center.lat=p.centerLatitude,T.center.lng=p.centerLongitude,n.value=p.zoom)}te.value=!0}const N=["city","zipCode","neighborhood"];function ne(){ge([M,U],async()=>{if(!U.value)return;const v=M.location||{};Object.keys(v).filter(m=>m!=="mapPath"&&m!=="mapRadius").length>0&&await de(v),N.some(m=>!!v[m])?ve(v):i.value=[],y()},{immediate:!0})}ge(g,()=>{const v=l.$all(".lofty-listing .lofty-house-item");Array.from(v).forEach(p=>{p.onmouseenter=m=>{const C=m.target.getAttribute("house-id"),z=g.value.find(j=>String(j.id)===C),x=ee([JSON.parse(JSON.stringify(z))]);P.activeHouse=x[0],P.activeHouseKey=Date.now()}})}),ge(U,v=>{if(v&&g.value[0]){const p=g.value[0];W.lat=+p.latitude,W.lng=+p.longitude}});const ce=f([]);async function de(v){const p={mlsOrgIds:O};for(let C in v){let z=v[C];["streetAddress"].includes(C)&&(z=v[C].map(x=>x.split(",")[0])),p[C]=z.join(";")}const{data:m}=await F.post("search/listing/locationSearch",{data:p});if(m&&m.length===2){const[C,z,x,j]=[m[0].longitude,m[1].longitude,m[0].latitude,m[1].latitude],w=Math.min(C,z),_=Math.max(C,z),b=Math.min(x,j),D=Math.max(x,j);ce.value=[[w,b],[w,D],[_,D],[_,b]]}else m.length===1&&(W.lat=m[0].latitude,W.lng=m[0].longitude,n.value=18,u.value.setZoom(18))}async function ve(v){const p={};N.forEach(C=>{v[C]&&(p[C]=v[C].join(";"))});const m=await F.get("search/hj/getBoundary",{data:p});i.value=m.geometry}const oe=K.debounce(y,300);function he(v){u.value=v,v.addEventListener("dragend",()=>{["polygon","radius"].includes(V.value)||oe()}),v.addEventListener("dbltap",p=>{let m=v.getZoom(),{viewportX:C,viewportY:z}=p.currentPointer,x=v.screenToGeo(C,z);const j=T.maxZoom||20,w=Math.min(m+1,j);v.getViewModel().setLookAtData({position:x,zoom:w},!0),y()}),v.addEventListener("mapviewchangeend",()=>{const p=Math.round(u.value.getZoom());n.value!==p&&(n.value=p,oe())}),ne()}return(v,p)=>c(te)?(d(),R(xe,{key:0,onInit:he,config:T,center:c(W),boundary:c(ce),geometry:c(i),class:H({drawing:c(r)})},{default:ie(()=>[X(ko,{class:"map-tool"}),c(o)?L("",!0):(d(),R(No,{key:0,class:"map-tool"})),X(vo,{class:H(["map-tool",{"draw-is-sold":c(o)}]),map:c(u)},null,8,["class","map"]),p[3]||(p[3]=a("div",{id:"tip"},null,-1)),a("div",hs,[(d(!0),h(I,null,G(c(P).aggregation,m=>(d(),R(ds,{key:m.key,map:c(u),class:"map-marker",data:m,active:c(A).aggre,"onUpdate:active":p[0]||(p[0]=C=>c(A).aggre=C)},null,8,["map","data","active"]))),128))]),a("div",ps,[(d(!0),h(I,null,G(c(P).house,m=>(d(),R(Oe,{key:m.key,map:c(u),class:"map-marker",data:m,active:c(A).house,"onUpdate:active":p[1]||(p[1]=C=>c(A).house=C)},null,8,["map","data","active"]))),128)),c(P).activeHouse?(d(),R(Oe,{map:c(u),key:c(P).activeHouseKey,class:"map-marker active-house",data:c(P).activeHouse},null,8,["map","data"])):L("",!0)]),a("div",gs,[(d(!0),h(I,null,G(c(P).school,m=>(d(),R(as,{key:m.key,map:c(u),class:"map-marker",data:m,active:c(A).school,"onUpdate:active":p[2]||(p[2]=C=>c(A).school=C)},null,8,["map","data","active"]))),128))])]),_:1},8,["center","boundary","geometry","class"])):L("",!0)}};(async()=>(rt(),ut(),await _e.initState(()=>{var t,e;et(),(e=(t=_e.mlsList)==null?void 0:t.forEach)==null||e.call(t,l=>ct(l))}),tt(),jQuery(".lofty-listing-page").ready(function(){const t=document.querySelectorAll(".lofty-listing-page");t.length>0&&t.forEach(e=>{const l=e.getAttribute("id"),n=Ge(l),{id:u,$:o}=n;ht(n);const s=n.getModuleData();ue(Tt,{id:u}).mount(o("#lofty-listing-search")),ue(Ht,{id:u}).mount(o("#lofty_filter_container")),ue(Ut,{id:u}).mount(o("#lofty_pagination_container")),s.hasMap&&ue(ms,{id:u}).mount(o("#lofty-map-container"))})})))();
  • lofty-idx/trunk/assets/market-report.js

    r3393952 r3393989  
    1 import{g as U,i as d,h as A,o as Y,u as F,d as Z}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{r as S,c as C,k as j,l as E,o as l,d as x,w as R,e,f as V,q as N,s as O,y as z,u as t,v as tt,x as D,m as B,g as y,F as k,D as Q,p as et,M as st,J as ot,j as b,a as it,N as at,h as M,t as $,I as nt,H as lt}from"./vendor.DSMCY3-_.js";import{c as rt}from"./module.CKjUdtPN.js";import{u as q}from"./user.BF73KgDm.js";import{a as dt,s as ct}from"./popup-mls.BZWi9Sqc.js";import{_ as ut}from"./index.BAT38o-R.js";import{c as pt}from"./index.C1-1XiZ9.js";import{P as yt}from"./index.qpyE7W-K.js";import{_ as ft}from"./index.BIsjoQ8l.js";import{n as P}from"./number-format.CLdvQh6j.js";import{E as mt}from"./feature-listing-slider.QgT9uoot.js";import{_ as gt}from"./houseSlider.ptuPATjg.js";import{f as W}from"./house-format.Bvy9O_Yy.js";import{_ as X}from"./index.CzlBbxbG.js";import{I as vt}from"./index.DMIL01Q7.js";import"./useConfirm.BQXs6K30.js";import"./outsideclick.Bw_hMuzW.js";import"./google.Cnb9DEy-.js";import"./verify-email.B_du1TfR.js";const I={};function ht(o){const i=o.getModuleData(),s={module:o,isShortCode:i.isShortCode,config:S(i.isShortCode?i.shortcode_config:{}),featureListingName:C(()=>s.config.value.featureListingName),hideDropDown:S(!1),submitJs:i.submitJs},r={getPageSize(){if(d)return 4;{const n=window.innerWidth;if(n>1480)return 4;if(n>900)return 3}},async getReportByTitle(n){r.syncUrl(n);const{data:f}=await A.post("/admin/report/getByTitle",{data:{title:n}});s.config.value={encryptId:f.encryptId,title:f.title,featureListingName:f.filterName,show_new:f.extraInfo.displayNewListing,show_pending:f.extraInfo.displayPendingListings,show_sold:f.extraInfo.displaySoldListings,leadSubscribeStatus:!!f.leadSubscribeStatus}},syncUrl(n){let f=window.location.pathname,g=U();g.report=encodeURIComponent(n),f=f+"?"+Y(g),window.history.pushState(null,"",f)}},a=U();return a.report&&r.getReportByTitle(decodeURIComponent(a.report)),{...s,...r}}function _t(o){I[o.id]=ht(o)}const bt={class:"lofty-subscribe-pop"},St={class:"market-subscribe-pop-content"},wt={class:"snapshot-input-wrap"},xt={__name:"subscribePop",props:{reportId:[String,Number],name:String},emits:["submit"],setup(o,{emit:i}){const s=j("popRef"),r=i,a=S(o.name),n=S(7),f=[{label:"Instantly",value:0},{label:"Daily",value:1},{label:"Weekly",value:7},{label:"Biweekly",value:14},{label:"Monthly",value:28}];E(()=>{s.value.open()});const g=S(!1);async function m(){if(!a.value.trim()){g.value=!0,setTimeout(()=>{g.value=!1},3e3);return}const _={encryptId:o.reportId,subscribe:!0,snapshotName:a.value,mailFrequency:n.value};(await A.post("/admin/report/subscribe",{data:_})).status.code===0?(r("submit"),h()):F.toast("Failed to subscribe to this report")}function h(){s.value.$el.parentNode.remove(),document.body.classList.remove("lofty-overflow-hidden")}return(_,c)=>(l(),x(yt,{ref_key:"popRef",ref:s,allowClose:!1},{default:R(()=>[e("div",bt,[e("div",{class:"title"},[c[3]||(c[3]=V("SAVE MARKET REPORT")),e("i",{class:"lofty_iconfont lofty-icon-close",onClick:h})]),c[6]||(c[6]=e("div",{class:"desc"}," Market updates that will help you to better understand the local market. ",-1)),e("div",St,[c[4]||(c[4]=e("div",{class:"label"},"Custom Market Report Name",-1)),e("div",wt,[N(e("input",{"onUpdate:modelValue":c[0]||(c[0]=p=>O(a)?a.value=p:null),class:z({error:t(g)}),placeholder:"Type Something"},null,2),[[tt,t(a)]]),N(e("span",null,"Please fill out this field.",512),[[D,t(g)]]),N(e("span",{class:"lofty_iconfont lofty-icon-clear_circle_outlined",onClick:c[1]||(c[1]=p=>a.value="")},null,512),[[D,t(a)]])]),c[5]||(c[5]=e("div",{class:"label mt20"},"Email Frequency",-1)),B(ft,{class:"mt10",modelValue:t(n),"onUpdate:modelValue":c[2]||(c[2]=p=>O(n)?n.value=p:null),list:f},null,8,["modelValue"])]),e("div",{class:"lofty-btn mt20",onClick:m},"Save")])]),_:1},512))}},kt={class:"lofty-btn is-subscribed ml-auto"},H={__name:"subscribeButton",props:{submitJs:String,reportId:[String,Number],leadSubscribeStatus:Boolean,name:String},setup(o){const i=S(o.leadSubscribeStatus);function s(){pt(async()=>{const r=document.createElement("div");document.body.appendChild(r),Q(xt,{reportId:o.reportId,name:o.name,onSubmit:()=>{i.value=!0,F.toast("Subscribe Successful!"),F.executeSubmitJS(o.submitJs)}}).mount(r)})}return(r,a)=>(l(),y(k,null,[N(e("div",{class:"lofty-btn ml-auto",onClick:s},"Subscribe to the report",512),[[D,!t(i)]]),N(e("div",kt,a[0]||(a[0]=[e("span",null,"Already subscribed to the report",-1),e("i",{class:"lofty_iconfont lofty-icon-checked"},null,-1)]),512),[[D,t(i)]])],64))}},Lt={class:"lofty-chart-container"},At={key:0,class:"lofty-chart-no-data"},G={__name:"index",props:{option:Object},setup(o){const i=C(()=>o.option.series.every(f=>f.data.every(g=>g===0))),s=j("chart");let r=null;et(()=>o.option,f=>{r&&r.setOption(f,!0)},{deep:!0});const a=Z(()=>{r&&r.resize()},1e3),n=new ResizeObserver(()=>{a()});return E(()=>{r=st(s.value),r.setOption(o.option),n.observe(s.value)}),ot(()=>{n.unobserve(s.value)}),(f,g)=>(l(),y("div",Lt,[e("div",{class:"lofty-charts",ref_key:"chart",ref:s},null,512),t(i)?(l(),y("div",At,g[0]||(g[0]=[e("div",{class:"lofty-no-listing"},[e("i",{class:"lofty_iconfont lofty-icon-activities_04"}),e("div",{class:"no-listing-text"},"No Data")],-1)]))):b("",!0)]))}},T=getComputedStyle(document.documentElement),J="border-radius: 0;box-shadow: 0px 2px 5px 0px rgba(25, 25, 25, 0.1)",$t={price:{color:[T.getPropertyValue("--lofty-market-report-list-price-color")||"#A8A8A8",T.getPropertyValue("--lofty-market-report-sold-price-color")||"#505050"],legend:{data:["List Price","Sold Price"],left:d?0:40,top:d?315:40,icon:"rect",itemWidth:12,itemHeight:3,itemGap:30},grid:{top:d?10:100,left:d?45:100,right:d?10:50},xAxis:{type:"category",boundaryGap:!1,data:[],axisLine:{lineStyle:{color:"#dadada"}},axisLabel:{color:"#A8A8A8"}},yAxis:{type:"value",scale:!0,axisLabel:{padding:d?[0,0,0,0]:[0,10,0,0],color:"#A8A8A8",formatter:function(o){if(o)return"$"+(P(o,!0,1)||"0")}},axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisTick:{show:!0,lineStyle:{color:"#A8A8A8"}},splitLine:{show:!1}},tooltip:{trigger:"axis",position:d?[45,10]:null,extraCssText:J,formatter:function(o){let i=`<div style="color:#A8A8A8">${o[0].axisValue}</div>`;return o.forEach(s=>{const r="$"+String(s.value).replace(/\B(?=(\d{3})+(?!\d))/g,",");i+=`<div style="color: #191919;margin-top: 10px;padding-right: 20px">${s.seriesName}:${r} </div>`}),i}},series:[{name:"List Price",data:[],type:"line",showSymbol:!1,symbolSize:5,lineStyle:{width:3},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(25, 25, 25, 0.15)"},{offset:1,color:"rgba(25, 25, 25, 0)"}]}}},{name:"Sold Price",data:[],type:"line",showSymbol:!1,symbolSize:5,lineStyle:{width:3},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(25, 25, 25, 0.15)"},{offset:1,color:"rgba(25, 25, 25, 0)"}]}}}]},day:{color:[T.getPropertyValue("--lofty-market-report-day-color")||"#505050"],grid:{top:d?10:100,left:d?30:60,right:d?10:50,bottom:d?40:60},xAxis:{type:"category",data:[],axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisLabel:{color:"#A8A8A8"}},yAxis:{type:"value",axisLabel:{padding:d?[0,0,0,0]:[0,10,0,0],color:"#A8A8A8"},axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisTick:{show:!0,lineStyle:{color:"#A8A8A8"}},splitLine:{show:!1}},tooltip:{trigger:"axis",position:d?[30,10]:null,extraCssText:J,formatter:function(o){let i=`<div style="color:#A8A8A8">${o[0].axisValue}</div>`;return o.forEach(s=>{i+=`<div style="color: #191919;margin-top: 10px;padding-right: 20px">${s.seriesName}:${s.value} </div>`}),i}},series:[{name:"Median Days on Market",data:[],type:"bar",barWidth:d?15:30}]},inventory:{color:[T.getPropertyValue("--lofty-market-report-inventory-active-color")||"#A8A8A8",T.getPropertyValue("--lofty-market-report-inventory-sold-color")||"#505050"],legend:{data:["Active Listings","Sold Listings"],left:d?0:40,top:d?315:40,icon:"rect",itemWidth:12,itemHeight:3,itemGap:30},grid:{top:d?10:100,left:d?30:80,right:d?10:50},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisLabel:{color:"#A8A8A8"}},yAxis:{type:"value",axisLabel:{padding:d?[0,0,0,0]:[0,10,0,0],color:"#A8A8A8"},axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisTick:{show:!0,lineStyle:{color:"#A8A8A8"}},splitLine:{show:!1}},tooltip:{trigger:"axis",position:d?[30,10]:null,extraCssText:J,formatter:function(o){let i=`<div style="color:#A8A8A8">${o[0].axisValue}</div>`;return o.forEach(s=>{i+=`<div style="color: #191919;margin-top: 10px;padding-right: 20px">${s.seriesName}:${s.value} </div>`}),i}},series:[{name:"Active Listings",data:[],type:"bar",barWidth:d?10:30},{name:"Sold Listings",data:[],type:"bar",barWidth:d?10:30}]}},Ct={class:"market-report-three-data"},Nt={class:"lofty-three-card-wrap"},It=["onClick"],Tt={class:"title"},Dt={class:"value"},Et={key:0,class:"lofty_iconfont lofty-icon-arrow_03_up"},Mt={key:1,class:"lofty_iconfont lofty-icon-arrow_04_down"},Pt={class:"desc"},Rt={__name:"threeData",props:{id:String},setup(o){const i=it({price:{title:"Median List Price",value:null,rate:"",trend:"",desc:"The past 30 days -over- the previous 30 days"},day:{title:"Median Days on Market",value:null,rate:"",trend:"",desc:"The past 30 days -over- the previous 30 days"},inventory:{title:"Inventory",value:null,rate:"",trend:"",desc:"The past 30 days -over- the previous 30 days"}}),s=S(1),r=S("price"),a=at($t),n=S(a.price);function f(c){!d&&r.value!==c&&(r.value=c,n.value=a[c])}const{config:g}=I[o.id],m={filterName:g.value.featureListingName};h(),_();async function h(){const c=await A.get("market-report/statsInLastSixtyDays",{data:m}),{last_30_days:p,month_over_month:u}=c.data;i.price.value=P(p.median_list_price,!1,0,"$"),i.price.rate=u.median_list_price,i.price.trend=u.median_list_price_trend,i.day.value=P(p.median_days_on_market),i.day.rate=u.median_days_on_market,i.day.trend=u.median_days_on_market_trend,i.inventory.value=P(p.list_inventory+""),i.inventory.rate=u.list_inventory,i.inventory.trend=u.list_inventory_trend}async function _(){const c=await A.get("market-report/statsInLastSixMonths",{data:m}),p=[];for(let u in c.data){const v=c.data[u],w=new Date(`${u}-01`).toLocaleString("en-US",{month:"short"});p.push(w),a.price.series[0].data.push(+v.median_list_price||0),a.price.series[1].data.push(+v.median_sale_price||0),a.day.series[0].data.push(+v.median_days_on_market||0),a.inventory.series[0].data.push(v.list_inventory||0),a.inventory.series[1].data.push(v.sold_inventory||0)}a.price.xAxis.data=p,a.day.xAxis.data=p,a.inventory.xAxis.data=p,s.value=Date.now()}return(c,p)=>(l(),y("div",Ct,[e("div",Nt,[(l(!0),y(k,null,M(t(i),(u,v)=>(l(),y("div",{class:z(["card",{active:t(r)===v||t(d)}]),onClick:w=>f(v)},[e("div",Tt,$(u.title),1),e("div",Dt,[V($(u.value||"--")+" ",1),e("span",{class:z(["rate-number",u.trend])},[u.trend==="up"?(l(),y("i",Et)):u.trend==="down"?(l(),y("i",Mt)):b("",!0),V(" "+$(u.rate),1)],2)]),e("div",Pt,$(u.desc),1),t(d)?(l(),x(G,{option:t(a)[v],key:t(s),class:"chart-wrap-mobile"},null,8,["option"])):b("",!0)],10,It))),256))]),t(d)?b("",!0):(l(),x(G,{option:t(n),key:t(s),class:"chart-wrap-pc",style:{height:"calc(100vh - 300px)"}},null,8,["option"]))]))}},Vt={key:0,class:"lofty-market-listing-slider"},zt=["src"],Bt={init:"false",class:"swiper-container"},Jt={key:2,class:"lofty-no-listing"},Ut={__name:"newListing",props:{id:String},setup(o){nt();const{module:i,featureListingName:s}=I[o.id],r=LoftyIdxUtils.static_url(mt),a=S(!0),n=S([]),f=Date.now(),g=f-30*24*60*60*1e3,m=JSON.stringify({listingDate:[g,f].join(",")});async function h(){const p={pageSize:50,page:1,listingType:"featured-listing",featureListingName:s.value,condition:m},u=await A.get("/search/realTimeListings",{data:p,action:"lofty_idx_api"});u.data.listings.forEach(v=>W(v)),n.value=u.data.listings,a.value=!1,n.value.length>0&&lt(()=>{_()})}function _(){const p=i.$(".swiper-container");let u={navigation:{prevEl:".listing-slider-prev-button",nextEl:".listing-slider-next-button"},loop:n.value.length>3,initialSlide:1,observer:!0,spaceBetween:d?10:0,speed:1e3,autoplay:{pauseOnMouseEnter:!0,delay:5e3},centeredSlides:!d,centeredSlidesBounds:!1,slidesPerView:"auto",effect:"coverflow",coverflowEffect:{rotate:0,depth:0,scale:d?1:(50-100/window.innerWidth*100)/50,slideShadows:!1}};Object.assign(p,u),p.initialize()}function c(){const p=document.createElement("a");p.href=`/listing/?pageKey=search&featureListingName=${s.value}&condition=${encodeURIComponent(m)}`,p.target=d?"_self":"_blank",document.body.appendChild(p),p.click(),document.body.removeChild(p)}return E(()=>{h()}),(p,u)=>(l(),y(k,null,[u[5]||(u[5]=e("div",{class:"lofty-market-report-title lofty-page-padding"},[e("p",{class:"page-title"},"New Listings"),e("span",{class:"last-time"},"Last 30 Days")],-1)),t(n).length>0&&!t(a)?(l(),y("div",Vt,[e("img",{class:"img-background",src:t(r),alt:""},null,8,zt),u[3]||(u[3]=e("div",{class:"mask"},null,-1)),e("swiper-container",Bt,[(l(!0),y(k,null,M(t(n),(v,w)=>(l(),y("swiper-slide",{key:w,class:z({"swiper-slide-flow":!t(d),"swiper-slide-mobile":t(d)})},[B(gt,{house:v},{default:R(()=>u[0]||(u[0]=[e("div",{class:"lofty-status-tag new"},"Active",-1)])),_:2},1032,["house"])],2))),128))]),t(d)?b("",!0):(l(),y(k,{key:0},[u[1]||(u[1]=e("div",{class:"listing-slider-prev-button"},[e("i",{class:"lofty_iconfont lofty-icon-arrow_06_left"})],-1)),u[2]||(u[2]=e("div",{class:"listing-slider-next-button"},[e("i",{class:"lofty_iconfont lofty-icon-arrow_06_right"})],-1))],64))])):b("",!0),t(n).length>0&&!t(a)?(l(),y("div",{key:1,onClick:c,class:"lofty-more"},"More")):b("",!0),t(n).length===0&&!t(a)?(l(),y("div",Jt,u[4]||(u[4]=[e("i",{class:"lofty_iconfont lofty-icon-house_02"},null,-1),e("div",{class:"no-listing-text"},"No Listing Found",-1)]))):b("",!0)],64))}},Ft={key:0,class:"lofty-listing pending-listing"},Ot={key:2,class:"lofty-no-listing"},jt={__name:"pendingListing",props:{id:String},setup(o){const{featureListingName:i,getPageSize:s}=I[o.id],r=S([]),a=S(!0);E(()=>{f()});const n=JSON.stringify({listingStatus:["Pending"]});async function f(){const m={pageSize:s(),page:1,listingType:"featured-listing",featureListingName:i.value,condition:n},h=await A.get("/search/realTimeListings",{data:m,action:"lofty_idx_api"});h.data.listings.forEach(_=>W(_)),r.value=h.data.listings,a.value=!1}function g(){const m=document.createElement("a");m.href=`/listing/?pageKey=search&featureListingName=${i.value}&condition=${encodeURIComponent(n)}`,m.target=d?"_self":"_blank",document.body.appendChild(m),m.click(),document.body.removeChild(m)}return(m,h)=>(l(),y(k,null,[h[1]||(h[1]=e("div",{class:"lofty-market-report-title"},[e("p",{class:"page-title"},"Pending Listings")],-1)),t(r).length>0&&!t(a)?(l(),y("div",Ft,[(l(!0),y(k,null,M(t(r),_=>(l(),x(X,{class:"list-card",house:_},null,8,["house"]))),256))])):b("",!0),t(r).length>0&&!t(a)?(l(),y("div",{key:1,onClick:g,class:"lofty-more"},"More")):b("",!0),t(r).length===0&&!t(a)?(l(),y("div",Ot,h[0]||(h[0]=[e("i",{class:"lofty_iconfont lofty-icon-house_02"},null,-1),e("div",{class:"no-listing-text"},"No Listing Found",-1)]))):b("",!0)],64))}},Wt={key:0,class:"lofty-listing"},Kt={key:2,class:"lofty-no-listing"},qt={__name:"soldListing",props:{id:String},setup(o){const{featureListingName:i,getPageSize:s}=I[o.id],r=S([]),a=S(!0),n=Date.now(),f=n-30*24*60*60*1e3,g=JSON.stringify({soldDate:[f,n].join(",")});E(()=>{m()});async function m(){const _={pageSize:s(),page:1,featureListingName:i.value,listingType:"sold-listing",condition:g},c=await A.get("/search/realTimeListings",{data:_,action:"lofty_idx_api"});c.data.listings.forEach(p=>W(p)),r.value=c.data.listings,a.value=!1}function h(){const _=document.createElement("a");_.href=`/sold-listing/?pageKey=sold_listing&featureListingName=${i.value}&condition=${encodeURIComponent(g)}`,_.target=d?"_self":"_blank",document.body.appendChild(_),_.click(),document.body.removeChild(_)}return(_,c)=>(l(),y(k,null,[c[1]||(c[1]=e("div",{class:"lofty-market-report-title"},[e("p",{class:"page-title"},"Sold Listings"),e("span",{class:"last-time"},"Last 30 Days")],-1)),t(r).length>0&&!t(a)?(l(),y("div",Wt,[(l(!0),y(k,null,M(t(r),p=>(l(),x(X,{class:"list-card",house:p},null,8,["house"]))),256))])):b("",!0),t(r).length>0&&!t(a)?(l(),y("div",{key:1,onClick:h,class:"lofty-more"},"More")):b("",!0),t(r).length===0&&!t(a)?(l(),y("div",Kt,c[0]||(c[0]=[e("i",{class:"lofty_iconfont lofty-icon-house_02"},null,-1),e("div",{class:"no-listing-text"},"No Listing Found",-1)]))):b("",!0)],64))}},Ht={key:0,class:"lofty-market-report-header lofty-page-padding"},Gt={class:"lofty-ellipsis"},Qt={class:"market-report-list"},Xt=["onClick"],Yt={class:"lofty_iconfont lofty-icon-checked"},Zt={class:"lofty-market-report-title lofty-page-padding"},te={class:"page-title"},ee={class:"lofty-page-padding"},se={key:1},oe={key:2,class:"lofty-page-padding"},ie={key:3,class:"lofty-page-padding"},ae={key:4,class:"lofty-mobile-fix-bottom lofty-mobile-subscribe"},ne={__name:"index",props:{id:String},setup(o){const{isShortCode:i,config:s,getReportByTitle:r,submitJs:a}=I[o.id],n=C(()=>s.value.encryptId),f=C(()=>s.value.leadSubscribeStatus),g=C(()=>i||n.value),m=S(""),h=S([]),_=C(()=>h.value.filter(v=>m.value?v.title.toLowerCase().includes(m.value.toLowerCase()):h.value));i||c();async function c(){const v={pageNum:1,pageSize:300,onlyShowDisplay:!0},w=await A.post("/admin/report/list",{data:v});h.value=w.data.pluginReports||[];const L=h.value[0],K=U();L&&!K.report&&r(L.title)}const p=j("dropdown");function u(v){v.encryptId!==s.value.encryptId&&(s.value.title=v.title,r(v.title)),p.value.open(!1)}return(v,w)=>(l(),y(k,null,[t(i)?b("",!0):(l(),y("div",Ht,[B(ut,{class:"lofty-report-list-dropdown",left:0,clickMenuClose:!1,ref_key:"dropdown",ref:p},{menu:R(()=>[e("ul",Qt,[B(vt,{value:t(m),"onUpdate:value":w[0]||(w[0]=L=>O(m)?m.value=L:null),searchable:""},null,8,["value"]),(l(!0),y(k,null,M(t(_),L=>(l(),y("li",{class:"lofty-report-item lofty-ellipsis",onClick:K=>u(L)},[V($(L.title)+" ",1),N(e("i",Yt,null,512),[[D,t(n)===L.encryptId]])],8,Xt))),256))])]),default:R(()=>[e("span",Gt,$(t(s).title),1)]),_:1},512),!t(d)&&t(n)?(l(),x(H,{reportId:t(n),key:t(n),submitJs:t(a),name:t(s).title,leadSubscribeStatus:t(f)},null,8,["reportId","submitJs","name","leadSubscribeStatus"])):b("",!0)])),e("div",Zt,[e("p",te,$(t(s).title),1),w[1]||(w[1]=e("span",{class:"last-time"},"Last 30 Days",-1))]),e("div",ee,[t(g)?(l(),x(Rt,{id:o.id,key:t(n)},null,8,["id"])):b("",!0)]),t(s).show_new?(l(),y("div",se,[(l(),x(Ut,{id:o.id,key:t(n)},null,8,["id"]))])):b("",!0),t(s).show_pending?(l(),y("div",oe,[(l(),x(jt,{id:o.id,key:t(n)},null,8,["id"]))])):b("",!0),t(s).show_sold?(l(),y("div",ie,[(l(),x(qt,{id:o.id,key:t(n)},null,8,["id"]))])):b("",!0),t(d)&&t(n)?(l(),y("div",ae,[(l(),x(H,{reportId:t(n),key:t(n),submitJs:t(a),name:t(s).title,leadSubscribeStatus:t(f)},null,8,["reportId","submitJs","name","leadSubscribeStatus"]))])):b("",!0)],64))}};dt();q.initState(()=>{var o,i;(i=(o=q.mlsList)==null?void 0:o.forEach)==null||i.call(o,s=>ct(s))});jQuery(".lofty-market-report-page").ready(function(){document.querySelectorAll(".lofty-market-report-page").forEach(i=>{const s=i.getAttribute("id"),r=rt(s);_t(r);const{id:a,$:n}=r;Q(ne,{id:a}).mount(n("#lofty-market-report-container"))})});
     1import{g as U,i as d,h as A,o as Y,u as F,d as Z}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{r as S,c as C,k as j,l as E,o as l,d as x,w as R,e,f as V,q as N,s as O,y as z,u as t,v as tt,x as D,m as B,g as y,F as k,D as Q,p as et,M as st,J as ot,j as b,a as it,N as at,h as M,t as $,I as nt,H as lt}from"./vendor.DSMCY3-_.js";import{c as rt}from"./module.CKjUdtPN.js";import{u as q}from"./user.BF73KgDm.js";import{a as dt,s as ct}from"./popup-mls.BZWi9Sqc.js";import{_ as ut}from"./index.BAT38o-R.js";import{c as pt}from"./index.C1-1XiZ9.js";import{P as yt}from"./index.qpyE7W-K.js";import{_ as ft}from"./index.BIsjoQ8l.js";import{n as P}from"./number-format.CLdvQh6j.js";import{E as mt}from"./feature-listing-slider.QgT9uoot.js";import{_ as gt}from"./houseSlider.ptuPATjg.js";import{f as W}from"./house-format.CcB19moP.js";import{_ as X}from"./index.CzlBbxbG.js";import{I as vt}from"./index.DMIL01Q7.js";import"./useConfirm.BQXs6K30.js";import"./outsideclick.Bw_hMuzW.js";import"./google.Cnb9DEy-.js";import"./verify-email.B_du1TfR.js";const I={};function ht(o){const i=o.getModuleData(),s={module:o,isShortCode:i.isShortCode,config:S(i.isShortCode?i.shortcode_config:{}),featureListingName:C(()=>s.config.value.featureListingName),hideDropDown:S(!1),submitJs:i.submitJs},r={getPageSize(){if(d)return 4;{const n=window.innerWidth;if(n>1480)return 4;if(n>900)return 3}},async getReportByTitle(n){r.syncUrl(n);const{data:f}=await A.post("/admin/report/getByTitle",{data:{title:n}});s.config.value={encryptId:f.encryptId,title:f.title,featureListingName:f.filterName,show_new:f.extraInfo.displayNewListing,show_pending:f.extraInfo.displayPendingListings,show_sold:f.extraInfo.displaySoldListings,leadSubscribeStatus:!!f.leadSubscribeStatus}},syncUrl(n){let f=window.location.pathname,g=U();g.report=encodeURIComponent(n),f=f+"?"+Y(g),window.history.pushState(null,"",f)}},a=U();return a.report&&r.getReportByTitle(decodeURIComponent(a.report)),{...s,...r}}function _t(o){I[o.id]=ht(o)}const bt={class:"lofty-subscribe-pop"},St={class:"market-subscribe-pop-content"},wt={class:"snapshot-input-wrap"},xt={__name:"subscribePop",props:{reportId:[String,Number],name:String},emits:["submit"],setup(o,{emit:i}){const s=j("popRef"),r=i,a=S(o.name),n=S(7),f=[{label:"Instantly",value:0},{label:"Daily",value:1},{label:"Weekly",value:7},{label:"Biweekly",value:14},{label:"Monthly",value:28}];E(()=>{s.value.open()});const g=S(!1);async function m(){if(!a.value.trim()){g.value=!0,setTimeout(()=>{g.value=!1},3e3);return}const _={encryptId:o.reportId,subscribe:!0,snapshotName:a.value,mailFrequency:n.value};(await A.post("/admin/report/subscribe",{data:_})).status.code===0?(r("submit"),h()):F.toast("Failed to subscribe to this report")}function h(){s.value.$el.parentNode.remove(),document.body.classList.remove("lofty-overflow-hidden")}return(_,c)=>(l(),x(yt,{ref_key:"popRef",ref:s,allowClose:!1},{default:R(()=>[e("div",bt,[e("div",{class:"title"},[c[3]||(c[3]=V("SAVE MARKET REPORT")),e("i",{class:"lofty_iconfont lofty-icon-close",onClick:h})]),c[6]||(c[6]=e("div",{class:"desc"}," Market updates that will help you to better understand the local market. ",-1)),e("div",St,[c[4]||(c[4]=e("div",{class:"label"},"Custom Market Report Name",-1)),e("div",wt,[N(e("input",{"onUpdate:modelValue":c[0]||(c[0]=p=>O(a)?a.value=p:null),class:z({error:t(g)}),placeholder:"Type Something"},null,2),[[tt,t(a)]]),N(e("span",null,"Please fill out this field.",512),[[D,t(g)]]),N(e("span",{class:"lofty_iconfont lofty-icon-clear_circle_outlined",onClick:c[1]||(c[1]=p=>a.value="")},null,512),[[D,t(a)]])]),c[5]||(c[5]=e("div",{class:"label mt20"},"Email Frequency",-1)),B(ft,{class:"mt10",modelValue:t(n),"onUpdate:modelValue":c[2]||(c[2]=p=>O(n)?n.value=p:null),list:f},null,8,["modelValue"])]),e("div",{class:"lofty-btn mt20",onClick:m},"Save")])]),_:1},512))}},kt={class:"lofty-btn is-subscribed ml-auto"},H={__name:"subscribeButton",props:{submitJs:String,reportId:[String,Number],leadSubscribeStatus:Boolean,name:String},setup(o){const i=S(o.leadSubscribeStatus);function s(){pt(async()=>{const r=document.createElement("div");document.body.appendChild(r),Q(xt,{reportId:o.reportId,name:o.name,onSubmit:()=>{i.value=!0,F.toast("Subscribe Successful!"),F.executeSubmitJS(o.submitJs)}}).mount(r)})}return(r,a)=>(l(),y(k,null,[N(e("div",{class:"lofty-btn ml-auto",onClick:s},"Subscribe to the report",512),[[D,!t(i)]]),N(e("div",kt,a[0]||(a[0]=[e("span",null,"Already subscribed to the report",-1),e("i",{class:"lofty_iconfont lofty-icon-checked"},null,-1)]),512),[[D,t(i)]])],64))}},Lt={class:"lofty-chart-container"},At={key:0,class:"lofty-chart-no-data"},G={__name:"index",props:{option:Object},setup(o){const i=C(()=>o.option.series.every(f=>f.data.every(g=>g===0))),s=j("chart");let r=null;et(()=>o.option,f=>{r&&r.setOption(f,!0)},{deep:!0});const a=Z(()=>{r&&r.resize()},1e3),n=new ResizeObserver(()=>{a()});return E(()=>{r=st(s.value),r.setOption(o.option),n.observe(s.value)}),ot(()=>{n.unobserve(s.value)}),(f,g)=>(l(),y("div",Lt,[e("div",{class:"lofty-charts",ref_key:"chart",ref:s},null,512),t(i)?(l(),y("div",At,g[0]||(g[0]=[e("div",{class:"lofty-no-listing"},[e("i",{class:"lofty_iconfont lofty-icon-activities_04"}),e("div",{class:"no-listing-text"},"No Data")],-1)]))):b("",!0)]))}},T=getComputedStyle(document.documentElement),J="border-radius: 0;box-shadow: 0px 2px 5px 0px rgba(25, 25, 25, 0.1)",$t={price:{color:[T.getPropertyValue("--lofty-market-report-list-price-color")||"#A8A8A8",T.getPropertyValue("--lofty-market-report-sold-price-color")||"#505050"],legend:{data:["List Price","Sold Price"],left:d?0:40,top:d?315:40,icon:"rect",itemWidth:12,itemHeight:3,itemGap:30},grid:{top:d?10:100,left:d?45:100,right:d?10:50},xAxis:{type:"category",boundaryGap:!1,data:[],axisLine:{lineStyle:{color:"#dadada"}},axisLabel:{color:"#A8A8A8"}},yAxis:{type:"value",scale:!0,axisLabel:{padding:d?[0,0,0,0]:[0,10,0,0],color:"#A8A8A8",formatter:function(o){if(o)return"$"+(P(o,!0,1)||"0")}},axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisTick:{show:!0,lineStyle:{color:"#A8A8A8"}},splitLine:{show:!1}},tooltip:{trigger:"axis",position:d?[45,10]:null,extraCssText:J,formatter:function(o){let i=`<div style="color:#A8A8A8">${o[0].axisValue}</div>`;return o.forEach(s=>{const r="$"+String(s.value).replace(/\B(?=(\d{3})+(?!\d))/g,",");i+=`<div style="color: #191919;margin-top: 10px;padding-right: 20px">${s.seriesName}:${r} </div>`}),i}},series:[{name:"List Price",data:[],type:"line",showSymbol:!1,symbolSize:5,lineStyle:{width:3},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(25, 25, 25, 0.15)"},{offset:1,color:"rgba(25, 25, 25, 0)"}]}}},{name:"Sold Price",data:[],type:"line",showSymbol:!1,symbolSize:5,lineStyle:{width:3},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(25, 25, 25, 0.15)"},{offset:1,color:"rgba(25, 25, 25, 0)"}]}}}]},day:{color:[T.getPropertyValue("--lofty-market-report-day-color")||"#505050"],grid:{top:d?10:100,left:d?30:60,right:d?10:50,bottom:d?40:60},xAxis:{type:"category",data:[],axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisLabel:{color:"#A8A8A8"}},yAxis:{type:"value",axisLabel:{padding:d?[0,0,0,0]:[0,10,0,0],color:"#A8A8A8"},axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisTick:{show:!0,lineStyle:{color:"#A8A8A8"}},splitLine:{show:!1}},tooltip:{trigger:"axis",position:d?[30,10]:null,extraCssText:J,formatter:function(o){let i=`<div style="color:#A8A8A8">${o[0].axisValue}</div>`;return o.forEach(s=>{i+=`<div style="color: #191919;margin-top: 10px;padding-right: 20px">${s.seriesName}:${s.value} </div>`}),i}},series:[{name:"Median Days on Market",data:[],type:"bar",barWidth:d?15:30}]},inventory:{color:[T.getPropertyValue("--lofty-market-report-inventory-active-color")||"#A8A8A8",T.getPropertyValue("--lofty-market-report-inventory-sold-color")||"#505050"],legend:{data:["Active Listings","Sold Listings"],left:d?0:40,top:d?315:40,icon:"rect",itemWidth:12,itemHeight:3,itemGap:30},grid:{top:d?10:100,left:d?30:80,right:d?10:50},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisLabel:{color:"#A8A8A8"}},yAxis:{type:"value",axisLabel:{padding:d?[0,0,0,0]:[0,10,0,0],color:"#A8A8A8"},axisLine:{show:!0,lineStyle:{color:"#dadada"}},axisTick:{show:!0,lineStyle:{color:"#A8A8A8"}},splitLine:{show:!1}},tooltip:{trigger:"axis",position:d?[30,10]:null,extraCssText:J,formatter:function(o){let i=`<div style="color:#A8A8A8">${o[0].axisValue}</div>`;return o.forEach(s=>{i+=`<div style="color: #191919;margin-top: 10px;padding-right: 20px">${s.seriesName}:${s.value} </div>`}),i}},series:[{name:"Active Listings",data:[],type:"bar",barWidth:d?10:30},{name:"Sold Listings",data:[],type:"bar",barWidth:d?10:30}]}},Ct={class:"market-report-three-data"},Nt={class:"lofty-three-card-wrap"},It=["onClick"],Tt={class:"title"},Dt={class:"value"},Et={key:0,class:"lofty_iconfont lofty-icon-arrow_03_up"},Mt={key:1,class:"lofty_iconfont lofty-icon-arrow_04_down"},Pt={class:"desc"},Rt={__name:"threeData",props:{id:String},setup(o){const i=it({price:{title:"Median List Price",value:null,rate:"",trend:"",desc:"The past 30 days -over- the previous 30 days"},day:{title:"Median Days on Market",value:null,rate:"",trend:"",desc:"The past 30 days -over- the previous 30 days"},inventory:{title:"Inventory",value:null,rate:"",trend:"",desc:"The past 30 days -over- the previous 30 days"}}),s=S(1),r=S("price"),a=at($t),n=S(a.price);function f(c){!d&&r.value!==c&&(r.value=c,n.value=a[c])}const{config:g}=I[o.id],m={filterName:g.value.featureListingName};h(),_();async function h(){const c=await A.get("market-report/statsInLastSixtyDays",{data:m}),{last_30_days:p,month_over_month:u}=c.data;i.price.value=P(p.median_list_price,!1,0,"$"),i.price.rate=u.median_list_price,i.price.trend=u.median_list_price_trend,i.day.value=P(p.median_days_on_market),i.day.rate=u.median_days_on_market,i.day.trend=u.median_days_on_market_trend,i.inventory.value=P(p.list_inventory+""),i.inventory.rate=u.list_inventory,i.inventory.trend=u.list_inventory_trend}async function _(){const c=await A.get("market-report/statsInLastSixMonths",{data:m}),p=[];for(let u in c.data){const v=c.data[u],w=new Date(`${u}-01`).toLocaleString("en-US",{month:"short"});p.push(w),a.price.series[0].data.push(+v.median_list_price||0),a.price.series[1].data.push(+v.median_sale_price||0),a.day.series[0].data.push(+v.median_days_on_market||0),a.inventory.series[0].data.push(v.list_inventory||0),a.inventory.series[1].data.push(v.sold_inventory||0)}a.price.xAxis.data=p,a.day.xAxis.data=p,a.inventory.xAxis.data=p,s.value=Date.now()}return(c,p)=>(l(),y("div",Ct,[e("div",Nt,[(l(!0),y(k,null,M(t(i),(u,v)=>(l(),y("div",{class:z(["card",{active:t(r)===v||t(d)}]),onClick:w=>f(v)},[e("div",Tt,$(u.title),1),e("div",Dt,[V($(u.value||"--")+" ",1),e("span",{class:z(["rate-number",u.trend])},[u.trend==="up"?(l(),y("i",Et)):u.trend==="down"?(l(),y("i",Mt)):b("",!0),V(" "+$(u.rate),1)],2)]),e("div",Pt,$(u.desc),1),t(d)?(l(),x(G,{option:t(a)[v],key:t(s),class:"chart-wrap-mobile"},null,8,["option"])):b("",!0)],10,It))),256))]),t(d)?b("",!0):(l(),x(G,{option:t(n),key:t(s),class:"chart-wrap-pc",style:{height:"calc(100vh - 300px)"}},null,8,["option"]))]))}},Vt={key:0,class:"lofty-market-listing-slider"},zt=["src"],Bt={init:"false",class:"swiper-container"},Jt={key:2,class:"lofty-no-listing"},Ut={__name:"newListing",props:{id:String},setup(o){nt();const{module:i,featureListingName:s}=I[o.id],r=LoftyIdxUtils.static_url(mt),a=S(!0),n=S([]),f=Date.now(),g=f-30*24*60*60*1e3,m=JSON.stringify({listingDate:[g,f].join(",")});async function h(){const p={pageSize:50,page:1,listingType:"featured-listing",featureListingName:s.value,condition:m},u=await A.get("/search/realTimeListings",{data:p,action:"lofty_idx_api"});u.data.listings.forEach(v=>W(v)),n.value=u.data.listings,a.value=!1,n.value.length>0&&lt(()=>{_()})}function _(){const p=i.$(".swiper-container");let u={navigation:{prevEl:".listing-slider-prev-button",nextEl:".listing-slider-next-button"},loop:n.value.length>3,initialSlide:1,observer:!0,spaceBetween:d?10:0,speed:1e3,autoplay:{pauseOnMouseEnter:!0,delay:5e3},centeredSlides:!d,centeredSlidesBounds:!1,slidesPerView:"auto",effect:"coverflow",coverflowEffect:{rotate:0,depth:0,scale:d?1:(50-100/window.innerWidth*100)/50,slideShadows:!1}};Object.assign(p,u),p.initialize()}function c(){const p=document.createElement("a");p.href=`/listing/?pageKey=search&featureListingName=${s.value}&condition=${encodeURIComponent(m)}`,p.target=d?"_self":"_blank",document.body.appendChild(p),p.click(),document.body.removeChild(p)}return E(()=>{h()}),(p,u)=>(l(),y(k,null,[u[5]||(u[5]=e("div",{class:"lofty-market-report-title lofty-page-padding"},[e("p",{class:"page-title"},"New Listings"),e("span",{class:"last-time"},"Last 30 Days")],-1)),t(n).length>0&&!t(a)?(l(),y("div",Vt,[e("img",{class:"img-background",src:t(r),alt:""},null,8,zt),u[3]||(u[3]=e("div",{class:"mask"},null,-1)),e("swiper-container",Bt,[(l(!0),y(k,null,M(t(n),(v,w)=>(l(),y("swiper-slide",{key:w,class:z({"swiper-slide-flow":!t(d),"swiper-slide-mobile":t(d)})},[B(gt,{house:v},{default:R(()=>u[0]||(u[0]=[e("div",{class:"lofty-status-tag new"},"Active",-1)])),_:2},1032,["house"])],2))),128))]),t(d)?b("",!0):(l(),y(k,{key:0},[u[1]||(u[1]=e("div",{class:"listing-slider-prev-button"},[e("i",{class:"lofty_iconfont lofty-icon-arrow_06_left"})],-1)),u[2]||(u[2]=e("div",{class:"listing-slider-next-button"},[e("i",{class:"lofty_iconfont lofty-icon-arrow_06_right"})],-1))],64))])):b("",!0),t(n).length>0&&!t(a)?(l(),y("div",{key:1,onClick:c,class:"lofty-more"},"More")):b("",!0),t(n).length===0&&!t(a)?(l(),y("div",Jt,u[4]||(u[4]=[e("i",{class:"lofty_iconfont lofty-icon-house_02"},null,-1),e("div",{class:"no-listing-text"},"No Listing Found",-1)]))):b("",!0)],64))}},Ft={key:0,class:"lofty-listing pending-listing"},Ot={key:2,class:"lofty-no-listing"},jt={__name:"pendingListing",props:{id:String},setup(o){const{featureListingName:i,getPageSize:s}=I[o.id],r=S([]),a=S(!0);E(()=>{f()});const n=JSON.stringify({listingStatus:["Pending"]});async function f(){const m={pageSize:s(),page:1,listingType:"featured-listing",featureListingName:i.value,condition:n},h=await A.get("/search/realTimeListings",{data:m,action:"lofty_idx_api"});h.data.listings.forEach(_=>W(_)),r.value=h.data.listings,a.value=!1}function g(){const m=document.createElement("a");m.href=`/listing/?pageKey=search&featureListingName=${i.value}&condition=${encodeURIComponent(n)}`,m.target=d?"_self":"_blank",document.body.appendChild(m),m.click(),document.body.removeChild(m)}return(m,h)=>(l(),y(k,null,[h[1]||(h[1]=e("div",{class:"lofty-market-report-title"},[e("p",{class:"page-title"},"Pending Listings")],-1)),t(r).length>0&&!t(a)?(l(),y("div",Ft,[(l(!0),y(k,null,M(t(r),_=>(l(),x(X,{class:"list-card",house:_},null,8,["house"]))),256))])):b("",!0),t(r).length>0&&!t(a)?(l(),y("div",{key:1,onClick:g,class:"lofty-more"},"More")):b("",!0),t(r).length===0&&!t(a)?(l(),y("div",Ot,h[0]||(h[0]=[e("i",{class:"lofty_iconfont lofty-icon-house_02"},null,-1),e("div",{class:"no-listing-text"},"No Listing Found",-1)]))):b("",!0)],64))}},Wt={key:0,class:"lofty-listing"},Kt={key:2,class:"lofty-no-listing"},qt={__name:"soldListing",props:{id:String},setup(o){const{featureListingName:i,getPageSize:s}=I[o.id],r=S([]),a=S(!0),n=Date.now(),f=n-30*24*60*60*1e3,g=JSON.stringify({soldDate:[f,n].join(",")});E(()=>{m()});async function m(){const _={pageSize:s(),page:1,featureListingName:i.value,listingType:"sold-listing",condition:g},c=await A.get("/search/realTimeListings",{data:_,action:"lofty_idx_api"});c.data.listings.forEach(p=>W(p)),r.value=c.data.listings,a.value=!1}function h(){const _=document.createElement("a");_.href=`/sold-listing/?pageKey=sold_listing&featureListingName=${i.value}&condition=${encodeURIComponent(g)}`,_.target=d?"_self":"_blank",document.body.appendChild(_),_.click(),document.body.removeChild(_)}return(_,c)=>(l(),y(k,null,[c[1]||(c[1]=e("div",{class:"lofty-market-report-title"},[e("p",{class:"page-title"},"Sold Listings"),e("span",{class:"last-time"},"Last 30 Days")],-1)),t(r).length>0&&!t(a)?(l(),y("div",Wt,[(l(!0),y(k,null,M(t(r),p=>(l(),x(X,{class:"list-card",house:p},null,8,["house"]))),256))])):b("",!0),t(r).length>0&&!t(a)?(l(),y("div",{key:1,onClick:h,class:"lofty-more"},"More")):b("",!0),t(r).length===0&&!t(a)?(l(),y("div",Kt,c[0]||(c[0]=[e("i",{class:"lofty_iconfont lofty-icon-house_02"},null,-1),e("div",{class:"no-listing-text"},"No Listing Found",-1)]))):b("",!0)],64))}},Ht={key:0,class:"lofty-market-report-header lofty-page-padding"},Gt={class:"lofty-ellipsis"},Qt={class:"market-report-list"},Xt=["onClick"],Yt={class:"lofty_iconfont lofty-icon-checked"},Zt={class:"lofty-market-report-title lofty-page-padding"},te={class:"page-title"},ee={class:"lofty-page-padding"},se={key:1},oe={key:2,class:"lofty-page-padding"},ie={key:3,class:"lofty-page-padding"},ae={key:4,class:"lofty-mobile-fix-bottom lofty-mobile-subscribe"},ne={__name:"index",props:{id:String},setup(o){const{isShortCode:i,config:s,getReportByTitle:r,submitJs:a}=I[o.id],n=C(()=>s.value.encryptId),f=C(()=>s.value.leadSubscribeStatus),g=C(()=>i||n.value),m=S(""),h=S([]),_=C(()=>h.value.filter(v=>m.value?v.title.toLowerCase().includes(m.value.toLowerCase()):h.value));i||c();async function c(){const v={pageNum:1,pageSize:300,onlyShowDisplay:!0},w=await A.post("/admin/report/list",{data:v});h.value=w.data.pluginReports||[];const L=h.value[0],K=U();L&&!K.report&&r(L.title)}const p=j("dropdown");function u(v){v.encryptId!==s.value.encryptId&&(s.value.title=v.title,r(v.title)),p.value.open(!1)}return(v,w)=>(l(),y(k,null,[t(i)?b("",!0):(l(),y("div",Ht,[B(ut,{class:"lofty-report-list-dropdown",left:0,clickMenuClose:!1,ref_key:"dropdown",ref:p},{menu:R(()=>[e("ul",Qt,[B(vt,{value:t(m),"onUpdate:value":w[0]||(w[0]=L=>O(m)?m.value=L:null),searchable:""},null,8,["value"]),(l(!0),y(k,null,M(t(_),L=>(l(),y("li",{class:"lofty-report-item lofty-ellipsis",onClick:K=>u(L)},[V($(L.title)+" ",1),N(e("i",Yt,null,512),[[D,t(n)===L.encryptId]])],8,Xt))),256))])]),default:R(()=>[e("span",Gt,$(t(s).title),1)]),_:1},512),!t(d)&&t(n)?(l(),x(H,{reportId:t(n),key:t(n),submitJs:t(a),name:t(s).title,leadSubscribeStatus:t(f)},null,8,["reportId","submitJs","name","leadSubscribeStatus"])):b("",!0)])),e("div",Zt,[e("p",te,$(t(s).title),1),w[1]||(w[1]=e("span",{class:"last-time"},"Last 30 Days",-1))]),e("div",ee,[t(g)?(l(),x(Rt,{id:o.id,key:t(n)},null,8,["id"])):b("",!0)]),t(s).show_new?(l(),y("div",se,[(l(),x(Ut,{id:o.id,key:t(n)},null,8,["id"]))])):b("",!0),t(s).show_pending?(l(),y("div",oe,[(l(),x(jt,{id:o.id,key:t(n)},null,8,["id"]))])):b("",!0),t(s).show_sold?(l(),y("div",ie,[(l(),x(qt,{id:o.id,key:t(n)},null,8,["id"]))])):b("",!0),t(d)&&t(n)?(l(),y("div",ae,[(l(),x(H,{reportId:t(n),key:t(n),submitJs:t(a),name:t(s).title,leadSubscribeStatus:t(f)},null,8,["reportId","submitJs","name","leadSubscribeStatus"]))])):b("",!0)],64))}};dt();q.initState(()=>{var o,i;(i=(o=q.mlsList)==null?void 0:o.forEach)==null||i.call(o,s=>ct(s))});jQuery(".lofty-market-report-page").ready(function(){document.querySelectorAll(".lofty-market-report-page").forEach(i=>{const s=i.getAttribute("id"),r=rt(s);_t(r);const{id:a,$:n}=r;Q(ne,{id:a}).mount(n("#lofty-market-report-container"))})});
  • lofty-idx/trunk/assets/profile.js

    r3393952 r3393989  
    1 import{h as R,u as V,i as T}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{K as IA,L as sA,c as Z,o,g as i,F as _,h as P,e as A,n as F,u as e,y as S,k as H,r as g,l as aA,d as D,w as U,f as O,t as B,m as k,q as Y,x as $,s as K,v as j,j as x,p as oA,D as J,H as mA,a as eA,i as EA}from"./vendor.DSMCY3-_.js";import{_ as CA}from"./index.jjVwSEkV.js";import{f as W}from"./house-format.Bvy9O_Yy.js";import{_ as X}from"./index.CzlBbxbG.js";import{_ as pA}from"./index.BAT38o-R.js";import{E as hA}from"./feature-listing-slider.QgT9uoot.js";import{_ as BA}from"./index.BdhGsZUN.js";import{P as QA}from"./index.qpyE7W-K.js";import{f as nA}from"./date-format.BrUodQAJ.js";import{p as iA}from"./standard.Cshs06GJ.js";import{_ as lA}from"./index.DAwEVGKX.js";import{_ as vA}from"./index.BIsjoQ8l.js";import{n as wA}from"./number-format.CLdvQh6j.js";import{u as yA}from"./useConfirm.BQXs6K30.js";import{u as z}from"./user.BF73KgDm.js";import{_ as MA}from"./index.C1-1XiZ9.js";import"./verify-email.B_du1TfR.js";import"./outsideclick.Bw_hMuzW.js";import"./index.DNn1etY9.js";import"./google.Cnb9DEy-.js";const YA="/no-favority-yet.BlN9RJ9T.png",GA={class:"lofty-rate-stars"},RA=["onClick"],tA={__name:"index",props:IA({size:{type:[Number,String],default:20},gap:{type:[Number,String],default:10}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(a){const c=sA(a,"modelValue"),I=Z(()=>({fontSize:`${a.size}px`,"margin-right":`${a.gap}px`}));return(r,n)=>(o(),i("div",GA,[(o(),i(_,null,P(5,t=>A("i",{onClick:s=>c.value=t,style:F(e(I)),class:S(["lofty_iconfont lofty-icon-star-fill",{active:c.value>=t}])},null,14,RA)),64))]))}},xA={class:"note-pop-container"},NA={class:"note-pop-content"},_A={class:"house-info"},bA=["src","alt"],SA=["src","alt"],$A={class:"house-base-info"},DA={class:"house-address"},PA={class:"house-basic"},kA={class:"house-price"},jA={class:"note-write"},LA={class:"note-title"},VA={class:"note-footer"},UA={class:"note-date"},TA={__name:"notePop",props:{house:Object,isView:Boolean},setup(a){const c=LoftyIdxUtils.static_url(hA),I=H("popRef"),r=g(!a.isView),n=g("");function t(){n.value=a.house.leadListingNote,r.value=!0}const s=g(!1);async function m(){if(s.value)return;s.value=!0;const G={listingId:a.house.id};(await R.post("/lead/operate/rating/delete-note",{data:G})).status.code===0&&(u(),V.toast("Delete Successfully",3e3),a.house.leadListingNote="",s.value=!1)}async function Q(){if(s.value)return;if(!n.value){V.toast("Please Type Something",2e3);return}const G={listingId:a.house.id,note:n.value};s.value=!0,(await R.post("/lead/operate/rating/update",{data:G})).status.code===0&&(u(),V.toast("Save Successfully",3e3),a.house.leadListingNote=n.value,s.value=!1)}async function d(G){const f={listingId:a.house.id,syncCrm:G};await R.post("/lead/operate/rating/syncCrm",{data:f})}function u(){I.value.$el.parentNode.remove(),document.body.classList.remove("lofty-overflow-hidden")}return aA(()=>{I.value.open()}),(G,f)=>(o(),D(QA,{ref_key:"popRef",ref:I,allowClose:!1},{default:U(()=>[A("div",xA,[A("div",{class:"note-title"},[f[2]||(f[2]=O(" MY NOTES ")),A("i",{class:"lofty_iconfont lofty-icon-close",onClick:u})]),A("div",NA,[A("div",_A,[a.house.previewPicture?(o(),i("img",{key:0,src:a.house.previewPicture,loading:"lazy",alt:a.house.address},null,8,bA)):(o(),i("img",{key:1,src:e(c),loading:"lazy",alt:a.house.address},null,8,SA)),(o(!0),i(_,null,P(a.house.listingTags,v=>(o(),i("div",{class:S(["lofty-status-tag",v.style.className])},B(v.value),3))),256)),A("div",$A,[A("p",DA,B(a.house.address),1),A("p",PA,[(o(!0),i(_,null,P(a.house.basic,v=>(o(),i("span",{key:v.key},B(v.text),1))),128))])]),A("div",kA,B(a.house.price),1)]),A("div",jA,[A("div",LA,[f[3]||(f[3]=A("div",null,"Note",-1)),f[4]||(f[4]=A("span",{class:"note-share"},"Share with my Agent",-1)),k(BA,{modelValue:a.house.leadListingSyncCrm,"onUpdate:modelValue":f[0]||(f[0]=v=>a.house.leadListingSyncCrm=v),onChange:d},null,8,["modelValue"])]),Y(A("p",{class:"note-text"},B(a.house.leadListingNote),513),[[$,!e(r)]]),Y(A("textarea",{"onUpdate:modelValue":f[1]||(f[1]=v=>K(n)?n.value=v:null),placeholder:"Type Something",maxlength:"3000"},null,512),[[$,e(r)],[j,e(n)]])]),A("div",VA,[e(r)?x("",!0):(o(),i(_,{key:0},[A("div",UA,B(e(nA)("MM/dd/yyyy",a.house.leadListingNoteTime)),1),A("span",{class:"lofty_iconfont lofty-icon-edit_01",onClick:t}),A("span",{class:"lofty_iconfont lofty-icon-delete",onClick:m})],64)),Y(A("div",{class:"lofty-btn",onClick:Q},"Save",512),[[$,e(r)]])])])])]),_:1},512))}},OA={key:0,class:"rate-star-wrap"},zA={class:"rating-panel"},qA={key:0,class:"lofty_iconfont lofty-icon-blog_01"},FA={key:1},HA={key:2},KA={__name:"rateNote",props:{house:Object},setup(a){const c=Z(()=>!!a.house.leadListingNote);function I(){const n=document.createElement("div");document.body.appendChild(n),J(TA,{house:a.house,isView:c.value}).mount(n)}oA(()=>a.house.leadListingRating,r);async function r(){const n={listingId:a.house.id,note:a.house.leadListingNote};a.house.leadListingRating&&(n.rating=String(a.house.leadListingRating)),await R.post("/lead/operate/rating/update",{data:n})}return(n,t)=>(o(),i("div",{class:"house-rate-note",style:F({display:e(c)?"block":"flex"})},[a.house.leadListingRating?(o(),i("div",OA,[k(tA,{modelValue:a.house.leadListingRating,"onUpdate:modelValue":t[0]||(t[0]=s=>a.house.leadListingRating=s),size:"12",gap:"5"},null,8,["modelValue"])])):(o(),D(pA,{key:1,left:0,top:24,"hide-arrow":"",trigger:"hover","fit-width":!1},{menu:U(()=>[A("div",zA,[t[2]||(t[2]=A("div",{class:"rating-panel-title"},"Rating",-1)),k(tA,{modelValue:a.house.leadListingRating,"onUpdate:modelValue":t[1]||(t[1]=s=>a.house.leadListingRating=s)},null,8,["modelValue"])])]),default:U(()=>[t[3]||(t[3]=A("span",{class:"rating-button"},[A("i",{class:"lofty_iconfont lofty-icon-star"}),A("span",null,"Rating")],-1))]),_:1})),A("div",{class:"rating-button",onClick:I,style:F({marginTop:e(c)?"6px":"0"})},[e(c)?x("",!0):(o(),i("i",qA)),e(c)?(o(),i("span",HA,[t[4]||(t[4]=A("span",null,"Noted:",-1)),A("span",null,B(a.house.leadListingNote),1)])):(o(),i("span",FA,"Note"))],4)],4))}},JA={class:"lofty-detail-title"},WA={key:0,style:{"margin-right":"10px"}},XA={class:"save-result"},ZA={key:0,class:"no-favorite-listing"},Ae=["src"],ee={class:"lofty-listing"},te={class:"lofty-listing"},se={__name:"saveListing",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(a){const c=LoftyIdxUtils.static_url(YA);function I(){if(T)return 5;{const w=window.innerWidth;if(w>1480)return 8;if(w>900)return 6}}const r=g([]),n=g(1),t=g(I()),s=g(1),m=g(0),Q=g(!0),d=sA(a,"modelValue");u();async function u(){Q.value=!0;const w={data:{pageIndex:n.value,pageSize:t.value},headers:{}};d.value&&(w.headers.trackingpagekey="profile",d.value=!1);const y=await R.get("/lead/profile/favorite-listing/list",w);Q.value=!1,y.status.code===0&&(r.value=y.data.listings,r.value.forEach(W),s.value=y.data.totalPage,m.value=y.data.counts,n.value===1&&(G.value=r.value.length>0,G.value&&v()))}const G=g(!1),f=g([]);async function v(){const w={pageSize:T?4:I()/2,detailId:r.value[0].id},y=await R.get("/search/recommended-listings",{data:w});y.status.code===0&&(f.value=y.data.listings,f.value.forEach(W))}function E(){n.value=1,u()}function l(w){n.value=w.page,u()}function h(){const w=document.createElement("a");w.href="/listing/?pageKey=search",document.body.appendChild(w),w.click(),document.body.removeChild(w)}return(w,y)=>(o(),i("div",null,[A("div",JA,[e(m)?(o(),i("span",WA,B(e(m)),1)):x("",!0),O("SAVED LISTING"+B(e(m)>1?"S":""),1)]),A("div",XA,[k(lA,{loading:e(Q)},null,8,["loading"]),e(r).length===0&&!e(Q)?(o(),i("div",ZA,[A("img",{src:e(c),width:"240",height:"240",alt:""},null,8,Ae),y[0]||(y[0]=A("div",{class:"tip"},"You don’t have any saved listings yet",-1)),y[1]||(y[1]=A("div",{class:"desc"},"Simply browse our website and add properties to your favorites list. Collect more!",-1)),A("div",{class:"get-start",onClick:h},"Let's get started!")])):x("",!0),A("div",ee,[(o(!0),i(_,null,P(e(r),L=>(o(),D(X,{house:L,class:"list-card",onRefresh:E},{inner:U(()=>[k(KA,{house:L},null,8,["house"])]),_:2},1032,["house"]))),256))])]),e(s)>1&&!e(Q)?(o(),D(iA,{key:0,totalPage:e(s),onPageChange:l,pageNum:e(n),pageSize:e(t),noScroll:!0},null,8,["totalPage","pageNum","pageSize"])):x("",!0),e(G)?(o(),i(_,{key:1},[y[2]||(y[2]=A("div",{class:"lofty-detail-title recommend-title"},"RECOMMEND LISTINGS FOR YOU",-1)),A("div",te,[(o(!0),i(_,null,P(e(f),L=>(o(),D(X,{house:L,class:"list-card",onRefresh:E},null,8,["house"]))),256))])],64)):x("",!0)]))}},ae="/no-saved-search-yet.DyaetOmV.png",oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAKoCAYAAADnMk54AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAuvSURBVHgB7d0xcQRBEATBuSOzNJfmsBEFKWQoXpVpN4Dy+tndOwAAZLwDAECKAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEDas7t3AD7AOecOAL/2DgAAKQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMd6dvcOAAAZ7wAAkCIAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/Nizu3cAAMjwBQwAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAXnt29AwAknHPud3b64H97BwCAFAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIOYLSHMYsAMFv7MAAAAASUVORK5CYII=",ne={class:"lofty-house-item"},ie=["src"],le={__name:"houseSkeleton",setup(a){return(c,I)=>(o(),i("div",ne,[A("img",{class:"lofty-house-skeleton",src:e(oe),alt:""},null,8,ie)]))}},re={class:"search-title"},ue={class:"search-date"},de={class:"mail-label"},ce={class:"mail-value"},ge={class:"tag"},fe={class:"value"},Ie={class:"lofty-listing"},me={__name:"searchResult",props:{search:Object},emits:["refresh"],setup(a,{emit:c}){const I=nA("MM/dd/yyyy",new Date(a.search.createTime)),r=c,n=JSON.parse(a.search.searchCondition);let t=n.origin.condition;typeof t=="object"&&(t=JSON.stringify(t));const s=m();function m(){if(T)return 4;{const C=window.innerWidth;if(C>1480)return 4;if(C>900)return 3}}const Q=H("result"),d=new IntersectionObserver((C,M)=>{C.forEach(p=>{p.isIntersecting&&(rA(),M.unobserve(p.target))})},{threshold:.3});aA(()=>{d.observe(Q.value)});const u=g([]);G();async function G(){const C={action:"lofty_idx_api",condition:t,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone};n.origin.rect&&(C.rect=n.origin.rect);const M=await R.get("/save-search/tags",{data:C});if(M.data.data){const p=M.data.data.split(";");u.value=p.map(N=>{const b=N.split(":");return{label:b[1]?b[0]+":":"",value:b[1]||b[0]}}),h()}}const f=g(999),v=g(!1),E=g(!0),l=H("tagRef");function h(){f.value=u.value.length,C();function C(){mA(()=>{l.value&&l.value.scrollHeight>50&&(f.value--,C(),v.value=!0,E.value=!1)})}}function w(){E.value?h():(f.value=u.value.length,E.value=!0)}const y=g([]),L=g(0),AA=g(!0);async function rA(){const C={action:"lofty_idx_api",data:{...n.origin,condition:t}},M=await R.get("/search/realTimeListings",C);AA.value=!1,L.value=M.data.counts;const p=M.data.listings.slice(0,s);p.forEach(N=>W(N)),y.value=p}const{confirm:uA}=yA();function dA(){uA({title:"Delete Saved Search",content:"Are you sure to delete this alert ?",onConfirm:async()=>{(await R.post(`/save-search/delete?saveSearchId=${a.search.id}`,{})).status.code===0&&r("refresh")}})}function cA(){const{origin:C}=n;delete C.wordpressSiteId;let M="/listing/?pageKey=search";for(let b in C)typeof C[b]=="object"?M+=`&${b}=${encodeURIComponent(JSON.stringify(C[b]))}`:M+=`&${b}=${encodeURIComponent(C[b])}`;let p=JSON.parse(t);p.location&&p.location.mapRadius&&(M+=`&mapRadius=${encodeURIComponent(JSON.stringify(p.location.mapRadius))}`);const N=document.createElement("a");N.href=M,N.target="_blank",document.body.appendChild(N),N.click(),document.body.removeChild(N)}const gA=[{label:"Instantly",value:0},{label:"Daily",value:1},{label:"Weekly",value:7},{label:"Biweekly",value:14},{label:"Monthly",value:28}];oA(()=>a.search.alertFrequency,fA);async function fA(){(await R.post("/save-search/updateSnapshot",{data:{snapshotId:a.search.id,frequency:a.search.alertFrequency}})).status.code===0&&V.toast("Update Successfully",3e3)}return(C,M)=>(o(),i("div",{class:"search-result-container",ref_key:"result",ref:Q},[A("div",re,[A("span",null,[O(B(a.search.alertName)+" ",1),A("i",{class:"lofty_iconfont lofty-icon-delete",onClick:dA})]),A("span",ue,B(e(I)),1),k(vA,{class:"alert-select",modelValue:a.search.alertFrequency,"onUpdate:modelValue":M[0]||(M[0]=p=>a.search.alertFrequency=p),list:gA,size:"small"},{label:U(({label:p})=>[A("span",de,[M[1]||(M[1]=O("Property Alert ")),A("span",ce,B(p),1)])]),_:1},8,["modelValue"])]),A("div",{class:"search-tag-list",ref_key:"tagRef",ref:l},[(o(!0),i(_,null,P(e(u),(p,N)=>Y((o(),i("div",ge,[A("label",null,B(p.label),1),A("span",fe,B(p.value),1)],512)),[[$,N<e(f)]])),256)),e(v)?(o(),i("div",{key:0,class:"tag",onClick:w},[A("span",{class:S(["value","lofty_iconfont",e(E)?"lofty-icon-arrow_08_up":"lofty-icon-arrow_08_down"])},null,2)])):x("",!0)],512),A("div",Ie,[e(AA)?(o(!0),i(_,{key:0},P(e(s),p=>(o(),D(le,{class:"list-card"}))),256)):x("",!0),(o(!0),i(_,null,P(e(y),p=>(o(),D(X,{class:"list-card",house:p},null,8,["house"]))),256))]),A("div",{class:"view-all-listing",onClick:cA}," View All Matched "+B(e(wA)(e(L))||0)+" Listings ",1)],512))}},Ee={style:{"min-height":"300px",position:"relative"}},Ce={key:0,class:"no-favorite-listing"},pe=["src"],he={class:"search-list"},Be={__name:"saveSearch",setup(a){const c=LoftyIdxUtils.static_url(ae),I=g(1),r=g([]),n=g(!0),t=g(1);s();async function s(){n.value=!0;const d={pageIndex:I.value,pageSize:10,leadType:2},u=await R.get("/save-search/list",{data:d});t.value=u.data.totalPage,r.value=u.data.searchList||[],n.value=!1}function m(d){I.value=d.page,s()}function Q(){const d=document.createElement("a");d.href="/listing/?pageKey=search",document.body.appendChild(d),d.click(),document.body.removeChild(d)}return(d,u)=>(o(),i("div",null,[u[2]||(u[2]=A("div",{class:"lofty-detail-title"},"SAVED SEARCHES",-1)),A("div",Ee,[k(lA,{loading:e(n)},null,8,["loading"]),e(r).length===0&&!e(n)?(o(),i("div",Ce,[A("img",{src:e(c),width:"240",height:"240",alt:""},null,8,pe),u[0]||(u[0]=A("div",{class:"tip"},"You don’t have any saved searches yet.",-1)),u[1]||(u[1]=A("div",{class:"desc"},"Easily add saved searches and we'll send you new properties once they become available.",-1)),A("div",{class:"get-start",onClick:Q},"Let's get started!")])):x("",!0),A("div",he,[(o(!0),i(_,null,P(e(r),G=>(o(),D(me,{search:G,onRefresh:s},null,8,["search"]))),256))]),e(t)>1?(o(),D(iA,{key:1,totalPage:e(t),onPageChange:m,pageNum:e(I),pageSize:10,noScroll:!0},null,8,["totalPage","pageNum"])):x("",!0)])]))}},Qe={class:"lofty-form-panel"},ve={class:"info-form"},we={class:"form-wrap"},ye={class:"form-name"},Me={class:"input-wrapper"},Ye={class:"input-wrapper"},Ge={class:"input-wrapper"},Re={class:"info-form"},xe={class:"form-wrap"},Ne={class:"input-wrapper"},_e={class:"input-wrapper"},be={class:"input-wrapper"},q=`The password must be between 6-20 characters, have both numbers and letters, and no spaces. The following special characters are supported:-/:;()$&@\\".,?!'[]{}#%^*+=_|~<>€£¥·`,Se="Please enter the same password as the former",$e={__name:"account",emits:["refresh"],setup(a,{emit:c}){const I=c,r=z.getUser(),n=Z(()=>{const E=t.firstName!==r.firstName||t.lastName!==r.lastName||t.phoneNumber!==r.phoneNumber,l=t.password&&t.newPassword&&t.confirmPassword;return E||l}),t=eA({account:r.account,firstName:r.firstName,lastName:r.lastName,phoneNumber:r.phoneNumber,password:"",newPassword:"",confirmPassword:""}),s=eA({firstName:!1,lastName:!1,phone:!1,phoneMsg:"Please enter your phone number",password:!1,newPassword:!1,confirmPassword:!1,passwordRequire:!1});function m(){setTimeout(()=>{Object.keys(s).forEach(E=>{s[E]=!1})},3e3)}async function Q(){if(n.value){if(!t.firstName){s.firstName=!0,m();return}if(!t.lastName){s.lastName=!0,m();return}if(!t.phoneNumber){s.phone=!0,s.phoneMsg="Please enter your phone number",m();return}if(/^\d{3}-?\d{3}-?\d{4}$/.test(t.phoneNumber)){const E=await R.get(`/register/phoneValidate?phoneNumber=${t.phoneNumber}`);E.status.code===0?f():(s.phone=!0,s.phoneMsg=E.status.msg)}else s.phone=!0,s.phoneMsg="Please enter a valid phone number format.";m()}}const d=/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d\-\/:;()$&@".,?!'\[\]{}#%^*+=_|~<>€£¥·]{6,20}$/,u=g(q);function G(){if(s.passwordRequire=!0,!t.password){s.password=!0,m();return}if(!t.newPassword||!d.test(t.newPassword)){s.newPassword=!0,u.value=q,m();return}if(!t.confirmPassword||!d.test(t.confirmPassword)){s.confirmPassword=!0,u.value=q,m();return}if(t.confirmPassword!==t.newPassword){s.confirmPassword=!0,u.value=Se,m();return}v()}function f(){const{password:E,newPassword:l,confirmPassword:h}=t;E||l||h?G():v()}async function v(){await V.addScript(LoftyIdxUtils.public_url("js/md5.min.js"),!0);const E={firstName:t.firstName,lastName:t.lastName,phoneNumber:t.phoneNumber};t.password&&(E.password=window.md5(t.password),E.newPassword=window.md5(t.newPassword));const l=await R.post("/lead/profile/update",{data:E});l.status.code===0?(V.toast("Update Successfully",3e3),I("refresh")):V.toast(l.status.msg,3e3)}return(E,l)=>(o(),i("div",null,[l[9]||(l[9]=A("div",{class:"lofty-detail-title"},"ACCOUNT",-1)),A("div",Qe,[A("div",ve,[l[7]||(l[7]=A("div",{class:"form-title"},"Personal Info",-1)),A("div",we,[A("div",ye,[A("div",Me,[Y(A("input",{"onUpdate:modelValue":l[0]||(l[0]=h=>e(t).firstName=h),placeholder:"First Name",type:"text",class:S({error:e(s).firstName})},null,2),[[j,e(t).firstName]]),Y(A("span",null,"Please fill out this field.",512),[[$,e(s).firstName]])]),A("div",Ye,[Y(A("input",{"onUpdate:modelValue":l[1]||(l[1]=h=>e(t).lastName=h),placeholder:"Last Name",type:"text",class:S({error:e(s).lastName})},null,2),[[j,e(t).lastName]]),Y(A("span",null,"Please fill out this field.",512),[[$,e(s).lastName]])])]),A("div",Ge,[Y(A("input",{"onUpdate:modelValue":l[2]||(l[2]=h=>e(t).phoneNumber=h),inputmode:"tel",class:S([{error:e(s).phone},"mt20"]),placeholder:"Phone Number",type:"text"},null,2),[[j,e(t).phoneNumber]]),Y(A("span",null,B(e(s).phoneMsg),513),[[$,e(s).phone]])]),Y(A("input",{"onUpdate:modelValue":l[3]||(l[3]=h=>e(t).account=h),readonly:"",disabled:"",class:"mt20",type:"text"},null,512),[[j,e(t).account]])])]),A("div",Re,[l[8]||(l[8]=A("div",{class:"form-title"},"Login Info Settings",-1)),A("div",xe,[A("div",Ne,[Y(A("input",{"onUpdate:modelValue":l[4]||(l[4]=h=>e(t).password=h),class:S({error:e(s).passwordRequire&&!e(t).password}),type:"password",placeholder:"Current Password"},null,2),[[j,e(t).password]]),Y(A("span",null,"Please fill out this field.",512),[[$,e(s).passwordRequire&&!e(t).password]])]),A("div",_e,[Y(A("input",{"onUpdate:modelValue":l[5]||(l[5]=h=>e(t).newPassword=h),class:S([{error:e(s).passwordRequire&&e(s).newPassword},"mt20"]),placeholder:"New Password",type:"password"},null,2),[[j,e(t).newPassword]]),Y(A("span",null,B(e(u)),513),[[$,e(s).passwordRequire&&e(s).newPassword]])]),A("div",be,[Y(A("input",{"onUpdate:modelValue":l[6]||(l[6]=h=>e(t).confirmPassword=h),class:S([{error:e(s).passwordRequire&&e(s).confirmPassword},"mt20"]),placeholder:"Confirm New Password",type:"password"},null,2),[[j,e(t).confirmPassword]]),Y(A("span",null,B(e(u)),513),[[$,e(s).passwordRequire&&e(s).confirmPassword]])])])])]),A("div",{class:S(["lofty-btn update-button",{disabled:!e(n)}]),onClick:Q},"Update",2)]))}},De={__name:"index",setup(a){const c=g("SaveListing"),I={SaveListing:se,SaveSearch:Be,Account:$e},r=[{label:"Saved Listings",value:"SaveListing"},{label:"Saved Searches",value:"SaveSearch"},{label:"Account",value:"Account"}];function n(){R.get("/lofty-logout").then(Q=>{Q.data&&window.location.reload()})}const t=g(1),s=g(!0);function m(){z.getCommonInfo().then(()=>{t.value=Date.now()})}return(Q,d)=>(o(),i("div",null,[e(T)?(o(),i("div",{key:0,class:"lofty-logout-button",onClick:n},d[2]||(d[2]=[A("i",{class:"lofty_iconfont lofty-icon-map_01"},null,-1),A("span",null,"Logout",-1)]))):x("",!0),k(CA,{modelValue:e(c),"onUpdate:modelValue":d[0]||(d[0]=u=>K(c)?c.value=u:null),tabs:r},{default:U(()=>[e(T)?x("",!0):(o(),i("span",{key:0,class:"lofty-logout-button",onClick:n},d[3]||(d[3]=[A("i",{class:"lofty_iconfont lofty-icon-export"},null,-1),A("span",null,"Logout",-1)])))]),_:1},8,["modelValue"]),(o(),D(EA(I[e(c)]),{onRefresh:m,key:e(t),modelValue:e(s),"onUpdate:modelValue":d[1]||(d[1]=u=>K(s)?s.value=u:null)},null,40,["modelValue"]))]))}},Pe={__name:"login",setup(a){function c(){window.location.reload()}return(I,r)=>(o(),i("div",null,[k(MA,{class:"account-login-form",callback:c})]))}};z.initState(()=>{z.loginStatus.value?J(De).mount("#lofty-app"):J(Pe).mount("#lofty-app")});
     1import{h as R,u as V,i as T}from"./_plugin-vue_export-helper.C-JQ4LYv.js";import{K as IA,L as sA,c as Z,o,g as i,F as _,h as P,e as A,n as F,u as e,y as S,k as H,r as g,l as aA,d as D,w as U,f as O,t as B,m as k,q as Y,x as $,s as K,v as j,j as x,p as oA,D as J,H as mA,a as eA,i as EA}from"./vendor.DSMCY3-_.js";import{_ as CA}from"./index.jjVwSEkV.js";import{f as W}from"./house-format.CcB19moP.js";import{_ as X}from"./index.CzlBbxbG.js";import{_ as pA}from"./index.BAT38o-R.js";import{E as hA}from"./feature-listing-slider.QgT9uoot.js";import{_ as BA}from"./index.BdhGsZUN.js";import{P as QA}from"./index.qpyE7W-K.js";import{f as nA}from"./date-format.BrUodQAJ.js";import{p as iA}from"./standard.Cshs06GJ.js";import{_ as lA}from"./index.DAwEVGKX.js";import{_ as vA}from"./index.BIsjoQ8l.js";import{n as wA}from"./number-format.CLdvQh6j.js";import{u as yA}from"./useConfirm.BQXs6K30.js";import{u as z}from"./user.BF73KgDm.js";import{_ as MA}from"./index.C1-1XiZ9.js";import"./verify-email.B_du1TfR.js";import"./outsideclick.Bw_hMuzW.js";import"./index.DNn1etY9.js";import"./google.Cnb9DEy-.js";const YA="/no-favority-yet.BlN9RJ9T.png",GA={class:"lofty-rate-stars"},RA=["onClick"],tA={__name:"index",props:IA({size:{type:[Number,String],default:20},gap:{type:[Number,String],default:10}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(a){const c=sA(a,"modelValue"),I=Z(()=>({fontSize:`${a.size}px`,"margin-right":`${a.gap}px`}));return(r,n)=>(o(),i("div",GA,[(o(),i(_,null,P(5,t=>A("i",{onClick:s=>c.value=t,style:F(e(I)),class:S(["lofty_iconfont lofty-icon-star-fill",{active:c.value>=t}])},null,14,RA)),64))]))}},xA={class:"note-pop-container"},NA={class:"note-pop-content"},_A={class:"house-info"},bA=["src","alt"],SA=["src","alt"],$A={class:"house-base-info"},DA={class:"house-address"},PA={class:"house-basic"},kA={class:"house-price"},jA={class:"note-write"},LA={class:"note-title"},VA={class:"note-footer"},UA={class:"note-date"},TA={__name:"notePop",props:{house:Object,isView:Boolean},setup(a){const c=LoftyIdxUtils.static_url(hA),I=H("popRef"),r=g(!a.isView),n=g("");function t(){n.value=a.house.leadListingNote,r.value=!0}const s=g(!1);async function m(){if(s.value)return;s.value=!0;const G={listingId:a.house.id};(await R.post("/lead/operate/rating/delete-note",{data:G})).status.code===0&&(u(),V.toast("Delete Successfully",3e3),a.house.leadListingNote="",s.value=!1)}async function Q(){if(s.value)return;if(!n.value){V.toast("Please Type Something",2e3);return}const G={listingId:a.house.id,note:n.value};s.value=!0,(await R.post("/lead/operate/rating/update",{data:G})).status.code===0&&(u(),V.toast("Save Successfully",3e3),a.house.leadListingNote=n.value,s.value=!1)}async function d(G){const f={listingId:a.house.id,syncCrm:G};await R.post("/lead/operate/rating/syncCrm",{data:f})}function u(){I.value.$el.parentNode.remove(),document.body.classList.remove("lofty-overflow-hidden")}return aA(()=>{I.value.open()}),(G,f)=>(o(),D(QA,{ref_key:"popRef",ref:I,allowClose:!1},{default:U(()=>[A("div",xA,[A("div",{class:"note-title"},[f[2]||(f[2]=O(" MY NOTES ")),A("i",{class:"lofty_iconfont lofty-icon-close",onClick:u})]),A("div",NA,[A("div",_A,[a.house.previewPicture?(o(),i("img",{key:0,src:a.house.previewPicture,loading:"lazy",alt:a.house.address},null,8,bA)):(o(),i("img",{key:1,src:e(c),loading:"lazy",alt:a.house.address},null,8,SA)),(o(!0),i(_,null,P(a.house.listingTags,v=>(o(),i("div",{class:S(["lofty-status-tag",v.style.className])},B(v.value),3))),256)),A("div",$A,[A("p",DA,B(a.house.address),1),A("p",PA,[(o(!0),i(_,null,P(a.house.basic,v=>(o(),i("span",{key:v.key},B(v.text),1))),128))])]),A("div",kA,B(a.house.price),1)]),A("div",jA,[A("div",LA,[f[3]||(f[3]=A("div",null,"Note",-1)),f[4]||(f[4]=A("span",{class:"note-share"},"Share with my Agent",-1)),k(BA,{modelValue:a.house.leadListingSyncCrm,"onUpdate:modelValue":f[0]||(f[0]=v=>a.house.leadListingSyncCrm=v),onChange:d},null,8,["modelValue"])]),Y(A("p",{class:"note-text"},B(a.house.leadListingNote),513),[[$,!e(r)]]),Y(A("textarea",{"onUpdate:modelValue":f[1]||(f[1]=v=>K(n)?n.value=v:null),placeholder:"Type Something",maxlength:"3000"},null,512),[[$,e(r)],[j,e(n)]])]),A("div",VA,[e(r)?x("",!0):(o(),i(_,{key:0},[A("div",UA,B(e(nA)("MM/dd/yyyy",a.house.leadListingNoteTime)),1),A("span",{class:"lofty_iconfont lofty-icon-edit_01",onClick:t}),A("span",{class:"lofty_iconfont lofty-icon-delete",onClick:m})],64)),Y(A("div",{class:"lofty-btn",onClick:Q},"Save",512),[[$,e(r)]])])])])]),_:1},512))}},OA={key:0,class:"rate-star-wrap"},zA={class:"rating-panel"},qA={key:0,class:"lofty_iconfont lofty-icon-blog_01"},FA={key:1},HA={key:2},KA={__name:"rateNote",props:{house:Object},setup(a){const c=Z(()=>!!a.house.leadListingNote);function I(){const n=document.createElement("div");document.body.appendChild(n),J(TA,{house:a.house,isView:c.value}).mount(n)}oA(()=>a.house.leadListingRating,r);async function r(){const n={listingId:a.house.id,note:a.house.leadListingNote};a.house.leadListingRating&&(n.rating=String(a.house.leadListingRating)),await R.post("/lead/operate/rating/update",{data:n})}return(n,t)=>(o(),i("div",{class:"house-rate-note",style:F({display:e(c)?"block":"flex"})},[a.house.leadListingRating?(o(),i("div",OA,[k(tA,{modelValue:a.house.leadListingRating,"onUpdate:modelValue":t[0]||(t[0]=s=>a.house.leadListingRating=s),size:"12",gap:"5"},null,8,["modelValue"])])):(o(),D(pA,{key:1,left:0,top:24,"hide-arrow":"",trigger:"hover","fit-width":!1},{menu:U(()=>[A("div",zA,[t[2]||(t[2]=A("div",{class:"rating-panel-title"},"Rating",-1)),k(tA,{modelValue:a.house.leadListingRating,"onUpdate:modelValue":t[1]||(t[1]=s=>a.house.leadListingRating=s)},null,8,["modelValue"])])]),default:U(()=>[t[3]||(t[3]=A("span",{class:"rating-button"},[A("i",{class:"lofty_iconfont lofty-icon-star"}),A("span",null,"Rating")],-1))]),_:1})),A("div",{class:"rating-button",onClick:I,style:F({marginTop:e(c)?"6px":"0"})},[e(c)?x("",!0):(o(),i("i",qA)),e(c)?(o(),i("span",HA,[t[4]||(t[4]=A("span",null,"Noted:",-1)),A("span",null,B(a.house.leadListingNote),1)])):(o(),i("span",FA,"Note"))],4)],4))}},JA={class:"lofty-detail-title"},WA={key:0,style:{"margin-right":"10px"}},XA={class:"save-result"},ZA={key:0,class:"no-favorite-listing"},Ae=["src"],ee={class:"lofty-listing"},te={class:"lofty-listing"},se={__name:"saveListing",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(a){const c=LoftyIdxUtils.static_url(YA);function I(){if(T)return 5;{const w=window.innerWidth;if(w>1480)return 8;if(w>900)return 6}}const r=g([]),n=g(1),t=g(I()),s=g(1),m=g(0),Q=g(!0),d=sA(a,"modelValue");u();async function u(){Q.value=!0;const w={data:{pageIndex:n.value,pageSize:t.value},headers:{}};d.value&&(w.headers.trackingpagekey="profile",d.value=!1);const y=await R.get("/lead/profile/favorite-listing/list",w);Q.value=!1,y.status.code===0&&(r.value=y.data.listings,r.value.forEach(W),s.value=y.data.totalPage,m.value=y.data.counts,n.value===1&&(G.value=r.value.length>0,G.value&&v()))}const G=g(!1),f=g([]);async function v(){const w={pageSize:T?4:I()/2,detailId:r.value[0].id},y=await R.get("/search/recommended-listings",{data:w});y.status.code===0&&(f.value=y.data.listings,f.value.forEach(W))}function E(){n.value=1,u()}function l(w){n.value=w.page,u()}function h(){const w=document.createElement("a");w.href="/listing/?pageKey=search",document.body.appendChild(w),w.click(),document.body.removeChild(w)}return(w,y)=>(o(),i("div",null,[A("div",JA,[e(m)?(o(),i("span",WA,B(e(m)),1)):x("",!0),O("SAVED LISTING"+B(e(m)>1?"S":""),1)]),A("div",XA,[k(lA,{loading:e(Q)},null,8,["loading"]),e(r).length===0&&!e(Q)?(o(),i("div",ZA,[A("img",{src:e(c),width:"240",height:"240",alt:""},null,8,Ae),y[0]||(y[0]=A("div",{class:"tip"},"You don’t have any saved listings yet",-1)),y[1]||(y[1]=A("div",{class:"desc"},"Simply browse our website and add properties to your favorites list. Collect more!",-1)),A("div",{class:"get-start",onClick:h},"Let's get started!")])):x("",!0),A("div",ee,[(o(!0),i(_,null,P(e(r),L=>(o(),D(X,{house:L,class:"list-card",onRefresh:E},{inner:U(()=>[k(KA,{house:L},null,8,["house"])]),_:2},1032,["house"]))),256))])]),e(s)>1&&!e(Q)?(o(),D(iA,{key:0,totalPage:e(s),onPageChange:l,pageNum:e(n),pageSize:e(t),noScroll:!0},null,8,["totalPage","pageNum","pageSize"])):x("",!0),e(G)?(o(),i(_,{key:1},[y[2]||(y[2]=A("div",{class:"lofty-detail-title recommend-title"},"RECOMMEND LISTINGS FOR YOU",-1)),A("div",te,[(o(!0),i(_,null,P(e(f),L=>(o(),D(X,{house:L,class:"list-card",onRefresh:E},null,8,["house"]))),256))])],64)):x("",!0)]))}},ae="/no-saved-search-yet.DyaetOmV.png",oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAKoCAYAAADnMk54AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAuvSURBVHgB7d0xcQRBEATBuSOzNJfmsBEFKWQoXpVpN4Dy+tndOwAAZLwDAECKAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEDas7t3AD7AOecOAL/2DgAAKQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwMd6dvcOAAAZ7wAAkCIAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/Nizu3cAAMjwBQwAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAXnt29AwAknHPud3b64H97BwCAFAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIEYAAgDECEAAgBgBCAAQIwABAGIEIABAjAAEAIgRgAAAMQIQACBGAAIAxAhAAIAYAQgAECMAAQBiBCAAQIwABACIEYAAADECEAAgRgACAMQIQACAGAEIABAjAAEAYgQgAECMAAQAiBGAAAAxAhAAIOYLSHMYsAMFv7MAAAAASUVORK5CYII=",ne={class:"lofty-house-item"},ie=["src"],le={__name:"houseSkeleton",setup(a){return(c,I)=>(o(),i("div",ne,[A("img",{class:"lofty-house-skeleton",src:e(oe),alt:""},null,8,ie)]))}},re={class:"search-title"},ue={class:"search-date"},de={class:"mail-label"},ce={class:"mail-value"},ge={class:"tag"},fe={class:"value"},Ie={class:"lofty-listing"},me={__name:"searchResult",props:{search:Object},emits:["refresh"],setup(a,{emit:c}){const I=nA("MM/dd/yyyy",new Date(a.search.createTime)),r=c,n=JSON.parse(a.search.searchCondition);let t=n.origin.condition;typeof t=="object"&&(t=JSON.stringify(t));const s=m();function m(){if(T)return 4;{const C=window.innerWidth;if(C>1480)return 4;if(C>900)return 3}}const Q=H("result"),d=new IntersectionObserver((C,M)=>{C.forEach(p=>{p.isIntersecting&&(rA(),M.unobserve(p.target))})},{threshold:.3});aA(()=>{d.observe(Q.value)});const u=g([]);G();async function G(){const C={action:"lofty_idx_api",condition:t,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone};n.origin.rect&&(C.rect=n.origin.rect);const M=await R.get("/save-search/tags",{data:C});if(M.data.data){const p=M.data.data.split(";");u.value=p.map(N=>{const b=N.split(":");return{label:b[1]?b[0]+":":"",value:b[1]||b[0]}}),h()}}const f=g(999),v=g(!1),E=g(!0),l=H("tagRef");function h(){f.value=u.value.length,C();function C(){mA(()=>{l.value&&l.value.scrollHeight>50&&(f.value--,C(),v.value=!0,E.value=!1)})}}function w(){E.value?h():(f.value=u.value.length,E.value=!0)}const y=g([]),L=g(0),AA=g(!0);async function rA(){const C={action:"lofty_idx_api",data:{...n.origin,condition:t}},M=await R.get("/search/realTimeListings",C);AA.value=!1,L.value=M.data.counts;const p=M.data.listings.slice(0,s);p.forEach(N=>W(N)),y.value=p}const{confirm:uA}=yA();function dA(){uA({title:"Delete Saved Search",content:"Are you sure to delete this alert ?",onConfirm:async()=>{(await R.post(`/save-search/delete?saveSearchId=${a.search.id}`,{})).status.code===0&&r("refresh")}})}function cA(){const{origin:C}=n;delete C.wordpressSiteId;let M="/listing/?pageKey=search";for(let b in C)typeof C[b]=="object"?M+=`&${b}=${encodeURIComponent(JSON.stringify(C[b]))}`:M+=`&${b}=${encodeURIComponent(C[b])}`;let p=JSON.parse(t);p.location&&p.location.mapRadius&&(M+=`&mapRadius=${encodeURIComponent(JSON.stringify(p.location.mapRadius))}`);const N=document.createElement("a");N.href=M,N.target="_blank",document.body.appendChild(N),N.click(),document.body.removeChild(N)}const gA=[{label:"Instantly",value:0},{label:"Daily",value:1},{label:"Weekly",value:7},{label:"Biweekly",value:14},{label:"Monthly",value:28}];oA(()=>a.search.alertFrequency,fA);async function fA(){(await R.post("/save-search/updateSnapshot",{data:{snapshotId:a.search.id,frequency:a.search.alertFrequency}})).status.code===0&&V.toast("Update Successfully",3e3)}return(C,M)=>(o(),i("div",{class:"search-result-container",ref_key:"result",ref:Q},[A("div",re,[A("span",null,[O(B(a.search.alertName)+" ",1),A("i",{class:"lofty_iconfont lofty-icon-delete",onClick:dA})]),A("span",ue,B(e(I)),1),k(vA,{class:"alert-select",modelValue:a.search.alertFrequency,"onUpdate:modelValue":M[0]||(M[0]=p=>a.search.alertFrequency=p),list:gA,size:"small"},{label:U(({label:p})=>[A("span",de,[M[1]||(M[1]=O("Property Alert ")),A("span",ce,B(p),1)])]),_:1},8,["modelValue"])]),A("div",{class:"search-tag-list",ref_key:"tagRef",ref:l},[(o(!0),i(_,null,P(e(u),(p,N)=>Y((o(),i("div",ge,[A("label",null,B(p.label),1),A("span",fe,B(p.value),1)],512)),[[$,N<e(f)]])),256)),e(v)?(o(),i("div",{key:0,class:"tag",onClick:w},[A("span",{class:S(["value","lofty_iconfont",e(E)?"lofty-icon-arrow_08_up":"lofty-icon-arrow_08_down"])},null,2)])):x("",!0)],512),A("div",Ie,[e(AA)?(o(!0),i(_,{key:0},P(e(s),p=>(o(),D(le,{class:"list-card"}))),256)):x("",!0),(o(!0),i(_,null,P(e(y),p=>(o(),D(X,{class:"list-card",house:p},null,8,["house"]))),256))]),A("div",{class:"view-all-listing",onClick:cA}," View All Matched "+B(e(wA)(e(L))||0)+" Listings ",1)],512))}},Ee={style:{"min-height":"300px",position:"relative"}},Ce={key:0,class:"no-favorite-listing"},pe=["src"],he={class:"search-list"},Be={__name:"saveSearch",setup(a){const c=LoftyIdxUtils.static_url(ae),I=g(1),r=g([]),n=g(!0),t=g(1);s();async function s(){n.value=!0;const d={pageIndex:I.value,pageSize:10,leadType:2},u=await R.get("/save-search/list",{data:d});t.value=u.data.totalPage,r.value=u.data.searchList||[],n.value=!1}function m(d){I.value=d.page,s()}function Q(){const d=document.createElement("a");d.href="/listing/?pageKey=search",document.body.appendChild(d),d.click(),document.body.removeChild(d)}return(d,u)=>(o(),i("div",null,[u[2]||(u[2]=A("div",{class:"lofty-detail-title"},"SAVED SEARCHES",-1)),A("div",Ee,[k(lA,{loading:e(n)},null,8,["loading"]),e(r).length===0&&!e(n)?(o(),i("div",Ce,[A("img",{src:e(c),width:"240",height:"240",alt:""},null,8,pe),u[0]||(u[0]=A("div",{class:"tip"},"You don’t have any saved searches yet.",-1)),u[1]||(u[1]=A("div",{class:"desc"},"Easily add saved searches and we'll send you new properties once they become available.",-1)),A("div",{class:"get-start",onClick:Q},"Let's get started!")])):x("",!0),A("div",he,[(o(!0),i(_,null,P(e(r),G=>(o(),D(me,{search:G,onRefresh:s},null,8,["search"]))),256))]),e(t)>1?(o(),D(iA,{key:1,totalPage:e(t),onPageChange:m,pageNum:e(I),pageSize:10,noScroll:!0},null,8,["totalPage","pageNum"])):x("",!0)])]))}},Qe={class:"lofty-form-panel"},ve={class:"info-form"},we={class:"form-wrap"},ye={class:"form-name"},Me={class:"input-wrapper"},Ye={class:"input-wrapper"},Ge={class:"input-wrapper"},Re={class:"info-form"},xe={class:"form-wrap"},Ne={class:"input-wrapper"},_e={class:"input-wrapper"},be={class:"input-wrapper"},q=`The password must be between 6-20 characters, have both numbers and letters, and no spaces. The following special characters are supported:-/:;()$&@\\".,?!'[]{}#%^*+=_|~<>€£¥·`,Se="Please enter the same password as the former",$e={__name:"account",emits:["refresh"],setup(a,{emit:c}){const I=c,r=z.getUser(),n=Z(()=>{const E=t.firstName!==r.firstName||t.lastName!==r.lastName||t.phoneNumber!==r.phoneNumber,l=t.password&&t.newPassword&&t.confirmPassword;return E||l}),t=eA({account:r.account,firstName:r.firstName,lastName:r.lastName,phoneNumber:r.phoneNumber,password:"",newPassword:"",confirmPassword:""}),s=eA({firstName:!1,lastName:!1,phone:!1,phoneMsg:"Please enter your phone number",password:!1,newPassword:!1,confirmPassword:!1,passwordRequire:!1});function m(){setTimeout(()=>{Object.keys(s).forEach(E=>{s[E]=!1})},3e3)}async function Q(){if(n.value){if(!t.firstName){s.firstName=!0,m();return}if(!t.lastName){s.lastName=!0,m();return}if(!t.phoneNumber){s.phone=!0,s.phoneMsg="Please enter your phone number",m();return}if(/^\d{3}-?\d{3}-?\d{4}$/.test(t.phoneNumber)){const E=await R.get(`/register/phoneValidate?phoneNumber=${t.phoneNumber}`);E.status.code===0?f():(s.phone=!0,s.phoneMsg=E.status.msg)}else s.phone=!0,s.phoneMsg="Please enter a valid phone number format.";m()}}const d=/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d\-\/:;()$&@".,?!'\[\]{}#%^*+=_|~<>€£¥·]{6,20}$/,u=g(q);function G(){if(s.passwordRequire=!0,!t.password){s.password=!0,m();return}if(!t.newPassword||!d.test(t.newPassword)){s.newPassword=!0,u.value=q,m();return}if(!t.confirmPassword||!d.test(t.confirmPassword)){s.confirmPassword=!0,u.value=q,m();return}if(t.confirmPassword!==t.newPassword){s.confirmPassword=!0,u.value=Se,m();return}v()}function f(){const{password:E,newPassword:l,confirmPassword:h}=t;E||l||h?G():v()}async function v(){await V.addScript(LoftyIdxUtils.public_url("js/md5.min.js"),!0);const E={firstName:t.firstName,lastName:t.lastName,phoneNumber:t.phoneNumber};t.password&&(E.password=window.md5(t.password),E.newPassword=window.md5(t.newPassword));const l=await R.post("/lead/profile/update",{data:E});l.status.code===0?(V.toast("Update Successfully",3e3),I("refresh")):V.toast(l.status.msg,3e3)}return(E,l)=>(o(),i("div",null,[l[9]||(l[9]=A("div",{class:"lofty-detail-title"},"ACCOUNT",-1)),A("div",Qe,[A("div",ve,[l[7]||(l[7]=A("div",{class:"form-title"},"Personal Info",-1)),A("div",we,[A("div",ye,[A("div",Me,[Y(A("input",{"onUpdate:modelValue":l[0]||(l[0]=h=>e(t).firstName=h),placeholder:"First Name",type:"text",class:S({error:e(s).firstName})},null,2),[[j,e(t).firstName]]),Y(A("span",null,"Please fill out this field.",512),[[$,e(s).firstName]])]),A("div",Ye,[Y(A("input",{"onUpdate:modelValue":l[1]||(l[1]=h=>e(t).lastName=h),placeholder:"Last Name",type:"text",class:S({error:e(s).lastName})},null,2),[[j,e(t).lastName]]),Y(A("span",null,"Please fill out this field.",512),[[$,e(s).lastName]])])]),A("div",Ge,[Y(A("input",{"onUpdate:modelValue":l[2]||(l[2]=h=>e(t).phoneNumber=h),inputmode:"tel",class:S([{error:e(s).phone},"mt20"]),placeholder:"Phone Number",type:"text"},null,2),[[j,e(t).phoneNumber]]),Y(A("span",null,B(e(s).phoneMsg),513),[[$,e(s).phone]])]),Y(A("input",{"onUpdate:modelValue":l[3]||(l[3]=h=>e(t).account=h),readonly:"",disabled:"",class:"mt20",type:"text"},null,512),[[j,e(t).account]])])]),A("div",Re,[l[8]||(l[8]=A("div",{class:"form-title"},"Login Info Settings",-1)),A("div",xe,[A("div",Ne,[Y(A("input",{"onUpdate:modelValue":l[4]||(l[4]=h=>e(t).password=h),class:S({error:e(s).passwordRequire&&!e(t).password}),type:"password",placeholder:"Current Password"},null,2),[[j,e(t).password]]),Y(A("span",null,"Please fill out this field.",512),[[$,e(s).passwordRequire&&!e(t).password]])]),A("div",_e,[Y(A("input",{"onUpdate:modelValue":l[5]||(l[5]=h=>e(t).newPassword=h),class:S([{error:e(s).passwordRequire&&e(s).newPassword},"mt20"]),placeholder:"New Password",type:"password"},null,2),[[j,e(t).newPassword]]),Y(A("span",null,B(e(u)),513),[[$,e(s).passwordRequire&&e(s).newPassword]])]),A("div",be,[Y(A("input",{"onUpdate:modelValue":l[6]||(l[6]=h=>e(t).confirmPassword=h),class:S([{error:e(s).passwordRequire&&e(s).confirmPassword},"mt20"]),placeholder:"Confirm New Password",type:"password"},null,2),[[j,e(t).confirmPassword]]),Y(A("span",null,B(e(u)),513),[[$,e(s).passwordRequire&&e(s).confirmPassword]])])])])]),A("div",{class:S(["lofty-btn update-button",{disabled:!e(n)}]),onClick:Q},"Update",2)]))}},De={__name:"index",setup(a){const c=g("SaveListing"),I={SaveListing:se,SaveSearch:Be,Account:$e},r=[{label:"Saved Listings",value:"SaveListing"},{label:"Saved Searches",value:"SaveSearch"},{label:"Account",value:"Account"}];function n(){R.get("/lofty-logout").then(Q=>{Q.data&&window.location.reload()})}const t=g(1),s=g(!0);function m(){z.getCommonInfo().then(()=>{t.value=Date.now()})}return(Q,d)=>(o(),i("div",null,[e(T)?(o(),i("div",{key:0,class:"lofty-logout-button",onClick:n},d[2]||(d[2]=[A("i",{class:"lofty_iconfont lofty-icon-map_01"},null,-1),A("span",null,"Logout",-1)]))):x("",!0),k(CA,{modelValue:e(c),"onUpdate:modelValue":d[0]||(d[0]=u=>K(c)?c.value=u:null),tabs:r},{default:U(()=>[e(T)?x("",!0):(o(),i("span",{key:0,class:"lofty-logout-button",onClick:n},d[3]||(d[3]=[A("i",{class:"lofty_iconfont lofty-icon-export"},null,-1),A("span",null,"Logout",-1)])))]),_:1},8,["modelValue"]),(o(),D(EA(I[e(c)]),{onRefresh:m,key:e(t),modelValue:e(s),"onUpdate:modelValue":d[1]||(d[1]=u=>K(s)?s.value=u:null)},null,40,["modelValue"]))]))}},Pe={__name:"login",setup(a){function c(){window.location.reload()}return(I,r)=>(o(),i("div",null,[k(MA,{class:"account-login-form",callback:c})]))}};z.initState(()=>{z.loginStatus.value?J(De).mount("#lofty-app"):J(Pe).mount("#lofty-app")});
  • lofty-idx/trunk/src/common/format/house-format.js

    r3333213 r3393989  
    1 import util from "@/util/index.js";
    2 import numberFormat from "./number-format.js";
    3 import { userState } from "@/common/sign-log/user.js";
     1import util from '@/util/index.js';
     2import numberFormat from './number-format.js';
     3import { userState } from '@/common/sign-log/user.js';
    44
    55export const getSqftText = function (house) {
    66    let [area, unit, decimal] = [house.sqft || 0, 'SqFt', 0];
    7     const { totalAvailableAcres } = house
    8     if(house.propertyType === 'Vacant Land') {
    9         area = totalAvailableAcres / (10890 * 4)
    10         unit = 'Acres'
    11         decimal = 2
    12     } else if(area === 0) {
    13         if(totalAvailableAcres >= 10890) {
    14             area = totalAvailableAcres / (10890 * 4)
    15             unit = 'Acres Lot'
    16             decimal = 2
     7    const { totalAvailableAcres } = house;
     8    if (house.propertyType === 'Vacant Land') {
     9        area = totalAvailableAcres / (10890 * 4);
     10        unit = 'Acres';
     11        decimal = 2;
     12    } else if (area === 0) {
     13        if (totalAvailableAcres >= 10890) {
     14            area = totalAvailableAcres / (10890 * 4);
     15            unit = 'Acres Lot';
     16            decimal = 2;
    1717        } else {
    18             area = totalAvailableAcres
    19             unit = 'Sqft Lot'
     18            area = totalAvailableAcres;
     19            unit = 'Sqft Lot';
    2020        }
    2121    }
    2222    if (area > 0) {
    23         return `${house.isProtected ?'***':numberFormat(area.toFixed(decimal))} ${unit}`;
     23        return `${
     24            house.isProtected ? '***' : numberFormat(area.toFixed(decimal))
     25        } ${unit}`;
    2426    }
    25 }
     27};
    2628
    2729export const getBasic = function (data) {
    28     const { isProtected }  = data
     30    const { isProtected } = data;
    2931    if (data.commercialRealEstate) {
    30         const sqftUnit = data.sqft + 'SqFt'
     32        const sqftUnit = data.sqft + 'SqFt';
    3133        let sqft = '';
    3234        if (sqftUnit) {
     
    3537        return [sqft, data.lotSizeWithUnit, data.pricePerSqft];
    3638    } else {
    37         let [bedText, bathText, sqftText] = ['', '', getSqftText(data)]
    38         if(data.bedrooms > 0) {
    39             bedText = data.bedrooms === 1 ? '1 Bed' : `${numberFormat(data.bedrooms)} Beds`;
     39        let [bedText, bathText, sqftText] = ['', '', getSqftText(data)];
     40        if (data.bedrooms > 0) {
     41            bedText =
     42                data.bedrooms === 1
     43                    ? '1 Bed'
     44                    : `${numberFormat(data.bedrooms)} Beds`;
    4045        }
    41         if(data.bathrooms > 0) {
    42             bathText = data.bathrooms === 1 ? '1 Bath' : `${numberFormat(data.bathrooms)} Baths`;
     46        if (data.bathrooms > 0) {
     47            bathText =
     48                data.bathrooms === 1
     49                    ? '1 Bath'
     50                    : `${numberFormat(data.bathrooms)} Baths`;
    4351        }
    4452        let arr = [];
    45         if (bedText){
    46             arr.push({ key: 'bed', text: isProtected ? '*** Bed':bedText })
     53        if (bedText) {
     54            arr.push({ key: 'bed', text: isProtected ? '*** Bed' : bedText });
    4755        }
    48         if (bathText){
    49             arr.push({ key: 'bath', text: isProtected ? '*** Bath': bathText })
     56        if (bathText) {
     57            arr.push({
     58                key: 'bath',
     59                text: isProtected ? '*** Bath' : bathText,
     60            });
    5061        }
    51         if (sqftText){
    52             arr.push({ key: 'sqft', text: sqftText })
     62        if (sqftText) {
     63            arr.push({ key: 'sqft', text: sqftText });
    5364        }
    5465        return arr;
    5566    }
    56 }
     67};
    5768const escapeMap = {
    5869    '&nbsp;': ' ',
     
    6374    '&#10;': '\n',
    6475    '&#9;': '\t',
    65     '&#39;': "'"
    66 }
    67 function getProviderText(template, info) {
    68     let templateStr = (template || "").replace(
    69         RegExp(/&(?:lt|gt|quot|amp|#39|#10|#9|nbsp);/, "g"),
     76    '&#39;': "'",
     77};
     78export function getProviderText(template, info) {
     79    let templateStr = (template || '').replace(
     80        RegExp(/&(?:lt|gt|quot|amp|#39|#10|#9|nbsp);/, 'g'),
    7081        function (matcher) {
    7182            return escapeMap[matcher];
    7283        }
    7384    );
    74     if(!templateStr) {
    75         return ''
     85    if (!templateStr) {
     86        return '';
    7687    }
    77     let templateSentences = template.split("<br>");
     88    let templateSentences = template.split('<br>');
    7889    return templateSentences
    79         .map((templateSentence) => calcStringFromTemplate(templateSentence, info))
     90        .map((templateSentence) =>
     91            calcStringFromTemplate(templateSentence, info)
     92        )
    8093        .filter((v) => v)
    81         .join("\n");
     94        .join('\n');
    8295}
    8396function calcStringFromTemplate(templateSentence, info) {
     
    95108            let infoText = info[variableName];
    96109            const curHasValue = !!infoText;
    97             const fullText = curHasValue ? leftStr + infoText + rightStr : "";
     110            const fullText = curHasValue ? leftStr + infoText + rightStr : '';
    98111            try {
    99112                if (startIdx == 0) {
     
    101114                }
    102115                if (!curHasValue) {
    103                     return "";
     116                    return '';
    104117                }
    105118                if (!preHasValue) {
    106119                    // If the previous variable has no value , then the middle connector do not
    107                     preDelimiter = "";
     120                    preDelimiter = '';
    108121                }
    109122                if (!preDelimiter && !leftStr) {
    110123                    // There is no gap between the previous value
    111                     return (hasInfoValue ? " • " : "") + fullText;
     124                    return (hasInfoValue ? ' • ' : '') + fullText;
    112125                }
    113126                return preDelimiter + fullText;
     
    119132    );
    120133    // all variable not exist, then not show the sentense
    121     return hasInfoValue ? ret : "";
     134    return hasInfoValue ? ret : '';
    122135}
    123136
    124137export function getHouseProtected(house) {
    125     const { soldProtected = "" } = house.mlsOrg
     138    const { soldProtected = '' } = house.mlsOrg;
    126139    if (!userState.loginStatus.value || !userState.vowStatus.value) {
    127         return soldProtected.includes(house.listingStatus)
     140        return soldProtected.includes(house.listingStatus);
    128141    }
    129     return false
     142    return false;
    130143}
    131144export default function (house) {
    132     house.mlsLogo = util.isMobile ? (house.mlsOrg?.smallLogo || house.mlsOrg?.logo) : house.mlsOrg?.logo
    133     if(house.soldDate) {
    134         house.priceChange = house.price !== house.soldPrice
    135         if(house.soldPrice > house.price) {
    136             house.priceTrend = 'up'
    137         } else if(house.soldPrice < house.price) {
    138             house.priceTrend = 'down'
     145    house.mlsLogo = util.isMobile
     146        ? house.mlsOrg?.smallLogo || house.mlsOrg?.logo
     147        : house.mlsOrg?.logo;
     148    if (house.soldDate) {
     149        house.priceChange = house.price !== house.soldPrice;
     150        if (house.soldPrice > house.price) {
     151            house.priceTrend = 'up';
     152        } else if (house.soldPrice < house.price) {
     153            house.priceTrend = 'down';
    139154        }
    140         house.priceChangePercent = (100 * Math.abs(house.soldPrice - house.price) / house.price).toFixed(1)+'%';
     155        house.priceChangePercent =
     156            (
     157                (100 * Math.abs(house.soldPrice - house.price)) /
     158                house.price
     159            ).toFixed(1) + '%';
    141160    }
    142161    house.isProtected = getHouseProtected(house);
    143162    house.basic = getBasic(house);
    144     house.showMls = house.mlsListingId && house.mlsOrg?.mlsOrgHas74
    145     house.provided = getProviderText(house.mlsOrg?.cardTemplate, house)
    146     house.soldPrice = house.isProtected ? '$ ****': numberFormat(house.soldPrice, null,2,'$');
    147     house.price = house.isProtected ? '$ ****' :numberFormat(house.price, null,2,'$');
    148     house.address = house.isProtected ? 'Address Not Disclosed' : house.address
    149     const mls = userState.mlsList?.find?.(item => item.id === house.mlsOrg.id);
     163    house.showMls = house.mlsListingId && house.mlsOrg?.mlsOrgHas74;
     164    house.provided = getProviderText(house.mlsOrg?.cardTemplate, house);
     165    house.soldPrice = house.isProtected
     166        ? '$ ****'
     167        : numberFormat(house.soldPrice, null, 2, '$');
     168    house.price = house.isProtected
     169        ? '$ ****'
     170        : numberFormat(house.price, null, 2, '$');
     171    house.address = house.isProtected ? 'Address Not Disclosed' : house.address;
     172    const mls = userState.mlsList?.find?.(
     173        (item) => item.id === house.mlsOrg.id
     174    );
    150175    if (mls) {
    151176        house.showSoldPrice = mls.showSoldPrice;
    152177    }
    153 
    154178}
  • lofty-idx/trunk/src/common/mls-compliance.js

    r3393952 r3393989  
    11import { getQueryParams } from '@/util';
     2import { getProviderText } from './format/house-format';
    23import http from '@/api';
    34import { userState } from './sign-log/user';
     
    78    const { mlsOrgId, complianceCheck } = params;
    89
    9     // only proceed if both required parameters are present
    10     if (!mlsOrgId || !complianceCheck) return;
     10    /**
     11     * 22000 is the manual listing id - fixed value, it's a our internal data
     12     * we'll skip it
     13     */
     14    if (!mlsOrgId || !complianceCheck || mlsOrgId === 22000) return;
     15    getMlsStatus(mlsOrgId);
     16};
    1117
     18export const getMlsStatus = async (mlsOrgId) => {
     19    if (!mlsOrgId || mlsOrgId === 22000) return;
    1220    try {
    1321        const response = await http.get(`/listing/site-mls/${mlsOrgId}`);
     
    4553    if (isSpecificMLS(house, 'BahamasMLS')) {
    4654        return officeStatus
    47             ? house.mlsOrg[templateKey]
     55            ? getProviderText(house.mlsOrg[templateKey], house)
    4856            : MLS_ORGS.BahamasMLS.defaultText;
    4957    }
     
    7078            data: {
    7179                listingIds,
    72                 listingType,
     80                soldFlag: listingType,
    7381                listingManagementType,
    7482                userId: userState.agent.id,
  • lofty-idx/trunk/src/module/listing-detail/store.js

    r3393952 r3393989  
    99    getOfficeStatus,
    1010    getTemplate,
     11    getMlsStatus,
    1112} from '@/common/mls-compliance.js';
    1213
     
    7980            state.location.lat = data.info.latitude;
    8081
     82            if (data.info?.mlsOrg?.id) getMlsStatus(data.info.mlsOrg.id);
     83
    8184            const mls = userState.mlsList.find?.(
    8285                (t) => t.id === data.info.mlsOrg.id
    8386            );
    84             const detailInfoElement = state.module.$('.lofty-detail-info');
     87
    8588            const brokerageInfoElement =
    86                 detailInfoElement.querySelector('.lofty-mls-info');
     89                document.querySelector('.lofty-mls-info');
    8790            if (mls) {
    8891                showMlsPop(mls);
     
    109112
    110113                            if (brokerageInfoElement) {
    111                                 brokerageInfoElement.textContent =
     114                                brokerageInfoElement.innerHTML =
    112115                                    state.info.value.mlsOrg.template;
    113116                            }
     
    116119                }
    117120            }
    118             brokerageInfoElement.style.display = 'block';
     121            if (brokerageInfoElement) {
     122                brokerageInfoElement.style.display = 'block';
     123            }
    119124
    120125            const obj = getQueryParams();
  • lofty-idx/trunk/src/module/listing/store.js

    r3393952 r3393989  
    165165                            };
    166166                            if (listHouseTags[index])
    167                                 listHouseTags[index].textContent =
     167                                listHouseTags[index].innerHTML =
    168168                                    state.listings.value[
    169169                                        index
  • lofty-idx/trunk/templates/module/md_listing_detail/index.html

    r3393952 r3393989  
    4444    </div>
    4545
     46    {% include 'module/md_listing_detail/detail_info.html' with {'info': data.info, 'collectStatus': data.collectStatus} %}
     47
    4648    {% if data.info.mlsOrg.listingProviderDirection == 2 %}
    47         <p class="lofty-mls-info" style="display: none">{{ data.info.mlsInfo | raw }}</p>
     49        <div class="lofty-detail-info mt-40">
     50            <p class="lofty-mls-info" style="display: none">{{ data.info.mlsInfo | raw }}</p>
     51        </div>
    4852    {% endif %}
    49 
    50     {% include 'module/md_listing_detail/detail_info.html' with {'info': data.info, 'collectStatus': data.collectStatus} %}
    5153
    5254    <div id="lofty-detail-map-container" class="lofty-detail-info"></div>
  • lofty-idx/trunk/templates/style/common.css

    r3348447 r3393989  
    103103    padding: 30px 0 0;
    104104  }
    105   #lofty-listing-search, #lofty_filter_container, .lofty-disclaimer-list {
     105  #lofty-listing-search,
     106  #lofty_filter_container,
     107  .lofty-disclaimer-list {
    106108    padding: 0 15px;
    107109  }
     
    241243}
    242244.lofty-status-tag.new {
    243   background: #00C768;
     245  background: #00c768;
    244246}
    245247.lofty-status-tag.price-reduced {
     
    247249}
    248250.lofty-status-tag.pending {
    249   background: #FFA600;
     251  background: #ffa600;
    250252}
    251253.lofty-status-tag.active {
     
    264266.lofty-no-listing .lofty_iconfont {
    265267  font-size: 64px;
    266   color: #DADADA;
     268  color: #dadada;
    267269}
    268270.lofty-no-listing .no-listing-text {
    269   color: #A8A8A8;
     271  color: #a8a8a8;
    270272  font-size: 18px;
    271273  margin-top: 30px;
     
    321323  word-break: break-word;
    322324}
     325
     326.lofty-site-pending #page {
     327  position: relative;
     328  width: 100%;
     329  height: auto;
     330  min-height: 100%;
     331}
     332.lofty-site-pending #page:after {
     333  position: absolute;
     334  content: "";
     335  background-image: url(//static.chimeroi.com/site/images/sample-list.png);
     336  left: 0;
     337  top: 0;
     338  right: 0;
     339  bottom: 0;
     340  background-repeat: repeat;
     341  pointer-events: none;
     342  z-index: 1;
     343}
  • lofty-idx/trunk/templates/style/common.scss

    r3348447 r3393989  
    11:root {
    2   --lofty-font-bold: 'font-bold';
    3   --lofty-font-regular-serif: 'font-serif-regular';
    4   --lofty-font-regular: 'font-regular';
    5   --lofty-font-medium: 'font-medium';
    6   --lofty-font-play-bold: 'font-play-bold';
    7   --lofty-font-play-medium: 'font-play-medium';
    8   --lofty-font-mon-regular: 'font-mon-regular';
    9   --lofty-font-mon-medium: 'font-mon-medium';
    10   --lofty-font-mon-bold: 'font-mon-bold';
    11   --lofty-font-light: 'font-light';
    12 }
    13 
    14 @font-face {
    15   font-family: "font-light";
    16   font-display: block;
    17   src: url("./fonts/SF-UI-Text/300.ttf") format("truetype");
    18 }
    19 
    20 @font-face {
    21   font-family: "font-regular";
    22   font-display: block;
    23   src: url("./fonts/SF-UI-Text/400.ttf") format("truetype");
    24 }
    25 
    26 @font-face {
    27   font-family: "font-medium";
    28   font-display: block;
    29   src: url("./fonts/SF-UI-Text/500.ttf") format("truetype");
    30 }
    31 
    32 @font-face {
    33   font-family: "font-bold";
    34   font-display: block;
    35   src: url("./fonts/SF-UI-Text/600.ttf") format("truetype");
    36 }
    37 
    38 @font-face {
    39   font-family: "font-play-bold";
    40   font-display: block;
    41   src: url("./fonts/Playfair-Display/700.ttf") format("truetype");
    42 }
    43 
    44 @font-face {
    45   font-family: "font-play-medium";
    46   font-display: block;
    47   src: url("./fonts/Playfair-Display/500.ttf") format("truetype");
    48 }
    49 
    50 @font-face {
    51   font-family: "font-serif-regular";
    52   font-display: block;
    53   src: url("./fonts/DM-Serif-Display/400.ttf") format("truetype");
    54 }
    55 
    56 @font-face {
    57   font-family: "font-mon-regular";
    58   font-display: block;
    59   src: url("./fonts/Montserrat/400.ttf") format("truetype");
    60 }
    61 
    62 @font-face {
    63   font-family: "font-mon-medium";
    64   font-display: block;
    65   src: url("./fonts/Montserrat/500.ttf") format("truetype");
    66 }
    67 
    68 @font-face {
    69   font-family: "font-mon-bold";
    70   font-display: block;
    71   src: url("./fonts/Montserrat/700.ttf") format("truetype");
    72 }
    73 
    74 *[class^="lofty-"] {
    75   box-sizing: border-box;
    76   -webkit-tap-highlight-color: transparent;
    77   font-family: var(--lofty-font-regular);
    78 }
    79 
    80 .lofty-reset-style{
    81   p,
    82   ul {
    83     margin: 0;
    84     padding: 0;
    85     list-style: none;
    86   }
    87   * {
     2    --lofty-font-bold: 'font-bold';
     3    --lofty-font-regular-serif: 'font-serif-regular';
     4    --lofty-font-regular: 'font-regular';
     5    --lofty-font-medium: 'font-medium';
     6    --lofty-font-play-bold: 'font-play-bold';
     7    --lofty-font-play-medium: 'font-play-medium';
     8    --lofty-font-mon-regular: 'font-mon-regular';
     9    --lofty-font-mon-medium: 'font-mon-medium';
     10    --lofty-font-mon-bold: 'font-mon-bold';
     11    --lofty-font-light: 'font-light';
     12}
     13
     14@font-face {
     15    font-family: 'font-light';
     16    font-display: block;
     17    src: url('./fonts/SF-UI-Text/300.ttf') format('truetype');
     18}
     19
     20@font-face {
     21    font-family: 'font-regular';
     22    font-display: block;
     23    src: url('./fonts/SF-UI-Text/400.ttf') format('truetype');
     24}
     25
     26@font-face {
     27    font-family: 'font-medium';
     28    font-display: block;
     29    src: url('./fonts/SF-UI-Text/500.ttf') format('truetype');
     30}
     31
     32@font-face {
     33    font-family: 'font-bold';
     34    font-display: block;
     35    src: url('./fonts/SF-UI-Text/600.ttf') format('truetype');
     36}
     37
     38@font-face {
     39    font-family: 'font-play-bold';
     40    font-display: block;
     41    src: url('./fonts/Playfair-Display/700.ttf') format('truetype');
     42}
     43
     44@font-face {
     45    font-family: 'font-play-medium';
     46    font-display: block;
     47    src: url('./fonts/Playfair-Display/500.ttf') format('truetype');
     48}
     49
     50@font-face {
     51    font-family: 'font-serif-regular';
     52    font-display: block;
     53    src: url('./fonts/DM-Serif-Display/400.ttf') format('truetype');
     54}
     55
     56@font-face {
     57    font-family: 'font-mon-regular';
     58    font-display: block;
     59    src: url('./fonts/Montserrat/400.ttf') format('truetype');
     60}
     61
     62@font-face {
     63    font-family: 'font-mon-medium';
     64    font-display: block;
     65    src: url('./fonts/Montserrat/500.ttf') format('truetype');
     66}
     67
     68@font-face {
     69    font-family: 'font-mon-bold';
     70    font-display: block;
     71    src: url('./fonts/Montserrat/700.ttf') format('truetype');
     72}
     73
     74*[class^='lofty-'] {
    8875    box-sizing: border-box;
    89   }
    90   a {
    91     color: currentColor;
    92     text-decoration: none;
    93   }
     76    -webkit-tap-highlight-color: transparent;
     77    font-family: var(--lofty-font-regular);
     78}
     79
     80.lofty-reset-style {
     81    p,
     82    ul {
     83        margin: 0;
     84        padding: 0;
     85        list-style: none;
     86    }
     87    * {
     88        box-sizing: border-box;
     89    }
     90    a {
     91        color: currentColor;
     92        text-decoration: none;
     93    }
    9494}
    9595
    9696.lofty-listing-page {
    97   padding: 40px 50px;
    98   width: 100%;
    99   margin: 0 auto;
     97    padding: 40px 50px;
     98    width: 100%;
     99    margin: 0 auto;
    100100}
    101101.lofty-listing-page.lofty-is-shortcode {
    102   padding: 40px 0;
     102    padding: 40px 0;
    103103}
    104104@media (min-width: 1800px) {
    105   .lofty-listing-page {
    106     width: 1800px;
    107   }
     105    .lofty-listing-page {
     106        width: 1800px;
     107    }
    108108}
    109109@media (max-width: 600px) {
    110   .lofty-listing-page {
    111     padding: 30px 0 0;
    112   }
    113   #lofty-listing-search, #lofty_filter_container, .lofty-disclaimer-list {
    114     padding: 0 15px;
    115   }
    116   #lofty_pagination_container {
    117     width: 100%;
    118     left: 0;
    119   }
     110    .lofty-listing-page {
     111        padding: 30px 0 0;
     112    }
     113    #lofty-listing-search,
     114    #lofty_filter_container,
     115    .lofty-disclaimer-list {
     116        padding: 0 15px;
     117    }
     118    #lofty_pagination_container {
     119        width: 100%;
     120        left: 0;
     121    }
    120122}
    121123
    122124.lofty-mobile-btn {
    123   background: #111111;
    124   font-size: 14px;
    125   font-weight: 400;
    126   line-height: 40px;
    127   color: #fff;
    128   border: 0;
    129   text-align: center;
    130 }
    131 .lofty-overflow-hidden {
    132   overflow: hidden;
    133   height: 100vh;
    134   &:before {
    135     content: "";
    136     top: 0;
    137     bottom: 0;
    138     left: 0;
    139     right: 0;
    140     background: transparent;
    141     position: fixed;
    142     z-index: 10010;
    143     transform: translateZ(10010px);
    144   }
    145 }
    146 .lofty-tooltip {
    147   background: #202437;
    148   color: #c6c8d1;
    149   font-size: 12px;
    150   font-weight: 400;
    151   line-height: 20px;
    152   border-radius: 4px;
    153   max-width: fit-content;
    154   .tooltip-arrow {
    155     color: #202437;
    156   }
    157 }
    158 .lofty-toast {
    159   position: fixed;
    160   top: 50%;
    161   left: 50%;
    162   transform: translate(-50%, -50%);
    163   background-color: rgba(0, 0, 0, 0.8);
    164   color: #fff;
    165   padding: 20px 40px;
    166   border-radius: 5px;
    167   font-size: 18px;
    168   width: 70%;
    169   text-align: center;
    170   max-width: 500px;
    171   z-index: 4000000;
    172 }
    173 .lofty-line-through {
    174   text-decoration: line-through;
    175 }
    176 .lofty-page-padding {
    177   padding: 0 40px;
    178 }
    179 @media (max-width: 600px) {
    180   .lofty-page-padding {
    181     padding: 0 15px;
    182   }
    183 }
    184 @keyframes slideInDown {
    185   0% {
    186     transform: translate(-50%, 0);
    187   }
    188   100% {
    189     transform: translate(-50%, -50%);
    190   }
    191 }
    192 @keyframes slideOutUp {
    193   0% {
    194     transform: translate(-50%, 0);
    195   }
    196   100% {
    197     transform: translate(-50%, -50%);
    198     opacity: 0;
    199   }
    200 }
    201 
    202 .lofty-status-tag {
    203   background: #348cff;
    204   border-radius: 2px;
    205   color: #fff;
    206   font-size: 12px;
    207   font-weight: 400;
    208   line-height: 22px;
    209   text-align: center;
    210   &.hot {
    211     background: #f05252;
    212   }
    213   &.open-house {
    214     background: #45adff;
    215   }
    216   &.new {
    217     background: #00C768;
    218   }
    219   &.price-reduced {
    220     background: #ff973b;
    221   }
    222   &.pending {
    223     background: #FFA600;
    224   }
    225   &.active {
    226     background: #bb40ef;
    227   }
    228   &.sold {
    229     background: #505050;
    230   }
    231   &.exclusive {
    232     background: #2cd781;
    233   }
    234 }
    235 
    236 .lofty-no-listing {
    237   text-align: center;
    238   .lofty_iconfont {
    239     font-size: 64px;
    240     color: #DADADA;
    241   }
    242   .no-listing-text {
    243     color: #A8A8A8;
    244     font-size: 18px;
    245     margin-top: 30px;
    246   }
    247 }
    248 @media (max-width: 600px) {
    249   .lofty-no-listing {
    250     .lofty_iconfont {
    251       font-size: 36px;
    252     }
    253     .no-listing-text {
    254       margin-top: 10px;
    255       font-size: 16px;
    256     }
    257   }
    258 }
    259 
    260 @mixin mobile {
    261   @media (max-width: 767px) {
    262     @content;
    263   }
    264 }
    265 .lofty-disclaimer-list {
    266   margin-top: 60px;
    267   @include mobile {
    268     margin-top: 30px;
    269   }
    270   .lofty-mls-logo {
    271     margin: 0;
    272     img {
    273       height: 30px!important;
    274     }
    275   }
    276   .lofty-mobile-mls-logo {
    277     display: none;
    278     @include mobile {
    279       display: block;
    280     }
    281   }
    282   .lofty-pc-mls-logo {
    283     display: block;
    284     @include mobile {
    285       display: none;
    286     }
    287   }
    288   .lofty-mls-disclaimer {
    289     margin-top: 15px;
    290     margin-bottom: 30px;
     125    background: #111111;
    291126    font-size: 14px;
    292127    font-weight: 400;
    293     line-height: 24px;
    294     text-align: left;
    295     color: #aaa;
    296     word-break: break-word;
    297   }
    298 }
     128    line-height: 40px;
     129    color: #fff;
     130    border: 0;
     131    text-align: center;
     132}
     133.lofty-overflow-hidden {
     134    overflow: hidden;
     135    height: 100vh;
     136    &:before {
     137        content: '';
     138        top: 0;
     139        bottom: 0;
     140        left: 0;
     141        right: 0;
     142        background: transparent;
     143        position: fixed;
     144        z-index: 10010;
     145        transform: translateZ(10010px);
     146    }
     147}
     148.lofty-tooltip {
     149    background: #202437;
     150    color: #c6c8d1;
     151    font-size: 12px;
     152    font-weight: 400;
     153    line-height: 20px;
     154    border-radius: 4px;
     155    max-width: fit-content;
     156    .tooltip-arrow {
     157        color: #202437;
     158    }
     159}
     160.lofty-toast {
     161    position: fixed;
     162    top: 50%;
     163    left: 50%;
     164    transform: translate(-50%, -50%);
     165    background-color: rgba(0, 0, 0, 0.8);
     166    color: #fff;
     167    padding: 20px 40px;
     168    border-radius: 5px;
     169    font-size: 18px;
     170    width: 70%;
     171    text-align: center;
     172    max-width: 500px;
     173    z-index: 4000000;
     174}
     175.lofty-line-through {
     176    text-decoration: line-through;
     177}
     178.lofty-page-padding {
     179    padding: 0 40px;
     180}
     181@media (max-width: 600px) {
     182    .lofty-page-padding {
     183        padding: 0 15px;
     184    }
     185}
     186@keyframes slideInDown {
     187    0% {
     188        transform: translate(-50%, 0);
     189    }
     190    100% {
     191        transform: translate(-50%, -50%);
     192    }
     193}
     194@keyframes slideOutUp {
     195    0% {
     196        transform: translate(-50%, 0);
     197    }
     198    100% {
     199        transform: translate(-50%, -50%);
     200        opacity: 0;
     201    }
     202}
     203
     204.lofty-status-tag {
     205    background: #348cff;
     206    border-radius: 2px;
     207    color: #fff;
     208    font-size: 12px;
     209    font-weight: 400;
     210    line-height: 22px;
     211    text-align: center;
     212    &.hot {
     213        background: #f05252;
     214    }
     215    &.open-house {
     216        background: #45adff;
     217    }
     218    &.new {
     219        background: #00c768;
     220    }
     221    &.price-reduced {
     222        background: #ff973b;
     223    }
     224    &.pending {
     225        background: #ffa600;
     226    }
     227    &.active {
     228        background: #bb40ef;
     229    }
     230    &.sold {
     231        background: #505050;
     232    }
     233    &.exclusive {
     234        background: #2cd781;
     235    }
     236}
     237
     238.lofty-no-listing {
     239    text-align: center;
     240    .lofty_iconfont {
     241        font-size: 64px;
     242        color: #dadada;
     243    }
     244    .no-listing-text {
     245        color: #a8a8a8;
     246        font-size: 18px;
     247        margin-top: 30px;
     248    }
     249}
     250@media (max-width: 600px) {
     251    .lofty-no-listing {
     252        .lofty_iconfont {
     253            font-size: 36px;
     254        }
     255        .no-listing-text {
     256            margin-top: 10px;
     257            font-size: 16px;
     258        }
     259    }
     260}
     261
     262@mixin mobile {
     263    @media (max-width: 767px) {
     264        @content;
     265    }
     266}
     267.lofty-disclaimer-list {
     268    margin-top: 60px;
     269    @include mobile {
     270        margin-top: 30px;
     271    }
     272    .lofty-mls-logo {
     273        margin: 0;
     274        img {
     275            height: 30px !important;
     276        }
     277    }
     278    .lofty-mobile-mls-logo {
     279        display: none;
     280        @include mobile {
     281            display: block;
     282        }
     283    }
     284    .lofty-pc-mls-logo {
     285        display: block;
     286        @include mobile {
     287            display: none;
     288        }
     289    }
     290    .lofty-mls-disclaimer {
     291        margin-top: 15px;
     292        margin-bottom: 30px;
     293        font-size: 14px;
     294        font-weight: 400;
     295        line-height: 24px;
     296        text-align: left;
     297        color: #aaa;
     298        word-break: break-word;
     299    }
     300}
     301
     302.lofty-site-pending {
     303    #page {
     304        position: relative;
     305        width: 100%;
     306        height: auto;
     307        min-height: 100%;
     308        &:after {
     309            position: absolute;
     310            content: '';
     311            background-image: url(//static.chimeroi.com/site/images/sample-list.png);
     312            left: 0;
     313            top: 0;
     314            right: 0;
     315            bottom: 0;
     316            background-repeat: repeat;
     317            pointer-events: none;
     318            z-index: 1;
     319        }
     320    }
     321}
  • lofty-idx/trunk/templates/style/listing-detail.css

    r3393952 r3393989  
    1212    position: unset;
    1313}
     14.lofty-detail-info.mt-40 {
     15    margin-top: 40px;
     16}
    1417.lofty-detail-info-content {
    1518    margin-top: 40px;
    16     display: flex;
     19    display: -webkit-box;
     20    display: -ms-flexbox;
     21    display: flex;
     22    -webkit-box-orient: vertical;
     23    -webkit-box-direction: normal;
     24    -ms-flex-direction: column;
    1725    flex-direction: column;
    1826    gap: 10px;
     
    2432    text-align: left;
    2533    color: #111111;
    26     display: flex;
     34    display: -webkit-box;
     35    display: -ms-flexbox;
     36    display: flex;
     37    -webkit-box-align: center;
     38    -ms-flex-align: center;
    2739    align-items: center;
    2840    gap: 10px;
     
    6375.lofty-detail-info .lofty-price-box {
    6476    margin-top: 28px;
     77    display: -webkit-box;
     78    display: -ms-flexbox;
    6579    display: flex;
    6680    gap: 15px;
     
    8296    color: #a8a8a8;
    8397    font-size: 20px;
    84     display: flex;
     98    display: -webkit-box;
     99    display: -ms-flexbox;
     100    display: flex;
     101    -webkit-box-align: center;
     102    -ms-flex-align: center;
    85103    align-items: center;
    86104    margin-top: 15px;
     
    89107    text-decoration: none;
    90108    font-weight: 600;
     109    display: -webkit-inline-box;
     110    display: -ms-inline-flexbox;
    91111    display: inline-flex;
    92112    margin-left: 12px;
     113    -webkit-box-align: center;
     114    -ms-flex-align: center;
    93115    align-items: center;
    94116}
     
    122144}
    123145.lofty-detail-info .lofty-detail-wrapper {
     146    display: -webkit-box;
     147    display: -ms-flexbox;
    124148    display: flex;
    125149    margin-top: 15px;
     150    -webkit-box-pack: justify;
     151    -ms-flex-pack: justify;
    126152    justify-content: space-between;
    127153    border-bottom: 1px solid rgba(17, 17, 17, 0.1);
     154    -ms-flex-wrap: wrap;
    128155    flex-wrap: wrap;
    129156}
     
    136163    padding: 10px 0;
    137164    border-top: 1px solid rgba(17, 17, 17, 0.1);
     165    -webkit-box-flex: 0;
     166    -ms-flex: none;
    138167    flex: none;
    139168    width: 50%;
     169    display: -webkit-box;
     170    display: -ms-flexbox;
    140171    display: flex;
    141172}
     
    215246    }
    216247    .lofty-detail-info .lofty-key-detail .lofty-detail-wrapper {
     248        -ms-flex-wrap: wrap;
    217249        flex-wrap: wrap;
    218250    }
     
    222254        .lofty-detail-key-detail-item {
    223255        width: 100%;
     256        -webkit-box-align: center;
     257        -ms-flex-align: center;
    224258        align-items: center;
    225259    }
     
    248282        .lofty-value.lofty-key {
    249283        width: 100px;
     284        -webkit-box-flex: 0;
     285        -ms-flex: none;
    250286        flex: none;
    251287    }
     
    260296        .lofty-detail-key-detail-item
    261297        .lofty-value.lofty-value {
     298        -webkit-box-flex: 1;
     299        -ms-flex: 1;
    262300        flex: 1;
    263301    }
     
    281319
    282320.lofty-flex {
     321    display: -webkit-box;
     322    display: -ms-flexbox;
    283323    display: flex;
    284324}
     
    328368.lofty-open-other-fields .lofty_iconfont {
    329369    display: inline-block;
     370    -webkit-transform: rotate(90deg);
    330371    transform: rotate(90deg);
    331372    font-size: 14px;
    332373}
    333374.lofty-open-other-fields .lofty_iconfont.lofty-arrow-up {
     375    -webkit-transform: rotate(-90deg);
    334376    transform: rotate(-90deg);
    335377}
     
    383425#lofty-listing-pictures .swiper-wrapper {
    384426    width: 100%;
     427    display: -webkit-box;
     428    display: -ms-flexbox;
    385429    display: flex;
    386430    height: 350px;
     
    389433#lofty-listing-pictures .swiper-wrapper .swiper-slide {
    390434    cursor: pointer;
     435    -webkit-box-flex: 0;
     436    -ms-flex: none;
    391437    flex: none;
    392438}
     
    401447.lofty-detail-btns {
    402448    position: absolute;
     449    width: -webkit-max-content;
     450    width: -moz-max-content;
    403451    width: max-content;
    404452    top: 20px;
    405453    right: 50px;
    406     display: flex;
     454    display: -webkit-box;
     455    display: -ms-flexbox;
     456    display: flex;
     457    -webkit-box-align: center;
     458    -ms-flex-align: center;
    407459    align-items: center;
     460    -webkit-column-gap: 10px;
     461    -moz-column-gap: 10px;
    408462    column-gap: 10px;
    409463    z-index: 10000;
     
    411465.lofty-detail-btns .lofty-btn-item {
    412466    position: relative;
     467    display: -webkit-inline-box;
     468    display: -ms-inline-flexbox;
    413469    display: inline-flex;
     470    -webkit-box-align: center;
     471    -ms-flex-align: center;
    414472    align-items: center;
     473    -webkit-box-pack: center;
     474    -ms-flex-pack: center;
    415475    justify-content: center;
     476    -webkit-column-gap: 10px;
     477    -moz-column-gap: 10px;
    416478    column-gap: 10px;
     479    width: -webkit-max-content;
     480    width: -moz-max-content;
    417481    width: max-content;
    418482    padding: 10px 20px;
     
    431495.lofty-tour-btns {
    432496    position: absolute;
     497    width: -webkit-max-content;
     498    width: -moz-max-content;
    433499    width: max-content;
    434500    left: 15px;
    435501    bottom: 15px;
    436502    z-index: 10;
    437     display: flex;
     503    display: -webkit-box;
     504    display: -ms-flexbox;
     505    display: flex;
     506    -webkit-box-align: center;
     507    -ms-flex-align: center;
    438508    align-items: center;
     509    -webkit-column-gap: 10px;
     510    -moz-column-gap: 10px;
    439511    column-gap: 10px;
    440512}
  • lofty-idx/trunk/templates/style/listing-detail.scss

    r3393952 r3393989  
    44    }
    55}
     6
    67.lofty-listing-detail-page {
    78    width: 100%;
     
    1415    margin: auto;
    1516    position: unset;
     17    &.mt-40 {
     18        margin-top: 40px;
     19    }
    1620    &-content {
    1721        margin-top: 40px;
Note: See TracChangeset for help on using the changeset viewer.