PageSourceSearch

https://www.selloutcrowds.com/_next/static/chunks/7463.deff17bf70550214.js

js selloutcrowds.com collected 2026-09-24 14:03:13 UTC 36,670 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7463],{57463:(e,t,s)=>{s.r(t),s.d(t,{default:()=>eC});var a=s(54568),n=s(99680),l=s(7620),r=s(51269),i=s(77215),o=s(77435),c=s(56554),d=s(98937),m=s(44614),u=s(67433),x=s(76216),f=s(12432),h=s(73850),p=s(32241),g=s(51062),j=s(64083),b=s(7145),S=s(37971),v=s(26290),y=s(24560);function w(e){let t,s,r,d,m,u,x=(0,n.c)(18),{onSave:f,initedData:h,convoId:p}=e;x[0]!==h?(t=void 0===h?[]:h,x[0]=h,x[1]=t):t=x[1];let g=t,{t:j}=(0,y.Bd)(),[w,N]=(0,l.useState)(""),[k,C]=(0,l.useState)(!1);x[2]!==p||x[3]!==f?(s=async e=>{C(!0);let t="/api.php?r=bx_messenger/save_parts_list/Services&params="+JSON.stringify({parts:e.map(_),...p&&{lot_id:p}}),s=await (0,c.G)(t);C(!1),0==s.data.code?f(s.data):N(s.data.message)},x[2]=p,x[3]=f,x[4]=s):s=x[4];let I=s;return x[5]!==w?(r=(0,a.jsx)(o.fI,{children:(0,a.jsx)(v.jQ,{errorText:w})}),x[5]=w,x[6]=r):r=x[6],x[7]!==I||x[8]!==g||x[9]!==k?(d=!k&&(0,a.jsx)(b.LA,{onlyOnce:!1,onSave:I,requestUrl:"/api.php?r=bx_messenger/search_users/Services&params=",initedData:g}),x[7]=I,x[8]=g,x[9]=k,x[10]=d):d=x[10],x[11]!==k||x[12]!==j?(m=k&&(0,a.jsxs)(o.Ss,{className:"w-full pt-8 items-center",children:[(0,a.jsx)(S.A,{}),(0,a.jsx)(i.E,{className:"pt-8 text-base text-muted-foreground  animate-pulse  font-medium",children:j("messenger_creating")})]}),x[11]=k,x[12]=j,x[13]=m):m=x[13],x[14]!==r||x[15]!==d||x[16]!==m?(u=(0,a.jsxs)(a.Fragment,{children:[r,d,m]}),x[14]=r,x[15]=d,x[16]=m,x[17]=u):u=x[17],u}function _(e){return e.id}function N(e){let t,s,r,i,c,d,m,u,x=(0,n.c)(30),{onSave:f,onShow:h,size:b,variant:S,style:v}=e,{t:_}=(0,y.Bd)(),{setBottomSheetData:N}=(0,j.O)(),[k,C]=(0,l.useState)(!1);x[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{C(!0)},x[0]=t):t=x[0];let I=t;x[1]!==f||x[2]!==N?(s=e=>{C(!1),N(!1),f(e)},x[1]=f,x[2]=N,x[3]=s):s=x[3];let E=s,A=v??"bordered";if("small"==(void 0===b?"small":b)){let e,t,s;x[4]!==_?(e=_("messenger_add_users"),x[4]=_,x[5]=e):e=x[5],x[6]===Symbol.for("react.memo_cache_sentinel")?(t=()=>I(),x[6]=t):t=x[6],x[7]!==A||x[8]!==k||x[9]!==e?(s=(0,a.jsx)(o.Ss,{children:(0,a.jsx)(p.X5,{style:A,selected:k,selectedState:"pressedToggle",controlSize:"regular",borderShape:"circle",image:"Plus",accessibilityLabel:e,onPress:t})},"add-1"),x[7]=A,x[8]=k,x[9]=e,x[10]=s):s=x[10],r=s}else{let e,t,s;x[11]!==_?(e=_("messenger_create_first"),x[11]=_,x[12]=e):e=x[12],x[13]!==h?(t=()=>{I(),h()},x[13]=h,x[14]=t):t=x[14],x[15]!==e||x[16]!==t?(s=(0,a.jsx)(p.X5,{style:"bordered",controlSize:"regular",image:"Plus",label:e,onPress:t}),x[15]=e,x[16]=t,x[17]=s):s=x[17],r=s}let O=r;x[18]!==_?(i=_("messenger_add_users"),x[18]=_,x[19]=i):i=x[19];let L=!!k;return x[20]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{C(!1)},x[20]=c):c=x[20],x[21]!==E?(d=(0,a.jsx)(w,{onSave:E}),x[21]=E,x[22]=d):d=x[22],x[23]!==i||x[24]!==L||x[25]!==d?(m=(0,a.jsx)(g.a,{title:i,onVisible:L,onClose:c,transparent:!1,children:d}),x[23]=i,x[24]=L,x[25]=d,x[26]=m):m=x[26],x[27]!==r||x[28]!==m?(u=(0,a.jsxs)(a.Fragment,{children:[O,m]}),x[27]=r,x[28]=m,x[29]=u):u=x[29],u}var k=s(95431),C=s(93007),I=s(5071),E=s(94227),A=s(52191),O=s(32507),L=s(50857),z=s(10365),B=s(24636),M=s(88804),R=s(76032),T=s(92531);function P({item:e,index:t,changeConvo:s,selectedIndex:l}){let{currentUser:r,setCurrentUser:c}=(0,x.iZ)(),d=e.participants.filter(e=>e.id!=r.id),m=d.map(e=>e.display_name).join(", ");return(0,a.jsx)(e=>{let t,s,l,r,c,u,x,f,h,p,g,j=(0,n.c)(26),{item:b,index:S,changeConvo:v,selectedIndex:y}=e;j[0]!==v||j[1]!==b?(t=()=>v(b),j[0]=v,j[1]=b,j[2]=t):t=j[2];let w=(y==S?" bg-accent ":" web:group-hover:bg-muted/50 active:bg-muted/50 ")+" relative w-full overflow-hidden gap-3 rounded-xl px-3 py-2 web:duration-200";return j[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(o.Ss,{className:" rounded-full flex-none bg-secondary mb-auto",children:(0,a.jsx)(C.A,{...d[0],displayType:"unit_wo_info",displaySize:"base"})}),j[3]=s):s=j[3],j[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(i.E,{className:"block flex-1 min-w-0 text-sm leading-5 font-bold text-card-foreground web:group-hover:text-foreground line-clamp-1 truncate overflow-hidden max-w-full",numberOfLines:1,children:m}),j[4]=l):l=j[4],j[5]!==b.date?(r=(0,a.jsxs)(o.fI,{className:"items-center gap-1 ",children:[l,(0,a.jsx)(R.A,{className:"text-sm text-muted-foreground whitespace-nowrap",ts:b.date})]}),j[5]=b.date,j[6]=r):r=j[6],j[7]!==b.message?(c=(0,T.Kq)(b.message),j[7]=b.message,j[8]=c):c=j[8],j[9]!==c?(u=(0,a.jsx)(o.Ss,{className:"",children:(0,a.jsx)(i.E,{className:"block text-sm text-secondary-foreground web:group-hover:text-foreground line-clamp-1 truncate overflow-hidden max-w-full",numberOfLines:1,children:c})}),j[9]=c,j[10]=u):u=j[10],j[11]!==r||j[12]!==u?(x=(0,a.jsxs)(o.Ss,{className:"flex-1 my-auto ",children:[r,u]}),j[11]=r,j[12]=u,j[13]=x):x=j[13],j[14]!==S||j[15]!==b.unread||j[16]!==y?(f=b.unread>0&&y!=S&&(0,a.jsx)(o.Ss,{className:"flex-none bg-primary rounded-full mb-auto mt-1 h-min min-w-5 min-h-5 items-center justify-center px-1.5",children:(0,a.jsx)(i.E,{className:"text-xs text-primary-foreground font-semibold",children:b.unread})}),j[14]=S,j[15]=b.unread,j[16]=y,j[17]=f):f=j[17],j[18]===Symbol.for("react.memo_cache_sentinel")?(h=d.length>1&&(0,a.jsx)(o.Ss,{className:"absolute bottom-1 start-9 bg-muted border border-card h-5 text-center justify-center rounded-full px-1",children:(0,a.jsxs)(i.E,{className:"text-center items-center text-muted-foreground text-xs font-semibold",children:["+",d.length-1]})}),j[18]=h):h=j[18],j[19]!==w||j[20]!==x||j[21]!==f?(p=(0,a.jsxs)(o.fI,{className:w,children:[s,x,f,h]}),j[19]=w,j[20]=x,j[21]=f,j[22]=p):p=j[22],j[23]!==t||j[24]!==p?(g=(0,a.jsx)(o.oz,{className:"group w-full px-2 py-0.5 web:cursor-pointer",onPress:t,children:p}),j[23]=t,j[24]=p,j[25]=g):g=j[25],g},{item:e,index:t,changeConvo:s,selectedIndex:l})}var H=s(76068),J=s(23943),D=s(71126),$=s(52496),F=s(64075);let G="web"===m.A.OS,q="absolute top-0 inset-x-0 z-10 bg-linear-to-b from-background from-40% to-transparent pb-8",X="bg-linear-to-t from-background from-40% to-transparent";function W(e){let t,s=(0,n.c)(2),{height:l}=e,r=void 0===l?0:l;return s[0]!==r?(t=(0,a.jsx)(o.Ss,{style:{height:r,width:"100%",flexShrink:0}}),s[0]=r,s[1]=t):t=s[1],t}function Q(){let e=(0,d.q)("layout","header","content");return G?e:String(e||"").replace(/\bh-16\b/g,"min-h-16")}function V(e){let[t,s]=(0,l.useState)(""),a=(0,J.A)(t,300),n=(0,l.useRef)(null),r=(0,l.useRef)(e);r.current=e,(0,l.useEffect)(()=>
1{if(null===n.current&&""===a){n.current=a;return}n.current!==a&&(n.current=a,r.current(a))},[a]);let i=(0,l.useCallback)(()=>{s(""),n.current="",r.current("")},[]);return{value:t,setValue:s,reset:i}}function Z(e){let t,s=(0,n.c)(4),{value:l,onChangeText:r}=e,{t:i}=(0,y.Bd)(),o=i("Search")+"...";return s[0]!==r||s[1]!==o||s[2]!==l?(t=(0,a.jsx)(H.pd,{className:"w-full min-w-0",size:"regular",rounded:"full",name:"search",placeholder:o,value:l,onChangeText:r}),s[0]=r,s[1]=o,s[2]=l,s[3]=t):t=s[3],t}let K=[{id:"edit",title:"Edit participants list",icon:"Users"},{id:"info",title:"Info",icon:"Info"},{id:"leave",title:"Leave chat",icon:"LogOut"},{id:"delete",title:"Delete chat",icon:"Trash"}];function Y(e){let t,s,l,r,i=(0,n.c)(11),{onAction:o,style:c}=e,d=void 0===c?"glass":c,{t:m}=(0,y.Bd)();return i[0]!==m?(t=K.map(e=>({...e,title:m(e.title)})),i[0]=m,i[1]=t):t=i[1],i[2]!==m?(s=m("Settings"),i[2]=m,i[3]=s):s=i[3],i[4]!==d||i[5]!==s?(l=(0,a.jsx)(p.X5,{style:d,controlSize:"regular",borderShape:"circle",image:"Settings",accessibilityLabel:s}),i[4]=d,i[5]=s,i[6]=l):l=i[6],i[7]!==o||i[8]!==t||i[9]!==l?(r=(0,a.jsx)($.A,{onSelect:o,items:t,children:l}),i[7]=o,i[8]=t,i[9]=l,i[10]=r):r=i[10],r}function U(e){let t,s,l=(0,n.c)(11),{items:r,index:i,onChange:c}=e,{t:d}=(0,y.Bd)();if(!r||r.length<2)return null;if(l[0]!==i||l[1]!==r||l[2]!==c||l[3]!==d){let e;l[5]!==i||l[6]!==c||l[7]!==d?(e=(e,t)=>(0,a.jsx)(p.X5,{label:d(e.title),style:"glass",selected:t===i,selectedState:"pressedToggle",controlSize:"small",borderShape:"capsule",haptics:"Medium",interactive:!0,onPress:()=>c(t)},e.name),l[5]=i,l[6]=c,l[7]=d,l[8]=e):e=l[8],t=r.map(e),l[0]=i,l[1]=r,l[2]=c,l[3]=d,l[4]=t}else t=l[4];return l[9]!==t?(s=(0,a.jsx)(o.fI,{className:"items-center gap-2",children:t}),l[9]=t,l[10]=s):s=l[10],s}function ee(e){let t,s,r,c,m,u,x,f,h,g,j,b,S,v,w=(0,n.c)(38),{pageData:_,onSearch:N,addButtons:k,menuItems:C,menuIndex:I,onMenuChange:E}=e,{t:A}=(0,y.Bd)(),[O,L]=(0,l.useState)(!1),B=V(N),M=(0,z.c8)();w[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,F.QQ)("molecule","context_selector"),w[0]=t):t=w[0];let R=t;w[1]!==A?(s=A("Messages"),w[1]=A,w[2]=s):s=w[2];let T=s;w[3]!==M?(r=e=>{if(G)return;let{height:t}=e.nativeEvent.layout;t>0&&M(t)},w[3]=M,w[4]=r):r=w[4];let P=r;return w[5]===Symbol.for("react.memo_cache_sentinel")?(c=(0,d.q)("layout","page_content_width_default"),m=Q(),w[5]=c,w[6]=m):(c=w[5],m=w[6]),w[7]!==T||w[8]!==_?.context||w[9]!==_?.uri||w[10]!==_?.url||w[11]!==B||w[12]!==O?(u=O?(0,a.jsx)(o.Ss,{className:"flex-1 min-w-0 px-4",children:(0,a.jsx)(Z,{value:B.value,onChangeText:B.setValue})}):(0,a.jsxs)(o.fI,{className:"flex-1 min-w-0 items-center gap-3 px-4 ",children:[(0,d.q)("messenger","back_button")?(0,D.A)():null,(0,d.q)("context_selector","show_always")?(0,a.jsx)(R,{url:_?.url,uri:_?.uri,data:_?.context}):(0,a.jsx)(i.E,{className:"font-bold truncate flex-1 min-w-0 text-card-foreground text-2xl tracking-tight font-main",numberOfLines:1,children:T})]}),w[7]=T,w[8]=_?.context,w[9]=_?.uri,w[10]=_?.url,w[11]=B,w[12]=O,w[13]=u):u=w[13],w[14]!==A?(x=A("Search"),w[14]=A,w[15]=x):x=w[15],w[16]!==B?(f=()=>{L(e=>(e&&B.reset(),!e))},w[16]=B,w[17]=f):f=w[17],w[18]!==O||w[19]!==x||w[20]!==f?(h=(0,a.jsx)(p.X5,{style:"glass",selected:O,selectedState:"pressedToggle",controlSize:"regular",borderShape:"circle",image:"Search",accessibilityLabel:x,onPress:f}),w[18]=O,w[19]=x,w[20]=f,w[21]=h):h=w[21],w[22]!==k?(g=Array.isArray(k)?k.map(et):k,w[22]=k,w[23]=g):g=w[23],w[24]!==g||w[25]!==h?(j=(0,a.jsxs)(o.fI,{className:"my-auto shrink-0 items-center gap-3 pe-4",children:[h,g]}),w[24]=g,w[25]=h,w[26]=j):j=w[26],w[27]!==j||w[28]!==u?(b=(0,a.jsxs)(o.fI,{className:`${c} ${m} max-w-full`,children:[u,j]}),w[27]=j,w[28]=u,w[29]=b):b=w[29],w[30]!==I||w[31]!==C||w[32]!==E?(S=C?.length>1?(0,a.jsx)(o.fI,{className:"w-full items-center px-4 pb-2",children:(0,a.jsx)(U,{items:C,index:I,onChange:E})}):null,w[30]=I,w[31]=C,w[32]=E,w[33]=S):S=w[33],w[34]!==P||w[35]!==b||w[36]!==S?(v=(0,a.jsxs)(o.Ss,{onLayout:P,className:"w-full",children:[b,S]}),w[34]=P,w[35]=b,w[36]=S,w[37]=v):v=w[37],v}function et(e,t){return e?(0,l.cloneElement)(e,{key:e.key??t,style:"glass"}):null}function es(e){let t,s,l,r,c,m,u,x,f=(0,n.c)(17),{title:h,onBack:g,onAction:j}=e,{t:b}=(0,y.Bd)();return f[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,d.q)("layout","page_content_width_default"),s=Q(),f[0]=t,f[1]=s):(t=f[0],s=f[1]),f[2]!==b?(l=b("Back"),f[2]=b,f[3]=l):l=f[3],f[4]!==g||f[5]!==l?(r=(0,a.jsx)(o.Ss,{className:"shrink-0",children:(0,a.jsx)(p.X5,{style:"glass",controlSize:"regular",borderShape:"circle",image:"ArrowLeft",accessibilityLabel:l,onPress:g})}),f[4]=g,f[5]=l,f[6]=r):r=f[6],f[7]!==h?(c=(0,a.jsx)(i.E,{numberOfLines:1,className:"flex-1 min-w-0 font-bold text-card-foreground text-lg sm:text-xl tracking-tight",children:h}),f[7]=h,f[8]=c):c=f[8],f[9]!==r||f[10]!==c?(m=(0,a.jsxs)(o.fI,{className:"flex-1 min-w-0 items-center gap-3 px-4 ",children:[r,c]}
1),f[9]=r,f[10]=c,f[11]=m):m=f[11],f[12]!==j?(u=(0,a.jsx)(o.Ss,{className:"shrink-0 items-center justify-center pe-4",children:(0,a.jsx)(Y,{onAction:j,style:"glass"})}),f[12]=j,f[13]=u):u=f[13],f[14]!==m||f[15]!==u?(x=(0,a.jsxs)(o.fI,{className:`${t} ${s} max-w-full`,children:[m,u]}),f[14]=m,f[15]=u,f[16]=x):x=f[16],x}function ea(e){let t,s,r,c,d,m,u,x,f,h=(0,n.c)(29),{title:g,searchValue:j,onChangeSearch:b,onCloseSearch:S,addButtons:v,menuItems:w,menuIndex:_,onMenuChange:N,onLayout:k}=e,{t:C}=(0,y.Bd)(),[I,E]=(0,l.useState)(!1);return h[0]!==b||h[1]!==j||h[2]!==I||h[3]!==g?(t=I?(0,a.jsx)(o.Ss,{className:"flex-1 min-w-0",children:(0,a.jsx)(Z,{value:j,onChangeText:b})}):(0,a.jsx)(i.E,{numberOfLines:1,className:"flex-1 min-w-0 font-bold text-card-foreground text-2xl tracking-tight font-main",children:g}),h[0]=b,h[1]=j,h[2]=I,h[3]=g,h[4]=t):t=h[4],h[5]!==C?(s=C("Search"),h[5]=C,h[6]=s):s=h[6],h[7]!==S?(r=()=>{E(e=>(e&&S?.(),!e))},h[7]=S,h[8]=r):r=h[8],h[9]!==I||h[10]!==s||h[11]!==r?(c=(0,a.jsx)(p.X5,{style:"glass",selected:I,selectedState:"pressedToggle",controlSize:"regular",borderShape:"circle",image:"Search",accessibilityLabel:s,onPress:r}),h[9]=I,h[10]=s,h[11]=r,h[12]=c):c=h[12],h[13]!==v?(d=Array.isArray(v)?v.map(en):v,h[13]=v,h[14]=d):d=h[14],h[15]!==c||h[16]!==d?(m=(0,a.jsxs)(o.fI,{className:"shrink-0 items-center gap-3",children:[c,d]}),h[15]=c,h[16]=d,h[17]=m):m=h[17],h[18]!==t||h[19]!==m?(u=(0,a.jsxs)(o.fI,{className:"min-h-16 items-center gap-2 px-4",children:[t,m]}),h[18]=t,h[19]=m,h[20]=u):u=h[20],h[21]!==_||h[22]!==w||h[23]!==N?(x=w?.length>1?(0,a.jsx)(o.fI,{className:"items-center px-4 pb-2 pt-1",children:(0,a.jsx)(U,{items:w,index:_,onChange:N})}):null,h[21]=_,h[22]=w,h[23]=N,h[24]=x):x=h[24],h[25]!==k||h[26]!==u||h[27]!==x?(f=(0,a.jsxs)(o.Ss,{onLayout:k,className:"w-full",children:[u,x]}),h[25]=k,h[26]=u,h[27]=x,h[28]=f):f=h[28],f}function en(e,t){return e?(0,l.cloneElement)(e,{key:e.key??t,style:"glass"}):null}function el(e){let t,s,l,r=(0,n.c)(7),{title:c,onAction:d}=e;return r[0]!==c?(t=(0,a.jsx)(o.fI,{className:"flex-1 min-w-0 items-center gap-3 px-4 overflow-hidden",children:(0,a.jsx)(i.E,{numberOfLines:1,className:"flex-1 min-w-0 font-bold text-card-foreground text-lg sm:text-xl tracking-tight",children:c})}),r[0]=c,r[1]=t):t=r[1],r[2]!==d?(s=(0,a.jsx)(o.Ss,{className:"shrink-0 items-center justify-center pe-4",children:(0,a.jsx)(Y,{onAction:d,style:"glass"})}),r[2]=d,r[3]=s):s=r[3],r[4]!==t||r[5]!==s?(l=(0,a.jsxs)(o.fI,{className:"h-16 items-center max-w-full",children:[t,s]}),r[4]=t,r[5]=s,r[6]=l):l=r[6],l}let er="web"===m.A.OS,ei=(0,l.memo)(function(e){let t,s,r,c,d,m,u,x,f=(0,n.c)(52),{data:h,panelHeight:p,listHeight:g,selectedConvoIndex:j,changeConvo:b,onSearch:S,onSave:v,addButtons:w,isSmallScreen:_,menuItems:k,menuIndex:C,onMenuChange:I,footerInset:E}=e,A=void 0===E?0:E,{t:O}=(0,y.Bd)(),L=V(S),[z,B]=(0,l.useState)(88);f[0]!==O?(t=O("Messages"),f[0]=O,f[1]=t):t=f[1];let R=t;f[2]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{let{height:t}=e.nativeEvent.layout;t>0&&B(e=>e===t?e:t)},f[2]=s):s=f[2];let T=s,H=er&&_,J=Math.max(0,g||p||0),D=!_,$=D?z:0;e:{let e,t,s;if(!$&&!A){let e;f[3]===Symbol.for("react.memo_cache_sentinel")?(e={},f[3]=e):e=f[3],r=e;break e}if(er){let e,t,s;f[4]!==$?(e=()=>(0,a.jsx)(W,{height:$}),f[4]=$,f[5]=e):e=f[5],f[6]!==A?(t=()=>(0,a.jsx)(W,{height:A}),f[6]=A,f[7]=t):t=f[7],f[8]!==e||f[9]!==t?(s={components:{Header:e,Footer:t}},f[8]=e,f[9]=t,f[10]=s):s=f[10],r=s;break e}f[11]!==$?(e=(0,a.jsx)(W,{height:$}),f[11]=$,f[12]=e):e=f[12],f[13]!==A?(t=(0,a.jsx)(W,{height:A}),f[13]=A,f[14]=t):t=f[14],f[15]!==e||f[16]!==t?(s={ListHeaderComponent:e,ListFooterComponent:t},f[15]=e,f[16]=t,f[17]=s):s=f[17],r=s}let F=r;f[18]!==w?.length||f[19]!==b||f[20]!==h||f[21]!==$||f[22]!==_||f[23]!==J||f[24]!==F||f[25]!==v||f[26]!==L||f[27]!==j||f[28]!==O||f[29]!==H?(c=h&&h.length>0?(0,a.jsx)(M.A,{data:h,mode:"simple",useCustomScrollHandler:_&&!er,useWindowScroll:H,height:H?void 0:J,renderItem:e=>{let{item:t,index:s}=e;return(0,a.jsx)(P,{selectedIndex:j,item:t,index:s,changeConvo:b})},...F}):(0,a.jsx)(o.Ss,{className:"items-center justify-center w-full h-full",style:{paddingTop:$},children:(0,a.jsx)(o.Ss,{className:"pt-8",children:(0,a.jsxs)(o.Ss,{className:"gap-y-2 items-center opacity-80 justify-center mx-auto my-auto py-4 px-8 rounded-2xl bg-muted-foreground
1/10",children:[(0,a.jsx)(i.E,{className:"text-center text-lg text-secondary-foreground lg:text-xl font-semibold",children:O("No conversations found")}),w?.length>0&&(0,a.jsx)(N,{variant:"secondary",onSave:v,onShow:L.reset})]})})}),f[18]=w?.length,f[19]=b,f[20]=h,f[21]=$,f[22]=_,f[23]=J,f[24]=F,f[25]=v,f[26]=L,f[27]=j,f[28]=O,f[29]=H,f[30]=c):c=f[30];let G=c,X=`${D?"relative flex-1 min-h-0 overflow-hidden":"w-full"} ${_?"bg-card":""}`;return f[31]!==J||f[32]!==D||f[33]!==p||f[34]!==H?(d=D?{height:p||J}:!H&&J>0?{height:J}:void 0,f[31]=J,f[32]=D,f[33]=p,f[34]=H,f[35]=d):d=f[35],f[36]!==G||f[37]!==D?(m=D?(0,a.jsx)(o.Ss,{className:"absolute inset-0",children:G}):G,f[36]=G,f[37]=D,f[38]=m):m=f[38],f[39]!==w||f[40]!==R||f[41]!==C||f[42]!==k||f[43]!==I||f[44]!==D||f[45]!==L?(u=D?(0,a.jsx)(o.Ss,{className:q,pointerEvents:"box-none",children:(0,a.jsx)(o.Ss,{pointerEvents:"auto",children:(0,a.jsx)(ea,{title:R,searchValue:L.value,onChangeSearch:L.setValue,onCloseSearch:L.reset,addButtons:w,menuItems:k,menuIndex:C,onMenuChange:I,onLayout:T})})}):null,f[39]=w,f[40]=R,f[41]=C,f[42]=k,f[43]=I,f[44]=D,f[45]=L,f[46]=u):u=f[46],f[47]!==X||f[48]!==d||f[49]!==m||f[50]!==u?(x=(0,a.jsxs)(o.Ss,{className:X,style:d,children:[m,u]}),f[47]=X,f[48]=d,f[49]=m,f[50]=u,f[51]=x):x=f[51],x});var eo=s(1242),ec=s(18036),ed=s(79403),em=s(96048),eu=s(25784),ex=s(17047),ef=s(35023);function eh({item:e,index:t,handleReply:s}){let n=(0,F.QQ)("molecule","reactions"),{t:r}=(0,y.Bd)(),[i,d]=(0,l.useState)(null),[m,x]=(0,l.useState)({view:""}),f=(0,l.useCallback)(async(t,s)=>{switch(t.name){case"edit":x({view:"edited",data:await (0,c.G)("/api.php?r=bx_messenger/get_send_form/Services&params="+JSON.stringify({action:"edit",id:e.id}))});break;case"remove":await (0,c.G)("/api.php?r=bx_messenger/remove_jot/Services&params="+JSON.stringify({jot_id:e.id,lot_id:e.lot_id,lot_hash:e.lot_hash}))}},[e]),{data:h}=(0,u.A)("/api.php?r=bx_messenger/get_send_form/Services&params[]=",i),p=(0,l.useMemo)(()=>(e?.files||[]).map(em.i$).filter(Boolean),[e]),j=(0,l.useCallback)((t,s)=>{t.set("id",e.lot_id),x({view:""}),d(t)},[]),b=(0,l.useMemo)(()=>e.menu?.items.filter(e=>["remove","edit"].includes(e.name)),[e]),S=(0,l.useCallback)(async e=>{(0,ed.Q)("Medium"),E.A.emit("editor",{action:"focus"}),s(e)},[s]),v={...e.reactions,params:{...e.reactions.params,button_size:"xs",button_variant:"link"}};return(0,a.jsx)(ex.A,{onPress:()=>{E.A.emit("editor",{action:"blur"})},children:(0,a.jsxs)(o.Ss,{className:"w-full px-4 mt-3",children:[(0,a.jsxs)(o.fI,{className:"gap-2",children:[(0,a.jsx)(C.A,{...e.author_data,displayType:"unit_wo_info",displaySize:"base",showInfo:"false"}),(0,a.jsx)(o.Ss,{className:"flex-auto",children:(0,a.jsxs)(o.Ss,{className:"bg-card/60 shadow-card-outline dark:shadow-card-outline-deep rounded-xl px-3 ",children:[(0,a.jsxs)(o.fI,{className:"items-center w-full justify-between gap-1 mb-0.5 pt-2",children:[(0,a.jsx)(C.A,{...e.author_data,displayType:"unit_wo_image"}),(0,a.jsx)(o.Ss,{className:"",children:(0,a.jsx)(R.A,{className:"text-muted-foreground text-sm",ts:e.created})})]}),"edited"==m.view?(0,a.jsx)(g.a,{title:r("Edit"),onVisible:!0,onClose:()=>{x({view:""})},transparent:!0,headerBorder:!0,children:(0,a.jsx)(o.Ss,{className:"p-2",children:(0,a.jsx)(ec.A,{name:"bx_messenger",...m.data,classContainerName:"flex-row flex-wrap px-2 w-full items-start justify-between",onFormSubmit:j})})}):(0,a.jsxs)(o.Ss,{className:"pb-2",children:[e.reply>0?(0,a.jsx)(o.Ss,{className:"border border-border/60 rounded-md p-2 my-1 bg-muted-foreground/20",children:(0,a.jsx)(ef.f,{content:e?.reply_message,numberOfLines:2,numberOfSymbols:200,openSmall:!1,customClassName:"u-vanilla-html-small"})}):null,(0,a.jsx)(ef.f,{content:e?.message,numberOfLines:3,numberOfSymbols:360,openSmall:!1,showLess:!0,customClassName:"u-vanilla-html-small"}),p.length>0&&(0,a.jsx)(o.Ss,{className:"max-w-xs w-full",children:(0,a.jsx)(eu.A,{data:p})})]})]})})]}),(0,a.jsxs)(o.Ss,{className:"flex-row justify-between items-center mt-0.5",children:[(0,a.jsx)(o.Ss,{className:"pl-12",children:(0,a.jsx)(eo.$n,{align:"start",title:r("Reply"),size:"xs",startDecorator:"MessageCircle",variant:"link",onPress:()=>S(e),rounded:!0})}),(0,a.jsxs)(o.fI,{className:"gap-1",children:[(0,a.jsx)(o.Ss,{className:"",children:(0,a.jsx)(n,{...v},"reactions_"+e.id)}),b.length>0&&(0,a.jsx)($.A,{items:b.map(e=>({id:e.id+"-"+e.name,name:e.name,link:e.link,title:e.title})),onSelect:f,children:(0,a.jsx)(eo.$n,{variant:"text",size:"xs",startDecorator:"Ellipsis",rounded:!0})})]})]})]})})}var ep=s(18441);let eg="web"===m.A.OS,ej=!eg,eb=(0,l.memo)(function(e){let t,s,l,r,i,c,d=(0,n.c)(34),{data:m,listHeight:u,refListJots:x,startReached:f,handleReply:h,isSmallScreen:p,headerInset:g,footerInset:j}=e,b=void 0===g?0:g,S=void 0===j?0:j;e:{let e,s,n;if(eg){let e,s,n;d[0]!==b?(e=()=>(0,a.jsx)(W,{height:b}),d[0]=b,d[1]=e):e=d[1],d[2]!==S?(s=()=>(0,a.jsx)(W,{height:S}),d[2]=S,d[3]=s):s=d[3],d[4]!==e||d[5]!==s?(n={components:{Header:e,Footer:s}},d[4]=e,d[5]=s,d[6]=n):n=d[6],t=n;break e}let l=ej?S:b;d[7]!==l?(e=(0,a.jsx)(W,{height:l}),d[7]=l,d[8]=e):e=d[8];let r=ej?b:S;d[9]!==r?(s=(0,a.jsx)(W,{height:r}),d[9]=r,d[10]=s):s=d[10],d[11]!==e||d[12]!==s?(n={ListHeaderComponent:e,ListFooterComponent:s},d[11]=e,d[12]=s,d[13]=n):n=d[13],t=n}let v=t,y=eg&&p,w=!p,_=Math.max(0,u||0),N=w?"absolute inset-0":"w-full";d[14]!==w||d[15]!==_||d[16]!==y?(s=w||y||!(_>0)?void 0:{height:_},d[14]=w,d[15]=_,d[16]=y,d[17]=s):s=d[17],d[18]===Symbol.for("react.memo_cache_sentinel")?(l=ej?{inverted:!0}:{},d[18]=l):l=d[18];let k=y?void 0:_||void 0,C=p&&!eg;return d[19]!==h?(r=e=>{let{item:t,index:s}=e;return(0,a.jsx)(eh,{handleReply:h,item:t,index:s})},d[19]=h,d[20]=r):r=d[20],d[21]!==m||d[22]!==v||d[23]!==x||d[24]!==f||d[25]!==k||d[26]!==C||d[27]!==r||d[28]!==y?(i=(0,a.jsx)(M.A,{refer:x,...l,overscan:900,onStartReached:f,scrollToLastItem:!0,data:m,useWindowScroll:y,height:k,mode:"simple",useCustomScrollHandler:C,renderItem:r,...v}),d[21]=m,d[22]=v,d[23]=x,d[24]=f,d[25]=k,d[26]=C,d[27]=r,d[28]=y,d[29]=i):i=d[29],d[30]!==i||d[31]!==N||d[32]!==s?(c=(0,a.jsx)(o.Ss,{className:N,style:s,children:i}),d[30]=i,d[31]=N,d[32]=s,d[33]=c):c=d[33],c});function eS(){let e,t,s,l=(0,n.c)(5),{t:r}=(0,y.Bd)();return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,a.jsx)(ep.In,{icon:"MessagesSquare",size:28,className:"text-muted-foreground"}),l[0]=e):e=l[0],l[1]!==r?(t=r("Select a conversation"),l[1]=r,l[2]=t):t=l[2],l[3]!==t?(s=(0,a.jsx)(o.Ss,{className:"flex-1 items-center justify-center",children:(0,a.jsxs)(o.Ss,{className:"gap-y-2 items-center opacity-80 justify-center py-4 px-8",children:[e,(0,a.jsx)(i.E,{className:"text-center text-base text-muted-foreground font-medium",children:t})]})}),l[3]=t,l[4]=s):s=l[4],s}let ev=(0,l.memo)(function(e){let t,s,l,r=(0,n.c)(10),{form:c,replyItem:d,onFormSubmit:m,handleCancelReply:u}=e,{t:x}=(0,y.Bd)();return r[0]!==u||r[1]!==d||r[2]!==x?(t=d?(0,a.jsx)(o.Ss,{className:"bg-accent/60 rounded-xl border border-accent px-2.5 py-2 mb-2",children:(0,a.jsxs)(o.fI,{className:"items-start justify-between max-w-full relative",children:[(0,a.jsxs)(o.Ss,{className:"flex-auto pr-4",children:[(0,a.jsxs)(o.fI,{className:"max-w-full",children:[(0,a.jsxs)(i.E,{className:"text-xs text-popover-foreground",children:[x("Reply to:")," "]}),(0,a.jsx)(i.E,{className:"font-semibold text-xs text-popover-foreground",children:d.author_data.display_name})]}),(0,a.jsx)(o.Ss,{className:"overflow-hidden",children:(0,a.jsx)(ef.f,{content:d.message,numberOfLines:3,numberOfSymbols:360,openSmall:!1,customClassName:"u-vanilla-html-small"})})]}),(0,a.jsx)(o.Ss,{className:"flex-none",children:(0,a.jsx)(p.X5,{style:"bordered",controlSize:"mini",borderShape:"circle",image:"X",accessibilityLabel:x("Close"),classNames:{root:"flex-none"},onPress:()=>u()})})]})}):null,r[0]=u,r[1]=d,r[2]=x,r[3]=t):t=r[3],r[4]!==c||r[5]!==m?(s=(0,a.jsx)(ec.A,{...c,name:"bx_messenger",resetOnSubmit:!0,
1classContainerName:" flex-row flex-wrap w-full items-start justify-between",onFormSubmit:m}),r[4]=c,r[5]=m,r[6]=s):s=r[6],r[7]!==t||r[8]!==s?(l=(0,a.jsx)(o.Ss,{className:"p-1.5 sm:p-2.5",children:(0,a.jsxs)(o.Ss,{children:[t,s]})}),r[7]=t,r[8]=s,r[9]=l):l=r[9],l}),ey="web"===m.A.OS,ew="ios"===m.A.OS?52:56;function e_({defaultConvoId:e,selectedMenu:t,convos:s,layoutHeight:n,fetchConvos:r,data:p,pageData:g,onSave:b,addButtons:S,menuItems:v,menuIndex:_,onMenuChange:N}){let{t:M}=(0,y.Bd)(),R=(0,A.Or)(),T=(0,z.Yf)(),P=ey?0:ew+("android"===m.A.OS?R.bottom:0),{setBottomSheetData:H}=(0,j.O)(),[J,D]=(0,l.useState)(e),$=(0,l.useRef)(J);$.current=J;let[F,G]=(0,l.useState)(!1),[W,Q]=(0,l.useState)(!1),V=(0,L.GM)(),Z=!ey||!V,K=(0,l.useRef)(Z);K.current=Z;let Y=(0,A.jH)(),U=(0,l.useRef)(Y);U.current=Y;let[et,ea]=(0,l.useState)({convos:!0,jots:!Z}),en=(0,l.useRef)(et);en.current=et;let[er,eo]=(0,l.useState)(!1),[ec,ed]=(0,l.useState)(!1),[em,eu]=(0,l.useState)(0),[ex,ef]=(0,l.useState)(0),[eh,ep]=(0,l.useState)(!1),eg=(0,l.useRef)(),ej=(0,l.useRef)(!1),eN=(0,l.useRef)(!0),ek=(0,l.useRef)(null),[eC,eI]=(0,l.useState)(s?.data||[]),eE=eC&&J?eC.findIndex(e=>e.id===J):-1,eA=!!eC&&eC[eE],{currentUser:eO}=(0,x.iZ)(),[eL,ez]=(0,l.useState)(!1),{data:eB}=(0,u.A)("/api.php?r=bx_messenger/get_send_form/Services&params="+JSON.stringify({id:eA?.id,convo_id:eA?.id,reply_id:eL?eL?.id:0}),er);(0,l.useEffect)(()=>{p.form.data.inputs.message.value="",ez(!1),eo(!1),eB?.data?.jot_id>0&&e$(),eB?.data?.data&&ed(eB?.data?.data)},[eB]);let eM=(0,l.useCallback)(e=>{r(e)},[r]);(0,l.useEffect)(()=>{eI(s?.data||[])},[s?.data]);let eR=(0,l.useCallback)(async(e,t)=>{if(t&&(ej.current||!eN.current))return;let s=ek.current,a=0;s?.limit&&t&&(a=(s.start??0)+s.limit),ej.current=!0;try{let s="/api.php?r=bx_messenger/get_convo_messages/Services&params="+JSON.stringify({lot:e,jot:0,start:a}),n=await (0,c.G)(s),l=n.data?.jots??[];if(t&&0===l.length){eN.current=!1;return}ek.current=n.data.params,G(e=>({...e,data:{params:n.data.params,jots:e&&t?[...l,...e?.data?.jots]:l},index:e&&t?e.index:0}))}finally{ej.current=!1}},[]),eT=(0,d.q)("messenger","url"),eP=(0,l.useCallback)(()=>{if(!ey)return!1;let e=window.location.pathname;return e===eT||e.startsWith(eT+"/")},[eT]),eH=(0,l.useCallback)((e,{push:s=!1}={})=>{if(!ey||!e||!eP())return;let a=`${eT}/${t}/${e}/`;window.location.pathname!==a&&(s?window.history.pushState(null,"",a):window.history.replaceState(null,"",a))},[eT,t,eP]);(0,l.useEffect)(()=>{if(!ey)return;let e=()=>{let e=window.location.pathname;if(e!==eT&&!e.startsWith(eT+"/"))return;let t=e.slice(eT.length).split("/").filter(Boolean)[1]||"";t?(D(t),K.current&&ea({convos:!1,jots:!0})):K.current&&ea({convos:!0,jots:!1})};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[eT]),(0,l.useEffect)(()=>{Z?ea(e=>e.jots&&$.current?{convos:!1,jots:!0}:{convos:!0,jots:!1}):ea({convos:!0,jots:!0})},[Z]),(0,l.useEffect)(()=>{D(e),K.current&&ea(e?{convos:!1,jots:!0}:{convos:!0,jots:!1}),e&&eH(e,{push:!0})},[t,e]),(0,l.useEffect)(()=>{if(!Z&&(!s?.menu||s.menu===t)&&""==J&&eC?.length>0){let e=eC[0];D(e.id),eH(e.id)}},[eC,J,Z,eH,s?.menu,t]),(0,l.useEffect)(()=>{if(!eA)return;let e=(0,f.B)("bx_messenger","convo_"+eA.id,eJ),t=(0,f.B)("bx_messenger","profile_"+eO.id,eD);return eN.current=!0,ek.current=null,G(!1),eR(eA.id,!1),()=>{e(),t()}},[J]),(0,l.useEffect)(()=>{Q(null)},[J]);let eJ=e=>{e.id==J&&ed(e)},eD=e=>{},e$=()=>{eg&&eg?.current&&setTimeout(()=>{eg?.current&&eg.current.scrollToIndex({animated:!1,align:"end",behavior:"smooth",index:0x2540be3ff})},100)};(0,l.useEffect)(()=>{if(ec){if("added"==ec.action){if(ec.data.jots){let e=ec.data.jots[ec.data.jots.length-1];e&&eI(t=>{let s=[...t],a=s.findIndex(e=>e.id==J);if(-1===a)return t;let n=s[a];return s[a]={...n,message:e.message??n.message,date:e.created??n.date},s}),G(e=>({...e,data:{...e.data,jots:[...e.data.jots,...ec.data.jots]}})),e$()}ec.data.msg&&Q(ec.data.msg)}
1if("edited"==ec.action){let e=F.data.jots.map(e=>e.id===ec.data.jots[0].id?ec.data.jots[0]:e);G(t=>({...t,data:{...t.data,jots:e}}))}if("deleted"==ec.action){let e=ec.data,t=F.data.jots.filter(t=>t.id!==e);G(e=>({...e,data:{...e.data,jots:t},index:0}))}}},[ec]);let eF=(0,l.useCallback)(e=>{E.A.emit("editor",{action:"focus"}),D(e.id),K.current&&ea({convos:!1,jots:!0}),ey&&window.scrollTo(0,0),eH(e.id,{push:!0})},[eH]),eG=(0,l.useCallback)(()=>{E.A.emit("editor",{action:"blur"}),ea({convos:!0,jots:!1}),ey&&window.scrollTo(0,0),ey&&eP()&&window.location.pathname!==eT&&window.history.pushState(null,"",eT)},[eT,eP]);(0,l.useEffect)(()=>{let e=E.A.addListener("conductor",e=>{!U.current||e?.action!=="reset_to_first"||Z&&en.current.jots&&!en.current.convos&&eG()});return()=>e.remove()},[Z,eG]);let eq=(0,l.useCallback)(async()=>{let e="/api.php?r=bx_messenger/delete_convo/Services&params="+JSON.stringify({lot:eA.id2}),t=await (0,c.G)(e);t.data?.message?ep(t.data?.message):(r(),D(s.data[0].id),eH(s.data[0].id))},[eA?.id2,s.data,eH]),eX=(0,l.useCallback)(async()=>{let e="/api.php?r=bx_messenger/leave_convo/Services&params="+JSON.stringify({lot:eA.id2}),t=await (0,c.G)(e);t.data?.message?ep(t.data?.message):(r(),D(s.data[0].id),eH(s.data[0].id))},[eA?.id2,s.data,eH]),eW=(0,l.useCallback)(async()=>{let e="/api.php?r=bx_messenger/get_convo/Services&params="+JSON.stringify({lot:eA.id2}),t=await (0,c.G)(e);t.data?.message?ep(t.data?.message):H({title:"Conversation info",content:(0,a.jsx)(o.Ss,{className:"items-center justify-center",children:(0,a.jsxs)(o.fI,{className:"mb-4 gap-x-4",children:[(0,a.jsx)(C.A,{displaySize:"base",displayType:"unit_wo_info",...t.data.lot.author_data}),(0,a.jsxs)(o.Ss,{children:[(0,a.jsxs)(i.E,{className:"text-popover-foreground ",children:[M("Participants:")," ",t.data.lot.parts]}),(0,a.jsxs)(i.E,{className:"text-popover-foreground ",children:[M("Messages:")," ",t.data.lot.messages]}),(0,a.jsxs)(i.E,{className:"text-popover-foreground ",children:[M("Files:")," ",t.data.lot.files]})]})]})}),showClose:!0,snapPoints:["25%","50%"]})},[eA?.id2,s.data]),eQ=e=>{H(!1),b(e)},eV=(0,l.useCallback)(async()=>{let e="/api.php?r=bx_messenger/get_parts_list/Services&params="+JSON.stringify({lot:eA.id2}),t=await (0,c.G)(e);H({title:M("messenger_add_users"),content:(0,a.jsx)(w,{onSave:eQ,initedData:t.data,convoId:eA.id2}),showClose:!0,snapPoints:["85%","85%"]})},[eA?.id2,s.data]),eZ=(0,l.useCallback)(e=>{"edit"===e.id&&eV(),"leave"===e.id&&eX(),"info"===e.id&&eW(),"delete"===e.id&&eq()},[eV,eX,eW,eq]),eK=(0,l.useCallback)(e=>{eo(e)},[]),eY=(0,l.useCallback)(e=>{ez(e)},[]),eU=(0,l.useCallback)(()=>{ez(!1)},[]),e0=(0,l.useCallback)(()=>{eA&&eR(eA.id,!0)},[eA?.id]),e1=(0,l.useCallback)(e=>{eu(e.nativeEvent.layout.height)},[]),e2=(0,l.useCallback)(e=>{let{height:t}=e.nativeEvent.layout;t>0&&ef(e=>e===t?e:t)},[]),e3=(0,l.useMemo)(()=>Z?et.jots&&eA?(0,a.jsx)(es,{title:eA.title,onBack:eG,onAction:eZ}):(0,a.jsx)(ee,{pageData:g,onSearch:eM,addButtons:S,menuItems:v,menuIndex:_,onMenuChange:N}):null,[Z,et.jots,eA?.id,eA?.title,eG,eZ,g,eM,S,v,_,N]),e4=(0,d.q)("layouts","messenger"),e5=!!(et.jots&&eA&&F?.data?.jots),e6=60*!!W;if(Z){let e=64*!ey,t=ey?T:0,s=em+e6;return(0,a.jsxs)(o.Ss,{className:"web:h-auto w-full h-full flex-row bg-card",children:[(0,a.jsx)(B.TQ,{main:e3}),et.convos&&(0,a.jsx)(o.Ss,{className:"w-full",children:(0,a.jsx)(ei,{data:eC,pageData:g,panelHeight:ey?void 0:n,listHeight:ey?void 0:n,selectedConvoIndex:eE,changeConvo:eF,onSearch:eM,onSave:b,addButtons:S,isSmallScreen:!0,footerInset:t})}),et.jots&&(0,a.jsxs)(o.Ss,{className:"relative w-full",style:!ey&&n>0?{height:n}:void 0,children:[(0,a.jsx)(k.A,{onVisible:eh,title:eh,handleOk:()=>{ep(!1)}}),e5&&(0,a.jsx)(eb,{data:F.data.jots,listHeight:ey?void 0:n,refListJots:eg,startReached:e0,handleReply:eY,isSmallScreen:!0,headerInset:e,footerInset:s+t}),W?(0,a.jsx)(o.Ss,{className:ey?"fixed left-0 right-0 z-40 mx-4":"absolute left-0 right-0 z-10 mx-4",style:{bottom:em+t},children:(0,a.jsx)(I.A,{data:W})}):null,eA?(0,a.jsx)(h.Kn,{style:ey?{position:"fixed",left:0,right:0,bottom:t,zIndex:40}:{position:"absolute",left:0,right:0,bottom:0,zIndex:10},offset:{closed:0,opened:P},children:(0,a.jsx)(o.Ss,{className:X,pointerEvents:"box-none",children:(0,a.jsx)(o.Ss,{onLayout:e1,className:"w-full",pointerEvents:"auto",children:(0,a.jsx)(ev,{form:p.form,replyItem:eL,onFormSubmit:eK,handleCancelReply:eU})})})}):null]})]})}let e7=Math.max(0,ex);return(0,a.jsx)(o.Ss,{className:"h-full w-full min-h-0",onLayout:e2,children:(0,a.jsxs)(O.YZ,{autoSaveId:e4.sizable?"cells-messenger":void 0,direction:"horizontal",className:"w-full min-w-0 relative flex-row",style:{height:ex||"100%",overflow:"hidden"},children:[(0,a.jsx)(O.Zk,{className:"block min-w-0",...e4.cells?.left,children:(0,a.jsx)(ei,{data:eC,pageData:g,panelHeight:ex,listHeight:ex,selectedConvoIndex:eE,changeConvo:eF,onSearch:eM,onSave:b,addButtons:S,isSmallScreen:!1,menuItems:v,menuIndex:_,onMenuChange:N})}),(0,a.jsx)(O.xJ,{gap:"hidden lg:block",sizable:e4.sizable,panelLine:e4["panel-line"]}),(0,a.jsx)(O.Zk,{className:"w-full min-w-0",...e4.cells?.center,children:(0,a.jsxs)(o.Ss,{className:"relative h-full min-h-0 overflow-hidden border-border/60 lg:border-l ",children:[(0,a.jsx)(k.A,{onVisible:eh,title:eh,handleOk:()=>{ep(!1)}}),eA?(0,a.jsxs)(a.Fragment,{children:[e5?(0,a.jsx)(eb,{data:F.data.jots,listHeight:e7,refListJots:eg,startReached:e0,handleReply:eY,isSmallScreen:!1,headerInset:64,footerInset:em+e6}):null,(0,a.jsx)(o.Ss,{className:q,pointerEvents:"box-none",children:(0,a.jsx)(o.Ss,{pointerEvents:"auto",children:(0,a.jsx)(el,{title:eA.title,onAction:eZ})})}),W?(0,a.jsx)(o.Ss,{className:"absolute left-0 right-0 z-10 mx-4",style:{bottom:em},children:(0,a.jsx)(I.A,{data:W})}):null,(0,a.jsx)(h.Kn,{style:{position:"absolute",left:0,right:0,bottom:0,zIndex:10},offset:{closed:0,opened:0},children:(0,a.jsx)(o.Ss,{className:X,pointerEvents:"box-none",children:(0,a.jsx)(o.Ss,{onLayout:e1,className:"w-full",pointerEvents:"auto",children:(0,a.jsx)(ev,{form:p.form,replyItem:eL,onFormSubmit:eK,handleCancelReply:eU})})})})]}):(0,a.jsx)(eS,{})]})})]},`cells-messenger-${e4.sizable?"sizable":"static"}`)})}var eN=s(52421),ek=s(3691);function eC(e){let t=e.url,s="inbox",n="",i=(0,r.Dl)(t).path.split("/");i.length>1&&(s=i[1]),i.length>2&&(n=i[2]);let{layoutName:o}=(0,eN.z)(),d=(0,l.useMemo)(()=>e.data.menu.items.filter(e=>["inbox","direct"].includes(e.name)),[e]),[m,u]=(0,l.useState)(()=>{let e=d.findIndex(e=>e.name==s);return{data:d,index:e>=0?e:0}}),[x,f]=(0,l.useState)(!1),[h,p]=(0,l.useState)(n),g=(0,l.useRef)(m);g.current=m;let j=(0,l.useRef)(0),b=(0,L.xJ)(),S=(0,l.useCallback)(async(e="")=>{let t=g.current?.data?.[g.current?.index]?.name;if(!t)return;let s=++j.current,a=e?"/api.php?r=bx_messenger/search_lots/Services&params="+JSON.stringify({term:e}):"/api.php?r=bx_messenger/get_convos_list/Services&params[]="+JSON.stringify({group:t,count:0});try{let n=await (0,c.G)(a);if(s!==j.current)return;f({data:e?n.data?.lots?n.data.lots:[]:n.data,menu:t})}catch{if(s!==j.current)return}},[]);(0,l.useEffect)(()=>{S()},[m.index,S]);let v=(0,l.useCallback)(e=>{f(t=>({...t,data:[e.convo,...t.data]})),p(e.convo.id)},[]),y=(0,l.useCallback)(e=>{p(""),u(t=>t.index===e?t:{...t,index:e})},[]),w=(0,l.useMemo)(()=>e.data?.config?.permissions&&e.data?.config?.permissions?.create_talk!=1?null:[(0,a.jsx)(N,{onSave:v,style:"glass"},"a")],[]);return m&&x&&(0,a.jsx)(eI,{fetchConvos:S,convos:x,blockData:e.data,pageData:e.pageData,block:e.block,alreadyWrapped:!!e.blockWrapperProps,selectedMenu:m?.data[m?.index]?.name,menuItems:m.data,menuIndex:m.index,onMenuChange:y,defaultConvoId:h,windowWHeight:b,layout:o,onSave:v,addButtons:w})}let eI=(0,l.memo)(e=>{let t,s,l,r,i=(0,n.c)(22),{convos:o,selectedMenu:c,blockData:d,pageData:u,windowWHeight:x,layout:f,fetchConvos:h,defaultConvoId:p,onSave:g,addButtons:j,menuItems:b,menuIndex:S,onMenuChange:v,block:y,alreadyWrapped:w}=e,_="web"==m.A.OS,N=(0,L.GM)(),k=(0,A.Or)(),C=(0,z.gc)(),I=(0,z.Yf)();e:{if(!_){let e=x-k.bottom-k.top;"ios"==m.A.OS&&(e-=64),t=e;break e}if("ver"==f&&N){t=x-I;break e}t=x-C-I}let E=t;i[0]!==j||i[1]!==d||i[2]!==o||i[3]!==p||i[4]!==h||i[5]!==E||i[6]!==S||i[7]!==b||i[8]!==v||i[9]!==g||i[10]!==u||i[11]!==c?(s=(0,a.jsx)(e_,{pageData:u,data:d,addButtons:j,onSave:g,fetchConvos:h,layoutHeight:E,selectedMenu:c,menuItems:b,menuIndex:S,onMenuChange:v,convos:o,defaultConvoId:p}),i[0]=j,i[1]=d,i[2]=o,i[3]=p,i[4]=h,i[5]=E,i[6]=S,i[7]=b,i[8]=v,i[9]=g,i[10]=u,i[11]=c,i[12]=s):s=i[12];let O=s;if(w||!_)return O;i[13]!==y?(l=y?.menu?{...y,menu:void 0}:y,i[13]=y,i[14]=l):l=i[14];let B=l,M=y?.config_api,R=!N,T=N?"h-full min-h-0":void 0;return i[15]!==B||i[16]!==N||i[17]!==O||i[18]!==M||i[19]!==R||i[20]!==T?(r=(0,a.jsx)(ek.l,{block:B,config:M,fullWidth:!0,fill:N,contentOnly:R,wrapperClassses:T,children:O}),i[15]=B,i[16]=N,i[17]=O,i[18]=M,i[19]=R,i[20]=T,i[21]=r):r=i[21],r})}}]);

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.