1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6033],{94786:function(e,t,l){var a=l(85893),n=l(11163),r=l(47650),o=l(22430),i=l(37608),s=l(93875),c=l(67294);let d=(0,r.Z)({typography:{fontFamily:"var(".concat(s.ZP.variable,"), sans-serif")},components:{MuiButton:{styleOverrides:{startIcon:{marginRight:0},endIcon:{marginLeft:0}}}}}),u={position:"absolute",insetInlineStart:0,top:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",border:0,zIndex:9999},h={position:"absolute",insetInlineStart:"12px",top:"12px",width:"auto",height:"auto",padding:"8px 12px",margin:0,overflow:"visible",clip:"auto",clipPath:"none",whiteSpace:"normal",border:"1px solid #111",zIndex:9999,background:"#fff",color:"#111"};t.Z=e=>{let{children:t,headerClassName:l,hideHeader:r,headerVariant:s="light",showSearch:g=!1,showSubNav:m=!0}=e,f=(0,n.useRouter)(),[p,x]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{x(!0)},[]),(0,a.jsxs)(o.Z,{theme:d,children:[(0,a.jsx)("a",{href:"#main-content",style:u,onFocus:e=>{Object.assign(e.currentTarget.style,h)},onBlur:e=>{Object.assign(e.currentTarget.style,u)},children:"Skip to main content"}),!r&&(0,a.jsx)(i.Z,{variant:s,showSearch:g,showSubNav:m}),(0,a.jsx)("main",{id:"main-content",role:"main","data-route":p?f.asPath:"",suppressHydrationWarning:!0,children:t})]})}},23515:function(e,t,l){l.d(t,{Z:function(){return BlogSearchComponent}});var a=l(85893),n=l(67294),r=l(29172),o=l(90629),i=l(87357),s=l(64571),c=l(61903),d=l(83321),u=l(11163),h=l(9473),g=l(4295),m=l.n(g),f=l(90948),p=l(11447),x=l.n(p),v=l(23370),b=l.n(v),y=l(94447);let w=new Set(["a","an","the","in","on","at","to","for","of","and","or","with","by","from","is","are","was","were","be","been","being","as"]);function escapeRegex(e){return String(e||"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function normalizeText(e){return String(e||"").toLowerCase().replace(/[''']/g,"'").replace(/[^\w\s'-]/g," ").replace(/\s+/g," ").trim()}function tokenizeBlogSearchQuery(e){let t=normalizeText(e);return t?t.split(" ").filter(e=>e.length>1&&!w.has(e)):[]}function getSignificantPhrases(e){let t=[];for(let l=0;l<e.length;l+=1)for(let a=l+2;a<=e.length;a+=1)t.push(e.slice(l,a).join(" "));return t.sort((e,t)=>t.length-e.length)}function matchesToken(e,t){let l=escapeRegex(String(t||"").replace(/s$/i,""));if(!l)return!1;let a=RegExp("\\b".concat(l,"s?\\b"),"i");return a.test(e)}let S=(0,f.ZP)(o.Z)(e=>{let{theme:t}=e;return{minWidth:"150px",height:"46px",margin:"0",display:"flex",flexGrow:1,overflow:"hidden",borderRadius:0,boxShadow:"none"}}),j={insideWords:!1};function BlogSearchComponent(){var e;(0,h.v9)(e=>e.data),(0,h.I0)();let t=(0,u.useRouter)(),[l,o]=(0,n.useState)([]),[g,f]=(0,n.useState)((null==t?void 0:null===(e=t.query)||void 0===e?void 0:e.searchtext)?{value:t.query.searchtext}
1:null),[p,v]=(0,n.useState)({}),[w,N]=(0,n.useState)(""),[B,z]=(0,n.useState)(!1),C=[...l],L=(0,y.Ds)((e,t,l)=>{if(l&&"input"!==l)return;let a=(t||"").trim();if(!a){o([]);return}getSearchOptions({search_key:a})},300),onSearch=e=>{let l="/blog/".concat((null==e?void 0:e.key)||(null==g?void 0:g.key)||"");t.push({pathname:l})},getSearchOptions=async e=>{let t=String((null==e?void 0:e.search_key)||"").trim();if(!t){o([]);return}o([]);let l=function(e){let t=String(e||"").trim();if(!t)return[];let l=tokenizeBlogSearchQuery(t),a=new Set;for(let e of(l.length&&a.add(l.join(" ")),getSignificantPhrases(l).slice(0,3)))a.add(e);let n=[...l].sort((e,t)=>t.length-e.length);for(let e of n.slice(0,3))a.add(e);return a.add(t),[...a].filter(Boolean)}(t);try{let e=await Promise.all(l.map(e=>r.Z.fetchBlogSearch({search_key:e}).catch(()=>({data:{data:[]}})))),n=[],i=new Set;for(let t of e){var a;for(let e of(null==t?void 0:null===(a=t.data)||void 0===a?void 0:a.data)||[]){let t=(null==e?void 0:e.key)||(null==e?void 0:e.slug)||(null==e?void 0:e.value)||(null==e?void 0:e.title);!t||i.has(t)||(i.add(t),n.push(e))}}let s=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,a=tokenizeBlogSearchQuery(t),n=getSignificantPhrases(a),r=new Set,o=[];for(let l of e||[]){let e=(null==l?void 0:l.key)||(null==l?void 0:l.slug)||(null==l?void 0:l.value)||(null==l?void 0:l.title);if(!e||r.has(e))continue;r.add(e);let i=(null==l?void 0:l.value)||(null==l?void 0:l.title)||"",s=function(e,t,l,a){let n=normalizeText(e),r=normalizeText(t);if(!n)return 0;let o=0,i=0;for(let e of(r&&n.includes(r)&&(o+=200),a)){let t=e.split(" ").map(e=>"".concat(escapeRegex(e.replace(/s$/i,"")),"s?")).join("\\s+"),l=RegExp("\\b".concat(t,"\\b"),"i");(l.test(n)||n.includes(e))&&(o+=40+5*e.length)}for(let e of l)matchesToken(n,e)&&(i+=1,o+=25+Math.min(e.length,10));return l.length>0&&0===i?0:(l.length>1&&i===l.length&&(o+=50),l[0]&&matchesToken(n,l[0])?o+=80:l[0]&&(o*=.35),l.length>=2&&1===i&&l.includes("dubai")&&matchesToken(n,"dubai")&&!l.some(e=>"dubai"!==e&&matchesToken(n,e))&&(o*=.25),o)}(i,t,a,n);s>0&&o.push({item:l,score:s})}return o.sort((e,t)=>t.score-e.score),o.slice(0,l).map(e=>{let{item:t}=e;return t})}(n,t);o(s.length?s:n.slice(0,15))}catch(e){console.error("Error fetching search options",e),o([])}};return(0,a.jsx)(i.Z,{component:"smartsearch",className:m().smartsearchrow,sx:{p:0,height:46},children:(0,a.jsxs)(S,{style:{width:"100%",border:0},children:[(0,a.jsx)(s.Z,{className:m().autocwrap,fullWidth:!0,freeSolo:!0,id:"multiple-limit-tags",options:C,filterOptions:e=>e,isOptionEqualToValue:(e,t)=>(null==e?void 0:e.key)===(null==t?void 0:t.key),onInputChange:L,getOptionLabel:e=>"string"==typeof e?e:(null==e?void 0:e.value)||(null==e?void 0:e.title)||"",onChange:(e,t)=>
1{f(t),z(!0),t&&(v({}),onSearch(t))},onKeyDown:(e,t)=>{"Enter"===e.key&&onSearch(t)},renderInput:e=>(0,a.jsx)(c.Z,{variant:"outlined",sx:k,...e,label:"Search for a Topic"}),popupIcon:!1,sx:{width:"100%",fontFamily:"Proxima Nova Regular",backgroundColor:"#F5F5F5",border:p.searchBarValue?"1px solid #ff0000":"1px solid #F5F5F5"},renderOption:(e,t,l)=>{let{inputValue:n}=l,r="string"==typeof t?t:(null==t?void 0:t.value)||(null==t?void 0:t.title)||"",o=tokenizeBlogSearchQuery(n).join(" ")||n,i=function(e,t){let l=e||"",a=x()(l,t,j);return b()(l,a)}(r,o);return(0,a.jsx)("li",{...e,children:(0,a.jsx)("div",{children:i.map((e,t)=>(0,a.jsx)("span",{style:{fontFamily:e.highlight?"Proxima Nova ExtraBold":"Proxima Nova Regular"},children:e.text},t))})})}}),(0,a.jsx)(d.Z,{style:{width:100,height:"100%"},variant:"primary",size:"small",color:"primary",className:m().searchbtn,onClick:()=>onSearch(g),disabled:B,children:B?(0,a.jsx)("div",{className:"loadwrap",style:{marginTop:"-8px"},children:(0,a.jsx)("span",{className:"loader"})}):"Search"})]})})}let k={"& .MuiFormLabel-root.MuiInputLabel-formControl.MuiFormLabel-filled.MuiInputLabel-focused":{opacity:0},"& .MuiFormLabel-root.MuiInputLabel-formControl.MuiInputLabel-shrink":{opacity:0}}},65279:function(e,t,l){l.d(t,{Dc:function(){return getBlogCategories},vx:function(){return BlogCardSkeleton}});var a=l(85893);l(67294);var n=l(25675),r=l.n(n),o=l(41664),i=l.n(o),s=l(72167),c=l(99261),d=l(52600);let u="https://www1.luxuryproperty.com",getFormattedDate=e=>{if(!e||""===String(e).trim()||String(e).startsWith("0000"))return null;try{let t=new Date(e);if(isNaN(t.getTime()))return null;return(0,s.Z)(t,"MMM d, yyyy")}catch(e){return null}},getBlogImageUrl=e=>{var t;return(null==e?void 0:null===(t=e.image)||void 0===t?void 0:t.includes("uploads/blog"))?"".concat(u,"/").concat(e.image):"".concat(u,"/uploads/demo/").concat((null==e?void 0:e.image)||"default.jpg")},getBlogHref=e=>"/blog/".concat((null==e?void 0:e.slug)||""),readCategoryLabel=e=>null==e||""===e?"":"string"==typeof e?e.trim():"object"==typeof e?String(e.title||e.name||e.slug||"").trim():"",splitCategoryValue=e=>{let t=String(null!=e?e:"").trim();return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]},getBlogCategories=e=>{if(!e||"object"!=typeof e)return["Blog"];let t=[],addLabel=e=>{if(null==e||""===e)return;let l="string"==typeof e?splitCategoryValue(e):[readCategoryLabel(e)].filter(Boolean);l.forEach(e=>{let l="string"==typeof e?e:readCategoryLabel(e);if(!l)return;let a=l.toLowerCase();t.some(e=>e.toLowerCase()===a)||t.push(l)})};return Array.isArray(e.categories)&&e.categories.forEach(e=>addLabel(e)),e.category&&"object"==typeof e.category&&addLabel(e.category),addLabel(e.category_title),addLabel(e.category_name),addLabel(e.blog_category),addLabel(e.category),t.length>0?t:["Blog"]};function BlogCardSkeleton(){return(0,a.jsxs)("article",{className:"card --blog flex h-full w-full min-h-0 flex-1 flex-col","aria-hidden":!0,children:[(0,a.jsx)("div",{className:"tag-group",children:(0,a.jsx)(c.O,{className:"h-7 w-[88px] shrink-0 rounded-none"})}),(0,a.jsx)(c.O,{className:"card-image block h-[300px] w-full shrink-0 rounded-none"}),(0,a.jsxs)("div",{className:"card-body flex min-h-0 flex-1 flex-col",children:[(0,a.jsx)(c.O,{className:"h-3 w-[55%] rounded-md"}),(0,a.jsx)(c.O,{className:"mt-2 h-5 w-[92%] rounded-md"}),(0,a.jsx)(c.O,{className:"mt-2 h-4 w-full rounded-md"}),(0,a.jsx)(c.O,{className:"mt-1 h-4 w-[88%] rounded-md"}),(0,a.jsx)(c.O,{className:"mt-auto h-9 w-full rounded-md pt-6"})]})]})}t.ZP=e=>{var t,l,n,o;let{item:s,data:c,imagePriority:u=!1,imageLoading:h,imageSizes:g="(max-width: 600px) 100vw, (max-width: 960px) 50vw, 33vw"}=e,m=null!==(t=null!=s?s:c)&&void 0!==t?t:{},f=getBlogHref(m),p=getBlogImageUrl(m),x=getFormattedDate(null!==(o=null!==(n=null!==(l=m.date_added)&&void 0!==l?l:m.blog_added)&&void 0!==n?n:m.added_date)&&void 0!==o?o:m.created_at),v=m.author_name||m.author||"",b=getBlogCategories(m),y=[x,v].filter(Boolean),w={};return u?w.priority=!0:("lazy"===h||"eager"===h)&&(w.loading=h),(0,a.jsxs)("article",{className:"card --blog flex h-full w-full min-h-0 flex-1 flex-col",children:[(0,a.jsx)("div",{className:"tag-group",children:(0,a.jsx)("div",{className:"tag dark",children:(null==b?void 0:b[0])||"Blog"})}),(0,a.jsx)(i(),{href:f,className:"card-image block shrink-0",children:(0,a.jsx)(r(),{src:p,alt:m.title||"Blog post",fill:!0,className:"object-cover",sizes:g,...w})}),(0,a.jsxs)("div",{className:"card-body flex min-h-0 flex-1 flex-col",children:[y.length>0?(0,a.jsx)("p",{className:"font-size-xsmall color-text mb-1",children:y.join(" ⢠")}):null,(0,a.jsx)("h3",{className:"card-title line-clamp-1 break-words",children:m.title}),m.description?(0,a.jsx)("p",{className:"card-description font-size-small color-text",children:m.description}):null,(0,a.jsx)(i(),{href:f,className:"mt-auto block pt-6",children:(0,a.jsx)(d.z,{variant:"outline",size:"small",className:"w-full max-w-full uppercase font-size-xsmall",children:"View Details"})})]})]})}},52600:function(e,t,l){l.d(t,{z:function(){return o}});var a=l(85893),n=l(67294),r=l(88426);let normalizeVariant=e=>"solid"===e||"outline"===e||"white"===e?e:"ghost"===e||"link"===e?"outline":"solid",normalizeSize=e=>"small"===e||"medium"===e||"large"===e?e:"sm"===e||"xs"===e||"icon-xs"===e||"icon-sm"===e?"small":"lg"===e||"icon-lg"===e?"large":"",o=n.forwardRef(function(e,t){let{className:l,variant:n="solid",size:o="",withIcon:i=!1,asChild:s=!1,...c}=e,d=s?r.fC:"button",u=normalizeVariant(n),h=normalizeSize(o),g=["default_button","--".concat(u),"--".concat(h),i?"--with-icon":"",l||""].filter(
1Boolean).join(" ");return(0,a.jsx)(d,{ref:t,"data-slot":"button","data-variant":u,"data-size":h,className:g,...c})});o.displayName="Button"},99261:function(e,t,l){l.d(t,{O:function(){return Skeleton}});var a=l(85893),n=l(52535);function Skeleton(e){let{className:t,...l}=e;return(0,a.jsx)("div",{"data-slot":"skeleton",className:(0,n.cn)("animate-pulse rounded-2xl bg-[var(--color-border)]",t),...l})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.