1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2385],{92459:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/messages/[...match]",function(){return s(93538)}])},2372:function(e,t,s){"use strict";s.d(t,{Z:function(){return p}});var i=s(85893);s(67294);var n=s(5152),a=s.n(n),o=s(19845),r=s.n(o),l=s(79856),c=s.n(l),d=s(16840);let h=a()(()=>Promise.all([s.e(296),s.e(1876),s.e(9185)]).then(s.bind(s,69185)),{loadableGenerated:{webpack:()=>[69185]},ssr:!1});function p(e){let{size:t=48,className:s}=e,n=r().bind(c());return(0,i.jsx)("div",{className:n("container",s),role:"status","aria-label":"Loading",children:(0,i.jsx)(h,{loop:!0,animationData:d,play:!0,style:{width:t,height:t}})})}},75994:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});var i=s(85893),n=s(67294),a=s(45697),o=s.n(a);class r extends n.PureComponent{static getString(e,t){let s;let i=new Date,n=e||i,a=i.getTime()-n.getTime();if(a<12e4)s="Just now";else if(a<36e5){let e=Math.floor(a/6e4);s=e+(1===e?" minute":" minutes")+" ago"}else if(a<864e5){let e=Math.floor(a/36e5);s=e+(1===e?" hour":" hours")+" ago"}else if(a<12096e5){let e=new Date(new Date(i).setHours(0,0,0,0)),t=new Date(new Date(n).setHours(0,0,0,0)),a=Math.ceil((e.getTime()-t.getTime())/864e5);s=a+(1===a?" day":" days")+" ago"}else s=n.toLocaleDateString({},t||{day:"numeric",month:"short",year:a<31536e6?void 0:"numeric"});return s}static getListedAtString(e,t){let s;let i=new Date,n=e||i,a=i.getTime()-n.getTime();if(a<12e4)s="Just now";else if(a<36e5)s=Math.floor(a/6e4)+"min";else if(a<864e5)s=Math.floor(a/36e5)+"hr";else if(a<6048e5){let e=new Date(new Date(i).setHours(0,0,0,0)),t=new Date(new Date(n).setHours(0,0,0,0));s=Math.ceil((e.getTime()-t.getTime())/864e5)+"d"}else if(a<2592e6){let e=new Date(new Date(i).setHours(0,0,0,0)),t=new Date(new Date(n).setHours(0,0,0,0));s=Math.ceil((e.getTime()-t.getTime())/6048e5)+"w"}else if(a<31536e6){let e=new Date(new Date(i).setHours(0,0,0,0)),t=new Date(new Date(n).setHours(0,0,0,0));s=Math.ceil((e.getTime()-t.getTime())/2592e6)+"mo"}else{let e=new Date(new Date(i).setHours(0,0,0,0)),t=new Date(new Date(n).setHours(0,0,0,0));s=Math.ceil((e.getTime()-t.getTime())/31536e6)+"yr"}return s}render(){let e=r.getString(this.props.date,this.props.options);return(0,i.jsx)("span",{title:(this.props.title?this.props.title+" ":"")+(this.props.date||new Date).toLocaleString(),children:e})}}r.propTypes={date:o().instanceOf(Date),title:o().string,options:o().object}},78338:function(e,t,s){"use strict";s.d(t,{SQ:function(){return h},ZP:function(){return u},dG:function(){return p}});var i=s(85893),n=s(69070),a=s.n(n),o=s(67294),r=s(19845),l=s.n(r),c=s(45697),d=s.n(c);function h(e,t){return e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\n+/g,"\n"),t?e.replace(RegExp("("+t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")+")","i"),"<em>$1</em>"):e.replace(/<(\/)?(em|b)>/g,"<$1$2>")}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,o=arguments.length>6?arguments[6]:void 0;return"string"!=typeof e?"":(e=e.toString().replace(/</g,"<").replace(/>/g,">"),i||(e=e.replace(/((https?:\/\/|www\.)[^"]+?)(\.|,|\?|!)?(\s|$)/gi,'<a href="$1" target="_blank" title="$1" rel="noopener nofollow">$1</a>$3 ').replace(/"www\./,'"https://www.'),t.sort((e,t)=>t.length-e.length).forEach(t=>{t=t.replace("#",""),e=e.replace(RegExp("#(".concat(t,")([^5;]|$)"),"gi"),'<a href="/topic/$1" title="See more posts about #$1 target="_blank">#$1</a>$2')}),s.sort((e,t)=>e&&t&&e.name&&t.name&&t.name.length-e.name.length).forEach(t=>{if(!t||!t.name)return;let s=t.name.replace(/"/g,"""),i=t.name.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r?\n/g," <br>");e=e.replace(new RegExp("@".concat(i.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))),'<a href="'+t.url+'" title="Go to the profile of '+s+'">'+i+"</a>")})),n&&(e=e.replace(/<(\/)?b>/g,"<$1b>")),a&&(e=(e=e.replace(/<br[ /]*>/g,"<br>")).replace(/<(\/)?p>/g,"<$1p>")),o&&(e=e.replace(/&(#[0-9]{4};)/g,"&$1")),e)}class u extends o.PureComponent{componentDidUpdate(e){(this.props.content!==e.content||this.props.taggedUsers!==e.taggedUsers||this.props.hashTags!==e.hashTags)&&this.setState({content:p(this.props.content,this.props.hashTags,this.props.taggedUsers,this.props.ignoreLinks,this.props.ignoreBold,this.props.ignoreBreaks,this.props.withSpecialChars)})}render(){let e=l().bind(a());return(0,i.jsx)("div",{className:e("usercontent",this.props.truncate&&"truncate")+" "+this.props.className,dangerouslySetInnerHTML:{__html:this.state.content}})}constructor(e){super(e),this.state={content:p(e.content,e.hashTags,e.taggedUsers,e.
1ignoreLinks,e.ignoreBold,e.ignoreBreaks,e.withSpecialChars)}}}u.propTypes={content:d().string,hashTags:d().array,taggedUsers:d().array,ignoreLinks:d().bool,ignoreBold:d().bool,ignoreBreaks:d().bool,withSpecialChars:d().bool}},92858:function(e,t){"use strict";t.Z=(e,t)=>{let s;return function(){for(var i=arguments.length,n=Array(i),a=0;a<i;a++)n[a]=arguments[a];clearTimeout(s),s=setTimeout(()=>{s=null,e(...n)},t)}}},633:function(e,t,s){"use strict";s.d(t,{Z:function(){return i}});class i{static newMessage(e){let t=new i(i.createTwilioJsonObject({type:"text",body:e}));return t.who="you",t}static newSystemMessage(){let e=new i(i.createTwilioJsonObject({type:"system"}));return e.who="you system",e}static createTwilioJsonObject(e){let{userId:t,type:s,body:i,localId:n,filename:a}=e;return{author:"author-".concat("system"===s?"system":t),type:s,body:"text"===s?i:null,timestamp:new Date().toISOString(),attributes:{localId:n,file:{url:"file"===s?URL.createObjectURL(i):null,original_filename:a}}}}static fromTwilioJsonObject(e){return e?new i(e):null}static fromTwilioJsonArray(e){return e?e.map(e=>i.fromTwilioJsonObject(e)):[]}type(){return this.json.attributes&&this.json.attributes.file&&this.json.attributes.file.url?"image":"system"===this.json.type?"system":"text"}text(){return this.json.body?this.json.body.trim():""}imageUrl(){return"image"===this.type()?this.json.attributes.file.url.split("?")[0]:null}timestamp(){return new Date(this.json.timestamp).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}date(){return new Date(this.json.timestamp).toLocaleDateString(void 0,{day:"numeric",month:"long",year:"numeric"})}localId(){return this.json.attributes?this.json.attributes.localId:null}sid(){return this.json.sid}getFileName(){return this.json.attributes&&this.json.attributes.file?this.json.attributes.file.original_filename:null}status(){return void 0===this.json.sid||null===this.json.sid?"system"===this.json.type?null:"sending":"unread"}setIsAvatarShown(e){this.isAvatarShown=e}constructor(e,t){this.twilioObject=e,this.json=e.state;let s=this.json.author.split("-")[1];this.who="".concat(t)==="".concat(s)?"you":"other"}}},93538:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eK}});var i=s(85893),n=s(67294),a=s(9008),o=s.n(a),r=s(3409),l=s.n(r),c=s(19845),d=s.n(c),h=s(11163),p=s.n(h),u=s(9669),g=s.n(u),m=s(52537),v=s(95281),M=s(81566);class y{static fromJson(e,t){return e?new y(e,t):null}static fromJsonArray(e,t){return(e||[]).map(e=>y.fromJson(e,t))}id(){return this.json.id}isNew(){return!this.json.id}setThisUserId(e){return this.thisUserId=e,this}channelSid(){return this.json.channel_sid}thisUser(){return new v.Z(this.json.conversation_users[0].user_id===this.thisUserId?this.json.conversation_users[0].user:this.json.conversation_users[1].user)}otherUser(){var e,t;let s=null;return String(this.json.conversation_users[0].user_id||parseInt(null===(e=this.json.conversation_users[0].user)||void 0===e?void 0:e.objectID))!==String(this.thisUserId)?s=new v.Z(this.json.conversation_users[0].user):String(this.json.conversation_users[1].user_id||parseInt(null===(t=this.json.conversation_users[1].user)||void 0===t?void 0:t.objectID))!==String(this.thisUserId)&&(s=new v.Z(this.json.conversation_users[1].user)),s}lastMessage(){return this._lastMessage?this._lastMessage.split(/<br\s*[/]?>/g)[0].trim():""}setLastMessage(e){e&&(this._lastMessage=e.state.body,this.json.last_updated_at=e.state.dateUpdated)}lastUpdatedAt(){if(!this.json.last_updated_at)return null;{let e=new Date(this.json.last_updated_at),t=new Date(new Date().setHours(0,0,0,0)),s=new Date(new Date(e).setHours(0,0,0,0)),i=Math.ceil((t.getTime()-s.getTime())/864e5);return i>7?e.toLocaleDateString(void 0,{day:"numeric",month:"short",year:i>365?"numeric":void 0}):i>1?e.toLocaleDateString(void 0,{weekday:"short"}):e.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}}constructor(e,t){this.json=e,this.thisUserId=t,e.property&&(this.property=new M.Z(e.property)),e.conversation_users&&(e.conversation_users[0].last_message_sent_at?e.conversation_users[1].last_message_sent_at?new Date(e.conversation_users[0].last_message_sent_at).getTime()>
1new Date(e.conversation_users[1].last_message_sent_at).getTime()?this._lastMessage=e.conversation_users[0].last_message:this._lastMessage=e.conversation_users[1].last_message:this._lastMessage=e.conversation_users[0].last_message:this._lastMessage=e.conversation_users[1].last_message)}}let j={twilioClient:null,currentConversation:null},_={};function N(){return{headers:{Authorization:window.localStorage.getItem("soho-user-auth-token")}}}async function w(){let e=function(t,s){j.twilioClient=new m.KU(t),j.twilioClient.on("stateChanged",i=>{"initialized"===i?s("initialized"):["disconnected","denied"].includes(i)&&setTimeout(()=>{e(t,s)},500)})};return await new Promise(t=>{window.localStorage.getItem("soho-user-auth-token")?j.twilioClient?t("existing"):g().get("".concat("https://api.soho.com.au/api","/twilio/get_token?device_id=web"),N()).then(e=>e.data.data.access_token).catch(()=>null).then(s=>e(s,t)):(j.twilioClient&&(j.twilioClient.shutDown(),j.twilioClient=null),t("Not logged in"))})}async function x(e){}async function C(e){j.currentConversation&&(_.messageAdded&&j.currentConversation.off("messageAdded",_.messageAdded),_.typingStarted&&_.typingEnded&&(j.currentConversation.off("typingStarted",_.typingStarted),j.currentConversation.off("typingEnded",_.typingEnded)),_.messageRemoved&&j.currentConversation.off("messageRemoved",_.messageRemoved),_.updated&&j.currentConversation.off("updated",_.updated),_.participantUpdated&&j.currentConversation.off("participantUpdated",_.participantUpdated));let t=await j.twilioClient.getConversationBySid(e);return j.currentConversation=t,j.currentConversation}async function S(){j.currentConversation&&j.currentConversation.typing()}async function I(e){let{body:t,filename:s,type:i}=e;if(j.currentConversation){if("text"===i)return j.currentConversation.sendMessage(t,{localId:window.performance.now().toString()}).then(()=>!0).catch(e=>(console.error(e),!1));{let e=j.currentConversation.channelState.attributes.conversation.id,i="".concat("https://api.soho.com.au/api","/twilio/conversations/").concat(e,"/attachments"),n=new window.FormData;return n.append("file",t),n.append("original_filename",s),g().post(i,n,N()).then(()=>!0).catch(e=>(console.error(e),!1))}}}var b=s(48684),f=s.n(b);class D extends n.PureComponent{render(){return(0,i.jsx)("div",{className:f()["chats-header"],children:(0,i.jsx)("span",{className:f().title,children:"Messages"})})}}var T=s(6949),L=s.n(T),U=s(74620),z=s.n(U),A=s(24564),k=s(75774),P=s.n(k),E=s(45697),O=s.n(E);class Z extends n.PureComponent{render(){return this.props.isLoading?this.renderLoadingState():this.renderStandardState()}renderStandardState(){let e=this.props.conversation.otherUser(),t=!!this.props.conversation.property,s=d().bind(z());return(0,i.jsxs)("div",{"data-lastupdate":this.props.lastUpdate,className:s({"chat-list-item":!0,hoverable:!this.props.selected,selected:this.props.selected}),children:[(0,i.jsxs)("div",{className:s("avatar-container"),children:[(0,i.jsx)(A.Z,{small:!0,name:e.fullName(),text:e.initials(),image:e.avatar()}),this.props.otherUserOnlineStatus&&this.props.otherUserOnlineStatus.isOnline?(0,i.jsx)("img",{className:s("online"),src:P()}):null]}),(0,i.jsxs)("div",{className:s("text"),children:[(0,i.jsx)("div",{className:s("title"),children:t?this.props.conversation.property.fullAddress:e.fullName()}),t&&(0,i.jsx)("div",{className:s("users"),children:e.fullName()}),(0,i.jsx)("div",{className:s("subtitle"),children:this.props.conversation.lastMessage()})]}),(0,i.jsx)("div",{className:s("time"),children:this.props.conversation.lastUpdatedAt()})]})}renderLoadingState(){let e=d().bind(z());return(0,i.jsxs)("div",{className:e("chat-list-item","loading"),children:[(0,i.jsx)("div",{className:e("avatar","shimmer")}),(0,i.jsxs)("div",{className:e("text"),children:[(0,i.jsx)("div",{className:e("title","shimmer")}),(0,i.jsx)("div",{className:e("subtitle","shimmer")})]}),(0,i.jsx)("div",{className:e("time","shimmer")})]})}}Z.propTypes={isLoading:O().bool,chat:O().object,lastUpdate:O().object};var B=s(93842),H=s.n(B),Y=s(8436),Q=s.n(Y),R=s(93427),G=s.n(R);class J extends n.PureComponent{UNSAFE_componentWillReceiveProps(e){this.props.usePropsForValue&&this.setState({inputValue:e.value||"",isClearButtonShown:""!==e.value})}render(){return(0,i.jsxs)("div",{className:Q()["search-box"],children:[(0,i.jsx)("img",{className:Q()["search-icon"],src:H()}),(0,i.jsx)("input",{ref:this.searchbox,...this.props.inputFieldParams,value:this.state.inputValue,onChange:this.onInputValueChanged.bind(this),onBlur:this.onBlurTriggered.bind(this),onKeyDown:this.onKeyPressTriggered.bind(this),onKeyUp:this.onKeyUpTriggered.bind(this)}),this.state.isClearButtonShown?this.renderClearButton():null]})}renderClearButton(){return(0,i.jsx)("div",{className:Q()["clear-button"],onClick:this.onClearButtonClicked.bind(this),children:(0,i.jsx)("img",{className:Q()["clear-button-image"],src:G()})})}onKeyPressTriggered(e){13===e.keyCode&&(this.setState({inputValue:e.target.value,isClearButtonShown:!!e.target.value}),this.props.onKeyDown&&this.props.onKeyDown(e.target.value))}onKeyUpTriggered(e){this.setState({inputValue:e.target.value,isClearButtonShown:!!e.target.value}),this.props.onKeyUp&&this.props.onKeyUp(e.target.value)}onBlurTriggered(e){this.setState({inputValue:e.target.value,isClearButtonShown:!!e.target.value}),this.props.onBlur&&this.props.onBlur(e.target.value)}onInputValueChanged(e){this.setState({inputValue:e.target.value,isClearButtonShown:!!e.target.value}),this.props.onChange&&this.props.onChange(e.target.value)}onClearButtonClicked(){this.setState({inputValue:"",isClearButtonShown:!1}),this.searchbox.current.focus(),this.props.onChange&&this.props.onChange("")}constructor(e){super(e),this.searchbox=n.createRef(),this.state={inputValue:this.props.usePropsForValue?this.props.value:"",isClearButtonShown:!1}}}var W=s(11071),V=s.n(W);class F extends n.PureComponent{render(){return(0,i.jsx)("div",{className:V()["chats-search"],children:(0,i.jsx)(J,{inputFieldParams:{placeholder:"Search for conversations"},onChange:this.props.onChange})})}}var K=s(2372);class X extends n.PureComponent{componentDidMount(){var e;null===(e=this.list.current)||void 0===e||e.addEventListener("scroll",this._handleScroll)}handleScroll(e){let t=this.list.current;t.scrollTop+t.clientHeight>=t.scrollHeight&&this.props.onLoadMore()}componentWillUnmount(){var e;null===(e=this.list.current)||void 0===e||e.removeEventListener("scroll",this._handleScroll)}render(){let e=this.props.conversations;return e&&e.length||!this.props.loading?e&&e.length||!this.props.loading?0===e.length?this.renderEmptyState():this.renderStandardState(e):!this.props.loading&&this.props.error?this.renderErrorState():null:this.renderLoadingState()}renderStandardState(e){let t=(e=e.filter(e=>"string"!=typeof e.id)).filter(e=>e.otherUser().matches(this.state.chatsSearchQuery)||e.property&&e.property.fullAddress.toLowerCase().indexOf(this.state.chatsSearchQuery.toLowerCase())>-1).sort((e,t)=>
1new Date(e.json.last_updated_at)<new Date(t.json.last_updated_at)?1:-1).map((e,t)=>this.renderChatListItemContainer(e,t));return(0,i.jsxs)("div",{className:L()["chats-section"],children:[(0,i.jsx)(D,{onStartNewChatButtonClicked:this.props.onStartNewChatButtonClicked}),(0,i.jsxs)("div",{ref:this.list,className:L()["chats-list"],children:[(0,i.jsx)(F,{onChange:e=>{this.setState({chatsSearchQuery:e})}}),t]})]})}renderChatListItemContainer(e,t){let s=!!this.props.currentConversation&&e.id()===this.props.currentConversation.id();return(0,i.jsx)("div",{onClick:()=>this.props.onChatListItemClick(e),children:(0,i.jsx)(Z,{conversation:e,lastUpdate:this.props.lastUpdate,selected:s,otherUserOnlineStatus:s?this.props.otherUserOnlineStatus:null})},"chat-list-item-container-".concat(t))}renderLoadingState(){return(0,i.jsxs)("div",{className:L()["chats-section"],children:[(0,i.jsx)(D,{loading:!0}),(0,i.jsx)("div",{ref:this.list,className:L()["chats-list"],children:(0,i.jsx)(F,{onChange:e=>{this.setState({chatsSearchQuery:e})}})}),(0,i.jsx)("div",{className:L().loading,children:(0,i.jsx)(K.Z,{})})]})}renderEmptyState(){return window.innerWidth>=768?this.renderDesktopEmptyState():this.renderMobileEmptyState()}renderMobileEmptyState(){return(0,i.jsxs)("div",{className:L()["chats-section"],children:[(0,i.jsx)(D,{onStartNewChatButtonClicked:this.props.onStartNewChatButtonClicked}),(0,i.jsx)("div",{className:L()["empty-chats-list-container"],children:(0,i.jsxs)("div",{className:L().empty,children:[(0,i.jsx)("img",{className:L().image,src:"/_nextassets/messages/no-messages-placeholder.svg",alt:"No messages"}),(0,i.jsx)("span",{className:L().title,children:"No messages found"}),(0,i.jsx)("span",{className:L().message,children:"Start connecting by starting a conversation with your followers today!"}),(0,i.jsx)("span",{className:L()["start-a-conversation"],onClick:this.props.onStartNewChatButtonClicked,children:"+ Start a conversation"})]})})]})}renderDesktopEmptyState(){return(0,i.jsxs)("div",{className:L()["chats-section"],children:[(0,i.jsx)(D,{onStartNewChatButtonClicked:this.props.onStartNewChatButtonClicked}),(0,i.jsx)("div",{ref:this.list,className:L()["chats-list"]+" "+L().empty,children:"No messages found"})]})}renderErrorState(){return(0,i.jsx)("div",{className:L()["chats-section"],children:"Error"})}constructor(e){super(e),this._handleScroll=this.handleScroll.bind(this),this.list=n.createRef(),this.state={chatsSearchQuery:""}}}var $=s(94105),q=s.n($),ee=s(67205),et=s.n(ee),es=s(4674),ei=s.n(es),en=s(75994),ea=s(96357),eo=s(30983),er=s(41664),el=s.n(er);class ec extends n.PureComponent{render(){let e=d().bind(et()),t=this.props.currentConversation&&this.props.currentConversation.otherUser(),s=!!(this.props.currentConversation&&this.props.currentConversation.property);return(0,i.jsxs)("div",{className:e("chat-header"),children:[(0,i.jsx)("img",{className:e("back-arrow"),src:ei(),onClick:this.props.onBackClick}),t&&(0,i.jsxs)("div",{className:e("avatar-container"),children:[(0,i.jsx)(A.Z,{small:!0,name:t.fullName(),text:t.initials(),image:t.avatar(),url:t.profileUrl(),eager:!0}),this.props.isOtherUserOnline?(0,i.jsx)("img",{className:e("online"),src:P()}):null]}),(0,i.jsxs)("div",{className:e("text"),children:[t&&(0,i.jsx)("div",{className:e("title"),children:(0,i.jsx)(el(),{legacyBehavior:!0,href:s?"/properties/"+this.props.currentConversation.property.slug:t.profileUrl(),children:(0,i.jsx)("a",{children:s?this.props.currentConversation.property.fullAddress:t.fullName()})})}),t&&s&&(0,i.jsx)(el(),{legacyBehavior:!0,href:t.profileUrl(),children:(0,i.jsx)("a",{className:e("users"),children:t.fullName()})}),t&&this.props.isOtherUserOnline?(0,i.jsx)("div",{className:e("subtitle"),children:"online now"}):(0,i.jsx)("div",{className:e("subtitle"),children:this.renderLastSeenAt()})]}),this.props.loading&&(0,i.jsx)("div",{className:e("loader"),children:(0,i.jsx)(eo.Z,{green:!0})}),this.state.isMenuTooltipOpen?(0,i.jsx)("div",{className:e("menu-tooltip"),onClick:this.onLeaveConversationClick.bind(this),children:(0,i.jsx)("div",{id:"leave-conversation-button",children:"Leave Conversation"})}):null,this.state.isLeaveConfirmationPopupShown?this.renderConfirmationPopup():null]})}componentDidMount(){document.body.onclick=e=>("leave-conversation-button"!==e.target.id&&"chat-header-menu-button"!==e.target.id&&"chat-header-ellipsis-image"!==e.target.id&&this.setState({isMenuTooltipOpen:!1}),!0)}toggleMenuTooltipVisibility(){this.setState({isMenuTooltipOpen:!this.state.isMenuTooltipOpen})}renderLastSeenAt(){if(!this.props.otherUserLastSeenAt)return null;{let e=en.Z.getString(new Date(this.props.otherUserLastSeenAt));return"last seen ".concat(e.replace("Just now","recently"))}}onLeaveConversationClick(){this.setState({isLeaveConfirmationPopupShown:!0,isMenuTooltipOpen:!1})}renderConfirmationPopup(){let e=d().bind(et());return(0,i.jsx)("div",{className:e("leave-confirmation-popup"),children:(0,i.jsxs)(ea.Z,{visible:!0,closeable:!1,
1children:[(0,i.jsxs)("div",{className:e("text"),children:[(0,i.jsx)("div",{className:e("title"),children:"Leave Conversation?"}),(0,i.jsx)("div",{className:e("description"),children:"This will permanently delete your conversation history"})]}),(0,i.jsxs)("div",{className:e("buttons"),children:[this.renderCancelButton(),this.renderLeaveButton()]})]})})}renderCancelButton(){let e=d().bind(et());return this.state.isLeavingConversation?(0,i.jsx)("div",{className:e("cancel"),children:"Cancel"}):(0,i.jsx)("div",{className:e("cancel"),onClick:()=>this.setState({isLeaveConfirmationPopupShown:!1,isMenuTooltipOpen:!1}),children:"Cancel"})}renderLeaveButton(){let e=d().bind(et());return this.state.isLeavingConversation?(0,i.jsx)("div",{className:e("leave","loading"),children:(0,i.jsx)(eo.Z,{})}):(0,i.jsx)("div",{className:e("leave"),onClick:this.onLeaveChat.bind(this),children:"Leave"})}onLeaveChat(){!function(e){let t="".concat("https://api.soho.com.au/api","/twilio/conversations?chat_type=user&resource_id=").concat(e);g().delete(t,N()).then(()=>!0).catch(()=>!1)}(this.props.currentConversation.otherUser().id()),this.setState({isMenuTooltipOpen:!1,isLeaveConfirmationPopupShown:!1})}constructor(e){super(e),this.state={isMenuTooltipOpen:!1,isLeaveConfirmationPopupShown:!1,isLeavingConversation:!1}}}var ed=s(5182),eh=s.n(ed),ep=s(16103),eu=s.n(ep),eg=s(78338),em=s(83107),ev=s.n(em),eM=s(30966),ey=s(97891),ej=s.n(ey);class e_ extends n.PureComponent{render(){let e=this.props.url&&this.props.url.match(/^https?:\/\/(?:(?:www\.|m\.)?youtube.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([^&?]+)/i),t=this.props.url&&this.props.url.match(/^https?:\/\/(?:(?:www\.|player\.)?vimeo.com\/.+)\/([0-9]{5,})$/i),s=this.props.image&&this.props.image.match(/^http:\/\//i)?"https://httpproxy.sohoapp.workers.dev/"+this.props.image.substr(7):this.props.image,n=e||t,a=e?"https://www.youtube.com/embed/"+e[1]+"?showinfo=0"+(this.props.autoplay?"&autoplay=1&playsinline=1&mute=1":""):t?"https://player.vimeo.com/video/"+t[1]+"?byline=0&portrait=0&title=0&transparent=0&color=0AC2AE"+(this.props.autoplay?"&autoplay=1&playsinline=1&muted=1":""):this.props.url,o=d().bind(ej());return(0,i.jsxs)("a",{href:this.props.url,target:"_blank",rel:"noopener nofollow noreferrer",className:o("post-linkpreview"),title:"Open "+this.props.url+" in new window",children:[n&&(0,i.jsx)("div",{className:o("post-linkpreview-image"),children:(0,i.jsx)("iframe",{src:a,height:"280",width:"100%",frameBorder:"0",allow:"autoplay encrypted-media",allowFullScreen:!0,loading:"lazy"})}),this.props.image&&!n&&(0,i.jsx)("img",{loading:"lazy",className:o("post-linkpreview-image"),referrerPolicy:"noreferrer",src:s,onError:e=>{e.target.style.display="none"}}),this.props.url?(0,i.jsxs)("div",{className:o("post-linkpreview-summary"),children:[this.props.onRemove&&(0,i.jsx)("button",{title:"Remove this link preview",className:o("post-linkpreview-close"),onClick:e=>{this.props.onRemove(),e.preventDefault()},children:String.fromCharCode(10005)}),(0,i.jsx)("span",{children:this.props.url.replace(/^https?:\/\/(www\.)?/i,"").replace(/(\/|\?|).*/,"")}),(0,i.jsx)("h3",{children:this.props.title}),(0,i.jsx)("p",{children:this.props.description})]}):(0,i.jsx)("div",{className:o("post-linkpreview-loading")})]})}}e_.propTypes={url:O().string,title:O().string,description:O().string,image:O().string,onRemove:O().func,autoplay:O().bool};class eN extends n.PureComponent{render(){let e="message-".concat(this.props.message.sid()),t="message-content-".concat(this.props.message.sid()),s=d().bind(eu());return(0,i.jsxs)("div",{id:e,className:s(this.props.message.who,"message"),children:[this.props.message.isAvatarShown?this.renderAvatar():null,(0,i.jsx)("div",{className:s("message-content-container"),id:t,children:(0,i.jsxs)("div",{className:s(this.props.message.who,"message-content","type-".concat(this.props.message.type())),onClick:this.onMessageContentClick.bind(this),children:[this.renderMessageContent(),"system"!==this.props.message.type()&&(0,i.jsxs)("div",{className:s("footer"),children:[(0,i.jsx)("div",{className:s("time"),children:this.props.message.timestamp()}),"you"===this.props.message.who?this.renderStatus():null]}),this.state.openGraph&&(0,i.jsx)("div",{className:s("message-og"),children:(0,i.jsx)(e_,{...this.state.openGraph})})]})}),"you"===this.props.message.who?window.innerWidth>768?this.renderDesktopMenu():"image"===this.props.message.type()?null:this.renderMobileMenu():null,this.state.isDeleteConfirmationPopupShown?this.renderDeleteConfirmationPopup():null]})}onMessageContentClick(){window.innerWidth<=768&&this.toggleMenuTooltipVisibility()}renderDesktopMenu(){let e="menu-".concat(this.props.message.sid());return(0,i.jsxs)("div",{className:eu()["desktop-menu"],children:[(0,i.jsx)("div",{className:eu()["menu-button"],id:e,onClick:this.toggleMenuTooltipVisibility.bind(this),children:(0,i.jsx)("img",{src:ev()})}),this.state.isMenuTooltipOpen&&this.renderMenuTooltip(e)]})}componentDidMount(){let e=this.props.message.text();if(e){let t=e.match(/((https?:\/\/|www\.).+?)(\.|,|\?|!)?(\s|$)/i);t&&(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t={headers:{Authorization:window.localStorage.getItem("soho-user-auth-token")}},s="".concat("https://api.soho.com.au/api","/utility/og_hybrid_graph?url=").concat(e);return g().get(s,t).then(e=>{if(e.error)throw e.error;return e.data.data})})(0!==t[1].indexOf("http")?"https://"+t[1]:t[1]).then(e=>{this.setState({openGraph:e}),this.props.scrollToBottom()}).catch(e=>{this.setState({openGraph:null})})}}renderMobileMenu(){let e="message-content-".concat(this.props.message.sid());return(0,i.jsx)("div",{className:eu()["mobile-menu"],children:this.state.isMenuTooltipOpen?this.renderMenuTooltip(e):null})}toggleMenuTooltipVisibility(){this.setState({isMenuTooltipOpen:!this.state.isMenuTooltipOpen})}
1renderMenuTooltip(e){return(0,i.jsx)(eM.Z,{placement:"top",isOpen:!0,autohide:!0,target:e,container:e,toggle:this.toggleMenuTooltipVisibility.bind(this),children:(0,i.jsx)("div",{role:"button",onClick:()=>this.setState({isMenuTooltipOpen:!1,isDeleteConfirmationPopupShown:!0}),children:"Delete"})})}deleteMessage(){this.setState({isDeleteConfirmationPopupShown:!1}),this.props.deleteMessage(this.props.message.sid())}renderDeleteConfirmationPopup(){return(0,i.jsx)("div",{className:eu()["delete-confirmation-popup"],children:(0,i.jsxs)(ea.Z,{visible:!0,hideHeader:!0,closeable:!1,children:[(0,i.jsxs)("div",{className:eu().text,children:[(0,i.jsx)("div",{className:eu().title,children:"Delete Message?"}),(0,i.jsx)("div",{className:eu().description,children:"This message will be permanently deleted from your conversation"})]}),(0,i.jsxs)("div",{className:eu().buttons,children:[(0,i.jsx)("div",{role:"button",className:eu().cancel,onClick:()=>this.setState({isDeleteConfirmationPopupShown:!1}),children:"Cancel"}),(0,i.jsx)("div",{role:"button",className:eu().delete,onClick:this.deleteMessage.bind(this),children:"Delete"})]})]})})}renderStatus(){return null}renderAvatar(){return"you"===this.props.message.who?(0,i.jsx)("div",{className:eu().avatar,children:(0,i.jsx)(A.Z,{tiny:!0,text:this.props.chat.thisUser().initials(),name:this.props.chat.thisUser().fullName(),image:this.props.chat.thisUser().avatar()})}):"other"===this.props.message.who?(0,i.jsx)("div",{className:eu().avatar,children:(0,i.jsx)(A.Z,{tiny:!0,text:this.props.chat.otherUser().initials(),name:this.props.chat.otherUser().fullName(),image:this.props.chat.otherUser().avatar()})}):null}renderMessageContent(){return"text"===this.props.message.type()?(0,i.jsx)("div",{className:eu().text,dangerouslySetInnerHTML:{__html:(0,eg.dG)(this.props.message.text())}}):"image"===this.props.message.type()?(0,i.jsx)("div",{className:eu().image,onClick:this.onMessageImageClick.bind(this),children:(0,i.jsx)("img",{loading:"lazy",src:this.props.message.imageUrl(),onLoad:this.onImageLoaded.bind(this)})}):"system"===this.props.message.type()?this.props.children:null}onImageLoaded(){let e=document.getElementById("messages-list");e.scrollTop=e.scrollHeight}onMessageImageClick(){this.props.onMessageImageClick(this.props.message)}constructor(e){super(e),this.state={openGraph:null,isMenuTooltipOpen:!1,isDeleteConfirmationPopupShown:!1}}}class ew extends n.PureComponent{render(){for(let e=0;e<this.props.messages.length;e++){let t=this.props.messages[e],s=this.props.messages[e-1];t&&e===this.props.messages.length-1&&t.setIsAvatarShown(!0),s&&t.who!==s.who?s.setIsAvatarShown(!0):s&&s.json.dateUpdated&&t.json.dateUpdated&&t.json.dateUpdated.getDate()!==s.json.dateUpdated.getDate()&&s.setIsAvatarShown(!0)}let e=[],t=this.props.messages.reduce((e,t)=>{let s=t.date();return e[s]||(e[s]=[]),e[s].push(t),e},{});for(let s in t){let i=this.renderStickyDateHeader(s),n=t[s].map((e,t)=>this.renderMessage(e,"".concat(s,"-").concat(t)));e.push(i),e=e.concat(n)}return(0,i.jsx)("div",{className:eh()["messages-list"],id:"messages-list",children:(0,i.jsxs)("div",{className:eh()["messages-list-box"],children:[(0,i.jsx)("div",{children:e}),(0,i.jsx)("div",{children:this.props.children})]})})}renderMessage(e,t){return(0,i.jsx)(eN,{message:e,chat:this.props.selectedChat,onMessageImageClick:this.props.onMessageImageClick,deleteMessage:this.props.deleteMessage,scrollToBottom:this.scrollToBottom.bind(this),readStatus:e.json.index<=this.props.lastReadMessageIndex},"message-".concat(t))}componentDidMount(){this.scrollToBottom(),this._scoll=this.scroll.bind(this),document.getElementById("messages-list").addEventListener("scroll",this._scoll)}renderStickyDateHeader(e){return(0,i.jsx)("div",{className:eh()["sticky-date-header"],children:e},e)}componentDidUpdate(e){var t;let s=e.messages.length&&this.props.messages.length&&e.messages[e.messages.length-1].sid()!==this.props.messages[this.props.messages.length-1].sid();(null===(t=e.messages)||void 0===t?void 0:t.length)&&!s?e.messages.length<this.props.messages.length&&this.scrollToBottom(!1,!0):this.scrollToBottom(s)}componentWillUnmount(){document.getElementById("messages-list").removeEventListener("scroll",this._scoll)}scroll(e){0===e.target.scrollTop&&this.props.onLoadPreviousMessages()}scrollToBottom(e,t){let s=document.getElementById("messages-list"),i=t?s.scrollHeight-this.scrollHeight:s.scrollHeight-s.offsetHeight;this.scrollHeight=s.scrollHeight;let n=s.scrollTop;if(e){let e=(i-n)/5,t=n,a=window.setInterval(()=>{t+=e},16.666666666666668),o=()=>{s.scrollTop=t,t>=i?clearTimeout(a):window.requestAnimationFrame(o)};window.requestAnimationFrame(o)}else s.scrollTop=i;this.props.onMessagesRead()}}
1var ex=s(12221),eC=s.n(ex),eS=s(33704),eI=s.n(eS),eb=s(35334),ef=s.n(eb);class eD extends n.PureComponent{render(){let e="*";return this.props.accept&&this.props.accept instanceof Array&&this.props.accept.includes("images")&&(e="image/*"),(0,i.jsxs)("div",{className:ef().uploader,onClick:()=>{document.getElementById("uploader-input").click()},children:[(0,i.jsx)("input",{id:"uploader-input",disabled:this.props.disabled,type:"file",accept:e,ref:this.input,onChange:this.props.onFileUploaded.bind(this)}),this.props.children]})}constructor(e){super(e),this.input=n.createRef()}}eD.propTypes={onFileUploaded:O().func.isRequired,disabled:O().bool};var eT=s(54042);class eL extends n.PureComponent{componentDidUpdate(e){this.props.disabled||e.disabled===this.props.disabled||document.getElementById("message-input-element").focus(),this.props.selectedChat&&this.props.selectedChat.json.channel_unique_name!==e.selectedChat.json.channel_unique_name&&""!==this.state.message&&this.setState({message:""})}render(){return(0,i.jsxs)("div",{className:eC()["message-input"],onKeyDown:this.handleKeyDown.bind(this),children:[(0,i.jsx)(eT.Z,{tabIndex:1,disabled:this.props.disabled,name:"input-element",type:"text",id:"message-input-element",value:this.state.message,placeholder:"Type your message here...",autoComplete:"off",onChange:this.onMessageTextChange.bind(this),maxRows:20}),this.renderSendButton(),this.props.toFollower&&(0,i.jsx)("div",{className:eC()["media-upload-buttons"],children:(0,i.jsx)(eD,{disabled:this.props.disabled||!this.props.toFollower,accept:["images"],onFileUploaded:this.onFileUploaded.bind(this),children:(0,i.jsx)("img",{className:eC()["upload-image-button"],src:eI(),tabIndex:3})})})]})}onMessageTextChange(e){this.setState({message:e.target.value}),S()}renderSendButton(){return this.state.message?(0,i.jsx)("div",{className:eC()["send-button"],tabIndex:2,onClick:this.onSendMessage.bind(this),children:"Send"}):null}onSendMessage(){let e=this.state.message.trim();e&&(this.props.sendMessage(e),this.setState({message:""})),document.getElementById("message-input-element").focus(),document.getElementById("message-input-element").style.height="auto"}onFileUploaded(e){let t=e.target.files[0];this.props.sendMessage(t)}handleKeyDown(e){"send-button"===document.activeElement.id&&this.onSendMessage()}constructor(e){super(e),this.state={message:""}}}var eU=s(65032),ez=s.n(eU);class eA extends n.PureComponent{render(){let e=d().bind(ez());return(0,i.jsxs)("div",{className:e("typing-status",{"typing-status-visible":this.props.isShown}),children:[this.props.otherUserName," is typing..."]})}}var ek=s(92879);s(1790);var eP=s(70571),eE=s.n(eP),eO=s(38117),eZ=s.n(eO),eB=s(633);class eH extends n.PureComponent{UNSAFE_componentWillReceiveProps(e){this.setState({currentSelectedMessage:e.currentSelectedMessage})}render(){let e=this.props.messages.map(e=>e.imageUrl()),t=this.props.messages.filter(e=>e.sid()===this.state.currentSelectedMessage.sid())[0].imageUrl(),s=e.indexOf(t),n=(s+this.props.messages.length-1)%this.props.messages.length,a=this.props.messages.filter(t=>t.imageUrl()===e[n])[0],o=(s+1)%this.props.messages.length,r=this.props.messages.filter(t=>t.imageUrl()===e[o])[0];return(0,i.jsxs)("div",{className:eE()["photo-gallery"],children:[(0,i.jsx)(ek.Z,{enableZoom:!1,toolbarButtons:[this.renderDeleteMenuOption()],mainSrc:e[s],nextSrc:e[(s+1)%e.length],prevSrc:e[(s+e.length-1)%e.length],onMovePrevRequest:()=>this.setState({currentSelectedMessage:a}),onMoveNextRequest:()=>this.setState({currentSelectedMessage:r}),onCloseRequest:this.props.onClose}),this.state.isDeleteConfirmationPopupShown?this.renderDeleteConfirmationPopup():null]})}renderDeleteMenuOption(){return"you"===this.state.currentSelectedMessage.who?(0,i.jsx)("div",{className:eE()["photo-gallery-delete-image-button"],onClick:()=>this.setState({isDeleteConfirmationPopupShown:!0}),children:(0,i.jsx)("img",{src:eZ()})}):null}renderDeleteConfirmationPopup(){return(0,i.jsx)("div",{className:eE()["delete-confirmation-popup"],children:(0,i.jsxs)(ea.Z,{visible:!0,closeable:!1,children:[(0,i.jsxs)("div",{className:eE().text,children:[(0,i.jsx)("div",{className:eE().title,children:"Delete Message?"}),(0,i.jsx)("div",{className:eE().description,children:"This message will be permanently deleted from your conversation"})]}),(0,i.jsxs)("div",{className:eE().buttons,children:[(0,i.jsx)("div",{className:eE().cancel,onClick:()=>this.setState({isDeleteConfirmationPopupShown:!1}),children:"Cancel"}),(0,i.jsx)("div",{className:eE().delete,onClick:()=>this.props.onDelete(this.props.currentSelectedMessage.sid()),children:"Delete"})]})]})})}constructor(e){super(e),this.state={currentSelectedMessage:this.props.currentSelectedMessage,isDeleteConfirmationPopupShown:!1}}}eH.propTypes={messages:O().arrayOf(O().instanceOf(eB.Z))};class eY extends n.PureComponent{componentDidMount(){var e;null===(e=this.props.userProfile)||void 0===e||e.json.id}componentDidUpdate(e){var t,s,i,n;(null===(t=e.currentConversation)||void 0===t?void 0:t.channelSid())!==(null===(s=this.props.currentConversation)||void 0===s?void 0:s.channelSid())?this.loadMessages().then(e=>{this.subscribeConversationEvents(e)}):(null===(i=e.userProfile)||void 0===i||i.json.id,null===(n=this.props.userProfile)||void 0===n||n.json.id)}componentWillUnmount(){clearInterval(this._subscriptionInterval)}async trackVisibility(e){if(e){let t=await e.getParticipantByIdentity("user-"+this.props.userProfile.json.id);t&&(t.updateAttributes({lastOnline:new Date().toISOString()}),this._subscriptionInterval=setInterval(()=>{"visible"===document.visibilityState&&t.updateAttributes({lastOnline:new Date().toISOString()})},6e4))}}loadTwilio(){w().then(e=>{"Not logged in"===e?setTimeout(()=>document.getElementById("action-login").click(),300):this.loadMessages().then(()=>{this.subscribeConversationEvents()})})}async loadMessages(){let e=this.props.currentConversation&&this.props.currentConversation.isNew();if(this.setState({loadedMessagePage:0,loadingMessages:!e,loadedAllMessages:!1,messages:[]}),this.props.currentConversation&&!e){var t,s;let e=await C(this.props.currentConversation.channelSid());
1this.paginator=await e.getMessages();let i=null!==(s=null===(t=e.channelState)||void 0===t?void 0:t.lastReadMessageIndex)&&void 0!==s?s:null;return this.paginator.items.length&&(i=this.paginator.items[this.paginator.items.length-1].index),this.setState({loadedMessagePage:1,loadingMessages:!1,lastReadMessageIndex:i,messages:this.paginator.items.map(e=>{var t;return new eB.Z(e,null===(t=this.props.userProfile)||void 0===t?void 0:t.json.id)}),loadedAllMessages:!this.paginator.hasPrevPage}),e}}async loadMoreMessages(){var e;(null===(e=this.paginator)||void 0===e?void 0:e.hasPrevPage)&&(this.setState({loadingMessages:!0}),this.paginator=await this.paginator.prevPage(),this.setState({loadedMessagePage:this.state.loadedMessagePage+1,loadingMessages:!1,messages:this.paginator.items.map(e=>{var t;return new eB.Z(e,null===(t=this.props.userProfile)||void 0===t?void 0:t.json.id)}).concat(this.state.messages),loadedAllMessages:!this.paginator.hasPrevPage}))}subscribeConversationEvents(e){!function(e){let{messageAdded:t,typingStarted:s,typingEnded:i,messageRemoved:n,updated:a,participantUpdated:o}=e;j.currentConversation&&(t&&(_.messageAdded=e=>{e.conversation.sid===j.currentConversation.sid&&t(e)},j.currentConversation.on("messageAdded",_.messageAdded)),s&&i&&(_.typingStarted=e=>{e.conversation.sid===j.currentConversation.sid&&s(!0)},_.typingEnded=e=>{e.conversation.sid===j.currentConversation.sid&&i(!1)},j.currentConversation.on("typingStarted",_.typingStarted),j.currentConversation.on("typingEnded",_.typingEnded)),n&&(_.messageRemoved=e=>{e.conversation.sid===j.currentConversation.sid&&n(e)},j.currentConversation.on("messageRemoved",_.messageRemoved)),a&&(_.updated=e=>{e.conversation.sid===j.currentConversation.sid&&a(e)},j.currentConversation.on("updated",_.updated)),o&&(_.participantUpdated=e=>{e.conversation.sid===j.currentConversation.sid&&a(e)},j.currentConversation.on("participantUpdated",_.participantUpdated)))}({typingStarted:()=>this.setState({isOtherUserTyping:!0}),typingEnded:()=>this.setState({isOtherUserTyping:!1}),messageAdded:e=>{let t=this.props.userProfile.json.id,s=this.state.messages.map(e=>e);s.push(new eB.Z(e,t)),this.setState({messages:s})},messageRemoved:e=>{this.setState({messages:this.state.messages.filter(t=>t.sid()!==e.sid)})}})}listenToTwilio(){}render(){return this.props.isModal?(0,i.jsx)("span",{className:q()["messaging-section-popup"],children:(0,i.jsx)(ea.Z,{hideHeader:!0,visible:this.props.isOpen,dontHandlePushState:!this.props.dontHandlePushState,onClose:this.props.onClose,children:this.renderBasedOnProps()})}):this.renderBasedOnProps()}renderBasedOnProps(){return this.props.currentConversation&&this.state.loadingMessages?this.renderContent(!this.props.currentConversation.isNew()):this.state.loadingMessages?0!==this.state.loadedMessagePage||this.state.loadingMessages?this.renderEmptyState():this.renderFailedState():this.renderContent()}renderContent(e){return(0,i.jsxs)("div",{className:q()["messaging-section"],children:[(0,i.jsx)(ec,{currentConversation:this.props.currentConversation,onBackClick:this.props.onClose,otherUserOnlineStatus:this.state.otherUserOnlineStatus,otherUserLastSeenAt:this.state.otherUserLastSeenAt,chatLeaveState:this.props.chatLeaveState,hideLeaveCurrentChat:this.props.currentConversation.isNew(),loading:e,onLeaveCurrentChat:this.onLeaveCurrentChat.bind(this)}),(0,i.jsx)(ew,{selectedChat:this.props.currentConversation,messages:this.state.messages,lastReadMessageIndex:this.state.lastReadMessageIndex,onLoadPreviousMessages:this.loadMoreMessages.bind(this),onMessagesRead:this.onMessagesRead.bind(this),deleteMessage:this.deleteMessage.bind(this),onMessageImageClick:this.onMessageImageClick.bind(this),children:!this.state.firstMessageSent&&this.props.children}),this.props.currentConversation&&(0,i.jsx)(eA,{isShown:this.state.isOtherUserTyping,otherUserName:this.props.currentConversation.otherUser().singleWordName()}),this.renderDefaultMessageInput(e)]})}renderDefaultMessageInput(e){return(0,i.jsxs)("div",{className:q()["message-input-holder"],children:[(0,i.jsx)(eL,{disabled:e||this.props.disableMessageInput,toFollower:this.otherUserFollowsUser(),sendMessage:this.sendMessage.bind(this),selectedChat:this.props.currentConversation}),this.state.isPhotoGalleryOpen&&(0,i.jsx)(eH,{messages:this.state.messages.filter(e=>!!e.imageUrl()),currentSelectedMessage:this.state.currentSelectedMessage,onDelete:this.deleteMessage.bind(this),onClose:()=>this.setState({isPhotoGalleryOpen:!1})})]})}otherUserFollowsUser(){let e=this.props.currentConversation.otherUser().id();return this.props.userProfile.json.follower_ids.includes(e)}renderEmptyState(){return(0,i.jsx)("div",{className:q()["messaging-section"],children:(0,i.jsxs)("div",{className:q().empty,children:[(0,i.jsx)("img",{className:q().image,src:"/_nextassets/messages/no-messages-placeholder.svg",alt:"No messages"}),(0,i.jsx)("span",{className:q().title,children:"Start a conversation"}),this.props.onStartChat&&(0,i.jsx)("span",{className:q().message,children:"Connect with your followers through Soho Messages!"}),this.props.onStartChat&&(0,i.jsx)("span",{className:q()["start-a-conversation"],onClick:this.props.onStartChat,children:"+ Start a conversation"})]})})}renderFailedState(){return(0,i.jsx)("div",{className:q()["messaging-section"],children:(0,i.jsx)("div",{className:q()["failed-state"],children:"Something went wrong, please try again."})})}async sendMessage(e){if(this.props.currentConversation){if(this.props.currentConversation.isNew()){let e=await function(e){let t="".concat("https://api.soho.com.au/api","/twilio/conversations?chat_type=user&resource_id=").concat(e);return g().get(t,{headers:{Authorization:window.localStorage.getItem("soho-user-auth-token")}})}(this.props.currentConversation.otherUser().id());await x(e.channel_name)}I({body:e,type:e instanceof window.File?"file":"text",filename:e instanceof window.File?e.name:null})}}onMessagesRead(){}deleteMessage(e){this.setState({isPhotoGalleryOpen:!1}),this.state.messages.find(t=>t.sid()===e).twilioObject.remove()}onLeaveCurrentChat(){this.props.isModal&&this.props.onClose()}onMessageImageClick(e){this.setState({isPhotoGalleryOpen:!0,currentSelectedMessage:e})}constructor(e){super(e),this.state={loadedMessagePage:0,loadingMessages:!0,loadedAllMessages:!1,messages:[],isOtherUserOnline:!1,otherUserLastSeenAt:null,lastReadMessageIndex:null,isOtherUserTyping:!1,isPhotoGalleryOpen:!1,currentMessage:null,firstMessageSent:!1,messageBucket:null}}}var eQ=s(99147),eR=s.n(eQ),eG=s(46979),eJ=s.n(eG);class eW extends n.PureComponent{render(){return this.props.loading?this.renderLoadingState():this.renderStandardState()}renderStandardState(){return(0,i.jsxs)("div",{className:eJ()["follower-list-item"],children:[(0,i.jsx)(A.Z,{small:!0,name:this.props.follower.fullName(),text:this.props.follower.initials(),image:this.props.follower.avatar()}),(0,i.jsx)("div",{className:eJ().center,children:(0,i.jsx)("div",{className:eJ().name,children:this.props.follower.fullName()})}),this.renderMessageNowButton()]})}renderMessageNowButton(){let e=d().bind(eJ());return this.props.isStartingConvo?(0,i.jsx)("div",{className:e("message-now","start-convo"),children:(0,i.jsx)(K.Z,{size:32})}):this.props.disabled?(0,i.jsx)("div",{className:e("message-now","disabled"),children:(0,i.jsx)("span",{children:"Message"})}):this.props.isInConvo?(0,i.jsx)("div",{className:e("go-to-chat","standard"),onClick:()=>this.props.onSelectConversation(this.props.follower),children:(0,i.jsx)("span",{children:"Go to Chat"})}):(0,i.jsx)("div",{className:e("message-now","standard"),onClick:()=>this.props.onMessageNowClick(this.props.follower),children:(0,i.jsx)("span",{children:"Message"})})}
1renderLoadingState(){let e=d().bind(eJ());return(0,i.jsxs)("div",{className:e("follower-list-item","loading"),children:[(0,i.jsx)("div",{className:e("avatar","shimmer")}),(0,i.jsxs)("div",{className:e("center"),children:[(0,i.jsx)("div",{className:e("name","shimmer")}),(0,i.jsx)("div",{className:e("online-status","shimmer")})]})]})}}var eV=s(92858);class eF extends n.PureComponent{componentDidMount(){this.retrieveFollowers()}retrieveFollowers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";!this.state.loading&&(this.state.searchQuery!==e?this.setState({followers:[],page:0,loading:!0,searchQuery:e}):30*this.state.page<=this.state.followers.length&&this.setState({loading:!0}))}handleScroll(e){e.target.scrollTop>=e.target.scrollHeight-1.5*e.target.offsetHeight&&this.retrieveFollowers(this.state.searchQuery)}render(){return(0,i.jsx)("div",{className:eR()["new-chat-popup"],children:(0,i.jsxs)(ea.Z,{onScroll:this.handleScroll.bind(this),visible:this.props.visible,closeable:!0,title:"New Message",onClose:this.onClose.bind(this),children:[(0,i.jsx)("div",{className:eR()["search-followers-container"],children:(0,i.jsx)(J,{inputFieldParams:{placeholder:"Search followers"},onChange:e=>this.handleSearch(e)})}),!!this.state.followers&&!this.state.loading&&this.renderFollowersList(),this.state.loading&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eW,{loading:!0}),(0,i.jsx)(eW,{loading:!0}),(0,i.jsx)(eW,{loading:!0})]})]})})}onClose(){this.props.onClose()}renderFollowersList(){let e=this.state.followers.filter(e=>e.matches(this.state.searchQuery));if(0===e.length)return this.state.searchQuery.length>0?(0,i.jsx)("div",{className:eR()["empty-state"],children:"No matches. Please widen you search."}):(0,i.jsx)("div",{className:eR()["empty-state"],children:"Other people have to start following you before you can contact them here."});{var t;let s=null===(t=this.props.conversations)||void 0===t?void 0:t.map(e=>e.otherUser().id());return e.map((e,t)=>(0,i.jsx)(eW,{follower:e,isInConvo:s.includes(e.id()),onSelectConversation:this.onSelectConversation.bind(this),onMessageNowClick:this.onMessageNowClick.bind(this)},"follower-list-item-".concat(t)))}}onMessageNowClick(e){this.props.onMessageNowClick(e)}onSelectConversation(e){var t;let s=null===(t=this.props.conversations)||void 0===t?void 0:t.filter(t=>t.otherUser().id()===e.id())[0];this.props.onSelectConversation(s)}constructor(e){super(e),this.state={searchQuery:"",loading:!1,followers:[],page:0,error:null},this.handleSearch=(0,eV.Z)(this.retrieveFollowers.bind(this),200)}}class eK extends n.PureComponent{componentDidMount(){if(!window.localStorage.getItem("soho-user-auth-token")){p().replace("/");return}this.setState({authReady:!0}),this.loadConversations(),this.loadTwilio()}loadTwilio(){w().then(e=>{"Not logged in"!==e&&function(e){let{updated:t,conversationAdded:s,conversationRemoved:i}=e;t&&j.twilioClient.on("conversationUpdated",t),s&&j.twilioClient.on("conversationJoined",s),i&&j.twilioClient.on("conversationLeft",i)}({updated:e=>{var t;if(null===(t=e.updateReasons)||void 0===t?void 0:t.includes("lastMessage")){let t=e.conversation.messagesEntity.messagesByIndex.get(e.conversation.channelState.lastMessage.index);if(t){let e=this.state.conversations.map(e=>(e.channelSid()===t.conversation.sid&&e.setLastMessage(t),e));this.setState({lastUpdate:t.state.dateUpdated,conversations:e}),this.forceUpdate()}}}})})}componentDidUpdate(e){var t,s,i;if((null===(t=e.userProfile)||void 0===t?void 0:t.json.id)!==(null===(s=this.props.userProfile)||void 0===s?void 0:s.json.id)){if(!(null===(i=this.props.userProfile)||void 0===i?void 0:i.json.id)){this.setState({loggedOut:!0,loadConversationPage:0,loadingConversations:!0,loadedAllConversations:!1,conversations:[],lastUpdate:new Date});return}this.setState({loadConversationPage:0,loadingConversations:!0,loadedAllConversations:!1,conversations:[],lastUpdate:new Date}),this.loadConversations(),this.loadTwilio()}}loadConversations(){var e;if(!(null===(e=this.props.userProfile)||void 0===e?void 0:e.json.id))return;let t=this.state.loadedConversationPage+1;(function(e,t){let s="".concat("https://api.soho.com.au/api","/twilio/conversations/all?page=").concat(e||1);return g().get(s,N()).then(e=>{var s;return((null===(s=e.data.data)||void 0===s?void 0:s.filter(e=>e.conversation_users.length>=2))||[]).map(e=>y.fromJson(e,t))}).catch(()=>null)})(t,this.props.userProfile.json.id).then(e=>{e&&this.setState({conversations:this.state.conversations.concat(e),loadedConversationPage:t,loadingConversations:!1,loadedAllConversations:(null==e?void 0:e.length)===0})})}closeMessagingSectionPopup(){this.setState({isMessagingSectionOpen:!1})}startNewChat(){this.setState({isNewChatPopupVisible:!0})}closeNewChatPopup(){this.setState({isNewChatPopupVisible:!1})}changeCurrentConversation(e){this.setState({isNewChatPopupVisible:!1,isMessagingSectionOpen:!0,currentConversation:e}),e.channelSid()}onMessageNowClick(e){let t=new y({origin:"generic",channel_name:"user-".concat(e.json.id,"-user-").concat(this.props.userProfile.json.id),current_user:this.props.userProfile.json,creator_id:this.props.userProfile.json.id,conversation_users:[{user:{user_id:e.json.id,...e.json}},{user:{user_id:this.props.userProfile.id,...this.props.userProfile.json}}],status:"pending"},this.props.userProfile.json.id);this.setState({isNewChatPopupVisible:!1,isMessagingSectionOpen:!0,currentConversation:t})}
1render(){let e=d().bind(l());return this.state.authReady?(0,i.jsxs)("div",{id:"message-page",className:e("message-page"),children:[(0,i.jsxs)(o(),{children:[(0,i.jsx)("link",{rel:"canonical",href:""},"canonical"),(0,i.jsx)("meta",{property:"og:image",content:"https://soho-app-production.s3.ap-southeast-2.amazonaws.com/static_assets/og-image-generic.png"},"og:image"),(0,i.jsx)("meta",{property:"og:url",content:""},"og:url"),(0,i.jsx)("meta",{property:"og:title",content:"Your Messages | Soho Real Estate"},"og:title"),(0,i.jsx)("title",{children:"Messages | Soho Real Estate"})]}),(0,i.jsxs)("div",{id:"content",className:e("content"),children:[(0,i.jsx)(X,{conversations:this.state.conversations,lastUpdate:this.state.lastUpdate,loading:this.state.loadingConversations,currentConversation:this.state.currentConversation,onLoadMore:this.loadConversations.bind(this),otherUserOnlineStatus:!1,onChatListItemClick:this.changeCurrentConversation.bind(this),onStartNewChatButtonClicked:this.startNewChat.bind(this)}),(0,i.jsx)(eY,{currentConversation:this.state.currentConversation,isModal:window.innerWidth<768,isOpen:!!this.state.isMessagingSectionOpen,userProfile:this.props.userProfile,onClose:this.closeMessagingSectionPopup.bind(this),onStartChat:this.startNewChat.bind(this)}),this.state.isNewChatPopupVisible&&(0,i.jsx)(eF,{visible:!0,conversations:this.state.conversations,userProfile:this.props.userProfile,onClose:this.closeNewChatPopup.bind(this),chatCreationStatus:this.state.chatCreationStatus,onSelectConversation:this.changeCurrentConversation.bind(this),onMessageNowClick:this.onMessageNowClick.bind(this)})]})]}):null}constructor(e){super(e),this.state={isMessagingSectionOpen:!1,isNewChatPopupVisible:!1,currentConversationSid:null,loadedConversationPage:0,loadingConversations:!0,loadedAllConversations:!1,conversations:[],lastUpdate:new Date,authReady:!1}}}},67205:function(e){e.exports={"chat-header":"style_chat-header__9JiSz","back-arrow":"style_back-arrow__EXPFZ","avatar-container":"style_avatar-container__1gpiC",online:"style_online__CvH7O",text:"style_text__8ahVj",title:"style_title__3pRdN",subtitle:"style_subtitle__CrFfR",users:"style_users__fD_04","chat-header-menu-button":"style_chat-header-menu-button__jEaMj",loader:"style_loader__w5vj5","menu-tooltip":"style_menu-tooltip__VGto1","leave-confirmation-popup":"style_leave-confirmation-popup__eBgUu",buttons:"style_buttons__a10FP",cancel:"style_cancel__1xBu2",leave:"style_leave__wuGA3",loading:"style_loading__iPImh"}},74620:function(e){e.exports={"chat-list-item":"style_chat-list-item__2bh_R",selected:"style_selected__4Bq9F","avatar-container":"style_avatar-container___dSG0",online:"style_online__JQWv7",text:"style_text__tC_Ea",users:"style_users__ezqrl",title:"style_title__AUnnr",subtitle:"style_subtitle__sPP1N",unseen:"style_unseen__5Gynr",time:"style_time__uCFGx",loading:"style_loading__Wb1EP",avatar:"style_avatar__OM1gu",shimmer:"style_shimmer__JEM5c"}},48684:function(e){e.exports={"chats-header":"style_chats-header__m1grf",title:"style_title__6_eIa","start-new-chat-button-desktop":"style_start-new-chat-button-desktop__F31mz","start-new-chat-button-mobile":"style_start-new-chat-button-mobile__FeVee"}},11071:function(e){e.exports={"chats-search":"style_chats-search__51wZs"}},6949:function(e){e.exports={"chats-section":"style_chats-section__umXG3","chats-list":"style_chats-list__Fdlue",empty:"style_empty__8rT1r",loading:"style_loading__bYko4","empty-chats-list-container":"style_empty-chats-list-container__5lvsw",image:"style_image__46QNU",title:"style_title__q7vME",message:"style_message__Jm2mL","start-a-conversation":"style_start-a-conversation__EUDap","debug-info":"style_debug-info__UoUYE"}},46979:function(e){e.exports={"follower-list-item":"style_follower-list-item___N2ul",avatar:"style_avatar__Tdihs",center:"style_center__gln1_",name:"style_name__tJnyP","online-status":"style_online-status__ZEgsK","message-now":"style_message-now__e6CXF","go-to-chat":"style_go-to-chat__rdgnz",standard:"style_standard__w77SI",disabled:"style_disabled__eR6Li",loading:"style_loading__JKm_s",shimmer:"style_shimmer__VPIhr"}},79856:function(e){e.exports={container:"style_container__l9z7F"}},16103:function(e){e.exports={message:"style_message__he4s3",you:"style_you__lWtso","desktop-menu":"style_desktop-menu__7xsHl","message-content":"style_message-content__h16Xy",other:"style_other__AyJ3c",avatar:"style_avatar__I3tNw","message-content-container":"style_message-content-container__9kZq4",tooltip:"style_tooltip__V9mJw",arrow:"style_arrow__cV8Vf",system:"style_system___ssuH","message-og":"style_message-og__ezrKi","post-linkpreview-summary":"style_post-linkpreview-summary__FXfpA",msgup:"style_msgup__XJCHB",text:"style_text__0kxoS",image:"style_image__OXeOX",footer
1:"style_footer__2FBQM",status:"style_status__xlEsA",msgsysup:"style_msgsysup__F79A2","type-image":"style_type-image__ghYZe","menu-button":"style_menu-button__2L3JI","tooltip-inner":"style_tooltip-inner__Un7MS","post-linkpreview-image":"style_post-linkpreview-image__yO7E6",title:"style_title__3_Qeu",buttons:"style_buttons__SJ1v7",cancel:"style_cancel__lQhkk",delete:"style_delete__nLKQf","delete-confirmation-popup":"style_delete-confirmation-popup__dK8no"}},12221:function(e){e.exports={"message-input":"style_message-input__LXfcC","send-button":"style_send-button__WwnOJ","scale-animation":"style_scale-animation__50O8I","media-upload-buttons":"style_media-upload-buttons__N3A7R"}},5182:function(e){e.exports={"messages-list":"style_messages-list__9LGlc","messages-list-box":"style_messages-list-box__3_Gpd","sticky-date-header":"style_sticky-date-header__cqicx"}},94105:function(e){e.exports={"messaging-section":"style_messaging-section__7mgbJ","messaging-section-popup":"style_messaging-section-popup__SDtkb",empty:"style_empty__iaHbH",image:"style_image__NhYe6",title:"style_title__9Wjro",message:"style_message__jGFDt","start-a-conversation":"style_start-a-conversation__wkE8l","messages-loading-container":"style_messages-loading-container__rAozp","failed-state":"style_failed-state__KEVRu","message-input-holder":"style_message-input-holder__IGMNF"}},99147:function(e){e.exports={"search-followers-container":"style_search-followers-container__z56hP","empty-state":"style_empty-state__jBrve"}},70571:function(e){e.exports={ril__toolbar:"style_ril__toolbar__2h42f","photo-gallery-delete-image-button":"style_photo-gallery-delete-image-button__yzj2x",text:"style_text__EACrI",title:"style_title__Hv1II",buttons:"style_buttons__2sN4D",cancel:"style_cancel__zT0rV",delete:"style_delete__JjM2c"}},97891:function(e){e.exports={"post-linkpreview":"style_post-linkpreview__e7Suh","post-linkpreview-image":"style_post-linkpreview-image__E9DuC","post-linkpreview-close":"style_post-linkpreview-close__SFRaD","post-linkpreview-loading":"style_post-linkpreview-loading__5951w","post-linkpreview-rotate":"style_post-linkpreview-rotate__MfhUp","post-linkpreview-summary":"style_post-linkpreview-summary__gxZg_"}},8436:function(e){e.exports={"search-box":"style_search-box__L2_JN","search-icon":"style_search-icon__YzcS6","clear-button":"style_clear-button__qmafr"}},65032:function(e){e.exports={"typing-status":"style_typing-status__BMnWG","typing-status-visible":"style_typing-status-visible__W9flA"}},35334:function(e){e.exports={uploader:"style_uploader__ZjiJB"}},69070:function(e){e.exports={usercontent:"style_usercontent__HTnXz",truncate:"style_truncate__hZsbF"}},3409:function(e){e.exports={"message-page":"style_message-page__4Wnxi",content:"style_content__2t8DM"}},4674:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNyIgaGVpZ2h0PSIxMiIgdmlld0JveD0iMCAwIDcgMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik02IDFMMSA2TDYgMTEiIHN0cm9rZT0iIzg4ODg4OCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo="},93427:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0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function(e){e.O(0,[3816,5412,1876,949,8128,1254,6840,1566,2888,9774,179],function(){return e(e.s=92459)}),_N_E=e.O()}]);
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.