"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["44882"],{769901:function(e,t,i){e.exports=i.p+"media/db_tap.8a933afa9b7537ba.png"},904495:function(e,t,i){i.d(t,{Q:function(){return c}});var l=i("629686"),n=i("402748");i("490629"),i("759943"),i("374954"),i("780582"),i("968336"),i("679308");var o=i("101199"),r=i("264104"),a=i("365169"),d=i("409250"),s=i("426038");let u=e=>{let{awemeInfo:t}=e,{desc:i,webRawData:l}=t,{isMainland:n}=(0,a.Iq)(e=>{let{isMainland:t}=e;return{isMainland:t}}),[u,c]=(0,o.useState)(`${i}${(null==l?void 0:l.targetTitle)?`\\N${null==l?void 0:l.targetTitle}`:""}`);return(0,o.useEffect)(()=>{(null==l?void 0:l.targetTitle)?c(`${i}\\N${null==l?void 0:l.targetTitle}`):c(i)},[l,i]),(0,o.useEffect)(()=>{var e,t;let o=d.Q.getItem({sKey:s.CookieKeys.DyI18n}),a=o&&"zh"!==o?o:(null===(t=navigator)||void 0===t?void 0:null===(e=t.language)||void 0===e?void 0:e.startsWith("zh"))||o?"":"en";!n&&!l.targetTitle&&a&&(async()=>{let e=await (0,r.O9)({sourceText:i,targetLanguage:a});if(0===e.statusCode){var t,l;let n=null===(l=e.translation)||void 0===l?void 0:null===(t=l[0])||void 0===t?void 0:t.translation;c(`${i}\\N${n}`)}})()},[l,n,i]),{finalTitle:u}},c=e=>{var t;let{awemeInfo:i,abTestData:c}=e,{itemTitle:v,caption:m,textExtra:f}=i,{isMainland:g}=(0,a.Iq)(e=>{let{isMainland:t}=e;return{isMainland:t}}),h=(0,o.useRef)(null),p=!!(null===(t=i.itemTitle)||void 0===t?void 0:t.trim()),{finalTitle:_}=u({awemeInfo:i}),[y,w]=(0,o.useState)(v),[x,I]=(0,o.useState)(m),b=(0,o.useMemo)(()=>{let e;if(!p||!f||!Array.isArray(f)||0===f.length)return f;let t=[],i=/#[^\s#]+/g;for(;e=i.exec(x);)t.push({hashtagName:e[0].substring(1),start:e.index,end:e.index+e[0].length});return f.filter(e=>t.some(t=>t.hashtagName===e.hashtagName)).map(e=>{let i=t.find(t=>t.hashtagName===e.hashtagName);return(0,n._)((0,l._)({},e),{start:(null==i?void 0:i.start)||0,end:(null==i?void 0:i.end)||0})})},[p,f,x]),[C,T]=(0,o.useState)(1),[E,S]=(0,o.useState)(!1),k=(0,o.useMemo)(()=>p?Math.max(1,3-C):3,[p,C]);return(0,o.useLayoutEffect)(()=>{if(!h.current)return;let e=e=>{var t;if(!e){T(1),S(!1);return}let i=null===(t=getComputedStyle(e))||void 0===t?void 0:t.lineHeight;T(Math.round(e.offsetHeight/parseFloat(i))),S(function(e){if(!(e instanceof HTMLElement))return!1;let t=getComputedStyle(e);return"hidden"===t.overflow&&("nowrap"===t.whiteSpace?e.scrollWidth>e.offsetWidth:!!t.webkitLineClamp&&e.scrollHeight>e.offsetHeight)}(e))};if(e(h.current),"undefined"!=typeof ResizeObserver){let t=new ResizeObserver(t=>{e(t[0].target)});return t.observe(h.current),()=>{t.disconnect()}}{let t=()=>e(h.current);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}}},[h.current]),(0,o.useEffect)(()=>{var e,t;let i=d.Q.getItem({sKey:s.CookieKeys.DyI18n});g||"zh"===i||(null===(t=navigator)||void 0===t?void 0:null===(e=t.language)||void 0===e?void 0:e.startsWith("zh"))&&!i?(w(v),I(m)):(async()=>{let e=i||"en",t=await Promise.all([(0,r.O9)({sourceText:v,targetLanguage:e}),(0,r.O9)({sourceText:m,targetLanguage:e})]);if(t.every(e=>0===e.statusCode)){var l,n,o,a;let[e,i]=t;w(null===(n=e.translation)||void 0===n?void 0:null===(l=n[0])||void 0===l?void 0:l.translation),I(null===(a=i.translation)||void 0===a?void 0:null===(o=a[0])||void 0===o?void 0:o.translation)}})()},[g,v,m]),{isShowTitleAndDescAlone:p,finalTitle:_,title:y,desc:x,computedTextExtra:b,titleElRef:h,descLine:k,isTitleWrapped:E}}},133776:function(e,t,i){i.d(t,{o:function(){return M}});var l=i("629686");i("490629");var n=i("320165"),o=i("101199"),r=i("908219"),a=i.n(r),d=i("469935"),s=i.n(d),u=i("638052"),c=i("72878"),v=i("426112"),m=i("414061"),f=i("690301"),g=i("513894"),h=i("56497"),p=i("966473"),_=i("687581"),y=i("147597"),w=i("999349"),x=i("402748");let I=(0,o.forwardRef)((e,t)=>(0,n.jsxs)("svg",(0,x._)((0,l._)({width:30,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,n.jsxs)("g",{clipPath:"url(#ad_svg__clip0_315_3529)",children:[(0,n.jsx)("path",{d:"M28 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h26a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z",fill:"#000",fillOpacity:".08"}),(0,n.jsx)("path",{d:"M9.491 2.004L8.22 2.22c.216.336.408.72.588 1.128h-4.38v3.636c-.024 2.34-.348 4.176-.972 5.496l.96.852c.744-1.596 1.128-3.708 1.164-6.348V4.452h8.796V3.348h-4.308a16.724 16.724 0 0 0-.576-1.344zm15.564 6.672h-8.04v4.548h1.152v-.576h5.736v.576h1.152V8.676zm-6.888 2.904V9.756h5.736v1.824h-5.736zm-.276-6.732h2.688v1.656h-5.04V7.62h10.92V6.504h-4.74V4.848h3.828V3.756H21.72V2.148h-1.14v1.608h-2.016c.204-.408.372-.852.516-1.32l-1.128-.144c-.384 1.248-1.104 2.292-2.16 3.144l.684.9a8.301 8.301 0 0 0 1.416-1.488z",fill:"#fff",fillOpacity:".8"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"ad_svg__clip0_315_3529",children:(0,n.jsx)("path",{fill:"#fff",d:"M0 0h30v16H0z"})})})]})));var b=i("234150"),C=i("176449"),T=i("769901"),E=i("714951"),S=i("316213");let k=e=>{var t,i,l,r,d,v,f,g,h,x;let{awemeInfo:k,isActive:N,className:P,onBrandComponentShow:L,onBrandComponentClose:j,onImgError:M,brandAdComponentFloatTip:A,onBrandComponentHide:R}=e||{},[D,V]=(0,o.useState)(!1),[B,Z]=(0,o.useState)(!1),U=(0,o.useRef)(!1),z=(0,o.useRef)(!1);(0,E.e)({timerCb:e=>{var t,i;if(U.current)return;let{currentTime:l,isEnd:n}=e,o=null!==(t=A.show_time)&&void 0!==t?t:3,r=null!==(i=A.show_time+.5)&&void 0!==i?i:3.5;l=o&&(!z.current&&(null==L||L(),z.current=!0),V(!0),null==L||L()),l>=r&&Z(!0),n&&!U.current&&(!z.current&&(null==L||L(),z.current=!0),V(!0),Z(!0),null==R||R())},stopBySeeking:!1,awemeInfo:k,isActive:N,needInit:!0});let F=a()(e=>{var t,i;if(e.stopPropagation(),u.logInstance.sendLog("brandAdIconClick",{group_id:null==k?void 0:k.awemeId,brand_ad_type:c.AD_LOG_MAP[null==k?void 0:null===(i=k.webRawData)||void 0===i?void 0:null===(t=i.brandAd)||void 0===t?void 0:t.brand_type],img_url:null==A?void 0:A.img_url,position:"lower_left",icon_type:"image"}),null==A?void 0:A.is_open_JX_modal){e.preventDefault(),m.emit(m.EVENT.OpenJXModal,{source:"feed_interstitial_ad"});return}m.emit(m.EVENT.videoPause,"FloatTip_onClick")},1e3,{leading:!0,trailing:!1}),W=(0,p.x)(()=>{var e,t;u.logInstance.sendLog("brandAdIconShow",{group_id:null==k?void 0:k.awemeId,brand_ad_type:c.AD_LOG_MAP[null==k?void 0:null===(t=k.webRawData)||void 0===t?void 0:null===(e=t.brandAd)||void 0===e?void 0:e.brand_type],img_url:null==A?void 0:A.img_url,position:"lower_left",icon_type:"image"})});return(0,n.jsxs)("div",{className:s()(w.default.adWrapper,P,{[w.default.show]:D}),style:{width:null==A?void 0:null===(t=A.img_size)||void 0===t?void 0:t.width,height:null==A?void 0:null===(i=A.img_size)||void 0===i?void 0:i.height},ref:W,children:[(0,n.jsxs)(b.a,{onClick:e=>F(e),className:w.default.adButton,style:{width:null==A?void 0:null===(l=A.img_size)||void 0===l?void 0:l.width,height:null==A?void 0:null===(r=A.img_size)||void 0===r?void 0:r.height},target:"_blank",href:null==k?void 0:null===(v=k.webRawData)||void 0===v?void 0:null===(d=v.brandAd)||void 0===d?void 0:d.open_url,children:[(0,n.jsx)("img",{className:w.default.brandImg,src:null==A?void 0:A.img_url,style:{width:null==A?void 0:null===(f=A.img_size)||void 0===f?void 0:f.width,height:null==A?void 0:null===(g=A.img_size)||void 0===g?void 0:g.height},onError:()=>{var e,t;null==M||M(),V(!1),U.current=!0,null==j||j(),_.oe.event.error({name:_.Mo.BrandComponentError,report:{type:"img"}}),u.logInstance.sendLog("brandAdIconClose",{group_id:null==k?void 0:k.awemeId,brand_ad_type:c.AD_LOG_MAP[null==k?void 0:null===(t=k.webRawData)||void 0===t?void 0:null===(e=t.brandAd)||void 0===e?void 0:e.brand_type]})}}),A.has_guide&&B&&(0,n.jsx)("img",{src:T,className:w.default.tapIcon}),(0,n.jsx)(C.Z,{className:w.default.adIcon,src:I,width:30,height:16,viewBox:"0 0 30 16"})]}),A.has_close_btn&&(0,n.jsx)(S.z,{className:w.default.close,svg:(0,n.jsx)(y.Z,{}),style:{position:"absolute",bottom:`${null==A?void 0:null===(h=A.close_btn_position)||void 0===h?void 0:h.bottom}px`,right:`${null==A?void 0:null===(x=A.close_btn_position)||void 0===x?void 0:x.right}px`},onClick:e=>{var t,i;V(!1),U.current=!0,null==j||j(),u.logInstance.sendLog("brandAdIconClose",{group_id:null==k?void 0:k.awemeId,brand_ad_type:c.AD_LOG_MAP[null==k?void 0:null===(i=k.webRawData)||void 0===i?void 0:null===(t=i.brandAd)||void 0===t?void 0:t.brand_type]})}})]})};var N=i("913285"),P=i("310383");let L=e=>{var t,i,l,r,d,v,p,_;let{awemeInfo:y,className:w,isActive:x,onBrandComponentClose:I,onBrandComponentShow:C}=e||{},[T,E]=(0,o.useState)(!1),[N,P]=(0,o.useState)(!1),L=null==y?void 0:null===(t=y.webRawData)||void 0===t?void 0:t.brandAd,j=null==L?void 0:null===(r=L.biz_content)||void 0===r?void 0:null===(l=r.brand_ad_component_config)||void 0===l?void 0:null===(i=l.left)||void 0===i?void 0:i[0],M=(0,o.useRef)(!1),A=a()(e=>{var t,i,l;if(e.stopPropagation(),u.logInstance.sendLog("brandAdIconClick",{group_id:null==y?void 0:y.awemeId,brand_ad_type:c.AD_LOG_MAP[null==y?void 0:null===(i=y.webRawData)||void 0===i?void 0:null===(t=i.brandAd)||void 0===t?void 0:t.brand_type],position:"lower_left",icon_type:"button"}),null==j?void 0:null===(l=j.brand_ad_component_float_tip)||void 0===l?void 0:l.is_open_JX_modal){e.preventDefault(),m.emit(m.EVENT.OpenJXModal,{source:"feed_interstitial_ad"});return}m.emit(m.EVENT.videoPause,"FeedBrandCard_handleAdBtnClick")},1e3,{leading:!0,trailing:!1}),R=!T&&(null==j?void 0:j.brand_ad_component_type)===f.Wy.Img&&!N;return((0,o.useEffect)(()=>{if(!R&&!M.current){var e,t;u.logInstance.sendLog("brandAdIconShow",{group_id:null==y?void 0:y.awemeId,brand_ad_type:c.AD_LOG_MAP[null==y?void 0:null===(t=y.webRawData)||void 0===t?void 0:null===(e=t.brandAd)||void 0===e?void 0:e.brand_type],position:"lower_left",icon_type:"button"}),M.current=!0}},[R]),R)?(0,n.jsx)(k,{awemeInfo:y,isActive:x,onBrandComponentClose:()=>{null==I||I(),P(!0)},onBrandComponentHide:()=>{null==I||I()},onBrandComponentShow:C,onImgError:()=>{E(!0)},brandAdComponentFloatTip:null==j?void 0:j.brand_ad_component_float_tip}):(0,n.jsx)("div",{className:s()(h.default.adWrapper,w),id:h.default.adWrapper,children:(0,n.jsxs)(b.a,{onClick:e=>A(e),className:h.default.adButton,target:"_blank",href:null==y?void 0:null===(v=y.webRawData)||void 0===v?void 0:null===(d=v.brandAd)||void 0===d?void 0:d.open_url,children:[(0,n.jsx)("span",{children:(null==y?void 0:null===(_=y.webRawData)||void 0===_?void 0:null===(p=_.brandAd)||void 0===p?void 0:p.brand_title)||"查看详情"}),(0,n.jsx)(S.z,{svg:(0,n.jsx)(g.Z,{}),style:{color:"#ffffff",height:"14px",fontSize:"14px"}})]})})};function j(e){var t,i,o,r,a,d,s,u,c;let{awemeInfo:m}=e||{},f=(0,v.Kf)(m),g=null==m?void 0:null===(t=m.webRawData)||void 0===t?void 0:t.brandAd,h=null==g?void 0:g.open_url,p=null==g?void 0:null===(d=g.biz_content)||void 0===d?void 0:null===(a=d.brand_ad_component_config)||void 0===a?void 0:null===(r=a.left)||void 0===r?void 0:null===(o=r[0])||void 0===o?void 0:null===(i=o.brand_ad_component_float_tip)||void 0===i?void 0:i.is_open_JX_modal;return f&&(h||p)&&(null==g?void 0:null===(c=g.biz_content)||void 0===c?void 0:null===(u=c.brand_ad_component_config)||void 0===u?void 0:null===(s=u.left)||void 0===s?void 0:s.length)>0?(0,n.jsx)(L,(0,l._)({},e)):null}let M=e=>{let t=(0,P.N)();return(0,n.jsx)(N.k,{componentName:"FeedBrandAd",Slardar:t,children:(0,n.jsx)(j,(0,l._)({},e))})}},714951:function(e,t,i){i.d(t,{e:function(){return m}});var l=i(101199),n=i(734123),o=i(59850),r=i(280647),a=i(426112),d=i(762167),s=i(947383),u=i(37285),c=i(63601),v=i(124834);function m(e){let{timerCb:t,isActive:i,awemeInfo:m,needInit:f=!0,stopBySeeking:g=!0}=e,h=(0,c.n)(),p=(0,l.useRef)(!0),_=(0,l.useRef)(!1),y=(0,o.Z)(e=>{let{currentTime:i}=e||{};t({currentTime:i,isSeeking:!1})}),w=(0,o.Z)(e=>{let{currentTime:i}=e;if(0!==i){g&&(I(),p.current=!1),t({currentTime:i,isSeeking:!0});let e=(0,a.Rx)(m);(null==e?void 0:e.creative_id)&&(0,d.E)("drag_bar",{tag:(0,s.f)(),value:null==e?void 0:e.creative_id,log_extra:null==e?void 0:e.log_extra})}}),x=(0,o.Z)(()=>{if(!_.current){var e,t;null==h||null===(e=h.on)||void 0===e||e.call(h,u.B.TimeUpdate,y),null==h||null===(t=h.on)||void 0===t||t.call(h,n.Events.SEEKING,w)}_.current=!0}),I=(0,o.Z)(()=>{if(_.current){var e,t;null==h||null===(e=h.off)||void 0===e||e.call(h,u.B.TimeUpdate,y),null==h||null===(t=h.off)||void 0===t||t.call(h,n.Events.SEEKING,w)}_.current=!1}),b=(0,l.useCallback)(()=>{p.current=!0},[]),C=(0,l.useCallback)(()=>{f&&(b(),x()),t({currentTime:0,isSeeking:!0,isEnd:!0})},[f,b,x,t]);return(0,v.u)(h,u.B.Ended,C),(0,r.Z)(()=>{b()},[m]),(0,l.useEffect)(()=>{if(!!i){if(h&&p.current)return x(),()=>{I()}}},[h,m,i,x,I]),(0,l.useEffect)(()=>{(null==h?void 0:h.currentTime)&&y({currentTime:h.currentTime})},[h]),{stopListen:I}}},943660:function(e,t,i){i.d(t,{x:function(){return W}});var l=i("629686");i("490629"),i("706056");var n=i("320165"),o=i("101199"),r=i("734123"),a=i("890710"),d=i("426038"),s=i("963964"),u=i("72430"),c=i("409250"),v=i("709705"),m=i("601034"),f=i("889429"),g=i("499059"),h=i("414061"),p=i("624508"),_=new p.h({voiceBubbleShow:{eventName:"voice_bubble_show",params:{enter_from:"",mute_type:""}},voiceBarShow:{eventName:"voice_bar_show",params:{enter_from:""}},clickVoiceBubble:{eventName:"click_voice_bubble",params:{is_open:1,mute_type:""}}}),y=i("402748"),w={User:"user",Browser:"browser"};let x={isAlwaysPrevent:!1,slideTime:0,isTipShow:!1},I={isAlwaysPrevent:!1,slideTime:5,isTipShow:!0},b=d.LocalStorageKeys.forceMuteInfo,C=g.gI.ForceMuted,T=()=>{let e=(0,v.$o)(b),t=!!((null==e?void 0:e.user)||(null==e?void 0:e.browser));return!t&&(0,v.bv)(b),t?e:null},E=e=>(0,v.qQ)(b,(0,l._)({},(0,v.$o)(b),e)),S=(e,t)=>g.Le.setConfig(C,(0,y._)((0,l._)({},g.Le.getConfig(C)),{[e]:t})),k=e=>{var t;return null===(t=g.Le.getConfig(C))||void 0===t?void 0:t[e]},N=e=>g.Le.setConfig(C,(0,l._)({},x,e)),P=(e,t)=>g.Le.setConfig(C,(0,l._)((0,y._)((0,l._)({},I),{currentMuteType:e,slideTime:5}),t)),L=e=>{let t=T(),{showTime:i,closeTime:l}=(null==t?void 0:t[e])||{},n=null!=l?l:i;return n&&Date.now()-n<=864e5*("user"===e?7:3)},j=e=>e.muted||0===e.volume,M=e=>{let{onFail:t,onSuccess:i,player:l}=e;!j(l)&&(S("isMuted",!0),l.muted=!0),setTimeout(()=>{!j(l)&&(S("isMuted",!0),l.muted=!0),l.paused&&l.play(),setTimeout(()=>{l.paused?(l.muted=!1,null==t||t()):j(l)&&(null==i||i())},500)},100)};var A=i("913285"),R=i("63601"),D=i("310383"),V=i("332009"),B=i("37285"),Z=i("435132"),U=i("829248"),z=i("193143");let F=e=>{var t,i;let{isShowGuide:l=!1,isActive:p,awemeInfo:y,abtestData:x,scene:I}=e,{awemeId:b}=y,C=(0,R.n)(),[T,j]=(0,o.useState)(!1),A=(0,o.useRef)(!1),D=k("isTipShow"),[F,W]=(0,o.useState)(null!=D&&D),{attemptOpen:O,executeClose:$}=(0,s.B)({popName:"浏览器限制-声音提醒",onOpen:()=>{W(!0)},onClose:()=>{W(!1)}}),H=(0,o.useMemo)(()=>(!C||V.s.getPlayerScene(C.playerId)===u.lT.Modal||!(V.s.getPlayersByScene(u.lT.Modal).length>0))&&C&&p&&!l&&!k("isAlwaysPrevent"),[p,l,C]),K=(0,o.useCallback)(e=>{if(H){if(!k("isTipShow"))M({player:C,onSuccess:()=>{O({afterCallback:()=>{P(e),_.sendLog("voiceBubbleShow",{enter_from:(0,m.yW)(),mute_type:k("currentMuteType")}),E({[e]:{showTime:Date.now()}})}})},onFail:()=>{N({isAlwaysPrevent:!0})}}),S("currentMuteType",e),e===w.Browser&&(0,v.qQ)(d.LocalStorageKeys.browserMute,!0)}},[C,H]),G=(0,o.useCallback)(()=>{let e=k("currentMuteType");if(!!e&&!!k("isTipShow"))$(),S("isTipShow",!1),E({[e]:{closeTime:Date.now()}})},[]),q=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(C&&p){let e=()=>{q.current=!0};return C.on("autoplay_was_prevented",e),()=>{C.off("autoplay_was_prevented",e)}}},[C,p]),(0,o.useEffect)(()=>{let e=()=>{if(!(!C.paused&&!C.muted&&C.volume>0||(0,f.G6)()||A.current||(0,z.f)())){if(A.current=!0,L(w.Browser)){M({player:C}),(0,v.qQ)(d.LocalStorageKeys.browserMute,!0);return}K(w.Browser)}};return C&&(q.current||C.inlinePlayerAutoPlayWasPrevented)&&(e(),q.current=!1,C.inlinePlayerAutoPlayWasPrevented=!1),null==C||C.on("autoplay_was_prevented",e),()=>null==C?void 0:C.off("autoplay_was_prevented",e)},[C,K]),(0,o.useEffect)(()=>{C&&C.muted&&(0,v.$o)(d.LocalStorageKeys.browserMute)&&!L(w.Browser)&&K(w.Browser)},[C,K]),(0,o.useEffect)(()=>{if("user"!==k("currentMuteType"))((c.Q.getItem({sKey:d.CookieKeys.VolumeInfo})||{}).isUserMute||(0,v.$o)(d.LocalStorageKeys.userMute))&&!L(w.User)&&K(w.User)},[K]),(0,o.useEffect)(()=>{var e;let{isInMiniModal:t}=null!==(e=g.Le.getConfig(g.gI.IsInLookMiniModal))&&void 0!==e?e:{};if(t){$();return}let i=k("isTipShow");p&&(i?O({afterCallback:()=>{let e=k("slideTime")-1;S("slideTime",e),e<=0&&G()}}):$())},[b,p,G]),(0,o.useEffect)(()=>{if(C){let e=e=>{((null==e?void 0:e.action)==="change_muted"||(null==e?void 0:e.action)==="change_volume")&&((0,v.qQ)(d.LocalStorageKeys.browserMute,!1),(F||k("isTipShow"))&&G(),setTimeout(()=>{!0===C.muted||0===C.volume?((0,v.qQ)(d.LocalStorageKeys.userMute,!0),E({[w.User]:{closeTime:Date.now()}})):(0,v.qQ)(d.LocalStorageKeys.userMute,!1)}))};return C.on(r.Events.USER_ACTION,e),()=>{C.off(r.Events.USER_ACTION,e)}}},[C,F,G]),(0,o.useEffect)(()=>{if(C){let e=e=>{("volumeDown"===e.action||"volumeUp"===e.action)&&((0,v.qQ)(d.LocalStorageKeys.browserMute,!1),(F||k("isTipShow"))&&G(),setTimeout(()=>{0===C.volume?((0,v.qQ)(d.LocalStorageKeys.userMute,!0),E({[w.User]:{closeTime:Date.now()}})):(0,v.qQ)(d.LocalStorageKeys.userMute,!1)}))};return C.on(B.B.CustomShortCut,e),()=>{C.off(B.B.CustomShortCut,e)}}},[C,F,G]);if((0,o.useEffect)(()=>{!p&&T&&j(!1)},[p,T]),(0,o.useEffect)(()=>{if(!!b)h.emit(h.EVENT.silentStatusChange,{awemeId:b,isAuto:!0,status:F&&(null==C?void 0:C.muted)})},[F,b,null==C?void 0:C.muted]),!F||!(null==C?void 0:C.muted))return null;let Q=null==C?void 0:null===(i=C.getPlugin)||void 0===i?void 0:null===(t=i.call(C,"SoundGuideTooltipPlugin"))||void 0===t?void 0:t.root,J=k("currentMuteType");return["browser","user"].includes(J)&&Q?(0,a.createPortal)((0,n.jsx)(U.V,{onClose:()=>{G(),(0,v.qQ)(d.LocalStorageKeys.browserMute,!1),(0,v.qQ)(d.LocalStorageKeys.userMute,!0),E({[w.User]:{closeTime:Date.now()}}),_.sendLog("clickVoiceBubble",{is_open:0,mute_type:k("currentMuteType")})},onOpen:()=>{let{volume:e}=(0,Z.J)(x);C&&(C.muted?C.muted=!1:C.volume=e),G(),C.emit("volumechange"),null==C||C.emit(r.Events.USER_ACTION,{action:"change_muted"}),(0,v.qQ)(d.LocalStorageKeys.browserMute,!1),(0,v.qQ)(d.LocalStorageKeys.userMute,!1),_.sendLog("clickVoiceBubble",{is_open:1,mute_type:k("currentMuteType")})},description:"browser"===J?"因浏览器限制,当前为静音":"当前为静音,是否要打开声音?"}),Q):null},W=e=>{let t=(0,D.N)();return(0,n.jsxs)(A.k,{componentName:"AutoSilentPlugin",Slardar:t,children:[(0,n.jsx)(U.I,(0,l._)({},e)),(0,n.jsx)(F,(0,l._)({},e))]})}},31717:function(e,t,i){i.d(t,{Y:function(){return P}});var l=i("629686");i("490629"),i("706056"),i("117232");var n=i("320165"),o=i("101199"),r=i("469935"),a=i.n(r),d=i("718570"),s=i("383280"),u=i("638052"),c=i("590555"),v=i("911429"),m=i("205030"),f=i("250532"),g=i("759894"),h=i("414061"),p=i("402748");let _=(0,o.forwardRef)((e,t)=>(0,n.jsx)("svg",(0,p._)((0,l._)({width:28,height:28,xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,n.jsx)("path",{d:"M19.59 9.59a.833.833 0 1 0-1.18-1.18L14 12.823 9.59 8.41a.833.833 0 1 0-1.18 1.178L12.822 14l-4.41 4.41a.833.833 0 0 0 1.178 1.18L14 15.177l4.41 4.411a.833.833 0 0 0 1.18-1.178L15.177 14l4.411-4.41z"})})));var y=i("878999"),w=i("518278"),x=i("46892"),I=i("49000");let b=e=>e.map(e=>({avatarUri:e.avatar_thumb.url_list[0],nickname:e.nickname,uid:e.uid,followStatus:e.follow_status,followerCount:e.follower_count,followerStatus:e.follower_status,roleId:e.role_id,roleTitle:e.role_title,secUid:e.sec_uid})),C=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fontSize:14},i=t.fontSize<12?12:t.fontSize,l=t.fontSize<12?t.fontSize/12:1,n=document.createElement("div");n.innerText=e,n.style.fontSize=`${i}px`,n.style.position="fixed",n.style.zIndex="-999",document.body.appendChild(n);let o=n.offsetWidth;return document.body.removeChild(n),o*l};var T=e=>{let{size:t,prename:i,roleTitle:l,author:r}=e,{secUid:d}=r,[s,u]=(0,o.useState)();return(0,o.useLayoutEffect)(()=>{u(C(l,{fontSize:12}))},[l]),(0,n.jsxs)(w.a,{className:I.default.container,isNeedSeoOpt:!1,href:(0,x.HC)(d,"enter_method=cooperation_list"),target:"_blank",rel:"noopener noreferrer",onClick:()=>{h.emit(h.EVENT.videoPause,"SignificantAuthor_onClick")},children:[(0,n.jsx)("img",{src:r.avatarUri,alt:"",className:a()(I.default.avatar,"small"===t&&I.default.small)}),(0,n.jsx)("div",{className:I.default.name,children:r.nickname}),(0,n.jsxs)("div",{className:I.default.role,children:[(0,n.jsx)("div",{className:I.default["role-prename"],children:(0,n.jsx)("span",{children:i})}),(0,n.jsx)("div",{className:I.default["role-name"],children:(0,n.jsx)("span",{style:{width:s},children:l})})]})]})},E=i("669774"),S=e=>{let{author:t,roleTitle:i}=e,{secUid:l}=t;return(0,n.jsxs)(w.a,{className:E.default.container,isNeedSeoOpt:!1,href:(0,x.HC)(l,"enter_method=cooperation_list"),target:"_blank",rel:"noopener noreferrer",onClick:()=>{h.emit(h.EVENT.videoPause,"CommonAuthor_onClick")},children:[(0,n.jsx)("img",{src:t.avatarUri,alt:"",className:E.default.avatar}),(0,n.jsx)("div",{className:E.default.name,children:t.nickname}),(0,n.jsx)("div",{className:E.default.character,children:i})]})},k=i("163896");let N=e=>{let{totalNum:t,cursor:i,authorList:l,extra:r,awemeInfo:p,userInfo:w}=e,{significant_uid_list:x,custom_role_prename_map:I}=r;(0,o.useEffect)(()=>{let e="showCooperationList";return(0,f.o)({pausePlayControlShortcut:!0,pauseCustomShortcut:!0,pauseGlobalShortcut:!0},e),()=>{(0,f.m)(e)}},[]);let C=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=C.current,t=e=>e.stopPropagation();return null==e||e.addEventListener("wheel",t),()=>{null==e||e.removeEventListener("wheel",t)}},[]),(0,o.useEffect)(()=>(u.logInstance.sendLog("enterCoPublishPanel",{group_id:p.groupId,author_id:p.authorInfo.uid,enter_from_merge:"recommend",enter_from:(0,g.mo)()}),h.emit(h.EVENT.videoStopPlayNext),()=>{h.emit(h.EVENT.videoRemoveStopPlayNext)}),[]);let E=(0,o.useRef)((0,o.useMemo)(()=>new Set(l.map(e=>e.uid)),[])),N=(0,o.useMemo)(()=>l.find(e=>e.roleId===m.iG.Author),[]),P=(0,o.useMemo)(()=>(null==x?void 0:x.length)?x.map(e=>l.find(t=>t.uid===e)):[],[]),L=(0,o.useRef)(!1);(0,o.useEffect)(()=>()=>{L.current=!0},[]);let[j,M]=(0,o.useState)(()=>l.filter(e=>!P.includes(e)).sort((e,t)=>{var i,l;return t.roleId===m.iG.Author||t.uid===(null===(i=w.info)||void 0===i?void 0:i.uid)?1:e.roleId===m.iG.Author||e.uid===(null===(l=w.info)||void 0===l?void 0:l.uid)?-1:0})),A=(0,o.useRef)(i),[R,D]=(0,o.useState)(!1),[V,B]=(0,o.useState)(!0),[Z,U]=(0,o.useState)(t>l.length),{ref:z,inView:F}=(0,d.useInView)(),W=(0,c.d)(F),O=(0,c.d)(async()=>{if(!Z||R||L.current)return;D(!0),B(!1);let e=await (0,v.U2)("/aweme/v1/co/cocreator/list/",{item_id:p.awemeId,index:A.current+1}).catch(e=>{throw B(!0),D(!1),e});if(L.current)return;let{user_info_list:t,has_more:i,status_code:l}=e;if(l&&l<0){B(!0),D(!1);return}let n=A.current,o=t.filter(e=>{let t=E.current.has(e.uid);return E.current.add(e.uid),n=e.index,!t});M(e=>[...e,...b(o)]),U(i),D(!1),A.current=n,setTimeout(()=>{W.current&&O.current()},50)});return(0,o.useEffect)(()=>{F&&O.current()},[F]),(0,n.jsxs)("div",{className:y.default.container,children:[(0,n.jsxs)("div",{className:y.default.header,children:[(0,n.jsxs)("span",{children:[t,"人共同创作"]}),(0,n.jsx)(_,{className:y.default.close,onClick:()=>{k.Uq.destroy()}})]}),(0,n.jsxs)("div",{className:y.default.content,ref:C,children:[P.length>0&&(0,n.jsx)("div",{className:a()(y.default["significant-authors"],P.length>2&&y.default["significant-authors__small"]),children:P.map(e=>(0,n.jsx)(T,{author:e,prename:I[e.uid],roleTitle:e.uid===(null==N?void 0:N.uid)&&r.author_role_name?r.author_role_name:e.roleTitle,size:P.length>2?"small":"normal"},e.uid))}),(0,n.jsx)("div",{className:y.default["common-authors"],children:j.map(e=>(0,n.jsx)(S,{author:e,roleTitle:e.uid===(null==N?void 0:N.uid)&&r.author_role_name?r.author_role_name:e.roleTitle},e.uid))}),(0,n.jsx)("div",{ref:z,className:y.default["loading-container"],children:Z?V?(0,n.jsxs)(n.Fragment,{children:["服务异常,重新",(0,n.jsx)("span",{onClick:O.current,className:y.default.refresh,children:"刷新"}),"拉取数据"]}):(0,n.jsx)(s.g,{text:"加载中"}):"没有更多数据"})]})]})},P=e=>{k.Uq.render({children:(0,n.jsx)(N,(0,l._)({},e)),className:y.default.mask,onMaskClick:()=>k.Uq.destroy()})}},400601:function(e,t,i){var l=i(320165),n=i(101199),o=i(469935),r=i.n(o),a=i(142186),d=i(250258),s=i(316213);t.Z=e=>{let{authorList:t,isTag:i=!1,onClick:o,className:u="",num:c}=e,v=(0,n.useMemo)(()=>c>=1e4?"万":c>=1e3?"千":c>=100?"百":String(c),[c]);return t.length<=1?null:(0,l.jsxs)("div",{className:r()(d.default.peopleCount,u,{[d.default.tagStyle]:i}),onClick:o,children:[(0,l.jsx)(s.z,{svg:(0,l.jsx)(a.Z,{style:{fontSize:"12px"}}),className:d.default.svg}),(0,l.jsxs)("span",{className:d.default.text,children:[v,"人共创",!i&&" : "]})]})}},794008:function(e,t,i){i.d(t,{N:function(){return Z}});var l=i("629686");i("490629");var n=i("320165"),o=i("101199"),r=i("638052"),a=i("689222"),d=i("687875"),s=i("250532"),u=i("759894"),c=i("414061"),v=i("477667"),m=i("49737"),f=i("163896"),g=i("176449"),h=i("518278"),p=i("585271"),_=i("46892"),y=i("63151"),w=i("402748"),x=i("469935"),I=i.n(x),b=i("48795"),C=i("205030"),T=i("988805"),E=i("601034"),S=i("880327"),k=i("335924"),N=i("394408"),P=i("31992"),L=i("150877"),j=i("157762"),M=i("431493");function A(e){var t,i,r,a,d,s,u,c,v;let{loginDispatch:m,userInfo:f,loginUserInfo:g,awemeInfo:h,reportExtraParams:p,isLogin:_,onLoginChange:y}=e,{followStatus:x,followerStatus:A,uid:R}=f||{},D=(0,o.useMemo)(()=>{var e;return(null==f?void 0:f.uid)===(null==g?void 0:null===(e=g.info)||void 0===e?void 0:e.uid)},[f,g]),{followStatus:V,text:B,buttonType:Z}=(0,j.r)({selfUid:null==g?void 0:null===(t=g.info)||void 0===t?void 0:t.uid,actionUid:R,defaultFollowerStatus:A,defaultFollowStatus:x}),{follow:U,unFollow:z}=(0,M.OM)({selfUid:null==g?void 0:null===(i=g.info)||void 0===i?void 0:i.uid,actionUid:R,defaultFollowerStatus:A,defaultFollowStatus:x,isLogin:_,onLoginSuccess:()=>{null==y||y(!0),null==m||m({type:"updateUserInfo"})},logExtraParams:(0,w._)((0,l._)({to_user_id:R,enter_from:(0,E.yW)(),is_full_screen:(0,S.r)()?"1":"0",author_id:null==h?void 0:null===(r=h.authorInfo)||void 0===r?void 0:r.uid,group_id:null==h?void 0:h.awemeId,tab_name:(0,P.zD)()||(0,k.Rs)("tab_name")||"",from_group_id:null==h?void 0:h.awemeId,music_id:null==h?void 0:null===(a=h.music)||void 0===a?void 0:a.mid,compilation_id:null==h?void 0:null===(d=h.mixInfo)||void 0===d?void 0:d.mixId,aweme_type:null==h?void 0:h.awemeType,item_duration_ms:(null==h?void 0:null===(s=h.video)||void 0===s?void 0:s.duration)||0},p),{is_co_publish:1,co_publish_author_list:null==h?void 0:null===(v=h.cooperationInfo)||void 0===v?void 0:null===(c=v.cooperationCreators)||void 0===c?void 0:null===(u=c.filter(e=>e.roleId!==C.iG.Author))||void 0===u?void 0:u.map(e=>`${e.uid}_${null==e?void 0:e.roleId}`),enter_method:"co_publish_panel"})});return(0,n.jsx)("div",{className:I()(L.default.buttonsWrap,L.default.following,{[L.default.hidden]:D}),children:(0,n.jsx)(b.Button,{theme:"solid",className:L.default.follow,type:Z===T.TT.Active?"primary":"secondary",onClick:()=>{(0,N.V)(V)?z():U()},size:"small",children:(0,n.jsx)("div",{className:L.default.contentBlock,children:B})})})}var R=i("81683");function D(e){let{userInfo:t}=e,{avatarUri:i,nickname:o,secUid:r,roleTitle:d}=t;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:y.default.card,children:[(0,n.jsx)("div",{className:y.default.avatarWrap,children:(0,n.jsx)(h.a,{isNeedSeoOpt:!1,href:(0,_.HC)(r,"enter_method=cooperation_list"),target:"_blank",rel:"noopener noreferrer",onClick:()=>{c.emit(c.EVENT.videoPause,"UserCard_onClick")},children:(0,n.jsx)(p.q,{src:i,alt:`${o}头像`,type:"extraSmall"})})}),(0,n.jsx)("div",{className:y.default.info,children:(0,n.jsx)("div",{className:y.default.nameInfo,children:(0,n.jsxs)("div",{className:y.default.nickname,children:[(0,n.jsx)(h.a,{isNeedSeoOpt:!1,href:(0,_.HC)(r,"enter_method=cooperation_list"),target:"_blank",rel:"noopener noreferrer",onClick:()=>{c.emit(c.EVENT.videoPause,"UserCard_onClick1")},children:(0,n.jsx)(R.Z,{text:o})}),d&&(0,n.jsx)("div",{className:y.default.roleTitle,children:d})]})})}),(0,n.jsx)(A,(0,l._)({},e))]}),(0,n.jsx)(a.i,{className:y.default.divider})]})}let{Escape:V}=d.bf,B=e=>{let{showCooperationList:t,loginUserInfo:i,loginDispatch:l,awemeInfo:d,reportExtraParams:h}=e,p=o.useRef(null),[_,y]=(0,o.useState)(i.isLogin);return o.useEffect(()=>{let e="showCooperationList";return(0,s.o)({pausePlayControlShortcut:!0,pauseCustomShortcut:!0,pauseGlobalShortcut:!0,disableKey:[V].map(e=>e.code)},e),()=>{(0,s.m)(e)}},[]),o.useEffect(()=>{let e=p.current,t=e=>e.stopPropagation();return null==e||e.addEventListener("wheel",t),()=>{null==e||e.removeEventListener("wheel",t)}},[]),o.useEffect(()=>(r.logInstance.sendLog("enterCoPublishPanel",{group_id:d.groupId,author_id:d.authorInfo.uid,enter_from_merge:"recommend",enter_from:(0,u.mo)()}),c.emit(c.EVENT.videoStopPlayNext),()=>{c.emit(c.EVENT.videoRemoveStopPlayNext)}),[]),(0,n.jsxs)("div",{className:m.default.shortcutList,children:[(0,n.jsxs)("div",{className:m.default.header,children:[(0,n.jsx)("div",{className:m.default.title,children:`${null==t?void 0:t.length}人共同创作`}),(0,n.jsx)(g.Z,{className:m.default.close,width:36,height:36,src:v.Z,color:"#A9AAB7",onClick:()=>{f.Uq.destroy()}})]}),(0,n.jsx)(a.i,{className:m.default.divider}),(0,n.jsx)("div",{className:m.default.container,ref:p,children:t.map(e=>(0,n.jsx)(D,{userInfo:e,loginDispatch:l,loginUserInfo:i,isLogin:_,onLoginChange:e=>{y(e)},awemeInfo:d,reportExtraParams:h},e.secUid))})]})},Z=e=>{f.Uq.render({children:(0,n.jsx)(B,(0,l._)({},e)),className:m.default.mask,onMaskClick:()=>f.Uq.destroy()})}},368730:function(e,t,i){i.d(t,{Z:function(){return x}});var l=i(629686),n=i(402748),o=i(811603);i(490629);var r=i(320165),a=i(101199),d=i(469935),s=i.n(d),u=i(229757),c=i.n(u),v=i(205030),m=i(880327),f=i(687073),g=i(70386),h=i(19886),p=i(431493),_=i(63601),y=i(316213);function w(e){var t,i,o,d,u,f,y,w,x,I,b,C;let{loginUserInfo:T,loginDispatch:E,fullScreenTarget:S,reportExtraParams:k,authorItem:N,awemeInfo:P,onCooperationAuthorClick:L,showRoleTitle:j,showFollowBtn:M,loginPanelTarget:A,abTestData:R,isDetail:D}=e,{isLogin:V}=T||{};(0,a.useRef)();let B=(0,_.n)(),[Z,U]=(0,a.useState)(!1),z=(0,a.useRef)(!1),F=(0,a.useRef)(null),W=(0,a.useMemo)(()=>{let e=c()(P);return e.authorInfo=N,e},[P,N]),{follow:O,unFollow:$}=(0,p.OM)({selfUid:null==T?void 0:null===(t=T.info)||void 0===t?void 0:t.uid,actionUid:null==W?void 0:null===(i=W.authorInfo)||void 0===i?void 0:i.uid,defaultFollowerStatus:null==W?void 0:null===(o=W.authorInfo)||void 0===o?void 0:o.followerStatus,defaultFollowStatus:null==W?void 0:null===(d=W.authorInfo)||void 0===d?void 0:d.followStatus,logExtraParams:(0,n._)((0,l._)({author_id:null==P?void 0:null===(u=P.authorInfo)||void 0===u?void 0:u.uid,group_id:null==P?void 0:P.awemeId,from_group_id:null==P?void 0:P.awemeId,music_id:null==P?void 0:null===(f=P.music)||void 0===f?void 0:f.mid,compilation_id:null==P?void 0:null===(y=P.mixInfo)||void 0===y?void 0:y.mixId,aweme_type:null==P?void 0:P.awemeType,to_user_id:null==W?void 0:null===(w=W.authorInfo)||void 0===w?void 0:w.uid},k),{is_co_publish:1,item_duration_ms:(null==P?void 0:null===(x=P.video)||void 0===x?void 0:x.duration)||0,co_publish_author_list:null==W?void 0:null===(C=W.cooperationInfo)||void 0===C?void 0:null===(b=C.cooperationCreators)||void 0===b?void 0:null===(I=b.filter(e=>e.roleId!==v.iG.Author))||void 0===I?void 0:I.map(e=>`${e.uid}_${null==e?void 0:e.roleId}`),enter_method:"co_publish_entrance"}),isLogin:V,accountParentEl:(0,m.r)()&&S,onLoginSuccess:()=>{null==E||E({type:"updateUserInfo"})}});return(0,r.jsxs)("li",{className:s()(g.default.itemContainer,{[g.default.vertical]:!j}),ref:F,"data-click-from":"click_icon",children:[(0,r.jsx)(h.Z,{player:B,loginUserInfo:T,actionFollow:O,actionUnFollow:$,awemeInfo:W,isLogin:V,loginDispatch:E,fullScreenTarget:S,isFollowClickedRef:z,onCooperAitonClick:()=>{null==L||L(W)},reportExtraParams:k,className:g.default.avatarContainer,isShowTip:!0,isShowKeyHotTip:!1,followBtnMouseEnter(){},followBtnMouseLeave(){},imBtnMouseEnter(){},imBtnMouseLeave(){},showPendantTip:Z,setShowPendantTip:U,showImBtn:!1,showFollowBtn:M,loginPanelTarget:A,abtestData:R}),(0,r.jsx)("div",{className:g.default.nickNameContainer,children:(0,r.jsx)("span",{className:s()(g.default.nickName,g.default.changeSize),onClick:()=>{null==L||L(W)},children:N.nickname})})]})}function x(e){let{authorList:t,onClickMore:i}=e,d=(0,o._)(e,["authorList","onClickMore"]),u=(0,a.useRef)(null),c=(0,a.useMemo)(()=>t.length>5,[t]);return(null==t?void 0:t.length)<=1?null:(0,r.jsxs)("div",{className:s()(g.default.container,{videoCooperationHideTitleContainer:!0}),children:[(0,r.jsx)("ul",{className:g.default.avatarList,children:t.map((e,t)=>c&&t>=4?null:(0,r.jsx)(w,(0,n._)((0,l._)({},d),{authorItem:e,showFollowBtn:!0}),e.uid))}),c&&(0,r.jsx)("div",{className:g.default.moreBox,children:(0,r.jsx)("div",{className:g.default.more,onClick:i,children:(0,r.jsx)(y.z,{svg:(0,r.jsx)(f.Z,{})})})}),(0,r.jsx)("div",{className:"disturb-login-panel disturb-login-panel-related",ref:u})]})}},516571:function(e,t,i){i.d(t,{Z:function(){return d}});var l=i("697233"),n=i("730084");i("527553");let o=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played transition",styleKey:"playedColor"}];class r{updateDuration(e){this.duration=parseInt(1e3*e);let t=0,{fragments:i}=this;this.fragments=i.map(e=>(e.start=t,e.end=t+e.percent*this.duration,e.duration=e.percent*this.duration,t+=e.percent*this.duration,e))}updateProgress(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},{progressList:i,fragments:l}=this,{newIndex:n,curIndex:o,millisecond:r}=t;n!==o&&i.map((t,i)=>{in&&(t[e].style.width=0)});let a=l[n],d=0===r?0:(r-a.start)/a.duration;i[n]&&(i[n][e].style.width=d<0?0:`${100*d}%`)}reset(){let{progressList:e,fragments:t}=this;e.map((e,t)=>{n.ZP.removeClass(e.played,"transition"),setTimeout(()=>n.ZP.addClass(e.played,"transition"),100)}),this.update({played:0},this.duration)}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments.length>1?arguments[1]:void 0;if(!this.duration||parseInt(1e3*t,10)!==this.duration){if(!t&&0!==t)return;this.updateDuration(t)}let{playedIndex:i,cachedIndex:l}=this;if("Undefined"!==n.ZP.typeOf(e.played)){let t=this.findIndex(1e3*e.played,i);this.updateProgress("played",{newIndex:t,curIndex:i,millisecond:parseInt(1e3*e.played,10)}),this.playedIndex=t}if("Undefined"!==n.ZP.typeOf(e.cached)){let t=this.findIndex(1e3*e.cached,l);this.updateProgress("cached",{newIndex:t,curIndex:l,millisecond:parseInt(1e3*e.cached,10)}),this.cachedIndex=t}}findIndex(e,t){let{fragments:i}=this;if(1===i.length||0===e)return 0;let l=t;for(let t=0;ti.start&&e<=i.end)break}return l}findHightLight(){let{children:e}=this.root;for(let t=0;t=t.length?null:{dom:t[e],pos:t[e].getBoundingClientRect()}}unHightLight(){let{children:e}=this.root;for(let t=0;t{let l=n.ZP.createDom("xg-inner","",{style:e?`background:${e}; flex: ${t.percent}`:`flex: ${t.percent}`},`${t.isFocus?"inner-focus":""} xgplayer-progress-inner picture-inner`);return l.addEventListener("click",()=>this.onInnerClick(i)),this.root.appendChild(l),o.map(e=>{l.appendChild(n.ZP.createDom(e.tag,"",{style:e.styleKey?`background: ${this.style[e.styleKey]}; width:0;`:"width:0;"},e.className))}),{cached:l.children[0],played:l.children[1]}})),this.root}constructor(e){this.fragments=e.fragments||[],this.onInnerClick=e.onInnerClick,this.focusClass="inner-focus",this.style=e.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0}}i("954629");class a extends l.ZP{static get pluginName(){return"pictureProgress"}static get defaultConfig(){return{position:l.kd.CONTROLS_CENTER,index:0,disable:!1,isDragingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],miniMoveStep:5,miniStartStep:2,onMoveStart:()=>{},onMoveEnd:()=>{}}}get duration(){return this.playerConfig&&this.playerConfig.customDuration||this.player.duration}get timeOffset(){return this.playerConfig.timeOffset||0}beforeCreate(e){"boolean"==typeof e.player.config.progress&&(e.config.disable=!e.player.config.progress)}createInner(){try{this.innerList=new r({fragments:this.config.fragments,style:this.playerConfig.commonStyle||{},onInnerClick:this.config.onInnerClick}),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),["findHightLight","unHightLight","setHightLight","findFragment"].map(e=>{this[e]=this.innerList[e].bind(this.innerList)})}catch(e){}}afterCreate(){if(!this.config.disable&&!this.playerConfig.isLive)this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1},this.outer=this.find("xg-outer"),this.createInner(),this.bind("pointerdown",this.onStopPropagation),this.bind("touchstart",this.onStopPropagation)}focus(){this.player.controls.pauseAutoHide(),n.ZP.addClass(this.root,"active")}blur(){this.player.controls.recoverAutoHide(),n.ZP.removeClass(this.root,"active")}onStopPropagation(e){e.stopPropagation()}onMouseDown(e){let{player:t,pos:i,config:l,playerConfig:o}=this,r=n.ZP.getEventPos(e,t.zoom),{width:a,height:d,top:s,left:u}=this.root.getBoundingClientRect(),c=(r.clientX-u)/a;this.updatePercent(c)}updateTime(e){let{player:t,duration:i}=this;e>i?e=i:e<0&&(e=0);let l=t.plugins.time;l&&l.updateTime(e)}updatePercent(e){e=e>1?1:e<0?0:e,this.percent=e,this.innerList.update({played:e*this.duration},this.duration)}getPercent(){return this.percent}destroy(){this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null,this.unbind("mousedown",this.onMouseDown),this.unbind("pointerdown",this.onStopPropagation),this.unbind("touchstart",this.onStopPropagation)}render(){if(this.config.disable||this.playerConfig.isLive)return;let e=this.player.controls?this.player.controls.config.mode:"";return` `}constructor(e){super(e),this.percent=0,this._state={now:-1,direc:0,time:0}}}var d=a},871314:function(e,t,i){i.d(t,{Z:function(){return d}});var l=i("697233"),n=i("730084");i("527553");let o=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played transition",styleKey:"playedColor"}];class r{updateProgress(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},{progressList:i,fragments:l}=this,{newIndex:n,curIndex:o,millisecond:r}=t;n!==o&&i.map((t,i)=>{in&&(t[e].style.width=0)});let a=l[n],d=0===r?0:(r-a.start)/a.duration;i[n]&&(i[n][e].style.width=d<0?0:`${100*d}%`)}reset(){let{progressList:e,fragments:t}=this;this.update({played:0})}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},{playedIndex:t,cachedIndex:i}=this;if("Undefined"!==n.ZP.typeOf(e.played)){let i=this.findIndex(e.played,t);if(i!==t){var l,o;n.ZP.removeClass(null===(l=this.progressList[t])||void 0===l?void 0:l.played,"transition"),n.ZP.addClass(null===(o=this.progressList[i])||void 0===o?void 0:o.played,"transition")}this.updateProgress("played",{newIndex:i,curIndex:t,millisecond:e.played}),this.playedIndex=i}if("Undefined"!==n.ZP.typeOf(e.cached)){let t=this.findIndex(e.cached,i);this.updateProgress("cached",{newIndex:t,curIndex:i,millisecond:parseInt(e.cached,10)}),this.cachedIndex=t}}findIndex(e,t){let{fragments:i}=this;if(1===i.length||0===e)return 0;let l=t;for(let t=0;t=i.start&&e<=i.end)break}return l}findHightLight(){let{children:e}=this.root;for(let t=0;t=t.length?null:{dom:t[e],pos:t[e].getBoundingClientRect()}}unHightLight(){let{children:e}=this.root;for(let t=0;t{let l=n.ZP.createDom("xg-inner","",{style:e?`background:${e}; flex: ${t.percent}`:`flex: ${t.percent}`},`${t.isFocus?"inner-focus":""} xgplayer-progress-inner picture-inner`);return l.addEventListener("click",()=>this.onInnerClick(i)),this.root.appendChild(l),o.map(e=>{l.appendChild(n.ZP.createDom(e.tag,"",{style:e.styleKey?`background: ${this.style[e.styleKey]}; width:0;`:"width:0;"},e.className))}),{cached:l.children[0],played:l.children[1]}})),this.root}constructor(e){this.fragments=e.fragments||[],this.onInnerClick=e.onInnerClick,this.focusClass="inner-focus",this.style=e.style||{playedColor:"",cachedColor:"",progressColor:""},this.cachedIndex=0,this.playedIndex=0}}i("78590");class a extends l.ZP{static get pluginName(){return"pictureProgress"}static get defaultConfig(){return{position:l.kd.CONTROLS_CENTER,index:0,disable:!1,isDragingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[],miniMoveStep:5,miniStartStep:2,onMoveStart:()=>{},onMoveEnd:()=>{}}}beforeCreate(e){"boolean"==typeof e.player.config.progress&&(e.config.disable=!e.player.config.progress)}createInner(){try{this.innerList=new r({duration:this.config.duration,fragments:this.config.fragments,style:this.playerConfig.commonStyle||{},onInnerClick:this.config.onInnerClick}),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),["findHightLight","unHightLight","setHightLight","findFragment"].map(e=>{this[e]=this.innerList[e].bind(this.innerList)})}catch(e){}}afterCreate(){if(!this.config.disable&&!this.playerConfig.isLive)this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1},this.outer=this.find("xg-outer"),this.createInner(),this.bind("pointerdown",this.onStopPropagation),this.bind("touchstart",this.onStopPropagation)}focus(){this.player.controls.pauseAutoHide(),n.ZP.addClass(this.root,"active")}blur(){this.player.controls.recoverAutoHide(),n.ZP.removeClass(this.root,"active")}onStopPropagation(e){e.stopPropagation()}updateIndex(e,t){let i="video"===this.config.fragments[e].type||t?this.config.fragments[e].start:this.config.fragments[e].end;this.innerList.update({played:i})}updateTime(e){this.innerList.update({played:e})}destroy(){this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null,this.unbind("pointerdown",this.onStopPropagation),this.unbind("touchstart",this.onStopPropagation)}render(){if(this.config.disable||this.playerConfig.isLive)return;let e=this.player.controls?this.player.controls.config.mode:"";return` `}constructor(e){super(e),this._state={now:-1,direc:0,time:0}}}var d=a},884635:function(e,t,i){i.d(t,{X:function(){return p}});var l=i(629686),n=i(101199),o=i(198412),r=i.n(o),a=i(5784),d=i.n(a),s=i(687875),u=i(63601),c=i(517038),v=i(373398);let{ArrowLeft:m,ArrowRight:f,A:g,D:h}=s.bf,p=e=>{let t=(0,u.n)(),{preClick:i,nextClick:o,disableShortCut:a=!1,active:s=!0}=e;return(0,n.useEffect)(()=>{if(!!s){if(t){if(a)return(0,c.K)(t);let e={left:{keyCode:m.keyCode,action:i,disable:!1,noBodyTarget:!1},right:{keyCode:f.keyCode,action:o,disable:!1,noBodyTarget:!1},leftA:{keyCode:g.keyCode,action:i,disable:!1,noBodyTarget:!1},rightD:{keyCode:h.keyCode,action:o,disable:!1,noBodyTarget:!1}},n={left:r()(t,"plugins.keyboard.keyCodeMap.left"),right:r()(t,"plugins.keyboard.keyCodeMap.right"),leftA:r()(t,"plugins.keyboard.keyCodeMap.leftA"),rightD:r()(t,"plugins.keyboard.keyCodeMap.rightD")};return d()(t,"plugins.keyboard.keyCodeMap",(0,l._)({},r()(t,"plugins.keyboard.keyCodeMap")||{},e)),()=>{t.plugins.keyboard&&((0,v.v)({currentCodeMap:t.plugins.keyboard.keyCodeMap,additionalCodeMap:e}),d()(t,"plugins.keyboard.keyCodeMap",(0,l._)({},r()(t,"plugins.keyboard.keyCodeMap")||{},n)))}}}},[t,i,o,a,s]),null}},548986:function(e,t,i){i.d(t,{i:function(){return n}}),i(490629);var l=i(101199);let n=e=>{let{player:t,timeDuration:i=3e3}=e,[n,o]=(0,l.useState)(!1),r=(0,l.useRef)(),a=(0,l.useCallback)(()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{o(!0),r.current=null},i)},[i]);return(0,l.useEffect)(()=>{if(null==t?void 0:t.root){var e,i,l;let n=()=>{r.current&&clearTimeout(r.current),o(!1)},d=()=>{o(!1),a()},s=()=>{o(!1),a()};return null==t||null===(e=t.root)||void 0===e||e.addEventListener("mouseenter",d),null==t||null===(i=t.root)||void 0===i||i.addEventListener("mousemove",s),null==t||null===(l=t.root)||void 0===l||l.addEventListener("mouseleave",n),()=>{var e,i,l;null==t||null===(e=t.root)||void 0===e||e.removeEventListener("mouseenter",d),null==t||null===(i=t.root)||void 0===i||i.removeEventListener("mousemove",s),null==t||null===(l=t.root)||void 0===l||l.removeEventListener("mouseleave",n)}}},[null==t?void 0:t.root,a,o]),(0,l.useEffect)(()=>()=>{r.current&&clearTimeout(r.current),r.current=null},[]),n}},186738:function(e,t,i){i.r(t),i.d(t,{PictureMode:function(){return ei},PictureModeInner:function(){return et}});var l=i("629686");i("490629");var n=i("320165"),o=i("101199"),r=i("913285");i("635303");var a=i("469935"),d=i.n(a),s=i("734123"),u=i("855357"),c=i("939165"),v=i("426038"),m=i("273372"),f=i("709705"),g=i("534739"),h=i("390923"),p=i("913485"),_=i("908219"),y=i.n(_),w=i("880327"),x=i("499059"),I=i("759894"),b=i("335924"),C=i("237869"),T=i("31992"),E=i("515330"),S=i("623607"),k=i("516571"),N=i("671913");let P=e=>{let{player:t,timeDuration:i=3e3}=e,[l,n]=(0,o.useState)(!1),r=(0,o.useRef)(),a=(0,o.useCallback)(()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{n(!0),r.current=null},i)},[i]);return(0,o.useEffect)(()=>{if(null==t?void 0:t.root){var e,i,l;let o=()=>{r.current&&clearTimeout(r.current),n(!1)},d=()=>{n(!1),a()},s=()=>{n(!1),a()};return null==t||null===(e=t.root)||void 0===e||e.addEventListener("mouseenter",d),null==t||null===(i=t.root)||void 0===i||i.addEventListener("mousemove",s),null==t||null===(l=t.root)||void 0===l||l.addEventListener("mouseleave",o),()=>{var e,i,l;null==t||null===(e=t.root)||void 0===e||e.removeEventListener("mouseenter",d),null==t||null===(i=t.root)||void 0===i||i.removeEventListener("mousemove",s),null==t||null===(l=t.root)||void 0===l||l.removeEventListener("mouseleave",o)}}},[null==t?void 0:t.root,a,n]),(0,o.useEffect)(()=>()=>{r.current&&clearTimeout(r.current),r.current=null},[]),l};var L=i("176449"),j=i("624508");let M={multiPhotoSlide:{eventName:"multi_photo_slide",params:{aweme_type:u.e.Note,enter_from:"",enter_method:"",author_id:"",group_id:"",pic_cnt:0,is_zoom:!1}},enterGraphicDetail:{eventName:"enter_graphic_detail",params:{enter_from:"",author_id:"",group_id:"",pic_cnt:0}},videoPlayFinish:{eventName:"video_play_finish",params:{author_id:"",group_id:"",log_pb:"",is_visible:"1",enter_from:"",compilation_id:"",playlet_id:"",previous_page:"",tab_name:"",from_follow_list:"0",is_mute:"0",is_force:"0",trending_topic:"",open_from_page:"",multi_window_order:""}},finishTuji:{eventName:"finish_tuji",params:{author_id:"",group_id:"",log_pb:"",is_visible:"1",enter_from:"",compilation_id:"",playlet_id:"",previous_page:"",tab_name:"",from_follow_list:"0",is_mute:"0",is_force:"0",trending_topic:""}}};var A=new j.h(M),R=i("63601"),D=i("721968");let V=e=>{var t;let{isActive:i,awemeInfo:r,swiper:a,onPlayFinish:c,playNextFunc:v,ablePlayNext:m,playPrevFunc:f,ablePlayPrev:_,logParams:j,arrowButtonSize:M=56,isClientMiniWin:V,disableShortCut:B=!1,isShowSideBar:Z=!1,inSearch:U,leftStyle:z,rightStyle:F}=e,W=(0,R.n)(),[O,$]=(0,o.useState)(!0),[H,K]=(0,o.useState)([!0,!0]),G=(0,o.useRef)(Date.now()),q=(0,o.useRef)(0),Q=(0,o.useRef)(j),J=(0,o.useRef)(!0),X=(0,o.useRef)(null),Y=e=>{$(e),J.current=e},ee=P({player:W});Q.current=j;let et=(0,o.useCallback)(e=>{var t;let i=null==W?void 0:W.getPlugin("pictureProgress");null==i||null===(t=i.updatePercent)||void 0===t||t.call(i,e),q.current=e},[W]),ei=(0,o.useCallback)(e=>{var t,i;A.sendLog("multiPhotoSlide",(0,l._)({enter_from:null===(t=Q.current)||void 0===t?void 0:t.enter_from,enter_method:"click_pic",author_id:null==r?void 0:null===(i=r.authorInfo)||void 0===i?void 0:i.uid,group_id:null==r?void 0:r.awemeId,pic_cnt:r.images.length,is_zoom:(0,w.r)()},Q.current)),K([0===a.activeIndex,a.activeIndex===(null==r?void 0:r.images.length)-1]),Y(!1),et((e+1)/r.images.length),null==a||a.slideTo(e,0)},[a,et,r]),el=(0,o.useCallback)(e=>{if(a.activeIndex>0){var t,i;A.sendLog("multiPhotoSlide",(0,l._)({enter_from:null===(t=Q.current)||void 0===t?void 0:t.enter_from,enter_method:(null==e?void 0:e.type)==="click"?"click_button":"keyboard",author_id:null==r?void 0:null===(i=r.authorInfo)||void 0===i?void 0:i.uid,group_id:null==r?void 0:r.awemeId,pic_cnt:r.images.length,is_zoom:(0,w.r)()},Q.current)),Y(!1),et(a.activeIndex/r.images.length),a.slidePrev(),K([0===a.activeIndex,a.activeIndex===(null==r?void 0:r.images.length)-1])}},[a,et,r]),en=(0,o.useCallback)(e=>{if(a.activeIndex{if(W&&(null==r?void 0:r.awemeType)===u.e.Note){let e=e=>{if(e){var t;A.sendLog("enterGraphicDetail",{enter_from:null==j?void 0:j.enter_from,author_id:null==r?void 0:null===(t=r.authorInfo)||void 0===t?void 0:t.uid,group_id:null==r?void 0:r.awemeId,pic_cnt:r.images.length})}};return W.on(s.Events.FULLSCREEN_CHANGE,e),()=>{W.off(s.Events.FULLSCREEN_CHANGE,e)}}},[r,W]),(0,o.useEffect)(()=>{if(W&&(null==r?void 0:r.awemeType)===u.e.Note){let e=W.getPlugin("AutoPlaySettingPlugin")||W.getPlugin("SearchAutoPlaySettingPlugin");if(e)return e.playeNextWeightNum+=1,()=>{e.playeNextWeightNum-=1}}},[r,W]),(0,o.useEffect)(()=>{if(W&&(null==r?void 0:r.awemeType)===u.e.Note){let e=W.getPlugin("InnerAutoPlayPlugin");if(e)return e.config.innerAutoPlayWeight+=1,()=>{e.config.innerAutoPlayWeight-=1}}},[r,W]),(0,o.useEffect)(()=>{if(W)return q.current=0,W.registerPlugin(k.Z,{fragments:r.images.map(e=>({percent:1/r.images.length})),onInnerClick:ei}),W.getPlugin(h.Z.pluginName)&&W.unRegisterPlugin(h.Z.pluginName,!0),W.getPlugin(p.Z.pluginName)&&W.unRegisterPlugin(p.Z.pluginName,!0),()=>{W.getPlugin(k.Z.pluginName)&&W.unRegisterPlugin(k.Z.pluginName,!0),W.registerPlugin(h.Z,{}),W.registerPlugin(p.Z,{})}},[W,ei]),(0,o.useEffect)(()=>{if(a){let e=!1,t=()=>{e=!1,setTimeout(()=>ei(a.activeIndex))},i=()=>{Y(!1),et((a.activeIndex+1)/r.images.length),e||a.once("touchEnd",t),e=!0};try{a.on("touchMove",i)}catch(e){}return()=>{try{null==a||a.off("touchMove",i)}catch(e){}}}},[a,et,ei]),(0,o.useEffect)(()=>{if(i&&W){var e,t,n,o,d;if(O){G.current=Date.now()-3e3*q.current*r.images.length;let i=W.getPlugin("pictureProgress");0===q.current?null==i||null===(e=i.innerList)||void 0===e||e.reset():null==i||null===(n=i.innerList)||void 0===n||null===(t=n.progressList)||void 0===t||t.map((e,t)=>{s.Util.addClass(null==e?void 0:e.played,"transition")});let o=y()(()=>{W.cumulateTime>=5e3&&(X.current(),W.off(s.Events.TIME_UPDATE,o))},500,{leading:!0,trailing:!0}),d=()=>{var e,t,n,d,u,c;if(1===r.images.length&&(null==r?void 0:null===(e=r.imageAlbumMusicInfo)||void 0===e?void 0:e.endTime)/1e3-W.currentTime>.4);else if((Date.now()-G.current)/(3e3*r.images.length)>=1){W.off(s.Events.TIME_UPDATE,o),W.on(s.Events.TIME_UPDATE,o),et(1),q.current=0,G.current=Date.now(),null==i||null===(t=i.innerList)||void 0===t||t.reset();let e=W.getPlugin("AutoPlaySettingPlugin")||W.getPlugin("SearchAutoPlaySettingPlugin"),l=W.getPlugin("InnerAutoPlayPlugin");e&&(null==e?void 0:null===(n=e.config)||void 0===n?void 0:n.nextAutoPlay)&&(null==e?void 0:e.playeNextWeightNum)<=1&&m&&(null==e?void 0:e.stopFlag)===0?null==v||v():l&&(null===(d=x.Le.getConfig(x.gI.InnerAutoPlay))||void 0===d?void 0:d.modeIndex)===D.KM.Nomal&&l.config.innerAutoPlayWeight>=0&&m&&(null==l?void 0:l.stopFlag)===0?null==v||v({from:"auto"}):l&&(null===(u=x.Le.getConfig(x.gI.InnerAutoPlay))||void 0===u?void 0:u.modeIndex)===D.KM.Reverse&&l.config.innerAutoPlayWeight>=0&&_&&(null==l?void 0:l.stopFlag)===0&&(null==f||f({from:"auto"}))}else et((Date.now()-G.current)/(3e3*r.images.length));let g=Math.floor((Date.now()-G.current)/3e3);if((null==a?void 0:a.activeIndex)!==g){if(null==a?void 0:a.destroyed)return;A.sendLog("multiPhotoSlide",(0,l._)({enter_from:null==j?void 0:j.enter_from,enter_method:"auto",author_id:null==r?void 0:null===(c=r.authorInfo)||void 0===c?void 0:c.uid,group_id:null==r?void 0:r.awemeId,pic_cnt:r.images.length,is_zoom:(0,w.r)()},Q.current)),1!==r.images.length&&(null==a||a.slideTo(g,a.activeIndex===r.images.length-1?0:250)),K([(null==a?void 0:a.activeIndex)===0,(null==a?void 0:a.activeIndex)===(null==r?void 0:r.images.length)-1])}},u=()=>{G.current=Date.now()-3e3*q.current*r.images.length};return W.on(s.Events.TIME_UPDATE,d),W.on(s.Events.PLAY,u),()=>{W.off(s.Events.TIME_UPDATE,d),W.off(s.Events.PLAY,u),W.off(s.Events.TIME_UPDATE,o)}}{let e=W.getPlugin("pictureProgress");null==e||null===(d=e.innerList)||void 0===d||null===(o=d.progressList)||void 0===o||o.map((e,t)=>{s.Util.removeClass(null==e?void 0:e.played,"transition")});let t=()=>{Y(!0)};(null==W?void 0:W.paused)&&W.once(s.Events.PLAY,t);let i=()=>{W.once(s.Events.PLAY,t)},l=()=>{W.off(s.Events.PLAY,t)};return W.on(s.Events.PAUSE,i),W.on(s.Events.ENDED,l),()=>{var n,o;W.off(s.Events.PAUSE,i),W.off(s.Events.ENDED,l),W.off(s.Events.PLAY,t),null==e||null===(o=e.innerList)||void 0===o||null===(n=o.progressList)||void 0===n||n.map((e,t)=>{s.Util.addClass(null==e?void 0:e.played,"transition")})}}}q.current=0},[i,W,O,et,a,v,m,r]),(0,o.useEffect)(()=>{if(a){let e=()=>{if(a.activeIndex===(null==r?void 0:r.images.length)-1){var t,i,n,o,d,s,v,m;A.sendLog("videoPlayFinish",(0,l._)({urlParamList:["enter_method","trending_topic","previous_page"],enter_from:(0,I.mo)(),author_id:null==r?void 0:null===(t=r.authorInfo)||void 0===t?void 0:t.uid,group_id:null==r?void 0:r.awemeId,log_pb:null==r?void 0:r.logPb,compilation_id:null==r?void 0:null===(i=r.mixInfo)||void 0===i?void 0:i.mixId,playlet_id:null==r?void 0:null===(n=r.seriesInfo)||void 0===n?void 0:n.seriesId,tab_name:(0,T.zD)()||(0,b.Rs)("tab_name")||"",is_visible:String("visible"===document.visibilityState?1:0),is_author_card_expand:(null===(o=x.Le.getConfig("isCollapseAuthorCard"))||void 0===o?void 0:o.isCollapseAuthorCard)?0:1,from_follow_list:(null===(d=x.Le.getConfig("fromFollowList"))||void 0===d?void 0:d.tag)?"1":"0",is_mute:(null==W?void 0:W.muted)?"1":"0",is_force:(null===(s=x.Le.getConfig(x.gI.ForceMuted))||void 0===s?void 0:s.currentMuteType)==="browser"?"1":"0",trending_topic:"",aweme_type:(null==r?void 0:r.isSlides)?u.e.Slides:null==r?void 0:r.awemeType,pic_cnt:null==r?void 0:null===(v=r.images)||void 0===v?void 0:v.length,is_small_window:"0",column_type:(null==j?void 0:j.column_type)||(null==j?void 0:null===(m=j.search_params)||void 0===m?void 0:m.column_type),is_selected_label:(null==r?void 0:r.weeklyRecommend)?1:0},j,(0,C.Wc)()));try{a.off("slideChange",e)}catch(e){}null==c||c()}};try{a.slideTo(0,0),K([0===a.activeIndex,a.activeIndex===(null==r?void 0:r.images.length)-1]),a.on("slideChange",e)}catch(e){}return()=>{try{a.off("slideChange",e)}catch(e){}}}},[a,r]),(0,o.useEffect)(()=>{if(a){X.current=()=>{var e,t,i,n,o,a,d;A.sendLog("finishTuji",(0,l._)({urlParamList:["enter_method","trending_topic","previous_page"],enter_from:(0,I.mo)(),author_id:null==r?void 0:null===(e=r.authorInfo)||void 0===e?void 0:e.uid,group_id:null==r?void 0:r.awemeId,log_pb:null==r?void 0:r.logPb,compilation_id:null==r?void 0:null===(t=r.mixInfo)||void 0===t?void 0:t.mixId,playlet_id:null==r?void 0:null===(i=r.seriesInfo)||void 0===i?void 0:i.seriesId,tab_name:(0,T.zD)()||(0,b.Rs)("tab_name")||"",is_visible:String("visible"===document.visibilityState?1:0),is_author_card_expand:(null===(n=x.Le.getConfig("isCollapseAuthorCard"))||void 0===n?void 0:n.isCollapseAuthorCard)?0:1,from_follow_list:(null===(o=x.Le.getConfig("fromFollowList"))||void 0===o?void 0:o.tag)?"1":"0",is_mute:(null==W?void 0:W.muted)?"1":"0",is_force:(null===(a=x.Le.getConfig(x.gI.ForceMuted))||void 0===a?void 0:a.currentMuteType)==="browser"?"1":"0",trending_topic:"",aweme_type:null==r?void 0:r.awemeType,pic_cnt:null==r?void 0:null===(d=r.images)||void 0===d?void 0:d.length,is_small_window:"0"},j)),X.current=()=>{}};let e=()=>{a.activeIndex===(null==r?void 0:r.images.length)-1&&X.current&&!J.current&&X.current()};return a.on("slideChange",e),()=>{a.off("slideChange",e)}}},[a,r]),!V&&(null==r?void 0:null===(t=r.images)||void 0===t?void 0:t.length)>1?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:d()(g.default.leftArrow,g.default.arrow,{[g.default.disabled]:H[0],[g.default.inSideBar]:Z,[g.default.inSearch]:U,[g.default.hide]:ee,[z]:z}),style:{width:`${M}px`,height:`${M}px`},children:(0,n.jsx)(L.Z,{src:E.Z,width:M,height:M,viewBox:"0 0 56 56",onClick:el})}),(0,n.jsx)("div",{className:d()(g.default.rightArrow,g.default.arrow,{[g.default.disabled]:H[1],[g.default.inSideBar]:Z,[g.default.inSearch]:U,[g.default.hide]:ee,[F]:F}),style:{width:`${M}px`,height:`${M}px`},children:(0,n.jsx)(L.Z,{src:S.Z,width:M,height:M,viewBox:"0 0 56 56",onClick:en})})]}):null};var B=i("402748");i("591964");var Z=i("414061"),U=i("871314"),z=i("884635"),F=i("548986");let W={singleTime:2e3,speed:250},O=e=>{var t,i,r,a,c,v;let{isActive:m,awemeInfo:f,swiper:_,onPlayFinish:y,playNextFunc:k,ablePlayNext:N,playPrevFunc:P,ablePlayPrev:j,logParams:M,arrowButtonSize:V=56,isClientMiniWin:O,disableShortCut:$=!1,isShowSideBar:H=!1,inSearch:K,leftStyle:G,rightStyle:q}=e,Q=(0,R.n)(),[J,X]=(0,o.useState)(!0),[Y,ee]=(0,o.useState)([!0,!0]),et=(0,o.useRef)(M),ei=(0,o.useRef)(!0),el=(0,o.useRef)(null),en=e=>{X(e),ei.current=e},eo=(0,o.useRef)(null),er=(0,o.useRef)(null),ea=(null==f?void 0:null===(t=f.images)||void 0===t?void 0:t.length)===1&&(null==f?void 0:null===(r=f.images)||void 0===r?void 0:null===(i=r[0])||void 0===i?void 0:i.clipType)===5,ed=ea&&(null==f?void 0:null===(c=f.images)||void 0===c?void 0:null===(a=c[0])||void 0===a?void 0:a.livePhotoType)===1,es=(0,F.i)({player:Q}),eu=(0,o.useMemo)(()=>f.images.reduce((e,t)=>e+(t.video?t.video.duration:W.singleTime),0),[f]),ec=(0,o.useMemo)(()=>{if(f&&0===f.images.length)return[];let e=-1;return f.images.map(t=>{if(t.video){let i={type:"video",start:e+1,end:e+t.video.duration+.999,duration:t.video.duration,percent:1/f.images.length};return e=i.end,i}{let t={type:"image",start:e+1,end:e+W.singleTime,duration:W.singleTime,percent:1/f.images.length};return e=t.end,t}})},[f]);et.current=M;let ev=(0,o.useCallback)(e=>{var t;let i=null==Q?void 0:Q.getPlugin("pictureProgress");null==i||null===(t=i.updateIndex)||void 0===t||t.call(i,e,ei.current)},[Q]),em=(0,o.useCallback)(e=>{var t;let i=null==Q?void 0:Q.getPlugin("pictureProgress");null==i||null===(t=i.updateTime)||void 0===t||t.call(i,e)},[Q]),ef=(0,o.useCallback)(e=>{var t,i;A.sendLog("multiPhotoSlide",(0,B._)((0,l._)({enter_from:null===(t=et.current)||void 0===t?void 0:t.enter_from,author_id:null==f?void 0:null===(i=f.authorInfo)||void 0===i?void 0:i.uid,group_id:null==f?void 0:f.awemeId,pic_cnt:f.images.length,is_zoom:(0,w.r)()},et.current),{enter_method:"click_pic",aweme_type:(null==f?void 0:f.isSlides)?151:null==f?void 0:f.awemeType})),_.slideTo(e,0),en(!1),ev(e),ee([0===_.activeIndex,_.activeIndex===(null==f?void 0:f.images.length)-1])},[_,ev,f]),eg=(0,o.useCallback)(e=>{if(_.activeIndex>0){var t,i;A.sendLog("multiPhotoSlide",(0,B._)((0,l._)({enter_from:null===(t=et.current)||void 0===t?void 0:t.enter_from,author_id:null==f?void 0:null===(i=f.authorInfo)||void 0===i?void 0:i.uid,group_id:null==f?void 0:f.awemeId,pic_cnt:f.images.length,is_zoom:(0,w.r)()},et.current),{enter_method:(null==e?void 0:e.type)==="click"?"click_button":"keyboard",aweme_type:(null==f?void 0:f.isSlides)?151:null==f?void 0:f.awemeType})),en(!1),ev(_.activeIndex-1),_.slidePrev(),ee([0===_.activeIndex,_.activeIndex===(null==f?void 0:f.images.length)-1])}},[_,ev,f]),eh=(0,o.useCallback)(e=>{if(_.activeIndex<_.slides.length-1){var t;A.sendLog("multiPhotoSlide",(0,B._)((0,l._)({enter_from:null==M?void 0:M.enter_from,author_id:null==f?void 0:null===(t=f.authorInfo)||void 0===t?void 0:t.uid,group_id:null==f?void 0:f.awemeId,pic_cnt:f.images.length,is_zoom:(0,w.r)()},et.current),{enter_method:(null==e?void 0:e.type)==="click"?"click_button":"keyboard",aweme_type:(null==f?void 0:f.isSlides)?151:null==f?void 0:f.awemeType})),en(!1),ev(_.activeIndex+1),_.slideNext(),ee([0===_.activeIndex,_.activeIndex===(null==f?void 0:f.images.length)-1])}},[_,ev,f]);(0,z.X)({preClick:eg,nextClick:eh,disableShortCut:$}),(0,o.useEffect)(()=>{if(Q&&(null==f?void 0:f.awemeType)===u.e.Note){let e=e=>{if(e){var t;A.sendLog("enterGraphicDetail",{enter_from:null==M?void 0:M.enter_from,author_id:null==f?void 0:null===(t=f.authorInfo)||void 0===t?void 0:t.uid,group_id:null==f?void 0:f.awemeId,pic_cnt:f.images.length})}};return Q.on(s.Events.FULLSCREEN_CHANGE,e),()=>{Q.off(s.Events.FULLSCREEN_CHANGE,e)}}},[f,Q]),(0,o.useEffect)(()=>{if(Q&&(null==f?void 0:f.awemeType)===u.e.Note){let e=Q.getPlugin("AutoPlaySettingPlugin")||Q.getPlugin("SearchAutoPlaySettingPlugin");if(e)return e.playeNextWeightNum+=1,()=>{e.playeNextWeightNum-=1}}},[f,Q]),(0,o.useEffect)(()=>{if(Q&&(null==f?void 0:f.awemeType)===u.e.Note){let e=Q.getPlugin("InnerAutoPlayPlugin");if(e){let t=e.config.innerAutoPlayWeight;return e.config.innerAutoPlayWeight=t<0?t-1:0,()=>{let i=e.config.innerAutoPlayWeight;e.config.innerAutoPlayWeight=i<-1?t+1:0}}}},[f,Q]),(0,o.useEffect)(()=>{if(Q)return Q.registerPlugin(U.Z,{fragments:ec,duration:eu,hide:ea,onInnerClick:ef}),Q.getPlugin(h.Z.pluginName)&&Q.unRegisterPlugin(h.Z.pluginName,!0),Q.getPlugin(p.Z.pluginName)&&Q.unRegisterPlugin(p.Z.pluginName,!0),()=>{Q.getPlugin(U.Z.pluginName)&&Q.unRegisterPlugin(U.Z.pluginName,!0),Q.registerPlugin(h.Z,{}),Q.registerPlugin(p.Z,{})}},[Q,ef]),(0,o.useEffect)(()=>{if(_){let e=!1,t=()=>{e=!1,setTimeout(()=>ef(_.activeIndex))},i=()=>{en(!1),ev(_.activeIndex),e||_.once("touchEnd",t),e=!0};try{_.on("touchMove",i)}catch(e){}return()=>{try{null==_||_.off("touchMove",i)}catch(e){}}}},[_,ev,ef]);let ep=(0,o.useCallback)(()=>{var e,t,i;let l=Q.getPlugin("AutoPlaySettingPlugin")||Q.getPlugin("SearchAutoPlaySettingPlugin"),n=Q.getPlugin("InnerAutoPlayPlugin");l&&(null==l?void 0:null===(e=l.config)||void 0===e?void 0:e.nextAutoPlay)&&(null==l?void 0:l.playeNextWeightNum)<=1&&N&&(null==l?void 0:l.stopFlag)===0?null==k||k():n&&(null===(t=x.Le.getConfig(x.gI.InnerAutoPlay))||void 0===t?void 0:t.modeIndex)===D.KM.Nomal&&n.config.innerAutoPlayWeight>=0&&N&&(null==n?void 0:n.stopFlag)===0?null==k||k({from:"auto"}):n&&(null===(i=x.Le.getConfig(x.gI.InnerAutoPlay))||void 0===i?void 0:i.modeIndex)===D.KM.Reverse&&n.config.innerAutoPlayWeight>=0&&j&&(null==n?void 0:n.stopFlag)===0&&(null==P||P({from:"auto"}))},[Q,j,N,P,k]);return(0,o.useEffect)(()=>{if(m&&Q&&_&&J&&"video"!==ec[_.activeIndex].type){let e=1e3*Q.currentTime;e>100&&f.imageAlbumMusicInfo.beginTime>1e3&&(e-=f.imageAlbumMusicInfo.beginTime);let t=()=>{let t=((Q.currentTime+Q.duration)*1e3-e)%(1e3*Q.duration);if(f.imageAlbumMusicInfo.beginTime>1e3){let{beginTime:i,endTime:l}=f.imageAlbumMusicInfo,n=l-i;t=(1e3*Q.currentTime-i+n-e)%n}if(t>=W.singleTime){var i,n,o;if(_.activeIndex===f.images.length-1){ep(),ev(0),ee([!0,!1]),_.slideTo(0,0);let e=Q.getPlugin("pictureProgress");null==e||null===(n=e.innerList)||void 0===n||n.reset(),A.sendLog("multiPhotoSlide",(0,B._)((0,l._)({enter_from:null==M?void 0:M.enter_from,author_id:null==f?void 0:null===(o=f.authorInfo)||void 0===o?void 0:o.uid,group_id:null==f?void 0:f.awemeId,pic_cnt:f.images.length,is_zoom:(0,w.r)()},et.current),{enter_method:"auto",aweme_type:(null==f?void 0:f.isSlides)?151:null==f?void 0:f.awemeType})),Q.cumulateTime>=5e3&&el.current();return}ev(_.activeIndex+1),ee([!1,_.activeIndex+1===(null==f?void 0:f.images.length)-1]),_.slideTo(_.activeIndex+1,W.speed),A.sendLog("multiPhotoSlide",(0,B._)((0,l._)({enter_from:null==M?void 0:M.enter_from,author_id:null==f?void 0:null===(i=f.authorInfo)||void 0===i?void 0:i.uid,group_id:null==f?void 0:f.awemeId,pic_cnt:f.images.length,is_zoom:(0,w.r)()},et.current),{enter_method:"auto",aweme_type:(null==f?void 0:f.isSlides)?151:null==f?void 0:f.awemeType}));return}em(ec[_.activeIndex].start+t)};return Q.on(s.Events.TIME_UPDATE,t),()=>{Q.off(s.Events.TIME_UPDATE,t)}}},[null==_?void 0:_.activeIndex,Q,m,J,ec,ep]),(0,o.useEffect)(()=>{if(m&&Q&&_){let e=e=>{"switch_play_pause"===e.action&&e.paused&&en(!0)};return Q.on(s.Events.USER_ACTION,e),()=>{Q.off(s.Events.USER_ACTION,e)}}},[m,Q,_]),(0,o.useEffect)(()=>{if(Q){let e=!1,t=!1,i=()=>{e&&Z.emit(Z.EVENT.notevideo,{type:"replay",playerId:Q.playerId,index:_.activeIndex}),t&&ep()},l=()=>{eo.current&&(e=!0,clearTimeout(eo.current)),er.current&&(t=!0,clearTimeout(er.current))};return Q.on("play",i),Q.on("pause",l),()=>{Q.off("play",i),Q.off("pause",l)}}},[Q]),(0,o.useEffect)(()=>{if(m&&Q&&_){let e=Z.listen(Z.EVENT.notevideo,e=>{let{type:t,data:i,index:n,playerId:o}=e;if(Q.playerId===o){if("start"===t&&ea&&setTimeout(()=>{Z.emit(Z.EVENT.notevideo,{type:"onelive_start",playerId:Q.playerId,isMix:ed})},100),"timeupdate"===t&&_.activeIndex===n&&em(ec[_.activeIndex].start+i),"end"===t){if(ea&&(Z.emit(Z.EVENT.notevideo,{type:"onelive_end",playerId:Q.playerId,isMix:ed}),ed?eo.current=setTimeout(()=>{Z.emit(Z.EVENT.notevideo,{type:"replay",playerId:Q.playerId,index:_.activeIndex})},2500):setTimeout(()=>{Z.emit(Z.EVENT.notevideo,{type:"replay",playerId:Q.playerId,index:_.activeIndex})},300)),J){var r,a,d;if(_.activeIndex===f.images.length-1){ed?er.current=setTimeout(()=>{ep()},2500):ep(),ev(0),ee([!0,!1]),_.slideTo(0,0);let e=Q.getPlugin("pictureProgress");null==e||null===(a=e.innerList)||void 0===a||a.reset(),A.sendLog("multiPhotoSlide",(0,B._)((0,l._)({enter_from:null==M?void 0:M.enter_from,author_id:null==f?void 0:null===(d=f.authorInfo)||void 0===d?void 0:d.uid,group_id:null==f?void 0:f.awemeId,pic_cnt:f.images.length,is_zoom:(0,w.r)()},et.current),{enter_method:"auto",aweme_type:(null==f?void 0:f.isSlides)?151:null==f?void 0:f.awemeType})),Q.cumulateTime>=5e3&&el.current();return}ev(_.activeIndex+1),ee([!1,_.activeIndex+1===(null==f?void 0:f.images.length)-1]),_.slideTo(_.activeIndex+1,W.speed),A.sendLog("multiPhotoSlide",(0,B._)((0,l._)({enter_from:null==M?void 0:M.enter_from,author_id:null==f?void 0:null===(r=f.authorInfo)||void 0===r?void 0:r.uid,group_id:null==f?void 0:f.awemeId,pic_cnt:f.images.length,is_zoom:(0,w.r)()},et.current),{enter_method:"auto",aweme_type:(null==f?void 0:f.isSlides)?151:null==f?void 0:f.awemeType}))}else setTimeout(()=>{Z.emit(Z.EVENT.notevideo,{type:"replay",playerId:Q.playerId,index:_.activeIndex})},100)}}});return()=>{e(),clearTimeout(eo.current),clearTimeout(er.current)}}},[m,Q,_,J,ep]),(0,o.useEffect)(()=>{if(_){let e=()=>{if(_.activeIndex===(null==f?void 0:f.images.length)-1){var t,i,n,o,r,a,d,s;A.sendLog("videoPlayFinish",(0,l._)({urlParamList:["enter_method","trending_topic","previous_page"],enter_from:(0,I.mo)(),author_id:null==f?void 0:null===(t=f.authorInfo)||void 0===t?void 0:t.uid,group_id:null==f?void 0:f.awemeId,log_pb:null==f?void 0:f.logPb,compilation_id:null==f?void 0:null===(i=f.mixInfo)||void 0===i?void 0:i.mixId,playlet_id:null==f?void 0:null===(n=f.seriesInfo)||void 0===n?void 0:n.seriesId,tab_name:(0,T.zD)()||(0,b.Rs)("tab_name")||"",is_visible:String("visible"===document.visibilityState?1:0),is_author_card_expand:(null===(o=x.Le.getConfig(x.gI.IsCollapseAuthorCard))||void 0===o?void 0:o.isCollapseAuthorCard)?0:1,from_follow_list:(null===(r=x.Le.getConfig(x.gI.FromFollowList))||void 0===r?void 0:r.tag)?"1":"0",is_mute:(null==Q?void 0:Q.muted)?"1":"0",is_force:(null===(a=x.Le.getConfig(x.gI.ForceMuted))||void 0===a?void 0:a.currentMuteType)==="browser"?"1":"0",trending_topic:"",aweme_type:(null==f?void 0:f.isSlides)?u.e.Slides:null==f?void 0:f.awemeType,pic_cnt:null==f?void 0:null===(d=f.images)||void 0===d?void 0:d.length,is_small_window:"0",column_type:(null==M?void 0:M.column_type)||(null==M?void 0:null===(s=M.search_params)||void 0===s?void 0:s.column_type),is_selected_label:(null==f?void 0:f.weeklyRecommend)?1:0},M,(0,C.Wc)()));try{_.off("slideChange",e)}catch(e){}null==y||y()}};try{_.slideTo(0,0),ee([0===_.activeIndex,_.activeIndex===(null==f?void 0:f.images.length)-1]),_.on("slideChange",e)}catch(e){}return()=>{try{_.off("slideChange",e)}catch(e){}}}},[_,f]),(0,o.useEffect)(()=>{if(_){el.current=()=>{var e,t,i,n,o,r,a;A.sendLog("finishTuji",(0,l._)({urlParamList:["enter_method","trending_topic","previous_page"],enter_from:(0,I.mo)(),author_id:null==f?void 0:null===(e=f.authorInfo)||void 0===e?void 0:e.uid,group_id:null==f?void 0:f.awemeId,log_pb:null==f?void 0:f.logPb,compilation_id:null==f?void 0:null===(t=f.mixInfo)||void 0===t?void 0:t.mixId,playlet_id:null==f?void 0:null===(i=f.seriesInfo)||void 0===i?void 0:i.seriesId,tab_name:(0,T.zD)()||(0,b.Rs)("tab_name")||"",is_visible:String("visible"===document.visibilityState?1:0),is_author_card_expand:(null===(n=x.Le.getConfig(x.gI.IsCollapseAuthorCard))||void 0===n?void 0:n.isCollapseAuthorCard)?0:1,from_follow_list:(null===(o=x.Le.getConfig(x.gI.FromFollowList))||void 0===o?void 0:o.tag)?"1":"0",is_mute:(null==Q?void 0:Q.muted)?"1":"0",is_force:(null===(r=x.Le.getConfig(x.gI.ForceMuted))||void 0===r?void 0:r.currentMuteType)==="browser"?"1":"0",trending_topic:"",aweme_type:null==f?void 0:f.awemeType,pic_cnt:null==f?void 0:null===(a=f.images)||void 0===a?void 0:a.length,is_small_window:"0"},M)),el.current=()=>{}};let e=()=>{_.activeIndex===(null==f?void 0:f.images.length)-1&&el.current&&!ei.current&&el.current()};return _.on("slideChange",e),()=>{_.off("slideChange",e)}}},[_,f]),!O&&(null==f?void 0:null===(v=f.images)||void 0===v?void 0:v.length)>1?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:d()(g.default.leftArrow,g.default.arrow,{[g.default.disabled]:Y[0],[g.default.inSideBar]:H,[g.default.inSearch]:K,[g.default.hide]:es,[G]:G}),style:{width:`${V}px`,height:`${V}px`},children:(0,n.jsx)(L.Z,{src:E.Z,width:V,height:V,viewBox:"0 0 56 56",onClick:eg})}),(0,n.jsx)("div",{className:d()(g.default.rightArrow,g.default.arrow,{[g.default.disabled]:Y[1],[g.default.inSideBar]:H,[g.default.inSearch]:K,[g.default.hide]:es,[q]:q}),style:{width:`${V}px`,height:`${V}px`},children:(0,n.jsx)(L.Z,{src:S.Z,width:V,height:V,viewBox:"0 0 56 56",onClick:eh})})]}):null};var $=i("195691"),H=i("889429"),K=i.p+"media/generalBG.334abb494f88d534.png",G=i.p+"media/douyinDefault.ee9da4401be3dae0.png",q=i("64815");let Q=e=>{let{imageInfo:t,className:i,imgPlaceHolderClassName:l,isMini:r,inSearch:a,isOneLive:s,isOneLiveMix:u}=e,[c,v]=(0,o.useState)(!0),[f,g]=(0,o.useState)(!1),[h,p]=(0,o.useState)(null),[_,y]=(0,o.useState)(-1),[w,x]=(0,o.useState)(!1),I=(0,o.useRef)(0),b=(0,H.G6)(),C=(0,H.vU)();I.current=(null==t?void 0:t.width)/(null==t?void 0:t.height);let T=(0,o.useCallback)(()=>{h&&I.current&&(h.offsetWidth/I.current>h.offsetHeight-(r?0:33)?v(!0):v(!1))},[h,r]),E=(0,o.useCallback)(()=>{f||g(!0)},[f]);(0,o.useEffect)(()=>{if(h&&T){let e=m.Z.bind(h,T);return()=>{e&&e()}}},[h,T]),(0,o.useEffect)(()=>{h&&(r?h.setAttribute("normal",""):h.removeAttribute("normal"))},[h,r]),(0,o.useEffect)(()=>{let e=Z.listen(Z.EVENT.notevideo,e=>{"onelive_start"===e.type&&!0===e.isMix&&x(!0),"onelive_end"===e.type&&!0===e.isMix&&x(!1)});return()=>e()},[]);let S=(0,o.useMemo)(()=>{if(f)return null;if(-1!==_)return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{src:null==t?void 0:t.urlList[_],className:d()({[q.default.baseWidth]:!c,[q.default.baseHeight]:c,[q.default.isSafari]:b,[q.default.inSearch]:a},q.default.imgPlaceHolder,l),onError:E}),(0,n.jsxs)("div",{className:d()({[q.default.backgroundImg]:!b,[q.default.backgroundImgFirefox]:C,[q.default.backgroundImgSarari]:b}),children:[(0,n.jsx)("img",{src:b?K:(null==t?void 0:t.urlList[_])||K}),!b&&(0,n.jsx)("div",{className:q.default.backgroundMask})]})]});{let e=new Image;e.src=null==t?void 0:t.urlList[0];let i=setTimeout(()=>{null==t||t.urlList.map((e,t)=>{let i=new Image;i.src=e,i.onload=()=>y(t)})},2e3);return e.onload=()=>{y(0),clearTimeout(i)},(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{src:G,className:d()({[q.default.baseWidth]:!c,[q.default.baseHeight]:c,[q.default.isSafari]:b,[q.default.inSearch]:a},q.default.imgPlaceHolder,l)}),(0,n.jsxs)("div",{className:d()({[q.default.backgroundImg]:!b,[q.default.backgroundImgFirefox]:C,[q.default.backgroundImgSarari]:b}),children:[(0,n.jsx)("img",{src:b?K:G}),!b&&(0,n.jsx)("div",{className:q.default.backgroundMask})]})]})}},[f,_,E,c]);return(0,n.jsx)("div",{className:d()(i,q.default.imgBackground,q.default.playerShowInfo,{[q.default.isFirefox]:C,[q.default.livePhoto]:5===t.clipType,[q.default.withoutProgress]:s,[q.default.isOneLiveMix]:u,[q.default.isInLive]:w}),ref:p,children:S})};var J=i("310383"),X=i("593697"),Y=i("160843"),ee=i("435132");let et=e=>{var t,i,l,r,a;let{isActive:h,awemeInfo:p,playNextFunc:_,playPrevFunc:y,ablePlayPrev:w,ablePlayNext:x,logParams:I,isMini:b,isClientMiniWin:C,onPlayFinish:T,customProps:E,disableShortCut:S=!1,isShowSideBar:k=!1,inSearch:N}=e,P=(0,R.n)(),[L,j]=(0,o.useState)(null),[M,A]=(0,o.useState)(p),{arrowButtonSize:D=56,disableInactiveCursor:B=!1,leftStyle:Z,rightStyle:U}=E||{},z=(null==p?void 0:null===(t=p.images)||void 0===t?void 0:t.length)===1&&(null==p?void 0:null===(l=p.images)||void 0===l?void 0:null===(i=l[0])||void 0===i?void 0:i.clipType)===5,F=z&&(null==p?void 0:null===(a=p.images)||void 0===a?void 0:null===(r=a[0])||void 0===r?void 0:r.livePhotoType)===1,W=(0,o.useMemo)(()=>{var e;if((null==p?void 0:p.awemeType)!==u.e.Note)return[];if(h)return null==p?void 0:p.images;return(null==p?void 0:null===(e=p.images)||void 0===e?void 0:e.slice(0,1))||[]},[null==p?void 0:p.images,h,null==p?void 0:p.awemeType]),H=(0,o.useMemo)(()=>{var e,t;return!!(null==p?void 0:null===(t=p.images)||void 0===t?void 0:null===(e=t.find)||void 0===e?void 0:e.call(t,e=>e.video))},[null==p?void 0:p.images]);return((0,o.useEffect)(()=>()=>j(null),[]),(0,o.useEffect)(()=>{let e=null==P?void 0:P.innerContainer;if(e&&(null==p?void 0:p.awemeType)===u.e.Note)return s.Util.addClass(e,"hideXgVideo"),()=>{s.Util.removeClass(e,"hideXgVideo")}},[P,p]),(0,o.useEffect)(()=>{let{beginTime:e=0,endTime:t=Number.MAX_SAFE_INTEGER}=(null==p?void 0:p.imageAlbumMusicInfo)||{},i=()=>{(P.currentTime>=t/1e3||P.currentTime=0&&t>e&&(null==P||P.on(s.Events.TIME_UPDATE,i)),()=>{null==P||P.off(s.Events.TIME_UPDATE,i)}},[P,p]),(0,o.useEffect)(()=>{if(h&&L&&P){var e;L.update();let t=m.Z.bind(null==L?void 0:null===(e=L.$el)||void 0===e?void 0:e[0],()=>{L.update()});return()=>{t&&t()}}},[L,h,P]),(0,o.useEffect)(()=>{A(p)},[p]),(0,c.o)(()=>{var e,t;if(h&&P&&(null==p?void 0:null===(e=p.imageAlbumMusicInfo)||void 0===e?void 0:e.volume)===0)return P.config.volume_raw=P.volume,P.volume=.01,()=>{P.volume=P.config.volume_raw,(0,f.qQ)(v.LocalStorageKeys.PLAYER_VOLUME,P.config.volume_raw),(0,ee.c)({volume:P.config.volume_raw})};!h&&P&&(null==p?void 0:null===(t=p.imageAlbumMusicInfo)||void 0===t?void 0:t.volume)===0&&P.config.volume_raw&&((0,f.qQ)(v.LocalStorageKeys.PLAYER_VOLUME,P.config.volume_raw),(0,ee.c)({volume:P.config.volume_raw}))},[h,P]),(null==p?void 0:p.awemeType)!==u.e.Note)?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X.t,{direction:0,onSwiper:j,className:d()(g.default.swiperContainer,"focusPanel"),tabIndex:-1,data:W,slideKey:(e,t)=>`${null==e?void 0:e.uri}_${t}`,speed:250,children:(0,n.jsx)(Y.o,{className:g.default.pictureFeed,children:e=>{let{slideData:t,activeIndex:i,currentIndex:l}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{style:{width:"100%",height:"100%",zIndex:2,background:"transparent"},className:d()(g.default.mask,{[g.default.inactive]:i!==l&&B}),type:"button",onKeyDown:e=>null==e?void 0:e.preventDefault()}),(0,n.jsx)(Q,{imageInfo:t,isMini:b,className:g.default.itemImage,inSearch:N,isOneLive:z,isOneLiveMix:F}),h&&t.video&&(0,n.jsx)($.v,{albumMusic:p.imageAlbumMusicInfo,info:t,isMini:b,activeIndex:i,currentIndex:l,inSearch:N,isOneLive:z})]})}})}),M===p&&h&&!H&&(0,n.jsx)(V,{isActive:h,awemeInfo:p,swiper:L,onPlayFinish:T,playNextFunc:_,playPrevFunc:y,ablePlayNext:x,ablePlayPrev:w,logParams:I,arrowButtonSize:D,isClientMiniWin:C,disableShortCut:S,isShowSideBar:k,inSearch:N,leftStyle:Z,rightStyle:U}),M===p&&h&&H&&(0,n.jsx)(O,{isActive:h,awemeInfo:p,swiper:L,onPlayFinish:T,playNextFunc:_,playPrevFunc:y,ablePlayNext:x,ablePlayPrev:w,logParams:I,arrowButtonSize:D,isClientMiniWin:C,disableShortCut:S,isShowSideBar:k,inSearch:N,leftStyle:Z,rightStyle:U})]})},ei=e=>{let t=(0,J.N)();return(0,n.jsx)(r.k,{componentName:"PictureMode",Slardar:t,children:(0,n.jsx)(et,(0,l._)({},e))})}},361324:function(e,t,i){i.d(t,{Z:function(){return p},H:function(){return h}});var l=i("320165");i("101199");var n=i("469935"),o=i.n(n),r=i("966473"),a=i("759894"),d=i("414061"),s=i("562963"),u=i("513894"),c=i("2196"),v=i("624508"),m=new v.h({videoRiskRemindBarShow:{eventName:"video_risk_remind_bar_show",params:{enter_from:"",warn_type:"",is_skip:!1,group_id:"",author_id:""}},videoRiskRemindBarClick:{eventName:"video_risk_remind_bar_click",params:{enter_from:"",warn_type:"",is_skip:!1,group_id:"",author_id:""}}}),f=i("234150"),g=i("316213");let h=(e,t)=>!!((null==e?void 0:e.content)&&!(null==e?void 0:e.url));var p=e=>{let{risk:t,awemeInfo:i,isDetail:n,className:v}=e,{content:h,type:p,icon_url:_,url:y}=t,w=(0,r.Y)((()=>{var e;m.sendLog("videoRiskRemindBarShow",{enter_from:(0,a.vM)(),warn_type:String(p),is_skip:!!y,group_id:null==i?void 0:i.awemeId,author_id:null==i?void 0:null===(e=i.authorInfo)||void 0===e?void 0:e.uid})}).bind(null));return(0,l.jsx)("div",{ref:w,className:v,children:(0,l.jsxs)(f.a,{href:decodeURIComponent(y),target:"_blank",onClick:e=>{if(y){var t;d.emit(d.EVENT.videoPause,"SafetyWarningBar_onClick"),m.sendLog("videoRiskRemindBarClick",{enter_from:(0,a.vM)(),warn_type:String(p),is_skip:!!y,group_id:null==i?void 0:i.awemeId,author_id:null==i?void 0:null===(t=i.authorInfo)||void 0===t?void 0:t.uid})}else null==e||e.preventDefault()},className:o()("safetyBar",c.default.bar,{[c.default.barDetail]:n,[c.default.hasUrl]:!!y}),children:[_?(0,l.jsx)("img",{src:_,className:c.default.iconImage}):(0,l.jsx)(g.z,{svg:(0,l.jsx)(s.Z,{}),className:c.default.icon}),(0,l.jsx)("div",{className:c.default.content,children:h}),y&&(0,l.jsx)(g.z,{svg:(0,l.jsx)(u.Z,{style:{fontSize:"14px"}}),className:c.default.rightIcon})]})})}},438247:function(e,t,i){i.d(t,{T:function(){return _}});var l=i("629686"),n=i("101199"),o=i("72430"),r=i("855357"),a=i("601034"),d=i("690343"),s=i("880327"),u=i("499059"),c=i("474221"),v=i("414061"),m=i("46892"),f=i("326367"),g=i("759894"),h=i("624508"),p=new h.h({clickTitleAt:{eventName:"click_title_at",params:{to_user_id:"",author_id:"",group_id:"",log_pb:"",enter_from:"",previous_page:"",is_full_screen:"0"}},clickVideoTitle:{eventName:"click_video_title",params:{action:"expand",author_id:"",group_id:"",enter_from:"",log_pb:"",previous_page:"",is_full_screen:"0",player_display_mode:"",play_current_time:0}},clickTitleHashtag:{eventName:"click_title_hashtag",params:{hashtag:"",author_id:"",group_id:"",log_pb:"",enter_from:"",previous_page:"",is_full_screen:"0",tag_id:"",status:"",player_display_mode:""}},xiguaAnchorShow:{eventName:"xigua_anchor_show",params:{author_id:"",group_id:""}},xiguaAnchorClick:{eventName:"xigua_anchor_click",params:{author_id:"",group_id:""}},clickAuthorHead:{eventName:"click_author_head",params:{author_id:"",group_id:"",enter_from:"",previous_page:"",is_full_screen:"0",log_pb:"",from_follow_list:"0",from_xigua:0,click_from:"",clarity:"",aweme_type:"",is_auto:1}},trendingShow:{eventName:"trending_show",params:{words_source:"related_search_anchor_v2",enter_from:"",words_num:0,enter_group_id:"",impr_id:""}},trendingWordsClick:{eventName:"trending_words_click",params:{words_source:"title_named_entity",enter_group_id:"",enter_group_type:"",group_id:"",search_position:"",words_content:"",words_position:0,impr_id:""}},trendingWordsShow:{eventName:"trending_words_show",params:{words_source:"title_named_entity",enter_group_id:"",enter_group_type:"",group_id:"",search_position:"",words_content:"",words_position:0,impr_id:""}},videoInfoAreaShow:{eventName:"video_info_area_show",params:{enter_from:"",player_display_mode:"",group_id:"",author_id:"",is_fold:"0"}},videoInfoAreaClick:{eventName:"video_info_area_click",params:{enter_from:"",player_display_mode:"",group_id:"",author_id:""}}});function _(e){let{awemeInfo:t,videoTags:i,onClickUserName:h,authorId:_,awemeType:y,logPb:w,awemeId:x,player:I}=e;(0,n.useEffect)(()=>{let e=i.filter(e=>e.type===o.WZ.RelatedSearch);e.length&&p.sendLog("trendingShow",{words_source:"related_search_anchor_v2",enter_from:(0,a.yW)(),words_num:e.length,enter_group_id:t.awemeId,impr_id:(0,d.U)(t).impr_id})},[i]);let b=(0,n.useCallback)(()=>{var e;p.sendLog("clickAuthorHead",(0,l._)({click_from:"title",urlParamList:["previous_page"],author_id:_,group_id:x,log_pb:w,enter_from:(0,a.yW)(),is_full_screen:(0,s.r)()?"1":"0",from_follow_list:(null===(e=u.Le.getConfig(u.gI.FromFollowList))||void 0===e?void 0:e.tag)?"1":"0",from_xigua:y===r.e.XgVideo?1:0,aweme_type:y},(0,c.t)())),v.emit(v.EVENT.videoPause,"useLog_clickAuthorHeadLog"),window.open((0,m.GN)(_),(0,f.f)()?"_self":"_blank")},[_,y,w,x]),C=(0,n.useCallback)(()=>p.sendLog("xiguaAnchorClick",{author_id:_,group_id:x}),[_,x]),T=(0,n.useCallback)(()=>p.sendLog("xiguaAnchorShow",{author_id:_,group_id:x}),[_,x]),E=(0,n.useCallback)((e,t,i)=>{p.sendLog("clickTitleHashtag",{hashtag:t.slice(1),urlParamList:["previous_page"],author_id:_,group_id:x,log_pb:w,enter_from:(0,a.yW)(),is_full_screen:(0,s.r)()?"1":"0",tag_id:e,status:"on",player_display_mode:(0,g.Ok)()})},[_,x,w]),S=(0,n.useCallback)(e=>{p.sendLog("clickTitleAt",{to_user_id:e,urlParamList:["previous_page"],author_id:_,group_id:x,log_pb:w,enter_from:(0,a.yW)(),is_full_screen:(0,s.r)()?"1":"0"})},[x,_,w]),k=(0,n.useCallback)(e=>{p.sendLog("clickVideoTitle",{action:e?"fold":"expand",urlParamList:["previous_page"],author_id:_,group_id:x,log_pb:w,enter_from:(0,a.yW)(),is_full_screen:(0,s.r)()?"1":"0",player_display_mode:(0,g.Ok)(),play_current_time:Math.floor((null==I?void 0:I.currentTime)||0)})},[x,_,w,I]),N=(0,n.useCallback)((e,i,l)=>{p.sendLog("trendingWordsClick",{enter_group_id:x,enter_group_type:y===r.e.Note?"aweme_image":"aweme_video",group_id:i,search_position:(0,a.yW)(),words_content:e,words_position:l,impr_id:(0,d.U)(t).impr_id})},[x,y,t]),P=(0,n.useCallback)((e,i,l)=>{p.sendLog("trendingWordsShow",{enter_group_id:x,enter_group_type:y===r.e.Note?"aweme_image":"aweme_video",group_id:i,search_position:(0,a.yW)(),words_content:e,words_position:l,impr_id:(0,d.U)(t).impr_id})},[x,y,t]),L=(0,n.useCallback)(()=>{p.sendLog("videoInfoAreaShow",{enter_from:(0,a.yW)(),group_id:x,player_display_mode:(0,g.Ok)(),author_id:_})},[x,_]);return{clickAuthorHeadLog:b,xiguaAnchorClickLog:C,xiguaAnchorShowLog:T,clickTitleHashtagLog:E,clickTitleAtLog:S,clickVideoTitleLog:k,titleNamedEntityWordsClickLog:N,titleNamedEntityWordsShowLog:P,videoInfoAreaShowLog:L,videoInfoAreaClickLog:(0,n.useCallback)(()=>{p.sendLog("videoInfoAreaClick",{enter_from:(0,a.yW)(),group_id:x,player_display_mode:(0,g.Ok)(),author_id:_})},[x,_])}}},991530:function(e,t,i){i.r(t),i.d(t,{VideoInfo:function(){return eF},VideoInfoNew:function(){return eW}});var l=i("629686");i("490629"),i("706056"),i("374954");var n=i("320165"),o=i("101199"),r=i("469935"),a=i.n(r),d=i("72430"),s=i("624860"),u=i("205030"),c=i("966473"),v=i("638052"),m=i("426112"),f=i("762167"),g=i("855357"),h=i("206698"),p=i("356336"),_=i("593124"),y=i("499059"),w=i("759894"),x=i("386206"),I=i("414061"),b=i("947383"),C=i("618759"),T=i("880327"),E=i("46892"),S=i("915821"),k=i("889429"),N=i("133060"),P=i("195446"),L=i("794676"),j=i("438247"),M=i("734123");let A=e=>{let{player:t,abTestData:i,isActive:l}=e,[n,r]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(t&&(null==i?void 0:i.controlAdapt)){let e=e=>{var i,l;let n=(null==e?void 0:e.vWidth)||(null==t?void 0:null===(l=t.video)||void 0===l?void 0:null===(i=l.getBoundingClientRect())||void 0===i?void 0:i.width)||0;y.Le.setConfig(y.gI.videoRect,{width:n}),n<=380?r(!0):r(!1)};return t.on(M.Events.VIDEO_RESIZE,e),()=>{t.off(M.Events.VIDEO_RESIZE,e)}}},[t,i]),(0,o.useEffect)(()=>{if(t&&(null==i?void 0:i.controlAdapt)){var e;let t=null===(e=y.Le.getConfig(y.gI.videoRect))||void 0===e?void 0:e.width;if(!!t)t<=380?r(!0):r(!1)}},[t,i,l]),{hideDesc:n}},R=e=>{let{abTestData:t}=e,[i,l]=(0,o.useState)(!1),n=(0,o.useMemo)(()=>({"no-video-info-mask":i}),[i]);return{maskWrapperClass:n,onAlphaChange:(0,o.useCallback)(e=>{let{no_mask_threshold:i}=(null==t?void 0:t.videoInfoMask)||{};"number"==typeof i&&l(e<=i)},[t])}};var D=i("995898"),V=i("273372");let B=e=>{let{abTestData:t,parentDom:i,isDetail:l,scene:n,awemeInfo:r}=e,[a,s]=(0,o.useState)(n===d.lT.Search?118:124),[u,c]=(0,o.useState)({}),v=()=>{if(l||(0,D.yk)(location.pathname)||n===d.lT.CreatorCenter||!i)return;let e=null==i?void 0:i.clientWidth,t=e-a,o=.36*e;t>=320&&t>=o?o>=320?c({width:"100%",maxWidth:o}):c({width:"100%",maxWidth:320,minWidth:320}):c({width:"100%"})};return(0,o.useEffect)(()=>{if(!l&&!(0,D.yk)(location.pathname)&&i){let e=()=>{v()},t=V.Z.bind(i,e);return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),t()}}},[i,t,l]),(0,o.useEffect)(()=>{v()},[a]),(0,o.useEffect)(()=>{let e=I.listen(I.EVENT.InteractionWidthChange,e=>{let{width:t=62,awemeId:i}=e||{};i===(null==r?void 0:r.awemeId)&&s(t+40)});return()=>{null==e||e()}},[r]),{childStyle:u,updateChildStyle:v,offset:a}};var Z=i("687019"),U=i("81683"),z=i("404628"),F=i("24894"),W=i("396868"),O=i("176449"),$=i("36973"),H=i("616560"),K=i("764658"),G=i("264417"),q=i("63601");i("985085");var Q=i("368730"),J=i("400601"),X=i("794008"),Y=i("133776"),ee=i("361324"),et=i("899429"),ei=i("402748");let el=(0,o.forwardRef)((e,t)=>(0,n.jsxs)("svg",(0,ei._)((0,l._)({width:30,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,n.jsx)("rect",{width:30,height:16,rx:2,fill:"#fff",fillOpacity:".08"}),(0,n.jsx)("path",{d:"M9.492 2.004L8.22 2.22c.216.336.408.72.588 1.128h-4.38v3.636c-.024 2.34-.348 4.176-.972 5.496l.96.852c.744-1.596 1.128-3.708 1.164-6.348V4.452h8.796V3.348h-4.308a16.717 16.717 0 0 0-.576-1.344zm15.564 6.672h-8.04v4.548h1.152v-.576h5.736v.576h1.152V8.676zm-6.888 2.904V9.756h5.736v1.824h-5.736zm-.276-6.732h2.688v1.656h-5.04V7.62h10.92V6.504h-4.74V4.848h3.828V3.756H21.72V2.148h-1.14v1.608h-2.016c.204-.408.372-.852.516-1.32l-1.128-.144c-.384 1.248-1.104 2.292-2.16 3.144l.684.9a8.301 8.301 0 0 0 1.416-1.488z",fill:"#fff",fillOpacity:".5"})]})));var en=i("45390"),eo=i("332009"),er=i("31717"),ea=i("958747"),ed=i("557839"),es=i("967139"),eu=i("795653");function ec(e){var t;let{awemeInfo:i,isInfoFold:l,isInnerFeed:r,isActive:d,player:s,config:u,onAlphaChange:c}=e,[v,m]=(0,o.useState)(.4),f=(0,o.useCallback)(()=>{let e=function(e,t){let i=function(e){var t,i,l,n,o;let r=null===(i=e.video)||void 0===i?void 0:null===(t=i.meta)||void 0===t?void 0:t.title_info;if("string"==typeof r){let e=null===(o=JSON.parse(r))||void 0===o?void 0:o.avg_br_pc;if(e>0)return e}return null===(n=e.video)||void 0===n?void 0:null===(l=n.meta)||void 0===l?void 0:l.brightness_mean}(e);if(void 0===i)return .4;let{target_contrast:l,max_alpha:n=.4}=t,o=Number(i)/255;return Math.min(Math.max(0,(l*(o+.05)-1.05)/(l*o)),n)}(i,u);m(e),null==c||c(e)},[]);(0,ed.O)(d,()=>{if(!d)return;if("number"!=typeof u.use_blocked_detect){f();return}let e=function(e){let t=e.pcBlockedAreaRatio||[],i=t.indexOf(6686);if(-1!==i)return t[i+1]}(i);if("number"!=typeof e){f();return}if((null==s?void 0:s.video)instanceof HTMLVideoElement){let t;let{width:i,height:l}=s.video.getBoundingClientRect(),{videoWidth:n,videoHeight:o}=s.video,r=n/o;t=r>i/l?i:l*r;let a=(i-t)/2+t*e/100,d=.36*i;!((d-a)/d>u.use_blocked_detect)&&f()}});let g={};if(l&&.4!==v){if(0===v)return null;g.background=`linear-gradient(360deg,rgba(0,0,0,${v}) 0%,transparent 100%)`}return(0,n.jsx)("div",{style:g,className:a()("video-info-mask",{"windows-client-flag":(null===(t=(0,eu.fV)())||void 0===t?void 0:t.os)==="Windows"&&(0,C.DT)(),"splash-brand":(0,es.p)(i)&&!r,"expanded-video-info-mask":!l})})}var ev=o.memo(function(e){var t;let{awemeInfo:i,isInfoFold:o,isInnerFeed:r,abTestData:d}=e,s=(null==d?void 0:d.videoInfoMask)||{},{target_contrast:u}=s;return"number"==typeof u?(0,n.jsx)(ec,(0,ei._)((0,l._)({},e),{config:s})):(0,n.jsx)("div",{className:a()("video-info-mask",{"windows-client-flag":(null===(t=(0,eu.fV)())||void 0===t?void 0:t.os)==="Windows"&&(0,C.DT)(),"splash-brand":(0,es.p)(i)&&!r,"expanded-video-info-mask":!o})})}),em=i("672693"),ef=i("678532"),eg=i("732979"),eh=i.n(eg),ep=i("273460"),e_=i.n(ep);eh().extend(e_());var ey=i("590555");let ew=e=>{let{awemeInfo:t,isActive:i,player:l,abTestData:n}=e,[r,a]=(0,o.useState)(),[d,s]=(0,o.useState)([]),u=(0,o.useRef)(1e3*((null==l?void 0:l.currentTime)||0)),c=(0,ey.d)((null==r?void 0:r.knowledge)||""),v=(0,o.useMemo)(()=>{var e;return!(0,k.km)(80)&&(0,ef.b2)(t)&&!(0,m.Jt)(t)&&(null==t?void 0:null===(e=t.douyinPcVideoExtra)||void 0===e?void 0:e.aiSearchMention)===1},[t]),f=(0,o.useCallback)(()=>(function(e){let t=eh().utc(e),i=t.hour(),l=t.minute();return i>0?t.format("hh:mm:ss"):l>0?t.format("mm:ss"):`00:${t.format("ss")}`})(u.current),[]),g=(0,o.useMemo)(()=>v&&!!r,[v,r]),h=(0,o.useCallback)(async()=>{let e=await (0,em.hs)({awemeId:null==t?void 0:t.awemeId});(null==e?void 0:e.statusCode)===0&&s((null==e?void 0:e.knowledgeList)||[])},[null==t?void 0:t.awemeId]);return(0,o.useEffect)(()=>{if(v&&l&&(null==d?void 0:d.length)>0){var e;u.current=1e3*(l.currentTime||0);let t=e=>{var t,i;let l=(null!==(i=e.currentTime)&&void 0!==i?i:0)*1e3;u.current=l;let n=null==d?void 0:null===(t=d.find)||void 0===t?void 0:t.call(d,e=>l>=e.startTime&&l<=e.endTime);(null==n?void 0:n.knowledge)!==c.current&&a(n)};return null==l||null===(e=l.on)||void 0===e||e.call(l,"timeupdate",t),()=>{var e;null==l||null===(e=l.off)||void 0===e||e.call(l,"timeupdate",t)}}},[v,l,d]),(0,o.useEffect)(()=>{i&&v&&(null==t?void 0:t.awemeId)&&h()},[i,v,null==t?void 0:t.awemeId,h]),{hasMentionEntry:v,mentionTagVisible:g,currentMention:r,fetchAiMentionData:h,getCurrentMentionTime:f}};var ex=i("254457"),eI=i("601034"),eb=i("87897"),eC=i("781061");let eT=(0,o.forwardRef)((e,t)=>(0,n.jsx)("svg",(0,ei._)((0,l._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,n.jsx)("path",{d:"M4.973 3.224A3.04 3.04 0 0 1 8.137.374L8.22.38c.85.062 1.595.469 2.101 1.072.456.54.719 1.24.691 1.992l-.003.074c-.01.19-.041.375-.087.554l-.078.3 1.315-.338.075-.019c1.593-.367 3.229.548 3.657 2.1l.034.123c.178.772.03 1.548-.358 2.184l-.04.065a3.01 3.01 0 0 1-1.715 1.264l-.072.02a2.99 2.99 0 0 1-.563.09l-.313.02.734 1.128.042.065c.832 1.354.48 3.13-.835 4.027l-.064.043a3.05 3.05 0 0 1-2.336.409l-.074-.018a3.006 3.006 0 0 1-1.753-1.214l-.04-.06-.039-.061a3.011 3.011 0 0 1-.222-.44l-.115-.284-.862 1.032c-1.044 1.25-2.909 1.492-4.203.524l-.062-.047a2.95 2.95 0 0 1-1.115-2.059l-.007-.075a2.932 2.932 0 0 1 1.083-2.468l.24-.199-1.267-.487C.414 9.097-.396 7.383.192 5.856a2.994 2.994 0 0 1 1.716-1.71 3.062 3.062 0 0 1 2.723.25l.262.163.081-1.336v.001zm3.116-1.5a1.642 1.642 0 0 0-1.736 1.464v.006l-.316 5.1a.031.031 0 0 1-.035.027l-.008-.002-.111-.043-1.439-.556c.113-.19.191-.41.212-.66l.004-.062a1.634 1.634 0 0 0-.845-1.51l-.056-.028-.07-.033a1.66 1.66 0 0 0-1.01-.103l-.07.016a1.634 1.634 0 0 0-1.125.977c-.326.816.07 1.734.876 2.08l.006.002 4.83 1.872c.022.008.026.033.014.046l-.075.09-.982 1.178a1.56 1.56 0 0 0-.529-.384l-.045-.02-.059-.022a1.688 1.688 0 0 0-1.716.324l-.046.043a1.61 1.61 0 0 0 .126 2.398c.687.555 1.692.47 2.277-.179l.002-.002.002-.002 3.3-3.944a.035.035 0 0 1 .028-.01.03.03 0 0 1 .02.007l.005.007.063.098.832 1.281a1.57 1.57 0 0 0-.532.376l-.033.036a1.621 1.621 0 0 0-.23 1.813 1.663 1.663 0 0 0 2.352.624 1.61 1.61 0 0 0 .532-2.19v-.002l-.003-.003-2.79-4.31-.003-.005a.029.029 0 0 1 .021-.037l.116-.03 1.496-.385c.022.22.092.442.224.658a1.672 1.672 0 0 0 1.678.775l.077-.014c.38-.08.699-.282.926-.553l.198-.3c.17-.326.23-.71.14-1.095l-.012-.05c-.223-.848-1.09-1.361-1.95-1.173h-.006L7.588 6.597c-.01.003-.02 0-.028-.006a.03.03 0 0 1-.011-.025l.009-.138.09-1.497c.22.047.457.053.706-.005.651-.152 1.165-.674 1.268-1.333.059-.384-.022-.75-.203-1.056l-.037-.06a1.645 1.645 0 0 0-1.242-.749l-.05-.004z",fill:"#fff"})}))),eE=e=>{(0,eb._)();let{className:t,mentionItem:i,textClassName:l,onClick:o,onMouseEnter:r,awemeInfo:d,hideDesc:s}=e,u=(0,c.x)(()=>{v.logInstance.sendLog("aiChatButtonShow",{enter_from:(0,eI.yW)(),ai_chat_button_position:"bottom_bar_mention",group_id:null==d?void 0:d.awemeId,text:null==i?void 0:i.knowledge})}),m=(e,t)=>{v.logInstance.sendLog("aiChatButtonClick",{enter_from:(0,eI.yW)(),ai_chat_button_position:"bottom_bar_mention",group_id:null==d?void 0:d.awemeId,text:null==t?void 0:t.knowledge}),null==o||o(e,t)};return(0,n.jsxs)("div",{ref:u,className:a()(eC.default.aiMentionTag,t),onMouseEnter:e=>null==r?void 0:r(e,{from:P.jE.BottomBarMention}),onClick:e=>null==m?void 0:m(e,i),children:[(0,n.jsx)("span",{className:a()(eC.default.tagBg,eC.default.npsCover)}),(0,n.jsx)(O.Z,{className:a()(eC.default.aiIcon,eC.default.npsStyle),src:eT,width:16,height:16,viewBox:"0 0 16 16"}),s?(0,n.jsx)("span",{className:a()(eC.default.knowledge,l),children:"当前提及"}):(0,n.jsx)("span",{className:a()(eC.default.knowledge,l),children:null==i?void 0:i.knowledge}),(0,n.jsx)(O.Z,{src:ex.Z,className:eC.default.aiArrowSvg,width:12,height:12,viewBox:"0 0 12 12"})]})};var eS=i("436227");let ek=(0,o.forwardRef)((e,t)=>(0,n.jsx)("svg",(0,ei._)((0,l._)({width:16,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,n.jsx)("path",{d:"M4.973 3.224A3.04 3.04 0 0 1 8.137.374L8.22.38c.85.062 1.595.469 2.101 1.072.456.54.719 1.24.691 1.992l-.003.074c-.01.19-.041.375-.087.554l-.078.3 1.315-.338.075-.019c1.593-.367 3.229.548 3.657 2.1l.034.123c.178.772.03 1.548-.358 2.184l-.04.065a3.01 3.01 0 0 1-1.715 1.264l-.072.02a2.99 2.99 0 0 1-.563.09l-.313.02.734 1.128.042.065c.832 1.354.48 3.13-.835 4.027l-.064.043a3.05 3.05 0 0 1-2.336.409l-.074-.018a3.006 3.006 0 0 1-1.753-1.214l-.04-.06-.039-.061a3.011 3.011 0 0 1-.222-.44l-.115-.284-.862 1.032c-1.044 1.25-2.909 1.492-4.203.524l-.062-.047a2.95 2.95 0 0 1-1.115-2.059l-.007-.075a2.932 2.932 0 0 1 1.083-2.468l.24-.199-1.267-.487C.414 9.097-.396 7.383.192 5.856a2.994 2.994 0 0 1 1.716-1.71 3.062 3.062 0 0 1 2.723.25l.262.163.081-1.336v.001zm3.116-1.5a1.642 1.642 0 0 0-1.736 1.464v.006l-.316 5.1a.031.031 0 0 1-.035.027l-.008-.002-.111-.043-1.439-.556c.113-.19.191-.41.212-.66l.004-.062a1.634 1.634 0 0 0-.845-1.51l-.056-.028-.07-.033a1.66 1.66 0 0 0-1.01-.103l-.07.016a1.634 1.634 0 0 0-1.125.977c-.326.816.07 1.734.876 2.08l.006.002 4.83 1.872c.022.008.026.033.014.046l-.075.09-.982 1.178a1.56 1.56 0 0 0-.529-.384l-.045-.02-.059-.022a1.688 1.688 0 0 0-1.716.324l-.046.043a1.61 1.61 0 0 0 .126 2.398c.687.555 1.692.47 2.277-.179l.002-.002.002-.002 3.3-3.944a.035.035 0 0 1 .028-.01.03.03 0 0 1 .02.007l.005.007.063.098.832 1.281a1.57 1.57 0 0 0-.532.376l-.033.036a1.621 1.621 0 0 0-.23 1.813 1.663 1.663 0 0 0 2.352.624 1.61 1.61 0 0 0 .532-2.19v-.002l-.003-.003-2.79-4.31-.003-.005a.029.029 0 0 1 .021-.037l.116-.03 1.496-.385c.022.22.092.442.224.658a1.672 1.672 0 0 0 1.678.775l.077-.014c.38-.08.699-.282.926-.553l.198-.3c.17-.326.23-.71.14-1.095l-.012-.05c-.223-.848-1.09-1.361-1.95-1.173h-.006L7.588 6.597c-.01.003-.02 0-.028-.006a.03.03 0 0 1-.011-.025l.009-.138.09-1.497c.22.047.457.053.706-.005.651-.152 1.165-.674 1.268-1.333.059-.384-.022-.75-.203-1.056l-.037-.06a1.645 1.645 0 0 0-1.242-.749l-.05-.004z",fill:"#fff"})})));var eN=e=>{(0,eb._)();let{className:t,onClick:i,onMouseEnter:l,awemeInfo:o}=e,r=(0,c.x)(()=>{v.logInstance.sendLog("aiChatButtonShow",{enter_from:getLogPageName(),ai_chat_button_position:"bottom_bar_screen",group_id:null==o?void 0:o.awemeId})});return(0,n.jsxs)("div",{ref:r,className:a()(eS.default.aiScreenshot,t),onClick:()=>{v.logInstance.sendLog("aiChatButtonClick",{enter_from:getLogPageName(),ai_chat_button_position:"bottom_bar_screen"}),null==i||i()},onMouseEnter:l,children:[(0,n.jsx)("span",{className:a()(eS.default.tagBg,eS.default.npsCover)}),(0,n.jsx)(O.Z,{className:a()(eS.default.aiIcon,eS.default.npsStyle),src:ek,width:16,height:16,viewBox:"0 0 16 16"}),(0,n.jsx)("span",{className:eS.default.text,children:"识别画面"})]})};let eP=e=>{let{player:t,awemeInfo:i,isActive:l}=e||{},n=(0,o.useMemo)(()=>!(0,k.km)(80)&&(0,ef.b2)(i)&&!(0,m.Jt)(i)&&[i]),[r,a]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(n&&t&&l){let e=!1,i=()=>{a(!1)},l=()=>{e&&a(!0)},n=()=>{e=!0,t.off(M.Events.TIME_UPDATE,n)};return t.on(M.Events.PAUSE,l),t.on(M.Events.PLAY,i),t.once(M.Events.TIME_UPDATE,n),()=>{t.off(M.Events.PAUSE,l),t.off(M.Events.PLAY,i),t.off(M.Events.TIME_UPDATE,n)}}a(!1)},[n,t,l]),{aiScreenShotVisible:r,hasAiScreenshot:n}};var eL=i("908219"),ej=i.n(eL),eM=i("108379"),eA=i("614170"),eR=e=>{let{player:t,awemeInfo:i,isActive:n,abTestData:r,openRelatedCard:a}=e||{},d=(0,o.useRef)(!1),s=(0,o.useRef)(""),u=Number(null==r?void 0:r.aiSummary)>p.AiSummaryType.V0,c=e=>{if(a){a({tab:_.L.AiCard,clickMethod:null!=e?e:"click_button",awemeInfo:i,preventCloseOnSameTab:!0});return}I.emit(I.EVENT.OpenRelatedCard,{tab:_.L.AiCard,clickMethod:null!=e?e:"click_button",awemeInfo:i,isFromClientSync:!0,preventCloseOnSameTab:!0})},v=()=>{I.emit(I.EVENT.renderAiCard,{awemeId:null==i?void 0:i.awemeId,from:"bottom_bar_screen"})},m=()=>{I.emit(I.EVENT.renderAiSearchCard,{awemeId:null==i?void 0:i.awemeId,from:"bottom_bar_screen"})},f=e=>{I.emit(I.EVENT.openAiCard,(0,l._)({awemeId:null==i?void 0:i.awemeId,from:"bottom_bar_screen",tab:eA.X.Search},e))},g=ej()(async()=>{try{var e;let l=await (0,eM.y)(.6,()=>t);null==t||null===(e=t.play)||void 0===e||e.call(t);let n=()=>{I.emit(I.EVENT.aiSearchShotScreen,{awemeId:null==i?void 0:i.awemeId,dataURL:l,imgMethod:"bottom_bar_screen"}),setTimeout(()=>{W.F.info("识别画面已加入输入框",null==t?void 0:t.root)},2e3)};d.current?u?(m(),c("click_button")):f({}):(s.current=l,u?(m(),c("click_button")):f({onLoginCancel(){s.current=""},onLoginSuccess(){s.current=l}})),n()}catch(e){W.F.info("截图失败,请重试",null==t?void 0:t.root)}},1e3);return(0,o.useEffect)(()=>{if(n&&(null==i?void 0:i.awemeId)){let e=I.listen(I.EVENT.aiSearchPageLoad,e=>{if((null==i?void 0:i.awemeId)!==(null==e?void 0:e.awemeId))return;if(d.current=!0,!!s.current)setTimeout(()=>{I.emit(I.EVENT.aiSearchShotScreen,{awemeId:null==i?void 0:i.awemeId,dataURL:s.current,imgMethod:"bottom_bar_screen"}),s.current=""},1e3)});return()=>{null==e||e()}}},[null==i?void 0:i.awemeId,n,r,t]),{handleClickAiScreenshot:g,handleMouseEnterAiScreenshot:()=>{u?m():v()}}},eD=i("31360"),eV=i("904495"),eB=i("771410"),eZ=i("47119");let eU=e=>{var t,i;let{className:l,onSodaClick:r,awemeInfo:d,hideDesc:s}=e,u=(0,c.Y)(()=>{var e,t,i;eB.K.report("show_ticker_icon_entrance",{author_id:(null==d?void 0:null===(e=d.authorInfo)||void 0===e?void 0:e.uid)||"",enter_from:(0,eI.yW)(),enter_method:"video_bottom",group_id:(null==d?void 0:d.awemeId)||"",luna_group_id:String((null==d?void 0:null===(i=d.relatedMusicAnchor)||void 0===i?void 0:null===(t=i.extraJson)||void 0===t?void 0:t.luna_sid)||"")})}),v=(0,o.useMemo)(()=>{var e,t;let{title:i="",author:l="",anchor_text:n}=null!==(t=null==d?void 0:null===(e=d.relatedMusicAnchor)||void 0===e?void 0:e.extraJson)&&void 0!==t?t:{},o=n||"汽水音乐";if(!i||s)return o;let r=`${o}: ${i}`;return i.length<=5&&l&&(r=`${o}: ${i}-${l}`),r},[s,d]),m=(null==d?void 0:null===(i=d.relatedMusicAnchor)||void 0===i?void 0:null===(t=i.extraJson)||void 0===t?void 0:t.anchor_icon)||"https://p3-luna.douyinpic.com/tos-cn-i-b829550vbb/sodaIcon.svg~tplv-b829550vbb-obj.image";return(0,n.jsxs)("div",{ref:u,className:a()(eZ.default.container,l),onClick:()=>{r({from:"video_bottom"})},children:[(0,n.jsx)("span",{className:a()(eZ.default.tagBg)}),(0,n.jsx)("img",{src:m,className:a()(eZ.default.icon)}),(0,n.jsx)("span",{className:eZ.default.text,children:v}),!s&&(0,n.jsx)(O.Z,{className:a()(eZ.default.arrowSvg),src:ex.Z,width:12,height:12,viewBox:"0 0 12 12"})]})};var ez=i("339808");let eF=e=>{var t,i,r,M,D,V,ei,en,ed,es,eu,ec,em,ef,eg,eh,ep;let{abTestData:e_,awemeInfo:ey,scene:ex,isTopicLinkSearchResult:eI,videoHashtagClassName:eb,isTopicLinkDetail:eC,videoTags:eT=[],onSodaClick:eS,isShowCreateTime:ek=!1,userInfo:eL,onClickUserName:ej,className:eM,children:eA,loginUserInfo:eB,loginDispatch:eZ,fullScreenTarget:eF,reportExtraParams:eW,onCooperationAuthorClick:eO,isShowCooperation:e$=!1,showSideBar:eH=!1,isActive:eK,toast:eG,showFriendIcon:eq,showAccountName:eQ=!0,showTitle:eJ=!0,isInnerFeed:eX=!1,showGuideDownloadClient:eY=!1,isShowBrandComponent:e0=!1,onBrandComponentHide:e1,onBrandComponentShow:e3,handleMobileSiteClick:e2,oneLineWarginig:e6,modalEnterFrom:e4,openSpecificTab:e5,isDetail:e9,hideAiSearchEntry:e8,sideCardContext:e7,showExpandButtonInner:te}=e,tt=(0,q.n)(),ti=e9||eo.s.getPlayerScene(null==tt?void 0:tt.playerId)===d.lT.Detail,[tl,tn]=(0,o.useState)(!0),to=(0,o.useRef)(null),tr=null===(t=y.Le.getConfig(y.gI.WallPaperIds))||void 0===t?void 0:t.includes(null==ey?void 0:ey.awemeId),{changeKeyword:ta,resetSearchParams:td}=(0,s.w)(),{cooperationInfo:ts,awemeType:tu,awemeId:tc,authorInfo:tv,logPb:tm,mixInfo:tf}=ey||{},{maskWrapperClass:tg,onAlphaChange:th}=R({abTestData:e_}),tp=(0,ez.a)(),{mentionTagVisible:t_,currentMention:ty,getCurrentMentionTime:tw}=ew({awemeInfo:ey,player:tt,isActive:eK,abTestData:e_}),{handleClickAiSearchBar:tx,handleMouseEnterAiSearchBar:tI}=(0,eD.p)({awemeInfo:ey,isActive:eK,openRelatedCard:null==e7?void 0:e7.handleRelated,abTestData:e_}),{aiScreenShotVisible:tb}=eP({player:tt,awemeInfo:ey,abTestData:e_,isActive:eK}),{handleClickAiScreenshot:tC,handleMouseEnterAiScreenshot:tT}=eR({awemeInfo:ey,player:tt,isActive:eK,abTestData:e_,openRelatedCard:null==e7?void 0:e7.handleRelated}),{hideDesc:tE}=A({player:tt,abTestData:e_,isActive:eK}),[tS,tk]=(0,o.useState)(),{childStyle:tN={},offset:tP}=B({abTestData:e_,parentDom:tS,isDetail:ti,scene:ex,awemeInfo:ey}),{isShowTitleAndDescAlone:tL,finalTitle:tj,title:tM,desc:tA,computedTextExtra:tR,titleElRef:tD,descLine:tV,isTitleWrapped:tB}=(0,eV.Q)({awemeInfo:ey,abTestData:e_}),{cooperationCreators:tZ,acceptedNums:tU=0,cursor:tz}=ts||{},tF=(0,o.useRef)(null),tW=(0,o.useMemo)(()=>{if(!(null==tZ?void 0:tZ.length))return[];let e=[],t=tZ.filter(t=>(t.roleId===u.iG.Author&&e.push(t),t.roleId!==u.iG.Author));return[...e,...t]},[tZ]),tO=(0,o.useMemo)(()=>{if(!!(null==ts?void 0:ts.extra))return JSON.parse(ts.extra)},[null==ts?void 0:ts.extra]),t$=(null==tO?void 0:tO.is_large_co_activity)&&tU>=14,tH=t$?tU+1:tW.length||0,tK=()=>{if("function"==typeof e2){e2();return}if(t$){(0,er.Y)({awemeInfo:ey,authorList:tW,totalNum:tH,cursor:tz,extra:tO,userInfo:eL});return}(0,X.N)({logParams:{clickMethod:"more_button"},showCooperationList:tW,loginUserInfo:eB,awemeInfo:ey,reportExtraParams:eW,loginDispatch:eZ})},{uid:tG,nickname:tq,remarkName:tQ,accountCertInfo:tJ}=tv||{},tX=ex===d.lT.CreatorCenter,tY=y.Le.getConfig(y.gI.AbtestData),t0=(0,c.Y)(()=>{v.logInstance.sendLog("postTimeShow",{enter_from:(0,w.mo)(),group_id:ey.awemeId,post_time:(0,x.MH)(1e3*ey.createTime)})}),{lineHeight:t1}=(0,Z.c)(tt),{clickAuthorHeadLog:t3,xiguaAnchorClickLog:t2,xiguaAnchorShowLog:t6,clickTitleHashtagLog:t4,clickTitleAtLog:t5,clickVideoTitleLog:t9,titleNamedEntityWordsClickLog:t8,titleNamedEntityWordsShowLog:t7,videoInfoAreaShowLog:ie,videoInfoAreaClickLog:it}=(0,j.T)({awemeInfo:ey,videoTags:eT,onClickUserName:ej,authorId:tG,awemeType:tu,logPb:tm,awemeId:tc,player:tt}),ii=(0,o.useCallback)(()=>{if("function"==typeof e2){e2();return}if(null==ej||ej(),(0,m.Jt)(ey)){if(ex===d.lT.Recommend||ex===d.lT.Modal&&"discover"===(0,w.vM)()){I.emit(I.EVENT.openAdSideCard);let e=(0,m.Rx)(ey);(0,f.E)("realtime_click",{tag:(0,b.f)(),value:null==e?void 0:e.creative_id,log_extra:null==e?void 0:e.log_extra,refer:"title",ad_extra_data:(0,l._)({},(0,m.f6)(ey))});return}if((0,m.gc)(ey)){eG?eG("广告视频不支持此功能"):W.F.info("广告视频不支持此功能");return}}if((0,m.gc)(ey)){eG?eG("广告视频不支持此功能"):W.F.info("广告视频不支持此功能");return}tu===g.e.XgVideo?t3():I.emit(I.EVENT.videoTitleClick,{awemeId:tc,playerId:null==tt?void 0:tt.playerId})},[tG,tu,tm,tc,ej,tt,t3,e2]),il=(0,o.useCallback)(()=>{t2(),ii()},[ii,t2,e2]),io=[d.lT.Recommend].includes(ex)||e4===h.a.WaterFall,ir=(0,o.useMemo)(()=>tu===g.e.XgVideo?(t6(),(0,n.jsx)("div",{className:"account-badge",onClick:il,children:(0,n.jsxs)("div",{className:"badge-xg-bg",children:[(0,n.jsx)("div",{className:"badge-xg"}),(0,n.jsx)("span",{children:"来自西瓜视频"})]})})):"",[tu,il,t6]),ia=(0,o.useCallback)((e,t,i)=>{var l;let n=null==e_?void 0:e_.searchOpenCurrentTab;((null==n?void 0:n.save_status)!==1||(0,C.DT)()||(null===(l=window)||void 0===l?void 0:l.location.pathname)!=="/")&&eI&&I.emit(I.EVENT.videoPause,"VideoInfo_onHashTagClick"),t4(e,t,i)},[eI,t4,e2]),id=(0,o.useCallback)((e,t,i)=>{var l;let n=null==e_?void 0:e_.searchOpenCurrentTab;((null==n?void 0:n.save_status)!==1||(0,C.DT)()||(null===(l=window)||void 0===l?void 0:l.location.pathname)!=="/")&&I.emit(I.EVENT.videoPause,"VideoInfo_onSearchTextClick"),(0,ea.v2)(e,{source:"related_search_anchor_v2"},(null==e_?void 0:e_.open_current_tab)===1,(null==e_?void 0:e_.save_video)===1,(null==e_?void 0:e_.clientSpaV2)===p.CommonSwitch.On&&(0,C.DT)(),ta,td),null==t8||t8(e,t,i)},[t8]),is=(0,o.useCallback)(e=>{I.emit(I.EVENT.videoPause,"VideoInfo_onUserNameClick"),t5(e)},[t5,e2]),iu=(0,o.useCallback)(e=>{if(te)e7.handleRelated({tab:_.L.VideoDetail,awemeInfo:ey,clickMethod:"video_info"}),t9(e);else{var t;I.emit(I.EVENT.hideFakeScreen,!1),null==tt||null===(t=tt.emit)||void 0===t||t.call(tt,"titleIsFold",e),t9(e),tn(e),!ti&&!tX&&I.emit(I.EVENT.openVideoInfoSideCard,{awemeId:null==ey?void 0:ey.awemeId})}},[te,e7,tt,t9,ey,tX,ti]),ic=(0,o.useCallback)(()=>{te&&iu(!1)},[te,iu]),iv=!ti&&!tX&&!tl||(null==e7?void 0:e7.showSideCard)&&(null==e7?void 0:e7.curTab)===_.L.VideoDetail,im=(0,o.useCallback)(e=>{if(!iv&&!e0&&eJ&&(null==e?void 0:e.isShow)){var t;v.logInstance.sendLog("showVideoTitle",{enter_from:(0,w.mo)(),group_id:null==ey?void 0:ey.awemeId,author_id:null==ey?void 0:null===(t=ey.authorInfo)||void 0===t?void 0:t.uid,is_full_screen:(0,T.r)()?"1":"0",urlParamList:["previous_page"]})}},[iv,e0,eJ,ey]);(0,o.useEffect)(()=>{if(!ti&&!tX){let e=I.listen(I.EVENT.closeVideoInfoSideCard,e=>{(null==e?void 0:e.awemeId)===(null==ey?void 0:ey.awemeId)&&tn(!0)}),t=I.listen(I.EVENT.openVideoInfoSideCard,e=>{(null==e?void 0:e.awemeId)===(null==ey?void 0:ey.awemeId)&&tn(!1)});return()=>{null==e||e(),null==t||t()}}},[ey,tX,ti]),(0,o.useEffect)(()=>{tn(!0)},[tc]);let ig=(0,o.useMemo)(()=>(0,m.Jt)(ey),[ey]),ih=(0,o.useMemo)(()=>(0,m.Kf)(ey),[ey]),ip=(0,m.Kf)(ey),i_=(0,o.useCallback)(e=>{let{isUnfold:t}=e;return(0,n.jsx)(U.Z,{wrapperClassName:L.default.videoTitleWrapper,className:a()(L.default.videoTitle,L.default.adaptive),userTextClassName:a()(L.default.hashTagSpan,L.default.userText),hashTagClassName:a()({[L.default.linkHashTag]:eI},eb),getHashTagHref:(e,t)=>eI?`https://www.douyin.com/search/${encodeURIComponent(e)}?source=pc_click_hashtag_feed&enter_from=${(0,w.vM)()}&aweme_id=${ey.awemeId}&gid=${ey.groupId}`:eC?(0,E.bP)(t):"",text:tL?tA:tj,getSearchTextUrl:e=>`https://www.douyin.com/search/${encodeURIComponent(e)}?source=title_named_entity&enter_from=${(0,w.vM)()}&aweme_id=${ey.awemeId}&gid=${ey.groupId}`,isRemoveRowspan:!t,textExtra:tR,awemeInfo:ey,onClickHashtag:e2||ia,onClickUser:e2||is,onSearchTextClick:e2||id,onSearchTextMounted:t7,enterMethod:"video_title_at",searchWordsType:F.L.VideoInfoTitle,abTestData:e_,player:tt,children:(null==tf?void 0:tf.currentEpisode)&&!tL&&(0,n.jsxs)("span",{children:["第",null==tf?void 0:tf.currentEpisode,"集:"]})})},[ey,tj,tA,tM,tL]),iy=(0,o.useCallback)(()=>{v.logInstance.sendLog("hover_author_head",{enter_from:(0,w.mo)(),click_from:"title"})},[]),iw=(0,o.useMemo)(()=>eT.slice(0,1),[eT]),ix=eT.length>0,iI=(0,o.useMemo)(()=>"/user/self"===tp.pathname&&e4===h.a.UserPost,[tp.pathname,e4]),ib=!ix&&eS&&(null==ey?void 0:null===(r=ey.relatedMusicAnchor)||void 0===r?void 0:null===(i=r.extraJson)||void 0===i?void 0:i.luna_sid)&&!iI&&(!(0,C.DT)()||(0,S.y)(null!==(ep=(0,C.FJ)().awemePcClient)&&void 0!==ep?ep:"",">=","6.2.0"));return((0,o.useEffect)(()=>{ie()},[ie]),null==tt?void 0:tt.video)?(0,n.jsxs)("div",{id:"video-info-wrap",className:a()("xgplayer-video-info-wrap xgplayer-video-info-wrap-new douyin-player-video-info-wrap douyin-player-video-info-wrap-new",L.default.infoContainer,(0,l._)({fullscreen:!tl,isVideoInfoOptimize:!ti&&!tX,isInSearch:ex===d.lT.Search},tg)),"data-state":"normal",children:[eA,(0,n.jsx)("div",{ref:tk,className:a()("video-info-detail",{isFireFox:(0,k.vU)(),wallpaperTitle:(null===(M=y.Le.getConfig(y.gI.WallPaperIds))||void 0===M?void 0:M.includes(null==ey?void 0:ey.awemeId))||eY,wallpaperClientTile:(null===(D=y.Le.getConfig(y.gI.WallPaperIds))||void 0===D?void 0:D.includes(null==ey?void 0:ey.awemeId))&&(0,C.DT)(),isVideoInfoOptimise:!ti&&!tX},eM),"data-e2e":"video-info","data-e2e-aweme-id":ey.awemeId,style:(0,l._)({},tP?{paddingRight:`${tP}px`}:{}),children:(0,n.jsxs)("div",{style:tN,children:[ex!==d.lT.Search&&(0,n.jsx)(K.A,{isShowBuy:eo.s.getPlayerScene(null==tt?void 0:tt.playerId)!==d.lT.CreatorCenter,awemeInfo:ey,isActive:eK,isDetail:eo.s.getPlayerScene(null==tt?void 0:tt.playerId)===d.lT.Detail,abTestData:e_,userInfo:eL,logParams:eW}),!iv&&!e0&&eQ&&(0,n.jsxs)("div",{className:a()("account"),children:[(0,n.jsxs)("div",{className:a()("account-name","userAccountTextHover"),"data-e2e":"feed-video-nickname",onMouseEnter:iy,ref:tF,"data-click-from":"title",children:[(0,n.jsx)("span",{className:"account-name-text",onClick:ii,children:(0,n.jsx)(U.Z,{className:a()(L.default.userText,L.default.adaptive),text:`@${tQ||tq}`})}),(0,n.jsx)($.C,{accountCertInfo:tJ,className:L.default.badge,isRoleNameShow:!1,certLabelStyle:null==ey?void 0:ey.certLabelStyle,useCertLabelStyle:io})]}),(0,n.jsx)("div",{className:"video-create-time",children:ek&&(0,n.jsx)("span",{ref:t0,className:"time",children:`\xb7 ${(0,x.MH)(1e3*ey.createTime)}`})}),!eX&&(ig&&(0,m.Gu)(ey)||ih)&&(0,n.jsx)(O.Z,{src:el,width:30,height:16,viewBox:"0 0 30 16",style:{marginLeft:4}}),ir,tu===g.e.Note&&((null==tY?void 0:tY.liveicon)&&(null==ey?void 0:null===(ei=ey.images)||void 0===ei?void 0:null===(V=ei.every)||void 0===V?void 0:V.call(ei,e=>5===e.clipType))?(0,n.jsx)("div",{className:"account-card",children:(0,n.jsx)(G.EJ,{className:L.default.pictureStyle})}):(!(null==ey?void 0:ey.isSlides)||(null==ey?void 0:null===(ed=ey.images)||void 0===ed?void 0:null===(en=ed.every)||void 0===en?void 0:en.call(ed,e=>[2,5].includes(e.clipType))))&&(0,n.jsx)("div",{className:"account-card",children:(0,n.jsx)(G.J2,{className:L.default.pictureStyle})})),!!((null==ey?void 0:null===(eu=ey.authorInfo)||void 0===eu?void 0:null===(es=eu.relationLabel)||void 0===es?void 0:es.label_info)&&eq)&&(0,n.jsx)("div",{className:"account-card",children:(0,n.jsx)("span",{className:L.default.friendIcon,children:null==ey?void 0:null===(em=ey.authorInfo)||void 0===em?void 0:null===(ec=em.relationLabel)||void 0===ec?void 0:ec.label_info})}),(null==tW?void 0:tW.length)>1&&e$&&(0,n.jsx)(J.Z,{authorList:tW,num:tH,isTag:!0,onClick:tK})]}),!iv&&!e0&&(null==tW?void 0:tW.length)>0&&e$&&(0,n.jsx)(Q.Z,{authorList:tW,loginUserInfo:eB,loginDispatch:eZ,fullScreenTarget:eF,reportExtraParams:eW,awemeInfo:ey,onCooperationAuthorClick:eO,abTestData:e_,showSideBar:eH,onClickMore:tK,isDetail:ti}),!iv&&!e0&&eJ&&(0,n.jsxs)("div",{className:a()("title",te&&"cursorPointer"),"data-e2e":"video-desc",onClick:ic,children:[tL&&(0,n.jsxs)("div",{ref:tD,className:a()(L.default.videoTitle,L.default.adaptive,L.default.aloneVideoTitle),children:[(null==tf?void 0:tf.currentEpisode)&&(0,n.jsxs)("span",{children:["第",null==tf?void 0:tf.currentEpisode,"集:"]}),(0,n.jsx)("span",{children:tM})]}),(0,n.jsx)(z.Z,{maxLine:tV,lineClamp:tV,btnClassName:a()(L.default.button,L.default.expandButton,L.default.adaptive),onlyKey:tj,btnOnClick:iu,lineHeight:t1,renderContent:i_,showExpandButton:!ig,player:tt,isActive:eK,optimizeReflow:N.f.isMultiLineReflow(e_),showExpandButtonInner:te&&(null==ey?void 0:null===(ef=ey.douyinPcVideoExtra)||void 0===ef?void 0:ef.aiNoteV2)===1,btnOnShow:im,alwaysShowExpandButton:tB})]}),(0,n.jsx)("div",{className:a()(L.default.underTitleTagContainer,L.default.rsBarOpt),onClickCapture:e=>null==e2?void 0:e2(e),ref:to,children:!tr&&!eY&&!e0&&!ip&&(0,n.jsxs)(n.Fragment,{children:[ib?(0,n.jsx)(eU,{className:a()(L.default.marginTop,L.default.maxWidth100),awemeInfo:ey,onSodaClick:eS,hideDesc:tE}):null,ix&&(0,n.jsx)("div",{className:a()("under-title-tag",L.default.videoTagContainer,L.default.marginTop),children:(0,n.jsx)(H.h,{tagList:iw,awemeInfo:ey,userInfo:eL,isActive:eK,reportExtraParams:eW,isShowUpdateText:!0,player:tt,abTestData:e_,containerRef:to,showMiniTag:t_&&tb&&!e8,hiddenMixUpdateText:t_&&!e8,hiddenNextBtn:tb&&!e8,hiddenAiSearchEntry:e8,onAiSearchTagHover:tI,onAiSearchTagClick:tx,hideDesc:tE})}),!e8&&t_&&(0,n.jsx)(eE,{className:a()(L.default.aiMentionTag,L.default.marginTop),textClassName:L.default.aiMentionText,mentionItem:ty,onClick:(e,t)=>tx(e,{query:t.knowledge,from:P.jE.BottomBarMention,getCurrentMentionTime:tw}),onMouseEnter:tI,awemeInfo:ey,hideDesc:tE}),!e8&&tb&&(0,n.jsx)(eN,{className:L.default.marginTop,onClick:tC,onMouseEnter:tT,awemeInfo:ey})]})}),(0,m.Kf)(ey)&&!eX&&(0,n.jsx)(Y.o,{awemeInfo:ey,isActive:eK,className:L.default.brandAd,onBrandComponentClose:()=>{null==e1||e1()},onBrandComponentShow:()=>{null==e3||e3()}}),!iv&&(0,ee.H)(null==ey?void 0:ey.riskInfos,e_)&&(0,n.jsx)(ee.Z,{awemeInfo:ey,risk:null==ey?void 0:ey.riskInfos,className:a()(L.default.marginTop,{[L.default.oneLineText]:e6})}),ex===d.lT.Search&&!!ey.videoAbstract&&(null===(eg=ey.videoAbstract)||void 0===eg?void 0:eg.displayType)===2&&(0,n.jsx)("div",{id:"video-abstract",style:{marginTop:"12px"},children:(0,n.jsx)(et.r,{awemeInfo:ey,isActive:eK,player:tt,logParams:eW,isInnerFeed:eX,isModal:void 0!==e4,openSpecificTab:e5})}),ex!==d.lT.Search&&!eX&&(e4===h.a.GeneralSearch||e4===h.a.Search)&&!!ey.videoAbstract&&[2,3].includes(null===(eh=ey.videoAbstract)||void 0===eh?void 0:eh.displayType)&&(0,n.jsx)("div",{id:"video-abstract",style:{marginTop:"12px"},children:(0,n.jsx)(et.r,{awemeInfo:ey,isActive:eK,player:tt,logParams:eW,isInnerFeed:eX,isModal:void 0!==e4,openSpecificTab:e5})})]})}),(0,n.jsx)(ev,{isActive:eK,player:tt,isInfoFold:tl,isInnerFeed:eX,awemeInfo:ey,abTestData:e_,onAlphaChange:th}),(0,n.jsx)("div",{className:"mini-progress-outer",children:(0,n.jsx)("div",{className:"mini-progress-inner"})})]}):null},eW=(0,en.K)(eF)}}]);