1 line
135 KiB
Plaintext
1 line
135 KiB
Plaintext
"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["73481"],{878217:function(e,t,i){i.d(t,{h:function(){return a}});var n=i(101199),l=i(247167),o=i(502615),r=i(264034),u=i.n(r);let a=e=>{let{player:t,source:i=""}=e,r=(0,n.useRef)(!1),{playerRef:a}=(0,n.useContext)(o.ET),d=t||a.current;return(0,n.useEffect)(()=>{if(!d)return;r.current=!d.paused;let e=()=>{r.current=!0},t=[d.on("loaddata",e),d.on("canplay",e),d.on("play",e),d.on("timeupdate",e)];return()=>{t.forEach(e=>null==e?void 0:e())}},[d]),(0,n.useEffect)(()=>{let e=u()(()=>{(0,l.traceLivePerfPlayerLeaveEvent)({has_receieved:r.current?1:0,source:i}),r.current=!1});return window.addEventListener("beforeunload",e),()=>{e(),window.removeEventListener("beforeunload",e)}},[]),null}},26333:function(e,t,i){i.d(t,{GZ:function(){return D},ng:function(){return w},ds:function(){return V}});var n=i("629686"),l=i("402748");i("490629"),i("706056");var o=i("320165"),r=i("101199"),u=i("23091"),a=i("618759"),d=i("103680"),s=i("534133"),c=i("462867"),v=i("684434");let _=(0,r.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,l._)((0,n._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M22.707 10.707a1 1 0 0 0-1.414-1.414L16 14.586l-5.293-5.293a1 1 0 0 0-1.414 1.414L14.586 16l-5.293 5.293a1 1 0 1 0 1.414 1.414L16 17.414l5.293 5.293a1 1 0 0 0 1.414-1.414L17.414 16l5.293-5.293z",fill:"#fff"})})));var f=i("542901"),m=i("806217"),p=i("772342"),g=i("138957"),I=i("287964"),E=i("264034"),h=i.n(E);let y=e=>{let{video:t}=e;if(t instanceof HTMLVideoElement){var i;let{clientHeight:n,clientWidth:l,videoHeight:o,videoWidth:r}=t;t.getBoundingClientRect().width;let{clientHeight:u,clientWidth:a}=null==e?void 0:null===(i=e.baseConfig)||void 0===i?void 0:i.el,d=!0;if(r>o&&(d=!1),l>a&&(d=!1),d)return{height:512,width:300}}return{width:512,height:300}},T=h()(()=>{let e=e=>{let{key:t,validRes:i=Boolean}=e,n=document[t];return{key:t,originFn:n,mergedFn:function(){for(var e,l,o=arguments.length,r=Array(o),u=0;u<o;u++)r[u]=arguments[u];let a=n.call(document,...r);try{let n=null===(l=window.documentPictureInPicture)||void 0===l?void 0:null===(e=l.window)||void 0===e?void 0:e.document;if(!n||i(a))return a;return n[t].call(n,...r)}catch(e){return a}}}};return[e({key:"getElementById"}),e({key:"querySelector"}),e({key:"querySelectorAll",validRes:e=>!!e.length}),e({key:"getElementsByName",validRes:e=>!!e.length}),e({key:"getElementsByClassName",validRes:e=>!!e.length}),e({key:"getElementsByTagName",validRes:e=>!!e.length})]});function N(e){T().forEach(t=>{let{key:i,mergedFn:n,originFn:l}=t;document[i]=e?n:l})}var A=i("890710"),L=i("469935"),P=i.n(L),O=i("637226"),k=i("893876"),S=i("575697"),C=i("762080"),R=i("633529");function b(){let{isLivingPip:e}=V(),{singletonStore:{player:t}}=(0,f.o)(),i=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{try{if(!t)return()=>{};let e=0,l=()=>{cancelAnimationFrame(e)},o=()=>{var r;l();let u=null===(r=t.video)||void 0===r?void 0:r.flyVideo,a=n.current;if(!u||!a||!i.current)return;let{videoWidth:d,videoHeight:s}=u,c=a.getContext("2d");if(a.width=d,a.height=s,c.drawImage(u,0,0,a.width,a.height),!t.paused)e=requestAnimationFrame(o)};return t.on("pause",l),t.on("play",o),o(),()=>{l(),t.off("play",o),t.off("pause",l)}}catch(e){}},[e,t]),(0,o.jsx)("div",{ref:i,className:R.default.doubleScreenVideoWrap,children:(0,o.jsx)("canvas",{ref:n})})}var M=i("634199");let V=()=>{let{pipInfo:e,closePipWindow:t,openPipWindow:i}=(0,u.fl)(),o=w(),{playerStore:{playerInstance:r}}=(0,f.o)(),s=(null==e?void 0:e.pipId)===S.CL,c=(0,m.Z)(()=>i((0,l._)((0,n._)({},y(r)),{pipId:S.CL})).then(e=>{var t;let i=null==e?void 0:null===(t=e.pipInfo)||void 0===t?void 0:t.window;if(!!i)"true"===document.documentElement.getAttribute("dark")&&(i.document.documentElement.setAttribute("dark","true"),i.document.body.setAttribute("theme-mode","dark"))})),v=(0,m.Z)(e=>{if(!!s)e&&window.focus(),(0,a.DT)()&&e&&d.invoke("pipParentWinShow"),t(S.CL)});return{isLivingPip:s,pipWin:s?e.window:null,closeLivingPip:v,openLivingPip:c,isNewLivingPipEnabled:o}},w=()=>{let{isSupported:e}=(0,u.fl)();return(0,a.DT)(),e},x=(0,r.memo)(e=>{let{isDoubleScreen:t,className:i}=e,[n,l]=(0,r.useState)(!1),[u,a]=(0,r.useState)(!1),d=(0,r.useRef)(null),E=(0,r.useRef)(null),h=(0,r.useRef)(!1),{isLivingPip:y,closeLivingPip:T,pipWin:L}=V(),{singletonStore:{player:R,message:w},eventStore:{playerEvent:x},linkmicStore:{linkMicLayout:D},pkStore:{pkStatus:j},playerStore:{isPause:U}}=(0,f.o)(),F=(0,m.Z)(()=>{y&&l((0,s.nz)())});(0,p.Z)("resize",()=>F(),{target:L}),(0,p.Z)("pagehide",()=>h.current=!(null==R?void 0:R.paused),{target:L}),(0,g.Z)(()=>F(),y?50:void 0),(0,r.useEffect)(()=>w.on("MemberMessage",e=>{(null==e?void 0:e.some(e=>{var t;return[C.WU.KICK_OUT,C.WU.BLOCK].includes(Number(null==e?void 0:null===(t=e.payload)||void 0===t?void 0:t.action))}))&&T(!1)}),[w,T]),(0,r.useEffect)(()=>(N(y),()=>{N(!1)}),[y]);let G=(0,r.useMemo)(()=>void 0===D&&!j&&!0,[D,j]),B=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(!!R)try{var e,t,i,n,l,o,r,u;let a=()=>{let e=requestAnimationFrame(()=>{var e,t;return null===(t=R.plugins.dynamicbg)||void 0===t?void 0:null===(e=t.renderOnce)||void 0===e?void 0:e.call(t)});return()=>{cancelAnimationFrame(e)}};if(y){;return B.current=!0,null==R||null===(t=R.plugins)||void 0===t||null===(e=t.rotate)||void 0===e||e.hide(),(R.paused||!U)&&(null===(n=R.config)||void 0===n?void 0:null===(i=n.baseConfig)||void 0===i?void 0:i.url)&&R.play(),a()}if(B.current){;return B.current=!1,G&&(null===(o=R.plugins.rotate)||void 0===o||null===(l=o.show)||void 0===l||l.call(o)),h.current&&(R.paused||!U)&&(null===(u=R.config)||void 0===u?void 0:null===(r=u.baseConfig)||void 0===r?void 0:r.url)&&R.play(),a()}}catch(e){}},[y,R,G,U]),(0,I.Z)(()=>{T()});let Y=()=>T(!0);return(0,k.Z)(O.Hq,Y),(0,k.Z)(O.qo,Y),(0,k.Z)(O.fC,Y),(0,k.Z)(O.Fg,Y),(0,o.jsx)(c.F6,{pipId:S.CL,children:(0,o.jsxs)("div",{className:P()(M.default.wrap,i),ref:d,onMouseOver:()=>a(!1),onMouseLeave:e=>{if(!E.current||!e)return;let{pageX:t,pageY:i}=e,{left:n,top:l,width:o,height:r}=E.current.getBoundingClientRect();t>=n&&t<=n+o&&i>=l&&i<=l+r&&a(!0)},children:[(()=>{var e;let t=null==R?void 0:null===(e=R.root)||void 0===e?void 0:e.querySelector(".douyin-player-top-bar");return!t||n?null:(0,A.createPortal)((0,o.jsxs)("div",{className:M.default.headerIcons,children:[(0,o.jsx)("div",{className:M.default.dragBar,ref:E}),(0,o.jsx)("span",{className:M.default.headerIcon,onClick:()=>{T(!0),x.livesdkMiniWindowExit({click_position:"mini_window_exit"})},children:(0,o.jsx)(v.Z,{})}),(0,o.jsx)("span",{className:M.default.headerIcon,onClick:()=>{T(!1),x.livesdkMiniWindowExit({click_position:"mini_window_exit"})},children:(0,o.jsx)(_,{})})]}),t)})(),(0,o.jsxs)("div",{className:M.default.content,children:[(0,o.jsx)(c.pu,{pipAnchorId:S.MA.BasicPlayer,className:P()(M.default.slotContent,{[M.default.forceShowControl]:u})}),t&&(0,o.jsx)(b,{}),(0,o.jsx)(c.pu,{pipAnchorId:S.MA.Background,className:P()(M.default.background,"livingPipBackground")})]})]})})}),D=e=>w()?(0,o.jsx)(x,(0,n._)({},e)):null},804312:function(e,t,i){i.d(t,{b:function(){return s}});var n=i(320165),l=i(101199),o=i(160197),r=i(502615),u=i(414061),a=i(46969),d=i(589864);let s=e=>{let{player:t}=(0,o.n)(),{useNewUserSoundGuide:i,isActive:s=!1,isShowGuide:c}=e,v=l.useRef(!0);return l.useEffect(()=>{if(t){let e=()=>{u.emit(u.EVENT.videoPlay)},n=()=>{var e,n;if(!!t.paused)null!==(n=(e=window).__INVISIBLE_QUERY__)&&void 0!==n||(e.__INVISIBLE_QUERY__={}),window.__INVISIBLE_QUERY__.if_browser_limited=1,(0,d.MR)(),u.emit(u.EVENT.videoPlayPrevent),v.current&&!i&&setTimeout(()=>{t.muted=!0,t.play(),v.current=!1},10)};return t.on(r.FP.AUTOPLAY_WAS_PREVENTED,n),t.on(r.FP.AUTOPLAY_STARTED,e),()=>{t.off(r.FP.AUTOPLAY_WAS_PREVENTED,n),t.off(r.FP.AUTOPLAY_STARTED,e)}}},[t,i]),i?(0,n.jsx)(a.V8,{player:t,isActive:s,isShowGuide:c}):null}},166837:function(e,t,i){i.d(t,{n:function(){return d}});var n=i("320165"),l=i("101199"),o=i("160197"),r=i("629686"),u=i("402748");let a=(0,l.forwardRef)((e,t)=>(0,n.jsx)("svg",(0,u._)((0,r._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,n.jsx)("path",{d:"M24.932 16.444c0-4.687-3.89-8.444-8.634-8.444a8.679 8.679 0 0 0-7.207 3.79v-1.558a.99.99 0 0 0-1.98 0v4.038c0 .547.444.99.99.99h4.038a.99.99 0 0 0 0-1.98h-1.646c1.137-1.963 3.304-3.3 5.804-3.3 3.7 0 6.655 2.918 6.655 6.464 0 3.547-2.956 6.465-6.655 6.465-2.963 0-5.459-1.88-6.326-4.453a.99.99 0 0 0-1.876.633c1.138 3.38 4.39 5.8 8.202 5.8 4.746 0 8.635-3.758 8.635-8.445z",fill:"#fff"})}))),d=(0,i("243970").rW)(e=>{let{player:t}=(0,o.n)(),i=l.useCallback(()=>{t.refresh()},[]);return(0,n.jsx)("div",{style:{cursor:"pointer"},onClick:i,className:(null==e?void 0:e.className)||"",children:(0,n.jsx)(a,{})})})},298244:function(e,t,i){i.r(t),i.d(t,{GlobalControlPlugin:function(){return r}});var n=i(101199),l=i(160197),o=i(414061);let r=(0,n.memo)(function(){let{player:e}=(0,l.n)();return(0,n.useEffect)(()=>{let t=o.listen(o.EVENT.livePause,()=>{e.pause()});return()=>{t()}},[]),null});t.default=r},712174:function(e,t,i){i(490629);var n=i(101199);t.Z=e=>{let[t,i]=(0,n.useState)(!1),{isActive:l}=e;return(0,n.useEffect)(()=>{let e=null,t=()=>{e=setTimeout(()=>{i(!0)},2e3)},n=()=>{e&&(clearTimeout(e),i(!1)),t()};if(l)return n(),document.addEventListener("mousemove",n),document.addEventListener("mousedown",n),document.addEventListener("keydown",n),()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mousedown",n),document.removeEventListener("keydown",n),e&&clearTimeout(e)}},[l]),{inActive:t}}},965395:function(e,t,i){i.r(t),i.d(t,{default:function(){return h},NewPlayerErrorCover:function(){return E}});var n=i("629686"),l=i("402748"),o=i("811603");i("490629");var r=i("320165"),u=i("469935"),a=i.n(u),d=i("101199"),s=i("160197");let c=(0,d.forwardRef)((e,t)=>(0,r.jsx)("svg",(0,l._)((0,n._)({width:56,height:56,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M56 28c0 15.464-12.536 28-28 28S0 43.464 0 28 12.536 0 28 0s28 12.536 28 28zm-33.25-5.95c0 1.74-1.175 3.15-2.625 3.15S17.5 23.79 17.5 22.05s1.175-3.15 2.625-3.15 2.625 1.41 2.625 3.15zm5.478 9.683c-4.014 0-7.623 1.74-10.057 4.5a1.75 1.75 0 1 0 2.625 2.315c1.784-2.023 4.445-3.315 7.432-3.315 2.993 0 5.66 1.298 7.444 3.329a1.75 1.75 0 0 0 2.629-2.31c-2.435-2.771-6.051-4.519-10.073-4.519zm7.607-6.533c1.45 0 2.625-1.41 2.625-3.15s-1.175-3.15-2.625-3.15-2.625 1.41-2.625 3.15 1.175 3.15 2.625 3.15z",fill:"#FFFFFF57",fillOpacity:".15"})}))),v=(0,d.forwardRef)((e,t)=>(0,r.jsx)("svg",(0,l._)((0,n._)({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,r.jsx)("path",{d:"M6.255 8a7 7 0 1 1-.746 6.625 1 1 0 1 0-1.854.75A9.003 9.003 0 0 0 21 12 9 9 0 0 0 5 6.343V5a1 1 0 0 0-2 0v4a1 1 0 0 0 1 1h4a1 1 0 0 0 0-2H6.255z",fill:"#FFFFFFE5"})})));var _=i("414626"),f=i("444326"),m=i("806217"),p=i("73203"),g=i("690193");let I=e=>{let{className:t,handleRetry:i,onlyManulRetry:n=!1}=e,{player:l}=(0,s.n)(),[o,u]=d.useState(!1),[m,p]=d.useState(n),g=d.useCallback(e=>{p(!0)},[]);return d.useEffect(()=>{if((0,f.lw)(l)){p(!0);return}!o&&!n&&(l.once("error",g),null==i||i(!1),u(!0))},[o]),d.useEffect(()=>()=>{l.off("error",g)},[]),m?(0,r.jsxs)("div",{className:a()(_.default.errorCover,t),children:[(0,r.jsx)("div",{children:(0,r.jsx)(c,{})}),(0,r.jsx)("div",{className:_.default.text,children:(0,r.jsx)("span",{children:"服务器开小差了,点击刷新重试"})}),(0,r.jsxs)("div",{className:_.default.refresh,onClick:()=>null==i?void 0:i(!0),children:[(0,r.jsx)("div",{className:_.default.refresh_svg,children:(0,r.jsx)(v,{})}),(0,r.jsx)("span",{className:_.default.refresh_text,children:"刷新"})]})]}):null},E=e=>{var{onRetry:t,enable:i}=e,u=(0,o._)(e,["onRetry","enable"]);let{player:a}=(0,s.n)(),d=(0,m.Z)(()=>{(0,g.qu)("NewPlayerErrorCover_immediateRetry"),null==t||t(),null==a||a.retry()}),{run:c,cancel:v}=(0,p.Z)(()=>{d()},{wait:6e3,leading:!0,trailing:!0}),_=(0,m.Z)(e=>{(0,g.qu)("NewPlayerErrorCover_handleRetry",{manul:e}),e?(v(),d()):c()});return i?(0,r.jsx)(I,(0,l._)((0,n._)({},u),{handleRetry:_})):null};var h=E},327674:function(e,t,i){i.r(t),i.d(t,{VolumeMemoryPlugin:function(){return E},VolumeMemoryPluginSimple:function(){return I},getVolumeChangeHandler:function(){return g}});var n=i(101199),l=i(502615),o=i(280647),r=i(232547),u=i(709705),a=i(205082),d=i(414061),s=i(536793),c=i(542901),v=i(160197),_=i(494857),f=i(575697),m=i(589864),p=i(59850);let g=e=>()=>{var t,i;if(0===e.currentTime)return;0===(0,u.$o)(a.storage.LocalStorageKeys.PLAYER_IS_MUTE)&&e.muted&&(0,u.qQ)(a.storage.LocalStorageKeys.PREVIEW_IS_MUTE,1),(0,r.w)(e.muted);let n=e.volume,l=(0,r.T1)(),o=(0,r.rC)();(0,m.ni)({before_voice_value:o?0:Math.round((null!=l?l:0)*100),voice_value:Math.round((null!=n?n:0)*100),voice_status:e.muted?0:1,if_browser_limited:null!==(i=null===(t=window.__INVISIBLE_QUERY__)||void 0===t?void 0:t.if_browser_limited)&&void 0!==i?i:0}),0===n?(0,r.w)(!0):(0,r.n$)(Number(null!=n?n:.1)),d.emit(d.EVENT.syncInteraction)};function I(e){let{player:t}=(0,v.n)(),i=(0,n.useMemo)(()=>g(t),[]),o=(0,p.Z)(e=>{var i,n,l,o,u;if("change_muted"===e.action){if(0===t.volume){let e=(0,r.T1)();return t.volume=e,(0,r.w)(!1),(0,m.ni)({before_voice_value:Math.round(100*e),voice_value:0,voice_status:1,if_browser_limited:null!==(l=null===(n=window.__INVISIBLE_QUERY__)||void 0===n?void 0:n.if_browser_limited)&&void 0!==l?l:0}),!1}return setTimeout(()=>{(0,r.w)(t.muted)},50),(0,m.ni)({before_voice_value:0,voice_value:Math.round((null!==(o=t.volume)&&void 0!==o?o:0)*100),voice_status:0,if_browser_limited:null!==(u=null===(i=window.__INVISIBLE_QUERY__)||void 0===i?void 0:i.if_browser_limited)&&void 0!==u?u:0}),!0}});return(0,n.useEffect)(()=>(t.muted=(0,r.rC)(),t.on(l.FP.VOLUMECHANGE,i),null==t||t.on("user_action",o),()=>{t.off(l.FP.VOLUMECHANGE,i),null==t||t.off("user_action",o)}),[]),null}function E(){let{eventStore:{playerEvent:e},linkmicStore:{linkStatus:t},roomStore:{playerCoverText:i}}=(0,c.o)(),{player:d}=(0,v.n)(),{syncVolume:m}=(0,s.T)(),g=(0,n.useCallback)(()=>{var n,l;if(0===d.currentTime||t===_.cK.LINKED||i)return;0===(0,u.$o)(a.storage.LocalStorageKeys.PLAYER_IS_MUTE)&&d.muted&&(0,u.qQ)(a.storage.LocalStorageKeys.PREVIEW_IS_MUTE,1),(0,r.w)(d.muted);let o=d.volume,s=(0,r.T1)(),c=(0,r.rC)();null==e||e.volumeChanged({before_voice_value:c?0:Math.round((null!=s?s:0)*100),voice_value:Math.round((null!=o?o:0)*100),voice_status:d.muted?0:1,if_browser_limited:null!==(l=null===(n=window.__INVISIBLE_QUERY__)||void 0===n?void 0:n.if_browser_limited)&&void 0!==l?l:0,if_mini_window:(0,f.OL)()}),0===o?(0,r.w)(!0):(0,r.n$)(Number(null!=o?o:.1))},[t,i]),I=(0,p.Z)(t=>{var i,n,l,o,u;if("change_muted"===t.action){if((null==d?void 0:d.volume)===0){let t=(0,r.T1)();return d.volume=t,(0,r.w)(!1),null==e||e.volumeChanged({before_voice_value:Math.round(100*t),voice_value:0,voice_status:1,if_browser_limited:null!==(l=null===(n=window.__INVISIBLE_QUERY__)||void 0===n?void 0:n.if_browser_limited)&&void 0!==l?l:0}),!1}return setTimeout(()=>{(0,r.w)(null==d?void 0:d.muted)},50),null==e||e.volumeChanged({before_voice_value:0,voice_value:Math.round((null!==(o=null==d?void 0:d.volume)&&void 0!==o?o:0)*100),voice_status:0,if_browser_limited:null!==(u=null===(i=window.__INVISIBLE_QUERY__)||void 0===i?void 0:i.if_browser_limited)&&void 0!==u?u:0}),!0}});return(0,o.Z)(()=>{d.muted=(0,r.rC)()},[g]),(0,n.useEffect)(()=>(null==d||d.on(l.FP.VOLUMECHANGE,g),null==d||d.on("user_action",I),()=>{null==d||d.off(l.FP.VOLUMECHANGE,g),null==d||d.off("user_action",I)}),[g]),null}t.default=E},347751:function(e,t,i){i.r(t),i.d(t,{VolumeWheel:function(){return I},default:function(){return E}}),i("104882"),i("527553"),i("706056");var n=i("320165"),l=i("502615"),o=i("243970"),r=i("845975"),u=i("101199"),a=i("795653"),d=i("499059"),s=i("26333"),c=i("694385"),v=i("629686"),_=i("402748");let f=(0,u.forwardRef)((e,t)=>(0,n.jsxs)("svg",(0,_._)((0,v._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,n.jsx)("path",{d:"M7 14a2 2 0 0 1 2-2h1l4.36-3.633a1 1 0 0 1 1.64.768v13.73a1 1 0 0 1-1.64.768L10 20H9a2 2 0 0 1-2-2v-4zM18 19a3 3 0 1 0 0-6v6z",fill:"#fff"}),(0,n.jsx)("path",{opacity:".3",d:"M18 23.734l.095-.007A7.75 7.75 0 0 0 18 8.266v2.507a5.25 5.25 0 0 1 0 10.454v2.507z",fill:"#fff"})]}))),m=(0,u.forwardRef)((e,t)=>(0,n.jsxs)("svg",(0,_._)((0,v._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,n.jsx)("path",{d:"M7 14a2 2 0 0 1 2-2h1l4.36-3.633a1 1 0 0 1 1.64.768v13.73a1 1 0 0 1-1.64.768L10 20H9a2 2 0 0 1-2-2v-4z",fill:"#fff"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.002 17.55l2.499 2.954 1.502-1.316-2.693-3.185 2.694-3.185-1.503-1.316-2.499 2.955-2.5-2.955L17 12.818l2.694 3.185-2.693 3.185 1.502 1.316 2.499-2.955z",fill:"#fff"})]}))),p=(e,t)=>{if(!(null==e?void 0:e.current))return;let i=e.current;if(i.muted){i.muted=!1,i.volume="up"===t?.05:0;return}let n="up"===t?i.volume+.05:i.volume-.05;n=Math.max(n=Math.min(n,1),0),i.volume=Number(n.toFixed(2)),0===n&&(i.muted=!0)},g=(e,t)=>{if(!(null==e?void 0:e.current))return;let i=e.current;if(i.muted){i.muted=!1,i.volume=Math.max(t/100,0);return}let n=i.volume+t/100;n=Math.max(n=Math.min(n,1),0),i.volume=Number(n.toFixed(2)),0===n&&(i.muted=!0)},I=(0,o.nl)(e=>{let{isActive:t,index:i,defaultIcon:o}=e,{playerRef:s,el:v}=(0,u.useContext)(l.ET),_=(0,u.useRef)(null);return(0,u.useEffect)(()=>{var e;if(!t)return;let i=null==v?void 0:v.querySelector(".douyin-player-volume"),n=null==v?void 0:v.querySelector(".douyin-player-volume-slider"),l=e=>{let t=(0,a.Q5)();e.stopPropagation(),e.preventDefault();let i=(t?1:-1)*parseInt(String(e.deltaY/20),10);0!==i&&g(s,i)},o=e=>{let{code:t}=e;if(d.Le.getConfig(d.gI.DisableNextPre)&&["ArrowUp","ArrowDown"].includes(e.code)){e.stopPropagation(),e.preventDefault(),"ArrowUp"===e.code?p(s,"up"):"ArrowDown"===e.code&&p(s,"down");return}let i=e.target,n=null==i?void 0:i.tagName;if("INPUT"!==n&&"TEXTAREA"!==n&&(null==i?void 0:i.contentEditable)!=="true"){if(e.shiftKey&&("Equal"===t||"Minus"===t)){var l,o;null===(l=_.current)||void 0===l||l.focus(),"Equal"===t?p(s,"up"):p(s,"down"),null===(o=_.current)||void 0===o||o.blur()}}},r=()=>{d.Le.setConfig(d.gI.DisableNextPre,!0)},u=()=>{d.Le.setConfig(d.gI.DisableNextPre,!1)},c=e=>{e.stopPropagation()};return null==i||i.addEventListener("wheel",l),null==i||i.addEventListener("mouseover",r),null==i||i.addEventListener("mouseout",u),null===(e=document)||void 0===e||e.addEventListener("keydown",o),null==n||n.addEventListener("pointerdown",c),()=>{var e;null==i||i.removeEventListener("wheel",l),null==i||i.removeEventListener("mouseover",r),null==i||i.removeEventListener("mouseout",u),null===(e=document)||void 0===e||e.removeEventListener("keydown",o),null==n||n.removeEventListener("pointerdown",c)}},[t]),(0,n.jsx)(r.dm,{ref:_,index:i,props:{IconVolume:o?void 0:c.Z,IconVolumeSmall:o?void 0:f,IconVolumeMuted:o?void 0:m,showVolume:!0}})});var E=()=>{let{isLivingPip:e}=(0,s.ds)();return(0,n.jsx)(I,{isActive:!0,position:e?0:1,index:e?2:4})}},492561:function(e,t,i){i(490629),i(683656),i(759943);var n=i(320165),l=i(101199),o=i(463806),r=i(469935),u=i.n(r);t.Z=e=>{let{text:t="秒后主播将加入合演直播间",countdown:i=2,onCountdownEnd:r,visible:a=!1,position:d="absolute",hasBackgroud:s=!1,className:c,useCountdown:v=!0}=e,[_,f]=(0,l.useState)(i);return((0,l.useEffect)(()=>{let e;if(a&&!v){null==r||r();return}return a&&_>0?e=setTimeout(()=>{f(e=>e-1)},1e3):a&&0===_&&(null==r||r()),()=>{e&&clearTimeout(e)}},[a,_,r,v]),(0,l.useEffect)(()=>{!a&&f(i)},[a,i]),a)?(0,n.jsx)("div",{className:u()(o.default.countdownOverlay,c),style:{position:d},children:(0,n.jsx)("div",{className:u()(o.default.countdownContent,{[o.default.countdownBackgroud]:s}),children:v?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:o.default.countdownNumber,children:_}),t]}):(0,n.jsx)("span",{children:t.replace("秒后","")})})}):null}},889707:function(e,t,i){i.d(t,{X:function(){return R}});var n=i("629686"),l=i("402748");i("490629"),i("706056");var o=i("320165"),r=i("469935"),u=i.n(r),a=i("198412"),d=i.n(a),s=i("795233"),c=i.n(s),v=i("101199"),_=i("374600"),f=i("243745"),m=i("638608"),p=i("472090"),g=i("769282"),I=i("286443"),E=i("950257"),h=i("997288"),y=i("718770"),T=i("433063"),N=i("437998"),A={DEFAULT:0,0:"DEFAULT",GUEST:1,1:"GUEST"},L=e=>{let{type:t=0,isLock:i,cls:n,handleClick:l,joinText:r}=e;return(0,o.jsxs)("div",{onClick:l,className:u()(N.default.joinContainer,n),"data-e2e":"mic_seat",children:[(0,o.jsx)("div",{className:N.default.joinIcon,children:(0,o.jsx)("span",{className:u()(N.default.joinSvg,{[N.default.lockIcon]:i,[N.default.guestLockIcon]:1===t&&i,[N.default.joinGuest]:1===t})})}),(0,o.jsx)("span",{className:u()(N.default.joinText,"joinTextContent"),children:r})]})},P=i("896792"),O=i("323401"),k=i("361248"),S=i("996429"),C=i("858651");let R=e=>{var t,i,r,a;let{user:s,className:N,onJoinRoom:R,disable:b,onUserClick:M,isLock:V,showAnchorLabel:w,playModesPC:x,orderSingInfo:D,setFloatModal:j,avatarBorderColor:U,joinText:F=O.p.JOIN_CHAT,setRankParam:G,setRankListShow:B,teamfightInfo:Y,guestBattleInfo:H,giftLabelBackgroundColor:W,selfUidStr:Z,giftLabelIcon:K="",giftLabelStyle:$={},allowSendGiftGuest:z=!0,onHover:q,isMvp:Q,isRed:J,mvpIcon:X,position:ee,singV3Ab:et="0",animationMap:ei,mvpUseridRef:en,mvpChangeRef:el,audioPower:eo,isCrossLink:er=!1,roomBattleType:eu="pk",dynamic:ea=!1,isAudioStage:ed=!1,giftLabelMerge:es=!1}=e,[ec,ev]=v.useState(!1);v.useRef("");let e_=v.useMemo(()=>(null==s?void 0:s.is_background)===1,[s]),ef=v.useMemo(()=>(null==s?void 0:s.silence_status)!==_.Ai.STATUS_UNSILENCE,[s]),{isGuestBattle:em}=(0,T.Z)({guestBattleInfo:H}),{giftNum:ep,isGroupFight:eg}=(0,P.Z)({listUser:s,teamfightInfo:Y,selfUidStr:Z,guestBattleInfo:H,isCrossLink:er,roomBattleType:eu}),eI=v.useCallback(e=>{e.talk>0?ev(!0):!e.talk&&ev(!1)},[]),{gameType:eE}=(0,S.zL)(),eh=v.useMemo(()=>{var e,t,i,o,r,u,a;let d=[];return D&&(null==D||null===(e=D.user_microphone_list)||void 0===e||e.forEach(e=>{if(e.is_singing){var t,i,o,r;(null==e?void 0:null===(t=e.microphone_list)||void 0===t?void 0:t[0].title_sponsor)&&(d=[(0,l._)((0,n._)({},null==e?void 0:null===(i=e.microphone_list)||void 0===i?void 0:i[0]),{toUserId:null!==(r=null==e?void 0:null===(o=e.order_user)||void 0===o?void 0:o.id_str)&&void 0!==r?r:""})])}})),H&&(d=null==H?void 0:null===(t=H.results)||void 0===t?void 0:t.filter(e=>{var t,i;return String(null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.id_str)===String(null==s?void 0:null===(i=s.user)||void 0===i?void 0:i.id_str)},[])),Y&&(eE===k.D$.ROOMBATTLE?null==Y||null===(u=Y.team_infos)||void 0===u||null===(r=u.filter(e=>(null==e?void 0:e.team_id)==="1"))||void 0===r||null===(o=r[0])||void 0===o||null===(i=o.players)||void 0===i||i.forEach(e=>{var t;(null==e?void 0:e.title_sponsor)&&String(null==e?void 0:e.user_id)===String(null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.id_str)&&(d=[e])}):null==Y||null===(a=Y.team_infos)||void 0===a||a.forEach(e=>{var t;null==e||null===(t=e.players)||void 0===t||t.forEach(e=>{var t;(null==e?void 0:e.title_sponsor)&&String(null==e?void 0:e.user_id)===String(null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.id_str)&&(d=[e])})})),d||[]},[H,Y,D]),ey=e=>{var t,i,n,l;null==e||e.stopPropagation(),G({teamfight_id:eg?null==Y?void 0:Y.teamfight_id_str:null==H?void 0:H.battle_id_str,user:null==s?void 0:s.user,targetRoomId:null!==(l=null!==(n=null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.own_room_id)&&void 0!==n?n:null==s?void 0:null===(i=s.user)||void 0===i?void 0:i.linker_room_id)&&void 0!==l?l:null==s?void 0:s.linker_room_id,isGuestContribution:em}),null==B||B(!0)};v.useEffect(()=>s?(null==eo||eo.on(null==s?void 0:s.linkmic_id_str,eI),()=>{ev(!1),null==eo||eo.off(null==s?void 0:s.linkmic_id_str,eI)}):c(),[eI,null==s?void 0:s.linkmic_id_str,eo]);let eT=v.useMemo(()=>{if(!em||!(null==s?void 0:s.user.id_str)||!(null==H?void 0:H.battle_id))return"";let e=null==H?void 0:H.status,t=null,i=null==ei?void 0:ei.get(`${null==s?void 0:s.user.id_str}_${null==H?void 0:H.battle_id}`);return(null==H||H.results.forEach(i=>{var n,l,o;String(i.guest_id)===String(null==s?void 0:null===(n=s.user)||void 0===n?void 0:n.id_str)&&([1,4].includes(Number(e))&&(null==i?void 0:i.role)===1&&(t=Number(null==i?void 0:null===(o=i.crown_info)||void 0===o?void 0:null===(l=o.cur_grade)||void 0===l?void 0:l.level)),[1,4].includes(Number(e))&&(null==i?void 0:i.role)===2&&(t="HeartBreak"),(null==i?void 0:i.role)===0&&(t=""),2===Number(e)&&(null==i?void 0:i.role)===1&&(t="Victory"))}),i===t)?"":(null==ei||ei.set(`${null==s?void 0:s.user.id_str}_${null==H?void 0:H.battle_id}`,t),t)},[null==H?void 0:H.status,null==H?void 0:H.results,em,null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.id_str,null==H?void 0:H.battle_id]),eN=v.useMemo(()=>{if(!em)return"";let e="";return null==H||H.results.forEach(t=>{var i,n,l;String(t.guest_id)===String(null==s?void 0:null===(i=s.user)||void 0===i?void 0:i.id_str)&&((null==t?void 0:t.role)===1&&(e=Number(null==t?void 0:null===(l=t.crown_info)||void 0===l?void 0:null===(n=l.cur_grade)||void 0===n?void 0:n.level)),(null==t?void 0:t.role)===2&&(e="HeartBreak"))}),e},[s,H,em]),eA=v.useMemo(()=>(null==x?!!void 0:!!x.includes(h.V0.LinkmicPlayMode_OrderSing))||!1,[x]),eL=v.useMemo(()=>{var e;let t={};return null==D||D.user_microphone_list.forEach(e=>{var i,n,l,o,r;t[null==e?void 0:null===(i=e.order_user)||void 0===i?void 0:i.id_str]={userId:null==e?void 0:null===(n=e.order_user)||void 0===n?void 0:n.id_str,is_singing:null==e?void 0:e.is_singing,currentSingItem:null==D?void 0:D.current_sing_item,golden_microphone_icon:null==D?void 0:D.golden_microphone_icon,live_linkmic_order_sing_micro_opt:null==D?void 0:D.live_linkmic_order_sing_micro_opt,goldenCount:null===(r=e.microphone_list)||void 0===r?void 0:null===(o=r.filter(e=>e.microphone_type===f.W5.GOLDEN_MICROPHONE))||void 0===o?void 0:null===(l=o[0])||void 0===l?void 0:l.micro_phone_num}}),t[null==s?void 0:null===(e=s.user)||void 0===e?void 0:e.id_str]},[D,s]),eP=v.useCallback(e=>{e.stopPropagation(),j(E.uH.ORDER_SING)},[j]),eO=(null===(i=(null!==(a=null==H?void 0:H.results)&&void 0!==a?a:[]).filter(e=>{var t,i;return String(e.guest_id)===(null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.id_str)||String(e.guest_id_str)===(null==s?void 0:null===(i=s.user)||void 0===i?void 0:i.id_str)}))||void 0===i?void 0:i.length)>0,ek=v.useRef(),eS=(0,C.useInLiveAudioLayoutOptAB)();return s?(0,o.jsxs)("div",{onClick:M,className:u()(y.default.userContainer,N,{[y.default.dynamicAudioItem]:ea&&!ed,[y.default.audioStageUserScale]:ea&&ed,[y.default.infoNoShrink]:eS}),onMouseEnter:e=>null==q?void 0:q(e,ek),ref:ek,"data-e2e":"mic_seat",children:[(0,o.jsx)(p.b,{img:d()(s,"user.avatar_large.url_list[0]",""),isTalking:ec&&!ef,gender:null===(r=s.user)||void 0===r?void 0:r.gender,user:s,className:u()(y.default.avatar,{[y.default.userAdjust]:ea&&ed}),isLeave:e_,borderColor:U,battleIcon:eN,battleAnimation:eT,dressListInfo:e.dressListInfo,showAnchorLabel:w&&!eA,isMvp:Q,mvpIcon:X,mvpUseridRef:en,mvpChangeRef:el,titleSponsor:eh}),ed?(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(g._,{isMute:ef,noName:!0,className:y.default.userNameRight})}):(0,o.jsxs)(o.Fragment,{children:[eA&&(0,o.jsx)(I._,{className:y.default.micphoneLabel,onClick:eP,isAnchor:w&&!eA,labelInfo:eL,singV3Ab:et,user:s,position:ee,titleSponsor:eh}),es?(0,o.jsxs)("div",{style:{display:"flex",width:"100%"},children:[(0,o.jsx)("div",{style:{flex:"1 1 0%",minWidth:0},children:(0,o.jsx)(g._,{isMute:ef,className:y.default.userName,userName:d()(s,"user.nickname",""),onClick:ey})}),z&&(0,o.jsx)("div",{style:{flex:"0 0 auto",marginLeft:8},children:(0,o.jsx)(m.X,{giftNum:ep,isJoinGuestBattle:eO,onClick:ey,showGiftIcon:!W,background:W,giftLabelIcon:K,type:em?m.l.GUEST:m.l.DEFAULT,giftLabelStyle:$,isMvp:Q,isRed:J,mvpIcon:X,style:{position:"relative"},guestBattleInfo:H,user:s})})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(g._,{isMute:ef,className:y.default.userName,userName:d()(s,"user.nickname",""),onClick:ey}),z&&(0,o.jsx)(m.X,{giftNum:ep,isJoinGuestBattle:eO,onClick:ey,showGiftIcon:!W,background:W,giftLabelIcon:K,type:em?m.l.GUEST:m.l.DEFAULT,giftLabelStyle:$,isMvp:Q,isRed:J,mvpIcon:X,style:{position:"relative"},guestBattleInfo:H,user:s})]})]})]}):(0,o.jsx)(L,{type:em?A.GUEST:A.DEFAULT,cls:u()(N,{[y.default.dynamicAudioItem]:ea,[y.default.infoNoShrink]:eS}),isLock:V,joinText:F,handleClick:b||V?c():R,"data-e2e":"mic_seat"})}},90468:function(e,t,i){i.d(t,{s:function(){return T}}),i("490629"),i("706056");var n=i("320165"),l=i("469935"),o=i.n(l),r=i("101199"),u=i("502615"),a=i("788287"),d=i("160197"),s=i("950257"),c=i("551458"),v=i("291870"),_=i("941078"),f=i("991879"),m=i("396868"),p=i("542901"),g=i.p+"media/bg.6c8cd94b6860d96f.png",I=i("459759"),E=i("789034");let h={[s.yP.AUDIO_1V8]:80,[s.yP.AUDIO_1V8_STAGE]:80,[s.yP.AUDIO_GRID]:80,[s.yP.VIDEO_1V6]:42.5,[s.yP.VIDEO_DYNAMIC]:63.56,[s.yP.VIDEO_GRID]:62.45,[s.yP.VIDEO_6V6]:61,[s.yP.VIDEO_2V4V4]:50.6},y=16/9,T=e=>{let{isAdmin:t=!1,roomId:i="",layout:l,renderElement:T,className:N,isTheaterOn:A,statusText:L,teamfightInfo:P,onClickStatusBar:O,isPreview:k,incomingPlayer:S=null}=e,{eventStore:C,linkmicStore:R}=(0,p.o)(),{linkmicEvent:b}=C||{},M=r.useRef(),[V,w]=r.useState(y),{isInPunish:x,leftTeamScore:D,rightTeamScore:j}=(0,_.Z)({teamfightInfo:P}),{player:U}=(0,d.n)(),F=S||U,G=r.useCallback(()=>{var e,t;let i=null==F?void 0:null===(e=F.root)||void 0===e?void 0:e.clientWidth,n=null==F?void 0:null===(t=F.root)||void 0===t?void 0:t.clientHeight;return i&&n?i/n:y},[]),B=r.useCallback(()=>{clearTimeout(M.current),M.current=setTimeout(()=>{w(G())},50)},[]);r.useEffect(()=>(null==F||F.on(u.FP.FULLSCREEN_CHANGE,B),()=>{null==F||F.off(u.FP.FULLSCREEN_CHANGE,B)}),[]);let Y=r.useCallback(()=>{w(G())},[]);r.useEffect(()=>(window.addEventListener("resize",Y),()=>{window.removeEventListener("resize",Y)}),[]),r.useEffect(()=>{B()},[A]);let H=r.useMemo(()=>`${h[l]*y/V}%`,[V,l]),W=r.useMemo(()=>null==P?void 0:P.status,[P]),Z=r.useCallback(()=>(0,n.jsx)("div",{className:v.default.source,children:(0,n.jsx)(c.Z,{teamFightInfo:P,eggModeInfo:null==R?void 0:R.eggModeInfo,leftPKScore:D,rightPKScore:j,showAroundFaceStatus:x})}),[D,j,x,null==R?void 0:R.eggModeInfo]),K=W===a.Hj.LinkmicTeamfightStatus_PREPARE&&t,$=()=>(0,n.jsx)("div",{className:v.default.actionBar,onClick:()=>X(),children:"开始团战"}),{hideEgg:z,isMutiEggTimeUseful:q}=(0,E.Z)(),Q=r.useMemo(()=>(0,n.jsx)(I.Z,{isVideoGuropFight:!1,isGroupFight:!0,eggModeInfo:null==R?void 0:R.eggModeInfo}),[null==R?void 0:R.eggModeInfo]),J=r.useMemo(()=>{var e;return(0,n.jsxs)("div",{className:v.default.audioGridContainer,style:{width:H},children:[(0,n.jsx)("div",{className:o()(v.default.mediumAudioItem,v.default.anchorItem),children:T(0)}),(null==R?void 0:null===(e=R.eggModeInfo)||void 0===e?void 0:e.egg_info)&&q&&[a.Hj.LinkmicTeamfightStatus_PLAYING,a.Hj.LinkmicTeamfightStatus_PUNISHING].includes(W)&&Q,(0,n.jsxs)("div",{className:v.default.seatsGroupContainer,children:[(0,n.jsxs)("div",{className:v.default.topBar,children:[Z(),K?$():L&&!k&&(0,n.jsx)("div",{className:v.default.status,onClick:()=>null==O?void 0:O(),children:L})]}),[void 0,void 0].map((e,t)=>{var i;return(0,n.jsxs)("div",{className:v.default.gridsArea,children:[(null==R?void 0:null===(i=R.eggModeInfo)||void 0===i?void 0:i.egg_info)&&q&&[a.Hj.LinkmicTeamfightStatus_PLAYING,a.Hj.LinkmicTeamfightStatus_PUNISHING].includes(W)&&(0,n.jsxs)("div",{className:z?v.default.hide:v.default.show,children:[(0,n.jsx)("div",{className:v.default.eggLeftSide,style:{backgroundImage:`${0===t?"linear-gradient(to right, rgba(252, 28, 109, 0.56), rgba(255, 42, 119, 0))":"linear-gradient(to right, rgba(39, 164, 255, 0.67), rgba(39, 164, 255, 0))"}`}}),(0,n.jsx)("div",{className:v.default.eggRightSide,style:{backgroundImage:`${0===t?"linear-gradient(to right, rgba(252, 28, 109, 0.56), rgba(255, 42, 119, 0))":"linear-gradient(to right, rgba(39, 164, 255, 0.67), rgba(39, 164, 255, 0))"}`}})]}),(0,n.jsxs)("div",{className:v.default.gridsBox,children:[(0,n.jsx)("div",{className:v.default.grid,children:[void 0,void 0].map((e,i)=>(0,n.jsx)("div",{className:v.default.mediumAudioItem,children:T(4*i+1+2*t)},`${t}_${i}`))}),(0,n.jsx)("div",{className:v.default.grid,children:[void 0,void 0].map((e,i)=>(0,n.jsx)("div",{className:v.default.mediumAudioItem,children:T(4*i+2+2*t)},`${t}_${i}`))})]})]},t)})]})]})},[T,H,L,Z,W,K,null==R?void 0:R.eggModeInfo]),X=()=>{null==b||b.liveGroupFightStart(),(0,f.lV)({room_id:i}).then(e=>{var t,i,n,l;(null==e?void 0:null===(i=e.data)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.prompts)?(m.F.info(null==e?void 0:null===(l=e.data)||void 0===l?void 0:null===(n=l.data)||void 0===n?void 0:n.prompts,null==F?void 0:F.root),null==b||b.liveGroupFightStartSuccess("fail_member_cnt")):null==b||b.liveGroupFightStartSuccess("success")})};return r.useEffect(()=>{null==R||R.setLayoutBackgroundImg(l===s.yP.AUDIO_1V8||l===s.yP.AUDIO_GRID||l===s.yP.AUDIO_1V8_STAGE?g:"")},[l]),(0,n.jsx)("div",{className:o()(v.default.container,N,{[v.default.audioBackground]:[s.yP.AUDIO_GRID,s.yP.AUDIO_1V8_STAGE,s.yP.AUDIO_1V8,s.yP.AUDIO_DOUBLE_C].includes(l)}),children:(l===s.yP.AUDIO_1V8||l===s.yP.AUDIO_GRID||l===s.yP.AUDIO_1V8_STAGE)&&J})}},19377:function(e,t,i){i.d(t,{PY:function(){return L}}),i(490629),i(706056);var n=i(320165),l=i(469935),o=i.n(l),r=i(101199),u=i(502615),a=i(160197),d=i(454194),s=i(950257),c=i(70794),v=i(991879),_=i(473682),f=i(156674),m=i.n(f),p=i(788287),g=i(110934),I=i(551458),E=i(396868),h=i(542901),y=i(459759),T=i(789034);let N={[s.yP.AUDIO_1V8]:50.4,[s.yP.AUDIO_GRID]:42,[s.yP.VIDEO_1V6]:42.5,[s.yP.VIDEO_1V8]:42.5,[s.yP.VIDEO_DYNAMIC]:63.56,[s.yP.VIDEO_GRID]:62.45,[s.yP.VIDEO_6V6]:61,[s.yP.VIDEO_1_V_8]:63.56,[s.yP.VIDEO_1_V_6]:63.56,[s.yP.VIDEO_1_V_3]:63.56,[s.yP.VIDEO_DYNAMIC_FLOAT]:32,[s.yP.VIDEO_T1_V_B8]:43},A=16/9,L=e=>{let{layout:t,renderElement:i,className:l,backgroundImg:f,isTheaterOn:L,micSeats:P,teamfightInfo:O,ext:k={},isAdmin:S=!1,roomId:C,onClickStatusBar:R,isPreview:b=!1,incomingPlayer:M=null}=e,{eventStore:V,linkmicStore:w}=(0,h.o)(),{linkmicEvent:x}=V||{},{isInPunish:D,leftTeamScore:j,rightTeamScore:U,statusTexting:F,redGroupSeats:G}=(0,g.Z)({teamfightInfo:O}),B=r.useRef(),[Y,H]=r.useState(A),{player:W}=(0,a.n)(),Z=M||W,K=r.useCallback(()=>{var e,t;let i=null==Z?void 0:null===(e=Z.root)||void 0===e?void 0:e.clientWidth,n=null==Z?void 0:null===(t=Z.root)||void 0===t?void 0:t.clientHeight;return i&&n?i/n:A},[]),$=r.useCallback(()=>{clearTimeout(B.current),B.current=setTimeout(()=>{H(K())},50)},[]);r.useEffect(()=>(null==Z||Z.on(u.FP.FULLSCREEN_CHANGE,$),()=>{null==Z||Z.off(u.FP.FULLSCREEN_CHANGE,$)}),[]);let z=r.useCallback(()=>{H(K())},[]);r.useEffect(()=>(window.addEventListener("resize",z),()=>{window.removeEventListener("resize",z)}),[]),r.useEffect(()=>{$()},[L]);let q=r.useMemo(()=>`${N[t]*A/Y}%`,[Y,t]),Q=r.useMemo(()=>null==O?void 0:O.status,[O]),{hideEgg:J,isMutiEggTimeUseful:X}=(0,T.Z)(),ee=r.useMemo(()=>(0,n.jsx)(y.Z,{isVideoGuropFight:!0,isGroupFight:!0,eggModeInfo:null==w?void 0:w.eggModeInfo}),[null==w?void 0:w.eggModeInfo]);r.useEffect(()=>{Q===p.Hj.LinkmicTeamfightStatus_FINISHED&&(null==w||w.setEggModeInfo({}))},[Q]);let et=r.useCallback(()=>(0,n.jsx)("div",{className:d.default.sourceBar,children:[p.Hj.LinkmicTeamfightStatus_PLAYING,p.Hj.LinkmicTeamfightStatus_PUNISHING].includes(Q)?(0,n.jsx)(I.Z,{teamFightInfo:O,eggModeInfo:null==w?void 0:w.eggModeInfo,leftPKScore:j,rightPKScore:U,showAroundFaceStatus:D}):(0,n.jsx)("div",{className:d.default.emptyBar})}),[j,U,D,q,Q]),ei=()=>{null==x||x.liveGroupFightStart(),(0,v.lV)({room_id:C}).then(e=>{var t,i,n,l;(null==e?void 0:null===(i=e.data)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.prompts)?(E.F.info(null==e?void 0:null===(l=e.data)||void 0===l?void 0:null===(n=l.data)||void 0===n?void 0:n.prompts,null==Z?void 0:Z.root),null==x||x.liveGroupFightStartSuccess("fail_member_cnt")):null==x||x.liveGroupFightStartSuccess("success")})},en=()=>(0,n.jsx)("div",{className:d.default.actionBar,onClick:e=>{ei()},children:"开始团战"}),el=Q===p.Hj.LinkmicTeamfightStatus_PREPARE&&S,eo=r.useMemo(()=>{var e,t;return(0,n.jsxs)("div",{className:o()(d.default.videoT1B8Container),style:{width:q},children:[(0,n.jsx)("div",{className:o()(d.default.anchor,"__clairvoyance"),children:i(0)}),(null==w?void 0:null===(e=w.eggModeInfo)||void 0===e?void 0:e.egg_info)&&X&&[p.Hj.LinkmicTeamfightStatus_PLAYING,p.Hj.LinkmicTeamfightStatus_PUNISHING].includes(Q)&&ee,!b&&(0,n.jsxs)("div",{className:d.default.topBar,children:[et(),el?en():F&&(0,n.jsx)("div",{className:d.default.status,onClick:e=>{null==R||R(e)},children:F})]}),(0,n.jsxs)("div",{className:d.default.guests,children:[(null==w?void 0:null===(t=w.eggModeInfo)||void 0===t?void 0:t.egg_info)&&X&&[p.Hj.LinkmicTeamfightStatus_PLAYING,p.Hj.LinkmicTeamfightStatus_PUNISHING].includes(Q)&&(0,n.jsxs)("div",{className:`${d.default.eggModeAnimate} ${J?d.default.hide:d.default.show}`,children:[(0,n.jsxs)("div",{className:d.default.eggModeAnimateChild,children:[(0,n.jsx)("div",{className:d.default.eggLeftSide,style:{backgroundImage:"linear-gradient(to right, rgba(252, 28, 109, 0.56), rgba(255, 42, 119, 0))"}}),(0,n.jsx)("div",{className:d.default.eggRightSide,style:{backgroundImage:"linear-gradient(to right, rgba(252, 28, 109, 0.56), rgba(255, 42, 119, 0))"}})]}),(0,n.jsxs)("div",{className:d.default.eggModeAnimateChild,children:[(0,n.jsx)("div",{className:d.default.eggLeftSide,style:{backgroundImage:"linear-gradient(to right, rgba(39, 164, 255, 0.67), rgba(39, 164, 255, 0))"}}),(0,n.jsx)("div",{className:d.default.eggRightSide,style:{backgroundImage:"linear-gradient(to right, rgba(39, 164, 255, 0.67), rgba(39, 164, 255, 0))"}})]})]}),[void 0,void 0].map((e,t)=>(0,n.jsx)("div",{className:d.default.gridRow,children:[void 0,void 0,void 0,void 0].map((e,l)=>{var r,u;let a=l+1+4*t;return(0,n.jsx)("div",{className:o()(d.default.videoItem,"videoItem","__clairvoyance",{[d.default.red]:G.includes(a)&&!(null==P?void 0:null===(r=P[a])||void 0===r?void 0:r.user),[d.default.blue]:!G.includes(a)&&!(null==P?void 0:null===(u=P[a])||void 0===u?void 0:u.user)}),children:i(a)},`${t}_${l}`)})},t))]})]})},[i,q,et,F,en,P,b,null==w?void 0:w.eggModeInfo]),[er,eu]=r.useState({}),ea=r.useRef(null);r.useEffect(()=>(ea.current=setTimeout(()=>{eu({})},300),()=>{ea.current&&clearTimeout(ea.current)}),[Y,t]);let ed=r.useMemo(()=>{try{var e;let t=document.getElementsByClassName("__clairvoyance");return null===(e=m()(t))||void 0===e?void 0:e.map(e=>(0,_._q)(null==Z?void 0:Z.root,e))}catch(e){return[]}},[P,Y,t,er]);return(0,n.jsxs)("div",{className:o()(d.default.container,l,{[d.default.audioBackground]:[s.yP.AUDIO_GRID,s.yP.AUDIO_1V8,s.yP.AUDIO_DOUBLE_C].includes(t),[d.default.video6v6Background]:t===s.yP.VIDEO_6V6}),children:[(e=>{if(e===s.yP.VIDEO_T1_V_B8)return eo;return null})(t),t===s.yP.VIDEO_T1_V_B8&&f&&(0,n.jsx)(c.Z,{backgoundImgSrc:f,clairvoyancePaths:ed})]})}},460301:function(e,t,i){i.d(t,{$:function(){return $},Z:function(){return z}});var n=i("629686");i("679308"),i("490629"),i("706056"),i("932651"),i("88856");var l=i("320165"),o=i("101199"),r=i("502615"),u=i("908219"),a=i.n(u),d=i("146778"),s=i("750239"),c=i("110798"),v=i("889707"),_=i("950257"),f=i("960477"),m=i("476848"),p=i("160197"),g=i("815848"),I=i.p+"media/groupFightBg.6c8cd94b6860d96f.png",E=i("859099"),h=i("46892"),y=i("941078"),T=i("433063"),N=i("90468");i("683656"),i("759943");var A=i("877991"),L=i("198412"),P=i.n(L),O=i("323401");let k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.includes("https")?e:e.replace("http","https")},S=(e,t)=>{let{isGroupFight:i=!1,redGroupSeats:n=[],isGuestBattle:l=!1}=t;return l?"加入作战":i?`加入${n.includes(e)?"红队":"蓝队"}`:O.p.JOIN_CHAT},C=(e,t,i,n)=>{var l,o,r,u,a,d,s,c,v,_,f,m,p;let{isGuestBattle:g=!1}=n,I=g?k(P()(e,"ui_info.score_icon.url_list[0]","")):"",E={},h=null==i?void 0:null===(l=i.user)||void 0===l?void 0:l.id_str,y=null==e?void 0:null===(o=e.results)||void 0===o?void 0:o.filter(e=>String(e.guest_id)===h||String(e.guest_id_str)===h)[0];if(!y||y.role===A.L0.GuestBattlePlayerRoleNone)return{giftIcon:I,giftStyle:E};let T=String(null!==(a=null==y?void 0:null===(u=y.crown_info)||void 0===u?void 0:null===(r=u.cur_grade)||void 0===r?void 0:r.level)&&void 0!==a?a:-1),N=null==y?void 0:y.role;if(E={width:"22px",height:"22px",maxWidth:"22px",maxHeight:"22px",position:"absolute",top:"-2px",left:"-4px"},N===A.L0.GuestBattlePlayerRoleWinner){let e=null!==(c=null==t?void 0:null===(s=t.guest_battle_theme_element)||void 0===s?void 0:null===(d=s.first_config)||void 0===d?void 0:d.grade_configs)&&void 0!==c?c:[];e.length&&(I=k(null===(_=e[T])||void 0===_?void 0:null===(v=_.play_value_icon)||void 0===v?void 0:v.url_list[0]))}else{let e=null==t?void 0:null===(m=t.guest_battle_theme_element)||void 0===m?void 0:null===(f=m.straggler_config)||void 0===f?void 0:f.grade_config;(null==e?void 0:e.play_value_icon)&&(I=k(null==e?void 0:null===(p=e.play_value_icon)||void 0===p?void 0:p.url_list[0]))}return{giftIcon:I,giftStyle:E}};var R=i("991879"),b=i("484002"),M=i("891297"),V=i("19377"),w=i.p+"media/guestBattleBg.7bd8fea37dfd8ff2.png",x=i("310732"),D=i("21198"),j=i("747950"),U=i("855436"),F=i("684864");i("362051"),i("240148");var G=i("746958");let B=e=>{let{setUiLayout:t,setIsNewVideoLinkmicRoom:i,newSeiContentRef:n}=e,{player:l}=(0,p.n)(),u=(0,o.useCallback)(e=>{if(100===e.code)try{var o,r;let u=new TextDecoder().decode(e.content),a=(0,G.KR)(u);try{null==l||null===(r=l.updateConfig)||void 0===r||r.call(l,{baseConfig:{seiOnDemand:!0}})}catch(e){}if(null==a?void 0:a.app_data){let{ui_layout:e,interactive_scene:l}=JSON.parse(a.app_data)||{};20===l?i(!0):i(!1),JSON.stringify(a)!==JSON.stringify(n.current)&&(n.current=a),e&&t(e)}else(null==a?void 0:null===(o=a.source)||void 0===o?void 0:o.includes("TTLiveSDK"))&&(t(-1),i(!1))}catch(e){}},[l]);(0,o.useEffect)(()=>(l.on(r.FP.SEI,u),()=>{if(!!l)l.off(r.FP.SEI,u)}),[])};var Y=i("116310");let H=(0,U.ZP)(()=>i.e("86345").then(i.bind(i,794660)),{ssr:!1}),W=(0,h.Pe)(),Z=e=>E.Z.get(`${W}/webcast/linkmic_audience/get_play_mode_info/`,{params:e}),K=e=>E.Z.get(`${W}/webcast/dress/list/`,{params:e}),$=e=>{var t,i;let{anchorId:u,roomId:E,className:h,linkerMap:A={},functionType2:L,onLayoutChange:P,dressListAll:O=[],linkmicVideoEqualLayoutFrameOpt:k="0",setIsPk:U,layout:G,disableLynx:W=!1}=e,$=!!(0,Y.yk)()||e.disableClairvoyance,{player:z}=(0,p.n)(),[q,Q]=o.useState(G),[J,X]=o.useState(!1),ee=o.useRef({}),[et,ei]=o.useState(c.Fk),[en,el]=o.useState({}),eo=o.useRef({}),er=o.useRef({}),[eu,ea]=o.useState(!1),ed=o.useRef(void 0);ed.current=q;let[es,ec]=o.useState(0),ev=o.useRef(new D.a),[e_,ef]=o.useState(),[em,ep]=o.useState(),eg=null==e_?void 0:null===(t=e_.data)||void 0===t?void 0:t.teamfight_info,eI=null==e_?void 0:null===(i=e_.data)||void 0===i?void 0:i.guest_battle_info,eE=o.useMemo(()=>{var e,t;return Number.isInteger(null==em?void 0:null===(e=em.data)||void 0===e?void 0:e.gift_id)&&Number(null==em?void 0:null===(t=em.data)||void 0===t?void 0:t.gift_id)>0},[null==em?void 0:em.data]),eh=o.useMemo(()=>void 0!==q,[q]);o.useEffect(()=>{E&&eh&&(Z({room_id:E,_point:2}).then(e=>{ef(null==e?void 0:e.data)}),(0,R.RO)({room_id:E}).then(e=>{ep(null==e?void 0:e.data)}))},[E,eh]),o.useEffect(()=>{let e=null==eI?void 0:eI.dress_id;if(""!==e){let t=null==O?void 0:O.find(t=>(null==t?void 0:t.dress_id)===e);t?el(t):K({dress_id:e}).then(e=>{var t,i,n,l;if(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.data){let t=null!==(l=null==e?void 0:null===(n=e.data)||void 0===n?void 0:null===(i=n.data)||void 0===i?void 0:i.dress_list)&&void 0!==l?l:[];t.length&&el(t[0])}})}},[null==eI?void 0:eI.dress_id]),o.useEffect(()=>{A[5]&&[21,22].includes(es)?22===es?Q(_.yP.AUDIO_GRID):26===es?Q(_.yP.AUDIO_DOUBLE_C):25===es?Q(_.yP.MATE_CUSTOM):Q(_.yP.AUDIO_1V8):A[16]?Q(_.yP.VIDEO_6V6):A[20]&&X(!0)},[A,es]);let ey=o.useCallback(()=>et,[ei,et]),eT=o.useMemo(()=>(0,b.Qx)(et),[et]),eN=o.useCallback(a()(()=>(0,g.m)(E,u).then(e=>{let{data:{data:t,status_code:i}}=e;if(0===i){var n,l,o,r,u,a;let e={},i={};return ec(null==t?void 0:null===(n=t.linker_base_info)||void 0===n?void 0:n.ui_layout),null==t||null===(l=t.user)||void 0===l||l.forEach(t=>{t.linkmic_id_str&&(e[t.linkmic_id_str]=t)}),ed.current===_.yP.VIDEO_6V6&&(null==t||null===(u=t.linker_content_map[null===(a=Object.keys(null==t?void 0:t.linker_content_map))||void 0===a?void 0:a[0]])||void 0===u||null===(r=u.linked_users)||void 0===r||r.map(t=>{t.user_position=t.user_position+_.Lf[q],t.linkmic_id_str&&(e[t.linkmic_id_str]=t)})),null==t||null===(o=t.locked_positions)||void 0===o||o.forEach(e=>{("number"==typeof e.position||"string"==typeof e.position)&&(i[e.position]=e)}),eo.current=Object.assign({},eo.current,e),er.current=i,Promise.resolve()}}),3e3),[E,u,q]),{isGroupFight:eA,isGroupPlaying:eL,isInPunish:eP,redGroupSeats:eO,statusTexting:ek}=(0,y.Z)({teamfightInfo:eg,linkMicSeats:et}),{isGuestBattle:eS}=(0,T.Z)({guestBattleInfo:eI});B({setUiLayout:ec,setIsNewVideoLinkmicRoom:X,newSeiContentRef:ee}),o.useEffect(()=>{let e=Object.keys(A);if(!(e.length<=0)&&(1!==e.length||"4"!==e[0])&&(1!==e.length||"20"!==e[0]))return eN().then(()=>{let e=(0,n._)({},c.Fk);Object.keys(eo.current).forEach(t=>{let i=eo.current[t];e[i.user_position]={idx:i.user_position,user:i}}),ei(e)}).finally(()=>{ea(!0)}),()=>{(null==eN?void 0:eN.cancel)&&(null==eN||eN.cancel())}},[]);let eC=o.useCallback(()=>eo.current,[]),eR=o.useCallback(()=>er.current,[]);o.useEffect(()=>{null==P||P(q)},[q]),(0,c.wz)({setLayout:Q,enable:!0,setSeats:ei,getSeats:ey,layout:q,getUsers:eC,getPositions:eR,onUsersUpdate:eu&&eN,roomIdStr:E,audioPower:ev.current,setIsPk:U});let eb=o.useCallback(()=>{Q(void 0)},[]);o.useEffect(()=>{if(q===_.yP.AUDIO_1V8||q===_.yP.AUDIO_1V8_STAGE||q===_.yP.AUDIO_GRID||q===_.yP.AUDIO_DOUBLE_C||q===_.yP.VIDEO_1V6||q===_.yP.VIDEO_1V8||q===_.yP.VIDEO_2V4V4||q===_.yP.VIDEO_GRID||q===_.yP.VIDEO_6V6||q===_.yP.VIDEO_DYNAMIC||q===_.yP.VIDEO_DYNAMIC_FLOAT||q===_.yP.VIDEO_1_V_3||q===_.yP.VIDEO_1_V_6||q===_.yP.VIDEO_1_V_8||q===_.yP.VIDEO_T1_V_B8||q===_.yP.MATE_CUSTOM){var e;ea(!0),(null===(e=Object.keys(eo.current))||void 0===e?void 0:e.length)===0&&eN().then(()=>{let e=q===_.yP.MATE_CUSTOM?{}:(0,n._)({},c.Fk);q===_.yP.AUDIO_DOUBLE_C&&(e[9]={idx:9}),Object.keys(eo.current).forEach(t=>{let i=eo.current[t];e[i.user_position]={idx:i.user_position,user:i}}),ei(e)}).finally(()=>{ea(!0)})}else ea(!1)},[q]),o.useEffect(()=>(z.on(r.FP.CHANGE_URL,eb),()=>{z.off(r.FP.CHANGE_URL,eb)}),[]);let eM=o.useCallback(e=>{var t,i,n,o,r,a,d,c;let f=eT[e];if(q===_.yP.AUDIO_1V8||q===_.yP.AUDIO_1V8_STAGE||q===_.yP.AUDIO_GRID||q===_.yP.AUDIO_DOUBLE_C){let r=S(e,{isGroupFight:eA,isGuestBattle:eS,redGroupSeats:eO}),{giftIcon:a,giftStyle:d}=C(eI,en,null==f?void 0:f.user,{isGuestBattle:eS});return(0,l.jsx)(v.X,{user:null==f?void 0:f.user,isLock:(null==f?void 0:null===(t=f.info)||void 0===t?void 0:t.status)===s.U.LinkmicPositionStatus_Locked,dressListInfo:en,giftLabelBackgroundColor:[eL,eP].some(Boolean)&&0!==e?eO.includes(e)?"rgba(248, 42, 116, 1)":"rgba(24, 158, 254, 1)":void 0,dynamic:!eA&&(0,F.D)().includes(Number(es)),joinText:r,giftLabelIcon:a,giftLabelStyle:d,setFloatModal:()=>null,showAnchorLabel:(0,b.ic)(eT)&&String(null===(o=eT[e])||void 0===o?void 0:null===(n=o.user)||void 0===n?void 0:null===(i=n.user)||void 0===i?void 0:i.id_str)===String(u),audioPower:ev.current})}if(q===_.yP.VIDEO_1V6||q===_.yP.VIDEO_1V8||q===_.yP.VIDEO_2V4V4||q===_.yP.VIDEO_DYNAMIC||q===_.yP.VIDEO_GRID||q===_.yP.VIDEO_6V6||q===_.yP.VIDEO_DYNAMIC_FLOAT||q===_.yP.VIDEO_1_V_8||q===_.yP.VIDEO_1_V_6||q===_.yP.VIDEO_1_V_3||q===_.yP.VIDEO_T1_V_B8||q===_.yP.MATE_CUSTOM)return q!==_.yP.MATE_CUSTOM||(null==f?void 0:f.user)?(0,l.jsx)(m.W,{idx:e,isLock:(null==f?void 0:null===(r=f.info)||void 0===r?void 0:r.status)===s.U.LinkmicPositionStatus_Locked,user:null==f?void 0:f.user,dressListInfo:en,layout:q,position:e,isPreview:!0,setFloatModal:()=>null,showAnchorLabel:(0,b.ic)(eT)&&String(null===(c=eT[e])||void 0===c?void 0:null===(d=c.user)||void 0===d?void 0:null===(a=d.user)||void 0===a?void 0:a.id_str)===String(u),joinText:S(e,{isGroupFight:eA,isGuestBattle:eS,redGroupSeats:eO}),audioPower:ev.current,style:"1"===k&&(0,F.D)().includes(es)?{border:"2px solid #140731"}:void 0}):null;return null},[q,eT,eI,en,eA,eS,u,es]),eV=(0,j.R)(et,u,q),ew=o.useMemo(()=>F.dr.includes(Number(es)),[es]);if(J)return W?null:(0,l.jsx)(H,{uiLayout:es,roomId:E,anchorId:u,newSeiContentRef:ee});if(eA)return q===_.yP.VIDEO_T1_V_B8?(0,l.jsx)(V.PY,{layout:q,count:Object.keys(et).length,renderElement:eM,teamfightInfo:eg,statusText:ek,micSeats:et,roomId:E,backgroundImg:I,isPreview:!0}):(0,l.jsx)(N.s,{className:h,layout:q,count:Object.keys(et).length,renderElement:eM,statusText:ek,isPreview:!0});return(0,l.jsx)(l.Fragment,{children:ew?(0,l.jsx)(M.X0,{idPrefix:"preview",className:h,renderElement:eM,layout:es,linkers:eV,incomingPlayer:z}):(0,l.jsx)(f.S,{className:h,layout:q,count:Object.keys(et).length,renderElement:eM,isGuestBattle:eS,backgroundImg:eS?w:[_.yP.AUDIO_1V8_STAGE,_.yP.AUDIO_1V8,_.yP.AUDIO_GRID,_.yP.AUDIO_DOUBLE_C].includes(q)&&eE?d:[_.yP.AUDIO_1V8_STAGE,_.yP.AUDIO_1V8,_.yP.AUDIO_GRID,_.yP.AUDIO_DOUBLE_C].includes(q)&&!eE?x:null,micSeats:eT,ext:{showVideoDynamicFloatLayoutJoinBtn:!1},linkers:eV,uiLayout:es,linkmicVideoEqualLayoutFrameOpt:k,disableClairvoyance:$})})};var z=$},324266:function(e,t,i){i.d(t,{D:function(){return u}}),i(490629);var n=i(320165),l=i(101199),o=i(305515),r=i(492561);let u=e=>{let{messageInstance:t,setIsEnterNewLink:i,hideTip:u=!1}=e,[a,d]=l.useState(!1);return(0,l.useEffect)(()=>{if(t){var e,n;return null===(n=t.wrds)||void 0===n?void 0:null===(e=n.on)||void 0===e?void 0:e.call(n,"LinkmicAudienceChangeRoomMessage","",e=>{let{method:t,payload:n}=e;if(!!t&&!!n)switch(Number(n.message_type)){case o.SE.LinkmicAudienceChangeRoomMessageType_EnterChatRoom:var l;if(null==i||i(!0),u)return;let r=(null==n?void 0:null===(l=n.enter_chat_room_content)||void 0===l?void 0:l.random_duration)||3;d(!0),setTimeout(()=>{d(!1)},1e3*r);break;case o.SE.LinkmicAudienceChangeRoomMessageType_EnterChatRoom:null==i||i(!1)}})}},[t]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(r.Z,{visible:a,text:"主播正在进入合演直播间",useCountdown:!1})})}},60444:function(e,t,i){i.d(t,{U:function(){return l},z:function(){return n}});let n=[1,2,5,6],l=[3,4,7,8]},305515:function(e,t,i){i.d(t,{SE:function(){return l},dX:function(){return n}});var n={LinkmicInstructionMessageType_Unknown:0,0:"LinkmicInstructionMessageType_Unknown",LinkmicInstructionMessageType_TurnOn:1,1:"LinkmicInstructionMessageType_TurnOn",LinkmicInstructionMessageType_Finish:2,2:"LinkmicInstructionMessageType_Finish",LinkmicInstructionMessageType_Invite:3,3:"LinkmicInstructionMessageType_Invite",LinkmicInstructionMessageType_Reply:4,4:"LinkmicInstructionMessageType_Reply",LinkmicInstructionMessageType_Permit:5,5:"LinkmicInstructionMessageType_Permit",LinkmicInstructionMessageType_WaitingListChange:6,6:"LinkmicInstructionMessageType_WaitingListChange",LinkmicInstructionMessageType_Silence:7,7:"LinkmicInstructionMessageType_Silence",LinkmicInstructionMessageType_UnSilence:8,8:"LinkmicInstructionMessageType_UnSilence",LinkmicInstructionMessageType_ConfirmUnSilence:9,9:"LinkmicInstructionMessageType_ConfirmUnSilence",LinkmicInstructionMessageType_Enter:10,10:"LinkmicInstructionMessageType_Enter",LinkmicInstructionMessageType_KickOut:11,11:"LinkmicInstructionMessageType_KickOut",LinkmicInstructionMessageType_ApplyRankChange:12,12:"LinkmicInstructionMessageType_ApplyRankChange",LinkmicInstructionMessageType_UpdateLinkTypeApply:13,13:"LinkmicInstructionMessageType_UpdateLinkTypeApply",LinkmicInstructionMessageType_UpdateLinkTypeReply:14,14:"LinkmicInstructionMessageType_UpdateLinkTypeReply",LinkmicInstructionMessageType_ChangeMediaInfo:15,15:"LinkmicInstructionMessageType_ChangeMediaInfo",LinkmicInstructionMessageType_RTCAction:16,16:"LinkmicInstructionMessageType_RTCAction",LinkmicInstructionMessageType_EnlargeGuestApply:17,17:"LinkmicInstructionMessageType_EnlargeGuestApply",LinkmicInstructionMessageType_EnlargeGuestReply:18,18:"LinkmicInstructionMessageType_EnlargeGuestReply",LinkmicInstructionMessageType_EnlargeGuestInvite:19,19:"LinkmicInstructionMessageType_EnlargeGuestInvite",LinkmicInstructionMessageType_ApplyStrongReminder:20,20:"LinkmicInstructionMessageType_ApplyStrongReminder",LinkmicInstructionMessageType_LiveGuestFinishRoomToast:21,21:"LinkmicInstructionMessageType_LiveGuestFinishRoomToast",LinkmicInstructionMessageType_AudienceLeaveChatRoom:22,22:"LinkmicInstructionMessageType_AudienceLeaveChatRoom"},l={LinkmicAudienceChangeRoomMessageType_Unknown:0,0:"LinkmicAudienceChangeRoomMessageType_Unknown",LinkmicAudienceChangeRoomMessageType_EnterChatRoom:1,1:"LinkmicAudienceChangeRoomMessageType_EnterChatRoom",LinkmicAudienceChangeRoomMessageType_LeaveChatRoom:2,2:"LinkmicAudienceChangeRoomMessageType_LeaveChatRoom"}},110934:function(e,t,i){i.d(t,{Y:function(){return f},Z:function(){return m}});var n=i("542901"),l=i("320165");i("101199");var o=i("890710"),r=i("469935"),u=i.n(r),a=i("901393"),d=i("556351"),s=i("744334");let c=e=>{let{title:t,content:i,confirmBtnText:n="确定",closeBtnText:o="取消",onConfirm:r,onClose:c,className:v}=e;return(0,l.jsx)(d.Z,{visible:!0,className:u()({[s.default.mask]:!0,[v]:!!v}),title:t,onCancel:c,closeable:!1,children:(0,l.jsxs)("div",{className:s.default.wrap,children:[(0,l.jsx)("div",{className:s.default.content,children:i}),(0,l.jsxs)("div",{className:s.default.operation,children:[(0,l.jsx)(a.zx,{type:a.L$.secondary,onClick:()=>{c&&c()},children:o}),(0,l.jsx)(a.zx,{onClick:()=>{r&&r()},children:n})]})]})})},v=function(){let e,t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{elementClass:n="confirm-modal"}=i,r=()=>{e&&t&&(null==t||t.classList.remove(n),o.unmountComponentAtNode(t),e.removeChild(t),e.style.overflow="")};return{showModal:function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{title:u,content:a,confirmBtnText:d,closeBtnText:s,onConfirm:v,onClose:_,className:f}=i,m=async()=>{v&&await v(),r()},p=async()=>{_&&await _(),r()};!(t=(e=document.body).querySelector(`.${n}`))&&((t=document.createElement("div")).classList.add(n),e.appendChild(t),e.style.overflow="hidden",o.render((0,l.jsx)(c,{title:u,content:a,confirmBtnText:d,closeBtnText:s,onConfirm:m,onClose:p,className:f}),t))},destroyModal:r}};var _=i("941078"),f={Red:"1",Blue:"2"},m=()=>{let{linkmicStore:{teamfightInfo:e,linkMicSeats:t}}=(0,n.o)(),{isGroupFight:i,isRoomBattle:l,statusTexting:o,pickEmptySeatPositionByGroup:r,groupMemberCnts:u,willInterruptWithPosQuit:a,leftTeamScore:d,rightTeamScore:s,status:c,countDown:f,isInPunish:m,isGroupPlaying:p,redGroupSeats:g,blueGroupSeats:I}=(0,_.Z)({teamfightInfo:e,linkMicSeats:t}),{showModal:E}=v();return{isGroupFight:i,isRoomBattle:l,statusTexting:o,pickEmptySeatPositionByGroup:r,groupMemberCnts:u,willInterruptWithPosQuit:a,exitGameConfirm:(e,t)=>{if(!t)return;let i="1"===String(t)?"红队":"蓝队";E({title:`确认退出${i}吗`,content:`退出后${i}人数为 0,团战将自动结束`,onConfirm:()=>{e()}})},leftTeamScore:d,rightTeamScore:s,status:c,countDown:f,isInPunish:m,isGroupPlaying:p,redGroupSeats:g,blueGroupSeats:I}}},941078:function(e,t,i){i.d(t,{Z:function(){return a}}),i("591964"),i("706056"),i("490629");var n=i("101199"),l=i("788287"),o=i("746958"),r=()=>{let e=n.useRef(),[t,i]=n.useState(0),l=n.useCallback((t,n)=>{o(),i(t),e.current=setInterval(()=>{i(t=>t<=0?(null==n||n(),clearInterval(e.current),0):t-1)},1e3)},[]),o=n.useCallback(()=>{i(0),e.current&&(clearInterval(e.current),e.current=void 0)},[]);return n.useEffect(()=>()=>{e.current&&(i(0),clearInterval(e.current),e.current=void 0)},[]),{clearCountDown:o,startCountDown:l,countDown:t,countDownIntervelRef:e}},u=i("60444"),a=e=>{let{teamfightInfo:t,linkMicSeats:i}=e,a=n.useMemo(()=>(null==t?void 0:t.type)===l.yw.LinkmicTeamfightType_TWO_TEAM&&(null==t?void 0:t.status)!==l.Hj.LinkmicTeamfightStatus_FINISHED&&(null==t?void 0:t.status)!==l.Hj.LinkmicTeamfightStatus_NONE,[t]),d=n.useMemo(()=>(null==t?void 0:t.type)===l.yw.LinkmicTeamfightType_ROOM_BATTLE&&(null==t?void 0:t.status)!==l.Hj.LinkmicTeamfightStatus_FINISHED&&(null==t?void 0:t.status)!==l.Hj.LinkmicTeamfightStatus_NONE,[t]),s=n.useMemo(()=>(null==t?void 0:t.type)===l.yw.LinkmicTeamfightType_TWO_TEAM&&(null==t?void 0:t.status)===l.Hj.LinkmicTeamfightStatus_PLAYING,[t]),c=n.useMemo(()=>(null==t?void 0:t.type)===l.yw.LinkmicTeamfightType_TWO_TEAM&&(null==t?void 0:t.status)===l.Hj.LinkmicTeamfightStatus_PUNISHING,[t]),{countDown:v,startCountDown:_}=r(),{countDown:f,startCountDown:m}=r(),p=n.useMemo(()=>{var e;let i=null==t?void 0:null===(e=t.team_infos)||void 0===e?void 0:e.find(e=>"1"===String(null==e?void 0:e.team_id)),n=Number(null==i?void 0:i.score)||0;return{teamScore:n,score:n,scoreBlur:null==i?void 0:i.score_fuzzy,teamScoreBlur:null==i?void 0:i.score_fuzzy}},[null==t?void 0:t.team_infos]),g=n.useMemo(()=>{var e;let i=null==t?void 0:null===(e=t.team_infos)||void 0===e?void 0:e.find(e=>"2"===String(null==e?void 0:e.team_id)),n=Number(null==i?void 0:i.score)||0;return{teamScore:n,score:n,scoreBlur:null==i?void 0:i.score_fuzzy,teamScoreBlur:null==i?void 0:i.score_fuzzy}},[null==t?void 0:t.team_infos]),I=n.useCallback(e=>("1"===e?u.z:u.U).find(e=>{var t;return!(null===(t=i[e])||void 0===t?void 0:t.user)}),[i]),E=n.useMemo(()=>[u.z,u.U].map(e=>e.reduce((e,t)=>{var n;return e+((null==i?void 0:null===(n=i[t])||void 0===n?void 0:n.user)?1:0)},0)),[i]),h=n.useCallback((e,i)=>{if((null==t?void 0:t.status)===l.Hj.LinkmicTeamfightStatus_PLAYING){let t=u.z.includes(e),[n,l]=E;if((t?n:l)===1&&(!i||u.z.includes(i)!==t))return t?"1":"2"}},[i,t,E]);(0,n.useEffect)(()=>{if(!t)return;let{start_time:e,current_time_ms:i,duration:n,punish_start_time:o,punish_duration:r}=t;if(!!e&&"0"!==e)(null==t?void 0:t.status)===l.Hj.LinkmicTeamfightStatus_PLAYING&&_(Math.floor(n-(i/1e3-e))),(null==t?void 0:t.status)===l.Hj.LinkmicTeamfightStatus_PUNISHING&&m(Math.floor(r-(i/1e3-o)))},[t]);let y=n.useMemo(()=>{if(!!t)switch(null==t?void 0:t.status){case l.Hj.LinkmicTeamfightStatus_PREPARE:return"组队中";case l.Hj.LinkmicTeamfightStatus_PLAYING:return`团战${(0,o.Gm)(v)}`;case l.Hj.LinkmicTeamfightStatus_PUNISHING:return`战果${(0,o.Gm)(f)}`;default:return}},[t,v,f]);return{isGroupFight:a,isRoomBattle:d,statusTexting:y,pickEmptySeatPositionByGroup:I,groupMemberCnts:E,willInterruptWithPosQuit:h,leftTeamScore:p,rightTeamScore:g,status:n.useMemo(()=>null==t?void 0:t.status,[t]),countDown:v,isInPunish:c,isGroupPlaying:s,redGroupSeats:u.z,blueGroupSeats:u.U}}},170242:function(e,t,i){i(706056);var n=i(101199),l=i(542901),o=i(730481),r=i(198412),u=i.n(r),a=i(433063);t.Z=()=>{let{linkmicStore:{guestBattleInfo:e,isNewVideoLinkmicRoom:t},userStore:{userInfo:i}}=(0,l.o)(),r=u()(i,"user_attr.is_admin",!1),d=u()(i,"user_attr.admin_privileges",[]),s=n.useMemo(()=>!t&&r&&Array.isArray(d)&&(d.includes(o.s.LinkmicGuestBattlePrivilege)||d.includes(o.s.AudienceLinkmicPlaymodeControl)),[r,d]),{isGuestBattle:c,status:v,isInPunish:_,isGuestPlaying:f}=(0,a.Z)({guestBattleInfo:e});return{isGuestBattle:c,status:v,isInPunish:_,isGuestPlaying:f,isGuestBattleManger:s}}},433063:function(e,t,i){i(706056);var n=i(101199),l=i(877991);t.Z=e=>{let{guestBattleInfo:t}=e,i=n.useMemo(()=>!!(null==t?void 0:t.battle_id_str)&&Number(null==t?void 0:t.status)!==l.Nq.GuestBattle_NONE&&Number(null==t?void 0:t.status)!==l.Nq.GuestBattle_FINISH,[t]),o=n.useMemo(()=>i&&[l.Nq.GuestBattle_ON_GOING,l.Nq.GuestBattle_PAUSE].includes(null==t?void 0:t.status),[i]),r=n.useMemo(()=>i&&Number(null==t?void 0:t.status)===l.Nq.GuestBattle_SHOW_RESULT,[t,i]);return{isGuestBattle:i,status:n.useMemo(()=>null==t?void 0:t.status,[t]),isInPunish:r,isGuestPlaying:o}}},110798:function(e,t,i){i.d(t,{Fk:function(){return P},Lq:function(){return O},wz:function(){return k}});var n=i(629686),l=i(402748);i(490629),i(706056),i(374954),i(240148),i(759943);var o=i(229757),r=i.n(o),u=i(198412),a=i.n(u),d=i(795233),s=i.n(d),c=i(908219),v=i.n(c),_=i(156674),f=i.n(_),m=i(101199),p=i(502615),g=i(950257),I=i(160197),E=i(746958),h=i(457596),y=i(181159),T=i(684864),N=i(473682),A=i(414061),L=i(494857);let P=(()=>{let e={};return[...Array(9)].forEach((t,i)=>{e[i]={idx:i}}),e})(),O=e=>{let t={};return[...Array(e)].forEach((e,i)=>{t[i]={idx:i}}),t},k=e=>{let{enable:t,setSeats:i,getUsers:o,getPositions:u,setLayout:d,layout:c,selfLinkMicId:_,onUsersUpdate:k,roomIdStr:S,getSeats:C,audioPower:R,linkRoomType:b="video",uiLayout:M,setUiLayout:V=s(),incomingPlayer:w=null,linkStatus:x,setIsPk:D}=e,{player:j}=(0,I.n)(),U=w||j,F=m.useRef(0),G=m.useCallback(v()((e,t)=>{var d,s,c,v,_,f,m,p,g;let I=o(),E=null===(_=window)||void 0===_?void 0:null===(v=_.__STORE__)||void 0===v?void 0:null===(c=v.roomStore)||void 0===c?void 0:null===(s=c.roomInfo)||void 0===s?void 0:null===(d=s.anchor)||void 0===d?void 0:d.id_str;if((null==e?void 0:e.length)===0&&(null===(f=Object.keys(I))||void 0===f?void 0:f.length)>1&&t===y.V_.LINKMICUILAYOUT_AUDIOCHAT_TOP2V4V4)return;let h=u(),T=!1,N=r()(P);if(t===y.V_.LINKMICUILAYOUT_LIVE_PARTNER_DYNAMIC||t===y.V_.LINKMICUILAYOUT_VIDEOEQUALDYNAMICLAYOUT?N={}:t===y.V_.LINKMICUILAYOUT_AUDIOCHAT_TOP2V4V4&&(N=O(10)),e.forEach(e=>{var i,n;let l;let o=I[a()(e,"uid_str","")];"number"==typeof(null==e?void 0:e.type)&&"number"==typeof(null==o?void 0:o.link_type)&&(o.link_type=e.type),"number"==typeof(null==e?void 0:e.p)?l=e.p:"string"==typeof(null==e?void 0:e.p)?l=Number(e.p):o&&"number"==typeof o.user_position&&(l=o.user_position),[y.V_.LINKMICUILAYOUT_LIVE_PARTNER_DYNAMIC].includes(t)&&o&&"number"==typeof o.user_position&&(l=o.user_position),("number"==typeof l||"string"==typeof l)&&(N[l]={user:null!=o?o:null===(n=N[l])||void 0===n?void 0:n.user,idx:Number(l)}),(null===(i=C()[l])||void 0===i?void 0:i.linkmic_id_str)!==(null==o?void 0:o.linkmic_id_str)&&(T=!0),(!o||o.user_position!==l)&&(T=!0)}),Object.keys(h).forEach(e=>{N[e].info=(0,n._)({},h[e])}),e.length!==Object.keys(I).length&&(![y.V_.LINKMICUILAYOUT_VIDEOCHAT_ENLARGEGUEST1V6,y.V_.LINKMICUILAYOUT_VIDEOCHATFLOATWINDOWLAYOUT].includes(t)||0!==e.length)&&(T=!0),T&&k&&k(),1===Object.keys(N).length&&[y.V_.LINKMICUILAYOUT_LIVE_PARTNER_DYNAMIC,y.V_.LINKMICUILAYOUT_VIDEOEQUALDYNAMICLAYOUT].includes(t)&&(N[1]={idx:1}),!(null===(m=N[0])||void 0===m?void 0:m.user)){let e=Object.values(I).find(e=>{var t;return(null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.id_str)===E});if(null==e?void 0:null===(g=e.content)||void 0===g?void 0:null===(p=g.linkmic_audience_content)||void 0===p?void 0:p.is_mic_hidden){i(N);return}let t=a()(Object.values(N).find(t=>{var i,n,l;return(null==t?void 0:null===(n=t.user)||void 0===n?void 0:null===(i=n.user)||void 0===i?void 0:i.id_str)===(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.id_str)}),"idx",-1);t>0&&(N[t]={idx:t}),N[0]=(0,l._)((0,n._)({},N[0]),{user:e})}i(N)},500),[_,C,b]),B=m.useCallback(v()(function(e,t){var d,c,v,_,m,p,I,E,h;arguments.length>2&&void 0!==arguments[2]&&arguments[2];let y=o(),T=null===(m=window)||void 0===m?void 0:null===(_=m.__STORE__)||void 0===_?void 0:null===(v=_.roomStore)||void 0===v?void 0:null===(c=v.roomInfo)||void 0===c?void 0:null===(d=c.anchor)||void 0===d?void 0:d.id_str;if((null==e?void 0:e.length)===0&&(null===(p=Object.keys(y))||void 0===p?void 0:p.length)>1&&[g.yP.AUDIO_1V8,g.yP.AUDIO_GRID].includes(t))return;let N=u(),A=!1,L=r()(P);if(t===g.yP.VIDEO_DYNAMIC&&(L={}),e.forEach(e=>{var i,n,l;let o;let r=y[a()(e,"uid_str","")];if("number"==typeof(null==e?void 0:e.type)&&"number"==typeof(null==r?void 0:r.link_type)&&(r.link_type=e.type),"number"==typeof(null==e?void 0:e.p)?o=e.p:"string"==typeof(null==e?void 0:e.p)?o=Number(e.p):r&&"number"==typeof r.user_position&&(o=r.user_position),[g.yP.AUDIO_1V8,g.yP.AUDIO_GRID].includes(t)&&r&&"number"==typeof r.user_position){let e=Object.values(y).find(e=>(null==e?void 0:e.user_position)===0);(null==e?void 0:null===(i=e.user)||void 0===i?void 0:i.id_str)===T&&(o=r.user_position)}if(t===g.yP.VIDEO_1V6){let e=f()(y);(null==e?void 0:e.some(e=>{var t,i;return null==e?void 0:null===(i=e.content)||void 0===i?void 0:null===(t=i.linkmic_audience_content)||void 0===t?void 0:t.is_enlarged}))?s()():o+=1}else t===g.yP.VIDEO_1V8?o+=1:t===g.yP.VIDEO_DYNAMIC_FLOAT?o+=1:t===g.yP.VIDEO_6V6&&(o=({0:0,1:1,2:6,3:7,4:2,5:3,6:8,7:9,8:4,9:5,10:10,11:11})[o]);let u=t!==g.yP.VIDEO_6V6||Number(o)<g.Lf[g.yP.VIDEO_6V6];"audio"===b&&(null==r?void 0:r.link_type)===1&&u&&(r.link_type=2),("number"==typeof o||"string"==typeof o)&&(t===g.yP.VIDEO_DYNAMIC?r&&(L[o]={user:r,idx:Number(o)}):L[o]={user:null!=r?r:null===(n=L[o])||void 0===n?void 0:n.user,idx:Number(o)}),void 0!==t&&(null===(l=C()[o])||void 0===l?void 0:l.linkmic_id_str)!==(null==r?void 0:r.linkmic_id_str)&&(A=!0),(!r||r.user_position!==o)&&(A=!0)}),Object.keys(N).forEach(e=>{L[e].info=(0,n._)({},N[e])}),e.length!==Object.keys(y).length&&(t!==g.yP.VIDEO_1V6||0!==e.length)&&(A=!0),A&&k&&k(),1===Object.keys(L).length&&t===g.yP.VIDEO_DYNAMIC&&(L[1]={idx:1}),!(null===(I=L[0])||void 0===I?void 0:I.user)){let e=Object.values(y).find(e=>{var t;return(null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.id_str)===T});if(null==e?void 0:null===(h=e.content)||void 0===h?void 0:null===(E=h.linkmic_audience_content)||void 0===E?void 0:E.is_mic_hidden){i(L);return}let t=a()(Object.values(L).find(t=>{var i,n,l;return(null==t?void 0:null===(n=t.user)||void 0===n?void 0:null===(i=n.user)||void 0===i?void 0:i.id_str)===(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.id_str)}),"idx",-1);t>0&&(L[t]={idx:t}),L[0]=(0,l._)((0,n._)({},L[0]),{user:e})}i(L)},500),[_,C,b]),Y=m.useCallback(e=>{e.forEach(e=>{let t=a()(e,"uid_str","");if(0!==e.talk)try{null==R||R.push(t,e)}catch(e){}})},[R]),H=m.useCallback(e=>{d(e),k&&k()},[k,d]),W=m.useCallback(e=>{if(100===(e=e.detail||e).code&&!!t)try{let t=new TextDecoder().decode(e.content),n=(0,E.KR)(t);if(n&&n.app_data){let e=JSON.parse(n.app_data);if(F.current>e.timestamp)return;F.current=e.timestamp;let{ui_layout:t}=e;if((0,T.D)().includes(Number(t))){let i=(0,N.M2)(Number(t));c!==i&&H(i),G(e.grids,t),Y(e.grids)}else switch(e.ver){case h.t.AUDIO_TALK_ROOM:c!==g.yP.AUDIO_1V8&&c!==g.yP.AUDIO_GRID&&H(g.yP.AUDIO_1V8),B(e.grids,g.yP.AUDIO_1V8),Y(e.grids);break;case h.t.AUDIO_TALK_ROOM_1V8:c!==g.yP.AUDIO_1V8&&H(g.yP.AUDIO_1V8),B(e.grids,g.yP.AUDIO_1V8),Y(e.grids);break;case h.t.VIDEO_TALK_ROOM:case h.t.VIDEO_EQUAL:c!==g.yP.VIDEO_GRID&&H(g.yP.VIDEO_GRID),B(e.grids,g.yP.VIDEO_GRID),Y(e.grids);break;case h.t.VIDEO_DYNAMIC:c!==g.yP.VIDEO_DYNAMIC&&H(g.yP.VIDEO_DYNAMIC),B(e.grids,g.yP.VIDEO_DYNAMIC),Y(e.grids);break;case h.t.VIDEO_DYNAMIC_FLOAT:c!==g.yP.VIDEO_DYNAMIC_FLOAT&&H(g.yP.VIDEO_DYNAMIC_FLOAT),B(e.grids,g.yP.VIDEO_DYNAMIC_FLOAT),Y(e.grids);break;case h.t.VIDEO_C:c!==g.yP.VIDEO_1_V_8&&H(g.yP.VIDEO_1_V_8),B(e.grids,g.yP.VIDEO_1_V_8),Y(e.grids);break;case h.t.VIDEO_DYNAMIC_1V6:c!==g.yP.VIDEO_1_V_6&&H(g.yP.VIDEO_1_V_6),B(e.grids,g.yP.VIDEO_1_V_6),Y(e.grids);break;case h.t.VIDEO_DYNAMIC_1V3:c!==g.yP.VIDEO_1_V_3&&H(g.yP.VIDEO_1_V_3),B(e.grids,g.yP.VIDEO_1_V_3),Y(e.grids);break;case h.t.VIDEO_T1B8:c!==g.yP.VIDEO_T1_V_B8&&H(g.yP.VIDEO_T1_V_B8),B(e.grids,g.yP.VIDEO_T1_V_B8),Y(e.grids);break;case h.t.C_VIDEO_CAMERA:case h.t.VIDEO_CAMERA_NEW:c!==g.yP.VIDEO_1V6&&H(g.yP.VIDEO_1V6),B(e.grids,g.yP.VIDEO_1V6),Y(e.grids);break;case h.t.VIDEO_1V8:c!==g.yP.VIDEO_1V8&&H(g.yP.VIDEO_1V8),B(e.grids,g.yP.VIDEO_1V8),Y(e.grids);break;case h.t.VIDEO_2V4v4:c!==g.yP.VIDEO_2V4V4&&H(g.yP.VIDEO_2V4V4),B(e.grids,g.yP.VIDEO_2V4V4),Y(e.grids);break;case h.t.VIDEO_6V6:c!==g.yP.VIDEO_6V6&&H(g.yP.VIDEO_6V6),S&&S===e.channel_id&&B(e.grids,g.yP.VIDEO_6V6),Y(e.grids);break;case h.t.MULTI_ANCHOR:case h.t.PK:null==D||D(!0),c&&H(void 0);break;default:c&&H(void 0),null==D||D(!1)}}else{var i;(null==n?void 0:null===(i=n.source)||void 0===i?void 0:i.includes("TTLiveSDK"))&&H(void 0)}n&&n.audio_subtitle&&x!==L.cK.LINKED&&A.emit(A.EVENT.AudioStageUpdate,n.audio_subtitle)}catch(e){}},[B,S,c,H,Y,t,G,M,V,x]);return m.useEffect(()=>(null==U||U.on(p.FP.SEI,W),()=>{null==U||U.off(p.FP.SEI,W)}),[U,W,t]),null}},589243:function(e,t,i){i.d(t,{W:function(){return _},Z:function(){return m}});var n=i(629686),l=i(320165),o=i(101199),r=i(176286),u=i(598659),a=i(136940),d=i(160197),s=i(917198),c=i(581999);let v=e=>{let t=e%60,i=Math.floor(e/60);return 0===i?`${t}秒`:0===t?`${i}分钟`:`${i}分钟${t}秒`};var _={IN_LIVING_ROOM:1,1:"IN_LIVING_ROOM",COMMON_SCENE:2,2:"COMMON_SCENE",IN_LIVING_RECOMMEND:3,3:"IN_LIVING_RECOMMEND",LIVING_SEARCH:4,4:"LIVING_SEARCH"};let f={FIRST:"首",STRIGHT:"直"},m=e=>{var t;let{scene:i=1,logParams:_={},isFirstLive:m=!1,onPaidLiveTryWatch:p=()=>{},watchTime:g=180}=e,{player:I}=(0,d.n)(),E=()=>{setTimeout(()=>{null==I||I.pause()},1)};o.useEffect(()=>{null==I||I.pause();let e=I.video.style.display,t=(0,s.K)(I,"xg-controls");return(0,s.K)(I,"xg-enter"),I.video.style.display="none",null==I||I.on("play",E),()=>{try{t(),null==I||I.play(),null==I||I.off("play",E),I.video.style.display=e}catch(e){}}},[I]);let{dispatch:h}=null!==(t=(0,c.useUserInfoContext)())&&void 0!==t?t:{},y=()=>!1,T=()=>{1===i||3===i?(0,u.p)().then(e=>{var t,i;e({headerText:`登录后免费试看${v(g)}`,success:async()=>{!y()&&window.location.reload()},next:`https://${null===(i=window)||void 0===i?void 0:null===(t=i.location)||void 0===t?void 0:t.host}`,enterMethod:"paidlive"})}):(2===i||4===i)&&(0,u.p)().then(e=>{var t,i;e({headerText:`登录后免费试看${v(g)}`,success:async()=>{null==h||h({type:"updateUserInfo"})},next:`https://${null===(i=window)||void 0===i?void 0:null===(t=i.location)||void 0===t?void 0:t.host}`,enterMethod:"paidlive"})});try{null==p||p()}catch(e){}};return o.useEffect(()=>{1===i?(0,a.zq)(1===i?"paidlive_inlive":"paidlive_window"):(0,a.Wr)((0,n._)({},_))},[i]),(0,l.jsxs)("div",{className:r.default.smegmae_contianer,children:[(0,l.jsxs)("div",{className:r.default.smegmae_contianer_title,children:["本",m?f.FIRST:f.STRIGHT,"播为付费",m?f.FIRST:f.STRIGHT,"播"]}),(0,l.jsxs)("div",{className:r.default.smegmae_contianer_desc,children:["购票后可观看整场",m?f.FIRST:f.STRIGHT,"播"]}),(0,l.jsxs)("div",{className:r.default.smegmae_contianer_button,onClick:()=>T(),children:["免费试看",v(g)]})]})}},327512:function(e,t,i){i.r(t),i.d(t,{PaidLivePlugin:function(){return ev},default:function(){return e_}});var n=i("629686"),l=i("402748");i("490629"),i("706056");var o=i("320165"),r=i("101199"),u=i("917198");i("88856"),i("679308");var a=i("205082"),d=i("807922"),s=i("414061"),c=i("409250"),v=i("56924"),_=i("160197"),f=i("198412"),m=i.n(f),p=i("908219"),g=i.n(p),I=i("142689"),E=i("991879"),h=i("397176"),y=i("764283");let T=function(e,t,i,o,u,f,p,T,N,A){let L=arguments.length>10&&void 0!==arguments[10]?arguments[10]:null,P=(0,r.useRef)(0),O=(0,r.useRef)({}),k=(0,r.useRef)(),S=(0,r.useRef)(),C=(0,r.useRef)({[a.PING_TYPE.TRY_WATCH_LEAVE]:!1}),R=(0,r.useRef)(""),[b,M]=(0,r.useState)(0),[V,w]=(0,r.useState)(N),x=(0,r.useRef)(!1),D=(0,r.useRef)(!1),{player:j}=(0,_.n)(),U=L||j,F=r.useCallback(e=>{let t=m()(e,"data.data.duration",0),i=m()(e,"data.data.delivery",0),r=m()(e,"data.data.ret_type",1),a=m()(e,"data.data.right_type",0);o(e=>(0,l._)((0,n._)({},e),{duration:t,delivery:i,view_right:0!==a?1:0})),u(r)},[o,u]),G=r.useCallback(()=>(null==f?void 0:f.paid_live_type)===d.xc.EQUITABLE_CAMERA_POSITION?{paid_live_type:null==f?void 0:f.paid_live_type,entity_id:i}:{},[f,i]),B=r.useCallback(()=>{Math.floor(N-P.current)>0?M(P.current+1):M(N)},[N]),Y=()=>{(null==S?void 0:S.current)&&clearInterval(S.current)};r.useEffect(()=>{P.current=b,i&&D.current&&(O.current[i]=P.current,(0,I.V)(O.current)),w(Math.floor(N-P.current))},[b,N]),r.useEffect(()=>{s.emit(s.EVENT.paidLiveDuration,{last_time:Math.floor(V),ticket_id_str:i})},[V,i]);let H=r.useCallback(g()(async()=>{if(Math.floor(N-P.current)>0)try{let e=await (0,E.xL)((0,n._)({id:i,id_type:1,ping_type:a.PING_TYPE.TRY_WATCH_START,timestamp:Math.floor(Date.now()/1e3)},G()));y.kg.info("ping 上报试看开始",e),F(e)}catch(e){y.kg.error("ping 上报试看error",e)}k.current&&k.current&&clearInterval(k.current),k.current=setInterval(async()=>{if(Math.floor(N-P.current)>0){let e=await (0,E.xL)((0,n._)({id:i,id_type:1,ping_type:a.PING_TYPE.COMMON_PING,timestamp:Math.floor(Date.now()/1e3)},G()));y.kg.info("ping 上报试看",e),F(e)}},1e4,!0)},3e3),[i,F,N]),W=r.useCallback(()=>{var e;let n=c.Q.getItem({sKey:a.storage.CookieKeys.PaidLiveDuration})||{};O.current=n,M(Math.max(Number(null===(e=O.current)||void 0===e?void 0:e[i])||0,Math.min(t,null==f?void 0:f.max_preview_duration))),A&&requestAnimationFrame(()=>{s.emit(s.EVENT.paidLiveInitTime,{})}),D.current=!0},[i,t]),Z=()=>{if(!h.s)k.current&&clearInterval(k.current)};r.useEffect(()=>{W()},[W]);let K=r.useCallback(()=>{if(!h.s)S.current&&clearInterval(S.current),H(),S.current=setInterval(()=>{B()},1e3,!0),x.current=!0},[B,H]),$=r.useCallback(async()=>{if(!C[a.PING_TYPE.TRY_WATCH_LEAVE]){if(Z(),Y(),null==R?void 0:R.current)try{C[a.PING_TYPE.TRY_WATCH_LEAVE]=!0;let e=await (0,E.xL)((0,n._)({id:R.current,id_type:1,ping_type:a.PING_TYPE.TRY_WATCH_LEAVE,timestamp:Math.floor(Date.now()/1e3)},G()));R.current===i&&F(e),y.kg.info("ping 上报离开",e)}catch(e){y.kg.info("ping 上报离开error",e)}}},[F,i]),z=(0,r.useRef)(!0);(0,r.useEffect)(()=>()=>{S.current&&clearInterval(S.current),k.current&&clearInterval(k.current)},[]),(0,v.C)(()=>{if(!!e)return!U.paused&&(K(),z.current=!1),U&&(null==U||U.on("pause",$)),U&&(null==U||U.on("play",K)),()=>{U&&(null==U||U.off("pause",$)),U&&(null==U||U.off("play",K))}},[U,e,p,$,K]);let q=r.useCallback(async()=>{if(p===a.PAID_LIVE_VIEW_TYPE.NORMAL_WATCH&&0===T)try{let e=await (0,E.xL)((0,n._)({id:i,id_type:1,ping_type:a.PING_TYPE.PERFORMANCE,timestamp:Math.floor(Date.now()/1e3)},G()));y.kg.info("ping 上报履约",e),F(e)}catch(e){y.kg.info("ping 上报履约error",e)}},[p,T,i,F]);return r.useEffect(()=>{i&&$().finally(()=>{C[a.PING_TYPE.TRY_WATCH_LEAVE]=!1,R.current=i})},[i]),r.useEffect(()=>()=>{$()},[]),r.useEffect(()=>{if(!!e)return!U.paused&&q(),U&&(null==U?void 0:U.on)&&U.on("play",q),()=>{null==U||U.off("play",q)}},[U,q,e]),{lastTime:V}};var N=i("890710"),A=i("939626");function L(e,t){return Math.random()*(t-e)+e}let P=[[0,20],[20,70],[20,70],[70,80]],O=[[0,90],[0,20],[75,90],[0,90]],k=[0,1,2,3],S=()=>{let e=function(e){let t=[...e],i=Math.floor(Math.random()*t.length);return t[i]}(k);return{new_left:L(P[e][0],P[e][1]),mew_top:L(O[e][0],O[e][1])}},C=(0,r.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,l._)((0,n._)({width:8,height:10,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M6.805 1.84A2.19 2.19 0 0 1 5.845.4a1.958 1.958 0 0 1-.04-.4H4.227v6.323A1.327 1.327 0 0 1 2.905 7.6c-.223 0-.432-.055-.614-.155a1.323 1.323 0 0 1-.71-1.172A1.329 1.329 0 0 1 3.3 5.005v-1.61A2.908 2.908 0 0 0 0 6.272c0 .983.49 1.85 1.24 2.378a2.885 2.885 0 0 0 1.665.527 2.91 2.91 0 0 0 2.904-2.904v-3.21c.614.446 1.373.71 2.191.71V2.195c-.44 0-.85-.131-1.195-.354z",fill:"#A6A6A6"})}))),R=e=>{let{display_id:t="",viewType:i}=e,[n,l]=r.useState(!0),[u,d]=r.useState(0),[s,c]=r.useState(0),{player:v}=(0,_.n)(),f=r.useRef();return r.useEffect(()=>(i!==a.PAID_LIVE_VIEW_TYPE.TRT_WATCH_FINISH&&(f.current&&clearInterval(f.current),f.current=setInterval(()=>{l(!1),requestAnimationFrame(()=>{l(!0);let{new_left:e,mew_top:t}=S();d(e),c(t)})},5e3)),()=>{f.current&&clearInterval(f.current)}),[]),(0,o.jsx)(o.Fragment,{children:n&&(0,N.createPortal)((0,o.jsxs)("div",{className:A.default.waterText,style:{left:`${u}%`,top:`${s}%`,opacity:.4},children:[(0,o.jsx)("div",{children:"付费内容请勿录屏"}),(0,o.jsx)("div",{children:"必要时将追究违者法律责任"}),(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,o.jsx)(C,{}),(0,o.jsx)("span",{style:{paddingLeft:4},children:t})]})]}),(null==v?void 0:v.root)||document.body)})};var b=i("589243");let M=(e,t,i,o,u)=>(r.useEffect(()=>{if(!!e)return e.on("PaidLiveDataMessage",e=>{e&&Array.isArray(e)&&e.length>0&&e.map(e=>{var r;let d=Number(m()(e,"payload.paid_business_data.ret_type",a.RET_TYPE.TRY_WATCH_ING)),s=Number(m()(e,"payload.paid_business_data.duration",180)),c=Number(m()(e,"payload.paid_business_data.delivery",0)),v=m()(e,"payload.paid_business_data.ticket_id",""),_=m()(e,"payload.paid_business_data.ticket_sku_id",""),f=m()(e,"payload.paid_business_data.entity_rels",{}),p="object"==typeof f?Object.keys(f):[],g=null==t?void 0:null===(r=t.ticket_session)||void 0===r?void 0:r.ticket_session_id_str;p.concat([v,_]).includes(g)&&(i((0,l._)((0,n._)({},t),{duration:s,delivery:c})),o(d)),null==u||u(m()(e,"payload.paid_business_data"))})})},[e,t,i,o]),null);var V=i("855500"),w=i("810069"),x=i("476595"),D=i("677655"),j=i("535303"),U=()=>({abrPts:"-800",adaptiveConfig:{hurryEndMs:1800,hurryStartMs:2500,hurrySpeed:1.1,thresholdDown:!0}}),F=i("444326");let G=(e,t,i,o,u,d,c,v,f,p,g)=>{let{player:I}=(0,_.n)(),h=(0,r.useRef)(e),{abrPts:T}=U(),N=g||I,{roomStore:A}=p,L=r.useMemo(()=>{var e;return(null==A?void 0:null===(e=A.pollingFrequency)||void 0===e?void 0:e["webcast/room/info_by_scene"])||1e4},[]),P=r.useCallback(()=>{var e,o,r;if(null==p?void 0:null===(o=p.cameraStore)||void 0===o?void 0:null===(e=o.cameraInfo)||void 0===e?void 0:e.isMainCamera){let e=(0,V.a)();(0,E.aL)({room_id:t,scene:"paid_live_change_stream",channel:"channel_pc_web",region:"cn",device_id:null===(r=(0,w.Es)())||void 0===r?void 0:r.user_unique_id,device_type:null==e?void 0:e.device_type,os_version:null==e?void 0:e.os,version_code:null==e?void 0:e.version_code,webcast_sdk_version:2450}).then(e=>{if(e&&200===e.status&&0===e.data.status_code){var t,o,r,u,a,d,s,v;if(i===b.W.COMMON_SCENE||i===b.W.IN_LIVING_RECOMMEND||i===b.W.LIVING_SEARCH){y.kg.info("预览流换流",e);try{let i=null==e?void 0:null===(u=e.data)||void 0===u?void 0:null===(r=u.data)||void 0===r?void 0:null===(o=r.stream_url)||void 0===o?void 0:null===(t=o.live_core_sdk_data)||void 0===t?void 0:t.pull_data;if((0,F.lw)(N)){(0,F.b9)({player:N,partialStreamPluginConfig:{streamData:{h264PullData:i}}}),c(m()(e,"data.data.paid_live_data",{}));return}let{options:{default_quality:n},stream_data:l}=i,d=JSON.parse(l),s=null==d?void 0:d.data,v=null==d?void 0:null===(a=d.common)||void 0===a?void 0:a.session_id,_=(0,D.f)(s[null==n?void 0:n.sdk_key].main.flv);(0,j.GT)(_,{abr_pts:T,sessionId:v}),N.paused?null==N||N.setConfig({url:_}):N.src=_,c(m()(e,"data.data.paid_live_data",{}))}catch(e){y.kg.error("预览流换流 ERROR",e)}}else{y.kg.info("直播间换流",e);try{let{roomStore:t}=p,i=m()(e,"data.data.paid_live_data",{});c(i),null==t||t.setRoomInfo((0,l._)((0,n._)({},t.roomInfo),{room:(0,l._)((0,n._)({},null==t?void 0:null===(d=t.roomInfo)||void 0===d?void 0:d.room),{paid_live_data:i,stream_url:null==e?void 0:null===(v=e.data)||void 0===v?void 0:null===(s=v.data)||void 0===s?void 0:s.stream_url,web_stream_url:void 0})}))}catch(e){y.kg.error("直播间换流 ERROR",e)}}}else y.kg.info("换流失败",e)})}},[t,i,N,T,c]),O=(0,r.useRef)(f);(0,r.useEffect)(()=>{(i===b.W.COMMON_SCENE||i===b.W.LIVING_SEARCH)&&f&&O.current!==f&&P()},[f,i,P]),(0,x.b)(async()=>{e===a.PAID_LIVE_VIEW_TYPE.NORMAL_WATCH&&h.current!==e&&o>0&&(y.kg.info("试看权限 变为完整观看权限"),await P()),e!==a.PAID_LIVE_VIEW_TYPE.NORMAL_WATCH&&h.current===a.PAID_LIVE_VIEW_TYPE.NORMAL_WATCH&&0===o&&(y.kg.info("完整观看权限 变为试看权限"),await P()),h.current=e},[e,o]);let k=r.useRef(),S=r.useRef(d);(0,r.useEffect)(()=>{S.current=d},[d]);let C=r.useCallback(async()=>{let e=1e3*u-Date.now();y.kg.info(`流有效校验,流剩余有效时长,${u-Math.floor(Date.now()/1e3)}`),e<1e3*Number(S.current)&&o&&(y.kg.info("流信息不合法,触发换流"),await P())},[u,P,o]);(0,r.useEffect)(()=>{let e=s.listen(s.EVENT.paidLiveInitTime,()=>C());return()=>{e()}},[C]),(0,r.useEffect)(()=>(k.current&&clearInterval(k.current),e===a.PAID_LIVE_VIEW_TYPE.TRY_WATCH_ING&&o>0&&(k.current=setInterval(async()=>{await C()},L)),()=>{k.current&&clearInterval(k.current)}),[o,e,C,L])};var B=i("136940");let Y=e=>{let{scene:t=b.W.IN_LIVING_ROOM,logParams:i={},isActive:o}=e,{player:u}=(0,_.n)();(0,r.useRef)(!1);let a=(0,r.useRef)(0),d=(0,r.useRef)(i);r.useEffect(()=>{d.current=i},[i]);let s=r.useCallback(()=>{a.current=Date.now(),(0,B.U0)((0,n._)({},d.current))},[]),c=(0,r.useRef)(o);(0,r.useEffect)(()=>{if(t!==b.W.IN_LIVING_ROOM)o&&s()},[o]),(0,r.useEffect)(()=>{if(t!==b.W.IN_LIVING_ROOM){if(!o&&o!==c.current){let e=Math.floor((Date.now()-a.current)/1e3);(0,B.dL)((0,l._)((0,n._)({},d.current),{duration:e}))}c.current=o}},[o])};i("228983"),i("759943"),i("362051");var H=i("469935"),W=i.n(H),Z=i("121998"),K=i("687581"),$=i("759894"),z=i("601034"),q=i("335924"),Q=i("135947"),J=i("638052"),X=i("176449"),ee=i("983218"),et=i("550514"),ei=i("812798");let en=(0,r.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,l._)((0,n._)({width:28,height:28,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{d:"M19.59 9.59a.833.833 0 1 0-1.18-1.18L14 12.822l-4.41-4.41a.833.833 0 0 0-1.18 1.178L12.822 14l-4.41 4.41a.833.833 0 1 0 1.178 1.18L14 15.177l4.41 4.411a.833.833 0 1 0 1.18-1.178L15.177 14l4.411-4.41z",fill:"#161823"})}))),el=(0,r.forwardRef)((e,t)=>(0,o.jsxs)("svg",(0,l._)((0,n._)({width:50,height:50,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,o.jsxs)("g",{filter:"url(#ic_tick-circle_svg__filter0_d_747_17320)",shapeRendering:"crispEdges",children:[(0,o.jsx)("path",{d:"M25.001 44.992c11 0 20-9 20-20s-9-20-20-20-20 9-20 20 9 20 20 20z",fill:"#fff"}),(0,o.jsx)("path",{d:"M25.001 45.492c11.276 0 20.5-9.224 20.5-20.5s-9.224-20.5-20.5-20.5-20.5 9.224-20.5 20.5 9.224 20.5 20.5 20.5z",stroke:"#000",strokeOpacity:".1",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,o.jsx)("path",{d:"M30.303 30.303a7.5 7.5 0 1 1 0-10.607c.691.691 2.197 2.387 2.197 2.387",stroke:"#333",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M32.5 18.333v3.75h-3.75",stroke:"#333",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("defs",{children:(0,o.jsxs)("filter",{id:"ic_tick-circle_svg__filter0_d_747_17320",x:".001",y:"-.008",width:50,height:50,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,o.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,o.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,o.jsx)("feOffset",{}),(0,o.jsx)("feGaussianBlur",{stdDeviation:2}),(0,o.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,o.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),(0,o.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_747_17320"}),(0,o.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_747_17320",result:"shape"})]})})]}))),eo=e=>{var t;let{awemeInfo:i,onClose:u,onPaySuccess:a,onPayTimeout:d,logParams:s,paidLiveData:c,visible:v}=e,[_,f]=(0,r.useState)("");(0,r.useRef)();let m=(0,r.useRef)(0);(0,r.useRef)(!1);let[p,g]=(0,r.useState)(void 0),[I,E]=(0,r.useState)(!1),h=(0,r.useCallback)(async()=>{var e,t,i,o,r;g(void 0),f("");let[u,a="{}"]=null==c?void 0:null===(i=c.ticket_session)||void 0===i?void 0:null===(t=i.prepay_cashier_jump_url)||void 0===t?void 0:null===(e=t.split)||void 0===e?void 0:e.call(t,"?"),d=Z.parse(a),s=await (0,et.kH)({jsonParams:JSON.stringify((0,l._)((0,n._)({},d),{origin_appid:"6383",schema_type:"1",use_new_api:"1",mix_short_name:encodeURIComponent((null==a?void 0:a.mix_short_name)||"")})||{})});(null==s?void 0:s.statusCode)===0?(f(null==s?void 0:null===(o=s.data)||void 0===o?void 0:o.url),g(!1)):(K.oe.event.error({name:K.Mo.PaidVideoQRCodeError,report:{enterFrom:(0,$.mo)(),enterFromMerge:(0,z.yW)(),buySchema:null==c?void 0:null===(r=c.ticket_session)||void 0===r?void 0:r.prepay_cashier_jump_url,logId:null==s?void 0:s.logId}}),g(!0))},[c]);(0,r.useEffect)(()=>{var e;(null==c?void 0:null===(e=c.ticket_session)||void 0===e?void 0:e.prepay_cashier_jump_url)&&h()},[null==c?void 0:null===(t=c.ticket_session)||void 0===t?void 0:t.prepay_cashier_jump_url]);let y=(0,r.useMemo)(()=>{var e,t,n,l,o,r,u;return{enter_from:(0,q.Rs)("enter_from"),module:decodeURIComponent((0,q.Rs)("module")||""),enter_from_merge:(0,z.yW)(),previous_page:(0,q.Rs)("previous_page"),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,ce_content_id:(null==i?void 0:null===(t=i.seriesInfo)||void 0===t?void 0:t.seriesId)||(null==i?void 0:null===(n=i.mixInfo)||void 0===n?void 0:n.mixId)||"",ce_content_type:(0,Q.a)(i),ce_item_id:String((null==i?void 0:null===(l=i.seriesInfo)||void 0===l?void 0:l.currentEpisode)||(null==i?void 0:null===(o=i.mixInfo)||void 0===o?void 0:o.currentEpisode)),is_trailer:(null==i?void 0:null===(u=i.chargeInfo)||void 0===u?void 0:null===(r=u.preview_config)||void 0===r?void 0:r.is_preview)?1:0,from_group_id:null==s?void 0:s.from_group_id}},[s,i]);return(0,r.useEffect)(()=>{J.logInstance.sendLog("pcPaymentPopupShow",(0,n._)({button_type:"scan"},y))},[]),(0,r.useEffect)(()=>{I&&J.logInstance.sendLog("pcPaymentPopupShow",(0,l._)((0,n._)({},y),{button_type:"refresh"}))},[I]),(0,o.jsxs)("div",{className:ei.default.container,style:{display:v?"block":"none"},children:[(0,o.jsxs)("div",{className:ei.default.title,children:[(0,o.jsx)("span",{children:"抖音App扫码购买"}),(0,o.jsx)(X.Z,{src:en,width:28,height:28,viewBox:"0 0 28 28",onClick:e=>{e.stopPropagation(),m.current=0,null==u||u()},style:{cursor:"pointer"}})]}),(0,o.jsxs)("div",{className:ei.default.box,children:[void 0===p&&!_&&(0,o.jsx)(ee.gb,{}),p&&(0,o.jsxs)("div",{className:W()(ei.default.timeoutMask,ei.default.smallBtnGrayContainer),onClick:async()=>{await h()},children:[(0,o.jsx)("div",{className:ei.default.mask}),(0,o.jsxs)("div",{className:ei.default.timeoutBox,children:[(0,o.jsx)(X.Z,{src:el,width:50,height:50,viewBox:"0 0 50 50"}),(0,o.jsx)("div",{className:ei.default.mainTitle,children:"抖音码获取失败"}),(0,o.jsx)("div",{children:"点击刷新"})]})]}),_&&(0,o.jsx)("img",{src:_,onError:()=>{g(!0)},onLoad:()=>{g(!1)}}),I&&(0,o.jsxs)("div",{className:W()(ei.default.timeoutMask,ei.default.smallBtnGrayContainer),onClick:async()=>{J.logInstance.sendLog("pcPaymentPopupClick",(0,l._)((0,n._)({},y),{button_type:"refresh"})),E(!1),m.current=0,await h()},children:[(0,o.jsx)("div",{className:ei.default.mask}),(0,o.jsxs)("div",{className:ei.default.timeoutBox,children:[(0,o.jsx)(X.Z,{src:el,width:50,height:50,viewBox:"0 0 50 50"}),(0,o.jsx)("div",{className:ei.default.mainTitle,children:"二维码已过期"}),(0,o.jsx)("div",{children:"点击刷新"})]})]})]})]})};var er=i("280647"),eu=i("752150"),ea=i("964591"),ed=i("542901"),es=i("380599");let ec=(e,t)=>t===a.RET_TYPE.NORMAL_WATCH?a.PAID_LIVE_VIEW_TYPE.NORMAL_WATCH:Number(e)>0?a.PAID_LIVE_VIEW_TYPE.TRY_WATCH_ING:a.PAID_LIVE_VIEW_TYPE.TRT_WATCH_FINISH,ev=(0,ea.Pi)(e=>{var t;let{paidLiveData:i,isLogin:s=!1,display_id:c="",scene:v=b.W.COMMON_SCENE,webRid:_="",roomId:f,setPaidLiveData:p,setViewType:g=e=>{},viewType:I,retType:E,setRetType:h,isFirstLive:y=!1,logParams:N={},onPaidLiveTryWatch:A=()=>{},onPaidLiveBuyTicket:L=()=>{},isActive:P=!0,jumpHref:O="",message:k,store:S={},setPaidLiveBurryContrl:C=()=>{}}=e,[V,w]=r.useState(!0),x=Number(m()(i,"max_preview_duration",180)),D=m()(i,"ticket_session.ticket_session_id_str",""),j=Number(m()(i,"duration",0)),U=Number(m()(i,"delivery",0)),{singletonStore:F,cameraStore:B,roomStore:H}=S,W=null==B?void 0:null===(t=B.cameraInfo)||void 0===t?void 0:t.isMainCamera,Z=v===b.W.IN_LIVING_ROOM,K=Number(m()(i,"async_auth_data.keep_alive_time",0)),$=Number(m()(i,"async_auth_data.keep_alive_time_stamp",0)),{lastTime:z}=T(s,j,D,p,h,i,I,U,x,W);return M(k,i,p,h,e=>{try{let{ticket_id:t,right_type:i,entity_rels:o}=e,{cameraStore:{cameraInfoList:r,setCameraInfoList:u}}=S,a=r.map(e=>{var r,u,a,s,c,v,_,f;if(e.paid_live_type===d.xc.SEPARATE_PAID_LIVE&&(null==e?void 0:null===(u=e.camera_paid_info)||void 0===u?void 0:null===(r=u.paid_live_base_info)||void 0===r?void 0:r.ticket_session_id_str)===t&&(e.camera_paid_info.paid_live_base_info.view_right=i),(e.paid_live_type===d.xc.EQUITABLE_CAMERA_POSITION||e.isMainCamera)&&"object"==typeof o){let t=Object.keys(o);if(e.paid_live_type===d.xc.EQUITABLE_CAMERA_POSITION&&t.includes(null==e?void 0:null===(s=e.camera_paid_info)||void 0===s?void 0:null===(a=s.paid_live_base_info)||void 0===a?void 0:a.ticket_session_id_str)&&(e.camera_paid_info.paid_live_base_info.view_right=i),e.isMainCamera&&t.includes(null==H?void 0:null===(c=H.roomInfo)||void 0===c?void 0:c.roomId)){let e=null==H?void 0:null===(_=H.roomInfo)||void 0===_?void 0:null===(v=_.room)||void 0===v?void 0:v.paid_live_data;null==H||H.setRoomInfo((0,l._)((0,n._)({},H.roomInfo),{room:(0,l._)((0,n._)({},null==H?void 0:null===(f=H.roomInfo)||void 0===f?void 0:f.room),{paid_live_data:(0,l._)((0,n._)({},e),{view_right:i})})}))}}return e});u(a)}catch(e){}}),G(I,f,v,K,$,z,p,h,s,S,null),Y({scene:v,logParams:N,isActive:P}),(0,er.Z)(()=>{C(!0),g(ec(z,E))},[z,g,E]),r.useEffect(()=>{try{(async()=>{let e=await (0,eu.ZP)({service_name:"webcast.douyin.live_pc",key:"paid_live_settings"}),t=m()(e,"water_mark",!0);w(!!t)})()}catch(e){}},[]),r.useEffect(()=>{if(v!==b.W.LIVING_SEARCH&&v!==b.W.IN_LIVING_RECOMMEND){var e,t;I!==a.PAID_LIVE_VIEW_TYPE.NORMAL_WATCH&&I!==a.PAID_LIVE_VIEW_TYPE.BAN?null==F||null===(e=F.setPaidLiveQRCodeVisible)||void 0===e||e.call(F,!0):null==F||null===(t=F.setPaidLiveQRCodeVisible)||void 0===t||t.call(F,!1)}},[v,I]),(0,o.jsx)("div",{style:{pointerEvents:"all"},children:s?(0,o.jsxs)(o.Fragment,{children:[I===a.PAID_LIVE_VIEW_TYPE.TRT_WATCH_FINISH&&(0,o.jsx)(u.V,{scene:v,webRid:_,logParams:N,isFirstLive:y,onPaidLiveBuyTicket:L,jumpHref:O,isActive:P,store:S}),Z?(0,o.jsx)(eo,{paidLiveData:i,visible:null==F?void 0:F.paidLiveQRCodeVisible,onClose:()=>{var e;null==F||null===(e=F.setPaidLiveQRCodeVisible)||void 0===e||e.call(F,!1)}}):null,V&&(0,o.jsx)(R,{display_id:c,viewType:I})]}):(0,o.jsx)(b.Z,{scene:v,logParams:N,isFirstLive:y,onPaidLiveTryWatch:A,watchTime:x})})});var e_=(0,ea.Pi)(()=>{let e=(0,ed.o)(),{paidLiveStore:{paidLiveData:t,setViewType:i,viewType:n,setPaidLiveData:l,retType:u,setRetType:a,setPaidLiveBurryContrl:d},userStore:{userInfo:s},roomStore:{roomInfo:c},singletonStore:{message:v}}=e,_=m()(c,"room.id_str"),f=r.useMemo(()=>m()(c,"room.episode_extra.mod.episode_stage")===es.jL.FIRST_LIVE,[c]);return(0,o.jsx)(ev,{paidLiveData:t,isLogin:m()(s,"id_str",""),display_id:m()(s,"display_id",""),scene:b.W.IN_LIVING_ROOM,setViewType:i,viewType:n,setPaidLiveData:l,roomId:_,retType:u,setRetType:a,isFirstLive:f,message:v,store:e,setPaidLiveBurryContrl:d})})},917198:function(e,t,i){i.d(t,{K:function(){return g},V:function(){return I}});var n=i(629686);i(490629);var l=i(320165),o=i(101199),r=i(578503),u=i(160197),a=i(752150),d=i(953123),s=i(326367),c=i(589243),v=i(795233),_=i.n(v),f=i(198412),m=i.n(f),p=i(136940);let g=(e,t)=>{let i=e.root.querySelector(t);return i?(i.style.display="none",()=>{i&&(i.style.display="block")}):_()},I=e=>{let{webRid:t="",scene:i=c.W.COMMON_SCENE,logParams:v={},isFirstLive:_=!1,onPaidLiveBuyTicket:f=()=>{},jumpHref:I="",isActive:E=!1,container:h,store:y}=e,{player:T}=(0,u.n)(),N=o.useRef(!1),[A,L]=(0,o.useState)("https://lf-dy-gr-sourcecdn.bytegecko.com/obj/byte-gurd-source-gr/webcast/mono/h5/vs_paid_live_audience_pc_buy_ticket_h5_douyin/pages/ticket_pc/index.html?ticket_entrance=paidlive_live_tryend_card"),P=()=>{setTimeout(()=>{null==T||T.pause()},1)};o.useEffect(()=>{if(!T)return;null==T||T.pause();let e=T.video.style.opacity,t=g(T,".douyin-player-controls");return T.video.style.opacity=0,null==T||T.on("play",P),()=>{try{t(),null==T||T.play(),null==T||T.off("play",P),T.video.style.opacity=e}catch(e){}}},[T]),(0,o.useEffect)(()=>{try{(async()=>{let e=await (0,a.ZP)({service_name:"webcast.douyin.live_pc",key:"hybrid_schema"}),t=m()(e,"paid_live_ticket_panel","");t&&L(`${t}?ticket_entrance=paidlive_live_tryend_card`)})()}catch(e){}},[]);let O=()=>{try{null==f||f()}catch(e){}if(i===c.W.IN_LIVING_ROOM){var e,n;null==y||null===(n=y.singletonStore)||void 0===n||null===(e=n.setPaidLiveQRCodeVisible)||void 0===e||e.call(n,!0),(0,p.c9)("tryend")}else(0,p.dh)(v),I?window.open((0,d.G7)({if_paid_live_card:"1",ticket_entrance:"paidlive_window_tryend_card",entrance_form:"paidlive_window_tryend_card"},I),(0,s.f)()?"_self":void 0):window.open(`https://live.douyin.com/${t}?if_paid_live_card=1&ticket_entrance=paidlive_window_tryend_card`,(0,s.f)()?"_self":void 0)};return o.useEffect(()=>{i===c.W.IN_LIVING_ROOM&&(0,p.t4)()},[]),o.useEffect(()=>{(i===c.W.COMMON_SCENE||i===c.W.LIVING_SEARCH)&&N.current!==E&&E&&(0,p.B5)((0,n._)({},v))},[E]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:r.default.smegmae_contianer_mask}),(0,l.jsxs)("div",{className:r.default.smegmae_contianer,style:{pointerEvents:"all"},children:[(0,l.jsx)("div",{className:r.default.smegmae_contianer_title,children:"免费试看结束"}),(0,l.jsxs)("div",{className:r.default.smegmae_contianer_desc,children:["购票后可观看整场",_?"首":"直","播"]}),(0,l.jsx)("div",{className:r.default.smegmae_contianer_button,onClick:e=>O(),children:"购票继续看"})]})]})}},644047:function(e,t,i){i.d(t,{M:function(){return u}}),i(490629);var n=i(101199),l=i(205082),o=i(198412),r=i.n(o);let u=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],[i,o]=n.useState(l.PAID_LIVE_VIEW_TYPE.BAN),[u,a]=n.useState(e),[d,s]=n.useState(l.RET_TYPE.TRY_WATCH_ING),c=Number(r()(u,"paid_type",0))===l.PAID_LIVE_TYPE.PAID_LIVE;n.useEffect(()=>{c&&s(Number(r()(u,"view_right",0))?l.RET_TYPE.NORMAL_WATCH:l.RET_TYPE.TRY_WATCH_ING)},[u,c]);let v=n.useMemo(()=>c&&(!t||i===l.PAID_LIVE_VIEW_TYPE.TRT_WATCH_FINISH),[i,t,c]),_=n.useMemo(()=>!c||!(!t||i===l.PAID_LIVE_VIEW_TYPE.TRT_WATCH_FINISH),[c,t,i]);return{viewType:i,setViewType:o,retType:d,setRetType:s,paidLiveData:u,setPaidLiveData:a,isPaidLive:c,hideLinkMicPreview:v,showEnter:_}}},811776:function(e,t,i){i.d(t,{gE:function(){return x},NM:function(){return j},Z4:function(){return B},yG:function(){return M},zS:function(){return b},L4:function(){return D},BC:function(){return F},sk:function(){return G},B7:function(){return Y}}),i("490629");var n=i("320165"),l=i("101199"),o=i("255436"),r=i("559519"),u=i("279198"),a=i("964530"),d=i("795233"),s=i.n(d),c=i("806217"),v=i("695506"),_=i("147693"),f=i("542901"),m=i("629686"),p=i("890710"),g=i("928021"),I=i("26333"),E=i("469935"),h=i.n(E),y=i("237987"),T=i("506926");function N(){var e,t;let{singletonStore:{message:i},eventStore:{pkEvent:o}}=(0,f.o)(),{pipWin:r}=(0,I.ds)(),u=(0,l.useRef)(s()),a=l.useRef(null),[d,c]=(0,l.useState)(null),v=j(),_=null==d?void 0:null===(t=d.animation)||void 0===t?void 0:null===(e=t.url_list)||void 0===e?void 0:e[0],E=(null==d?void 0:d.status)!==1;return(0,l.useEffect)(()=>{if(!!v)return null==i?void 0:i.on("BattleDrawPropMessage",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{payload:t}=e[0];t&&c(t)})},[i,v]),(0,l.useEffect)(()=>{var e;if(!_)return;let t=null===(e=a.current)||void 0===e?void 0:e.getBoundingClientRect(),i=(null==r?void 0:r.document)||document,l=i===document?(0,T.EF)(g.q):i.getElementById(g.q),v=E?t:(null==l?void 0:l.getBoundingClientRect())||t;if(!v||!t)return;let f=i.createElement("div");i.body.appendChild(f);let I=()=>{try{var e;null===(e=f.parentElement)||void 0===e||e.removeChild(f),(0,p.unmountComponentAtNode)(f),c(null),u.current=s()}catch(e){}};return u.current=I,(0,p.render)((0,n.jsx)("div",{className:h()(y.default.propDraw,(!!(null==r?void 0:r.document)||E)&&y.default.propDrawFail),style:{"--originx":`${t.x+t.width/2}px`,"--originy":`${t.y+t.height/2}px`,"--targetx":`${v.x+v.width/2}px`,"--targety":`${v.y+v.height/2-(v!==t?18:0)}px`},onAnimationEnd:()=>{I()},children:(0,n.jsx)("img",{src:_})}),f),window.collectEvent("livesdk_connection_get_buffer_card_result_show",(0,m._)({get_type:(null==d?void 0:d.reason)===1?"mvp":"high_money",is_get_buffer_card:Number(!E),prop_id:null==d?void 0:d.prop_id},null==o?void 0:o.getPKPropCardCommonParams())),()=>{I()}},[_,E]),(0,l.useEffect)(()=>()=>{u.current()},[]),(0,n.jsx)("div",{className:y.default.propDrawAnchor,ref:a})}var A=i("964591"),L=i.p+"media/fogBothBar.5f8674552ec844fa.webp",P=i.p+"media/fogRightBar.3dfecd1bd9263758.webp",O=i.p+"media/leftFreezeBar.0ff814886f92a44b.webp",k=i.p+"media/rightFreezeBar.f9696e67502b3f41.webp";let S={enablePropCard:!1,anchorEffectInfoMap:{},inEffectAnchorEffectInfoMap:{},openPropCardDesc:s(),openPropCardRules:s(),setFakePropInfo:s(),updateAnchorEffectInfoMapByJSON:s()},C=(0,r.kr)(S),R=e=>{let t=(0,a.dP)(e),[i,n]=(0,l.useState)({}),o=(0,c.Z)(()=>{n(t=>(0,a.PG)(e,t,!0))});return(0,v.Z)(()=>{o()},t?void 0:1e3,{immediate:!0}),(0,l.useEffect)(()=>{o()},[e]),i},b=(0,l.memo)((0,A.Pi)(e=>{let{children:t}=e,{singletonStore:{message:i},pkStore:{pkId:r,pkCountDown:u,isInPK:d}}=(0,f.o)(),[s,v]=(0,l.useState)(null),[_,m]=(0,l.useState)({}),p=(0,c.Z)(e=>{if(!e){m({});return}m((0,a.x$)(e))});(0,l.useEffect)(()=>{d||m({})},[d]),(0,l.useEffect)(()=>{null==i||i.on("BattleEffectContainerMessage",e=>{var t,i;let n=null===(i=e.find(e=>{var t;return(null==e?void 0:null===(t=e.payload)||void 0===t?void 0:t.battle_id)===r}))||void 0===i?void 0:null===(t=i.payload)||void 0===t?void 0:t.battle_effect_info;n&&p(n)}),null==i||i.on("BattleUpdatePropCardTaskMessage",e=>{var t,i;let n=null===(i=e.find(e=>{var t;return(null==e?void 0:null===(t=e.payload)||void 0===t?void 0:t.battle_id)===r}))||void 0===i?void 0:null===(t=i.payload)||void 0===t?void 0:t.battle_effect_info;n&&p(n)})},[i,r]),(0,l.useEffect)(()=>{!u&&m({})},[!u]);let g=(0,a.dP)(_);(0,l.useEffect)(()=>{if(g)return;let e=o.Z.setIntervalWarp(()=>{m(e=>(0,a.PG)(e,e))});return()=>{o.Z.clearIntervalWarp(e)}},[g]);let I=d?_:{},E=R(I);return(0,n.jsxs)(C.Provider,{value:{anchorEffectInfoMap:I,inEffectAnchorEffectInfoMap:E,openPropCardDesc:()=>{},openPropCardRules:()=>{},fakePropInfo:s,setFakePropInfo:v,updateAnchorEffectInfoMapByJSON:p,enablePropCard:!0},children:[t,(0,n.jsx)(N,{})]})})),M=(0,u.Z)(C),V=()=>M(e=>e.anchorEffectInfoMap),w=()=>M(e=>e.inEffectAnchorEffectInfoMap),x=e=>{let t=w();return(0,l.useMemo)(()=>{var i,n;return(null==t?void 0:null===(n=t[e])||void 0===n?void 0:null===(i=n[a.du.FreezeBuff])||void 0===i?void 0:i.length)>0},[e,t])},D=e=>M(t=>(0,a.PL)(e,t.anchorEffectInfoMap)),j=()=>M(e=>e.enablePropCard),U=e=>{var t;let i=w();return((null==i?void 0:null===(t=i[e])||void 0===t?void 0:t[a.du.Fog])||[]).length>0},F=()=>{let e=w();return(0,l.useMemo)(()=>(0,a.To)(e),[e])},G=e=>{let t=U(e);return{isAnchorInFog:t,isSomeAnchorInSuperFogEffect:!!F()}},B=e=>{let{leftAnchorIdList:t=[],rightAnchorIdList:i=[]}=e,n=V(),o=w(),r=M(e=>e.fakePropInfo),{fakeEffect:u,fakeEffectIsSuperFog:d}=(0,l.useMemo)(()=>{let e={fakeEffect:void 0,fakeEffectIsSuperFog:!1},{type:i,sendTime:l}=r||{};if(!i)return e;for(let e of t){var o,u;let t=null==n?void 0:null===(u=n[e])||void 0===u?void 0:null===(o=u[i])||void 0===o?void 0:o.find(e=>Number(null==e?void 0:e.insert_time)>=l);if(t)return{fakeEffect:t,fakeEffectIsSuperFog:(null==t?void 0:t.is_super_prop)&&(0,a.q7)(null==t?void 0:t.type)}}return e},[n,r,t]),s=F(),c=d?u:s,v=!!c,{leftEffectInfo:_,rightEffectInfo:f,repeatedEffect:m}=(0,l.useMemo)(()=>{let e=e=>{if(!e||!(0,a.gQ)(e))return null;for(let l of t){var i,n;let t=null==o?void 0:null===(n=o[l])||void 0===n?void 0:null===(i=n[null==e?void 0:e.type])||void 0===i?void 0:i.find(t=>(null==t?void 0:t.insert_time)!==(null==e?void 0:e.insert_time));if(t)return t}},n=(()=>{for(let e of t){let{firstEffect:t}=(0,a.PL)(e,o);if(t)return t}})();if((!n||(0,a.q7)(null==n?void 0:n.type))&&c||d)return{leftEffectInfo:c,rightEffectInfo:c,repeatedEffect:e(c)};let l=u||n;return{leftEffectInfo:l,rightEffectInfo:(()=>{for(let n of i){var e,t;let i=null===(e=(0,a.Md)({anchorId:n,anchorEffectInfoMap:o,type:a.du.FreezeBuff}))||void 0===e?void 0:e[0];if(i)return i;let l=null===(t=(0,a.Md)({anchorId:n,anchorEffectInfoMap:o,type:1}))||void 0===t?void 0:t[0];if(l)return l}})(),repeatedEffect:l?e(l):null}},[o,t,i,c,u,d]),p=(0,a.FD)(_),g=(0,a.FD)(f),I=(0,a.FD)(m).barIcon,E=(0,a.q7)(null==_?void 0:_.type),h=(0,a.q7)(null==f?void 0:f.type),y=(0,a.W5)(null==_?void 0:_.type),T=(0,a.W5)(null==f?void 0:f.type),N=T?g.barIcon:p.barIcon,A=E||h||v,S=!_&&h,[C,R]=(0,l.useMemo)(()=>y&&T?[O,k]:y&&!T?[O,void 0]:!y&&T?[void 0,k]:E&&h?[L,L]:E&&!h?[null==p?void 0:p.barAuraIcon,void 0]:!_&&h?[void 0,P]:[null==p?void 0:p.barAuraIcon,void 0],[_,f,v]),b=!R&&g.barMiniIcon;return{leftEffectInfo:_,rightEffectInfo:f,needPkBarAlignCenter:A,needHideCenterIcon:S,centerIcon:N,leftAuraUrl:C,rightAuraUrl:R,rightMiniIcon:b,hideRightScore:(0,l.useMemo)(()=>v||i.some(e=>{var t;return null===(t=(0,a.Md)({anchorId:e,anchorEffectInfoMap:o,type:1}))||void 0===t?void 0:t.length}),[i,o,v]),hideLeftScore:v,isSomeAnchorInSuperFogEffect:v,repeatedCenterIcon:I}},Y=e=>{let{anchorId:t,showSelfFrezze:i}=e,{firstEffect:n,effectList:o,anchorEffectMap:r}=D(t),{tipText:u,targetEndTime:d,count:s,value:c}=(0,l.useMemo)(()=>{var e,t,l,u,d,s;if(!n)return{tipText:null,targetEndTime:null};let c=null===(e=r[a.du.FreezeBuff])||void 0===e?void 0:e[0];if(c){let e=(null===(l=c.prop_card_task)||void 0===l?void 0:l.current_value_str)||(null===(u=c.prop_card_task)||void 0===u?void 0:u.current_value)||"0",t=null===(d=c.prop_card_task)||void 0===d?void 0:d.effect_num;return{tipText:i?"你的待解冻值":"定身",count:t,value:e,totalValue:(null===(s=c.prop_card_task)||void 0===s?void 0:s.total_value)||e}}let{name:v,type:_,is_super_prop:f}=n,m=Object.entries(r).some(e=>{let[t,i]=e;return Number(t)!==_&&(null==i?void 0:i.length)}),p=null===(t=r[_])||void 0===t?void 0:t.some(e=>e.is_super_prop!==f);if(!m&&!p)return{tipText:`${v}生效中`,targetEndTime:Math.max(...r[n.type].map(e=>Number(e.end_time))),count:null};let g=(0,a.hN)(o);return{tipText:`${g?"超级":""}道具卡生效中`,targetEndTime:Math.max(...o.map(e=>Number(e.end_time))),count:o.length}},[n,i,r,o]);return{tipText:u,count:s,countDown:Math.floor((0,_.Z)({targetDate:d?new Date(d):void 0})[0]/1e3),firstEffect:n,value:c,totalValue:c}}},964530:function(e,t,i){i.d(t,{FD:function(){return h},IK:function(){return T},Md:function(){return p},PG:function(){return s},PL:function(){return v},To:function(){return f},W5:function(){return E},dP:function(){return c},du:function(){return u},gQ:function(){return _},hN:function(){return m},q7:function(){return g},sG:function(){return I},x$:function(){return d}});var n=i(629686),l=i(402748);i(591964),i(490629),i(932651),i(117232),i(505696),i(102117);var o=i(876553),r=i.n(o),u={EffectDefault:0,0:"EffectDefault",Fog:1,1:"Fog",FierceBuff:2,2:"FierceBuff",BorrowedBuff:3,3:"BorrowedBuff",FreezeBuff:4,4:"FreezeBuff"};let a={},d=e=>{try{var t;let i=JSON.parse(e);return Object.entries(null!==(t=i.anchor_effect_map)&&void 0!==t?t:{}).reduce((e,t)=>{let[i,o]=t;return Object.assign(e,{[i]:Object.entries(o.effect_map||{}).reduce((e,t)=>{let[o,u]=t,d=(null==u?void 0:u.effect_list)||[];if(4===Number(o))for(let e of u.effect_list){if(i in a&&Number(e.prop_card_task.version)<a[i]){d=d.filter(t=>!r()(t,e));continue}a[i]=Number(e.prop_card_task.version)}return(null==d?void 0:d.length)?(0,l._)((0,n._)({},e),{[o]:Array.from(d).sort((e,t)=>Number(null==t?void 0:t.is_super_prop)-Number(null==e?void 0:e.is_super_prop))}):e},{})})},{})}catch(e){return{}}},s=(e,t,i)=>{try{let o=Object.entries(e).reduce((e,t)=>{var o;let[r,u]=t,d=Object.entries(u).reduce((e,t)=>{let[o,u]=t,d=null==u?void 0:u.filter(e=>{if(4===Number(o))return(null==e?void 0:e.prop_card_task.current_value)!==0&&(null==e?void 0:e.prop_card_task.current_value_str)!=="0"||(delete a[r],!1);let t=Date.now(),n=Number(null==e?void 0:e.end_time)>=t;if(!i)return n;let l=Number(null==e?void 0:e.start_time)<=t;return n&&l});return(null==d?void 0:d.length)?(0,l._)((0,n._)({},e),{[o]:d}):e},{});return(null===(o=Object.keys(d))||void 0===o?void 0:o.length)?(0,l._)((0,n._)({},e),{[r]:d}):e},{});if(r()(o,t))return t;return o}catch(e){return{}}},c=e=>!Object.keys(e||{}).length,v=(e,t)=>{let i=t[e]||{},n=[2,3,1,4].map(e=>Array.from(i[e]||[]).sort((e,t)=>Number(null==t?void 0:t.is_super_prop)-Number(null==e?void 0:e.is_super_prop))).filter(Boolean).flat(1),l=n.find(e=>4===e.type);return{effectList:n,firstEffect:l||n[0],anchorEffectMap:i}},_=e=>{let t=Date.now();return Number(e.start_time)<=t&&Number(e.end_time)>=t},f=e=>{for(let t of Object.values(e)){let e=(t[1]||[]).find(e=>null==e?void 0:e.is_super_prop);if(e)return e}return null},m=e=>null==e?void 0:e.some(e=>null==e?void 0:e.is_super_prop),p=e=>{let{anchorId:t,anchorEffectInfoMap:i,type:n}=e;return(i[t]||{})[n]},g=e=>1===e,I=e=>2===e,E=e=>4===e,h=e=>{var t,i,n,l,o,r;let u=null==e?void 0:null===(i=e.bar_icon)||void 0===i?void 0:null===(t=i.url_list)||void 0===t?void 0:t[0],a=null==e?void 0:null===(l=e.bar_aura_url)||void 0===l?void 0:null===(n=l.url_list)||void 0===n?void 0:n[0];return{barIcon:u,barAuraIcon:a,barMiniIcon:null==e?void 0:null===(r=e.bar_min_icon)||void 0===r?void 0:null===(o=r.url_list)||void 0===o?void 0:o[0]}},y={4194:2,4195:3,4196:1},T=e=>[2,3,1].find(t=>y[e]===t)},487543:function(e,t,i){i.r(t),i.d(t,{default:function(){return h},VipLiveBoundaryPlugin:function(){return E}});var n=i("320165"),l=i("101199"),o=i("692685"),r=i("964591"),u=i("542901"),a=i("198412"),d=i.n(a),s=i("746517"),c=i("264402"),v=i("519128"),_=i("602786"),f=i("414061");let m=()=>{let{vipStore:e,roomStore:{roomInfo:t}}=(0,u.o)();(0,l.useEffect)(()=>{let i=()=>{var i,n;let l=null==t?void 0:null===(i=t.anchor)||void 0===i?void 0:i.id_str,o=null==t?void 0:null===(n=t.room)||void 0===n?void 0:n.id_str;if(!!l)(0,c.GT)({room_id:o,anchor_id:l}).then(t=>{var i,n,l;let{data:o}=t;e.setVipEmojiConfig(o.data);let r=null==o?void 0:null===(n=o.data)||void 0===n?void 0:null===(i=n.user_data)||void 0===i?void 0:i.expired_time,u=1e3*r,a=null==o?void 0:null===(l=o.data)||void 0===l?void 0:l.is_member,d=new Date().getTime();e.setIsVip(u>d&&a),e.setVipLiveStatus(r?_.L[(0,v.j$)(r)]:_.L[_.vz.BEFORE]),e.setVipInfoLoaded(!0)})};i();let n=f.listen(f.EVENT.VipRechargeSuccess,()=>{i()});return()=>{null==n||n()}},[t])};var p=i("762080"),g=i("308245"),I=i("574939");let E=(0,r.Pi)(e=>{let{onShowVipLiveBoundary:t,paidLiveData:i,roomId:l,roomStatus:r,messageInstance:u,onBtnClick:a,isInLivingRoom:d,roomInfo:s,customContent:c}=e;return(0,n.jsx)(o.ZP,{roomId:l,roomStatus:r,messageInstance:u,onBtnClick:a,paidLiveData:i,onShowBoundary:t,isInLivingRoom:d,roomInfo:s,customContent:c})});var h=(0,r.Pi)(()=>{let{singletonStore:{message:e},paidLiveStore:{paidLiveData:t},roomStore:{roomInfo:i,roomStatus:o,hideBanner:r},vipStore:{setShowVipLiveBoundary:a,setIsShowVipPanel:c,showVipLiveBoundary:v,isShowVipPanel:_},userStore:{headerUserInfo:f},feedStore:{isActive:h},rightPanelStore:{openItem:y}}=(0,u.o)();m();let T=d()(i,"room.id_str"),N=()=>!1;return(0,l.useEffect)(()=>{h&&(o!==p.LV.END||v)&&_&&(!r||v)&&y(g.k.Vip)},[h,o,v,_,r,v]),(0,n.jsx)(E,{messageInstance:e,paidLiveData:t,isInLivingRoom:!0,roomInfo:i,roomId:T,roomStatus:o,onShowVipLiveBoundary:e=>{a(e)},onBtnClick:()=>{if(null==f?void 0:f.isLogin)(0,I.Z)("live");else{var e,t;(0,s.default)({success:()=>{!N()&&window.location.reload()},enterMethod:"",headerText:"登录后查看更多作品",next:`https://${null===(t=window)||void 0===t?void 0:null===(e=t.location)||void 0===e?void 0:e.host}`})}}})})},519128:function(e,t,i){i.d(t,{HS:function(){return s},T3:function(){return v},ZK:function(){return _},cI:function(){return a},j$:function(){return d},m1:function(){return f},p8:function(){return c}});var n=i(629686),l=i(402748);i(374954);var o=i(602786);let r=(e,t,i)=>e===o.Nl.FuliType&&t===o.D$.VIRTUAL&&i===o.lW.DONE?o.lW.VIRTUAL_DONE:i||0,u=e=>{if(e.type===o.Nl.CourseType){var t,i;return e.privilege_switch===o.oH.OFF?o.Bn[e.type]:`${null!==(i=null===(t=e.discount_course_info)||void 0===t?void 0:t.free_course_number)&&void 0!==i?i:0}个免费课程`}return null==e?void 0:e.content},a=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t===o.Nl.LinkmicType)return"";if(t===o.Nl.FuliType||t===o.Nl.LinkmicType)return o.eS[e];if(t===o.Nl.EmojiType)return"去使用";if(t===o.Nl.GroupType)return o.I$[e];if(t===o.Nl.CourseType)return"查看";if(t===o.Nl.Ask){if(i)return"去提问";if(n)return"查看"}return t===o.Nl.ShortVideo&&l?"查看":""},d=e=>{let t=1e3*Number(e),i=t-new Date().getTime();if(0===e)return o.vz.BEFORE;if(i>0&&i<6048e5)return o.vz.AFTER_SEVEN;if(i>0)return o.vz.AFTER;if(i<0&&i>-6048e5)return o.vz.EXPIRED_FEWDAY;else if(i<0)return o.vz.EXPIRED;return o.vz.BEFORE},s=(e,t,i,n)=>!!t&&!!e&&!(e.length<=0)&&!!i&&!!n&&(!!i[e]||!!n[e]),c=(e,t)=>{var i,s,c,v,_,f;if(!e)return[];let m=[],p=e.advanced_privilege||[],g=e.is_member,I=d(null!==(s=e.expired_time)&&void 0!==s?s:0),E=(null!==(c=null===(i=e.short_video_info)||void 0===i?void 0:i.short_video_count)&&void 0!==c?c:0)>0;for(let i=0;i<p.length;i++){let{type:d}=p[i],s=r(d,p[i].bonus_type,p[i].received),c=!0;if(d===o.Nl.Ask){let{answered_ask_num:e=0}=p[i];c=e>0}let I=(0,l._)((0,n._)({},p[i]),{isGradient:!g,btnText:(g||d===o.Nl.CourseType||d===o.Nl.Ask||d===o.Nl.ShortVideo)&&a(s,d,g,c,E),handleClick:function(e,t,i,n){var l,r;let{type:u,status:a,isMember:d}=e;if(u===o.Nl.EmojiType||u===o.Nl.LinkmicType||u===o.Nl.CourseType||u===o.Nl.Ask)return n;let s=(null!==(r=null==t?void 0:null===(l=t.short_video_info)||void 0===l?void 0:l.short_video_count)&&void 0!==r?r:0)>0;return u===o.Nl.ShortVideo,n}({type:null===(v=p[i])||void 0===v?void 0:v.type,bonusType:null===(_=p[i])||void 0===_?void 0:_.bonus_type,status:s,prizeId:null===(f=p[i])||void 0===f?void 0:f.prize_id,item:p[i],isMember:g},e,0,t),content:u(p[i]),privilege_tags:e.privilege_tags});m.push(I)}return m},v=e=>{for(let t=0;t<e.length;t++)if(e[t].type===o.Nl.FuliType)return{fuliStatus:"in_effect",fuliType:e[t].schema_url?"real":"virtual",fuliId:e[t].prize_id};return{fuliStatus:"nonactivated",fuliType:"",fuliId:0}},_=e=>{let t=new Date(e),i=t.getFullYear(),n=t.getMonth()+1<10?`${t.getMonth()+1}`:t.getMonth()+1,l=10>t.getDate()?`${t.getDate()}`:t.getDate();return`${i}-${n}-${l}`},f=e=>{if(1===e.length)return e[0];if(e.length>1){let t=e.find(e=>e.apply_status===o.aJ.ALREADY_IN);if(t)return t;let i=e.find(e=>e.apply_status===o.aJ.JOIN_NOW);if(i)return i;let n=e.find(e=>e.apply_status===o.aJ.APPLYING);if(n)return n;let l=e.find(e=>e.apply_status===o.aJ.APPLY_TO_JOIN||e.apply_status===o.aJ.NOT_APPLY);if(l)return l;let r=e.find(e=>e.apply_status===o.aJ.VIEW_CONDITION);if(r)return r;let u=e.find(e=>e.apply_status===o.aJ.GROUP_IS_FULL);if(u)return u}return e[0]}},602786:function(e,t,i){i.d(t,{Bn:function(){return U},D$:function(){return l},I$:function(){return I},Iw:function(){return n},L:function(){return f},M4:function(){return h},Nl:function(){return o},Sx:function(){return E},W7:function(){return a},YH:function(){return m},aJ:function(){return g},aR:function(){return p},eA:function(){return r},eS:function(){return b},ec:function(){return s},f6:function(){return T},l:function(){return C},lW:function(){return R},oH:function(){return M},uV:function(){return d},vB:function(){return v},vy:function(){return c},vz:function(){return _},yv:function(){return y},z0:function(){return u}});let n=2,l={REAL:0,VIRTUAL:1},o={Common:0,IconType:1,EnterType:2,EmojiType:3,GroupType:4,CustomPrivilegeType:5,FuliType:6,LotteryType:7,VipLiveType:8,NoticeType:9,LinkmicType:10,CommonPrivilege:"CommonPrivilege",SubscribeGiftType:11,CustomPanelType:12,PriorityService:13,CustomPriceType:"CustomPriceType",VipSpace:14,Ask:15,CourseType:16,ShortVideo:17},r=[o.EmojiType,o.IconType,o.LotteryType,o.CustomPrivilegeType,o.Common,o.VipLiveType,o.PriorityService,o.GroupType],u=[o.GroupType],a={MONTH:0,QUARTER:1,YEAR:2,PURCHASE:3},d={[a.MONTH]:"月度会员",[a.QUARTER]:"季度会员",[a.YEAR]:"年度会员",[a.PURCHASE]:"月度会员"},s={[a.MONTH]:"个月",[a.QUARTER]:"个月",[a.YEAR]:"个月"},c={[a.MONTH]:"1",[a.QUARTER]:"3",[a.YEAR]:"12"},v={new:0,renew:1,rePurchase:2},_={BEFORE:1,AFTER:2,AFTER_SEVEN:3,EXPIRED_FEWDAY:4,EXPIRED:5},f={[_.BEFORE]:"nonactivated",[_.AFTER]:"activated_over_7d",[_.AFTER_SEVEN]:"activated_in_7d",[_.EXPIRED_FEWDAY]:"expired_in_14d",[_.EXPIRED]:"expired_out_14d"},m={MONTH:3,QUARTER:4,YEAR:5},p={0:"零",1:"一",2:"二",3:"三",4:"四",5:"五",6:"六",7:"七",8:"八",9:"九",10:"十"},g={NOT_APPLY:0,APPLYING:1,ALREADY_IN:2,GROUP_IS_FULL:3,APPLY_TO_JOIN:4,JOIN_NOW:5,VIEW_CONDITION:6},I={0:"申请",1:"已申请",2:"进群",3:"已满",4:"申请",5:"加入",6:"条件"},E={AUDIT_ING:1,FAIL:2,EFFECT:3,OFFLINE:4,FINISH:5,CAOGAO:6};E.AUDIT_ING,E.FAIL,E.EFFECT,E.OFFLINE,E.FINISH,E.CAOGAO;let h={UNKNOWN:0,FROM_ASK:1,FROM_SPACE:2,FROM_LIVE_FINISH_PAGE:3,FROM_COURSE_FEED:4,FROM_LIVE_FEED:5,FROM_QA_FEED:6,FROM_SPACE_FEED:7,FROM_REPLAY_OR_LIVE:8,FROM_VIDEO:9,FROM_SUPPORT_LIST:10,FROM_PRE_SUPPORT_LIST:11,FROM_FAME_SUPPORT_LIST:12};h.FROM_ASK,h.FROM_SPACE,h.FROM_COURSE_FEED,h.FROM_LIVE_FEED,h.FROM_SPACE_FEED,h.FROM_QA_FEED,h.FROM_REPLAY_OR_LIVE,h.FROM_VIDEO,h.FROM_SUPPORT_LIST,h.FROM_PRE_SUPPORT_LIST,h.FROM_FAME_SUPPORT_LIST;let y=0,T=2,N=0,A=1,L=2,P=3,O=4,k=5,S=999,C={NONE:0,NORMAL:1,DISABLE:2};C.NONE,C.NORMAL,C.DISABLE;let R={NONE:0,NORMAL:1,DONE:2,OVER:3,PENDING:4,NO_PERMISSION:5,TO_APPLY:6,APPLY_METHOD:7,VIRTUAL_DONE:"VIRTUAL_DONE",READY:9},b={[R.NONE]:"",[R.NORMAL]:"领取",[R.DONE]:"已领取",[R.OVER]:"已领完",[R.NO_PERMISSION]:"领取条件",[R.TO_APPLY]:"去连线",[R.APPLY_METHOD]:"连线方式",[R.VIRTUAL_DONE]:"领取方式"},M={ON:1,OFF:2};o.GroupType,o.PriorityService,o.VipLiveType,o.CustomPriceType,o.LinkmicType,o.CustomPrivilegeType,o.EmojiType,o.CourseType,o.Ask,o.ShortVideo;let V=0,w=1,x=2,D=3,j=4;o.CommonPrivilege,o.GroupType,o.PriorityService,o.PriorityService,o.CustomPrivilegeType;let U={[o.GroupType]:"私密圈子资源共享",[o.CustomPrivilegeType]:"灵活创建自己擅长的会员权益",[o.VipLiveType]:"仅会员可见的直播专场",[o.LinkmicType]:"付费连线直播中,会员免费连",[o.PriorityService]:"可向创作者申请提供优先服务",[o.CourseType]:"会员可享受课程免费或折扣优惠",[o.Ask]:"可与创作者进行问答互动"}},928021:function(e,t,i){i.d(t,{q:function(){return n}});let n="gift-icon-id"},776698:function(e,t,i){i.d(t,{j:function(){return a}});var n=i(629686),l=i(402748),o=i(101199),r=i(939165),u=i(121998);let a=e=>{let{href:t,isLiving:i,isActive:a,useF:d,onEnterRoom:s,enterLogParams:c,forceEnter:v,isInPWA:_,disabled:f=!1}=e,m=(0,o.useCallback)(e=>{var o;let r=null==e?void 0:e.target,a=null===(o=document)||void 0===o?void 0:o.activeElement,f=null==r?void 0:r.tagName,m=null==a?void 0:a.tagName;if("INPUT"!==f&&"TEXTAREA"!==f&&(null==r?void 0:r.contentEditable)!=="true"&&"INPUT"!==m&&"TEXTAREA"!==m&&(null==a?void 0:a.contentEditable)!=="true"&&(!(Array.from(document.querySelectorAll(".modal-video-container")).filter(e=>e.getBoundingClientRect().height>0).length>0)||0!==Array.from(document.querySelectorAll(".modal-video-container .liveSearchPlayer")).filter(e=>e.getBoundingClientRect().height>0).length)){if(("F"===e.key||"f"===e.key)&&!e.shiftKey&&d){if(e.stopPropagation(),e.preventDefault(),v){v();return}t&&i&&s({openLiveModal:!0,event:e,callback:()=>{let e="";e=t.indexOf("?")>=0?`${t}&${u.stringify((0,l._)((0,n._)({},c),{action_type:"hot_key"}))}`:`${t}?${u.stringify((0,l._)((0,n._)({},c),{action_type:"hot_key"}))}`,window.open(e,_?"_self":"_blank")}})}}},[t,a,i,s,_,d,c,v]);(0,r.o)(()=>{if(!f)return a&&document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[a,f,m])}},645984:function(e,t,i){i.d(t,{Z:function(){return y}}),i("313036"),i("490629");var n=i("320165"),l=i("469935"),o=i.n(l),r=i("101199"),u=i("855500"),a=i("810069"),d=i("988381"),s=i("573495"),c=i("633313"),v=i.p+"media/redpacket.f0f31d81e6a598e6.png";let _=e=>{let{className:t}=e;return(0,n.jsx)("div",{className:o()(c.default.icon,t),children:(0,n.jsx)("img",{src:v})})};var f=i("47404"),m=i.p+"media/lottery.5b2176689acf5cd3.png";let p=e=>{let{className:t}=e;return(0,n.jsx)("div",{className:o()(f.default.icon,t),children:(0,n.jsx)("img",{src:m})})};var g=i("432051"),I=i("991879"),E=i("776698"),h=i.p+"media/a.e776547d9fd064a7.png",y=e=>{let{className:t,description:i,enterText:l,href:c,abTestData:v,isInPWA:f,onEnterRoom:m,isLiving:y,isActive:T,enterLogParams:N,useF:A=!0,roomIdStr:L="",scene:P="web_feed",size:O="normal",forceEnter:k,useRedPack:S=!0,disableEnterRoomShotCut:C=!1,isHover:R,setIsHover:b,rawdata:M,isPlayingVideo:V=!1,countDown:w=0}=e,[x,D]=r.useState(!1),[j,U]=r.useState(!1),F=r.useCallback(async()=>{var e,t,i,n,l,o,r,d,s,c;let v=(0,u.a)(),_=await (0,I.aL)({room_id:L,scene:P,channel:"channel_pc_web",region:"cn",device_id:null===(e=(0,a.Es)())||void 0===e?void 0:e.user_unique_id,device_type:null==v?void 0:v.device_type,os_version:null==v?void 0:v.os,version_code:null==v?void 0:v.version_code,webcast_sdk_version:2450});200===Number(_.status)&&(null==_?void 0:null===(t=_.data)||void 0===t?void 0:t.data)&&(D((null==_?void 0:null===(o=_.data)||void 0===o?void 0:null===(l=o.data)||void 0===l?void 0:null===(n=l.others)||void 0===n?void 0:null===(i=n.web_enter_benefit_point_data)||void 0===i?void 0:i.has_ongoing_lucky_money)||!1),U((null==_?void 0:null===(c=_.data)||void 0===c?void 0:null===(s=c.data)||void 0===s?void 0:null===(d=s.others)||void 0===d?void 0:null===(r=d.web_enter_benefit_point_data)||void 0===r?void 0:r.has_ongoing_lottery)||!1))},[L,P]);(0,E.j)({href:c,isLiving:y,isActive:T,isInPWA:f,onEnterRoom:m,enterLogParams:N,useF:A,forceEnter:k,disabled:C});let G=r.useMemo(()=>!!x||!!j,[x,j]),B=r.useMemo(()=>x?"redPacket":j?"lottery":"",[v,x,j]),Y=!d._.isOptmizeInvisibleLive(v)||T;r.useEffect(()=>{T&&F()},[T,F]);let H=r.useMemo(()=>{var e,t,i,n;return(null==v?!!void 0:!!v.douyinShowVrRoom)&&(1===Number(null==M?void 0:null===(e=M.extra)||void 0===e?void 0:e.vr_type)||2===Number(null==M?void 0:null===(t=M.extra)||void 0===t?void 0:t.vr_type)||(null==M?void 0:null===(n=M.pico_info)||void 0===n?void 0:null===(i=n.multi_stream_info)||void 0===i?void 0:i.multi_stream_scene)==="multi_camera")},[M,v]);return(0,n.jsxs)("div",{className:o()(g.default.liveDivideContainer,t,{[g.default.small]:"small"===O}),onMouseEnter:()=>null==b?void 0:b(!0),children:[(0,n.jsx)("div",{className:o()(g.default.liveDivide,g.default.liveDivideAb),children:(0,n.jsx)("div",{className:o()(g.default.textContent,g.default.textContentAb,{[g.default.isHoverd]:R}),children:V?(0,n.jsxs)("div",{className:g.default.textContainer,children:["高光播放中,",w||0,"s后切换为直播"]}):(0,n.jsxs)(n.Fragment,{children:[(!(G&&B)||!S)&&!H&&(0,n.jsx)(s.WaveLineAnimation,{className:Y?"":g.default.hidden}),!!B&&G&&S&&!H&&(0,n.jsxs)(n.Fragment,{children:["redPacket"===B&&(0,n.jsx)(_,{className:Y?"":g.default.hidden}),"lottery"===B&&(0,n.jsx)(p,{className:Y?"":g.default.hidden})]}),H&&(0,n.jsx)("img",{src:h,style:{width:32}}),(0,n.jsxs)("div",{className:g.default.textContainer,children:["点击",A&&"或按",A&&(0,n.jsx)("div",{className:g.default.Fkey}),"进入",`${H?"全景":""}直播间`]})]})})}),V?(0,n.jsxs)("div",{className:g.default.description,children:[(0,n.jsx)("div",{className:g.default.line}),!!B&&G&&S&&(0,n.jsxs)(n.Fragment,{children:["redPacket"===B&&(0,n.jsx)(_,{className:Y?g.default.icon:g.default.hidden}),"lottery"===B&&(0,n.jsx)(p,{className:Y?g.default.icon:g.default.hidden})]}),"点击",A&&"或按",A&&(0,n.jsx)("div",{className:g.default.Fkey}),"进入直播间",(0,n.jsx)("div",{className:g.default.line})]}):(0,n.jsx)(n.Fragment,{children:i&&(0,n.jsx)("div",{className:g.default.description,children:i})})]})}},243485:function(e,t,i){i.d(t,{j:function(){return g}}),i(490629);var n=i(320165),l=i(469935),o=i.n(l),r=i(101199),u=i(205082),a=i(414061),d=i(116553),s=i(980461),c=i(865856),v=i(380599),_=i(198412),f=i.n(_),m=i(536793);let p=e=>{let t=String(Math.floor(100+Math.floor(e%60))).slice(1),i=String(100+Math.floor(e/60)).slice(1);return`${i}:${t}`},g=e=>{var t,i,l,_,g,I,E,h;let{count:y,className:T,title:N,showTitle:A,program:L,paidLiveData:P,isLogin:O=!1,viewType:k,showCount:S=!0,appointment:C,assist_label:R}=e,b="object"==typeof R&&(null==R?void 0:R.label_type)===22&&(null==R?void 0:R.splice_label)?R.splice_label:null,M=null!==(I=(0,m.T)())&&void 0!==I?I:{},V=null==M?void 0:M.followTagExpose,[w,x]=r.useState(0),D=r.useCallback(()=>(0,n.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.95765 2.59839C6.95765 3.66536 6.06542 4.53306 4.96128 4.54561H4.91349C3.80935 4.53306 2.91711 3.66536 2.91711 2.59839V1.94879C2.91711 0.872405 3.82209 0 4.93738 0C6.05268 0 6.95765 0.872405 6.95765 1.94879V2.59839ZM1.45988 6.17671C2.29926 5.77687 3.98475 5.55579 4.93675 5.55579C5.89025 5.55579 7.57874 5.77687 8.41962 6.17985C8.90764 6.45268 9.25 7.06419 9.25 7.7792V8.19036C9.25 8.72034 8.9692 9.16565 8.5833 9.30834C7.65982 9.57176 5.92479 9.71288 4.93825 9.71288C3.95021 9.71288 2.21367 9.56863 1.2887 9.30677C0.905796 9.16252 0.625 8.71877 0.625 8.18879V7.77763C0.625 7.06106 0.968862 6.44797 1.45988 6.17671Z",fill:"white",fillOpacity:"0.9"})}),[]),j=Number(f()(P,"paid_type",0))===u.PAID_LIVE_TYPE.PAID_LIVE,U=Number(f()(P,"view_right",0)),F=f()(P,"ticket_session.ticket_session_id_str","");r.useEffect(()=>{let e=a.listen(a.EVENT.paidLiveDuration,e=>{j&&(null==e?void 0:e.ticket_id_str)&&e.ticket_id_str===F&&x(null==e?void 0:e.last_time)});return()=>e()},[F,j]);let G=r.useCallback(()=>{var e,t,i,l;if(j){if(O&&k===u.PAID_LIVE_VIEW_TYPE.TRY_WATCH_ING)return(0,n.jsx)(d.jR,{isFirstLive:(null==L?void 0:null===(e=L.mod)||void 0===e?void 0:e.episode_stage)===v.jL.FIRST_LIVE})}else return(null==L?void 0:null===(t=L.mod)||void 0===t?void 0:t.episode_stage)===v.jL.FIRST_LIVE?(0,n.jsx)(d.Sx,{className:c.default.liveTag,episodeStage:null==L?void 0:null===(i=L.mod)||void 0===i?void 0:i.episode_stage}):(0,n.jsx)(d.z,{className:c.default.liveTag,episodeStage:null==L?void 0:null===(l=L.mod)||void 0===l?void 0:l.episode_stage})},[j,null==L?void 0:null===(t=L.mod)||void 0===t?void 0:t.episode_stage,O,k]),B=r.useMemo(()=>j&&!U&&w>0&&O,[j,U,w,O]);return(0,n.jsxs)("div",{className:o()(c.default.liveUserCount,T),children:[S&&G(),b&&1===Number(V)&&(0,n.jsx)("div",{className:c.default.assistTagLabel,style:{color:null!==(E=b.text_color)&&void 0!==E?E:"#000000",backgroundColor:(null===(l=b.background_image)||void 0===l?void 0:null===(i=l.url_list)||void 0===i?void 0:i[0])?void 0:"#ffffff",backgroundImage:(null===(g=b.background_image)||void 0===g?void 0:null===(_=g.url_list)||void 0===_?void 0:_[0])?`url(${b.background_image.url_list[0]})`:void 0},children:null!==(h=b.text)&&void 0!==h?h:""}),B&&(0,n.jsxs)("div",{className:c.default.countDown,children:["试看中 ",p(w)]}),!j&&y&&S&&(0,n.jsx)(s.A,{className:c.default.userCount,count:y,renderSVG:D}),S&&N&&A?(0,n.jsx)("span",{className:c.default.title,children:N}):!!C&&(0,n.jsx)("span",{className:c.default.title}),C]})}},980461:function(e,t,i){i.d(t,{A:function(){return a}});var n=i(320165),l=i(309244),o=i(469935),r=i.n(o);i(101199);var u=i(372025);let a=e=>{let{count:t,className:i,renderSVG:o}=e;return(0,n.jsxs)("span",{className:r()(u.default.userCount,i),children:[o?o():(0,n.jsx)(l.Z,{}),(0,n.jsx)("span",{className:u.default.count,children:t||"0"})]})}},750239:function(e,t,i){i.d(t,{ET:function(){return n},U:function(){return d},UI:function(){return l},XC:function(){return a},fE:function(){return r},m$:function(){return u},nS:function(){return o}});var n={AUDIENCE_TYPE_UNKNOWN:0,0:"AUDIENCE_TYPE_UNKNOWN",VIDEO:1,1:"VIDEO",AUDIO:2,2:"AUDIO",AVATAR:3,3:"AVATAR"},l={RT_UNKNOWN:0,0:"RT_UNKNOWN",RT_AGREE:1,1:"RT_AGREE",RT_REJECT:2,2:"RT_REJECT"},o={UpdateLinkTypeReplyType_UNKNOWN:0,0:"UpdateLinkTypeReplyType_UNKNOWN",UpdateLinkTypeReplyType_AGREE:1,1:"UpdateLinkTypeReplyType_AGREE",UpdateLinkTypeReplyType_REJECT:2,2:"UpdateLinkTypeReplyType_REJECT"},r={EnlargeGuestInviteType_UNKNOWN:0,0:"EnlargeGuestInviteType_UNKNOWN",EnlargeGuestInviteType_ENLARGE:1,1:"EnlargeGuestInviteType_ENLARGE",EnlargeGuestInviteType_REDUCE:2,2:"EnlargeGuestInviteType_REDUCE",EnlargeGuestInviteType_ADJUST_TO_ENLARGE:3,3:"EnlargeGuestInviteType_ADJUST_TO_ENLARGE"},u={SILENCE_TYPE_NORMAL:0,0:"SILENCE_TYPE_NORMAL",SILENCE_TYPE_PASSIVE:1,1:"SILENCE_TYPE_PASSIVE",SILENCE_TYPE_OTHER_ROOM:2,2:"SILENCE_TYPE_OTHER_ROOM",SILENCE_TYPE_PUNISH:3,3:"SILENCE_TYPE_PUNISH"},a={NORMAL:0,0:"NORMAL",SONG:1,1:"SONG",FASTMATCH:2,2:"FASTMATCH",CITY:4,4:"CITY",STRONG_REACH:8,8:"STRONG_REACH",KTV_ACTIVITY:16,16:"KTV_ACTIVITY",PREPARE_APPLY:32,32:"PREPARE_APPLY",KTV_PRIOR_SONG_APPLY:64,64:"KTV_PRIOR_SONG_APPLY",CHAT_MATCH:128,128:"CHAT_MATCH",PUBLIC_AREA_COMMENT:256,256:"PUBLIC_AREA_COMMENT",KTV_MULTI_CHORUS:512,512:"KTV_MULTI_CHORUS",GUEST_LINK_AGAIN:1024,1024:"GUEST_LINK_AGAIN",REAL_TIME_CHORUS_INVITE:2048,2048:"REAL_TIME_CHORUS_INVITE",LEAVE_PAGE:4096,4096:"LEAVE_PAGE",ANCHOR_POINT_ENTER:8192,8192:"ANCHOR_POINT_ENTER"},d={LinkmicPositionStatus_Normal:0,0:"LinkmicPositionStatus_Normal",LinkmicPositionStatus_Locked:1,1:"LinkmicPositionStatus_Locked",LinkmicPositionStatus_BidPaid:2,2:"LinkmicPositionStatus_BidPaid"}},598659:function(e,t,i){i.d(t,{p:function(){return n}}),i(679308);let n=()=>Promise.resolve().then(i.bind(i,746517)).then(e=>e.liveShowAccount)},506926:function(e,t,i){i.d(t,{EF:function(){return r},PQ:function(){return o},k2:function(){return n},ve:function(){return l}});let n=()=>{var e;return null!==(e=Array.from(document.querySelectorAll("#playerPopup")).find(e=>e.getBoundingClientRect().height>0))&&void 0!==e?e:null},l=()=>{var e;return null!==(e=Array.from(document.querySelectorAll('[data-e2e="living-container"]')).find(e=>{var t;return(null===(t=e.getBoundingClientRect())||void 0===t?void 0:t.height)>0}))&&void 0!==e?e:null},o=()=>{var e;return null!==(e=Array.from(document.querySelectorAll("#user_control_panel")).find(e=>e.getBoundingClientRect().height>0))&&void 0!==e?e:null},r=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return null!==(e=Array.from(document.querySelectorAll(`#${t}`)).find(e=>e.getBoundingClientRect().height>0))&&void 0!==e?e:null}},21198:function(e,t,i){i.d(t,{a:function(){return r}});var n=i(480333);i(374954);var l=i(942155),o=i.n(l);class r{push(e,t){this.powers[e]?(this.powers[e].length<2||this.powers[e].pop(),this.powers[e].push(t)):this.powers[e]=[t],0!==this.status[e]&&(this.status[e]=0,clearTimeout(this.timer[e]),this.timer[e]=setTimeout(()=>this.publish(e),100))}on(e,t){this.ee.on(e,t)}off(e,t){this.ee.off(e,t),clearTimeout(this.timer[e])}destroy(){Object.keys(this.timer).forEach(e=>{clearTimeout(this.timer[e])})}publish(e){clearTimeout(this.timer[e]),this.status[e]=0;let t=this.powers[e].shift();t&&this.ee.emit(e,t),this.powers[e].length>0?this.timer[e]=setTimeout(()=>this.publish(e),this.interval):(this.timer[e]=setTimeout(()=>{this.ee.emit(e,{talk:0})},2*this.interval),delete this.status[e])}constructor(){(0,n._)(this,"ee",void 0),(0,n._)(this,"powers",{}),(0,n._)(this,"status",{}),(0,n._)(this,"timer",{}),(0,n._)(this,"interval",850),this.ee=new(o())}}},980360:function(e,t,i){i.d(t,{f:function(){return r}}),i(76375);var n=i(101199),l=i(913655),o=i(330548);function r(e){let t=(0,n.useContext)(l.qd);if(void 0===t)throw Error("roomStore must be used within Provider");return(0,o.oR)(t,e)}},259010:function(e,t,i){i.d(t,{L:function(){return a}});var n=i(629686),l=i(816565),o=i(953123),r=i(326367),u=i(101199);let a=e=>{let{onEnterRoom:t,enterLogParams:i={},href:a,propsOnLoginSuccess:d,adData:s,isReuseBasicPlayer:c=!1}=e,v=u.useMemo(()=>{let e=s?(0,l.e1)({rawAdData:s}):{};return(0,o.G7)((0,n._)({open_promotion_list:"1",enter_method_temai:"click_live_cart_tag"},i,e),a)},[a,i,s]),_=u.useMemo(()=>{let e=s?(0,l.e1)({rawAdData:s}):{};return(0,o.G7)((0,n._)({open_promotion_list:"1",open_promotion_detail:"1",enter_method_temai:"click_live_popup_card"},e,i),a)},[a,i,s]),f=u.useCallback(e=>{let{scene:o}=e||{};null==d||d();let u=s?(0,l.e1)({rawAdData:s}):{};null==t||t({openLiveModal:!0,onEnterParams:"cart"===o?(0,n._)({open_promotion_list:"1",open_promotion_detail:"0",enter_method_temai:"click_live_cart_tag"},i,u):(0,n._)({open_promotion_list:"1",open_promotion_detail:"1",enter_method_temai:"click_live_popup_card"},u,i)}),!c&&("cart"===o?window.open(v,(0,r.f)()?"_self":"_blank"):"pop"===o&&window.open(_,(0,r.f)()?"_self":"_blank"))},[d,t,v,_,c,i,s]),m=u.useCallback(()=>{let e=s?(0,l.e1)({rawAdData:s}):{};null==t||t({openLiveModal:!0,onEnterParams:(0,n._)({open_promotion_list:"1",open_promotion_detail:"0",enter_method_temai:"click_live_cart_tag"},i,e)}),!c&&window.open(v,(0,r.f)()?"_self":"_blank")},[v,t,c,i,s]);return{onShopLoginSuccess:f,onCartClick:m,onPromotionPopClick:u.useCallback(()=>{let e=s?(0,l.e1)({rawAdData:s}):{};null==t||t({openLiveModal:!0,onEnterParams:(0,n._)({open_promotion_list:"1",open_promotion_detail:"1",enter_method_temai:"click_live_popup_card"},e,i)}),!c&&window.open(_,(0,r.f)()?"_self":"_blank")},[_,t,c,i,s])}}},298602:function(e,t,i){i.d(t,{q:function(){return o}}),i(362051);var n=i(56924),l=i(752150);function o(e){let{message:t,socketData:i}=e;(0,n.C)(()=>{var e,n,o;let r="websocketkey20230220",u=[];try{u=JSON.parse(null!==(n=null===(e=localStorage)||void 0===e?void 0:e.getItem(r))&&void 0!==n?n:"[]")}catch(e){}if(!!t)if(i)null==t||t.setWebsocketKey(i),null===(o=localStorage)||void 0===o||o.setItem(r,JSON.stringify(i));else{let e=function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;(0,l.ZP)({service_name:"webcast.douyin.live_pc",key:"message_websocket_params"}).then(e=>{var i;null==t||t.setWebsocketKey(e),null===(i=localStorage)||void 0===i||i.setItem(r,JSON.stringify(e))}).catch(n=>{i>1?e(i-1):null==t||t.setWebsocketKey(u)})};e(2)}},[t])}},232547:function(e,t,i){i.d(t,{Sv:function(){return s},T1:function(){return c},n$:function(){return v},rC:function(){return _},w:function(){return f}});var n=i(629686),l=i(402748);i(414931);var o=i(113515),r=i(75138),u=i(409250),a=i(426038),d=i(397176);function s(){var e,t;if(d.s)return 0;let i=localStorage.getItem((0,r.DS)()?o.YN:o.xQ);if(!!(i=null!==(t=null===(e=(u.Q.getItem({sKey:a.CookieKeys.VolumeInfo})||{}).volume)||void 0===e?void 0:e.toString())&&void 0!==t?t:i))return Number(i)}function c(){var e;return null!==(e=s())&&void 0!==e?e:.6}function v(e){let t=u.Q.getItem({sKey:a.CookieKeys.VolumeInfo})||{};return u.Q.setItem(a.CookieKeys.VolumeInfo,(0,l._)((0,n._)({},t),{volume:e})),localStorage.setItem((0,r.DS)()?o.YN:o.xQ,e.toString())}function _(){var e;if(d.s)return!1;let t="1"===localStorage.getItem((0,r.DS)()?o.FR:o.mI);return t=null!==(e=(u.Q.getItem({sKey:a.CookieKeys.VolumeInfo})||{}).isMute)&&void 0!==e?e:t}function f(e){let t=u.Q.getItem({sKey:a.CookieKeys.VolumeInfo})||{};return u.Q.setItem(a.CookieKeys.VolumeInfo,(0,l._)((0,n._)({},t),{isMute:e,isUserMute:e})),localStorage.setItem((0,r.DS)()?o.FR:o.mI,e?"1":"0")}},575697:function(e,t,i){i.d(t,{CL:function(){return r},MA:function(){return o},OL:function(){return a},bA:function(){return u}});var n=i(534133),l=i(745285),o={BasicPlayer:"living-basic-player",Background:"living-background"};let r="living-pip-id",u=()=>(0,n.IT)(r),a=()=>u()||(0,l.DJ)()?1:0},23091:function(e,t,i){i.d(t,{Zi:function(){return v},fl:function(){return m},vD:function(){return f}}),i(679308),i(490629),i(76375);var n=i(320165),l=i(101199),o=i(806217),r=i(494842),u=i(795233),a=i.n(u),d=i(745285),s=i(499059),c=i(534133);let v="default_pip_id",_=(0,l.createContext)({isSupported:!1,pipInfo:null,openPipWindow:()=>Promise.resolve({isSuccess:!1}),closePipWindow:a(),pipAnchorEleMapRef:{current:{}}}),f=e=>{let{children:t}=e,[i,u]=(0,l.useState)((0,d.ZV)()),a=(0,l.useRef)({}),[f,m]=(0,l.useState)(null),p=(0,o.Z)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;if((null==f?void 0:f.pipId)===e){var t,i,n;(null===(t=s.Le.getConfig(s.gI.AbtestData))||void 0===t?void 0:t.enableMemoryLeakFix)&&(null===(i=(n=f.window).__disconnectPipStyleObserver__)||void 0===i||i.call(n)),f.window.close(),m(null)}}),g=(0,r.Z)(async e=>{let{width:t,height:n,pipId:l=v}=e;try{if(!i)throw Error("Not Supported");if((null==f?void 0:f.pipId)===l)return{isSuccess:!0,pipInfo:f};let e=await (0,c.hp)({pipId:l,width:t,height:n});e.addEventListener("pagehide",()=>p(l));let o={window:e,pipId:l};return m(o),{isSuccess:!0,pipInfo:o}}catch(e){return e&&11===e.code&&u(!1),{isSuccess:!1,error:e}}}),I=(0,l.useMemo)(()=>({isSupported:i,pipInfo:f,openPipWindow:g,closePipWindow:p,pipAnchorEleMapRef:a}),[p,f,i,g,a]);return(0,n.jsx)(_.Provider,{value:I,children:t})},m=()=>(0,l.useContext)(_)},462867:function(e,t,i){i.d(t,{F6:function(){return c},TY:function(){return v},pu:function(){return _}});var n=i(629686),l=i(402748),o=i(811603),r=i(320165),u=i(101199),a=i(890710);i(795233);var d=i(23091),s=i(534133);let c=e=>{let{children:t,pipId:i=d.Zi}=e,{pipInfo:n}=(0,d.fl)();return n&&n.pipId===i?(0,a.createPortal)(t,n.window.document.body):null},v=e=>{var{children:t,pipAnchorId:i,placeholder:c,className:v}=e,_=(0,o._)(e,["children","pipAnchorId","placeholder","className"]);let{pipInfo:f,pipAnchorEleMapRef:m}=(0,d.fl)(),p=(0,u.useRef)(null),g=(0,u.useMemo)(s.ie,[]);return g&&(m.current[i]=g),(0,u.useEffect)(()=>()=>{delete m.current[i]},[i,m]),(0,u.useEffect)(()=>{var e;if(!f&&!!g)null===(e=p.current)||void 0===e||e.appendChild(g)},[g,f]),(0,r.jsxs)("div",(0,l._)((0,n._)({ref:p,"data-anchor-id":i,className:v},_),{children:[f?c:null,g?(0,a.createPortal)(t,g):t]}))},_=e=>{var{pipAnchorId:t}=e,i=(0,o._)(e,["pipAnchorId"]);let l=(0,u.useRef)(null),{pipAnchorEleMapRef:a,pipInfo:s}=(0,d.fl)();return(0,u.useEffect)(()=>{let e=a.current[t];if(!!s&&!!l.current&&!!e)l.current.appendChild(e)},[t,a,s]),(0,r.jsx)("div",(0,n._)({"data-anchor-id":t,ref:l},i))}},46969:function(e,t,i){i.d(t,{V8:function(){return y},_q:function(){return T}});var n=i(629686),l=i(402748);i(490629);var o=i(320165),r=i(101199),u=i(734123),a=i(890710),d=i(963964),s=i(759894),c=i(414061),v=i(686036),_=i(685720),f=i(913285),m=i(63601),p=i(310383),g=i(37285),I=i(829248);let E=0,h=!1,y=e=>{var t,i;let{isShowGuide:n,isActive:l,player:f,awemeId:m}=e,p=(0,r.useRef)(!1),[y,T]=(0,r.useState)(!1),{attemptOpen:N,executeClose:A}=(0,d.B)({popName:"浏览器限制-声音提醒",onOpen:()=>{T(!0)},onClose:()=>{T(!1)}});(0,r.useLayoutEffect)(()=>{if(!f||n)return;let e=()=>{if(!p.current)(0,_.q)({player:f,onSuccess:()=>{!n&&E<5&&N()}}),p.current=!0};return f.on(u.Events.AUTOPLAY_PREVENTED,e),()=>{f.off(u.Events.AUTOPLAY_PREVENTED,e)}},[f,n,l]),(0,r.useEffect)(()=>{if(!l||n||!f){A();return}if(!h&&E<5&&(f.muted||f.paused)){let e=setTimeout(()=>{f.muted=!1,f.paused&&setTimeout(()=>{f.play()}),p.current=!1,h=!0},200);return()=>{clearTimeout(e)}}E<5&&f.muted?N():A()},[n,l,f]);let L=!n&&y;(0,r.useEffect)(()=>{L&&l&&(E+=1,v.Z.sendLog("voiceBubbleShow",{enter_from:(0,s.vM)()}))},[l,L]);let P=()=>{E=5,A()};if((0,r.useEffect)(()=>{if(f){let e=e=>{((null==e?void 0:e.action)==="change_muted"||(null==e?void 0:e.action)==="change_volume")&&P()};return f.on(u.Events.USER_ACTION,e),()=>{f.off(u.Events.USER_ACTION,e)}}},[f]),(0,r.useEffect)(()=>{if(f){let e=e=>{("volumeDown"===e.action||"volumeUp"===e.action)&&P()};return f.on(g.B.CustomShortCut,e),()=>{f.off(g.B.CustomShortCut,e)}}},[f]),(0,r.useEffect)(()=>{if(!!m)c.emit(c.EVENT.silentStatusChange,{awemeId:m,isAuto:!0,status:L})},[L,m]),!L)return null;let O=null==f?void 0:null===(i=f.getPlugin)||void 0===i?void 0:null===(t=i.call(f,"SoundGuideTooltipPlugin"))||void 0===t?void 0:t.root;return O?(0,a.createPortal)((0,o.jsx)(I.V,{onClose:P,onOpen:()=>{v.Z.sendLog("clickVoiceBubble",{enter_from:(0,s.vM)()}),f.muted=!1,P()},description:"当前为静音,是否要打开声音?"}),O):null},T=e=>{let t=(0,p.N)(),i=(0,m.n)();return(0,o.jsxs)(f.k,{componentName:"NewUseSoundGuidePlugin",Slardar:t,children:[(0,o.jsx)(I.I,(0,n._)({},e)),(0,o.jsx)(y,(0,l._)((0,n._)({},e),{player:i}))]})}},686036:function(e,t,i){var n=i(624508);t.Z=new n.h({voiceBubbleShow:{eventName:"voice_bubble_show",params:{enter_from:""}},voiceBarShow:{eventName:"voice_bar_show",params:{enter_from:""}},clickVoiceBubble:{eventName:"click_voice_bubble",params:{enter_from:"",is_open:1}}})},685720:function(e,t,i){i.d(t,{q:function(){return l}});let n=e=>e.muted||0===e.volume,l=e=>{let{onFail:t,onSuccess:i,player:l}=e;!n(l)&&(l.muted=!0),setTimeout(()=>{!n(l)&&(l.muted=!0),l.paused&&l.play(),setTimeout(()=>{l.paused?(l.muted=!1,null==t||t()):n(l)&&(null==i||i())},500)})}},684434:function(e,t,i){var n=i(629686),l=i(402748),o=i(320165),r=i(101199);let u=(0,r.forwardRef)((e,t)=>(0,o.jsx)("svg",(0,l._)((0,n._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.5 10H10v11h6.25a1 1 0 1 1 0 2H10a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h12.5a2 2 0 0 1 2 2v4.5a1 1 0 1 1-2 0V10zm-4.883 2.384a.878.878 0 0 0-.877-.877h-3.51a.878.878 0 0 0-.878.877v3.511a.878.878 0 1 0 1.755 0v-1.348l2.695 2.696a.878.878 0 0 0 1.242-1.241l-2.74-2.74h1.436a.878.878 0 0 0 .878-.878zm1.491 6.116a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1v-4z",fill:"#fff"})})));t.Z=u},694385:function(e,t,i){var n=i(629686),l=i(402748),o=i(320165),r=i(101199);let u=(0,r.forwardRef)((e,t)=>(0,o.jsxs)("svg",(0,l._)((0,n._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t},e),{children:[(0,o.jsx)("path",{d:"M7 14a2 2 0 0 1 2-2h1l4.36-3.633a1 1 0 0 1 1.64.768v13.73a1 1 0 0 1-1.64.768L10 20H9a2 2 0 0 1-2-2v-4zM18 19a3 3 0 1 0 0-6v6z",fill:"#fff"}),(0,o.jsx)("path",{d:"M18 23.734l.095-.007A7.75 7.75 0 0 0 18 8.266v2.507a5.25 5.25 0 0 1 0 10.454v2.507z",fill:"#fff"})]})));t.Z=u}}]); |