1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[82252],{18248:function(e,t,o){var r,n=o(57437),s=o(15735),i=o(39155),a=o(58414),l=o(46387),c=o(27849),d=o(13979),u=o(8e4),p=o(89058),h=o(55788);!function(e){e.info="info",e.error="error",e.warning="warning",e.success="success",e.default="default"}(r||(r={}));const x={base:{padding:"12px 24px 12px 12px",display:{sm:"flex",xs:"grid"},borderRadius:"4px",gridTemplateColumns:"32px auto",color:"colors.textPrimary","& .MuiAlert-icon":{alignSelf:"flex-start",flexShrink:0,p:0,mr:"8px"},"& .MuiAlert-action":{alignSelf:"center",padding:0,ml:{sm:"auto",xs:"0px"},marginRight:0,gridColumn:2,"& button":{color:"inherit"},mt:{sm:0,xs:"12px"}},"& .MuiAlert-message":{maxWidth:"700px",p:0,gap:"4px",display:"flex",flexDirection:"column",justifyContent:"center",mr:{sm:"16px",xs:0}},"&.MuiPaper-root.MuiPaper-rounded.MuiPaper-elevation":{borderRadius:"4px"}},default:{base:{"& .MuiAlert-action button":{color:"colors.textPrimary"},"& .MuiAlert-icon":{color:"colors.statusNeutralDark"}},contained:{backgroundColor:"colors.statusNeutralLight"},outlined:{backgroundColor:"colors.white",border:"1px solid",borderColor:"colors.borderGreyLight"}},info:{base:{"& .MuiAlert-action button":{color:"colors.statusIncomingDark"},"& .MuiAlert-icon":{color:"colors.functionalInfo"}},contained:{backgroundColor:"colors.statusIncomingLight"},outlined:{backgroundColor:"colors.white",border:"1px solid",borderColor:"colors.functionalInfo"}},success:{base:{"& .MuiAlert-action button, .MuiAlert-icon":{color:"colors.functionalSuccess"}},contained:{backgroundColor:"colors.statusConfirmedLight"},outlined:{backgroundColor:"colors.white",border:"1px solid",borderColor:"colors.functionalSuccess"}},error:{base:{"& .MuiAlert-action button, .MuiAlert-icon":{color:"colors.functionalDanger"}},contained:{backgroundColor:"colors.statusCancelledLight"},outlined:{backgroundColor:"colors.white",border:"1px solid",borderColor:"colors.functionalDanger"}},warning:{base:{"& .MuiAlert-action button, .MuiAlert-icon":{color:"colors.functionalWarning"}},contained:{backgroundColor:"colors.statusPendingLight"},outlined:{backgroundColor:"colors.white",border:"1px solid",borderColor:"colors.functionalWarning"}}},m={default:{severity:"info","data-tour":"default-alert"},info:{severity:"info","data-tour":"info-alert"},success:{severity:"success","data-tour":"success-alert"},error:{severity:"error","data-tour":"error-alert"},warning:{severity:"warning","data-tour":"warning-alert"}},g={default:u.Z,info:u.Z,error:d.Z,success:c.Z,warning:p.Z},f=e=>{let{children:t,animated:o}=e;return o?(0,n.jsx)(a.Z,{direction:"left",in:!0,children:t}):t};t.Z=e=>{let{children:t,type:o="default",sx:r,onActionClick:a,title:c,variant:d="contained",animated:u=!0,id:p}=e;var v;const{t:C}=(0,h.$G)(),b=o in x?o:"default",_={...m[b]},y=[x.base,(null===(v=x[b])||void 0===v?void 0:v.base)||{},x[b][d],...Array.isArray(r)?r:[r]],j=a&&(0,n.jsx)(i.Z,{variant:"text",onClick:a,children:C("common.got_it_excl")}),w=g[b],Z="default"===o?void 0:o;return(0,n.jsx)(f,{animated:u,children:(0,n.jsxs)(s.Z,{..._,sx:y,action:j,icon:(0,n.jsx)(w,{}),color:Z,...p&&{id:p},children:[!!c&&(0,n.jsx)(l.Z,{variant:"h6",children:c}),(0,n.jsx)(l.Z,{variant:"body2",children:t})]})})}},96766:function(e,t,o){var r=o(57437),n=o(11834),s=o(97910),i=o(2265),a=o(55788),l=o(79965);t.Z=e=>{let{onClick:t,children:o,useHistory:c,variant:d="text",...u}=e;const{t:p}=(0,a.$G)(),h=(0,s.t)(),x=(0,i.useCallback)((()=>h.back()),[h]),m=o||p("common.back");return(0,r.jsx)(l.Z,{variant:d,startIcon:(0,r.jsx)(n.Z,{}),onClick:c?x:t,...u,children:m})}},58530:function(e,t,o){var r=o(57437),n=o(30938);t.Z=e=>{let{color:t="currentColor",sx:o,...s}=e;const i=Array.isArray(o)?o:[o];return(0,r.jsx)(n.Z,{sx:[{width:20,height:20,fill:"none"},...i],viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg","data-testid":"CheckCircle-icon",...s,children:(0,r.jsx)("path",{d:"M18 10C18 12.1218 17.1571 14.1566 15.6569 15.6569C14.1566 17.1572 12.1217 18 10 18C7.87827 18 5.84344 17.1572 4.34315 15.6569C2.84285 14.1566 2 12.1218 2 10C2 7.87831 2.84285 5.84348 4.34315 4.34319C5.84344 2.8429 7.87827 2.00004 10 2.00004C10.76 2.00004 11.5 2.11004 12.2 2.31004L13.77 0.740045C12.5743 0.24761 11.2931 -0.00386647 10 4.49354e-05C8.68678 4.49354e-05 7.38642 0.258703 6.17317 0.76125C4.95991 1.2638 3.85752 2.00039 2.92893 2.92898C1.05357 4.80434 0 7.34788 0 10C0 12.6522 1.05357 15.1957 2.92893 17.0711C3.85752 17.9997 4.95991 18.7363 6.17317 19.2388C7.38642 19.7414 8.68678 20 10 20C12.6522 20 15.1957 18.9465 17.0711 17.0711C18.9464 15.1957 20 12.6522 20 10H18ZM5.91 8.08004L4.5 9.50004L9 14L19 4.00004L17.59 2.58004L9 11.17L5.91 8.08004Z",fill:t})})}},74971:function(e,t,o){var r=o(57437),n=o(2265),s=o(14672),i=o(55788),a=o(21170),l=o(95576),c=o(8058),d=o(50290),u=o(46387),p=o(31691),h=o(99115),x=o(66593),m=o(634),g=o(63094),f=o(6684),v=o(93977),
1C=o(79965),b=o(83739),_=o(58530),y=o(86135),j=o(89753),w=o(3355),Z=o(35773),M=o(6551);t.Z=e=>{let{chat:t,showBorder:o,callback:k,toggleView:L,isExhibitorChat:S,isNotification:I,isGroup:G,hideDeleteButton:T}=e;const{t:B,i18n:A}=(0,i.$G)(),P=(0,s.TL5)(),W=(0,p.Z)();var z;const{sendJsonMessage:N}=null!==(z=(0,n.useContext)(y.Jb))&&void 0!==z?z:{},E=(0,s.CGy)(s.Pm0),R=(0,s.CGy)(s.vr6),[D,$]=(0,n.useState)(null),[O,H]=(0,n.useState)(!1),J=t.correspondent_id,F=Boolean(D),V=()=>$(null),K=()=>H(!1),U=t.unread_cnt||0,q={pathname:"owner"===t.exhibitor_role?"/exhibitor/".concat(t.exhibitor_url||t.exhibitor_id):"/participant/".concat(t.id)},Y="".concat(E)==="".concat(J),Q=S&&U>0&&!Y,X=U>0&&S||Y;(0,n.useEffect)((()=>{N&&U&&Y&&N({message:"sendmessage",data:{action:"readChat",correspondent:t.correspondent}})}),[U,t.correspondent,Y,N]);const ee=[w.j$.messageCard({isNotification:I,anchorEl:D}),Boolean(o)&&w.j$.border,Boolean(Y)&&w.j$.selectedChat({isNotification:I})],te=(0,M.NG)([(0,v.k8)(t.card_position||"",A.language),(0,v.k8)(t.card_company||"",A.language)].filter((e=>!/\bnone\b/i.test(e))),", "),oe=!G&&F&&!I;return(0,r.jsxs)(a.Z,{sx:ee,className:"chatListCard","data-tour":G?"group-preview":"chat-preview",onClick:()=>{F||(I&&!R?(P((0,s.$N5)()),P((0,s.TKP)({show:!0,message:{chatId:J,group:G,id:t.user_ids},title:"",description:""}))):(P((0,s.Z1J)(t)),L&&L()),N&&U>0&&N({message:"sendmessage",data:{action:"readChat",correspondent:t.correspondent}}))},children:[(0,r.jsx)(a.Z,{children:G?(0,r.jsx)(a.Z,{sx:[w.j$.group,{backgroundColor:(0,v.u_)(String(J))}],children:(0,r.jsx)(x.Z,{})}):(0,r.jsx)(j.Z,{size:48,user:{photo:t.photo,name:t.name}})}),(0,r.jsxs)(a.Z,{onClick:k,sx:w.j$.content,children:[(0,r.jsxs)(a.Z,{sx:w.j$.titleWrapper,children:[(0,r.jsx)(u.Z,{variant:"h6",sx:w.j$.cardName,children:t.name}),!G&&S&&!I&&(0,r.jsx)(l.Z,{"aria-controls":"chat-options",sx:[w.j$.detailsIcon,{display:D?"inline-flex":"none"}],onClick:e=>{e.stopPropagation(),$(e.currentTarget)},children:(0,r.jsx)(m.Z,{})}),(0,r.jsxs)(a.Z,{sx:w.j$.time,className:S?"messageTime":void 0,children:[t.time,!S&&(0,r.jsx)(a.Z,{sx:{ml:"5px",display:"inline"},"data-testid":U?"unreadMessage":"readMessage",children:(0,r.jsx)(_.Z,{color:U?"":W.palette.colors.primary,sx:{width:11,height:11}})})]})]}),!G&&!S&&(0,r.jsx)(u.Z,{sx:f.W0.ellipsis(),variant:"subtitle4",mb:.5,children:te}),(0,r.jsxs)(a.Z,{display:"flex",justifyContent:"space-between",children:[!I&&(0,r.jsxs)(u.Z,{variant:"body2",color:"textSecondary",sx:[X&&w.j$.unreadMessageText,f.W0.ellipsis(2)],children:[(0,r.jsx)("span",{className:"hide-if-empty",children:t.isMy?"".concat(B("common.you"),": "):""}),(0,r.jsx)("span",{children:G?"".concat(t.participants," ").concat(B("common.participants")):t.text})]}),I&&(0,r.jsx)(u.Z,{color:"textSecondary",noWrap:!0,children:t.text}),Q&&(0,r.jsx)(a.Z,{sx:w.j$.unreadMessage,children:U})]})]}),oe&&(0,r.jsxs)(c.Z,{id:"chat-options",anchorEl:D,sx:w.j$.menu,open:F,onClose:V,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:[(0,r.jsx)(d.Z,{sx:w.j$.menuButton,children:(0,r.jsx)(Z.Z,{href:q,children:(0,r.jsx)(C.Z,{startIcon:(0,r.jsx)(g.Z,{fontSize:"small"}),onClick:V,children:B("common.view_profile")})})}),!T&&(0,r.jsx)(d.Z,{sx:[w.j$.menuButton,w.j$.deleteMenuButton],children:(0,r.jsx)(C.Z,{startIcon:(0,r.jsx)(h.Z,{fontSize:"small"}),onClick:()=>{V(),H(!0)},children:B("messenger.chat_list_card.delete_chat")})})]}),!G&&O&&!I&&(0,r.jsx)(b.Z,{open:O,width:"500px",color:"error",icon:(0,r.jsx)(h.Z,{}),title:B("messenger.delete_the_chat"),subtitle:B("messenger.are_you_sure_you_want"),onClose:K,ActionButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(C.Z,{color:"neutral",onClick:K,children:B("common.cancel")}),(0,r.jsx)(C.Z,{color:"error",onClick:()=>{N&&N({message:"sendmessage",data:{action:"remove_chat",chat:t.correspondent,correspondent_id:J}}),K()},children:B("common.delete")})]})})]})}},9206:function(e,t,o){o.d(t,{J:function(){return M},Z:function(){return L}});var r=o(57437),n=o(2265),s=o(14672),i=o(55788),a=o(21170),l=o(83316),c=o(46387),d=o(59869),u=o(12824),p=o(72291),h=o(59280),x=o(42060),m=o(87072),g=o(92566),f=
1o(6551),v=o(3355),C=o(4441);const b=e=>{let{contact:t,checkedUsers:o,handleCheckboxChange:n}=e;return(0,r.jsx)(a.Z,{sx:v.IM.userWrapper,children:(0,r.jsxs)(m.LazyLoadComponent,{children:[(0,r.jsx)(C.Z,{sx:v.IM.userInfo,avatarProps:{src:t.photo,alt:t.name,size:32,id:t.id},titleProps:{children:t.name,title:t.name,variant:"h6"},subtitle2Props:{children:(0,f.NG)([t.position,t.company],", "),noWrap:!0,variant:"subtitle4"}}),(0,r.jsx)(g.Z,{checked:null===o||void 0===o?void 0:o.includes(Number(t.id)),id:String(t.id),onChange:n})]})},t.id)};var _=(0,n.memo)(b,f.wy),y=o(86135),j=o(68184),w=o(85219),Z=o(11463);const M=["AddMember","CreateGroup"],k=e=>{var t,o;return{...e,name:null===(t=e.name)||void 0===t?void 0:t.toString(),company:null===(o=e.company)||void 0===o?void 0:o.toString(),photo:e.img}};var L=e=>{let{chatId:t="",actionType:o="CreateGroup",open:m,title:g="messenger.messenger_content_header.choose_participants",handleCloseModal:f,hideGroupName:C}=e;const{t:b}=(0,i.$G)(),{ids:M}=(0,s.CGy)(s.Q0M),L=(0,s.CGy)((e=>(0,s.cwm)(e,t))),S=(0,s.CGy)(s.RT$);var I;const{sendJsonMessage:G}=null!==(I=(0,n.useContext)(y.Jb))&&void 0!==I?I:{},[T,B]=(0,n.useState)(""),[A,P]=(0,n.useState)(""),[W,z]=(0,n.useState)(!1),[N,E]=(0,n.useState)([]),R=(0,s.CGy)(s.K2F),D=(0,n.useMemo)((()=>(null===R||void 0===R?void 0:R.mapByProperty("id",{handler:Number}))||[]),[R]);(0,h.Z)(D);const{validateChatCreation:$}=(0,Z.Z)(),O="AddMember"===o,H=(0,n.useCallback)((e=>{const t=+e.target.id;if(null===N||void 0===N?void 0:N.includes(t)){const e=N.filter((e=>e!==t));E(e)}else E((e=>[...e,t]))}),[N]),J=e=>{G&&(G({message:"sendmessage",data:e}),setTimeout((()=>{(null===M||void 0===M?void 0:M.length)&&G({message:"sendmessage",data:{action:"chatLimits",ids:JSON.stringify(M)}})}),3e3))},F=(0,n.useMemo)((()=>{const e=O?R.filter((e=>{let{id:t}=e;return(null===L||void 0===L?void 0:L.isGroup)&&!(null===L||void 0===L?void 0:L.user_ids.includes(+t))})):R;return e.map(k)}),[R,O,L]),V=(0,n.useMemo)((()=>!A&&S?(e=>{if(!e.length)return[{key:"emptyListContacts",list:[]}];const t=e.findIndex((e=>{let{isMyTeamMember:t}=e;return!t}));if([-1,0].includes(t))return[{key:"contactsWithoutTitles",list:e}];const o=e.slice(0,t),r=e.slice(t);return[{key:"teamMemberContacts",title:"Team Members",list:o},...r.length?[{key:"otherContacts",title:"messenger.create_group_modal.other_contacts",list:r}]:[]]})(F):[{list:F.filter((e=>{let{name:t}=e;return null===t||void 0===t?void 0:t.toLowerCase().includes(A.toLowerCase())}))}]),[A,F,S]),K=(0,n.useMemo)((()=>V.mapByProperty("list").flat().length),[V]);(0,n.useEffect)((()=>{T&&z(!1)}),[T]),(0,x.Z)(s.yFf);const U={saveBtnIsDisabled:!N.length,handleClose:f,handleSave:()=>{if(!C&&!T)return void z(!0);B(""),P(""),E([]),f();const e=N.map((e=>({id:e})));if(O)return void J({action:"addChatUsers",correspondent:null===L||void 0===L?void 0:L.correspondent_id,users:e});$()&&J({action:"createGroupChat",name:T,users:e})},saveBtnText:"common.add",saveButtonProps:{color:"primary"}};return(0,r.jsxs)(u.Z,{open:m,onClose:f,width:"450px",title:b(g||""),ActionButtons:(0,r.jsx)(w.Z,{...U}),children:[!C&&(0,r.jsx)(p.Z,{fullWidth:!0,required:!0,error:W,helperText:W?b("messenger.create_group_modal.group_name_is_required"):"",label:b("messenger.create_group_modal.group_name"),placeholder:b("messenger.create_group_modal.write_a_group_name"),onChange:e=>{B(e.target.value)},value:T}),(0,r.jsx)(p.Z,{sx:v.Zs.input,placeholder:b("messenger.create_group_modal.search_your_contacts"),fullWidth:!0,value:A,onChange:e=>{P(e.target.value)},InputProps:{startAdornment:(0,r.jsx)(l.Z,{position:"start",children:(0,r.jsx)(d.Z,{})})}}),(0,r.jsx)(a.Z,{sx:v.Zs.listWrapper,children:V.map((e=>(0,r.jsxs)(n.Fragment,{children:[g&&(0,r.jsx)(c.Z,{variant:"overline",fontWeight:700,color:"textSecondary",children:b(e.title||"")},e.title),e.list.map((e=>(0,r.jsx)(_,{contact:e,checkedUsers:N,handleCheckboxChange:H},e.id)))]},e.key)))}),(0,r.jsx)(j.Z,{length:K,reason:"appliedFilters",title:b("messenger.create_group_modal.nothing_was_found"),subtitle:"",sx:v.Zs.emptyState})]})}},95599:function(e,t,o){o.d(t,{Z:function(){return Ge}});var r=o(57437),n=o(2265),s=o(14672),i=o(19902),a=o(21170),l=o(46387),c=o(83983),d=o(55788),u=o(49329),p=o(3254),h=o(95576),x=o(53431),m=o(8058),g=o(50290),f=o(63094),v=o(7681),C=o(4177),b=o(30938);var _=e=>{let{color:t="currentColor",sx:o,...n}=e;const s=Array.isArray(o)?o:[o];return(0,r.jsxs)(b.Z,{sx:[{width:16,height:16,fill:"none"}
1,...s],viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...n,children:[(0,r.jsx)("g",{clipPath:"url(#clip0)",children:(0,r.jsx)("path",{d:"M6.5 2C5.70435 2 4.94129 2.31607 4.37868 2.87868C3.81607 3.44129 3.5 4.20435 3.5 5C3.5 5.79565 3.81607 6.55871 4.37868 7.12132C4.94129 7.68393 5.70435 8 6.5 8C7.29565 8 8.05871 7.68393 8.62132 7.12132C9.18393 6.55871 9.5 5.79565 9.5 5C9.5 4.20435 9.18393 3.44129 8.62132 2.87868C8.05871 2.31607 7.29565 2 6.5 2ZM11.75 8C11.7042 7.99915 11.6595 8.01447 11.6238 8.04327C11.5882 8.07207 11.5638 8.11252 11.555 8.1575L11.4125 9.1475C11.1875 9.245 10.97 9.365 10.775 9.5L9.845 9.125C9.7625 9.125 9.665 9.125 9.6125 9.2225L8.8625 10.52C8.8175 10.6025 8.8325 10.7 8.9075 10.76L9.7025 11.375C9.67258 11.6241 9.67258 11.8759 9.7025 12.125L8.9075 12.74C8.8738 12.7689 8.85097 12.8084 8.84279 12.8521C8.8346 12.8957 8.84156 12.9409 8.8625 12.98L9.6125 14.2775C9.6575 14.375 9.755 14.375 9.845 14.375L10.775 14C10.97 14.135 11.18 14.2625 11.4125 14.3525L11.555 15.3425C11.57 15.4325 11.645 15.5 11.75 15.5H13.25C13.3325 15.5 13.415 15.4325 13.43 15.3425L13.5725 14.3525C13.7975 14.255 14 14.135 14.2025 14L15.125 14.375C15.2225 14.375 15.32 14.375 15.3725 14.2775L16.1225 12.98C16.1434 12.9409 16.1504 12.8957 16.1422 12.8521C16.134 12.8084 16.1112 12.7689 16.0775 12.74L15.275 12.125C15.29 11.9975 15.305 11.8775 15.305 11.75C15.305 11.6225 15.2975 11.5025 15.275 11.375L16.07 10.76C16.1037 10.7311 16.1265 10.6916 16.1347 10.6479C16.1429 10.6043 16.1359 10.5592 16.115 10.52L15.365 9.2225C15.32 9.125 15.2225 9.125 15.125 9.125L14.2025 9.5C14 9.365 13.7975 9.2375 13.565 9.1475L13.4225 8.1575C13.4178 8.11478 13.3977 8.07524 13.3659 8.04626C13.3342 8.01727 13.293 8.00083 13.25 8H11.75ZM6.5 9.5C3.185 9.5 0.5 10.8425 0.5 12.5V14H7.76C7.42527 13.2971 7.25107 12.5285 7.25 11.75C7.25152 10.9965 7.41523 10.2521 7.73 9.5675C7.3325 9.5225 6.92 9.5 6.5 9.5ZM12.5 10.625C13.1225 10.625 13.625 11.1275 13.625 11.75C13.625 12.3725 13.1225 12.875 12.5 12.875C11.87 12.875 11.375 12.3725 11.375 11.75C11.375 11.1275 11.8775 10.625 12.5 10.625Z",fill:t})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"clip0",children:(0,r.jsx)("rect",{width:"16",height:"16",fill:"white"})})})]})};var y=e=>{let{color:t="currentColor",sx:o,...n}=e;const s=Array.isArray(o)?o:[o];return(0,r.jsx)(b.Z,{sx:[{width:16,height:16,fill:"none"},...s],viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M9.99981 9.33366C11.7798 9.33366 15.3331 10.2203 15.3331 12.0003V13.3337H4.66648V12.0003C4.66648 10.2203 8.21981 9.33366 9.99981 9.33366ZM9.99981 8.00032C9.29257 8.00032 8.61429 7.71937 8.11419 7.21928C7.61409 6.71918 7.33314 6.0409 7.33314 5.33366C7.33314 4.62641 7.61409 3.94814 8.11419 3.44804C8.61429 2.94794 9.29257 2.66699 9.99981 2.66699C10.7071 2.66699 11.3853 2.94794 11.8854 3.44804C12.3855 3.94814 12.6665 4.62641 12.6665 5.33366C12.6665 6.0409 12.3855 6.71918 11.8854 7.21928C11.3853 7.71937 10.7071 8.00032 9.99981 8.00032ZM3.33314 6.39366L4.74648 4.97366L5.69314 5.92032L4.27314 7.33366L5.69314 8.74699L4.74648 9.69366L3.33314 8.27366L1.91981 9.69366L0.973145 8.74699L2.39314 7.33366L0.973145 5.92032L1.91981 4.97366L3.33314 6.39366Z",fill:t})})};var j=e=>{let{color:t="currentColor",sx:o,...n}=e;const s=Array.isArray(o)?o:[o];return(0,r.jsx)(b.Z,{sx:[{width:16,height:16,fill:"none"},...s],viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M10.3068 10.5867L11.2535 9.64L12.6668 11.06L14.0802 9.64667L15.0268 10.5867L13.6068 12L15.0268 13.4133L14.0802 14.36L12.6668 12.94L11.2535 14.36L10.3068 13.4133L11.7268 12L10.3135 10.5867H10.3068ZM8.00016 2C11.6668 2 14.6668 4.38667 14.6668 7.33333C14.6668 7.72 14.6135 8.09334 14.5202 8.45334C13.9102 8.13551 13.2287 7.98018 12.5413 8.00231C11.8539 8.02445 11.1838 8.22331 10.5956 8.57972C10.0074 8.93613 9.52089 9.43807 9.18306 10.0371C8.84523 10.6362 8.66744 11.3122 8.66683 12L8.72016 12.6333L8.00016 12.6667C7.1735 12.6667 6.38016 12.5467 5.64683 12.3333C3.70016 14 1.3335 14 1.3335 14C2.88683 12.4467 3.1335 11.4 3.16683 11C2.0335 10.0467 1.3335 8.76 1.3335 7.33333C1.3335 4.38667 4.3335 2 8.00016 2Z",fill:t})})};var w=e=>{let{color:t="currentColor",sx:o,...n}=e;const s=Array.isArray(o)?o:[o];return(0,r.jsx)(b.Z,{sx:[{width:16,height:16,fill:"none"}
1,...s],viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M9.99984 9.33366C8.21984 9.33366 4.6665 10.2203 4.6665 12.0003V13.3337H15.3332V12.0003C15.3332 10.2203 11.7798 9.33366 9.99984 9.33366ZM9.99984 8.00032C10.7071 8.00032 11.3854 7.71937 11.8855 7.21928C12.3856 6.71918 12.6665 6.0409 12.6665 5.33366C12.6665 4.62641 12.3856 3.94814 11.8855 3.44804C11.3854 2.94794 10.7071 2.66699 9.99984 2.66699C9.29259 2.66699 8.61432 2.94794 8.11422 3.44804C7.61412 3.94814 7.33317 4.62641 7.33317 5.33366C7.33317 6.0409 7.61412 6.71918 8.11422 7.21928C8.61432 7.71937 9.29259 8.00032 9.99984 8.00032ZM3.33317 8.85366L4.9665 9.84699L4.53317 7.97366L5.99984 6.72032L4.07317 6.55366L3.33317 4.79366L2.57984 6.55366L0.666504 6.72032L2.11984 7.97366L1.6665 9.84699L3.33317 8.85366Z",fill:t})})};var Z=e=>{let{color:t="currentColor",sx:o,...n}=e;const s=Array.isArray(o)?o:[o];return(0,r.jsx)(b.Z,{sx:[{width:16,height:16,fill:"none"},...s],viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M3.33333 10.667L2 3.33366L5.66667 6.66699L8 2.66699L10.3333 6.66699L14 3.33366L12.6667 10.667H3.33333ZM12.6667 12.667C12.6667 13.067 12.4 13.3337 12 13.3337H4C3.6 13.3337 3.33333 13.067 3.33333 12.667V12.0003H12.6667V12.667Z",fill:t})})},M=o(93977),k=o(6551),L=o(86135),S=o(3355),I=o(10310),G=o(13411),T=o(35773),B=o(4441);const A=[{id:"admin",title:"common.admin"},{id:"moderator",title:"common.moderators"},{id:"user",title:"common.participants"}];var P,W=e=>{let{chatId:t,open:o}=e;const{t:i,i18n:c}=(0,d.$G)();var u;const{sendJsonMessage:b}=null!==(u=(0,n.useContext)(L.Jb))&&void 0!==u?u:{},P=(0,s.CGy)((e=>(0,s.cwm)(e,t))),W=(0,s.CGy)(s.ZIl),z=(0,s.CGy)(s.n5E),N=!!(null===P||void 0===P?void 0:P.isGroup),[E,R]=(0,n.useState)(null),[D,$]=(0,n.useState)(null),{exhibitor_id:O,id:H}=D||{},J=O||H,F=O?"exhibitor":"visitor",V=N&&P.users||[],K=N&&(0,C.c)(null===P||void 0===P?void 0:P.owner,0)===z,U=null===P||void 0===P?void 0:P.correspondent_id,q=(0,n.useMemo)((()=>V.reduce(((e,t)=>{let{exhibitor_id:o,id:r}=t;const n=o?"exhibitors":"visitors";return{...e,[n]:[...e[n]||[],+(o||r)]}}),{})),[V]);(0,I.Z)(q);const Y=(0,n.useMemo)((()=>(0,M.xS)(F)),[F]),Q=(0,n.useMemo)((()=>({id:J,type:Y})),[Y,J]),X=(0,s.CGy)((e=>(0,s.gH1)(e,Q))),ee=(e,t)=>{"admin"!==e.role&&($(e),R(t.currentTarget))},te=()=>{R(null)},oe=e=>{D&&b&&b({message:"sendmessage",data:{action:"setGroupChatRole",user:D.id,role:e,correspondent:U}})},re=(null===D||void 0===D?void 0:D.exhibitor_url)||O,ne={pathname:re?"/exhibitor/".concat(re):"/participant/".concat(H)},se="moderator"===(null===D||void 0===D?void 0:D.role),ie=(0,n.useMemo)((()=>A.map((e=>({...e,users:V.filter((t=>t.role===e.id))}))).filter((e=>e.users.length))),[V]);return(0,r.jsx)(p.ZP,{sx:S.vT.drawer,variant:"persistent",anchor:"right",open:o,children:(0,r.jsxs)(a.Z,{sx:{px:1},children:[ie.map((e=>(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)(l.Z,{sx:S.vT.role,variant:"overline",component:"div",color:"textSecondary",children:i(e.title)}),e.users.map((e=>{var t;const o=(0,M.k8)(e.name,c.language),n=(0,k.NG)([(0,M.k8)(e.position,c.language),(0,M.k8)(e.company,c.language)],", ");return(0,r.jsxs)(a.Z,{sx:[S.vT.user,+((null===E||void 0===E?void 0:E.id)||0)===e.id&&S.vT.selectedUser],children:[(0,r.jsx)(B.Z,{sx:{gap:"8px"},avatarProps:{src:e.img,alt:o,size:32},titleProps:{children:o,title:o,variant:"h6"},subtitle2Props:{children:n,noWrap:!0,variant:"subtitle4"}}),K&&["moderator","user"].includes(e.role)&&!W&&(0,r.jsx)(h.Z,{id:null===(t=e.id)||void 0===t?void 0:t.toString(),"aria-controls":"account-options",size:"small",className:"dense",onClick:ee.bind(null,e),children:(0,r.jsx)(_,{})})]},e.id)}))]},e.id))),K&&E&&(0,r.jsxs)(m.Z,{id:"chat-options",anchorEl:E,sx:S.vT.menu,open:Boolean(E),onClose:te,onClick:te,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},children:[(0,r.jsxs)(g.Z,{onClick:oe.bind(null,"admin"),children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(Z,{})}),i("messenger.group_participants.assign_as_an_admin")]}),se?(0,r.jsxs)(g.Z,{onClick:oe.bind(null,"user"),children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(w,{})}),i("messenger.group_participants.assign_as_a_participant")]}):[(0,r.jsxs)(g.Z,{onClick:oe.bind(null,"moderator"),children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(w,{})}),i("messenger.group_participants.assign_as_a_moderator")]},"1"),(0,r.jsxs)(g.Z,{onClick:()=>{D&&b&&b({message:"sendmessage",data:{action:"setGroupChatRole",user:D.id,role:"readOnly",correspondent:U}})},children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(j,{})}),i("messenger.group_participants.read_only")]},"2")],(0,r.jsx)(g.Z,{onClick:te,children:(0,r.jsxs)(T.Z,{href:!!D&&ne,aTagStyle:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(f.Z,{})}),i("common.view_profile")]})}),(0,r.jsx)(G.default,{id:J,ownerType:F,children:(0,r.jsxs)(g.Z,{children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(v.Z,{})}),i(X?"common.remove_from_connections":"common.add_to_connections")]})}),!se&&(0,r.jsxs)(g.Z,{sx:S.vT.deleteChat,onClick:()=>{D&&b&&b({message:"sendmessage",data:{action:"setGroupChatRole",user:D.id,role:"kick",correspondent:U}})},children:[(0,r.jsx)(x.Z,{children:(0,r.jsx)(y,{})}),i("messenger.group_participants.remove_from_the_chat")]})]})]})})},z=o(31691),N=o(6684),E=o(58530),R=o(89753);!function(e){e.inbox="inbox",e.outbox="outbox"}(P||(P={}));var D=o(68045);const $=(e,t)=>new RegExp(e.source,e.flags).test(t),O=(e,t)=>{let{isEmail:o,hasProtocol:r}=t;return o?"mailto:".concat(e):r?e:"https://".concat(e)},H=(e,t)=>{const o=(e=>{const t=$(D.E,e),o=$(D.FM,e),r=/^www\./i.test(e),n=$(D.br,e);
1return{isEmail:t,hasProtocol:o,isFilename:!t&&!o&&!r&&n}})(e);return o.isFilename?e:(e=>{let{matchIndex:t,matchedText:o,href:n,isEmail:s}=e;return(0,r.jsx)("a",{href:n,target:s?void 0:"_blank",rel:s?void 0:"noopener noreferrer",children:o},t)})({matchIndex:t,matchedText:e,href:O(e,o),isEmail:o.isEmail})},J=e=>{if(!e)return[e];const t=new RegExp(D.Jv.source,D.Jv.flags),o=[];let r=0;for(const s of e.matchAll(t)){var n;const t=null!==(n=s.index)&&void 0!==n?n:0,i=s[0];t>r&&o.push(e.slice(r,t)),o.push(H(i,t)),r=t+i.length}return r<e.length&&o.push(e.slice(r)),o.length>0?o:[e]};var F=e=>{let{chatId:t,message:o,isExhibitorChat:c,showUserInfo:p}=e;const{t:h,i18n:x}=(0,d.$G)(),m=(0,z.Z)(),g=(0,s.CGy)(s.n5E),f=(0,s.CGy)((e=>(0,s.cwm)(e,t))),{show:v}=(0,s.CGy)((e=>(0,s.eWq)(e,t))),[C="",b=""]=(0,n.useMemo)((()=>{if(null===f||void 0===f?void 0:f.isGroup){var e;const t=null===f||void 0===f||null===(e=f.users)||void 0===e?void 0:e.find((e=>+e.id===+o.owner_id));return[null===t||void 0===t?void 0:t.img,null===t||void 0===t?void 0:t.name]}return o.folder===P.inbox?[null===f||void 0===f?void 0:f.card_img,null===f||void 0===f?void 0:f.card_name]:[]}),[o,f]),_=Boolean(null===o||void 0===o?void 0:o.isSystem),y=(0,M.k8)(b||"",x.language),j=()=>(0,r.jsx)(a.Z,{component:"span",sx:S.T0.time,"data-testid":"time",flexShrink:0,children:(0,u.xz)(+o.update_timestamp,"LT")}),w=(null===f||void 0===f?void 0:f.isGroup)&&"".concat(g)!=="".concat(o.owner_id)||!(null===f||void 0===f?void 0:f.isGroup)&&o.folder!==P.outbox,Z=S.T0.paper({isMy:!w,isSystem:_});return(0,r.jsx)(a.Z,{display:"flex",alignItems:"end",mb:"7px",justifyContent:w?_?"center":"flex-start":"flex-end","data-testid":"message-car-wrapper",children:_?(0,r.jsx)(a.Z,{sx:S.T0.messageBody,children:(0,r.jsx)(a.Z,{display:"flex",alignItems:"center",children:(0,r.jsx)(i.Z,{sx:Z,variant:"outlined","data-testid":"paper",children:(0,r.jsx)(l.Z,{align:"center",variant:v?"body2":"body1",sx:S.T0.messageText,"data-testid":"message-text",children:(0,r.jsx)(a.Z,{component:"span",sx:N.W0.dangerouslyHtml,dangerouslySetInnerHTML:{__html:(0,M._m)(o,h,x.language)}})})})})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Z,{"data-testid":"avatar",width:32,children:p&&w&&(0,r.jsx)(R.Z,{size:32,user:{photo:C,name:y}})}),c&&!w&&(0,r.jsx)(j,{}),(0,r.jsxs)(a.Z,{sx:S.T0.messageBody,children:[p&&w&&(0,r.jsx)(l.Z,{sx:S.T0.name,children:y}),(0,r.jsxs)(a.Z,{display:"flex",alignItems:"center",children:[(0,r.jsxs)(i.Z,{sx:Z,variant:"outlined","data-testid":"paper",children:[!c&&w&&(0,r.jsxs)(l.Z,{variant:"h6","data-testid":"heading",children:[y,(0,r.jsx)(a.Z,{component:"span",sx:S.T0.dot}),(0,r.jsx)(j,{})]}),(0,r.jsx)(l.Z,{variant:v?"body2":"body1",sx:S.T0.messageText,"data-testid":"message-text",children:J(o.message)})]}),w&&(0,r.jsx)(j,{})]})]}),o.folder===P.outbox&&!c&&(0,r.jsx)(a.Z,{ml:"5px","data-testid":o.isRead?"readMessage":"unreadMessage",children:(0,r.jsx)(E.Z,{color:o.isRead?m.palette.colors.primary:m.palette.colors.iconSecondary,sx:{width:11,height:11}})})]})})};const V=e=>{let{chatId:t,showParticipants:o,setShowParticipants:i}=e;const{t:p}=(0,d.$G)(),h=(0,s.TL5)();var x;const{sendJsonMessage:m}=null!==(x=(0,n.useContext)(L.Jb))&&void 0!==x?x:{},g=(0,s.CGy)((e=>(0,s.cwm)(e,t))),{list:f,messageFetchedWith:v,lastEvaluatedKey:C}=(0,s.CGy)((e=>(0,s._Uk)(e,t))),b=(0,n.useRef)(null),_=null===g||void 0===g?void 0:g.isGroup,y=null===g||void 0===g?void 0:g.correspondent_id;let j,w,Z,M,I,G;return(0,n.useEffect)((()=>{b.current&&b.current.scrollIntoView({behavior:"smooth",block:"nearest"})}),[f]),(0,n.useEffect)((()=>{!m||!y||v&&v===y||(h((0,s.zd$)(y)),m({message:"sendmessage",data:{action:"getChatMessages",loadMore:!1,limit:20,offset:"",isGroup:_,to:y}}))}),[y,_,m,h]),(0,n.useEffect)((()=>{i(!1)}),[y,i]),(0,r.jsxs)(a.Z,{sx:S.hM.messageContentWrapper,children:[(0,r.jsx)(a.Z,{id:"scrollableDiv",sx:[S.hM.messageContent,o&&S.hM.contentShift],children:(0,r.jsx)(c.Z,{inverse:!0,dataLength:f.length,style:S.hM.infiniteScroll,next:()=>{m&&y&&C&&m({message:"sendmessage",data:{action:"getChatMessages",loadMore:!0,limit:20,offset:C,isGroup:_,to:y}})},hasMore:C,loader:(0,r.jsx)(l.Z,{align:"center",sx:S.hM.loading,children:p("common.loading")}),scrollableTarget:"scrollableDiv",scrollThreshold:.6,children:f.map(((e,o)=>(w=(0,u.J6)(+e.update_timestamp,void 0,p),Z=k.o_.cache(w),M=Z!==w||0===o,G=_?e.owner_id:e.folder,I=j!==G,I&&(j=G),(0,r.jsxs)(n.Fragment,{children:[M&&(0,r.jsx)(l.Z,{sx:S.hM.messagesDate,color:"textSecondary",children:p(w)}),(0,r.jsx)(F,{chatId:t,message:e,isExhibitorChat:!0,showUserInfo:I})]},e.id))))})}),(0,r.jsx)("div",{ref:b}),_&&o&&(0,r.jsx)(W,{chatId:t,open:o})]})};var K=(0,n.memo)(V,k.wy),U=(o(79779),o(53144)),q=o(11463);var Y=e=>{let{chatId:t,miniChat:o}=e;const{t:i}=(0,d.$G)(),a=(0,s.TL5)(),{ids:l}=(0,s.CGy)(s.Q0M),c=(0,s.CGy)((e=>(0,s.cwm)(e,t))),u=(0,s.CGy)(s.qO0),p=(0,s.CGy)(s.QzV);var h;const{sendJsonMessage:x}=null!==(h=(0,n.useContext)(L.Jb))&&void 0!==h?h:{}
1,[m,g]=(0,n.useState)(""),{validateChatCreation:f}=(0,q.Z)(),v=i(o?"messenger.messenger_content_footer.enter_the_message":"messenger.messenger_content_footer.enter_the_message_you_would");return(0,r.jsx)(U.Z,{miniChat:o,isReadOnly:u,selectedChat:c,newMessage:m,setNewMessage:g,handleSendMessage:(e,t)=>{const o=!p.includes(String(t.correspondent_id));o&&!f()||(x&&(null===t||void 0===t?void 0:t.correspondent_id)&&Boolean(e.trim())&&(x({message:"sendmessage",data:{action:"message",to:null===t||void 0===t?void 0:t.correspondent_id,message:e.trim(),user_info:{img:t.card_img,name:t.card_name},isGroup:null===t||void 0===t?void 0:t.isGroup,...t.createGroupChat&&{createGroupChat:!0,account_id:!0,uuid:t.correspondent_id,name:t.card_name,users:t.users,user_info:{img:"",name:""}}}}),g(""),o&&(a((0,s.LsQ)(t)),setTimeout((()=>{(null===l||void 0===l?void 0:l.length)&&x({message:"sendmessage",data:{action:"chatLimits",ids:JSON.stringify(l)}})}),3e3))),g((e=>e.trim())))},placeholder:v,helperText:i("messenger.messenger_content_footer.hint_press_ctrl_enter_to",{nsSeparator:!1}),sx:S.R4.wrapper})},Q=o(8350),X=o(83316),ee=o(82156),te=o(49371),oe=o(15117),re=o(99115),ne=o(5969),se=o(89938),ie=o(98218),ae=o(61983),le=o(96176),ce=o(66593),de=o(5434),ue=o(70870),pe=o(79965),he=o(83739),xe=o(72291);var me=e=>{let{color:t="currentColor",sx:o,...n}=e;const s=Array.isArray(o)?o:[o];return(0,r.jsx)(b.Z,{sx:[{color:t},...s],viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,r.jsx)("path",{d:"M20 6C20 5.44772 19.5523 5 19 5H16V19H19C19.5523 19 20 18.5523 20 18V6ZM14 5H5C4.44772 5 4 5.44772 4 6V18C4 18.5523 4.44772 19 5 19H14V5Z"})})},ge=o(30592),fe=o(9206),ve=o(96766),Ce=o(17709);const be=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";const o="owner"===e.exhibitor_role?"":(0,k.NG)([(0,M.k8)(e.card_position||"",t),(0,M.k8)(e.card_company||"",t)].filter((e=>!/\bnone\b/i.test(e))),", ");return(null===e||void 0===e?void 0:e.isGroup)?e.user_cnt||0:e.description||o},_e={anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},ye={Delete:"common.delete",Leave:"common.leave"};var je=e=>{let{chatId:t,height:o=50,avatarSize:c=32,setShowParticipants:u,toggleView:p,miniChat:x,handleCollapseOrOpenChat:m,isCollapseMiniChat:f}=e;const v=(0,s.TL5)(),{t:C,i18n:b}=(0,d.$G)(),_=(0,ee.default)((e=>e.breakpoints.up("lg"))),y=(0,ee.default)((e=>e.breakpoints.down("md")));var j;const{sendJsonMessage:w}=null!==(j=(0,n.useContext)(L.Jb))&&void 0!==j?j:{},{unread_cnt:Z=0}=(0,s.CGy)((e=>(0,s.$gC)(e,t))),k=(0,s.CGy)((e=>(0,s.cwm)(e,t))),I=(0,s.CGy)(s.ZIl),G=(0,s.CGy)(s.n5E),[B,A]=(0,n.use
1State)(!1),[P,W]=(0,n.useState)(!1),[z,N]=(0,n.useState)((0,r.jsx)(r.Fragment,{})),[E,D]=(0,n.useState)(void 0),[$,O]=(0,n.useState)(""),[H,J]=(0,n.useState)(""),[F,V]=(0,n.useState)(!1),{isGroup:K,owner:U,correspondent_id:q,correspondent:Y}=k||{},je=K&&Number(U)===Number(G),we=(0,n.useMemo)((()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";return{...e,id:+e.correspondent_id,photo:e.card_img,logo:e.card_img,participants:e.user_cnt||0,title:"".concat((0,M.k8)(e.card_name||"",t)),subtitle:be(e,t),isRead:!0,unreadCnt:2}}(k||{},b.language)),[q,k,b.language]),Ze=(0,n.useCallback)((()=>{N((0,r.jsx)(re.Z,{})),O(C(K?"messenger.messenger_content_header.disband_the_chat":"messenger.delete_the_chat")),J(C(K?"messenger.messenger_content_header.are_you_sure_you_want_to":"messenger.are_you_sure_you_want")),D("Delete"),V(!0)}),[K,C]),Me=(0,n.useCallback)((()=>{N((0,r.jsx)(ie.Z,{})),O(C("messenger.messenger_content_header.leave_the_chat")),J(C("messenger.messenger_content_header.are_you_sure_you_want")),D("Leave"),V(!0)}),[C]),ke={Delete:()=>{w&&w({message:"sendmessage",data:K?{action:"disbandChat",correspondent:q}:{action:"remove_chat",chat:Y,correspondent_id:q}}),Le()},Leave:()=>{w&&w({message:"sendmessage",data:{action:"leaveChat",correspondent:q}}),Le()}},Le=()=>V(!1),Se=()=>{A(!B)},Ie=()=>{D("AddMember"),Se()},Ge=()=>{D("CreateGroup"),Se()},Te=()=>u((e=>!e)),Be=()=>W(!0),Ae={pathname:"owner"===we.exhibitor_role?"/exhibitor/".concat(we.exhibitor_url||we.exhibitor_id):"/participant/".concat(we.id)},Pe=(e,t)=>(0,r.jsx)(ge.Z,{arrow:!0,isDark:!0,placement:"top",text:C(e),children:t}),We=je&&!I,ze=(0,n.useMemo)((()=>{const e=[...I?[]:[{id:1,dataTour:"create-group-chats",icon:Pe("messenger.messenger_content_header.create_a_group_chat",(0,r.jsx)(de.Z,{})),callback:Ge}],...!P&&We?[{id:2,dataTour:"edit-name",icon:Pe("messenger.messenger_content_header.change_the_name",(0,r.jsx)(se.Z,{})),callback:Be}]:[],...We?[{id:3,dataTour:"add-participants",icon:Pe("messenger.messenger_content_header.add_participants",(0,r.jsx)(de.Z,{})),callback:Ie}]:[],...K?[{id:4,dataTour:"show-participants",icon:Pe("messenger.messenger_content_header.show_participants",(0,r.jsx)(me,{})),callback:Te}]:[],...I?[]:[{id:Ce.t1,dataTour:"exit-icon",icon:Pe("messenger.messenger_content_header.leave_this_chat",(0,r.jsx)(ie.Z,{})),callback:Me}],...(!K||K&&je)&&!I?[{id:6,dataTour:"delete-icon",icon:Pe("messenger.messenger_content_header.delete_this_chat",(0,r.jsx)(re.Z,{})),callback:Ze}]:[]];return I?e:K?e.slice(1):[e[0],e[e.length-1]]}),[P,je,K]),[Ne,Ee]=(0,n.useState)(we.title);(0,n.useEffect)((()=>{Ee(we.title),W(!1)}),[q]);const Re=(0,n.useCallback)((()=>{W(!1),Ee(we.title)}),[we.title]),De=()=>{v((0,s.$N5)()),p()},$e={endAdornment:(0,r.jsxs)(X.Z,{sx:S.hv.editTitleButtons,position:"end",children:[(0,r.jsx)(h.Z,{disabled:!Ne,onClick:()=>(Ne&&Ne!==we.title&&(w&&w({message:"sendmessage",data:{action:"setGroupChatName",name:Ne,correspondent:q}}),v((0,s.Z1J)({...k,card_name:Ne})),Ee(Ne)),void W(!1)),className:"rounded",children:(0,r.jsx)(ne.Z,{})}),(0,r.jsx)(h.Z,{onClick:Re,className:"rounded",children:(0,r.jsx)(oe.Z,{})})]})},Oe=f&&Z>0;return(0,r.jsx)(i.Z,{variant:"outlined",sx:S.hv.paper({miniChat:x,height:o}),children:(0,r.jsxs)(a.Z,{display:"flex",flexGrow:1,maxWidth:"100%",sx:[y&&!x&&{flexDirection:"column",gap:.75}],children:[y&&!x&&(0,r.jsx)(ve.Z,{sx:S.hv.backButton,onClick:De,children:C("messenger.messenger_content_header.back_to_chat_list")}),(0,r.jsxs)(a.Z,{display:"flex",flexGrow:1,alignItems:"center",maxWidth:"100%",children:[(0,r.jsxs)(a.Z,{sx:S.hv.avatarWrapper(Boolean(x)),children:[Oe&&(0,r.jsx)(a.Z,{sx:S.hv.unreadMessage,children:Z}),K?(0,r.jsx)(a.Z,{sx:S.hv.groupAvatar(String(we.correspondent_id)),children:(0,r.jsx)(ce.Z,{})}):(0,r.jsx)(T.Z,{href:Ae,children:(0,r.jsx)(R.Z,{size:y?40:c,user:{photo:we.photo,name:we.title}})})]}),!P&&(0,r.jsxs)(a.Z,{ml:1,flex:"1",overflow:"hidden",children:[ze.length>1&&!K?(0,r.jsx)(T.Z,{href:Ae,children:(0,r.jsx)(l.Z,{variant:"h4",component:"span",noWrap:!0,children:Ne})}):(0,r.jsx)(l.Z,{variant:"h4",component:"div",sx:S.hv.title,noWrap:!0,children:Ne}),we.title&&we.subtitle&&(0,r.jsx)(l.Z,{component:"div",className:x?"subtitle4":"subtitle3",color:K||x?"textSecondary":"textPrimary",noWrap:!0,children:K?"".concat(C("common.members")," (").concat(we.subt
1itle,")"):we.subtitle})]}),P&&(0,r.jsx)(xe.Z,{fullWidth:!0,sx:S.hv.editTitle,onChange:e=>{Ee(e.target.value)},value:Ne,InputProps:$e,maxLength:30}),(0,r.jsxs)(a.Z,{sx:S.hv.actionButtons,children:[_&&ze.map((e=>(0,r.jsxs)(n.Fragment,{children:[e.id===Ce.t1&&(0,r.jsx)(Q.Z,{flexItem:!0,orientation:"vertical",sx:[!!x&&{display:"none"}]}),(0,r.jsx)(h.Z,{"data-tour":e.dataTour,sx:[S.hv.dynamicIcons({miniChat:x})],color:"default",className:"dense",onClick:e.callback,children:e.icon})]},e.id))),!x&&y&&(0,r.jsx)(h.Z,{onClick:De,"data-tour":"show-all-chats",children:(0,r.jsx)(le.Z,{})}),!x&&!_&&(0,r.jsx)(ue.Z,{isIconHorizontal:!0,id:"chat-options",sx:S.hv.menu,..._e,children:ze.map((e=>(0,r.jsx)(g.Z,{onClick:e.callback,sx:S.hv.showMoreItems,children:e.icon},e.id)))}),x&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.Z,{"aria-controls":"chat-collapse",sx:[S.hv.collapseIcon],color:"default",className:"dense",onClick:m,"data-collapsed":String(f),children:(0,r.jsx)(ae.Z,{})}),(0,r.jsx)(h.Z,{"aria-controls":"chat-close",color:"default",className:"dense",onClick:()=>v((0,s.f2x)(t)),children:(0,r.jsx)(te.Z,{})})]})]}),B&&fe.J.includes(E||"CreateGroup")&&(0,r.jsx)(fe.Z,{chatId:t,actionType:E,title:C(K?"messenger.messenger_content_header.add_participants":"messenger.messenger_content_header.choose_participants"),open:B,handleCloseModal:Se,hideGroupName:K}),(0,r.jsx)(he.Z,{open:F,width:"500px",color:"error",icon:z,title:$,subtitle:H,onClose:Le,ActionButtons:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(pe.Z,{color:"neutral",onClick:Le,children:C("common.cancel")}),(0,r.jsx)(pe.Z,{color:"error",onClick:ke[E],children:E&&C(ye[E]||E)})]})})]})]})})},we=o(65364),Ze=o(41530),Me=o(43974),ke=o(88341);var Le={root:{position:"absolute",inset:"79px 1px 1px",borderRadius:"0 0 12px 12px",alignItems:"center",justifyContent:"center",px:{sm:"16px",xs:"8px"}},image:{height:"180px",width:"180px",backgroundSize:"contain"}};var Se=e=>{let{miniChat:t,chatId:o}=e;const{t:n}=(0,d.$G)(),i=(0,s.CGy)((e=>(0,s.cwm)(e,o))),{chatsFetched:a}=(0,s.CGy)(s.zGn);return t&&a?(0,Me.K)(i)&&Object.keys(i).length>1?null:(0,r.jsxs)(Ze.Z,{sx:Le.root,children:[(0,r.jsx)(l.Z,{variant:"body1",color:"colors.textSecondary",textAlign:"center",children:n("messenger.messenger_no_selected_chat_error.some_error_occurred_please_refresh")}),(0,r.jsx)(we.Z,{image:(0,ke.m)("errors/undefinedError.svg"),sx:Le.image})]}):null};const Ie=e=>{let{chatId:t,toggleView:o,miniChat:a,handleCollapseOrOpenChat:l,isCollapseMiniChat:c}=e;const d=(0,s.CGy)(s.ZIl),[u,p]=(0,n.useState)(!1);return(0,r.jsxs)(i.Z,{variant:"outlined",sx:S.AR.privateMessagePaper({miniChat:a,isCollapseMiniChat:c}),children:[(0,r.jsx)(je,{avatarSize:a?40:56,setShowParticipants:p,toggleView:o,miniChat:a,chatId:t,handleCollapseOrOpenChat:l,isCollapseMiniChat:c}),(!c||!a)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(K,{chatId:t,showParticipants:u,setShowParticipants:p}),!d&&(0,r.jsx)(Y,{chatId:t,miniChat:a}),(0,r.jsx)(Se,{miniChat:a,chatId:t})]})]})};var Ge=(0,n.memo)(Ie)},53144:function(e,t,o){var r=o(57437),n=o(1072),s=o(21170),i=o(39155),a=o(95576),l=o(38398),c=o(82156),d=o(2265),u=o(27135),p=o(55788),h=o(83920),x=o(26448),m=o(72291),g=o(45848),f=o(6551),v=o(3355);t.Z=e=>{let{miniChat:t,isReadOnly:o,selectedChat:C,newMessage:b,setNewMessage:_,handleSendMessage:y,sx:j,placeholder:w,helperText:Z,disableKeyPress:M,disabled:k}=e;const{t:L}=(0,p.$G)(),S=(0,c.default)((e=>e.breakpoints.down("sm"))),I=(0,c.default)((e=>e.breakpoints.between("md","lg"))),[G,T]=(0,d.useState)(null),B=(0,g.Z)(b,400),A=()=>{y(b,C)};(0,d.useEffect)((()=>{_((0,h.No)(b))}),[B]),(0,d.useEffect)((()=>{if(!M)return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)};function e(e){if("Enter"===e.key&&!e.shiftKey&&!S){if(e.preventDefault(),!b.length)return;A()}}}),[b]);const P=Boolean(G),W=P?"simple-popover":void 0,z={p:t?"17px 12px 16px":"17px 24px 20px",flexDirection:{md:t?"row":"column",lg:"row"}},N=t||S,E=Array.isArray(j)?j:[j],R=N?"":Z,D=(0,f.Kn)(C)&&0===Object.keys(C).length,$=(0,d.useMemo)((()=>(e=>({search:e("common.search"),notfound:e("messenger.messenger_send_input.no_emoji_found"),categories:{search:e("messenger.messenger_send_input.search_results"),recent:e("messenger.messenger_send_input.frequently_used"),people:e("messenger.messenger_send_input.smileys_people"),nature:e("messenger.messenger_send_input.animals_nature"),foods:e("messenger.messenger_send_input.food_drink"),activity:e("messenger.messenger_send_input.activity"),places:e("messenger.messenger_send_input.travel_places"),objects:e("messenger.messenger_send_input.objects"),symbols:e("messenger.messenger_send_input.symbols"),flags:e("messenger.messenger_send_input.flags")}}))(L)),[L]),O=o||D,H=k||!(null===b||void 0===b?void 0:b.trim()),J=N||I;return(0,r.jsxs)(s.Z,{sx:[v.t6.newMessageWrapper(t),z,...E],children:[(0,r.jsxs)(s.Z,{flex:1,mr:1,position:"relative",children:[(0,r.jsx)(m.Z,{value:b,onChange:e=>{_(e.target.value)},placeholder:w,helperText:R,fullWidth:!0,multiline:!0,maxRows:5,disabled:O}),(0,r.jsx)(n.Z,{sx:v.t6.smileIcon,onClick:e=>{T(e.currentTarget)}})]}),J?(0,r.jsx)(a.Z,{"aria-label":"send message",size:"large",disabled:H,color:"primary",onClick:A,children:(0,r.jsx)(x.Z,{})}):(0,r.jsx)(i.Z,{disabled:H,onClick:A,variant:"contained",color:"primary",sx:v.t6.sendButton,children:(0,r.jsx)("span",{children:L("common.send")})}),(0,r.jsx)(l.ZP,{id:W,open:P,anchorEl:G,onClose:()=>{T(null)},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}
1,sx:{zIndex:e=>e.zIndex.modal+10},children:(0,r.jsx)(u.cW,{set:"apple",title:L("messenger.messenger_send_input.pick_your_emoji"),emoji:"point_up",onSelect:e=>{_((t=>t+e.native))},i18n:$})})]})}},3355:function(e,t,o){o.d(t,{j$:function(){return r},IM:function(){return n},Zs:function(){return s},vT:function(){return i},T0:function(){return a},aN:function(){return l},hM:function(){return p},R4:function(){return v},hv:function(){return m},AR:function(){return u},db:function(){return g},t6:function(){return d},um:function(){return f},nq:function(){return c}});var r={time:{color:"colors.textSecondary",whiteSpace:"nowrap",fontSize:"12px"},textColor:{color:"colors.textSecondary"},border:{borderBottom:"1px solid #EDEFF5","&:last-child":{border:"none"}},closeButton:{display:"none",width:30,height:30,position:"absolute",right:24,bottom:16,transform:"translate(50%, 40%)"},cardName:{textOverflow:"ellipsis",overflow:"hidden",maxWidth:"140px",whiteSpace:"nowrap"},messageCard:e=>{let{isNotification:t,anchorEl:o}=e;return{display:"flex",alignItems:"center",position:"relative",cursor:"pointer",mb:0,p:"6px",borderTop:"1px solid",borderColor:"colors.borderGreyLight",width:"100%","& .messageTime":{display:o?"none":"block",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",maxWidth:"100px"},...!t&&{py:"15px"},"&:hover":{backgroundColor:"colors.statusNeutralLight",...!t&&{"& .MuiIconButton-root":{display:"inline-flex"},"& .messageTime":{display:"none"}}}}},selectedChat:e=>{let{isNotification:t}=e;return{"&, &:hover":{backgroundColor:{xs:"transparent",lg:t?"none":"colors.secondary"}}}},detailsIcon:{color:"colors.iconSecondary",p:0,"&:hover":{borderRadius:"40px"}},menu:{mt:.5,"& .MuiList-padding":{p:"6px 0"},"& .MuiPaper-root.MuiPaper-rounded":{borderRadius:"4px"},"& .MuiListItem-root":{fontSize:12,color:"colors.textPrimary","&.Mui-selected, .MuiListItem-root.Mui-selected:hover":{backgroundColor:"colors.statusNeutralLight"}},"& .MuiIconButton-root":{color:"colors.textPrimary"},"& .MuiPaper-elevation8":{boxShadow:"0px 10px 30px rgba(51, 54, 69, 0.1)"}},icon:{p:0,mr:1,"& .MuiSvgIcon-root":{width:16,height:16}},menuButton:{"& .MuiButtonBase-root":{p:0,fontSize:12,fontWeight:"normal","& .MuiButton-startIcon":{ml:0,fontSize:16}}},deleteMenuButton:{borderTop:"1px solid",borderTopColor:"colors.borderGreyLight","& .MuiButtonBase-root":{color:"colors.statusCancelled"}},unreadMessage:{flex:"0 0 21px",height:21,display:"flex",my:.5,backgroundColor:"colors.brand1",color:"colors.white",fontSize:12,borderRadius:"50%",justifyContent:"center"},unreadMessageText:{color:"colors.textPrimary",mr:1.5},titleWrapper:{display:"flex",alignItems:"center",justifyContent:"space-between",height:19},group:{display:"flex",justifyContent:"center",alignItems:"center",width:48,height:48,color:"colors.white",borderRadius:"50%"},content:{display:"flex",flexDirection:"column",flex:1,ml:1,minWidth:0}};var n={userWrapper:{minHeight:40,py:1,px:.5,display:"flex",alignItems:"center","&:hover":{backgroundColor:"colors.statusNeutralLight"}},userInfo:{flex:1,gap:"8px",mr:"8px","& .MuiStack-root":{gap:"2px"}}};var s={input:{my:"12px"},listWrapper:{maxHeight:"300px",overflowY:"auto","& > .MuiBox-root":{"&:not(:last-of-type)":{borderBottom:"1px solid",borderBottomColor:"colors.borderGreyLight"},"&:first-of-type":{pt:0}}},emptyState:{py:"24px"}};var i={drawer:{"& .MuiDrawer-paper":{position:"absolute",zIndex:1,width:{xs:"100%",sm:238}}},role:{m:"14px 0 6px",fontWeight:700},title:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",ml:1,flex:1},company:{fontSize:12},user:{display:"flex",alignItems:"center",p:.5,m:"6px 0","& .MuiIconButton-root":{display:"none"},"&:hover":{backgroundColor:"colors.statusNeutralLight",borderRadius:.5,"& .MuiIconButton-root":{display:"inline-flex"}}},selectedUser:{"& .MuiIconButton-root":{display:"inline-flex"},backgroundColor:"colors.statusNeutralLight"},menu:{mt:.5,"& .MuiList-padding":{p:"6px 0"},"& .MuiPaper-root.MuiPaper-rounded":{borderRadius:"4px"},"& .MuiMenuItem-root":{fontSize:"12px",color:"colors.textPrimary","&.Mui-selected, .MuiListItem-root.Mui-selected:hover":{backgroundColor:"colors.statusNeutralLight"}},"& .MuiIconButton-root":{mr:1,color:"colors.textPrimary"}
1,"& .MuiPaper-elevation8":{boxShadow:"0px 10px 30px rgba(51, 54, 69, 0.1)"},"& .MuiListItemIcon-root":{minWidth:"24px","& svg":{color:"var(--palette-colors-textPrimary)",fontSize:"16px"}}},deleteChat:{borderTop:"1px solid",borderTopColor:"colors.borderGreyLight","& .MuiIconButton-root, &.MuiListItem-root":{color:"colors.statusCancelled"}}};var a={time:{color:"colors.textSecondary",fontSize:12,m:"auto 6px"},dot:{display:"inline-block",width:3,height:3,backgroundColor:"colors.textSecondary",borderRadius:"50%",m:"2px 0 2px 6px"},textColor:{color:"colors.textSecondary"},messageBody:{ml:"6px",maxWidth:"90%"},messageText:{overflowWrap:"break-word",whiteSpace:"pre-wrap"},paper:e=>{let{isMy:t,isSystem:o}=e;return{p:"10px 12px",border:"none",maxWidth:534,backgroundColor:o?"unset":t?"colors.secondary":"colors.statusNeutralLight"}},name:{fontSize:12}};var l={input:{mb:"12px","& .MuiSvgIcon-root":{width:"18px",height:"18px"}}};var c={miniChatWrapper:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{position:"fixed",bottom:12,right:{sm:372*e+12,xs:312*e+12},transition:"height 0.25s linear",height:{sm:t?64:500,xs:t?64:400},width:{sm:360,xs:300},zIndex:1301,boxShadow:"0px 10px 30px rgb(51 54 69 / 10%)",borderRadius:{xs:0,md:"12px"}}},messengerButton:{position:"absolute",top:"63px",zIndex:100,width:"calc(100% - 2px)",left:1,borderRadius:0,borderBottom:"1px solid var(--palette-colors-borderGreyLight)"}};var d={sendButton:{width:120,alignSelf:{md:"flex-start",xs:"flex-end"},mb:"auto"},smileIcon:{color:"colors.statusNeutralDark",position:"absolute",right:14,top:{sm:9,xs:"50%"},transform:{sm:"none",xs:"translateY(-50%)"},"&, &:hover":{cursor:"pointer"}},newMessageWrapper:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{display:"flex",borderTop:"1px solid",borderColor:"colors.borderGreyLight",padding:e?"17px 12px 16px":"17px 24px 20px",flexDirection:{md:"row",sm:e?"row":"column",xs:"row"},alignItems:{sm:"flex-start",xs:"center"},"& .MuiInputBase-root .MuiInputBase-input":{mr:"32px"}}}};var u={privateMessagePaper:e=>{let{miniChat:t,isCollapseMiniChat:o=!1}=e;return{display:"flex",flexDirection:"column",color:"colors.textPrimary",flex:1,width:"100%",height:{xs:t?o?64:400:"auto",md:t?o?64:500:"auto"},"&.MuiPaper-root.MuiPaper-rounded":{borderRadius:{xs:0,md:"12px"}}}}};var p={messageContentWrapper:{flex:"1 1 auto",height:0,position:"relative"},messagesDate:{fontSize:12,textAlign:"center",mb:1},loading:{mb:1,position:"absolute",top:16,left:"calc(50% - 20px)",transform:"translate(0, -50%)",backgroundColor:"colors.white"},messageContent:{overflowY:"auto",maxHeight:"100%",px:2,pt:1.5,transition:e=>e.transitions.create("margin",{easing:e.transitions.easing.sharp||"cubic-bezier(0.4, 0, 0.6, 1)",duration:e.transitions.duration.leavingScreen||195}),mr:0,"& .infinite-scroll-component":{overflow:"unset"}},infiniteScroll:{display:"flex",flexDirection:"column",overflow:"unset !important"},contentShift:{transition:e=>e.transitions.create("margin",{easing:e.transitions.easing.easeOut||"cubic-bezier(0.0, 0, 0.2, 1)",duration:e.transitions.duration.enteringScreen||225}),mr:"238px"}},h=o(42525),x=o(93977);var m={paper:e=>{let{miniChat:t,height:o}=e;return{display:"flex",flex:{xs:t?"0 0 63px":"0 0 100px",md:t?"0 0 63px":"0 0 80px"},alignItems:"center",zIndex:2,border:"none",boxShadow:"0 10px 30px rgba(160, 160, 160, 0.10), 0 0 0 1px rgba(160, 160, 160, 0.10)",py:{xs:2,md:1},px:2,width:"calc(100% + 1px)",height:o||50,"&.MuiPaper-root.MuiPaper-rounded":{borderRadius:{xs:0,md:"10px 10px 0 0"}}}},icon:{ml:2,p:0,color:"colors.iconSecondary","&:hover":{backgroundColor:"unset",color:"colors.primary"},"& .MuiSvgIcon-root":{width:20,height:20}},leaveChatIcon:{"&:hover":{color:"colors.textPrimary"}},collapseIcon:{"& svg":{transition:"transform 0.2s ease"},'&[data-collapsed="true"] svg':{transform:"rotate(180deg)"}},editTitle:{width:"auto",flexGrow:1,ml:"12px",mr:"16px",overflow:"hidden","& .MuiOutlinedInput-root":{border:"1px solid",borderColor:"colors.primary"},"& .MuiSvgIcon-root":{color:"colors.primary"}},avatarWrapper:e=>({position:"relative",width:{xs:"42px",sm:e?"42px":"56px"},height:{xs:"42px",sm:e?"42px":"56px"},minWidth:{xs:"42px",sm:e?"42px":"56px"}}),groupAvatar:e=>({width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:(0,x.u_)(e),color:"colors.white",borderRadius:"50%"}),editTitleButtons:{display:"inline-flex",justifyContent:"center",alignItems:"center",height:"100%",gap:"6px"},title:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",
1width:{xs:150,sm:300}},actionButtons:{display:"flex",gap:"16px"},detailsIcon:{ml:2},dynamicIcons:e=>{let{miniChat:t}=e;return{display:{xs:"none",lg:t?"none":"inline-flex"}}},menu:{["& .".concat(h.Z.root,".").concat(h.Z.rounded)]:{minWidth:"unset"}},deleteButton:{ml:1},backButton:{alignSelf:"flex-start"},unreadMessage:{position:"absolute",zIndex:1111,top:"-2px",right:"-2px",lineHeight:"21px",px:"2px",height:"21px",minWidth:"21px",display:"flex",backgroundColor:"colors.brand1",color:"colors.white",fontSize:12,borderRadius:"20px",justifyContent:"center"},showMoreItems:{"& svg":{fontSize:"20px",color:"var(--palette-colors-iconSecondary)"}}};var g={wrapper:{display:"flex",alignItems:"center",backgroundColor:"colors.statusConfirmedLight",borderRadius:"4px",flexDirection:{xs:"column",md:"row"},height:{xs:144,md:48},mt:1},limitItem:{display:"flex",justifyContent:"center",alignItems:"center",flex:1,"& .MuiTypography-root":{color:"colors.statusConfirmedDark",ml:.5},width:{xs:"90%",md:"auto"},borderRight:{xs:"none",md:"1px solid #A1C6BA"},borderBottom:{xs:"1px solid #A1C6BA",md:"none"},"&:last-of-type":{borderBottom:"none",borderRight:"none"}},notificationIcon:{mt:"8px",py:"5px",overflow:"unset","& .MuiAlert-message":{maxWidth:"unset"}}};var f={wrapper:{flex:"0 0 336px",flexGrow:{xs:1,md:0},mr:0,maxHeight:"100%",display:"flex",flexDirection:"column",color:"colors.textPrimary",width:{xs:"100%",md:"auto"},"& .infinite-scroll-component__outerdiv":{flex:1,overflowY:"auto"},"& .infinite-scroll-component ":{padding:"0 !important"}},privateMessagePaper:{display:"flex",flexDirection:"column",height:"100%",p:"20px 16px 8px","&.MuiPaper-root.MuiPaper-rounded":{borderRadius:"12px"},width:{xs:"100%",lg:336}},searchText:{fontWeight:700,mb:"6px"},chatsWrapper:{flex:1,overflowY:"auto",padding:"0 4px"}};var v={wrapper:{mt:"auto","&.MuiBox-root":{flexDirection:"row","& > .MuiBox-root":{width:"100%"}}}}},4662:function(e,t,o){o.d(t,{Z:function(){return l}});var r=o(57437),n=(o(2265),o(21170)),s=o(82156);var i={restriction:e=>({width:e?"100%":"fit-content",cursor:"not-allowed","& > *":{pointerEvents:"none"}}),tooltip:{userSelect:"none",pointerEvents:"none"}},a=o(31231);var l=e=>{let{children:t,restrictionProps:o,sx:l=[],fullWidth:c,heading:d,message:u,title:p,...h}=e;const x=(0,s.default)("(max-width: 768px)",{noSsr:!0});return Boolean(d||u)||p?(0,r.jsx)(a.default,{followCursor:!x,arrow:!0,placement:"top",sx:[i.tooltip,...Array.isArray(l)?l:[l]],title:p,heading:d,message:u,...h,children:(0,r.jsx)(n.Z,{...o,sx:[i.restriction(c),...Array.isArray(null===o||void 0===o?void 0:o.sx)?o.sx:[null===o||void 0===o?void 0:o.sx]],"aria-label":"restriction",children:t})}):t}},42060:function(e,t,o){var r=o(2265),n=o(14672);t.Z=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const s=(0,n.TL5)(),i=(0,n.CGy)(n.BY5);(0,r.useEffect)((()=>{i&&t.forEach((e=>"function"===typeof e&&s(e())))}),[s,i])}},4041:function(e,t,o){var r=o(2265),n=o(99376),s=o(97910),i=o(64560),a=o(14672),l=o(14932),c=o(48236),d=o(11463),u=o(43974),p=o(74663);t.Z=(e,t)=>{const o=(0,a.TL5)(),h=(0,s.t)(),x=(0,n.useSearchParams)()||new URLSearchParams,m=(0,l.parse)(x.toString()),{list:g,last:f}=(0,a.CGy)(a.zGn),{show:v,message:C,selected:b,title:_}=(0,a.CGy)((t=>(0,a.eWq)(t,e))),{validateChatCreation:y}=(0,d.Z)();(0,r.useEffect)((()=>{if((!t||!b)&&(C||m)&&f){const{chatId:e,group:r,id:n}=t?C||{}:m,s=Array.isArray(e)?e[0]:e,l=Array.isArray(r)?r[0]:r;if(!s)return;const d=g.find((e=>String(e.correspondent_id)===String(s)));d?((e,r)=>{t?(0,i.dC)((()=>{o((0,a.Z1J)(e)),o((0,a.kqK)(r))})):(h.replace("/profile/messenger"),o((0,a.Z1J)(e)))})(d,s):[!0,"true"].includes(l||"false")?((e,r)=>{if(!e)return;if(!y())return;const n={correspondent_id:r,correspondent:"chat_".concat(r),card_time:"".concat(Math.floor(Date.now()/1e3)),isGroup:!0,type:"group",user_ids:Array.isArray(e)?e:[e],users:Array.isArray(e)?e.map((e=>({id:e}))):[],user_cnt:"".concat((null===e||void 0===e?void 0:e.length)||0),card_name:_||"New group",createGroupChat:!0,account_id:!0};o(t?(0,a.pXZ)(n):(0,a.a4)(n))})(n,s):((e,r)=>{if(!e)return;y()&&(o((0,a.RrV)(!1)),(0,c.k_)("".concat((0,p.t)(),"/api/v1/profile/userChatInfo"),{body:{id:Array.isArray(e)?e[0]:e}}).then((e=>{const{code:n,data:s}=e||{};if(200!==n||!(0,u.K)(s))return;const{img:i,name:l,position:c,company:d,exhibitor_id:p,exhibitor_role:h,exhibitor_url:x}
1=s,m={correspondent_id:r,correspondent:"chat_".concat(r),card_time:"".concat(Math.floor(Date.now()/1e3)),isGroup:!1,type:"single",card_name:l,card_img:i,exhibitor_id:p||void 0,exhibitor_role:h||void 0,exhibitor_url:x||void 0,card_position:c||void 0,card_company:d||void 0};o(t?(0,a.pXZ)(m):(0,a.a4)(m))})).finally((()=>{o((0,a.RrV)(!0))})))})(n,s)}}),[v,g,o,f,C,t,b,_])}},59280:function(e,t,o){var r=o(2265),n=o(14672),s=o(55408);t.Z=e=>{const t=(0,n.TL5)(),o=(0,n.CGy)(n.ulX);(0,r.useEffect)((()=>{if(!e.length||o)return;const r=setTimeout((()=>{t((0,s.R8)(e))}),2e3);return()=>{clearTimeout(r)}}),[e,t,o])}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.