1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5448],{416:(J,E,c)=>{c.d(E,{M:()=>te});var o=c(73448),e=c(32116),x=c(94292),w=c(87264),I=c(77816),b=c(72852),p=c(91368),h=c(83068),y=c(44716),R=c(79992);const C=["chatBox"];function P(n,l){1&n&&(e.I0R(0,"div",15),e.wR5(1,"ion-spinner",16),e.C$Y())}function T(n,l){if(1&n&&(e.I0R(0,"span"),e.OEk(1),e.C$Y()),2&n){const t=e.GaO(2).$implicit;e.yG2(),e.CAO("",null!=t&&t.userFirstName?null==t?null:t.userFirstName.charAt(0).toUpperCase():".","",null!=t&&t.userLastName?null==t?null:t.userLastName.charAt(0).toUpperCase():"."," ")}}function O(n,l){if(1&n&&e.wR5(0,"img",36),2&n){const t=e.GaO(2).$implicit;e.E7m("src",null==t?null:t.userPhoto,e.K6U)}}function M(n,l){if(1&n&&(e.I0R(0,"div",37)(1,"strong"),e.OEk(2),e.C$Y()()),2&n){const t=e.GaO(2).$implicit;e.yG2(2),e.CAO("",null==t?null:t.requestType.substring(0,50)," ",(null==t?null:t.requestType.length)>50?"...":""," ")}}function B(n,l){if(1&n&&(e.I0R(0,"div",37)(1,"strong"),e.OEk(2),e.C$Y()()),2&n){const t=e.GaO(2).$implicit;e.yG2(2),e.CAO("",null==t?null:t.wrTitle.substring(0,50)," ",(null==t?null:t.wrTitle.length)>50?"...":""," ")}}function K(n,l){1&n&&(e.I0R(0,"div",38),e.OEk(1," Canceled "),e.C$Y())}function U(n,l){if(1&n&&(e.I0R(0,"div",39),e.OEk(1),e.wVc(2,"date"),e.C$Y()),2&n){const t=e.GaO(2).$implicit;e.yG2(),e.oRS(" ",e.g7$(2,1,null==t?null:t.createdAt.toDate(),"MM/dd/YY hh:mm:ssa")," ")}}function A(n,l){if(1&n&&(e.I0R(0,"div",40),e.wR5(1,"p",41),e.C$Y()),2&n){const t=e.GaO(2).$implicit;e.yG2(),e.E7m("innerHtml",null!=t&&t.lastMessage&&(null==t?null:t.lastMessage.indexOf("Files"))>=0?"Shared a File":(null==t?null:t.lastMessage.length)>40?(null==t?null:t.lastMessage.substring(0,40))+"...":null==t?null:t.lastMessage,e.E3n)}}function N(n,l){if(1&n&&(e.I0R(0,"span",42),e.OEk(1),e.C$Y()),2&n){const t=e.GaO(2).$implicit;e.yG2(),e.cNF(null==t?null:t.unreadCount)}}const k=n=>({active:n});function $(n,l){if(1&n&&(e.I0R(0,"div",21)(1,"div",22)(2,"div",23),e.yuY(3,T,2,2,"span",24)(4,O,1,1,"img",25),e.C$Y(),e.I0R(5,"div",26)(6,"div",27),e.OEk(7),e.yuY(8,M,3,2,"div",28)(9,B,3,2,"div",28),e.C$Y(),e.yuY(10,K,2,0,"div",29)(11,U,3,4,"div",30),e.I0R(12,"div",31),e.OEk(13),e.C$Y(),e.yuY(14,A,2,1,"div",32),e.C$Y()(),e.I0R(15,"div",33),e.yuY(16,N,2,1,"span",34),e.OEk(17," \xa0 "),e.I0R(18,"div",35),e.OEk(19),e.C$Y()()()),2&n){const t=e.GaO().$implicit,i=e.GaO(2);e.E7m("ngClass",e.S45(12,k,(null==t.chat?null:t.chat.sid)===(null==i.userProvider.currentConversation?null:i.userProvider.currentConversation.sid))),e.yG2(3),e.E7m("ngIf",!(null!=t&&t.userPhoto)),e.yG2(),e.E7m("ngIf",null==t?null:t.userPhoto),e.yG2(3),e.oRS(" @",(null==t?null:t.userFirstName)+" "+(null==t?null:t.userLastName)," "),e.yG2(),e.E7m("ngIf",!(null!=t&&t.wrTitle)),e.yG2(),e.E7m("ngIf",null==t?null:t.wrTitle),e.yG2(),e.E7m("ngIf",null==t?null:t._isCanceled),e.yG2(),e.E7m("ngIf",null==t?null:t.createdAt.toDate()),e.yG2(2),e.oRS(" ",null==t?null:t.vendorBusinessName," "),e.yG2(),e.E7m("ngIf",null==t?null:t.lastMessage),e.yG2(2),e.E7m("ngIf",(null==t?null:t.unreadCount)>0),e.yG2(3),e.oRS(" ",null!=t&&null!=t.chat&&t.chat.lastMessage?null==t?null:t.time:""," ")}}function F(n,l){if(1&n){const t=e.KQA();e.I0R(0,"section",19),e.qCj("click",function(){const d=e.usT(t).$implicit,m=e.GaO(2);return e.CGJ(m.openChat(d))}),e.yuY(1,$,20,14,"div",20),e.C$Y()}if(2&n){const t=l.$implicit,i=e.GaO(2);e.yG2(),e.E7m("ngIf",(!i.wrId||i.wrId&&(null==t?null:t.wrId)==i.wrId)&&((null==t?null:t.userFirstName)+" "+(null==t?null:t.userLastName)).toLocaleLowerCase().indexOf(i.query.toLocaleLowerCase())>=0)}}function z(n,l){if(1&n&&(e.I0R(0,"div",17),e.yuY(1,F,2,1,"section",18),e.C$Y()),2&n){const t=e.GaO();e.yG2(),e.E7m("ngForOf",t.userProvider.chatList)}}function Y(n,l){1&n&&(e.I0R(0,"span",45),e.OEk(1,"Please select "),e.wR5(2,"br"),e.OEk(3,"to start conversation."),e.C$Y())}function L(n,l){if(1&n&&(e.I0R(0,"div",43),e.yuY(1,Y,4,0,"span",44),e.C$Y()),2&n){const t=e.GaO();e.yG2(),e.E7m("ngIf",t.userProvider.chatList.length>0)}}function Q(n,l){if(1&n&&(e.I0R(0,"span"),e.OEk(1),e.C$Y()),2&n){const t=e.GaO(3);e.yG2(),e.CAO("",null!=t.selectedChat&&t.selectedChat.userFirstName?null==t.selectedChat?null:t.selectedChat.userFirstName.charAt(0).toUpperCase():"","",null!=t.selectedChat&&t.selectedChat.userLastName?null==t.selectedChat?null:t.selectedChat.userLastName.charAt(0).toUpperCase():"","")}}function W(n,l){if(1&n&&e.wR5(0,"img",36),2&n){const t=e.GaO(3);e.E7m("src",null==t.selectedChat?null:t.selectedChat.userPhoto,e.K6U)}}function j(n,l){1&n&&(e.I0R(0,"div",57)(1,"span"),e.OEk(2,"No messages yet!"),e.C$Y(),e.I0R(3,"p"),e.OEk(4,"Send the first message from below"),e.C$Y()())}
1function V(n,l){if(1&n&&(e.I0R(0,"div",70),e.wR5(1,"p",71),e.I0R(2,"div",72),e.OEk(3),e.wVc(4,"date"),e.C$Y()()),2&n){const t=e.GaO(2).$implicit;e.yG2(),e.E7m("innerHtml",null==t?null:t.body,e.E3n),e.yG2(2),e.oRS(" ",e.g7$(4,2,null==t?null:t.dateUpdated,"hh:mm a")," ")}}function D(n,l){if(1&n&&(e.I0R(0,"span"),e.OEk(1),e.C$Y()),2&n){const t=e.GaO(6);e.yG2(),e.CAO("",null==t.userProvider||null==t.userProvider.loggedInUser||null==t.userProvider.loggedInUser.firstName?null:t.userProvider.loggedInUser.firstName.charAt(0).toUpperCase(),"",null==t.userProvider||null==t.userProvider.loggedInUser||null==t.userProvider.loggedInUser.lastName?null:t.userProvider.loggedInUser.lastName.charAt(0).toUpperCase(),"")}}function H(n,l){if(1&n&&e.wR5(0,"img",36),2&n){const t=e.GaO(6);e.E7m("src",null==t.userProvider.loggedInUser?null:t.userProvider.loggedInUser.profilePhoto,e.K6U)}}function s(n,l){if(1&n&&(e.I0R(0,"div",65)(1,"div",66)(2,"div",67)(3,"div",68),e.yuY(4,V,5,5,"div",69),e.C$Y()()(),e.I0R(5,"div",51),e.yuY(6,D,2,2,"span",24)(7,H,1,1,"img",25),e.C$Y()()),2&n){const t=e.GaO().$implicit,i=e.GaO(4);e.yG2(4),e.E7m("ngIf",null==t?null:t.body),e.yG2(2),e.E7m("ngIf",!(null!=i.userProvider.loggedInUser&&i.userProvider.loggedInUser.profilePhoto)),e.yG2(),e.E7m("ngIf",null==i.userProvider.loggedInUser?null:i.userProvider.loggedInUser.profilePhoto)}}function _(n,l){if(1&n&&(e.I0R(0,"span"),e.OEk(1),e.C$Y()),2&n){const t=e.GaO(6);e.yG2(),e.CAO("",null==t.selectedChat||null==t.selectedChat.userFirstName?null:t.selectedChat.userFirstName.charAt(0).toUpperCase(),"",null==t.selectedChat||null==t.selectedChat.userLastName?null:t.selectedChat.userLastName.charAt(0).toUpperCase(),"")}}function a(n,l){if(1&n&&e.wR5(0,"img",36),2&n){const t=e.GaO(6);e.E7m("src",null==t.selectedChat?null:t.selectedChat.userPhoto,e.K6U)}}function u(n,l){if(1&n&&(e.I0R(0,"div",77),e.wR5(1,"p",71),e.I0R(2,"div",78),e.OEk(3),e.wVc(4,"date"),e.C$Y()()),2&n){const t=e.GaO(2).$implicit;e.yG2(),e.E7m("innerHtml",null==t?null:t.body,e.E3n),e.yG2(2),e.oRS(" ",e.g7$(4,2,null==t?null:t.dateUpdated,"hh:mm a")," ")}}function f(n,l){if(1&n&&(e.I0R(0,"div",73)(1,"div",66)(2,"div",51),e.yuY(3,_,2,2,"span",24)(4,a,1,1,"img",25),e.OEk(5," || "),e.C$Y(),e.I0R(6,"div",74)(7,"div",75),e.yuY(8,u,5,5,"div",76),e.C$Y()()()()),2&n){const t=e.GaO().$implicit,i=e.GaO(4);e.yG2(3),e.E7m("ngIf",!(null!=i.selectedChat&&i.selectedChat.userPhoto)),e.yG2(),e.E7m("ngIf",null==i.selectedChat?null:i.selectedChat.userPhoto),e.yG2(4),e.E7m("ngIf",null==t?null:t.body)}}function g(n,l){if(1&n&&(e.I0R(0,"div",61)(1,"h6",62),e.OEk(2),e.C$Y(),e.yuY(3,s,8,3,"div",63)(4,f,9,3,"div",64),e.C$Y()),2&n){const t=l.$implicit,i=l.index,r=e.GaO(4);e.yG2(2),e.oRS(" ",r.userProvider.checkMsgDate(i)," "),e.yG2(),e.E7m("ngIf",(null==r.userProvider||null==r.userProvider.loggedInUser?null:r.userProvider.loggedInUser.id)==(null==t?null:t.author)),e.yG2(),e.E7m("ngIf",(null==r.userProvider||null==r.userProvider.loggedInUser?null:r.userProvider.loggedInUser.id)!=(null==t?null:t.author))}}function S(n,l){if(1&n){const t=e.KQA();e.I0R(0,"div",58,59),e.qCj("scrolledUp",function(){e.usT(t);const r=e.GaO(3);return e.CGJ(r.loadMessages())}),e.yuY(2,g,5,3,"div",60),e.C$Y()}if(2&n){const t=e.GaO(3);e.E7m("scrollWindow",!1)("fromRoot",!0)("infiniteScrollUpDistance",3)("infiniteScrollThrottle",50),e.yG2(2),e.E7m("ngForOf",t.userProvider.messages)}}function v(n,l){if(1&n){const t=e.KQA();e.I0R(0,"div",79)(1,"div",80)(2,"img",81),e.qCj("click",function(){e.usT(t);const r=e.Gew(4);return e.CGJ(r.click())}),e.C$Y(),e.I0R(3,"input",82,83),e.qCj("change",function(r){e.usT(t);const d=e.GaO(3);return e.CGJ(d.onFileChange(r))}),e.C$Y()(),e.I0R(5,"div",84)(6,"textarea",85),e.iHE("ngModelChange",function(r){e.usT(t);const d=e.GaO(3);return e.kNx(d.message,r)||(d.message=r),e.CGJ(r)}),e.qCj("keydown",function(r){e.usT(t);const d=e.GaO(3);return e.CGJ(d.userProvider.currentConversation.typing()&&d.handleKeyDown(r))}),e.C$Y()(),e.I0R(7,"div",80)(8,"button",86),e.qCj("click",function(){e.usT(t);const r=e.GaO(3);return e.CGJ(r.message.trim()&&r.sendMessage())}),e.wR5(9,"img",87),e.C$Y()()()}if(2&n){const t=e.GaO(3);e.yG2(6),e.OKB("ngModel",t.message)}}function Z(n,l){if(1&n){const t=e.KQA();e.I0R(0,"div",47)(1,"div",48)(2,"div",49)(3,"div",50)(4,"div",51),e.yuY(5,Q,2,2,"span",24)(6,W,1,1,"img",25),e.C$Y(),e.I0R(7,"span"),e.OEk(8),e.C$Y()(),e.I0R(9,"div",52)(10,"ion-icon",53),e.qCj("click",function(){e.usT(t);const r=e.GaO(2);return e.CGJ(r.userProvider.currentConversation=null)}),e.C$Y(),e.OEk(11,"\xa0 "),e.C$Y()(),e.yuY(12,j,5,0,"div",54)(13,S,3,5,"ng-template",null,55,e.gJz),e.C$Y(),e.yuY(15,v,10,1,"div",56),e.C$Y()}if(2&n){const t=e.Gew(14),i=e.GaO(2);e.yG2(5),e.E7m("ngIf",!(null!=i.selectedChat&&i.selectedChat.userPhoto)),e.yG2(),e.E7m("ngIf",null==i.selectedChat?null:i.selectedChat.userPhoto),e.yG2(2),e.oRS("@",(null==i.selectedChat?null:i.selectedChat.userFirstName)+" "+(null==i.selectedChat?null:i.selectedChat.vendorLastName),""),e.yG2(4),e.E7m("ngIf",(null==i.userProvider.messages?null:i.userProvider.messages.length)<0)("ngIfElse",t),e.yG2(3),e.E7m("ngIf",!(null!=i.selectedChat&&i.selectedChat._isCanceled))}}function X(n,l){if(1&n&&e.yuY(0,Z,16,6,"div",46),2&n){const t=e.GaO();e.E7m("ngIf",t.selectedChat&&(null==t.selectedChat?null:t.selectedChat.wrId))}}function q(n,l){if(1&n&&(e.I0R(0,"div",88),e.OEk(1),e.C$Y()),2&n){const t=e.GaO();e.yG2(),e.oRS(" ",t.error,"\n")}}function ee(n,l){1&n&&(e.I0R(0,"div",89),e.OEk(1," Typing...\n"),e.C$Y())}let te=(()=>{class n{photoService;firebaseApi;userProvider;leadWatcher;selectedChat={};message;error;myScrollContainer;wrId="";query="";constructor(t,i,r,d){this.photoService=t,this.firebaseApi=i,this.userProvider=r,this.leadWatcher=d}ngOnInit(){this.userProvider._messagedAdded$.subscribe(()=>{this.scrollToBottom()})}searchUsers(t){this.query=t?t.target.value.toLowerCase():""}sendMessage(){this.userProvider.currentConversation.sendMessage(this.message).then(t=>{this.message=""}).catch(t=>console.log(t))}openChat(t){this.userProvider.currentConversation=t.chat,this.selectedChat=t,this.selectedChat.workRequest=t?.wrId?this.leadWatcher.thisWr(t.wrId):{},console.log("selected chat-=>",this.selectedChat),this.userProvider.messages=[],this.fetchMessages()}fetchMessages(t){var i=this;this.userProvider._convLoader=!0,this.userProvider.currentConversation.getMessages(30,t).then(function(){var r=(0,o.c)(function*(d){if(i.userProvider.messages=[...d.items,...i.userProvider.messages],!t){let m=i.userProvider.messages.length>=1?i.userProvider.messages[i.userProvider.messages.length-1].index:0;yield i.userProvider.currentConversation.updateLastReadMessageIndex(m),i.userProvider.chatList=i.userProvider.chatList.map(G=>(G.chat.sid==i.userProvider.currentConversation.sid&&(G.unreadCount=0),G))}console.log("2 - Chat list -=>",i.userProvider.chatList),i.userProvider._convLoader=!1,i.scrollToBottom()});return function(d){return r.apply(this,arguments)}}()).catch(r=>{this.userProvider._convLoader=!1,console.log(r)})}loadMessages(){this.userProvider.messages[0].index>0&&this.fetchMessages(this.userProvider.messages[0].index-1)}ngAfterViewChecked(){}scrollToBottom(){try{this.myScrollContainer.nativeElement.scrollTop=this.myScrollContainer.nativeElement.scrollHeight}catch{}}onFileChange(t){try{if(!t.target.files[0])return!1;const r=t.target.files[0];var i=new FileReader;i.addEventListener("load",()=>{const d=new File([i.result],r.name,r);this.sendMediaMessage(d)},!1),i.readAsArrayBuffer(r)}catch(r){console.log("err ->",r)}return!0}
1sendMediaMessage(t){var i=this;return(0,o.c)(function*(){try{if(i.userProvider.messageSending)return!1;i.userProvider.messageSending=!0,console.log("Message Input: ",t);const r=new FormData;r.append("fi",t);const m=(yield i.photoService.uploadPhotoToS3(r)).Location;console.log("URL: ",m);const G=t.name.substring(0,18);i.message=`<a style="font-size: 12px; color: grey;" href='${m}'><img style="width:25px;" width="25px" src='https://firebasestorage.googleapis.com/v0/b/nexgen-taxes-production.appspot.com/o/attach4.png?alt=media&token=3d468530-8b5e-411d-9737-0108ec2d3e52' /> ${G}</a> `,i.sendMessage(),i.selectedChat.workRequest.cpaDocs.push({name:t.name,url:m,requestedApproval:!1,signatureRequested:!1,createdAt:(new Date).toISOString(),vId:i.selectedChat?.vendorId,vFirstName:i.selectedChat?.vendorFirstName?i.selectedChat.vendorFirstName:"",vLastName:i.selectedChat?.vendorLastName?i.selectedChat.vendorLastName:""}),console.log("CPA DOCS -> ",i.selectedChat.workRequest.cpaDocs),yield i.firebaseApi.updateOne("workRequests",i.selectedChat.workRequest.id,{cpaDocs:i.selectedChat.workRequest.cpaDocs})}catch(r){console.log("err ->",r)}finally{i.userProvider.messageSending=!1}return!0})()}handleKeyDown(t){this.message||(this.message="");const i=document.getElementById("txt-send");"Enter"===t.key&&(t.shiftKey?(t.preventDefault(),this.message+="\n",i.style.height="100px"):(t.preventDefault(),this.sendMessage(),i.style.height="40px"))}static \u0275fac=function(i){return new(i||n)(e.GI1(x.s),e.GI1(w.H),e.GI1(I.e),e.GI1(b.c))};static \u0275cmp=e.In1({type:n,selectors:[["app-chats"]],viewQuery:function(i,r){if(1&i&&e.CC$(C,5),2&i){let d;e.wto(d=e.Gqi())&&(r.myScrollContainer=d.first)}},inputs:{wrId:"wrId"},decls:17,vars:9,consts:[["sizeLg","4","sizeMd","5","sizeSm","12","sizeXs","12",3,"ngClass"],[1,"part-list"],[1,"chat-lists"],[1,"flex","f-align-center","f-just-btw",2,"height","54px","margin-left","1.7rem"],["color","light","placeholder","Search",1,"auto","searchBar",3,"ngModel","ionInput","ionClear"],["name","close-circle-outline",1,"f1-7","cursor","margin-right-05","b-c",3,"click"],["class","padding-2 center",4,"ngIf"],["class","scroll chat-participants",4,"ngIf"],["sizeLg","8","sizeMd","7","sizeSm","12","sizeXs","12",3,"ngClass"],[1,"border","border-radius","bg-white","height-100"],[1,"chat-area","margin-top-05"],["class","no-chat-item text-info",4,"ngIf","ngIfElse"],["chatArea",""],["class","alert alert-danger","role","alert",4,"ngIf"],["class","alert alert-warning","role","alert",4,"ngIf"],[1,"padding-2","center"],[1,"spinner2","margin-right-2"],[1,"scroll","chat-participants"],["class","my-card margin-bottom-1",3,"click",4,"ngFor","ngForOf"],[1,"my-card","margin-bottom-1",3,"click"],["class","chat-rec",3,"ngClass",4,"ngIf"],[1,"chat-rec",3,"ngClass"],[1,"flex"],[1,"profile","relative"],[4,"ngIf"],[3,"src",4,"ngIf"],[1,"ms-2"],[1,"robo-black"],["class","f0-8 bold-100 flex f-nowrap b-c",4,"ngIf"],["class","red f0-8 robo-medium",4,"ngIf"],["class","conv-date",4,"ngIf"],[1,"f0-8","border-botdot"],["class","chat-msg",4,"ngIf"],[1,"flex","f-align-center","ms-2"],["class","msg-alert",4,"ngIf"],[1,"date-time"],[3,"src"],[1,"f0-8","bold-100","flex","f-nowrap","b-c"],[1,"red","f0-8","robo-medium"],[1,"conv-date"],[1,"chat-msg"],[1,"message__txt","italic",3,"innerHtml"],[1,"msg-alert"],[1,"no-chat-item","text-info"],["class","margin-top",4,"ngIf"],[1,"margin-top"],["class","chat-box",4,"ngIf"],[1,"chat-box"],[1,"message-area"],[1,"chat-header","d-flex","justify-content-between","b-b"],[1,"chat-info","cursor"],[1,"profile"],[1,"flex-rowcenter"],["name","close",1,"margin-left-1","cursor",2,"font-size","1.4rem",3,"click"],["class","no-messages",4,"ngIf","ngIfElse"],["messageBox",""],["class","send-m flex f-align-center",4,"ngIf"],[1,"no-messages"],["infiniteScroll","",1,"p-2","kmsg-bloc","scroll",3,"scrollWindow","fromRoot","infiniteScrollUpDistance","infiniteScrollThrottle","scrolledUp"],["chatBox",""],["class","messanger-chat-row",4,"ngFor","ngForOf"],[1,"messanger-chat-row"],[1,"center","f0-8","b-c","margin"],["class","right-chat d-flex",4,"ngIf"],["class","left-c
1hat d-flex",4,"ngIf"],[1,"right-chat","d-flex"],[1,"d-flex"],[1,"user-message-content"],[1,"user-message-bg"],["class","chat-text",4,"ngIf"],[1,"chat-text"],[1,"messageTxtStyle","message__txt",3,"innerHtml"],[1,"msg-date","d-flex","justify-content-end"],[1,"left-chat","d-flex"],[1,"user-message-content",2,"display","flex","flex-direction","column"],[1,"user-message-bg",2,"display","flex","justify-content","flex-end"],["class","chat-text gray-l",4,"ngIf"],[1,"chat-text","gray-l"],[1,"msg-date","d-flex","justify-content-start"],[1,"send-m","flex","f-align-center"],[1,"flex-center-y","cursor",2,"width","10%"],["src","assets/images/Add.png",2,"width","30px !important",3,"click"],["type","file","accept","file/*",2,"display","none",3,"change"],["filePicker",""],[1,"flex-center-y",2,"width","80%"],["name","chat-message","id","txt-send","placeholder","Write your message...","rows","1",1,"form-control","taxtar","scroll",2,"resize","none!important","min-height","40px",3,"ngModel","ngModelChange","keydown"],["type","button",2,"background","#fff",3,"click"],["src","assets/images/Sent.png","width","30"],["role","alert",1,"alert","alert-danger"],["role","alert",1,"alert","alert-warning"]],template:function(i,r){if(1&i&&(e.I0R(0,"ion-row")(1,"ion-col",0)(2,"div",1)(3,"div",2)(4,"div",3)(5,"ion-searchbar",4),e.qCj("ionInput",function(m){return r.searchUsers(m)})("ionClear",function(m){return r.searchUsers(m)}),e.C$Y(),e.I0R(6,"ion-icon",5),e.qCj("click",function(){return r.userProvider.currentConversation=null}),e.C$Y()(),e.yuY(7,P,2,0,"div",6)(8,z,2,1,"div",7),e.C$Y()()(),e.I0R(9,"ion-col",8)(10,"div",9)(11,"div",10),e.yuY(12,L,2,1,"div",11)(13,X,1,1,"ng-template",null,12,e.gJz),e.C$Y()()()(),e.yuY(15,q,2,1,"div",13)(16,ee,2,0,"div",14)),2&i){const d=e.Gew(14);e.yG2(),e.E7m("ngClass",r.userProvider.currentConversation?"lg":""),e.yG2(4),e.E7m("ngModel",r.query),e.yG2(2),e.E7m("ngIf",r.userProvider._loadChat),e.yG2(),e.E7m("ngIf",r.userProvider.chatList.length>0),e.yG2(),e.E7m("ngClass",r.userProvider.currentConversation?"":"lg"),e.yG2(3),e.E7m("ngIf",!r.userProvider.currentConversation)("ngIfElse",d),e.yG2(3),e.E7m("ngIf",r.error),e.yG2(),e.E7m("ngIf",r.userProvider.isTyping)}},dependencies:[p.QF,p.ay,p.u_,h.Kk,h.Ko,h.qo,h.KQ,h.YA,h.qG,y.ot,y.ue,y._G,R.mO,p.y],styles:[".filter[_ngcontent-%COMP%]{flex:0 0 70px;align-items:center;display:flex;padding:0 0 0 20px}.filter[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1 1 auto;height:50px;width:auto}.filter[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:50px}.list-group[_ngcontent-%COMP%]{flex:1 1 auto;overflow-y:auto;padding:0 0 0 20px}.chat-area[_ngcontent-%COMP%]{height:calc(100vh - 200px)}.chat-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.message-area[_ngcontent-%COMP%]{flex:1 1 auto;border-radius:.25rem;margin:0 10px;height:calc(100vh - 350px);display:flex;flex-direction:column;background-color:#fff}.chat-header[_ngcontent-%COMP%]{height:50px;background-color:#fff!important;padding:10px;align-items:center;flex:0 0 50px;color:#000}.msg-block[_ngcontent-%COMP%]{overflow-y:auto;flex:1 1 auto}.chat-info[_ngcontent-%COMP%]{display:flex;align-items:center}.send-block[_ngcontent-%COMP%]{flex:0 0 90px;position:relative;margin:0 10px}.send-block[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin-right:0;margin-left:auto;position:absolute;top:24px;right:10px;display:flex;flex-direction:column;align-items:center}.send-m[_ngcontent-%COMP%]{width:98%;margin:.5rem;border-radius:10px;border:1px solid #a4a4a4}textarea[_ngcontent-%COMP%]{padding-right:65px}.right-chat[_ngcontent-%COMP%]{justify-content:flex-end}.chat-text[_ngcontent-%COMP%]{background:#ededfd;min-width:350px;border-radius:20px;padding:1rem;max-width:450px}.gray-l[_ngcontent-%COMP%]{background:#e7e5e5}.left-chat[_ngcontent-%COMP%]{justify-content:flex-start}.user-msg-bg[_ngcontent-%COMP%]{border:1px solid pink;padding:4px;border-radius:4px}.msg-date[_ngcontent-%COMP%]{font-size:12px;color:gray}.user-message-content[_ngcontent-%COMP%]{margin-right:10px}.messanger-chat-row[_ngcontent-%COMP%]{margin-bottom:5px}.no-chat-item[_ngcontent-%COMP%]{display:flex;height:100%;font-size:1rem;justify-content:center;color:var(--ion-color-primary)!important}.loader[_ngcontent-%COMP%]{position:absolute;top:40%;left:50%}.alert[_ngcontent-%COMP%]{position:fixed;bottom:30px;right:30px;max-width:300px;width:100%}.messageContainerStyle[_ngcontent-%COMP%]{align-self:flex-start;margin-bottom:16px;padding-right:16px;max-width:75%;clear:both;position:relative;display:flex;flex-direction:column;flex-shrink:0;float:left}.messageContainerStyle[_ngcontent-%COMP%]:hover > .tool[_ngcontent-%COMP%]{display:flex}.tool[_ngcontent-%COMP%]{display:none}.toolGroup[_ngcontent-%COMP%]{padding-left:45px}.messageWrapperStyle[_ngcontent-%COMP%]{width:auto;flex:1 1;align-self:flex-start;display:flex}.messageDetailStyle[_ngcontent-%COMP%]{flex:1 1;display:flex;flex-direction:column}.messageTxtContainerStyle[_ngcontent-%COMP%]{width:auto;flex:1 1;align-self:flex-start;display:flex}.messageInfoWrapperStyle[_ngcontent-%COMP%]{align-self:flex-start;padding:3px 5px;display:inherit}.messageTimestampStyle[_ngcontent-%COMP%]{display:inline-block;font-size:11px;font-weight:500;line-height:12px;text-transform:uppercase;color:#14141499}.messageTxtWrapperStyle[_ngcontent-%COMP%]{display:inline-block;border-radius:5px 20px 20px 0;background-color:#d4ffd0;padding:8px 12px;align-self:flex-start;width:auto;border:1px solid #98e78e}.messageTxtStyle[_ngcontent-%COMP%]{margin:0;font-size:16px;white-space:pre-wrap;text-align:left;width:auto}.messageTxtStyle[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#0432ff}.messagePreviewContainerStyle[_ngcontent-%COMP%]{display:inline-block;border-radius:12px;background-color:#fff;box-shadow:0 1px 2px 1px #0000002e;align-self:flex-start;width:auto}.messagePreviewWrapperStyle[_ngcontent-%COMP%]{display:flex;flex-direction:column}.previewImageStyle[_ngcontent-%COMP%]{align-self:center;height:150px;margin:12px 0}.previewImageStyle[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{background-size:contain;height:150px;margin:12px 0}.previewDataStyle[_ngcontent-%COMP%]{border-top:1px solid #eaeaea;border-bottom:1px solid #eaeaea;padding:12px}.previewTitleStyle[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word;text-align:left;width:auto;color:#14141499;font-weight:700;margin-bottom:8px}.previewDescStyle[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word;text-align:left;width:auto;color:#14141499;font-size:italic;font-size:13px}.previewTextStyle[_ngcontent-%COMP%]{margin-top:5px;white-space:pre-wrap;word-break:break-word;text-align:left;width:auto;color:#0432ff}.previewTextStyle[_ngcontent-%COMP%] + .messageTxtWrapperStyle[_ngcontent-%COMP%]{background-color:transparent;color:#14141499;font-style:normal;padding:8px 0}.previewTextStyle[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-decoration:none;color:#0432ff}.previewTextStyle[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover{color:#04009d}.previewLinkStyle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:12px}.previewLinkStyle[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{display:inline-block;color:#39f;font-weight:700;text-decoration:none}.nameWrapperStyle[_ngcontent-%COMP%]{align-self:flex-start;padding:3px 5px}.nameStyle[_ngcontent-%COMP%]{font-size:10px;color:#14141499}.messageThumbnailStyle[_ngcontent-%COMP%]{width:36px;height:36px;margin:10px 5px;float:left;flex-shrink:0}.messageP[_ngcontent-%COMP%]{font-size:.9rem;font-weight:700}.messageImg[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:50px;max-width:50px}.fileItemStyle[_ngcontent-%COMP%]{width:26px;height:21px;cursor:pointer}.fileItemStyle[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{display:none}.link[_ngcontent-%COMP%]{color:#fff}.link[_ngcontent-%COMP%]:hover{color:orange}
1.alert-dot[_ngcontent-%COMP%]{position:absolute;top:0;right:-3px;font-size:.9rem!important;border-radius:50%}.chat-participants[_ngcontent-%COMP%]{padding:.2rem;height:700px}.chat-lists[_ngcontent-%COMP%]{height:calc(100vh - 180px);display:flex;flex-direction:column;background-color:#fff;border:1px solid #dee2e6;border-radius:6px}.part-list[_ngcontent-%COMP%]{border-radius:6px;height:100%}@media (max-width: 768px){.chat-lists[_ngcontent-%COMP%]{height:unset;background-color:transparent;border:unset}.chat-participants[_ngcontent-%COMP%]{padding:0;height:unset}.part-list[_ngcontent-%COMP%]{background-color:transparent;height:100%}.messageTxtStyle[_ngcontent-%COMP%]{font-size:13px}.chat-text[_ngcontent-%COMP%]{padding:.7rem;border-radius:8px}.chat-text[_ngcontent-%COMP%]{min-width:200px;border-radius:10px;padding:.5rem}.msg-date[_ngcontent-%COMP%]{font-size:10px}}.conv-date[_ngcontent-%COMP%]{color:gray;font-size:.7rem;text-transform:lowercase}"]})}return n})()},75448:(J,E,c)=>{c.d(E,{K:()=>R});var o=c(83068),e=c(91368),x=c(89192),I=(c(416),c(44716)),b=c(79992),p=c(55988),h=c(32116);let R=(()=>{class C{static \u0275fac=function(O){return new(O||C)};static \u0275mod=h.a4G({type:C});static \u0275inj=h.s3X({imports:[e.MD,o.wZ,x.qQ,I.y,b.Y1,p.gZ]})}return C})()},55988:(J,E,c)=>{c.d(E,{gZ:()=>D,kV:()=>H});var o=c(32116),e=c(91368),x=c(44716),w=c(70800),I=c(41424),b=c(95657),p=c(53616),h=c(3992),y=c(32700),R=c(8716);function C(s,_){}const P=()=>{const s=typeof window<"u"?window:void 0;return s&&s.tinymce?s.tinymce:null};let T=(()=>{class s{constructor(){this.onBeforePaste=new o._w7,this.onBlur=new o._w7,this.onClick=new o._w7,this.onContextMenu=new o._w7,this.onCopy=new o._w7,this.onCut=new o._w7,this.onDblclick=new o._w7,this.onDrag=new o._w7,this.onDragDrop=new o._w7,this.onDragEnd=new o._w7,this.onDragGesture=new o._w7,this.onDragOver=new o._w7,this.onDrop=new o._w7,this.onFocus=new o._w7,this.onFocusIn=new o._w7,this.onFocusOut=new o._w7,this.onKeyDown=new o._w7,this.onKeyPress=new o._w7,this.onKeyUp=new o._w7,this.onMouseDown=new o._w7,this.onMouseEnter=new o._w7,this.onMouseLeave=new o._w7,this.onMouseMove=new o._w7,this.onMouseOut=new o._w7,this.onMouseOver=new o._w7,this.onMouseUp=new o._w7,this.onPaste=new o._w7,this.onSelectionChange=new o._w7,this.onActivate=new o._w7,this.onAddUndo=new o._w7,this.onBeforeAddUndo=new o._w7,this.onBeforeExecCommand=new o._w7,this.onBeforeGetContent=new o._w7,this.onBeforeRenderUI=new o._w7,this.onBeforeSetContent=new o._w7,this.onChange=new o._w7,this.onClearUndos=new o._w7,this.onDeactivate=new o._w7,this.onDirty=new o._w7,this.onExecCommand=new o._w7,this.onGetContent=new o._w7,this.onHide=new o._w7,this.onInit=new o._w7,this.onInitNgModel=new o._w7,this.onLoadContent=new o._w7,this.onNodeChange=new o._w7,this.onPostProcess=new o._w7,this.onPostRender=new o._w7,this.onPreInit=new o._w7,this.onPreProcess=new o._w7,this.onProgressState=new o._w7,this.onRedo=new o._w7,this.onRemove=new o._w7,this.onReset=new o._w7,this.onResizeEditor=new o._w7,this.onSaveContent=new o._w7,this.onSetAttrib=new o._w7,this.onObjectResizeStart=new o._w7,this.onObjectResized=new o._w7,this.onObjectSelected=new o._w7,this.onSetContent=new o._w7,this.onShow=new o._w7,this.onSubmit=new o._w7,this.onUndo=new o._w7,this.onVisualAid=new o._w7}}return s.\u0275fac=function(a){return new(a||s)},s.\u0275dir=o.Sc5({type:s,outputs:{onBeforePaste:"onBeforePaste",onBlur:"onBlur",onClick:"onClick",onContextMenu:"onContextMenu",onCopy:"onCopy",onCut:"onCut",onDblclick:"onDblclick",onDrag:"onDrag",onDragDrop:"onDragDrop",onDragEnd:"onDragEnd",onDragGesture:"onDragGesture",onDragOver:"onDragOver",onDrop:"onDrop",onFocus:"onFocus",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onKeyDown:"onKeyDown",onKeyPress:"onKeyPress",onKeyUp:"onKeyUp",onMouseDown:"onMouseDown",onMouseEnter:"onMouseEnter",onMouseLeave:"onMouseLeave",onMouseMove:"onMouseMove",onMouseOut:"onMouseOut",onMouseOver:"onMouseOver",onMouseUp:"onMouseUp",onPaste:"onPaste",onSelectionChange:"onSelectionChange",onActivate:"onActivate",onAddUndo:"onAddUndo",onBeforeAddUndo:"onBeforeAddUndo",onBeforeExecCommand:"onBeforeExecCommand",onBeforeGetContent:"onBeforeGetContent",onBeforeRenderUI:"onBeforeRenderUI",onBeforeSetContent:"onBeforeSetContent",onChange:"onChange",onClearUndos:"onClearUndos",onDeactivate:"onDeactivate",onDirty:"onDirty",onExecCommand:"onExecCommand",onGetContent:"onGetContent",onHide:"onHide",onInit:"onInit",onInitNgModel:"onInitNgModel",onLoadContent:"onLoadContent",onNodeChange:"onNodeChange",onPostProcess:"onPostProcess",onPostRender:"onPostRender",onPreInit:"onPreInit",onPreProcess:"onPreProcess",onProgressState:"onProgressState",onRedo:"onRedo",onRemove:"onRemove",onReset:"onReset",onResizeEditor:"onResizeEditor",onSaveContent:"onSaveContent",onSetAttrib:"onSetAttrib",onObjectResizeStart:"onObjectResizeStart",onObjectResized:"onObjectResized",onObjectSelected:"onObjectSelected",onSetContent:"onSetContent",onShow:"onShow",onSubmit:"onSubmit",onUndo:"onUndo",onVisualAid:"onVisualAid"}}),s})();const O=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onResizeEditor","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],M=(s,_,a)=>(0,w.w)(s,_).pipe((0,p.a)(a)),U=(s,_)=>"string"==typeof s?s.split(",").map(a=>a.trim()):Array.isArray(s)?s:_;let A=0;const k=s=>typeof s<"u"&&"textarea"===s.tagName.toLowerCase(),$=s=>typeof s>"u"||""===s?[]:Array.isArray(s)?s:s.split(" "),F=(s,_)=>$(s).concat($(_)),z=()=>{},Y=s=>null==s,W=(()=>{let s={script$:null};return{load:(u,f)=>s.script$||(s.script$=(0,I.Q)(()=>{const g=u.createElement("script");return g.referrerPolicy="origin",g.type="application/javascript",g.src=f,u.head.appendChild(g),(0,w.w)(g,"load").pipe((0,h.U)(1),(0,y.e)(void 0))}).pipe((0,R.C)({bufferSize:1,refCount:!0}))),reinitialize:()=>{s={script$:null}}}})(),j=new o.UbH("TINYMCE_SCRIPT_SRC"),V={provide:x.Y6,useExisting:(0,o.wd)(()=>D),multi:!0};let D=(()=>{class s extends T{constructor(a,u,f,g){super(),this.platformId=f,this.tinymceScriptSrc=g,this.cloudCh
1annel="6",this.apiKey="no-api-key",this.id="",this.modelEvents="change input undo redo",this.onTouchedCallback=z,this.destroy$=new b.E,this.initialise=()=>{const S={...this.init,selector:void 0,target:this._element,inline:this.inline,readonly:this.disabled,plugins:F(this.init&&this.init.plugins,this.plugins),toolbar:this.toolbar||this.init&&this.init.toolbar,setup:v=>{this._editor=v,M(v,"init",this.destroy$).subscribe(()=>{this.initEditor(v)}),((s,_,a)=>{(s=>{const _=U(s.ignoreEvents,[]);return U(s.allowedEvents,O).filter(u=>O.includes(u)&&!_.includes(u))})(s).forEach(f=>{const g=s[f];M(_,f.substring(2),a).subscribe(S=>{g.observers.length>0&&s.ngZone.run(()=>g.emit({event:S,editor:_}))})})})(this,v,this.destroy$),this.init&&"function"==typeof this.init.setup&&this.init.setup(v)}};k(this._element)&&(this._element.style.visibility=""),this.ngZone.runOutsideAngular(()=>{P().init(S)})},this._elementRef=a,this.ngZone=u}set disabled(a){this._disabled=a,this._editor&&this._editor.initialized&&("function"==typeof this._editor.mode?.set?this._editor.mode.set(a?"readonly":"design"):this._editor.setMode(a?"readonly":"design"))}get disabled(){return this._disabled}get editor(){return this._editor}writeValue(a){this._editor&&this._editor.initialized?this._editor.setContent(Y(a)?"":a):this.initialValue=null===a?void 0:a}registerOnChange(a){this.onChangeCallback=a}registerOnTouched(a){this.onTouchedCallback=a}setDisabledState(a){this.disabled=a}ngAfterViewInit(){(0,e.c0)(this.platformId)&&(this.id=this.id||(s=>{const a=(new Date).getTime(),u=Math.floor(1e9*Math.random());return A++,"tiny-angular_"+u+A+String(a)}
1)(),this.inline=void 0!==this.inline?!1!==this.inline:!!this.init?.inline,this.createElement(),null!==P()?this.initialise():this._element&&this._element.ownerDocument&&W.load(this._element.ownerDocument,this.getScriptSrc()).pipe((0,p.a)(this.destroy$)).subscribe(this.initialise))}ngOnDestroy(){this.destroy$.next(),null!==P()&&P().remove(this._editor)}createElement(){this._element=document.createElement(this.inline?"string"==typeof this.tagName?this.tagName:"div":"textarea"),this._element&&(document.getElementById(this.id)&&console.warn(`TinyMCE-Angular: an element with id [${this.id}] already exists. Editors with duplicate Id will not be able to mount`),this._element.id=this.id,k(this._element)&&(this._element.style.visibility="hidden"),this._elementRef.nativeElement.appendChild(this._element))}getScriptSrc(){return Y(this.tinymceScriptSrc)?`https://cdn.tiny.cloud/1/${this.apiKey}/tinymce/${this.cloudChannel}/tinymce.min.js`:this.tinymceScriptSrc}initEditor(a){M(a,"blur",this.destroy$).subscribe(()=>{this.ngZone.run(()=>this.onTouchedCallback())}),M(a,this.modelEvents,this.destroy$).subscribe(()=>{this.ngZone.run(()=>this.emitOnChange(a))}),"string"==typeof this.initialValue&&this.ngZone.run(()=>{a.setContent(this.initialValue),a.getContent()!==this.initialValue&&this.emitOnChange(a),void 0!==this.onInitNgModel&&this.onInitNgModel.emit(a)})}emitOnChange(a){this.onChangeCallback&&this.onChangeCallback(a.getContent({format:this.outputFormat}))}}return s.\u0275fac=function(a){return new(a||s)(o.GI1(o.GMv),o.GI1(o.WW2),o.GI1(o.AHE),o.GI1(j,8))},s.\u0275cmp=o.In1({type:s,selectors:[["editor"]],inputs:{cloudChannel:"cloudChannel",apiKey:"apiKey",init:"init",id:"id",initialValue:"initialValue",outputFormat:"outputFormat",inline:"inline",tagName:"tagName",plugins:"plugins",toolbar:"toolbar",modelEvents:"modelEvents",allowedEvents:"allowedEvents",ignoreEvents:"ignoreEvents",disabled:"disabled"},standalone:!0,features:[o.M5G([V]),o.eg9,o.UHJ],decls:1,vars:0,template:function(a,u){1&a&&o.yuY(0,C,0,0,"ng-template")},dependencies:[e.MD,x.y],styles:["[_nghost-%COMP%]{display:block}"]}),s})(),H=(()=>{class s{}return s.\u0275fac=function(a){return new(a||s)},s.\u0275mod=o.a4G({type:s}),s.\u0275inj=o.s3X({imports:[D]}),s})()}}]);
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.