"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8270],{6985:(e,t,o)=>{o.d(t,{A:()=>l});var i=o(24643),n=o(40099),r=o(84987);const a={id:"heart-fill-52d919d9",use:"heart-fill-52d919d9-usage",viewBox:"0 0 24 24",content:''};function l(e){const t=(0,n.useContext)(r.X);return(0,n.useLayoutEffect)((()=>(t.add(a),()=>{t.remove("heart-fill-52d919d9")})),[]),(0,i.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,i.jsx)("use",{xlinkHref:"#heart-fill-52d919d9"},void 0)}),void 0)}},8270:(e,t,o)=>{o.d(t,{QM:()=>$t});var i=o(24643),n=o(40099),r=o(47172),a=o(64747),l=o(25616),d=o(43626),s=o(46682),c=o(41271),m=o(4474),u=o(82715),p=o(93608),h=o(49057),g=o(24728),x=o(34131),f=o(50970),b=o(71281),v=o(88920),y=o(43271),C=o(43223),k=o(67518),_=o(37694),w=o(11983),j=o(58305),T=o(53764),I=o(60342),D=o(97706),S=o(95481),P=o(82512),L=o(62186),z=o(60751),M=o(72153);const B=(0,L.default)("div",{target:"esns4rh0"})([({theme:{direction:e}})=>[(0,M.mp)({direction:e,marginStart:"18px",paddingEnd:"2px"}),{width:"24px",flex:"0 0 24px",display:"flex",flexDirection:"column",alignItems:"center",paddingTop:"24px"}]],"label:DivActionContainer;"),R=(0,L.default)("div",{target:"esns4rh1"})({position:"relative",display:"none"},"label:DivMoreContainer;"),F=(0,L.default)(z.A,{target:"esns4rh2"})({width:"24px",height:"24px",cursor:"pointer",display:"block"},"label:StyledMoreIcon;");F.defaultProps=Object.assign(Object.assign({},F.defaultProps),{"data-e2e":"comment-more-icon"});const O=(0,L.default)("div",{target:"esns4rh3"})((({theme:e})=>(0,M.zy)({theme:e,typography:"P2",fontWeight:"bold",fontFamily:"TikTokFont"})),{padding:"8px 16px",minWidth:"200px"},"label:DivPopupContainer;"),A=(0,L.default)("p",{target:"esns4rh4"})((({theme:{colors:e}})=>({display:"flex",alignItems:"center",padding:"12px 0",whiteSpace:"nowrap",cursor:"pointer","&:not(:last-of-type)":{borderBottom:`1px solid ${e.LineSecondary}`},":hover":{color:e.Primary}})),"label:PActionItem;"),E=(0,L.default)("span",{target:"esns4rh5"})((({theme:{direction:e}})=>(0,M.mp)({direction:e,marginStart:"12px"})),"label:SpanActionText;"),U=(0,L.default)("div",{target:"esns4rh6"})((({theme:e})=>(0,M.zy)({theme:e,typography:"H4",fontFamily:"TikTokDisplayFont",fontWeight:"bold"})),{padding:"28px 24px",textAlign:"center"},"label:DivModalContentContainer;"),W=(0,L.default)("div",{target:"esns4rh7"})({display:"flex",flexDirection:"column"},"label:DivButtonContainer;"),$=(0,L.default)("button",{target:"esns4rh8"})(M.WA,(({primary:e,theme:t})=>[(0,M.zy)({theme:t,typography:"H6",color:e?"TextPrimary":"TextTertiary",fontWeight:e?"semiBold":"normal"}),{height:"48px",lineHeight:"48px",cursor:"pointer","::before":{content:'""',width:"100%",height:"1px",display:"block",background:t.colors.LineSecondary,transform:"scaleY(0,5)"}}]),"label:ButtonAction;"),H=(0,L.default)("div",{target:"e1qi8jyk0"})((({theme:{direction:e}})=>[(0,M.mp)({direction:e,marginStart:"8px"}),{width:"24px",flex:"0 0 24px",display:"flex",flexDirection:"column",alignItems:"center",marginLift:"auto"}]),"label:DivActionContainer;"),K=(0,L.default)("div",{target:"e1qi8jyk1"})({width:"310px"},"label:DivModalContainer;"),q=function({wordId:e="",id:t="",word:o=""}){var r;const a=(0,l.s)(),d=(0,T.M)(),{direction:c}=(0,k.u)(),{active:m,handleMouseEnter:u,handleMouseLeave:p}=(0,I.K)(),[,g]=(0,s.S)(P.Zr),{user:x}=null!==(r=(0,h.W)((()=>["user"]),[]))&&void 0!==r?r:{},f=(0,n.useCallback)((e=>{13===e.keyCode||32===e.keyCode?((0,j.Gu)(e),m?p():u()):27===e.keyCode&&m&&((0,j.Gu)(e),p())}),[u,p,m]),b=(0,n.useCallback)((e=>t=>{13!==t.keyCode&&32!==t.keyCode||((0,j.Gu)(t),e(t))}),[]),{handleShowReport:v,handleClickReport:y}=(0,C.DL)(),L="ltr"===c?"bottomRight":"bottomLeft",{colors:z}=(0,k.u)(),[M,B]=(0,n.useState)(!1),q=(0,n.useCallback)((()=>{v({id:t,word:o,wordId:e}),B(!0)}),[v,t,o,e]),N=(0,n.useCallback)((i=>{y({id:t,word:o,wordId:e,detail:i}),"cancel"!==i&&(g.setBlockListByUid({blockId:e,uid:null==x?void 0:x.uid,blockType:"wordIdList"}),w.F.open({content:a("Thank you for your feedback"),duration:3})),B(!1)}),[g,y,t,a,x,o,e]),G=(0,n.useMemo)((()=>[{key:"Not interested",i18nKey:"searchquerycomment_feedbackpanel_notinterested"},{key:"Unrelated content",i18nKey:"searchquerycomment_feedbackpanel_unrelated"},{key:"Inappropriate content",i18nKey:"searchquerycomment_feedbackpanel_inappropriate"},{key:"others",i18nKey:"searchquerycomment_feedbackpanel_others"},{key:"cancel",i18nKey:"comment_delete_cancel"}].map((e=>Object.assign(Object.assign({},e),{onClick:()=>N(e.key)})))),[N]);return(0,i.jsxs)(H,{children:[(0,i.jsxs)(R,{"aria-label":a("pc_web_more_btn"),role:"button",onMouseEnter:u,onMouseLeave:p,tabIndex:0,onKeyDown:f,children:[(0,i.jsx)(F,{}),(0,i.jsx)(D.z,{backgroundColor:z.BGSecondary,active:m,placement:L,margin:-6,children:(0,i.jsx)(O,{children:(0,i.jsxs)(A,{"aria-label":a("Report"),role:"button",onClick:q,tabIndex:0,onKeyDown:b(q),"data-e2e":"comment-top-report",children:[(0,i.jsx)(_.A,{width:24,height:24}),(0,i.jsx)(E,{children:a("Report")})]})})})]}),(0,i.jsx)(S.aF,{visible:M,parentRef:d,children:(0,i.jsxs)(K,{children:[(0,i.jsx)(U,{children:a("searchquerycomment_feedbackpanel_header")}),(0,i.jsx)(W,{children:G.map((({i18nKey:e,key:t,onClick:o})=>(0,i.jsx)($,{primary:"cancel"!==t,onClick:o,children:a(e)},t)))})]})})]})};var N=o(27426),G=o(99764);const V=(0,L.default)("div",{target:"eej7vwn0"})((({theme:e})=>(0,M.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"semiBold"})),{width:"100%",height:"64px",display:"flex",padding:"20px 42px 20px 32px",alignItems:"center",flexShrink:0,boxSizing:"border-box",lineHeight:"20px",position:"relative",fontSize:"16px"},(({onlyOptimizeCta:e})=>e&&{paddingRight:"34px"}),{":hover,:focus-within":{[`${R}`]:{display:"block"}}},(({allowRightPanelScroll:e})=>e&&{marginBottom:`-${G.p}px`,paddingLeft:0,paddingRight:0}),"label:DivCommentTop;"),X=(0,L.default)("span",{target:"eej7vwn1"})((({theme:{colors:e}})=>({color:e.TextTertiaryAlt})),"label:SpanHint;"),Y=(0,L.default)("span",{target:"eej7vwn2"})({cursor:"pointer",display:"flex",overflow:"hidden",flex:1},"label:SpanWordContainer;"),Q=(0,L.default)("span",{target:"eej7vwn3"})((({theme:{colors:e}})=>({color:e.AssistColorAzure,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),"label:SpanWord;"),Z=(0,L.default)(N.A,{target:"eej7vwn4"})((({theme:{colors:e}})=>({width:"10px",height:"10px",flexShrink:0,color:e.AssistColorAzure})),"label:StyledMagnifyingGlass;"),J=(0,n.memo)((function({id:e,onClose:t}){var o;const{isBrowserModeShowing:a}=(0,n.useContext)(d.g),{abTestVersion:l}=null!==(o=(0,h.W)((()=>["abTestVersion"]),[]))&&void 0!==o?o:{},k="v2"===(0,b.qt)(l,"search_entry_comment_top"),{wordList:_,hintText:w,logId:j}=(0,g.iA)(e,"comment_top"),{word:T,word_id:I}=(0,n.useMemo)((()=>{var e;return null!==(e=_[0])&&void 0!==e?e:{}}),[_]),D=(0,r.useLocation)(),{allowRightPanelScroll:S,onlyOptimizeCta:P}=(0,v.kb)(),L=(0,r.useHistory)(),{isOpenNewTab:z}=(0,v.M4)(),{handleShowReport:M,handleClickReport:B}=(0,C.sk)(),[{rootEnterFrom:R}]=(0,s.S)(y.tq,{selector:e=>({rootEnterFrom:e.searchGlobalParams.rootEnterFrom}),dependencies:[]}),F=(0,n.useCallback)((o=>{B({word:T,id:e,wordId:I,logId:j,searchPosition:a?"video_detail":p.f.commonParams.page_name,enterFrom:R});const i=Date.now(),n=(0,x.F)({location:D,to:{pathname:u.$T.searchHome(),search:{q:T,t:i}}}),r={searchSource:"comment_related_search",enterMethod:"click_icon",videoPageType:"browser_mode"};z?window.open((0,m.stringifyUrl)({url:n,query:r})):(null==t||t(o,!0),L.push(n,r))}),[B,t,L,e,a,z,D,j,T,I,R]),O=(0,c.P)(f.L,{selector:e=>{var t,o;return null===(o=null===(t=e.appContext)||void 0===t?void 0:t.user)||void 0===o?void 0:o.uniqueId},dependencies:[]}),A=Boolean(O),E=Boolean(T&&w&&k);return(0,n.useEffect)((()=>{E&&M({word:T,id:e,wordId:I,logId:j,searchPosition:a?"video_detail":p.f.commonParams.page_name,enterFrom:R})}),[M,E,e,j,T,I,a,R]),E?(0,i.jsxs)(V,{"data-e2e":"search-comment-top",allowRightPanelScroll:S,onlyOptimizeCta:P,children:[(0,i.jsx)(X,{children:w})," ",(0,i.jsxs)(Y,{onClick:F,children:[(0,i.jsx)(Q,{"data-e2e":"search-comment-top-word",children:T}),(0,i.jsx)(Z,{})]}),A&&(0,i.jsx)(q,{word:T,wordId:I,id:e})]}):null}));var ee=o(84827),te=o(48868),oe=o(32125),ie=o(22248),ne=o(82858),re=o(84323),ae=o(2584),le=o(5412),de=o(50289),se=o(92846),ce=o(84908),me=o(60072),ue=o(87652),pe=o(17566),he=o(97164),ge=o(46803),xe=o(60484),fe=o(10646),be=o(34012),ve=o(96689),ye=o(44061),Ce=o(46251),ke=o(5227),_e=o(80074),we=o(6985);const je=(0,L.default)("div",{target:"ezxoskx0"})((({theme:e})=>(0,M.zy)({theme:e,typography:"P4",color:"TextTertiary"})),{width:"20px",display:"flex",flexDirection:"column",alignItems:"center",cursor:"pointer"},"label:DivLikeWrapper;"),Te=(0,L.default)(je,{target:"ezxoskx1"})((({theme:e})=>(0,M.mp)({direction:e.direction,marginStart:"24px"})),{width:"unset",height:"20px",display:"inline-flex",flexDirection:"row",alignItems:"center",cursor:"pointer",verticalAlign:"bottom"},"label:StyledLikeWrapper;"),Ie=(0,L.default)("div",{target:"ezxoskx2"})({height:"20px"},"label:DivLikeIcon;"),De=(0,L.default)("span",{target:"ezxoskx3"})((({theme:e})=>(0,M.zy)({theme:e,typography:"P2"})),(({theme:e})=>(0,M.mp)({direction:e.direction,marginStart:"4px"})),{height:"24px",display:"flex",alignItems:"center"},"label:SpanCount;");De.defaultProps=Object.assign(Object.assign({},De.defaultProps),{"data-e2e":"comment-like-count"});const Se=(0,n.memo)((function(e){const{count:t,liked:o,onClick:r}=e,{colors:a}=(0,k.u)(),d=(0,l.s)(),s=(0,ne.Eo)(),c=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||(e.stopPropagation(),e.preventDefault(),r())}),[r]),m=o?(0,i.jsx)(we.A,{width:20,height:20,fill:a.Primary}):(0,i.jsx)(_e.A,{width:20,height:20});return(0,i.jsxs)(je,{"aria-label":d("accessibilityLabels_forYou_btn_like",{number:s?"":(0,xe.D1)(t)}),"aria-pressed":o,role:"button",onClick:r,tabIndex:0,onKeyDown:c,children:[(0,i.jsx)(Ie,{"data-e2e":"comment-like-icon",children:m}),(0,i.jsx)(De,{style:{marginLeft:0,marginRight:0},children:s?"":(0,xe.D1)(t)})]})})),Pe=(0,n.memo)((function(e){const{count:t,liked:o,isUIOptimization:n}=e,{colors:r}=(0,k.u)(),a=(0,ne.Eo)(),l=o?(0,i.jsx)(we.A,{width:20,height:20,fill:r.Primary}):(0,i.jsx)(_e.A,{width:20,height:20});return(0,i.jsxs)(Te,{onClick:e.onClick,children:[l,(0,i.jsx)(De,{style:{color:n?r.TextTertiaryAlt:r.TextPrimary,fontSize:"14px"},children:a?"":(0,xe.D1)(t)})]})})),Le=function(e){const{itemId:t,cid:o,count:r,liked:a,onDelete:d,isShowReport:s,isShowDelete:c,inDetailPage:m=!1}=e,u=(0,l.s)(),{direction:p}=(0,k.u)(),{active:h,handleMouseEnter:g,handleMouseLeave:x}=(0,I.K)(),f=(0,C.dp)({itemId:t,cid:o,onShow:j.Gu}),b=(0,n.useCallback)((e=>{13===e.keyCode||32===e.keyCode?(e.stopPropagation(),e.preventDefault(),h?x():g()):27===e.keyCode&&h&&(e.stopPropagation(),e.preventDefault(),x())}),[g,x,h]),v=(0,n.useCallback)((e=>t=>{13!==t.keyCode&&32!==t.keyCode||(t.stopPropagation(),t.preventDefault(),e(t))}),[]),[y,w]=(0,n.useState)(!1),P=(0,n.useCallback)((()=>{w(!0)}),[]),L=(0,n.useCallback)((()=>{d(),w(!1)}),[d]),z=(0,n.useCallback)((()=>{w(!1)}),[]),M="ltr"===p?"bottomRight":"bottomLeft",{colors:H}=(0,k.u)(),K=(0,T.M)();return(0,i.jsxs)(B,{children:[(0,i.jsxs)(R,{"aria-label":u("pc_web_more_btn"),role:"button",onMouseEnter:g,onMouseLeave:x,tabIndex:0,onKeyDown:b,children:[(0,i.jsx)("div",{"data-e2e":"comment-more-icon",children:(0,i.jsx)(F,{})}),(0,i.jsx)(D.z,{backgroundColor:H.BGSecondary,active:h,placement:M,margin:m?2:-6,children:(0,i.jsxs)(O,{children:[s&&(0,i.jsxs)(A,{"aria-label":u("Report"),role:"button",onClick:f,tabIndex:0,onKeyDown:v(f),"data-e2e":"comment-report",children:[(0,i.jsx)(_.A,{width:24,height:24}),(0,i.jsx)(E,{children:u("Report")})]}),c&&(0,i.jsxs)(A,{"aria-label":u("comment_delete_btn"),role:"button","data-e2e":"comment-delete",onClick:P,onKeyDown:v(P),tabIndex:0,children:[(0,i.jsx)(ke.A,{width:24,height:24}),(0,i.jsx)(E,{children:u("comment_delete_btn")})]})]})})]}),m?null:(0,i.jsx)(Se,{count:r,liked:a,onClick:e.onLike}),c&&(0,i.jsx)(S.aF,{visible:y,keyboardCloseable:!1,maskCloseable:!1,parentRef:K,children:(0,i.jsxs)("div",{"data-e2e":"comment-delete-modal",style:{width:310},children:[(0,i.jsx)(U,{children:u("comment_delete_des")}),(0,i.jsxs)(W,{children:[(0,i.jsx)($,{"data-e2e":"comment-modal-delete",primary:!0,onClick:L,children:u("comment_delete_confirm")}),(0,i.jsx)($,{"data-e2e":"comment-modal-cancel",onClick:z,children:u("comment_delete_cancel")})]})]})})]})};var ze=o(37209),Me=o(75431),Be=o(85041);const Re="inline-block",Fe={boxShadow:"0 2px 12px rgb(0 0 0 / 12%)",padding:"8px 16px",margin:"-8px -16px 8px",borderRadius:"8px"},Oe={boxShadow:"none",padding:"0",margin:"0 0 16px"},Ae=(0,Me.i7)({"0%":Oe,"10%":Fe,"90%":Fe,"100%":Oe}),Ee=(0,L.default)("div",{target:"e1g2efjf0"})((({isUIOptimization:e})=>({display:"flex",flexDirection:"row",alignItems:"flex-start",marginBottom:e?"12px":"16px",position:"relative"})),(({shouldOptProfile:e})=>e&&{marginBottom:"8px"}),(({highlighted:e})=>e?{animationName:Ae,animationDuration:"3s"}:null),{":hover,:focus-within":{[`${B}`]:{paddingTop:0},[`${R}`]:{display:"block"}}},"label:DivCommentContentContainer;"),Ue=(0,L.default)("div",{target:"e1g2efjf1"})({flex:"1 1 auto"},"label:DivContentContainer;"),We=(0,L.default)("span",{target:"e1g2efjf2"})((({theme:{colors:e},isCreator:t})=>({fontSize:"14px",color:t?e.Primary:e.TextTertiary})),"label:SpanIdentity;"),$e=(0,L.default)("span",{target:"e1g2efjf3"})((({theme:e})=>(0,M.zy)({theme:e,fontFamily:"TikTokFont"})),"label:SpanUserNameText;"),He=(0,L.default)(Be.E,{target:"e1g2efjf4"})((({theme:e})=>(0,M.zy)({theme:e,typography:"P3",fontFamily:"TikTokDisplayFont",fontWeight:"semiBold"})),M.AB,{[`:hover ${$e}`]:{textDecoration:"underline"}},"label:StyledUserLinkName;"),Ke=(0,L.default)(Be.E,{shouldForwardProp:e=>"isInDetailPage"!==e,target:"e1g2efjf5"})((({theme:{direction:e},isInDetailPage:t})=>[{":hover":{[`~ ${Ue} ${He} ${$e}`]:{textDecoration:"underline"}}},(0,M.mp)({direction:e,marginEnd:t?"16px":"12px"})]),"label:StyledUserLinkAvatar;"),qe=(0,L.default)("p",{target:"e1g2efjf6"})((({theme:e})=>(0,M.zy)({theme:e,typography:"P2"})),{whiteSpace:"pre-line",wordBreak:"break-word",marginBottom:"6px"},"label:PCommentText;"),Ne=(0,L.default)("span",{target:"e1g2efjf8"})((({shouldOptBrowserMargin:e})=>e&&{display:Re,width:"64px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"top"}),"label:SpanCreatedTime;"),Ge=(0,L.default)("p",{target:"e1g2efjf9"})((({theme:e,isUIOptimization:t})=>(0,M.zy)({theme:e,typography:"P3",color:t?"TextTertiaryAlt":"TextTertiary"})),"label:PCommentSubContent;"),Ve=({inDetailPage:e,isUIOptimization:t})=>t?"TextTertiaryAlt":e?"TextPrimary":"TextTertiary",Xe=(0,L.default)("span",{target:"e1g2efjf10"})({cursor:"pointer"},(({theme:e,inDetailPage:t=!1,isUIOptimization:o=!1})=>(0,M.zy)({theme:e,fontWeight:t?"semiBold":"normal",color:Ve({inDetailPage:t,isUIOptimization:o})})),(({inDetailPage:e,theme:{direction:t}})=>(0,M.mp)({direction:t,marginStart:e?24:4})),"label:SpanReplyButton;"),Ye=e=>e.AssistColorAzure,Qe=(0,L.default)(Be.E,{target:"e1g2efjf11"})((({theme:{colors:e}})=>({display:Re,direction:"ltr",color:Ye(e),cursor:"pointer",":hover":{color:Ye(e)},"&:-webkit-any-link":{color:Ye(e)},fontWeight:600})),"label:StyledUserLinkContent;"),Ze=(0,L.default)("span",{target:"e1g2efjf12"})((({theme:{colors:e}})=>({cursor:"pointer",color:e.AssistColorAzure,fontSize:"16px",lineHeight:"20px",fontWeight:600})),"label:SpanWordContainer;"),Je=(0,L.default)("span",{target:"e1g2efjf13"})({display:Re},"label:SpanWordWithIcon;"),et=(0,L.default)(N.A,{target:"e1g2efjf14"})((({theme:{colors:e}})=>({position:"relative",top:"-4px",width:"10px",height:"10px",color:e.AssistColorAzure})),"label:StyledMagnifyingGlass;"),tt=(0,n.memo)((function(e){const{teaParams:t,cid:o,word:a,searchKeyword:l,searchKeywordId:c,onClose:h,isRTL:g,isRTLComment:f}=e,[b,k]=(0,n.useState)(!1),_=(0,r.useLocation)(),w=(0,r.useHistory)(),{isOpenNewTab:j}=(0,v.M4)(),{isBrowserModeShowing:T}=(0,n.useContext)(d.g),{handleClickReport:I,handleShowReport:D}=(0,C.HW)(),[{rootEnterFrom:S}]=(0,s.S)(y.tq,{selector:e=>({rootEnterFrom:e.searchGlobalParams.rootEnterFrom}),dependencies:[]});(0,n.useEffect)((()=>{b||(D({search_position:T?"video_detail":p.f.commonParams.page_name,words_content:l,comment_id:o,enter_group_id:t.group_id,video_page_type:T?"browser_mode":"video_detail",impr_id:t.logId,group_id:c,enter_from:S}),k(!0))}),[o,D,b,T,l,c,t.group_id,t.logId,a,S]);const P=(0,n.useCallback)((e=>{const i=Date.now(),n=(0,x.F)({location:_,to:{pathname:u.$T.searchHome(),search:{q:l,t:i}}}),r={searchSource:"comment_highlighted_words",enterMethod:"click_icon",videoPageType:T?"browser_mode":"video_detail",preClickId:t.logId};T&&j?window.open(m.stringifyUrl({url:n,query:r})):(null==h||h(e,!0),w.push(n,r)),I({search_position:T?"video_detail":p.f.commonParams.page_name,video_page_type:T?"browser_mode":"video_detail",words_content:l,enter_group_id:t.group_id,comment_id:o,impr_id:t.logId,group_id:c,enter_from:S})}),[_,l,T,t.logId,t.group_id,j,I,o,c,h,w,S]),[L,z]=(0,n.useMemo)((()=>{if(f)return["",""];const e=a.trimEnd().lastIndexOf(" ")+1;return 0===e?["",a]:[a.slice(0,e),a.slice(e)]}),[a,f]);return f?(0,i.jsx)(Ze,{"data-e2e":"search-comment-highlight-word",onClick:P,dir:"rtl",children:(0,i.jsxs)(Je,{children:[!g&&(0,i.jsx)(i.Fragment,{children:" "}),a,(0,i.jsx)(et,{})]})}):(0,i.jsxs)(Ze,{"data-e2e":"search-comment-highlight-word",onClick:P,dir:"ltr",children:[g&&(0,i.jsx)(i.Fragment,{children:" "}),L,(0,i.jsxs)(Je,{children:[z,(0,i.jsx)(et,{})]})]})})),ot=(0,n.memo)((e=>{const t=qe;return(0,i.jsx)(t,Object.assign({},e))}));var it,nt=o(45009);!function(e){e[e.PlainText=0]="PlainText",e[e.SearchWordText=6]="SearchWordText",e[e.User=7]="User"}(it||(it={}));const rt=(0,n.memo)((function({cid:e,commentItem:t,e2eTag:o,teaParams:r,hasSearchKeyword:a=!1,onClose:d,onLinkClick:s}){const{text:c,text_extra:m,comment_language:u=""}=t,p=((0,l.s)(),(0,nt.W)()),h=(0,n.useMemo)((()=>(0,ze.xt)(u)),[u]),g=(0,n.useMemo)((()=>function(e){const{text:t,textExtra:o,hasSearchKeyword:i,isRTL:n,isRTLComment:r}=e;if(!o||0===o.length)return[{type:0,text:t}];const a=[];let l=0;return o.forEach((({start:e,end:o,sec_uid:n,user_id:r,type:d,search_keyword:s,search_keyword_id:c})=>{if(l!==e&&a.push({type:0,text:t.substring(l,e)}),6===d){const n=t.substring(e,o)===s;a.push({type:i&&n?6:0,text:t.substring(e,o),searchKeyword:s,searchKeywordId:c})}else a.push({type:7,text:t.substring(e,o),uid:r,secUid:n});l=o})),a.push({type:0,text:t.substring(l,t.length)}),n&&a.reverse(),r&&a.reverse(),a}({text:c,textExtra:m,hasSearchKeyword:a,isRTL:p,isRTLComment:h})),[c,m,a,p,h]);return(0,i.jsxs)(ot,{"data-e2e":o,children:["",g.map((({text:t,type:o,uid:n,secUid:a,searchKeywordId:l,searchKeyword:c},m)=>0===o?(0,i.jsx)("span",{dir:h?"rtl":"",children:t},m):6===o?(0,i.jsx)(tt,{teaParams:r,word:t,searchKeyword:c,searchKeywordId:l,cid:e,onClose:d,isRTL:p,isRTLComment:h},l):7===o?(0,i.jsx)(Qe,{uniqueId:null!=a?a:"",secUid:a,isInBrowserMode:!0,onLinkClick:s,teaParams:{to_user_id:null!=n?n:"",enter_method:"comment"},children:t},m):null))]})}));var at=o(93811),lt=o(84772),dt=o(73256);const st=(0,L.default)("div",{target:"eo72wou0"})({marginBottom:"20px"},"label:DivCommentItemContainer;"),ct=(0,L.default)("div",{target:"eo72wou1"})((({isLevel2:e,theme:{direction:t}})=>(0,M.mp)({direction:t,paddingStart:e?35:52})),"label:DivReplyContainer;"),mt=(0,L.default)("div",{target:"eo72wou2"})({display:"flex",flexDirection:"row",justifyContent:"space-between",position:"relative"},(({isUnfold:e,hasMore:t,theme:{direction:o,colors:i}})=>e?[t?(0,M.mp)({direction:o,paddingStart:"52px"}):null,t?{"::before":Object.assign({content:'""',position:"absolute",top:"50%",width:"36px",height:"1px",background:i.LineSecondary,transform:"scaleY(0.5)"},(0,M.mp)({direction:o,start:"0"}))}:{justifyContent:"right"}]:null),"label:DivReplyActionContainer;"),ut=(0,L.default)(dt.A,{target:"eo72wou3"})((({reversed:e,theme:{direction:t}})=>[(0,M.mp)({direction:t,marginStart:"6px"}),{width:"14px",height:"14px",verticalAlign:"middle",transform:e?"rotate(180deg)":"none"}]),"label:StyledChevronDownFill;"),pt=(0,L.default)("p",{target:"eo72wou4"})((({theme:e})=>(0,M.zy)({theme:e,color:"TextTertiary",typography:"P3",fontWeight:"semiBold"})),{cursor:"pointer",":hover":{textDecoration:"underline"}},"label:PReplyActionText;");var ht,gt=o(58542),xt=o(33274);!function(e){e[e.Level1=1]="Level1",e[e.Level2=2]="Level2"}(ht||(ht={}));const ft={1:40,2:24};var bt;!function(e){e[e.Creator=1]="Creator",e[e.Following=2]="Following",e[e.Friends=8]="Friends"}(bt||(bt={}));const vt={1:"creator",2:"following_acc",8:"friends_acc"},yt={1:"comment-creator",2:"comment-following",8:"comment-friends"},Ct=(0,n.memo)((function({parentCid:e,item:t,level:o,disableReply:l,index:d,subIndex:s,teaParams:m,onClose:u,onLinkClick:p,videoReportParams:x,inDetailPage:y=!1}){var C,k,_,j,I;const{t:D,timeTranslator:S}=(0,ge.T)(),L=(0,pe._u)(),z=(0,te.Tq)((e=>e[t.cid]),oe.bN),{shouldOptimizeReply:M}=(0,v.kb)(),B=(0,ce.nW)((e=>{var t;return e.users[null!==(t=null==z?void 0:z.user)&&void 0!==t?t:""]}),oe.bN),R=(0,n.useRef)(null),{loginUserId:F,loginUserUid:O,hasSearchPermission:A}=(0,c.P)(f.L,{selector:e=>{var t,o,i,n,r,a,l;return{loginUserId:null===(o=null===(t=e.appContext)||void 0===t?void 0:t.user)||void 0===o?void 0:o.uniqueId,loginUserUid:null===(n=null===(i=e.appContext)||void 0===i?void 0:i.user)||void 0===n?void 0:n.uid,hasSearchPermission:null===(l=null===(a=null===(r=e.appContext)||void 0===r?void 0:r.user)||void 0===a?void 0:a.hasSearchPermission)||void 0===l||l}},dependencies:[]}),E=(0,me.F3)((e=>{var t;return e[null!==(t=null==z?void 0:z.aweme_id)&&void 0!==t?t:""]}),oe.bN),{author:U,authorId:W,authorSecId:$}=null!=E?E:{},{videoIdList:H}=(0,c.P)(P.Zr,{selector:e=>{var t;return null!==(t=e.blockListMap[null!=O?O:P.yJ])&&void 0!==t?t:{}},dependencies:[O]}),K=(0,a.BY)(),q=(0,at.mo)(),{setReply:N,setReplyOptimize:G,setReplyCid:V}=(0,ue.$4)(),{showing:X,handleCardEnter:Y,handleCardLeave:Q,handleItemEnter:Z,handleItemLeave:J}=(0,ye.C)(),ee=(0,n.useMemo)((()=>y&&1===o?48:ft[o]),[o,y]),ne=(0,n.useCallback)((()=>{if(!z)return;const{aweme_id:e,cid:t}=z;K.handleCommentLike({itemId:e,cid:t,teaAuthorId:W})}),[K,z,W]),ke=(0,ve.G)({actionWhenUserLoggedIn:ne,modalConfig:{query:{enter_method:"click_like_comment",group_id:null==m?void 0:m.group_id}},reportClickEvent:()=>{ae.O.handleGeneralClick("like_comment",{group_id:null==m?void 0:m.group_id,play_mode:"browser_mode"})}}),{region:_e=""}=null!==(C=(0,h.W)((()=>["region"]),[]))&&void 0!==C?C:{},we=(0,n.useCallback)((()=>{if(!z)return;const{aweme_id:t,cid:o}=z;K.handleCommentDelete({itemId:t,cid:o,parentCid:e,index:d,subIndex:s})}),[K,z,d,s,e]),je=(0,n.useCallback)((()=>{V("")}),[V]),Te=(0,n.useCallback)((()=>{const{nickname:e=""}=null!=B?B:{},{cid:t="",reply_id:i=""}=null!=z?z:{};M&&(V(t),setTimeout((()=>{var e;null===(e=R.current)||void 0===e||e.focus()}),0)),(M?G:N)({nickname:e,replyId:1===o?t:i,replyToReplyId:1===o?"0":t,position:d})}),[B,z,M,G,N,o,d,V]),Ie=(0,ve.G)({actionWhenUserLoggedIn:Te,modalConfig:{query:{enter_method:"click_reply_comment",group_id:null==m?void 0:m.group_id}},reportClickEvent:()=>{ae.O.handleGeneralClick("reply_comment",{group_id:null==m?void 0:m.group_id,play_mode:"browser_mode"})}}),De=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||(e.stopPropagation(),e.preventDefault(),Ie())}),[Ie]),Se=(0,n.useCallback)((e=>{const t=re.q7.includes(_e);if(!O||!t||!z)return;const{cid:o,aweme_id:i,text:n}=z;e.stopPropagation();const r=L(E),a=(0,he.X)(o);if(!a)return;const l=`${window.location.host}${r}?cid=${a}`,d=document.createElement("input");d.style.fontSize="16px",document.body.appendChild(d),d.value=l,d.select(),d.setSelectionRange(0,l.length),document.execCommand&&document.execCommand("copy"),d.remove(),w.F.open({content:D("WebApp_comment_copyurl_id"),duration:1,style:{width:"560px"},getContainer:T.M,getContainerPosition:"fixed"}),le.ao.handleCopyCommentUrl({copy:o,comment:n,group_id:i,user_id:O})}),[_e,O,U,$,z,D]),ze=(0,n.useMemo)((()=>{var e;return Object.assign(Object.assign({},m),{to_user_id:null!==(e=null==B?void 0:B.id)&&void 0!==e?e:"",enter_method:"comment",logId:t.logId})}),[null==B?void 0:B.id,m,t.logId]),{state:Me}=(0,r.useLocation)(),{id:Be}=(0,xe.L$)(fe.Qq.getItem("highlight_comment")),Re=(0,be.Ig)(),Fe=(null==Me?void 0:Me.cid)===t.cid||Be===t.cid&&Re,{abTestVersion:Oe}=null!==(k=(0,h.W)((()=>["abTestVersion"]),[]))&&void 0!==k?k:{},Ae=(0,g.Fc)(null!==(_=null==z?void 0:z.aweme_id)&&void 0!==_?_:"",H),qe="v2"===(0,b.qt)(Oe,"search_entry_comment_word")&&A&&!Ae,{isUIOptimization:Ve}=(0,v.ac)(),{shouldUseWebAppQueryCommentsPopover:Ye}=(0,v.ON)();if(!z||!B)return(0,ie.d)(["commentItem","user"]);const{avatarThumb:Qe,nickname:Ze,verified:Je,uniqueId:et,secUid:tt}=B,{label_type:ot,create_time:it,aweme_id:nt,cid:dt,digg_count:st,user_digged:mt}=z,ut=S(1e3*Number(it)),pt=Boolean(F)&&U===F,ht=Boolean(F)&&et===F,bt=!ht,Ct=pt||ht;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(Ee,{isUIOptimization:Ve&&y,id:t.cid,highlighted:Fe,shouldOptProfile:!y,children:[Ye?(0,i.jsx)(gt.Xwo,{trigger:(0,i.jsx)("div",{children:(0,i.jsx)(Ke,{style:{flex:`0 0 ${ee}px`},uniqueId:et,secUid:tt,isInDetailPage:y,onMouseEnter:Z,onMouseLeave:J,isInBrowserMode:!0,teaParams:ze,"data-e2e":`comment-avatar-${o}`,onLinkClick:p,children:(0,i.jsx)(se.e,{size:ee,src:Qe})})}),open:X,onMouseEnter:Y,onMouseLeave:Q,placement:"bottom-start",style:{zIndex:3002},noArrow:!0,children:(0,i.jsx)(xt._,{uniqueId:et,secUid:null!=tt?tt:""})}):(0,i.jsx)(Ke,{style:{flex:`0 0 ${ee}px`},uniqueId:et,secUid:tt,isInDetailPage:y,onMouseEnter:Z,onMouseLeave:J,isInBrowserMode:!0,teaParams:ze,"data-e2e":`comment-avatar-${o}`,onLinkClick:p,children:(0,i.jsx)(se.e,{size:ee,src:Qe})}),(0,i.jsxs)(Ue,{children:[(0,i.jsxs)(He,{uniqueId:et,secUid:tt,onMouseEnter:Z,onMouseLeave:J,isInBrowserMode:!0,teaParams:ze,onLinkClick:p,children:[(0,i.jsxs)($e,{"data-e2e":`comment-username-${o}`,children:[Ze," ",Je&&(0,i.jsx)(de.s,{"data-e2e":`comment-bluev-${o}`})]}),ot&&Boolean(vt[ot])&&(0,i.jsxs)(i.Fragment,{children:["·"," ",(0,i.jsx)(We,{isCreator:1===ot,"data-e2e":`${yt[ot]}-${o}`,children:D(vt[ot])})]})]}),(0,i.jsx)(rt,{teaParams:ze,cid:dt,hasSearchKeyword:qe,onClose:u,onLinkClick:p,commentItem:z,e2eTag:`comment-level-${o}`}),(0,i.jsxs)(Ge,{isUIOptimization:Ve&&y,children:[(0,i.jsx)(Ne,{"data-e2e":`comment-time-${o}`,onClick:Se,shouldOptBrowserMargin:!y,children:ut}),y?(0,i.jsx)(Pe,{isUIOptimization:Ve,count:st,liked:Boolean(mt),onClick:ke}):null,!l&&(0,i.jsx)(Xe,{"aria-label":D("comment_reply_btn"),role:"button",isUIOptimization:Ve&&y,inDetailPage:y,onClick:Ie,"data-e2e":`comment-reply-${o}`,tabIndex:0,onKeyDown:De,children:D("comment_reply_btn")})]})]}),(0,i.jsx)(Le,{itemId:nt,cid:dt,inDetailPage:y,count:st,liked:Boolean(mt),onLike:ke,onDelete:we,isShowDelete:Ct,isShowReport:bt}),!Ye&&X&&(0,i.jsx)(Ce.t,{uniqueId:et,onMouseEnter:Y,onMouseLeave:Q})]}),M&&q===dt&&(0,i.jsx)(ct,{isLevel2:1!==o,children:(0,i.jsx)(lt.gi,{childInputRef:R,onClose:je,isReply:!0,itemId:nt,teaParams:Object.assign(Object.assign({},x),{author_id:null!==(j=null==x?void 0:x.author_id)&&void 0!==j?j:"",group_id:null!==(I=null==x?void 0:x.group_id)&&void 0!==I?I:""})})})]})})),kt=(0,n.memo)((function({item:e,disableReply:t,index:o,onHideReply:r,teaParams:d,onClose:s,onLinkClick:c,inDetailPage:m=!1}){var u,p,h,g;const x=(0,l.s)(),f=(0,a.BY)(),b=(0,ne.Eo)(),v=(0,te.Tq)((t=>t[e.cid]),oe.bN),y=(0,n.useCallback)((()=>{v&&f.handleShowMoreReply({itemId:v.aweme_id,cid:v.cid})}),[f,v]),C=(0,n.useRef)(null),k=(0,n.useCallback)((()=>{var e,t;v&&(null==r||r(null!==(t=null===(e=C.current)||void 0===e?void 0:e.scrollHeight)&&void 0!==t?t:0),f.handleCollapseReply({itemId:v.aweme_id,cid:v.cid}))}),[f,v,r]),_=(0,n.useCallback)((e=>t=>{13!==t.keyCode&&32!==t.keyCode||(t.stopPropagation(),t.preventDefault(),e?y():k())}),[y,k]),w=(0,n.useMemo)((()=>_(!0)),[_]),j=(0,n.useMemo)((()=>_(!1)),[_]),T=(0,n.useMemo)((()=>{var t,o,n,r,a,l,d;if(!v)return null;if(null===(t=e.replyCache)||void 0===t?void 0:t.loading)return(0,i.jsx)(mt,{children:(0,i.jsx)(ee.R,{center:!0,size:"small"})});const s=null!==(n=null===(o=e.reply_comment)||void 0===o?void 0:o.length)&&void 0!==n?n:0,c=Number(null!==(r=v.reply_comment_total)&&void 0!==r?r:0)-s;if(!c&&Number(null===(a=e.reply_comment)||void 0===a?void 0:a.length)>0)return(0,i.jsx)(mt,{isUnfold:!0,hasMore:!1,children:(0,i.jsxs)(pt,{"aria-label":x("hide"),role:"button",onClick:k,onKeyDown:j,tabIndex:0,"data-e2e":"comment-hide",children:[x("hide"),(0,i.jsx)(ut,{reversed:!0})]})});if(!c)return null;const m=x("pcWeb_detailPage_comment_viewNumReply",{num:c,number:c}),u=x("pcWeb_detailPage_comment_viewNumMore",{number:c});if(!e.replyCache||!(null===(l=e.reply_comment)||void 0===l?void 0:l.length)){let e=x("view_more_replies",{num:c});return e=s>0?u:m,b&&(e=x("countsHidden_commentPanel_viewReply")),(0,i.jsx)(mt,{children:(0,i.jsxs)(pt,{"aria-label":e,role:"button",onClick:y,onKeyDown:w,tabIndex:0,"data-e2e":"view-more-1",children:[e,(0,i.jsx)(ut,{})]})})}const p=e.replyCache.hasMore||e.replyCache.comments.length>e.reply_comment.length;if(Number(null===(d=e.reply_comment)||void 0===d?void 0:d.length)>0){const e=u;return(0,i.jsxs)(mt,{isUnfold:!0,hasMore:p,children:[(0,i.jsx)(pt,{"aria-label":e,role:"button",onClick:y,onKeyDown:w,tabIndex:0,"data-e2e":"view-more-2",children:Boolean(p)&&(0,i.jsxs)(i.Fragment,{children:[b?x("countsHidden_commentPanel_viewReply"):e,(0,i.jsx)(ut,{})]})}),(0,i.jsxs)(pt,{"aria-label":x("hide"),role:"button",onClick:k,onKeyDown:j,tabIndex:0,"data-e2e":"comment-hide",children:[x("hide"),(0,i.jsx)(ut,{reversed:!0})]})]})}return null}),[k,j,w,y,v,e.replyCache,null===(u=e.reply_comment)||void 0===u?void 0:u.length,x,b]);return v?(0,i.jsxs)(st,{children:[(0,i.jsx)(Ct,{inDetailPage:m,item:e,disableReply:t,index:o,level:1,teaParams:d,videoReportParams:Object.assign(Object.assign({},d),{group_id:null!==(p=null==d?void 0:d.group_id)&&void 0!==p?p:"",author_id:null!==(h=null==d?void 0:d.group_id)&&void 0!==h?h:""}),onClose:s,onLinkClick:c}),Boolean(v.reply_comment_total)&&(0,i.jsxs)(ct,{ref:C,children:[null===(g=e.reply_comment)||void 0===g?void 0:g.map(((n,r)=>(0,i.jsx)(Ct,{parentCid:e.cid,item:n,disableReply:t,index:o,subIndex:r,level:2,teaParams:d,onClose:s,onLinkClick:c,inDetailPage:m},n.cid))),T]})]}):(0,ie.d)(["item"])})),_t=(0,Me.i7)({"0%":{backgroundPositionX:"200%"},"100%":{backgroundPositionX:"-150%"}}),wt=(0,L.default)("div",{target:"eht1nyc0"})({width:"100%",marginTop:"16px",display:"flex",flexDirection:"column"},"label:DivCommentItemSkeletonContainer;"),jt=(0,L.default)("div",{target:"eht1nyc1"})({width:"100%",marginBottom:"24px",display:"flex",alignItems:"flex-start"},"label:DivCommentItemSkeleton;"),Tt=(0,L.default)("div",{target:"eht1nyc2"})((({theme:e})=>({width:"40px",height:"40px",borderRadius:"100px",backgroundColor:e.colors.BGPlaceholderDefault,flexShrink:0,backgroundImage:"linear-gradient(90deg, rgba(22, 24, 35, 0) 0%, rgba(22, 24, 35, .04) 50%, rgba(22, 24, 35, 0) 100%)",backgroundSize:"200% 100%",backgroundRepeat:"no-repeat",animation:`${_t} cubic-bezier(0, 0, 1, 1) 1.5s infinite`})),"label:DivCommentItemSkeletonAvatar;"),It=(0,L.default)("div",{target:"eht1nyc3"})({width:"100%",display:"flex",flexDirection:"column"},(({theme:{direction:e}})=>(0,M.mp)({direction:e,marginStart:"20px"})),"label:DivCommentItemSkeletonInfo;"),Dt=(0,L.default)("div",{target:"eht1nyc4"})((({width:e="100%",height:t="24px",marginTop:o="0px",theme:i})=>({width:e,height:t,marginTop:o,backgroundColor:i.colors.BGPlaceholderDefault,backgroundImage:"linear-gradient(90deg, rgba(22, 24, 35, 0) 0%, rgba(22, 24, 35, .04) 50%, rgba(22, 24, 35, 0) 100%)",backgroundSize:"200% 100%",backgroundRepeat:"no-repeat",animation:`${_t} cubic-bezier(0, 0, 1, 1) 1.5s infinite`})),"label:DivCommentItemSkeletonLine;"),St=(0,n.memo)((function({num:e=3}){const t=[];for(let o=0;o(0,i.jsxs)(jt,{children:[(0,i.jsx)(Tt,{}),(0,i.jsxs)(It,{children:[(0,i.jsx)(Dt,{width:"160px"}),(0,i.jsx)(Dt,{height:"20px",marginTop:"4px"}),(0,i.jsx)(Dt,{height:"12px",marginTop:"8px",width:"96px"})]})]},e)))})}));var Pt=o(91286),Lt=o(99129);const zt=e=>{const[t,o]=(0,a.kH)((t=>{var o;return null!==(o=t[e])&&void 0!==o?o:{awemeId:void 0,cursor:"0",comments:[],hasMore:!0,loading:!1}}),oe.bN),{comments:i,hasMore:r,loading:l}=t;(0,n.useEffect)((()=>{!(0,Pt.X9)(e)&&e&&0===i.length&&r&&!l&&o.fetchComment({aweme_id:e,cursor:0,fetch_type:"preload_by_previous"})}),[o,i.length,r,e,l])};var Mt=o(94901);const Bt=(0,L.default)(Mt.mM,{target:"e1u1vkmc0"})((({isInHorizontalBoostUI:e,theme:{colors:t}})=>({borderTop:"none",padding:"16px",margin:0,background:e?t.BGPrimary:t.BGCreation3,border:"none",position:"relative",display:"flex",flexDirection:"column"})),"label:StyledDivCommentListContainerForSwiper;"),Rt=(0,n.memo)((e=>{const{isInHorizontalBoostUI:t}=(0,v.l2)(),o=t?Bt:Mt.mM;return(0,i.jsx)(o,Object.assign({},e,{isInHorizontalBoostUI:t}))}));var Ft=o(64317),Ot=o(50461),At=o(12674);const Et=()=>{const e=(0,l.s)();return(0,i.jsxs)(At.MT,{children:[(0,i.jsx)(At.XE,{})," ",(0,i.jsx)(At.O5,{children:e("ad_comment_close_des")})]})};var Ut=o(6523),Wt=o(48615);const $t=(0,n.memo)((0,n.forwardRef)((function({itemId:e,disableReply:t,teaParams:o,onLinkClick:s,onClickScrollToTop:c,onClose:m,inDetailPage:u=!1,hasMore:p=!0,prefetchId1:h="",prefetchId2:g="",profileContent:x,showScrollToTop:f=!1,onTabChange:b,activeTab:y,isCommentDisabled:C,adsCommentDisabled:k,creatorTabDisabled:_,hideTab:w,showSkeleton:j,initialSkeletonNum:T=9},I){var D,S,P,L;const z=(0,a._B)((t=>{var o;return null!==(o=t[e])&&void 0!==o?o:{awemeId:void 0,cursor:"0",comments:[],hasMore:!0,loading:!0}}),oe.bN),M=(0,r.useLocation)(),{allowRightPanelScroll:B,shouldShowCommentsCnt:R,shouldOptimizeCta:F,shouldOptimizeReply:O}=(0,v.kb)(),A=(0,l.s)();(e=>{const t=(0,n.useMemo)((()=>performance.now()),[e]),{enableOnDeviceML:o}=(0,Lt.K1)(),[{hasMore:i,loading:r,comments:l,isFirstLoad:d,fetchType:s},c]=(0,a.kH)((t=>{var o;return null!==(o=t[e])&&void 0!==o?o:a.lN}),oe.bN);(0,n.useEffect)((()=>{if(!(0,Pt.X9)(e)&&e&&0===l.length&&i&&!r){if(o&&Lt.oS.get(e)){const t=Lt.oS.get(e);return c.handleCommentsPreload(t),void Lt.oS.delete(e)}c.fetchComment({aweme_id:e,cursor:0,fetch_type:"load_by_current"})}if(d&&!r){const o=performance.now()-t;le.ao.handleCommentLoadComplete({play_mode:"browser_mode",group_id:e,duration:o,fetch_type:s})}}),[l.length,c,i,e,r,d])})(e),zt(h),zt(g);const E=(0,n.useMemo)((()=>{var e;if(j||!z||!(null===(e=z.comments)||void 0===e?void 0:e.length)&&z.loading&&p)return(0,i.jsx)(St,{num:Math.min(T,9)});const n=[];return z.comments.forEach(((e,r)=>{var a;const l=(0,i.jsx)(kt,{item:e,disableReply:t,index:r,teaParams:o,onClose:m,onLinkClick:s,inDetailPage:u},e.cid);(null===(a=M.state)||void 0===a?void 0:a.cid)===e.cid?n.unshift(l):n.push(l)})),n.length?(0,i.jsxs)(i.Fragment,{children:[n,z.loading&&(0,i.jsx)(St,{num:1})]}):(0,i.jsx)(Mt.T1,{marginTop:u,children:A(C?"comment_off":"comment_panel_zero")})}),[z,p,t,o,m,s,u,null===(D=M.state)||void 0===D?void 0:D.cid,A,j]),{isBrowserModeShowing:U}=(0,n.useContext)(d.g),W=(0,n.useMemo)((()=>U?(0,i.jsx)(J,{onClose:m,id:e}):null),[U,e,m]),$=!(null===(S=null==z?void 0:z.comments)||void 0===S?void 0:S.length),H=u||R,K=x?(0,i.jsx)(Mt._4,{shouldOptimizeCta:F,children:x}):null,q=O&&u,{isSearchEngineBot:N=!1}=(0,xe.L$)((0,Wt.U)((()=>["isSearchEngineBot"]),[])),G=(0,Ut.wW)(),V=N&&null!==(L=null===(P=null==G?void 0:G.parameters.seo_comment_bot_ui)||void 0===P?void 0:P.vid)&&void 0!==L?L:"v1";return(0,i.jsxs)(Rt,{"data-e2e":"search-comment-container",inDetailPage:u,empty:$,shouldShowCommentsCnt:R,noBackgroundColor:H,noBorderTop:$||H,overflowVisible:q,children:[!B&&W,(0,i.jsxs)(Mt.Ky,{inDetailPage:u,shouldOptimizeCta:F,overflowVisible:q,ref:I,seoExpVidGroup:V,"data-disable-type":C?"disabled":k?"ads":void 0,children:[K,B&&(0,i.jsxs)(i.Fragment,{children:[!u&&!w&&(0,i.jsx)(Ft.r,{itemId:e,isInCommentList:!0,commentTopSearch:W,descriptionPart:null,onTabChange:b,activeTab:y,isCommentDisabled:C||k,creatorTabDisabled:_}),f&&(0,i.jsx)(Ot.x,{onClick:e=>{var t,i;le.ao.handleClickBackToTop({group_id:null!==(t=null==o?void 0:o.group_id)&&void 0!==t?t:"",authro_id:null!==(i=null==o?void 0:o.author_id)&&void 0!==i?i:""}),null==c||c(e)},isUp:!0,isInComment:!0})]}),k?(0,i.jsx)(Et,{}):E]})]})})))},99764:(e,t,o)=>{var i;o.d(t,{Os:()=>r,p:()=>n}),function(e){e[e.Comments=0]="Comments",e[e.Creator=1]="Creator"}(i||(i={}));const n=24,r=32},50461:(e,t,o)=>{o.d(t,{x:()=>p});var i=o(24643),n=o(40099),r=o(9292),a=o(39377),l=o(62186),d=o(72153);const s=(0,l.default)("div",{target:"e1hknyby0"})((({theme:{direction:e,colors:t},isInComment:o})=>Object.assign({position:o?"fixed":"absolute",minWidth:"60px",padding:"0 10px",height:"40px",bottom:o?"114px":"20px",background:t.BGSecondary,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.06)",borderRadius:"52px",cursor:"pointer",zIndex:o?1:""},(0,d.mp)({direction:e,end:"16px"}))),"label:DivScrollToButtonContainer;"),c=(0,l.default)("div",{target:"e1hknyby1"})((({theme:{colors:e}})=>({display:"flex",flexDirection:"row",height:"100%",alignItems:"center",justifyContent:"center",color:e.TextPrimary})),"label:DivButton;"),m=(0,l.default)("div",{target:"e1hknyby2"})((({theme:e})=>[(0,d.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3",fontWeight:"semiBold"}),{lineHeight:"24px",textAlign:"center",fontSize:"16px"},(0,d.mp)({direction:e.direction,paddingEnd:"6px"})]),"label:DivTextContainer;");var u=o(25616);const p=(0,n.memo)((function({onClick:e,isUp:t,isInComment:o=!1}){const n=(0,u.s)();return(0,i.jsx)(s,{onClick:e,isInComment:o,children:(0,i.jsxs)(c,{children:[(0,i.jsx)(m,{children:n(o?"pcWeb_detailPage_backTop_btn":"pc_web_browser_nowPlaying")}),t?(0,i.jsx)(r.d,{size:14}):(0,i.jsx)(a.g,{size:14})]})})}))},64317:(e,t,o)=>{o.d(t,{r:()=>I});var i=o(24643),n=o(67518),r=o(46682),a=o(40099),l=o(91055),d=o(25616),s=o(88920),c=o(52333),m=o(82858),u=o(62186),p=o(72153),h=o(93638),g=o(99764);const x=(0,u.default)("div",{target:"e1aa9wve0"})({paddingTop:"18px",height:"50px",display:"flex",flexDirection:"row",alignItems:"center"},"label:DivTabMenuContainer;"),f=(0,u.default)("div",{target:"e1aa9wve1"})((({isSelected:e=!1,onlyHasOneTab:t=!1,theme:o})=>({borderBottom:!t&&e?`2px solid ${o.colors.TextPrimary}`:"none",width:"50%",height:"100%"})),"label:DivTabItemContainer;"),b=(0,u.default)("div",{target:"e1aa9wve2"})((({onlyHasOneTab:e,isSelected:t=!1,theme:o})=>[(0,p.zy)({theme:o,fontWeight:t?"bold":"semiBold",typography:"P3",fontFamily:"TikTokFont",color:t?"TextPrimary":"TextTertiaryAlt"}),{overflow:"auto",lineHeight:"24px",cursor:"pointer"},!e&&{textAlign:"center"}]),"label:DivTabItem;"),v=`-${g.Os}px`,y=(0,u.default)("div",{target:"e1aa9wve3"})((({shouldOptimizeCta:e,theme:{colors:t}})=>({borderTop:`1px solid ${t.LineSecondary}`,marginLeft:e?`-${h.Zh}px`:v,marginRight:e?`-${h.Zh}px`:v,marginBottom:"-1px"})),"label:DivBorder;"),C=(0,u.default)("div",{target:"e1aa9wve4"})((({theme:e})=>[{position:"sticky",top:"-28px",background:e.colors.BGPrimary,zIndex:1,marginBottom:`${g.p}px`}]),"label:DivTabMenuWrapper;");var k=o(49057),_=o(19442),w=o(32125),j=o(84908),T=o(39415);const I=(0,a.memo)((function(e){var t,o;const u="rtl"===(0,n.u)().direction,p=(0,d.s)(),{descriptionPart:h,itemId:g,isInCommentList:v=!1,commentTopSearch:I,activeTab:D=0,isCommentDisabled:S,creatorTabDisabled:P,onTabChange:L}=e,{language:z,abTestVersion:M}=null!==(t=(0,k.W)((()=>["language","abTestVersion"]),[]))&&void 0!==t?t:{},{allowRightPanelScroll:B,shouldShowCommentsCnt:R}=(0,s.kb)(),[F]=(0,r.S)(c.k,{selector:e=>e[g],dependencies:[g]}),O=(0,j.nW)((e=>{var t;return e.users[null!==(t=null==F?void 0:F.author)&&void 0!==t?t:""]}),w.bN),A=(0,T.BX)(),E=(0,m.Eo)(),U=(0,_.JD)((e=>e.isCreatorBrowserMode)),{shouldOptimizeCta:W}=(0,s.kb)(),$=(0,a.useCallback)((e=>t=>{var o,i;t.preventDefault(),D!==e&&L&&L(e),1!==e||U||(A.resetCreatorTabList(),A.getCreatorTabList({secUid:null!==(o=null==O?void 0:O.secUid)&&void 0!==o?o:"",key:"creator_tab",createTime:1e3*Number(null!==(i=null==F?void 0:F.createTime)&&void 0!==i?i:0),fetchType:0}),l.G.handleCreatorTabShow({enter_method:"click_creator_tab"}))}),[D,L,U,A,z,M,null==F?void 0:F.createTime,null==O?void 0:O.secUid]);if(v&&1===D||!v&&0===D&&B)return null;const H=0===D,K=1===D,q=S||E?"":`(${null===(o=null==F?void 0:F.stats)||void 0===o?void 0:o.commentCount})`,N=(0,i.jsxs)(x,{isInCommentList:v,children:[(0,i.jsx)(f,{isSelected:H,onlyHasOneTab:P,children:(0,i.jsx)(b,{isSelected:H,onClick:$(0),onlyHasOneTab:P,children:u?`${q} ${p("fixed_comments")}`:`${p("fixed_comments")} ${q}`})}),!P&&(0,i.jsx)((()=>(0,i.jsx)(f,{isSelected:K,children:(0,i.jsx)(b,{isSelected:K,onClick:$(1),children:p("pc_web_browser_tabName_creatorVid")})})),{})]});return!B||K?(0,i.jsxs)(i.Fragment,{children:[N,R&&H&&(0,i.jsx)(y,{shouldOptimizeCta:W})]}):(0,i.jsxs)(C,{children:[h,N,H&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y,{shouldOptimizeCta:W}),I]})]})}))},12674:(e,t,o)=>{o.d(t,{G5:()=>p,MT:()=>f,O5:()=>v,OV:()=>s,Qp:()=>x,WH:()=>u,XE:()=>b,hr:()=>m,k7:()=>h,m0:()=>g,tj:()=>c});var i=o(62186),n=o(72153),r=o(34393),a=o(68662),l=o(75431);const d=({toBackground:e,animationEnd:t})=>t?void 0:l.i7`
from {
background: '#54545480';
}
to {
background: ${e};
color: white;
}
`,s=(0,i.default)("button",{target:"e1s9h68o0"})((({theme:e,toBackground:t,animationEnd:o})=>{const i=o?t:"#54545480",r=o?`linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), ${t} !important`:"linear-gradient(0deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.06)), #54545480 !important";return[(0,n.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"medium"}),{fontSize:"12px",color:"white",lineHeight:"15.6px",width:"calc(100% - 24px)",margin:"12px",height:"28px",borderRadius:"4px",background:i,border:"none",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{background:r,cursor:"pointer"},animationName:`${d({toBackground:t,animationEnd:o})}`,animationDelay:"5s",animationDuration:"0.2s",animationTimingFunction:"ease-in-out",animationDirection:"normal",animationIterationCount:1,animationFillMode:"forwards"}]}),"label:StyledButton;"),c=(0,i.default)(r.A,{target:"e1s9h68o1"})((({theme:{direction:e}})=>({transform:"rtl"===e?"rotate(180deg)":"none"})),"label:RightArrowIcon;"),m=(0,i.default)("div",{target:"e1s9h68o2"})((({theme:{direction:e}})=>[(0,n.mp)({direction:e,start:"20px"}),{position:"absolute",bottom:"20px",width:"242px",background:"#2E2E2E",display:"flex",flexDirection:"column",alignItems:"flex-start;",boxShadow:"0px 2px 12px rgb(0 0 0 / 12%)",borderRadius:"4px",zIndex:1,color:"white","&:hover":{background:"linear-gradient(0deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.08)), #2E2E2E",cursor:"pointer"}}]),"label:DivStyledPopupAds;"),u=(0,i.default)("div",{target:"e1s9h68o3"})({alignItems:"center",display:"flex"},"label:DivAdsProfileContainer;"),p=(0,i.default)("img",{target:"e1s9h68o4"})((({theme:{direction:e}})=>[{marginTop:"12px",height:"56px",width:"56px"},(0,n.mp)({direction:e,marginStart:"12px",marginEnd:"8px"})]),"label:ImgAdsAvatarContainer;"),h=(0,i.default)("div",{target:"e1s9h68o5"})({display:"flex",flexDirection:"column",marginTop:"12px",width:"150px"},"label:DivAdsTextContainer;"),g=(0,i.default)("div",{target:"e1s9h68o6"})((({theme:e})=>[(0,n.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"medium"}),{fontSize:"15px",lineHeight:"19.5px",marginBottom:"2px"}]),"label:DivAdsTitle;"),x=(0,i.default)("div",{target:"e1s9h68o7"})((({theme:e})=>[(0,n.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"normal"}),{fontSize:"13px",lineHeight:"16.9px"},(0,n.m4)(2),(0,n.mp)({direction:e.direction,marginEnd:"12px"})]),"label:DivAdsDescription;"),f=(0,i.default)("div",{target:"e1s9h68o8"})({width:"100%",display:"flex",flexDirection:"column",alignItems:"center",marginTop:"156px"},"label:DivAdsCommentTurnOffContainer;"),b=(0,i.default)(a.A,{target:"e1s9h68o9"})((({theme:{isDark:e}})=>({width:"62px",height:"67.95px",color:e?"#FFFFFF57":"#00000052"})),"label:IconLock;"),v=(0,i.default)("div",{target:"e1s9h68o10"})((({theme:e})=>[(0,n.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"normal"}),{fontSize:"14px",lineHeight:"18.2px",width:"100%",display:"flex",flexDirection:"column",alignItems:"center",marginTop:"20px",color:e.isDark?"#FFFFFF99":"#0000008F"}]),"label:DivAdsCommentTurnOffText;")},91055:(e,t,o)=>{o.d(t,{G:()=>r});var i,n=o(93608);!function(e){e.ClickBrowserModeProfile="click_browser_mode_profile",e.ClickCreatorTab="click_creator_tab"}(i||(i={}));const r={handleCreatorTabShow:e=>{n.f.sendEvent("from_this_creator_tab_show",e)},handleCreatorPageShow:e=>{n.f.sendEvent("creator_page_show",e)},handleClickPlayNow:e=>{n.f.sendEvent("click_play_now_button",e)},handleExitCreatorPage:e=>{n.f.sendEvent("click_creator_page_button",e)},handleCreatorTabLoadComplete:e=>{n.f.sendEvent("creator_videos_load_complete",e)}}}}]);