PageSourceSearch

https://unstop.com/chunk-GLKKAVSJ.js

js unstop.com collected 2026-10-02 02:40:49 UTC 31,303 bytes, 1 lines download raw bytes

1import{a as Xt,c as te}from"./chunk-EBRYC4VM.js";import"./chunk-UATYYMOY.js";import"./chunk-LUCEHHO7.js";import"./chunk-HLYFGZCT.js";import{a as S}from"./chunk-J7UV6LKQ.js";import{Aa as j,Ca as L,Da as N,Ea as G,Fa as O,Ga as Jt,ha as z,la as Zt,na as K,oa as A,pa as qt,qa as I,sa as x,va as Qt,xa as Yt,ya as B}from"./chunk-72Z74J2Y.js";import"./chunk-DFIXFBEZ.js";import"./chunk-XBKTZI5N.js";import"./chunk-EOUMGIMU.js";import"./chunk-IF7WX336.js";import{a as $t,b as Wt}from"./chunk-XFT76LM3.js";import{h as Ht}from"./chunk-HZTZ7UDT.js";import"./chunk-E66GKE4J.js";import{a as Kt}from"./chunk-VDHMNIPW.js";import{a as Ft,b as Dt}from"./chunk-COB7JTXP.js";import{a as Pt,b as Ot}from"./chunk-B7MEV2DH.js";import"./chunk-HHQ3DLDR.js";import{a as Bt,b as jt}from"./chunk-IJXHQE24.js";import"./chunk-NJY6F3LT.js";import"./chunk-NYVKXIEZ.js";import"./chunk-DCKGCHBL.js";import{b as Vt}from"./chunk-GHXZGKMT.js";import"./chunk-GQBR7ALB.js";import"./chunk-V3LPMSAU.js";import"./chunk-57P7T2RM.js";import"./chunk-7RWCIHFI.js";import"./chunk-TZPNXZD6.js";import"./chunk-FO7KVHCD.js";import"./chunk-YS4QL7HL.js";import"./chunk-YAUIJJXG.js";import"./chunk-NKG7VJI6.js";import"./chunk-SM333LUT.js";import"./chunk-GGQDMCFC.js";import"./chunk-2IEV6FMW.js";import{a as At}from"./chunk-TWZBNSN4.js";import"./chunk-55MTUKAX.js";import"./chunk-2HJPFN3S.js";import"./chunk-HIEQIAO6.js";import"./chunk-V3ARBFDV.js";import"./chunk-BYHBQABE.js";import{e as Nt}from"./chunk-6NHZTPCS.js";import"./chunk-GWP52JAF.js";import"./chunk-SBK5GHAF.js";import"./chunk-C22WGXC3.js";import"./chunk-PYESVWFJ.js";import"./chunk-ZCP5KTTM.js";import"./chunk-WAF2UKPS.js";import"./chunk-R3QRL77R.js";import"./chunk-G2NZI5V3.js";import"./chunk-62DYWMYT.js";import"./chunk-TEBKKOGH.js";import"./chunk-UMK6AGIS.js";import"./chunk-4QX5TW7Y.js";import"./chunk-7UZYWCAJ.js";import"./chunk-RIQOBMUM.js";import{j as bt,l as wt,o as yt}from"./chunk-WX25E2HZ.js";import"./chunk-I5K7UUBW.js";import"./chunk-6BAE5M2B.js";import{a as Rt,b as zt}from"./chunk-GPTXSPLI.js";import"./chunk-WSF7ZPQZ.js";import{a as It,b as Tt,c as kt,d as St,e as Lt}from"./chunk-7KBFIBUW.js";import"./chunk-JYXQ74JV.js";import"./chunk-7A7LFYDL.js";import"./chunk-IQBBAARC.js";import"./chunk-CWWNL6ZE.js";import"./chunk-FSAIB72R.js";import{L as Ut,i as Gt,o as Et}from"./chunk-X474JN3X.js";import"./chunk-OLSNRRTA.js";import"./chunk-GJNXMHJK.js";import"./chunk-CLUIJ6WE.js";import"./chunk-XWMJJGBF.js";import{a as Mt}from"./chunk-5G7452JJ.js";import"./chunk-O6NNHBDA.js";import{h as vt}from"./chunk-VK3ZU6WP.js";import{G as xt,m as ut,p as gt,u as Ct,z as ft}from"./chunk-BRHCVEVW.js";import{$b as Y,Be as mt,Ed as at,Fd as st,Ga as W,Gc as E,Gd as rt,Ic as M,Jc as P,Mc as tt,Me as R,Nc as et,Ob as l,Oc as p,Pc as r,Qa as d,Qc as c,Ra as _,Rc as U,Sd as ct,Tb as q,Td as lt,Ub as Q,Wa as Z,Zc as y,ac as g,ae as D,be as ht,ce as dt,ed as C,ge as _t,hc as J,hd as a,ic as X,ld as it,mc as f,md as nt,me as pt,nd as ot,rd as V,td as T,w as $,wd as m,xa as ae,xd as F,yd as k}from"./chunk-7DV7UWC6.js";import"./chunk-XS7UEPGF.js";import{n as w}from"./chunk-IP4IO47A.js";R();ae();R();var re=["searchFilter"],ce=o=>({side_model_overRide:o}),le=()=>["transparent","primary-50"],he=(o,h)=>h.docId;function de(o,h){if(o&1){let t=y();r(0,"div",5),C("click",function(){d(t);let i=a();return _(i.hideBox())}),c()}}function _e(o,h){}function pe(o,h){o&1&&f(0,_e,0,0,"ng-template")}function me(o,h){if(o&1&&(r(0,"div",6)(1,"div",7),f(2,pe,1,0,null,8),c()()),o&2){let t=a(),e=V(4);p("ngClass",lt(3,ce,t.canOpenChat[t.chatType])),l(),p("@slideInRightOnEnter",void 0),l(),p("ngTemplateOutlet",e)}}function ue(o,h){o&1&&(r(0,"div",10)(1,"div",13),U(2,"img",14),c()())}function ge(o,h){}function Ce(o,h){o&1&&f(0,ge,0,0,"ng-template")}function fe(o,h){if(o&1&&(r(0,"div",9),M(1,ue,3,0,"div",10),r(2,"div",11)(3,"div",12),f(4,Ce,1,0,null,8),c()()()),o&2){let t=a(),e=V(4);l(),P(t.viewport()!="mobile"?1:-1),l(3),p("ngTemplateOutlet",e)}}function xe(o,h){if(o&1){let t=y();r(0,"un-icon",28),C("click",function(){d(t);let i=a(2);return _(i.hideBox())})("keydown.enter",function(){d(t);let i=a(2);return _(i.hideBox())})("keydown.space",function(i){d(t);let n=a(2);return i.preventDefault(),_(n.hideBox())}),c()}o&2&&p("icon","arrows_left.svg")("size",20)}function ve(o,h){if(o&1){let t=y();r(0,"un-modal",29),C("closeModal",function(){d(t);let i=a(2);return _(i.showInfoModal=!1)}),r(1,"un-modal-header")(2,"h2"),m(3," Community Guidelines: "),c(),r(4,"span",30),C("click",function(){d(t);let i=a(2);return _(i.showInfoModal=!1)})("keydown.enter",function(){d(t);let i=a(2);return _(i.showInfoModal=!1)})("keydown.space",function(i){d(t);let n=a(2);return i.preventDefault(),_(n.showInfoModal=!1)}),m(5," close "),c()(),r(6,"un-modal-content")(7,"ol")(8,"li"),m(9," Do not use inappropriate language, or share explicit content. This includes any form of nudity or pornography. "),c(),r(10,"li"),m(11," Harassment of any kind will not be tolerated. "),c(),r(12,"li"),m(13," Any form of hate speech, including but not limited to racism, sexism, homophobia or religious intolerance, is strictly prohibited. "),c(),r(14,"li"),m(15," Do not engage in any illegal activities or encourage others to do so. "),c(),r(16,"li"),m(17," If you encounter a user who is violating these guidelines or making you feel uncomfortable, report it to supp
1[email protected] immediately. "),c()()(),r(18,"un-modal-footer")(19,"button",31),C("click",function(){d(t);let i=a(2);return _(i.showInfoModal=!1)}),m(20,"Close"),c()()()}o&2&&p("size","sm")("position","center")("mobileSlide","right")}function be(o,h){if(o&1&&(r(0,"div",36),U(1,"d2c-img",37),c()),o&2){let t=a(2).$implicit;l(),p("width",40)("url",t.img)("alt",t.name)}}function we(o,h){if(o&1&&(r(0,"span",42),m(1),D(2,"date"),D(3,"dateAgo"),c()),o&2){let t=a(3).$implicit;l(),k(" ",ht(3,4,dt(2,1,!(t==null||t.last_message_sent_at==null)&&t.last_message_sent_at.seconds?(t==null||t.last_message_sent_at==null?null:t.last_message_sent_at.seconds)*1e3:t==null?null:t.last_message_sent_at,"medium"))," ")}}function ye(o,h){if(o&1&&(r(0,"div",46),m(1),c()),o&2){let t=a(3).$implicit;l(),k(" ",t.unreadMessage," ")}}function Me(o,h){if(o&1&&(r(0,"div",38)(1,"div",39)(2,"div",40)(3,"h2",41),m(4),c(),M(5,we,4,6,"span",42),c(),r(6,"div",43)(7,"p",41),m(8),c(),r(9,"div",44),f(10,ye,2,1,"div",45),c()()()()),o&2){let t=a(2).$implicit;l(4),F(t.name),l(),P(t!=null&&t.last_message_sent_at?5:-1),l(3),F(t.org),l(2),p("ngIf",t.unreadMessage>0)}}function Pe(o,h){if(o&1){let t=y();r(0,"div",33),C("click",function(){d(t);let i=a().$implicit,n=a(2);return _(n.openChat(i))})("keydown.enter",function(){d(t);let i=a().$implicit,n=a(2);return _(n.openChat(i))})("keydown.space",function(i){d(t);let n=a().$implicit,s=a(2);return i.preventDefault(),_(s.openChat(n))}),f(1,be,2,3,"div",34)(2,Me,11,4,"div",35),c()}if(o&2){let t=a().$implicit,e=a(2);T("unread",t.unreadMessage>0)("active",e.activeChatId==t.docId),E("aria-label","Open chat with "+t.name),l(),p("ngIf",t.hasOwnProperty("active")&&t.active==!0),l(),p("ngIf",t.hasOwnProperty("active")&&t.active==!0)}}function Oe(o,h){if(o&1&&f(0,Pe,3,7,"div",32),o&2){let t=h.$implicit;p("ngIf",t.hasOwnProperty("active")&&t.active==!0)}}function Ie(o,h){o&1&&(r(0,"un-alerts",47),m(1," You\u2019ll see your messages here! "),c()),o&2&&p("type","info")("hideIcon",!0)("closeIcon",!1)}function Te(o,h){if(o&1&&(r(0,"un-alerts",47),m(1),c()),o&2){let t=a(3);p("type","info")("hideIcon",!0)("closeIcon",!1),l(),k(' We cannot find anyone with the name "',t.searchterm,'" ')}}function ke(o,h){if(o&1&&(r(0,"div",26),M(1,Ie,2,3,"un-alerts",47)(2,Te,2,4,"un-alerts",47),c()),o&2){let t=a(2);l(),P(t.searchterm?2:1)}}function Se(o,h){if(o&1){let t=y();r(0,"div",48)(1,"div",49)(2,"app-chat-panel",50),C("closeComponent",function(i){d(t);let n=a(2);return _(n.onChatPanelClosed(i))}),c()()()}if(o&2){let t=a(2);T("in",t.GlobalChat.hideChatBox),l(2),p("FromGlobalChat",!0)("userId",t.userId)("reciver_user_Id",t.reciver_user_Id)("chatType",t.chatType)("docKey",t.activeChatId)("encUserKey",t.encUserKey)}}function Le(o,h){if(o&1){let t=y();r(0,"div",15)(1,"div",16)(2,"div",17),M(3,xe,1,2,"un-icon",18),m(4," Messaging "),c(),r(5,"div",19)(6,"un-icon",20),C("click",function(){d(t);let i=a();return _(i.showInfoModal=!0)})("keydown.enter",function(){d(t);let i=a();return _(i.showInfoModal=!0)})("keydown.space",function(i){d(t);let n=a();return i.preventDefault(),_(n.showInfoModal=!0)}),c(),M(7,ve,21,3,"un-modal",21),c()(),r(8,"div",22,1),C("scroll",function(){d(t);let i=a();return _(i.onWindowScroll())}),r(10,"div",23)(11,"un-input",24),rt("ngModelChange",function(i){d(t);let n=a();return st(n.searchterm,i)||(n.searchterm=i),_(i)}),C("keyup",function(i){d(t);let n=a();return _(n.filterChatList(i))})("keydown.enter",function(i){d(t);let n=a();return _(n.filterChatList(i))})("iconRightEvent",function(i){d(t);let n=a();return _(n.emptyInput(i))}),c()(),tt(12,Oe,1,1,"div",25,he,!1,ke,3,1,"div",26),c()(),f(15,Se,3,8,"div",27)}if(o&2){let t=a();l(3),P(t.viewport()=="mobile"?3:-1),l(3),p("icon","info_black.svg")("size",20)("bgSize",40)("bg",ct(18,le)),l(),P(t.showInfoModal?7:-1),l(3),T("scrolled",t.searchScrolled),l(),at("ngModel",t.searchterm),p("type","text")("iconRight",(t.searchterm==null?null:t.searchterm.length)>0?"close.svg":"")("size","medium")("placeholder","Search")("name","chat-search")("iconLeft","search.svg"),E("aria-label","Search chats"),l(),et(t.chatsList),l(3),p("ngIf",t.canOpenChat[t.chatType]&&t.GlobalChat.hideChatBox)}}var H=(()=>{class o{constructor(t,e,i,n,s,v,b,u,ee,ie,ne,oe){this.GlobalChat=t,this.Firestore=e,this.auth=i,this.renderer=n,this.router=s,this.route=v,this.localStorageService=b,this.viewportService=u,this.destroyRef=ee,this.http=ie,this.cdr=ne,this.ngZone=oe,this.closeBox=new q,this.chatsList=[],this.activeChatId=0,this.activeChatLastMessageTime=null,this.userId=0,this.reciver_user_Id=0,this.first=0,this.closseChatPanel=!1,this.showChatInModal=!0,this.viewport=pt(()=>this.viewportService.viewport()),this.searchterm=null,this.docKey=null,this.chatType="P2P",this.searchScrolled=!1,this.canOpenChat={P2P:!1,O2P:!1,GRP:!1},this.encUserKey="",this.showInfoModal=!1,this.escapeKeyListener=null}getkeys(){return w(this,null,function*(){return new Promise(t=>{this.GlobalChat.getUserEncKey().subscribe(e=>{this.encUserKey=e.data,t(!0)})})})}ngOnInit(){return w(this,null,function*(){this.escapeKeyListener=this.renderer.listen("window","keydown.escape",()=>{this.closseChatPanel||this.hideBox()}),yield this.getkeys(),this.GlobalChat.ChatOpenFromMEnubar=!0,this.OneTimeChatSubscription&&this.OneTimeChatSubscription.unsubscribe(),this.curentUser=this.auth.currentUser,this.userId=this.curentUser.id;let t=yield this.GlobalChat.getAllIntitatedChatDoc();if(t.length>0){this.chatsList=this.traversAndMapChats(t),this.UnMutableChatlist=this.chatsList,this.router.url.includes("/chatGlobal")&&(this.showChatInModal=!1,this.chatsList.length&&this.viewport()==="desktop"&&this.openChat(this.chatsList[0]));
1let e=this.route.snapshot.queryParams.token,i=this.localStorageService.decEncData(e);if(i){let n=this.chatsList.find(s=>s?.user_id==i);n&&this.openChat(n)}}else this.triggerDefaultChat();this.subscribeToChatListUpdates(),this.router.url.includes("/chatGlobal")&&(this.showChatInModal=!1),this.openOverlay()})}subscribeToChatListUpdates(){this.chatListRealtimeSub&&this.chatListRealtimeSub.unsubscribe();let t=x(this.Firestore,"users",this.userId+"");this.chatListRealtimeSub=A(t).subscribe(e=>{e&&this.ngZone.run(()=>w(this,null,function*(){try{let i=yield this.GlobalChat.getAllIntitatedChatDoc();if(i&&i.length>0){if(this.chatsList=this.traversAndMapChats(i),this.activeChatId&&this.activeChatLastMessageTime){let n=this.chatsList.findIndex(s=>s.docId==this.activeChatId);n>-1&&(this.chatsList[n].last_message_sent_at=this.activeChatLastMessageTime)}if(this.chatsList=this.sortChats([...this.chatsList]),this.activeChatId&&this.chatsList.length){let n=this.chatsList.findIndex(s=>s.docId==this.activeChatId);n>-1&&(this.chatsList[n].unreadMessage=0)}this.UnMutableChatlist=this.chatsList,this.searchterm&&(this.chatsList=this.UnMutableChatlist.filter(n=>n.name?.toLowerCase().includes(this.searchterm.toLowerCase()))),this.cdr.detectChanges()}}catch(i){console.error("Error refreshing chat list:",i)}}))})}openOverlay(){this.previousFocusedElement=document.activeElement,setTimeout(()=>{let t=document.querySelector('[aria-modal="true"]');t instanceof HTMLElement&&t.focus()},0)}onWindowScroll(){(this.searchFilter?.nativeElement?.scrollTop||document.body.scrollTop)>30?this.searchScrolled=!0:this.searchScrolled=!1}hideBox(){this.closeBox.emit("close chat "),this.closseChatPanel=!0,this.previousFocusedElement&&this.previousFocusedElement.focus()}ngOnDestroy(){this.escapeKeyListener&&(this.escapeKeyListener(),this.escapeKeyListener=null),this.renderer.removeClass(document.body,"hide-scroll"),this.chatListRealtimeSub&&this.chatListRealtimeSub.unsubscribe(),this.activeChatDocSub&&this.activeChatDocSub.unsubscribe(),this.OneTimeChatSubscription&&this.OneTimeChatSubscription.unsubscribe()}openFirstChat(t){if(console.log(t),this.chatsList=this.traversAndMapChats(t),this.chatsList.length==0)return;this.activeChatId=this.chatsList[0].docId,this.chatsList[0].unreadMessage=0,console.log(this.chatsList),this.activeChat=this.chatsList[0],this.setChatType(this.chatsList[0]),this.activeChat.unreadMessage=0;let e=this.getSenderAndReceiver(this.activeChatId);for(let i=0;i<e.length;i++){let n=e[i];n!=this.curentUser.id&&(this.reciver_user_Id=n)}this.first=1,this.checkOpenChat(this.chatType,this.reciver_user_Id),this.UnMutableChatlist=this.chatsList,console.log("chatsList",this.chatsList)}checkOpenChat(t,e){t=="P2P"?this.canOpenChat.P2P=e>0:t=="O2P"?this.canOpenChat.O2P=e>0:t=="GRP"&&(this.canOpenChat.GRP=!0)}setChatType(t){t.chat_type?this.chatType=t.chat_type:this.chatType="P2P"}openChat(t){if(this.manageUnreadMessageCountFromUnstop(t),!(t.docId.includes("org")||t.docId.includes("3057298-")||t.docId.includes("-3057298")||t?.delete_older)){let i=new Date("2024-07-01T00:00:00Z"),n=x(this.Firestore,"chats",t.docId),s=L(I(n,"message"),O("time","<",i)),v=Jt(this.Firestore);Qt(s).then(b=>{b.forEach(u=>{console.log("Message:",u.id,u.data()),v.delete(u.ref)}),G(n,{delete_older:1}).then(u=>{console.log('this.NewFireStore.collection("chats" openchat',u)}),v.commit().then(()=>{console.log("Messages deleted and chat marked as deleted."),console.log(`Deleted ${b.size} messages in chat ${t.docId}`)}).catch(u=>{console.error("Error in batch operation:",u)})})}let e=this.getSenderAndReceiver(t.docId);for(let i=0;i<e.length;i++){let n=e[i];n!=this.curentUser.id&&(this.reciver_user_Id=n)}this.setChatType(t),this.activeChat=t,this.activeChatId=t.docId,this.checkOpenChat(this.chatType,this.reciver_user_Id),this.activeChat.unreadMessage=0,this.activeChat[this.auth.currentUser.id+"_unread_messages"]=0,this.first=1,this.GlobalChat.hideChatBox=!0,this.searchterm=null,this.chatsList=this.UnMutableChatlist,console.log(this.activeChat),this.subscribeToActiveChatDoc()}subscribeToActiveChatDoc(){this.activeChatDocSub&&this.activeChatDocSub.unsubscribe();let t=x(this.Firestore,"chats",this.activeChatId+"");this.activeChatDocSub=A(t).subscribe(e=>{!e||!e.last_message_sent_at||this.ngZone.run(()=>{this.activeChatLastMessageTime=e.last_message_sent_at;let i=this.chatsList.findIndex(s=>s.docId==this.activeChatId);i>-1&&(this.chatsList[i].last_message_sent_at=e.last_message_sent_at);let n=this.UnMutableChatlist.findIndex(s=>s.docId==this.activeChatId);n>-1&&(this.UnMutableChatlist[n].last_message_sent_at=e.last_message_sent_at),this.chatsList=this.sortChats([...this.chatsList]),this.UnMutableChatlist=this.sortChats([...this.UnMutableChatlist]),this.cdr.detectChanges()})})}sortChats(t){return t.sort(function(e,i){let n=s=>s?typeof s=="string"?new Date(s).getTime()/1e3:(s.seconds||0)+(s.nanoseconds||0)/1e9:0;return n(i.last_message_sent_at)-n(e.last_message_sent_at)})}onChatPanelClosed(t){return w(this,null,function*(){try{let e=yield this.GlobalChat.getAllIntitatedChatDoc();e&&e.length>0&&(this.chatsList=this.traversAndMapChats(e),this.UnMutableChatlist=this.chatsList,this.cdr.detectChanges())}catch(e){console.error("Error refreshing chat list after panel close:",e)}})}
1traversAndMapChats(t){return t.forEach(e=>{if(!e.hasOwnProperty("delete")||e.delete!=1){let i,n=this.getSenderAndReceiver(e.docId);for(let s=0;s<n.length;s++){let v=n[s];v!=this.curentUser.id&&(i=v)}return e.unreadMessage=e[this.userId+"_unread_messages"],e.name=e[i+"_name"],e.img=e[i+"_avatar"],e.org=e[i+"_org_name"],e.last_message_sent_at||(e.last_message_sent_at={seconds:1640995200,nanoseconds:0}),e}}),t=t.filter(e=>{if(e.active==!0&&!(e.hasOwnProperty("hide_chat")&&e.hide_chat==1))return e}),t=t.sort(function(e,i){let n=s=>s?typeof s=="string"?new Date(s).getTime()/1e3:(s.seconds||0)+(s.nanoseconds||0)/1e9:0;return n(i.last_message_sent_at)-n(e.last_message_sent_at)}),console.log("chats---------------",t),t}getSenderAndReceiver(t){return t.split("-").map(n=>n.split(":")[0])}filterChatList(t){console.log(t.target.value),this.searchterm=t.target.value,this.chatsList=this.UnMutableChatlist,this.chatsList=this.chatsList.filter(e=>{if(e.name.toLowerCase().includes(t.target.value.toLowerCase()))return e}),console.log("this.chatsList",this.chatsList,this.reciver_user_Id)}triggerDefaultChat(){return w(this,null,function*(){this.encUserKey||(yield this.getkeys());let t=this.curentUser.id,e={user_id:3057298,name:"Unstop",reciver_user_id:t,reciver_user_name:this.curentUser.name,sender:"751fee59f0f6350c57bbfdb5ba0c3b22",receiver:""};e[t+"_name"]=this.curentUser.name,e[t+"_org_name"]=this.curentUser.organisation.name,e["3057298_org_name"]="Unstop",e["3057298_name"]="Unstop",e[t+"_avatar"]=this.curentUser.avatar,e["3057298_avatar"]="https://d8it4huxumps7.cloudfront.net/uploads/images/6414141f563c8_whatsapp.jpg",e.chat_blocked=0,e.active=!0,e["3057298_unread_messages"]=0,e[this.curentUser.id+"_unread_messages"]=1,e.last_message_sent_at=z(),3057298<t?this.docKey="3057298-"+t:this.docKey=t+"-3057298",console.log("this.docKey,data",this.docKey,e,this.docKey),console.log("this.docKey,data",this.docKey,e,this.docKey),N(x(this.Firestore,"chats",this.docKey),e).then(i=>{console.log(i);let n={user:3057298,message:"Hello! Welcome to Unstop. :)",time:z(),message_type:1,read:0};N(x(this.Firestore,"users",this.userId+""),{total_unread_messages:1}).then(()=>{console.log("default total read message count set done")}),qt(I(x(this.Firestore,"chats",this.docKey),"message"),n).then(s=>{this.GlobalChat.chatInititated(this.docKey).subscribe(b=>{console.log("data",b)}),console.log(s);let v=this.auth.currentUser.id+"_unread_messages";K(L(I(this.Firestore,"chats"),j(O("sender","==",this.encUserKey),O("receiver","==",this.encUserKey)),B(1e3)),{idField:"docId"}).subscribe(b=>{console.log("this.OneTimeChatSubscription = collectionData(",b),this.OneTimeChatSubscription=K(L(I(this.Firestore,"chats"),j(O("sender","==",this.encUserKey),O("receiver","==",this.encUserKey)),B(1e3)),{idField:"docId"}).subscribe(u=>{console.log("collectionData collectionDatacollectionData",u),u.length>0&&(this.chatsList=this.traversAndMapChats(u),this.UnMutableChatlist=this.chatsList,this.router.url.includes("/chatGlobal")&&(this.showChatInModal=!1,this.chatsList.length&&this.viewport()==="desktop"&&this.openChat(this.chatsList[0]))),this.OneTimeChatSubscription.unsubscribe()})})})})})}emptyInput(t){t&&(this.searchterm=null,this.chatsList=this.UnMutableChatlist)}manageUnreadMessageCountFromUnstop(t){let e=this.curentUser.id;if(3057298<e?e="3057298-"+e:e=e+"-3057298",t[this.curentUser.id+"_unread_messages"]>0){let i={[this.curentUser.id+"_unread_messages"]:0,unreadMessage:0};G(x(this.Firestore,"chats",t.docId),i).then(()=>(console.log("Unread message count reset for chat document!"),G(x(this.Firestore,"users",this.curentUser.id+""),{total_unread_messages:Yt(-1)}))).then(n=>(console.log("Unread message count decremented for user!",n),!0)).catch(n=>{console.error("Error updating unread counts:",n)})}}getAllIntitatedChatDoc(){return w(this,null,function*(){return(yield $(this.http.get("/api/chat/all-intitated-docs"))).data})}static{this.\u0275fac=function(e){return new(e||o)(g(S),g(Zt),g(Nt),g(Y),g(wt),g(bt),g(Mt),g(Kt),g(Z),g(vt),g(mt),g(Q))}}static{this.\u0275cmp=J({type:o,selectors:[["app-global-chat"]],viewQuery:function(e,i){if(e&1&&it(re,5),e&2){let n;nt(n=ot())&&(i.searchFilter=n.first)}},hostBindings:function(e,i){e&1&&C("scroll",function(s){return i.onWindowScroll(s)})},outputs:{closeBox:"closeBox"},standalone:!1,decls:5,vars:3,consts:[["chatContent",""],["searchFilter",""],["class","transparent_bg",3,"click",4,"ngIf"],["aria-modal","true","role","dialog","aria-label","Messaging","tabindex","-1",3,"ngClass",4,"ngIf"],["class","chat_wrapper full-width",4,"ngIf"],[1,"transparent_bg",3,"click"],["aria-modal","true","role","dialog","aria-label","Messaging","tabindex","-1",3,"ngClass"],[1,"send_invite","side_model"],[4,"ngTemplateOutlet"],[1,"chat_wrapper","full-width"],[1,"left_sect"],[1,"right_sect"],[1,"chat-global-container"],[1,"img_box"],["src","https://d8it4huxumps7.cloudfront.net/uploads/images/68553dc385f4d_messaging.png?d=500x500","alt","messages","width","351","height","305"],[1,"chat_list_wrapper"],[1,"box_title","j-between"],[1,"align-center","gap10"],["role","button","tabindex","0","aria-label","Back",3,"icon","size"],[1,"align-center"],["asBtn","","rounded","full","aria-label","Community Guidelines","role","button","tabindex","0",1,"curs
1or-pointer",3,"click","keydown.enter","keydown.space","icon","size","bgSize","bg"],[3,"size","position","mobileSlide"],[1,"chat_list","custom-scrollbar","thin",3,"scroll"],[1,"search_filter"],["rounded","",3,"ngModelChange","keyup","keydown.enter","iconRightEvent","ngModel","type","iconRight","size","placeholder","name","iconLeft"],["role","button","tabindex","0",1,"user_img",3,"unread","active"],[1,"m_12"],["class","user_chat_wrapper",3,"in",4,"ngIf"],["role","button","tabindex","0","aria-label","Back",3,"click","keydown.enter","keydown.space","icon","size"],[3,"closeModal","size","position","mobileSlide"],["role","button","tabindex","0","aria-label","Close Guidelines",1,"close","material-icons",3,"click","keydown.enter","keydown.space"],["unButtonBorder","",3,"click"],["class","user_img","role","button","tabindex","0",3,"unread","active","click","keydown.enter","keydown.space",4,"ngIf"],["role","button","tabindex","0",1,"user_img",3,"click","keydown.enter","keydown.space"],["class","img vertical-align",4,"ngIf"],["class","content",4,"ngIf"],[1,"img","vertical-align"],[3,"width","url","alt"],[1,"content"],[1,"user_info"],[1,"j-between"],[1,"single-wrap"],[1,"date"],[1,"btm","j-between"],[1,"btm-right-detail"],["class","unread_msg vertical-align",4,"ngIf"],[1,"unread_msg","vertical-align"],[3,"type","hideIcon","closeIcon"],[1,"user_chat_wrapper"],[1,"chat_box_wrapper"],[3,"closeComponent","FromGlobalChat","userId","reciver_user_Id","chatType","docKey","encUserKey"]],template:function(e,i){e&1&&f(0,de,1,0,"div",2)(1,me,3,5,"div",3)(2,fe,5,2,"div",4)(3,Le,16,19,"ng-template",null,0,_t),e&2&&(p("ngIf",!i.closseChatPanel&&i.showChatInModal||!i.closseChatPanel&&i.viewport()=="mobile"),l(),p("ngIf",!i.closseChatPanel&&i.showChatInModal||!i.closseChatPanel&&i.viewport()=="mobile"),l(),p("ngIf",!i.showChatInModal&&i.viewport()!="mobile"))},dependencies:[ut,gt,Ct,Xt,Bt,Ft,Rt,Pt,Gt,Et,$t,It,Tt,kt,St,ft,At],styles:[".transparent_bg[_ngcontent-%COMP%]{position:fixed;right:0;bottom:0;width:100%;height:100%;z-index:999;background:transparent}.m_12[_ngcontent-%COMP%]{margin:12px}.side_model[_ngcontent-%COMP%]{position:fixed;right:0;bottom:0;width:100%;max-width:360px;box-shadow:-2px -5px 22px #1c498033;border-radius:16px 0 0 16px;z-index:9999;height:80vh;background:var(--grey-00);display:flex}@media screen and (max-width: 767px){.side_model[_ngcontent-%COMP%]{top:0;height:100vh;width:100%;max-width:100%;border-radius:0}}.active_user_info[_ngcontent-%COMP%]{box-shadow:-1px 2px 4px #1c49800f;height:58px;padding:0 20px}.active_user_info[_ngcontent-%COMP%]   .user_img[_ngcontent-%COMP%]{border:0;padding:0;width:calc(100% - 50px)}.active_user_info[_ngcontent-%COMP%]   .user_img[_ngcontent-%COMP%]:before{content:none}.active_user_info[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:32px;height:32px}.box_title[_ngcontent-%COMP%]{color:var(--grey-1100);height:56px;font-size:16px;line-height:130%;font-weight:500;position:sticky;top:0;padding-right:10px;padding-left:20px;border-bottom:1px solid var(--grey-200)}.chat_list_wrapper[_ngcontent-%COMP%]{width:360px;border-right:1px solid var(--grey-200);border-radius:16px 0 0 16px;overflow:hidden}@media (max-width: 767px){.chat_list_wrapper[_ngcontent-%COMP%]{width:100%;position:absolute;z-index:999}}.user_chat_wrapper[_ngcontent-%COMP%]{width:calc(100% - 360px)}@media (max-width: 767px){.user_chat_wrapper[_ngcontent-%COMP%]{width:100%;position:absolute;right:-100%;transition:.4s;opacity:0}.user_chat_wrapper.in[_ngcontent-%COMP%]{right:0;opacity:1}}.search_filter[_ngcontent-%COMP%]{padding:12px 20px;position:sticky;top:0;background:var(--grey-00);z-index:9;transition:.3s}.search_filter[_ngcontent-%COMP%]     .un_input{margin-bottom:0!important}.search_filter.scrolled[_ngcontent-%COMP%]{box-shadow:0 2px 8px #0000000f}.input_search[_ngcontent-%COMP%]{position:relative;padding:12px 20px}.input_search[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{position:absolute;color:#1c498099;font-size:18px;top:15px;left:14px}.input_search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background:#f4f6f999;border:1px solid #f4f6f9;border-radius:12px;box-sizing:border-box;height:47px;padding:0 12px 0 40px;margin:0}.input_search[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder{color:#1c498099;font-size:12px;font-weight:500}.chat_list[_ngcontent-%COMP%]{height:calc(80vh - 56px);overflow-y:scroll}@media (max-width: 767px){.chat_list[_ngcontent-%COMP%]{height:calc(100vh - 56px)}}.img[_ngcontent-%COMP%]{height:40px;width:40px;border-radius:50%;position:relative;background:var(--grey-00);color:var(--blue-700);overflow:hidden;border:1px solid var(--grey-200)}.img[_ngcontent-%COMP%]     span{color:var(--blue-700);font-size:20px}.img[_ngcontent-%COMP%]     img{max-width:100%;max-height:100%}.img[_ngcontent-%COMP%]   .online[_ngcontent-%COMP%]{height:13px;width:13px;border-radius:50%;position:absolute;top:4px;left:0;background:#01a768;border:2px solid var(--grey-00)}.img[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:100%;max-height:100%;border-radius:50%}.content[_ngcontent-%COMP%]{flex:1;width:calc(100% - 48px)}.content[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{color:var(--grey-1100);font-size:14px;font-weight:500;margin-bottom:4px;transition:.4s;cursor:pointer;line-height:130%;max-width:calc(100% - 65px)}.content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:130%;color:var(--grey-800);max-width:195px;margin:0}.content[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{color:var(--grey-500);font-size:10px;font-weight:400;line-height:130%;text-wrap:nowrap}
1.content[_ngcontent-%COMP%]   .btm[_ngcontent-%COMP%]{gap:16px}.content[_ngcontent-%COMP%]   .btm-right-detail[_ngcontent-%COMP%]{display:flex;gap:6px}.content[_ngcontent-%COMP%]   .btm-right-detail[_ngcontent-%COMP%]   .unread_msg[_ngcontent-%COMP%]{width:16px;height:16px;background:var(--blue-700);color:var(--grey-00);font-size:10px;border-radius:50%;font-weight:500;line-height:130%}.user_img[_ngcontent-%COMP%]{position:relative;cursor:pointer;padding:16px 20px;gap:8px;display:flex;border-bottom:.5px solid var(--grey-200)}.user_img[_ngcontent-%COMP%]:nth-child(1){border-top:.5px solid var(--grey-200)}.user_img.unread[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%], .user_img.unread[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-weight:700!important}@media screen and (min-width: 799px){.user_img[_ngcontent-%COMP%]:hover{background:var(--primary-50)}.user_img.active[_ngcontent-%COMP%]{background:var(--blue-100)}}.user_img[_ngcontent-%COMP%]     d2c-img img{min-width:auto}.other_info[_ngcontent-%COMP%]{text-align:center}.other_info[_ngcontent-%COMP%]   .date[_ngcontent-%COMP%]{font-size:12px;font-weight:500}.user_ctrl[_ngcontent-%COMP%]{cursor:pointer}.chat_box_wrapper[_ngcontent-%COMP%]     .chat-panel{position:relative;box-shadow:none;width:100%;background:var(--grey-00)}@media (max-width: 800px){.chat_box_wrapper[_ngcontent-%COMP%]     .chat-panel{height:100vh}.chat_box_wrapper[_ngcontent-%COMP%]     .chat-panel .chat_inner{height:calc(100vh - 137px)}}.side_model_overRide[_ngcontent-%COMP%]     .side_model{transition:.5s;max-width:850px;border:1px solid var(--grey-200);box-shadow:0 8px 24px #0000001a}.blocked_tag[_ngcontent-%COMP%]{background:#d8524a;padding:3px 8px;position:absolute;top:0;right:0;border-radius:2px}.blocked_tag[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#fff}.no-data[_ngcontent-%COMP%]{color:var(--grey-800);font-size:12px;line-height:130%;padding:8px 20px}.chat-instruction[_ngcontent-%COMP%]{text-align:left}.chat-instruction[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-weight:600;font-size:14px;line-height:100%}.chat-instruction[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{padding-left:20px;margin:10px 0 0;display:list-item}.chat-instruction[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{font-weight:500;font-size:12px;line-height:20px;list-style-type:disc;margin-bottom:5px}.chat-instruction[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:last-child{margin-bottom:0}.chat-global-container[_ngcontent-%COMP%]{height:calc(100vh - 65px);background:var(--grey-00);border-radius:0;display:flex}.chat-global-container[_ngcontent-%COMP%]   .user_chat_wrapper[_ngcontent-%COMP%]{width:500px}.chat-global-container[_ngcontent-%COMP%]   .chat_list[_ngcontent-%COMP%]{height:calc(100vh - 121px)}.chat-global-container[_ngcontent-%COMP%]     app-chat-panel .chat_inner{height:calc(100vh - 121px)}.chat-global-container[_ngcontent-%COMP%]     app-chat-panel .chat-list{max-height:calc(100vh - 200px)!important}.chat-global-container[_ngcontent-%COMP%]     app-chat-panel .chats{max-height:calc(100vh - 125px)!important}@media (min-width: 801px){.chat_wrapper[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.chat_wrapper[_ngcontent-%COMP%]   .left_sect[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;border-right:1px solid var(--grey-200)}.chat_wrapper[_ngcontent-%COMP%]   .left_sect[_ngcontent-%COMP%]   .img_box[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%}}ol[_ngcontent-%COMP%]{padding-left:20px}ol[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:normal;color:var(--text-secondary);margin-bottom:16px}"],data:{animation:[Ht({duration:500})]}})}}return o})();R();var Ge=[{path:"",component:H}],Ee=yt.forChild(Ge),Ui=(()=>{class o{constructor(){}resolveComponent(){return H}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275mod=X({type:o})}static{this.\u0275inj=W({providers:[S],imports:[xt,Ee,te,jt,Dt,Vt,zt,Ot,Ut,Wt,Lt]})}}return o})();export{Ui as GlobalChatModule};

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.