1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3344],{3980:e=>{e.exports={"custom-form-control":"widgetSelect_custom-form-control__rC0f_","custom-form-control-hover":"widgetSelect_custom-form-control-hover__5HP8C","custom-select-label":"widgetSelect_custom-select-label__M5V_V"}},13344:(e,t,n)=>{"use strict";n.d(t,{C:()=>el});var s=n(26514),a=n(75834),o=n(93760),l=n(7086),i=n(75119),r=n.n(i),c=n(58759),d=n.n(c),m=n(29482),u=n.n(m),h=n(32491),p=n.n(h),x=n(46225),f=n(78231),E=n(83612),N=n.n(E),j=n(15269),b=n(90851),y=n(5625),R=n(24665),g=n(23141),T=n(59757),v=n(48208);let _="comment";function C(e){let{type:t="new",replyTo:n,replyToType:l,...i}=e,[r,c]=(0,a.useState)(i.text??""),[d,m]=(0,a.useState)(!1),{user:u}=(0,T.d4)(e=>{let{auth:t}=e;return{user:t.user}}),{t:h}=(0,o.B)(["social","common"]);async function p(){if(r&&r.length>1&&i.onAdding){m(!0);let e=await i.onAdding(r,n,l);m(!1),e&&c("")}}return(0,s.jsxs)("div",{children:[u&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"d-flex align-items-end justify-content-between mb-1",children:(0,s.jsxs)("span",{className:"font-size-sm text-muted",children:[h("COMMENT_AS.MESSAGE")," ",(0,s.jsxs)(v.o,{href:"/user-profile#public-profile",className:"font-size-sm",children:[!u.publicInvestorName&&(0,s.jsx)(s.Fragment,{children:"@"}),u.publicInvestorName??u.publicUsername]})]})}),(0,s.jsx)(R.A.Group,{className:"mb-3",children:(0,s.jsx)(R.A.Control,{as:"textarea",type:"text",rows:3,name:"message",disabled:d,className:"form-control-solid",placeholder:h("COMMENTS.ADD.PLACEHOLDER"),value:r,onChange:e=>{c(e.target.value)}})}),(0,s.jsxs)("div",{className:"d-flex align-items-center justify-content-end",children:[i.hasDiscard&&(0,s.jsx)("button",{type:"button",className:"btn btn-light btn-elevate font-weight-bold mr-2",disabled:d,onClick:()=>{c(""),i.onDiscardReply&&i.onDiscardReply()},children:h("BUTTON.DISCARD",{ns:"common"})}),(0,s.jsxs)("button",{type:"button",disabled:!r||d,className:"btn btn-primary font-weight-bold",onClick:p,children:[h("new"===t?"BUTTON.REPLY":"BUTTON.EDIT")," ",d&&(0,s.jsx)("span",{className:"ml-3 spinner spinner-white"})]})]})]}),!u&&(0,s.jsxs)("div",{className:"rounded-xl bg-light text-center p-10 mb-3",children:[(0,s.jsx)("h3",{children:h("SIGN_UP_TO_COMMENT.TITLE")}),(0,s.jsx)("div",{className:"font-weight-bold text-dark-50",children:h("SIGN_UP_TO_COMMENT.MESSAGE")}),(0,s.jsx)(v.o,{href:"/auth/registration",className:"mt-5 btn btn-primary btn-lg font-weight-bold",children:(0,s.jsx)(g.x,{i18nKey:"layout:TOPBAR.TRY"})})]})]})}var A=n(60890),O=n.n(A),S=n(62379),M=n(30985),D=n(96456),k=n.n(D),w=n(91283),I=n(72164),B=n(97043),L=n(89428),P=n(80338),$=n(51524),U=n(50514),G=n(39014),H=n(65002);function F(e){let{username:t,userDisplayName:n,userAvatarUrl:o}=e,[l,i]=(0,a.useState)(o),[r,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{let e=n??t;e?c(e.substring(0,1).toUpperCase()):c("")},[t,n]),(0,s.jsxs)(s.Fragment,{children:[l&&(0,s.jsx)("div",{className:"",children:(0,s.jsx)("img",{className:`${N()["user-avatar"]} ${N()["user-avatar-image"]}`,src:o,alt:n??t,onError:()=>{i(null)}})}),!l&&(0,s.jsx)("div",{className:`${N()["user-avatar"]} ${N()["user-avatar-text"]} bg-light rounded-lg d-flex align-items-center justify-content-center`,children:(0,s.jsx)("span",{className:"font-size-lg font-weight-bold",children:r})})]})}var V=n(30818);function z(e){let{asPath:t}=(0,x.useRouter)(),{t:n,i18n:{language:i}}=(0,o.B)(["social","common"]),[r,c]=(0,a.useState)(e.data),[d,m]=(0,a.useState)(!1),[u,h]=(0,a.useState)(!1),[p,f]=(0,a.useState)(e.data.lastModifiedDate),[E,b]=(0,a.useState)(!1),y=(0,a.createRef)(null),{user:R}=(0,T.d4)(e=>{let{auth:t}=e;return t}),v=R?.roles.includes("moderator"),_=r?.author?.displayName??r?.author?.username;function A(){return r.reactions?.myReaction?.socialReactionType===H.ek}async function D(t){try{let n=await l.A.put(`${V.m.BASE}/${r.id}`,{text:t});return n.data&&(r.text=n.data.text,r.lastModifiedDate=n.data.lastModifiedDate,r.isDeleted=n.data.isDeleted,r.deleteReason=n.data.deleteReason,c(r),f(r.lastModifiedDate)),e.onEdited&&e.onEdited(r,n.data),b(!1),!0}catch{return j.f1(n("EDIT_COMMENT.ERROR_MESSAGE")),!1}}async function z(){try{let t=await l.A.delete(`${V.m.BASE}/${r.id}`);return t.data?(r.text=t.data.text,r.lastModifiedDate=t.data.lastModifiedDate,r.isDeleted=t.data.isDeleted,r.deleteReason=t.data.deleteReason,c(r),f(r.lastModifiedDate),e.onEdited(r,t.data)):e.onDeleted(!0),!0}catch{return j.f1(n("DELETE_COMMENT.ERROR_MESSAGE")),!1}}return(0,s.jsxs)("div",{className:`${N().comment} ${e.highlight&&N()["comment-highlight"]} mb-2`,id:`comment-${r.id}`,children:[r.isBlockedUserContent&&!u&&(0,s.jsxs)("div",{className:"text-dark-50 font-size-normal",children:[(0,s.jsx)("i",{className:"far fa-eye-slash icon-nm mr-2"}),n("COMMENT.BLOCKED_USER_COMMENT"),(0,s.jsx)("br",{}),(0,s.jsx)("button",{onClick:e=>{e.preventDefault(),h(!0)},type:"button",className:"btn btn-link-primary",children:n("COMMENT.LINK_SHOW_BLOCKED_USER_COMMENT")})]}),(!r.isBlockedUserContent||u)&&(0,s.jsxs)(s.Fragment,{children:[!r.isDeleted&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:`${N()["comment-header"]} d-flex align-items-center`,children:[(0,s.jsx)(k(),{href:`/public/profile/${r.author?.username}`,className:"text-dark",children:(0,s.jsxs)("div",{className:"d-flex align-items-center",children:[(0,s.jsx)(F,{size:"md",userId:r.author?.id,username:r.author?.username,userDisplayName:r.author?.displayName,userAvatarUrl:r.author?.avatarUrl}),!!_&&(0,s.jsx)("div",{className:"ml-3 font-weight-bold",children:_}),r.author?.isVerified&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"pr-2"}),(0,s.jsx)(U.Nr,{})]}),(0,s.jsx)("div",{className:"px-2 text-dark-50",children:"â¢"}),(0,s.jsxs)("div",{className:"font-size-sm text-dark-50",children:[(0,S.A)(new Date(r.createdDate),new Date,{addSuffix:!1,locale:(0,w.LV)(i)}),!!p&&(0,s.jsx)(B.o,{title:n("COMMENT.EDITED_MESSAGE",{when:(0,S.A)(new Date(p),new Date,{addSuffix:!0,locale:(0,w.LV)(i)})}),children:(0,s.jsx)("span",{className:"px-2",children:(0,s.jsx)("i",{className:"fas fa-pen icon-sm"})})})]})]})}),(0,s.jsx)("div",{className:""})]}),!E&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:N()["comment-body"],children:[r.collapseContent&&(0,s.jsxs)("span",{className:"text-dark-50 font-size-normal",children:[(0,s.jsx)("i",{className:"far fa-eye-slash icon-nm mr-2"})," ",(0,s.jsx)(g.x,{i18nKey:"social:COMMENT_COLLAPSED.MESSAGE",components:[(0,s.jsx)("a",{className:"text-primary",href:void 0,onClick:()=>{r.collapseContent=!1,e.onEdited&&e.onEdited(r,{...r})}})]})]}),!r.collapseContent&&(0,s.jsx)(O(),{children:r.text})]}),(0,s.jsxs)("div",{className:`${N()["comment-footer"]} d-flex align-items-center mt-2`,children:[(0,s.jsxs)(L.F,{className:`btn ${A()?"btn-link-primary":"btn-link-secondary text-dark-50"} btn-sm font-weight-bold text-hover-primary bg-hover-light-primary`,title:n("LIKE_BTN"),onClick:()=>
1{if(r.reactions?.myReaction?.socialReactionType===H.ek){var t;t=H.ek,r?.reactions&&(r.reactions.myReaction=null,r.reactions.upvotes-=1),e.onReacted&&e.onReacted(r,{socialReactionType:t},!0)}else{var n=H.ek;let t={date:new Date,socialReactionType:n,weight:1,isMy:!0};r?.reactions&&(r.reactions.myReaction=t,r.reactions.upvotes+=1),e.onReacted&&e.onReacted(r,t,!1)}},children:[(0,s.jsx)("i",{className:`mt-n1 far fa-thumbs-up icon-nm ${A()?"text-primary":"text-dark-50"} text-hover-primary pr-0`}),r.reactions?.upvotes>0&&(0,s.jsx)("span",{className:"ml-2 font-weight-bold",children:r.reactions?.upvotes})]}),(0,s.jsx)("button",{type:"button",disabled:e.readonly,className:"ml-4 btn btn-link-secondary btn-sm font-weight-bold text-dark-50 text-hover-dark",onClick:function(){e.onReplyHit&&e.onReplyHit(r)},children:n("REPLY_BTN")}),(0,s.jsxs)(M.A,{children:[(0,s.jsx)(M.A.Toggle,{variant:"link-secondary",className:"ml-4 exclude-dropdown-toggle btn btn-link-secondary btn-sm font-weight-bold text-dark-50 text-hover-dark",children:(0,s.jsx)("i",{className:"flaticon-more-v2 icon-nm text-dark-50 text-hover-dark"})}),(0,s.jsxs)(M.A.Menu,{children:[(0,s.jsxs)(M.A.Item,{as:"button",className:"",onClick:()=>{(0,P.C)((0,$.$8)(r.id,t),n("LINK_COPIED",{ns:"common"}))},children:[(0,s.jsx)("i",{className:"fas fa-link icon-nm text-body dd-icon"})," ",n("BUTTON.SHARE",{ns:"common"})]}),r.isMy&&(0,s.jsxs)(M.A.Item,{as:"button",className:"",onClick:()=>{b(!0)},children:[(0,s.jsx)("i",{className:"fas fa-pen icon-nm text-body dd-icon"}),n("BUTTON.EDIT",{ns:"common"})]}),r.isMy&&(0,s.jsxs)(M.A.Item,{as:"button",className:"btn-danger",onClick:()=>{y&&y.current&&y.current.open(n("COMMENT.DELETE.TITLE"),n("COMMENT.DELETE.MESSAGE"))},children:[(0,s.jsx)("i",{className:"far fa-trash-alt icon-nm text-body dd-icon"})," ",n("BUTTON.DELETE",{ns:"common"})]}),!r.isMy&&R&&(0,s.jsxs)(M.A.Item,{as:"button",className:"",onClick:function(){e.onReport&&e.onReport(r)},children:[(0,s.jsx)("i",{className:"far fa-flag icon-nm text-body dd-icon"})," ",n("REPORT_BTN")]}),!r.isMy&&v&&(0,s.jsxs)(M.A.Item,{as:"button",className:"btn-danger text-danger",onClick:()=>{m(!0)},children:[(0,s.jsx)("i",{className:"far fa-trash-alt icon-nm text-danger dd-icon"})," ",n("REMOVE_COMMENT_BTN",{ns:"social"})]})]})]})]})]}),E&&(0,s.jsx)(C,{type:"edit",text:r.text,hasDiscard:!0,onAdding:D,onDiscardReply:()=>{b(!1)}})]}),r.isDeleted&&(0,s.jsxs)("div",{className:"text-dark-50 mb-0",children:[(0,s.jsx)("i",{className:"fas fa-ban icon-nm mr-2"}),parseInt(r.deleteReason)===H.M_&&(0,s.jsx)("span",{children:n("COMMENT.DELETED_BY_AUTHOR")}),[H.fX,H.SP].includes(parseInt(r.deleteReason))&&(0,s.jsx)("span",{children:n("COMMENT.DELETED_BY_MODERATOR")})]})]}),(0,s.jsx)(I.u,{t:n,onConfirm:z,confirmButtonClass:"btn-danger",ref:y}),d&&(0,s.jsx)(G.z,{comment:r,onClose:e=>{m(!1),e&&(r.text=e.text,r.lastModifiedDate=e.lastModifiedDate,r.isDeleted=e.isDeleted,r.deleteReason=e.deleteReason,c(r),f(r.lastModifiedDate))}})]})}function Y(e){let{activeReplyTo:t,...n}=e,{t:l}=(0,o.B)(["social","common"]),[i,r]=(0,a.useState)(n.comments),[c,d]=(0,a.useState)(n.goToComment);function m(e,t){if(e===n.parentId)return void n.onCollapsed(e,t);let s=p()(i,t=>t.id===e);s&&(s.expanded=!1),t&&n.onCollapsed(e,t)}return(0,a.useEffect)(()=>{d(n.goToComment)},[n.goToComment]),(0,a.useEffect)(()=>{r(n.comments)},[n.comments]),(0,s.jsx)("div",{className:`${N()["comment-tree"]} ${n.parentId&&N()["comment-tree-inner"]}`,children:(0,s.jsxs)("div",{className:"d-flex",children:[n.parentId&&(0,s.jsx)("div",{className:N()["comment-collapse-branch"],onClick:()=>{m(n.parentId,!0)}}),(0,s.jsxs)("div",{className:"w-100",children:[i.map(e=>(0,s.jsxs)("div",{className:!n.parentId&&N()["comment-block-root"],children:[(0,s.jsx)(z,{data:e,isReadonly:n.isReadonly,onAdding:n.onAdding,onReplyHit:n.onReplyHit,onReacted:n.onReacted,highlight:c&&c===e.id,onEdited:n.onEdited,onDeleted:n.onDeleted,onReport:n.onReport}),null!=t&&t.id===e.id&&(0,s.jsx)("div",{className:`${N()["comment-reply-to"]} ${e.expanded&&e.counters?.comments>0?N()["comment-reply-to-prolong"]:""}`,children:(0,s.jsx)(C,{replyTo:t.id,replyToType:_,hasDiscard:!0,onAdding:n.onAdding,onDiscardReply:n.onDiscardReply})}),e.expanded&&e.counters?.comments>0&&(0,s.jsx)(Y,{isReadonly:n.isReadonly,onAdding:n.onAdding,comments:e.replys,activeReplyTo:t,onReplyHit:n.onReplyHit,onDiscardReply:n.onDiscardReply,parentId:e.id,goToComment:c,onReacted:n.onReacted,onEdited:n.onEdited,onDeleted:n.onDeleted,onCollapsed:m,onReport:n.onReport}),!e.expanded&&e.counters?.comments>0&&(0,s.jsx)("div",{className:`mb-3 ml-3 ${N()["expand-replys-block"]}`,children:(0,s.jsxs)("button",{type:"button",className:"btn btn-link-secondary text-dark-50 text-hover-dark font-weight-bold",onClick:()=>{!function e(t,s){if(t.expanded=!0,t.counters?.comments>0)for(let n of t.replys)e(n,!1);s&&n.onExpanded&&(r(i),n.onExpanded(t))}(e,!0)},children:[(0,s.jsx)("i",{className:"icon-nm fas fa-angle-right text-dark-50 text-hover-dark"})," ",l("NO_OF_COMMENTS",{count:e.counters?.comments})]})})]},e.id)),n.hasMore>0&&(0,s.jsx)("div",{className:"my-3 ml-3",children:(0,s.jsxs)("button",{type:"button",className:"btn btn-light text-dark font-weight-bold btn-md w-100",onClick:n.onLoadMore,children:["+ ",l("NO_OF_COMMENTS",{count:n.hasMore}),"..."]})})]})]})})}var W=n(2782);function K(){return(0,s.jsxs)("div",{className:"w-100 mb-10",children:[(0,s.jsxs)("div",{className:"row align-items-center mb-3",children:[(0,s.jsx)("div",{className:"col-auto",children:(0,s.jsx)(W.A,{className:"rounded",variant:"rectangular",animation:"wave",width:35,height:35})}),(0,s.jsx)("div",{className:"col",children:(0,s.jsx)(W.A,{className:"rounded-lg",variant:"rectangular",animation:"wave",height:18})})]}),(0,s.jsx)("div",{className:"row align-items-center mb-3",children:(0,s.jsx)("div",{className:"col",children:(0,s.jsx)(W.A,{className:"rounded-lg",variant:"rectangular",animation:"wave",height:70})})})]})}function Q(){return(0,s.jsxs)("div",{className:"py-10",children:[(0,s.jsx)(K,{}),(0,s.jsx)(K,{})]})}var q=n(74170),X=n(64137),Z=n(46815),J=n(80824),ee=n(36241),et=n(152),en=n(10164),es=n(76510);class ea extends a.Component{constructor(e){super(e),this.open=(e,t)=>{this.setState({show:!0,entity:e,comment:t??null,reason:""})},this.close=e=>{this.setState({show:!1,entity:null,comment:null,reason:""}),this.props.onHide&&this.props.onHide(e)},this.report=async()=>{this.setState({blocking:!0});try{let e=`${V.Y.BASE}/report`;await l.A.post(e,{},{params:{id:this.state.entity.id,commentId:this.state.comment?.id,reason:this.state.reason}}),j.uT(this.props.t("REPORTED.SUCCESS_MESSAGE")),this.props.onReported&&this.props.onReported(),this.close(!0)}catch(t){let e=(0,ee.g6)(`${this.props.t("ERROR.COULD_NOT_SAVE_CHANGES",{ns:"common"})}: 2`,t);j.f1(e)}this.setState({blocking:!1})},this.state={comment:null,entity:null,reason:""}}componentWillReceiveProps(){}render(){return(0,s.jsxs)(q.A,{show:this.state.show,onHide:this.close,"aria-labelledby":"example-modal-sizes-title-lg",children:[this.state.blocking&&(0,s.jsx)(et.q3,{}),(0,s.jsx)(q.A.Header,{closeButton:!0,children:(0,s.jsx)(q.A.Title,{id:"example-modal-sizes-title-lg",children:this.props.t("SOCIAL.REPORT.TITLE")})}),(0,s.jsxs)(es.A,{tag:"div",blocking:this.state.blocking,keepInView:!0,children:[(0,s.jsxs)(q.A.Body,{children:[(0,s.jsxs)(R.A.Group,{children:[(0,s.jsxs)(R.A.Label,{className:"",children:["\uD83D\uDC4D ",this.props.t("REPORT.ENCOURAGING_MESSAGE")]}),(0,s.jsx)(J.A,{className:"sb-select col form-control",variant:"filled",children:(0,s.jsx)(en.Q,{nullable:!0,value:this.state.reason,placeholder:this.props.t("SOCIAL.REPORT.REASON_LABEL"),onChange:e=>{let{value:t}=e.target;this.setState({reason:t})},input:(0,s.jsx)(Z.A,{name:"reportReason",id:"filled-type-simple-2"}),items:[{value:H.yu,name:this.props.t("REPORT_REASON.RUDE")},{value:H.j4,name:this.props.t("REPORT_REASON.SPAM")},{value:H.Y7,name:this.props.t("REPORT_REASON.OTHER")}]})})]}),this.state.reason&&this.state.reason!=H.Y7&&(0,s.jsxs)("div",{className:"font-size-sm alert alert-light alert-custom px-3 py-2",children:["â¹ï¸"," ",this.state.reason==H.yu&&this.props.t("REPORT_REASON.RUDE.DESCRIPTION"),this.state.reason==H.j4&&this.props.t("REPORT_REASON.SPAM.DESCRIPTION")]})]}),(0,s.jsxs)(q.A.Footer,{children:[(0,s.jsx)("button",{type:"button",onClick:this.close,className:"btn btn-light btn-elevate font-weight-bold",children:this.props.t("BUTTON.DISCARD",{ns:"common"})}),(0,s.jsx)("button",{type:"button",disabled:!this.state.reason,onClick:this.report,className:"btn btn-primary btn-elevate font-weight-bold",children:this.props.t("BUTTON.REPORT")})]})]})]})}}let eo=(0,X.C)(["social","common"],{withRef:!0})(ea);function el(e){let{id:t,isReadonly:n,...i}=e,c=i.fullWidth??!1,m=(0,x.useRouter)(),{t:h}=(0,o.B)(["social","common"]),[E,R]=(0,a.useState)([]),[g,T]=(0,a.useState)([]),[v,A]=(0,a.useState)(H.r9),[O,S]=(0,a.useState)(null),[M,D]=(0,a.useState)(i.count??0),[k,w]=(0,a.useState)([]),[I,B]=(0,a.useState)(null),[L,P]=(0,a.useState)(0),[$,U]=(0,a.useState)(10),[G,F]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=m.asPath.split("#");if(2===e.length&&e[1].startsWith("comment-")){let t=e[1].replace("comment-","");t&&B(t)}else 2===e.length&&"comments"===e[1]&&i.goToComments&&setTimeout(()=>{i.goToComments()},1500)},[m.asPath]);let z=(0,a.createRef)(null),W=(0,a.useCallback)(async()=>{F(!0);let e=function e(t,n){for(let s of t)s.expanded&&(n.push(s.id),s.replys&&s.replys.length>0&&e(s.replys,n));return n}(g,[]);try{let{data:n}=await l.A.get(V.m.GET_LIST,{params:{id:t,sortBy:v}});n?(!function e(t,n){for(let s of t)n&&n.indexOf(s.id)>=0&&(s.expanded=!0,s.replys&&s.replys.length>0&&e(s.replys,n))}(n.list,e),R(n.flatList),T(n.list),D(n.flatList.length)):(R([]),T([]),D(0)),F(!1)}catch{F(!1)}i?.onDataLoaded&&i?.onDataLoaded()},[v,t]);async function K(){await W()}async function q(e,n,s){try{if(B(null),!e)return;let{data:a}=await l.A.post(V.m.BASE,{text:e,socialId:t,parentCommentId:s===_?n:null});return a.id&&B(a.id),S(null),await W(),!0}catch{return j.f1(h("ADD_COMMENT.ERROR_MESSAGE")),!1}}function X(e,t){if(I){let n=p()(E,e=>e.id===I),s=null;if(n){if(n.parentTree&&n.parentTree.length>0){let[t]=n.parentTree;s=p()(e,e=>e.id===t)}let a=g.indexOf(s??n);a>t&&(t=a+1),s&&function e(t,n){if(t.expanded=!0,n!==t.id&&t.replys?.length>0)for(let n of t.replys)e(n)}(s,n.parentCommentId)}}if(t&&t>0){let n=r()(e,t),s=e.length>t?e.length-t:0;if(w(n),s>0){let t=d()(e,s);P(u()(t,e=>e.commentsCount??0)+s)}else P(s)}else w(e),P(0)}async function Z(e,n,s){try{let a={id:t,commentId:e.id,type:n?.socialReactionType},{data:o}=await l.A.post(!s?V.Y.REACT:V.Y.UNREACT,{},{params:a});return o?.reactions&&(e.reactions.upvotes=o.upvotes,e.reactions.totalCount=o.totalCount,e.reactions.myReaction=o.myReaction),T([...g]),!0}catch{return j.f1(h("REACT.ERROR_MESSAGE")),!1}}return(0,a.useEffect)(()=>{W()},[W]),(0,a.useEffect)(()=>{X(g,$)},[g,E,$]),(0,a.useEffect)(()=>{setTimeout(()=>{I&&function(e){if(window&&document&&e){let t=`comment-${e}`,n=document.getElementById(t);if(n){let e=n.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:e-100,behavior:"smooth"})}}}(I)},300),setTimeout(()=>{I&&B(null)},3e3)},[k]),(0,s.jsx)(f.Q,{persistor:y.qj,children:(0,s.jsxs)("div",{id:`comments-section-${t}`,className:N()["comments-section"],children:[(0,s.jsx)("div",{className:"card card-custom gutter-b",children:(0,s.jsx)("div",{className:"card-body",children:(0,s.jsx)("div",{className:"row justify-content-center",children:(0,s.jsxs)("div",{className:c?"col-12":"col-xl-8 col-lg-8 col-md-10 col-sm-12",children:[(0,s.jsxs)("div",{className:"d-flex align-items-center justify-content-between mb-4",children:[(0,s.jsxs)("h3",{children:[h(M>0?"NO_OF_COMMENTS":"COMMENTS.HEADER",{count:M}),(0,s.jsx)("button",{type:"button",onClick:K,title:h("BUTTON.RELOAD",{ns:"common"}),className:"ml-3 mt-n1 btn btn-sm btn-link-secondary text-dark-50 font-weight-bold",children:(0,s.jsx)("i",{className:"fas fa-sync text-dark-50 icon-sm"})})]}
2),(0,s.jsx)("div",{children:(0,s.jsx)(b.l,{value:v,onChange:e=>{A(e)},options:[{value:H.r9,name:h("COMMENT.SORTBY.TOP")},{value:H.wn,name:h("COMMENT.SORTBY.NEW")}]})})]}),!n&&(0,s.jsx)(C,{replyTo:t,replyToType:"post",hasDiscard:!1,onAdding:q}),n&&(0,s.jsx)("div",{children:"Sorry"}),M>0&&(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)(Y,{comments:k,hasMore:L,onAdding:q,isReadonly:n,onReplyHit:e=>{S(e)},onDiscardReply:()=>{S(null)},onExpanded:function(){R([...E]),T([...g])},onCollapsed:function(){R([...E]),T([...g])},onLoadMore:function(){U(0),X(g,0)},activeReplyTo:O,goToComment:I,onReacted:Z,onEdited:function(){R([...E]),T([...g])},onDeleted:function(e){e&&W()},onReport:function(e){z&&z.current&&z.current.open({id:t},e)}})}),G&&(0,s.jsx)(Q,{})]})})})}),(0,s.jsx)(eo,{ref:z})]})})}},39014:(e,t,n)=>{"use strict";n.d(t,{z:()=>x});var s=n(26514),a=n(75834),o=n(74170),l=n(24665),i=n(14009),r=n(93760),c=n(80824),d=n(7086),m=n(10164),u=n(15269),h=n(65002),p=n(58662);function x(e){let{comment:t,onClose:n}=e,{t:x}=(0,r.B)(["social"]),[f,E]=(0,a.useState)(null),[N,j]=(0,a.useState)(!1),b=t?.username,y=t?.id,R=async()=>{j(!0);try{let e=await d.A.delete(`${p.p5}/${y}`,{params:{reason:f}});e.data?(u.uT("Comment removed successfully!"),n(e.data)):n()}catch(e){u.f1("Failed to remove comment user:",e.data),console.error("Remove error:",e)}finally{j(!1)}};return(0,s.jsxs)(o.A,{show:!0,onHide:n,backdrop:"static",centered:!0,children:[(0,s.jsx)(o.A.Header,{closeButton:!0,children:(0,s.jsx)(o.A.Title,{children:x("REMOVE_COMMENT.TITLE")})}),(0,s.jsxs)(o.A.Body,{children:[(0,s.jsx)("p",{children:x("REMOVE_COMMENT.REASON_MESSAGE",{username:b})}),(0,s.jsxs)(l.A.Group,{children:[(0,s.jsxs)(l.A.Label,{children:[x("REMOVE_COMMENT.REASON")," ",(0,s.jsx)("span",{className:"text-danger",children:"*"})]}),(0,s.jsx)(c.A,{className:"sb-select col form-control",children:(0,s.jsx)(m.Q,{value:f,placeholder:x("REMOVE_COMMENT.PLACEHOLDER"),onChange:e=>E(e.target.value),items:[{value:h.yu,name:x("REPORT_REASON.RUDE")},{value:h.j4,name:x("REPORT_REASON.SPAM")}]})})]})]}),(0,s.jsx)(o.A.Footer,{children:(0,s.jsx)(i.A,{variant:"danger",onClick:R,disabled:N||!f,children:x("REMOVE_COMMENT.BTN")})})]})}},58662:(e,t,n)=>{"use strict";n.d(t,{FN:()=>a,aA:()=>s,p5:()=>i,pL:()=>o,zt:()=>l});let s="/api/moderation/get-user-preferences",a="/api/moderation/get-comments",o="/api/moderation/ban-user",l="/api/moderation/approve-comment",i="/api/moderation"},65002:(e,t,n)=>{"use strict";n.d(t,{$5:()=>a,M_:()=>r,SP:()=>l,Y7:()=>m,ek:()=>o,fX:()=>i,j4:()=>d,j9:()=>s,r9:()=>u,wn:()=>h,yu:()=>c});let s=1,a=2,o=1,l=1,i=2,r=3,c=1,d=2,m=3,u="top",h="new"},83612:e=>{e.exports={"comments-section":"comments_comments-section__ELD_m","comment-tree":"comments_comment-tree__0Hzaj","comment-tree-inner":"comments_comment-tree-inner__Odb6c","comment-collapse-branch":"comments_comment-collapse-branch__OZr2B","comment-reply-to":"comments_comment-reply-to__5WlBQ","comment-reply-to-prolong":"comments_comment-reply-to-prolong__DN3Re","comment-block-root":"comments_comment-block-root__mZU5E","expand-replys-block":"comments_expand-replys-block__g95a2",comment:"comments_comment__duR8s","comment-highlight":"comments_comment-highlight__iyfDw","comment-header":"comments_comment-header__QaSt1","user-avatar":"comments_user-avatar__wQWeG","comment-body":"comments_comment-body__iM2u_"}},89428:(e,t,n)=>{"use strict";n.d(t,{F:()=>l});var s=n(26514);n(75834),n(46225);var a=n(59757),o=n(16926);function l(e){let{onClick:t,children:n,...l}=e,{user:i}=(0,a.d4)(e=>{let{auth:t}=e;return{user:t.user}}),r=(0,a.wA)();return(0,s.jsx)("button",{...l,type:"button",onClick:e=>{if(!i)return void r((0,o.Fb)(!0));t(e)},children:n})}},90851:(e,t,n)=>{"use strict";n.d(t,{l:()=>p});var s=n(26514),a=n(75834),o=n(96731),l=n(40030),i=n(32491),r=n.n(i),c=n(80824),d=n(31557),m=n(3980),u=n.n(m),h=n(83094);function p(e){let[t,n]=(0,a.useState)(!1),i=(0,a.useRef)(null),m=e.name??"divCompanyGroupBy",p=!0===e.disabled,x=e.nullValue??"",f=()=>{let e=i.current?.querySelector('[role="combobox"]');e&&e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0}))};return(0,s.jsxs)(c.A,{variant:"outlined",fullWidth:!0,className:e.label?`${u()["custom-form-control"]} ${t?u()["custom-form-control-hover"]:""}`:"",children:[e.label&&(0,s.jsx)(d.A,{className:`text-muted ${u()["custom-select-label"]}`,children:e.label}),(0,s.jsx)("div",{ref:i,children:(0,s.jsxs)(l.A,{placeholder:x,disabled:p,style:{maxWidth:"250px",minWidth:"80px"},displayEmpty:!0,renderValue:t=>{let n=null;return(n=r()(e.options,e=>e.value==t))?n.name:x},IconComponent:()=>(0,s.jsx)("div",{style:{cursor:"pointer"},onClick:f,children:(0,s.jsx)("i",{className:"fas fa-angle-down icon-nm mt-1"})}),onChange:function(t){e.onChange(t.target.value)},value:e.value,input:(0,s.jsx)(h.R,{name:m}),onOpen:()=>n(!0),onClose:()=>n(!1),children:[x&&(0,s.jsx)(o.A,{value:"",className:"text-muted",children:x}),e.options.map(t=>(0,s.jsx)(o.A,{value:t.value,children:e.selectTemplate?e.selectTemplate(t):t.name},`group_${t.value}`))]})})]})}}}]);
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.