PageSourceSearch

https://progpol.pl/8774.87615b3d2e1a3a04.js

js progpol.pl collected 2026-10-08 12:05:10 UTC 64,913 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwebclient_webpack=self.webpackChunkwebclient_webpack||[]).push([[8774],{7211:(B,C,e)=>{e.d(C,{f:()=>f});var n=e(38561),h=e(7673);class f{constructor(p){this.contact=p,this.appContact=n.KA.create(p)}updateChatList(p){return(0,h.of)(p.map(r=>this.updateChat(r)))}updateChat(p){let r=!1;const m=p.participants.merge({items:p.participants.items.map(v=>{if(v.contact.id===this.appContact.id&&v.contact.type===this.appContact.type){r=!0;const I=new n.KA(this.appContact.id,this.appContact.type,this.appContact.bridgeId,this.appContact);return Object.assign(I.currentProfile,v.contact.currentProfile),I.forceShowProfile=v.contact.forceShowProfile,v.merge({contact:I})}return v})});return r?p.merge({participants:m}):p}}},7517:(B,C,e)=>{e.d(C,{o:()=>f});var n=e(2615),h=e(73664);let f=(()=>{class l{static{this.\u0275fac=function(m){return new(m||l)}}static{this.\u0275cmp=h.VBU({type:l,selectors:[["app-check-solid-icon"],["","app-check-solid-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 448 512"],["d","M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"]],template:function(m,v){1&m&&(n.qSk(),h.rj2(0,"svg",0),h.Hgh(1,"path",1),h.eux())},encapsulation:2})}}return l})()},8470:(B,C,e)=>{e.d(C,{Y:()=>f});var n=e(2615),h=e(73664);let f=(()=>{class l{static{this.\u0275fac=function(m){return new(m||l)}}static{this.\u0275cmp=h.VBU({type:l,selectors:[["app-ellipsis-v-regular-icon"],["","app-ellipsis-v-regular-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 128 512"],["d","M64 208c26.5 0 48 21.5 48 48s-21.5 48-48 48-48-21.5-48-48 21.5-48 48-48zM16 104c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48zm0 304c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48z"]],template:function(m,v){1&m&&(n.qSk(),h.rj2(0,"svg",0),h.Hgh(1,"path",1),h.eux())},encapsulation:2})}}return l})()},20836:(B,C,e)=>{e.d(C,{Hx:()=>bt,Fr:()=>Et,vL:()=>ht,QW:()=>K,zh:()=>yt,vO:()=>lt});var n=e(57786),h=e(7673),f=e(1807),l=e(18530),p=e(84572),r=e(983),m=e(44437),v=e(19724),I=e(2615),u=e(16444),P=e(47355),t=e(1211),T=e(71985),F=e(58750),O=e(39974),M=e(54360);var q=e(73028),$=e(25558),A=e(96354),ut=e(63489),Q=e(99172),rt=e(53993),ct=e(99437),Ct=e(44668),J=e(70274),D=e(96697),U=e(5964),R=e(25174),k=e(44915),G=e(72339),at=e(38561);class it{constructor(E,g){this.typingChat=E,this.timeExpired=g}updateChatList(E){return(0,h.of)(this.timeExpired?this.unMarkTyping(E):this.markTyping(E))}updateChat(E){return this.timeExpired?this.deleteTyping(E):this.markChatTyping(E)}markTyping(E){return E.map(g=>g.id===this.typingChat.IdConversation?this.markChatTyping(g):g)}markChatTyping(E){return E.merge({typing:E.isOverallGroupChat?E.getParticipant(this.t
1ypingChat.IdRecipient)?.contact??at.a3:at.a3})}deleteTyping(E){return E.merge({typing:void 0})}unMarkTyping(E){return E.map(g=>g.id===this.typingChat.IdConversation?this.deleteTyping(g):g)}}var Z=e(38666),Mt=e(70329),Y=e(33971),j=e(63034);class ft{constructor(E){this.chats=E}updateChatList(E){return(0,h.of)(this.chats)}}var Pt=e(83762),It=e(35437),st=e(78534),Tt=e(44724),St=e(79804),Dt=e(7211),ot=e(33916),Ot=e(20039);function K(L,E){return L.LastMessages.map(g=>{const _=L.Participants.find(b=>b.IdConversation===g.IdConversation);return _?P.ry.FromPartyInfo(_,E,g):void 0}).filter(Pt.z2)}function lt(L){return L.sort((E,g)=>E.lastSended&&g.lastSended?g.lastSended.getTime()-E.lastSended.getTime():0)}const ht=()=>L=>L.pipe(function i(L,E,g,_){return(0,O.N)((b,x)=>{let N;E&&"function"!=typeof E?({duration:g,element:N,connector:_}=E):N=E;const w=new Map,tt=X=>{w.forEach(X),X(x)},pt=X=>tt(z=>z.error(X));let gt=0,vt=!1;const _t=new M.H(x,X=>{try{const z=L(X);let H=w.get(z);if(!H){w.set(z,H=_?_():new l.B);const dt=function Rt(X,z){const H=new T.c(dt=>{gt++;const et=z.subscribe(dt);return()=>{et.unsubscribe(),0===--gt&&vt&&_t.unsubscribe()}});return H.key=X,H}(z,H);if(x.next(dt),g){const et=(0,M._)(H,()=>{H.complete(),et?.unsubscribe()},void 0,void 0,()=>w.delete(z));_t.add((0,F.Tg)(g(dt)).subscribe(et))}}H.next(N?N(X):X)}catch(z){pt(z)}},()=>tt(X=>X.complete()),pt,()=>w.clear(),()=>(vt=!0,0===gt));b.subscribe(_t)})}(E=>E.IdConversation),(0,q.Z)(E=>E.pipe((0,$.n)(g=>(0,n.h)((0,h.of)(new it(g)),(0,f.O)(2100).pipe((0,A.T)(()=>new it(g,!0)))))))),yt=L=>E=>E.pipe((0,ut.i)((g,_)=>_ instanceof Array?(0,h.of)([...g,..._.filter(b=>!g.find(x=>x.id===b.id))]):_.updateChatList(g),L.chats.toArray()),(0,A.T)(g=>new st.G({chats:(0,Ot.B8)(lt(g)),serverResponse:!0})),(0,Q.Z)(L)),Et={from:0,count:(0,Y.W0)(),fromScratch:!0};let bt=(()=>{class L{constructor(){this.myPhoneSvc=(0,I.WQX)(u.gx),this.chatEventsService=(0,I.WQX)(Tt.j),this.chatSearchService=(0,I.WQX)(It.C),this.unreadChatNotificationService=(0,I.WQX)(j.O),this.loadMoreChats$=ne
1w l.B,this.chatRemoved$=this.myPhoneSvc.myPhoneSession.pipe((0,$.n)(b=>b.conversationRemoved$),(0,A.T)(b=>b.IdConversation));const _=b=>(0,p.z)([this.myPhoneSvc.myPhoneSession,this.myPhoneSvc.myPhoneSession.pipe((0,$.n)(x=>x.chatIsAllowed$))]).pipe((0,$.n)(([x,N])=>N?this.leftBarChatActions(x).pipe(yt(new st.G),(0,rt.E)(this.chatSearchService.filterText$),(0,A.T)(([w,tt])=>w.merge({searchText:tt,chats:w.chats.filter(pt=>pt.isArchived===b)}))):(0,h.of)(new st.G({serverResponse:!0}))),(0,Q.Z)(new st.G),(0,ct.W)(x=>(this.chatEventsService.error$.next(x),r.w)),(0,Ct.t)({refCount:!0,bufferSize:1}));this.chatsList$=_(!1),this.archivedChatList$=_(!0)}leftBarChatActions(g){return(0,n.h)(g.contactUpdated$.pipe((0,A.T)(_=>new Dt.f(_))),g.newChatMessages$.pipe((0,J.H)(_=>{const b=_.map(x=>x.IdConversation).filter((x,N,w)=>w.indexOf(x)===N).map(x=>this.getChatById(x).pipe((0,D.s)(1)));return(0,m.y)(...b).pipe((0,A.T)(x=>new R.s(_,x)),(0,ct.W)(x=>(console.warn(x),r.w)))})),g.unreadChatCount$.pipe((0,A.T)(_=>new k.F(_))),g.anonymousSessionClosed.pipe((0,A.T)(_=>new Z.L(_))),g.chatTransferred$.pipe((0,A.T)(_=>new Mt.u(!1,_.PartyInfo,g,!0))),g.conversationRemoved$.pipe((0,A.T)(_=>new G.N(_.IdConversation))),g.conversationInfo$.pipe((0,A.T)(_=>new Mt.u(_.IsNew,_.Conversation,g))),g.chatMessageState$.pipe((0,A.T)(_=>new St.x(_))),this.loadMoreChats$.pipe((0,Q.Z)(Et),(0,$.n)(_=>(0,p.z)([this.chatSearchService.filterText$,this.chatEventsService.selectedChatFolder$,this.unreadChatNotificationService.unreadMessagesCount$]).pipe((0,D.s)(1),(0,$.n)(([b,x,N])=>{const w=new t.SDV({IsArchived:x===ot.l.ArchiveMenu,SearchString:b?`%${b}%`:"",Count:_.count,From:_.from});return function xt(L,E,g){return L.get(E).pipe((0,A.T)(_=>lt(K(_,L).map(N=>{const w=g.Items.find(tt=>tt.IdConversation===N.id);return w?N.merge({unreadCount:w.Count}):N}))))}(g,w,N)}),(0,A.T)(b=>_.fromScratch?new ft(b):b)))),g.userTyping$.pipe(ht()))}getConversationByID(g){const _=new t.$RH;return _.IdConversation=g,this.myPhoneSvc.get(_).pipe((0,A.T)(b=>b))}getChatById(g){return this.chatsList$.pipe((0,D.s)(1),(0,A.T)(_=>_.chats.find(b=>b.id===g)),(0,$.n)(_=>_?(0,v.H)([_]):this.requestNewChat(g)))}requestNewChat(g){return this.myPhoneSvc.myPhoneSession.pipe((0,$.n)(_=>this.myPhoneSvc.myPhoneSession.pipe((0,$.n)(b=>b.chatIsAllowed$),(0,$.n)(b=>(0,h.of)(b).pipe((0,U.p)(x=>x),(0,$.n)(()=>this.getConversationByID(g).pipe((0,U.p)(x=>!!x.Conversation),(0,A.T)(x=>P.ry.FromPartyInfo(x.Conversation,_)))))))))}static{this.\u0275fac=function(_){return new(_||L)}}static{this.\u0275prov=I.jDH({token:L,factory:L.\u0275fac})}}return L})()},22398:(B,C,e)=>{e.d(C,{L:()=>f});var n=e(20039),h=e(2615);let f=(()=>{class l{constructor(){this._selected=(0,n.NZ)()}get selected(){return this._selected}clearSelection(){this._selected=(0,n.NZ)()}toggle(r,m){this._selected=m?this._selected.add(r):this._selected.remove(r)}isSelected(r){return this._selected.has(r)}forward(r){}static{this.\u0275fac=function(m){return new(m||l)}}static{this.\u0275prov=h.jDH({token:l,factory:l.\u0275fac})}}return l})()},22429:(B,C,e)=>{e.d(C,{D:()=>m});var n=e(2615),h=e(73664),f=e(17705),l=e(33726),p=e(70152);let m=(()=>{class v{height(u){return isNaN(u.offsetHeight)?u.document.documentElement.clientHeight:u.offsetHeight}pageYOffset(u){return isNaN(window.scrollY)?u.document.documentElement.scrollTop:u.ownerDocument.defaultView.scrollY}offsetTop(u){if(u.getBoundingClientRect)return u.getBoundingClientRect().top+this.pageYOffset(u)}defaultHandler(){let u=0,P=0;if(this.container===this.windowElement)u=this.height(this.container)+this.pageYOffset(this.container[0].document.documentElement),P=this.offsetTop(this.elem)+this.height(this.elem);else{u=this.height(this.container);let F=0;void 0!==this.offsetTop(this.container)&&(F=this.offsetTop(this.container)),P=this.offsetTop(this.elem)-F+this.height(this.elem)}this.infiniteScrollUseDocumentBottom&&(P=this.height((this.elem[0].ownerDocument||this.elem[0].document).documentElement)),P-u<=this.height(this.container)*this.infiniteScrollDistance+(this.zeroBased?0:1)?(this.checkWhenEnabled=!0,this.scrollEnabled&&this.infiniteScrollCallback.emit()):this.checkWhenEnabled=!1}handleInfiniteScrollDisabled(u){this.scrollEnabled=!u,this.scrollEnabled&&this.checkWhenEnabled&&(this.checkWhenEnabled=!1)}changeContainer(u){void 0!==this.scrollSubscription&&(this.scrollSubscription.unsubscribe(),this.scrollSubscription=void 0),this.container=u,null!=u&&(this.scrollSubscription=(0,l.R)(u,"scroll").pipe((0,p.B)(300)).subscribe(P=>this.defaultHandler()))}handleInfiniteScrollContainer(u){if(null==u||0===u.length)return;const P=this.elem.closest(u);if(null==P)throw new Error("invalid infinite-scroll-container attribute.");this.changeContainer(P)}constructor(){this.zone=(0,n.WQX)(h.SKi),this.infiniteScrollCallback=(0,f.CGW)(),this.infiniteScrollDistance=0,this.infiniteScrollDisabled=!1,this.infiniteScrollUseDocumentBottom=!1,this.zeroBased=!1,this.infiniteScrollParent=!1,this.infiniteScrollImmediateCheck=!1,this.windowElement=window,this.scrollEnabled=null,this.checkWhenEnabled=null,this.container=null,this.hostProps={width:0,height:0};const u=(0,n.WQX)(h.aKT);this.elem=u.nativeElement}ngOnChanges(u){u.infiniteScrollDisabled&&this.handleInfiniteScrollDisabled(this.infiniteScrollDisabled),u.infiniteScrollContainer&&this.handleInfiniteScrollContainer(this.infiniteScrollContainer||[])}ngAfterViewInit(){this.handleInfiniteScrollDisabled(this.infiniteScrollDisabled),this.handleInfiniteScrollContainer(this.infiniteScrollContainer||this.windowElement)}ngAfterContentInit(){const u=()=>{const P=this.elem.offsetHeight,t=this.elem.offsetWidth;
1(P!==this.hostProps.height||t!==this.hostProps.width)&&(this.hostProps={width:t,height:P},this.zone.run(()=>{this.defaultHandler()}))};setTimeout(()=>{u(),this.sizeCheckInterval=this.zone.runOutsideAngular(()=>setInterval(u,300))})}ngOnDestroy(){void 0!==this.scrollSubscription&&this.scrollSubscription.unsubscribe(),clearInterval(this.sizeCheckInterval)}static{this.\u0275fac=function(P){return new(P||v)}}static{this.\u0275dir=h.FsC({type:v,selectors:[["","infiniteScroll",""]],inputs:{infiniteScrollContainer:"infiniteScrollContainer",infiniteScrollDistance:"infiniteScrollDistance",infiniteScrollDisabled:"infiniteScrollDisabled",infiniteScrollUseDocumentBottom:"infiniteScrollUseDocumentBottom",infiniteScrollListenForEvent:"infiniteScrollListenForEvent",zeroBased:"zeroBased",infiniteScrollParent:"infiniteScrollParent",infiniteScrollImmediateCheck:"infiniteScrollImmediateCheck"},outputs:{infiniteScrollCallback:"infiniteScrollCallback"},features:[h.OA$]})}}return v})()},24147:(B,C,e)=>{e.d(C,{I:()=>t});var n=e(52645),h=e(1211),f=e(7517),l=e(32834),p=e(68018),r=e(73664);function m(T,F){1&T&&r.nrm(0,"i",1)}function v(T,F){1&T&&r.nrm(0,"i",2)}function I(T,F){1&T&&r.nrm(0,"i",3)}function u(T,F){if(1&T&&(r.nrm(0,"i",3),r.nVh(1,I,1,0,"i",3)),2&T){const O=r.XpG(2);r.R7$(),r.vxM(O.mes.isRead?1:-1)}}function P(T,F){if(1&T&&(r.j41(0,"span",0),r.nI1(1,"translate"),r.nVh(2,m,1,0,"i",1)(3,v,1,0,"i",2)(4,u,2,1),r.k0s()),2&T){let O;const M=r.XpG();r.Y8G("title",r.bMT(1,2,M.messageStatus)),r.R7$(2),r.vxM((O=M.mes.messageMainStatus)===M.Delivery.CDS_NotDelivered?2:O===M.Delivery.CDS_Failed?3:O===M.Delivery.CDS_Delivered?4:-1)}}let t=(()=>{class T{constructor(){this.mes=n.zD,this.Delivery=h.XfZ}get messageStatus(){switch(this.mes?.messageMainStatus){case this.Delivery.CDS_Delivered:return this.mes.isRead?"_i18n.Message_read":"_i18n.Message_delivered";case this.Delivery.CDS_Failed:return"_i18n.Message_failed";case this.Delivery.CDS_NotDelivered:return"_i18n.Message_was_not_delivered";default:return""}}static{this.\u0275fac=function(M){return new(M||T)}}static{this.\u0275cmp=r.VBU({type:T,selectors:[["delivered-check"]],inputs:{mes:"mes"},decls:1,vars:1,consts:[[3,"title"],["app-check-solid-icon","",1,"svg-xs","fillIconWithTertiary"],["app-times-regular-icon","",1,"svg-xs","fillIconRed"],["app-check-solid-icon","",1,"svg-xs","fillIconBlueVariant"]],template:function(M,i){1&M&&r.nVh(0,P,5,4,"span",0),2&M&&r.vxM(i.mes?0:-1)},dependencies:[f.o,l.R,p.D9],styles:["[_nghost-%COMP%]{display:inline-block;width:18px;height:12px;position:relative;flex:none}i[_ngcontent-%COMP%]{position:absolute;top:0;right:0}i[_ngcontent-%COMP%]:not(:last-child){left:0}"]})}}return T})()},25174:(B,C,e)=>{e.d(C,{s:()=>h});var n=e(7673);class h{constructor(l,p){this.newMessages=l,this.messageChats=p}updateChat(l){return this.updateLastMessage(l,this.newMessages,!0)}updateLastMessage(l,p,r){const m=this.newMessages.reduce((I,u)=>u.Id>I.Id?u:I,p[0]);l=l.merge({id:m.IdConversation,isArchived:!1,lastSended:new Date,lastMessageObject:m});const v=p.filter(I=>I.IsNew);return m.IsNew&&(l=l.merge({hasUnread:!r,unreadCount:l.unreadCount?l.unreadCount+v.length:v.length})),l}updateChatList(l){const p=this.messageChats?.filter(r=>!l.some(m=>m.id===r.id))??[];return p.length>0&&(l=l.concat(p)),(0,n.of)(this.updateMessages(l,this.newMessages))}updateMessages(l,p){return l.map(r=>{const m=p.filter(v=>v.IdConversation===r.id);return m&&m.length>0&&(r=this.updateLastMessage(r,m)),r})}}},28804:(B,C,e)=>{e.d(C,{e:()=>h});var n=e(73664);let h=(()=>{class f{transform(p){return p.calendar(void 0,{sameDay:"[_i18n.Today]",lastDay:"[_i18n.Yesterday]",lastWeek:"dddd",sameElse:"L"})}static{this.\u0275fac=function(r){return new(r||f)}}static{this.\u0275pipe=n.EJ8({name:"messageDate",type:f,pure:!0})}}return f})()},28891:(B,C,e)=>{e.d(C,{$:()=>h});
1const h=new(e(2615).nKC)("BASE_CHAT_PATH")},31335:(B,C,e)=>{e.d(C,{L:()=>f});var n=e(2615),h=e(34330);let f=(()=>{class l{constructor(){this.breakpointObserver=(0,n.WQX)(h.Q)}prepareRoute(r){return this.breakpointObserver.isMatched("screen and (max-width: 767px)")?(r&&r.activatedRouteData&&r.activatedRouteData.animation)??"root":"root"}static{this.\u0275fac=function(m){return new(m||l)}}static{this.\u0275prov=n.jDH({token:l,factory:l.\u0275fac})}}return l})()},32723:(B,C,e)=>{e.d(C,{B:()=>J});var n=e(47355),h=e(17705),f=e(96081),l=e(75982),p=e(24147),r=e(29912),m=e(8470),v=e(62382),I=e(64631),u=e(72200),P=e(68018),t=e(46007),T=e(28804),F=e(31390),O=e(82869),M=e(2615),i=e(73664);function q(D,U){if(1&D&&(i.j41(0,"p",7),i.EFF(1),i.nI1(2,"chatParticipantId"),i.nI1(3,"async"),i.nI1(4,"translate"),i.k0s()),2&D){const R=i.XpG(2);i.R7$(),i.Lme("",i.bMT(3,4,i.bMT(2,2,R.chat.typing))," ",i.bMT(4,6,"_i18n.UserTyping"))}}function $(D,U){if(1&D&&i.nrm(0,"delivered-check",10),2&D){const R=i.XpG(3);i.Y8G("mes",R.chat.lastMessageObject)}}function A(D,U){if(1&D&&(i.j41(0,"div",11),i.nrm(1,"show-svg-images",13),i.k0s()),2&D){const R=i.XpG(3);i.R7$(),i.Y8G("svg",R.chat.lastMessageObject.messageIcon)}}function ut(D,U){if(1&D&&(i.nVh(0,$,1,1,"delivered-check",10),i.nVh(1,A,2,1,"div",11),i.nrm(2,"p",12),i.nI1(3,"translateSystemMessage"),i.nI1(4,"async"),i.nI1(5,"translateSystemMessage"),i.nI1(6,"async")),2&D){const R=i.XpG(2);i.vxM(R.chat.isLastMessageMine&&R.chat.lastMessageObject.showDeliveryStatus?0:-1),i.R7$(),i.vxM(R.chat.lastMessageObject.messageIcon?1:-1),i.R7$(),i.AVh("fw-bold",R.chat.hasUnread),i.Y8G("title",i.bMT(4,10,i.brH(3,6,R.chat.lastMessageObject,!1,!0)))("innerHTML",i.bMT(6,14,i.bMT(5,12,R.chat.lastMessageObject)),i.npT)}}function Q(D,U){if(1&D&&(i.j41(0,"span",8),i.EFF(1),i.k0s()),2&D){const R=i.XpG(2);i.R7$(),i.JRh(R.chat.unreadCount)}}function rt(D,U){1&D&&(i.j41(0,"div",9),i.EFF(1),i.nI1(2,"translate"),i.k0s()),2&D&&(i.R7$(),i.JRh(i.bMT(2,1,"_i18n.Archive")))}function ct(D,U){if(1&D&&(i.j41(0,"div",5),i.nVh(1,q,5,8,"p",7)(2,ut,7,16),i.nVh(3,Q,2,1,"span",8),i.nVh(4,rt,3,3,"div",9),i.k0s()),2&D){const R=i.XpG();i.R7$(),i.vxM(R.chat.typing?1:R.chat.lastMessageObject?2:-1),i.R7$(2),i.vxM(!R.hideUnread&&R.chat.unreadCount?3:-1),i.R7$(),i.vxM(R.chat.isArchived?4:-1)}}function Ct(D,U){if(1&D){const R=i.RV6();i.j41(0,"button",14),i.nI1(1,"translate"),i.bIt("click",function(G){M.eBV(R);const at=i.XpG();return M.Njj(at.showMenu(G))}),i.k0s()}2&D&&i.Y8G("title",i.mNQ(i.bMT(1,2,"_i18n.ShowMore")))}let J=(()=>{class D{constructor(){this.chat=n.Kc,this.hideUnread=!1,this.menuEnabled=!0,this.menuClick=(0,h.CGW)()}showMenu(R){this.menuClick.emit(R)}static{this.\u0275fac=function(k){return new(k||D)}}static{this.\u0275cmp=i.VBU({type:D,selectors:[["chat-item"]],inputs:{chat:"chat",hideUnread:"hideUnread",menuEnabled:"menuEnabled"},outputs:{menuClick:"menuClick"},decls:20,vars:34,consts:[[1,"icon-cell",3,"title","ext"],[1,"header-cell"],[3,"chat"],["data-qa","header-name",1,"header-name",3,"title"],["data-qa","last-sent",1,"last-sent",3,"title"],[1,"small","message-cell"],["type","button","app-ellipsis-v-regular-icon","",1,"context-btn","btn","btn-plain-sm",3,"title"],[1,"message-cell-text","user-typing"],["data-qa","chat-unread",1,"badge","bg-brand"],["data-qa","chat-archive",1,"archive-badge"],[3,"mes"],[1,"status-icon-other"],["data-qa","message-text",1,"message-cell-text",3,"title","innerHTML"],[1,"customSVGIcons","svg-xs",3,"svg"],["type","button","app-ellipsis-v-regular-icon","",1,"context-btn","btn","btn-plain-sm",3,"click","title"]],template:function(k,G){1&k&&(i.nrm(0,"app-avatar",0),i.nI1(1,"translate"),i.j41(2,"div",1),i.nrm(3,"provider-image",2),i.j41(4,"p",3),i.nI1(5,"chatTitle"),i.nI1(6,"async"),i.nI1(7,"translate"),i.EFF(8),i.nI1(9,"chatTitle"),i.nI1(10,"async"),i.k0s(),i.j41(11,"small",4),i.nI1(12,"amDateFormat"),i.EFF(13),i.nI1(14,"amLocal"),i.nI1(15,"messageDate"),i.nI1(16,"translate"),i.nI1(17,"lowercase"),i.k0s()(),i.nVh(18,ct,5,3,"div",5),i.nVh(19,Ct,2,4,"button",6)),2&k&&(i.Y8G("title",G.chat.isGroupChat?i.bMT(1,11,"_i18n.GroupChatDescription"):"")("ext",null==G.chat||null==G.chat.de
1stination?null:G.chat.destination.contact),i.R7$(3),i.Y8G("chat",G.chat),i.R7$(),i.Y8G("title",i.mNQ(i.bMT(7,17,i.bMT(6,15,i.bMT(5,13,G.chat))))),i.R7$(4),i.SpI(" ",i.bMT(10,21,i.bMT(9,19,G.chat))),i.R7$(3),i.Y8G("title",i.mNQ(i.i5U(12,23,G.chat.lastSended,"LL"))),i.R7$(2),i.JRh(i.bMT(17,32,i.bMT(16,30,i.bMT(15,28,i.bMT(14,26,G.chat.lastSended))))),i.R7$(5),i.vxM(G.chat.lastSended?18:-1),i.R7$(),i.vxM(G.menuEnabled&&G.chat.lastSended?19:-1))},dependencies:[f.f,l.E,p.I,r.d,m.Y,v.a,I.h,u.Jj,u.GH,P.D9,t.b,T.e,F.H,O.n],styles:['[_nghost-%COMP%]{align-items:center;cursor:pointer;border-top:1px solid var(--border-color);display:grid;grid-template-columns:50px 1fr auto;grid-template-rows:27px 23px;column-gap:5px;grid-template-areas:"icon header header" "icon message context-btn";background:var(--bg-primary)}.avatar-style-circle   [_nghost-%COMP%]{border:none}.icon-cell[_ngcontent-%COMP%]{grid-area:icon}.message-cell[_ngcontent-%COMP%]{grid-area:message;align-self:center;display:flex;flex-direction:row;gap:5px;align-items:center;min-width:0}.message-cell[_ngcontent-%COMP%]   .status-icon-other[_ngcontent-%COMP%]{padding-left:7px}.message-cell[_ngcontent-%COMP%]   .archive-badge[_ngcontent-%COMP%]{border:1px solid var(--border-color);padding:1px 5px 0;border-radius:3px;font-size:smaller;margin-left:5px}.message-cell[_ngcontent-%COMP%]   .message-cell-text[_ngcontent-%COMP%]{flex:1;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-typing[_ngcontent-%COMP%]{color:inherit}.context-btn[_ngcontent-%COMP%]{grid-area:context-btn;height:auto}.header-cell[_ngcontent-%COMP%]{align-self:center;min-width:0;grid-area:header;display:flex;flex-direction:row;align-items:center}.header-cell[_ngcontent-%COMP%]   .header-name[_ngcontent-%COMP%]{flex:1;align-self:flex-start;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-cell[_ngcontent-%COMP%]   .last-sent[_ngcontent-%COMP%]{padding-right:.5em}']})}}return D})()},33916:(B,C,e)=>{e.d(C,{l:()=>n});var n=function(h){return h.None="main",h.ArchiveMenu="archive",h.Monitor="monitor",h}(n||{})},35437:(B,C,e)=>{e.d(C,{C:()=>f});var n=e(84412),h=e(2615);let f=(()=>{class l{constructor(){this.filterText$=new n.t("")}static{this.\u0275fac=function(m){return new(m||l)}}static{this.\u0275prov=h.jDH({token:l,factory:l.\u0275fac})}}return l})()},38666:(B,C,e)=>{e.d(C,{L:()=>h});var n=e(7673);class h{constructor(l){this.state=l}updateChatList(l){return(0,n.of)(l.map(p=>p.id===this.state.IdConversation?this.updateChat(p):p))}updateChat(l){return l.merge({closeReason:this.state.CloseReason,participants:l.participants.merge({items:l.participants.items.map(p=>(p.isExternal&&p.contact.setContactProfile(!1),p))})})}}},40720:(B,C,e)=>{e.d(C,{E:()=>f});var n=e(2615),h=e(73664);let f=(()=>{class l{constructor(){this.templateRef=(0,n.WQX)(h.C4Q)}static{this.\u0275fac=function(m){return new(m||l)}}static{this.\u0275dir=h.FsC({type:l,selectors:[["","appCrmContactsRef",""]]})}}return l})()},40838:(B,C,e)=>{e.d(C,{k:()=>he,R:()=>pe});var n=e(2615),h=e(20039),f=e(84412);let l=(()=>{class c{constructor(){this.selectedItems$=new f.t((0,h.B8)())}isEmpty(){return this.items.isEmpty()}get items(){return this.selectedItems$.value}setItems(a){this.selectedItems$.next(a)}clear(){this.setItems((0,h.B8)())}isSelected(a){return this.items.some(s=>s.number===a.number)}toggleSelection(a){this.isSelected(a)?this.setItems(this.items.filter(s=>s.number!==a.number)):this.setItems(this.items.push(a))}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275prov=n.jDH({token:c,factory:c.\u0275fac})}}return c})();var p=e(90394),r=e(83762),m=e(24337),v=e(57303),I=e(63078),u=e(66409),P=e(68018),t=e(73664);const T=[[["",8,"layout-inner-chat-header"]],[["",8,"layout-inner-chat-content"]]],F=[".layout-inner-chat-header",".layout-inner-chat-content"];let O=(()=>{class c{constructor(){this.location=(0,n.WQX)(v.aZ),this.title=""}back(){this.location.back()}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["app-layout-inner-chat"]],inputs:{title:"title"},ngContentSelectors:F,decls:11,vars:11,consts:[[2,"position","relative"],[1,"layout-type2-header","bg"],[1,"b-b","p-2","fw-bold","aside-align","d-flex","align-items-center",3,"title"],["data-qa","go-back","app-arrow-left-light-icon","",1,"btn","btn-plain","me-1",3,"click","title"],[1,"search-wrapper","b-b"]],template:function(s,o){1&s&&(t.NAR(T),t.j41(0,"layout-type2",0)(1,"div",1)(2,"div",2),t.nI1(3,"translate"),t.j41(4,"a",3),t.nI1(5,"translate"),t.bIt("click",function(){return o.back()}),t.k0s(),t.EFF(6),t.nI1(7,"translate"),t.k0s(),t.j41(8,"div",4),t.SdG(9),t.k0s()(),t.SdG(10,1,[1,"layout-type2-content"]),t.k0s()),2&s&&(t.R7$(2),t.Y8G("title",t.mNQ(t.bMT(3,5,"_i18n.GoBack"))),t.R7$(2),t.Y8G("title",t.mNQ(t.bMT(5,7,"_i18n.GoBack"))),t.R7$(2),t.SpI(" ",t.bMT(7,9,o.title)," "))},dependencies:[I.g,u.$,P.D9],encapsulation:2})}}return c})();var M=e(89417),i=e(35606),q=e(94681),$=e(96081),A=e(19543),ut=e(9852),Q=e(72200);let rt=(()=>{class c{constructor(){this.item=q.n}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["app-chat-participant"]],hostVars:2,hostBindings:function(s,o){2&s&&t.AVh("disabled",o.disableReason)},inputs:{item:"item",disableReason:"disableReason"},decls:14,vars:18,consts:[[3,"ext"],["data-qa","item-name",1,"part-name","text-truncate","text-md"],["data-qa","item-number",1,"part-number","me-1"],["data-qa","item-status",1,"part-status","text-truncate"],["data-qa","item-disable-reason",1,"part-info","me-1","text-truncate"]],template:function(s,o){1&s&&(t.nrm(0,"app-avatar",0),t.j41(1,"span",1),t.EFF(2),t.nI1(3,"lforfl"),t.nI1(4,"async"),t.k0s(),t.j41(5,"small",2),t.EFF(6),t.k0s(),t.j41(7,"small",3),t.EFF(8),t.nI1(9,"userProfile"),t.nI1(10,"async"),t.k0s(),t.j41(11,"small",4),t.EFF(12),t.nI1(13,"translate"),t.k0s()),2&s&&(t.Y8G("ext",null==o.item?null:o.item.contact),t.R7$(2),t.JRh(t.bMT(4,8,t.i5U(3,5,o.item.contact,o.item.name))),t.R7$(4),t.JRh(o.item.number),t.R7$(2),t.JRh(t.bMT(10,14,t.brH(9,10,null==o.item.contact?null:o.item.contact.profile,null==o.item.contact?null:o.item.contact.
1isBusy,null==o.item.contact?null:o.item.contact.isRegistered))),t.R7$(4),t.JRh(t.bMT(13,16,o.disableReason)))},dependencies:[$.f,A.R,ut._,P.D9,Q.Jj],styles:['[_nghost-%COMP%]{align-items:center;display:grid;grid-template-areas:"avatar name name name" "avatar phone status info";grid-template-columns:auto auto 1fr auto;grid-template-rows:27px 23px}.disabled[_nghost-%COMP%]{background-color:var(--bg-disabled)!important;color:var(--text-disabled)!important;cursor:not-allowed}[_nghost-%COMP%]   app-avatar[_ngcontent-%COMP%]{grid-area:avatar}[_nghost-%COMP%]   .part-name[_ngcontent-%COMP%]{grid-area:name;align-self:flex-end}[_nghost-%COMP%]   .part-number[_ngcontent-%COMP%]{grid-area:phone;align-self:flex-start}[_nghost-%COMP%]   .part-status[_ngcontent-%COMP%]{grid-area:status;align-self:flex-start}[_nghost-%COMP%]   .part-info[_ngcontent-%COMP%]{grid-area:info;align-self:flex-start}']})}}return c})();function ct(c,W){if(1&c&&t.nrm(0,"app-chat-participant",6),2&c){const a=W.$implicit;t.Y8G("item",a),t.BMQ("data-id",a.number)}}let Ct=(()=>{class c{constructor(){this.selected=(0,n.WQX)(l),this.chatLocatorSevice=(0,n.WQX)(p.e),this.modalService=(0,n.WQX)(m.B),this.processing=!1,this.groupName=""}get isNothingSelected(){return this.selected.isEmpty()}onKeyDown(a){"Enter"===a.key&&!this.isNothingSelected&&this.startChat()}startChat(){this.processing||(this.processing=!0,this.chatLocatorSevice.createConversation(this.selected.items.map(a=>a.contact).filter(r.z2).toArray(),this.groupName).subscribe({next:a=>{this.selected.clear(),this.chatLocatorSevice.openChatById(a.Conversation.IdConversation),this.processing=!1},error:a=>{this.modalService.error(a),this.processing=!1}}))}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],decls:12,vars:13,consts:[[3,"title"],[1,"layout-inner-chat-header","d-flex","align-items-center","py-1"],["wcAutofocus","","type","text",1,"form-control","ms-2","me-2",3,"keydown","ngModelChange","maxlength","ngModel","placeholder"],["id","btnStartChat","type","button",1,"btn","btn-border","me-2","text-truncate",3,"click","disabled"],[1,"layout-inner-chat-content"],[1,"list-group","list-group-lg","mb-0","m-t-n-xxs","scrollable","overflow-v"],[1,"grid-group-item",3,"item"]],template:function(s,o){1&s&&(t.j41(0,"app-layout-inner-chat",0),t.nI1(1,"translate"),t.j41(2,"div",1)(3,"input",2),t.nI1(4,"translate"),t.bIt("keydown",function(y){return o.onKeyDown(y)}),t.mxI("ngModelChange",function(y){return t.DH7(o.groupName,y)||(o.groupName=y),y}),t.k0s(),t.j41(5,"button",3),t.bIt("click",function(){return o.startChat()}),t.EFF(6),t.nI1(7,"translate"),t.k0s()(),t.j41(8,"div",4)(9,"ul",5),t.Z7z(10,ct,1,2,"app-chat-participant",6,t.fX1),t.k0s()()()),2&s&&(t.Y8G("title",t.bMT(1,7,"_i18n.ComposeGroupChat")),t.R7$(3),t.Y8G("placeholder",t.mNQ(t.bMT(4,9,"_i18n.TypeGroupChatNameHere")))("maxlength",255),t.R50("ngModel",o.groupName),t.R7$(2),t.Y8G("disabled",o.processing||o.isNothingSelected),t.R7$(),t.SpI(" ",t.bMT(7,11,"_i18n.StartChat")," "),t.R7$(4),t.Dyx(o.selected.items))},dependencies:[O,M.X1,M.me,M.BC,M.tU,i.J,M.YN,M.vS,rt,P.D9],styles:[".layout-inner-chat-header[_ngcontent-%COMP%]{min-height:50px}"]})}}return c})();var J=e(252),D=e(28891),U=e(17705),R=e(44652),k=e(96049),G=e(18530),at=e(983),it=e(84572),Z=e(7673),Mt=e(18810),Y=e(25558),j=e(96354),ft=e(99437),Pt=e(44668),It=e(88141),st=e(23294),Tt=e(23386),St=e(81546),Dt=e(61594),ot=e(16444),Ot=e(23935),K=e(1211),lt=e(20836),ht=e(33971),yt=e(12426),xt=e(43636);const Et=["inputChatCompose"];function bt(c,W){if(1&c){const a=t.RV6();t.j41(0,"div",9)(1,"span",10),t.bIt("click",function(){const o=n.eBV(a).$implicit,d=t.XpG(2);return n.Njj(d.toggleSelection(o))}),t.EFF(2,"\xd7"),t.k0s(),t.j41(3,"span",11),t.EFF(4),t.k0s()()}if(2&c){const a=W.$implicit;t.R7$(4),t.JRh(a.name)}}function L(c,W){if(1&c&&t.Z7z(0,bt,5,1,"div",9,t.fX1),2&c){const a=t.XpG();t.Dyx(a.composeGroupChat.items)}}let E=(()=>{class c extends xt.s{constructor(){super((0,n.WQX)(U.gRc)),this.multiselect=!1,this.searchPlaceholder="",this.composeGroupChat=new l,this.enterKeyDown=(0,U.CGW)(),this.clearSelection=(0,U.CGW)(),this.textFilter=null}get placeholder(){return(this.composeGroupChat.isEmpty()||this.multiselect)&&this.searchPlaceholder||""}addBorder(a){a.classList.add("b-branderd")}removeBorder(a){a.classList.remove("b-branderd")}inputKeydown(a){"Enter"===a.key&&(this.enterKeyDown.emit(this.textFilter),a.stopPropagation(),this.markAsTouched())}toggleSelection(a){this.composeGroupChat.toggleSelection(a),this.focusInputChat()}focusInputChat(){this.inputChatCompose&&this.inputChatCompose.nativeElement.focus()}writeValue(a){this.textFilter=a}valueChanged(a){this.markAsTouched(),this.onChange(a)}clear(a){this.composeGroupChat.clear(),this.clearSelection.emit(a),this.textFilter="",this.valueChanged(""),this.focusInputChat()}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["app-compose-chat-input"]],viewQuery:function(s,o){if(1&s&&t.GBs(Et,5),2&s){let d;t.mGM(d=t.lsd())&&(o.inputChatCompose=d.first)}},inputs:{multiselect:"multiselect",searchPlaceholder:"searchPlaceholder",composeGroupChat:"composeGroupChat"},outputs:{enterKeyDown:"enterKeyDown",clearSelection:"clearSelection"},features:[t.Jv_([{provide:M.kq,multi:!0,useExisting:c}]),t.Vt3],decls:13,vars:13,consts:[["selectContainerElement",""],["inputChatCompose",""],["data-qa","searchable",1,"ng-select","ng-select-searchable","ng-select-clearable"],[1,"ng-select-container","ng-has-value"],["data-qa","added",1,"ng-value-container"],[1,"ng-input","flex-grow-1"],["id","inputChatCompose","data-qa","input-chat-compose","maxlength","255","type","text","spellcheck","fal
1se","autocapitalize","off","autocomplete","off","aria-expanded","false",2,"min-width","300px",3,"ngModelChange","keydown","focus","blur","ngModel","placeholder"],[1,"ng-clear-wrapper",3,"click","title"],["aria-hidden","true",1,"ng-clear"],[1,"ng-value","d-flex"],["data-qa","remove","aria-hidden","true",1,"ng-value-icon","left",3,"click"],["data-qa","selected-name",1,"ng-value-label","text-nowrap"]],template:function(s,o){if(1&s){const d=t.RV6();t.j41(0,"div",2)(1,"div",3,0)(3,"div",4),t.nVh(4,L,2,0),t.j41(5,"div",5)(6,"input",6,1),t.nI1(8,"translate"),t.mxI("ngModelChange",function(S){return n.eBV(d),t.DH7(o.textFilter,S)||(o.textFilter=S),n.Njj(S)}),t.bIt("keydown",function(S){return n.eBV(d),n.Njj(o.inputKeydown(S))})("ngModelChange",function(S){return n.eBV(d),n.Njj(o.valueChanged(S))})("focus",function(){n.eBV(d);const S=t.sdS(2);return n.Njj(o.addBorder(S))})("blur",function(){n.eBV(d);const S=t.sdS(2);return n.Njj(o.removeBorder(S))}),t.k0s()()(),t.j41(9,"span",7),t.nI1(10,"translate"),t.bIt("click",function(S){return n.eBV(d),n.Njj(o.clear(S))}),t.j41(11,"span",8),t.EFF(12,"\xd7"),t.k0s()()()()}2&s&&(t.AVh("ng-select-multiple",o.multiselect),t.R7$(3),t.AVh("flex-wrap",o.multiselect),t.R7$(),t.vxM(o.multiselect?4:-1),t.R7$(2),t.R50("ngModel",o.textFilter),t.Y8G("placeholder",t.bMT(8,9,o.placeholder)),t.R7$(3),t.Y8G("title",t.mNQ(t.bMT(10,11,"_i18n.ClearParticipantsList"))))},dependencies:[M.X1,M.me,M.BC,M.tU,M.YN,M.vS,P.D9],styles:[".b-branderd[_ngcontent-%COMP%]{border:1px solid var(--bg-secondary)!important}"]})}}return c})();var g=e(53775),_=e(50644),b=e(96106),x=e(22429),N=e(32723),w=e(42268),tt=e(40720);const pt=["scrollableElement"],gt=["*"],vt=c=>({item:c});function _t(c,W){if(1&c){const a=t.RV6();t.j41(0,"app-chat-participant",9),t.bIt("mousedown",function(o){return n.eBV(a),n.Njj(o.preventDefault())})("click",function(){const o=n.eBV(a).item,d=t.XpG();return n.Njj(d.contactClickInternal(o))}),t.k0s()}if(2&c){const a=W.item,s=t.XpG();t.AVh("selected",s.composeGroupChat.isSelected(a)),t.Y8G("item",a)("disableReason",s.getContactDisableReason(a.contact)),t.BMQ("data-id",a.number)}}function Rt(c,W){1&c&&(t.j41(0,"div",10),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"_i18n.RecentChats")))}function X(c,W){if(1&c){const a=t.RV6();t.j41(0,"chat-item",12),t.bIt("click",function(){const o=n.eBV(a).$implicit,d=t.XpG(2);return n.Njj(d.chatClick.emit(o))}),t.k0s()}if(2&c){const a=W.$implicit;t.Y8G("menuEnabled",!1)("hideUnread",!0)("chat",a)}}function z(c,W){if(1&c&&(t.nVh(0,Rt,3,3,"div",10),t.Z7z(1,X,1,3,"chat-item",11,t.fX1)),2&c){const a=W;t.vxM(a.length?0:-1),t.R7$(),t.Dyx(a)}}function H(c,W){1&c&&(t.j41(0,"div",13),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&c&&(t.R7$(),t.JRh(t.bMT(2,1,"_i18n.Contacts")))}function dt(c,W){if(1&c&&t.eu8(0,14),2&c){const a=W.$implicit;t.XpG(2);const s=t.sdS(1);t.Y8G("ngTemplateOutlet",s)("ngTemplateOutletContext",t.eq3(2,vt,a))}}function et(c,W){if(1&c&&(t.nVh(0,H,3,3,"div",13),t.Z7z(1,dt,1,4,"ng-container",14,t.fX1)),2&c){const a=W,s=t.XpG();t.vxM(s.recentChatsEnabled&&a.length?0:-1),t.R7$(),t.Dyx(a)}}function $t(c,W){if(1&c&&t.eu8(0,14),2&c){const a=W.$implicit;t.XpG(2);const s=t.sdS(1);t.Y8G("ngTemplateOutlet",s)("ngTemplateOutletContext",t.eq3(2,vt,a))}}function Gt(c,W){1&c&&t.Z7z(0,$t,1,4,"ng-container",14,t.fX1),2&c&&t.Dyx(W.contacts)}let mt=(()=>{class c{constructor(){this.contactSearcher=(0,n.WQX)(R.D),this.localStorage=(0,n.WQX)(yt.sj),this.myPhoneService=(0,n.WQX)(ot.gx),this.composeGroupChat=(0,n.WQX)(l,{optional:!0}),this.textFilter$=new f.t(""),this.nextPage$=new G.B,this.contacts$=at.w,this.searcher=new Ot.e,this.crmContacts$=at.w,this.recentChatsEnabled=!1,this.resetOnQueuesChange=!1,this.useCache=!0,this.title="_i18n.NewConversation",this.searchPlaceholder="_i18n.StandardChatPlaceholder",this.context=k.o.chatEnabled(!1),this.multiselect=!1,this.contactClick=(0,U.CGW)(),this.chatClick=(0,U.CGW)(),this.enterKeyDown=(0,U.CGW)(),this.textFilter=null,this.isContextBounded=!1;const a=this.myPhoneService;this.composeGroupChat||(this.composeGroupChat=new l);const o=this.textFilter$.pipe((0,b.Or)());this.recentChats$=(0,it.z)([o,a.myPhoneSession]).pipe((0,Y.n)(([d,y])=>
1y.get(new K.SDV({Count:5,From:0,IsActive:!0,SearchString:d?`%${d}%`:""})).pipe((0,j.T)(S=>(0,lt.vO)((0,lt.QW)(S,y))),(0,ft.W)(S=>(console.log(S),(0,Z.of)([]))))),(0,Pt.t)({refCount:!0,bufferSize:1})),this.searchPlaceholder$=this.composeGroupChat.selectedItems$.pipe((0,j.T)(d=>d.isEmpty()?this.searchPlaceholder:""))}contactClickInternal(a){a.contact&&this.getContactDisableReason(a.contact)||(this.clearSearchText(),this.multiselect&&this.composeGroupChat.toggleSelection(a),this.contactClick.emit(a))}requestNextPage(a,s){const[o,d,y,S]=a;if(s.isFinished)return(0,Z.of)(s);this.scrollableList&&(this.scrollableList.nativeElement.scrollTop=0);const V=this.contactSearcher.requestFactory({Input:o,Count:S,Offset:s.offset,SortBy:y},this.context);return this.useCache||d.deactivateCaching(),this.contactSearcher.requestContact(V).pipe((0,j.T)(nt=>({contacts:s.contacts.concat(this.searcher.search(nt.Entries.map(jt=>d.createMergedContact(jt)),o,this.context)),isFinished:nt.Entries.length<S,offset:s.offset+S})),(0,It.M)(()=>{this.useCache||d.activateCaching()}),(0,ft.W)(nt=>(d.activateCaching(),(0,Mt.$)(()=>nt))))}clearSearchText(){this.textFilter="",this.textFilter$.next("")}getContactDisableReason(a){const s=a?.isAvailableForTransfer||a?.dnType!==K.Jhl.Queue?"":"_i18n.QueueDoesNotHaveActiveAgents";return this.disabledContacts?.find(o=>o.id===a?.id)?.reason??s}reinitializeContacts(){const a=this.textFilter$.pipe((0,b.Or)(),(0,st.F)()),s=this.myPhoneService.myPhoneSession.pipe((0,Y.n)(d=>d.queuesIdentity$),(0,Tt.c)(800),(0,j.T)(()=>!0)),o=this.resetOnQueuesChange?s:(0,Z.of)(!0);this.contacts$=(0,it.z)([a,this.myPhoneService.myPhoneSession,this.myPhoneService.myPhoneSession.pipe((0,ht.b$)(this.localStorage))]).pipe((0,_.l)(o),(0,Y.n)(d=>{const[y]=d,S=y?g.fy:64;let V=this.requestNextPage([...d,S],{offset:0,isFinished:!1,contacts:[]});return y||(V=V.pipe((0,St.f)(nt=>this.nextPage$.pipe((0,Dt.$)(),(0,Y.n)(jt=>this.requestNextPage([...d,S],nt))),1))),V}),(0,j.T)(d=>d.contacts),(0,Pt.t)({refCount:!0,bufferSize:1})),this.crmContacts$=this.context.contextRequestHasCRM()?a.pipe((0,Y.n)(d=>this.contactSearcher.requestCrmContact(new K.Nhk({InputString:d,MaxContactCount:g.fy}))),(0,j.T)(d=>({error:d.error,contacts:this.searcher.search(d.contacts,"",this.context),status:d.status}))):(0,Z.of)({status:"unavailable",error:"",contacts:[]})}ngOnChanges(a){a.context&&(this.isContextBounded=!0,a.context.currentValue&&this.reinitializeContacts())}focusInputChat(){this.inputChatCompose&&this.inputChatCompose.focusInputChat()}toggleSelection(a){this.composeGroupChat.toggleSelection(a),this.focusInputChat()}ngOnInit(){this.isContextBounded||this.reinitializeContacts()}ngAfterViewInit(){this.focusInputChat()}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["app-find-contact-plain"]],viewQuery:function(s,o){if(1&s&&(t.GBs(pt,5),t.GBs(E,7)),2&s){let d;t.mGM(d=t.lsd())&&(o.scrollableList=d.first),t.mGM(d=t.lsd())&&(o.inputChatCompose=d.first)}},inputs:{recentChatsEnabled:"recentChatsEnabled",resetOnQueuesChange:"resetOnQueuesChange",useCache:"useCache",title:"title",searchPlaceholder:"searchPlaceholder",disabledContacts:"disabledContacts",context:"context",multiselect:"multiselect"},outputs:{contactClick:"contactClick",chatClick:"chatClick",enterKeyDown:"enterKeyDown"},features:[t.OA$],ngContentSelectors:gt,decls:17,vars:19,consts:[["participant",""],["scrollableElement",""],[3,"title"],[1,"layout-inner-chat-header","p-2","d-flex","gap-2","align-items-center"],[1,"flex-grow-1",3,"ngModelChange","enterKeyDown","multiselect","composeGroupChat","ngModel","searchPlaceholder"],[1,"layout-inner-chat-content"],["infiniteScroll","",1,"list-group","list-group-lg","mb-0","m-t-n-xxs","scrollable","overflow-v",3,"infiniteScrollCallback","infiniteScrollContainer","infiniteScrollDistance","infiniteScrollDisabled"],[3,"crm"],["appCrmContactsRef",""],["data-qa","chat-participant",1,"grid-group-item","mhover","pointer",3,"mousedown","click","item","disableReason"],[1,"p-2","b-b"],[1,"mhover","pointer",3,"menuEnabled","hideUnread","chat"],[1,"mhover","pointer",3,"click","menuEnabled","hideUnread","chat"],[1,"p-2","b-t","b-b"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(s,o){if(1&s){const d=t.RV6();t.NAR(),t.DNE(0,_t,1,5,"ng-template",null,0,t.C5r),t.j41(2,"app-layout-inner-chat",2),t.nI1(3,"translate"),t.j41(4,"div",3)(5,"app-compose-chat-input",4),t.mxI("ngModelChange",function(S){return n.eBV(d),t.DH7(o.textFilter,S)||(o.textFilter=S),n.Njj(S)}),t.bIt("enterKeyDown",function(){return n.eBV(d),n.Njj(o.enterKeyDown.emit(o.textFilter??""))})("ngModelChange",function(S){return n.eBV(d),n.Njj(o.textFilter$.next(S))}),t.k0s(),t.SdG(6),t.k0s(),t.j41(7,"div",5)(8,"ul",6,1),t.bIt("infiniteScrollCallback",function(){return n.eBV(d),n.Njj(o.nextPage$.next())}),t.nVh(10,z,3,1),t.nI1(11,"async"),t.nVh(12,et,3,1),t.nI1(13,"async"),t.j41(14,"app-crm-contacts",7),t.nI1(15,"async"),t.DNE(16,Gt,2,0,"ng-template",8),t.k0s()()()()}if(2&s){let d,y;t.R7$(2),t.Y8G("title",t.bMT(3,11,o.title)),t.R7$(3),t.Y8G("multiselect",o.multiselect)("composeGroupChat",o.composeGroupChat),t.R50("ngModel",o.textFilter),t.Y8G("searchPlaceholder",o.searchPlaceholder),t.R7$(3),t.Y8G("infiniteScrollContainer",".layout-inner-chat-content")("infiniteScrollDistance",1)("infiniteScrollDisabled",!1),t.R7$(2),t.vxM((d=o.recentChatsEnabled&&t.bMT(11,13,o.recentChats$))?10:-1,d),t.R7$(2),t.vxM((y=t.bMT(13,15,o.contacts$))?12:-1,y),t.R7$(2),t.Y8G("crm",t.bMT(15,17,o.crmContacts$))}},dependencies:[rt,O,E,M.X1,M.BC,M.YN,M.vS,x.D,N.B,Q.T3,w.n,tt.E,P.D9,Q.Jj],styles:[".layout-inner-chat-content[_ngcontent-%COMP%]{overflow:auto;width:100%}.scrollable[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background:var(--bg-icon-primary-hover)}.layout-inner-chat-header[_ngcontent-%COMP%]{min-height:50px}.b-branderd[_ngcontent-%COMP%]{border:1px solid var(--bg-secondary)!important}"]})}}return c})(),Kt=(()=>{class c{constructor(){this.basePath=(0,n.WQX)(D.$),this.router=(0,n.WQX)(J.Ix),this.composeGroupChat=(0,n.WQX)(l),this.chatLocatorService=(0,n.WQX)(p.e),this.modalService=(0,n.WQX)(m.B),this.processing=!1}get isNothingSelected(){return this.composeGroupChat.isEmpty()}nextStep(){this.isNothingSelected||(this.composeGroupChat.items.size>1?this.router.navigate([`${this.basePath}/create/group/name`]):this.createGroupChatWithOneContact())}createGroupChatWithOneContact(){if(this.processing)return;this.processing=!0;const a=Array.from(this.composeGroupChat.items).map(s=>s.contact);this.chatSubscription=this.chatLocatorService.createConversation(a).subscribe({next:s=>{this.chatLocatorService.openChatById(s.Conversation.IdConversation),this.processing=!1},error:s=>{this.modalService.error(s),this.processing=!1}})}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],decls:4,vars:6,consts:[[3,"enterKeyDown","title","multiselect"],["id","btnNext","data-qa","next","type","button",1,"btn","btn-border",3,"click","disabled"]],template:function(s,o){1&s&&(t.j41(0,"app-find-contact-plain",0),t.bIt("enterKeyDown",function(){return o.nextStep()}),t.j41(1,"button",1),t.bIt("click",function(){return o.nextStep()}),t.EFF(2),t.nI1(3,"translate"),t.k0s()()),2&s&&(t.Y8G("title","_i18n.NewGroupConversation")("multiselect",!0),t.R7$(),t.Y8G("disabled",o.isNothingSelected),t.R7$(),t.SpI(" ",t.bMT(3,4,"_i18n.Next")," "))},dependencies:[mt,P.D9],encapsulation:2})}}return c})();var Wt=e(95);let Nt=(()=>{class c{constructor(){this.chatSmsService=(0,n.WQX)(Wt.V),this.context=k.o.forSmsChat()}createSmsChat(a){a&&this.chatSmsService.navigateToProviderWizard(a)}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],decls:5,vars:6,consts:[["compose",""],[3,"contactClick","enterKeyDown","context","searchPlaceholder"],["id","btnStart","data-qa","start","type","button",1,"btn","btn-border",3,"click","disabled"]],template:function(s,o){if(1&s){const d=t.RV6();t.j41(0,"app-find-contact-plain",1,0),t.bIt("contactClick",function(S){return n.eBV(d),n.Njj(o.createSmsChat(S.number))})("enterKeyDown",function(S){return n.eBV(d),n.Njj(o.createSmsChat(S))}),t.j41(2,"button",2),t.bIt("click",function(){n.eBV(d);const S=t.sdS(1);return n.Njj(o.createSmsChat(S.textFilter??""))}),t.EFF(3),t.nI1(4,"translate"),t.k0s()()}if(2&s){const d=t.sdS(1);t.Y8G("context",o.context)("searchPlaceholder","_i18n.SmsChatPlaceholder"),t.R7$(2),t.Y8G("disabled",!d.textFilter),t.R7$(),t.SpI(" ",t.bMT(4,4,"_i18n.StartChat")," ")}},dependencies:[mt,P.D9],encapsulation:2})}}return c})(),Vt=(()=>{class c{constructor(){this.chatLocatorService=(0,n.WQX)(p.e),this.modalService=(0,n.WQX)(m.B),this.processing=!1}createSingleChat(a){this.processing||(this.processing=!0,this.chatSubscription?.unsubscribe(),a.contact&&(this.chatSubscription=this.chatLocatorService.createConversation([a.contact]).subscribe({next:s=>{this.chatLocatorService.openChatById(s.Conversation.IdConversation),this.processing=!1},error:s=>{this.modalService.error(s),this.processing=!1}})))}ngOnDestroy(){this.chatSubscription?.unsubscribe()}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],decls:1,vars:0,consts:[[3,"contactClick"]],template:function(s,o){1&s&&(t.j41(0,"app-find-contact-plain",0),t.bIt("contactClick",function(y){return o.createSingleChat(y)}),t.k0s())},dependencies:[mt],encapsulation:2})}}return c})();var Bt=e(46062),Xt=e(78534),Qt=e(5964);let kt=(()=>{class c{constructor(){this.selected=(0,n.WQX)(l),this.route=(0,n.WQX)(J.nX),this.myPhoneService=(0,n.WQX)(ot.gx),this.modalService=(0,n.WQX)(m.B),this.location=(0,n.WQX)(v.aZ),this.chatListService=(0,n.WQX)(Xt.I),this.processing=!1,this.addContext=k.o.chatEnabled(!1)}ngOnInit(){this.chatContacts$=this.route.parent.params.pipe((0,j.T)(a=>a.id),(0,st.F)(),(0,j.T)(a=>parseInt(a,10)),(0,Qt.p)(a=>!isNaN(a)),(0,Y.n)(a=>this.chatListService.getChatById(a)),(0,j.T)(a=>a.participants.activeParticipants.filter(s=>s.contact).map(s=>
1({id:s.contact.id,reason:"_i18n.AlreadyInChat"}))))}addUsers(){if(this.processing)return;this.processing=!0;const a=parseInt(this.route.parent?.snapshot.params.id,10),s=this.selected.items.map(o=>o.contact).filter(r.z2).map(o=>new K.hJ0({Recipient:new K.GRz({ExtNumber:o.extensionNumber,IsModerator:!0,BridgeNumber:o.bridgeId===Bt.Ij?"":o.bridgeId,RecipientType:o.bridgeId===Bt.Ij?K.ix6.CRT_Local:K.ix6.CRT_3cxBridge})})).toArray();this.myPhoneService.get(new K.mG3({IdConversation:a,ParticipantUpdates:s})).subscribe({next:()=>{this.location.back(),this.processing=!1},error:o=>{this.modalService.error(o),this.processing=!1}})}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],features:[t.Jv_([l])],decls:3,vars:8,consts:[[3,"title","disabledContacts","context","multiselect"],["type","button","id","btnAdd",1,"btn","btn-border",3,"click","disabled","translate"]],template:function(s,o){1&s&&(t.j41(0,"app-find-contact-plain",0),t.nI1(1,"async"),t.j41(2,"button",1),t.bIt("click",function(){return o.addUsers()}),t.k0s()()),2&s&&(t.Y8G("title","_i18n.ConfScheduleAddParticipants")("disabledContacts",t.bMT(1,6,o.chatContacts$))("context",o.addContext)("multiselect",!0),t.R7$(2),t.Y8G("disabled",o.processing||o.selected.isEmpty())("translate","_i18n.Add"))},dependencies:[mt,P.Mm,Q.Jj],encapsulation:2})}}return c})();var Yt=e(64058),zt=e(28793),Ht=e(22398);let Jt=(()=>{class c{constructor(){this.myPhoneService=(0,n.WQX)(ot.gx),this.modalService=(0,n.WQX)(m.B),this.route=(0,n.WQX)(J.nX),this.fwd=(0,n.WQX)(Ht.L),this.chatLocatorService=(0,n.WQX)(p.e),this.processing=!1}forwardToConversation(a){if(this.processing)return;this.processing=!0;const s=this.route.snapshot.queryParams.messageIds;if(!s)return;const d=(Array.isArray(s)?s:[s]).map(V=>parseInt(V,10)).sort(),y=V=>d.map(nt=>this.myPhoneService.get(new K.m6U({DstIdConversation:V,SrcIdMessage:nt})));a.pipe((0,Y.n)(V=>(0,zt.x)(...y(V)).pipe((0,Yt.$)(),(0,j.T)(()=>V)))).subscribe({next:V=>{this.fwd.clearSelection(),this.chatLocatorService.openChatById(V),this.processing=!1},error:V=>{this.modalService.error(V),this.processing=!1}})}forwardToChat(a){this.forwardToConversation((0,Z.of)(a.id))}forwardToContact(a){a.contact&&this.forwardToConversation(this.chatLocatorService.createConversation([a.contact]).pipe((0,j.T)(s=>s.Conversation.IdConversation)))}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],decls:1,vars:2,consts:[[3,"chatClick","contactClick","title","recentChatsEnabled"]],template:function(s,o){1&s&&(t.j41(0,"app-find-contact-plain",0),t.bIt("chatClick",function(y){return o.forwardToChat(y)})("contactClick",function(y){return o.forwardToContact(y)}),t.k0s()),2&s&&t.Y8G("title","_i18n.ForwardMessage")("recentChatsEnabled",!0)},dependencies:[mt],encapsulation:2})}}return c})();var Zt=e(53993),qt=e(96697),te=e(47355);let ee=(()=>{class c{constructor(){this.route=(0,n.WQX)(J.nX),this.location=(0,n.WQX)(v.aZ),this.myPhoneService=(0,n.WQX)(ot.gx),this.modalService=(0,n.WQX)(m.B),this.processing=!1}ngOnInit(){const a=this.route.parent.params.pipe((0,j.T)(s=>parseInt(s.id,10)));this.currentChat$=(0,it.z)([this.myPhoneService.myPhoneSession,a]).pipe((0,Y.n)(([s,o])=>s.get(new K.$RH({IdConversation:o})).pipe((0,j.T)(d=>te.ry.FromPartyInfo(d.Conversation,s))))),this.context$=this.currentChat$.pipe((0,j.T)(s=>k.o.addToChatContext(!0,this.canBeTransferredToQueue(s))))}canBeTransferredToQueue(a){return!a.isChatClosed}transferChat(a){if(!a.contact||this.processing)return;this.processing=!0;const s=a.contact;this.currentChat$.pipe((0,Zt.E)(this.myPhoneService.myPhoneSession),(0,qt.s)(1),(0,Y.n)(([o,d])=>{const y=!!o.activeParticipants.find(S=>S.contact?.id===s.id&&!S.isExternal);return o.isGroupChat||!y?d.get(new K.WrK({Participant:new K.GRz({BridgeNumber:s.bridgeId===Bt.Ij?"":s.bridgeId,ExtNumber:s.extensionNumber}),IdConversation:o.id})).pipe((0,Y.n)(()=>d.get(new K.$RH({IdConversation:o.id})).pipe((0,j.T)(()=>!0),(0,ft.W)(()=>(0,Z.of)(!1))))):(0,Z.of)(!0)})).subscribe({next:o=>{this.processing=!1,o&&this.location.path().endsWith("/transfer")&&this.location.back()},error:o=>{this.processing=!1,this.modalService.error(o)}})}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],decls:2,vars:6,consts:[[3,"contactClick","title","context","resetOnQueuesChange","useCache"]],template:function(s,o){1&s&&(t.j41(0,"app-find-contact-plain",0),t.nI1(1,"async"),t.bIt("contactClick",function(y){return o.transferChat(y)}),t.k0s()),2&s&&t.Y8G("title","_i18n.Transfer")("context",t.bMT(1,4,o.context$))("resetOnQueuesChange",!0)("useCache",!1)},dependencies:[mt,Q.Jj],encapsulation:2})}}return c})();var Lt=e(11514),ne=e(53154),Ft=e(31335);let At=(()=>{class c{constructor(){this.animationService=(0,n.WQX)(Ft.L)}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],features:[t.Jv_([l,Ft.L])],decls:3,vars:1,consts:[["outlet","outlet"],[1,"holder"]],template:function(s,o){if(1&s&&(t.j41(0,"div",1),t.nrm(1,"router-outlet",null,0),t.k0s()),2&s){const d=t.sdS(2);t.Y8G("@animationPlaceholder",o.animationService.prepareRoute(d))}},dependencies:[J.n3],styles:[".holder[_ngcontent-%COMP%]{height:100%;position:relative}"],data:{animation:[(0,Lt.hZ)("animationPlaceholder",[(0,Lt.kY)("* => void",[(0,Lt.P)(":leave",ne.SI)])])]}})}}return c})();var ae=e(13477);let ie=(()=>{class c{static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["app-square-chat-custom-icon"],["","app-square-chat-custom-icon",""]],decls:3,vars:0,consts:[["viewBox","0 0 128 128","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","128","height","128","fill","#0096D1"],["d","M48.44 77.125C64.1495 77.125 76.8784 66.3516 76.8784 53.0625C76.8784 39.7734 64.1495 29 48.44 29C32.7304 29 20.0015 39.7734 20.0015 53.0625C20.0015 58.3398 22.0113 63.2207 25.4157 67.1992C24.9372 68.4844 24.2262 69.6191 23.4743 70.5762C22.818 71.4238 22.1481 72.0801 21.6558 72.5312C21.4097 72.75 21.2047 72.9277 21.0679 73.0371C20.9996 73.0918 20.9449 73.1328 20.9175 73.1465L20.8902 73.1738C20.1382 73.7344 19.8101 74.7187 20.1109 75.6074C20.4117 76.4961 21.2457 77.125 22.1891 77.125C25.1696 77.125 28.1776 76.3594 30.6796 75.416C31.9374 74.9375 33.1133 74.4043 34.1387 73.8574C38.3361 75.9355 43.2171 77.125 48.44 77.125ZM81.2536 53.0625C81.2536 68.416 67.7043 79.9824 51.653 81.3633C54.9753 91.5352 65.9952 99 79.066 99C84.2888 99 89.1699 97.8105 93.3809 95.7324C94.4064 96.2793 95.5685 96.8125 96.8264 97.291C99.3284 98.2344 102.336 99 105.317 99C106.26 99 107.108 98.3848 107.395 97.4824C107.682 96.5801 107.368 95.5957 106.602 95.0352L106.575 95.0078C106.547 94.9805 106.493 94.9531 106.424 94.8984C106.288 94.7891 106.083 94.625 105.836 94.3926C105.344 93.9414 104.674 93.2852 104.018 92.4375C103.266 91.4805 102.555 90.332 102.077 89.0605C105.481 85.0957 107.491 80.2148 107.491 74.9238C107.491 62.2363 95.883 51.832 81.1579 50.9297C81.2126 51.627 81.2399 52.3379 81.2399 53.0488L81.2536 53.0625Z","fill","white"]],template:function(s,o){1&s&&(n.qSk(),t.rj2(0,"svg",0),t.Hgh(1,"rect",1)(2,"path",2),t.eux())},encapsulation:2})}}return c})();function se(c,W){if(1&c){const a=t.RV6();t.j41(0,"img",4),t.nI1(1,"async"),t.bIt("error",function(){n.eBV(a);const o=t.XpG();return n.Njj(o.setDefaultImage())}),t.k0s()}if(2&c){const a=t.XpG();t.Y8G("alt",null==a.provider?null:a.provider.Type)("src",t.bMT(1,2,a.providerImageSrc),t.B4B)}}function oe(c,W){1&c&&t.nrm(0,"span",1)}let re=(()=>{class c{constructor(){this.myPhoneService=(0,n.WQX)(ot.gx),this.useDefaultImg=!1,this.providerImageSrc=this.myPhoneService.myPhoneSession.pipe((0,j.T)(a=>{const s=(0,ae.SV)(this.provider.EncodedProvider,void 0);return(0,ht.kb)(s.imageIdent,a,ht.l8.Logo)}))}setDefaultImage(){this.useDefaultImg=!0}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["app-provider-item"]],inputs:{provider:"provider"},decls:6,vars:3,consts:[["data-qa","provider-image",1,"part-avatar","me-1",3,"alt","src"],["data-qa","provider-default-image","app-square-chat-custom-icon","",1,"part-avatar","me-1",2,"fill","currentColor"],[1,"part-name","text-truncate","text-md"],[1,"part-info","me-1"],["data-qa","provider-image",1,"part-avatar","me-1",3,"error","alt","src"]],template:function(s,o){1&s&&(t.nVh(0,se,2,4,"img",0)(1,oe,1,0,"span",1),t.j41(2,"span",2),t.EFF(3),t.k0s(),t.j41(4,"small",3),t.EFF(5),t.k0s()),2&s&&(t.vxM(o.useDefaultImg?1:0),t.R7$(3),t.JRh(null==o.provider?null:o.provider.InstanceName),t.R7$(2),t.JRh(null!=o.provider&&o.provider.UsePhoneNumbers?null==o.provider?null:o.provider.ExternalNumber:""))},dependencies:[ie,Q.Jj],styles:['[_nghost-%COMP%]{align-items:center;display:grid;grid-template-areas:"avatar name" "avatar info";grid-template-columns:auto 1fr;grid-template-rows:27px 23px}
1[_nghost-%COMP%]   .part-avatar[_ngcontent-%COMP%]{grid-area:avatar;width:50px}[_nghost-%COMP%]   .part-name[_ngcontent-%COMP%]{grid-area:name;align-self:flex-end}[_nghost-%COMP%]   .part-info[_ngcontent-%COMP%]{grid-area:info;align-self:flex-start}']})}}return c})();function ce(c,W){if(1&c){const a=t.RV6();t.j41(0,"app-provider-item",6),t.bIt("click",function(){const o=n.eBV(a).$implicit,d=t.XpG();return n.Njj(d.startConversation(o))}),t.k0s()}2&c&&t.Y8G("provider",W.$implicit)}const he=[{path:"add",component:kt,data:{animation:"add"}},{path:"transfer",component:ee,data:{animation:"transfer"}},{path:"forward",component:Jt,data:{animation:"forward"}}],pe=[{path:"create",component:Vt,data:{animation:"create"}},{data:{animation:"group"},path:"create/group",component:At,children:[{path:"",data:{animation:"group_create"},component:Kt},{path:"name",data:{animation:"group_name"},component:Ct}]},{path:"create/external",component:At,children:[{path:"",component:Nt,data:{animation:"provider_contact"}},{path:":phone",component:(()=>{class c{constructor(){this.chatSmsService=(0,n.WQX)(Wt.V),this.route=(0,n.WQX)(J.nX),this.filter$=new f.t(""),this.providers$=(0,it.z)([this.chatSmsService.providersParty$,this.filter$]).pipe((0,j.T)(([s,o])=>o?s.filter(d=>d.ExternalNumber.toLowerCase().includes(o.toLowerCase())||d.InstanceName.toLowerCase().includes(o.toLowerCase())):s))}startConversation(a){this.chatSmsService.startSmsChat(this.route.snapshot.params.phone,a)}static{this.\u0275fac=function(s){return new(s||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["ng-component"]],decls:9,vars:6,consts:[[3,"title"],[1,"layout-inner-chat-header","d-flex","align-items-center","p-2"],["searchPlaceholder","_i18n.Search",3,"ngModelChange","ngModel"],[1,"layout-inner-chat-content"],[1,"list-group","list-group-lg","mb-0","m-t-n-xxs","scrollable","overflow-v"],["data-qa","provider-items",1,"grid-group-item","mhover","pointer","ng-star-inserted",3,"provider"],["data-qa","provider-items",1,"grid-group-item","mhover","pointer","ng-star-inserted",3,"click","provider"]],template:function(s,o){1&s&&(t.j41(0,"app-layout-inner-chat",0),t.nI1(1,"translate"),t.j41(2,"div",1)(3,"app-compose-chat-input",2),t.bIt("ngModelChange",function(y){return o.filter$.next(y)}),t.k0s()(),t.j41(4,"div",3)(5,"ul",4),t.Z7z(6,ce,1,1,"app-provider-item",5,t.fX1),t.nI1(8,"async"),t.k0s()()()),2&s&&(t.Y8G("title",t.bMT(1,2,"_i18n.SelectSmsProvider")),t.R7$(3),t.Y8G("ngModel",o.filter),t.R7$(3),t.Dyx(t.bMT(8,4,o.providers$)))},dependencies:[O,E,M.X1,M.BC,M.YN,M.vS,re,P.D9,Q.Jj],encapsulation:2})}}return c})(),data:{animation:"provider"}}]}]},42268:(B,C,e)=>{e.d(C,{n:()=>t});var n=e(40720),h=e(5739),f=e(74743),l=e(72200),p=e(68018),r=e(73664);const m=T=>({contacts:T});function v(T,F){if(1&T&&r.nrm(0,"span",2),2&T){const O=r.XpG(3);r.Y8G("title",O.crm.error)}}function I(T,F){1&T&&r.nrm(0,"span",3)}function u(T,F){if(1&T&&(r.j41(0,"div",0)(1,"span"),r.EFF(2),r.nI1(3,"translate"),r.k0s(),r.nVh(4,v,1,1,"span",2),r.nVh(5,I,1,0,"span",3),r.k0s()),2&T){const O=r.XpG(2);r.R7$(2),r.JRh(r.bMT(3,3,"_i18n.CRM")),r.R7$(2),r.vxM("error"===O.crm.status?4:-1),r.R7$(),r.vxM("loading"===O.crm.status?5:-1)}}function P(T,F){if(1&T&&(r.nVh(0,u,6,5,"div",0),r.eu8(1,1)),2&T){const O=r.XpG();r.vxM("error"===O.crm.status||"loading"===O.crm.status||O.crm.contacts.length>0?0:-1),r.R7$(),r.Y8G("ngTemplateOutlet",O.content.templateRef)("ngTemplateOutletContext",r.eq3(3,m,O.crm.contacts))}}let t=(()=>{class T{static{this.\u0275fac=function(M){return new(M||T)}}static{this.\u0275cmp=r.VBU({type:T,selectors:[["app-crm-contacts"]],contentQueries:function(M,i,q){if(1&M&&r.wni(q,n.E,5),2&M){let $;r.mGM($=r.lsd())&&(i.content=$.first)}},inputs:{crm:"crm"},decls:1,vars:1,consts:[[1,"crm-tile","d-flex","align-items-center","p-3","gap-2"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["app-exclamation-circle-solid-icon","",1,"customSVGIcons","fillIconRed","svg-sm",3,"title"],["app-spinner-regular-icon","",1,"customSVGIcons","svg-sm"]],template:function(M,i){1&M&&r.nVh(0,P,2,5),2&M&&r.vxM(i.crm&&"unavailable"!==i.crm.status?0:-1)},dependencies:[h.b,f.a,l.T3,p.D9],encapsulation:2,changeDetection:0})}}return T})()},44724:(B,C,e)=>{e.d(C,{j:()=>P});var n=e(18530),h=e(84412),f=e(92771),l=e(16444),p=e(96354),r=e(25558),m=e(95195),v=e(23439),I=e(2615
1),u=e(33916);let P=(()=>{class t{constructor(){this.conversationWasTaken$=new n.B,this.error$=new f.m(1),this.errorMessage$=this.error$.pipe((0,p.T)(i=>"string"==typeof i?i:i&&"object"==typeof i&&"message"in i&&"string"==typeof i.message?i.message:"")),this.selectedChatFolder$=new h.t(u.l.None);const F=(0,I.WQX)(l.gx),O=(0,I.WQX)(m.J),M=(0,I.WQX)(v.T);this.isChatOnPbxEnabled$=F.myPhoneSession.pipe((0,r.n)(i=>i.chatIsAllowed$)),this.chatArchived$=F.myPhoneSession.pipe((0,r.n)(i=>i.conversationInfo$),(0,p.T)(i=>(i.Conversation.IsArchived&&(O.removeChatNotification(i.Conversation.IdConversation),M.removeChat(i.Conversation.IdConversation)),{id:i.Conversation.IdConversation,archived:i.Conversation.IsArchived})))}static{this.\u0275fac=function(O){return new(O||t)}}static{this.\u0275prov=I.jDH({token:t,factory:t.\u0275fac})}}return t})()},44915:(B,C,e)=>{e.d(C,{F:()=>h});var n=e(7673);class h{constructor(l){this.unreadParties=l}updateChatList(l){let p;return p=l.map(this.unreadParties&&0!==this.unreadParties.length?r=>{const m=this.unreadParties.find(v=>v.IdConversation===r.id);return this.updateParty(m?m.Count:0,r)}:r=>this.updateParty(0,r)),(0,n.of)(l=p)}updateParty(l,p){return p.merge({hasUnread:l>0,unreadCount:l})}}},46007:(B,C,e)=>{e.d(C,{b:()=>m});var n=e(2615),h=e(16444),f=e(96354),l=e(25558),p=e(31390),r=e(73664);let m=(()=>{class v{constructor(){this.service=(0,n.WQX)(h.gx)}transform(u){return this.service.myPhoneSession.pipe((0,l.n)(P=>P.systemParameters$),(0,f.T)(P=>(0,p.V)(P,u)))}static{this.\u0275fac=function(P){return new(P||v)}}static{this.\u0275pipe=r.EJ8({name:"chatParticipantId",type:v,pure:!0})}}return v})()},53154:(B,C,e)=>{e.d(C,{SI:()=>f,Tw:()=>u,oK:()=>P});var n=e(11514);const h=[(0,n.iF)({left:"100%"}),(0,n.i0)("200ms ease-in-out",(0,n.iF)({left:"0%"}))],f=[(0,n.iF)({left:"0%"}),(0,n.i0)("200ms ease-in-out",(0,n.iF)({left:"100%"}))],l=[(0,n.iF)({left:"0%"}),(0,n.i0)("200ms ease-in-out",(0,n.iF)({left:"-100%"}))],p=[(0,n.iF)({left:"-100%"}),(0,n.i0)("200ms ease-in-out",(0,n.iF)({left:"0%"}))],r=[(0,n.P)(":enter",h,{optional:!0}),(0,n.P)(":leave",f,{optional:!0})],m=[(0,n.Os)([(0,n.P)(":enter",h),(0,n.P)(":leave",l)])],v=[(0,n.Os)([(0,n.P)(":enter",p),(0,n.P)(":leave",f)])],u=((0,n.hZ)("routeAnimations",[(0,n.kY)("void <=> *",[]),(0,n.kY)("root <=> *",r),(0,n.kY)("view => *",m),(0,n.kY)("* => view",v)]),(0,n.hZ)("routeAnimations",[(0,n.kY)("void <=> *",[]),(0,n.kY)("root <=> *",r),(0,n.kY)("chat => *",m),(0,n.kY)("* => chat",v)])),P=(0,n.hZ)("routeAnimations",[(0,n.kY)("void <=> *",[]),(0,n.kY)("root <=> *",r)])},63078:(B,C,e)=>{e.d(C,{g:()=>l});var n=e(73664);const h=[[["",8,"layout-type2-nav"]],[["",8,"layout-type2-header"]],[["",8,"layout-type2-content"]]],f=[".layout-type2-nav",".layout-type2-header",".layout-type2-content"];let l=(()=>{class p{static{this.\u0275fac=function(v){return new(v||p)}}static{this.\u0275cmp=n.VBU({type:p,selectors:[["layout-type2"]],ngContentSelectors:f,decls:5,vars:0,consts:[[1,"layout-type2-right"],["id","layout-type2-content"]],template:function(v,I){1&v&&(n.NAR(h),n.SdG(0),n.rj2(1,"div",0),n.SdG(2,1),n.rj2(3,"div",1),n.SdG(4,2),n.eux()())},styles:["@media(max-width:1399.98px){.d-xxl-down-none[_ngcontent-%COMP%], .xxl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:1199.98px){.d-xl-down-none[_ngcontent-%COMP%], .xl-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:991.98px){.d-lg-down-none[_ngcontent-%COMP%], .lg-visible[_ngcontent-%COMP%]{display:none}}@media(max-width:767.98px){.d-md-down-none[_ngcontent-%COMP%], .md-visible[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%]{display:flex;flex-direction:row;height:100%;background:var(--background)}.layout-type2-right[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;display:flex;flex-direction:column;position:relative}#layout-type2-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-grow:1;overflow:auto}@media(max-width:767.98px){[_nghost-%COMP%]{flex-direction:column}}"]})}}return p})()},64058:(B,C,e)=>{e.d(C,{$:()=>p});var n=e(46649),h=e(39974);const l=(r,m)=>(r.push(m),r);function p(){return(0,h.N)((r,m)=>{(function f(r,m){return(0,h.N)((0,n.S)(r,m,arguments.length>=2,!1,!0))})(l,[])(r).subscribe(m)})}},66409:(B,C,e)=>{e.d(C,{$:()=>f});var n=e(2615),h=e(73664);let f=(()=>{class l{static{this.\u0275fac=function(m){return new(m||l)}}static{this.\u0275cmp=h.VBU({type:l,selectors:[["app-arrow-left-light-icon"],["","app-arrow-left-light-icon",""]],decls:2,vars:0,consts:[["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 448 512"],["d","M4.7 244.7c-6.2 6.2-6.2 16.4 0 22.6l176 176c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L54.6 272 432 272c8.8 0 16-7.2 16-16s-7.2-16-16-16L54.6 240 203.3 91.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0l-176 176z"]],template:function(m,v){1&m&&(n.qSk(),h.rj2(0,"svg",0),h.Hgh(1,"path",1),h.eux())},encapsulation:2})}}return l})()},70685:(B,C,e)=>{e.d(C,{U:()=>p});var n=e(17705),h=e(64106),f=e(68018),l=e(73664);let p=(()=>
1{class r{constructor(){this.closeClicked=(0,n.CGW)()}static{this.\u0275fac=function(I){return new(I||r)}}static{this.\u0275cmp=l.VBU({type:r,selectors:[["app-mobile-close-button"]],outputs:{closeClicked:"closeClicked"},decls:2,vars:4,consts:[["id","goBackHeaderBtn","aria-label","Close","app-times-light-icon","",1,"btn","btn-plain","d-md-none",3,"click","title"]],template:function(I,u){1&I&&(l.j41(0,"a",0),l.nI1(1,"translate"),l.bIt("click",function(){return u.closeClicked.emit()}),l.k0s()),2&I&&l.Y8G("title",l.mNQ(l.bMT(1,2,"_i18n.GoBack")))},dependencies:[h.D,f.D9],encapsulation:2})}}return r})()},78534:(B,C,e)=>{e.d(C,{G:()=>f,I:()=>l});var n=e(2615),h=e(20039);class f extends((0,h.mS)({searchText:"",serverResponse:!1,chats:(0,h.B8)()})){}const l=new n.nKC("CHAT_LIST_SERVICE")},79804:(B,C,e)=>{e.d(C,{g:()=>h,x:()=>f});var n=e(7673);function h(l,p){return p.IdMessage.includes(l.Id)?l.merge({Participants:l.Participants.map(r=>r.IdRecipient===p.RecipientStatus.IdRecipient?p.RecipientStatus:r)}):l}class f{constructor(p){this.state=p}updateChatList(p){return(0,n.of)(p.map(r=>r.lastMessageObject?r.merge({lastMessageObject:h(r.lastMessageObject,this.state)}):r))}}},81546:(B,C,e)=>{e.d(C,{f:()=>f});var n=e(39974),h=e(85412);function f(l,p=1/0,r){return p=(p||0)<1?1/0:p,(0,n.N)((m,v)=>(0,h.h)(m,v,l,p,void 0,!0,r))}},82869:(B,C,e)=>{e.d(C,{n:()=>r});var n=e(2615),h=e(52645),f=e(68018),l=e(7673),p=e(73664);let r=(()=>{class m{constructor(){this.translateService=(0,n.WQX)(f.c$)}transform(I,u,P){if(!I)return(0,l.of)("");let t;return t=P?I.UnsafeMessage:u?I.messageLinkified:I.messageEmojified,(0,h.Iz)(this.translateService,I,t,!0)}static{this.\u0275fac=function(u){return new(u||m)}}static{this.\u0275pipe=p.EJ8({name:"translateSystemMessage",type:m,pure:!0})}}return m})()}}]);

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.