1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[852],{15985:function(e,n,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/channels",function(){return s(49943)}])},66810:function(e,n,s){"use strict";var t=s(85893),r=s(67294),i=s(72132),a=s(18026),l=s(14416),c=s(16808),h=s(54482),o=s(50319),d=s(35730),u=s(20044),x=s(2075),j=s(5925),m=s(67707),g=s(91088),f=s(82326),Z=s(44012),C=s(27261),p=s(75136),b=s(72314),w=s(13620);n.Z=()=>{let e=(0,r.useRef)(null),n=(0,r.useRef)(null),[s,v]=(0,r.useState)(!1),y=(0,l.v9)(e=>c.Du(e).chatroomCreateModal),k=(0,l.v9)(e=>h.Du(e).user.id),M=(0,l.I0)(),_=()=>M(c.Nw.chatroomCreateModal.setFalse()),N=e=>M(h.Nw.channel.set(e)),[S]=(0,o.D)(d.To),[I]=(0,o.D)(d.Rx,{update:(e,n)=>{let{data:s}=n;if(!s||!s.createFavchat)return;let t=e.readQuery({query:b.WH,variables:{userId:k}}),r=s.createFavchat;t&&e.writeQuery({query:b.WH,variables:{userId:k},data:{favchats:[...t.favchats,r]}})},onError:e=>{i.Am.error("".concat(e.name,": ").concat(e.message))}});return(0,t.jsxs)(a.u_,{show:y,closefn:()=>_(),children:[(0,t.jsxs)(a.xB,{children:[(0,t.jsx)(Z.Z,{...C.Z.createChannel}),(0,t.jsx)(a.GL,{onClick:()=>_()})]}),(0,t.jsx)(a.fe,{children:k?(0,t.jsxs)(x.Z,{flexWrap:"wrap",alignItems:"center",children:[(0,t.jsx)(j.Z,{width:1,mb:1,children:(0,t.jsx)(Z.Z,{...C.Z.chatroomName})}),(0,t.jsx)(j.Z,{width:1,mb:2,children:(0,t.jsx)(m.Z,{name:"username",type:"text",ref:e,width:1,borderRadius:1})}),(0,t.jsx)(j.Z,{width:1,mb:1,children:(0,t.jsx)(Z.Z,{...C.Z.openToPublic})}),(0,t.jsx)(j.Z,{width:1,mb:2,children:(0,t.jsx)(u.Z,{selected:s,onClick:()=>v(!s)})}),(0,t.jsx)(j.Z,{width:1,mb:1,children:(0,t.jsx)(Z.Z,{...C.Z.chatroomDescription})}),(0,t.jsx)(j.Z,{width:1,mb:2,children:(0,t.jsx)(f.e,{name:"description",ref:n})}),(0,t.jsx)(j.Z,{bg:"orange.5",borderRadius:"1",height:1,width:1,children:(0,t.jsx)(g.Z,{width:1,height:1,p:0,color:"gray.1",fontWeight:"bold",onClick:async()=>{let r=e.current.value,a=n.current.getText();if(!r){i.Am.error("Chatroom name should not be blank!");return}try{let{data:e}=await S({variables:{name:r,description:a,public:s}}),n=null==e?void 0:e.createChatroom.id;n&&await I({variables:{chatroomId:n}}),i.Am.info((0,t.jsx)(Z.Z,{...C.Z.chatroomCreated,values:{name:r}})),_(),N(r)}catch(e){i.Am.error(e.message)}},children:(0,t.jsx)(Z.Z,{...p.Z.confirm})})})]}):(0,t.jsx)(w.Z,{})})]})}},13620:function(e,n,s){"use strict";var t=s(85893);s(67294);var r=s(44012),i=s(75136),a=s(9846),l=s(14416),c=s(59082),h=s(62094),o=s(88767);let d=(0,l.$j)(null,e=>({setTrueLoginModal:()=>e(c.Nw.loginModal.setTrue()),setTrueSignupModal:()=>e(c.Nw.signupModal.setTrue())}));n.Z=d(e=>{let{setTrueLoginModal:n,setTrueSignupModal:s}=e;return(0,t.jsx)(h.kC,{justifyContent:"center",width:1,mx:o.N[1],my:2,children:(0,t.jsx)(h.xu,{display:"inline-flex",style:{alignItems:"center"},children:(0,t.jsx)(r.Z,{...i.Z.loginOrSignup,values:{login:(0,t.jsx)(h.hb,{color:"blue.6",px:1,onClick:()=>n(),children:(0,t.jsx)(r.Z,{...a.Z.login})}),signup:(0,t.jsx)(h.hb,{color:"blue.6",px:1,onClick:()=>s(),children:(0,t.jsx)(r.Z,{...a.Z.signup})})}})})})})},88767:function(e,n,s){"use strict";s.d(n,{N:function(){return t}});let t=[[1,"3%","5%","8%"],[2,"5%","8%","12%"],[3,"6%","10%","15%"]]},49943:function(e,n,s){"use strict";s.r(n),s.d(n,{default:function(){return A}});var t=s(85893),r=s(67294),i=s(9008),a=s.n(i),l=s(41664),c=s.n(l),h=s(72132),o=s(49987),d=s(86896),u=s(44012),x=s(54490);let j=(0,x.vU)({title:{id:"channels.title",defaultMessage:"Channels"},description:{id:"channels.description",defaultMessage:"Communication square for users"},recentChats:{id:"channels.recentChats",defaultMessage:"Recent Messages"},publicChannels:{id:"channels.publicChannels",defaultMessage:"Public Channels"},emptyRecentChannelMsg:{id:"channels.emptyRecentChannelMsg",defaultMessage:"Add favorite channels to get latest updates here."}});var m=s(27261),g=s(75136),f=s(14416),Z=s(54482),C=s(16808),p=s(62094),b=s(23792),w=s(83228),v=s(85195),y=s(67926),k=s(40725),M=s(38844),_=s(41889),N=s(13620),S=s(66810),I=s(80205),R=s.n(I),T=s(37887),z=s(72314);let D=p.hb.withComponent("a"),X=e=>{let{userId:n}=e,[s,i]=(0,r.useState)(!0),[a,l]=(0,r.useState)(!1),{loading:c,error:o,data:d,fetchMore:x}=(0,T.a)(z.pN,{variables:{userId:n,limit:10,offset:0},fetchPolicy:"cache-and-network",onCompleted:e=>{e.recentChatmessages.length<10&&i(!1)}});return!c||d&&d.recentChatmessages?o?(h.Am.error(o.message),null):d&&null!==d.recentChatmessages?0==d.recentChatmessages.length?(0,t.jsx)(u.Z,{...j.emptyRecentChannelMsg}):(0,t.jsxs)(r.Fragment,{children:[d.recentChatmessages.map(e=>(0,t.jsx)(b.Z,{chatmessage:e,chatroom:e.chatroom},"chatmessage-".concat(e.id))),s&&a?(0,t.jsx)(w.Z,{}):s?(0,t.jsx)(p.zx,{borderRadius:2,width:1,onClick:()=>{l(!0),x({variables:{limit:10,offset:d.recentChatmessages.length}}).then(e=>{let{data:n}=e;n&&n.recentChatmessages.length>=10?i(!0):i(!1),l(!1)})},children:(0,t.jsx)(u.Z,{...g.Z.loadMore})}):null]}):null:(0,t.jsx)(w.Z,{})},E=()=>(0,t.jsx)("div",{children:(0,t.jsx)(v.Z,{query:z.YJ,getItemCount:e=>e.chatroomCount,renderItems:e=>e.chatrooms?(0,t.jsx)(t.Fragment,{children:e.chatrooms.map(e=>(0,t.jsxs)(p.s_,{flexDirection:"column",justifyContent:"center",children:[(0,t.jsxs)(p.kC,{children:[(0,t.jsx)(p.xu,{fontSize:2,fontWeight:"bold",children:(0,t.jsx)(c(),{href:"/channel/[name]",as:"/channel/".concat(e.name),passHref:!0,children:(0,t.jsx)(D,{p:1,children:e.name})})}),(0,t.jsx)(p.xu,{mx:2,py:1,children:"by"}),(0,t.jsx)(k.Z,{user:e.user}),(0,t.jsx)(p.xu,{ml:"auto",children:(0,t.jsx)(y.Z,{chatroomId:e.id})})]}),(0,t.jsx)("hr",{}),e.description?(0,t.jsx)(p.xu,{style:{minHeight:"3em"},mb:4,dangerouslySetInnerHTML:{__html:(0,o.nI)(e.description)}}):(0,t.jsx)(p.xu,{mb:4,children:(0,t.jsx)(u.Z,{...m.Z.noDescription})})]},e.id))}):null})});var A=()=>{let{formatMessage:e}=(0,d.Z)(),n=(0,f.v9)(e=>Z.Du(e).user.id),s=(0,f.I0)(),r=()=>s(C.Nw.chatroomCreateModal.setTrue());return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a(),{children:[(0,t.jsxs)("title",{children:[e(j.title)," | Cindy"]}),(0,t.jsx)("meta",{name:"description",content:e(j.description)})]}),(0,t.jsx)(p.X6,{children:(0,t.jsx)(u.Z,{...j.title})}),(0,t.jsxs)(p.kC,{flexWrap:"wrap",children:[(0,t.jsxs)(p.xu,{width:[1,.372,1,.372,.372],children:[(0,t.jsx)(p.X6,{fontSize:4,children:(0,t.jsx)(u.Z,{...j.recentChats})}),n?(0,t.jsx)(X,{userId:n}):(0,t.jsx)(p.kC,{children:(0,t.jsx)(N.Z,{})})]}),(0,t.jsxs)(p.xu,{width:[1,.618,1,.618,.618],children:[(0,t.jsx)(_.Z,{header:e=>(0,t.jsx)(p.X6,{style:{width:"100%"},fontSize:4,children:e}),linkChange:!0}),(0,t.jsx)(M.Z,{header:e=>(0,t.jsx)(p.X6,{style:{width:"100%"},fontSize:4,children:e}),linkChange:!0}),(0,t.jsx)(p.X6,{mb:0,mt:3,fontSize:4,children:(0,t.jsxs)(p.kC,{alignItems:"center",children:[(0,t.jsx)(u.Z,{...m.Z.createChannel}),(0,t.jsx)(p.hb,{ml:3,borderRadius:4,onClick:()=>r(),children:(0,t.jsx)(p.Ei,{src:R(),size:"xs"})})]})}),(0,t.jsx)(p.X6,{fontSize:4,children:(0,t.jsx)(u.Z,{...j.publicChannels})}),(0,t.jsx)(E,{})]})]}),(0,t.jsx)(S.Z,{})]})}},9008:function(e,n,s){e.exports=s(42636)}},function(e){e.O(0,[774,888,179],function(){return e(e.s=15985)}),_N_E=e.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.