(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[3560],{84643:(e,t,i)=>{"use strict";i.d(t,{v:()=>r});var o=i(28086),n=i(39228),a=function(e,t,i,o){return new(i||(i=Promise))((function(n,a){function r(e){try{l(o.next(e))}catch(e){a(e)}}function s(e){try{l(o.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,s)}l((o=o.apply(e,t||[])).next())}))};const r=(0,o.z)({initState:{rechargeEntryPermission:!1,isWebRechargedBefore:!1},fetchAction:(e,t)=>a(void 0,void 0,void 0,(function*(){try{const i=(e={user_id:t.uid,local_country:t.region,live_id:12,source:t.source},a(void 0,void 0,void 0,(function*(){return yield n.hd.get("/webcast/wallet_api/fs/diamond_buy/permission_v2",{query:e,baseUrlType:4})}))),o=yield i;return{rechargeEntryPermission:Boolean(o.data.is_show),isWebRechargedBefore:!o.data.is_first_web_recharge}}catch(e){return{rechargeEntryPermission:!1,isWebRechargedBefore:!1}}var e}))})},42712:(e,t,i)=>{"use strict";i.d(t,{Y:()=>l});var o=i(40099),n=i(47172),a=i(8227),r=i(89005),s=i(41271);const l=()=>{const{pathname:e}=(0,n.useLocation)(),t=(0,s.P)(r.C6,{selector:e=>{var t;return!!(null===(t=e.permissionInfo)||void 0===t?void 0:t.topLSEntranceVisible)},dependencies:[]});return(0,o.useMemo)((()=>!(e===a.vI.studioDownload)&&t),[e,t])}},20203:(e,t,i)=>{"use strict";i.d(t,{Q:()=>Xe,t:()=>tt});var o=i(24643),n=i(67518),a=i(28013),r=i(99789),s=i.n(r),l=i(4474),d=i(40099),c=i(47172),u=i(243),p=i.n(u),m=i(25616),h=i(88920),_=i(13990),v=i(61886),g=i(49057),f=i(48615),y=i(5441),b=i(65754),x=i(86389),k=i(91825),w=i(40772),C=i(81211),S=i(72688),j=i(16469),I=i(33805),T=i(58305),E=i(22884),P=i(30615),O=i(45297),L=i(71281),R=i(78662),D=i(96689),A=i(97706),F=i(95481),B=i(13492),M=i(44726),N=i(84987);const q={id:"tiktok_series-283a8183",use:"tiktok_series-283a8183-usage",viewBox:"0 0 48 48",content:''};function U(e){const t=(0,d.useContext)(N.X);return(0,d.useLayoutEffect)((()=>(t.add(q),()=>{t.remove("tiktok_series-283a8183")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#tiktok_series-283a8183"},void 0)}),void 0)}var W=i(4929),H=i(89005),z=i(8227),V=i(82715),K=i(87260),G=i(75792),$=i(46682),J=i(41271),Q=i(73580),Z=i(42230),Y=i(64407),X=i(82850),ee=i(6986),te=i(82535),ie=i(52401),oe=i(5321),ne=i(51391),ae=i(38739),re=i(509),se=i(21620),le=i(31974),de=i(8615),ce=i(93608),ue=i(72241),pe=i(28086),me=i(23914),he=i(98332),_e=i(63031),ve=i(64),ge=i(98124),fe=i(92249),ye=i(29580),be=i(466),xe=i(85576),ke=i(61331),we=i(28436),Ce=i(21189),Se=i(50517),je=i(41432),Ie=i(69829),Te=i(42832),Ee=i(87664),Pe=i(65404),Oe=i(34393),Le=i(62216),Re=i(56723),De=i(77734),Ae=i(89076),Fe=i(20157),Be=i(62186),Me=i(12527),Ne=i(72153);const qe=(0,Be.default)("div",{target:"e1xqzoke0"})((({theme:e})=>(0,Ne.zy)({theme:e,typography:"P3",fontFamily:"TikTokFont"})),{minWidth:"223px"},"label:DivContainer;"),Ue=(0,Be.default)("div",{target:"e1xqzoke1"})({display:"flex",alignItems:"center",position:"relative",height:"50px"},"label:DivHeader;"),We=(0,Be.default)(Me.A,{target:"e1xqzoke2"})((({theme:{direction:e}})=>[(0,Ne.mp)({direction:e,marginStart:"28px"}),"ltr"===e?null:{transform:"rotate(180deg)"}]),{width:"20px",height:"20px"},"label:StyledBackIcon;"),He=(0,Be.default)("p",{target:"e1xqzoke3"})((({theme:e})=>(0,Ne.zy)({theme:e,typography:"P2",fontWeight:"semiBold"})),{position:"absolute",left:"50%",transform:"translateX(-50%)"},"label:PTitle;"),ze=(0,Be.default)("ul",{target:"e1xqzoke4"})({listStyle:"none",margin:0,padding:0,maxHeight:"590px",overflowY:"auto"},"label:UlListWrapper;"),Ve=(0,Be.default)("li",{target:"e1xqzoke5"})((({theme:e,theme:{colors:t},active:i})=>[{padding:"10px 24px",background:i?t.BGPlaceholderDefault:"transparent",":hover":{background:t.BGPlaceholderDefault}},(0,Ne.zy)({theme:e,fontFamily:"TikTokDisplayFont"})]),"label:LiListItem;"),Ke=function(e){var t,i;const n=(0,m.s)(),{language:a}=null!==(t=(0,g.W)((()=>["language"]),[]))&&void 0!==t?t:{},r=null!==(i=W.wX.reduce(((e,t)=>(t.value===a?e.unshift(t):e.push(t),e)),[]))&&void 0!==i?i:[],{pathname:s,search:u}=(0,c.useLocation)(),p=(0,Ae.K)(),h=(0,d.useCallback)((e=>()=>{let t;t=(0,R.Iz)(s)?`/${e}`:(0,l.stringifyUrl)({url:s,query:Object.assign(Object.assign({},(0,l.parse)(u)),{lang:e})}),p({lang:e,url:t})}),[s,p,u]),_=(0,d.useCallback)((e=>()=>{h(e)()}),[h]),v=(0,d.useCallback)((e=>t=>{13===t.keyCode&&(t.stopPropagation(),h(e)())}),[h]),{showModal:f,hideModal:y}=(0,Fe.g)();(0,d.useEffect)((()=>(f(),()=>{y()})),[y,f]);const[b,x]=(0,d.useState)(0),k=(0,d.useCallback)((t=>{9===t.keyCode&&(t.shiftKey?b>0&&x(b-1):(b{var t,i;const o=document.querySelector(`#${Re.lV}`);(null===(t=Array.from(null==o?void 0:o.querySelectorAll("*")))||void 0===t?void 0:t.includes(document.activeElement))||null===(i=e.onBlur)||void 0===i||i.call(e)}),0)))}),[b,e,r.length]);return(0,o.jsxs)(qe,{children:[(0,o.jsxs)(Ue,{children:[(0,o.jsx)("i",{onClick:e.onBack,tabIndex:0,onKeyDown:e.onKeyDown,"aria-label":n("accessibilityLabels_forYou_nav_language_back_btn"),role:"button",children:(0,o.jsx)(We,{})}),(0,o.jsx)(He,{id:Re.o6,children:n("Language")})]}),(0,o.jsx)(ze,{id:Re.lV,onKeyDown:k,role:"listbox","aria-labelledby":Re.o6,children:r.map((({value:e,label:t},i)=>(0,o.jsx)(Ve,{active:a===e||i===b,tabIndex:0,onClick:_(e),onKeyDown:v(e),role:"option",children:t},e)))})]})};var Ge=i(84643),$e=i(49589),Je=i(31476),Qe=i(33399),Ze=i(42712),Ye=i(21683);const Xe="series-red-dot",et={padding:"10px 8px 10px 16px"},tt=(0,d.memo)((function({active:e,margin:t=-17,e2eTag:i,onKeyDown:r,onBlur:u,disableToggleTheme:N}){var q,Ae,Fe,Be,Me,Ne,qe,Ue,We;const{direction:He}=(0,n.u)(),ze=(0,m.s)(),{pathname:Ve,search:tt}=(0,c.useLocation)(),it=(0,$.w)(H.p2),ot=(0,c.useHistory)(),nt=(0,H.mU)(),{isInProductHoldout:at}=(0,h.Vv)(),{condenseProfileDropdown:rt}=(0,h.E1)(),st=(0,Ze.Y)(),{switchedType:lt}=(0,J.P)(_.Eq,{selector:e=>({switchedType:e.switchedType}),dependencies:[]}),dt=(0,Q.Nj)(v.y_),ct=(0,g.W)((()=>["user","language","abTestVersion","region"]),[]),ut=(0,f.U)((()=>["searchVideoForLoggedin","studioDownloadEntrance","liveStudioEnable","liveAnchorEntrance"]),[]),{isElectronApp:pt}=(0,y.B)(),{isVideoDetailExperiment:mt}=(0,h.ac)(),ht=mt||pt,_t=(0,b.ur)(),vt=(0,d.useCallback)((()=>{Z.R.handleClickGetApp({enter_method:"under_profile_icon_button"}),_t.setIsModalShow(!0)}),[_t]),gt=(0,d.useCallback)((e=>{13===e.keyCode&&vt()}),[vt]),ft=(0,d.useMemo)((()=>{var e,t;return null!==(t=null===(e=W.wX.find((({value:e})=>e===(null==ct?void 0:ct.language))))||void 0===e?void 0:e.label)&&void 0!==t?t:"Language"}),[null==ct?void 0:ct.language]),yt=null==ct?void 0:ct.user,bt=(0,d.useMemo)((()=>Ve===z.vI.studioDownload),[Ve]),xt=Boolean(null===(q=null==ut?void 0:ut.liveAnchorEntrance)||void 0===q?void 0:q.liveCenter),kt=Boolean(null===(Ae=null==ut?void 0:ut.liveAnchorEntrance)||void 0===Ae?void 0:Ae.creatorHub),wt=yt?H.HL.PORTRAIT:H.HL.MORE,Ct=(0,d.useMemo)((()=>(0,H.sw)(Ve)),[Ve]),[St,jt]=(0,$.S)(De.GC,{selector:e=>{var t;return null!==(t=e.redDot)&&void 0!==t?t:[]},dependencies:[]});(0,d.useEffect)((()=>{(null==yt?void 0:yt.uid)&&!nt&&it.getCreateRoomInfo({})}),[it,null==yt?void 0:yt.uid,nt]),(0,d.useEffect)((()=>{xt&&Y.Xg.handleLiveCenterShow({anchor_id:null==yt?void 0:yt.uid})}),[xt,null==yt?void 0:yt.uid]);const[It,Tt]=(0,d.useState)(!1),[Et,Pt]=(0,d.useState)(!1),[Ot,Lt]=(0,d.useState)("confirmLogout"),{keyboardMenuItem:Rt}=(({setShowKeyboardShortcut:e})=>{const t=(0,d.useCallback)((()=>{e(!0),te.q.handleEnterKeyboardShortcut(),j.Bv.setItem("hasCloseKeyboardShortcut",!0)}),[e]),i=(0,d.useCallback)((e=>{13===e.keyCode&&t()}),[t]);return{keyboardMenuItem:(0,o.jsx)(Je.K,{Icon:$e.A,text:"desktop_kb_shortcuts_menu",href:null,onClick:t,onKeyDown:i,e2eTag:"keyboard-shortcut-entrance"})}})({setShowKeyboardShortcut:Tt}),Dt=(0,J.P)(x.i,{selector:e=>e.hasNewFeedbackReply,dependencies:[]}),At=(0,d.useCallback)((()=>{if(!(null==yt?void 0:yt.uid)&&(0,k.mR)()){const e=new URLSearchParams(location.search);dt.handleRechargeLoginClick(Object.assign({click_area:v.oD.top_list_feedback,guided_from_app_type:"",request_page:"webapp",enter_from:e.get("enter_from"),enter_source:""},(0,k.h8)()))}X.S.handleEnterFeedback(Dt?"history":"new")}),[Dt,dt]),Ft=Dt?"/feedback/report":"/feedback",Bt=(0,d.useCallback)((e=>{13===e.keyCode&&At()}),[At]),Mt=(0,w.w)(),Nt=(0,C.U)({pathname:(0,S.fJR)({uniqueId:null!==(Fe=null==yt?void 0:yt.uniqueId)&&void 0!==Fe?Fe:"",secUid:null!==(Be=null==yt?void 0:yt.secUid)&&void 0!==Be?Be:""})}),qt=(0,d.useCallback)((e=>{ee.W.handleClickEntrance(),ee.W.handleEnterFavourite("click_my_favourite_entrance"),Mt(e,{href:Nt,state:{isJumpToFavorite:!0},shouldUsePush:!0})}),[Mt,Nt]),Ut=(0,d.useCallback)((e=>{13===e.keyCode&&qt(e)}),[qt]),Wt=(0,d.useCallback)((()=>{te.q.handleEnterSet({enter_method:"top_bar"})}),[]),Ht=(0,d.useCallback)((e=>{13===e.keyCode&&Wt()}),[Wt]),zt=(0,d.useCallback)((()=>{Tt(!1),j.Bv.setItem("hasCloseKeyboardShortcut",!0)}),[]),Vt=(0,d.useCallback)((()=>{Pt(!1),null==u||u(),ie.z.logoutCancel("linkPhoneOrEmailConfirmLogout"===Ot||"linkPhoneOrEmail"===Ot?{enter_method:"link_phone_number"}:{})}),[u,Ot]),[Kt,Gt]=(0,d.useState)(0),[$t,Jt]=(0,d.useState)(),Qt=(0,d.useCallback)((e=>{Jt(e)}),[]);(0,d.useEffect)((()=>{e?oe.U.handleDarkModeShow():Gt(0)}),[e]);const Zt=(0,d.useCallback)((()=>{ne.j.handleLanguageClick({enter_method:"top_bar"}),Gt(1),Qt(Re.o6)}),[Qt]),Yt=(0,d.useCallback)(((e="click")=>{ce.f.sendEvent("click_creator_tools",{enter_method:e}),Gt(2),Qt(Re.hc)}),[Qt]),Xt=(0,d.useCallback)((e=>{var t;13===e.keyCode&&(Zt(),null===(t=document.querySelector(`#${Re.hA}`))||void 0===t||t.focus())}),[Zt]),ei=(0,d.useCallback)((e=>{var t;13===e.keyCode&&(Yt("keydown"),null===(t=document.querySelector(`#${Re.hc}`))||void 0===t||t.focus())}),[Yt]),ti=(null==ut?void 0:ut.searchVideoForLoggedin)&&[V.$T.searchHome(),V.$T.searchVideo()].includes(Ve)||[V.$T.messages(),V.$T.upload()].includes(Ve),ii=(0,l.stringify)(s()((0,l.parse)(tt),"q","t","showLogin","loginType")),oi=ii?`?${ii}`:"",ni=`https://www.tiktok.com${V.$T.foryou()}${oi}`,ai=(0,d.useCallback)((()=>"undefined"==typeof window?"":`${(0,I.AF)()}${oi}`),[oi]),ri=(0,d.useCallback)((()=>{(0,T._S)(E.pF)&&(0,T.sc)(E.pF),(0,T._S)(E.Jq)&&(0,T.sc)(E.Jq),(0,P.iM)(ti?ni:ai(),"linkPhoneOrEmailConfirmLogout"===Ot||"linkPhoneOrEmail"===Ot?{enter_method:"link_phone_number"}:{})}),[ni,ai,ti,Ot]),si=(0,d.useCallback)((({enter_method:e="click",nav_name:t})=>{ce.f.sendEvent("click_nav_back",{enter_method:e,nav_name:t}),Gt(0),Jt(void 0)}),[]),li=(0,d.useCallback)((({enter_method:e="keydown",nav_name:t})=>i=>{var o;13!==i.keyCode&&32!==i.keyCode||(i.preventDefault(),i.stopPropagation(),si({enter_method:e,nav_name:t}),null===(o=document.querySelector(`#${Re.hA}`))||void 0===o||o.focus())}),[si]),{value:di,currentThemeOption:ci,setCurrentThemeOption:ui}=(0,d.useContext)(ue.xm),{isInAutoDarkModeControl:pi,isInAutoDarkModeTreatment:mi,isInAutoDarkModeExperiment:hi}=(0,h.WE)(),_i=(0,Q.Nj)(ae.Gs);(0,d.useEffect)((()=>{_i.setIsDarkMode(di)}),[_i,di]);const vi=(0,d.useCallback)((e=>{N||(oe.U.handleDarkModeClick(),pt&&p().app.themeChange({isDark:di}),a.A.set(O.HF,"1",O.Ah),null==ui||ui(e))}),[pt,N]),gi=(0,d.useCallback)((e=>t=>{13===t.keyCode&&vi(e)}),[vi]),fi="ltr"===He?"bottomRight":"bottomLeft",yi=(0,Ye.YS)(),bi=(0,d.useCallback)((e=>yt?(0,o.jsx)(Qe.np,{secUid:yt.secUid,uniqueId:yt.uniqueId,shouldStopPropagation:!1,reportTea:!1,teaParams:{to_user_id:yt.uid},style:et,forceSSR:yi,children:e}):null),[yt]),xi=(0,d.useCallback)((()=>{te.q.handleEnterProfile({enter_method:"top_bar"})}),[]),ki=(0,d.useCallback)((e=>{13===e.keyCode&&xi()}),[xi]),wi=(0,d.useCallback)((()=>{re.d.handleClickAnalyticsButton()}),[]),Ci=(0,d.useCallback)((e=>{13===e.keyCode&&wi()}),[wi]),Si=(0,d.useCallback)((()=>{const e=`${z.vI.studioDownload}?enter_from=profile`;pt&&window.open(e,"_blank"),window.location.href=e}),[pt]),ji=(0,d.useCallback)((e=>{13===e.keyCode&&Si()}),[Si]),Ii=(0,d.useCallback)((()=>{-1!==St.indexOf(2)&&jt.updateRedDot({type:2,redirect:`${location.origin}/business-suite`,isElectronApp:pt}),te.q.handleEnterBusiness()}),[St,jt,pt]),Ti=(0,d.useCallback)((e=>{13===e.keyCode&&Ii()}),[Ii]),[{atomState:Ei}]=(0,pe.I)(Ge.v),{rechargeEntryPermission:Pi,isWebRechargedBefore:Oi}=Ei,Li=(0,L.qt)(null==ct?void 0:ct.abTestVersion,"expose_recharge_entry_pc"),Ri=Pi&&!Ct&&(void 0===Li||"v1"===Li),Di=(0,h.ZO)()&&(null==yt?void 0:yt.suggestAccountBind);(0,d.useEffect)((()=>{Di&&Lt("linkPhoneOrEmail")}),[Di]);const[Ai,Fi]=(0,$.S)(H.F0);(0,d.useEffect)((()=>{yt&&Fi.getSubPermissionInfo({sec_anchor_id:null==yt?void 0:yt.secUid,need_current_state:!0})}),[Fi,ct]);const Bi=(0,d.useCallback)((()=>{dt.handleLiveWebGetCoinShow({show_page:"setting",is_web_recharged_before:Oi?"yes":"no",request_page:"webapp",style:"icon_and_text"})}),[dt,Oi]);(0,d.useEffect)((()=>{Ri&&Bi()}),[Ri,Bi]);const Mi=(0,d.useCallback)((()=>{dt.handleLiveWebGetCoinClick({show_page:"setting",is_web_recharged_before:Oi?"yes":"no",request_page:"webapp",style:"icon_and_text"})}),[dt,Oi]),Ni=(0,d.useCallback)((()=>{Mi();const e=`${K.I7.coin}?enter_from=web_main_nav`;pt?window.open(e,"_blank"):ot.push(e)}),[Mi,pt,ot]),qi=(0,d.useCallback)((e=>{13===e.keyCode&&Ni()}),[Ni]),Ui=(0,d.useMemo)((()=>!j.bc.getItem(Xe)||(null==yt?void 0:yt.hasCollectionsRedDot)),[null==yt?void 0:yt.hasCollectionsRedDot]),Wi=(0,d.useCallback)((()=>{se.I.handleEnterCollectionsPage(),j.bc.setItem(Xe,!0)}),[]),Hi=(0,d.useCallback)((e=>{13===e.keyCode&&Wi()}),[Wi]),zi=(0,d.useCallback)((e=>(0,o.jsx)(U,Object.assign({},e))),[]),Vi=(0,R.bc)(Ve,tt),Ki=(0,d.useCallback)((e=>{if(9===e.keyCode){if(!e.target)return;setTimeout((()=>{var e;try{const t=document.querySelector(`#${Re.hA}`);(null===(e=Array.from(null==t?void 0:t.querySelectorAll("*")))||void 0===e?void 0:e.includes(document.activeElement))||null==u||u()}catch(e){console.error(e)}}),0)}null==r||r(e)}),[u,r]),Gi=null!==(Me=(0,L.qt)(null==ct?void 0:ct.abTestVersion,"webapp_switch_account"))&&void 0!==Me?Me:"v1",$i="v1"!==(null!==(Ne=(0,L.qt)(null==ct?void 0:ct.abTestVersion,"creator_center_reverse"))&&void 0!==Ne?Ne:"v2")?"/tiktokstudio/analytics/overview?from=dropdown_button":"/analytics",Ji=(0,Q.Nj)(le.$F),Qi=(0,d.useCallback)((()=>{Lt("linkPhoneOrEmail"),Pt(!0),de._.handleLinkPhoneOrEmailPopupShow({enterMethod:"logout"}),null==u||u()}),[Lt,Pt,u]),Zi={loginPath:G.tH.linkPhoneOrEmail,isLinkPhoneOrEmail:!0},Yi=(0,D.K)(Zi,void 0,!0),Xi=(0,d.useCallback)((()=>{try{Pt(!1),null==u||u(),Yi()}catch(e){}}),[Pt,u,Yi]),eo=(0,d.useCallback)((()=>{Lt("linkPhoneOrEmailConfirmLogout"),null==u||u(),ie.z.logoutNotify({enter_method:"link_phone_number"})}),[Lt]),to=(0,d.useCallback)((()=>{Pt(!0),null==u||u(),ie.z.logoutNotify()}),[Pt,u]),io=(0,d.useCallback)((()=>{Lt("confirmLogout"),Pt(!0),null==u||u(),ie.z.logoutNotify()}),[Pt,u]),oo=(0,d.useCallback)((()=>{Lt("switchAccount"),Pt(!0),null==u||u(),Ji.switchAccountClick()}),[u,Ji]),no=Boolean((null==yt?void 0:yt.analyticsOn)&&!(null===(qe=yt.proAccountInfo)||void 0===qe?void 0:qe.businessSuiteEntrance)),ao=(0,o.jsx)(Je.K,{Icon:he.A,text:"view_analytics",forceSSR:!0,href:$i,target:pt?"_blank":"_self",e2eTag:"analytics-entrance",onClick:wi,onKeyDown:Ci,style:et}),ro=!!(null==yt?void 0:yt.hasPromoteEntry),so=(0,d.useCallback)((()=>{ce.f.sendEvent("Promote_entrance_click",{enter_from:"menu_creator_tool"})}),[]);(0,d.useEffect)((()=>{ro&&ce.f.sendEvent("Promote_entrance_show",{enter_from:"menu_creator_tool"})}),[ro]);const lo=(0,o.jsx)(Je.K,{Icon:Ee.x,text:"Promote_web_entrance_profile",href:"/promote/web/main?enter_from=menu_creator_tool",target:pt?"_blank":"_self",forceSSR:!0,onClick:so,onKeyDown:()=>{},style:et}),co=!bt&&(null===(Ue=null==ut?void 0:ut.liveAnchorEntrance)||void 0===Ue?void 0:Ue.liveStudio)&&!st,uo=(0,o.jsx)(Je.K,{Icon:_e.A,text:"ls_live_studio",forceSSR:!0,href:null,e2eTag:"live-studio-entrance",onClick:Si,onKeyDown:ji}),po=xt&&!pt,mo=(0,o.jsx)(Je.K,{Icon:ve.A,text:"live_center_title",href:`${H.Ox}?enter_from=${H.HL.PROFILE_HOVER}&lang=${null==ct?void 0:ct.language}`,target:pt?"_blank":void 0,forceSSR:!0,e2eTag:"live-center",style:et}),ho=kt&&!pt,_o=(0,o.jsx)(Je.K,{Icon:ge.A,text:"live_creator_hub_name",href:`${H.x2}?enter_from=${wt}&lang=${null==ct?void 0:ct.language}®ion=${null==ct?void 0:ct.region}`,target:pt?"_blank":void 0,forceSSR:!0,e2eTag:"live-creator-hub",style:et}),vo=ho||po||co||no||ro,go=(0,d.useCallback)((()=>(0,o.jsx)("svg",{style:{width:"16px",height:"20px"}})),[]),fo=(0,d.useCallback)((()=>(0,o.jsxs)(Qe.Dp,{"data-e2e":i,id:Re.hA,role:"listbox",children:[(0,o.jsx)(Je.K,{Icon:"ltr"===He?Pe.p:Oe.a,text:"pc_web_dark_mode",href:null,forceSSR:!0,onClick:()=>Gt(0),onKeyDown:()=>Gt(0)}),Ct||at||pi?null:(0,o.jsx)(Je.K,{withBorder:!0,Icon:"auto"===ci?Le.T:go,text:"web_dark_mode_automatic",href:null,forceSSR:!0,onClick:()=>vi("auto"),onKeyDown:()=>vi("auto")}),Ct||!at&&!hi||mi?null:(0,o.jsx)(Je.K,{withBorder:!0,Icon:"system"===ci?Le.T:go,text:"pc_web_device_theme",href:null,forceSSR:!0,onClick:()=>vi("system"),onKeyDown:()=>vi("system")}),(0,o.jsx)(Je.K,{Icon:"dark"===ci?Le.T:go,text:"pc_web_dark_mode",href:null,forceSSR:!0,onClick:()=>vi("dark"),onKeyDown:gi("dark")}),(0,o.jsx)(Je.K,{Icon:"light"===ci?Le.T:go,text:"pc_web_light_mode",href:null,forceSSR:!0,onClick:()=>vi("light"),onKeyDown:gi("light")})]})),[Ct,di,ci,He,vi]),{colors:yo}=(0,n.u)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(A.z,{backgroundColor:yo.BGSecondary,placement:fi,active:e,arrowMargin:15,margin:t,id:Re.hA,onKeyDown:Ki,ariaLabelledBy:$t,children:(()=>{var e;switch(Kt){case 0:return(0,o.jsxs)(Qe.Dp,{"data-e2e":i,id:Re.hA,role:"listbox",children:[yt&&(0,o.jsx)(Je.K,{renderLink:bi,onClick:xi,onKeyDown:ki,Icon:fe.A,text:"View profile",forceSSR:yi,href:null,e2eTag:"profile-info"}),yt&&!rt&&(0,o.jsx)(Je.K,{onClick:qt,onKeyDown:Ut,Icon:ye.A,text:"sortbyvv_profile_tab_text_favorites",href:null,forceSSR:yi}),Ri&&!pt&&(0,o.jsx)(Je.K,{Icon:be.A,text:"WebApp_coin_recharge_1",href:"/coin?enter_from=web_main_nav",target:pt?"_blank":void 0,forceSSR:!0,e2eTag:"recharge-entrance",onClick:Ni,onKeyDown:qi,style:et}),rt&&vo&&(0,o.jsx)(Je.K,{Icon:ve.A,text:"pcWeb_navi_creatorTools",href:null,onClick:()=>Yt("click"),onKeyDown:ei,forceSSR:yi,e2eTag:"creator-tools"}),Boolean(null==yt?void 0:yt.hasCollectionsAccess)&&(0,o.jsx)(Je.K,{Icon:zi,text:"tiktok_series_webapp_option",href:"/series",target:pt?"_blank":void 0,forceSSR:!0,e2eTag:"tiktok-series-entrance",hasNew:Ui,onClick:Wi,onKeyDown:Hi,style:et}),!rt&&no&&ao,!rt&&ro&&lo,(!rt&&co||st)&&uo,(null===(e=null==yt?void 0:yt.proAccountInfo)||void 0===e?void 0:e.businessSuiteEntrance)&&"personal_account"!==lt&&(0,o.jsx)(Je.K,{Icon:xe.A,text:"web_business_suite_entry",href:-1!==St.indexOf(2)?"":"/business-suite",target:pt?"_blank":void 0,forceSSR:!0,hasNew:-1!==St.indexOf(2),onClick:Ii,onKeyDown:Ti,e2eTag:"business-entrance",style:et}),!rt&&po&&mo,!rt&&ho&&_o,yt&&(0,o.jsx)(Je.K,{Icon:ke.A,text:pt?"desktop_app_accountSettings":"settings",href:"/setting",onClick:Wt,onKeyDown:Ht,forceSSR:!0,e2eTag:"settings-entrance",style:et}),(0,o.jsx)(Je.K,{Icon:we.A,text:ft,href:null,onClick:Zt,onKeyDown:Xt,e2eTag:"language-select",ariaLabel:ze("accessibilityLabels_settings_language",{language:ft}),forceSSR:yi}),(0,o.jsx)(Je.K,{Icon:Ce.A,text:"Feedback and help",href:Ft,onClick:At,onKeyDown:Bt,hasNew:Dt,forceSSR:!0,e2eTag:"feedback-entrance",style:et}),!rt&&Rt,Vi?(0,o.jsx)(Je.K,{Icon:Se.A,text:"pc_web_dark_mode",href:null,onClick:()=>Gt(3),onKeyDown:()=>Gt(3),ariaLabel:ze("accessibilityLabels_settings_darkModeOn"),forceSSR:yi}):null,ht&&(0,o.jsx)(Je.K,{onClick:vt,onKeyDown:gt,Icon:je.A,text:"get_app",href:null,forceSSR:!0}),yt&&("v1"!==Gi&&(null==yt?void 0:yt.hasIMPermission)&&!yt.ftcUser?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Je.K,{withBorder:!0,hasNewLabel:!0,Icon:Ie.A,text:"Web_loginDropdown_switchAccount",href:null,forceSSR:!0,onClick:oo,e2eTag:"switch-account-entrance"}),(0,o.jsx)(Je.K,{Icon:me.A,text:"Log out",href:null,forceSSR:!0,onClick:io,e2eTag:"logout-entrance"})]}):(0,o.jsx)(Je.K,{withBorder:!0,Icon:me.A,text:"Log out",href:null,forceSSR:!0,onClick:Di?Qi:to,e2eTag:"logout-entrance"}))]});case 1:return(0,o.jsx)(Ke,{onBack:()=>si({nav_name:"language_selector"}),onKeyDown:li({nav_name:"language_selector"}),onBlur:u});case 2:return(0,o.jsxs)(Qe.Dp,{"data-e2e":i,id:Re.hc,role:"listbox",children:[(0,o.jsxs)(Qe.Nq,{children:[(0,o.jsx)("i",{onClick:()=>si({nav_name:"creator_tools"}),tabIndex:0,onKeyDown:li({nav_name:"creator_tools"}),"aria-label":ze("accessibilityLabels_forYou_nav_language_back_btn"),role:"button",children:(0,o.jsx)(Qe.Ul,{})}),(0,o.jsx)(Qe.T8,{id:Re.hc,children:ze("pcWeb_navi_creatorTools")})]}),no&&ao,ro&&lo,co&&uo,po&&mo,ho&&_o]});case 3:return fo();default:return null}})()}),(0,o.jsx)(F.aF,{visible:It,onClose:zt,maskCloseable:!1,cancelMouseLeaveBubble:!0,children:(0,o.jsx)(B.S,{onClose:zt,isModal:!0})}),"v1"!==Gi&&(null===(We=null==ct?void 0:ct.user)||void 0===We?void 0:We.hasIMPermission)&&!ct.user.ftcUser?(0,o.jsx)(M.h,{shouldShowLogoutConfirm:Et,setShouldShowConfirmLogout:Pt,modalTypeToOpen:Ot}):(0,o.jsx)(F.aF,{visible:Et,onClose:Vt,maskCloseable:!0,cancelMouseLeaveBubble:!0,children:(0,o.jsx)((()=>"linkPhoneOrEmail"===Ot?(0,o.jsxs)(Qe.h0,{children:[(0,o.jsx)(Te.F,{size:40}),(0,o.jsx)(Qe.nm,{children:ze("login_fb_noLonger_LogInEase")}),(0,o.jsx)(Qe.aX,{children:ze("login_fb_noLonger_LinkPhoneNumberReminder")}),(0,o.jsx)(Qe.iZ,{size:"small",onClick:Xi,children:ze("login_fb_noLonger_LinkPhone")}),(0,o.jsx)(Qe.iZ,{size:"small",onClick:eo,children:(0,o.jsxs)("span",{style:{color:"rgba(255, 76, 58, 1)"},children:[" ",ze("Log out")," "]})})]}):(0,o.jsxs)(Qe.RA,{children:[(0,o.jsx)(Qe.C6,{children:ze("Log_out_sheet_2")}),"linkPhoneOrEmailConfirmLogout"===Ot&&(0,o.jsx)(Qe.rI,{children:ze("login_fb_confirmLogOut_body")}),(0,o.jsxs)(Qe.rs,{children:[(0,o.jsx)(Qe.AR,{size:"small",onClick:Vt,children:ze("linkPhoneOrEmailConfirmLogout"===Ot?"login_fb_confirmLogOut_stay_cta":"Cancel")}),(0,o.jsx)(Qe.AR,{size:"small",buttonTheme:"line",onClick:ri,children:ze("Log out")})]})]})),{})})]})}))},31476:(e,t,i)=>{"use strict";i.d(t,{K:()=>l});var o,n=i(24643),a=i(40099),r=i(25616),s=i(33399);!function(e){e[e.Main=0]="Main",e[e.Language=1]="Language",e[e.CreatorTools=2]="CreatorTools",e[e.DarkMode=3]="DarkMode"}(o||(o={}));const l=function({Icon:e,text:t,href:i,target:o,renderLink:l,withBorder:d,hasNew:c,hasNewLabel:u,forceSSR:p=!1,e2eTag:m,onClick:h,onKeyDown:_,nativeFocusable:v=Boolean(l)||Boolean(i),isNativeComposite:g=!1,ariaLabel:f,children:y,containerStyle:b,style:x}){const k=(0,r.s)(),w=(0,s.jD)(),C=(0,n.jsxs)(n.Fragment,{children:[e?(0,n.jsx)(e,{className:w}):null,(0,n.jsx)("span",{children:k(t)}),c&&(0,n.jsx)(s.Ff,{}),u&&(0,n.jsx)(s.FV,{children:k("Inbox_New")})]}),S=(0,a.useCallback)((e=>{32===e.keyCode&&!g&&e.preventDefault(),null==_||_(e)}),[_]);return(0,n.jsxs)(s.QB,{withBorder:d,"data-e2e":m,onClick:h,onKeyDown:S,style:b,tabIndex:v?void 0:0,needPadding:!v||g,role:"option","aria-label":f,children:[l?l(C):i?(0,n.jsx)(s.$7,{forceSSR:p,to:null!=i?i:"#",target:null!=o?o:"_self",onKeyDown:S,style:x,children:C}):(0,n.jsx)(s.rG,{style:x,children:C}),y]})}},33399:(e,t,i)=>{"use strict";i.d(t,{$7:()=>_,AR:()=>I,C6:()=>b,Dp:()=>u,FV:()=>c,Ff:()=>f,Nq:()=>P,QB:()=>p,RA:()=>k,T8:()=>O,Ul:()=>E,aX:()=>S,h0:()=>w,iZ:()=>T,jD:()=>y,nm:()=>C,np:()=>v,rG:()=>g,rI:()=>x,rs:()=>j});var o=i(66283),n=i(62186),a=i(12527),r=i(31355),s=i(85041),l=i(72153),d=i(97397);const c=(0,n.default)("div",{target:"e1q4ouk00"})((({theme:e,theme:{direction:t,colors:i},isShowAll:o,isControlByBtn:n})=>[(0,l.zy)({theme:e,color:"ConstTextInverse"}),{height:"20px",padding:"0 8px",borderRadius:"10px",backgroundColor:i.Primary,fontSize:"13px",lineHeight:"20px",fontWeight:600},(0,l.mp)({direction:t,marginStart:"6px"}),!n&&(0,l.jJ)({max:1071,style:[{display:"none"},(0,l.mp)({direction:t,marginStart:"0"})]}),n&&!1===o&&{display:"none"}]),"label:DivNewLabelContainer;"),u=(0,n.default)("ul",{target:"e1q4ouk01"})((({theme:e})=>(0,l.zy)({theme:e,typography:"P2",fontWeight:"semiBold",fontFamily:"TikTokFont"})),{padding:"8px 0",margin:0,minWidth:"223px",listStyle:"none"},"label:UlPopupContainer;"),p=(0,n.default)("li",{target:"e1q4ouk02"})((({theme:{colors:e},withBorder:t,needPadding:i})=>[{color:e.TextPrimary,padding:i?"10px 8px 10px 16px":0,":hover":{background:e.BGView},display:"flex",justifyContent:"space-between"},t?{borderTop:`1px solid ${e.LineSecondary}`}:null]),"label:LiItemWrapper;"),m={display:"flex",whiteSpace:"nowrap",flexDirection:"row",width:"100%",alignItems:"center",":hover":{textDecoration:"none"}},h=e=>Object.assign(Object.assign({},m),{gap:"8px",color:e.colors.TextPrimary,":hover, :active, :link, :visited":{textDecoration:"none",color:e.colors.TextPrimary}}),_=(0,n.default)(r.N_,{target:"e1q4ouk03"})((({theme:e})=>h(e)),"label:StyledLinkItem;"),v=(0,n.default)(s.E,{target:"e1q4ouk04"})((({theme:e})=>h(e)),"label:StyledUserLink;"),g=(0,n.default)("div",{target:"e1q4ouk05"})((({theme:e})=>h(e)),"label:DivSettingItem;"),f=(0,n.default)("i",{target:"e1q4ouk06"})((({theme:{colors:e}})=>[{width:"8px",height:"8px",borderRadius:"50%",background:e.Primary}]),"label:INewIcon;");function y(){return(0,o.AH)([{width:"20px",height:"20px",flex:"0 0 20px"}])}f.defaultProps=Object.assign(Object.assign({},f.defaultProps),{"data-e2e":"red-dot"});const b=(0,n.default)("div",{target:"e1q4ouk07"})((({theme:e})=>[(0,l.zy)({theme:e,typography:"P0",fontWeight:"bold",fontFamily:"TikTokFont"}),{padding:"0px 32px",width:"100%",textAlign:"center",color:e.colors.TextPrimary}]),"label:DivLogoutConfirmTitle;"),x=(0,n.default)("div",{target:"e1q4ouk08"})((({theme:e})=>[(0,l.zy)({theme:e,fontWeight:"normal",fontFamily:"TikTokFont"}),{fontSize:"15px",lineHeight:"19.5px",paddingTop:"12px",width:"100%",textAlign:"center",color:e.colors.TextPrimary,wordBreak:"break-word"}]),"label:DivLogoutConfirmDesc;"),k=(0,n.default)("div",{target:"e1q4ouk09"})((({theme:e})=>[{width:"400px",padding:"32px",display:"flex",boxSizing:"border-box",flexDirection:"column",alignItems:"center",backgroundColor:e.colors.BGSecondary,borderRadius:"8px",border:`1px solid ${e.colors.LineSecondary3}`,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.06)"}]),"label:DivLogoutConfirmContainer;"),w=(0,n.default)("div",{target:"e1q4ouk010"})({width:"280px",display:"flex",flexDirection:"column",alignItems:"center",borderRadius:"12px",paddingTop:"24px",overflow:"hidden"},"label:DivLogoutLinkPhoneContainer;"),C=(0,n.default)("div",{target:"e1q4ouk011"})((({theme:e})=>[(0,l.zy)({theme:e,typography:"P0",fontWeight:"bold",fontFamily:"TikTokFont",fontSize:"20px"}),{padding:"8px 20px",lineHeight:"25px",width:"100%",textAlign:"center",color:e.colors.TextPrimary}]),"label:DivLogoutLinkPhoneTitleContainer;"),S=(0,n.default)("div",{target:"e1q4ouk012"})((({theme:e})=>[(0,l.zy)({theme:e,fontWeight:"normal",fontFamily:"TikTokFont",fontSize:"15px"}),{padding:"12px 24px",lineHeight:"19.5px",width:"100%",textAlign:"center",color:e.colors.TextPrimary,wordWrap:"break-word"}]),"label:DivLogoutLinkPhoneDescContainer;"),j=(0,n.default)("div",{target:"e1q4ouk013"})([{display:"flex",width:"336px",justifyContent:"space-between",marginTop:"16px"}],"label:DivButtonWrapper;"),I=(0,n.default)(d.y,{target:"e1q4ouk014"})((({theme:{direction:e}})=>[(0,l.mp)({direction:e,end:"0"}),{width:"164px",height:"48px",padding:"0 10px"}]),"label:StyledLogoutButton;"),T=(0,n.default)(d.y,{target:"e1q4ouk015"})((({theme:{direction:e,colors:t}})=>[(0,l.mp)({direction:e,end:"0"}),{width:"100%",height:"48px",padding:"0 10px",borderRadius:"0",display:"flex",flexDirection:"column",border:"none",borderTop:`1px solid ${t.LineSecondary}`,textColor:"red"}]),"label:StyledLinkPhonePopupLogoutButton;"),E=(0,n.default)(a.A,{target:"e1q4ouk017"})((({theme:{direction:e}})=>["ltr"===e?{marginLeft:"16px"}:{transform:"rotate(180deg)",marginRight:"8px"}]),{width:"20px",height:"20px"},"label:StyledBackIcon;"),P=(0,n.default)("div",{target:"e1q4ouk018"})({display:"flex",position:"relative",height:"50px",borderBottom:"1px solid #E3E3E4",paddingTop:"13px"},"label:DivHeader;"),O=(0,n.default)("p",{target:"e1q4ouk019"})((({theme:e})=>[(0,l.zy)({theme:e,typography:"P2",fontWeight:"semiBold"}),(0,l.mp)({direction:e.direction,marginStart:"8px"})]),"label:PTitle;")},89005:(e,t,i)=>{"use strict";i.d(t,{p2:()=>$,Ox:()=>o,x2:()=>n,HL:()=>a,C6:()=>Ve,bG:()=>he,Ku:()=>u,rd:()=>Ee,QI:()=>Ue,$O:()=>We,F0:()=>Je,sw:()=>p.sw,Py:()=>m,AU:()=>J,mU:()=>v.mU,FU:()=>_.FU,JY:()=>h.J}),i(63705);const o="https://livecenter.tiktok.com",n="https://www.tiktok.com/live/creators",a={PROFILE_HOVER:"profile_hover",PORTRAIT:"portrait",MORE:"more",END_LIVE:"end_view_analytics"};var r=i(58632),s=i(38203),l=i(58305),d=i(45297);const c=6048e5;let u=class{constructor(){this.getGoLiveStreamKeyInfo=(e,t)=>{const i=(0,l._S)("__tiktok_stream_key");if(i){const{streamKey:e,expiration:o,roomId:n}=JSON.parse(i);if(o-Date.now()>1e3&&t===n)return{streamKey:e,expiration:o-Date.now(),roomId:n}}return{streamKey:e,roomId:t,expiration:c}},this.setGoLiveStreamKeyInfo=(e,t)=>{const i={streamKey:e,roomId:t,expiration:Date.now()+c};return(0,l.AP)("__tiktok_stream_key",JSON.stringify(i))},this.getGoLiveTopicId=e=>(0,l._S)("goLive_topic_id"+e),this.setGoLiveTopicId=(e,t)=>(0,l.AP)("goLive_topic_id"+t,e),this.getGoLiveGameTagId=e=>(0,l._S)("goLive_game_tag_id"+e),this.setGoLiveGameTagId=(e,t)=>(0,l.AP)("goLive_game_tag_id"+t,e),this.getGoLiveTopicShow=e=>!!e&&"0"===(0,l._S)(`__tiktok_topic_info${e}`,"0"),this.setGoLiveTopicShow=e=>(0,l.AP)(`__tiktok_topic_info${e}`,"1"),this.setGoLiveEndStreamSetting=e=>(0,l.AP)("go_live_stream_setting",e?"1":"0"),this.getGoLiveEndStreamSetting=()=>"1"===(0,l._S)("go_live_stream_setting","0"),this.setHideGoLiveMatureThemesRedDot=()=>(0,l.AP)("hide_go_live_mature_themes_red_dot","1"),this.getHideGoLiveMatureThemesRedDot=()=>"1"===(0,l._S)("hide_go_live_mature_themes_red_dot","0"),this.getLiveRoomPreviousPage=()=>{try{const{twoPrev:e}=JSON.parse((0,l.Hd)(d.QI));return!(0,l.Hd)(d.iJ)&&e}catch(e){return!1}}}setHasAppliedPermission(e){return(0,l.AP)(`go_live_permission_apply${e}`,"1")}getHasApplyPermissionBefore(e){return"1"===(0,l._S)(`go_live_permission_apply${e}`,"0")}getHasCompleteSubscriptionGuide(){return"1"===(0,l._S)("live_anchor_complete_subscription_guide","0")}setHasCompleteSubscriptionGuide(){return(0,l.AP)("live_anchor_complete_subscription_guide","1")}getSubscriptionSubOnlyChat(){return"1"===(0,l._S)("live_subscription_sub_only_chat","0")}setSubscriptionSubOnlyChat(e){return(0,l.AP)("live_subscription_sub_only_chat",e?"1":"0")}get studioDownloadVisited(){return"1"===(0,l._S)("studio_download_visited","0")}setStudioDownloadVisited(){return(0,l.AP)("studio_download_visited","1")}getSharePlatform(e){const t=(0,l._S)("webapp-share-platform");return t?JSON.parse(t)[e]:{}}setSharePlatform(e,t){return(0,l.AP)("webapp-share-platform",JSON.stringify({[e]:t}))}sortSharePlatform(e,t){var i,o;const n=null!==(i=this.getSharePlatform(e))&&void 0!==i?i:{},a=null!==(o=n[t])&&void 0!==o?o:0;if(n[t]=a+1,a===Number.MAX_SAFE_INTEGER){const e=Object.keys(n).sort(((e,t)=>{var i,o;return(null!==(i=n[e])&&void 0!==i?i:0)-(null!==(o=n[t])&&void 0!==o?o:0)}));e.forEach(((e,t)=>{n[e]=t}))}this.setSharePlatform(e,n)}getLiveCreatorHubPopup(){return"0"===(0,l._S)("webapp-live-creator-hub-popup","0")}setLiveCreatorHubPopup(e){return(0,l.AP)("webapp-live-creator-hub-popup",e?"1":"0")}};u=(0,r.__decorate)([(0,s._)()],u);var p=i(36523);const m=e=>parseInt((e/86400).toString());var h=i(91955),_=i(2759),v=i(99027),g=i(13392),f=i(64162),y=i(4126),b=i(93995),x=i(72916),k=i(95719),w=i(8536),C=i(46657),S=i(23999),j=i(74690),I=i(80339),T=i(20259),E=i(24451),P=i(62564),O=i(26324),L=i(22248),R=i(64407),D=i(11983),A=i(11917),F=i.n(A);const B="REPORT_FIRST_FRAME_SUCCESS_FOR_OPEN_LIVE_FLAG";function M(){(0,l.AP)(B,"1")}function N(){(0,l.sc)(B)}var q=i(11654);let U=class{constructor(e){this.service=e,this.defaultTag={where:"GoLive"},this.defaultMetrics={count:1},this.handlePlayerError=(e,t)=>{this.service.emitEvent("live_sdk_go_live_player_error",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{roomId:String(t),code:String(e.status),message:e.message}))},this.handleTraceSuccess=()=>{this.service.emitEvent("live_sdk_go_live_trace_success",this.defaultMetrics,this.defaultTag)},this.handleTraceError=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_go_live_trace_fail",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleCreateRoomSuccess=()=>{this.service.emitEvent("live_sdk_openLive_success",this.defaultMetrics,this.defaultTag)},this.handleCreateRoomFirstFrameSuccess=()=>{"1"===(0,l._S)(B)&&(this.service.emitEvent("live_sdk_openLive_preview_first_frame_success",this.defaultMetrics,this.defaultTag),N())},this.reportGoLiveError=e=>{this.service.sendLog(null==e?void 0:e.message,"error")},this.handleCreateRoomFail=({errorCode:e,errorMessage:t})=>{this.service.sendLog(null!=t?t:"","error"),this.service.emitEvent("live_sdk_openLive_error",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleCreateRoomWarning=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_openLive_warning",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleGoLiveStreamkeyError=()=>{this.service.emitEvent("live_sdk_openLive_streamkey_error",this.defaultMetrics,this.defaultTag)},this.handleGoLiveStreamurlError=()=>{this.service.emitEvent("live_sdk_openLive_serverUrl_error",this.defaultMetrics,this.defaultTag)},this.handleGetCreateRoomInfoSuccess=()=>{this.service.emitEvent("live_sdk_create_room_info_success",this.defaultMetrics,this.defaultTag)},this.handleGetCreateRoomInfoFail=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_craete_room_info_fail",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleEndLiveSuccess=()=>{this.service.emitEvent("live_sdk_end_live_success",this.defaultMetrics,this.defaultTag)},this.handleEndLiveFail=()=>{this.service.emitEvent("live_sdk_end_live_fail",this.defaultMetrics,this.defaultTag)},this.handleLoadingTooLong=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_go_live_page_loading_too_long",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleEndLiveDataFail=({errorCode:e,errorMessage:t})=>{this.service.emitEvent("live_sdk_end_live_data_fail",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{errorCode:e,errorMessage:t}))},this.handleEndLiveDataSuccess=()=>{this.service.emitEvent("live_sdk_end_live_data_success",this.defaultMetrics,this.defaultTag)}}};U=(0,r.__decorate)([(0,s._)(),(0,r.__metadata)("design:paramtypes",[q.V])],U);var W=i(16109),H=i(19824),z=i(26325),V=i(39228),K=i(43471);let G=class{constructor(e){this.fetch=e,this.getCreateInfo=()=>this.fetch.get("/webcast/room/create_info/",{query:{aid:d.xE},baseUrlType:5}),this.updateScreenshotStatus=e=>this.fetch.post("/webcast/room/screenshot_cover/update/",{query:e,baseUrlType:5,headers:{"Content-Type":z.Ty.FORM_ENCODE}}),this.createRoom=e=>this.fetch.post("/webcast/room/create/",{query:e,baseUrlType:5,headers:{"Content-Type":z.Ty.FORM_ENCODE}}).pipe((0,K.x)((e=>[4003035,20063].includes(e)))),this.endLive=()=>this.fetch.post("/webcast/room/finish_abnormal/",{baseUrlType:5}),this.setTopicTag=e=>this.fetch.post("/webcast/room/hashtag/set/",{query:e,baseUrlType:4,headers:{"Content-Type":z.Ty.FORM_ENCODE}}),this.uploadImage=e=>{const t=new FormData;return t.append("image",e),this.fetch.post("/webcast/room/upload/image/",{body:t,omitContentType:!0,baseUrlType:5})},this.getEndLiveInfo=e=>this.fetch.get("/webcast/data/data_center/room_stats/",{query:e,baseUrlType:5}),this.getLastBanRecord=e=>this.fetch.get("/webcast/review/get_latest_ban_record/",{query:Object.assign(Object.assign({},e),{ban_type:2}),baseUrlType:5})}};G=(0,r.__decorate)([(0,s._)(),(0,r.__metadata)("design:paramtypes",[V.pM])],G);let $=class extends f.E{constructor(e,t,i,o,n){super(),this.service=e,this.roomModule=t,this.streamModule=i,this.slardar=o,this.storage=n,this.defaultState={liveStatus:0,roomCreateInfo:null,showSuicidePrevention:!1,showAppealModal:!1,roomStats:null,isTempPermission:!1,streamKey:"",streamKeyExpiration:c,loadingState:{createRoomInfo:0,roomCreateInfo:0,OBSAccessRecallInfo:0}}}setLiveStatus(e,t){e.liveStatus=t}setIsTempPermission(e,t){e.isTempPermission=t}setRoomCreateInfo(e,t){e.roomCreateInfo=t}setRoomStatsData(e,t){e.roomStats=t}setLoadingState(e,t){e.loadingState=Object.assign(Object.assign({},e.loadingState),t)}setSuicidePrevention(e,t){e.showSuicidePrevention=t}setStreamKey(e,t){e.streamKey=t.streamKey,e.streamKeyExpiration=t.expiration}setAppealVisible(e,t){e.showAppealModal=t}getCreateRoomInfo(e){return e.pipe((0,x.n)((e=>{const{shouldGetRoomInfo:t}=e;return this.service.getCreateInfo().pipe((0,k.M)((({status_code:e})=>{(0,L.G)(e,[0])})),(0,w.Z)((({data:e,status_code:i})=>{if(0!==i)return this.slardar.handleGetCreateRoomInfoFail({errorCode:i.toString(),errorMessage:""}),this.slardar.handleTraceError({errorCode:"1002",errorMessage:`status_code: ${i}`}),C.w;const{live_status:o,ban_status:n}=e,a=!(null==n?void 0:n.is_ban),r=[2,1,3].includes(o);var s;return a&&t&&(s=o,F()(s)&&(1===s?M():N())),a&&r&&t?(0,S.of)():(0,S.of)(this.getActions().setRoomCreateInfo(e),this.getActions().setLiveStatus(o))})),(0,j.Z)(this.getActions().setLoadingState({roomCreateInfo:1})),(0,I.q)(this.getActions().setLoadingState({roomCreateInfo:2})),(0,T.W)((e=>(this.slardar.reportGoLiveError(e),this.slardar.handleTraceError({errorCode:"1002",errorMessage:e.message}),this.slardar.handleGetCreateRoomInfoFail({errorCode:"-1",errorMessage:e.message}),(0,S.of)(this.getActions().setLoadingState({roomCreateInfo:3}))))))})))}createRoomInfo(e){return e.pipe((0,E.E)(this.roomModule.state$),(0,w.Z)((([e])=>this.service.createRoom(e).pipe((0,w.Z)((({data:t,status_code:i})=>{var o;if(i&&0!==i)switch(i){case 2403:return this.slardar.handleCreateRoomWarning({errorCode:i.toString(),errorMessage:""}),(0,S.of)(this.getActions().setSuicidePrevention(!0),this.getActions().setLoadingState({createRoomInfo:3}));case 10018:case 4003035:return this.slardar.handleCreateRoomWarning({errorCode:i.toString(),errorMessage:""}),(0,S.of)(this.getActions().setLiveStatus(-1),this.getActions().setLoadingState({createRoomInfo:3}));case 50004:case 20063:case 30009:return this.slardar.handleCreateRoomWarning({errorCode:i.toString(),errorMessage:""}),(0,S.of)(this.getActions().setLoadingState({createRoomInfo:3}));case 4003105:return t.prompts&&D.F.open({content:t.prompts,duration:3}),this.slardar.handleCreateRoomWarning({errorCode:i.toString(),errorMessage:""}),(0,S.of)(this.getActions().setLoadingState({createRoomInfo:3}));default:throw new Error(`status_code: ${i}`)}return this.slardar.handleCreateRoomSuccess(),M(),this.slardar.handleTraceSuccess(),R.Xg.handleLiveStreamReport({anchor_id:null===(o=t.owner)||void 0===o?void 0:o.id_str,room_id:t.id_str,live_type:(null==t?void 0:t.live_type_third_party)?"third_party":"video_live",game_label:"",game_label_id:"",choose_hashtag_id:e.hashtag_id,choose_hashtag_name:"",cover_type:1===e.screenshot_cover_status?"screen_shot":"user_upload"}),(0,S.of)(...this.setRoomInfo(t),this.getActions().setLiveStatus(1),this.getActions().setLoadingState({createRoomInfo:2}))})),(0,j.Z)(this.getActions().setLoadingState({createRoomInfo:1})),(0,T.W)((e=>(this.slardar.handleTraceError({errorCode:"1003",errorMessage:e.message}),this.slardar.handleCreateRoomFail({errorCode:"-1",errorMessage:e.message}),(0,S.of)(this.getActions().setLoadingState({createRoomInfo:3})))))))))}setRoomInfo(e){var t,i;const o=[],[,n]=(0,p.mE)((0,p.aA)(e));if(n&&e.id_str){let t=n;const{streamKey:i,expiration:a}=this.storage.getGoLiveStreamKeyInfo(t,e.id_str);t!==i?t=i:this.storage.setGoLiveStreamKeyInfo(t,e.id_str),o.push(this.getActions().setStreamKey({streamKey:t,expiration:a}))}return o.push(this.roomModule.getActions().setRoomInfo(e)),o.push(this.streamModule.getActions().updateRoomStream({pullData:null===(i=null===(t=e.stream_url)||void 0===t?void 0:t.live_core_sdk_data)||void 0===i?void 0:i.pull_data,streamId:e.id_str})),o}endLive(e){return e.pipe((0,w.Z)((()=>this.service.endLive().pipe((0,w.Z)((()=>(this.slardar.handleEndLiveSuccess(),(0,S.of)(this.getActions().setLiveStatus(4),this.streamModule.getActions().setStreamInfo([]))))),(0,T.W)((e=>(this.slardar.handleEndLiveFail(),this.slardar.reportGoLiveError(e),C.w)))))))}setTopicTag(e){return e.pipe((0,x.n)((e=>this.service.setTopicTag(e).pipe((0,P.T)((()=>this.noop())),(0,T.W)((e=>(this.slardar.reportGoLiveError(e),C.w)))))))}getRoomStatsData(e){return e.pipe((0,w.Z)((e=>this.service.getEndLiveInfo({room_id:e}).pipe((0,k.M)((({status_code:e})=>{(0,L.G)(e,[0])})),(0,w.Z)((({data:e})=>(0,S.of)(this.getActions().setRoomStatsData(e.room_stats)))),(0,T.W)((e=>(this.slardar.reportGoLiveError(e),C.w)))))))}};function J(){const{liveStatus:e}=(0,g.Ph)($);return(0,p.Jf)(e)}(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Number]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"setLiveStatus",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"setIsTempPermission",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Object]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"setRoomCreateInfo",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Object]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"setRoomStatsData",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Object]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"setLoadingState",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"setSuicidePrevention",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Object]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"setStreamKey",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"setAppealVisible",null),(0,r.__decorate)([(0,y.Mj)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[O.c]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"getCreateRoomInfo",null),(0,r.__decorate)([(0,y.Mj)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[O.c]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"createRoomInfo",null),(0,r.__decorate)([(0,y.Mj)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[O.c]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"endLive",null),(0,r.__decorate)([(0,y.Mj)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[O.c]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"setTopicTag",null),(0,r.__decorate)([(0,y.Mj)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[O.c]),(0,r.__metadata)("design:returntype",void 0)],$.prototype,"getRoomStatsData",null),$=(0,r.__decorate)([(0,b.n)("GoLive"),(0,r.__metadata)("design:paramtypes",[G,W.Q,H.T,U,u])],$);var Q=i(24643),Z=i(40099),Y=i(62186),X=i(72153);i(52845);const ee=(0,Y.default)("div",{target:"e1jtqgen1"})((({theme:e})=>[{position:"absolute",top:"50%",transform:`translateY(-50%) rotateY(${"rtl"===e.direction?180:0}deg)`,transformOrigin:"center center",width:"14px",height:"78px",zIndex:2,cursor:"pointer",borderTopRightRadius:13,borderBottomRightRadius:13,backgroundColor:e.colors.BGPrimary,paddingLeft:1},(0,X.mp)({direction:e.direction,end:-12})]),"label:DivSideNavToggleBtnContainer;"),te=(0,Y.default)("div",{target:"e1jtqgen2"})((({theme:e,isShowAll:t})=>[{position:"relative",width:"13px",height:"100%",borderTopRightRadius:12,borderBottomRightRadius:12,backgroundColor:e.colors.BGPrimary,display:"flex",justifyContent:"center",alignItems:"center",boxShadow:t?"none":`2px 0px 4px -1px ${e.colors.ShadowSecondary}`,border:`1px solid ${e.colors.LineSecondary}`,borderLeft:"none",":hover svg path":{fill:e.colors.TextPrimary,fillOpacity:1,opacity:1}}]),"label:DivSideNavToggleBtn;"),ie=(0,Y.default)("div",{target:"e1jtqgen3"})((({isShowAll:e,theme:{direction:t,colors:i}})=>{const o="rtl"===t;return[{transformOrigin:"center center",width:4.43,height:15.8,"&>svg path":{fill:i.TextPrimary}},e&&{transform:"rotateY(180deg)",marginInlineStart:o?3:0,marginInlineEnd:o?0:3}]}),"label:DivSideNavToggleBtnIconWrapper;");var oe=i(84987);const ne={id:"side-nav-arrow-icon-a9490a31",use:"side-nav-arrow-icon-a9490a31-usage",viewBox:"0 0 5 16",content:''};function ae(e){const t=(0,Z.useContext)(oe.X);return(0,Z.useLayoutEffect)((()=>(t.add(ne),()=>{t.remove("side-nav-arrow-icon-a9490a31")})),[]),(0,Q.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,Q.jsx)("use",{xlinkHref:"#side-nav-arrow-icon-a9490a31"},void 0)}),void 0)}var re=i(48007),se=i(97086),le=i(78662),de=i(90159),ce=i(96926),ue=i(41484),pe=i(47172),me=i(72687);const he=()=>{var e,t;const{setShow:i,playerContainerRef:o,isShowAll:n}=(0,re.r)((e=>({setShow:e.setShow,playerContainerRef:e.playerContainerRef,scrollDomRef:e.scrollDomRef,isShowAll:e.show})),ue.A),[a,r]=(0,Z.useState)(-1),{enterRoomLoadingState:s}=(0,g.Ph)(W.Q,{selector:e=>({enterRoomLoadingState:e.loadingState.enterRoom}),dependencies:[]}),{handleSideBarToggleBtnClickReport:l}=(()=>{var e;const t=(0,g.Ph)(W.Q,{selector:e=>e.roomInfo,dependencies:[]}),i=(0,Z.useCallback)((e=>{var i;const o=(0,p.TC)();me.fF.handleSideBarToggleBtnClick(Object.assign({type:e,room_id:o?null==t?void 0:t.id_str:void 0,anchor_id:o?null===(i=null==t?void 0:t.owner)||void 0===i?void 0:i.id_str:void 0},(0,p.Gc)()))}),[null==t?void 0:t.id_str,null===(e=null==t?void 0:t.owner)||void 0===e?void 0:e.id_str]);return{handleSideBarToggleBtnClickReport:i}})(),{pathname:d}=(0,pe.useLocation)(),c=(0,Z.useRef)(n),u=(0,Z.useRef)(((0,se.fU)()?0:null!==(t=null===(e=null===document||void 0===document?void 0:document.documentElement)||void 0===e?void 0:e.offsetWidth)&&void 0!==t?t:1072)+1);c.current=n;const m=(0,Z.useCallback)((()=>{const e=document.documentElement.offsetWidth;e=1072&&e<1072&&c.current&&i(!1),u.current=e}),[i]),h=(0,Z.useCallback)((()=>{if(!o.current||!(0,le.qd)(d))return;const{offsetTop:e,offsetHeight:t}=o.current;r(e+t/2)}),[d,o]),_=(0,de._g)((()=>{m()}),[m],200),v=(0,Z.useCallback)((()=>{document.documentElement.offsetWidth<1072&&c.current&&i(!1)}),[i]),f=(0,Z.useCallback)((()=>{i(!n),l(n?"close":"open")}),[l,n,i]),y=(0,Z.useMemo)((()=>(0,le.qd)(d)?{top:a,display:a<0?"none":"flex"}:{top:"50%"}),[a,d]);return(0,Z.useEffect)((()=>{if(!(0,se.fU)())return window.addEventListener("resize",_),()=>{window.removeEventListener("resize",_)}}),[_]),(0,Z.useEffect)((()=>{(0,se.fU)()||document.documentElement.offsetWidth<=761&&h()}),[n]),(0,Z.useEffect)((()=>{(0,se.fU)()||document.documentElement.offsetWidth<=761&&2===s&&h()}),[s,h]),(0,ce.w)({element:o,callback:h}),(0,Z.useEffect)((()=>{v()}),[v]),(0,Q.jsx)(ee,{onClick:f,style:y,children:(0,Q.jsx)(te,{isShowAll:n,children:(0,Q.jsx)(ie,{isShowAll:n,children:(0,Q.jsx)(ae,{width:4.35,height:15.8})})})})};var _e=i(25616),ve=i(95481);const ge="=+~#$@",fe={"[]":/\[([^[\]]+)\]/g,"{}":/\{([^{}]*)\}/g,"%s":/%s/g,"<>":/<([^<>]*)>/g},ye=({text:e,matchArr:t,replaceComponents:i})=>{const[o,n]=(0,Z.useState)([]);return(0,Z.useEffect)((()=>{let o=[];const a=[],r=fe[t];let s=e;s=e.replace(r,((...e)=>(a.push(e[1]),ge))),o=s.split(ge);const l=[];o.forEach(((e,t)=>{if(l.push(e),a.length>t&&i.length>0){const e=i[t%i.length];l.push((0,Q.jsx)(e,{text:a[t],matchIndex:t},t))}})),n(l)}),[e,t,i]),(0,Q.jsx)(Q.Fragment,{children:o})};var be=i(97397);const xe={id:"video-warning-6aa70834",use:"video-warning-6aa70834-usage",viewBox:"0 0 84 81",content:''};function ke(e){const t=(0,Z.useContext)(oe.X);return(0,Z.useLayoutEffect)((()=>(t.add(xe),()=>{t.remove("video-warning-6aa70834")})),[]),(0,Q.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,Q.jsx)("use",{xlinkHref:"#video-warning-6aa70834"},void 0)}),void 0)}const we=(0,Y.default)("div",{target:"e7uajn40"})({width:400,display:"flex",flexDirection:"column",alignItems:"center",padding:"36px 19px 32px 19px"},"label:DivContainer;"),Ce=(0,Y.default)(ke,{target:"e7uajn41"})([{width:83,height:81,marginBottom:24}],"label:StyledVideoWarningIcon;"),Se=(0,Y.default)("div",{target:"e7uajn42"})((({theme:e})=>[(0,X.zy)({theme:e,typography:"P3",fontFamily:"TikTokFont",color:"TextPrimary"}),{textAlign:"center",marginBottom:24}]),"label:DivContent;"),je=(0,Y.default)("div",{target:"e7uajn43"})((({theme:e})=>[(0,X.zy)({theme:e,typography:"P4",fontFamily:"TikTokFont",color:"TextTertiary"}),{marginBottom:24}]),"label:DivTips;"),Ie=(0,Y.default)("span",{target:"e7uajn44"})((({theme:e})=>[(0,X.zy)({theme:e,typography:"P4",fontFamily:"TikTokFont",color:"Primary"}),{marginBottom:24}]),"label:SpanTipsHighlight;"),Te=(0,Y.default)(be.y,{target:"e7uajn45"})((({theme:e})=>[(0,X.zy)({theme:e,typography:"P3",fontFamily:"TikTokFont",color:"ConstTextInverse",fontWeight:"semiBold"}),{padding:"12px auto",textAlign:"center",width:"100%",backgroundColor:e.colors.Primary,":hover":{backgroundColor:e.colors.Primary}}]),"label:StyledButton;"),Ee=function({onOkClick:e,visible:t,duration:i}){const o=(0,_e.s)(),n=(0,Z.useMemo)((()=>[({text:e})=>(0,Q.jsx)(Ie,{children:e})]),[]);return(0,Q.jsx)(ve.aF,{visible:t,maskClosable:!1,children:(0,Q.jsxs)(we,{children:[(0,Q.jsx)(Ce,{}),(0,Q.jsx)(Se,{children:o("pm_mt_obs_revoke_desc")}),(0,Q.jsx)(je,{children:(0,Q.jsx)(ye,{text:o("pm_mt_revoke_duration",{num:i,number:i}).replace("%s",i),matchArr:"%s",replaceComponents:n})}),(0,Q.jsx)(Te,{type:"submit",onClick:e,children:o("pm_mt_modal_revoke_confirm_btn")})]})})};var Pe=i(47236),Oe=i(84483),Le=i(91953),Re=i(50970),De=i(60324),Ae=i(64152),Fe=i(85722);const Be=()=>{const{user:e}=(0,g.Ph)(Re.L,{selector:e=>{var t;return{user:null===(t=e.appContext)||void 0===t?void 0:t.user}},dependencies:[]}),t=null==e?void 0:e.uid,{data:i}=(0,De.A)((()=>function(e){return t=this,i=void 0,n=function*(){const t=yield V.hd.get("/tiktok/event/feed/v1",{query:e,baseUrlType:4});if(0===t.status_code)return(t.data||[]).map((e=>{var t,i;return(null===(t=e.data)||void 0===t?void 0:t.owner.is_verified)&&(e.data.owner.verified=!0),(null===(i=e.data)||void 0===i?void 0:i.owner.unique_id)&&(e.data.owner.display_id=e.data.owner.unique_id),e.data&&(e.data.id_str=e.data.room_id),e}))},new((o=void 0)||(o=Promise))((function(e,a){function r(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(r,s)}l((n=n.apply(t,i||[])).next())}));var t,i,o,n}({count:5,query_type:3})),{pollingInterval:6e4,ready:!!t}),o=(0,pe.useHistory)(),n=(0,Ae.A)((e=>{var t,i;const n=null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.owner)||void 0===i?void 0:i.display_id;n&&o.push(`/@${n}/live`)})),a=(0,Ae.A)((()=>{})),{sortVid:r}=(0,Fe.Ih)();return{renderData:(0,Z.useMemo)((()=>"v1"===r&&i&&i.length>0?[...i].sort(((e,t)=>{var i,o;return((null===(i=e.data)||void 0===i?void 0:i.user_count)||0)>((null===(o=t.data)||void 0===o?void 0:o.user_count)||0)?-1:1})):i),[r,i]),handleItemClick:n,handleItemVisible:a}},Me=(0,Y.default)("div",{target:"e198i95u0"})({transition:"transform .4s ease-in"},"label:DivSideNavEventTransition;");var Ne=i(73580),qe=i(28033);(0,Z.memo)((e=>{const{isControlByBtn:t}=e,i=(0,_e.s)(),{renderData:o,handleItemClick:n,handleItemVisible:a}=Be(),r=(0,Ne.Nj)(qe.h);(0,Z.useEffect)((()=>{(null==o?void 0:o.length)&&r.handleLiveSideEvent()}),[o,r]);const s=!!(null==o?void 0:o.length);return(0,Q.jsx)(Me,{style:{transform:`translate(${s?"0":"240px"})`},children:s&&(0,Q.jsx)(Le.T,{title:i("ttep_effect_details_page_category_events"),loading:!1,list:o,onItemClick:n,onItemVisible:a,sideBarTeaType:"event",isControlByBtn:t})})}));const Ue=(0,Pe.Ay)({resolved:{},chunkName:()=>"side-follow-channel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(5390),i.e(8102)]).then(i.bind(i,47096)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>47096},{ssr:!1,fallback:(0,Q.jsx)(Oe.C,{})}),We=((0,Pe.Ay)({resolved:{},chunkName:()=>"side-follow-channel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(5390),i.e(8102)]).then(i.bind(i,47096)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>47096},{ssr:!1}),(0,Pe.Ay)({resolved:{},chunkName:()=>"side-suggest-channel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(5390),i.e(4701)]).then(i.bind(i,20579)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>20579},{ssr:!1,fallback:(0,Q.jsx)(Oe.C,{})}));(0,Pe.Ay)({resolved:{},chunkName:()=>"side-suggest-channel",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(5390),i.e(4701)]).then(i.bind(i,20579)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>20579},{ssr:!1});var He=i(37530);let ze=class{constructor(e){this.fetch=e,this.judgeActivityPermission=()=>this.fetch.post("/webcast/game/live_permission/judge_activity_permission/",{baseUrlType:4}).pipe((0,K.x)()),this.getLivePermission=()=>this.fetch.get("/webcast/room/live_podcast/",{baseUrlType:4}).pipe((0,K.x)()),this.applyPermission=e=>this.fetch.post("/webcast/room/live_permission/apply/",{query:e,baseUrlType:4}).pipe((0,K.x)()),this.getApplyInfo=e=>this.fetch.get("/webcast/room/live_permission/apply_info/",{query:e,baseUrlType:4}).pipe((0,K.x)())}};ze=(0,r.__decorate)([(0,s._)(),(0,r.__metadata)("design:paramtypes",[V.pM])],ze);let Ve=class extends f.E{constructor(e,t,i){super(),this.service=e,this.errorSlardar=t,this.goLiveSlardar=i,this.defaultState={}}setPermissionData(e,t){e.permissionInfo={canStartLive:t.canStartLive,showComputerLiveEntrance:t.showComputerLiveEntrance,hasOBSLivePermission:t.hasOBSLivePermission,hasLiveApplyPermission:t.hasLiveApplyPermission,showLiveStudio:t.showLiveStudio,topLSEntranceVisible:!!t.topLSEntranceVisible}}getLivePermission(e){return e.pipe((0,w.Z)((()=>this.service.getLivePermission().pipe((0,w.Z)((({data:e,error:t})=>{var i,o,n,a,r,s;if(t)return(0,S.of)(this.getActions().setPermissionData({canStartLive:!1,showComputerLiveEntrance:!1,hasOBSLivePermission:!1,hasLiveApplyPermission:!1,showLiveStudio:!1,topLSEntranceVisible:!1}));if(null==e?void 0:e.can_be_live_podcast){const t=null!==(o=null===(i=null==e?void 0:e.live_scenario)||void 0===i?void 0:i.enable_live_third_party)&&void 0!==o&&o,l=!t&&null!==(a=null===(n=null==e?void 0:e.live_permission_apply)||void 0===n?void 0:n.enable_third_party)&&void 0!==a&&a,d=null!==(r=null==e?void 0:e.show_live_studio)&&void 0!==r&&r,c=!(!(null==e?void 0:e.show_live_studio)||!(null===(s=null==e?void 0:e.live_scenario)||void 0===s?void 0:s.enable_live_studio));return(0,S.of)(this.getActions().setPermissionData({canStartLive:e.can_be_live_podcast,showComputerLiveEntrance:t||l,hasOBSLivePermission:t,hasLiveApplyPermission:l,showLiveStudio:d,topLSEntranceVisible:c}))}return(0,S.of)(this.getActions().setPermissionData({canStartLive:!1,showComputerLiveEntrance:!1,hasOBSLivePermission:!1,hasLiveApplyPermission:!1,showLiveStudio:!1,topLSEntranceVisible:!1}))})),(0,T.W)((e=>(this.goLiveSlardar.handleTraceError({errorCode:"1001",errorMessage:e.message}),this.errorSlardar.reportErrorLog(e),C.w)))))))}};(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Object]),(0,r.__metadata)("design:returntype",void 0)],Ve.prototype,"setPermissionData",null),(0,r.__decorate)([(0,y.Mj)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[O.c]),(0,r.__metadata)("design:returntype",void 0)],Ve.prototype,"getLivePermission",null),Ve=(0,r.__decorate)([(0,b.n)("LivePermission"),(0,r.__metadata)("design:paramtypes",[ze,He.m,U])],Ve);var Ke=i(35572);let Ge=class{constructor(e){this.service=e,this.defaultTag={where:"Subscription"},this.defaultMetrics={count:1},this.reportError=e=>{this.service.sendLog(null==e?void 0:e.message,"error")},this.handleUploadEmoteError=e=>{this.reportError(e),this.service.emitEvent("live_sdk_subscription_upload_emote_error",this.defaultMetrics,this.defaultTag)},this.handleGetEmoteDetailSuccess=()=>{this.service.emitEvent("live_sdk_subscription_get_emote_success",this.defaultMetrics,this.defaultTag)},this.handleGetEmoteDetailError=(e,t)=>{try{const i=Object.assign({},this.defaultTag);(null==e?void 0:e.message)?(i.status_msg=e.message,this.reportError(e)):t&&(i.status_msg=t),this.service.emitEvent("live_sdk_subscription_get_emote_error",this.defaultMetrics,i)}catch(e){}},this.handleGetBadgeDetailError=e=>{this.reportError(e),this.service.emitEvent("live_sdk_subscription_get_badge_detail_error",this.defaultMetrics,this.defaultTag)},this.handleUpdateBadgeError=e=>{this.reportError(e),this.service.emitEvent("live_sdk_subscription_update_badge_error",this.defaultMetrics,this.defaultTag)},this.handlePermissionError=e=>{this.reportError(e),this.service.emitEvent("live_sdk_subscription_get_permission_error",this.defaultMetrics,this.defaultTag)}}};Ge=(0,r.__decorate)([(0,s._)(),(0,r.__metadata)("design:paramtypes",[q.V])],Ge);let $e=class{constructor(e){this.fetch=e,this.getSubPermissionInfo=e=>this.fetch.get("/webcast/sub/privilege/get_sub_info",{query:e,baseUrlType:4}),this.getDetails=e=>this.fetch.get("/webcast/sub/privilege/get_sub_privilege_detail",{query:{sec_anchor_id:e,for_anchor:!0},baseUrlType:4}),this.getBadgeDetail=e=>this.fetch.get("/webcast/sub/privilege/get_sub_badge_detail",{query:e,baseUrlType:4}),this.getSubscriberList=e=>this.fetch.get("/webcast/sub/anchor/subscriber/",{query:e,baseUrlType:4}),this.updateBadge=e=>this.fetch.post("/webcast/sub/privilege/update_badge",{body:JSON.stringify(e),headers:{"Content-Type":"application/json"},baseUrlType:4}),this.getEmoteDetail=e=>this.fetch.get("/webcast/sub/privilege/get_sub_emote_detail/",{query:e,baseUrlType:4}),this.updateEmote=e=>this.fetch.post("/webcast/sub/privilege/update_emote",{body:JSON.stringify(Object.assign({},e)),headers:{"Content-Type":"application/json"},baseUrlType:4}),this.uploadImage=e=>{const t=new FormData;return t.append("data",e),this.fetch.post("/webcast/resource/upload/",{query:{scene:"tikcast_subscription"},body:t,omitContentType:!0,baseUrlType:4})}}};$e=(0,r.__decorate)([(0,s._)(),(0,r.__metadata)("design:paramtypes",[V.pM])],$e);let Je=class extends f.E{constructor(e,t){super(),this.service=e,this.slardar=t,this.defaultState={loading:0,showInitModal:!1,showUpdateModal:!1,enableSubscription:!1,initializedSubscription:!1,emoteStatus:0,badgeStatus:0,hasFetchedPermission:!1,initStep:0,hasEditEmote:!1,hasEditBadge:!1}}setEnableSubscription(e,t){e.enableSubscription=t}setInitializedSubscription(e,t){e.initializedSubscription=t}setBadgeStatus(e,t){e.badgeStatus=t}setEmoteStatus(e,t){e.emoteStatus=t}setLoading(e,t){e.loading=t}setShowInitModal(e,t){e.showInitModal=t}setShowUpdateModal(e,t){e.showUpdateModal=t}setInitStep(e,t){e.initStep=t}setHasFetchedPermission(e,t){e.hasFetchedPermission=t}setHasEditEmote(e,t){e.hasEditEmote=t}setHasEditBadge(e,t){e.hasEditBadge=t}getSubPermissionInfo(e){return e.pipe((0,E.E)(this.state$),(0,Ke.p)((([e,{hasFetchedPermission:t}])=>t?(0,S.of)(this.noop()):this.service.getSubPermissionInfo(e).pipe((0,w.Z)((({status_code:e,data:t})=>{var i,o;if(0!==e||!t)return(0,S.of)(this.noop());const{enable:n,initialized:a,badge_info:r,emote_info:s}=t;return(0,S.of)(this.getActions().setEnableSubscription(null!=n&&n),this.getActions().setInitializedSubscription(null!=a&&a),this.getActions().setBadgeStatus(null!==(i=null==r?void 0:r.current_status)&&void 0!==i?i:0),this.getActions().setEmoteStatus(null!==(o=null==s?void 0:s.current_status)&&void 0!==o?o:0),this.getActions().setHasFetchedPermission(!0))})),(0,j.Z)(this.getActions().setLoading(1)),(0,I.q)(this.getActions().setLoading(2)),(0,T.W)((e=>(this.slardar.handlePermissionError(e),(0,S.of)(this.noop()))))))))}};(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setEnableSubscription",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setInitializedSubscription",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Number]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setBadgeStatus",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Number]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setEmoteStatus",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Number]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setLoading",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setShowInitModal",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setShowUpdateModal",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Number]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setInitStep",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setHasFetchedPermission",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setHasEditEmote",null),(0,r.__decorate)([(0,y.h5)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[Object,Boolean]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"setHasEditBadge",null),(0,r.__decorate)([(0,y.Mj)(),(0,r.__metadata)("design:type",Function),(0,r.__metadata)("design:paramtypes",[O.c]),(0,r.__metadata)("design:returntype",void 0)],Je.prototype,"getSubPermissionInfo",null),Je=(0,r.__decorate)([(0,b.n)("SubscriptionCommonModule"),(0,r.__metadata)("design:paramtypes",[$e,Ge])],Je);var Qe=i(89933);i.n(Qe)()("live-shared-lite")("Using the lite mode.")},27231:(e,t,i)=>{"use strict";i.d(t,{t:()=>o});const o={}},63635:(e,t,i)=>{"use strict";i.d(t,{B:()=>n});var o=i(8227);function n(e){return o.O.liveRoom({uniqueId:e}).replace(/^\//,"/@")}},99027:(e,t,i)=>{"use strict";i.d(t,{Pl:()=>s,mU:()=>r});var o=i(40099),n=i(47172),a=i(8227);function r(){const{pathname:e}=(0,n.useLocation)();return(0,o.useMemo)((()=>(0,n.matchPath)(e,{path:a.vI.liveGoLive,exact:!0})),[e])}function s(){const{pathname:e}=(0,n.useLocation)();return(0,o.useMemo)((()=>Boolean((0,n.matchPath)(e,{path:a.vI.liveDiscover,exact:!0}))),[e])}},2759:(e,t,i)=>{"use strict";i.d(t,{nH:()=>r,FU:()=>s}),i(24643),i(32877);var o=i(40099),n=i(49057),a=i(48615);function r(){const e=(0,n.W)((()=>["user"]),[]);return(0,o.useMemo)((()=>Boolean(null==e?void 0:e.user)),[e])}function s(){const e=(0,n.W)((()=>["region"]),[]),t=(0,a.U)((()=>["liveCommonConfig","liveSuggestConfig"]),[]);return(0,o.useMemo)((()=>{var i,o;const n=null===(i=null==t?void 0:t.liveSuggestConfig)||void 0===i?void 0:i.isBlockedArea;return!(!(null===(o=null==t?void 0:t.liveCommonConfig)||void 0===o?void 0:o.regionEntry)||"CN"!==(null==e?void 0:e.region))||!n}),[e,t])}i(47172),i(27231)},28033:(e,t,i)=>{"use strict";i.d(t,{h:()=>r});var o=i(58632),n=i(38203),a=i(11654);let r=class{constructor(e){this.service=e,this.defaultTag={where:"LiveDiscover"},this.defaultMetrics={count:1},this.handleLiveFeedTrending=()=>{this.service.emitEvent("live_sdk_feed_trending",this.defaultMetrics,this.defaultTag)},this.handleLiveFeedFamiliar=()=>{this.service.emitEvent("live_sdk_feed_familiar",this.defaultMetrics,this.defaultTag)},this.handleLiveFeedRecommend=(e="0")=>{this.service.emitEvent("live_sdk_feed_recommend",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{is_feed:String(e)}))},this.handleLiveSideFeedSuggest=()=>{this.service.emitEvent("live_sdk_side_feed_suggest",this.defaultMetrics,this.defaultTag)},this.handleLiveSideFeedFollow=()=>{this.service.emitEvent("live_sdk_side_feed_follow",this.defaultMetrics,this.defaultTag)},this.handleLiveSideEvent=()=>{this.service.emitEvent("live_sdk_side_event",this.defaultMetrics,this.defaultTag)},this.handlePlayerError=(e,t,i="0")=>{this.service.emitEvent("live_sdk_discover_error",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{roomId:String(t),code:String(e.status),message:e.message,is_feed:String(i)}))}}handlePreceptionTextEmpty(e){this.service.emitEvent("live_preception_text_empty",this.defaultMetrics,e)}handleLiveFirstFrameSuccess(e){const{isFeed:t}=null!=e?e:{};this.service.emitEvent("live_sdk_feed_first_frame_success",this.defaultMetrics,Object.assign(Object.assign({},this.defaultTag),{is_feed:null!=t?t:"0"}))}handleLiveDiscoverPageShow(e){var t;this.service.emitEvent("live_sdk_discover_page_success",this.defaultMetrics,Object.assign(Object.assign(Object.assign({},this.defaultTag),e),{isFeed:null!==(t=null==e?void 0:e.isFeed)&&void 0!==t?t:"0"}))}};r=(0,o.__decorate)([(0,n._)(),(0,o.__metadata)("design:paramtypes",[a.V])],r)},37530:(e,t,i)=>{"use strict";i.d(t,{m:()=>r});var o=i(58632),n=i(38203),a=i(11654);let r=class{constructor(e){this.service=e,this.reportErrorLog=e=>{var t;this.service.sendLog(null!==(t=null==e?void 0:e.stack)&&void 0!==t?t:null==e?void 0:e.message,"error")}}};r=(0,o.__decorate)([(0,n._)(),(0,o.__metadata)("design:paramtypes",[a.V])],r)},85722:(e,t,i)=>{"use strict";i.d(t,{Ih:()=>c,L5:()=>d,lV:()=>s});var o=i(71281),n=i(57431),a=i(27231);let r;const s=()=>{var e,t,i;if(!r)try{const o=(0,n.x)();r=(null===(i=null===(t=null===(e=null==o?void 0:o.abTestVersion)||void 0===e?void 0:e.parameters)||void 0===t?void 0:t.live_abr_memo)||void 0===i?void 0:i.vid)||"v0"}catch(e){}return"v1"===r};let l;const d=()=>{var e,t,i;if(!l)try{const o=(0,n.x)();l=(null===(i=null===(t=null===(e=null==o?void 0:o.abTestVersion)||void 0===e?void 0:e.parameters)||void 0===t?void 0:t.live_stage_definition)||void 0===i?void 0:i.vid)||"v0"}catch(e){}return"v1"===l},c=()=>{const{abTestVersion:e}=a.t;return{avatarVid:(0,o.qt)(e,"webapp_live_nav_avatar"),switchVid:(0,o.qt)(e,"webapp_live_recommand_switch"),sortVid:(0,o.qt)(e,"webapp_live_recommand_sort")}}},43471:(e,t,i)=>{"use strict";i.d(t,{x:()=>r});var o=i(8536),n=i(23999),a=i(11983);function r(e){return(0,o.Z)((t=>{var i,o;return 0!==t.status_code&&(null===(i=t.data)||void 0===i?void 0:i.prompts)?((!e||e&&t.status_code&&(null==e?void 0:e(t.status_code)))&&a.F.open({content:null===(o=t.data)||void 0===o?void 0:o.prompts,duration:3}),(0,n.of)(Object.assign(Object.assign({},t),{error:t}))):(0,n.of)(t)}))}},36523:(e,t,i)=>{"use strict";i.d(t,{Ab:()=>h,Gc:()=>f,Jf:()=>c,TC:()=>_,aA:()=>p,mE:()=>u,sw:()=>m});var o=i(72828),n=i.n(o),a=i(4474),r=i(47172),s=i(97086),l=i(8227);const d=Object.values(l.vI);function c(e){return[1,2,3].includes(e)}function u(e){if(e){const t=e.lastIndexOf("/");return[e.substr(0,t),e.substr(t+1)]}return[]}function p(e){var t,i;const o=null==e?void 0:e.stream_url,n=null===(t=null==o?void 0:o.push_urls)||void 0===t?void 0:t[0];return null!==(i=null!=n?n:null==o?void 0:o.rtmp_push_url)&&void 0!==i?i:""}function m(e){return d.some((t=>n()(t).test(e.replace(/\?(.*)/,""))))}function h(e){return e&&e.length?e.map((e=>{var t,i,o;return(null==e?void 0:e.data)&&((null==(t=e.data)?void 0:t.owner)&&(t.owner.verified=Boolean(null===(i=t.owner.authentication_info)||void 0===i?void 0:i.authentication_badge)),(null==t?void 0:t.link_mic)&&!t.with_linkmic&&Object.defineProperty(t,"with_linkmic",{writable:!0,value:Boolean(t.link_mic.channel_id||(null===(o=t.link_mic.linked_user_list)||void 0===o?void 0:o.length))})),e})):[]}function _(){return Boolean((0,r.matchPath)(null===location||void 0===location?void 0:location.pathname,{path:l.vI.liveRoom,exact:!0}))}const v=["uniqueId","enter_from_merge","enter_method","cover_type","enter_type","from_live_feed","is_auto_play","auto_play_type","manual_play_type","search_type","search_id","search_result_id","search_keyword","from_play_mode","live_room_mode","video_id","request_id","live_event_id","action_type","section_type","content_section_order","content_section_title","impr_position","is_highlight","is_guest_connect","is_landscape","live_lineup_type"],g=new Set(["live_merge","live_follow","live_lifestyle","category_game","all_categories","games_catalog","lifestyle_catalog","outdoors_catalog","fashion_catalog","talent_catalog","chatting_catalog"]);function f(){const e={enter_from_merge:"others",enter_method:"others",enter_type:"manual",cover_type:"user_upload",action_type:"click"};if(!(0,s.fU)()){const t=(0,a.parse)(window.location.search),i=(0,r.getRouterState)();v.forEach((o=>{void 0!==t[o]&&""!==t[o]&&(e[o]=String(t[o])),void 0!==(null==i?void 0:i[o])&&""!==i[o]&&(e[o]=String(i[o]))})),!e.enter_from_merge||g.has(e.enter_from_merge)||e.enter_from_merge.startsWith("category_game_")||e.enter_from_merge.endsWith("_game_catalog")||(e.section_type=void 0,e.content_section_order=void 0,e.content_section_title=void 0,e.impr_position=void 0)}return e}},91955:(e,t,i)=>{"use strict";i.d(t,{J:()=>l});var o=i(40099),n=i(72687),a=i(36523),r=i(13392),s=i(16109);const l=()=>{var e,t,i;const l=(0,r.Ph)(s.Q,{selector:e=>e.roomInfo,dependencies:[]}),d=(0,o.useCallback)((e=>{var t;const i=(0,a.TC)();n.fF.handleSideBarTooltipHover(Object.assign({type:e,room_id:i?null==l?void 0:l.id_str:void 0,anchor_id:i?null===(t=null==l?void 0:l.owner)||void 0===t?void 0:t.id_str:void 0},(0,a.Gc)()))}),[null==l?void 0:l.id_str,null===(e=null==l?void 0:l.owner)||void 0===e?void 0:e.id_str]),c=(0,o.useCallback)(((e,t)=>{var i;const o=(0,a.TC)();n.fF.handleSideBarButtonClick(Object.assign({button_name:e,sidebar_status:t,room_id:o?null==l?void 0:l.id_str:void 0,anchor_id:o?null===(i=null==l?void 0:l.owner)||void 0===i?void 0:i.id_str:void 0},(0,a.Gc)()))}),[null==l?void 0:l.id_str,null===(t=null==l?void 0:l.owner)||void 0===t?void 0:t.id_str]),u=(0,o.useCallback)(((e,t)=>{var i;const o=(0,a.TC)();n.fF.handleSideBarButtonHover(Object.assign({button_name:e,sidebar_status:t,room_id:o?null==l?void 0:l.id_str:void 0,anchor_id:o?null===(i=null==l?void 0:l.owner)||void 0===i?void 0:i.id_str:void 0},(0,a.Gc)()))}),[null==l?void 0:l.id_str,null===(i=null==l?void 0:l.owner)||void 0===i?void 0:i.id_str]);return{handleSideBarTooltipHoverReport:d,handleSideBarButtonClickReport:c,handleSideBarButtonHoverReport:u}}},91953:(e,t,i)=>{"use strict";i.d(t,{T:()=>A,H:()=>R});var o=i(24643),n=i(40099),a=i(25616),r=i(89311),s=i(88920),l=i(82858),d=i(41484),c=i(50289);function u(e,t=!0){const i=t?e=>e.toFixed(1):e=>(Math.floor(10*e)/10).toString();let o="",n="";const a=Number(e);if(isNaN(a))return"0";const{length:r}=a.toString();return r>9?(o="B",n=i(a/Math.pow(10,9))):r>6?(o="M",n=i(a/Math.pow(10,6))):r>3?(o="K",n=i(a/Math.pow(10,3))):n=a.toString(),n+o}var p=i(11328);const m=e=>{const{src:t,alt:i,fallback:a,className:r,skeleton:s,width:l,height:d,style:c={},onClick:u}=e,m=(0,n.useRef)(0),[h,_]=(0,n.useState)(""),[v,g]=(0,n.useState)(!1),[f,y]=(0,n.useState)(!1),[b,x]=(0,n.useState)(!1),k=(0,n.useRef)(null);(0,n.useEffect)((()=>{var e,i;return x(!1),m.current=0,y(!1),g(null!==(i=null===(e=k.current)||void 0===e?void 0:e.complete)&&void 0!==i&&i),Array.isArray(t)?_(t[0]):_(t),()=>{x(!0)}}),[t]);const w=(0,n.useCallback)((()=>{b||g(!0)}),[b]),C=(0,n.useCallback)((()=>{b||(m.current++,Array.isArray(t)&&t[m.current]?_(t[m.current]):(y(!0),_("")))}),[b,t]),S=(0,n.useMemo)((()=>Object.assign(Object.assign({},c),{position:"relative",top:0})),[c]),j=(0,n.useMemo)((()=>Object.assign({display:v?"block":"none"},c)),[v,c]);return(0,o.jsxs)(o.Fragment,{children:[v?null:"videoCover"===s?(0,o.jsx)(p.EA.VideoCover,{className:r,style:S}):"avatar"===s?(0,o.jsx)(p.EA.Avatar,{className:r,style:S}):null,!f&&h&&(0,o.jsx)("img",{ref:k,onClick:u,width:l,height:d,onLoad:w,onError:C,style:j,alt:i,src:h,className:r}),f?a:null]})};var h=i(3275),_=i(97086),v=i(84483),g=i(63635),f=i(85722);const y=e=>{var t,i,a,r,s,l,d,p,y,b,x,k,w,C,S,j,I,T;const{rank:E,item:P,hideEngagementCount:O,onClick:L,onMount:R,onMouseEnter:D,onMouseLeave:A}=e,{animateStyles:F,handleTransitionEnd:B}=function({rank:e}){const[t,i]=(0,n.useState)({transform:"scale(0.6)",opacity:0}),o=(0,n.useRef)(!0),a=(0,n.useRef)(e);return o.current&&!(0,_.fU)()&&(o.current=!1,requestAnimationFrame((()=>{i({transform:"scale(1)",opacity:1,transitionDuration:"150ms",transitionTimingFunction:"ease",transitionProperty:"transform, opacity"})}))),(0,n.useEffect)((()=>{const t=e-a.current;a.current=e,0!==t&&(i({transform:`translateY(${-36*t}px)`}),requestAnimationFrame((()=>{i({transform:"translateY(0)",transition:"transform ease 150ms"})})))}),[e]),{animateStyles:t,handleTransitionEnd:(0,n.useCallback)((()=>{i({})}),[])}}({rank:E}),M=(0,n.useRef)(P),N=(0,n.useRef)(null);M.current=P,(0,n.useEffect)((()=>{null==R||R(E,M.current)}),[E]);const q=(0,n.useCallback)((e=>()=>{L(e)}),[L]),U=(0,n.useCallback)((e=>{var t,i;return(0,g.B)(`${null===(i=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.owner)||void 0===i?void 0:i.display_id}`)}),[]),W=(0,n.useCallback)((e=>{e.preventDefault()}),[]),H=(0,n.useCallback)((e=>{var t,i;N.current&&(null===(i=null===(t=null==P?void 0:P.data)||void 0===t?void 0:t.owner)||void 0===i?void 0:i.nickname)&&(e.stopPropagation(),null==D||D(N.current,P.data.owner.nickname))}),[D]),z=(0,n.useCallback)((()=>{null==A||A()}),[A]),V=(0,n.useCallback)((e=>{e.stopPropagation()}),[]),{avatarVid:K}=(0,f.Ih)();return P.data?(0,o.jsx)(h.dr,{"data-e2e":"live-side-nav-item",canHover:Boolean(P.data),onClick:q(P.data?P:void 0),style:F,onTransitionEnd:B,onMouseEnter:H,onMouseLeave:z,onMouseMove:V,ref:N,children:(0,o.jsxs)(h.ah,{forceSSR:!0,to:U(P),onClick:W,children:[(0,o.jsx)(h.ju,{children:(0,o.jsxs)(h.XD,{children:[(null===(a=null===(i=null===(t=P.data)||void 0===t?void 0:t.owner)||void 0===i?void 0:i.avatar_thumb)||void 0===a?void 0:a.url_list)?(0,o.jsx)(m,{skeleton:"avatar",src:null===(l=null===(s=null===(r=P.data)||void 0===r?void 0:r.owner)||void 0===s?void 0:s.avatar_thumb)||void 0===l?void 0:l.url_list}):null,"v1"===K&&(0,o.jsx)("span",{style:{position:"absolute",background:"linear-gradient(131.17deg, #FF1764 0%, #ED3495 94.15%)",top:"0px",left:"50%",transform:"translateX(-50%)",wordBreak:"keep-all",fontSize:"6px",zIndex:1,padding:"0 3px",bottom:"unset",borderRadius:"8px",fontWeight:"bold",color:"rgb(255 255 255)"},children:"LIVE"})]})}),(0,o.jsxs)(h.l7,{children:[(0,o.jsxs)(h.PM,{children:[(0,o.jsx)(h.$_,{"data-e2e":"live-side-nav-name",children:null!==(y=null===(p=null===(d=P.data)||void 0===d?void 0:d.owner)||void 0===p?void 0:p.display_id)&&void 0!==y?y:null===(x=null===(b=P.data)||void 0===b?void 0:b.owner)||void 0===x?void 0:x.nickname}),(null===(w=null===(k=P.data)||void 0===k?void 0:k.owner)||void 0===w?void 0:w.verified)?(0,o.jsx)(c.s,{width:16,height:16}):null]}),(0,o.jsx)(h.Qv,{children:null===(S=null===(C=P.data)||void 0===C?void 0:C.owner)||void 0===S?void 0:S.nickname})]}),O||(null===(j=P.data)||void 0===j?void 0:j.is_gated_room)?null:(0,o.jsx)(h.$z,{"data-e2e":"person-count",children:u(null!==(T=null===(I=P.data)||void 0===I?void 0:I.user_count)&&void 0!==T?T:0)})]})}):(0,o.jsx)(v.j,{})};var b=i(48007),x=i(52845),k=i(18499),w=i(62186),C=i(72153);const S=(0,w.default)("div",{target:"e1l28mn90"})((({theme:e})=>[(0,C.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3",color:"ConstTextInverse",fontWeight:"normal"}),{display:"block",position:"fixed",top:0,padding:"14px 12px",borderRadius:"8px",zIndex:10,background:"rgba(84, 84, 84, 0.92)",fontWeight:500}]),"label:DivNavHintContainer;"),j=function({text:e,active:t,style:i}){return t?(0,k.createPortal)((0,o.jsx)(S,{style:i,children:e}),document.body):null};var I=i(91955),T=i(84987);const E={id:"chevron-down-icon-9432e3f8",use:"chevron-down-icon-9432e3f8-usage",viewBox:"0 0 14 15",content:''};function P(e){const t=(0,n.useContext)(T.X);return(0,n.useLayoutEffect)((()=>(t.add(E),()=>{t.remove("chevron-down-icon-9432e3f8")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#chevron-down-icon-9432e3f8"},void 0)}),void 0)}var O=i(88091),L=i(22985);const R=5,D=Array.from({length:R}).map(((e,t)=>({rid:t,data:null}))),A=(0,n.memo)((({title:e,loading:t=!0,list:i=[],onSeeAllClick:c,onItemClick:u,onItemVisible:p,sideBarTeaType:m,isControlByBtn:_,isDrawerOpen:v,switchRenderItem:g})=>{const k=(0,a.s)(),{isRTL:w}=(0,r.m)(),[C,S]=(0,n.useState)(!0),[T,E]=(0,n.useState)(!0),[A,F]=(0,n.useState)(!1),[B,M]=(0,n.useState)(e),[N,q]=(0,n.useState)(0),U=(0,n.useRef)(null),{isShowAll:W,scrollDomRef:H}=(0,b.r)((e=>({scrollDomRef:e.scrollDomRef,isShowAll:e.show})),d.A),{vid:z}=(0,s.vY)(),V=(0,n.useMemo)((()=>"v0"!==z),[z]),K=(0,l.Eo)(),{switchVid:G}=(0,f.Ih)(),$=(0,n.useRef)(),{handleSideBarTooltipHoverReport:J,handleSideBarButtonClickReport:Q,handleSideBarButtonHoverReport:Z}=(0,I.J)(),Y=(0,n.useRef)(null),X=(0,n.useCallback)((()=>{if(V)return v||document.documentElement.offsetWidth{const e=X();Q(C?"see_all":"see_less",e?"close":"open")}),[Q,C,X]),te=(0,n.useCallback)((()=>{null==c||c(),ee(),S(!C)}),[c,ee,C]),ie=(0,n.useCallback)(((e,t)=>{(null==t?void 0:t.data)&&p(t,e)}),[p]),oe=(0,n.useMemo)((()=>k(C?"see_all":"see_less")),[k,C]),ne=(0,n.useMemo)((()=>i.length>R),[i]),ae=(0,n.useMemo)((()=>t?D:C?i.slice(0,R):i),[t,i,C]);(0,n.useEffect)((()=>{t||i.length?E(!0):E(!1)}),[t,i]);const re=(0,n.useCallback)((t=>{if(!X())return;J(m);const{pageY:i}=t;F(!0),q(i),M(e)}),[m,J,e,X]),se=(0,n.useCallback)((()=>{B&&B!==e||(F(!1),q(0))}),[B,e]),le=(0,n.useCallback)(((e,t)=>{if(!t||!X())return;J("anchor_nickname");const i=e.getBoundingClientRect();F(!0),q(i.top+1),M(t),$.current=e}),[J,X]),de=(0,n.useCallback)((()=>{F(!1),q(0)}),[]),ce=(0,n.useCallback)((()=>{Z(C?"see_all":"see_less",X()?"close":"open")}),[Z,C,X]),ue=(0,n.useCallback)((e=>{if(e.stopPropagation(),!Y.current||!X())return;const t=Y.current.getBoundingClientRect();F(!0),q(t.top-11),M(oe),$.current=Y.current}),[oe,X]),pe=(0,n.useCallback)((()=>{X()&&J(C?"see_all":"see_less")}),[X,J,C]),me=(0,n.useCallback)((()=>{if(!$.current||!A)return;const e=$.current.getBoundingClientRect();q(e.top+1)}),[A]);(0,n.useEffect)((()=>{if(H.current){const e=H.current;return e.addEventListener("scroll",me),()=>{e.removeEventListener("scroll",me)}}}),[me,H]);const he=(0,n.useMemo)((()=>w?{right:x.E+4,top:N}:{left:x.E+4,top:N}),[N,w]);return T?(0,o.jsxs)(h.aJ,{ref:U,children:[(0,o.jsxs)(h.PE,{"data-e2e":"live-side-nav-channel",isShowAll:W,isControlByBtn:_,isPhase3Nav:V,isDrawerOpen:v,onMouseMove:re,onMouseOut:se,children:[(0,o.jsxs)(h.sI,{"data-e2e":"live-side-nav-channel-title",isControlByBtn:_,isShowAll:W,isPhase3Nav:V,isDrawerOpen:v,className:"flex justify-between items-center",children:[e,g&&C&&0!==ae.length&&!t&&"v1"===G&&(0,o.jsx)(L.A,{className:"cursor-pointer",onClick:g})]}),(0,o.jsxs)(h.$j,{isControlByBtn:_,isShowAll:W,isPhase3Nav:V,isDrawerOpen:v,children:[ae.map(((e,t)=>{var i,n;return(0,o.jsx)(y,{item:e,rank:t+1,hideEngagementCount:K,onClick:u,onMount:ie,onMouseEnter:le,onMouseLeave:de},null!==(n=null===(i=e.data)||void 0===i?void 0:i.id_str)&&void 0!==n?n:e.rid)})),ne?(0,o.jsxs)(h.Fy,{isControlByBtn:_,isShowAll:W,isPhase3Nav:V,isDrawerOpen:v,onMouseEnter:ce,onClick:te,children:[(0,o.jsx)(h.bQ,{isShowAll:W,isFold:C,ref:Y,isControlByBtn:_,isPhase3Nav:V,isDrawerOpen:v,onMouseEnter:pe,onMouseMove:ue,onMouseOut:de,children:(0,o.jsx)(P,{width:14,height:14})}),(0,o.jsx)(h.gG,{"data-e2e":"live-side-more-button",isControlByBtn:_,isShowAll:W,isPhase3Nav:V,isDrawerOpen:v,children:oe})]}):null]})]}),(0,o.jsx)(j,{active:A,text:B,style:he})]}):null}))},84483:(e,t,i)=>{"use strict";i.d(t,{C:()=>s,j:()=>r});var o=i(24643),n=i(3275),a=i(11328);const r=()=>(0,o.jsxs)(n.dr,{canHover:!1,children:[(0,o.jsx)(n.ju,{showRing:!1,children:(0,o.jsx)(a.EA.Avatar,{})}),(0,o.jsxs)(n.l7,{style:{gap:8},children:[(0,o.jsx)(a.EA.Title,{style:{width:120}}),(0,o.jsx)(a.EA.Title,{style:{width:72,height:12}})]}),(0,o.jsx)(n.$z,{children:(0,o.jsx)(a.EA.Title,{style:{width:33,height:14}})})]}),s=()=>(0,o.jsx)(n.aJ,{children:(0,o.jsxs)(n.PE,{isShowAll:!0,isLiveOptimized:!1,children:[(0,o.jsx)(n.sI,{isLiveOptimized:!1,isShowAll:!0,children:(0,o.jsx)(a.EA.Title,{})}),(0,o.jsx)(n.$j,{isLiveOptimized:!1,isShowAll:!0,children:Array(5).fill(null).map(((e,t)=>(0,o.jsx)(r,{},t)))})]})})},3275:(e,t,i)=>{"use strict";i.d(t,{$_:()=>p,$j:()=>m,$z:()=>x,Fy:()=>k,PE:()=>c,PM:()=>f,Qv:()=>b,XD:()=>g,aJ:()=>d,ah:()=>_,bQ:()=>w,dr:()=>h,gG:()=>C,ju:()=>v,l7:()=>y,sI:()=>u});var o=i(62186),n=i(31355),a=i(72153),r=i(50289),s=i(52845),l=i(88091);const d=(0,o.default)("div",{target:"e1fq23160"})((({theme:e})=>({borderWidth:.5,borderStyle:"solid",borderColor:e.colors.LineSecondary,borderLeft:"none",borderRight:"none",borderBottom:"none",position:"relative",margin:"0 8px"})),"label:DivSideNavChannelWrapper;"),c=(0,o.default)("div",{target:"e1fq23161"})((({theme:e,isControlByBtn:t,isShowAll:i,isPhase3Nav:o,isDrawerOpen:n})=>{const r="rtl"===e.direction;return o?[{position:"relative",padding:"16px 8px 16px 4px",width:n?s.E:s.Q},(0,a.mp)({direction:e.direction,start:-16,paddingStart:n?7.5:4,paddingEnd:n?10.5:8}),(0,a.jJ)({max:l.f5.Medium,style:{paddingInlineStart:"7.5px",paddingInlineEnd:"10.5px",width:s.E}})]:[{position:"relative",padding:"16px 8px 16px 4px",width:!t||i?s.Q:s.E},(0,a.mp)({direction:e.direction,start:-16,paddingStart:!t||i?4:7.5,paddingEnd:!t||i?8:10.5}),!t&&(0,a.jJ)({max:1071,style:{paddingLeft:r?10.5:7.5,paddingRight:r?7.5:10.5,width:s.E}})]}),"label:DivSideNavChannel;"),u=(0,o.default)("div",{target:"e1fq23162"})((({theme:e,isControlByBtn:t,isShowAll:i,isPhase3Nav:o,isDrawerOpen:n})=>o?[Object.assign(Object.assign({},e.typography.P3),{color:e.colors.TextSecondary,fontFamily:e.fontFamilies.TikTokFont,marginInlineStart:12,marginInlineEnd:6,fontWeight:600,lineHeight:"22px",marginBottom:"12px"}),(0,a.jJ)({max:l.f5.Medium,style:{display:"none"}}),n&&{display:"none"}]:[Object.assign(Object.assign({},e.typography.P3),{color:e.colors.TextSecondary,fontFamily:e.fontFamilies.TikTokFont,marginInlineStart:12,marginInlineEnd:16,fontWeight:600,lineHeight:"22px",marginBottom:"12px"}),!t&&(0,a.jJ)({max:1071,style:{display:"none"}}),t&&!1===i&&{display:"none"}]),"label:DivSideNavTitle;"),p=(0,o.default)("span",{target:"e1fq23163"})({flexBasis:"auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:800},"label:SpanSideNavNickName;"),m=(0,o.default)("div",{target:"e1fq23164"})((({isControlByBtn:e,isShowAll:t,isPhase3Nav:i,isDrawerOpen:o})=>i?[{margin:"8px 0 0"},(0,a.jJ)({max:l.f5.Medium,style:{marginBottom:8}}),o&&{marginBottom:8}]:[{margin:"8px 0 0"},!e&&(0,a.jJ)({max:1071,style:{marginBottom:8}}),e&&{marginBottom:t?0:8}]),"label:DivSideNavContent;"),h=(0,o.default)("div",{target:"e1fq23165"})((({canHover:e,theme:t})=>({height:48,padding:"6px 0",paddingInlineStart:5,marginInlineStart:5,paddingInlineEnd:5,marginInlineEnd:3,cursor:"pointer",overflow:"hidden",display:"flex",borderRadius:2,"&:hover":{backgroundColor:e?t.colors.ShadowSecondary:"initial"}})),"label:DivSideNavItem;"),_=(0,o.default)(n.N_,{target:"e1fq23166"})({width:"100%",height:36,textDecoration:"none",overflow:"hidden",display:"flex",":hover":{textDecoration:"none"}},"label:StyledLink;"),v=(0,o.default)("div",{target:"e1fq23167"})((({showRing:e=!0,theme:t})=>({minHeight:36,minWidth:36,borderRadius:"50%",alignItems:"flex-start",position:"relative",borderWidth:1,borderStyle:"solid",borderColor:e?t.colors.Primary:"transparent"})),"label:DivSideNavAvatarRing;"),g=(0,o.default)("div",{target:"e1fq23168"})({height:30,width:30,borderRadius:"50%",position:"absolute",overflow:"hidden",left:2,top:2},"label:DivSideNavAvatar;"),f=(0,o.default)("div",{target:"e1fq23169"})((({theme:e})=>Object.assign(Object.assign({display:"flex",color:e.colors.TextPrimary,alignItems:"center",position:"relative"},e.typography.P2),{[`${r.s}`]:{minWidth:"16px",maxWidth:"16px"}})),"label:DivSideNavDisplayId;"),y=(0,o.default)("div",{target:"e1fq231610"})({height:36,flex:"auto",display:"flex",marginInlineStart:8,flexDirection:"column",overflow:"hidden"},"label:DivSideNavNameWrap;"),b=(0,o.default)("div",{target:"e1fq231611"})((({theme:e})=>Object.assign({color:e.colors.TextSecondary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.typography.P4)),"label:DivSideNavNickName;"),x=(0,o.default)("div",{target:"e1fq231612"})((({theme:e})=>Object.assign(Object.assign({color:e.colors.TextPrimary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},e.typography.P3),{lineHeight:"45px",textAlign:"rtl"===e.direction?"left":"right",marginInlineStart:10,minWidth:40})),"label:DivSideNavPerson;"),k=(0,o.default)("div",{target:"e1fq231613"})((({theme:e,isControlByBtn:t,isShowAll:i,isPhase3Nav:o,isDrawerOpen:n})=>o?[{marginTop:n?4:8,marginInlineStart:n?0:12,display:"flex",alignItems:"center",color:e.colors.Primary},n&&{justifyContent:"center"},(0,a.jJ)({max:l.f5.Medium,style:{marginTop:4,marginInlineStart:0,justifyContent:"center"}})]:[{marginTop:!t||i?8:4,marginInlineStart:!t||i?12:0,display:"flex",alignItems:"center",color:e.colors.Primary},t&&!1===i&&{justifyContent:"center"},!t&&(0,a.jJ)({max:1071,style:{marginTop:4,marginInlineStart:0,justifyContent:"center"}})]),"label:DivSideNavSeeAllWrapper;"),w=(0,o.default)("div",{target:"e1fq231614"})((({isShowAll:e,theme:t,isFold:i,isControlByBtn:o,isPhase3Nav:n,isDrawerOpen:r})=>n?[{width:r?"24px":"auto",height:r?"24px":"auto",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:r?"100%":"unset",overflow:r?"hidden":"auto",cursor:"pointer","&:hover":{backgroundColor:r?t.colors.BGHover:"none"},"&>svg>path":{fill:t.colors.Primary,fillOpacity:1}},(0,a.mp)({direction:t.direction,marginEnd:r?0:"4px"}),(0,a.jJ)({max:l.f5.Medium,style:{width:24,height:24,borderRadius:"100%",overflow:"hidden",marginRight:0,marginLeft:0,"&:hover":{backgroundColor:t.colors.BGHover}}}),!i&&{transform:"rotate(180deg)"}]:[{width:!o||e?"auto":"24px",height:!o||e?"auto":"24px",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:!o||e?"unset":"100%",overflow:!o||e?"auto":"hidden",cursor:"pointer","&:hover":{backgroundColor:!o||e?"none":t.colors.BGHover},"&>svg>path":{fill:t.colors.Primary,fillOpacity:1}},(0,a.mp)({direction:t.direction,marginEnd:!o||e?"4px":0}),!o&&(0,a.jJ)({max:1071,style:{width:24,height:24,borderRadius:"100%",overflow:"hidden",marginRight:0,marginLeft:0,"&:hover":{backgroundColor:t.colors.BGHover}}}),!i&&{transform:"rotate(180deg)"}]),"label:DivSideNavSeeAllIcon;"),C=(0,o.default)("div",{target:"e1fq231615"})((({theme:e,isControlByBtn:t,isShowAll:i,isPhase3Nav:o,isDrawerOpen:n})=>o?[Object.assign(Object.assign({fontWeight:600,cursor:"pointer",fontFamily:e.fontFamilies.TikTokFont},e.typography.P3),{lineHeight:"22px"}),(0,a.jJ)({max:l.f5.Medium,style:{display:"none"}}),n&&{display:"none"}]:[Object.assign(Object.assign({fontWeight:600,cursor:"pointer",fontFamily:e.fontFamilies.TikTokFont},e.typography.P3),{lineHeight:"22px"}),!t&&(0,a.jJ)({max:1071,style:{display:"none"}}),t&&!1===i&&{display:"none"}]),"label:DivSideNavSeeAll;")},52845:(e,t,i)=>{"use strict";i.d(t,{E:()=>n,Q:()=>o});const o=240,n=72},48007:(e,t,i)=>{"use strict";i.d(t,{r:()=>o});const o=(0,i(24299).Ay)((e=>({show:!0,playerContainerRef:{current:null},scrollDomRef:{current:null},setShow:t=>e({show:t}),setPlayerContainer:t=>e({playerContainerRef:t}),setScrollDomRef:t=>e({scrollDomRef:t})})))},63705:(e,t,i)=>{Promise.resolve().then(i.t.bind(i,40099,19))},16109:(e,t,i)=>{"use strict";i.d(t,{Q:()=>c});var o=i(58632),n=i(64162),a=i(4126),r=i(93995),s=i(9782);const l=e=>2===(null==e?void 0:e.room_layout)&&Boolean(null==e?void 0:e.official_channel),d=e=>{var t,i;if(!(null==e?void 0:e.content))return;const o=JSON.parse(e.content||"{}"),{donation_link:n,desc:a,name:r,organization_id:s}=o;return{donationUrl:n,name:r,iconUrl:null===(i=null===(t=o.icon)||void 0===t?void 0:t.url_list)||void 0===i?void 0:i[0],organization_id:s,desc:a}};let c=class extends n.E{constructor(){super(...arguments),this.defaultState={loadingState:{enterRoom:0},roomInfo:null,anchorId:"",secAnchorId:"",anchorUniqueId:"",roomId:"",hotLiveRoomInfo:null,donationSticker:void 0,liveType:"video_live",reportLinkType:"normal_video_live",enterRoomWithSSR:!1,playMode:"webpage",isGuestConnection:!1,isMultiGuestRoom:!1,showLiveChat:!0,enableChat:!0,isAnswerRoom:!1,isGateRoom:!1,isOfficialChannelRoom:!1,chatWarningText:void 0,requestId:void 0,anchorStatus:void 0,enterRoomMessage:void 0,ntpDiff:0,followStatusMap:{},likeCount:0,userCount:0,totalUserCount:0,programLiveTopFrameSummary:void 0,isLandscapeRoom:!1}}setNtpDiff(e,t){e.ntpDiff=t}setRequestId(e,t){e.requestId=t}setDonationSticker(e,t){e.donationSticker=t}setShowLiveChatWarning(e,t){e.chatWarningText=t}setIsAnswerRoom(e,t){e.isAnswerRoom=t}setIsOfficialChannelRoom(e,t){return Object.assign(Object.assign({},e),{isOfficialChannelRoom:t,reportLinkType:t?"video_anchor_order":e.reportLinkType})}setRoomInfo(e,t){var i,o,n,a,r,c,u,p,m,h,_,v,g,f,y,b,x;const k={anchorId:null!==(o=null===(i=null==t?void 0:t.owner)||void 0===i?void 0:i.id_str)&&void 0!==o?o:"",secAnchorId:null!==(a=null===(n=null==t?void 0:t.owner)||void 0===n?void 0:n.sec_uid)&&void 0!==a?a:"",anchorUniqueId:null!==(c=null===(r=null==t?void 0:t.owner)||void 0===r?void 0:r.display_id)&&void 0!==c?c:"",roomId:null!==(u=null==t?void 0:t.id_str)&&void 0!==u?u:"",liveType:(0,s.FP)(null==t?void 0:t.live_room_mode),roomInfo:t,isAnswerRoom:Boolean(null==t?void 0:t.support_quiz),isGateRoom:Boolean(null==t?void 0:t.is_gated_room),enableChat:Boolean(null===(m=null===(p=null==t?void 0:t.room_auth)||void 0===p?void 0:p.Chat)||void 0===m||m),donationSticker:d(null===(h=null==t?void 0:t.deco_list)||void 0===h?void 0:h[0]),likeCount:null!==(_=null==t?void 0:t.like_count)&&void 0!==_?_:0,userCount:Number(null!==(v=null==t?void 0:t.user_count)&&void 0!==v?v:0),totalUserCount:Number(null!==(f=null===(g=null==t?void 0:t.stats)||void 0===g?void 0:g.total_user)&&void 0!==f?f:0),programLiveTopFrameSummary:null==t?void 0:t.top_frame_summary,isLandscapeRoom:1===(null===(y=null==t?void 0:t.room_auth)||void 0===y?void 0:y.Landscape),reportLinkType:(w=t,(e=>{var t;return!!(null===(t=null==e?void 0:e.link_mic)||void 0===t?void 0:t.battle_info)})(w)?"video_anchor_pk":(e=>{var t,i,o;return(null!==(o=null===(i=null===(t=null==e?void 0:e.social_interaction)||void 0===t?void 0:t.cohost)||void 0===i?void 0:i.linked_users)&&void 0!==o?o:[]).length>1})(w)?"video_anchor_connect":l(w)?"video_anchor_order":(e=>{var t,i,o,n,a;return(null!==(a=null===(n=null===(o=null===(i=null===(t=null==e?void 0:e.social_interaction)||void 0===t?void 0:t.multi_live)||void 0===i?void 0:i.room_multi_guest_linkmic_info)||void 0===o?void 0:o.multi_guest_linkmic_info)||void 0===n?void 0:n.linked_users)&&void 0!==a?a:[]).filter((e=>!!e.linkmic_id_str)).length>0})(w)?"video_anchor_guest_connect":"normal_video_live")};var w;if(t&&l(t)?k.isOfficialChannelRoom=!0:k.isOfficialChannelRoom=!1,(null==t?void 0:t.id_str)&&void 0===e.followStatusMap[null==t?void 0:t.id_str]){const i=null===(x=null===(b=t.owner)||void 0===b?void 0:b.follow_info)||void 0===x?void 0:x.follow_status;k.followStatusMap=Object.assign(Object.assign({},e.followStatusMap),{[t.id_str]:null!=i?i:0})}return Object.assign(Object.assign({},e),k)}setHotLiveRoomInfo(e,t){e.hotLiveRoomInfo=t}setEnterRoomWithSSR(e,t){e.enterRoomWithSSR=t}setEnterRoomMessage(e,t){e.enterRoomMessage=t}setPlayMode(e,t){e.playMode=t}setIsMultiGuestRoom(e,t){e.isMultiGuestRoom=t}setIsGuestConnection(e,t){e.isGuestConnection=t}setLoadingState(e,t){e.loadingState=Object.assign(Object.assign({},e.loadingState),t)}setReportLinkType(e,t){e.reportLinkType=t}setIsGateRoom(e,t){e.isGateRoom=t}multiSetState(e,t){return Object.assign(Object.assign({},e),t)}setLiveChat(e,t){e.showLiveChat=t}setFollowStatus(e,t){e.followStatusMap[t.roomId]=t.followStatus}setAnchorStatus(e,t){e.anchorStatus=t}setEnableChat(e,t){e.enableChat=t}setLiveLikeCount(e,t){e.likeCount=t}};(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setNtpDiff",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setRequestId",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setDonationSticker",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setShowLiveChatWarning",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setIsAnswerRoom",null),(0,o.__decorate)([(0,a.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",Object)],c.prototype,"setIsOfficialChannelRoom",null),(0,o.__decorate)([(0,a.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",Object)],c.prototype,"setRoomInfo",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setHotLiveRoomInfo",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setEnterRoomWithSSR",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setEnterRoomMessage",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setPlayMode",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setIsMultiGuestRoom",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setIsGuestConnection",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setLoadingState",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setReportLinkType",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setIsGateRoom",null),(0,o.__decorate)([(0,a.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",Object)],c.prototype,"multiSetState",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setLiveChat",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setFollowStatus",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setAnchorStatus",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setEnableChat",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setLiveLikeCount",null),c=(0,o.__decorate)([(0,r.n)("CurrentRoom")],c)},19824:(e,t,i)=>{"use strict";i.d(t,{T:()=>y});var o=i(58632),n=i(64162),a=i(4126),r=i(93995),s=i(8536),l=i(23999),d=i(24451),c=i(46657),u=i(26324),p=i(54888),m=i(38203),h=i(58305);let _=class{constructor(){this.getAutoDefinitionSelectKey=()=>(0,h._S)("auto_definition_selected_key"),this.setDefinitionSelectKey=e=>(0,h.AP)("definition_selected_key",e),this.getDefinitionSelectKey=()=>(0,h._S)("definition_selected_key"),this.setHideDefinitionRedDot=()=>(0,h.AP)("hide_definition_red_dot","1"),this.getHideDefinitionRedDot=()=>"1"===(0,h._S)("hide_definition_red_dot","0"),this.setMuted=e=>(0,h.AP)("live_player_muted",String(e)),this.getMuted=()=>"1"===(0,h._S)("live_player_muted"),this.setVolume=e=>(0,h.AP)("live_player_volume",e.toString()),this.getVolume=()=>{let e=Number((0,h._S)("live_player_volume","60"));return(e<0||e>1e3||isNaN(e))&&(e=60),e},this.setDailyFrequencyControlCount=(e,t)=>{const i=new Date,o=`${i.getFullYear()}${i.getMonth()}${i.getDate()}`;return(0,h.AP)(e,`${o}-${t.toString()}`)},this.getDailyFrequencyControlCount=e=>{const t=new Date,i=`${t.getFullYear()}${t.getMonth()}${t.getDate()}`,o=(0,h._S)(e);if(!o)return 0;const[n,a]=o.split("-");return n===i?Number(a):0}}};_=(0,o.__decorate)([(0,m._)()],_);var v=i(85722),g=i(58562),f=i(16109);let y=class extends n.E{constructor(e,t,i){super(),this.bizContext=e,this.roomModule=t,this.livePlayerStorage=i,this.defaultState={supportDefinition:!1,streamId:"",streamItems:[],currentDefinitionKey:"auto",abrDefinitionLabel:"",abrDefinitionKey:void 0,abrBitrate:0,networkStatus:"normal",canUpdateActiveStream:!0,isFatal:!1,fatalType:0,needDestroyPlayer:!1,isHevcSoftDecode:!1,isNonStreaming:!1}}setHevcSoftDecode(e,t){e.isHevcSoftDecode=t}setStreamId(e,t){e.streamId=t}setNetworkStatus(e,t){e.networkStatus=t}setStreamInfo(e,t){e.streamItems=t}clearStreamInfo(e){e.streamItems=[],e.abrDefinitionLabel="",e.isFatal=!1,e.streamId=""}setActiveStream(e,t){const{key:i,url:o}=t;e.streamItems=e.streamItems.map((e=>Object.assign(Object.assign({},e),{isActive:i===e.sdkKey,activeUrl:o})))}setCurrentDefinitionKey(e,t){e.currentDefinitionKey=t}setAbrDefinitionLabel(e,t){e.abrDefinitionLabel=t}setAbrDefinitionKey(e,t){e.abrDefinitionKey=t}setAbrBitrate(e,t){e.abrBitrate=t}setFatalType(e,t){e.fatalType=t}setIsFatal(e,t){e.isFatal=t,e.needDestroyPlayer=t}setNeedDestroyPlayer(e,t){e.needDestroyPlayer=t}setIsNonStreaming(e,t){e.isNonStreaming=t}multiSetState(e,t){return Object.assign(Object.assign({},e),t)}updateAbrDefinition(e){return e.pipe((0,s.Z)((e=>{var t,i;return(0,l.of)(this.getActions().multiSetState({abrDefinitionLabel:null!==(t=null==e?void 0:e.definition)&&void 0!==t?t:"",abrDefinitionKey:null==e?void 0:e.sdkKey,abrBitrate:null!==(i=null==e?void 0:e.bitrate)&&void 0!==i?i:0}))})))}updateDefinition(e){return e.pipe((0,d.E)(this.state$,this.bizContext.state$),(0,s.Z)((([e,t])=>{var i,o,n,a;if("auto"===e){const n=[this.getActions().setCurrentDefinitionKey(e)],a=(0,g.J4)(t.streamItems),r=(0,g.MD)(t.streamItems);if("origin"===(null==a?void 0:a.sdkKey)&&r){const e=t.streamItems[1],a={key:null!==(i=e.sdkKey)&&void 0!==i?i:"",url:null!==(o=null==e?void 0:e.url.mainFLV)&&void 0!==o?o:""};n.push(this.getActions().setActiveStream(a),this.getActions().updateAbrDefinition(e))}return(0,l.of)(...n)}{const i=(0,g.aZ)(t.streamItems,e),o={key:null!==(n=null==i?void 0:i.sdkKey)&&void 0!==n?n:"",url:null!==(a=null==i?void 0:i.url.mainFLV)&&void 0!==a?a:""},r=[this.getActions().setCurrentDefinitionKey(e),this.getActions().setActiveStream(o),this.getActions().updateAbrDefinition(i)];return(0,l.of)(...r)}})))}updateDefinitionByBitrate(e){return e.pipe((0,d.E)(this.state$),(0,s.Z)((([e,t])=>{const i=(0,g.jo)(t.streamItems,e);return(null==i?void 0:i.sdkKey)?(0,l.of)(this.getActions().updateAbrDefinition(i)):c.w})))}getDefaultStreamConfig(e,t){var i,o,n,a,r,s;const{streamData:l}=(0,g.XA)(e),d=null!==(o=null===(i=null==e?void 0:e.options)||void 0===i?void 0:i.qualities)&&void 0!==o?o:[];let c=null===(a=null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.default_quality)||void 0===a?void 0:a.sdk_key;const u=d.length>0,p=this.livePlayerStorage.getDefinitionSelectKey(),m=""===p?"auto":p;(0,v.lV)()&&"auto"===m&&(c=this.livePlayerStorage.getAutoDefinitionSelectKey()||c);const h=(0,g.Ay)((0,g.e8)(l,d)),_=(0,g.MD)(h)&&"origin"===c;let f;f="auto"===m?_?"uhd_60":c:m;const y=(0,g.aZ)(h,f,!0),b=null!==(s=null!==(r=null==y?void 0:y.sdkKey)&&void 0!==r?r:c)&&void 0!==s?s:"origin";return{supportDefinition:u,currentDefinitionKey:"auto"===m?"auto":b,streamItems:h.map((e=>(e.sdkKey===b&&(e.isActive=!0,e.activeUrl=t?null==e?void 0:e.url.mainHLS:null==e?void 0:e.url.mainFLV),e))),defaultActiveStream:y}}updateRoomStream(e){return e.pipe((0,d.E)(this.bizContext.state$),(0,s.Z)((([e,t])=>{var i,o,n;const{streamId:a,pullData:r}=e;if(!r)return(0,l.of)();const{supportDefinition:s,streamItems:d,currentDefinitionKey:c,defaultActiveStream:u}=this.getDefaultStreamConfig(r,Boolean(null===(i=t.bizContext)||void 0===i?void 0:i.isIOS));return(0,l.of)(this.getActions().multiSetState({isFatal:!1,supportDefinition:s,streamId:null!=a?a:"",currentDefinitionKey:c,streamItems:d,abrDefinitionLabel:null!==(o=null==u?void 0:u.definition)&&void 0!==o?o:"",abrDefinitionKey:null==u?void 0:u.sdkKey,abrBitrate:null!==(n=null==u?void 0:u.bitrate)&&void 0!==n?n:0}))})))}changeAvailableStream(e){return e.pipe((0,d.E)(this.bizContext.state$),(0,s.Z)((([e,t])=>{var i;const o=Boolean(null===(i=t.bizContext)||void 0===i?void 0:i.isIOS),n=this.state.streamItems.map((e=>e.isActive?Object.assign(Object.assign({},e),{pullFailedCount:e.pullFailedCount+1}):e)),a="auto"===this.state.currentDefinitionKey,r=[],s=(0,g.QC)(n,o),d=(0,g.J4)(s);return d?a?r.push(this.getActions().updateAbrDefinition(d)):r.push(this.getActions().setCurrentDefinitionKey(d.sdkKey)):r.push(this.getActions().setIsFatal(!0),this.roomModule.getActions().setPlayMode("webpage")),(0,l.of)(this.getActions().setStreamInfo(s),...r)})))}};(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setHevcSoftDecode",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setStreamId",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setNetworkStatus",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Array]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setStreamInfo",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"clearStreamInfo",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setActiveStream",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setCurrentDefinitionKey",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setAbrDefinitionLabel",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setAbrDefinitionKey",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setAbrBitrate",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setFatalType",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setIsFatal",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setNeedDestroyPlayer",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],y.prototype,"setIsNonStreaming",null),(0,o.__decorate)([(0,a.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",Object)],y.prototype,"multiSetState",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],y.prototype,"updateAbrDefinition",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],y.prototype,"updateDefinition",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],y.prototype,"updateDefinitionByBitrate",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],y.prototype,"updateRoomStream",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],y.prototype,"changeAvailableStream",null),y=(0,o.__decorate)([(0,r.n)("Stream"),(0,o.__metadata)("design:paramtypes",[p.$,f.Q,_])],y)},58562:(e,t,i)=>{"use strict";i.d(t,{MD:()=>h,J4:()=>g,QC:()=>y,aZ:()=>f,Ay:()=>v,jo:()=>b,XA:()=>u,e8:()=>_});var o=i(75741),n=i.n(o),a=i(4474),r=i(79345);const s=2e6,l=Object.freeze(["auto","origin","uhd_60","uhd","hd_60","hd","sd","ld"]),d=2;var c=i(85722);function u(e){var t,i;try{const o={common:{},data:{}},n=JSON.parse(null!==(t=null==e?void 0:e.stream_data)&&void 0!==t?t:"");if(o.common=n.common,n.data)for(const e in n.data){if(n.data[e].main){const t=JSON.parse(n.data[e].main.sdk_params);o.data[e]={},o.data[e].main=n.data[e].main,o.data[e].main.sdk_params=t}if(n.data[e].backup){const t=JSON.parse(n.data[e].backup.sdk_params);o.data[e]=null!==(i=o.data[e])&&void 0!==i?i:{},o.data[e].backup=n.data[e].backup,o.data[e].backup.sdk_params=t}}return{streamData:o}}catch(e){return{streamData:{}}}}function p(e,t){return t?(0,a.stringifyUrl)({url:e,query:{_session_id:`${t}.${Date.now()}`}}):e}function m({url:e,key:t,title:i,isSameBitrate:o,hasUhd:n}){const a=e.includes("/stage/");if(!(a&&"hd"===t&&o&&n))return a&&"uhd"===t?{title:r.qt.hd,key:"hd"}:{title:i,key:t}}function h(e){return Boolean(e)}function _(e,t){var i,o,n,a,l,d,u,h,_,v,g,f,y,b;const x=[],k=e.common.session_id,w=(null===(a=null===(n=null===(o=null===(i=e.data)||void 0===i?void 0:i.uhd)||void 0===o?void 0:o.main)||void 0===n?void 0:n.sdk_params)||void 0===a?void 0:a.vbitrate)===(null===(h=null===(u=null===(d=null===(l=e.data)||void 0===l?void 0:l.hd)||void 0===d?void 0:d.main)||void 0===u?void 0:u.sdk_params)||void 0===h?void 0:h.vbitrate),C=!!(null===(_=e.data)||void 0===_?void 0:_.uhd);for(const[i,o]of Object.entries(e.data)){let e=i,n=null!==(g=null===(v=t.find((e=>e.sdk_key===i)))||void 0===v?void 0:v.name)&&void 0!==g?g:r.qt[i];if(!n)continue;let a=o.main.sdk_params.vbitrate;if("origin"===i&&(a=s),!(0,c.L5)()){const t=m({url:o.main.flv,key:e,title:n,isSameBitrate:w,hasUhd:C});if(!t)continue;e=t.key,n=t.title}x.push({sdkKey:e,definition:n,bitrate:a,url:{mainFLV:p(o.main.flv,k),mainHLS:o.main.hls,backupFLV:(null===(f=o.backup)||void 0===f?void 0:f.flv)?p(null===(y=o.backup)||void 0===y?void 0:y.flv,k):"",backupHLS:null===(b=o.backup)||void 0===b?void 0:b.hls},activeUrl:"",vCodecKey:o.main.sdk_params.VCodec,isActive:!1,pullFailedCount:0})}return x}function v(e){return n()(e,(e=>l.indexOf(e.sdkKey)))}function g(e){return e.find((e=>e.isActive))}function f(e,t,i){const o=e.map((e=>e.sdkKey));let n=o[0];if(t&&o.includes(t))n=t;else if(i&&t){const e=Object.keys(r.qt);let i=t;for(;-1===o.indexOf(i);){const t=e.indexOf(i);i=e[t+1],i||(i=o[o.length-1])}i!==t&&(n=i)}const a=function(e,t){return e.find((e=>e.sdkKey===t))}(e,n);return a||(console.error(`[stream] getMainStream: no stream found by ${t}`),null)}function y(e,t){let i,o=0;const n=d;for(;!i&&oe.pullFailedCount>0&&e.pullFailedCount0===e.pullFailedCount))),o++;if(i){const o=t?null==i?void 0:i.url.backupHLS:null==i?void 0:i.url.backupFLV,n=t?null==i?void 0:i.url.mainHLS:null==i?void 0:i.url.mainFLV,a=o&&i.pullFailedCount>0?o:n;return function(e,t,i){return e.map((e=>Object.assign(Object.assign({},e),{isActive:t===e.sdkKey,activeUrl:i})))}(e,i.sdkKey,a)}return e.map((e=>Object.assign(Object.assign({},e),{isActive:!1})))}function b(e,t){return e.find((e=>e.bitrate===t))}},91872:(e,t,i)=>{"use strict";i.d(t,{O:()=>a});var o=i(40099),n=i(90159);function a({elementRef:e,threshold:t=1e3,onHitBottom:i,onPageBottom:a,shouldRunOnMount:r,onScroll:s}){const l=(0,o.useRef)(null),d=(0,o.useRef)(0),c=(0,o.useRef)(0),u=(0,o.useRef)(!r),p=(0,o.useCallback)((()=>{"undefined"!=typeof window&&window.clearInterval(c.current)}),[]),m=(0,n._g)((()=>{var o,n,r,c,m,h,_;if(!l)return;let v,g;if(e)v=null!==(r=null===(n=e.current)||void 0===n?void 0:n.scrollTop)&&void 0!==r?r:0,g=(null!==(m=null===(c=e.current)||void 0===c?void 0:c.scrollHeight)&&void 0!==m?m:0)-(null!==(_=null===(h=e.current)||void 0===h?void 0:h.clientHeight)&&void 0!==_?_:0)-v;else{const e=document.documentElement||document.body.parentNode||document.body;v=void 0!==window.pageYOffset?window.pageYOffset:e.scrollTop,g=Number(null===(o=l.current)||void 0===o?void 0:o.scrollHeight)-v-window.innerHeight}0!==v&&(null==s||s(v)),!u.current&&g>0&&p(),g-t<=0&&d.current<=v&&(null==i||i(),!u.current&&p()),g<=-60&&v-d.current>=18&&(null==a||a()),d.current=v}),[i,t,a,e,p],100),h=(0,o.useRef)(m);return h.current=m,(0,o.useEffect)((()=>{r&&(c.current=window.setInterval((()=>{var e;null===(e=h.current)||void 0===e||e.call(h)}),100))}),[]),(0,o.useEffect)((()=>{var t;const i=null!==(t=null==e?void 0:e.current)&&void 0!==t?t:window;return i.addEventListener("scroll",m),()=>{i.removeEventListener("scroll",m)}}),[m,e]),l}},64231:(e,t,i)=>{"use strict";i.d(t,{i:()=>n});var o=i(40099);const n=({upHandler:e,downHandler:t,confirmHandler:i,tabHandler:n})=>(0,o.useCallback)((o=>{const{keyCode:a}=o;switch(a){case 38:o.preventDefault(),e();break;case 40:o.preventDefault(),t();break;case 13:null==i||i();break;case 9:null==n||n(o)}}),[i,t,n,e])},38812:(e,t,i)=>{"use strict";i.d(t,{BL:()=>r,CW:()=>d,FS:()=>a,Y:()=>l,fb:()=>n,pI:()=>s});var o=i(21367);const n=(e,t,i)=>(0,o.MY)((o=>{var n;return(null===(n=o.currentVideo)||void 0===n?void 0:n.mode)===e&&o.currentVideo.id===t&&o.currentVideo.index===i})),a=e=>{const t=(0,o.nU)(e),i=(0,o.RT)();return t&&0===i},r=()=>{var e,t,i;return null!==(i=null===(t=null===(e=(0,o.LM)().getStaticPlayerState())||void 0===e?void 0:e.currentVideo)||void 0===t?void 0:t.index)&&void 0!==i?i:0},s=()=>{var e,t,i;return null!==(i=null===(t=null===(e=(0,o.LM)().getStaticPlayerState())||void 0===e?void 0:e.prevVideo)||void 0===t?void 0:t.index)&&void 0!==i?i:0},l=()=>{var e,t,i;return null!==(i=null===(t=null===(e=(0,o.LM)().getStaticPlayerState())||void 0===e?void 0:e.currentVideo)||void 0===t?void 0:t.id)&&void 0!==i?i:"0"},d=()=>{var e,t,i;return null!==(i=null===(t=null===(e=(0,o.LM)().getStaticPlayerState())||void 0===e?void 0:e.prevVideo)||void 0===t?void 0:t.id)&&void 0!==i?i:"0"}},85349:(e,t,i)=>{"use strict";i.d(t,{t:()=>m});var o=i(24643),n=i(67192),a=i(40099),r=i(71615),s=i(70873),l=i(64356),d=i(11654),c=i(33805),u=i(32744);const p=(0,i(62186).default)("div",{target:"e1dc6dvj0"})({height:"100vh",display:"flex",flexDirection:"column"},"label:DivErrorBoundaryContainer;");class m extends a.Component{constructor(){super(...arguments),this.state={isNetOffline:!1,hasError:!1},this._slardar=n.l.getInstance(d.V),this.handleOnlineStatusChange=()=>{this.setState({isNetOffline:!navigator.onLine})}}get iconElem(){const{hasError:e}=this.state;return e?(0,o.jsx)(r.A,{width:90,height:90,fill:"rgba(128, 130, 133, 1)"}):(0,o.jsx)(s.A,{width:90,height:90,fill:"rgba(128, 130, 133, 1)"})}get text(){const{hasError:e}=this.state;return e?{title:"server_error_title",desc:"server_error_sub",button:"try_again_btn"}:{title:"network_error_title",desc:"network_error_sub",button:"try_again_btn"}}componentDidMount(){window.addEventListener("online",this.handleOnlineStatusChange),window.addEventListener("offline",this.handleOnlineStatusChange)}componentWillUnmount(){window.removeEventListener("online",this.handleOnlineStatusChange),window.removeEventListener("offline",this.handleOnlineStatusChange)}handleRetry(){window.location.reload()}componentDidCatch(e,t){const{onCatchError:i,componentName:o}=this.props,n=window.location.pathname,a=(0,c.oN)(n);i&&i();try{this._slardar.captureMessage(`Component render Error: ${e.message}`,"fatal",{page:a,component:null!=o?o:""})}catch(e){console.error("Error occurs when reporting error:",e)}this.setState({hasError:!0})}render(){const{isNetOffline:e,hasError:t}=this.state,{children:i,isMobile:n,customTitle:a,customDesc:r,customButtonText:s,onClickRetry:l,useButton:d=!1,containerStyle:c}=this.props,{t:m}=this.context;if(e||t){const{title:e,desc:t,button:i}=this.text;return n?(0,o.jsx)(p,{children:(0,o.jsx)(u.W,{brightness:0,isFullScreen:!0,iconElem:this.iconElem,title:null!=a?a:m(e),desc:null!=r?r:m(t),buttonText:d?null!=s?s:m(i):void 0,onButtonClick:null!=l?l:this.handleRetry})}):(0,o.jsx)(u.W,{isFullScreen:!0,onButtonClick:null!=l?l:this.handleRetry,iconElem:this.iconElem,title:null!=a?a:m(e),desc:null!=r?r:m(t),buttonText:d?null!=s?s:m(i):void 0,style:c})}return i}}m.contextType=l.Ss},13990:(e,t,i)=>{"use strict";i.d(t,{Eq:()=>C,sg:()=>w,hK:()=>k});var o=i(58632),n=i(64162),a=i(4126),r=i(93995),s=i(42051),l=i(35572),d=i(8536),c=i(23999),u=i(20259),p=i(26324),m=i(11983),h=i(64356),_=i(38203),v=i(39228);let g=class{constructor(e){this.fetch=e}checkUserStatusBeforeSwitchout(){return this.fetch.post("/api/ba/business/suite/account/quitcheck",{baseUrlType:2})}switchOutBusinessAccount(){return this.fetch.post("/api/ba/business/suite/account/off",{baseUrlType:2})}};var f,y;g=(0,o.__decorate)([(0,_._)(),(0,o.__metadata)("design:paramtypes",[v.pM])],g),function(e){e.None="none",e.PersonalAccount="personal_account",e.ProAccount="pro_account"}(f||(f={})),function(e){e.None="none",e.SwitchConfirmModal="switch_confirm_modal",e.InvalidModal="invalid_modal"}(y||(y={}));const b=[3019001,3019002,3019003,3019018],x="Sorry, something wrong with the server, please try again.",k={3019001:"ttba_ob_switchouterr_title",3019002:"ttba_ob_switchouterr_title_lttfb",3019003:"ttba_ob_switchouterr_title_lmp",3019018:"ttba_ob_switchouterr_title_seller"},w={3019001:"ttba_ob_switchouterr_subtext",3019002:"ttba_ob_switchouterr_subtext_lttfb",3019003:"ttba_ob_switchouterr_subtext_lmp",3019018:"ttba_ob_switchouterr_subtext_seller"};let C=class extends n.E{constructor(e,t){super(),this.service=e,this.t=t,this.defaultState={switchedType:"none",businessAccountModalType:"none",invalidCode:0}}checkSwitchOut(e){return e.pipe((0,l.p)((()=>this.service.checkUserStatusBeforeSwitchout().pipe((0,d.Z)((({statusCode:e})=>{if(!b.includes(e)&&0!==e)return m.F.open({content:this.t(x),duration:3}),(0,c.of)(this.noop());const t=0===e?"switch_confirm_modal":"invalid_modal";return(0,c.of)(this.getActions().setInvalidCode(e),this.getActions().setBusinessAccountModalType(t))})),this.catchError()))))}switchBusinessAccount(e){return e.pipe((0,l.p)((({action_type:e})=>this.service.switchOutBusinessAccount().pipe((0,d.Z)((({statusCode:t})=>0===t?(m.F.open({content:this.t("switched_to_personal"),duration:3}),(0,c.of)(this.getActions().setSwitchedType(0===e?"personal_account":"pro_account"),this.getActions().setBusinessAccountModalType("none"))):(m.F.open({content:this.t(x),duration:3}),(0,c.of)(this.noop())))),this.catchError()))))}setBusinessAccountModalType(e,t){e.businessAccountModalType=t}setInvalidCode(e,t){e.invalidCode=t}setSwitchedType(e,t){e.switchedType=t}catchError(){return(0,u.W)((()=>(m.F.open({content:this.t(x),duration:3}),(0,c.of)(this.noop()))))}};(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[p.c]),(0,o.__metadata)("design:returntype",void 0)],C.prototype,"checkSwitchOut",null),(0,o.__decorate)([(0,a.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[p.c]),(0,o.__metadata)("design:returntype",void 0)],C.prototype,"switchBusinessAccount",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],C.prototype,"setBusinessAccountModalType",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],C.prototype,"setInvalidCode",null),(0,o.__decorate)([(0,a.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],C.prototype,"setSwitchedType",null),C=(0,o.__decorate)([(0,r.n)("BusinessAccountModule"),(0,o.__param)(1,(0,s.y)(h.hp)),(0,o.__metadata)("design:paramtypes",[g,Function])],C)},51199:(e,t,i)=>{"use strict";i.d(t,{M:()=>d});var o=i(58632),n=i(4126),a=i(93995),r=i(53966),s=i(32329),l=i(34360);let d=class extends r.E{constructor(){super(),this.defaultState={redDotCount:0,hasVisitedFollowing:!1}}setRedDotCount(e,t){(0,s.yX)().setRedDotCount(t)}setHasVisitedFollowing(e,t){(0,s.yX)().setHasVisitedFollowing(t)}};d.jotaiAtom=s.VH,(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],d.prototype,"setRedDotCount",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],d.prototype,"setHasVisitedFollowing",null),d=(0,o.__decorate)([(0,a.n)("FollowingRedDotModule"),(0,o.__metadata)("design:paramtypes",[])],d),s.VH.__SIGI_MODULE__=d,(0,l.y)(d)},72642:(e,t,i)=>{"use strict";i.d(t,{kK:()=>j,Tu:()=>S});var o=i(58632),n=i(4126),a=i(93995),r=i(53966),s=i(23999),l=i(26324),d=i(8536),c=i(95719),u=i(24451),p=i(35572),m=i(29039),h=i(34360),_=i(22248),v=i(55322),g=i(65729),f=i(88920),y=i(54888),b=i(51199),x=i(40858),k=i(38203),w=i(39228);let C=class{constructor(e){this.fetch=e}getNoticeCount(){return this.fetch.get("/api/notice/count/",{query:{source:7},baseUrlType:2})}getWebNoticeCount(){return this.fetch.get("/api/inbox/notice_count/",{baseUrlType:2})}};C=(0,o.__decorate)([(0,k._)(),(0,o.__metadata)("design:paramtypes",[w.pM])],C);const S=509;let j=class extends r.E{constructor(e,t,i,o){super(),this.service=e,this.reportInboxService=t,this.bizContext=i,this.followingRedDotModule=o,this.defaultState={noticeCount:[],reportInbox:{noticeList:[],count:0},isFooterRequest:!1}}setNoticeCount(e,t){(0,m.wU)().setNoticeCount(t)}setIsFooterRequest(e,t){(0,m.wU)().setIsFooterRequest(t)}setReportInboxNoticeList(e,t){(0,m.wU)().setReportInboxNoticeList(t)}setReportInboxNoticeCount(e,t){(0,m.wU)().setReportInboxNoticeCount(t)}updateNoticeList(e){var t;if(0===e.status_code){let i=0;const{isRepostNoticeEnabled:o}=(0,f.Fl)(),n=(null!==(t=e.notice_count)&&void 0!==t?t:[]).filter((e=>(5===e.group&&e.count>0&&(i=e.count),!!(661===e.group||o&&e.group===S)||(0,x.Bl)().indexOf(e.group)>=0&&500!==e.group)));return(0,s.of)(this.getActions().setNoticeCount(n),this.getActions().setIsFooterRequest(!0),this.followingRedDotModule.getActions().setRedDotCount(i))}return(0,s.of)(this.noop())}fetchNoticeCount(e){return e.pipe((0,d.Z)((()=>this.service.getWebNoticeCount().pipe((0,c.M)((e=>{(0,_.G)(e.status_code,[0])})),(0,d.Z)((e=>this.updateNoticeList(e))),(0,v.n)({})))))}fetchReportInbox(e){return e.pipe((0,u.E)(this.bizContext.state$),(0,p.p)((([{region:e="",language:t=""},{bizContext:i}])=>this.reportInboxService.getReportNotices({request_tag_from:(null==i?void 0:i.isMobile)?"h5":"pc",carrier_region:e,sys_region:e,current_region:e,locale:t}).pipe((0,d.Z)((({notice_lists:e})=>{var t;if(!e)return[this.noop()];const{notice_list:i}=e[0];if(!i)return[this.noop()];const o=!1===(null===(t=i[0])||void 0===t?void 0:t.has_read)?1:0;return[this.getActions().setReportInboxNoticeList(i),this.getActions().setReportInboxNoticeCount(o)]})),(0,v.n)({})))))}};j.jotaiAtom=m.pz,(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Array]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"setNoticeCount",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"setIsFooterRequest",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Array]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"setReportInboxNoticeList",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Number]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"setReportInboxNoticeCount",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[l.c]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"fetchNoticeCount",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[l.c]),(0,o.__metadata)("design:returntype",void 0)],j.prototype,"fetchReportInbox",null),j=(0,o.__decorate)([(0,a.n)("InboxTooltip"),(0,o.__metadata)("design:paramtypes",[C,g.o,y.$,b.M])],j),m.pz.__SIGI_MODULE__=j,(0,h.y)(j)},30615:(e,t,i)=>{"use strict";i.d(t,{iM:()=>a});var o=i(16469),n=i(52401);const a=(e,t)=>{o.LU.removeAll(),n.z.logoutSubmit(null!=t?t:{});let i="https://www.tiktok.com/logout";e&&(i+=`?redirect_url=${encodeURIComponent(e)}`),window.location.href=i}},31922:(e,t,i)=>{"use strict";i.d(t,{$:()=>v,q:()=>f});var o=i(58632),n=i(41271),a=i(40099),r=i(34099),s=i(4725),l=i(39228),d=i(27375),c=i(50970),u=i(72642),p=i(9350),m=i(53737),h=i(32125),_=i(71281);function v(){var e,t,i,d;const u=(0,r.V)(),{user:h,encryptedWebid:v,lang:g,appType:f,abTestVersion:y,env:b,wid:x,$apiUrl:k,$wsUrl:w}=(0,n.P)(c.L,{dependencies:[],selector:e=>{var t,i,o,n,a,r;return{user:null===(t=e.appContext)||void 0===t?void 0:t.user,wid:null===(i=e.appContext)||void 0===i?void 0:i.wid,encryptedWebid:null===(o=e.appContext)||void 0===o?void 0:o.encryptedWebid,appType:null===(n=e.appContext)||void 0===n?void 0:n.appType,lang:e.lang,env:null===(a=e.appContext)||void 0===a?void 0:a.env,$apiUrl:u.imApi,$wsUrl:u.imFrontier,abTestVersion:null===(r=e.appContext)||void 0===r?void 0:r.abTestVersion}}}),C=(0,p.rp)(),S=(0,m._q)(),j="v2"===(null!==(e=(0,_.qt)(y,"web_dm_test_force_http"))&&void 0!==e?e:"v1"),I="v2"===(null!==(t=(0,_.qt)(y,"web_dm_group_chat"))&&void 0!==t?t:"v1"),T="v2"===(null!==(i=(0,_.qt)(y,"web_dm_enable_debug"))&&void 0!==i?i:"v1"),E="v2"===(null!==(d=(0,_.qt)(y,"web_dm_decrease_lcp"))&&void 0!==d?d:"v1");(0,a.useEffect)((()=>{(()=>{(0,o.__awaiter)(this,void 0,void 0,(function*(){var e;yield l.hd.init(g);const t=l.hd.getRiskParams(0),i=(0,s.Ri)("msToken")||"";Object.keys(t).forEach((e=>{void 0!==t[e]?t[e]=String(t[e]):t[e]=""})),t.referer||(t.referer=window.location.href);const n={appId:1459,userId:null!==(e=null==h?void 0:h.uid)&&void 0!==e?e:"",secUid:null==h?void 0:h.secUid,deviceId:null!=x?x:"",appKey:"e1bd35ec9db7b8d846de66ed140b1ad9",fpId:9,method:1,apiUrl:k,inboxType:I?[0,1,3]:[0,3],acceptIncorrectInboxType:!0,frontierUrl:w,headers:Object.assign(Object.assign({},t),{from_appID:"1988",app_language:g,app_name:"tiktok_web",channel:"web",user_agent:navigator.userAgent,"Web-Sdk-Ms-Token":i}),whaleQueryParams:{aid:"1988",version_code:"1.0.0",app_name:"tiktok_web",device_platform:"web_pc"},extended:{device_id:void 0,ttwid:window.decodeURIComponent(null!=v?v:""),"Web-Sdk-Ms-Token":i},timeout:5e3,disableInitPull:!0,serialSendFileMessage:!0,autoFetchUploadConfig:!0,sortByLocalIndex:!0,eventListener:e=>(0,o.__awaiter)(this,void 0,void 0,(function*(){yield S.handleIMEvent(Object.assign(Object.assign({},e),{abTestVersion:y}))})),monitor:{emitMetrics(e,t={},i={}){if(!window.SlardarClient||"network.request"!==e||"1"!==i.inbox_type)return;const{imsdk_cmd:o,conversation_id:n,error_code:a,inbox_type:r,logid:s}=i;window.SlardarClient.sendEvent({name:"im_request",categories:{imsdk_cmd:o,conversation_id:n,error_code:a,inbox_type:r,logid:s},metrics:Object.assign({count:1},t)})}}};Object.assign(n,{debug:!1,service:5,withCredentials:!0}),j&&(n.webSocketLevel=3),yield C.initSdk(n,E),yield S.startConversationChange(),S.initWebDMLocalStorage(n.secUid)}))})()}),[f,null==b?void 0:b.name,null==h?void 0:h.secUid,null==h?void 0:h.uid,x,v,g,k,w,y,S,C,j,I,T,E])}const g=/^\(\d+\+?\)/;function f(){const e=(0,m.VB)((e=>e.messageCount),h.bN),t=(0,n.P)(u.kK,{dependencies:[],selector:e=>e.noticeCount.reduce(((e,{count:t})=>e+t),0)}),i=(0,a.useMemo)((()=>e+t),[e,t]);(0,a.useEffect)((()=>{if(i>0){const e=(0,d.lH)(i);g.test(document.title)?document.title=document.title.replace(g,`(${e})`):document.title=`(${e})${document.title}`}else document.title=document.title.replace(g,"")}),[i])}},77181:(e,t,i)=>{"use strict";i.d(t,{oL:()=>j});var o=i(24643),n=i(40099),a=i(47172),r=i(25616),s=i(93608),l=i(68159),d=i(82715),c=i(88091),u=i(40422),p=i(30543),m=i(62186);const h=m.default.div`
padding: 1.5rem; /* 24px */
display: flex;
justify-content: space-between;
gap: 0.75rem; /* 12px */
`,_=m.default.div`
flex-shrink: 0;
width: 2rem; /* 32px */
height: 2rem; /* 32px */
cursor: pointer;
& > svg {
width: 100%;
height: 100%;
}
`,v=m.default.div`
display: flex;
flex-direction: column;
gap: 0.25rem; /* 4px */
font-size: 24px !important;
line-height: 1.2 !important;
font-weight: 500 !important;
font-family: TikTokDisplayFont !important;
`,g=m.default.div`
color: rgba(22, 24, 35, 1);
font-size: var(--text-h6-font-size); /* Assuming H6-Medium maps to a custom property */
font-weight: medium;
line-height: var(--text-h6-line-height);
font-family: TikTokFont;
flex: 1;
`,f=m.default.div`
color: rgba(22, 24, 35, 0.75);
font-size: 16px;
line-height: 1.5;
font-weight: normal;
font-family: TikTokFont;
`,y=m.default.div`
display: flex;
justify-content: space-between;
padding: 1.5rem;
`,b=m.default.div`
display: flex;
align-items: center;
gap: 1rem; /* 16px */
`;function x(e){const{visible:t,title:i,subTitle:a,returnable:r,onReturn:s,closable:l=!0,onClose:d,children:m,footer:x,renderLeftFooter:k,renderRightFooter:w,okText:C,onCancel:S,onOk:j,cancelText:I,okButtonProps:T={},cancelButtonProps:E={}}=e,{isOpen:P,transitionStatus:O,open:L,close:R}=(0,c.eb)({onClose:d});return(0,n.useEffect)((()=>{t?L():R()}),[t]),(0,o.jsxs)(c.nO,{isOpen:P,transitionStatus:O,open:L,close:R,width:"Medium",height:"Compact",children:[(0,o.jsxs)(h,{children:[r&&(0,o.jsx)(_,{onClick:s,children:(0,o.jsx)(u.A,{})}),(0,o.jsxs)(v,{children:[(0,o.jsx)(g,{children:i}),!!a&&(0,o.jsx)(f,{children:a})]}),l&&(0,o.jsx)(_,{onClick:()=>R(),children:(0,o.jsx)(p.A,{})})]}),(0,o.jsx)(c.Qx,{color:"LineSecondary"}),m,x||(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.Qx,{color:"LineSecondary"}),(0,o.jsxs)(y,{children:[(0,o.jsx)("div",{children:k}),(0,o.jsx)(b,{children:w||(0,o.jsxs)(o.Fragment,{children:[I&&(0,o.jsx)(c.I0,Object.assign({size:"medium",label:I,onClick:S},E)),C&&(0,o.jsx)(c.I0,Object.assign({size:"medium",label:C,onClick:j},T))]})})]})]})]})}var k=i(45528),w=i(68011),C=i(7089),S=i(32125);const j=function({canUseBcVisible:e,setCanUseBcVisible:t}){const{pathname:i}=(0,a.useLocation)(),u=(0,r.s)(),p=(0,C.VR)((e=>e.businessAccountInfoResponse),S.bN),m=(0,n.useMemo)((()=>[{icon:k.A,title:u("wbs_goto_bc_modal_feature3_title"),description:u("wbs_goto_bc_modal_feature3_content")},{icon:w.A,title:u("wbs_goto_bc_modal_feature1_title"),description:u("wbs_goto_bc_modal_feature1_content")}]),[u]);return(0,o.jsx)(x,{visible:e,onClose:()=>t(!1),title:u("wbs_goto_bc_modal_title"),renderRightFooter:(0,o.jsx)(c.I0,{variant:"primary",size:"medium",label:u("wbs_goto_bc_modal_btn"),onClick:()=>{(()=>{var e;const o=i===d.OZ.messages,n=null===(e=p.data)||void 0===e?void 0:e.redirect_url;n&&(o?location.href=n:window.open(n),t(!1))})(),s.f.event("webtt_bc_dm_go_to_biz_center")}}),children:(0,o.jsx)(l.$m,{children:m.map(((e,t)=>(0,o.jsxs)(l.iS,{children:[(0,o.jsx)("div",{children:(0,n.createElement)(e.icon,{fontSize:24})}),(0,o.jsxs)(l.bP,{children:[(0,o.jsx)(l.Gq,{children:u(e.title)}),(0,o.jsx)(l.k5,{children:u(e.description)})]})]},t)))})})}},68159:(e,t,i)=>{"use strict";i.d(t,{$m:()=>m,F3:()=>u,Gq:()=>v,Nk:()=>c,bP:()=>_,iS:()=>h,k5:()=>g,n5:()=>p,pS:()=>s,vE:()=>d});var o=i(62186),n=i(46508),a=i(14873),r=i(72153);const s=(0,o.default)("div",{target:"e1nx07zo0"})((({theme:{direction:e},removeMarginLeft:t})=>(0,r.mp)({direction:e,marginStart:t?"0px":"16px"})),{cursor:"pointer",height:"32px",padding:"3px 3px 0",position:"relative",WebkitAppRegion:"no-drag"},"label:DivMessageIconContainer;");s.defaultProps=Object.assign(Object.assign({},s.defaultProps),{"data-e2e":"top-dm-icon"});const l=({theme:{direction:e}})=>({width:"26px",height:"26px",transform:"rtl"===e?"rotateY(180deg)":"none"}),d=(0,o.default)(n.A,{target:"e1nx07zo1"})(l,"label:StyledIcon;"),c=(0,o.default)(a.A,{target:"e1nx07zo2"})(l,"label:StyledActiveIcon;"),u=(0,o.default)("sup",{target:"e1nx07zo3"})((({theme:e,long:t})=>[(0,r.zy)({theme:e,fontFamily:"TikTokFont",typography:"P3",color:"ConstTextInverse",fontWeight:"semiBold"}),(0,r.mp)({direction:e.direction,start:"16px"}),{position:"absolute",top:"-7px",minWidth:"20px",borderRadius:"10px",height:"20px",background:e.colors.Primary,textAlign:"center",padding:t?"0 6px":"0"}]),"label:SupMsgBadge;"),p=o.default.div`
display: flex;
align-items: center;
gap: 1rem; /* 16px */
padding-inline-start: 1rem; /* 16px */
`,m=o.default.div`
padding: 1.5rem; /* 24px */
display: flex;
flex-direction: column;
gap: 1.5rem; /* 24px */
`,h=o.default.div`
display: flex;
gap: 0.75rem; /* 12px */
`,_=o.default.div`
display: flex;
flex-direction: column;
gap: 0.375rem; /* 6px */
`,v=(0,o.default)("div",{target:"e1nx07zo4"})((({theme:{colors:e}})=>({lineHeight:"1.5",fontSize:"16px",fontWeight:"600",fontFamily:"TiktokFont",color:e.TextPrimary})),"label:TextPrimary;"),g=(0,o.default)("div",{target:"e1nx07zo5"})((({theme:{colors:e}})=>({lineHeight:"1.5",fontSize:"16px",fontFamily:"TiktokFont",color:e.TextSecondary})),"label:TextSecondary;")},92925:(e,t,i)=>{"use strict";i.d(t,{b:()=>Hi});var o=i(24643),n=i(40099),a=i(41271),r=i(73580),s=i(22224),l=i(81125),d=i(32125),c=i(46682),u=i(25616),p=i(75972),m=i(11983),h=i(44205),_=i(84827),v=i(63932),g=i(30591),f=i(62186),y=i(72153),b=i(97397);const x=(0,f.default)("div",{target:"eaptjjg0"})((({theme:{direction:e}})=>[{paddingTop:"8px",display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",position:"relative"},(0,y.mp)({direction:e,paddingStart:"16px",paddingEnd:"24px"})]),"label:DivReportDetail;"),k=(0,f.default)(b.y,{target:"eaptjjg1"})({marginTop:"12px",marginBottom:"16px",border:"none"},"label:MoreOptionsButton;"),w=(0,f.default)(b.y,{target:"eaptjjg2"})((({theme:{colors:e}})=>[{marginTop:"auto",marginBottom:"16px",background:e.Primary,color:e.ConstTextInverse}]),"label:MobileMoreOptionsButton;"),C=(0,f.default)("div",{target:"eaptjjg3"})({flexGrow:1,overflowY:"auto",height:"100px"},"label:DivDetailsContainer;");var S=i(18431),j=i(60484),I=i(48615);const T=(0,f.default)("div",{target:"e1itzts50"})({padding:"16px",display:"flex",alignItems:"center"},"label:DivItemContainer;"),E=(0,f.default)("div",{target:"e1itzts51"})((({theme:{colors:e}})=>[{fontSize:"15px",fontStyle:"normal",fontWeight:"600",lineHeight:"130%",color:e.TextPrimary,marginLeft:"17px"}]),"label:DivText;"),P=(0,f.default)("div",{target:"e1itzts52"})((({theme:{colors:e}})=>[{margin:"0px 16px",height:"0.5px",background:e.LineSecondary}]),"label:DivLine;"),O=({text:e,icon:t,onClick:i,hideLine:n=!1})=>(0,o.jsxs)("div",{children:[(0,o.jsxs)(T,{onClick:i,children:[t,(0,o.jsx)(E,{children:e})]}),!1===n&&(0,o.jsx)(P,{})]});var L=i(71863),R=i(81794),D=i(34034),A=i(10263),F=i(74341),B=i(47172),M=i(4474);const N={padding:"0px 0px 16px 0px"},q=({reportId:e,reportType:t})=>{var i;const{reportDetail:{isLoading:r,data:s}}=(0,a.P)(v.j),l=(0,c.w)(v.j),[d,p]=(0,n.useState)(!1),{isMobile:f}=(0,j.L$)((0,I.U)((()=>["isMobile"]),[])),{refreshReport:y,loggedOutCode:b}=(0,a.P)(v.j),T=(0,u.s)(),E=(0,B.useHistory)(),P=(0,n.useCallback)((()=>{l.getReportDetail({reportId:e,reportType:t})}),[e,t,l]);(0,n.useEffect)((()=>{null!==y&&(m.F.open({content:T(y.type),key:`refreshReport ${y.type}`,duration:3,widthType:"half"}),l.setRefreshReport(null))}),[y]),(0,n.useEffect)((()=>{P()}),[P]);const q=(0,n.useCallback)((e=>{switch(e){case S.B8.BLOCK_USER:return(0,o.jsx)(L.O,{size:20});case S.B8.UN_BLOCK_USER:return(0,o.jsx)(R.N,{size:20});case S.B8.REQUEST_ANOTHER_REVIEW:return(0,o.jsx)(D.Z,{size:20});case S.B8.DELETE_REPORT:return(0,o.jsx)(A.u,{size:20});default:return(0,o.jsx)(F._,{size:20})}}),[]),U=()=>{p(!1),P()},W=(0,n.useCallback)((()=>{var t;return null===(t=null==s?void 0:s.see_option_infos)||void 0===t?void 0:t.map(((t,i)=>S.yC.includes(t.code)?(0,o.jsx)(O,{onClick:()=>{(t=>{var i,o,n;let a,r;switch(t.code){case S.B8.RESUBMIT_REPORT:a=`/report/${null!==(i=null==s?void 0:s.object_type_name)&&void 0!==i?i:"video"}`,r=Object.assign({objectId:null!==(o=null==s?void 0:s.object_id)&&void 0!==o?o:"",ownerId:null!==(n=null==s?void 0:s.object_owner_id)&&void 0!==n?n:"",dsa_from_inbox:!0,report_record:JSON.stringify(null==s?void 0:s.report_record),report_id:e},void 0!==b&&{logged_out_code:b}),E.push(`${a}?${(0,M.stringify)(r)}`);break;case S.B8.REQUEST_ANOTHER_REVIEW:a="/violation-appeal",r=Object.assign({reportId:null!=e?e:""},void 0!==b&&{logged_out_code:b}),E.push(`${a}?${(0,M.stringify)(r)}`);break;case S.B8.DELETE_REPORT:l.getDeleteReport({reportId:e}),P();break;case S.B8.UN_BLOCK_USER:l.getBlockUser({toolsType:S.B8.UN_BLOCK_USER,processedUserId:t.extra.unblock_uid}),P();break;case S.B8.BLOCK_USER:l.getBlockUser({toolsType:S.B8.BLOCK_USER,processedUserId:t.extra.block_uid}),P()}})(t),p(!1)},text:t.name,icon:q(t.code),hideLine:i===(null==s?void 0:s.see_option_infos.length)-1},t.code):(0,o.jsx)(o.Fragment,{})))}),[null==s?void 0:s.see_option_infos]),H=(0,n.useCallback)((()=>{var t;return!1===f?(0,o.jsx)(S.Ay,{reportId:e,seeOptionsInfo:null!==(t=null==s?void 0:s.see_option_infos)&&void 0!==t?t:[],visible:d,onActionExecuted:U,onClose:()=>{p(!1)}}):(0,o.jsx)(h.l,{contentStyle:N,needTouchEvents:!1,visible:d,maskClosable:!0,closeStyle:{display:"none"},onClose:()=>{p(!1)},children:W()})}),[f,d,s,e,W]),z=(0,n.useMemo)((()=>f?w:k),[f]);if(r)return(0,o.jsx)(_.R,{center:!0,size:"small"});if(!s)return(0,o.jsx)("div",{});const{text_infos:V}=s,K=void 0!==t;return(0,o.jsxs)(x,{role:"list",style:Object.assign({},f&&{height:"100%"}),children:[(0,o.jsx)(C,{style:Object.assign({},f&&{height:"100%"}),children:null==V?void 0:V.map(((e,t)=>(0,o.jsx)(g.A,{item:e,isV2:K},t)))}),H(),(null===(i=null==s?void 0:s.see_option_infos)||void 0===i?void 0:i.filter((e=>S.yC.includes(e.code))).length)>0&&(0,o.jsx)(z,{onClick:()=>{p(!d)},children:T("dsa_illegal_more_options_link")})]})};var U=i(10745),W=i(46803),H=i(84987);const z={id:"flag-icon-a28d5881",use:"flag-icon-a28d5881-usage",viewBox:"0 0 32 32",content:''};function V(e){const t=(0,n.useContext)(H.X);return(0,n.useLayoutEffect)((()=>(t.add(z),()=>{t.remove("flag-icon-a28d5881")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#flag-icon-a28d5881"},void 0)}),void 0)}var K=i(8475),G=i(29450);const $={101:"report_inbox_video",102:"report_inbox_comment",103:"report_inbox_account",107:"report_inbox_live",130:"report_inbox_livecomment",106:"report_inbox_directmessage",115:"report_inbox_directmessage",123:"report_inbox_directmessage",105:"report_inbox_sound",119:"report_inbox_hashtag",141:"shoutouts_detail_comment_report_title",142:"tns_intro_reporter_title",160:"%s - qareport_question",230:"profile_page_events_list",210:"photo_name_nocaption"},J={1:"report_inbox_inreview",3:"report_inbox_violation",2:"report_inbox_noviolation",4:"showVidStatus_reportInbox_vidStatusDeleted_label",5:"showVidStatus_reportInbox_vidStatusIneligible_label"};var Q=i(63809);const Z=({report:e,index:t,onClick:i,onKeyDown:a})=>{const{timeTranslator:r}=(0,W.T)(),s=(0,u.s)(),{isMobile:l}=(0,j.L$)((0,I.U)((()=>["isMobile"]),[])),[d,c]=(0,n.useState)(!1),p=$[e.report_type]?s($[e.report_type]):"",m=r(1e3*Number(e.modify_time)),h=(0,n.useCallback)((()=>{i()}),[i]),_=(0,n.useCallback)((()=>{c(!0)}),[]),v=J[e.status]?s(J[e.status]):"";return(0,o.jsxs)(Q.iA,{onClick:h,onKeyDown:a,isMobile:l,tabIndex:0,role:"button","aria-labelledby":`report-item-content-${t}`,children:[(0,o.jsx)(Q.Fs,{children:(0,o.jsx)(V,{width:32,height:32})}),(0,o.jsxs)(Q.eH,{id:`report-item-content-${t}`,children:[(0,o.jsx)(Q.dM,{children:(()=>{if(e.title)return e.title;if(160===e.report_type){const t=` - ${s("qareport_question")||"Question"}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Q.WA,{children:e.object_desc}),(0,o.jsx)("span",{children:t.padStart(t.length+1)})]})}return p.replace("%s",e.object_owner_name||e.object_desc||"")})()}),(0,o.jsxs)(Q.tU,{children:[s("report_inbox_status"),": ",v,(0,o.jsx)(Q.hH,{children:m.padStart(m.length+1)})]})]}),e.cover_image?(0,o.jsxs)(Q.$2,{children:[(0,o.jsx)(Q.mW,{isNotLoaded:!d,src:e.cover_image,onLoad:_}),3===e.status&&d&&(0,o.jsx)(Q.xj,{children:(0,o.jsx)(G.A,{width:20,height:20})})]}):(0,o.jsx)(Q.MH,{children:(0,o.jsx)(K.A,{width:16,height:16})})]})},Y=(0,f.default)("div",{target:"eq5dlep0"})({display:"flex",flexGrow:1,flexDirection:"column",alignItems:"stretch",overflow:"auto",height:"100%"},"label:DivReportList;"),X=()=>{const{reportList:{data:e,hasNextPage:t}}=(0,a.P)(v.j),i=(0,c.w)(v.j),r=(0,n.useRef)(null);(0,n.useEffect)((()=>{e.length>0||i.getReportList()}),[i,e.length]);const s=(0,n.useCallback)((()=>{i.getReportList()}),[i]),l=(0,n.useCallback)((e=>()=>{i.updateActiveReport({reportId:e.report_id,reportType:e.report_type})}),[i]),d=(0,n.useCallback)((e=>t=>{13!==t.keyCode&&32!==t.keyCode||i.updateActiveReport({reportId:e.report_id,reportType:e.report_type})}),[i]);return(0,n.useEffect)((()=>{if(t&&e.length>0){if(!r.current)return;const{clientHeight:e,scrollHeight:o}=r.current;!(o>e)&&t&&i.getReportList()}}),[t,r,i,e]),(0,U.O9)({elemRef:r,onHitBottom:s,bottomThreshold:200,throttle:200}),(0,o.jsxs)(Y,{ref:r,children:[e.map(((e,t)=>(0,o.jsx)(Z,{report:e,index:t,onClick:l(e),onKeyDown:d(e)},t))),t&&(0,o.jsx)("div",{children:(0,o.jsx)(_.R,{center:!0,size:"small"})})]})},ee=(0,f.default)("div",{target:"e115u39r0"})({height:"100%",width:"100%",display:"flex",flexDirection:"column",alignItems:"stretch"},"label:DivReportInboxContainer;"),te=(0,f.default)("div",{target:"e115u39r1"})({display:"flex",flexDirection:"row",alignItems:"center",padding:"0 16px",margin:"24px 0 18px"},"label:DivHeader;"),ie=(0,f.default)("span",{target:"e115u39r2"})((({theme:e})=>[(0,y.zy)({theme:e,fontFamily:"TikTokDisplayFont",typography:"H4",color:"TextPrimary",fontWeight:"bold"})]),"label:SpanHeaderTitle;"),oe=(0,f.default)("div",{target:"e115u39r3"})((({theme:{direction:e,colors:t}})=>[Object.assign(Object.assign({width:"24px",height:"24px",cursor:"pointer"},"rtl"===e&&{transform:"rotate(180deg)"}),{"> svg > path":{fill:t.TextPrimary}})]),"label:DivBackButton;"),ne=({onClose:e})=>{var t,i;const{reportDetail:r,activeReport:s}=(0,a.P)(v.j),l=(0,u.s)(),d=(0,c.w)(v.j),m=(0,n.useCallback)((()=>{null===s?e():d.setActiveReport(null)}),[s,d,e]),h=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),e.stopPropagation(),m())}),[m]),_=l("report_inbox_title"),g=null!==s&&null!==(i=null===(t=r.data)||void 0===t?void 0:t.tab_title)&&void 0!==i?i:_,f=null!==s?"Back to report list":"Back to notification list";return(0,o.jsxs)(ee,{children:[(0,o.jsxs)(te,{children:[(0,o.jsx)(oe,{onClick:m,onKeyDown:h,tabIndex:0,role:"button","aria-label":f,children:(0,o.jsx)(p.A,{width:24,height:24})}),(0,o.jsx)(ie,{children:g})]}),null!==s?(0,o.jsx)(q,{reportId:s.reportId,reportType:s.reportType}):(0,o.jsx)(X,{})]})};var ae=i(50970),re=i(72642),se=i(91872),le=i(88920),de=i(67518),ce=i(85767),ue=i(91128),pe=i(53602),me=i(71199),he=i(71404);const _e=(0,f.default)("div",{target:"e1d0xjxi0"})({padding:"88px 32px 0",display:"flex",flexDirection:"column",alignItems:"center"},"label:DivErrorContainer;"),ve=(0,f.default)("p",{target:"e1d0xjxi1"})((({theme:e})=>(0,y.zy)({theme:e,typography:"P2",fontWeight:"semiBold"})),{marginTop:"20px"},"label:PErrorTitle;"),ge=(0,f.default)("p",{target:"e1d0xjxi2"})((({theme:e})=>(0,y.zy)({theme:e,typography:"H6",color:"TextSecondary"})),{marginTop:"12px",textAlign:"center"},"label:PErrorDesc;"),fe={500:{title:"inbox_all_activity",desc:"inbox_default_text",Icon:ce.A},2:{title:"Inbox_Comments_on_your_videos",desc:"Inbox_When_someone_comments_on__one_of_your_videos_you_ll_see_it_here",Icon:ue.A},7:{title:"Inbox_New_followers",desc:"Inbox_When_someone_new_follows_you_you_ll_see_it_here",Icon:pe.A},3:{title:"Inbox_Likes_on_your_videos",desc:"Inbox_When_someone_likes_one_of_your_videos_you_ll_see_it_here",Icon:me.A},505:{title:"Inbox_Likes_on_your_videos",desc:"Inbox_When_someone_likes_one_of_your_videos_you_ll_see_it_here",Icon:me.A},6:{title:"Inbox_Mentions_of_You",desc:"Inbox_When_someone_mentions_you_you_ll_see_it_here",Icon:he.A}},ye=(0,n.memo)((function({type:e}){const t=(0,u.s)(),{colors:i}=(0,de.u)(),{title:n,desc:a,Icon:r}=fe[e];return(0,o.jsxs)(_e,{children:[(0,o.jsx)(r,{width:70,height:70,fill:i.TextQuaternary}),(0,o.jsx)(ve,{children:t(n)}),(0,o.jsx)(ge,{children:t(a)})]})})),be=({item:e,onClick:t})=>{var i,a,r,s,l,d,c;const{isMobile:u=!1}=null!==(i=(0,I.U)((()=>["isMobile"]),[]))&&void 0!==i?i:{},{timeTranslator:p}=(0,W.T)(),m=p(1e3*Number(e.create_time)),h=null!==(s=null===(r=null===(a=e.template_notice)||void 0===a?void 0:a.notice)||void 0===r?void 0:r.content)&&void 0!==s?s:"",_=(0,n.useCallback)((()=>{u?window.location.href="/report/inbox":null==t||t()}),[u,t]),v=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),e.stopPropagation(),_())}),[_]);return(0,o.jsxs)(Q.iA,{isNotice:!0,onClick:_,onKeyDown:v,tabIndex:0,role:"button","aria-labelledby":"notice-report-title",children:[(0,o.jsx)(Q.Fs,{children:(0,o.jsx)(V,{width:32,height:32})}),(0,o.jsx)(Q.eH,{children:(0,o.jsxs)(Q.dM,{isNotice:!0,id:"notice-report-title",children:[null===(c=null===(d=null===(l=e.template_notice)||void 0===l?void 0:l.notice)||void 0===d?void 0:d.title)||void 0===c?void 0:c.title,":",(0,o.jsxs)(Q.tU,{isNotice:!0,children:[h.padStart(h.length+1),(0,o.jsx)(Q.hH,{children:m.padStart(m.length+1)})]})]})}),(0,o.jsx)(Q.MH,{children:(0,o.jsx)(K.A,{width:16,height:16})})]})};var xe=i(40858),ke=i(59909),we=i(72688),Ce=i(58305),Se=i(22248),je=i(31355),Ie=i(93608),Te=i(82535),Ee=i(40772),Pe=i(81211);function Oe({beforeStart:e,href:t,shouldUsePush:i,state:o,newTab:a=!1}){const r=(0,Ee.w)();return t=(0,Pe.U)(t),(0,n.useCallback)((n=>{null==e||e(n),a?window.open(t,"_blank"):r(n,{href:t,shouldUsePush:i,state:o})}),[e,r,t,a,i,o])}function Le(e){let t=e.target;for(;!((null==t?void 0:t.dataset.method)||t===e.currentTarget&&t);)t=t.parentElement;return t.dataset.method}function Re({uniqueId:e,onClick:t,enter_method:i,enter_from:o,previous_page:r,shouldHandleDom:s}){const l=(0,a.P)(ae.L,{selector:t=>{var i;const{appContext:o}=t;return(null==o?void 0:o.user)&&(null===(i=null==o?void 0:o.user)||void 0===i?void 0:i.uniqueId)===e},dependencies:[e]});return(0,n.useCallback)((e=>{var n;let a=i;s&&(a=null!==(n=Le(e))&&void 0!==n?n:i),null==t||t(e);const d={enter_method:a,page_name:null!=o?o:"homepage_message",enter_from:null!=o?o:"homepage_message",previous_page:null!=r?r:Ie.f.commonParams.page_name};l?Te.q.handleEnterProfile(d):Te.q.handleEnterUser(d)}),[i,s,t,l,o,r])}var De=i(92846);const Ae=({theme:e})=>[(0,y.zy)({theme:e,typography:"H6"}),y.AB,{display:"flex",flexDirection:"row",padding:"10px 16px",alignItems:"flex-start",cursor:"pointer",":hover":{background:e.colors.BGView}}],Fe=(0,f.default)("div",{target:"exfus50"})(Ae,"label:DivItemContainer;"),Be=(0,f.default)(je.N_,{target:"exfus51"})(Ae,"label:LinkItemContainer;"),Me=(0,f.default)("div",{target:"exfus52"})({position:"relative",width:"48px",height:"48px",flex:"0 0 48px"},"label:DivAvatarContainer;"),Ne=(0,f.default)(De.e,{target:"exfus53"})((({size:e,multiple:t,theme:i})=>t?{position:"absolute",border:`1px solid ${i.colors.BGPrimary}`,background:i.colors.BGPrimary,boxSizing:"content-box",":first-of-type":{right:0,top:0},":last-of-type":{left:0,bottom:0}}:{flex:`0 0 ${e}px`}),"label:StyledAvatar;"),qe=(0,f.default)(b.y,{target:"exfus54"})({alignSelf:"center",flex:"0 0 auto","& > svg":{marginRight:"6px"}},"label:StyledFollowButton;"),Ue=(0,f.default)("div",{target:"exfus55"})({flex:"0 0 42px",width:"42px",height:"56px",background:"center no-repeat",backgroundSize:"cover",borderRadius:"2px"},"label:DivVideoCover;"),We=(0,f.default)(je.N_,{target:"exfus56"})({flex:"0 0 42px",width:"42px",height:"56px",background:"center no-repeat",backgroundSize:"cover",borderRadius:"2px"},"label:StyledLinkVideoCover;"),He=(0,f.default)("div",{target:"exfus57"})({padding:"0 12px",flex:"1 1 auto"},"label:DivContentContainer;"),ze=({theme:e})=>({fontWeight:e.fontWeights.semiBold,wordBreak:"break-all"}),Ve=({theme:e})=>({fontWeight:e.fontWeights.semiBold,wordBreak:"break-all","&:focus":{outline:"none"},"&:focus-visible":{outline:`2px solid ${e.colors.Negative}`}}),Ke=(0,f.default)("p",{target:"exfus58"})((0,y.m4)(1),ze,"label:PTitleText;"),Ge=(0,f.default)("a",{target:"exfus59"})((0,y.m4)(1),Ve,"label:ATitleLink;"),$e=(0,f.default)(je.N_,{target:"exfus510"})((0,y.m4)(1),ze,"label:StyledTitleTextLink;"),Je=(0,f.default)("p",{target:"exfus511"})((0,y.m4)(7),(({theme:e})=>({color:e.colors.TextTertiary,maxHeight:130,wordBreak:"break-word"})),"label:PDescText;"),Qe=(0,f.default)("span",{target:"exfus512"})((({theme:{colors:e}})=>({color:e.TextPrimary})),"label:SpanPrimary;"),Ze=(0,f.default)(Je,{target:"exfus513"})((({theme:e})=>({position:"relative",paddingLeft:"8px",marginTop:"4px",lineClamp:1,WebkitLineClamp:1,"::before":{content:'""',position:"absolute",top:0,left:0,width:"2px",height:"100%",background:e.colors.LineSecondary}})),"label:StyledExtraText;"),Ye=(0,f.default)("div",{target:"exfus514"})({marginTop:"8px"},"label:DivFollowReqButtonWrapper;"),Xe=(0,f.default)(b.y,{target:"exfus515"})({display:"inline-flex",":not(:first-of-type)":{marginLeft:"8px"}},"label:StyledFollowReqButton;"),et=(0,f.default)(B.Link,{target:"exfus516"})((({theme:e})=>({"&:focus":{outline:"none"},"&:focus-visible":{outline:`2px solid ${e.colors.Negative}`}})),"label:StyledLink;"),tt=(0,f.default)("div",{target:"exfus517"})([Ae,{alignItems:"center"}],"label:DivSystemNotifItemContainer;"),it=(0,f.default)("div",{target:"exfus518"})([{minWidth:"48px",width:"48px",height:"48px",borderRadius:"24px",border:"1px solid rgba(22, 24, 35, 1)",backgroundColor:"rgba(22, 24, 35, 1)",display:"flex",justifyContent:"center",alignItems:"center"}],"label:DivSystemNotifIconContainer;"),ot=(0,f.default)("div",{target:"exfus519"})((({theme:{direction:e,colors:t}})=>[Object.assign(Object.assign({minWidth:"16px",width:"16px",height:"16px"},"rtl"===e&&{transform:"rotate(180deg)"}),{"> svg > path":{fill:t.TextTertiary}})]),"label:DivArrowContainer;"),nt=(0,f.default)("p",{target:"exfus520"})((0,y.m4)(2),(({theme:e})=>({color:e.colors.TextTertiary,maxHeight:130,wordBreak:"break-word"})),"label:PSystemNotifDescText;"),at=(0,f.default)("div",{target:"exfus521"})((({theme:e})=>({alignItems:"flex-start",backgroundColor:e.isDark?"rgba(54, 54, 54, 1)":"rgba(245, 245, 245, 1)",display:"flex",flexDirection:"column",borderRadius:"4px",margin:"0px 16px",marginBottom:"22px",padding:"16px",":hover":{cursor:"pointer"}})),"label:DivSystemNotifListItem;"),rt=(0,f.default)("div",{target:"exfus522"})({display:"flex",alignItems:"center"},"label:DivSystemNotifListItemHeader;"),st=(0,f.default)("div",{target:"exfus523"})((({theme:e})=>({alignItems:"center",justifyContent:"center",display:"flex",borderRadius:"16px",border:"1px solid "+(e.isDark?"rgba(62, 62, 62, 1)":"rgba(232, 232, 232, 1)"),backgroundColor:e.isDark?"rgba(62, 62, 62, 1)":"rgba(232, 232, 232, 1)",color:e.colors.TextPrimary,minWidth:"32px",width:"32px",height:"32px",marginInlineEnd:"8px"})),"label:DivSystemNotifListItemHeaderIcon;"),lt=(0,f.default)("div",{target:"exfus524"})({marginTop:"8px",flex:1},"label:DivSystemNotifListItemBody;"),dt=(0,f.default)("hr",{target:"exfus525"})((({theme:e})=>({color:e.isDark?"rgb(255, 255, 255)":"rgb(22, 24, 35)",opacity:.1,borderTop:"1px solid",margin:"12px 0px 8px 0px",width:"100%"})),"label:HrDivider;"),ct=(0,n.memo)((function({item:e,content:t}){var i,n;const{timeTranslator:a}=(0,W.T)(),{comment:r,create_time:s}=e,{comment_type:l,reply_comment:d}=r,c=(0,o.jsxs)(o.Fragment,{children:[" ",a(1e3*Number(s))]});return 2===l||11===l?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[(0,o.jsx)(Qe,{children:t}),c]}),(0,o.jsx)(Ze,{children:`${null!==(n=null===(i=null==d?void 0:d.user)||void 0===i?void 0:i.nickname)&&void 0!==n?n:""}: ${null==d?void 0:d.text}`})]}):(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[(0,o.jsx)(Qe,{children:t}),c]})})),ut=(0,n.memo)((function({item:e}){var t;const{t:i}=(0,W.T)(),{user:n,content:a,itemHref:r,coverUrl:s,handleClickNotice:l,handleClickVideoCover:d}=(0,ke.g)({item:e}),c=(0,we.fJR)({uniqueId:null!==(t=null==n?void 0:n.uniqueId)&&void 0!==t?t:"",secUid:null==n?void 0:n.secUid}),u=Re({uniqueId:null==n?void 0:n.uniqueId,onClick:Ce.dG,enter_method:"click_head"}),p=Re({uniqueId:null==n?void 0:n.uniqueId,onClick:Ce.dG,enter_method:"click_name"});return n?(0,o.jsxs)(Fe,{"data-e2e":"inbox-list-item",onClick:l,children:[(0,o.jsx)(je.N_,{to:c,onClick:u,ariaLabel:i("accessibilityLabels_link_userProfile",{username:n.nickname}),children:(0,o.jsx)(Ne,{size:48,src:n.avatarThumb,multiple:!1,alt:""})}),(0,o.jsxs)(He,{children:[(0,o.jsx)($e,{"data-e2e":"inbox-title",to:c,onClick:p,children:n.nickname}),(0,o.jsx)(ct,{item:e,user:n,content:a})]}),(0,o.jsx)(je.N_,{to:r,onClick:d,children:(0,o.jsx)(Ue,{style:{backgroundImage:`url(${s})`}})})]}):(0,Se.d)(["user"])}));var pt=i(17566),mt=i(84908);const ht=(0,n.memo)((function({item:e}){var t,i,a,r,s,l;const{t:c,timeTranslator:u}=(0,W.T)(),p=(0,pt._u)(),m=(0,mt.nW)((t=>{var i;return t.users[null!==(i=e.duet.aweme.author.unique_id)&&void 0!==i?i:""]}),d.bN),h=p({uniqueId:null!==(t=null==m?void 0:m.uniqueId)&&void 0!==t?t:"",secUid:null==m?void 0:m.secUid,videoId:e.duet.aweme.aweme_id,isPhotomode:150===e.duet.aweme.aweme_type}),_=(0,we.fJR)({uniqueId:null!==(i=null==m?void 0:m.uniqueId)&&void 0!==i?i:"",secUid:null==m?void 0:m.secUid}),v=Re({uniqueId:null==m?void 0:m.uniqueId,enter_method:"click_head"}),g=Re({uniqueId:null==m?void 0:m.uniqueId,enter_method:"click_name"}),f=Oe({href:h,shouldUsePush:!0,beforeStart:function(e){const{vid:t,authorId:i}=e;return(0,n.useCallback)((()=>{Te.q.handleEnterVideo({enter_method:"click_noti",group_id:t,to_group_id:t,to_author_id:i})}),[i,t])}({vid:e.duet.aweme.aweme_id,authorId:e.duet.aweme.author.uid})});return m?(0,o.jsxs)(Fe,{"data-e2e":"inbox-list-item",onClick:f,children:[(0,o.jsx)(je.N_,{to:_,onClick:v,ariaLabel:c("accessibilityLabels_link_userProfile",{username:m.nickname}),children:(0,o.jsx)(Ne,{size:48,src:m.avatarThumb,alt:""})}),(0,o.jsxs)(He,{children:[(0,o.jsx)($e,{"data-e2e":"inbox-title",to:_,onClick:g,children:m.nickname}),(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[c("Inbox_created_a_duet_with_you").replace(/%(s|#)/g,"")," ",u(1e3*Number(e.create_time))]})]}),(0,o.jsx)(Ue,{style:{backgroundImage:`url(${null===(l=null===(s=null===(r=null===(a=e.duet.aweme)||void 0===a?void 0:a.video)||void 0===r?void 0:r.cover)||void 0===s?void 0:s.url_list)||void 0===l?void 0:l[0]})`}})]}):(0,Se.d)(["user"])}));var _t=i(39383);const vt=(0,n.memo)((function({item:e}){const{user:t,userHref:i,content:n,followButton:a,handleClickNotice:r}=(0,_t.U)({item:e,isPopup:!1}),{t:s,timeTranslator:l}=(0,W.T)();if(!t)return(0,Se.d)(["user"]);const d=l(1e3*Number(e.create_time));return(0,o.jsxs)(Fe,{"data-e2e":"inbox-list-item",onClick:r,children:[(0,o.jsx)(De.e,{size:48,src:t.avatarThumb,style:{flex:"0 0 48px"},"data-method":"click_head",alt:""}),(0,o.jsxs)(He,{children:[(0,o.jsx)(Ge,{"data-e2e":"inbox-title",href:i,onClick:Ce.wo,"data-method":"click_name","aria-label":s("accessibilityLabels_link_userProfile",{username:t.nickname}),children:t.nickname}),(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[n," ",d]})]}),a]})}));var gt,ft=i(52757);!function(e){e[e.Single=48]="Single",e[e.Multiple=36]="Multiple"}(gt||(gt={}));const yt=(0,n.memo)((function({users:e}){var t,i,n,a,r;const s=(0,u.s)(),l=Boolean(null==e?void 0:e[1]),d=Re({uniqueId:null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.uniqueId,enter_method:"click_head"});if(!l){const{uniqueId:t="",secUid:a,nickname:r}=null!==(i=null==e?void 0:e[0])&&void 0!==i?i:{},l=(0,we.fJR)({uniqueId:t,secUid:a});return(0,o.jsx)(Me,{onClick:Ce.dG,children:(0,o.jsx)(et,{to:l,onClick:d,"aria-label":s("accessibilityLabels_link_userProfile",{username:r}),children:(0,o.jsx)(Ne,{size:48,src:null===(n=null==e?void 0:e[0])||void 0===n?void 0:n.avatarThumb,alt:""})})})}return(0,o.jsxs)(Me,{"data-e2e":"inbox-avatar-multiple",children:[(0,o.jsx)(Ne,{size:36,multiple:!0,src:null===(a=null==e?void 0:e[1])||void 0===a?void 0:a.avatarThumb,alt:""}),(0,o.jsx)(Ne,{size:36,multiple:!0,src:null===(r=null==e?void 0:e[0])||void 0===r?void 0:r.avatarThumb,alt:""})]})})),bt=function({user:e}){const t=(0,u.s)(),i=Re({uniqueId:null==e?void 0:e.uniqueId,enter_method:"click_name"});if(!e)return null;const{uniqueId:n,secUid:a,nickname:r}=e,s=(0,we.fJR)({uniqueId:n,secUid:a});return(0,o.jsx)(et,{to:s,onClick:i,"aria-label":t("accessibilityLabels_link_userProfile",{username:r}),children:e.nickname})},xt=(0,n.memo)((function({item:e,content:t}){var i;const{timeTranslator:n}=(0,W.T)(),a=n(1e3*Number(e.create_time),!0);if(1===e.digg.digg_type)return(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[t," ",a]});if(3===e.digg.digg_type){const{text:n,user:r}=null!==(i=e.digg.comment)&&void 0!==i?i:{};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[t," ",a]}),(0,o.jsxs)(Ze,{children:[null==r?void 0:r.nickname,": ",n]})]})}return null})),kt=function({merge_count:e,users:t}){const i=(0,u.s)();return(null==t?void 0:t[1])?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(bt,{user:null==t?void 0:t[0]}),","," ",(0,o.jsx)(bt,{user:null==t?void 0:t[1]}),"number"==typeof e&&e>2&&(0,o.jsxs)(o.Fragment,{children:[" ",i("Inbox_and")," ",i("Inbox_others").replace(/%d/,String(e-2))]})]}):(0,o.jsx)(bt,{user:null==t?void 0:t[0]})},wt=(0,n.memo)((function({item:e}){const{users:t,content:i,itemHref:n,coverUrl:a,handleClickNotice:r,handleClickVideoCover:s}=(0,ft.w)({item:e});return(0,o.jsxs)(Fe,{"data-e2e":"inbox-list-item",onClick:r,children:[(0,o.jsx)(yt,{users:t}),(0,o.jsxs)(He,{children:[(0,o.jsx)(Ke,{"data-e2e":"inbox-title",onClick:Ce.dG,children:(0,o.jsx)(kt,{users:t,merge_count:e.digg.merge_count})}),(0,o.jsx)(xt,{item:e,content:i})]}),(0,o.jsx)(We,{onClick:s,to:n,style:{backgroundImage:`url(${a})`}})]})}));var Ct=i(70836);const St=({item:e,content:t})=>{var i;const{timeTranslator:n}=(0,W.T)(),{create_time:a,at:r}=e,{sub_type:s,reply_comment:l}=r,d=(0,o.jsxs)(o.Fragment,{children:[" ",n(1e3*Number(a))]});return 1===s?(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[t,d]}):2===s?(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[(0,o.jsx)(Qe,{children:t}),d]}):5===s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[(0,o.jsx)(Qe,{children:t}),d]}),(0,o.jsx)(Ze,{children:null!==(i=null==l?void 0:l.text)&&void 0!==i?i:""})]}):null},jt=(0,n.memo)((function({item:e}){var t;const{t:i}=(0,W.T)(),{user:n,content:a,itemHref:r,coverUrl:s,handleClickNotice:l,handleClickVideoCover:d}=(0,Ct.h)({item:e}),c=(0,we.fJR)({uniqueId:null!==(t=null==n?void 0:n.uniqueId)&&void 0!==t?t:"",secUid:null==n?void 0:n.secUid}),u=Re({uniqueId:null==n?void 0:n.uniqueId,onClick:Ce.dG,enter_method:"click_head"}),p=Re({uniqueId:null==n?void 0:n.uniqueId,onClick:Ce.dG,enter_method:"click_name"});return n?(0,o.jsxs)(Fe,{"data-e2e":"inbox-list-item",onClick:l,children:[(0,o.jsx)(je.N_,{to:c,onClick:u,ariaLabel:i("accessibilityLabels_link_userProfile",{username:null==n?void 0:n.nickname}),children:(0,o.jsx)(Ne,{size:48,src:n.avatarThumb,alt:""})}),(0,o.jsxs)(He,{children:[(0,o.jsx)($e,{"data-e2e":"inbox-title",to:c,onClick:p,children:n.nickname}),(0,o.jsx)(St,{item:e,content:a})]}),(0,o.jsx)(je.N_,{to:r,onClick:d,children:(0,o.jsx)(Ue,{style:{backgroundImage:`url(${s})`}})})]}):(0,Se.d)(["user"])}));var It,Tt=i(91505);!function(e){e[e.Single=48]="Single",e[e.Multiple=36]="Multiple"}(It||(It={}));const Et=(0,n.memo)((function({users:e}){var t,i,n,a,r;const s=(0,u.s)(),l=Boolean(e[1]),d=Re({uniqueId:null===(t=e[0])||void 0===t?void 0:t.uniqueId,enter_method:"click_head"});if(!l){const{uniqueId:t="",secUid:a,nickname:r}=null!==(i=null==e?void 0:e[0])&&void 0!==i?i:{},l=(0,we.fJR)({uniqueId:t,secUid:a});return(0,o.jsx)(Me,{onClick:Ce.dG,children:(0,o.jsx)(et,{to:l,onClick:d,"aria-label":s("accessibilityLabels_link_userProfile",{username:r}),children:(0,o.jsx)(Ne,{size:48,src:null===(n=e[0])||void 0===n?void 0:n.avatarThumb,alt:""})})})}return(0,o.jsxs)(Me,{"data-e2e":"inbox-avatar-multiple",children:[(0,o.jsx)(Ne,{size:36,multiple:!0,src:null===(a=e[1])||void 0===a?void 0:a.avatarThumb,alt:""}),(0,o.jsx)(Ne,{size:36,multiple:!0,src:null===(r=e[0])||void 0===r?void 0:r.avatarThumb,alt:""})]})})),Pt=function({user:e}){const t=(0,u.s)(),i=Re({uniqueId:null==e?void 0:e.uniqueId,enter_method:"click_name"});if(!e)return null;const{uniqueId:n,secUid:a,nickname:r}=e,s=(0,we.fJR)({uniqueId:n,secUid:a});return(0,o.jsx)(et,{to:s,onClick:i,"aria-label":t("accessibilityLabels_link_userProfile",{username:r}),children:e.nickname})},Ot=(0,n.memo)((function({item:e,content:t}){const{timeTranslator:i}=(0,W.T)(),n=i(1e3*Number(e.create_time),!0);return(0,o.jsxs)(Je,{"data-e2e":"inbox-content",children:[t," ",n]})})),Lt=function({mergeCount:e,users:t}){const i=(0,u.s)();return t[1]?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Pt,{user:t[0]}),","," ",(0,o.jsx)(Pt,{user:t[1]}),"number"==typeof e&&e>2&&(0,o.jsxs)(o.Fragment,{children:[" ",i("Inbox_and")," ",i("Inbox_others").replace(/%d/,String(e-2))]})]}):(0,o.jsx)(Pt,{user:t[0]})},Rt=(0,n.memo)((function({item:e}){var t,i,n;const{users:a,content:r,itemHref:s,coverUrl:l,handleClickVideoCover:d}=(0,Tt.A)({item:e});return(0,o.jsxs)(Be,{"data-e2e":"inbox-list-item",onClick:d,to:s,children:[(0,o.jsx)(Et,{users:a}),(0,o.jsxs)(He,{children:[(0,o.jsx)(Ke,{"data-e2e":"inbox-title",onClick:Ce.dG,children:(0,o.jsx)(Lt,{users:a,mergeCount:null!==(n=null===(i=null===(t=e.template_notice.notice)||void 0===t?void 0:t.title)||void 0===i?void 0:i.merge_count)&&void 0!==n?n:0})}),(0,o.jsx)(Ot,{item:e,content:r})]}),l&&(0,o.jsx)(We,{onClick:d,to:s,style:{backgroundImage:`url(${l})`}})]})})),Dt=(0,n.memo)((function({item:e,onReportInboxClick:t}){return xe.BS.isFollowNotice(e)?(0,o.jsx)(vt,{item:e}):xe.BS.isLikeNotice(e)?(0,o.jsx)(wt,{item:e}):xe.BS.isCommentNotice(e)?(0,o.jsx)(ut,{item:e}):xe.BS.isDuetNotice(e)?(0,o.jsx)(ht,{item:e}):xe.BS.isMentionNotice(e)?(0,o.jsx)(jt,{item:e}):xe.BS.isReportInboxNotice(e)?(0,o.jsx)(be,{item:e,onClick:t}):xe.BS.isRepostInboxNotice(e)?(0,o.jsx)(Rt,{item:e}):null}));var At=i(34393);const Ft={id:"system-notif-inbox-icon-195ebab2",use:"system-notif-inbox-icon-195ebab2-usage",viewBox:"0 0 18 16",content:''};function Bt(e){const t=(0,n.useContext)(H.X);return(0,n.useLayoutEffect)((()=>(t.add(Ft),()=>{t.remove("system-notif-inbox-icon-195ebab2")})),[]),(0,o.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,o.jsx)("use",{xlinkHref:"#system-notif-inbox-icon-195ebab2"},void 0)}),void 0)}var Mt=i(84798);const Nt=(0,n.memo)((function(e){var t,i;const n=(0,u.s)(),a=Mt.Sb[(0,xe.G6)(e.systemNotif.type)],r=a?n(a.label):null;return r?(0,o.jsxs)(tt,{onClick:e.onClick,children:[(0,o.jsx)(it,{children:(0,o.jsx)(Bt,{width:16,height:16})}),(0,o.jsxs)(He,{children:[(0,o.jsx)(Ke,{children:n("system_notifications_inbox_header")}),(0,o.jsxs)(nt,{children:[r,": ",null===(i=null===(t=e.systemNotif.template_notice)||void 0===t?void 0:t.notice)||void 0===i?void 0:i.content]})]}),(0,o.jsx)(ot,{children:(0,o.jsx)(At.A,{style:{fontSize:16}})})]}):null}));var qt=i(52261);const Ut=(0,n.memo)((function({uniqueId:e}){var t;const i=(0,u.s)(),r=(0,mt.nW)((t=>t.users[e]),d.bN),s=(0,qt.Cp)(),l=(0,n.useCallback)((t=>i=>{i.preventDefault(),i.stopPropagation(),s.postFollowReply({approveOrReject:t,uniqueId:e,uid:null==r?void 0:r.id})}),[s,e,null==r?void 0:r.id]),c=(0,n.useCallback)((t=>i=>{13!==i.keyCode&&32!==i.keyCode||(i.preventDefault(),i.stopPropagation(),s.postFollowReply({approveOrReject:t,uniqueId:e,uid:null==r?void 0:r.id}))}),[s,e,null==r?void 0:r.id]),p=(0,we.fJR)({uniqueId:null!==(t=null==r?void 0:r.uniqueId)&&void 0!==t?t:"",secUid:null==r?void 0:r.secUid}),m=Oe({href:p,shouldUsePush:!0,beforeStart:Re({uniqueId:null==r?void 0:r.uniqueId,enter_method:"click_noti",enter_from:"follow_request_page",previous_page:"homepage_message",shouldHandleDom:!0})}),h=function({uniqueId:e,onKeyDown:t,enter_method:i,enter_from:o,previous_page:r,shouldHandleDom:s}){const l=(0,a.P)(ae.L,{selector:t=>{var i;const{appContext:o}=t;return(null==o?void 0:o.user)&&(null===(i=null==o?void 0:o.user)||void 0===i?void 0:i.uniqueId)===e},dependencies:[e]});return(0,n.useCallback)((e=>{var n;let a=i;s&&(a=null!==(n=Le(e))&&void 0!==n?n:i),null==t||t(e);const d={enter_method:a,page_name:null!=o?o:"homepage_message",enter_from:null!=o?o:"homepage_message",previous_page:null!=r?r:Ie.f.commonParams.page_name};l?Te.q.handleEnterProfile(d):Te.q.handleEnterUser(d)}),[i,s,t,l,o,r])}({uniqueId:null==r?void 0:r.uniqueId,enter_method:"click_noti",enter_from:"follow_request_page",previous_page:"homepage_message",shouldHandleDom:!0}),_=function({beforeStart:e,href:t,shouldUsePush:i,state:o}){const a=(0,Ee.w)();return t=(0,Pe.U)(t),(0,n.useCallback)((n=>{null==e||e(n),a(n,{href:t,shouldUsePush:i,state:o})}),[e,a,t,i,o])}({href:p,shouldUsePush:!0,beforeStart:h}),v=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),e.stopPropagation(),_(e))}),[_]);return r?(0,o.jsxs)(Fe,{"data-e2e":"inbox-list-item",onClick:m,onKeyDown:v,tabIndex:0,role:"listitem","aria-label":i("accessibilityLabels_link_userProfile",{username:r.nickname}),children:[(0,o.jsx)(Ne,{size:48,src:r.avatarThumb,"data-method":"click_head",alt:""}),(0,o.jsxs)(He,{children:[(0,o.jsx)(Ge,{"data-e2e":"inbox-title",href:p,onClick:Ce.wo,"data-method":"click_name",tabIndex:-1,"aria-label":i("accessibilityLabels_link_userProfile",{username:r.nickname}),children:r.uniqueId}),(0,o.jsx)(Je,{children:r.nickname}),(0,o.jsxs)(Ye,{children:[(0,o.jsx)(Xe,{size:"tiny",onClick:l(1),onKeyDown:c(1),"aria-label":i("delete"),children:i("delete")}),(0,o.jsx)(Xe,{"data-e2e":"inbox-request-accept",size:"tiny",buttonTheme:"primary",onClick:l(0),onKeyDown:c(0),"aria-label":i("inbox_request_accept"),children:i("inbox_request_accept")})]})]})]}):(0,Se.d)(["user"])}));var Wt=i(12527);const Ht=(0,f.default)("div",{target:"e11z9zg00"})({flex:"1 1 auto",overflow:"auto"},"label:DivInboxContentContainer;"),zt=(0,f.default)("p",{target:"e11z9zg01"})((({theme:e})=>(0,y.zy)({theme:e,typography:"P3",fontWeight:"semiBold",color:"TextTertiary"})),{padding:"0 16px",marginTop:"8px"},"label:PTimeGroupTitle;"),Vt=(0,f.default)(je.N_,{target:"e11z9zg02"})({display:"block",width:"54px",height:"72px",background:"center no-repeat",backgroundSize:"cover",borderRadius:"2px",margin:"auto"},"label:StyledAnchor;"),Kt=(0,f.default)("p",{target:"e11z9zg03"})((({theme:e})=>(0,y.zy)({theme:e,typography:"H6",color:"TextTertiary"})),y.PR,{padding:"8px 48px 2px"},"label:PCommentText;"),Gt=(0,f.default)("div",{target:"e11z9zg04"})((({theme:{colors:e}})=>({height:"1px",background:e.LineSecondary,transform:"scaleY(0.5)",margin:"8px 16px"})),"label:DivSplit;"),$t=(0,f.default)("div",{target:"e11z9zg05"})({cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",marginBottom:"8px"},(({theme:{direction:e}})=>(0,y.mp)({direction:e,marginStart:"16px",marginEnd:"auto"})),"label:DivBack;"),Jt=(0,f.default)(Wt.A,{target:"e11z9zg06"})((({theme:{direction:e}})=>"ltr"===e?null:{transform:"rotate(180deg)"}),"label:StyledChevronLeftOffset;"),Qt=(0,f.default)("div",{target:"e11z9zg07"})((({theme:e})=>(0,y.zy)({theme:e,typography:"P3"})),{padding:"8px 24px 8px 16px",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",cursor:"pointer"},"label:DivFollowReqEntranceContainer;"),Zt=(0,f.default)("span",{target:"e11z9zg08"})({display:"flex",flexDirection:"row",alignItems:"center"},"label:SpanHintContainer;"),Yt=(0,f.default)("i",{target:"e11z9zg09"})((({theme:{colors:e,direction:t}})=>[{width:"8px",height:"8px",borderRadius:"8px",background:e.Primary},(0,y.mp)({direction:t,marginEnd:"8px"})]),"label:IDot;"),Xt=(0,f.default)("span",{target:"e11z9zg010"})((({theme:{colors:e,direction:t}})=>[{color:e.TextTertiary,marginRight:"8px"},(0,y.mp)({direction:t,marginEnd:"8px"})]),"label:SpanHintText;"),ei=(0,f.default)("ul",{target:"e11z9zg011"})({padding:0,margin:0,listStyleType:"none"},"label:UlInboxItemListContainer;"),ti=(0,f.default)("li",{target:"e11z9zg012"})({padding:0,margin:0,listStyleType:"none"},"label:LiInboxItemWrapper;"),ii=(0,n.memo)((function(e){const t=(0,u.s)(),i=(0,n.useMemo)((()=>t("Back")),[t]);return(0,o.jsxs)($t,{"data-e2e":"inbox-second-back",onClick:e.onClickBack,onKeyDown:e.onBackKeyDown,tabIndex:0,role:"button","aria-label":i,children:[(0,o.jsx)(Wt.A,{}),(0,o.jsx)("span",{children:i})]})})),oi=(0,n.memo)((function(e){const{item:t}=e;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ii,{onClickBack:e.onClickBack,onBackKeyDown:e.onBackKeyDown}),(0,o.jsx)(Ht,{"data-e2e":"inbox-list",role:"list",children:t.users.map((e=>(0,o.jsx)(Ut,{uniqueId:e},e)))})]})}));var ni=i(68652);const ai=(0,n.memo)((function(e){const{total:t}=e,i=(0,u.s)(),{colors:n}=(0,de.u)();return(0,o.jsxs)(Qt,{"data-e2e":"inbox-follow-request",onClick:e.onClick,onKeyDown:e.onKeyDown,tabIndex:0,role:"button","aria-labelledby":"inbox-follow-req-entrance-header",children:[(0,o.jsx)("h4",{id:"inbox-follow-req-entrance-header",children:i("Inbox_Follow_requests")}),(0,o.jsxs)(Zt,{children:[(0,o.jsx)(Yt,{}),(0,o.jsx)(Xt,{children:t}),(0,o.jsx)(ni.A,{fill:n.TextTertiary,width:12,height:12})]})]})}));var ri=i(62738),si=i(40935);const li=(0,n.memo)((function({uniqueId:e}){var t;const i=(0,u.s)(),a=(0,mt.nW)((t=>t.users[e]),d.bN),{handleFollow:r,isFollowing:s,text:l,relation:c}=(0,si.Tu)({uniqueId:e,prevent:!0,teaParams:{enter_from:"homepage_message"}}),p=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||r(e)}),[r]),m=(0,we.fJR)({uniqueId:null!==(t=null==a?void 0:a.uniqueId)&&void 0!==t?t:"",secUid:null==a?void 0:a.secUid}),h=Oe({href:m,shouldUsePush:!0,beforeStart:Re({uniqueId:e,enter_method:"click_noti",shouldHandleDom:!0})});return a?(0,o.jsxs)(Fe,{"data-e2e":"inbox-list-item",onClick:h,children:[(0,o.jsx)(Ne,{size:48,src:a.avatarThumb,"data-method":"click_head",alt:""}),(0,o.jsxs)(He,{children:[(0,o.jsx)(Ge,{"data-e2e":"inbox-title",href:m,onClick:Ce.wo,"data-method":"click_name","aria-label":i("accessibilityLabels_link_userProfile",{username:a.nickname}),children:a.uniqueId}),(0,o.jsx)(Je,{"data-e2e":"inbox-content",children:a.nickname})]}),(0,o.jsxs)(qe,{onClick:r,onKeyDown:p,size:"tiny",buttonTheme:s?"default":"primary",children:[2===c?(0,o.jsx)(ri.A,{}):null,l]})]}):(0,Se.d)(["user"])})),di=(0,n.memo)((function(e){var t,i,a;const{item:r}=e,s=(0,u.s)(),l=(0,pt._u)(),[{loading:c,users:p},m]=(0,qt.P4)((e=>e.diggList),d.bN);(0,n.useEffect)((()=>{var e,t;return m.fetchDiggListData({ref_id:null!==(t=null===(e=r.digg.comment)||void 0===e?void 0:e.cid)&&void 0!==t?t:r.digg.aweme.aweme_id}),()=>{m.setDiggList([]),m.setDiggListLoading(!1)}}),[m,r.digg.aweme.aweme_id,null===(t=r.digg.comment)||void 0===t?void 0:t.cid]);const h=(0,n.useCallback)((()=>c&&!p.length?(0,o.jsx)(_.R,{size:"small",center:!0}):p.map((e=>(0,o.jsx)(li,{uniqueId:e},e)))),[c,p]),v=l(r),g=(0,Pe.U)(v),f=(0,n.useCallback)((()=>{location.href=g}),[g]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)($t,{"data-e2e":"inbox-second-back",onClick:e.onClickBack,onKeyDown:e.onBackKeyDown,tabIndex:0,role:"button","aria-label":s("Back"),children:[(0,o.jsx)(Jt,{}),(0,o.jsx)("span",{children:s("Back")})]}),(0,o.jsxs)(Ht,{"data-e2e":"inbox-list",children:[(0,o.jsx)(Vt,{to:g,style:{backgroundImage:`url(${null===(i=r.digg.aweme.video.cover.url_list)||void 0===i?void 0:i[0]})`},onClick:f}),(null===(a=r.digg.comment)||void 0===a?void 0:a.text)&&(0,o.jsx)(Kt,{children:r.digg.comment.text}),(0,o.jsx)(Gt,{}),h()]})]})}));var ci;!function(e){e[e.New=0]="New",e[e.Today=1]="Today",e[e.Yesterday=2]="Yesterday",e[e.ThisWeek=3]="ThisWeek",e[e.ThisMonth=4]="ThisMonth",e[e.Previous=5]="Previous"}(ci||(ci={}));const ui={0:"Inbox_New",1:"Inbox_Today",2:"Inbox_Yesterday",3:"Inbox_This_Week",4:"Inbox_This_Month",5:"Inbox_Previous"},pi=[0,1,6,(new Date).getDate()].map((e=>function(e=0){return(new Date).setHours(0,0,0,0)/1e3-86400*e}(e))),mi=e=>{if(!e||!e.has_read)return 0;const t=pi.findIndex((t=>t{var i;let o=(null!==(i=e.notice_list)&&void 0!==i?i:[]).slice();if(g||(o=o.filter((e=>!xe.BS.isRepostInboxNotice(e)))),500!==t||!h)return o;const n=mi(h),a=o;for(let e=0;et.create_time)return a.splice(e,0,h),a}return a.push(h),a}),[t,h,e.notice_list]),y=s&&500===t,b=y?(0,o.jsx)(Nt,{systemNotif:s,onClick:d}):null;(0,n.useEffect)((()=>{y&&v.handleSystemNotificationShow()}),[v,y]);let x=mi(null==f?void 0:f[0]);const k=(0,n.useMemo)((()=>{const e=[];let t=0;if(null==f||f.map(((i,o)=>{if(0===o||0===x&&i.has_read||i.create_timen[0].create_time){e.splice(o,0,[i]);break}if(o===e.length-1&&s.create_time{const t=mi(e[0]),i=(0,o.jsx)(zt,{children:m(ui[t])});return(0,o.jsxs)(n.Fragment,{children:[i,(0,o.jsx)(ei,{children:e.map((e=>{const t="nid_str"in e?e.nid_str:e.nid;return!0===e.isSystemNotif?(0,o.jsx)(ti,{children:b},t):(0,o.jsx)(ti,{children:(0,o.jsx)(Dt,{item:e,onReportInboxClick:a})},t)}))})]},t)}))}):(0,o.jsx)(ye,{type:t})})),_i=(0,n.memo)((function(e){var t;const{activeGroup:i,item:a,systemNotifItem:c,reportInboxList:u,followItem:p,showFollow:m,onFollowChange:h,onHitBottom:v,onReportInboxClick:g,onSystemNotifItemClick:f}=e,y=(0,r.Nj)(l.b),[b,{setExpandedLikeItem:x}]=(0,s.nG)((e=>e.expandedLikeItem),d.bN),k=(0,n.useCallback)((()=>{x(null)}),[x]),w=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||x(null)}),[x]),C=(0,n.useRef)(null);(0,se.O)({elementRef:C,onHitBottom:v,threshold:100});const S=(0,n.useCallback)((()=>{h(!1)}),[h]),j=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||h(!1)}),[h]),I=(0,n.useCallback)((()=>{h(!0),y.handleEnterFollow({request_cnt:Number(p.total)})}),[p.total,h,y]),T=(0,n.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||I()}),[I]),E=(0,xe.Bl)();return b?(0,o.jsx)(di,{item:b,onClickBack:k,onBackKeyDown:w}):m?(0,o.jsx)(oi,{onClickBack:S,onBackKeyDown:j,item:p}):(0,o.jsxs)(Ht,{"data-e2e":"inbox-list",id:"header-inbox-list",ref:C,tabIndex:0,role:"tabpanel","aria-labelledby":`inbox-tab-${E.indexOf(i)}`,children:[500===i&&Boolean(p.total)&&(0,o.jsx)(ai,{onClick:I,onKeyDown:T,total:p.total}),(0,o.jsx)(hi,{item:a,reportInboxList:u,activeGroup:i,onReportInboxClick:g,systemNotifItem:c,onSystemNotifItemClick:f}),Boolean(null===(t=a.notice_list)||void 0===t?void 0:t.length)&&a.loading&&(0,o.jsx)(_.R,{center:!0,size:"small"})]})})),vi=(0,f.default)("div",{target:"e1bp8k4k0"})((({theme:{direction:e}})=>[{paddingTop:"24px",flex:"0 0 auto"},(0,y.mp)({direction:e,paddingStart:"16px"})]),"label:DivInboxHeaderContainer;"),gi=(0,f.default)("h2",{target:"e1bp8k4k1"})([({theme:e})=>(0,y.zy)({theme:e,fontFamily:"TikTokDisplayFont",fontWeight:"bold",typography:"H4",color:"TextPrimary"}),({clickable:e=!1})=>({":hover":{cursor:e?"pointer":"auto"}}),{display:"flex"}],"label:H2InboxTitle;"),fi=(0,f.default)("div",{target:"e1bp8k4k2"})({marginInlineEnd:"22px"},"label:DivTitleIconContainer;"),yi=(0,f.default)("div",{target:"e1bp8k4k3"})((({theme:e})=>(0,y.zy)({theme:e,fontFamily:"TikTokFont",fontWeight:"semiBold",typography:"P3",color:"TextPrimary"})),{marginTop:"16px",display:"flex",flexDirection:"row",flexWrap:"wrap"},"label:DivGroupContainer;"),bi=e=>({0:{color:e.TextPrimary,background:e.BGPlaceholderDefault,":hover":{background:e.ShadowPrimary}},1:{color:e.BGPrimary,background:e.TextPrimary}}),xi=(0,f.default)("button",{target:"e1bp8k4k4"})((({theme:{colors:e,direction:t},active:i})=>[bi(e)[Number(i)],{":not(:last-child)":[(0,y.mp)({direction:t,marginEnd:"8px"})]},{border:"none",padding:"2px 8px",marginBottom:"12px",textAlign:"center",cursor:"pointer",borderRadius:"12px",transition:"all 300ms"}]),"label:ButtonGroupItem;"),ki={500:"Inbox_All",3:"Inbox_Likes",505:"Inbox_Likes",2:"Inbox_Comments",6:"Inbox_Mentions",7:"Followers"},wi=["all","likes","comments","mentions","followers"],Ci=(0,n.memo)((0,n.forwardRef)((({value:e,onChange:t,onKeyDown:i},a)=>{const r=(0,u.s)(),s=(0,n.useCallback)((e=>()=>{t(e)}),[t]),l=(0,n.useRef)(null),d=(0,xe.Bl)(),c=(0,n.useCallback)((e=>{var t,i;null===(i=null===(t=l.current)||void 0===t?void 0:t.children[d.indexOf(e)])||void 0===i||i.focus()}),[]);return(0,n.useImperativeHandle)(a,(()=>({setFocus:c}))),(0,o.jsxs)(vi,{children:[(0,o.jsx)(gi,{id:"header-inbox-title",children:r("Inbox_Notifications")}),(0,o.jsx)(yi,{"data-e2e":"inbox-bar",id:"header-inbox-bar",onKeyDown:i,ref:l,role:"tablist","aria-labelledby":"header-inbox-title",children:d.map(((t,i)=>(0,o.jsx)(xi,{"data-e2e":wi[i],id:`inbox-tab-${i}`,active:t===e,tabIndex:t===e?0:-1,onClick:s(t),role:"tab","aria-selected":t===e,"aria-controls":"header-inbox-list",children:r(ki[t])},t)))})]})}))),Si=(0,f.default)("div",{target:"e32s1fi0"})({height:"100%",display:"flex",flexDirection:"column"},"label:DivInboxContainer;");var ji=i(88091),Ii=i(26290),Ti=i(65467),Ei=i(13947),Pi=i(78305),Oi=i(21512),Li=i(81230),Ri=i(15637),Di=i(63363);const Ai=(0,n.memo)((function(e){var t,i,a,s,d,u,p,m;const{t:h,timeTranslator:_}=(0,W.T)(),v=(0,c.w)(Li.s),g=(0,c.w)(Ei.L),f=(0,c.w)(Pi.y7),[y,b]=(0,n.useState)(!1),x=(0,n.useCallback)((()=>{b(!1)}),[]),k=(0,r.Nj)(l.b),{notificationShouldBeClickable:w}=(0,Di.AP)(),C=null!==(i=null===(t=e.notice.template_notice)||void 0===t?void 0:t.schema_url)&&void 0!==i?i:"";C&&(0,xe.Eo)(C)&&Ie.f.event("web_appeal_result_notification_view");const S=(0,n.useCallback)((()=>{var t,i,o,n,a;if(1!==e.notice.display_type)if(2===e.notice.display_type)k.handleSystemNotificationClick({enter_method:"click_get_app_for_pc"}),b(!0);else if(3===e.notice.display_type&&(k.handleSystemNotificationClick({}),window&&void 0!==(null===(t=e.notice.template_notice)||void 0===t?void 0:t.schema_url))){const t=null===(i=e.notice.template_notice)||void 0===i?void 0:i.schema_url;if(t&&t.startsWith(Ri.fZ)){const e=new URLSearchParams(new URL(t).search),i=null!==(o=e.get("object_id"))&&void 0!==o?o:void 0,r=null!==(n=e.get("object_type"))&&void 0!==n?n:void 0,s=null!==(a=e.get("punish_key"))&&void 0!==a?a:void 0;return v.setViolationAppealInfo({objectId:i,objectType:r,punishKey:s}),void v.setVisible(!0)}if(t&&(0,xe.Eo)(t)){if(w){Ie.f.event("web_appeal_result_view_more_click");const e=JSON.parse(t);v.setViolationAppealInfo({objectId:e.vid,objectType:"1",penaltyDetails:e}),v.setVisible(!0)}return}if(t&&t.startsWith(Oi.OD))return void(t.includes(encodeURIComponent("is_appeal=1"))?g.setAppealInfoAndShow({url:t}):f.showRereport({rereportUrl:t}));window.location.href=t}}),[k,e.notice.display_type,null===(a=e.notice.template_notice)||void 0===a?void 0:a.schema_url,v]),j=(0,n.useMemo)((()=>{var t,i,n,a;return 2===e.notice.display_type?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dt,{}),(0,o.jsx)(ji.Fm,{type:"P3-Regular",children:h("system_notifications_details_button")})]}):3===e.notice.display_type&&(null===(i=null===(t=e.notice.template_notice)||void 0===t?void 0:t.schema_url)||void 0===i?void 0:i.includes(Oi.OD))?(null===(a=null===(n=e.notice.template_notice)||void 0===n?void 0:n.schema_url)||void 0===a?void 0:a.includes(encodeURIComponent("is_appeal=1")))?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dt,{}),(0,o.jsx)(ji.Fm,{type:"P3-Regular",children:h("dsa_bi_illegal_more_options_link")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dt,{}),(0,o.jsx)(ji.Fm,{type:"P3-Regular",children:h("dsa_illegal_report_again_link")})]}):null}),[e.notice.display_type,h]),I=Mt.Sb[(0,xe.G6)(e.notice.type)],T=I?h(I.label):null,E=null===(u=null===(d=null===(s=e.notice.template_notice)||void 0===s?void 0:s.notice)||void 0===d?void 0:d.title)||void 0===u?void 0:u.title,P=null===(m=null===(p=e.notice.template_notice)||void 0===p?void 0:p.notice)||void 0===m?void 0:m.content;if(null===T||null===E||null===P)return null;const O=null!==e.notice.create_time?(0,o.jsxs)(ji.Fm,{type:"P4-Regular",color:"TextQuaternary",children:[" ",_(1e3*e.notice.create_time,!0)]}):null,L=(0,xe.fG)((0,xe.G6)(e.notice.type));return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(at,{onClick:S,children:[(0,o.jsxs)(rt,{children:[(0,o.jsx)(st,{children:L&&(0,o.jsx)(L,{style:{fontSize:16}})}),(0,o.jsx)(ji.Fm,{type:"P3-Semibold",children:T})]}),(0,o.jsx)(dt,{}),(0,o.jsx)(Ii.F.P3,{style:{maxWidth:"100%",overflowX:"hidden",textOverflow:"ellipsis"},children:E}),(0,o.jsx)(lt,{children:(0,o.jsxs)(ji.Fm,{type:"P4-Regular",children:[P,O]})}),j]}),y&&(0,o.jsx)(Ti.u,{visible:y,onClose:x})]})})),Fi=(0,n.memo)((function({noticeItem:e,onHitBottom:t}){var i;const a=(0,n.useRef)(null);return(0,se.O)({elementRef:a,onHitBottom:t,threshold:100}),(0,o.jsxs)(Ht,{ref:a,tabIndex:0,role:"tabpanel",children:[(null!==(i=e.notice_list)&&void 0!==i?i:[]).map((e=>(0,o.jsx)(ti,{children:(0,o.jsx)(Ai,{notice:e})},e.nid))),e.loading&&(0,o.jsx)(_.R,{center:!0,size:"small"})]})}));var Bi=i(4589);const Mi=(0,n.memo)((({onHeaderClick:e})=>{const t=(0,u.s)(),i=(0,o.jsx)(fi,{children:(0,o.jsx)(Bi.A,{fontSize:18})});return(0,o.jsx)(vi,{children:(0,o.jsxs)(gi,{id:"header-inbox-title",onClick:e,clickable:null!=e,children:[i,t("system_notifications_inbox_header")]})})})),Ni=(0,f.default)("div",{target:"ewlck080"})({height:"100%",display:"flex",flexDirection:"column"},"label:DivInboxContainer;"),qi=(0,f.default)("div",{target:"ewlck081"})({padding:"20px 16px"},"label:DivListBox;"),Ui=(0,n.memo)((function(e){var t,i;const a=(0,u.s)(),[r,s]=(0,qt.P4)((e=>e),d.bN),[l,c]=(0,n.useState)([661]);(0,n.useEffect)((()=>{var e;if(661!==r.activeSystemNoticeGroup)return;if(!(null===(e=r.noticeList.notice_list)||void 0===e?void 0:e.length))return void c([661]);const t=[],i=new Set;r.noticeList.notice_list.forEach((e=>{const o=(0,xe.G6)(e.type);i.has(o)||(t.push(o),i.add(o))})),c([661,...t])}),[r.activeSystemNoticeGroup,r.noticeList.notice_list]);const p=(0,n.useRef)(!0),m=(0,n.useCallback)((()=>{p.current||(p.current=!0,s.fetchSystemNoticeData())}),[s]);(0,n.useEffect)((()=>{p.current=Boolean(r.noticeList.loading)}),[r.noticeList.loading]);const h=(0,n.useMemo)((()=>l.map((e=>Mt.Sb[e]?{value:e.toString(),label:a(Mt.Sb[e].label,{},Mt.Sb[e].label)}:null)).filter((e=>null!==e))),[l,a]),_=(0,n.useCallback)((e=>{Object.entries(Mt.Sb).forEach((t=>{t[0].toString()===e&&s.changeActiveSystemNoticeGroup(t[1].value)}))}),[s]),v=(0,o.jsx)(Mi,{onHeaderClick:e.onBack}),g=(0,o.jsx)(qi,{children:(0,o.jsx)(ji.dB,{block:!0,label:"",hideLabel:!0,value:null!==(i=null===(t=r.activeSystemNoticeGroup)||void 0===t?void 0:t.toString())&&void 0!==i?i:"",onChange:_,placeholder:"",options:h,size:"small"})}),f=(0,o.jsx)(Fi,{onHitBottom:m,noticeItem:r.noticeList});return(0,o.jsxs)(Ni,{children:[v,g,f]})}));var Wi=i(85349);const Hi=(0,n.memo)((function(){const[e,{setIsFollowRequestShowing:t}]=(0,s.nG)((e=>e.isFollowRequestShowing),d.bN),[i,{setActivePage:c}]=(0,s.nG)((e=>e.activePage),d.bN),u=(0,n.useCallback)((()=>{c("report-inbox")}),[c]),p=(0,n.useCallback)((()=>{c("main")}),[c]),m=(0,a.P)(ae.L,{selector:e=>{var t,i,o,n,a;return{uid:null!==(o=null===(i=null===(t=e.appContext)||void 0===t?void 0:t.user)||void 0===i?void 0:i.uid)&&void 0!==o?o:"",did:null!==(a=null===(n=e.appContext)||void 0===n?void 0:n.wid)&&void 0!==a?a:""}},dependencies:[]}),h=(0,a.P)(re.kK,{selector:e=>e.reportInbox.noticeList,dependencies:[]}),[{activeGroup:_,noticeList:v,followRequest:g,latestSystemNotice:f},y]=(0,qt.P4)((e=>{const{activeGroup:t,noticeList:i,followRequest:o,latestSystemNotice:n}=e;return{activeGroup:t,noticeList:i,followRequest:o,latestSystemNotice:n}}),d.bN),{setExpandedLikeItem:b}=(0,s.i7)(),x=(0,n.useMemo)(xe.Bl,[]),[k,w]=(0,n.useState)(x.indexOf(_)),C=(0,n.useCallback)((e=>{y.changeActiveGroup({group:e}),b(null),t(!1),w(x.indexOf(e))}),[y,b,t,x]),S=(0,r.Nj)(l.b),j=(0,n.useCallback)((()=>{S.handleChangeTab({to_tab_name:"system"}),c("system-notif"),y.changeActiveSystemNoticeGroup(661)}),[y,S,c]);(0,n.useEffect)((()=>{e||setTimeout((()=>{y.fetchNoticeFollowRequest(Object.assign(Object.assign({},m),{refresh:!0}))}),2e3)}),[y,m,e]),(0,n.useEffect)((()=>{g.has_more||0!==g.total?g.has_more&&g.users.length<=10&&y.fetchNoticeFollowRequest(m):t(!1)}),[y,g.has_more,g.total,g.users.length,m,t]);const I=(0,n.useRef)(!0),T=(0,n.useRef)(null),E=(0,n.useCallback)((()=>{I.current||(I.current=!0,y.fetchNoticeData())}),[y]),P=(0,n.useCallback)((e=>{var t,i,o,n;switch(e.keyCode){case 39:e.stopPropagation(),e.preventDefault();const a=k{I.current=Boolean(v.loading)}),[v.loading]),(0,n.useEffect)((()=>{y.fetchLatestSystemNotice()}),[y]);const O=(0,n.useCallback)((()=>{c("main"),C(500)}),[C,c]);return"report-inbox"===i?(0,o.jsx)(ne,{onClose:p}):"system-notif"===i?(0,o.jsx)(Ui,{onBack:O}):(0,o.jsx)(Wi.t,{isMobile:!1,containerStyle:{height:"100%",width:"100%"},children:(0,o.jsxs)(Si,{"data-e2e":"inbox-notifications",children:[(0,o.jsx)(Ci,{value:_,onChange:C,onKeyDown:P,ref:T}),(0,o.jsx)(_i,{activeGroup:_,item:v,onHitBottom:E,followItem:g,showFollow:e,onFollowChange:t,reportInboxList:h,onReportInboxClick:u,systemNotifItem:f,onSystemNotifItemClick:j})]})})}))},65556:(e,t,i)=>{"use strict";i.d(t,{c:()=>P});var o,n,a=i(58632),r=i(40099),s=i(41271),l=i(57432),d=i.n(l),c=i(9953),u=i.n(c),p=i(47172),m=i(34099),h=i(39228),_=i(58305),v=i(32862),g=i(50970),f=i(86510);!function(e){e.IMCloud="5",e.WatchOnPC="134217786",e.KickOffline="3001"}(o||(o={})),function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"}(n||(n={}));var y,b,x=i(93608);!function(e){e.LiveMobileRelayProcess="livesdk_open_on_computer_process"}(y||(y={})),function(e){e.MessageReceived="message_received",e.MessageParseFailed="message_parse_failed",e.OpenLiveRoomStart="open_live_room_start",e.OpenLiveRoomFailed="open_live_room_failed"}(b||(b={}));const k=e=>{x.f.event(y.LiveMobileRelayProcess,e)};var w=i(72688),C=i(45297);const S=e=>{((e,t,i)=>{if(window.SlardarClient)try{window.SlardarClient("sendEvent",{name:"livesdk_open_on_computer_process",categories:i,metrics:{}})}catch(e){}})(0,0,e)},j=({uniqueId:e})=>{try{k({action_type:b.OpenLiveRoomStart}),S({action_type:b.OpenLiveRoomStart});const t=(0,w.G2o)({uniqueId:e});window.location.href=t,(0,_.J2)(C.Nj,JSON.stringify({time:Date.now(),isFromMobileRelay:"1",uniqueId:e}))}catch(e){k({action_type:b.OpenLiveRoomFailed,error_msg:JSON.stringify(e)}),S({action_type:b.OpenLiveRoomFailed,error_msg:JSON.stringify(e)})}};let I;var T=i(89704);let E;const P=()=>{const e=(0,m.V)(),{user:t,encryptedWebid:l,lang:c,env:y,wid:x,$wsUrl:w}=(0,s.P)(g.L,{dependencies:[],selector:t=>{var i,o,n,a;return{user:null===(i=t.appContext)||void 0===i?void 0:i.user,wid:null===(o=t.appContext)||void 0===o?void 0:o.wid,encryptedWebid:null===(n=t.appContext)||void 0===n?void 0:n.encryptedWebid,lang:t.lang,env:null===(a=t.appContext)||void 0===a?void 0:a.env,$wsUrl:e.imFrontier.replace(/\/ws\/v\d+/,"")}}}),P=(0,r.useRef)(),O=(0,v.OW)("webapp_push_init_url",{}).disable_url,{pathname:L}=(0,p.useLocation)(),R=(0,r.useMemo)((()=>!!O&&Boolean((0,p.matchPath)(L,{path:O,exact:!0}))),[O,L]),D=(0,r.useCallback)(((e,t)=>(0,a.__awaiter)(void 0,void 0,void 0,(function*(){const{FWS:n}=yield i.e(4563).then(i.t.bind(i,85885,23)),a=new n(Object.assign({},e));P.current=a,a.onmessage=e=>{((e,t)=>{var i,n;try{const a=String(null!==(n=null===(i=e.message)||void 0===i?void 0:i.service)&&void 0!==n?n:"0");if(a===o.WatchOnPC)return void(({event:e,uid:t})=>{k({action_type:b.MessageReceived}),S({action_type:b.MessageReceived});try{const i=(0,f.l)(e),o=i.UserID.toString(),n=i.DisplayID.toString();if(String(o)!==t)throw new Error("uid not match");"visible"===document.visibilityState?(j({uniqueId:n}),I&&clearTimeout(I),I=setTimeout((()=>{(0,_.sc)(C.S0),clearTimeout(I)}),500)):(0,_.AP)(C.S0,JSON.stringify({time:Date.now(),payload:i}))}catch(e){k({action_type:b.MessageParseFailed,error_msg:JSON.stringify(e)}),S({action_type:b.MessageParseFailed,error_msg:JSON.stringify(e)})}})({event:e,uid:t});if(a===o.KickOffline)return void(0,T.f)({event:e,uid:t})}catch(e){console.log("[dev] frontier onmessage error",JSON.stringify(e))}})(e,t)}}))),[]),A=(0,r.useCallback)((()=>{if(!P.current||R)return;const e=P.current.readyState;[n.closed,n.closing].includes(e)&&P.current.reconnect()}),[P,R]);(0,r.useEffect)((()=>{var e;const i=h.hd.getRiskParams(0),o=(0,f.R)("msToken")||"";Object.keys(i).forEach((e=>{void 0!==i[e]?i[e]=String(i[e]):i[e]=""})),i.referer||(i.referer=window.location.href);const n={fpID:"9",aID:"1459",accessKey:u()(`9e1bd35ec9db7b8d846de66ed140b1ad9${x}f8a69f1719916z`).toString(),ttwID:window.decodeURIComponent(null!=l?l:""),url:w,payloadEncoding:{encoding:"",force:!0},payloadType:{type:"application/json",force:!0},enableTransformTextPayload:!0,enableAutoAck:!0,headers:Object.assign(Object.assign({},i),{from_appID:"1988",app_language:c,app_name:"tiktok_web",channel:"web",user_agent:navigator.userAgent,"Web-Sdk-Ms-Token":o}),whaleQueryParams:{aid:"1988",version_code:"1.0.0",app_name:"tiktok_web",device_platform:"web_pc"},"Web-Sdk-Ms-Token":o};Object.assign(n,{debug:!1}),(null==t?void 0:t.uid)&&l&&!(null==P?void 0:P.current)&&!R&&(E&&clearTimeout(E),E=setTimeout((()=>{D(n,t.uid)}),5e3)),R&&(null===(e=null==P?void 0:P.current)||void 0===e||e.close(),E&&clearTimeout(E))}),[null==y?void 0:y.name,c,x,l,w,D,R]),(0,r.useEffect)((()=>{const e=()=>{const e=JSON.parse((0,_._S)(C.S0)||"{}");if(e&&e.time&&e.payload)if(Date.now()-e.time<=6e4){if("visible"===document.visibilityState){const{DisplayID:t}=e.payload;(0,_.sc)(C.S0),j({uniqueId:t})}}else(0,_.sc)(C.S0),k({action_type:b.MessageParseFailed,error_msg:"message expired"}),S({action_type:b.MessageParseFailed,error_msg:"message expired"})};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}}),[]),(0,r.useEffect)((()=>{const e=(0,_.Gz)(d(),A);return()=>{var t;null==e||e(),null===(t=null==P?void 0:P.current)||void 0===t||t.close(),E&&clearTimeout(E)}}),[])}},91825:(e,t,i)=>{"use strict";i.d(t,{h8:()=>r,mR:()=>a,zJ:()=>n});var o=i(71281);const n=e=>{const t=(0,o.V7)(null==e?void 0:e.abTestVersion,"live_recharge_get_coins_entrance_for_you_page")||"v0";return{vid:t,isControlGroup:"v0"===t,isExperimentalGroup:"v0"!==t}};function a(){return!!window.liveSdk_recharge_coinsConfigLogId}function r(){return{charge_from:window.liveSdk_recharge_coinsConfigRefhash||"",request_id:window.liveSdk_recharge_coinsConfigLogId||""}}},44726:(e,t,i)=>{"use strict";i.d(t,{h:()=>o});const o=(0,i(47236).Ay)({resolved:{},chunkName:()=>"multi-account-controller",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!i.m[t]},importAsync:()=>Promise.all([i.e(7181),i.e(3392),i.e(1427),i.e(2318),i.e(241),i.e(4336),i.e(8564),i.e(7716),i.e(6244),i.e(8873),i.e(5021),i.e(3446),i.e(3290),i.e(8474),i.e(3557),i.e(8177),i.e(1274),i.e(9937),i.e(2618),i.e(2142),i.e(1683),i.e(6514),i.e(5308),i.e(8605),i.e(2486),i.e(1605),i.e(4875),i.e(1493),i.e(3593),i.e(9920),i.e(7899),i.e(6860),i.e(4437)]).then(i.bind(i,61508)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return i(t)},resolve:()=>61508})},87260:(e,t,i)=>{"use strict";i.d(t,{I7:()=>l});var o,n=i(55907),a=i(11430);!function(e){e.rewardOnboarding="rewardOnboarding",e.rewardOnboardingIframe="rewardOnboardingIframe",e.verifyIdentityForm="verifyIdentityForm",e.verifyIdentityFormV2="verifyIdentityFormV2",e.pipoAppealForm="pipoAppealForm",e.verifyIdentityResult="verifyIdentityResult",e.coin="coin",e.coinWithHash="coinWithHash",e.coinWithUser="coinWithUser",e.coinWithHashAndUser="coinWithHashAndUser",e.coinCashier="coinCashier",e.coinRedeem="coinRedeem",e.coinReferral="coinReferral",e.coinPaymentResult="coinPaymentResult",e.coinTransactions="coinTransactions",e.coinUnavailable="coinUnavailable",e.coinTerms="coinTerms",e.coinTermsGiftCardPolicy="coinTermsGiftCardPolicy",e.coinTransactionsDetail="coinTransactionsDetail",e.coinCardManagement="coinCardManagement",e.coinExchange="coinExchange",e.coinBindInfo="coinBindInfo",e.coinPlaceOrder="coinPlaceOrder",e.coinPlaceOrderWithHash="coinPlaceOrderWithHash",e.tax="tax",e.euTaxForm="euTaxForm",e.w9TaxSelect="w9TaxSelect",e.w9TaxInputIndividual="w9TaxInputIndividual",e.w9TaxInputEntity="w9TaxInputEntity",e.taxPaperlessConsent="taxPaperlessConsent",e.taxComplete="taxComplete",e.taxInfoUs="taxInfoUs",e.w8TaxInput="w8TaxInput",e.taxInfoW8="taxInfoW8",e.taxOverview="taxOverview",e.taxEuWhtInfo="taxEuWhtInfo",e.taxEuWhtInput="taxEuWhtInput",e.taxEuVatInfo="taxEuVatInfo",e.taxEuVatInput="taxEuVatInput",e.taxSelfBilling="taxSelfBilling",e.periodic="periodic",e.periodicDashboard="periodicDashboard",e.periodicPastPayout="periodicPastPayout",e.periodicEarningsTransaction="periodicEarningsTransaction",e.periodicPayoutTransaction="periodicPayoutTransaction",e.coinPIVerifyFAQ="coinPIVerifyFAQ",e.coinPIVerifyForm="coinPIVerifyForm",e.coinPIVerifyStatus="coinPIVerifyStatus",e.taxW9Certify="taxW9Certify",e.emailUnsubscribe="emailUnsubscribe"}(o||(o={}));const r={rewardOnboarding:"/reward-onboarding",rewardOnboardingIframe:"/reward-onboarding/iframe",verifyIdentityForm:"/coin/verify-identity/form",verifyIdentityFormV2:"/coin/verify-identity/formV2",pipoAppealForm:"/unified-wallet/appeal/pipo-risk/form",verifyIdentityResult:"/coin/verify-identity/result",coin:"/coin",coinWithHash:"/coin/:refhash",coinWithUser:"/coin/@:uniqueId",coinWithHashAndUser:"/coin/:refhash/@:uniqueId",coinCashier:"/coin/cashier",coinRedeem:"/coin/redeem",coinReferral:"/coin/referral",coinPaymentResult:"/coin/payment-result",coinTransactions:"/coin/transaction-history",coinUnavailable:"/coin/unavailable",coinTerms:"/coin/legal/terms-of-purchase-for-coins",coinTermsGiftCardPolicy:"/coin/legal/gift-card-policy",coinTransactionsDetail:"/coin/transaction-history/detail",coinCardManagement:"/coin/card-management",coinExchange:"/coin/exchange",coinBindInfo:"/coin/bind-info",coinPlaceOrder:"/coin/place-order",coinPlaceOrderWithHash:"/coin/place-order/:refhash",tax:"/tax",euTaxForm:"/tax/eu-tax",w9TaxSelect:"/tax/us-w9-tax-select",w9TaxInputIndividual:"/tax/us-w9-tax-input-individual",w9TaxInputEntity:"/tax/us-w9-tax-input-entity",taxPaperlessConsent:"/tax/paperless-consent",taxComplete:"/tax/complete",taxInfoUs:"/tax/info-us",w8TaxInput:"/tax/w8-tax-input",taxInfoW8:"/tax/info-w8",taxOverview:"/tax/tax-overview",taxEuWhtInfo:"/tax/eu-wht-info",taxEuWhtInput:"/tax/eu-wht-input",taxEuVatInfo:"/tax/eu-vat-info",taxEuVatInput:"/tax/eu-vat-input",taxSelfBilling:"/tax/self-billing",periodic:"/periodic",periodicDashboard:"/periodic/dashboard",periodicPastPayout:"/periodic/past-payout",periodicEarningsTransaction:"/periodic/earnings-transaction",periodicPayoutTransaction:"/periodic/payout-transaction",coinPIVerifyFAQ:"/coin/pi-verify-faq",coinPIVerifyForm:"/coin/pi-verify-form",coinPIVerifyStatus:"/coin/pi-verify-status",taxW9Certify:"/tax/w9-certify",emailUnsubscribe:"/wallet/live-rewards/email-unsubscribe"};var s;(0,a.r)(r),(0,a.k)(r),function(e){e.rewardOnboarding="rewardOnboarding",e.rewardOnboardingIframe="rewardOnboardingIframe",e.verifyIdentityForm="verifyIdentityForm",e.verifyIdentityFormV2="verifyIdentityFormV2",e.pipoAppealForm="pipoAppealForm",e.verifyIdentityResult="verifyIdentityResult",e.coin="coin",e.coinWithHash="coinWithHash",e.coinWithUser="coinWithUser",e.coinWithHashAndUser="coinWithHashAndUser",e.coinCashier="coinCashier",e.coinRedeem="coinRedeem",e.coinReferral="coinReferral",e.coinPaymentResult="coinPaymentResult",e.coinTransactions="coinTransactions",e.coinUnavailable="coinUnavailable",e.coinTerms="coinTerms",e.coinTermsGiftCardPolicy="coinTermsGiftCardPolicy",e.coinTransactionsDetail="coinTransactionsDetail",e.coinCardManagement="coinCardManagement",e.coinExchange="coinExchange",e.coinBindInfo="coinBindInfo",e.coinPlaceOrder="coinPlaceOrder",e.coinPlaceOrderWithHash="coinPlaceOrderWithHash",e.tax="tax",e.euTaxForm="euTaxForm",e.w9TaxSelect="w9TaxSelect",e.w9TaxInputIndividual="w9TaxInputIndividual",e.w9TaxInputEntity="w9TaxInputEntity",e.taxPaperlessConsent="taxPaperlessConsent",e.taxComplete="taxComplete",e.taxInfoUs="taxInfoUs",e.w8TaxInput="w8TaxInput",e.taxInfoW8="taxInfoW8",e.taxOverview="taxOverview",e.taxEuWhtInfo="taxEuWhtInfo",e.taxEuWhtInput="taxEuWhtInput",e.taxEuVatInfo="taxEuVatInfo",e.taxEuVatInput="taxEuVatInput",e.taxSelfBilling="taxSelfBilling",e.periodic="periodic",e.periodicDashboard="periodicDashboard",e.periodicPastPayout="periodicPastPayout",e.periodicEarningsTransaction="periodicEarningsTransaction",e.periodicPayoutTransaction="periodicPayoutTransaction",e.coinPIVerifyFAQ="coinPIVerifyFAQ",e.coinPIVerifyForm="coinPIVerifyForm",e.coinPIVerifyStatus="coinPIVerifyStatus",e.taxW9Certify="taxW9Certify",e.emailUnsubscribe="emailUnsubscribe"}(s||(s={}));const l={rewardOnboarding:"/reward-onboarding",rewardOnboardingIframe:"/reward-onboarding/iframe",verifyIdentityForm:"/coin/verify-identity/form",verifyIdentityFormV2:"/coin/verify-identity/formV2",pipoAppealForm:"/unified-wallet/appeal/pipo-risk/form",verifyIdentityResult:"/coin/verify-identity/result",coin:"/coin",coinWithHash:"/coin/:refhash",coinWithUser:"/coin/@:uniqueId",coinWithHashAndUser:"/coin/:refhash/@:uniqueId",coinCashier:"/coin/cashier",coinRedeem:"/coin/redeem",coinReferral:"/coin/referral",coinPaymentResult:"/coin/payment-result",coinTransactions:"/coin/transaction-history",coinUnavailable:"/coin/unavailable",coinTerms:"/coin/legal/terms-of-purchase-for-coins",coinTermsGiftCardPolicy:"/coin/legal/gift-card-policy",coinTransactionsDetail:"/coin/transaction-history/detail",coinCardManagement:"/coin/card-management",coinExchange:"/coin/exchange",coinBindInfo:"/coin/bind-info",coinPlaceOrder:"/coin/place-order",coinPlaceOrderWithHash:"/coin/place-order/:refhash",tax:"/tax",euTaxForm:"/tax/eu-tax",w9TaxSelect:"/tax/us-w9-tax-select",w9TaxInputIndividual:"/tax/us-w9-tax-input-individual",w9TaxInputEntity:"/tax/us-w9-tax-input-entity",taxPaperlessConsent:"/tax/paperless-consent",taxComplete:"/tax/complete",taxInfoUs:"/tax/info-us",w8TaxInput:"/tax/w8-tax-input",taxInfoW8:"/tax/info-w8",taxOverview:"/tax/tax-overview",taxEuWhtInfo:"/tax/eu-wht-info",taxEuWhtInput:"/tax/eu-wht-input",taxEuVatInfo:"/tax/eu-vat-info",taxEuVatInput:"/tax/eu-vat-input",taxSelfBilling:"/tax/self-billing",periodic:"/periodic",periodicDashboard:"/periodic/dashboard",periodicPastPayout:"/periodic/past-payout",periodicEarningsTransaction:"/periodic/earnings-transaction",periodicPayoutTransaction:"/periodic/payout-transaction",coinPIVerifyFAQ:"/coin/pi-verify-faq",coinPIVerifyForm:"/coin/pi-verify-form",coinPIVerifyStatus:"/coin/pi-verify-status",taxW9Certify:"/tax/w9-certify",emailUnsubscribe:"/wallet/live-rewards/email-unsubscribe"};var d;(0,n.w)(l),(0,a.r)(l),(0,a.k)(l),function(e){e.rewardOnboarding="rewardOnboarding",e.rewardOnboardingIframe="rewardOnboardingIframe",e.verifyIdentityForm="verifyIdentityForm",e.verifyIdentityFormV2="verifyIdentityFormV2",e.pipoAppealForm="pipoAppealForm",e.verifyIdentityResult="verifyIdentityResult",e.coin="coin",e.coinWithHash="coinWithHash",e.coinWithUser="coinWithUser",e.coinWithHashAndUser="coinWithHashAndUser",e.coinCashier="coinCashier",e.coinRedeem="coinRedeem",e.coinReferral="coinReferral",e.coinPaymentResult="coinPaymentResult",e.coinTransactions="coinTransactions",e.coinUnavailable="coinUnavailable",e.coinTerms="coinTerms",e.coinTermsGiftCardPolicy="coinTermsGiftCardPolicy",e.coinTransactionsDetail="coinTransactionsDetail",e.coinCardManagement="coinCardManagement",e.coinExchange="coinExchange",e.coinBindInfo="coinBindInfo",e.coinPlaceOrder="coinPlaceOrder",e.coinPlaceOrderWithHash="coinPlaceOrderWithHash",e.tax="tax",e.euTaxForm="euTaxForm",e.w9TaxSelect="w9TaxSelect",e.w9TaxInputIndividual="w9TaxInputIndividual",e.w9TaxInputEntity="w9TaxInputEntity",e.taxPaperlessConsent="taxPaperlessConsent",e.taxComplete="taxComplete",e.taxInfoUs="taxInfoUs",e.w8TaxInput="w8TaxInput",e.taxInfoW8="taxInfoW8",e.taxOverview="taxOverview",e.taxEuWhtInfo="taxEuWhtInfo",e.taxEuWhtInput="taxEuWhtInput",e.taxEuVatInfo="taxEuVatInfo",e.taxEuVatInput="taxEuVatInput",e.taxSelfBilling="taxSelfBilling",e.periodic="periodic",e.periodicDashboard="periodicDashboard",e.periodicPastPayout="periodicPastPayout",e.periodicEarningsTransaction="periodicEarningsTransaction",e.periodicPayoutTransaction="periodicPayoutTransaction",e.coinPIVerifyFAQ="coinPIVerifyFAQ",e.coinPIVerifyForm="coinPIVerifyForm",e.coinPIVerifyStatus="coinPIVerifyStatus",e.taxW9Certify="taxW9Certify",e.emailUnsubscribe="emailUnsubscribe"}(d||(d={}));const c={rewardOnboarding:"/reward-onboarding",rewardOnboardingIframe:"/reward-onboarding/iframe",verifyIdentityForm:"/coin/verify-identity/form",verifyIdentityFormV2:"/coin/verify-identity/formV2",pipoAppealForm:"/unified-wallet/appeal/pipo-risk/form",verifyIdentityResult:"/coin/verify-identity/result",coin:"/coin",coinWithHash:"/coin/:refhash",coinWithUser:"/coin/@:uniqueId",coinWithHashAndUser:"/coin/:refhash/@:uniqueId",coinCashier:"/coin/cashier",coinRedeem:"/coin/redeem",coinReferral:"/coin/referral",coinPaymentResult:"/coin/payment-result",coinTransactions:"/coin/transaction-history",coinUnavailable:"/coin/unavailable",coinTerms:"/coin/legal/terms-of-purchase-for-coins",coinTermsGiftCardPolicy:"/coin/legal/gift-card-policy",coinTransactionsDetail:"/coin/transaction-history/detail",coinCardManagement:"/coin/card-management",coinExchange:"/coin/exchange",coinBindInfo:"/coin/bind-info",coinPlaceOrder:"/coin/place-order",coinPlaceOrderWithHash:"/coin/place-order/:refhash",tax:"/tax",euTaxForm:"/tax/eu-tax",w9TaxSelect:"/tax/us-w9-tax-select",w9TaxInputIndividual:"/tax/us-w9-tax-input-individual",w9TaxInputEntity:"/tax/us-w9-tax-input-entity",taxPaperlessConsent:"/tax/paperless-consent",taxComplete:"/tax/complete",taxInfoUs:"/tax/info-us",w8TaxInput:"/tax/w8-tax-input",taxInfoW8:"/tax/info-w8",taxOverview:"/tax/tax-overview",taxEuWhtInfo:"/tax/eu-wht-info",taxEuWhtInput:"/tax/eu-wht-input",taxEuVatInfo:"/tax/eu-vat-info",taxEuVatInput:"/tax/eu-vat-input",taxSelfBilling:"/tax/self-billing",periodic:"/periodic",periodicDashboard:"/periodic/dashboard",periodicPastPayout:"/periodic/past-payout",periodicEarningsTransaction:"/periodic/earnings-transaction",periodicPayoutTransaction:"/periodic/payout-transaction",coinPIVerifyFAQ:"/coin/pi-verify-faq",coinPIVerifyForm:"/coin/pi-verify-form",coinPIVerifyStatus:"/coin/pi-verify-status",taxW9Certify:"/tax/w9-certify",emailUnsubscribe:"/wallet/live-rewards/email-unsubscribe"};(0,n.w)(c),(0,a.r)(c),(0,a.k)(c)},5321:(e,t,i)=>{"use strict";i.d(t,{U:()=>n});var o=i(93608);const n={handleDarkModeShow:()=>{o.f.sendEvent("dark_mode_show")},handleDarkModeClick:()=>{o.f.sendEvent("dark_mode_click")},handleDarkModePopUpShow:()=>{o.f.sendEvent("dark_mode_pop_up_show")},handleDarkModePopUpClose:()=>{o.f.sendEvent("dark_mode_pop_up_close")},handleDarkModePopUpDisappear:()=>{o.f.sendEvent("dark_mode_pop_up_disappear")}}},82850:(e,t,i)=>{"use strict";i.d(t,{S:()=>r});var o,n,a=i(93608);!function(e){e.ClickEntry="feedback",e.Confirm="feedback_confirm",e.Continue="feedback_continue",e.Submit="feedback_submit"}(o||(o={})),function(e){e.Yes="yes",e.No="no"}(n||(n={}));const r={handleEnterFeedback:e=>{a.f.event("feedback",{feedback_type:e})},handleSubmitFeedback:()=>{a.f.event("feedback_submit")},handleFeedbackResponseClick:e=>{a.f.event("feedback_confirm",{enter_method:"click_"+(e?"yes":"no")})},handleNeedMoreHelpClick:()=>{a.f.event("feedback_continue")}}},72687:(e,t,i)=>{"use strict";i.d(t,{fF:()=>p,qw:()=>c});var o,n,a,r,s,l,d,c,u=i(93608);!function(e){e.Default="default",e.ClickBtn="click_btn",e.Mouse="mouse",e.Gesture="gesture",e.Keyboard="keyboard",e.ClickVideo="click_video",e.LiveEnd="live_end",e.AutoPlay="auto_play"}(o||(o={})),function(e){e.Recommend="recommend",e.FollowPage="follow_page",e.Game="category_game",e.Event="event",e.Lifestyle="lifestyle"}(n||(n={})),function(e){e.ClickTab="click_tab",e.EnterUrl="enter_url"}(a||(a={})),function(e){e.Close="close",e.EnterRoom="enter_room",e.NextPreview="next_preview"}(r||(r={})),function(e){e.Auto="auto",e.Manual="manual"}(s||(s={})),function(e){e.Following="following",e.Suggest="suggest",e.AnchorNickname="anchor_nickname",e.ForYou="for_you",e.FollowingIcon="following_icon",e.Friends="friends",e.Live="live",e.Event="event",e.Explore="explore",e.SeeAll="see_all",e.SeeLess="see_less",e.Profile="profile",e.Upload="upload",e.Messages="messages"}(l||(l={})),function(e){e.Open="open",e.Close="close"}(d||(d={})),function(e){e[e.common=0]="common",e[e.pin=1]="pin"}(c||(c={}));const p=new class{handleDuration(e){u.f.event("livesdk_live_window_duration_v2",Object.assign({action_type:"click",enter_method:"live_cover"},e))}handleShow(e){u.f.event("livesdk_live_show",Object.assign({enter_method:"live_cover",action_type:"click"},e))}handleClick(e){u.f.event("livesdk_rec_live_play",Object.assign({enter_method:"live_cover",action_type:e.action_type||"click"},e))}handlePause(e){u.f.event("livesdk_live_preview_pause",Object.assign({enter_method:"live_cover"},e))}handleRefresh(e){u.f.event("livesdk_live_preview_refresh",Object.assign({enter_method:"live_cover"},e))}handleVolumeClick(e){u.f.event("livesdk_live_preview_volume_click",Object.assign({enter_method:"live_cover"},e))}handleAutoPlay(e){u.f.event("livesdk_live_preview_autoplay_click",Object.assign({enter_method:"live_cover"},e))}handleStartPlay(e){u.f.event("livesdk_live_window_play",Object.assign({enter_method:"live_cover"},e))}handleDraw(e){u.f.event("livesdk_live_draw",Object.assign({enter_method:"live_cover",is_inner:"0"},e))}handlePreviewPageSwitch(e){u.f.event("livesdk_live_preview_page_switch",Object.assign({},e))}handleSideBarToggleBtnClick(e){u.f.event("livesdk_sidebar_open_icon_click",Object.assign({},e))}handleSideBarTooltipHover(e){u.f.event("livesdk_sidebar_detail_hover_show",Object.assign({},e))}handleSideBarButtonClick(e){u.f.event("livesdk_sidebar_button_click",Object.assign({},e))}handleSideBarButtonHover(e){u.f.event("livesdk_sidebar_button_hover",Object.assign({},e))}handleRightClick(e){u.f.event("livesdk_live_right_click",Object.assign({enter_method:"live_cover",enter_from_merge:"live_merge"},e))}handleNoFollowShow(){u.f.event("livesdk_no_follow_live_show")}handleFeedTabShow(e){u.f.event("livesdk_discover_tab_icon_show",Object.assign({},e))}handleEnterRoomBtnClick(e){u.f.event("livesdk_click_to_watch_live",Object.assign({},e))}handleEnterRoomBtnHover(e){u.f.event("livesdk_click_to_watch_live_hover",Object.assign({},e))}handlePreviewPlayFail(e){u.f.event("livesdk_preview_play_fail",Object.assign({enter_method:"live_cover",action_type:"click",section_type:"feeds_section",content_section_order:"1",content_section_title:"feeds_section"},e))}handleCardHover(e){u.f.event("livesdk_live_cover_hover",Object.assign({enter_method:"live_cover",action_type:"click"},e))}}},64407:(e,t,i)=>{"use strict";i.d(t,{Xg:()=>d});var o,n,a,r,s,l=i(93608);!function(e){e.GoLivePlayerError="livesdk_go_live_player_error",e.TakePageShow="livesdk_pm_live_takepage_show",e.ScreenshotClick="livesdk_cover_modify_screenshot_click",e.ScreenshotButtonShow="livesdk_cover_modify_screenshot_show",e.Take="livesdk_live_take",e.CoverChange="livesdk_cover_modify_click",e.WebTopicClick="livesdk_web_topic_click",e.AutoStopChange="livesdk_thirdparty_auto_stop",e.ServerUrlCopy="livesdk_server_url_copy",e.StreamKeyCopy="livesdk_stream_key_copy",e.StreamKeyChangePop="livesdk_stream_key_change_pop",e.ThirdPartyStatus="livesdk_thirdparty_status",e.ShareLinkCopy="livesdk_anchor_link_copy",e.EndLiveClick="livesdk_end_live_click",e.LiveOver="livesdk_live_over",e.AppealClick="livesdk_anchor_appeal_click",e.OBSRevokeAnchorPop="livesdk_obs_revoke_anchor_pop",e.OBSRevokeRemind="livesdk_obs_revoke_remind",e.LiveCenterEntranceShow="livesdk_anchor_live_center_entrance_show",e.LiveTakepageShow="livesdk_pm_live_takepage_show",e.LiveContentClick="livesdk_live_content_click",e.LiveContentResultShow="livesdk_live_content_result_show",e.LiveTopicClick="livesdk_live_topic_click",e.LiveMatureThemeIconClick="livesdk_mature_theme_icon_click",e.LiveMatureThemePopup="livesdk_mature_theme_popup",e.LiveMatureThemePopupClick="livesdk_mature_theme_popup_click"}(o||(o={})),function(e){e.FromObs="third_party",e.FromDirect="video_live"}(n||(n={})),function(e){e.On="on",e.Off="off"}(a||(a={})),function(e){e.On="on",e.Off="off"}(r||(r={})),function(e){e[e.Temp=0]="Temp",e[e.Permanent=1]="Permanent"}(s||(s={}));const d={handlePlayerError:(e,t)=>{l.f.event("livesdk_go_live_player_error",{roomId:String(t),code:String(e.status),message:e.message})},getHashTagname:(e,t)=>{var i,o;return null!==(o=null===(i=e.find((e=>e.id===t)))||void 0===i?void 0:i.title)&&void 0!==o?o:"none"},handleScreenshotStatusClick:e=>{l.f.event("livesdk_cover_modify_screenshot_click",Object.assign(Object.assign({},e),{live_type:"third_party"}))},handleScreenshotButtonShow:e=>{l.f.event("livesdk_cover_modify_screenshot_show",Object.assign(Object.assign({},e),{live_type:"third_party"}))},handlePageShow:e=>{l.f.event("livesdk_pm_live_takepage_show",Object.assign(Object.assign({},e),{shoot_way:"",device:"web",live_type:"third_party"}))},handleCoverChange:()=>{l.f.event("livesdk_cover_modify_click")},OBSRevokeAnchorPop:e=>{l.f.event("livesdk_obs_revoke_anchor_pop",e)},OBSRevokeRemindShow:e=>{l.f.event("livesdk_obs_revoke_remind",e)},handleTopicClick:e=>{l.f.event("livesdk_web_topic_click",e)},handleAutoStopChange:e=>{l.f.event("livesdk_thirdparty_auto_stop",e)},handleServerUrlCopyClick:e=>{l.f.event("livesdk_server_url_copy",e)},handleStreamKeyCopyClick:e=>{l.f.event("livesdk_stream_key_copy",e)},handleStreamKeyChangePop:e=>{l.f.event("livesdk_stream_key_change_pop",e)},handleAppealClick:e=>{l.f.event("livesdk_anchor_appeal_click",e)},handleEndLiveClick:()=>{l.f.event("livesdk_end_live_click")},handleLiveOver:e=>{l.f.event("livesdk_live_over",e)},handleShareLinkCopy:()=>{l.f.event("livesdk_anchor_link_copy")},handleLiveStreamReport:e=>{l.f.event("livesdk_live_take",Object.assign({live_type:"third_party",send_gift_type:"open",event_type:"click",is_active_fans_show:0,show_active_user_ucnt:0,event_page:"live_take_button",game_label:e.game_label,game_label_id:e.game_label_id},e))},handleLiveCenterShow:e=>{l.f.event("livesdk_anchor_live_center_entrance_show",{anchor_id:e.anchor_id,enter_from:"profile_hover",app_name:"webapp"})},handleGoLiveShow:()=>{l.f.event("livesdk_pm_live_takepage_show")},handleLiveContentClick:e=>{l.f.event("livesdk_live_content_click",{anchor_id:e.anchor_id})},handleLiveContentConfirm:e=>{l.f.event("livesdk_live_content_result_show",{anchor_id:e.anchor_id,game_label:e.game_label,game_label_id:e.game_label_id})},handleLiveTopicClick:e=>{l.f.event("livesdk_live_topic_click",{anchor_id:e.anchor_id})},handleLiveMatureThemeIconClick:e=>{l.f.event("livesdk_mature_theme_icon_click",{action_type:e.action_type,enter_from:"live",anchor_id:e.anchor_id,source:"web"})},handleLiveMatureThemePopup:e=>{l.f.event("livesdk_mature_theme_popup",{enter_from:"live",anchor_id:e.anchor_id,source:"web"})},handleLiveMatureThemePopupClick:e=>{l.f.event("livesdk_mature_theme_popup_click",{action_type:e.action_type,enter_from:"live",anchor_id:e.anchor_id,source:"web"})}}},52401:(e,t,i)=>{"use strict";i.d(t,{z:()=>n});var o=i(93608);const n={logout:e=>{o.f.sendEvent("monitor_logout",e)},logoutNotify:e=>{o.f.sendEvent("logout_notify",e)},logoutSubmit:e=>{o.f.sendEvent("logout_submit",e)},logoutCancel:e=>{o.f.sendEvent("logout_cancel",e)}}},21620:(e,t,i)=>{"use strict";i.d(t,{I:()=>a});var o,n=i(93608);!function(e){e.ShowCollectionsTooltip="show_collections_tooltip",e.EnterCollectionsPage="enter_collections_page"}(o||(o={}));const a={handleShowCollectionsTooltip:()=>{n.f.event("show_collections_tooltip")},handleEnterCollectionsPage:()=>{n.f.event("enter_collections_page",{enterMethod:"top_bar"})}}},44205:(e,t,i)=>{"use strict";i.d(t,{l:()=>y});var o=i(24643),n=i(40099),a=i(17784),r=i(21380),s=i(73635),l=i(18499),d=i(62186);const c=(0,d.default)("div",{target:"e1dsngob0"})({position:"fixed",left:0,right:0,top:0,bottom:0,overflow:"hidden",userSelect:"none",pointerEvents:"none"},(({zIndex:e})=>({zIndex:e})),"label:DivContainer;"),u=(0,d.default)("div",{target:"e1dsngob1"})({pointerEvents:"auto",position:"absolute",left:0,top:0,bottom:0,right:0,background:"rgba(0, 0, 0, 0.5)",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.06)",transition:"opacity 0.3s"},(({status:e})=>({opacity:e===a.kp||e===a.ze||e===a.ns?0:1})),"label:DivMask;"),p=(0,d.default)("div",{target:"e1dsngob2"})({pointerEvents:"auto",position:"absolute",left:0,bottom:0,width:"100%",background:"#fff",borderRadius:"12px 12px 0 0",maxHeight:"73vh",transition:"transform 0.3s"},(({status:e})=>({transform:e===a.ze||e===a.kp||e===a.ns?"translateY(100%)":"none"})),"label:DivBodyWrapper;"),m=(0,d.default)("div",{target:"e1dsngob3"})({padding:"16px 20px 20px"},"label:DivContentWrapper;"),h=(0,d.default)("div",{target:"e1dsngob4"})({position:"absolute",top:"16px",width:"24px",height:"24px",zIndex:1,display:"flex",justifyContent:"center",alignItems:"center"},(({theme:e})=>({["rtl"===e.direction?"left":"right"]:"16px"})),"label:DivCloseWrapper;"),_=(0,d.default)("div",{target:"e1dsngob5"})({position:"absolute",top:"16px",width:"24px",height:"24px",zIndex:1,display:"flex",justifyContent:"center",alignItems:"center"},(({theme:e})=>({["rtl"===e.direction?"right":"left"]:"16px"})),"label:DivExtraAction;"),v=(0,d.default)("div",{target:"e1dsngob6"})((({theme:e})=>({padding:"16px 20px",borderBottom:`0.5px solid ${e.colors.LinePrimary}`,display:"flex",justifyContent:"center",alignItems:"center"})),"label:DivHeaderWrapper;"),g=(0,d.default)("div",{target:"e1dsngob7"})({display:"flex"},"label:DivTuxCloseIconWrapper;");var f;!function(e){e.Icon="icon",e.Mask="mask"}(f||(f={}));const y=(0,n.memo)((function(e){const{mask:t=!0,maskClosable:i=!0,onClickMask:d,closeable:f=!0,visible:y=!1,style:b,containerStyle:x,maskStyle:k,needTouchEvents:w=!0,zIndex:C=3001,onClose:S,direction:j,header:I,children:T,contentStyle:E,extraAction:P,bodyE2E:O,e2eTag:L,closeStyle:R,shouldUseTux:D=!1,headerStyle:A={},xAxisTouchOptimization:F=!1,supportSSR:B=!1,bodyTimeout:M=300}=e,[N,q]=(0,n.useState)(B);(0,n.useEffect)((()=>{q(!0)}),[]);const U=(0,n.useRef)(null),W=(0,n.useRef)(null),H=(0,n.useRef)(),z=(0,n.useCallback)((e=>{H.current=e.targetTouches[0].clientY}),[]),V=(0,n.useCallback)((e=>{var t,i;if(!(null===(t=W.current)||void 0===t?void 0:t.contains(e.target)))return e.stopPropagation(),void e.preventDefault();const o=e.targetTouches[0].clientY-(null!==(i=H.current)&&void 0!==i?i:0),n=W.current,a=F?-5:0,r=F?5:0;return n&&Math.abs(n.scrollHeight-n.clientHeight-n.scrollTop)<1&&or?e.preventDefault():void 0}),[]);(0,n.useEffect)((()=>{if(w)return y&&(document.addEventListener("touchstart",z),document.addEventListener("touchmove",V,{passive:!1})),()=>{document.removeEventListener("touchstart",z),document.removeEventListener("touchmove",V)}}),[y,V,z,w]);const K=(0,n.useCallback)((e=>{i&&(null==S||S(e,"mask")),null==d||d(e)}),[i,S]),G=(0,n.useCallback)((e=>{f&&(null==S||S(e,"icon"))}),[f,S]);if(!N)return null;const $=(0,o.jsx)(a.Ay,Object.assign({timeout:300,in:y,nodeRef:U,mountOnEnter:!0,unmountOnExit:!0,onExited:e.onExitEnd},{children:e=>(0,o.jsxs)(c,Object.assign({style:x,zIndex:C,ref:U,status:e},{children:[t&&(0,o.jsx)(u,{status:e,style:k,onClick:K}),(0,o.jsx)(a.Ay,Object.assign({appear:!0,timeout:M,in:y,unmountOnExit:!0},{children:e=>(0,o.jsxs)(p,Object.assign({"data-e2e":O,status:e,style:b},{children:[Boolean(I)&&(0,o.jsx)(v,Object.assign({style:A},{children:I})),f&&(0,o.jsx)(h,Object.assign({direction:j,onClick:G,style:R},{children:D?(0,o.jsx)(g,Object.assign({e2eTag:L},{children:(0,o.jsx)(r.h,{size:24})})):(0,o.jsx)(s.A,{e2eTag:L,style:{width:"100%",height:"100%"}})})),P&&(0,o.jsx)(_,Object.assign({direction:j},{children:P})),(0,o.jsx)(m,Object.assign({style:Object.assign({overflow:"auto"},E),header:Boolean(I),ref:W},{children:T}))]}))}))]}))}));return B?$:(0,l.createPortal)($,document.body)}))}}]);