12 |
- (this["webpackJsonpreact-21-22"]=this["webpackJsonpreact-21-22"]||[]).push([[2],{493:function(e,t,n){"use strict";n.r(t);var o=n(7),a=n(508),r=n(476),c=n(21),i=n(142),s=n(0),l=n(22),d=n(15),b=n(144),j=n(509),u=n(497),p=n(518),f=n(271),x=n.n(f),h=n(270),g=n.n(h),m=n(209),O=n.n(m),v=n(240),y=n.n(v),C=n(30),w=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(-2),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"8px 8px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(4)}}}}})),k=Object(r.a)({container:{position:"absolute",maxWidth:"100%",top:"92vh",right:20,zIndex:10,cursor:"pointer"}}),N=function(e){var t=e.setPopup,n=k(),a=Object(c.b)(),r=Object(s.useState)(null),l=Object(i.a)(r,2),d=l[0],b=l[1],u=Boolean(d),f=function(){t(!1),b(null)};return Object(o.jsxs)("div",{className:n.container,children:[Object(o.jsx)(j.a,{onClick:function(e){return b(e.currentTarget)},sx:{bgcolor:"rgb(41, 139, 231)",width:56,height:56},children:d?Object(o.jsx)(O.a,{}):Object(o.jsx)(g.a,{})}),Object(o.jsxs)(w,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:d,open:u,onClose:f,children:[Object(o.jsxs)(p.a,{onClick:function(){f(),a(Object(C.a)("contact"))},children:[Object(o.jsx)(y.a,{}),"New Contact"]}),Object(o.jsxs)(p.a,{onClick:function(){f(),a(Object(C.a)("contacts"))},children:[Object(o.jsx)(x.a,{}),"Contacts"]})]})]})},S=n(516),I=n(486),z=n(480),R=n(50),A=Object(r.a)({stackItem:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",alignItems:"center",padding:5,borderRadius:5,cursor:"pointer","&:hover":{background:"#eeeded"}},titleName:{color:"#575757",fontSize:16,paddingTop:5}}),D=function(e){var t=e.handleListItemClick,n=e.chat,a=A(),r=n.name,c=n.lastName,i=n.color,s=n.avatarUrl,l=n.companionId;return Object(o.jsxs)("div",{onClick:function(){return t(l)},className:a.stackItem,children:[Object(o.jsx)(j.a,{alt:r,src:s?"".concat(R.j,"/").concat(s):void 0,sx:{background:i,width:54,height:54},children:"".concat(Object(R.c)(r)).concat(Object(R.c)(c))}),Object(o.jsx)(z.a,{variant:"h6",className:a.titleName,children:"".concat(Object(R.c)(r)).concat(Object(R.l)(r,8,1))})]})},M=n(482),B=n(484),T=n(483),E=Object(r.a)({listItemInnerText:{display:"flex",alignContent:"center",alignItems:"center",flexWrap:"nowrap"},listItem_iconAvatar:{marginRight:10},listItem_iconRight:{marginRight:10},listItem_icon_time:{fontSize:12,marginLeft:5,paddingBottom:25,color:"#1b1b1b"}}),L=function(e){var t=e.chat,n=e.handleListItemClick,a=E(),r=t.name,c=t.lastName,i=t.avatarUrl,s=t.color,l=t.companionId,d=t.lastMessage,b=t.lastMessageCreatedAt,u=t.createdAt;return Object(o.jsxs)(M.a,{onClick:function(){return n(l)},children:[Object(o.jsx)(T.a,{className:a.listItem_iconAvatar,children:Object(o.jsx)(j.a,{alt:r,src:i?"".concat(R.j,"/").concat(i):void 0,sx:{background:s,width:54,height:54},children:!i&&"".concat(Object(R.c)(r)).concat(Object(R.c)(c))})}),Object(o.jsx)(B.a,{primary:"".concat(Object(R.c)(r)).concat(Object(R.l)(r,15,1)," \n ").concat(Object(R.c)(c)).concat(Object(R.l)(c,15,1)),secondary:"".concat(d?Object(R.l)(d,35):"".concat(Object(R.c)(r)).concat(Object(R.l)(r,8,1)," joined Telegram"))}),Object(o.jsx)(T.a,{className:a.listItem_iconRight,children:Object(o.jsx)(z.a,{className:a.listItem_icon_time,variant:"h6",color:"initial",children:Object(R.n)(b||u)})})]})},W=n(499),_=n(525),F=function(e){var t=e.name;return Object(o.jsx)(I.a,{sx:{width:"100%"},spacing:2,children:Object(o.jsxs)(W.a,{severity:"info",children:[Object(o.jsx)(_.a,{children:"Warning"}),Object(o.jsx)("strong",{children:t})]})})},P=Object(r.a)({stack:{display:"flex",justifyContent:"space-around",paddingTop:20},container:{width:"100%",maxHeight:"86vh",overflowY:"scroll","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}}}),Y=function(e){var t=e.value,n=e.date,a=e.filteredAndSorted,r=e.handleListItemClick,c=P();return Object(o.jsxs)(o.Fragment,{children:[!t&&!n&&a.length>0&&Object(o.jsx)(I.a,{direction:"row",className:c.stack,children:a.slice(0,6).map((function(e){return Object(o.jsx)(D,{handleListItemClick:r,chat:e},e.companionId)}))}),(t||n)&&a.length>0&&Object(o.jsx)(S.a,{className:c.container,component:"nav","aria-label":"main mailbox folders",children:a.map((function(e){return Object(o.jsx)(L,{handleListItemClick:r,chat:e},e.companionId)}))}),(t||n)&&0===a.length&&Object(o.jsx)(F,{name:"Can not find Chat by request: ".concat(t)}),!t&&!n&&0===a.length&&Object(o.jsx)(F,{name:"You do not have any Chats yet!"})]})},H=n(506),U=n(521),V=n(241),q=n.n(V),G=n(487),Z=Object(r.a)({container:{width:"100%",maxHeight:"86vh",overflowY:"scroll","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}},folderIcon:{color:"#54b0fc",cursor:"pointer","&:hover":{color:"#016cc3"}},listItem:{"&:hover":{backgroundColor:"#f0f0f0"}}}),$=function(e){var t=e.messagesMemo,n=e.value,a=e.date,r=e.sort,c=e.setDisabled,i=Z(),l=t.filter((function(e){return"text"!==e.type})),d=Object(R.b)(Object(R.f)("createdAt",l,r),a,n);return Object(s.useEffect)((function(){c(!(l.length>0))}),[l,c]),Object(o.jsxs)(o.Fragment,{children:[d.length>0&&Object(o.jsx)(S.a,{className:i.container,children:d.map((function(e){var t=e.message,n=e.createdAt,a=e.fullType;return Object(o.jsxs)("div",{children:[Object(o.jsxs)(H.a,{alignItems:"flex-start",className:i.listItem,children:[Object(o.jsx)(U.a,{children:Object(o.jsx)(q.a,{onClick:function(){return Object(R.e)("".concat(R.j,"/").concat(t),a)},className:i.folderIcon,fontSize:"large"})}),Object(o.jsx)(B.a,{primary:a,secondary:Object(R.n)(n)})]}),Object(o.jsx)(G.a,{variant:"inset"})]},n)}))}),(n||a)&&0===d.length&&Object(o.jsx)(F,{name:"Can not find Files by request: ".concat(n)}),!n&&!a&&0===d.length&&Object(o.jsx)(F,{name:"You do not have Files yet!"})]})},K=n(526),J=n(527),X=n(210),Q=n.n(X),ee=Object(r.a)({overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden",boxSizing:"border-box",display:"flex",justifyContent:"center",alignContent:"center",alignItems:"center"},wrapper:{width:"30%",maxHeight:"80%",position:"relative",display:"flex"},downloadIcon:{position:"absolute",content:"",right:0,top:-40,cursor:"pointer",color:"#e9e7e7",padding:0,borderRadius:"50%","&:hover":{backgroundColor:"#ffffff",color:"#b8b7b7"}},img:{cursor:"pointer","&:hover":{scale:.98}},time:{position:"absolute",content:"",color:"#ffffff",top:-30,left:0,borderRadius:10,padding:"2px 6px 2px 6px",backgroundColor:"#707070"}}),te=function(e){var t=e.message,n=e.fullType,a=e.updatedAt,r=ee(),c=Object(s.useState)(!1),l=Object(i.a)(c,2),d=l[0],b=l[1],j="".concat(R.j,"/").concat(t);return d?Object(o.jsx)("div",{onClick:function(e){return"overlay"===e.target.id&&d&&b(!1)},id:"overlay",className:r.overlay,children:Object(o.jsxs)("div",{className:r.wrapper,children:[Object(o.jsx)("span",{className:r.time,children:Object(R.n)(a)}),Object(o.jsx)(Q.a,{className:r.downloadIcon,fontSize:"large",onClick:function(){return Object(R.e)(j,n)}}),Object(o.jsx)("img",{width:"100%",height:"auto",alt:"imageItem",src:j})]})}):Object(o.jsx)(J.a,{children:Object(o.jsx)("img",{onClick:function(){return!d&&b(!0)},className:r.img,src:"".concat(j,"?w=164&h=164&fit=crop&auto=format"),srcSet:"".concat(j,"?w=164&h=164&fit=crop&auto=format&dpr=2 2x"),alt:"imageItem",loading:"lazy"})})},ne=Object(r.a)({container:{width:"100%",maxHeight:"86vh",overflowY:"scroll","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}}}),oe=function(e){var t=e.messagesMemo,n=e.value,a=e.date,r=e.sort,c=e.setDisabled,i=ne(),l=t.filter((function(e){return"image"===e.type})),d=Object(R.b)(Object(R.f)("createdAt",l,r),a,n);return Object(s.useEffect)((function(){c(!(l.length>0))}),[l,c]),Object(o.jsxs)(o.Fragment,{children:[d.length>0&&Object(o.jsx)(K.a,{className:i.container,cols:3,rowHeight:164,children:d.map((function(e){var t=e.message,n=e.createdAt,a=e.fullType,r=e.updatedAt;return Object(o.jsx)(te,{message:t,fullType:a,updatedAt:r},n)}))}),(n||a)&&0===d.length&&Object(o.jsx)(F,{name:"Can not find Media by request: ".concat(n)}),!n&&!a&&0===d.length&&Object(o.jsx)(F,{name:"You do not have Media yet!"})]})},ae=n(167),re=n.n(ae),ce=n(162),ie=Object(r.a)({container:{width:"100%",maxHeight:"86vh",overflowY:"scroll","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}},listItem:{"&:hover":{backgroundColor:"#f0f0f0"}},copyIcon:{color:"#54b0fc",cursor:"pointer","&:hover":{color:"#016cc3"}}}),se=function(e){var t=e.messagesMemo,n=e.value,a=e.date,r=e.sort,c=e.setDisabled,i=ie(),l=t.filter((function(e){return"text"===e.type})),d=Object(R.b)(Object(R.f)("createdAt",l,r),a,n);return Object(s.useEffect)((function(){c(!(l.length>0))}),[l,c]),Object(o.jsxs)(o.Fragment,{children:[d.length>0&&Object(o.jsx)(S.a,{className:i.container,children:d.map((function(e){var t=e.message,n=e.createdAt,a=e.lastName,r=e.name,c=e.color,s=e.avatarUrl;return Object(o.jsxs)("div",{children:[Object(o.jsxs)(H.a,{alignItems:"flex-start",className:i.listItem,children:[Object(o.jsx)(U.a,{children:Object(o.jsx)(j.a,{alt:r,src:s?"".concat(R.j,"/").concat(s):void 0,sx:{background:c,width:38,height:38},children:"".concat(Object(R.c)(r)).concat(Object(R.c)(a))})}),Object(o.jsx)(B.a,{style:{wordBreak:"break-word",marginRight:2},primary:t,secondary:Object(R.n)(n),secondaryTypographyProps:{color:"#020202",paddingTop:.5}}),Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return Object(R.a)("Message")},text:t,children:Object(o.jsx)(re.a,{className:i.copyIcon,fontSize:"large"})})]}),Object(o.jsx)(G.a,{variant:"inset"})]},n)}))}),(n||a)&&0===d.length&&Object(o.jsx)(F,{name:"Can not find Text by request: ".concat(n)}),!n&&!a&&0===d.length&&Object(o.jsx)(F,{name:"You do not have Text yet!"})]})},le=n(273),de=n.n(le),be=Object(r.a)({container:{width:"100%",maxHeight:"86vh",overflowY:"scroll","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}},folderIcon:{color:"#54b0fc",cursor:"pointer","&:hover":{color:"#016cc3"}},listItem:{"&:hover":{backgroundColor:"#f0f0f0"}}}),je=function(e){var t=e.messagesMemo,n=e.value,a=e.date,r=e.sort,c=e.setDisabled,i=be(),l=t.filter((function(e){return"audio"===e.type})),d=Object(R.b)(Object(R.f)("createdAt",l,r),a,n);return Object(s.useEffect)((function(){c(!(l.length>0))}),[l,c]),Object(o.jsxs)(o.Fragment,{children:[d.length>0&&Object(o.jsx)(S.a,{className:i.container,children:d.map((function(e){var t=e.message,n=e.createdAt,a=e.fullType;return Object(o.jsxs)("div",{children:[Object(o.jsxs)(H.a,{alignItems:"flex-start",className:i.listItem,children:[Object(o.jsx)(U.a,{children:Object(o.jsx)(de.a,{onClick:function(){return Object(R.e)("".concat(R.j,"/").concat(t),a)},className:i.folderIcon,fontSize:"large"})}),Object(o.jsx)(B.a,{primary:a,secondary:Object(R.n)(n)})]}),Object(o.jsx)(G.a,{variant:"inset"})]},n)}))}),(n||a)&&0===d.length&&Object(o.jsx)(F,{name:"Can not find Audio by request: ".concat(n)}),!n&&!a&&0===d.length&&Object(o.jsx)(F,{name:"You do not have Audio yet!"})]})},ue=n(274),pe=n.n(ue),fe=Object(r.a)({container:{width:"100%",maxHeight:"86vh",overflowY:"scroll","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}},folderIcon:{color:"#54b0fc",cursor:"pointer","&:hover":{color:"#016cc3"}},listItem:{"&:hover":{backgroundColor:"#f0f0f0"}}}),xe=function(e){var t=e.messagesMemo,n=e.value,a=e.date,r=e.sort,c=e.setDisabled,i=fe(),l=t.filter((function(e){return"video"===e.type})),d=Object(R.b)(Object(R.f)("createdAt",l,r),a,n);return Object(s.useEffect)((function(){c(!(l.length>0))}),[l,c]),Object(o.jsxs)(o.Fragment,{children:[d.length>0&&Object(o.jsx)(S.a,{className:i.container,children:d.map((function(e){var t=e.message,n=e.createdAt,a=e.fullType;return Object(o.jsxs)("div",{children:[Object(o.jsxs)(H.a,{alignItems:"flex-start",className:i.listItem,children:[Object(o.jsx)(U.a,{children:Object(o.jsx)(pe.a,{onClick:function(){return Object(R.e)("".concat(R.j,"/").concat(t),a)},className:i.folderIcon,fontSize:"large"})}),Object(o.jsx)(B.a,{primary:a,secondary:Object(R.n)(n)})]},n),Object(o.jsx)(G.a,{variant:"inset"})]},n)}))}),(n||a)&&0===d.length&&Object(o.jsx)(F,{name:"Can not find Video by request: ".concat(n)}),!n&&!a&&0===d.length&&Object(o.jsx)(F,{name:"You do not have Video yet!"})]})},he=n(1),ge=n.n(he),me=n(5),Oe=n(44),ve=n(17),ye=n(46),Ce=function(){return function(){var e=Object(me.a)(ge.a.mark((function e(t){var n;return ge.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ve.f)();case 3:(n=e.sent)&&t(Object(ye.b)(n)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t(Object(ye.a)());case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()},we=n(26),ke=Object(we.a)([function(e){return e.chats}],(function(e){return e})),Ne=Object(we.a)([function(e){return e.allMessages.messages}],(function(e){return e})),Se=function(e){return e.control.leftIsOpen},Ie=function(e){return e.control.rightIsOpen},ze=function(e){return e.control.scrollChat},Re=function(e){return e.control},Ae=n(33),De=function(e){return function(){var t=Object(me.a)(ge.a.mark((function t(n){var o;return ge.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(ve.y)(e);case 3:(o=t.sent)&&n(Object(Ae.c)(o)),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}()},Me=Object(r.a)({container:{height:"7vh",borderBottom:"solid 2px #dddddd",display:"flex",justifyContent:"space-around",alignContent:"center",alignItems:"center",flexWrap:"nowrap",color:"rgba(0, 0, 0, 0.6)"},item:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",alignItems:"center",cursor:"pointer"},icon:{fontSize:"1rem",lineHeight:0,marginBottom:0,fontWeight:600},underline:{fontSize:"2.2rem",lineHeight:0}}),Be=function(e){var t=e.value,n=e.setValue,a=e.sort,r=e.date,l=e.setDate,d=e.setDisabled,b=Me(),j=Object(c.b)(),u=Object(c.c)(ke),p=u.chats,f=u.total,x=Object(c.c)(Ne),h=Object(c.c)(Re),g=h.leftIsOpen,m=h.rightIsOpen,O=Object(s.useState)(0),v=Object(i.a)(O,2),y=v[0],w=v[1],k=function(e){w(e),t&&n(""),r&&l("")};Object(s.useEffect)((function(){l("")}),[l]),Object(s.useEffect)((function(){j(0===y?Object(C.a)("searchChats"):Object(C.a)("searchAllMessages"))}),[y,j]),Object(s.useEffect)((function(){0===y&&d("0"===f)}),[y,f,d]),Object(s.useEffect)((function(){var e=function(){"searchChats"===g?j(Ce()):"searchAllMessages"===g&&j(function(){var e=Object(me.a)(ge.a.mark((function e(t){var n;return ge.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ve.d)();case 3:(n=e.sent)&&t(Object(Oe.b)(n)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t(Object(Oe.a)());case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}())};e();var t=setInterval(e,R.k);return function(){return clearInterval(t)}}),[g,j]);var N=Object(R.m)(p,a).filter((function(e){var n=e.name+" "+e.lastName;return r?n.toLowerCase().includes(t.toLowerCase())&&Object(R.o)(r)===Object(R.o)(e.lastMessageCreatedAt?e.lastMessageCreatedAt:e.createdAt)?e:void 0:n.toLowerCase().includes(t.toLowerCase())}));return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",{className:b.container,children:[Object(o.jsxs)("div",{className:b.item,style:{color:0===y?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return k(0)},children:[Object(o.jsx)("span",{className:b.icon,children:"Chats"}),Object(o.jsx)("span",{className:b.underline,children:"___"})]}),Object(o.jsxs)("div",{className:b.item,style:{color:1===y?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return k(1)},children:[Object(o.jsx)("span",{className:b.icon,children:"Files"}),Object(o.jsx)("span",{className:b.underline,children:"___"})]}),Object(o.jsxs)("div",{className:b.item,style:{color:2===y?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return k(2)},children:[Object(o.jsx)("span",{className:b.icon,children:"Media"}),Object(o.jsx)("span",{className:b.underline,children:"___"})]}),Object(o.jsxs)("div",{className:b.item,style:{color:3===y?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return k(3)},children:[Object(o.jsx)("span",{className:b.icon,children:"Text"}),Object(o.jsx)("span",{className:b.underline,children:"___"})]}),Object(o.jsxs)("div",{className:b.item,style:{color:4===y?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return k(4)},children:[Object(o.jsx)("span",{className:b.icon,children:"Audio"}),Object(o.jsx)("span",{className:b.underline,children:"___"})]}),Object(o.jsxs)("div",{className:b.item,style:{color:5===y?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return k(5)},children:[Object(o.jsx)("span",{className:b.icon,children:"Video"}),Object(o.jsx)("span",{className:b.underline,children:"___"})]})]}),0===y&&Object(o.jsx)(Y,{value:t,date:r,filteredAndSorted:N,handleListItemClick:function(e){m&&j(Object(C.b)("")),j(De(e))}}),1===y&&Object(o.jsx)($,{messagesMemo:x,value:t,date:r,sort:a,setDisabled:d}),2===y&&Object(o.jsx)(oe,{messagesMemo:x,value:t,date:r,sort:a,setDisabled:d}),3===y&&Object(o.jsx)(se,{messagesMemo:x,value:t,date:r,sort:a,setDisabled:d}),4===y&&Object(o.jsx)(je,{messagesMemo:x,value:t,date:r,sort:a,setDisabled:d}),5===y&&Object(o.jsx)(xe,{messagesMemo:x,value:t,date:r,sort:a,setDisabled:d})]})},Te=n(522),Ee=n(520),Le=n(368),We=n.n(Le),_e=n(244),Fe=n.n(_e),Pe=n(504),Ye=n(202),He=n.n(Ye),Ue=n(523),Ve=n(284),qe=n.n(Ve),Ge=n(494),Ze=Object(r.a)({container:{position:"absolute"}}),$e=function(e){var t=e.date,n=e.disabled,a=e.changeDate,r=e.handleOnOpen,c=Ze();return Object(o.jsx)(Ge.a,{className:c.container,inputVariant:"outlined",orientation:"portrait",variant:"dialog",openTo:"date",autoOk:!0,disabled:n,value:t||new Date,onOpen:r,onChange:a})},Ke=Object(b.a)("div")((function(e){e.theme;return{position:"relative",borderRadius:"20px",backgroundColor:"#f1f0f0",width:"100%",margin:"0 5% 0 5%"}})),Je=Object(b.a)("div")((function(e){return{padding:e.theme.spacing(0,2),height:"100%",position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"}})),Xe=Object(b.a)(Pe.a)((function(e){var t=e.theme;return{color:"inherit","& .MuiInputBase-input":{fontWeight:500,borderRadius:"20px",padding:t.spacing(1,1,1,0),paddingLeft:"calc(1em + ".concat(t.spacing(4),")"),transition:t.transitions.create("width"),width:"100%"}}})),Qe=Object(r.a)({toolBar:{color:"#b1aeae",height:"7vh"},activeSearch:{outline:"2px solid #2184f7",color:"#2184f7"},iconBtn:{"&:hover":{transform:"rotate(180deg)",transition:"all 250ms ease-out "}},iconArrow:{"&:hover":{transform:"rotate(360deg)",transition:"all 250ms ease-out "}}}),et={inputProps:{"aria-label":"Switch demo"}},tt=function(e){var t=e.handleClick,n=e.handleOpenIsSearch,a=e.handleSearch,r=e.leftIsOpen,c=e.value,i=e.sort,s=e.setDate,l=e.date,b=e.disabled,j=Qe();return Object(o.jsxs)(Te.a,{className:j.toolBar,children:[Object(o.jsx)(Ee.a,{onClick:t,children:r?Object(o.jsx)(He.a,{className:j.iconArrow}):Object(o.jsx)(We.a,{className:j.iconBtn})}),Object(o.jsxs)("div",{onFocus:n,style:{display:"flex",width:"100%"},children:[Object(o.jsxs)(Ke,{className:c?j.activeSearch:void 0,children:[Object(o.jsx)(Je,{children:Object(o.jsx)(Fe.a,{})}),Object(o.jsx)(Xe,{value:c,onChange:a,placeholder:b?"Disabled":"Search",inputProps:{"aria-label":"search"},disabled:b})]}),Object(o.jsxs)(Ee.a,{"aria-label":"delete",size:"medium",disabled:b,children:[Object(o.jsx)($e,{date:l,disabled:b,changeDate:s,handleOnOpen:function(){return s("")}}),Object(o.jsx)(qe.a,{fontSize:"medium",style:{color:l?"#2184f7":"#b1aeae"}})]}),Object(o.jsx)(Ue.a,Object(d.a)(Object(d.a)({onClick:function(){return Object(ve.C)({sort:!i})},checked:i},et),{},{disabled:b}))]})]})},nt=n(286),ot=n.n(nt),at=n(285),rt=n.n(at),ct=n(163),it=n.n(ct),st=n(500),lt=n(369),dt=n.n(lt),bt=n(510),jt=Object(r.a)({modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"},titleWrapper:{display:"flex",justifyContent:"flex-start",alignContent:"center",alignItems:"center"}}),ut=function(e){var t=e.setModal,n=e.chat,a=jt(),r=Object(c.b)(),i=n.name,s=n.lastName,l=n.avatarUrl,d=n.color,b=n.companionId;return Object(o.jsx)("div",{onClick:function(e){var n=e.target.id;if("overlay"===n||"cancel"===n)return t(!1);"delete"===n&&(Object(ve.m)(b),t(!1),r(Object(Ae.b)()),r(Object(C.b)("")))},className:a.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:a.modalDelete,children:[Object(o.jsxs)("div",{className:a.titleWrapper,children:[Object(o.jsx)(j.a,{alt:i,src:l?"".concat(R.j,"/").concat(l):void 0,sx:{background:d,width:38,height:38,marginRight:2},children:"".concat(Object(R.c)(i)).concat(Object(R.c)(s))}),Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete chat"})]}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete the\n chat with ".concat("".concat(Object(R.c)(i)).concat(Object(R.l)(i,15,1)," \n ").concat(Object(R.c)(s)).concat(Object(R.l)(s,15,1)),"?")}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE CHAT"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})},pt=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"8px 8px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(4)}}}}})),ft=Object(b.a)(st.a)((function(e){var t=e.theme;return{"& .MuiBadge-badge":{backgroundColor:"#44b700",color:"#44b700",boxShadow:"0 0 0 2px ".concat(t.palette.background.paper),"&::after":{position:"absolute",top:0,left:0,width:"100%",height:"100%",borderRadius:"50%",animation:"ripple 1.2s infinite ease-in-out",border:"1px solid currentColor",content:'""'}},"@keyframes ripple":{"0%":{transform:"scale(.8)",opacity:1},"100%":{transform:"scale(2.4)",opacity:0}}}})),xt=Object(r.a)({listItemInnerText:{display:"flex",alignContent:"center",alignItems:"center",flexWrap:"nowrap"},listItemInnerText__icon:{marginLeft:5,color:"#959595"},listItem_iconAvatar:{marginRight:10},listItem_iconRight:{marginRight:10,display:"flex",alignItems:"center",justifyContent:"center",alignContent:"center",flexDirection:"column"},listItem_iconTimeChecked:{display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"center",alignContent:"center",marginBottom:2},listItem_iconRightBtn:{background:"#0ac40a",borderRadius:"50%",color:"#ffffff",border:"none",height:24,width:24,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",alignContent:"center",fontSize:12,marginLeft:"auto","&:hover":{outline:"solid 3px #3ee415"}},listItem_iconRightBtnMute:{background:"#a7aaa7",borderRadius:"50%",color:"#ffffff",border:"none",height:24,width:24,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",alignContent:"center",fontSize:12,marginLeft:"auto","&:hover":{outline:"solid 3px #cccbcb"}},listItem_iconRightBtnHidden:{background:"inherit",borderRadius:"50%",border:"none",height:24,width:24,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",alignContent:"center",fontSize:12,marginLeft:"auto"},listItem_icon_time:{fontSize:12,marginLeft:5,color:"#1b1b1b"},listItem_typing:{color:"#4d4d4d",animation:"ripple 4s infinite ease-in-out"},listItem_dots:{color:"#1b1b1b",fontWeight:"bold",display:"inline-block",fontFamily:"monospace",clipPath:"inset(0 3ch 0 0)",animation:"$run 2s steps(5) infinite"},"@keyframes run":{to:{clipPath:"inset(0 -1ch 0 0)"}}}),ht=function(e){var t=e.chat,n=e.handleListItemClick,a=e.handleNewMsgs,r=xt(),c=Object(s.useState)(null),l=Object(i.a)(c,2),d=l[0],b=l[1],u=Object(s.useState)(!1),f=Object(i.a)(u,2),x=f[0],h=f[1],g=Object(s.useState)(!1),m=Object(i.a)(g,2),O=m[0],v=m[1],y=Boolean(d),C=t.name,w=t.lastName,k=t.avatarUrl,N=t.color,S=t.companionId,I=t.mute,A=t.seen,D=t.total,E=t.watched,L=t.typing,W=t.online,_=t.lastMessage,F=t.lastMessageCreatedAt,P=t.createdAt,Y=function(e){"mute"===e&&Object(ve.k)(S),"delete"===e&&v(!0),b(null),h(!1)};return Object(o.jsxs)("div",{children:[O&&Object(o.jsx)(ut,{setModal:v,chat:t}),Object(o.jsxs)(M.a,{selected:x,onClick:function(){return n(S)},onContextMenu:function(e){return function(e){e.preventDefault(),b(e.currentTarget),h(!0)}(e)},children:[Object(o.jsx)(T.a,{className:r.listItem_iconAvatar,children:Object(o.jsx)(ft,{overlap:"circular",variant:"true"===W?"dot":"standard",anchorOrigin:{vertical:"bottom",horizontal:"right"},children:Object(o.jsx)(j.a,{alt:C,src:k?"".concat(R.j,"/").concat(k):void 0,sx:{background:N,width:54,height:54},children:!k&&"".concat(Object(R.c)(C)).concat(Object(R.c)(w))})})}),Object(o.jsx)(B.a,{primary:Object(o.jsxs)("div",{className:r.listItemInnerText,children:[Object(o.jsx)("span",{children:"".concat(Object(R.c)(C)).concat(Object(R.l)(C,15,1)," \n ").concat(Object(R.c)(w)).concat(Object(R.l)(w,15,1))}),I&&Object(o.jsx)(rt.a,{className:r.listItemInnerText__icon,fontSize:"small"})]}),secondary:L?Object(o.jsxs)("span",{className:r.listItem_typing,children:["typing",Object(o.jsx)("span",{className:r.listItem_dots,children:"..."})]}):_?Object(R.l)(_,35):"".concat(Object(R.c)(C)).concat(Object(R.l)(C,8,1)," joined Telegram")}),Object(o.jsxs)(T.a,{className:r.listItem_iconRight,children:[Object(o.jsxs)("div",{className:r.listItem_iconTimeChecked,children:[E&&Object(o.jsx)(dt.a,{style:{color:"#18bd03"},fontSize:"small"}),Object(o.jsx)(z.a,{className:r.listItem_icon_time,variant:"h6",color:"initial",children:Object(R.n)(F||P)})]}),_&&D>A?Object(o.jsx)("button",{onClick:function(e){return a(e,S)},className:I?r.listItem_iconRightBtnMute:r.listItem_iconRightBtn,children:D-A}):Object(o.jsx)("button",{className:r.listItem_iconRightBtnHidden})]})]}),Object(o.jsxs)(pt,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:d,open:y,onClose:Y,children:[Object(o.jsxs)(p.a,{onClick:function(){return Y("mute")},children:[I?Object(o.jsx)(ot.a,{}):Object(o.jsx)(rt.a,{}),I?"Unmute chat":"Mute chat"]}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return Y("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete chat"]})]})]})},gt=n(51),mt=Object(r.a)({list:{width:"100%",maxHeight:"93vh",overflowY:"scroll","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}}}),Ot=function(e){var t=e.sort,n=mt(),a=Object(c.b)(),r=Object(s.useRef)(null),i=Object(c.c)(ke),l=i.total,d=i.chats,b=Object(c.c)(gt.b),j=function(e){a(Object(C.b)("")),a(De(e))},u=function(e,t){e.stopPropagation(),a(Object(C.c)(!0)),a(Object(C.b)("")),a(De(t))},p=Object(s.useCallback)((function(e){a(De(e)),a(Object(C.c)(!0))}),[a]),f=Object(R.m)(d,t);return Object(s.useEffect)((function(){var e=function(){return a(Ce())};e();var t=setInterval(e,R.k);return function(){return clearInterval(t)}}),[a]),Object(s.useEffect)((function(){r.current&&r.current.forEach((function(e,t){var n=e.total-e.seen,o=f[t];void 0!==o&&(o.total-o.seen>n&&!o.mute&&(Object(R.i)("".concat(R.j,"/telegramReceive.mp3")),Object(R.g)(o.name,(function(){return p(o.companionId)}))))})),r.current=f}),[b,f,p,a]),"0"!==l?Object(o.jsx)(S.a,{className:n.list,component:"nav","aria-label":"main mailbox folders",children:f.map((function(e){return Object(o.jsx)(ht,{chat:e,handleListItemClick:j,handleNewMsgs:u},e.number)}))}):Object(o.jsx)(F,{name:"You do not have Chats yet!"})},vt=n(514),yt=n(515),Ct=n(370),wt=n.n(Ct),kt=n(371),Nt=n.n(kt),St=n(372),It=n.n(St),zt=n(373),Rt=n.n(zt),At=n(39),Dt=Object(r.a)({overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100},container:{position:"absolute",width:270,maxWidth:"100%",top:60,left:15,zIndex:10,visibility:"visible"},list:{background:"#fdfdfd"},listItemLast:{textAlign:"center"},listIcon:{marginRight:15},listIconText:{marginRight:15,paddingLeft:6}}),Mt={inputProps:{"aria-label":"Switch demo"}},Bt=function(e){var t=e.nightMode,n=Dt(),a=Object(c.b)();return Object(s.useEffect)((function(){var e=function(){return a(Object(At.b)())};e();var t=setInterval(e,R.k);return function(){return clearInterval(t)}}),[a]),Object(o.jsx)("div",{className:n.overlay,id:"overlay",children:Object(o.jsx)(vt.a,{className:n.container,children:Object(o.jsxs)(yt.a,{className:n.list,children:[Object(o.jsxs)(p.a,{onClick:function(){return a(Object(C.a)("contact"))},children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(y.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{children:"New Contact"})]}),Object(o.jsxs)(p.a,{onClick:function(){return a(Object(C.a)("contacts"))},children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(x.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{children:"Contacts"})]}),Object(o.jsxs)(p.a,{onClick:function(){return a(Object(C.a)("settings"))},children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(wt.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{children:"Settings"})]}),Object(o.jsxs)(p.a,{style:{cursor:"default"},children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(Nt.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{children:"Night Mode"}),Object(o.jsx)(Ue.a,Object(d.a)(Object(d.a)({onClick:function(){return Object(ve.C)({nightMode:!t})},checked:t},Mt),{},{style:{cursor:"pointer"}}))]}),Object(o.jsx)("a",{style:{textDecoration:"none",color:"inherit"},target:"blank",href:"https://www.makeuseof.com/tag/useful-telegram-features/",children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(It.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{children:"Telegram Features"})]})}),Object(o.jsx)("a",{style:{textDecoration:"none",color:"inherit"},target:"blank",href:"https://bugs.telegram.org/?tag_ids=41&sort=time",children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(Rt.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{children:"Report bug"})]})}),Object(o.jsx)("a",{style:{textDecoration:"none",color:"inherit"},target:"blank",href:"https://www.msn.com/en-in/money/tech/telegram-webk-and-webz-web-apps-launched-whats-the-difference/ar-BB1fOwLR",children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(T.a,{className:n.listIconText,children:"K"}),Object(o.jsx)(B.a,{children:"Switch to K Version"})]})}),Object(o.jsx)("a",{style:{textDecoration:"none",color:"inherit"},target:"blank",href:"https://desktop.telegram.org/changelog",children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(T.a,{className:n.listIconText,children:"W"}),Object(o.jsx)(B.a,{children:"Switch to Old Version"})]})}),Object(o.jsx)(G.a,{}),Object(o.jsx)(p.a,{style:{cursor:"default"},children:Object(o.jsx)(B.a,{secondary:"Telegram WebZ 1.32.3",className:n.listItemLast})})]})})})},Tt=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"8px 8px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(4)}}}}})),Et=Object(r.a)({listItem_iconAvatar:{marginRight:10},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"},titleWrapper:{display:"flex",justifyContent:"flex-start",alignContent:"center",alignItems:"center"}}),Lt=function(e){var t=e.contact,n=e.handleListItemClick,a=e.rightIsOpen,r=Et(),l=Object(c.b)(),d=Object(s.useState)(null),b=Object(i.a)(d,2),u=b[0],f=b[1],x=Object(s.useState)(!1),h=Object(i.a)(x,2),g=h[0],m=h[1],O=Object(s.useState)(!1),v=Object(i.a)(O,2),y=v[0],w=v[1],k=Boolean(u),N=t.name,S=t.lastName,I=t.avatarUrl,z=t.color,A=t.companionId,D=t.createdAt,E=t.number,L=t._id,W=function(e){"copy"===e&&Object(R.a)("Number"),"delete"===e&&w(!0),f(null),m(!1)};return Object(o.jsxs)("div",{children:[Object(o.jsxs)(M.a,{selected:g,onClick:function(){return n(A)},onContextMenu:function(e){return function(e){e.preventDefault(),f(e.currentTarget),m(!0)}(e)},children:[Object(o.jsx)(T.a,{className:r.listItem_iconAvatar,children:Object(o.jsx)(j.a,{alt:N,src:I?"".concat(R.j,"/").concat(I):void 0,sx:{background:z,width:54,height:54},children:!I&&"".concat(Object(R.c)(N)).concat(Object(R.c)(S))})}),Object(o.jsx)(B.a,{primary:"".concat(Object(R.c)(N)).concat(Object(R.l)(N,15,1),"\n ").concat(Object(R.c)(S)).concat(Object(R.l)(S,15,1)),secondary:"Registered since ".concat(Object(R.n)(D))})]}),Object(o.jsxs)(Tt,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:u,open:k,onClose:W,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return W("copy")},text:E,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy number"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return W("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete contact"]})]}),y&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return w(!1);"delete"===t&&("edit"===a&&l(Object(C.b)("credentials")),Object(ve.n)(L),w(!1))},className:r.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:r.modalDelete,children:[Object(o.jsxs)("div",{className:r.titleWrapper,children:[Object(o.jsx)(j.a,{alt:N,src:I?"".concat(R.j,"/").concat(I):void 0,sx:{background:z,width:38,height:38,marginRight:2},children:"".concat(Object(R.c)(N)).concat(Object(R.c)(S))}),Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete contact"})]}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete contact\n ".concat("".concat(Object(R.c)(N)).concat(Object(R.l)(N,15,1),"\n ").concat(Object(R.c)(S)).concat(Object(R.l)(S,15,1)),"?")}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE CONTACT"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})},Wt=function(e){return e.contacts},_t=Object(we.a)([function(e){return e.contacts.contacts}],(function(e){return e})),Ft=n(45),Pt=function(){return function(){var e=Object(me.a)(ge.a.mark((function e(t){var n;return ge.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(ve.g)();case 3:(n=e.sent)&&t(Object(Ft.b)(n)),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),t(Object(Ft.a)());case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}()},Yt=function(e){return function(){var t=Object(me.a)(ge.a.mark((function t(n){return ge.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(ve.a)(e);case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()},Ht=Object(r.a)({list:{width:"100%",maxHeight:"93vh",overflowY:"scroll","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}}}),Ut=function(e){var t=e.value,n=e.handleClick,a=e.sort,r=e.date,i=e.setDisabled,l=Ht(),d=Object(c.b)(),b=Object(c.c)(Wt),j=b.total,u=b.contacts,p=Object(c.c)(Ie),f=function(e){n(),d(Object(C.b)("")),d(De(e))},x=Object(R.f)("name",u,a).filter((function(e){var n=e.name+" "+e.lastName;return r?n.toLowerCase().includes(t.toLowerCase())&&Object(R.o)(r)===Object(R.o)(e.createdAt)?e:void 0:n.toLowerCase().includes(t.toLowerCase())}));return Object(s.useEffect)((function(){d(Object(C.a)("contacts"))}),[d]),Object(s.useEffect)((function(){i("0"===j)}),[j,i]),Object(s.useEffect)((function(){var e=function(){return d(Pt())};e();var t=setInterval(e,R.k);return function(){return clearInterval(t)}}),[d]),"0"!==j?Object(o.jsx)(S.a,{className:l.list,component:"nav","aria-label":"main mailbox folders",children:x.length>0?x.map((function(e){return Object(o.jsx)(Lt,{contact:e,handleListItemClick:f,rightIsOpen:p},e.number)})):Object(o.jsx)(F,{name:"Can not find Contact by request : ".concat(t)})}):Object(o.jsx)(F,{name:"You do not have Contact yet!"})},Vt=n(495),qt=n(489),Gt=Object(r.a)({toolBar:{color:"#b1aeae",height:"7vh"},iconArrow:{"&:hover":{transform:"rotate(360deg)",transition:"all 250ms ease-out "}}}),Zt=function(e){var t=e.handleClick,n=Gt();return Object(o.jsx)(Te.a,{className:n.toolBar,children:Object(o.jsx)(Ee.a,{onClick:t,children:Object(o.jsx)(He.a,{className:n.iconArrow})})})},$t=Object(r.a)({container:{display:"flex",alignItems:"center",alignContent:"center",flexDirection:"column",width:350,margin:"0 auto",paddingBottom:24},title:{marginBottom:20,textAlign:"center"},buttonNext:{marginTop:20,height:50,color:"#f8f8f8",backgroundColor:"#1d74c5"},textField:{marginBottom:20}}),Kt=function(e){var t=e.handleClick,n=$t(),a=Object(c.b)(),r=Object(s.useState)(""),l=Object(i.a)(r,2),d=l[0],b=l[1],j=function(){var e=Object(me.a)(ge.a.mark((function e(){return ge.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a(Yt(d)),a(Object(C.a)("contacts"));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),u=function(){return!(d.length<13||d.length>13)&&(d.slice(0,1),!0)};return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Zt,{handleClick:t}),Object(o.jsxs)("div",{onKeyDown:function(e){"Enter"===e.code&&u()&&j()},className:n.container,children:[Object(o.jsx)(z.a,{className:n.title,variant:"h5",color:"initial",children:"Add new contact"}),Object(o.jsx)(Vt.a,{id:"number",name:"NUMBER",label:"Write down a number,+ is requirement",value:d,fullWidth:!0,variant:"outlined",onChange:function(e){var t=e.target.value.split(" ").join("").trim();b(t)},className:n.textField,required:!0}),u()&&Object(o.jsx)(qt.a,{onClick:j,className:n.buttonNext,color:"primary",variant:"contained",fullWidth:!0,children:" ADD"})]})]})},Jt=n(288),Xt=n.n(Jt),Qt=n(374),en=n.n(Qt),tn=n(287),nn=n.n(tn),on=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(5),minWidth:180,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(4)}}}}})),an=function(){var e=Object(c.b)(),t=Object(s.useState)(null),n=Object(i.a)(t,2),a=n[0],r=n[1],l=Boolean(a),d=function(t){"logout"===t&&e(Object(At.d)()),r(null)};return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Ee.a,{onClick:function(e){return r(e.currentTarget)},"aria-label":"delete",style:{marginLeft:5},size:"medium",children:Object(o.jsx)(nn.a,{fontSize:"medium"})}),Object(o.jsx)(on,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:a,open:l,onClose:d,children:Object(o.jsxs)(p.a,{style:{fontWeight:500},onClick:function(){return d("logout")},children:[Object(o.jsx)(en.a,{}),"Log Out"]})})]})},rn=Object(r.a)({container:{width:"100%",height:"7vh",padding:10,display:"flex",alignContent:"center",alignItems:"center",backgroundColor:"#ffffff"},iconArrow:{"&:hover":{transform:"rotate(360deg)",transition:"all 250ms ease-out "}}}),cn=function(e){var t=e.handleClick,n=rn(),a=Object(c.b)();return Object(o.jsxs)(I.a,{className:n.container,direction:"row",spacing:21,children:[Object(o.jsx)(Ee.a,{onClick:t,"aria-label":"delete",size:"medium",children:Object(o.jsx)(He.a,{className:n.iconArrow,fontSize:"medium"})}),Object(o.jsx)(z.a,{style:{marginLeft:20,color:"#474747"},variant:"h6",color:"initial",children:"Settings"}),Object(o.jsx)(Ee.a,{onClick:function(){return a(Object(C.a)("edit"))},style:{marginLeft:"auto"},"aria-label":"delete",size:"medium",children:Object(o.jsx)(Xt.a,{fontSize:"medium"})}),Object(o.jsx)(an,{})]})},sn=n(25),ln=n(289),dn=Object(r.a)({modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"},titleWrapper:{display:"flex",justifyContent:"flex-start",alignContent:"center",alignItems:"center"}}),bn=function(e){var t=e.setModal,n=e.index,a=e.setIndex,r=dn();return Object(o.jsx)("div",{onClick:function(e){var o=e.target.id;if("overlay"===o||"cancel"===o)return t(!1);"delete"===o&&(Object(ve.p)(n),a(n-1),t(!1))},className:r.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:r.modalDelete,children:[Object(o.jsx)("div",{className:r.titleWrapper,children:Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete image"})}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete the Image?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE IMAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})},jn=Object(r.a)({container:{width:"100%",backgroundColor:"#ffffff",position:"relative"},nameTile:{position:"absolute",color:"#ffffff",backgroundColor:"rgb(0,0,0)",borderRadius:10,padding:8,fontSize:18,zIndex:10,top:"7%",left:"50%",marginLeft:"-45%",opacity:.7,transition:"opacity .35s ease-in-out"},timeTile:{position:"absolute",color:"#ffffff",backgroundColor:"rgb(0,0,0)",borderRadius:10,padding:4,fontSize:15,top:"1%",left:"50%",marginLeft:"-45%",opacity:.7,transition:"opacity .35s ease-in-out"},iconDeleteWrapper:{position:"absolute",top:"1%",right:"9%"},iconDelete:{"&:hover":{opacity:1,color:"#fa0000",animation:"$shake 0.5s"}},"@keyframes shake":{"0%":{transform:"translate(0.5px, 0.5px) rotate(0deg)"},"10%":{transform:"translate(-0.5px, -1px) rotate(-1deg)"},"20%":{transform:"translate(-1.5px, 0px) rotate(1deg)"},"30%":{transform:"translate(1.5px, 1px) rotate(0deg)"},"40%":{transform:"translate(0.5px, -0.5px) rotate(1deg)"},"50%":{transform:"translate(-0.5px, 1px) rotate(-1deg)"},"60%":{transform:"translate(-1.5px, 0.5px) rotate(0deg)"},"70%":{transform:"translate(1.5px, 0.5px) rotate(-1deg)"},"80%":{transform:"translate(-0.5px, -0.5px) rotate(1deg)"},"90%":{transform:"translate(0.5px, 1px) rotate(0deg)"},"100%":{transform:"translate(0.5px, -1px) rotate(-1deg)"}}}),un=function(){var e=jn(),t=Object(c.c)(sn.a),n=t.name,a=t.lastName,r=t.avatarsArr,l=t.online,d=Object(s.useState)(!1),b=Object(i.a)(d,2),u=b[0],p=b[1],f=Object(s.useState)(0),x=Object(i.a)(f,2),h=x[0],g=x[1];return Object(o.jsxs)("div",{className:e.container,children:[u&&Object(o.jsx)(bn,{setModal:p,index:h,setIndex:g}),Object(o.jsx)(ln.Carousel,{onChange:function(e){return g(e)},selectedItem:h,children:r.map((function(e){var t=e.avatarUrl,n=e.updatedAt;return Object(o.jsxs)("div",{children:[Object(o.jsx)("img",{alt:"pic",src:"".concat(R.j,"/").concat(t)}),Object(o.jsx)("p",{className:"legend",children:Object(R.n)(n)})]},t)}))}),Object(o.jsx)("span",{className:e.nameTile,children:"".concat(Object(R.c)(n)).concat(Object(R.l)(n,15,1),"\n ").concat(Object(R.c)(a)).concat(Object(R.l)(a,15,1))}),Object(o.jsx)("span",{className:e.timeTile,children:"true"===l?"online":"last seen ".concat(Object(R.n)(l))}),r.length>1&&Object(o.jsx)("div",{className:e.iconDeleteWrapper,children:Object(o.jsx)(j.a,{className:e.iconDelete,onClick:function(){return p(!0)},sx:{width:36,height:36,backgroundColor:"rgb(0,0,0)",color:"#ffffff",opacity:.5,cursor:"pointer"},children:Object(o.jsx)(it.a,{fontSize:"medium"})})})]})},pn=n(295),fn=n.n(pn),xn=Object(r.a)({container:{width:"100%",backgroundColor:"#ffffff"}}),hn=function(){var e=xn(),t=Object(c.c)(sn.b);return Object(o.jsx)(vt.a,{className:e.container,children:Object(o.jsx)(yt.a,{children:Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return Object(R.a)("Number")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(T.a,{style:{marginRight:15},children:Object(o.jsx)(fn.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{primary:t,secondary:"Phone"})]})})})})},gn=function(e){var t=e.handleClick,n=Object(c.b)();return Object(s.useEffect)((function(){var e=function(){return n(Object(At.b)())};e();var t=setInterval(e,R.k);return function(){return clearInterval(t)}}),[n]),Object(o.jsxs)("div",{style:{backgroundColor:"#f3f2f2",height:"100%",width:"100%"},children:[Object(o.jsx)(cn,{handleClick:t}),Object(o.jsx)(un,{}),Object(o.jsx)(hn,{})]})},mn=Object(r.a)({container:{paddingLeft:10,height:"7vh",width:"100%",display:"flex",alignContent:"center",alignItems:"center",backgroundColor:"#ffffff"},iconArrow:{"&:hover":{transform:"rotate(360deg)",transition:"all 250ms ease-out "}}}),On=function(){var e=mn(),t=Object(c.b)();return Object(o.jsxs)(I.a,{className:e.container,direction:"row",spacing:21,children:[Object(o.jsx)(Ee.a,{onClick:function(){return t(Object(C.a)("settings"))},"aria-label":"delete",size:"medium",children:Object(o.jsx)(He.a,{className:e.iconArrow,fontSize:"medium"})}),Object(o.jsx)(z.a,{style:{marginLeft:20,color:"#474747"},variant:"h6",color:"initial",children:"Edit profile"})]})},vn=n(382),yn=n.n(vn),Cn=n(254),wn=Object(r.a)({container:{display:"flex",alignItems:"center",alignContent:"center",flexDirection:"column",width:"100%",padding:20,paddingTop:0,position:"relative",backgroundColor:"#ffffff"},imgWrapper:{cursor:"pointer",marginBottom:30,position:"relative"},imgDropZoneOverlay:{position:"absolute",width:120,height:120,borderRadius:"50%",backgroundColor:"#6868687d",left:0,zIndex:1,display:"flex",justifyContent:"center",alignContent:"center",alignItems:"center"},addPhoto:{color:"#ffffff",transform:"scale(1.1)","&:hover":{transform:"scale(1.3)"}},avatarArrow:{cursor:"pointer",alignSelf:"flex-end","&:hover":{backgroundColor:"rgb(62, 149, 231)"}}}),kn=function(e){var t=wn(),n=e.user,a=e.name,r=e.setName,c=e.lastName,i=e.setLastName,l=e.openBtn,b=e.setOpenBtn,u=e.setFile,p=n.avatarUrl,f=n.color,x=Object(Cn.a)({noDrag:!0,accept:"image/*"}),h=x.getRootProps,g=x.getInputProps,m=x.acceptedFiles,O=function(e){!l&&b(!0);var t=Object(R.d)(e.target.value);switch(e.target.name){case"name":r(t);break;case"lastName":i(t)}};return Object(s.useEffect)((function(){m.slice(-1)[0]&&(u(m.slice(-1)[0]),b(!0))}),[u,b,m]),Object(o.jsxs)("div",{className:t.container,children:[Object(o.jsxs)(U.a,{className:t.imgWrapper,children:[Object(o.jsxs)("div",Object(d.a)(Object(d.a)({},h({className:t.imgDropZoneOverlay})),{},{children:[Object(o.jsx)(yn.a,{className:t.addPhoto,fontSize:"large"}),Object(o.jsx)("input",Object(d.a)({},g()))]})),Object(o.jsx)(j.a,{alt:a,src:p?"".concat(R.j,"/").concat(p):void 0,sx:{background:f,width:120,height:120},children:"".concat(Object(R.c)(a)).concat(Object(R.c)(c))})]}),Object(o.jsx)(Vt.a,{id:"name",name:"name",label:"Name",value:a,fullWidth:!0,variant:"outlined",onChange:O,style:{marginBottom:20}}),Object(o.jsx)(Vt.a,{id:"lastName",name:"lastName",label:"LastName",value:c,fullWidth:!0,variant:"outlined",onChange:O})]})},Nn=n(296),Sn=n.n(Nn),In=Object(r.a)({container:{position:"absolute",content:"",top:"92vh",right:20},avatarArrow:{cursor:"pointer","&:hover":{backgroundColor:"rgb(62, 149, 231)"}}}),zn=function(e){var t=e.handleSubmit,n=In();return Object(o.jsx)("div",{className:n.container,children:Object(o.jsx)(j.a,{onClick:t,className:n.avatarArrow,sx:{width:56,height:56,backgroundColor:"rgb(41, 139, 231)",color:"#ffffff"},children:Object(o.jsx)(Sn.a,{fontSize:"medium"})})})},Rn=Object(r.a)({container:{width:"100%",height:"100%",backgroundColor:"#f3f2f2",position:"relative"}}),An=function(){var e=Rn(),t=Object(c.b)(),n=Object(c.c)(sn.a),a=Object(s.useState)(""),r=Object(i.a)(a,2),l=r[0],d=r[1],b=Object(s.useState)(""),j=Object(i.a)(b,2),u=j[0],p=j[1],f=Object(s.useState)(!1),x=Object(i.a)(f,2),h=x[0],g=x[1],m=Object(s.useState)(null),O=Object(i.a)(m,2),v=O[0],y=O[1],C=n.name,w=n.lastName,k=function(){var e=Object(me.a)(ge.a.mark((function e(){var t;return ge.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l===C&&u===w){e.next=3;break}return e.next=3,Object(ve.B)({name:l,lastName:u,originalName:l,originalLastName:u});case 3:if(!v){e.next=8;break}return(t=new FormData).append("avatar",v),e.next=8,Object(ve.D)(t);case 8:v&&y(null),h&&g(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(s.useEffect)((function(){var e=function(){return!h&&t(Object(At.b)())};e();var n=setInterval(e,R.k);return function(){return clearInterval(n)}}),[h,t]),Object(s.useEffect)((function(){C&&d(C),w&&p(w)}),[C,w]),Object(o.jsxs)("div",{className:e.container,children:[h&&Object(o.jsx)(zn,{handleSubmit:k}),Object(o.jsx)(On,{}),Object(o.jsx)(kn,{user:n,name:l,setName:d,lastName:u,setLastName:p,openBtn:h,setOpenBtn:g,file:v,setFile:y})]})},Dn=function(){var e=Object(c.b)(),t=Object(c.c)(sn.a),n=t.sort,r=t.nightMode,d=Object(c.c)(Se),b=Object(s.useState)(!1),j=Object(i.a)(b,2),u=j[0],p=j[1],f=Object(s.useState)(!1),x=Object(i.a)(f,2),h=x[0],g=x[1],m=Object(s.useState)(!1),O=Object(i.a)(m,2),v=O[0],y=O[1],w=Object(s.useState)(""),k=Object(i.a)(w,2),S=k[0],I=k[1],z=Object(s.useState)(""),R=Object(i.a)(z,2),A=R[0],D=R[1],M=Object(s.useRef)(null),B=function(){e(Object(C.a)("")),p(!0)};return Object(s.useEffect)((function(){I(""),D(""),p(!1),g(!1)}),[d]),Object(s.useEffect)((function(){var e=function(e){"overlay"===e.target.id&&(p(!1),g(!1))};if(!M.current){var t=document.getElementById("modal-root");t&&(t.addEventListener("click",e),M.current=t)}return function(){M.current&&(M.current.removeEventListener("click",e),M.current=null)}}),[]),Object(o.jsxs)(a.a,{item:!0,lg:3,style:{position:"relative",backgroundColor:"#ffffff"},onMouseEnter:function(){return!h&&g(!0)},onMouseLeave:function(){return h&&g(!1)},children:[""===d||"contacts"===d||"searchChats"===d||"searchAllMessages"===d?Object(o.jsx)(tt,{handleClick:B,handleOpenIsSearch:function(){return""===d&&e(Object(C.a)("searchChats"))},sort:n,handleSearch:function(e){return I(e.target.value)},leftIsOpen:d,value:S,setDate:D,date:A,disabled:v}):null,"searchChats"===d||"searchAllMessages"===d?Object(o.jsx)(Be,{value:S,setValue:I,sort:n,date:A,setDate:D,setDisabled:y}):null,""===d&&Object(o.jsx)(Ot,{sort:n}),""===d&&h&&Object(o.jsx)(N,{setPopup:g}),u&&M.current&&Object(l.createPortal)(Object(o.jsx)(Bt,{nightMode:r}),M.current),"contacts"===d&&Object(o.jsx)(Ut,{handleClick:B,value:S,sort:n,date:A,setDisabled:y}),"contact"===d&&Object(o.jsx)(Kt,{handleClick:B}),"settings"===d&&Object(o.jsx)(gn,{handleClick:B}),"edit"===d&&Object(o.jsx)(An,{})]})},Mn=n(524),Bn=function(){var e=Object(c.b)(),t=Object(c.c)(gt.a),n=t.name,a=t.lastName,r=t.avatarUrl,i=t.color,s=t.online;return Object(o.jsxs)(M.a,{onClick:function(){return e(Object(C.b)("credentials"))},children:[Object(o.jsx)(T.a,{children:Object(o.jsx)(j.a,{alt:n,src:r?"".concat(R.j,"/").concat(r):void 0,sx:{background:i,width:44,height:44},children:!r&&"".concat(Object(R.c)(n)).concat(Object(R.c)(a))})}),Object(o.jsx)(B.a,{primary:"".concat(Object(R.c)(n)).concat(Object(R.l)(n,15,1),"\n ").concat(Object(R.c)(a)).concat(Object(R.l)(a,15,1)),secondaryTypographyProps:{color:"#0379af"},secondary:"true"===s?"online":"last seen ".concat(Object(R.n)(s))})]})},Tn=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(-2),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"14px 14px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(4)}}}}})),En=function(e){var t=e.setModal,n=Object(s.useState)(null),a=Object(i.a)(n,2),r=a[0],l=a[1],d=Boolean(r),b=Object(c.c)(gt.a),j=b.companionId,u=b.mute,f=function(e){"mute"===e&&Object(ve.k)(j),"deleteModal"===e&&t(!0),l(null)};return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(Ee.a,{onClick:function(e){l(e.currentTarget)},"aria-label":"delete",size:"medium",children:Object(o.jsx)(nn.a,{fontSize:"medium"})}),Object(o.jsxs)(Tn,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:r,open:d,onClose:f,children:[Object(o.jsxs)(p.a,{onClick:function(){return f("mute")},children:[u?Object(o.jsx)(ot.a,{}):Object(o.jsx)(rt.a,{}),u?"Unmute":"Mute"]}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return f("deleteModal")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete chat"]})]})]})},Ln=Object(r.a)({modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"},titleWrapper:{display:"flex",justifyContent:"flex-start",alignContent:"center",alignItems:"center"}}),Wn=function(e){var t=e.setModal,n=Ln(),a=Object(c.b)(),r=Object(c.c)(gt.a),i=r.name,s=r.lastName,l=r.avatarUrl,d=r.color,b=r.companionId;return Object(o.jsx)("div",{onClick:function(e){var n=e.target.id;if("overlay"===n||"cancel"===n)return t(!1);"delete"===n&&(Object(ve.m)(b),t(!1),a(Object(Ae.b)()),a(Object(C.b)("")))},className:n.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:n.modalDelete,children:[Object(o.jsxs)("div",{className:n.titleWrapper,children:[Object(o.jsx)(j.a,{alt:i,src:l?"".concat(R.j,"/").concat(l):void 0,sx:{background:d,width:38,height:38,marginRight:2},children:"".concat(Object(R.c)(i)).concat(Object(R.c)(s))}),Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete chat"})]}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete the\n chat with ".concat("".concat(Object(R.c)(i)).concat(Object(R.l)(i,15,1)," \n ").concat(Object(R.c)(s)).concat(Object(R.l)(s,15,1)),"?")}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE CHAT"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})},_n=Object(r.a)({container:{marginLeft:20}}),Fn=function(){var e=_n(),t=Object(c.b)(),n=Object(s.useState)(!1),a=Object(i.a)(n,2),r=a[0],l=a[1];return Object(o.jsxs)(I.a,{className:e.container,direction:"row",children:[Object(o.jsx)(Ee.a,{onClick:function(){return t(Object(C.b)("search"))},"aria-label":"delete",size:"medium",children:Object(o.jsx)(Fe.a,{fontSize:"medium"})}),Object(o.jsx)(En,{setModal:l}),r&&Object(o.jsx)(Wn,{setModal:l})]})},Pn=Object(r.a)({toolBar:{color:"#6e6d6d",display:"flex",justifyContent:"space-between",backgroundColor:"#ffffff",height:"7vh"}}),Yn=function(){var e=Pn();return Object(o.jsx)(Mn.a,{position:"static",children:Object(o.jsxs)(Te.a,{className:e.toolBar,children:[Object(o.jsx)(Bn,{}),Object(o.jsx)(Fn,{})]})})},Hn=n(383),Un=n.n(Hn),Vn=Object(r.a)({avatarArrowWrapper:{position:"absolute",right:20,top:"70vh",width:56},avatarArrow:{cursor:"pointer","&:hover":{backgroundColor:"rgb(41, 139, 231)",color:"#ffffff"}},listSeenIcon:{position:"absolute",top:-8,left:16,borderRadius:"50%",color:"#ffffff",border:"none",height:24,width:24,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",alignContent:"center",fontSize:12,zIndex:10,cursor:"pointer"}}),qn=function(e){var t=e.isArrow,n=e.handleScrollTo,a=e.isNew,r=Vn();return Object(o.jsxs)("div",{className:r.avatarArrowWrapper,style:{display:t?"block":"none"},children:[Object(o.jsx)("button",{onClick:n,style:{display:a.new?"block":"none",background:a.mute?"#a7aaa7":"#0ac40a"},className:r.listSeenIcon,children:a.new}),Object(o.jsx)(j.a,{onClick:n,className:r.avatarArrow,sx:{backgroundColor:"#ffffff",width:56,height:56,color:"#6b6b6b"},children:Object(o.jsx)(Un.a,{fontSize:"medium"})})]})},Gn=n(389),Zn=n.n(Gn),$n=n(390),Kn=n.n($n),Jn=n(388),Xn=n.n(Jn),Qn=n(387),eo=n.n(Qn),to=n(392),no=n.n(to),oo=n(391),ao=n.n(oo),ro=n(384),co=n.n(ro),io=n(385),so=n(246),lo=n.n(so),bo=Object(r.a)({container:{width:"100%",position:"relative"},dropZone:{width:"100%",display:"flex",position:"relative",height:20,zIndex:10}}),jo=function(e){var t=e.children,n=e.setFile,a=e.setValue,r=e.accept,c=bo(),i=Object(Cn.a)({noDrag:!0,accept:r}),l=i.getRootProps,b=i.getInputProps,j=i.acceptedFiles;return Object(s.useEffect)((function(){j.slice(-1)[0]&&(a(""),n(j.slice(-1)[0]))}),[n,a,j]),Object(o.jsxs)("div",{className:c.container,children:[t,Object(o.jsx)("div",Object(d.a)(Object(d.a)({},l({className:c.dropZone})),{},{children:Object(o.jsx)("input",Object(d.a)({placeholder:"Photo or Video"},b()))}))]})},uo=Object(r.a)({list:{background:"#fdfdfd"},listIcon:{position:"absolute",left:0},listText:{position:"absolute",left:40}}),po=function(e){var t=e.setIsOpenMenu,n=e.setFile,a=e.setValue,r=e.setType,c=uo(),i=function(e){r(e),t(!1)};return Object(o.jsxs)(yt.a,{className:c.list,children:[Object(o.jsx)(p.a,{onClick:function(){return i("content")},children:Object(o.jsxs)(jo,{setFile:n,setValue:a,accept:"image/*,video/*,audio/*",children:[Object(o.jsx)(T.a,{className:c.listIcon,children:Object(o.jsx)(lo.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{className:c.listText,children:"Upload Image/Audio/Video"})]})}),Object(o.jsx)(p.a,{onClick:function(){return i("application")},children:Object(o.jsxs)(jo,{setFile:n,setValue:a,accept:"application/pdf,\r application/vnd.openxmlformats-officedocument.wordprocessingml.document",children:[Object(o.jsx)(T.a,{className:c.listIcon,children:Object(o.jsx)(lo.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{className:c.listText,children:"Upload File"})]})})]})},fo=Object(r.a)({container:{width:"35vw",height:"6vh",position:"fixed",bottom:"2vh",borderRadius:8,padding:10,display:"flex",flexWrap:"nowrap",alignContent:"start",alignItems:"start",color:"#6b6b6b",border:"solid 2px #ffffff",backgroundColor:"#ffffff"},containerActive:{width:"35vw",height:"6vh",position:"fixed",bottom:"2vh",borderRadius:8,padding:10,display:"flex",flexWrap:"nowrap",alignContent:"start",alignItems:"start",border:"solid 2px rgb(41, 139, 231)",backgroundColor:"#ffffff"},textarea:{width:"100%",height:"100%",outline:"none",border:"none",padding:"0px 10px",marginLeft:8,marginRight:8,overflowY:"auto",resize:"none","&::placeholder":{color:"inherit",fontWeight:600,fontSize:20}},attachIcon:{transform:"rotate(30deg)"},borderTop:{position:"absolute",left:0,top:"-2vh",width:"100%",height:1,background:"#ffffff"},filesMenu:{background:"#fdfdfd",position:"absolute",width:"15vw",maxWidth:"100%",left:"61%",bottom:"10vh",zIndex:10,visibility:"visible",borderRadius:10,padding:"4px 6px"},emoji:{position:"absolute",bottom:"10vh",zIndex:10,visibility:"visible"},iconCancel:{position:"absolute",left:-72,bottom:-1,display:"flex",backgroundColor:"#ffffff",color:"rgb(243, 69, 69)",border:"solid 4px rgb(243, 69, 69)",borderRadius:"50%","&:hover":{backgroundColor:"rgb(243, 69, 69)",color:"#ffffff"}},avatarCamera:{position:"absolute",left:-72,bottom:-1,display:"flex",borderRadius:"50%",zIndex:10,border:"solid 14px #ffffff","&:hover":{backgroundColor:"rgb(41, 139, 231)",border:"solid 14px rgb(41, 139, 231)",color:"#ffffff"}},avatarRight:{position:"absolute",right:-72,bottom:-1,display:"flex",borderRadius:"50%",zIndex:10,border:"solid 14px #ffffff","&:hover":{backgroundColor:"rgb(41, 139, 231)",border:"solid 14px rgb(41, 139, 231)",color:"#ffffff"}},pauseLeft:{position:"absolute",left:-72,bottom:-1,zIndex:10},pauseRight:{position:"absolute",right:-72,bottom:-1,zIndex:10},avatarPause:{backgroundColor:"#ffffff",cursor:"pointer",animation:"$shake 1s",animationIterationCount:"infinite","&:hover":{backgroundColor:"rgb(41, 139, 231)",color:"#ffffff"}},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100},ringContainerLeft:{position:"absolute",left:-25,top:-25,zIndex:10},ringContainerRight:{position:"absolute",right:-25,top:-25,zIndex:10},circle:{width:15,height:15,backgroundColor:"rgb(255, 4, 4)",borderRadius:"50%",position:"relative"},ringRing:{border:"3px solid rgb(255, 4, 4)",borderRadius:"50%",height:25,width:25,position:"absolute",right:-5,top:-5,animation:"$pulsate 1s ease-out",animationIterationCount:"infinite",opacity:0},"@keyframes pulsate":{"0%":{transform:"scale(0.1, 0.1)",opacity:0},"50%":{opacity:1},"100%":{transform:"scale(1.2, 1.2)",opacity:0}},"@keyframes shake":{"0%":{transform:"translate(0.5px, 0.5px) rotate(0deg)"},"10%":{transform:"translate(-0.5px, -1px) rotate(-1deg)"},"20%":{transform:"translate(-1.5px, 0px) rotate(1deg)"},"30%":{transform:"translate(1.5px, 1px) rotate(0deg)"},"40%":{transform:"translate(0.5px, -0.5px) rotate(1deg)"},"50%":{transform:"translate(-0.5px, 1px) rotate(-1deg)"},"60%":{transform:"translate(-1.5px, 0.5px) rotate(0deg)"},"70%":{transform:"translate(1.5px, 0.5px) rotate(-1deg)"},"80%":{transform:"translate(-0.5px, -0.5px) rotate(1deg)"},"90%":{transform:"translate(0.5px, 1px) rotate(0deg)"},"100%":{transform:"translate(0.5px, -1px) rotate(-1deg)"}}}),xo=function(e){var t=e.isArrow,n=fo(),a=Object(c.c)(gt.a).companionId,r=Object(c.c)(Ie),l=Object(s.useState)(""),d=Object(i.a)(l,2),b=d[0],u=d[1],p=Object(s.useState)(!1),f=Object(i.a)(p,2),x=f[0],h=f[1],g=Object(s.useState)(!1),m=Object(i.a)(g,2),v=m[0],y=m[1],C=Object(s.useState)(!1),w=Object(i.a)(C,2),k=w[0],N=w[1],S=Object(s.useState)(!1),I=Object(i.a)(S,2),z=I[0],A=I[1],D=Object(s.useState)(!1),M=Object(i.a)(D,2),B=M[0],T=M[1],E=Object(s.useState)(""),L=Object(i.a)(E,2),W=L[0],_=L[1],F=Object(io.useReactMediaRecorder)({audio:!0}),P=F.status,Y=F.startRecording,H=F.stopRecording,U=F.mediaBlobUrl,V=F.clearBlobUrl,q=Object(io.useReactMediaRecorder)({video:!0}),G=q.status,Z=q.startRecording,$=q.stopRecording,K=q.mediaBlobUrl,J=q.clearBlobUrl,X=function(){x&&h(!1),z&&A(!1),B&&T(!1),b&&u(""),W&&_(""),U&&V(),K&&J(),v&&y(!1),k&&N(!1)},Q=function(){var e=Object(me.a)(ge.a.mark((function e(){var t,n,o,r,c,i;return ge.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(b&&Object(ve.u)(a,b),U&&"recording"===W&&((t=new XMLHttpRequest).open("GET",U,!0),t.responseType="blob",t.onload=function(){if(200===t.status){var e=t.response,n=new File([e],"audio.mp3",{type:"audio/mpeg"}),o=new FormData;o.append("audio",n),Object(ve.r)(a,o),V()}},t.send()),K&&"filming"===W&&((n=new XMLHttpRequest).open("GET",K,!0),n.responseType="blob",n.onload=function(){if(200===n.status){var e=n.response,t=new File([e],"video.mp4",{type:"video/mp4"}),o=new FormData;o.append("video",t),Object(ve.v)(a,o),J()}},n.send()),!x||!W){e.next=12;break}if(!x.type.includes("image")||"content"!==W){e.next=9;break}return(o=new FormData).append("image",x),e.next=9,Object(ve.t)(a,o);case 9:x.type.includes("audio")&&"content"===W&&((r=new FormData).append("audio",x),Object(ve.r)(a,r)),x.type.includes("video")&&"content"===W&&((c=new FormData).append("video",x),Object(ve.v)(a,c)),x.type.includes("application")&&"application"===W&&((i=new FormData).append("file",x),Object(ve.s)(a,i));case 12:X(),Object(R.h)("".concat(R.j,"/send.mp3"));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=Object(me.a)(ge.a.mark((function e(){return ge.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ve.z)(a,!0);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=Object(me.a)(ge.a.mark((function e(){return ge.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(ve.z)(a,!1);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){if(z)return H();Y(),_("recording"),A(!0)},oe=function(){if(B)return $();Z(),_("filming"),T(!0)};return Object(o.jsxs)("div",{className:b||x||"stopped"===P||"stopped"===G?n.containerActive:n.container,children:[t&&Object(o.jsx)("div",{className:n.borderTop}),B&&"stopped"!==G&&Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("div",{className:n.pauseLeft,children:Object(o.jsx)(j.a,{onClick:oe,className:n.avatarPause,sx:{backgroundColor:"#ffffff",color:"#6b6b6b",width:56,height:56},children:Object(o.jsx)(eo.a,{fontSize:"large"})})}),Object(o.jsxs)("div",{className:n.ringContainerLeft,children:[Object(o.jsx)("div",{className:n.ringRing}),Object(o.jsx)("div",{className:n.circle})]})]}),z&&"stopped"!==P&&Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("div",{className:n.pauseRight,children:Object(o.jsx)(j.a,{onClick:ne,className:n.avatarPause,sx:{backgroundColor:"#ffffff",color:"#6b6b6b",width:56,height:56},children:Object(o.jsx)(eo.a,{fontSize:"large"})})}),Object(o.jsxs)("div",{className:n.ringContainerRight,children:[Object(o.jsx)("div",{className:n.ringRing}),Object(o.jsx)("div",{className:n.circle})]})]}),Object(o.jsx)(O.a,{onClick:X,fontSize:"small",className:n.iconCancel,sx:{width:56,height:56,display:x||b||"stopped"===P||"stopped"===G?"inline-block":"none"}}),Object(o.jsx)(Xn.a,{onClick:oe,className:n.avatarCamera,sx:{backgroundColor:"#ffffff",color:"#6b6b6b",width:56,height:56},style:{display:"idle"!==P||"stopped"===G||x||b||B?"none":"block"}}),Object(o.jsx)(Zn.a,{onClick:Q,className:n.avatarRight,sx:{backgroundColor:"#ffffff",color:"rgb(41, 139, 231)",width:56,height:56},style:{display:b||x||"stopped"===P||"stopped"===G?"block":"none"}}),Object(o.jsx)(Kn.a,{onClick:ne,className:n.avatarRight,sx:{backgroundColor:"#ffffff",color:"#6b6b6b",width:56,height:56},style:{display:b||x||"stopped"===P||"idle"!==G||z?"none":"block"}}),Object(o.jsx)(ao.a,{onClick:function(){return!k&&N(!0)},fontSize:"medium",sx:{color:k?"rgb(41, 139, 231)":"#6b6b6b",cursor:"pointer",pointerEvents:x||"idle"!==P||"idle"!==G?"none":"auto","&:hover":{color:"rgb(41, 139, 231)"}}}),Object(o.jsx)("div",{onClick:function(e){return"overlay"===e.target.id&&k&&N(!1)},className:n.overlay,id:"overlay",style:{display:k?"block":"none"},children:Object(o.jsx)("div",{className:n.emoji,style:{left:r?"32.5vw":"45vw"},children:Object(o.jsx)(co.a,{onEmojiClick:function(e,t){u((function(e){return e+t.emoji})),N(!1)}})})}),Object(o.jsx)("textarea",{disabled:!(!x&&"idle"===P&&"idle"===G),value:b,onBlur:te,onFocus:ee,onChange:function(e){return u(e.target.value)},className:n.textarea,placeholder:x?"The File is ready to send":"idle"===P&&"idle"===G?"Message ":"".concat("stopped"===P||"stopped"===G?"Recorded":"Recording in progress"),rows:1,style:{color:b||x||"idle"!==P||"idle"!==G?"rgb(41, 139, 231)":"#6b6b6b"}}),Object(o.jsx)(no.a,{onClick:function(){return!v&&y(!0)},className:n.attachIcon,fontSize:"medium",sx:{color:v?"rgb(41, 139, 231)":"#6b6b6b",cursor:"pointer",pointerEvents:b||"idle"!==P||"idle"!==G?"none":"auto","&:hover":{color:"rgb(41, 139, 231)"}}}),Object(o.jsx)("div",{onClick:function(e){return"overlay"===e.target.id&&v&&y(!1)},className:n.overlay,id:"overlay",style:{display:v?"block":"none"},children:Object(o.jsx)("div",{className:n.filesMenu,style:{left:r?"52.5vw":"65vw"},children:Object(o.jsx)(po,{setFile:h,setValue:u,setIsOpenMenu:y,setType:_})})})]})},ho=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),go=Object(r.a)({container:{display:"flex",justifyContent:"flex-start",marginBottom:15},wrapper:{position:"relative",display:"flex",alignItems:"center",alignContent:"center",maxWidth:450,padding:"10px",paddingBottom:18,backgroundColor:"#ffffff",border:"1px solid #f0f0f0",borderRadius:7},message:{wordBreak:"break-word",textAlign:"left",font:"400 .9em 'Open Sans', sans-serif","&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ffffff",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ffffff",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"-1px",left:"-17px"}},messageActive:{wordBreak:"break-word",textAlign:"left",font:"400 .9em 'Open Sans', sans-serif","&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #babdbc",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #babdbc",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"-1px",left:"-17px"}},copyIcon:{color:"#b56ff7",cursor:"pointer",marginRight:7,"&:hover":{color:"#9c3bf8"}},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:6,right:6,color:"#414141",padding:3,borderRadius:5},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),mo=function(e){var t=e.message,n=e.name,a=e.lastName,r=e.createdAt,c=e._id,l=go(),d=Object(s.useState)(null),b=Object(i.a)(d,2),j=b[0],u=b[1],f=Object(s.useState)(!1),x=Object(i.a)(f,2),h=x[0],g=x[1],m=Object(s.useState)(!1),O=Object(i.a)(m,2),v=O[0],y=O[1],C=Boolean(j),w=function(e){"copy"===e&&Object(R.a)("Message"),"delete"===e&&y(!0),u(null),g(!1)};return Object(o.jsx)("div",{className:l.container,children:Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),u(e.currentTarget),g(!0)}(e)},className:l.wrapper,style:{backgroundColor:h?"#babdbc":void 0,border:h?"#babdbc":void 0},children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return Object(R.a)("Message")},text:t,children:Object(o.jsx)(re.a,{className:l.copyIcon,fontSize:"large"})}),Object(o.jsx)(B.a,{className:h?l.messageActive:l.message,primary:"".concat(Object(R.c)(n)).concat(Object(R.l)(n,15,1)," \n ").concat(Object(R.c)(a)).concat(Object(R.l)(a,15,1)),primaryTypographyProps:{color:"#0379af"},secondary:t,secondaryTypographyProps:{color:"#0e0d0d"}}),Object(o.jsx)("div",{className:l.time,children:Object(R.p)(r)}),Object(o.jsxs)(ho,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:j,open:C,onClose:w,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return w("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy message"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return w("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),v&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return y(!1);"delete"===t&&(Object(ve.o)(c),y(!1))},className:l.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:l.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})})},Oo=n(491),vo=n(297),yo=n.n(vo),Co=n(183),wo=n.n(Co),ko=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),No=Object(r.a)({container:{display:"flex",justifyContent:"flex-start",marginBottom:15},wrapper:{width:400,position:"relative",display:"flex",alignItems:"center",alignContent:"center",justifyContent:"space-between",borderRadius:7,padding:"12px 5px 12px 5px",backgroundColor:"#ffffff","&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ffffff",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ffffff",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",left:"-17px"}},wrapperActive:{width:400,position:"relative",display:"flex",alignItems:"center",alignContent:"center",justifyContent:"space-between",borderRadius:7,padding:"12px 5px 12px 5px",backgroundColor:"#babdbc","&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #babdbc",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #babdbc",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",left:"-17px"}},image:{borderRadius:7,width:300,maxHeight:400,cursor:"pointer"},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:0,right:6,color:"#414141",padding:3,borderRadius:5},bntDownload:{backgroundColor:"inherit",color:"#54b0fc",width:30,height:30,"&:hover":{backgroundColor:"#54b0fc",color:"#ffffff"}},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden",boxSizing:"border-box",display:"flex",justifyContent:"center",alignContent:"center",alignItems:"center"},wrapperOverlayImg:{width:"30%",maxHeight:"80%",position:"relative",display:"flex"},overlayDownloadIcon:{position:"absolute",content:"",right:0,top:-40,cursor:"pointer",color:"#e9e7e7",padding:0,borderRadius:"50%","&:hover":{backgroundColor:"#ffffff",color:"#b8b7b7"}},overlayTime:{position:"absolute",content:"",color:"#ffffff",top:-30,left:0,borderRadius:10,padding:"2px 6px 2px 6px",backgroundColor:"#707070"},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlayDelete:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),So=function(e){var t=e.url,n=e.createdAt,a=e.color,r=(e.message,e.messages,e.fullType),c=e._id,l=No(),d=Object(s.useState)(!1),b=Object(i.a)(d,2),j=b[0],u=b[1],f=Object(s.useState)(null),x=Object(i.a)(f,2),h=x[0],g=x[1],m=Object(s.useState)(!1),O=Object(i.a)(m,2),v=O[0],y=O[1],C=Object(s.useState)(!1),w=Object(i.a)(C,2),k=w[0],N=w[1],S=Boolean(h),I=function(e){"copy"===e&&Object(R.a)("Link"),"delete"===e&&N(!0),g(null),y(!1)};return j?Object(o.jsx)("div",{onClick:function(e){return"overlay"===e.target.id&&j&&u(!1)},id:"overlay",className:l.overlay,children:Object(o.jsxs)("div",{className:l.wrapperOverlayImg,children:[Object(o.jsx)("span",{className:l.overlayTime,children:Object(R.n)(n)}),Object(o.jsx)(Q.a,{className:l.overlayDownloadIcon,fontSize:"large",onClick:function(){return Object(R.e)(t,r)}}),Object(o.jsx)("img",{width:"100%",height:"auto",alt:"imageItem",src:t})]})}):Object(o.jsx)("div",{className:l.container,children:Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),g(e.currentTarget),y(!0)}(e)},className:v?l.wrapperActive:l.wrapper,children:[Object(o.jsx)(yo.a,{fontSize:"large",style:{color:"#bd9a00"}}),Object(o.jsx)("img",{onClick:function(){return!j&&u(!0)},className:l.image,alt:"message pic",src:t,style:{backgroundColor:t?"":a},width:"300",height:"400"}),Object(o.jsx)(Oo.a,{onClick:function(){return Object(R.e)(t,r)},className:l.bntDownload,children:Object(o.jsx)(wo.a,{fontSize:"medium"})}),Object(o.jsx)("div",{className:l.time,children:Object(R.p)(n)}),Object(o.jsxs)(ko,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:h,open:S,onClose:I,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return I("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy Image link"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return I("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),k&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return N(!1);"delete"===t&&(Object(ve.o)(c),N(!1))},className:l.overlayDelete,id:"overlay",children:Object(o.jsxs)("div",{className:l.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})})},Io=n(299),zo=n.n(Io),Ro=n(298),Ao=n.n(Ro),Do=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),Mo=Object(r.a)({container:{display:"flex",justifyContent:"flex-start",marginBottom:15},wrapper:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",padding:"12px 5px 12px 5px",backgroundColor:"#ffffff",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ffffff",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ffffff",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",left:"-17px"}},wrapperActive:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",padding:"12px 5px 12px 5px",backgroundColor:"#babdbc",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #babdbc",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #babdbc",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",left:"-17px"}},bntDownload:{backgroundColor:"inherit",color:"#54b0fc",width:30,height:30,"&:hover":{backgroundColor:"#54b0fc",color:"#ffffff"}},player:{margin:"0 5px 0 5px",borderRadius:7},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:0,right:6,color:"#414141",padding:3,borderRadius:5},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),Bo=function(e){var t=e.url,n=e.createdAt,a=e.fullType,r=e._id,c=Mo(),l=Object(s.useState)(null),d=Object(i.a)(l,2),b=d[0],j=d[1],u=Object(s.useState)(!1),f=Object(i.a)(u,2),x=f[0],h=f[1],g=Object(s.useState)(!1),m=Object(i.a)(g,2),O=m[0],v=m[1],y=Boolean(b),C=function(e){"copy"===e&&Object(R.a)("Link"),"delete"===e&&v(!0),j(null),h(!1)};return Object(o.jsx)("div",{className:c.container,children:Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),j(e.currentTarget),h(!0)}(e)},className:x?c.wrapperActive:c.wrapper,children:[Object(o.jsx)(zo.a,{fontSize:"large",style:{color:"#0294c0"}}),Object(o.jsx)(Ao.a,{className:c.player,src:t,controls:!0}),Object(o.jsx)(Oo.a,{onClick:function(){return Object(R.e)(t,a)},className:c.bntDownload,children:Object(o.jsx)(wo.a,{fontSize:"medium"})}),Object(o.jsx)("div",{className:c.time,children:Object(R.p)(n)}),Object(o.jsxs)(Do,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:b,open:y,onClose:C,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return C("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy Audio link"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return C("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),O&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return v(!1);"delete"===t&&(Object(ve.o)(r),v(!1))},className:c.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:c.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})})},To=n(329),Eo=n.n(To),Lo=n(300).Player,Wo=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),_o=Object(r.a)({container:{display:"flex",justifyContent:"flex-start",marginBottom:15},wrapper:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",width:400,padding:"12px 5px 12px 5px",backgroundColor:"#ffffff",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ffffff",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ffffff",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",left:"-17px"}},wrapperActive:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",width:400,padding:"12px 5px 12px 5px",backgroundColor:"#babdbc",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #babdbc",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #babdbc",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",left:"-17px"}},bntDownload:{backgroundColor:"inherit",color:"#54b0fc",width:30,height:30,marginLeft:5,"&:hover":{backgroundColor:"#54b0fc",color:"#ffffff"}},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:0,right:6,color:"#414141",padding:3,borderRadius:5},player:{backgroundColor:"#ffffff"},playerActive:{backgroundColor:"#babdbc"},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),Fo=function(e){var t=e.url,n=e.createdAt,a=e.fullType,r=e._id,c=_o(),l=Object(s.useState)(null),d=Object(i.a)(l,2),b=d[0],j=d[1],u=Object(s.useState)(!1),f=Object(i.a)(u,2),x=f[0],h=f[1],g=Object(s.useState)(!1),m=Object(i.a)(g,2),O=m[0],v=m[1],y=Boolean(b),C=function(e){"copy"===e&&Object(R.a)("Link"),"delete"===e&&v(!0),j(null),h(!1)};return Object(o.jsx)("div",{className:c.container,children:Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),j(e.currentTarget),h(!0)}(e)},className:x?c.wrapperActive:c.wrapper,children:[Object(o.jsx)(Eo.a,{fontSize:"large",style:{color:"#03b003"}}),Object(o.jsx)(Lo,{className:x?c.playerActive:c.player,playsInline:!0,src:t}),Object(o.jsx)(Oo.a,{onClick:function(){return Object(R.e)(t,a)},className:c.bntDownload,children:Object(o.jsx)(wo.a,{fontSize:"medium"})}),Object(o.jsx)("div",{className:c.time,children:Object(R.p)(n)}),Object(o.jsxs)(Wo,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:b,open:y,onClose:C,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return C("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy Video link"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return C("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),O&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return v(!1);"delete"===t&&(Object(ve.o)(r),v(!1))},className:c.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:c.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})})},Po=n(330),Yo=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),Ho=Object(r.a)({container:{display:"flex",justifyContent:"flex-start",marginBottom:15},wrapper:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",width:200,padding:"5px 5px 12px 5px",backgroundColor:"#ffffff",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ffffff",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ffffff",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",left:"-17px"}},wrapperActive:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",width:200,padding:"5px 5px 12px 5px",backgroundColor:"#babdbc",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #babdbc",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0px",left:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #babdbc",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",left:"-17px"}},bntDownload:{backgroundColor:"inherit",color:"#54b0fc",width:30,height:30,"&:hover":{backgroundColor:"#54b0fc",color:"#ffffff"}},title:{margin:"0 30px 0 5px",color:"#0e0d0d",cursor:"pointer","&:hover":{color:"#54b0fc"}},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:0,right:6,color:"#414141",padding:3,borderRadius:5},overlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(104, 105, 104, 0.6)",border:"solid 2px #0084ff",cursor:"pointer",zIndex:100},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlayDelete:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),Uo=function(e){var t=e.url,n=e.createdAt,a=e.type,r=e._id,c=Ho(),l=Object(s.useState)(!1),d=Object(i.a)(l,2),b=d[0],j=d[1],u=Object(s.useState)(null),f=Object(i.a)(u,2),x=f[0],h=f[1],g=Object(s.useState)(!1),m=Object(i.a)(g,2),O=m[0],v=m[1],y=Object(s.useState)(!1),C=Object(i.a)(y,2),w=C[0],k=C[1],N=Boolean(x),S=function(){return b&&j(!1)},I=function(e){"copy"===e&&Object(R.a)("Link"),"delete"===e&&k(!0),h(null),v(!1)};return Object(o.jsxs)("div",{className:c.container,children:[b&&Object(o.jsx)("div",{className:c.overlay,id:"overlay",onClick:S,children:Object(o.jsx)(Po,{allowFullScreen:!0,fileType:a,filePath:t,onError:S})}),Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),h(e.currentTarget),v(!0)}(e)},className:O?c.wrapperActive:c.wrapper,children:[Object(o.jsx)(lo.a,{fontSize:"large",style:{color:"#99b401"}}),!b&&Object(o.jsx)("span",{className:c.title,onClick:function(){return!b&&j(!0)},children:"Read File"}),Object(o.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",download:!0,children:Object(o.jsx)(Oo.a,{className:c.bntDownload,children:Object(o.jsx)(wo.a,{fontSize:"medium"})})}),Object(o.jsx)("div",{className:c.time,children:Object(R.p)(n)}),Object(o.jsxs)(Yo,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:x,open:N,onClose:I,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return I("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy File link"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return I("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),w&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return k(!1);"delete"===t&&(Object(ve.o)(r),k(!1))},className:c.overlayDelete,id:"overlay",children:Object(o.jsxs)("div",{className:c.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})]})},Vo=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),qo=Object(r.a)({container:{display:"flex",justifyContent:"flex-end",marginBottom:15},wrapper:{position:"relative",display:"flex",alignItems:"center",alignContent:"center",maxWidth:450,padding:"10px",paddingBottom:18,backgroundColor:"#deffa9",border:"1px solid #d5ff91",borderRadius:7},message:{wordBreak:"break-word",textAlign:"left",font:"400 .9em 'Open Sans', sans-serif","&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #deffa9",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #deffa9",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"-1px",right:"-17px"}},messageActive:{wordBreak:"break-word",textAlign:"left",font:"400 .9em 'Open Sans', sans-serif","&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ced8d7",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ced8d7",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"-1px",right:"-17px"}},copyIcon:{color:"#b56ff7",cursor:"pointer",marginRight:7,"&:hover":{color:"#9c3bf8"}},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:6,right:6,color:"#414141",padding:3,borderRadius:5},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),Go=function(e){var t=e.message,n=e.name,a=e.lastName,r=e.createdAt,c=e._id,l=qo(),d=Object(s.useState)(null),b=Object(i.a)(d,2),j=b[0],u=b[1],f=Object(s.useState)(!1),x=Object(i.a)(f,2),h=x[0],g=x[1],m=Object(s.useState)(!1),O=Object(i.a)(m,2),v=O[0],y=O[1],C=Boolean(j),w=function(e){"copy"===e&&Object(R.a)("Message"),"delete"===e&&y(!0),u(null),g(!1)};return Object(o.jsx)("div",{className:l.container,children:Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),u(e.currentTarget),g(!0)}(e)},className:l.wrapper,style:{backgroundColor:h?"#ced8d7":void 0,border:h?"#ced8d7":void 0},children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return Object(R.a)("Message")},text:t,children:Object(o.jsx)(re.a,{className:l.copyIcon,fontSize:"large"})}),Object(o.jsx)(B.a,{className:h?l.messageActive:l.message,primary:"".concat(Object(R.c)(n)).concat(Object(R.l)(n,15,1)," \n ").concat(Object(R.c)(a)).concat(Object(R.l)(a,15,1)),primaryTypographyProps:{color:"#42aee0"},secondary:t,secondaryTypographyProps:{color:"#0e0d0d"}}),Object(o.jsx)("div",{className:l.time,children:Object(R.p)(r)}),Object(o.jsxs)(Vo,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:j,open:C,onClose:w,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return w("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy message"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return w("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),v&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return y(!1);"delete"===t&&(Object(ve.o)(c),y(!1))},className:l.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:l.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})})},Zo=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),$o=Object(r.a)({container:{display:"flex",justifyContent:"flex-end",marginBottom:15},wrapper:{width:400,position:"relative",display:"flex",alignItems:"center",alignContent:"center",justifyContent:"space-between",borderRadius:7,padding:"12px 5px 12px 5px",backgroundColor:"#deffa9","&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #deffa9",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #deffa9",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",right:"-17px"}},wrapperActive:{width:400,position:"relative",display:"flex",alignItems:"center",alignContent:"center",justifyContent:"space-between",borderRadius:7,padding:"12px 5px 12px 5px",backgroundColor:"#ced8d7","&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ced8d7",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ced8d7",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",right:"-17px"}},image:{borderRadius:7,width:300,maxHeight:400,cursor:"pointer"},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:0,right:6,color:"#414141",padding:3,borderRadius:5},bntDownload:{backgroundColor:"inherit",color:"#54b0fc",width:30,height:30,"&:hover":{backgroundColor:"#54b0fc",color:"#ffffff"}},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden",boxSizing:"border-box",display:"flex",justifyContent:"center",alignContent:"center",alignItems:"center"},wrapperOverlayImg:{width:"30%",maxHeight:"80%",position:"relative",display:"flex"},overlayDownloadIcon:{position:"absolute",content:"",right:0,top:-40,cursor:"pointer",color:"#e9e7e7",padding:0,borderRadius:"50%","&:hover":{backgroundColor:"#ffffff",color:"#b8b7b7"}},overlayTime:{position:"absolute",content:"",color:"#ffffff",top:-30,left:0,borderRadius:10,padding:"2px 6px 2px 6px",backgroundColor:"#707070"},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlayDelete:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),Ko=function(e){var t=e.url,n=e.createdAt,a=e.color,r=(e.message,e.messages,e.fullType),c=e._id,l=$o(),d=Object(s.useState)(!1),b=Object(i.a)(d,2),j=b[0],u=b[1],f=Object(s.useState)(null),x=Object(i.a)(f,2),h=x[0],g=x[1],m=Object(s.useState)(!1),O=Object(i.a)(m,2),v=O[0],y=O[1],C=Object(s.useState)(!1),w=Object(i.a)(C,2),k=w[0],N=w[1],S=Boolean(h),I=function(e){"copy"===e&&Object(R.a)("Link"),"delete"===e&&N(!0),g(null),y(!1)};return j?Object(o.jsx)("div",{onClick:function(e){return"overlay"===e.target.id&&j&&u(!1)},id:"overlay",className:l.overlay,children:Object(o.jsxs)("div",{className:l.wrapperOverlayImg,children:[Object(o.jsx)("span",{className:l.overlayTime,children:Object(R.n)(n)}),Object(o.jsx)(Q.a,{className:l.overlayDownloadIcon,fontSize:"large",onClick:function(){return Object(R.e)(t,r)}}),Object(o.jsx)("img",{width:"100%",height:"auto",alt:"imageItem",src:t})]})}):Object(o.jsx)("div",{className:l.container,children:Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),g(e.currentTarget),y(!0)}(e)},className:v?l.wrapperActive:l.wrapper,children:[Object(o.jsx)(yo.a,{fontSize:"large",style:{color:"#bd9a00"}}),Object(o.jsx)("img",{onClick:function(){return!j&&u(!0)},className:l.image,alt:"message pic",src:t,style:{backgroundColor:t?"":a},width:"300",height:"400"}),Object(o.jsx)(Oo.a,{onClick:function(){return Object(R.e)(t,r)},className:l.bntDownload,children:Object(o.jsx)(wo.a,{fontSize:"medium"})}),Object(o.jsx)("div",{className:l.time,children:Object(R.p)(n)}),Object(o.jsxs)(Zo,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:h,open:S,onClose:I,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return I("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy Image link"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return I("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),k&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return N(!1);"delete"===t&&(Object(ve.o)(c),N(!1))},className:l.overlayDelete,id:"overlay",children:Object(o.jsxs)("div",{className:l.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})})},Jo=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),Xo=Object(r.a)({container:{display:"flex",justifyContent:"flex-end",marginBottom:15},wrapper:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",padding:"12px 5px 12px 5px",backgroundColor:"#deffa9",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #deffa9",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #deffa9",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",right:"-17px"}},wrapperActive:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",padding:"12px 5px 12px 5px",backgroundColor:"#ced8d7",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ced8d7",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ced8d7",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",right:"-17px"}},bntDownload:{backgroundColor:"inherit",color:"#54b0fc",width:30,height:30,"&:hover":{backgroundColor:"#54b0fc",color:"#ffffff"}},player:{margin:"0 5px 0 5px",borderRadius:7},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:0,right:6,color:"#414141",padding:3,borderRadius:5},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),Qo=function(e){var t=e.url,n=e.createdAt,a=e.fullType,r=e._id,c=Xo(),l=Object(s.useState)(null),d=Object(i.a)(l,2),b=d[0],j=d[1],u=Object(s.useState)(!1),f=Object(i.a)(u,2),x=f[0],h=f[1],g=Object(s.useState)(!1),m=Object(i.a)(g,2),O=m[0],v=m[1],y=Boolean(b),C=function(e){"copy"===e&&Object(R.a)("Link"),"delete"===e&&v(!0),j(null),h(!1)};return Object(o.jsx)("div",{className:c.container,children:Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),j(e.currentTarget),h(!0)}(e)},className:x?c.wrapperActive:c.wrapper,children:[Object(o.jsx)(zo.a,{fontSize:"large",style:{color:"#0294c0"}}),Object(o.jsx)(Ao.a,{className:c.player,src:t,controls:!0}),Object(o.jsx)(Oo.a,{onClick:function(){return Object(R.e)(t,a)},className:c.bntDownload,children:Object(o.jsx)(wo.a,{fontSize:"medium"})}),Object(o.jsx)("div",{className:c.time,children:Object(R.p)(n)}),Object(o.jsxs)(Jo,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:b,open:y,onClose:C,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return C("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy Audio link"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return C("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),O&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return v(!1);"delete"===t&&(Object(ve.o)(r),v(!1))},className:c.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:c.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})})},ea=n(300).Player,ta=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),na=Object(r.a)({container:{display:"flex",justifyContent:"flex-end",marginBottom:15},wrapper:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",width:400,padding:"12px 5px 12px 5px",backgroundColor:"#deffa9",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #deffa9",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #deffa9",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",right:"-17px"}},wrapperActive:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",width:400,padding:"12px 5px 12px 5px",backgroundColor:"#ced8d7",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ced8d7",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ced8d7",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",right:"-17px"}},bntDownload:{backgroundColor:"inherit",color:"#54b0fc",width:30,height:30,marginLeft:5,"&:hover":{backgroundColor:"#54b0fc",color:"#ffffff"}},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:0,right:6,color:"#414141",padding:3,borderRadius:5},player:{backgroundColor:"#deffa9"},playerActive:{backgroundColor:"#ced8d7"},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),oa=function(e){var t=e.url,n=e.createdAt,a=e.fullType,r=e._id,c=na(),l=Object(s.useState)(null),d=Object(i.a)(l,2),b=d[0],j=d[1],u=Object(s.useState)(!1),f=Object(i.a)(u,2),x=f[0],h=f[1],g=Object(s.useState)(!1),m=Object(i.a)(g,2),O=m[0],v=m[1],y=Boolean(b),C=function(e){"copy"===e&&Object(R.a)("Link"),"delete"===e&&v(!0),j(null),h(!1)};return Object(o.jsx)("div",{className:c.container,children:Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),j(e.currentTarget),h(!0)}(e)},className:x?c.wrapperActive:c.wrapper,children:[Object(o.jsx)(Eo.a,{fontSize:"large",style:{color:"#03b003"}}),Object(o.jsx)(ea,{className:x?c.playerActive:c.player,playsInline:!0,src:t}),Object(o.jsx)(Oo.a,{onClick:function(){return Object(R.e)(t,a)},className:c.bntDownload,children:Object(o.jsx)(wo.a,{fontSize:"medium"})}),Object(o.jsx)("div",{className:c.time,children:Object(R.p)(n)}),Object(o.jsxs)(ta,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:b,open:y,onClose:C,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return C("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy Video link"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return C("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),O&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return v(!1);"delete"===t&&(Object(ve.o)(r),v(!1))},className:c.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:c.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})})},aa=n(330),ra=Object(b.a)((function(e){return Object(o.jsx)(u.a,Object(d.a)({elevation:0,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}},e))}))((function(e){var t=e.theme;return{"& .MuiPaper-root":{borderRadius:10,marginTop:t.spacing(0),minWidth:220,color:"light"===t.palette.mode?"rgb(55, 65, 81)":t.palette.grey[500],boxShadow:"rgb(255, 255, 255) 0px 0px 0px 0px, rgba(0, 0, 0, 0.05) 0px 0px 0px 1px, rgba(0, 0, 0, 0.1) 0px 10px 15px -3px, rgba(0, 0, 0, 0.05) 0px 4px 6px -2px","& .MuiMenu-list":{padding:"4px 4px"},"& .MuiMenuItem-root":{marginBottom:t.spacing(1),"& .MuiSvgIcon-root":{fontSize:21,color:t.palette.text.secondary,marginRight:t.spacing(2)}}}}})),ca=Object(r.a)({container:{display:"flex",justifyContent:"flex-end",marginBottom:15},wrapper:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",width:200,padding:"5px 5px 12px 5px",backgroundColor:"#deffa9",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #deffa9",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #deffa9",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",right:"-17px"}},wrapperActive:{position:"relative",display:"flex",justifyContent:"space-between",alignContent:"center",alignItems:"center",width:200,padding:"5px 5px 12px 5px",backgroundColor:"#ced8d7",borderRadius:7,"&:after":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"15px solid #ced8d7",borderLeft:"15px solid transparent",borderRight:"15px solid transparent",bottom:"0",right:"-15px"},"&:before":{content:"''",position:"absolute",width:"0",height:"0",borderBottom:"17px solid #ced8d7",borderLeft:"16px solid transparent",borderRight:"16px solid transparent",bottom:"0px",right:"-17px"}},bntDownload:{backgroundColor:"inherit",color:"#54b0fc",width:30,height:30,"&:hover":{backgroundColor:"#54b0fc",color:"#ffffff"}},title:{margin:"0 30px 0 5px",color:"#0e0d0d",cursor:"pointer","&:hover":{color:"#54b0fc"}},time:{position:"absolute",fontSize:".65em",fontWeight:600,bottom:0,right:6,color:"#414141",padding:3,borderRadius:5},overlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(104, 105, 104, 0.6)",border:"solid 2px #0084ff",cursor:"pointer",zIndex:100},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlayDelete:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"}}),ia=function(e){var t=e.url,n=e.createdAt,a=e.type,r=e._id,c=ca(),l=Object(s.useState)(!1),d=Object(i.a)(l,2),b=d[0],j=d[1],u=Object(s.useState)(null),f=Object(i.a)(u,2),x=f[0],h=f[1],g=Object(s.useState)(!1),m=Object(i.a)(g,2),O=m[0],v=m[1],y=Object(s.useState)(!1),C=Object(i.a)(y,2),w=C[0],k=C[1],N=Boolean(x),S=function(){return b&&j(!1)},I=function(e){"copy"===e&&Object(R.a)("Link"),"delete"===e&&k(!0),h(null),v(!1)};return Object(o.jsxs)("div",{className:c.container,children:[b&&Object(o.jsx)("div",{className:c.overlay,id:"overlay",onClick:S,children:Object(o.jsx)(aa,{allowFullScreen:!0,fileType:a,filePath:t,onError:S})}),Object(o.jsxs)("div",{onContextMenu:function(e){return function(e){e.preventDefault(),h(e.currentTarget),v(!0)}(e)},className:O?c.wrapperActive:c.wrapper,children:[Object(o.jsx)(lo.a,{fontSize:"large",style:{color:"#99b401"}}),!b&&Object(o.jsx)("span",{className:c.title,onClick:function(){return!b&&j(!0)},children:"Read File"}),Object(o.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",download:!0,children:Object(o.jsx)(Oo.a,{className:c.bntDownload,children:Object(o.jsx)(wo.a,{fontSize:"medium"})})}),Object(o.jsx)("div",{className:c.time,children:Object(R.p)(n)}),Object(o.jsxs)(ra,{id:"demo-positioned-menu","aria-labelledby":"demo-positioned-button",anchorEl:x,open:N,onClose:I,children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return I("copy")},text:t,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(re.a,{}),"Copy File link"]})}),Object(o.jsxs)(p.a,{style:{color:"#f02a2a"},onClick:function(){return I("delete")},children:[Object(o.jsx)(it.a,{style:{color:"#f02a2a"}}),"Delete message"]})]}),w&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return k(!1);"delete"===t&&(Object(ve.o)(r),k(!1))},className:c.overlayDelete,id:"overlay",children:Object(o.jsxs)("div",{className:c.modalDelete,children:[Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete message"}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete message?"}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE MESSAGE"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})]})},sa=Object(r.a)({container:{display:"flex",justifyContent:"center",marginBottom:15},wrapper:{textAlign:"center",padding:"1px 10px 3px 10px",backgroundColor:"rgba(104, 105, 104, 0.8)",color:"#ffffff",borderRadius:7,fontSize:".85em",fontWeight:600}}),la=function(e){var t=e.message,n=sa();return Object(o.jsx)("div",{className:n.container,children:Object(o.jsx)("span",{className:n.wrapper,children:t})})},da=function(e){return e.messages.messages},ba=Object(we.a)([da],(function(e){return e})),ja=n(43),ua=function(e,t){return function(){var n=Object(me.a)(ge.a.mark((function n(o){var a;return ge.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,Object(ve.h)(e);case 3:(a=n.sent)&&o(Object(ja.b)(a)),t&&t(),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(0),o(Object(ja.a)());case 11:case"end":return n.stop()}}),n,null,[[0,8]])})));return function(e){return n.apply(this,arguments)}}()},pa=n(412),fa=Object(r.a)({container:{height:"93vh",width:"100%",display:"flex",alignItems:"center",alignContent:"center",flexDirection:"column",position:"relative"},messagesScroll:{paddingTop:30,overflowY:"scroll",maxHeight:"83vh",width:"100%",display:"flex",justifyContent:"center","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}},messagesEmpty:{overflowY:"hidden",width:"100%",display:"flex",justifyContent:"center",paddingTop:30},messagesBody:{width:"60%"}}),xa=function(){var e,t=fa(),n=Object(c.b)(),a=Object(c.c)(ba),r=Object(c.c)(sn.b),l=Object(c.c)(gt.a),d=l.companionId,b=l.total,j=l.seen,u=l.mute,p=Object(c.c)(ze),f=Object(s.useState)(!1),x=Object(i.a)(f,2),h=x[0],g=x[1],m=Object(s.useState)({new:0,mute:!1}),O=Object(i.a)(m,2),v=O[0],y=O[1],w=Object(s.useRef)(null),k=function(){w.current&&w.current.scrollTo({top:w.current.scrollHeight,behavior:"smooth"})},N=Object(s.useCallback)((function(e){var t=e.target,n=t.scrollHeight,o=t.scrollTop,a=t.clientHeight,r=n-Math.floor(o);b!==j&&r-a<10&&Object(ve.q)(d),g(r!==a)}),[b,j,d]),S=pa(N,300);return Object(s.useEffect)((function(){p&&(n(ua(d,k)),n(Object(C.c)(!1)))}),[n,p,d]),Object(s.useEffect)((function(){var e=function(){var e;n((e=d,function(){var t=Object(me.a)(ge.a.mark((function t(n){var o;return ge.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(ve.e)(e);case 3:(o=t.sent)&&n(Object(Ae.a)(o)),t.next=9;break;case 7:t.prev=7,t.t0=t.catch(0);case 9:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(e){return t.apply(this,arguments)}}())),n(ua(d,null))};e();var t=setInterval(e,R.k);return function(){return clearInterval(t)}}),[n,d]),Object(s.useEffect)((function(){y({new:b-j,mute:u})}),[b,j,u]),Object(s.useEffect)((function(){if(w.current){var e=w.current,t=e.scrollHeight,n=e.clientHeight;b!==j&&t===n&&Object(ve.q)(d)}}),[b,j,d]),Object(o.jsxs)("div",{className:t.container,children:[Object(o.jsx)(qn,{isArrow:h,isNew:v,handleScrollTo:k}),Object(o.jsx)("div",{ref:w,onScroll:S,className:a.length>0?t.messagesScroll:t.messagesEmpty,children:Object(o.jsx)("div",{className:t.messagesBody,children:a.length>0?a.map((function(t){var n,c=t.message,i=t.name,s=t.lastName,l=t.color,d=t.createdAt,b=t.number,j=t.type,u=t.fullType,p=t._id;e?Object(R.o)(e)!==Object(R.o)(d)&&(e=d,n=!0):(n=!0,e=d);var f="".concat(R.j,"/").concat(c);if(b!==r){if("text"===j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(mo,{message:c,createdAt:d,name:i,lastName:s,_id:p})]},d);if("image"===j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(So,{url:f,createdAt:d,color:l,message:c,messages:a,fullType:u,_id:p})]},d);if("audio"===j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(Bo,{url:f,createdAt:d,fullType:u,_id:p})]},d);if("video"===j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(Fo,{url:f,createdAt:d,fullType:u,_id:p})]},d);if(j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(Uo,{url:f,createdAt:d,type:j,_id:p})]},d)}else{if("text"===j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(Go,{message:c,createdAt:d,name:i,lastName:s,_id:p})]},d);if("image"===j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(Ko,{url:f,createdAt:d,color:l,message:c,messages:a,fullType:u,_id:p})]},d);if("audio"===j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(Qo,{url:f,createdAt:d,fullType:u,_id:p})]},d);if("video"===j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(oa,{url:f,createdAt:d,fullType:u,_id:p})]},d);if(j)return Object(o.jsxs)("div",{children:[n&&Object(o.jsx)(la,{message:Object(R.o)(d)}),Object(o.jsx)(ia,{url:f,createdAt:d,type:j,_id:p})]},d)}})):Object(o.jsx)(F,{name:"You do not have messages yet!"})})}),Object(o.jsx)(xo,{isArrow:h})]})},ha=Object(r.a)({chatBar:{background:"linear-gradient(to bottom right, #e7f097 , #b1e667,#f4f75e)"}}),ga=function(e){var t=e.rightIsOpen,n=ha();return Object(o.jsxs)(a.a,{item:!0,lg:t?8:12,children:[Object(o.jsx)(a.a,{item:!0,lg:12,children:Object(o.jsx)(Yn,{})}),Object(o.jsx)(a.a,{item:!0,lg:12,className:n.chatBar,children:Object(o.jsx)(xa,{})})]})},ma=n(519),Oa=Object(r.a)({container:{position:"absolute"}}),va=function(e){var t=e.disabled,n=e.date,a=e.changeDate,r=e.handleOnOpen,c=Oa();return Object(o.jsx)(Ge.a,{disabled:t,className:c.container,inputVariant:"outlined",orientation:"portrait",variant:"dialog",openTo:"date",autoOk:!0,value:n||new Date,onOpen:r,onChange:a})},ya=Object(b.a)("div")((function(e){e.theme;return{position:"relative",borderRadius:"20px",backgroundColor:"#f1f0f0",width:"100%",margin:"0 5% 0 5%"}})),Ca=Object(b.a)("div")((function(e){return{padding:e.theme.spacing(0,2),height:"100%",position:"absolute",pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"}})),wa=Object(b.a)(Pe.a)((function(e){var t=e.theme;return{color:"inherit","& .MuiInputBase-input":{fontWeight:500,borderRadius:"20px",padding:t.spacing(1,1,1,0),paddingLeft:"calc(1em + ".concat(t.spacing(4),")"),transition:t.transitions.create("width"),width:"100%"}}})),ka=Object(r.a)({toolBar:{color:"#b1aeae",height:"7vh"},searchBarActive:{outline:"2px solid #2184f7",color:"#2184f7"}}),Na={inputProps:{"aria-label":"Switch demo"}},Sa=function(e){var t=e.handleSearch,n=e.value,a=e.setDate,r=e.date,i=Object(c.b)(),s=ka(),l=Object(c.c)(gt.a),b=l.sort,j=l.companionId,u=!(Object(c.c)(da).length>0);return Object(o.jsxs)(Te.a,{className:s.toolBar,children:[Object(o.jsx)(Ee.a,{onClick:function(){return i(Object(C.b)(""))},"aria-label":"delete",size:"medium",children:Object(o.jsx)(O.a,{fontSize:"medium"})}),Object(o.jsxs)(ya,{className:!n||u?void 0:s.searchBarActive,children:[Object(o.jsx)(Ca,{children:Object(o.jsx)(Fe.a,{})}),Object(o.jsx)(wa,{disabled:u,onChange:t,placeholder:u?"Disabled":"Search",value:n,inputProps:{"aria-label":"search"}})]}),Object(o.jsxs)(Ee.a,{"aria-label":"delete",size:"medium",disabled:u,children:[Object(o.jsx)(va,{disabled:u,date:r,changeDate:a,handleOnOpen:function(){return a("")}}),Object(o.jsx)(qe.a,{fontSize:"medium",style:{color:r?"#2184f7":"#b1aeae"}})]}),Object(o.jsx)(Ue.a,Object(d.a)(Object(d.a)({onClick:function(){return Object(ve.x)(j)},checked:b},Na),{},{disabled:u}))]})},Ia=Object(r.a)({container:{height:"100%",backgroundColor:"#ffffff"},list:{maxHeight:"93vh",overflowY:"scroll","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}},listItem:{"&:hover":{backgroundColor:"#f0f0f0"}}}),za=function(){var e=Ia(),t=Object(c.c)(gt.a).sort,n=Object(c.c)(da),a=Object(s.useState)(""),r=Object(i.a)(a,2),l=r[0],d=r[1],b=Object(s.useState)(""),u=Object(i.a)(b,2),p=u[0],f=u[1],x=function(e){return e.filter((function(e){return p?e.message.toLowerCase().includes(l.toLowerCase())&&Object(R.o)(p)===Object(R.o)(e.createdAt)?e:void 0:e.message.toLowerCase().includes(l.toLowerCase())}))}(Object(R.f)("createdAt",n,t));return Object(o.jsxs)("div",{className:e.container,children:[Object(o.jsx)(Sa,{handleSearch:function(e){return d(e.target.value)},value:l,setDate:f,date:p}),Object(o.jsx)("div",{className:n.length>0?e.list:void 0,children:n.length>0?x.length>0?Object(o.jsx)(S.a,{sx:{width:"100%"},children:x.map((function(t){var n=t.name,a=t.lastName,r=t.avatarUrl,c=t.color,i=t.message,s=t.createdAt;return Object(o.jsxs)("div",{children:[Object(o.jsxs)(H.a,{alignItems:"flex-start",className:e.listItem,children:[Object(o.jsx)(U.a,{children:Object(o.jsx)(j.a,{alt:n,src:r?"".concat(R.j,"/").concat(r):void 0,sx:{background:c,width:44,height:44,marginRight:2},children:!r&&"".concat(Object(R.c)(n)).concat(Object(R.c)(a))})}),Object(o.jsx)(B.a,{primary:"".concat(Object(R.c)(n)).concat(Object(R.l)(n,15,1)," \n ").concat(Object(R.c)(a)).concat(Object(R.l)(a,15,1)),secondary:Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)(ma.a,{sx:{display:"block",wordBreak:"break-word"},component:"span",variant:"body2",color:"text.primary",children:i}),Object(R.n)(s)]})})]}),Object(o.jsx)(G.a,{variant:"inset"})]},s)}))}):Object(o.jsx)(F,{name:"Can not find message by request: ".concat(l)}):Object(o.jsx)(F,{name:"You do not have messages yet!"})})]})},Ra=Object(r.a)({container:{display:"flex",alignContent:"center",alignItems:"center",height:"7vh"},iconClose:{"&:hover":{transform:"rotate(180deg)",transition:"all 250ms ease-out "}}}),Aa=function(){var e=Object(c.b)(),t=Ra(),n=Object(c.c)(_t),a=Object(c.c)(gt.a).number,r=Object(s.useState)(!1),l=Object(i.a)(r,2),d=l[0],b=l[1];return Object(s.useEffect)((function(){var e=n.find((function(e){return e.number===a}));b(!!e)}),[n,a]),Object(o.jsxs)(I.a,{className:t.container,direction:"row",children:[Object(o.jsx)(Ee.a,{onClick:function(){return e(Object(C.b)(""))},"aria-label":"delete",size:"medium",children:Object(o.jsx)(O.a,{className:t.iconClose,fontSize:"medium"})}),Object(o.jsx)(z.a,{variant:"h6",color:"initial",style:{marginLeft:20,color:"#474747"},children:"Profile"}),Object(o.jsx)(Ee.a,{style:{marginLeft:"auto",marginRight:"3%"},"aria-label":"delete",size:"medium",children:d?Object(o.jsx)(Xt.a,{onClick:function(){return e(Object(C.b)("edit"))},fontSize:"medium"}):Object(o.jsx)(y.a,{onClick:function(){return e(Yt(a))},fontSize:"medium"})})]})},Da=Object(r.a)({container:{position:"relative"},nameTile:{position:"absolute",color:"#ffffff",backgroundColor:"rgb(0,0,0)",borderRadius:10,padding:8,fontSize:18,zIndex:10,top:"6%",left:"50%",marginLeft:"-45%",opacity:.7,transition:"opacity .35s ease-in-out"},timeTile:{position:"absolute",color:"#ffffff",backgroundColor:"rgb(0,0,0)",borderRadius:10,padding:4,fontSize:15,top:"1%",left:"50%",marginLeft:"-45%",opacity:.7,transition:"opacity .35s ease-in-out"}}),Ma=function(){var e=Da(),t=Object(c.c)(gt.a),n=t.name,a=t.lastName,r=t.online,i=t.avatarsArr;return Object(o.jsxs)("div",{className:e.container,children:[Object(o.jsx)(ln.Carousel,{children:i.map((function(e){var t=e.avatarUrl,n=e.updatedAt;return Object(o.jsxs)("div",{children:[Object(o.jsx)("img",{alt:"pic",src:"".concat(R.j,"/").concat(t)}),Object(o.jsx)("p",{className:"legend",children:Object(R.n)(n)})]})}))}),Object(o.jsx)("span",{className:e.nameTile,children:"".concat(Object(R.c)(n)).concat(Object(R.l)(n,15,1),"\n ").concat(Object(R.c)(a)).concat(Object(R.l)(a,15,1))}),Object(o.jsx)("span",{className:e.timeTile,children:"true"===r?"online":"last seen ".concat(Object(R.n)(r))})]})},Ba=n(414),Ta=n.n(Ba),Ea=n(415),La=n.n(Ea),Wa=n(413),_a=n.n(Wa),Fa=Object(r.a)({listIcon:{marginRight:15}}),Pa={inputProps:{"aria-label":"Switch demo"}},Ya=function(e){var t=e.disabled,n=Fa(),a=Object(c.c)(gt.a),r=a.number,i=a.mute,s=a.sort,l=a.companionId,b=a.originalName,j=a.originalLastName,u="".concat(Object(R.c)(b)).concat(Object(R.l)(b,15,1),"\n ").concat(Object(R.c)(j)).concat(Object(R.l)(j,15,1));return Object(o.jsx)(vt.a,{children:Object(o.jsxs)(yt.a,{children:[Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return Object(R.a)("Number")},text:r,children:Object(o.jsxs)(p.a,{children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(fn.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{primary:r,secondary:"Phone"})]})}),Object(o.jsx)(G.a,{variant:"inset"}),Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return Object(R.a)("Username")},text:u,children:Object(o.jsxs)(p.a,{style:{cursor:"pointer"},children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(_a.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{primary:u,secondary:"Username"})]})}),Object(o.jsx)(G.a,{variant:"inset"}),Object(o.jsxs)(p.a,{style:{cursor:"default"},children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(Ta.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{primary:"Notification"}),Object(o.jsx)(Ue.a,Object(d.a)(Object(d.a)({style:{cursor:"pointer"},onClick:function(){return Object(ve.k)(l)}},Pa),{},{checked:!i}))]}),Object(o.jsx)(G.a,{variant:"inset"}),Object(o.jsxs)(p.a,{disabled:t,style:{cursor:"default"},children:[Object(o.jsx)(T.a,{className:n.listIcon,children:Object(o.jsx)(La.a,{fontSize:"medium"})}),Object(o.jsx)(B.a,{primary:"Sort by Date"}),Object(o.jsx)(Ue.a,Object(d.a)(Object(d.a)({style:{cursor:"pointer"},onClick:function(){return Object(ve.x)(l)}},Pa),{},{checked:s}))]})]})})},Ha=Object(r.a)({folderIcon:{color:"#54b0fc",cursor:"pointer","&:hover":{color:"#016cc3"}},listItem:{"&:hover":{backgroundColor:"#f0f0f0"}}}),Ua=function(e){var t=e.filteredAndSorted,n=Ha();return t.length>0?Object(o.jsx)(S.a,{children:t.map((function(e){var t=e.message,a=e.createdAt,r=e.fullType;return Object(o.jsxs)("div",{children:[Object(o.jsxs)(H.a,{alignItems:"flex-start",className:n.listItem,children:[Object(o.jsx)(U.a,{children:Object(o.jsx)(de.a,{onClick:function(){return Object(R.e)("".concat(R.j,"/").concat(t),r)},className:n.folderIcon,fontSize:"large"})}),Object(o.jsx)(B.a,{primary:r,secondary:Object(R.n)(a)})]}),Object(o.jsx)(G.a,{variant:"inset"})]},a)}))}):Object(o.jsx)(F,{name:"You do not have Audio yet!"})},Va=Object(r.a)({overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden",boxSizing:"border-box",display:"flex",justifyContent:"center",alignContent:"center",alignItems:"center"},wrapper:{width:"30%",maxHeight:"80%",position:"relative",display:"flex"},downloadIcon:{position:"absolute",content:"",right:0,top:-40,cursor:"pointer",color:"#e9e7e7",padding:0,borderRadius:"50%","&:hover":{backgroundColor:"#ffffff",color:"#b8b7b7"}},img:{cursor:"pointer","&:hover":{scale:.98}},time:{position:"absolute",content:"",color:"#ffffff",top:-30,left:0,borderRadius:10,padding:"2px 6px 2px 6px",backgroundColor:"#707070"}}),qa=function(e){var t=e.message,n=e.fullType,a=e.updatedAt,r=Va(),c=Object(s.useState)(!1),l=Object(i.a)(c,2),d=l[0],b=l[1],j="".concat(R.j,"/").concat(t);return d?Object(o.jsx)("div",{onClick:function(e){return"overlay"===e.target.id&&d&&b(!1)},id:"overlay",className:r.overlay,children:Object(o.jsxs)("div",{className:r.wrapper,children:[Object(o.jsx)("span",{className:r.time,children:Object(R.n)(a)}),Object(o.jsx)(Q.a,{className:r.downloadIcon,fontSize:"large",onClick:function(){return Object(R.e)(j,n)}}),Object(o.jsx)("img",{width:"100%",height:"auto",alt:"imageItem",src:j})]})}):Object(o.jsx)(J.a,{children:Object(o.jsx)("img",{onClick:function(){return!d&&b(!0)},className:r.img,src:"".concat(j,"?w=164&h=164&fit=crop&auto=format"),srcSet:"".concat(j,"?w=164&h=164&fit=crop&auto=format&dpr=2 2x"),alt:"imageItem",loading:"lazy"})})},Ga=function(e){var t=e.filteredAndSorted;return t.length>0?Object(o.jsx)(K.a,{sx:{width:"100%",height:"auto",overflow:"hidden"},cols:3,rowHeight:164,children:t.map((function(e){var t=e.message,n=e.createdAt,a=e.fullType,r=e.updatedAt;return Object(o.jsx)(qa,{message:t,fullType:a,updatedAt:r},n)}))}):Object(o.jsx)(F,{name:"You do not have Media yet!"})},Za=Object(r.a)({folderIcon:{color:"#54b0fc",cursor:"pointer","&:hover":{color:"#016cc3"}},listItem:{"&:hover":{backgroundColor:"#f0f0f0"}}}),$a=function(e){var t=e.filteredAndSorted,n=Za();return t.length>0?Object(o.jsx)(S.a,{children:t.map((function(e){var t=e.message,a=e.createdAt,r=e.fullType;return Object(o.jsxs)("div",{children:[Object(o.jsxs)(H.a,{alignItems:"flex-start",className:n.listItem,children:[Object(o.jsx)(U.a,{children:Object(o.jsx)(q.a,{onClick:function(){return Object(R.e)("".concat(R.j,"/").concat(t),r)},className:n.folderIcon,fontSize:"large"})}),Object(o.jsx)(B.a,{primary:r,secondary:Object(R.n)(a)})]}),Object(o.jsx)(G.a,{variant:"inset"})]},a)}))}):Object(o.jsx)(F,{name:"You do not have Files yet!"})},Ka=Object(r.a)({listItem:{"&:hover":{backgroundColor:"#f0f0f0"}},copyIcon:{color:"#54b0fc",cursor:"pointer","&:hover":{color:"#016cc3"}}}),Ja=function(e){var t=e.filteredAndSorted,n=Ka();return t.length>0?Object(o.jsx)(S.a,{children:t.map((function(e){var t=e.message,a=e.createdAt,r=e.lastName,c=e.name,i=e.color,s=e.avatarUrl;return Object(o.jsxs)("div",{children:[Object(o.jsxs)(H.a,{alignItems:"flex-start",className:n.listItem,children:[Object(o.jsx)(U.a,{children:Object(o.jsx)(j.a,{alt:c,src:s?"".concat(R.j,"/").concat(s):void 0,sx:{background:i,width:38,height:38},children:"".concat(Object(R.c)(c)).concat(Object(R.c)(r))})}),Object(o.jsx)(B.a,{style:{wordBreak:"break-word",marginRight:2},primary:t,secondary:Object(R.n)(a),secondaryTypographyProps:{color:"#020202",paddingTop:.5}}),Object(o.jsx)(ce.CopyToClipboard,{onCopy:function(){return Object(R.a)("Message")},text:t,children:Object(o.jsx)(re.a,{className:n.copyIcon,fontSize:"large"})})]}),Object(o.jsx)(G.a,{variant:"inset"})]},a)}))}):Object(o.jsx)(F,{name:"You do not have Text yet!"})},Xa=Object(r.a)({folderIcon:{color:"#54b0fc",cursor:"pointer","&:hover":{color:"#016cc3"}},listItem:{"&:hover":{backgroundColor:"#f0f0f0"}}}),Qa=function(e){var t=e.filteredAndSorted,n=Xa();return t.length>0?Object(o.jsx)(S.a,{children:t.map((function(e){var t=e.message,a=e.createdAt,r=e.fullType;return Object(o.jsxs)("div",{children:[Object(o.jsxs)(H.a,{alignItems:"flex-start",className:n.listItem,children:[Object(o.jsx)(U.a,{children:Object(o.jsx)(pe.a,{onClick:function(){return Object(R.e)("".concat(R.j,"/").concat(t),r)},className:n.folderIcon,fontSize:"large"})}),Object(o.jsx)(B.a,{primary:r,secondary:Object(R.n)(a)})]},a),Object(o.jsx)(G.a,{variant:"inset"})]},a)}))}):Object(o.jsx)(F,{name:"You do not have Audio yet!"})},er=Object(r.a)({container:{borderBottom:"solid 2px #dddddd",display:"flex",justifyContent:"space-around",alignContent:"center",alignItems:"center",flexWrap:"nowrap",height:"7vh",color:"rgba(0, 0, 0, 0.6)"},item:{height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",alignItems:"center",cursor:"pointer"},icon:{fontSize:"1rem",lineHeight:0,marginBottom:0,fontWeight:600},underline:{fontSize:"2.5rem",lineHeight:0}}),tr=function(e){var t=e.setDisabled,n=er(),a=Object(c.c)(gt.a).sort,r=Object(c.c)(ba),l=Object(s.useState)(0),d=Object(i.a)(l,2),b=d[0],j=d[1],u=function(e){return j(e)},p=["text","image","text","audio","video"],f=Object(R.f)("createdAt",r,a).filter((function(e){if(0!==b){if(e.type===p[b])return e}else if(e.type!==p[b])return e}));return Object(s.useEffect)((function(){t(!(f.length>0))}),[f,t]),Object(o.jsxs)(o.Fragment,{children:[Object(o.jsxs)("div",{className:n.container,children:[Object(o.jsxs)("div",{className:n.item,style:{color:0===b?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return u(0)},children:[Object(o.jsx)("span",{className:n.icon,children:"Files"}),Object(o.jsx)("span",{className:n.underline,children:"___"})]}),Object(o.jsxs)("div",{className:n.item,style:{color:1===b?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return u(1)},children:[Object(o.jsx)("span",{className:n.icon,children:"Media"}),Object(o.jsx)("span",{className:n.underline,children:"___"})]}),Object(o.jsxs)("div",{className:n.item,style:{color:2===b?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return u(2)},children:[Object(o.jsx)("span",{className:n.icon,children:"Text"}),Object(o.jsx)("span",{className:n.underline,children:"___"})]}),Object(o.jsxs)("div",{className:n.item,style:{color:3===b?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return u(3)},children:[Object(o.jsx)("span",{className:n.icon,children:"Audio"}),Object(o.jsx)("span",{className:n.underline,children:"___"})]}),Object(o.jsxs)("div",{className:n.item,style:{color:4===b?"#1976d2":"rgba(0, 0, 0, 0.6)"},onClick:function(){return u(4)},children:[Object(o.jsx)("span",{className:n.icon,children:"Video"}),Object(o.jsx)("span",{className:n.underline,children:"___"})]})]}),0===b&&Object(o.jsx)($a,{filteredAndSorted:f}),1===b&&Object(o.jsx)(Ga,{filteredAndSorted:f}),2===b&&Object(o.jsx)(Ja,{filteredAndSorted:f}),3===b&&Object(o.jsx)(Ua,{filteredAndSorted:f}),4===b&&Object(o.jsx)(Qa,{filteredAndSorted:f})]})},nr=Object(r.a)({container:{backgroundColor:"#ffffff",height:"100%",width:"100%",position:"relative"},scrollContainer:{overflowY:"scroll",maxHeight:"93vh",width:"100%","&::-webkit-scrollbar":{width:"0.4em"},"&::-webkit-scrollbar-track":{boxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",webkitBoxShadow:"inset 0 0 6px rgba(0,0,0,0.00)",backgroundColor:"#eceeec"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#ccc8c8"},"&::-webkit-scrollbar-thumb:focus":{backgroundColor:"#959595"},"&::-webkit-scrollbar-thumb:active":{backgroundColor:"#959595"}}}),or=function(){var e=nr(),t=Object(c.b)(),n=Object(c.c)(Re).leftIsOpen,a=Object(s.useState)(!1),r=Object(i.a)(a,2),l=r[0],d=r[1];return Object(s.useEffect)((function(){var e=function(){return"contacts"!==n&&t(Pt())};e();var o=setInterval(e,R.k);return function(){return clearInterval(o)}}),[n,t]),Object(o.jsxs)("div",{className:e.container,children:[Object(o.jsx)(Aa,{}),Object(o.jsxs)("div",{className:e.scrollContainer,children:[Object(o.jsx)(Ma,{}),Object(o.jsx)(Ya,{disabled:l}),Object(o.jsx)(tr,{setDisabled:d})]})]})},ar=Object(r.a)({container:{height:"7vh",width:"100%",display:"flex",alignContent:"center",alignItems:"center",backgroundColor:"#ffffff"},iconArrow:{"&:hover":{transform:"rotate(360deg)",transition:"all 250ms ease-out "}}}),rr=function(){var e=Object(c.b)(),t=ar();return Object(o.jsxs)(I.a,{className:t.container,direction:"row",spacing:21,children:[Object(o.jsx)(Ee.a,{onClick:function(){return e(Object(C.b)("credentials"))},"aria-label":"delete",size:"medium",children:Object(o.jsx)(He.a,{className:t.iconArrow,fontSize:"medium"})}),Object(o.jsx)(z.a,{style:{marginLeft:20,color:"#474747"},variant:"h6",color:"initial",children:"Edit chat"})]})},cr=n(503),ir=Object(r.a)({container:{display:"flex",alignItems:"center",alignContent:"center",flexDirection:"column",width:"100%",margin:"0 auto",padding:20,marginBottom:15,position:"relative",backgroundColor:"#ffffff"},textField:{marginBottom:20},notifications:{width:"100%",display:"flex",justifyContent:"flex-start",alignContent:"start",alignItems:"start",marginBottom:"auto"},avatarArrow:{cursor:"pointer",alignSelf:"flex-end","&:hover":{backgroundColor:"rgb(62, 149, 231)"}}}),sr={inputProps:{"aria-label":"Checkbox demo"}},lr=function(e){var t=ir(),n=e.chat,a=e.name,r=e.setName,c=e.lastName,i=e.setLastName,s=e.mute,l=e.setMute,b=e.openBtn,u=e.setOpenBtn,p=n.avatarUrl,f=n.color,x=n.originalName,h=n.originalLastName,g=function(e){!b&&u(!0);var t=Object(R.d)(e.target.value);switch(e.target.name){case"name":r(t);break;case"lastName":i(t)}};return Object(o.jsxs)("div",{className:t.container,children:[Object(o.jsx)(U.a,{style:{marginBottom:10},children:Object(o.jsx)(j.a,{alt:a,src:p?"".concat(R.j,"/").concat(p):void 0,sx:{background:f,width:120,height:120,marginRight:2},children:"".concat(Object(R.c)(a)).concat(Object(R.c)(c))})}),Object(o.jsx)(z.a,{style:{color:"#080808",fontSize:22,fontWeight:500},children:"".concat(Object(R.c)(x)).concat(Object(R.l)(x,15,1)," \n ").concat(Object(R.c)(h)).concat(Object(R.l)(h,15,1))}),Object(o.jsx)(z.a,{style:{fontSize:17,marginBottom:20},children:"original name"}),Object(o.jsx)(Vt.a,{id:"name",name:"name",label:"Name",value:a,fullWidth:!0,variant:"outlined",onChange:g,className:t.textField}),Object(o.jsx)(Vt.a,{id:"lastName",name:"lastName",label:"LastName",value:c,fullWidth:!0,variant:"outlined",onChange:g,className:t.textField}),Object(o.jsxs)("div",{className:t.notifications,children:[Object(o.jsx)(cr.a,Object(d.a)(Object(d.a)({onChange:function(){l(!s),!b&&u(!0)}},sr),{},{checked:!s,style:{marginRight:20}})),Object(o.jsx)(B.a,{primary:"Notifications",primaryTypographyProps:{color:"#0e0d0d"},secondary:s?"Enabled":"Disabled"})]})]})},dr=Object(r.a)({container:{width:"100%",padding:"20px 10px 20px 10px",backgroundColor:"#ffffff"},modalDelete:{background:"#ffffff",position:"absolute",content:"",width:"20%",height:"auto",left:"40%",bottom:"48.5%",borderRadius:10,padding:10,display:"flex",flexDirection:"column"},overlay:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:100,backgroundColor:"rgba(104, 105, 104, 0.6)",overflowY:"hidden"},titleWrapper:{display:"flex",justifyContent:"flex-start",alignContent:"center",alignItems:"center"}}),br=function(e){var t=e.isContact,n=dr(),a=Object(c.b)(),r=t._id,l=t.avatarUrl,d=t.color,b=t.name,u=t.lastName,f=Object(s.useState)(!1),x=Object(i.a)(f,2),h=x[0],g=x[1];return Object(o.jsxs)(o.Fragment,{children:[Object(o.jsx)("ul",{className:n.container,children:Object(o.jsxs)(p.a,{onClick:function(){return g(!0)},style:{fontSize:19,color:"#f02a2a"},children:[Object(o.jsx)(it.a,{fontSize:"medium",style:{marginRight:27}}),"Delete contact"]})}),h&&Object(o.jsx)("div",{onClick:function(e){var t=e.target.id;if("overlay"===t||"cancel"===t)return g(!1);"delete"===t&&(a(Object(C.b)("credentials")),Object(ve.n)(r),g(!1))},className:n.overlay,id:"overlay",children:Object(o.jsxs)("div",{className:n.modalDelete,children:[Object(o.jsxs)("div",{className:n.titleWrapper,children:[Object(o.jsx)(j.a,{alt:b,src:l?"".concat(R.j,"/").concat(l):void 0,sx:{background:d,width:38,height:38,marginRight:2},children:"".concat(Object(R.c)(b)).concat(Object(R.c)(u))}),Object(o.jsx)("h3",{style:{color:"#2c2c2c"},children:"Delete contact"})]}),Object(o.jsx)("p",{style:{color:"#050505"},children:"Are you sure you want to delete contact\n ".concat("".concat(Object(R.c)(b)).concat(Object(R.l)(b,15,1),"\n ").concat(Object(R.c)(u)).concat(Object(R.l)(u,15,1)),"?")}),Object(o.jsx)(bt.a,{id:"delete",variant:"text",color:"error",style:{fontWeight:500,fontSize:22},children:"DELETE CONTACT"}),Object(o.jsx)(bt.a,{id:"cancel",variant:"text",style:{fontWeight:500,fontSize:22},children:"CANCEL"})]})})]})},jr=Object(r.a)({container:{position:"absolute",top:"92vh",left:20},avatarArrow:{cursor:"pointer","&:hover":{backgroundColor:"rgb(62, 149, 231)"}}}),ur=function(e){var t=e.handleSubmit,n=jr();return Object(o.jsx)("div",{className:n.container,children:Object(o.jsx)(j.a,{onClick:t,className:n.avatarArrow,sx:{width:56,height:56,backgroundColor:"rgb(41, 139, 231)",color:"#ffffff"},children:Object(o.jsx)(Sn.a,{fontSize:"medium"})})})},pr=Object(r.a)({editBar:{backgroundColor:"#f3f2f2",height:"100%",position:"relative"}}),fr=function(){var e=pr(),t=Object(c.c)(_t),n=Object(c.c)(gt.a),a=Object(s.useState)(!1),r=Object(i.a)(a,2),l=r[0],d=r[1],b=Object(s.useState)(""),j=Object(i.a)(b,2),u=j[0],p=j[1],f=Object(s.useState)(""),x=Object(i.a)(f,2),h=x[0],g=x[1],m=Object(s.useState)(!0),O=Object(i.a)(m,2),v=O[0],y=O[1],C=Object(s.useState)(!1),w=Object(i.a)(C,2),k=w[0],N=w[1],S=n.name,I=n.lastName,z=n.mute,R=n.companionId,A=n._id;return Object(s.useEffect)((function(){var e=t.find((function(e){return e.number===n.number}));e&&d(e)}),[t,n.number]),Object(s.useEffect)((function(){p(S),g(I),y(!z)}),[S,I,z]),Object(o.jsxs)("div",{className:e.editBar,children:[k&&Object(o.jsx)(ur,{handleSubmit:function(){v!==!z&&Object(ve.k)(R),u===S&&h===I||Object(ve.A)(l._id,A,u,h,R),k&&N(!1)}}),Object(o.jsx)(rr,{}),Object(o.jsx)(lr,{chat:n,name:u,setName:p,lastName:h,setLastName:g,mute:v,setMute:y,openBtn:k,setOpenBtn:N}),Object(o.jsx)(br,{isContact:l})]})},xr=function(e){var t=e.rightIsOpen;return Object(o.jsxs)(a.a,{item:!0,lg:t?4:0,children:["credentials"===t&&Object(o.jsx)(or,{}),"search"===t&&Object(o.jsx)(za,{}),"edit"===t&&Object(o.jsx)(fr,{})]})},hr=Object(r.a)({container:{minHeight:"100vh",maxHeight:"100vh"},centralAndRight:{display:"flex"},centralBar:{background:"linear-gradient(to bottom right, #e7f097 , #b1e667,#f4f75e)"}});t.default=function(){var e=hr(),t=Object(c.c)(Ie),n=Object(c.c)(gt.b).companionId;return Object(o.jsxs)(a.a,{className:e.container,container:!0,spacing:0,children:[Object(o.jsx)(Dn,{}),n?Object(o.jsxs)(a.a,{item:!0,lg:9,className:e.centralAndRight,children:[Object(o.jsx)(ga,{rightIsOpen:t}),Object(o.jsx)(xr,{rightIsOpen:t})]}):Object(o.jsx)(a.a,{item:!0,lg:9,className:e.centralBar})]})}}}]);
- //# sourceMappingURL=HomePage.d4924ea6.chunk.js.map
|