1 line
311 KiB
Plaintext
1 line
311 KiB
Plaintext
"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["6060"],{617509:function(e,n,t){t.d(n,{Z:function(){return a}});var i=t("918956"),o=t("739010"),r=function(e){if(!e||!document.getRootNode)return document;var n,t=Array.isArray(e)?e:[e];if(t.every(function(e){var n=(0,o.n)(e);return!!n&&(n.getRootNode() instanceof ShadowRoot||!1)})){;return(n=(0,o.n)(t[0]))?n.getRootNode():document}return document},l=t("123587");function a(e,n,t){void 0===t&&(t="click");var a=(0,i.Z)(e);(0,l.Z)(function(){var e=function(e){if(!(Array.isArray(n)?n:[n]).some(function(n){var t=(0,o.n)(n);return!t||t.contains(e.target)}))a.current(e)},i=r(n),l=Array.isArray(t)?t:[t];return l.forEach(function(n){return i.addEventListener(n,e)}),function(){l.forEach(function(n){return i.removeEventListener(n,e)})}},Array.isArray(t)?t:[t],n)}},147693:function(e,n,t){var i=t(954090),o=t(732979),r=t.n(o),l=t(101199),a=t(918956),u=t(475089),s=function(e){if(!e)return 0;var n=r()(e).valueOf()-Date.now();return n<0?0:n};n.Z=function(e){void 0===e&&(e={});var n=e||{},t=n.leftTime,o=n.targetDate,r=n.interval,d=void 0===r?1e3:r,c=n.onEnd,_=(0,l.useMemo)(function(){return(0,u.hj)(t)&&t>0?Date.now()+t:void 0},[t]),v="leftTime"in e?_:o,m=(0,i.CR)((0,l.useState)(function(){return s(v)}),2),f=m[0],p=m[1],h=(0,a.Z)(c);(0,l.useEffect)(function(){if(!v){p(0);return}p(s(v));var e=setInterval(function(){var n,t=s(v);p(t),0===t&&(clearInterval(e),null===(n=h.current)||void 0===n||n.call(h))},d);return function(){return clearInterval(e)}},[v,d]);var g=(0,l.useMemo)(function(){var e;return{days:Math.floor((e=f)/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3}},[f]);return[f,g]}},73203:function(e,n,t){var i=t(954090),o=t(350856),r=t.n(o),l=t(101199),a=t(918956),u=t(287964),s=t(475089),d=t(205859);n.Z=function(e,n){d.Z&&(0,s.mf)(e);var t,o=(0,a.Z)(e),c=null!==(t=null==n?void 0:n.wait)&&void 0!==t?t:1e3,_=(0,l.useMemo)(function(){return r()(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.current.apply(o,(0,i.ev)([],(0,i.CR)(e),!1))},c,n)},[]);return(0,u.Z)(function(){_.cancel()}),{run:_,cancel:_.cancel,flush:_.flush}}},183151:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(954090),o=t(101199),r=t(772342);function l(e,n){var t=(0,i.CR)((0,o.useState)(!1),2),l=t[0],a=t[1],u=n||{},s=u.onFocus,d=u.onBlur,c=u.onChange;return(0,r.Z)("focusin",function(e){!l&&(null==s||s(e),null==c||c(!0),a(!0))},{target:e}),(0,r.Z)("focusout",function(e){var n,t;l&&!(null===(t=null===(n=e.currentTarget)||void 0===n?void 0:n.contains)||void 0===t?void 0:t.call(n,e.relatedTarget))&&(null==d||d(e),null==c||c(!1),a(!1))},{target:e}),l}},695506:function(e,n,t){var i=t(101199),o=t(806217),r=t(475089);n.Z=function(e,n,t){void 0===t&&(t={});var l=(0,o.Z)(e),a=(0,i.useRef)(null),u=(0,i.useCallback)(function(){a.current&&clearInterval(a.current)},[]);return(0,i.useEffect)(function(){if(!!(0,r.hj)(n)&&!(n<0))return t.immediate&&l(),a.current=setInterval(l,n),u},[n,t.immediate]),u}},83564:function(e,n,t){t.d(n,{Z:function(){return m}});var i=t("954090"),o=t("918956"),r=t("475089"),l=t("739010"),a=t("162308"),u=/(mac|iphone|ipod|ipad)/i.test("undefined"!=typeof navigator?null==navigator?void 0:navigator.platform:""),s={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:u?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},d={ctrl:function(e){return e.ctrlKey},shift:function(e){return e.shiftKey},alt:function(e){return e.altKey},meta:function(e){return"keyup"===e.type?s.meta.includes(e.keyCode):e.metaKey}};function c(e){return(0,r.HD)(e)||(0,r.hj)(e)}function _(e,n,t){if(!e.key)return!1;if((0,r.hj)(n))return e.keyCode===n&&n;var o,l,a,u,c=n.split("."),_=0;try{for(var v=(0,i.XA)(c),m=v.next();!m.done;m=v.next()){var f=m.value,p=d[f],h=s[f.toLowerCase()];(p&&p(e)||h&&h===e.keyCode)&&_++}}catch(e){a={error:e}}finally{try{m&&!m.done&&(u=v.return)&&u.call(v)}finally{if(a)throw a.error}}if(t){;return _===c.length&&(o=e,l=Object.keys(d).reduce(function(e,n){return d[n](o)?e+1:e},0),([16,17,18,91,92].includes(o.keyCode)?l:l+1)===c.length)&&n}return _===c.length&&n}var v=["keydown"],m=function(e,n,t){var u=t||{},s=u.events,d=void 0===s?v:s,m=u.target,f=u.exactMatch,p=void 0!==f&&f,h=u.useCapture,g=void 0!==h&&h,E=(0,o.Z)(n),y=(0,o.Z)(e);(0,a.Z)(function(){var e,n,t,o=(0,l.n)(m,window);if(!!o){var a=function(e){var n,t,i,o=(n=y.current,t=p,(0,r.mf)(n)?n:c(n)?function(e){return _(e,n,t)}:Array.isArray(n)?function(e){return n.find(function(n){return _(e,n,t)})}:function(){return!!n})(e),l=c(o)?o:e.key;if(o)return null===(i=E.current)||void 0===i?void 0:i.call(E,e,l)};try{for(var u=(0,i.XA)(d),s=u.next();!s.done;s=u.next()){var v=s.value;null===(t=null==o?void 0:o.addEventListener)||void 0===t||t.call(o,v,a,g)}}catch(n){e={error:n}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return function(){try{for(var e,n,t,r=(0,i.XA)(d),l=r.next();!l.done;l=r.next()){var u=l.value;null===(t=null==o?void 0:o.removeEventListener)||void 0===t||t.call(o,u,a,g)}}catch(n){e={error:n}}finally{try{l&&!l.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}}},[d],m)}},494842:function(e,n,t){var i=t(954090),o=t(101199);n.Z=function(e){var n=this,t=(0,o.useRef)(!1);return(0,o.useCallback)(function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];return(0,i.mG)(n,void 0,void 0,function(){return(0,i.Jh)(this,function(n){switch(n.label){case 0:if(t.current)return[2];t.current=!0,n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,e.apply(void 0,(0,i.ev)([],(0,i.CR)(o),!1))];case 2:return[2,n.sent()];case 3:throw n.sent();case 4:return t.current=!1,[7];case 5:return[2]}})})},[e])}},657011:function(e,n,t){var i=t(954090),o=t(182289),r=t(714191),l=t(739010),a=t(943357);n.Z=function(e){var n=(0,i.CR)((0,r.Z)(function(){var n=(0,l.n)(e);return n?{width:n.clientWidth,height:n.clientHeight}:void 0}),2),t=n[0],u=n[1];return(0,a.Z)(function(){var n=(0,l.n)(e);if(!!n){var t=new o.Z(function(e){e.forEach(function(e){var n=e.target;u({width:n.clientWidth,height:n.clientHeight})})});return t.observe(n),function(){t.disconnect()}}},[],e),t}},682118:function(e,n,t){var i=t(954090),o=t(101199),r=t(7169),l=t(281230);n.Z=function(e,n,t){var a=(0,i.CR)((0,o.useState)({}),2),u=a[0],s=a[1],d=(0,r.Z)(function(){s({})},t).run;(0,o.useEffect)(function(){return d()},n),(0,l.Z)(e,[u])}},7169:function(e,n,t){var i=t(954090),o=t(908219),r=t.n(o),l=t(101199),a=t(918956),u=t(287964),s=t(475089),d=t(205859);n.Z=function(e,n){d.Z&&(0,s.mf)(e);var t,o=(0,a.Z)(e),c=null!==(t=null==n?void 0:n.wait)&&void 0!==t?t:1e3,_=(0,l.useMemo)(function(){return r()(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o.current.apply(o,(0,i.ev)([],(0,i.CR)(e),!1))},c,n)},[]);return(0,u.Z)(function(){_.cancel()}),{run:_,cancel:_.cancel,flush:_.flush}}},138957:function(e,n,t){var i=t(101199),o=t(806217),r=t(475089);n.Z=function(e,n){var t=(0,o.Z)(e),l=(0,i.useRef)(null),a=(0,i.useCallback)(function(){l.current&&clearTimeout(l.current)},[]);return(0,i.useEffect)(function(){if(!!(0,r.hj)(n)&&!(n<0))return l.current=setTimeout(t,n),a},[n]),a}},517839:function(e,n,t){t.d(n,{k:function(){return r}});var i=t(664550),o=t.n(i),r=function(e,n){return void 0===e&&(e=[]),void 0===n&&(n=[]),o()(e,n)}},182289:function(e,n){var t=function(){if("undefined"!=typeof Map)return Map;function e(e,n){var t=-1;return e.some(function(e,i){return e[0]===n&&(t=i,!0)}),t}return function(){function n(){this.__entries__=[]}return Object.defineProperty(n.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),n.prototype.get=function(n){var t=e(this.__entries__,n),i=this.__entries__[t];return i&&i[1]},n.prototype.set=function(n,t){var i=e(this.__entries__,n);~i?this.__entries__[i][1]=t:this.__entries__.push([n,t])},n.prototype.delete=function(n){var t=this.__entries__,i=e(t,n);~i&&t.splice(i,1)},n.prototype.has=function(n){return!!~e(this.__entries__,n)},n.prototype.clear=function(){this.__entries__.splice(0)},n.prototype.forEach=function(e,n){void 0===n&&(n=null);for(var t=0,i=this.__entries__;t<i.length;t++){var o=i[t];e.call(n,o[1],o[0])}},n}()}(),i="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),r="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},l=["top","right","bottom","left","width","height","size","weight"],a="undefined"!=typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,n){var t=!1,i=!1,o=0;function l(){t&&(t=!1,e()),i&&u()}function a(){r(l)}function u(){var e=Date.now();if(t){if(e-o<2)return;i=!0}else t=!0,i=!1,setTimeout(a,20);o=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){!~this.observers_.indexOf(e)&&this.observers_.push(e),!this.connected_&&this.connect_()},e.prototype.removeObserver=function(e){var n=this.observers_,t=n.indexOf(e);~t&&n.splice(t,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){if(!!i&&!this.connected_)document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0},e.prototype.disconnect_=function(){if(!!i&&!!this.connected_)document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1},e.prototype.onTransitionEnd_=function(e){var n=e.propertyName,t=void 0===n?"":n;l.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},e.getInstance=function(){return!this.instance_&&(this.instance_=new e),this.instance_},e.instance_=null,e}(),s=function(e,n){for(var t=0,i=Object.keys(n);t<i.length;t++){var o=i[t];Object.defineProperty(e,o,{value:n[o],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},c=f(0,0,0,0);function _(e){return parseFloat(e)||0}function v(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return n.reduce(function(n,t){return n+_(e["border-"+t+"-width"])},0)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&"function"==typeof e.getBBox};function f(e,n,t,i){return{x:e,y:n,width:t,height:i}}var p=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=f(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!i)return c;if(m(e)){var n;return f(0,0,(n=e.getBBox()).width,n.height)}return function(e){var n=e.clientWidth,t=e.clientHeight;if(!n&&!t)return c;var i=d(e).getComputedStyle(e),o=function(e){for(var n={},t=0,i=["top","right","bottom","left"];t<i.length;t++){var o=i[t],r=e["padding-"+o];n[o]=_(r)}return n}(i),r=o.left+o.right,l=o.top+o.bottom,a=_(i.width),u=_(i.height);if("border-box"===i.boxSizing&&(Math.round(a+r)!==n&&(a-=v(i,"left","right")+r),Math.round(u+l)!==t&&(u-=v(i,"top","bottom")+l)),!function(e){return e===d(e).document.documentElement}(e)){var s=Math.round(a+r)-n,m=Math.round(u+l)-t;1!==Math.abs(s)&&(a-=s),1!==Math.abs(m)&&(u-=m)}return f(o.left,o.top,a,u)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),h=function(e,n){var t,i,o,r,l,a,u=(i=(t=n).x,o=t.y,r=t.width,l=t.height,s(a=Object.create(("undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:i,y:o,width:r,height:l,top:o,right:i+r,bottom:l+o,left:i}),a);s(this,{target:e,contentRect:u})},g=function(){function e(e,n,i){if(this.activeObservations_=[],this.observations_=new t,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=n,this.callbackCtx_=i}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"==typeof Element||!(Element instanceof Object))return;if(!(e instanceof d(e).Element))throw TypeError('parameter 1 is not of type "Element".');var n=this.observations_;if(!n.has(e))n.set(e,new p(e)),this.controller_.addObserver(this),this.controller_.refresh()},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if("undefined"==typeof Element||!(Element instanceof Object))return;if(!(e instanceof d(e).Element))throw TypeError('parameter 1 is not of type "Element".');var n=this.observations_;if(!!n.has(e))n.delete(e),!n.size&&this.controller_.removeObserver(this)},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(!!this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(e){return new h(e.target,e.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),E="undefined"!=typeof WeakMap?new WeakMap:new t,y=function e(n){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var t=new g(n,u.getInstance(),this);E.set(this,t)};["observe","unobserve","disconnect"].forEach(function(e){y.prototype[e]=function(){var n;return(n=E.get(this))[e].apply(n,arguments)}});var I=void 0!==o.ResizeObserver?o.ResizeObserver:y;n.Z=I},161106:function(e,n){n.Z={privilegeSelectPopContainer:"pZg1GybI",tabList:"tSMfBK2O",tabItem:"yS45nU6u",active:"LYnkKMKQ",lock:"W8gvCh8n",grey:"z6amET_q",dropdownWrap:"Jw7MPoKX",selectList:"uVGrXjfS"}},191377:function(e,n){n.Z={tagList:"lJYfdXf2",tagItem:"bjvZcM49",icon:"ZdfvxDZR"}},355940:function(e,n){n.Z={inPictureCover:"whSJ_Yrb",inPictureContainer:"JUmFH_F5",inPictureTitle:"yOn0XzH3",inPictureBtn:"iGg27HZa"}},625718:function(e,n){n.Z={followModal:"sCnTKoiW"}},179946:function(e,n){n.Z={info:"c3qgcHhi",btn:"JYDxuVA7"}},40699:function(e,n){n.Z={chatroomWrap:"e9xGLuft",isSpringSkin:"J_5_UnjI",skinBack:"_sz5qjV_",app:"gjxRqTdm",leftContainer:"LHYLCNmz",main:"SNjc_Erp",categoryTab:"wpmola77",xiguaHeader:"z1CrgDhd",scroll:"wKF0fd6Q",detailScroll:"xcJLR3Sb",loadingStyle:"lLcLijQP",no_scroll:"Uk92VpeD",portal:"Ctkot2OD",asianGamesLive:"K1iMx64b",xiguaPadding:"sSvOZ5aq",xiguaBgColor:"ZgRpz8Zc",xiguaNormal:"yzTexuut",error:"yLS8V8eR",hideIcon:"_4teWZb2j",bkgImg:"Y3alFx4p"}},148302:function(e,n){n.Z={commentEditorWrap:"ItrEA2XA",focus:"pe0XZZCd",focusOrNoEmpty:"nF4b96W6",danmakuSwitch:"gHl6KaB3",commentEditor:"MWQzXaeD"}},17546:function(e,n){n.Z={comment:"JIUp26lN",comment_input:"xO_Ps1X_",danmuSwitch:"HzcP2A9s",text:"XTBs1C5i",fixed_text:"V2j42Sir",emoji_icon:"c_Beu_k0",fixed_chat:"tV4Ibi7S",no_login:"D3y94EA7",login:"_Zpl4f3G"}},414655:function(e,n){n.Z={userCount:"nlIQ60X2",count:"ECIiFI80"}},103423:function(e,n){n.Z={liveShare:"NQyN1NQq",isInClient:"wqCJLj1Z",container:"Z4vi40DQ",shareCode:"bxg22UFs",failed:"e_RoMEm5",defaultContainer:"JNvugOb8",crossContainer:"ZvExr8PQ",columnContainer:"_W8Cr6HL",appDiversionContainer:"LF6mGPW6",disabledContent:"xaN8qdNj",appDiversionQrCard:"cB75HeLr",appDiversionQrTitle:"zQcBL9Et",appDiversionQrImageWrap:"OmTDvMs2",appDiversionQrImage:"_9a3AQ5X",appDiversionFooter:"X3rgJaw9",appDiversionAction:"qaLFop_4",appDiversionIconAction:"kfI_ykCj",appDiversionCopy:"KgHKzyXI",appDiversionMobileWrap:"yD4VUjjt",appDiversionMobile:"q1DXqLgP",appDiversionActionActive:"tlgRtO5V",shareToastWrap:"fm6nGEVD",hidden:"u9usucvj"}},595050:function(e,n,t){t.d(n,{Ew:function(){return l},Zj:function(){return o},nr:function(){return r}});var i=t(973314);let o=(0,i.eH)({url:"/webcast/privilege/screen_chat/tab/",method:"post"}),r=(0,i.eH)({url:"/webcast/privilege/screen_chat/send/",method:"post"}),l=(0,i.eH)({url:"/webcast/screen_chat/",method:"post"})},878217:function(e,n,t){t.d(n,{h:function(){return u}});var i=t(101199),o=t(247167),r=t(502615),l=t(264034),a=t.n(l);let u=e=>{let{player:n,source:t=""}=e,l=(0,i.useRef)(!1),{playerRef:u}=(0,i.useContext)(r.ET),s=n||u.current;return(0,i.useEffect)(()=>{if(!s)return;l.current=!s.paused;let e=()=>{l.current=!0},n=[s.on("loaddata",e),s.on("canplay",e),s.on("play",e),s.on("timeupdate",e)];return()=>{n.forEach(e=>null==e?void 0:e())}},[s]),(0,i.useEffect)(()=>{let e=a()(()=>{(0,o.traceLivePerfPlayerLeaveEvent)({has_receieved:l.current?1:0,source:t}),l.current=!1});return window.addEventListener("beforeunload",e),()=>{e(),window.removeEventListener("beforeunload",e)}},[]),null}},331931:function(e,n,t){t.d(n,{l:function(){return g}}),t("490629");var i=t("320165"),o=t("101199"),r=t("480333");t("76375");var l=t("890710"),a=t("401918");let u=null,s=new class e{enqueue(e,n){let t=this.findInsertionIndex(n);this.items.splice(t,0,e),this.priorities.splice(t,0,n)}findInsertionIndex(e){let n=0;for(let t=0;t<this.priorities.length;t++)e>this.priorities[t]&&(n=t+1);return n}dequeue(){if(this.isEmpty())throw Error("队列为空");let e=this.items.shift();return this.priorities.shift(),this.reorderQueue(),e}reorderQueue(){for(let e=0;e<this.priorities.length-1;e++)if(this.priorities[e]>this.priorities[e+1]){let n=this.items[e];this.items[e]=this.items[e+1],this.items[e+1]=n;let t=this.priorities[e];this.priorities[e]=this.priorities[e+1],this.priorities[e+1]=t}}isEmpty(){return 0===this.items.length}getMaxPriority(){if(this.isEmpty())throw Error("队列为空");return this.priorities[this.items.length-1]}getMaxPriorityElement(){if(this.isEmpty())throw Error("队列为空");return this.items[this.items.length-1]}findElement(e){for(let n=0;n<this.items.length;n++)if(e(this.items[n],this.priorities[n]))return this.items[n]}removeElement(e){let n=-1,t=-1;for(let t=0;t<this.items.length;t++)if(this.items[t]===e){n=t,this.priorities[t];break}return -1!==n&&(this.items.splice(n,1),this.priorities.splice(n,1),this.reorderQueue(),!0)}clear(){this.items=[],this.priorities=[]}getItems(){return this.items}constructor(){(0,r._)(this,"items",[]),(0,r._)(this,"priorities",[])}};class d{constructor(e){(0,r._)(this,"content",void 0),(0,r._)(this,"position",void 0),(0,r._)(this,"autoDismissTime",void 0),(0,r._)(this,"dismissible",void 0),(0,r._)(this,"hintId",void 0),(0,r._)(this,"priority",void 0),(0,r._)(this,"hintOptions",void 0),(0,r._)(this,"delay",void 0),(0,r._)(this,"isShow",void 0),(0,r._)(this,"onShow",void 0),(0,r._)(this,"onClose",void 0);let{position:n="original",duration:t=0,priority:i=0,onShow:o,onClose:l,delay:u=10}=e;this.position=n,this.dismissible=t>0,this.autoDismissTime=t,this.hintId=(0,a.Z)(),this.priority=i,this.hintOptions=e,this.delay=u,this.onShow=o,this.onClose=l}}let c=e=>{let{priority:n=0}=e,t=new d(e);return s.enqueue(t,n),f(),t},_=e=>{let n=s.findElement(n=>n.hintId===e);if(!!n){if(n.isShow){if(n.hintOptions.render&&("video-center"===n.position||"control-right"===n.position)){let e=document.getElementById(n.position);l.unmountComponentAtNode(e)}n.isShow=!1,n.onClose&&n.onClose(n),u=null}s.removeElement(n),f()}},v=e=>{let n=s.getMaxPriorityElement(),t=s.findElement(n=>n.hintId===e);n.isShow?(_(n.hintId),s.removeElement(t),s.enqueue(t,s.getMaxPriority()+1)):(s.removeElement(t),s.enqueue(t,s.getMaxPriority()+1),f())},m=()=>{let e=s.getMaxPriorityElement();e.isShow&&_(e.hintId),s.clear()},f=()=>{if(!s.isEmpty()){let e=s.getMaxPriorityElement(),n=setTimeout(()=>{if(!u&&!e.isShow){if(e.hintOptions.render&&("video-center"===e.position||"control-right"===e.position)){let n=document.getElementById(e.position);e.content=e.hintOptions.render(e,{closeHint:_,showHint:v,destroyAll:m}),l.render(e.content,n)}if(e.isShow=!0,u=e,e.onShow&&e.onShow(e),e.autoDismissTime){let n=setTimeout(()=>{_(e.hintId),clearTimeout(n)},1e3*e.autoDismissTime)}}clearTimeout(n)},1e3*e.delay)}},p=e=>{let{showHint:n,onShow:t,onClose:i,position:r="original",duration:l=0,priority:a=0,delay:u=10}=e,s=(0,o.useRef)(),[d,v]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(n&&!s.current)s.current=c({position:r,duration:l,priority:a,delay:u,onShow:e=>{null==t||t(e),v(!0)},onClose:e=>{null==i||i(e),v(!1)}});else if(!n&&s.current){var e;_(null===(e=s.current)||void 0===e?void 0:e.hintId),s.current=void 0}},[n]),d},h=(e,n,t)=>"original"===e?(0,i.jsx)(i.Fragment,{children:n}):t?(0,l.createPortal)(n,t):null,g=e=>{let{children:n,position:t="original"}=e,i=p(e),o="original"!==t?document.getElementById(t):null;return i?h(t,n,o):null}},60920:function(e,n,t){t.d(n,{Z:function(){return a}});var i=t("320165");t("101199");var o="HRVufxHx",r=t("469935"),l=t.n(r),a=e=>{let{val:n,className:t,style:r}=e;return(0,i.jsx)("div",{style:r,className:l()(o,{[null!=t?t:""]:t}),children:n})}},682839:function(e,n,t){t.d(n,{k:function(){return s}});var i=t(320165),o=t(101199),r=t(473228),l=t(318966),a=t(397176);let u=function(e,n,t,i){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"component",r=arguments.length>5?arguments[5]:void 0;null==i||i(e,n),"module"===o&&(null==r||r("report",{ev_type:"blank_screen",payload:{timestamp:Date.now(),score:0,error:{type:"js_error",message:e.message}}})),null==r||r("sendEvent",{name:"live_component_error_boundary",categories:{componentName:t,message:e.message,stack:e.stack,componentStack:n,isNewProject:!0},type:"event"})},s=e=>{let{onError:n,beforeCapture:t,fallback:s,children:d,type:c="component",componentName:_,_slardarInstance:v}=e,m=(0,o.useMemo)(()=>{if(!a.s)return v||(0,l.OK)()},[v]),f=o.useCallback((e,t)=>{u(e,t,_,n,c,m)},[c,n,_,m]);return(0,i.jsx)(r.SV,{onError:f,beforeCapture:t,fallback:s,Slardar:m,children:d})}},982338:function(e,n,t){t.d(n,{w:function(){return a}});var i=t(629686),o=t(402748),r=t(811603),l=t(320165);function a(e){var{imageData:n={},style:t={}}=e,a=(0,r._)(e,["imageData","style"]);let{url_list:u,width:s,height:d}=n,c=null==u?void 0:u[0];return c?(0,l.jsx)("img",(0,o._)((0,i._)({},a),{src:c,style:(0,o._)((0,i._)({},t),{width:s||void 0,height:d||void 0})})):null}t(101199)},107105:function(e,n,t){let i;t.d(n,{K:function(){return v}});var o=t(320165),r=t(101199),l=t(48795),a=t(469935),u=t.n(a),s=t(930376),d=t(349881),c=t(504625);let _=(i=0,()=>{let e=Date.now();return!(e-i<100)&&(i=e,!0)});function v(e){let{className:n=""}=e,{showPanel:t,toggleShowPanel:i,enable:a,loading:v}=(0,s.B3)(e=>({showPanel:e.showPanel,toggleShowPanel:e.toggleShowPanel,enable:e.enable,loading:e.loading})),m=(0,d.$)();return((0,r.useEffect)(()=>{a&&_()&&m("livesdk_danmu_button_show")},[a]),a)?(0,o.jsx)(l.Switch,{size:"large",loading:v,checked:t,onChange:()=>{let e=!t;i(e),!e&&m("livesdk_danmu_collection_icon_click")},className:u()(c.Z.switch,t&&c.Z.checked,n)}):null}},988830:function(e,n,t){t.d(n,{J:function(){return d},_:function(){return s}});var i=t(320165);t(101199);var o=t(930376),r=t(469935),l=t.n(r),a=t(161106);let u=()=>{let e=(0,o.B3)(e=>e.scene);return`${e}-PrivilegeSelectPopContainer`},s=()=>{let e=u();return()=>"undefined"!=typeof document&&(document.getElementById(e)||document.fullscreenElement||document.body)};function d(e){let{zIndex:n}=e,t=u(),r=(0,o.B3)(e=>e.showPanel);return(0,i.jsx)("div",{id:t,style:{zIndex:n},className:l()(a.Z.privilegeSelectPopContainer,r&&a.Z.showPanel,"privilege-select-pop-container")})}},942101:function(e,n,t){t.d(n,{NL:function(){return g},pM:function(){return h}});var i=t(320165),o=t(101199),r=t(657011),l=t(48795),a=t(469935),u=t.n(a),s=t(930376),d=t(982338),c=t(396868),_=t(630193),v=t(988830),m=t(161106),f=t(349881);function p(e){var n,t,r;let{width:l}=e,a=null!==(n=(0,s.B3)(e=>e.tabItems))&&void 0!==n?n:[],v=null!==(t=(0,s.B3)(e=>e.setStoragedStyle))&&void 0!==t?t:[],p=null!==(r=(0,s.B3)(e=>e.selectedStyle))&&void 0!==r?r:[],h=(0,f.$)();(0,o.useEffect)(()=>{h("livesdk_danmu_tab_show")},[]);let g=e=>{if(h("livesdk_danmu_tab_click",{click_results:e.toast?"fail":"success",danmu_level:e.style,results_reason:e.toast}),e.toast){c.F.info(e.toast);return}v(e.style)},E=e=>e.style===p;return(0,i.jsx)("div",{className:m.Z.tabList,style:{width:l},children:a.map(e=>(0,i.jsx)("div",{onClick:()=>g(e),className:u()(m.Z.tabItem,(0,_.as)(e)&&m.Z.lock,(0,_._y)(e)&&m.Z.grey,E(e)&&m.Z.active),children:(0,i.jsx)(d.w,{imageData:e.img_v2})},e.style))})}function h(e){let{children:n,getChildrenElement:t}=e,o=(0,s.B3)(e=>e.showPanel),{width:a,height:u}=(0,r.Z)(()=>t())||{},d=(0,v._)();return(0,i.jsx)(l.Dropdown,{rePosKey:`${a}-${u}`,position:"top",trigger:"custom",visible:o,autoAdjustOverflow:!1,getPopupContainer:d,className:m.Z.dropdownWrap,content:(0,i.jsx)(p,{width:a}),children:n})}function g(){return(0,s.B3)(e=>e.showPanel)?(0,i.jsx)("div",{className:m.Z.selectList,children:(0,i.jsx)(p,{})}):null}},28183:function(e,n,t){t.d(n,{o:function(){return c}}),t(240148),t(759943);var i=t(320165);t(101199);var o=t(548500),r=t(630193),l=t(876599),a=t(478401),u=t(48795),s=t(396868);let d=(()=>{let e="screen_chat_ignore_send_confirm";return{get:()=>"true"===localStorage.getItem(e),set(n){localStorage.setItem(e,n?"true":"false")}}})(),c=async(e,n)=>{var t;if(!e)return!0;if((null!==(t=n.emojiCount)&&void 0!==t?t:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{let n=e.match(/\[.*?\]/g);return n?n.length:0}catch(e){return 0}}(n.text))>3)return s.F.info("最多可添加3个表情"),!1;let{diamond_count:c,style:_}=e;if(d.get()||!_||(0,r.BC)(_)||!c)return!0;let v=function(e){switch(e){case o.Qz.Base:return"基础弹幕";case o.Qz.Advanced:return"高级弹幕";case o.Qz.Supreme:return"至尊弹幕";default:return""}}(_),m=!1,f=await (0,a.S)({title:"确认支付",footerFill:!0,content:(0,i.jsxs)("div",{className:l.Z.content,children:[(0,i.jsxs)("p",{className:l.Z.text,children:["使用",v,"需要支付",c,"钻,确认支付并发送弹幕吗?"]}),(0,i.jsx)(u.Checkbox,{className:l.Z.checkbox,"aria-label":"screen_chat_send_confirm",onChange:e=>{m=!!e.target.checked},children:"下次不再提醒"})]}),width:300});return f&&d.set(m),f}},930376:function(e,n,t){t.d(n,{B3:function(){return I},MW:function(){return C},ke:function(){return N},xo:function(){return L}});var i=t(629686),o=t(402748),r=t(811603);t(490629),t(117232);var l=t(320165),a=t(101199),u=t(279198),s=t(513633),d=t(547867),c=t(806217),_=t(659382),v=t(281230),m=t(595050),f=t(318966),p=t(795233),h=t.n(p),g=t(630193),E=t(396868);let{Context:y,useCtxSelector:I}=(0,u.q)({showPanel:!1,tabItems:[],enable:!1,toggleShowPanel:h(),setStoragedStyle:h(),scene:"chatroom",roomId:"",anchorId:"",userId:"",liveStatus:"normal",loading:!1});function P(e){let{children:n,isAdmin:t}=e,u=(0,r._)(e,["children","isAdmin"]),{roomId:p,anchorId:h}=u,[I,P]=(0,s.Z)(`selected_privilege_danmaku_style_${h}`,{listenStorageChange:!0}),[L,N]=(0,a.useState)(void 0!==I),{data:C,run:S,loading:T}=(0,d.Z)(m.Zj,{manual:!0,debounceWait:1e3,debounceLeading:!0,debounceTrailing:!0,onFinally(n,t){if((null==t?void 0:t.status_code)!==0){var r;let l=null==t?void 0:null===(r=t.data)||void 0===r?void 0:r.prompts;l&&E.F.info(l),(0,f.OK)().sendEvent({name:"getPrivilegeScreenChatTabApiError",categories:(0,i._)((0,o._)((0,i._)({},n,t),{toast:l}),e)})}}}),b=(0,a.useMemo)(()=>{var e;return(null==C?void 0:null===(e=C.data)||void 0===e?void 0:e.item)||[]},[C]),A=T&&0===b.length,k=(0,a.useMemo)(()=>b.filter(e=>(0,g.iC)(e)),[b]),R=k.length<=0,w=(0,a.useMemo)(()=>{var e;let n=[...k];return n.find(e=>e.style===I)?I:(n.sort((e,n)=>Number(n.diamond_count)-Number(e.diamond_count)),null===(e=n[0])||void 0===e?void 0:e.style)},[I,k]),O=(0,c.Z)(()=>{p&&h&&S({room_id:p,anchor_id:h,send_admin_tab:t})});(0,_.Z)(()=>{L&&O()}),(0,v.Z)(()=>{L&&O()},[t]);let x=L&&b.length>0,M=(0,c.Z)(e=>{N(e),e&&O(),!e&&P(void 0)});return(0,l.jsx)(y.Provider,{value:(0,i._)({showPanel:x,tabItems:b,toggleShowPanel:M,enable:!0,selectedStyle:w,setStoragedStyle:P,loading:A,disabled:R},u),children:n})}function L(e){let{anchorId:n,hasDanmuAuth:t,children:o}=e;return t?(0,l.jsx)(P,(0,i._)({},e),n):(0,l.jsx)(l.Fragment,{children:o})}function N(){return I(e=>{let{tabItems:n,selectedStyle:t,showPanel:i,enable:o}=e;if(!!i&&!!o)return n.find(e=>(0,g.iC)(e)&&e.style===t)})}function C(){var e;return null===(e=N())||void 0===e?void 0:e.comment_toast}},349881:function(e,n,t){t.d(n,{$:function(){return s}});var i=t(629686),o=t(72137),r=t.n(o),l=t(930376),a=t(335924),u=t(601034);let s=()=>{let e=(0,l.B3)(e=>r()(e,["roomId","anchorId","userId","privilegeLevel","liveStatus"])),n=()=>({enter_method:(0,a.Rs)("enter_method"),action_type:"click",anchor_id:e.anchorId,room_id:e.roomId,privilege_level:e.privilegeLevel,live_status:e.liveStatus,request_id:(0,a.Rs)("request_id"),user_id:e.userId,enter_from_merge:(0,a.Rs)("enter_from_merge")||(0,u.yW)()});return(e,t)=>{var o;null===(o=window)||void 0===o||o.collectEvent(e,(0,i._)({},n(),t))}}},630193:function(e,n,t){t.d(n,{BC:function(){return c},MO:function(){return _},P7:function(){return v},_y:function(){return d},as:function(){return s},fH:function(){return m},iC:function(){return u}}),t(706056),t(362051);var i=t(548500),o=t(595050),r=t(772810),l=t(795233),a=t.n(l);function u(e){return 0===e.status}function s(e){return 1===e.status}function d(e){return 2===e.status}function c(e){return e===i.Qz.Admin}function _(e){var n;let{privilegeTab:t,roomId:r,anchorId:l,content:u,rtf_content:s,left_diamond:d,enter_from_merge:_,enter_method:v,request_id:m,onSuccess:f=a(),onRecharge:p}=e,h=null==t?void 0:t.style;if(c(h))return{isScreentChat:!0,sendPromise:(0,o.Ew)({room_id:r,content:u,rtf_content:s,enter_source:_,request_id:m})};if(n=h,[i.Qz.Advanced,i.Qz.Base,i.Qz.Supreme].includes(n)){let e=(0,o.nr)({room_id:r,anchor_id:l,content:u,style:h,left_diamond:d,tags_extra:JSON.stringify({enter_from_merge:_,action_type:"click",enter_method:v}),rtf_content:s});return e.then(e=>{let n=null==e?void 0:e.data;if(!n||0!==e.status_code)return;let t={is_mock:!0,method:"WebcastPrivilegeScreenChatMessage",msg_id:n.msg_id,show_identity:n.show_identity,identity_label:n.identity_label,payload:{content:u,common:{msg_id:n.msg_id},user:n.user,style:h}};null==f||f({mockMsg:t,data:n})}),{isScreentChat:!0,sendPromise:e}}return{isScreentChat:!1,sendPromise:null}}function v(e){var n;return"style"in(null==e?void 0:e.payload)&&Number(null==e?void 0:null===(n=e.payload)||void 0===n?void 0:n.style)===i.Qz.Supreme}function m(e){let{msg:n,lineMaxHeight:t=40}=e,i={width:"fit-content",height:"fit-content"};if(v(n)){let e=Number((0,r.nE)("area")||0)+1;i.maxHeight=`${t*e}px`}else i.height="1em";return i}},57325:function(e,n,t){t.d(n,{T:function(){return l},y:function(){return r}}),t(679308);var i=t(795233),o=t.n(i);let r=(0,t(559519).kr)({userProfileData:{},refreshData:o(),reportArgs:{reportType:"user"},eventParams:{},close:o(),targetUid:"",secTargetUid:"",anchorId:"",secAnchorId:"",roomId:"",currentUid:"",currentSecUid:"",targetUserType:"audience",targetWebcastUid:"",openSchema:()=>Promise.resolve({code:0}),liveContainer:null,openVip:o(),openFansClub:o(),openGiftPanel:o(),isLinkMicManger:!1,inLinkMicSeats:!1,setFaceRecognitionShow:o(),linkmicEvent:{},slardarEvent:{},linkRoomType:"",functionType2:"",isPaidLinking:!1,isInPk:!1}),l=r.Provider},864235:function(e,n,t){t.d(n,{$6:function(){return R},AB:function(){return L},AP:function(){return b},D1:function(){return Z},FD:function(){return H},Fx:function(){return F},HL:function(){return y},JJ:function(){return G},Ol:function(){return g},PS:function(){return O},Qd:function(){return z},Qg:function(){return h},Vi:function(){return C},ZP:function(){return Y},aA:function(){return V},aT:function(){return D},b$:function(){return P},c5:function(){return B},gc:function(){return S},iA:function(){return A},jG:function(){return Q},m$:function(){return k},nD:function(){return I},o0:function(){return q},o2:function(){return $},oo:function(){return j},pJ:function(){return E},sb:function(){return K},uK:function(){return N},uZ:function(){return T},yr:function(){return W},z4:function(){return w},zw:function(){return U}});var i=t(629686),o=t(475665),r=t(601034),l=t(335924),a=t(279198),u=t(72137),s=t.n(u),d=t(57325),c=t(983891),_=t(542901),v=t(101199),m=t(536793),f=t(514873),p=t(695481);let h=(0,a.Z)(d.y),g=()=>h(e=>{var n;return(null===(n=e.userProfileData)||void 0===n?void 0:n.user_profile)||{}}),E=()=>h(e=>{var n;return(null===(n=e.userProfileData)||void 0===n?void 0:n.user_data)||{}}),y=()=>h(e=>(0,o.cM)({currentUid:e.currentUid,targetUid:e.targetUid,currentAnchorId:e.anchorId,targetIsAnchor:"anchor"===e.targetUserType})),I=()=>h(e=>e.reportArgs||{reportType:"user"}),P=()=>h(e=>e.refreshData),L=()=>h(e=>{var n,t;return(null===(t=e.userProfileData)||void 0===t?void 0:null===(n=t.user_profile)||void 0===n?void 0:n.profile_tag_content)||[]}),N=()=>h(e=>{var n,t;return null===(t=e.userProfileData)||void 0===t?void 0:null===(n=t.user_profile)||void 0===n?void 0:n.open_area}),C=()=>h(e=>e.openSchema),S=()=>h(e=>e.liveContainer),T=()=>h(e=>e.openVip),b=()=>h(e=>e.openFansClub),A=()=>h(e=>e.openGiftPanel),k=()=>h(e=>e.close),R=()=>h(e=>!!e.isPaidLinking),w=()=>h(e=>{var n,t;return null===(t=e.userProfileData)||void 0===t?void 0:null===(n=t.user_data)||void 0===n?void 0:n.web_rid}),O=()=>h(e=>{var n,t;return(0,o.jJ)(Number(null===(t=e.userProfileData)||void 0===t?void 0:null===(n=t.user_data)||void 0===n?void 0:n.mystery_man))}),x=()=>h(e=>{var n,t,i;return!!(null===(i=e.userProfileData)||void 0===i?void 0:null===(t=i.user_profile)||void 0===t?void 0:null===(n=t.base_info)||void 0===n?void 0:n.webcast_private)}),M=()=>h(e=>{var n,t,i;return!!(null===(i=e.userProfileData)||void 0===i?void 0:null===(t=i.user_profile)||void 0===t?void 0:null===(n=t.base_info)||void 0===n?void 0:n.can_view_webcast_private)}),D=()=>{let e=x(),n=M();return e&&!n},j=()=>{var e,n,t,i;let o=g(),r=null==o?void 0:o.base_info,l=!!(null==r?void 0:r.webcast_private),a=!!(null==r?void 0:r.can_view_webcast_private),u=l&&(null==r?void 0:null===(n=r.webcast_avatar)||void 0===n?void 0:null===(e=n.url_list)||void 0===e?void 0:e[0])?r.webcast_avatar.url_list[0]:null==r?void 0:null===(i=r.avatar_thumb)||void 0===i?void 0:null===(t=i.url_list)||void 0===t?void 0:t[0],s=l&&(null==r?void 0:r.webcast_nick)?r.webcast_nick:null==r?void 0:r.nickname,d=l&&a?null==r?void 0:r.nickname:"",c=a&&(null==r?void 0:r.nickname)||s;return{avatarUrl:u,nickName:s,originalNickName:d,mentionNickName:c,isPrivateUser:l,canViewPrivate:a,shouldUsePrivateInfo:l}},V=()=>h(e=>!!e.isLinkMicManger),U=()=>h(e=>e.setFaceRecognitionShow),G=()=>h(e=>e.linkmicEvent),F=()=>h(e=>e.slardarEvent),Y=()=>h(e=>!!e.inLinkMicSeats),Z=()=>h(e=>e.functionType2),K=()=>h(e=>e.linkRoomType),B=()=>{let{anchorId:e,roomId:n,eventParams:t,targetUserType:o,targetUid:a,currentUid:u,pkStatus:d,channel_id:c,invite_mode:_,anchor_connect_status:v,pkTeamCount:m,pk_id:f,targetWebcastUid:g}=h(e=>s()(e,["anchorId","roomId","eventParams","targetUserType","targetUid","currentUid","pkStatus","channel_id","invite_mode","anchor_connect_status","pkTeamCount","pk_id","targetWebcastUid"])),E=()=>u===a?"audience_c_self":"anchor"===o?"audience_c_anchor":"guest"===o?"audience_c_guest":"audience_c_audience",y=u===a,I=()=>"anchor"===o?e===a?"2":"3":"guest"===o?"4":"1",P="audio"===K()?"voice_live":"",L=M(),N=x(),C=()=>{var o,u,s;return(0,i._)({anchor_id:e,room_id:n,enter_from_merge:(null===(o=window.__INVISIBLE_QUERY__)||void 0===o?void 0:o.enter_from_merge)||(0,r.yW)(),im_watch_assistant_order:(null===(u=window.__INVISIBLE_QUERY__)||void 0===u?void 0:u.im_watch_assistant_order)?Number(null===(s=window.__INVISIBLE_QUERY__)||void 0===s?void 0:s.im_watch_assistant_order):void 0,request_page:E(),enter_method:(0,l.Rs)("enter_method"),request_id:(0,l.Rs)("request_id"),to_user_id:a,action_type:"click",from_pk:d,channel_id:c,invite_mode:_,anchor_connect_status:v,pk_team_count:m,pk_id:f,live_type:P,is_privacy_watch:(0,p.q)()?"1":"0",target_is_privacy_watch:N?"1":"0",is_privacy_card_perm:L?"1":"0",is_webcast_uid_empty:g?"1":"0",is_self:y?"1":"0",user_type:I()},t)};return{collectProfileEvent:(e,n)=>{window.collectEvent(e,(0,i._)({},C(),n))},getProfileCommonParams:C}},W=()=>{let{collectProfileEvent:e}=B();return n=>{e("livesdk_profile_card_function_click",{function_type:n})}},H=()=>{var e;let n=(0,v.useRef)(null),t=(0,_.o)(),o=(0,m.T)(),r=Number(null==o?void 0:o.profileCannotSeeForNotLoginUser),l=null==t?void 0:null===(e=t.userStore)||void 0===e?void 0:e.headerUserInfo,a=(e,n)=>{if((1===r||2===r)&&!(null==l?void 0:l.isLogin)){(0,f.m8)("登录后即可查看用户信息","live_audience");return}return(0,c.qs)((0,i._)({store:t,position:n},e))};return{rectRef:n,handleOpenLiveUserProfileByRect:e=>{var t;let i=null===(t=n.current)||void 0===t?void 0:t.getBoundingClientRect();if(!!i)return a(e,{height:i.height,width:i.width,left:i.x,top:i.y})},handleOpenLiveUserProfileByEvent:(e,n)=>{let{clientX:t,clientY:i}=n;return a(e,{height:1,width:1,left:t,top:i})}}},q=()=>{let{collectProfileEvent:e}=B();return()=>{e("livesdk_anchor_room_manage_click",{user_type:"admin",is_anchor:"0",event_page:"live_detail",request_page:"personal_profile"})}},z=()=>{let{collectProfileEvent:e}=B();return()=>{e("livesdk_show_feedback_popup",{popup_title:"管理用户",is_anchor:"0",event_page:"live_detail"})}},$=()=>{let{collectProfileEvent:e}=B();return n=>{e("livesdk_click_feedback_popup",{button_name:n,popup_title:"管理用户",user_type:"admin",is_anchor:"0",event_page:"live_detail"})}},Q=()=>{let{collectProfileEvent:e}=B();return n=>{e("livesdk_blocklist_toast_click",{action_type:n,popup_title:"管理用户",user_type:"admin",is_anchor:"0",event_page:"live_detail"})}}},475665:function(e,n,t){t.d(n,{Ad:function(){return r},F4:function(){return a},HW:function(){return v},Ox:function(){return d},Rr:function(){return s},cM:function(){return l},dc:function(){return u},jJ:function(){return _},qH:function(){return c}}),t(683656),t(759943),t(527553);var i=t(585126),o=t.n(i),r={Unknown:0,0:"Unknown",toAudience:1,1:"toAudience",toAnchor:2,2:"toAnchor",toOtherAnchor:3,3:"toOtherAnchor",toSelf:4,4:"toSelf"};let l=e=>{let{currentUid:n,targetUid:t,targetIsAnchor:i,currentAnchorId:o}=e;return n===t?4:i?t===o?2:3:1},a=e=>2===e,u=e=>3===e;var s={Level:1,1:"Level",FansClub:2,2:"FansClub",Exhibition:3,3:"Exhibition",Vip:4,4:"Vip",Dress:5,5:"Dress",ShoppingFansClub:6,6:"ShoppingFansClub",HighScoreSongList:8,8:"HighScoreSongList"};let d=e=>2===e,c=e=>3===e,_=e=>2===e,v=o()(e=>{try{e.length<9&&(e=e.replace("#","#FF"));let n=parseInt(e.slice(1,3),16)/255,t=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16),o=parseInt(e.slice(7,9),16);return`rgba(${t}, ${i}, ${o}, ${n})`}catch(e){return}})},26333:function(e,n,t){t.d(n,{GZ:function(){return j},ng:function(){return M},ds:function(){return x}});var i=t("629686"),o=t("402748");t("490629"),t("706056");var r=t("320165"),l=t("101199"),a=t("23091"),u=t("618759"),s=t("103680"),d=t("534133"),c=t("462867"),_=t("684434");let v=(0,l.forwardRef)((e,n)=>(0,r.jsx)("svg",(0,o._)((0,i._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:(0,r.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 m=t("542901"),f=t("806217"),p=t("772342"),h=t("138957"),g=t("287964"),E=t("264034"),y=t.n(E);let I=e=>{let{video:n}=e;if(n instanceof HTMLVideoElement){var t;let{clientHeight:i,clientWidth:o,videoHeight:r,videoWidth:l}=n;n.getBoundingClientRect().width;let{clientHeight:a,clientWidth:u}=null==e?void 0:null===(t=e.baseConfig)||void 0===t?void 0:t.el,s=!0;if(l>r&&(s=!1),o>u&&(s=!1),s)return{height:512,width:300}}return{width:512,height:300}},P=y()(()=>{let e=e=>{let{key:n,validRes:t=Boolean}=e,i=document[n];return{key:n,originFn:i,mergedFn:function(){for(var e,o,r=arguments.length,l=Array(r),a=0;a<r;a++)l[a]=arguments[a];let u=i.call(document,...l);try{let i=null===(o=window.documentPictureInPicture)||void 0===o?void 0:null===(e=o.window)||void 0===e?void 0:e.document;if(!i||t(u))return u;return i[n].call(i,...l)}catch(e){return u}}}};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 L(e){P().forEach(n=>{let{key:t,mergedFn:i,originFn:o}=n;document[t]=e?i:o})}var N=t("890710"),C=t("469935"),S=t.n(C),T=t("637226"),b=t("893876"),A=t("575697"),k=t("762080"),R=t("633529");function w(){let{isLivingPip:e}=x(),{singletonStore:{player:n}}=(0,m.o)(),t=(0,l.useRef)(null),i=(0,l.useRef)(null);return(0,l.useEffect)(()=>{try{if(!n)return()=>{};let e=0,o=()=>{cancelAnimationFrame(e)},r=()=>{var l;o();let a=null===(l=n.video)||void 0===l?void 0:l.flyVideo,u=i.current;if(!a||!u||!t.current)return;let{videoWidth:s,videoHeight:d}=a,c=u.getContext("2d");if(u.width=s,u.height=d,c.drawImage(a,0,0,u.width,u.height),!n.paused)e=requestAnimationFrame(r)};return n.on("pause",o),n.on("play",r),r(),()=>{o(),n.off("play",r),n.off("pause",o)}}catch(e){}},[e,n]),(0,r.jsx)("div",{ref:t,className:R.default.doubleScreenVideoWrap,children:(0,r.jsx)("canvas",{ref:i})})}var O=t("634199");let x=()=>{let{pipInfo:e,closePipWindow:n,openPipWindow:t}=(0,a.fl)(),r=M(),{playerStore:{playerInstance:l}}=(0,m.o)(),d=(null==e?void 0:e.pipId)===A.CL,c=(0,f.Z)(()=>t((0,o._)((0,i._)({},I(l)),{pipId:A.CL})).then(e=>{var n;let t=null==e?void 0:null===(n=e.pipInfo)||void 0===n?void 0:n.window;if(!!t)"true"===document.documentElement.getAttribute("dark")&&(t.document.documentElement.setAttribute("dark","true"),t.document.body.setAttribute("theme-mode","dark"))})),_=(0,f.Z)(e=>{if(!!d)e&&window.focus(),(0,u.DT)()&&e&&s.invoke("pipParentWinShow"),n(A.CL)});return{isLivingPip:d,pipWin:d?e.window:null,closeLivingPip:_,openLivingPip:c,isNewLivingPipEnabled:r}},M=()=>{let{isSupported:e}=(0,a.fl)();return(0,u.DT)(),e},D=(0,l.memo)(e=>{let{isDoubleScreen:n,className:t}=e,[i,o]=(0,l.useState)(!1),[a,u]=(0,l.useState)(!1),s=(0,l.useRef)(null),E=(0,l.useRef)(null),y=(0,l.useRef)(!1),{isLivingPip:I,closeLivingPip:P,pipWin:C}=x(),{singletonStore:{player:R,message:M},eventStore:{playerEvent:D},linkmicStore:{linkMicLayout:j},pkStore:{pkStatus:V},playerStore:{isPause:U}}=(0,m.o)(),G=(0,f.Z)(()=>{I&&o((0,d.nz)())});(0,p.Z)("resize",()=>G(),{target:C}),(0,p.Z)("pagehide",()=>y.current=!(null==R?void 0:R.paused),{target:C}),(0,h.Z)(()=>G(),I?50:void 0),(0,l.useEffect)(()=>M.on("MemberMessage",e=>{(null==e?void 0:e.some(e=>{var n;return[k.WU.KICK_OUT,k.WU.BLOCK].includes(Number(null==e?void 0:null===(n=e.payload)||void 0===n?void 0:n.action))}))&&P(!1)}),[M,P]),(0,l.useEffect)(()=>(L(I),()=>{L(!1)}),[I]);let F=(0,l.useMemo)(()=>void 0===j&&!V&&!0,[j,V]),Y=(0,l.useRef)(!1);(0,l.useEffect)(()=>{if(!!R)try{var e,n,t,i,o,r,l,a;let u=()=>{let e=requestAnimationFrame(()=>{var e,n;return null===(n=R.plugins.dynamicbg)||void 0===n?void 0:null===(e=n.renderOnce)||void 0===e?void 0:e.call(n)});return()=>{cancelAnimationFrame(e)}};if(I){;return Y.current=!0,null==R||null===(n=R.plugins)||void 0===n||null===(e=n.rotate)||void 0===e||e.hide(),(R.paused||!U)&&(null===(i=R.config)||void 0===i?void 0:null===(t=i.baseConfig)||void 0===t?void 0:t.url)&&R.play(),u()}if(Y.current){;return Y.current=!1,F&&(null===(r=R.plugins.rotate)||void 0===r||null===(o=r.show)||void 0===o||o.call(r)),y.current&&(R.paused||!U)&&(null===(a=R.config)||void 0===a?void 0:null===(l=a.baseConfig)||void 0===l?void 0:l.url)&&R.play(),u()}}catch(e){}},[I,R,F,U]),(0,g.Z)(()=>{P()});let Z=()=>P(!0);return(0,b.Z)(T.Hq,Z),(0,b.Z)(T.qo,Z),(0,b.Z)(T.fC,Z),(0,b.Z)(T.Fg,Z),(0,r.jsx)(c.F6,{pipId:A.CL,children:(0,r.jsxs)("div",{className:S()(O.default.wrap,t),ref:s,onMouseOver:()=>u(!1),onMouseLeave:e=>{if(!E.current||!e)return;let{pageX:n,pageY:t}=e,{left:i,top:o,width:r,height:l}=E.current.getBoundingClientRect();n>=i&&n<=i+r&&t>=o&&t<=o+l&&u(!0)},children:[(()=>{var e;let n=null==R?void 0:null===(e=R.root)||void 0===e?void 0:e.querySelector(".douyin-player-top-bar");return!n||i?null:(0,N.createPortal)((0,r.jsxs)("div",{className:O.default.headerIcons,children:[(0,r.jsx)("div",{className:O.default.dragBar,ref:E}),(0,r.jsx)("span",{className:O.default.headerIcon,onClick:()=>{P(!0),D.livesdkMiniWindowExit({click_position:"mini_window_exit"})},children:(0,r.jsx)(_.Z,{})}),(0,r.jsx)("span",{className:O.default.headerIcon,onClick:()=>{P(!1),D.livesdkMiniWindowExit({click_position:"mini_window_exit"})},children:(0,r.jsx)(v,{})})]}),n)})(),(0,r.jsxs)("div",{className:O.default.content,children:[(0,r.jsx)(c.pu,{pipAnchorId:A.MA.BasicPlayer,className:S()(O.default.slotContent,{[O.default.forceShowControl]:a})}),n&&(0,r.jsx)(w,{}),(0,r.jsx)(c.pu,{pipAnchorId:A.MA.Background,className:S()(O.default.background,"livingPipBackground")})]})]})})}),j=e=>M()?(0,r.jsx)(D,(0,i._)({},e)):null},565291:function(e,n,t){t.d(n,{Z:function(){return C}});var i=t("629686"),o=t("320165"),r=t("101199"),l=t("402748");t("490629");var a=t("59850"),u=t("232547"),s=t("502615"),d=t("542901"),c=t("160197"),_=t("331931"),v=t("469935"),m=t.n(v),f=t("618530"),p={autoplayPreventTip:"a3b0giV7",text:"DSPVRRKk",limitText:"PV7wUWV5",openText:"X9QwSNP0",key:"Rnw5twPb",closeIcon:"hRkg7oOO",maskContainer:"db7J35an",maskMain:"w7TzdODC",maskHeader:"CpFEcJiw",maskTitle:"Ks6xI0cu",maskClose:"j14D4L1l",maskContent:"_2_bSXRe",maskText:"ttMbE1Fo",maskConfirm:"WDcp7Mft"};let h=(0,r.forwardRef)((e,n)=>(0,o.jsx)("svg",(0,l._)((0,i._)({width:36,height:36,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:(0,o.jsx)("path",{d:"M24.601 24.6a1.362 1.362 0 0 1-1.927 0L18.5 20.427l-4.174 4.175a1.362 1.362 0 1 1-1.927-1.927l4.174-4.174-4.174-4.175a1.362 1.362 0 0 1 1.927-1.926l4.174 4.174 4.174-4.174a1.362 1.362 0 0 1 1.927 1.926L20.427 18.5l4.174 4.174a1.362 1.362 0 0 1 0 1.927z",fill:"#fff",fillOpacity:".8"})})));var g=t("176449"),E=t("163896");let y=e=>{let{className:n,onClose:t,onOpen:i,preventModalVisible:l,onModalVisibleChange:a}=e,[u,s]=(0,r.useState)(!1),d=()=>{s(!1),null==a||a(!1)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:m()(p.autoplayPreventTip,n),children:[(0,o.jsx)("span",{className:p.text,children:"因"}),(0,o.jsx)("span",{className:p.limitText,onClick:()=>{s(!0),null==a||a(!0)},children:"浏览器限制静音"}),(0,o.jsx)("span",{className:p.text,children:",按"}),(0,o.jsx)("span",{className:p.key,children:"P"}),(0,o.jsx)("span",{className:p.text,children:"或"}),(0,o.jsx)("span",{className:p.openText,onClick:i,children:"点击打开声音"}),(0,o.jsx)(g.Z,{className:p.closeIcon,height:36,width:36,src:h,onClick:t})]}),(void 0===l?u:l)&&(0,o.jsx)(f.h,{children:(0,o.jsx)(E.T6,{className:p.maskContainer,children:(0,o.jsxs)("div",{className:p.maskMain,children:[(0,o.jsxs)("div",{className:p.maskHeader,children:[(0,o.jsx)("div",{className:p.maskTitle,children:"浏览器限制"}),(0,o.jsx)(g.Z,{className:p.maskClose,width:36,height:36,src:h,onClick:d})]}),(0,o.jsxs)("div",{className:p.maskContent,children:[(0,o.jsx)("div",{className:p.maskText,children:"当你访问抖音次数较少,或经常静音播放时,浏览器可能会限制网站音量,使网站无法有声播放"}),(0,o.jsx)("div",{className:p.maskConfirm,onClick:d,children:"我知道了"})]})]})})})]})};var I="y6w4tV_y",P=t("964591");let L=e=>{let{playerInstance:n}=e,{eventStore:{playerEvent:t}}=(0,d.o)(),[i,l]=(0,r.useState)(!1),[c,v]=(0,r.useState)(!1),m=(0,r.useRef)(!1);(0,r.useEffect)(()=>()=>{m.current=!0},[]);let f=r.useRef(!0),p=(0,a.Z)(()=>{var e,i;null!==(i=(e=window).__INVISIBLE_QUERY__)&&void 0!==i||(e.__INVISIBLE_QUERY__={}),window.__INVISIBLE_QUERY__.if_browser_limited=1;null==t||t.volumeBrowserLimitedMute(),f.current&&(setTimeout(()=>{if(!!n.paused)n.muted=!0,n.play(),setTimeout(()=>{(0,u.w)(!1),n.once(s.FP.VOLUMECHANGE,()=>{!m.current&&v(!1)})})},0),f.current=!1,v(!0),null==t||t.volumeBrowserLimitedToastShow())});(0,r.useEffect)(()=>{if(!!n)return n.on(s.FP.AUTOPLAY_WAS_PREVENTED,p),()=>{null==n||n.off(s.FP.AUTOPLAY_WAS_PREVENTED,p)}},[n]),(0,r.useEffect)(()=>{if(!n)return;let e=e=>{var t,i;if(!n)return;let o=null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.tagName;if("INPUT"!==o&&"TEXTAREA"!==o&&(null==e?void 0:null===(i=e.target)||void 0===i?void 0:i.contentEditable)!=="true")(null==e?void 0:e.code)==="KeyP"&&!(e.shiftKey||e.metaKey||e.ctrlKey)&&(n.muted=!n.muted)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n]);let h=(0,a.Z)(()=>{null==t||t.volumeBrowserLimitedClickOpen(),n&&(n.muted?n.muted=!1:n.volume=.5,n.emit("volumechange")),v(!1)}),g=(0,r.useCallback)(()=>{null==t||t.volumeBrowserLimitedClickClose(),v(!1)},[]);return(0,o.jsx)(_.l,{showHint:c,priority:2,duration:30,delay:0,onClose:()=>{v(!1)},children:(0,o.jsx)(y,{className:I,onClose:g,onModalVisibleChange:l,onOpen:h,preventModalVisible:i})})};var N=(0,P.Pi)(e=>{let{player:n}=(0,c.n)();return(0,o.jsx)(L,(0,l._)((0,i._)({},e),{playerInstance:n}))}),C=(0,P.Pi)(e=>(0,o.jsx)(N,(0,i._)({},e)))},417768:function(e,n,t){t.d(n,{Z:function(){return a}});var i=t("320165");t("101199");var o={tooltips:"ZyGnJtkc",popup:"bowJNsp9",top:"pXjlJ0x4",bottom:"sozQhb0N",left:"g_HTtCwv",right:"Y3iQKeTm"},r=t("469935"),l=t.n(r);function a(e){let{content:n,children:t,position:r="top",className:a,tooltipStyle:u={}}=e;return(0,i.jsxs)("div",{className:o.tooltips,children:[(0,i.jsx)("div",{className:l()(o.popup,o[r],a),style:u,children:n}),t]})}},685257:function(e,n,t){t.d(n,{jq:function(){return f}}),t(117232);var i=t(414061),o=t(509523),r=t(176209),l=t(259808),a=t(650639),u=t(789867);let s="ISLAND_PLUGIN_PK",d="ISLAND_SIDE_BAR",c="ISLAND_CATEGORY_TAB",_=["/category/:categoryId","/follow/live/:webrid","/root/live/:webrid"],v=()=>-1,m={[i.EVENT.afterVideoPlayed]:[{name:"ISLAND_LAYOUT_NAVIGATION",priority:-1,get delay(){return(0,r.VM)()||2e3}},{name:"ISLAND_SYNC_HEADER",priority:-1,get delay(){return(0,r.VM)()||2e3}},{name:"ISLAND_DETAIL_CHATROOM",priority:1},{name:"ISLAND_DETAIL_ROOMINFOBARNEW",priority:2},{name:"ISLAND_PLUGIN_DANMAKUNEW",priority:-1,get delay(){return 2e3}},"ISLAND_PLUGIN_AUDIO","ISLAND_PLUGIN_VIDEO",{name:"ISLAND_PLUGIN_PICTURE",get priority(){return v()}},"ISLAND_PLUGIN_FANSCLUB","ISLAND_PLUGIN_EFFECT_SWITCH","ISLAND_PLUGIN_GIFT_TRAY","ISLAND_PLUGIN_GIFT_EFFECT",s,{name:s,priority:2},{name:"ISLAND_PLUGIN_EXHIBITION_VIEW",get priority(){return v()}},"ISLAND_PLUGIN_EFFECT",{name:"ISLAND_PLUGIN_HOUR_RANK_LIST",get priority(){return v()}},{name:"ISLAND_PLUGIN_OPERATING_BAR",priority:4},{name:"ISLAND_PLUGIN_LINKMIC_APPLY",get priority(){return v()}},"ISLAND_PLUGIN_GROUP_FIGHT","ISLAND_PLUGIN_GUEST_BATTLE","ISLAND_PLUGIN_ORDER_SING",d,c,"ISLAND_NEW_YEAR_LIVE","ISLAND_AUDIO_CHEAT_TIPS","ISLAND_PROGRAMME","ISLAND_AUTO_RUN_MODAL","ISLAND_SPRING_BACK","ISLAND_USE_PAUSE_POP","ISLAND_LEAD_LOGIN_WITH_HIDE_LOGIN","ISLAND_LIVE_LIKE","ISLAND_ADMIN_PRIVILEGE_PLUGIN","ISLAND_DANMUKU_SETTINGS","ISLAND_RTC_LAYER_PLUGIN","ISLAND_PLAYER_COMMENT_PLUGIN",{name:"ISLAND_LOTTERY",priority:3},"ISLAND_REDPACKET",{name:"ISLAND_SHORT_TOUCH",priority:3},{name:"ISLAND_LIVING_PIP_WINDOW",get priority(){return v()}},{name:"ISLAND_LIVE_SHARE_PLUGIN",get priority(){return v()},get delay(){return 1e3}},"ISLAND_CONTEXT_MENU","ISLAND_LIVE_RESERVE",{name:"ISLAND_PLUGIN_TOOLBAR",priority:2},"ISLAND_LIVING_PIP_WINDOW_DOUBLE"]};function f(){if("undefined"==typeof window)return;let{pathname:e,hostname:n}=window.location;if(!("live.douyin.com"===n&&((0,a.m)("/",window.location.pathname)||(0,a.m)("/:id",window.location.pathname)||(0,a.m)("/live/:id",window.location.pathname))||(0,u.l)(e)||(0,u.Y)(e)))return;let t=!1;Object.keys(m).forEach(e=>{i.listen(e,()=>{if(t)return;t=!0;let n=Object.values(m[e]).sort((e,n)=>{let t="string"==typeof e?0:e.priority;return("string"==typeof n?0:n.priority)-t}),i=_.some(e=>(0,a.m)(e,window.location.pathname));n.forEach(e=>{let n="string"==typeof e?e:e.name,t="string"!=typeof e&&(null==e?void 0:e.delay);o.p.postTask({task:()=>{switch(n){case d:!i||t?setTimeout(()=>{(0,l.q)(d)},t||2e3):(0,l.q)(d);break;case c:i?(0,l.q)(c):setTimeout(()=>{(0,l.q)(c)},2e3);break;default:t?setTimeout(()=>{(0,l.q)(n)},t):(0,l.q)(n)}},priority:"user-visible"})})})})}},439649:function(e,n,t){t.d(n,{r:function(){return E}}),t("706056");var i=t("320165");t("101199");var o=t("542901"),r=t("513565"),l=t("377228"),a=t("40699"),u=t("469935"),s=t.n(u),d=t("350856"),c=t.n(d),_=t("584293"),v=t("650639");let m=(e,n)=>!!(n&&-1!==[r.LIVE_XIGUA_DOMAIN].indexOf(n)&&[_.m.HOME].some(n=>!!(0,v.m)(n,e)));var f=t("474149"),p=t("414061"),h=t("964591"),g=t("339808");(0,h.Pi)(function(e){let{domain:n,pathname:t,children:u,isDetail:d}=e,_=(0,o.o)(),{forceTheme:v,hideErrorStyle:h,showFooter:g}=_.layoutStore;return(0,i.jsxs)("div",{className:s()(a.Z.scroll,v,{[a.Z.detailScroll]:d}),id:l.IS,ref:e=>n===r.LIVE_XIGUA_DOMAIN&&p.emit(p.EVENT.globalScrollEl,e),onScroll:c()(e=>{var n,t,i,o;(null==e?void 0:null===(n=e.target)||void 0===n?void 0:n.scrollTop)!==void 0&&p.emit(p.EVENT.tabContainerScroll,{tab:"live",scrollTop:null==e?void 0:null===(i=e.target)||void 0===i?void 0:i.scrollTop}),(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.scrollTop)>200&&(null==_||null===(o=_.appStore)||void 0===o||o.setHomeNeedIntial(!0))},20),children:[(0,i.jsx)("div",{className:s()({[a.Z.xiguaNormal]:n===r.LIVE_XIGUA_DOMAIN&&!m(t,n),[a.Z.xiguaPadding]:m(t,n),[a.Z.error]:h,[a.Z.loadingStyle]:d}),children:u}),g&&(0,i.jsx)(f.$,{})]})});let E=(0,h.Pi)(function(e){let{children:n}=e,{pathname:t}=(0,g.a)(),o=t.includes("/live/"),r=o?s()(a.Z.scroll,{[a.Z.detailScroll]:!0}):"";return(0,i.jsx)("div",{className:r,id:l.IS,style:o?{}:{display:"contents"},children:n})})},886383:function(e,n,t){var i=t(320165);t(101199);var o=t(56924),r=t(752150),l=t(542901),a=t(298602);n.Z=function(e){let{websocketKey:n}=e,{singletonStore:{message:t}}=(0,l.o)();return(0,o.C)(()=>{if(n)null==t||t.setWebsocketKey(n);else{let e=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;(0,r.ZP)({service_name:"webcast.douyin.live_pc",key:"message_websocket_params"}).then(e=>{null==t||t.setWebsocketKey(e)}).catch(t=>{n>1&&e(n-1)})};e(2)}},[]),(0,a.q)({message:t,socketData:n}),(0,i.jsx)(i.Fragment,{})}},770723:function(e,n,t){t.d(n,{a:function(){return o}});var i=t(536793);let o=e=>{var n;let t=(0,i.T)();return(null===(n=null!=e?e:t)||void 0===n?void 0:n.liveSideAreaEntry)===1}},185347:function(e,n,t){t.d(n,{a:function(){return o},w:function(){return i}});let i="INSERT_AT_USER_COMMAND",o="INSERT_EMOJI_COMMAND"},229403:function(e,n,t){t.d(n,{tz:function(){return N},_i:function(){return C}}),t("490629");var i=t("320165"),o=t("559519"),r=t("279198"),l=t("101199"),a=t("532704"),u=t("185347"),s=t("73203"),d=t("806217"),c=t("795233"),_=t.n(c),v=t("629686");t("374954"),t("683656"),t("759943"),t("362051");var m=t("40948");let f=e=>{let n=[];try{for(let i of e.getContentState().getZoneState("0"))for(let o of i.hasLineMarker()?i.getOps().slice(1):i.getOps()){var t;let i={text:o.insert,attributes:(0,v._)({},o.attributes)};e.pluginManager.call("editorCollectText",i),n.push({text:null===(t=i.text)||void 0===t?void 0:t.replace(/\n/g,""),attributes:i.attributes})}}catch(e){}return n},p=e=>{let n=0,t="",i=[];try{f(e).forEach(e=>{let{text:o}=e,r=(0,a.o7)(e);if(r){let t=(0,a.HV)(e);(null==t?void 0:t.uid)&&i.push({type:2,value:JSON.stringify({uid:t.uid,webcast_uid:t.webcastUid}),start:n,length:o.length})}if((0,m._$)(e)){let t=(0,m.Wi)(e);(null==t?void 0:t.emojiId)&&i.push({type:1,value:null==t?void 0:t.emojiId,start:n,length:o.length})}n+=o.length,t+=o,r&&(n+=1,t=`${t} `)})}catch(e){}return{plainText:t.trim(),rtfElements:i}};var h=t("429544"),g=t("396868"),E=t("478401"),y=t("542901"),I=t("573871");let P="non_paste",L=(0,o.kr)({editor:null,insertAtUser:_(),insertEmoji:()=>!1,setEditor:_(),getTextInfo:()=>({plainText:"",rtfElements:[]}),isEmpty:!0,setIsEmpty:_(),markPaste:_(),markPasteEdit:_(),getPasteEditMethod:()=>P,resetPasteEditMethod:_()}),N=(0,l.memo)(e=>{let{children:n}=e,[t,o]=(0,l.useState)(null),[r,c]=(0,l.useState)(!1),_=(0,l.useRef)(P),v=(0,l.useRef)(!1),{roomStore:{foldChatroom:f,setFoldChatroom:N}}=(0,y.o)(),C=(0,I.o)(),S=(0,s.Z)(async e=>{let{userInfo:n,triggerType:i}=e;if("number"==typeof(null==n?void 0:n.uid)&&(n.uid=String(n.uid)),!t)return;let o=(0,a.X9)(t.getContent()),r=()=>{f&&N(!1)},l=()=>{t.execCommand(u.w,n),C("livesdk_at_reply",{trigger_type:i,to_user_id:null==n?void 0:n.uid})},s=o&&(null==o?void 0:o.uid)===(null==n?void 0:n.uid)&&(null==o?void 0:o.webcastUid)===(null==n?void 0:n.webcastUid);if(o){if(s)r(),t.focus();else{if(!await (0,E.S)({title:"单次只支持艾特一个人,艾特其他人会清空内容,是否继续?",width:600}))return;r(),t.reset(),l()}}else r(),l()},{leading:!0}).run,T=(0,d.Z)(e=>{let{emojiInfo:n,limitCount:i=3,onlyLimitActivity:o}=e;return!!t&&((n.isActivity||!o)&&(0,m.jj)({deltaSet:t.getContent(),onlyActivity:o}).length>=i?(g.F.info(`最多可添加${i}个${o?"活动":""}表情`),!1):(t.execCommand(u.a,n),!0))}),b=(0,d.Z)(()=>{if(!t)return{plainText:"",rtfElements:[]};let{plainText:e,rtfElements:n}=p(t);return{plainText:e,rtfElements:n}}),A=(0,d.Z)(()=>{_.current=P,v.current=!1}),k=(0,d.Z)(()=>{_.current="pure_paste",v.current=!1}),R=(0,d.Z)(()=>{if("pure_paste"===_.current){if(v.current){_.current="edit_with_paste";return}v.current=!0}}),w=(0,d.Z)(()=>_.current);(0,h.n)(t?S:void 0);let O=(0,l.useMemo)(()=>({editor:t,setEditor:o,insertAtUser:S,getTextInfo:b,insertEmoji:T,isEmpty:r,setIsEmpty:c,markPaste:k,markPasteEdit:R,getPasteEditMethod:w,resetPasteEditMethod:A}),[t,o,S,b,T,r,c,k,R,w,A]);return(0,i.jsx)(L.Provider,{value:O,children:n})}),C=(0,r.Z)(L)},532704:function(e,n,t){t.d(n,{HV:function(){return a},Rs:function(){return s},X9:function(){return u},o7:function(){return l}}),t(683656),t(759943),t(374954);var i=t(639142),o=t(464675),r=t(900451);let l=e=>{var n;return null==e?void 0:null===(n=e.attributes)||void 0===n?void 0:n[r.s]},a=e=>{try{var n;return JSON.parse((null==e?void 0:null===(n=e.attributes)||void 0===n?void 0:n[r.s])||"")}catch(e){return null}},u=e=>{try{let n=null;if(e.forEach(e=>{if(!n)n=e.ops.find(e=>l(e))||null}),n)return a(n);return null}catch(e){return null}},s=e=>{try{e.forEach((n,t)=>{if(n.zoneType!==i.Ak.Content)return;let r=n.ops.filter(e=>!l(e));e.replace(t,new o.I({zoneId:t,ops:r}))})}catch(e){}return e}},429544:function(e,n,t){t.d(n,{n:function(){return s}});var i=t(629686),o=t(402748),r=t(893876),l=t(806217),a=t(101199);let u=(()=>{let e=null,n=null,t=()=>e=null;return{get:()=>e,clear:t,set:i=>{e=i,n&&clearTimeout(n),n=setTimeout(()=>{t()},1e4)}}})();function s(e){let n=(0,l.Z)(n=>{u.clear(),null==e||e(n)}),t=(0,r.Z)("AT_USER_BUS_EVENT",n),s=(0,l.Z)(e=>(u.set(e),t.trigger(e)));return(0,a.useEffect)(()=>{let t=u.get();t&&e&&(n(t),u.clear())},[e]),(0,o._)((0,i._)({},t),{trigger:s})}},850070:function(e,n,t){t.d(n,{M:function(){return o},q:function(){return i}});let i=e=>{let n=0;if(document.selection){e.focus();let t=document.selection.createRange();t.moveStart("character",-e.value.length),n=t.text.length}else(e.selectionStart||0===e.selectionStart)&&(n="backward"===e.selectionDirection?e.selectionStart||0:e.selectionEnd||0);return n},o=(e,n)=>{if(null!==e){if(e.createTextRange){let t=e.createTextRange();t.move("character",n),t.select()}else e.selectionStart?(e.focus(),e.setSelectionRange(n,n)):e.focus()}}},249467:function(e,n,t){t.d(n,{T:function(){return E}});var i=t("629686");t("706056"),t("679308");var o=t("980660"),r=t("841434"),l=t("973140"),a=t("414061"),u=e=>{let{registerBridge:n}=e,t=new l.N;t.on("*",(e,n)=>{(0,r.s0)(e,n),(0,r.broadcastEvent)(e,n)});let i=async(e,n)=>{let{eventName:i,callback:o}=n;try{return t.on(i,o),(0,r.Vp)()}catch(e){return(0,r.bG)(r.MU.FAIL,"fail")}},o=async(e,n)=>{let{eventName:i,params:o}=n;try{return t.emit(i,o),"subscription.vipsendnewpurchase"===i&&a.emit(a.EVENT.VipRechargeSuccess),(0,r.Vp)()}catch(e){return(0,r.bG)(r.MU.FAIL,"fail")}},u=async(e,n)=>{let{eventName:i,listener:o}=n;try{return t.off(i,o),(0,r.Vp)()}catch(e){return(0,r.bG)(r.MU.FAIL,"fail")}},s=async(e,n)=>{let{params:i,cb:o}=n;try{if("string"==typeof i)return t.on(i,o),(0,r.Vp)();return t.on(i.eventName,o),(0,r.Vp)()}catch(e){return(0,r.bG)(r.MU.FAIL,"fail")}};n("on",s),n("off",u),n("subscribeEvent",i),n("publishEvent",o),n("unSubscribeEvent",u),n("webcastBroadcast",o),n("x.subscribeEvent",s),n("x.publishEvent",o)};t("490629");var s=t("687581"),d=t("618759"),c=t("396868"),_=t("174207"),v=t("764283"),m=t("198412"),f=t.n(m),p=t("220811"),h=e=>{let{registerBridge:n,store:t,JSB:o}=e,l=async(e,n)=>{let{type_list:i=[]}=n;try{if(!i.every(e=>{var n,i,o;return(null==t?void 0:null===(o=t.activityIndicatorStore)||void 0===o?void 0:null===(i=o.messageListenList)||void 0===i?void 0:null===(n=i.indexOf)||void 0===n?void 0:n.call(i,e))>=0})){var o;null==t||t.activityIndicatorStore.setMessageListenList([...new Set([...i,...null==t?void 0:null===(o=t.activityIndicatorStore)||void 0===o?void 0:o.messageListenList])])}return(0,r.Vp)()}catch(e){return(0,r.Vp)()}},a=async(e,n)=>{let{lynx:i,newExhibition:l=!1,exhibitionSchema:a=""}=n,{choosePeopleArr:u}=(null==t?void 0:t.linkmicStore)||{},{roomInfo:s}=(null==t?void 0:t.roomStore)||{};try{var d,c,_,v;let n=null==t?void 0:null===(d=t.singletonStore.liveContainer)||void 0===d?void 0:d.isSupportLynx(),m=(null==u?void 0:u[0])?null==u?void 0:u[0]:null!==(_=null==s?void 0:null===(c=s.anchor)||void 0===c?void 0:c.id_str)&&void 0!==_?_:"";return i&&n?l&&a?o.openScheme(e,{url:a,_reset:!0}):null==t||null===(v=t.singletonStore.liveContainer)||void 0===v||v.openLandPage({url:(0,p.oQ)(m),reset:!0}):o.openSchema(e,{url:(0,p.dY)(m),_reset:!0}),(0,r.Vp)()}catch(e){return(0,r.bG)(r.MU.FAIL,"fail")}};n("pcGetBalance",async()=>{try{let{data:o,logId:l}=await _.sb({}),a=f()(o,"status_code");if(0!==a)return v.kg.event(`[${s.Tn.Error}]${s.Mo.LiveBalanceError}`,(0,i._)({statusCode:a,logId:null!=l?l:"",is_client:(0,d.DT)()},o)),c.F.info(f()(o,"data.prompts","获取余额失败,请稍后重试")),v.kg.error("获取余额失败",o,l),(0,r.bG)(r.MU.FAIL,"fail");{var e,n;let i=_.Jh(f()(o,"data"));return null==t||null===(n=t.giftStore)||void 0===n||null===(e=n.setBalance)||void 0===e||e.call(n,i),(0,r.Vp)()}}catch(e){return(0,r.bG)(r.MU.FAIL,"fail")}}),n("registerMessage",l),n("openGroupExhibition",a)};let g={},E=(e,n)=>{let t={store:e,registerBridge:(e,t)=>{n[e]=async function(){for(var n=arguments.length,o=Array(n),l=0;l<n;l++)o[l]=arguments[l];let a=["on","x.subscribeEvent"].includes(e),u=["off","unSubscribeEvent"].includes(e),s=o[0];u&&(s={eventName:o[0],listener:void 0}),a&&(s={params:s,cb:o[1]}),"subscribeEvent"===e&&(s={eventName:s,callback:o[1]});let{code:d,data:c={}}=await t({containerID:"h5_container",containerType:r.mC.WEBVIEW,sendEvent:()=>{},callback:()=>{}},s)||{};return(0,i._)({code:d},c)},g[e]=t},type:"h5",JSB:g};for(let e in o)o[e](t);u(t),h(t)}},728210:function(e,n,t){t.d(n,{s:function(){return b}});var i=t(629686),o=t(811603);t(679308),t(490629);var r=t(320165),l=t(101199),a=t(855436),u=t(103423),s=t(469935),d=t.n(s),c=t(542901),_=t(160197),v=t(964591),m=t(973140),f=t(618759),p=t(620589),h=t(890710);let g=(0,a.ZP)(()=>Promise.all([t.e("74792"),t.e("19511"),t.e("80030"),t.e("35148"),t.e("87188"),t.e("34080"),t.e("69775")]).then(t.bind(t,61976)),{ssr:!1}),E=new m.N,y="__Live_Share_Mouse_Enter",I="__Live_Share_Mouse_Leave",P="__Live_Share_Choose_Friend",L="__Live_Share_Share_To_Friend",N="__Live_Share_Share_Success",C="__Live_Share_Outer_Click",S="__Live_Share_Outer_Failed",T="__Live_Share_Close",b=e=>{var n,t,o,r,l,a,u;let{onMouseEnter:s,onMouseLeave:d,onChooseFriend:c,onShareToFriend:_,onShareSuccess:v,onOuterClick:m,onShareFailed:f,onShareClose:h,store:g,shareFrom:b}=e,A=e=>function(){for(var n=arguments.length,t=Array(n),i=0;i<n;i++)t[i]=arguments[i];null==e||e(...t)},k={[C]:A(m),[y]:A(s),[I]:A(d),[P]:A(c),[L]:A(_),[N]:A(v),[S]:A(f),[T]:A(h)};return Object.keys(k).forEach(e=>{E.on(e,k[e])}),null==g||null===(n=g.shareStore)||void 0===n||n.setShowShare(!0),null==g||g.shareStore.setShareFrom(b||"lottery"),"share_icon"===b&&window.collectEvent("livesdk_share_icon_click",(0,i._)({room_id:null==g?void 0:null===(o=g.roomStore)||void 0===o?void 0:null===(t=o.roomInfo)||void 0===t?void 0:t.roomId,anchor_id:null==g?void 0:null===(u=g.roomStore)||void 0===u?void 0:null===(a=u.roomInfo)||void 0===a?void 0:null===(l=a.room)||void 0===l?void 0:null===(r=l.owner)||void 0===r?void 0:r.id_str},(0,p.Nu)())),()=>{var e;null==g||null===(e=g.shareStore)||void 0===e||e.setShowShare(!1),Object.keys(k).forEach(e=>{E.off(e,k[e])})}};n.Z=(0,v.Pi)(e=>{let{className:n=""}=e,t=(0,o._)(e,["className"]),{player:a}=(0,_.n)(),{shareStore:s,roomStore:v}=(0,c.o)(),m=(0,l.useRef)(null),b=e=>function(){for(var n=arguments.length,t=Array(n),i=0;i<n;i++)t[i]=arguments[i];E.emit(e,...t)};return(0,l.useEffect)(()=>{let e=e=>{let n=e.target.parentNode;for(;n;){if(n===m.current)return;n=n.parentNode}E.emit(C,e)};return document.body.addEventListener("click",e),()=>{document.body.removeEventListener("click",e)}},[]),(0,l.useEffect)(()=>{if(s.showShare&&(null==v?void 0:v.roomInfo)){var e,n,t,o;window.collectEvent("livesdk_share_card_show",(0,i._)({share_from:null==s?void 0:s.shareFrom,room_id:null==v?void 0:null===(e=v.roomInfo)||void 0===e?void 0:e.roomId,anchor_id:null==v?void 0:null===(o=v.roomInfo)||void 0===o?void 0:null===(t=o.room)||void 0===t?void 0:null===(n=t.owner)||void 0===n?void 0:n.id_str},(0,p.Nu)()))}},[s.shareFrom,s.showShare]),h.createPortal((0,r.jsx)("div",{className:d()(u.Z.liveShare,n,{[u.Z.isInClient]:(0,f.DT)()}),ref:m,style:{left:s.left,top:s.top,display:s.showShare?"block":"none"},children:(0,r.jsx)(g,(0,i._)({player:a,shareeListHeight:s.height,onMouseEnter:b(y),onMouseLeave:b(I),handleChooseFriend:b(P),handleShareToFriend:b(L),handleShareSuccess:b(N),handleShareError:b(S),handleShareClose:b(T),shareFrom:null==s?void 0:s.shareFrom,hidden:!s.showShare},t))}),document.body)},{forwardRef:!1})},35679:function(e,n,t){t.r(n),t.d(n,{default:function(){return a}});var i=t(101199),o=t(160197),r=t(542901),l=t(502615);function a(e){let{eventStore:{playerEvent:n}}=(0,r.o)(),{player:t}=(0,o.n)(),a=(0,i.useCallback)(t=>{switch(t.action){case"switch_danmu":null==n||n.liveDanmakuBtnClickEvent(!t.isOpen,e.logObj);break;case"switch_play_pause":null==n||n.livePlayBtnClickEvent(!t.paused,e.logObj);break;case"switch_fullscreen":null==n||n.liveFullScreenBtnEvent(t.fullscreen,e.logObj)}},[e.logObj]);return(0,i.useEffect)(()=>(null==t||t.on(l.FP.USER_ACTION,a),()=>{null==t||t.off(l.FP.USER_ACTION,a)}),[a]),null}},85961:function(e,n,t){t.r(n),t.d(n,{RefreshPlugin:function(){return y},default:function(){return P},RefreshPluginWrap:function(){return I}});var i=t("320165"),o=t("629686"),r=t("402748"),l=t("101199");let a=(0,l.forwardRef)((e,n)=>(0,i.jsx)("svg",(0,r._)((0,o._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:(0,i.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"})})));var u=t("631979"),s=t("160197"),d=t("243970"),c=t("502615"),_=t("417768"),v=t("542901"),m=t("144861"),f=t("350856"),p=t.n(f),h=t("964591"),g=t("762080"),E=t("26333");function y(e){let{eventStore:{playerEvent:n}}=(0,v.o)(),{player:t}=(0,s.n)(),{playerCoverText:o}=e,r=p()(()=>{window.location.reload()},200),{Icon:d}=e,c=(0,l.useCallback)(()=>{var i;if(o&&o===u.kx.KICK_OUT){r();return}null==t||t.emit(u.Cw.REFRESH),null==t||t.retry(),null==n||null===(i=n.liveRefreshBtnClickEvent)||void 0===i||i.call(n,e.logObj)},[n,o,t]),f=()=>!1;return(0,l.useEffect)(()=>{let e=e=>{var n,t;if(f())return;let i=null==e?void 0:null===(n=e.target)||void 0===n?void 0:n.tagName;if("INPUT"!==i&&"TEXTAREA"!==i&&(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.contentEditable)!=="true")(null==e?void 0:e.code)==="KeyR"&&!(e.shiftKey||e.metaKey||e.ctrlKey)&&c()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[c,!1,!1,f]),(0,i.jsx)(_.Z,{content:(0,i.jsx)(m.Z,{btn:"R",info:"刷新"}),children:(0,i.jsx)("div",{onClick:c,style:{position:"relative",bottom:-1},children:d?(0,i.jsx)(d,{}):(0,i.jsx)(a,{})})})}let I=(0,h.Pi)((0,d.rW)(y));var P=(0,h.Pi)(()=>{let{roomStore:{playerCoverText:e,roomStatus:n},linkmicStore:{linkStatus:t}}=(0,v.o)(),{isLivingPip:o}=(0,E.ds)();return o||t===g.cK.LINKED||n===g.LV.END?null:(0,i.jsx)(I,{props:{playerCoverText:e},position:c.PZ.CONTROL_LEFT,index:1})})},347751:function(e,n,t){t.r(n),t.d(n,{VolumeWheel:function(){return g},default:function(){return E}}),t("104882"),t("527553"),t("706056");var i=t("320165"),o=t("502615"),r=t("243970"),l=t("845975"),a=t("101199"),u=t("795653"),s=t("499059"),d=t("26333"),c=t("694385"),_=t("629686"),v=t("402748");let m=(0,a.forwardRef)((e,n)=>(0,i.jsxs)("svg",(0,v._)((0,_._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:[(0,i.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,i.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"})]}))),f=(0,a.forwardRef)((e,n)=>(0,i.jsxs)("svg",(0,v._)((0,_._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:[(0,i.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,i.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,n)=>{if(!(null==e?void 0:e.current))return;let t=e.current;if(t.muted){t.muted=!1,t.volume="up"===n?.05:0;return}let i="up"===n?t.volume+.05:t.volume-.05;i=Math.max(i=Math.min(i,1),0),t.volume=Number(i.toFixed(2)),0===i&&(t.muted=!0)},h=(e,n)=>{if(!(null==e?void 0:e.current))return;let t=e.current;if(t.muted){t.muted=!1,t.volume=Math.max(n/100,0);return}let i=t.volume+n/100;i=Math.max(i=Math.min(i,1),0),t.volume=Number(i.toFixed(2)),0===i&&(t.muted=!0)},g=(0,r.nl)(e=>{let{isActive:n,index:t,defaultIcon:r}=e,{playerRef:d,el:_}=(0,a.useContext)(o.ET),v=(0,a.useRef)(null);return(0,a.useEffect)(()=>{var e;if(!n)return;let t=null==_?void 0:_.querySelector(".douyin-player-volume"),i=null==_?void 0:_.querySelector(".douyin-player-volume-slider"),o=e=>{let n=(0,u.Q5)();e.stopPropagation(),e.preventDefault();let t=(n?1:-1)*parseInt(String(e.deltaY/20),10);0!==t&&h(d,t)},r=e=>{let{code:n}=e;if(s.Le.getConfig(s.gI.DisableNextPre)&&["ArrowUp","ArrowDown"].includes(e.code)){e.stopPropagation(),e.preventDefault(),"ArrowUp"===e.code?p(d,"up"):"ArrowDown"===e.code&&p(d,"down");return}let t=e.target,i=null==t?void 0:t.tagName;if("INPUT"!==i&&"TEXTAREA"!==i&&(null==t?void 0:t.contentEditable)!=="true"){if(e.shiftKey&&("Equal"===n||"Minus"===n)){var o,r;null===(o=v.current)||void 0===o||o.focus(),"Equal"===n?p(d,"up"):p(d,"down"),null===(r=v.current)||void 0===r||r.blur()}}},l=()=>{s.Le.setConfig(s.gI.DisableNextPre,!0)},a=()=>{s.Le.setConfig(s.gI.DisableNextPre,!1)},c=e=>{e.stopPropagation()};return null==t||t.addEventListener("wheel",o),null==t||t.addEventListener("mouseover",l),null==t||t.addEventListener("mouseout",a),null===(e=document)||void 0===e||e.addEventListener("keydown",r),null==i||i.addEventListener("pointerdown",c),()=>{var e;null==t||t.removeEventListener("wheel",o),null==t||t.removeEventListener("mouseover",l),null==t||t.removeEventListener("mouseout",a),null===(e=document)||void 0===e||e.removeEventListener("keydown",r),null==i||i.removeEventListener("pointerdown",c)}},[n]),(0,i.jsx)(l.dm,{ref:v,index:t,props:{IconVolume:r?void 0:c.Z,IconVolumeSmall:r?void 0:m,IconVolumeMuted:r?void 0:f,showVolume:!0}})});var E=()=>{let{isLivingPip:e}=(0,d.ds)();return(0,i.jsx)(g,{isActive:!0,position:e?0:1,index:e?2:4})}},958335:function(e,n,t){t.d(n,{Z:function(){return g},F:function(){return h}});var i=t("320165"),o=t("101199"),r=t("980981"),l=t("542901"),a=t("198412"),u=t.n(a),s=t("964591"),d=t("629686"),c=t("402748");let _=(0,o.forwardRef)((e,n)=>(0,i.jsx)("svg",(0,c._)((0,d._)({width:26,height:26,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:(0,i.jsx)("path",{d:"M3.373 20.11v-2.502h-1.75v2.502a4.265 4.265 0 0 0 4.266 4.266h2.502v-1.75H5.89a2.519 2.519 0 0 1-2.516-2.516zM20.11 1.624h-2.502v1.75h2.502a2.519 2.519 0 0 1 2.516 2.516v2.5h1.75v-2.5a4.265 4.265 0 0 0-4.266-4.266zM3.373 5.89A2.518 2.518 0 0 1 5.89 3.374h2.502v-1.75H5.89A4.265 4.265 0 0 0 1.623 5.89v2.5h1.75v-2.5zm19.253 14.22a2.519 2.519 0 0 1-2.516 2.516h-2.502v1.75h2.502a4.265 4.265 0 0 0 4.266-4.266v-2.502h-1.75v2.502zM1.623 12.134h22.753v1.731H1.623v-1.732z",fill:"#fff"})})));var v=t("469935"),m=t.n(v),f=t("536793");let p=o.createRef(),h=()=>p;var g=(0,s.Pi)(function(e){let{className:n,qrcode:t,avatar:a}=e,{roomStore:{notSupportReason:s,roomInfo:d},eventStore:{playerEvent:c}}=(0,l.o)(),v=(0,f.T)(),h=1===Number(null==v?void 0:v.liveAppDiversion),g=u()(d,"web_rid"),E=o.useRef(!1);return(0,o.useEffect)(()=>{if(g){var e;null==c||null===(e=c.liveAppOnlyEvent)||void 0===e||e.call(c,s)}},[s,g]),(0,o.useEffect)(()=>{var e;if(!!h&&!!g&&!E.current)null==c||null===(e=c.livesdkLiveproGuideComponentShow)||void 0===e||e.call(c,{request_source:"cant_live_play"}),E.current=!0},[h,c,g]),(0,i.jsx)("div",{className:m()(r.Z.app_only,n,{[r.Z.app_only_diversion]:h}),style:{backgroundImage:`url("${a}")`},ref:p,children:(0,i.jsxs)("div",{className:r.Z.content,children:[(0,i.jsx)("p",{className:m()(r.Z.toast,{[r.Z.toast_diversion]:h}),children:h?"该直播玩法电脑端暂未支持":"该直播类型或玩法电脑端暂未支持"}),!h&&(0,i.jsx)("p",{className:r.Z.toast,children:"请先在手机上查看吧"}),(0,i.jsxs)("p",{className:m()(r.Z.guide,{[r.Z.guide_diversion]:h}),children:[(0,i.jsx)(_,{className:r.Z.scan_icon}),h?"扫码下载「抖音直播伴侣APP」,在手机上继续观看":"打开抖音,扫一扫"]}),(0,i.jsx)("img",{className:m()(r.Z.qrcode,{[r.Z.qrcode_diversion]:h}),src:t,alt:""})]})})})},651884:function(e,n,t){t.r(n),t.d(n,{getEnlargeShowTypeParams:function(){return eu},default:function(){return ed},getFunctionType:function(){return el},LinkMicLayoutPlugin:function(){return es},getLayoutParams:function(){return ea}}),t("706056");var i=t("320165"),o=t("964591"),r=t("629686"),l=t("402748");t("490629"),t("374954"),t("932651"),t("679308"),t("88856");var a=t("181159"),u=t("762080"),s=t("22496"),d=t("991879"),c=t("121422"),_=t("764283"),v=t("473682"),m=t("589864"),f=t("494857"),p=t("825795"),h=t("885163"),g=t("282621"),E=t("788287"),y={TPYE_MESSAGE_UNKNOWN:0,0:"TPYE_MESSAGE_UNKNOWN",TYPE_MESSAGE_CREATE:1,1:"TYPE_MESSAGE_CREATE",TYPE_MESSAGE_FINISH:2,2:"TYPE_MESSAGE_FINISH",TYPE_MESSAGE_SING_ACTION_TOAST:3,3:"TYPE_MESSAGE_SING_ACTION_TOAST",TYPE_MESSAGE_SING_ACTION:4,4:"TYPE_MESSAGE_SING_ACTION",TYPE_MESSAGE_MV_ACTION:5,5:"TYPE_MESSAGE_MV_ACTION",TYPE_MESSAGE_AI_LYRICS:6,6:"TYPE_MESSAGE_AI_LYRICS"},I=t("950257"),P=t("110798"),L=t("160197"),N=t("67868"),C=t("229757"),S=t.n(C),T=t("198412"),b=t.n(T),A=t("130579"),k=t.n(A),R=t("347752"),w=t.n(R),O=t("350856"),x=t.n(O),M=t("156674"),D=t.n(M),j=t("795233"),V=t.n(j),U=t("101199"),G=t("970359"),F=t("907208"),Y=t("542901"),Z=t("396868"),K=t("752150"),B=t("618759"),W=t("118003"),H=t("958335"),q=t("484002"),z=t("170242"),$=t("110934"),Q=t("19058"),J=t("195992"),X=t("684864");let ee=!1,en=x()(function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];Z.F.info(...n)},1e3);var et=e=>{let{isVerifyed:n}=e,{isLiveModal:t,linkmicStore:{setFloatModal:i,imLinkMicLayout:o,linkMicConfig:C,linkMicLayout:T,seiLinkMicLayout:A,setEnlargeSeatApplyUid:R,setEnlargeSeatImage:O,setEnlargeGuestType:x,teamfightInfo:M,setIsPlayModeNotSupport:j,isSing:et,linkRoomType:ei,sceneNum:eo,setSceneNum:er,playModes:eu,playModesPC:es,setPlayModes:ed,setTeamfightInfo:ec,guestBattleInfo:e_,setGuestBattleInfo:ev,orderSingInfo:em,setOrderSingInfo:ef,updateLinkMicConfig:ep,linkMicSeats:eh,linkMicSeatsRaw:eg,setImLinkMicSeats:eE,setSeiLinkMicSeats:ey,setLinkStatus:eI,setImLinkMicLayout:eP,setUiLayout:eL,setSeiLinkMicLayout:eN,setOtherRoomLinkSilenceStatus:eC,linkStatus:eS,setLinkMicConfig:eT,selfLinkMicId:eb,resetStore:eA,setOrderSingUserScore:ek,dressListInfo:eR,setDressListInfo:ew,linkMicLayout:eO,setLinkMicSettings:ex,dressMvpInfo:eM,setDressMvpInfo:eD,dressListAll:ej,layoutConfig:eV,setAgcAnchor:eU,setEggModeInfo:eG,functionType2:eF,setIsCrossLink:eY,setCrossLinkTimerStart:eZ,crossLinkTimerStart:eK,isCrossLink:eB,setRoomBattleType:eW,uiLayout:eH,setOpenUiLayout:eq,setAsrSubtitle:ez,lastLayout:e$,setLastLayout:eQ,setShowGiftInfo:eJ,linkmicVideoEqualLayoutFrameOpt:eX,setLinkmicVideoEqualLayoutFrameOpt:e0},roomStore:{roomInfo:e1,setNotSupportReason:e2},userStore:{userInfo:e9},singletonStore:{message:e6,audioPower:e3},eventStore:{linkmicEvent:e5}}=(0,Y.o)(),{player:e4}=(0,L.n)(),e8=U.useRef(eK);U.useEffect(()=>{eZ(e8.current||0)},[e8.current]);let{leave:e7}=(0,G.Z)(),{isGuestBattle:ne}=(0,z.Z)(),{isGroupFight:nn,isRoomBattle:nt}=(0,$.Z)();b()(e1,"room.linker_map",{});let ni=U.useRef(!1),no=U.useRef({}),nr=U.useRef({}),nl=U.useRef(),na=U.useRef({}),nu=U.useRef(void 0);U.useRef([]);let ns=U.useRef(void 0),nd=U.useRef(void 0),nc=U.useRef(void 0),n_=U.useRef(""),nv=(0,F.hN)(null==e9?void 0:e9.id_str,null==e9?void 0:e9.webcast_uid),nm=U.useCallback(()=>eg,[eg]);U.useEffect(()=>{nc.current=eh},[eh]),U.useEffect(()=>{n_.current=eF},[eF]);let nf=U.useCallback((e,n)=>{let t=[];return null==e||e.map(e=>{!(null==n?void 0:n.some(n=>(null==n?void 0:n.linkmic_id_str)===(null==e?void 0:e.linkmic_id_str)))&&t.push(e)}),t},[]),np=U.useCallback(()=>{var e;return eb&&nl.current?(0,l._)((0,r._)({},null!==(e=nr.current)&&void 0!==e?e:{}),{[eb]:nl.current}):nr.current},[eb]),nh=U.useCallback(()=>na.current,[]),ng=U.useCallback(e=>{eN(e)},[eN]);(0,P.wz)({selfLinkMicId:eb,setLayout:ng,setSeats:ey,layout:A,getUsers:np,getPositions:nh,getSeats:nm,enable:!0,roomIdStr:e1.roomId,audioPower:e3,linkRoomType:ei,uiLayout:eH,setUiLayout:eL,linkStatus:eS});let nE=U.useCallback(e=>{let n=void 0===e?o:e;void 0===n&&eH===a.V_.LINKMICUILAYOUT_LIVE_PARTNER_DYNAMIC&&(n=I.yP.MATE_CUSTOM);let t=S()(f.Fk);return n===I.yP.VIDEO_DYNAMIC||n===I.yP.MATE_CUSTOM?t={}:n===I.yP.AUDIO_DOUBLE_C&&(t=(0,P.Lq)(10)),Object.values(no.current).forEach(e=>{"number"==typeof e.user_position&&(t[e.user_position]={idx:e.user_position,user:e})}),Object.keys(na.current).forEach(e=>{na.current[e]&&(t[e].info=(0,r._)({},na.current[e]))}),1===Object.keys(t).length&&n===I.yP.VIDEO_DYNAMIC&&(t[1]={idx:1}),n===I.yP.AUDIO_DOUBLE_C&&9===Object.keys(t).length&&(t[9]={idx:9}),t},[o,eH]),ny=U.useCallback(e=>{let{listUsers:n,type:t,linkUsers:i,version:l}=e,a=void 0===t?o:t,u=(e,n)=>{let t={};return e.forEach(e=>{var i,o,r,l,u,s;if(e&&"number"==typeof e.user_position&&("number"!=typeof e.is_background&&(e.is_background=Number(e.is_background)),null===(o=e.content)||void 0===o?void 0:null===(i=o.linkmic_audience_content)||void 0===i?void 0:i.rank_contributor_ids)){let n=null===(l=e.content)||void 0===l?void 0:null===(r=l.linkmic_audience_content)||void 0===r?void 0:r.rank_contributor_ids;n[0],n&&(e.content.linkmic_audience_content.rank_contributor_ids=n)}e&&e.linkmic_id_str&&((0,F.ps)(e.user),nv&&(null===(u=e.user)||void 0===u?void 0:u.id_str)===nv&&(nl.current=e),e.user_position=Number(null!==(s=null==e?void 0:e.user_position)&&void 0!==s?s:0),a===I.yP.VIDEO_6V6&&!n&&(e.user_position=e.user_position+I.Lf[a]),t[e.linkmic_id_str]=e)}),a===I.yP.VIDEO_6V6&&0===Object.keys(t).length&&Object.keys(no.current).forEach(e=>{var i,o;let r=null==no?void 0:no.current[e];n&&(null!==(i=null==r?void 0:r.user_position)&&void 0!==i?i:0)<I.Lf[a]?t[e]=r:!n&&(null!==(o=null==r?void 0:r.user_position)&&void 0!==o?o:0)>=I.Lf[a]&&(t[e]=r)}),t},s=u(null!=n?n:[],!0),d=a===I.yP.VIDEO_6V6?u(null!=i?i:[],!1):[],c=(0,r._)({},s,d);nr.current=Object.assign({},nr.current,no.current,c),no.current=c;let _=nE(a);return eE(_,l),_},[eE,nE,e9,o]),nI=U.useCallback(e=>{let n={};return null==e||e.forEach(e=>{void 0!==e.key&&void 0!==e.value&&(n[e.key]=e.value)}),n},[]),nP=U.useMemo(()=>0!==D()(eh).filter(e=>!!(null==e?void 0:e.user)).length,[eh]);U.useEffect(()=>{nu.current=o},[nP]);let nL=U.useMemo(()=>w()(eh).filter(e=>e.user).length,[eh]);U.useEffect(()=>{"1"===eX&&X.qK.includes(T)?e4.position((0,J.PS)(T,nL)):T===I.yP.AUDIO_1V8||T===I.yP.AUDIO_GRID||T===I.yP.VIDEO_GRID||T===I.yP.VIDEO_DYNAMIC?e4.position({y:.203,h:.5}):T===I.yP.VIDEO_6V6?e4.position({y:.183,h:.52}):[T===I.yP.VIDEO_1V6,T===I.yP.VIDEO_1V8,T===I.yP.VIDEO_1_V_8].some(Boolean)?e4.position({y:1-.7375,h:.7375}):T===I.yP.VIDEO_DYNAMIC_FLOAT||T===I.yP.MATE_CUSTOM?e4.position({y:0,h:1}):T===I.yP.VIDEO_1_V_6?e4.position({y:.203,h:.5}):T===I.yP.VIDEO_1_V_3?e4.position({y:.203,h:.5}):T===I.yP.VIDEO_T1_V_B8?e4.position({y:.11,h:.7375}):T===I.yP.VIDEO_2V4V4&&e4.position({y:.203,h:.625})},[T,eX,nL]);let nN=(0,W.Z)();U.useEffect(()=>{if((null==nN?void 0:nN.data)&&(null==nN?void 0:nN.status_code)===0){var e;let{teamfight_info:n,guest_battle_info:t,linkmic_play_mode_info:i}=null==nN?void 0:nN.data,r=n||(null==i?void 0:i.teamfight_info);r&&ec(r);let l=t||(null==i?void 0:i.guest_battle_info);l&&ev(l),i&&eJ((null==i?void 0:null===(e=i.order_sing_info)||void 0===e?void 0:e.show_gift_info)||!1),o===I.yP.VIDEO_6V6&&(null==e5||e5.liveAudiencePlayModeRoomEvent(nu.current))}},[nN]),U.useEffect(()=>{var e;let n=null!==(e=null==e_?void 0:e_.dress_id)&&void 0!==e?e:"",t=(null==M?void 0:M.dressId)||(null==M?void 0:M.dress_id)||"";if(n!==(null==eR?void 0:eR.dress_id)&&""!==n){let e=ej.find(e=>e.dress_id===n);e?ew(e):(0,d.VT)({dress_id:n}).then(e=>{var n,t,i,o;if(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.data){let n=null!==(o=null==e?void 0:null===(i=e.data)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.dress_list)&&void 0!==o?o:[];n.length&&ew(n[0])}})}if(t!==(null==eM?void 0:eM.dress_id)&&""!==t){let e=ej.find(e=>e.dress_id===t);e?eD(e):(0,d.VT)({dress_id:e}).then(e=>{var n,t,i,o;if(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.data){let n=null!==(o=null==e?void 0:null===(i=e.data)||void 0===i?void 0:null===(t=i.data)||void 0===t?void 0:t.dress_list)&&void 0!==o?o:[];n.length&&eD(n[0])}})}},[null==e_?void 0:e_.battle_id_str,M]);let nC=U.useCallback(async()=>{var e,n,t,i,a,u,s,c,_,v,m,f;let h=b()(e1,"roomId",""),g=(0,F.Cf)(b()(e1,"anchor.sec_uid","")),E=(0,F.hN)(b()(e1,"anchor.id_str",""),b()(e1,"anchor.webcast_uid","")),y=b()(e1,"room.AnchorABMap.live_linkmic_order_sing_micro_opt","");e0(b()(e1,"room.AnchorABMap.linkmic_video_equal_layout_frame_opt","0"));let[P,L]=await Promise.all([(0,d.lx)({room_id:h,anchor_id:E}),(0,d.$s)(h,g)]);if(L.data&&0===L.status_code){let o=nI(null===(e=L.data)||void 0===e?void 0:e.settings),s=(0,l._)((0,r._)({},L.data),{config:o});eT(s);let d=(s.settings||[]).find(e=>e.key===p.V9.AU_AudioSubtitle);d&&ez({isOpen:(null==d?void 0:null===(t=d.content)||void 0===t?void 0:null===(n=t.audio_subtitle_content)||void 0===n?void 0:n.audio_subtitle_value)===1,type:(null==d?void 0:null===(u=d.content)||void 0===u?void 0:null===(a=u.audio_subtitle_content)||void 0===a?void 0:null===(i=a.linkmic_subtitle_status)||void 0===i?void 0:i.subtitle_type)||N.rFD.SubtitleType_Room})}if(P.data.data&&0===P.data.status_code){let{user:e,locked_positions:n,linker_content_map:t,linker_base_info:i={}}=P.data.data,{scene:r,play_modes:l=[],cross_link_timer_start:a}=i;if(16!==r||l.map(e=>Number(e)).includes(16)?16===r&&l.map(e=>Number(e)).includes(16)&&a&&(eY(!0),eW("pk"),e8.current=Number(a)):(eY(!0),eW("crossLink"),e8.current=Number(a||Math.floor(Date.now()/1e3))),null==n||n.forEach(e=>{void 0!==e.position&&(na.current[e.position]=e)}),o===I.yP.VIDEO_6V6){let e=null==t?void 0:null===(_=t[null===(v=Object.keys(t))||void 0===v?void 0:v[0]])||void 0===_?void 0:_.room_link_silence_status;void 0!==e&&eC(e)}ny({listUsers:e,type:o,linkUsers:null==t?void 0:null===(s=t[null===(c=Object.keys(t))||void 0===c?void 0:c[0]])||void 0===s?void 0:s.linked_users})}if(eu.includes(N.V0x.LinkmicPlayMode_OrderSing)){let[e,n]=await Promise.all([(0,d.RO)({room_id:h}),(0,K.ZP)({service_name:"webcast.douyin.live_pc",key:"order_sing_info"})]);if(e.data.data&&0===e.data.status_code){let t=e.data.data;t.live_linkmic_order_sing_micro_opt=y,t.golden_microphone_icon=null==n?void 0:n.golden_microphone_icon,t.silver_microphone_icon=null==n?void 0:n.silver_microphone_icon,t.user_microphone_list=null!==(f=null===(m=e.data.data.user_microphone_list)||void 0===m?void 0:m.map(e=>{var n,t,i;return(null===(t=null==e?void 0:null===(n=e.microphone_list)||void 0===n?void 0:n.length)||void 0===t||t)&&(e.microphone_list=[...null!==(i=e.microphone_list)&&void 0!==i?i:[],{microphone_type:N.W5X.GOLDEN_MICROPHONE,micro_phone_num:0}]),e}))&&void 0!==f?f:[],ef(t),null==e5||e5.liveAudiencePlayModeRoomEvent(nu.current,"request_song")}}(0,K.ZP)({service_name:"webcast.douyin.live_pc",key:"agc_anchor_list"}).then(e=>{e&&(null==e?void 0:e.includes(E))&&eU(!0)})},[ny,e1,eT,o,nI,eC,eu,ef,eU,eY,eW,e0]);U.useEffect(()=>{!ni.current&&(nC(),ni.current=!0)},[nC]);let nS=(0,H.F)(),nT=U.useRef(eS);U.useEffect(()=>{nT.current=eS},[eS]),U.useEffect(()=>e6.syncOn("ControlMessage",e=>{let{method:n,payload:t}=e;if(!!n&&!!t)switch(Number(t.action)){case u.Rz.FINISH:case u.Rz.FINISH_BY_ADMIN:case u.Rz.ROOM_FINISH_BY_SWITCH:_.kg.info("直播间断播消息下发, 离开聊天室"),ee=!0,e7(s.JW.NONE,s._o.ANCHOR).finally(()=>{null==e5||e5.liveLinkMicDurationEvent(nu.current),null==e5||e5.liveVoiceRoomLayoutWatchDuration(ea(nu.current,(0,q.ic)(nc.current)),el(nu.current,n_.current)),(0,f.SH)(o,es)?(null==e5||e5.liveAudiencePlayModeRoomWatchDurationEvent(nu.current,ns.current),eS===f.cK.LINKED&&(null==e5||e5.liveAudiencePlayModeRoomLinkDurationEvent(void 0,ns.current)),eS===f.cK.LINKED&&(null==e5||e5.liveLeaveLinkMicEvent(s.JW.NONE,s._o.ANCHOR,ns.current))):(ne||nn||nt)&&(null==e5||e5.liveLeaveLinkMicEvent(s.JW.NONE,s._o.ANCHOR),null==e5||e5.liveAudiencePlayModeRoomWatchDurationEvent()),eA()})}}),[e7,eA,es,o,eS,n,e6,e5]),U.useEffect(()=>null==e6?void 0:e6.syncOn("MemberMessage",e=>{let{method:n,payload:i}=e;if(!n||!i)return;let r=Number(i.action);switch(r){case u.WU.KICK_OUT:case u.WU.BLOCK:case u.WU.LEAVE:if(r===u.WU.LEAVE&&(null==i?void 0:i.action_description)==="WEB_INITIATIVE"||r===u.WU.LEAVE&&t)return;_.kg.info("直播间用户被踢出, 离开聊天室"),e7(s.JW.NONE,s._o.ANCHOR).finally(()=>{null==e5||e5.liveLinkMicDurationEvent(nu.current),null==e5||e5.liveVoiceRoomLayoutWatchDuration(ea(nu.current,(0,q.ic)(nc.current)),el(nu.current,n_.current)),(0,f.SH)(o,es)&&(null==e5||e5.liveAudiencePlayModeRoomWatchDurationEvent(nu.current,ns.current)),eA()})}}),[e7,eA,T,es,o,n,e6,e5,t]),U.useEffect(()=>e6.syncOn("NoticeMessage",e=>{let{method:n,payload:t}=e;if(!!n&&!!t){if(Number(t.notice_type)===u.F3.PAUSE)_.kg.info("直播间被封禁, 离开聊天室"),e7(s.JW.NONE,s._o.ANCHOR).finally(()=>{null==e5||e5.liveLinkMicDurationEvent(nu.current),null==e5||e5.liveVoiceRoomLayoutWatchDuration(ea(nu.current,(0,q.ic)(nc.current)),el(nu.current,n_.current)),(0,f.SH)(o,es)&&(null==e5||e5.liveAudiencePlayModeRoomWatchDurationEvent(nu.current,ns.current)),eA()})}}),[n]),U.useEffect(()=>e6.syncOn("LinkSettingNotifyMessage",e=>{let{method:n,payload:t}=e;if(!n||!t)return;null==t||t.message_type;let{settings:i}=t;(null==i?void 0:i.find(e=>24===e.value))?o!==I.yP.AUDIO_1V8_STAGE&&eP(I.yP.AUDIO_1V8):(null==i?void 0:i.find(e=>26===e.value))&&eP(I.yP.AUDIO_GRID);try{if(null==i?void 0:i.find(e=>72===e.key)){var r,l;let e=D()(C.settings).findIndex(e=>72===e.key),n=null==i?void 0:i.find(e=>72===e.key);if(e>=0&&Array.isArray(C.settings)&&e<(null===(r=C.settings)||void 0===r?void 0:r.length)){let t=null===(l=C.settings)||void 0===l?void 0:l.slice();t[e]=(0,c._0)(n),ex(t)}}}catch(e){_.kg.info("处理嘉宾大作战设置消息变更异常",e)}ep(nI(i))}),[n,nI,null==C?void 0:C.settings,eP,o,ex,ep]);let nb=U.useCallback((e,n,t)=>{(null==e9?void 0:e9.isReady)&&(0,m.Qz)({anchor_id:(0,F.hN)(b()(e1,"anchor.id_str",""),b()(e1,"anchor.webcast_uid","")),room_id:null==e1?void 0:e1.roomId,user_id:nv,scene:e,playmode:n,ui_layout:t})},[e1,e9]);U.useEffect(()=>e6.syncOn("LinkMicMethod",e=>{let{method:n,payload:t}=e;if(!!n&&!!t)switch(Number(t.message_type)){case g.iM.TYPE_KICKOUTED:Z.F.info("你的连线已被断开"),e7(s.JW.NONE,s._o.ANCHOR).finally(()=>{eI(f.cK.NOT_LINK)});break;case g.iM.TYPE_SWITCH_SCENE:let i;let{scene:r,play_modes:l=[],linked_list_users:a=[],linker_content_map:d={},ui_layout:_}=t;if(eL(_),"string"==typeof r){let e=Number(r);if(er(e),eB&&16!==e&&(eY(!1),e8.current=0,eC(void 0)),!eB&&16===e&&e8.current>0&&(eY(!0),eW("crossLink")),e===u.vX.AUDIO_KTV)j(!0),e2(u.Ly.MULTI_KTV),nb(e,l,_);else{let e=Number(_);i=(0,v.M2)(e,eV)}void 0!==i&&eP(i)}if((i=void 0===i?o:i)===I.yP.VIDEO_6V6){var m,p;let e=null===(p=Object.values(d))||void 0===p?void 0:null===(m=p[0])||void 0===m?void 0:m.linked_users,n=nf(a,e);ny({listUsers:null==n?void 0:n.map(c._0),type:i,linkUsers:null==e?void 0:e.map(c._0)})}else ny({listUsers:null==a?void 0:a.map(c._0),type:i,version:null==t?void 0:t.version});break;case g.iM.TYPE_LINKED_LIST_CHANGED:let h=Number(null==t?void 0:t.ui_layout),E=(0,v.M2)(h,eV);eL(null==t?void 0:t.ui_layout),void 0!==E&&eP(E);case g.iM.TYPE_FINISH:}}),[nS,nf,o,eS,null==e4?void 0:e4.root,eV,eP,j,e2,er,ny,e7,eI,n,eB,eW]),U.useEffect(()=>e6.syncOn("LinkMessage",e=>{var n,t,i,r,l,a,u,d,m,p,g,E,y,P,L,N,C,S,T,b,A,k,M;let{method:D,payload:j}=e;if(!!D&&!!j)switch(Number(j.message_type)){case h.W6.TYPE_LINKER_CLOSE:!ee&&e7(s.JW.NONE,s._o.ANCHOR).finally(()=>{null==e5||e5.liveAudiencePlayModeRoomWatchDurationEvent(void 0,ns.current),null==e5||e5.liveLinkMicDurationEvent(nu.current,ns.current),null==e5||e5.liveVoiceRoomLayoutWatchDuration(ea(nu.current,(0,q.ic)(nc.current)),el(nu.current,n_.current)),eS===f.cK.LINKED&&(null==e5||e5.liveAudiencePlayModeRoomLinkDurationEvent(void 0,ns.current)),eS===f.cK.LINKED&&(null==e5||e5.liveLeaveLinkMicEvent(s.JW.NONE,s._o.ANCHOR,ns.current)),eA()});break;case h.W6.TPYE_LINKER_LEAVE:ny({listUsers:null===(t=j.leave_content)||void 0===t?void 0:null===(n=t.linked_users)||void 0===n?void 0:n.map(c._0),version:null==j?void 0:null===(i=j.leave_content)||void 0===i?void 0:i.version});break;case h.W6.TPYE_LINKER_ENTER:ny({listUsers:null==j?void 0:null===(l=j.enter_content)||void 0===l?void 0:null===(r=l.linked_users)||void 0===r?void 0:r.map(c._0),version:null==j?void 0:null===(a=j.enter_content)||void 0===a?void 0:a.version}),nv&&(0,F.hN)(null===(u=j.enter_content)||void 0===u?void 0:u.user_id)===nv&&eE(nE());break;case h.W6.TYPE_LINKER_UPDATE_USER:ny({listUsers:null===(m=j.update_user_content)||void 0===m?void 0:null===(d=m.linked_users)||void 0===d?void 0:d.map(c._0),version:null==j?void 0:null===(p=j.update_user_content)||void 0===p?void 0:p.version});break;case h.W6.TPYE_LINKER_SYS_KICK_OUT:case h.W6.TPYE_LINKER_KICK_OUT:_.kg.info("接收被踢出房间,更新上麦状态"),e7(s.JW.NONE,s._o.ANCHOR).finally(()=>{eI(f.cK.NOT_LINK)});break;case h.W6.TYPE_LINKER_LOCK_POSITION:let{locked_positions:V}=j.lock_position_content;na.current={},null==V||V.forEach(e=>{if("string"==typeof e.position){let n=Number(e.position);e.position=n,na.current[n]=e}else"number"==typeof e.position&&(na.current[e.position]=e)}),eE(nE());break;case h.W6.TYPE_LINKER_LINKED_LIST_CHANGE:o===I.yP.VIDEO_6V6?ny({listUsers:void 0,type:o,linkUsers:null===(y=Object.values(null===(P=j.linked_list_change_content)||void 0===P?void 0:P.linker_content_map))||void 0===y?void 0:null===(E=y[0])||void 0===E?void 0:null===(g=E.linked_users)||void 0===g?void 0:g.map(c._0)}):ny({listUsers:null===(N=j.linked_list_change_content)||void 0===N?void 0:null===(L=N.linked_users)||void 0===L?void 0:L.map(c._0),version:null===(C=j.linked_list_change_content)||void 0===C?void 0:C.version});break;case h.W6.TYPE_LINKER_CROSS_ROOM_UPDATE:let{linker_content_map:U}=j.cross_room_update_content;eC(null===(T=Object.values(U))||void 0===T?void 0:null===(S=T[0])||void 0===S?void 0:S.room_link_silence_status);break;case h.W6.TYPE_ENLARGE_GUEST_INVITE:R(null==j?void 0:null===(b=j.enlarge_guest_invite_content)||void 0===b?void 0:b.from_user_id),O(((null==j?void 0:null===(k=j.enlarge_guest_invite_content)||void 0===k?void 0:null===(A=k.ui_image)||void 0===A?void 0:A.url_list)||[])[0]||""),x((null==j?void 0:null===(M=j.enlarge_guest_invite_content)||void 0===M?void 0:M.target_enlarge_guest_type)||0);break;case h.W6.TYPE_LINKER_UILAYOUT_CHANGE:let{ui_layout:G}=null==j?void 0:j.linker_ui_layout_change_content,Y=Number(G);eL(Y),eP((0,v.M2)(Y,eV));break;case h.W6.TYPE_LINKER_CROSS_LINK_INFO_UPDATE:let{cross_link_info_update:K={}}=j,{cross_link_timer_start:B=Math.floor(Date.now()/1e3)}=K;e8.current=Number(B),eB?eW("crossLink"):16===eo&&(eY(!0),eW("crossLink"));break;case h.W6.TYPE_LINKER_CROSS_LINK_FINISH:let{cross_link_finish:W={}}=j,H=w()(eh),z=null==H?void 0:H.includes(nv),{finish_toast:$="",guest_finish_toast:Q=""}=W;eB&&(eY(!1),e8.current=0,eC(void 0),z&&Q?Z.F.info(Q,e4.root):$&&Z.F.info($,e4.root))}}),[n,R,o,ny,eI,e7,eA,nE,eE,eS,eP,eC,e9,eV,eB,eY,eW,eh,null==e4?void 0:e4.root,eo]),U.useEffect(()=>e6.syncOn("LinkerContributeMessage",e=>{let{method:n,payload:t}=e;if(!n||!t)return;null==t||t.message_type;let{total_score_str:i,total_score_real_str:o,user_contribute_list:r,user_id:l}=t,a=(null==r?void 0:r.map(e=>String(null==e?void 0:e.user_id)))||[],u=String(l),s=Object.keys(no.current).find(e=>{var n;return(null===(n=no.current[e].user)||void 0===n?void 0:n.id_str)===u});if(s&&no.current[s]){var d;let e=null===(d=no.current[s].content)||void 0===d?void 0:d.linkmic_audience_content;e&&(e.rank_contributor_ids=a,e.fan_ticket_real_str=o,e.fan_ticket_fuzzy_str=i)}eE(nE())}),[nE,eE,n]),U.useEffect(()=>e6.syncOn("LinkmicTeamfightScoreMessage",e=>{let{method:n,payload:t}=e;if(!n||!t)return;null==t||t.message_type;let{teamfight_info:i}=t,o=(0,c._0)(i);ns.current=M,ec(o,!0)}),[ec,M]),U.useEffect(()=>e6.syncOn("LinkmicTeamfightMessage",e=>{var n,t,i,r,l;let{method:a,payload:u}=e;if(!a||!u)return;let{teamfight_info:s,finish_content:d,settle_content:_}=u,v=(0,c._0)(s),m=k()(null==s?void 0:null===(n=s.team_infos)||void 0===n?void 0:n.map(e=>{var n;return null==e?void 0:null===(n=e.players)||void 0===n?void 0:n.map(e=>String(null==e?void 0:e.user_id))})),p=null==m?void 0:m.includes(nv);if(u.msg_type===N.Vql.LinkmicTeamfightMessageType_CREATE&&(null==e5||e5.liveLinkMicRoomShowEvent(nu.current||I.yP.VIDEO_T1_V_B8),(null==u?void 0:null===(t=u.teamfight_info)||void 0===t?void 0:t.type)===E.yw.LinkmicTeamfightType_TWO_TEAM&&("video"===ei?V()():(eQ(o),eP(I.yP.AUDIO_1V8)),p&&(null==e5||e5.liveAudiencePlayModeRoomLinkEvent(s)))),u.msg_type===N.Vql.LinkmicTeamfightMessageType_START&&((null==u?void 0:null===(i=u.teamfight_info)||void 0===i?void 0:i.type)===E.yw.LinkmicTeamfightType_TWO_TEAM&&p&&Z.F.info("如不愿参与作战可退出连线",e4.root),(null==u?void 0:null===(r=u.teamfight_info)||void 0===r?void 0:r.type)===E.yw.LinkmicTeamfightType_ROOM_BATTLE&&(eW("pk"),p&&(Z.F.info("跨房对战已开启 如不愿参与对战可退出连线"),null==e5||e5.liveAudiencePlayModeRoomLinkEvent(void 0,"room_grouppk")))),u.msg_type===N.Vql.LinkmicTeamfightMessageType_FINISH){if((null==u?void 0:null===(l=u.teamfight_info)||void 0===l?void 0:l.type)===E.yw.LinkmicTeamfightType_TWO_TEAM){if("video"===ei)V()();else{let e=b()(e1,"room.linker_detail.linker_play_modes",[]);setTimeout(()=>{e.includes(24)?e$?(eP(e$),eQ(void 0)):eP(I.yP.AUDIO_1V8):e.includes(26)&&eP(I.yP.AUDIO_GRID)},1e3)}}null==e5||e5.liveAudiencePlayModeRoomWatchDurationEvent(void 0,ns.current)}let h=Number(u.msg_type);h===N.Vql.LinkmicTeamfightMessageType_FINISH&&(eB?(eW("crossLink"),e8.current=0):eC(void 0),eS===f.cK.LINKED&&(null==e5||e5.liveAudiencePlayModeRoomLinkDurationEvent(void 0,ns.current)),setTimeout(()=>{var e,n,t,i;let o=nT.current===f.cK.LINKED;o&&(null!==(e=null==d?void 0:d.guest_finish_toast)&&void 0!==e?e:"")!==""?en(null!==(t=null==d?void 0:d.guest_finish_toast)&&void 0!==t?t:"",e4.root):!o&&(null!==(n=null==d?void 0:d.finish_toast)&&void 0!==n?n:"")!==""&&en(null!==(i=null==d?void 0:d.finish_toast)&&void 0!==i?i:"",e4.root)},1e3)),h===N.Vql.LinkmicTeamfightMessageType_PUNISH&&(null==_?void 0:_.disable_show_toast)!==""&&(null==_?void 0:_.disable_show_toast)!==void 0&&Z.F.info(null==_?void 0:_.disable_show_toast),ns.current=M,ec(v)}),[ei,e4.root,e1,o,eh,eS,e9,ec,eP,eC,M,nT,n,eB,eW,eQ,e$]),U.useEffect(()=>e6.syncOn("LinkmicProfitEggMessage",e=>{let{method:n,payload:t}=e;if(!!n&&!!t)eG(t)}),[eG]),U.useEffect(()=>e6.syncOn("LinkmicOrderSingMessage",e=>{let{method:n,payload:t}=e;if(!!n&&!!t)switch(Number(null==t?void 0:t.message_type)){case y.TYPE_MESSAGE_CREATE:let{order_sing_create_content:o}=t;(0,K.ZP)({service_name:"webcast.douyin.live_pc",key:"order_sing_info"}).then(e=>{let n=S()(em)||{};n.golden_microphone_icon=null==e?void 0:e.golden_microphone_icon,n.silver_microphone_icon=null==e?void 0:e.silver_microphone_icon,n.gift_id=Number(null==o?void 0:o.gift_id),n.gift_ids=null==o?void 0:o.gift_ids,n.audition_gift_ids=null==o?void 0:o.audition_gift_ids;let t=Object.keys(eh).map(e=>{var n,t;return{microphone_list:[{microphone_type:N.W5X.GOLDEN_MICROPHONE,micro_phone_num:0},{microphone_type:N.W5X.SILVER_MICROPHONE,micro_phone_num:0}],order_user:{id:null===(t=eh[e].user)||void 0===t?void 0:null===(n=t.user)||void 0===n?void 0:n.id_str}}});n.user_microphone_list=t,nd.current=em,ef(n),ed([...eu,N.V0x.LinkmicPlayMode_OrderSing]),eJ((null==o?void 0:o.show_gift_info)||!1),null==e5||e5.liveAudiencePlayModeRoomEvent(nu.current)}),(null==o?void 0:o.open_order_sing_toast)&&Z.F.info(o.open_order_sing_toast);break;case y.TYPE_MESSAGE_FINISH:let{order_sing_finish_content:r}=t;(null==r?void 0:r.close_order_sing_toast)&&Z.F.info(null==r?void 0:r.close_order_sing_toast),nd.current=em,ef(void 0),i(f.uH.NONE),eu.includes(N.V0x.LinkmicPlayMode_OrderSing)&&ed(eu.filter(e=>e!==N.V0x.LinkmicPlayMode_OrderSing));break;case y.TYPE_MESSAGE_SING_ACTION_TOAST:let{order_sing_action_toast_content:l}=t;(null==l?void 0:l.start_sing_toast)?Z.F.info(l.start_sing_toast):(null==l?void 0:l.oder_sing_toast)?Z.F.info(l.oder_sing_toast):(null==l?void 0:l.finish_sing_toast)&&Z.F.info(l.finish_sing_toast);break;case y.TYPE_MESSAGE_SING_ACTION:(0,d.RO)({room_id:e1.roomId}).then(e=>{if(e.data.data&&0===e.data.status_code){var n,t;let i=S()(em)||e.data.data;i.user_microphone_list=null!==(t=null===(n=e.data.data.user_microphone_list)||void 0===n?void 0:n.map(e=>{var n,t,i;return(null===(t=null==e?void 0:null===(n=e.microphone_list)||void 0===n?void 0:n.length)||void 0===t||t)&&(e.microphone_list=[...null!==(i=e.microphone_list)&&void 0!==i?i:[],{microphone_type:N.W5X.GOLDEN_MICROPHONE,micro_phone_num:0}]),e}))&&void 0!==t?t:[],i.current_sing_item=e.data.data.current_sing_item,i.auto_enlarge=e.data.data.auto_enlarge,i.gift_id=e.data.data.gift_id,ef(i)}})}}),[n,e1.roomId,i,eh,eu,ed,em,ef,eJ]),U.useEffect(()=>e6.syncOn("LinkmicOrderSingScoreMessage",e=>{var n,t,i,o,r;let{method:l,payload:a}=e;if(!l||!a)return;null==a||a.message_type;let{order_sing_score_content:u}=a,{user_score:s}=null!=u?u:{},d=S()(em),_=[{microphone_type:N.W5X.GOLDEN_MICROPHONE,micro_phone_num:null!==(t=null==s?void 0:s.golden_microphone_num)&&void 0!==t?t:0,title_sponsor:null!==(i=null==s?void 0:s.title_sponsor)&&void 0!==i?i:{},hit_toast:null!==(o=null==s?void 0:s.hit_toast)&&void 0!==o&&o},{microphone_type:N.W5X.SILVER_MICROPHONE,micro_phone_num:null!==(r=null==s?void 0:s.silver_microphone_num)&&void 0!==r?r:0}],v=!1;if(null==d||null===(n=d.user_microphone_list)||void 0===n||n.map(e=>{var n;String(null===(n=e.order_user)||void 0===n?void 0:n.id)===(null==s?void 0:s.user_id)&&(v=!0,e.microphone_list=_)}),!v){let e=(null==d?void 0:d.user_microphone_list)?[...null==d?void 0:d.user_microphone_list]:[];e.push({order_user:{id:null==s?void 0:s.user_id},microphone_list:_}),d&&(d.user_microphone_list=e)}nd.current=em,d&&ef(d),s&&ek((0,c._0)(s))}),[em,ef,ek,n]),U.useEffect(()=>e6.syncOn("GuestBattleMessage",e=>{var n,t;let{method:i,payload:o}=e;if(!i||!o)return;null==o||o.message_type;let{battle_info:r,finish_content:l,finish_toast:a}=o,u=null===(t=w()(eh))||void 0===t?void 0:null===(n=t.map(e=>{var n,t;return null==e?void 0:null===(t=e.user)||void 0===t?void 0:null===(n=t.user)||void 0===n?void 0:n.id_str}))||void 0===n?void 0:n.filter(e=>![void 0,""].includes(e)),s=null==u?void 0:u.includes(nv),d=Number(o.msg_type);ev((0,c._0)(r)),d===N.$s7.GuestBattle_CREATE&&(localStorage.removeItem("guest_battle_animation"),null==e5||e5.guestBattleLiveConnectionGameTransformEvent(),s&&setTimeout(()=>{Z.F.info("如不愿参与作战可退出连线",e4.root)},1750)),d===N.$s7.GuestBattle_FINISH?(eC(void 0),eS===f.cK.LINKED&&(null==e5||e5.liveAudiencePlayModeRoomLinkDurationEvent(void 0,ns.current)),null==e5||e5.liveAudiencePlayModeRoomWatchDurationEvent(void 0,void 0,void 0,void 0,e_),""!==a?(Z.F.info(a,e4.root),localStorage.removeItem("guest_battle_animation")):(null==l?void 0:l.reason)===N.GO3.FinishGuestBattleReason_SCENE_CHANGE&&(Z.F.info("本轮作战结束,恢复原始连线记值展示",e4.root),localStorage.removeItem("guest_battle_animation"))):d===N.$s7.GuestBattle_PAUSE?Z.F.info("大作战计时已暂停",e4.root):d===N.$s7.GuestBattle_RESUME&&Z.F.info("大作战计时继续",e4.root)}),[e4.root,eh,eS,e9,e_,ev,eC,n]),U.useEffect(()=>e6.syncOn("GuestBattleScoreMessage",e=>{let{method:n,payload:t}=e;if(!n||!t)return;null==t||t.message_type;let{battle_info:i}=t;ev((0,c._0)(i))}),[ev,n]),U.useEffect(()=>null==e6?void 0:e6.wrds.on("RoomDataSyncMessage","RoomLinkMicSyncData",e=>{let n=b()(e,"payload.payload.linker_base_info.anchor_manual_open_ui_layout");n&&eq(Number(n))}),[eq]),U.useEffect(()=>null==e6?void 0:e6.syncOn("LinkmicPlaymodeMessage",e=>{let{method:n,payload:t}=e;if(!!n&&!!t){if(null==t?void 0:t.linkmic_subtitle_status){var i;ez({isOpen:!0,type:(null==t?void 0:null===(i=t.linkmic_subtitle_status)||void 0===i?void 0:i.subtitle_type)||N.rFD.SubtitleType_Room})}}}),[ez]),U.useEffect(()=>null==e6?void 0:e6.on("LinkmicProfitMessage",e=>{e.forEach(e=>{let{method:n,payload:t}=e;if(!n||!t)return;let i=t.msg_type;if("string"==typeof t.msg_type&&(i=Number(t.msg_type)),7===i&&ed([...eu,N.V0x.LinkmicPlayMode_NormalPaidLinkmic]),8===i&&ed(eu.filter(e=>e!==N.V0x.LinkmicPlayMode_NormalPaidLinkmic)),20===i){var o,r;ez({isOpen:!0,type:(null==t?void 0:null===(r=t.audio_subtitle_start_content)||void 0===r?void 0:null===(o=r.linkmic_subtitle_status)||void 0===o?void 0:o.subtitle_type)||N.rFD.SubtitleType_Room})}21===i&&ez({isOpen:!1,type:N.rFD.SubtitleType_Room})})}),[e6]);let nA=U.useCallback(()=>{eS===f.cK.LINKED&&(null==e5||e5.liveLeaveLinkMicEvent(s.JW.NONE,s._o.AUDIENCE,ns.current),(0,f.SH)(o,es)&&(null==e5||e5.liveAudiencePlayModeRoomLinkDurationEvent(o,ns.current))),void 0!==o&&(null==e5||e5.liveLinkMicDurationEvent(nu.current),null==e5||e5.liveVoiceRoomLayoutWatchDuration(ea(nu.current,(0,q.ic)(nc.current)),el(nu.current,n_.current)),(0,f.SH)(o,es)?null==e5||e5.liveAudiencePlayModeRoomWatchDurationEvent(void 0,void 0,[],nd.current):(ne||nn||nt)&&(null==e5||e5.liveAudiencePlayModeRoomWatchDurationEvent())),e7(s.JW.NONE,s._o.AUDIENCE,!0)},[e7,eS,es,o]);U.useEffect(()=>{let e="onpagehide"in self?"pagehide":"unload",n=e=>{if(eS===f.cK.LINKED)return e.returnValue="正在连麦中,是否确认离开?","正在连麦中,是否确认离开?"};return(0,B.DT)()?window.addEventListener("beforeunload",nA):(window.addEventListener("beforeunload",n),window.addEventListener(e,nA)),()=>{(0,B.DT)()?window.removeEventListener("beforeunload",nA):(window.removeEventListener("beforeunload",n),window.removeEventListener(e,nA))}},[eS,nA]),(0,Q.Z)(()=>{nA()});U.useEffect(()=>{eS===f.cK.LINKED},[!1,!1,eS,nA])},ei=t("671168"),eo=t("21198"),er=t("380599");let el=function(e,n){let t="party";return(e===I.yP.AUDIO_1V8||e===I.yP.AUDIO_DOUBLE_C||e===I.yP.VIDEO_1V6||e===I.yP.VIDEO_DYNAMIC_FLOAT)&&(t="radio"),e===I.yP.MATE_CUSTOM&&(t="audio_audience"),"new_audience"===n&&(t="new_audience"),t},ea=(e,n)=>n?e===I.yP.AUDIO_DOUBLE_C?"seat_enlarge_double":"seat_enlarge":[I.yP.VIDEO_DYNAMIC,I.yP.VIDEO_DYNAMIC_FLOAT,I.yP.VIDEO_1_V_3,I.yP.VIDEO_1_V_6].includes(e)?"seat_fit":"normal",eu=(e,n)=>e===I.yP.AUDIO_DOUBLE_C&&26===n?"stable_double":er.i7[e]||"",es=(0,o.Pi)(e=>{let{isVerifyed:n}=e,{linkmicStore:{linkRoomType:t,linkMicLayout:i,linkMicSeats:o,functionType2:r,openUiLayout:l},userStore:{userInfo:a},eventStore:{linkmicEvent:u},singletonStore:{setAudioPower:s}}=(0,Y.o)();(0,U.useEffect)(()=>{s(new eo.a)},[]),et({isVerifyed:n}),(0,ei.Z)();let d=U.useRef(""),c=U.useRef(""),_=U.useRef(i),v=U.useRef(r),m=U.useRef(!1),f=U.useMemo(()=>0!==D()(o).filter(e=>!!(null==e?void 0:e.user)).length,[o]),p=U.useMemo(()=>t&&o&&Object.values(o).some(e=>b()(e,"user.user.id_str","")===b()(a,"id_str","")),[t,o,a]);return U.useEffect(()=>{if(!!f)el(i,r)!==v.current&&void 0!==i?(m.current&&(null==u||u.liveVoiceRoomLayoutWatchDuration(d.current,v.current,_.current),null==u||u.liveAudienceRoomLayoutShow(i),null==u||u.liveLinkMicRoomShowEvent(i),null==u||u.liveLinkMicDurationEvent(_.current,void 0,v.current)),p&&(null==u||u.liveLeaveLinkMicEvent(void 0,void 0,void 0,el(_.current)),null==u||u.liveConnectLinkMicEvent(0,0))):ea(i,(0,q.ic)(o))!==d.current?m.current&&(null==u||u.liveVoiceRoomLayoutWatchDuration(d.current,el(i,r),_.current),null==u||u.liveAudienceRoomLayoutShow(i)):eu(i,l)!==c.current&&m.current&&(null==u||u.liveVoiceRoomLayoutWatchDuration(d.current,el(i,r),_.current),null==u||u.liveAudienceRoomLayoutShow(i)),!m.current&&(void 0!==i||"new_audience"===r)&&(null==u||u.liveAudienceRoomLayoutShow(i,el(i,r)),null==u||u.liveLinkMicRoomShowEvent(i),m.current=!0),v.current=el(i,r),_.current=i,c.current=eu(i,l),d.current=ea(i,(0,q.ic)(o))},[i,r,f,el(i,r),p,ea(i,(0,q.ic)(o)),eu(i,l),(0,q.ic)(o),o,l]),null});var ed=(0,o.Pi)(()=>{let{roomStore:{isVerified:e}}=(0,Y.o)();return(0,i.jsx)(es,{isVerifyed:e})})},271426:function(e,n,t){t.r(n),t.d(n,{LinkMicPlayModeLimitPlugin:function(){return C}}),t(706056);var i=t(746958),o=t(160197),r=t(502615),l=t(762080),a=t(764283),u=t(589864),s=t(687581),d=t(618759),c=t(752150),_=t(198412),v=t.n(_),m=t(795233),f=t.n(m),p=t(101199),h=t(731343),g=t(542901),E=t(997288),y=t(975956),I=t(964591),P=t(536793),L=t(118003),N=t(788287);let C=e=>{let{isVerifyed:n}=e,{roomStore:{roomInfo:t,setNotSupportReason:_},linkmicStore:{setIsPlayModeNotSupport:m,imLinkMicLayout:I,uiLayout:C,setAsrSubtitle:S,teamfightInfo:T,linkRoomTypeHooks:b},singletonStore:{message:A},userStore:{userInfo:k},eventStore:{linkmicEvent:R}}=(0,g.o)();(0,P.T)();let w=(0,L.Z)(),{player:O}=(0,o.n)(),x=(0,y.kF)(),M=p.useCallback(()=>{a.kg.info("玩法限制",(0,h.toJS)(t)),m(!0),_(l.Ly.MULTI_CONSUMER_LINE)},[m,t]),D=(0,p.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v()(t,"room.linker_detail.linker_ui_layout");(null==k?void 0:k.isReady)&&((0,u.Qz)({anchor_id:v()(t,"anchor.id_str",""),room_id:null==t?void 0:t.roomId,user_id:null==k?void 0:k.id_str,scene:Number(Object.keys(v()(t,"room.linker_map",{}))),playmode:v()(t,"room.linker_detail.linker_play_modes",[]),ui_layout:e}),a.kg.event(`[${s.Tn.Error}]${s.Mo.LiveNotSupportError}`,{room_id:null==t?void 0:t.roomId,user_id:null==k?void 0:k.id_str,scene:Number(Object.keys(v()(t,"room.linker_map",{}))),playmode:v()(t,"room.linker_detail.linker_play_modes",[]),ui_layout:e,is_client:(0,d.DT)()}))},[t,k]);p.useEffect(()=>{let e=v()(t,"room.linker_detail.linker_ui_layout"),n=Number(Object.keys(v()(t,"room.linker_map",{}))),i=v()(t,"room.linker_detail.linker_play_modes",[]);(e||n||(null==i?void 0:i.length)>0)&&a.kg.event("linkmic_user_page_view",{room_id:null==t?void 0:t.roomId,user_id:null==k?void 0:k.id_str,scene:n,playmode:i,ui_layout:e,is_client:(0,d.DT)()})},[t,k]),p.useEffect(()=>{(async()=>{let e=v()(t,"room.linker_detail.linker_ui_layout"),n=v()(t,"room.linker_detail.linker_play_modes"),i=await (0,c.ZP)({service_name:"webcast.douyin.live_pc",key:"linkmic_not_support_uilayout"}),{uilayout:o}=i[null==x?void 0:x.XTTENV]?i[null==x?void 0:x.XTTENV]:i,r=e=>{if(o&&(null==o?void 0:o.includes(e)))return D(e),!0};if([e,C].some(e=>r(e))&&M(),null==n?void 0:n.includes(7)){var l,a;if("video"!==b&&(!w||(null==w?void 0:null===(a=w.data)||void 0===a?void 0:null===(l=a.linkmic_play_mode_info)||void 0===l?void 0:l.teamfight_info))&&(!T||(null==T?void 0:T.status)!==N.Hj.LinkmicTeamfightStatus_FINISHED))return;M()}})()},[t,C,w,b,null==T?void 0:T.status]);let j=v()(t,"room.live_room_mode"),V=p.useCallback(e=>{if(100===e.code)try{var n,o,r;let a=new TextDecoder().decode(e.content),u=(0,i.KR)(a);if(void 0===I&&u&&u.ktv_sei&&(null==u?void 0:null===(n=u.ktv_sei)||void 0===n?void 0:n.scene)>0&&(null==u?void 0:null===(o=u.ktv_sei)||void 0===o?void 0:o.scene)!==3&&M(),u&&u.app_data)f()();else if(null==u?void 0:null===(r=u.source)||void 0===r?void 0:r.includes("TTLiveSDK")){let e=v()(t,"room.basis.is_customize_audio_room",!1);j===l.ke.AUDIO&&!e&&M()}}catch(e){}},[M,I,j,t]);return p.useEffect(()=>(null==O||O.on(r.FP.SEI,V),()=>{null==O||O.off(r.FP.SEI,V)}),[O,V]),p.useEffect(()=>{let e=v()(t,"room.linker_map",{}),n=v()(t,"room.linker_detail.linker_play_modes",[]),i=!1;(e[E.xs.Scene_AudioChatRoom]||e[E.xs.Scene_VideoChatRoom]||e[E.xs.Scene_VideoEqualRoom])&&n.forEach(e=>{e===E.V0.LinkmicPlayMode_Teamfight&&(D(),i=!0)}),e[E.xs.Scene_AudioChatRoom]&&(n.includes(E.V0.LinkmicPlayMode_Teamfight)||n.includes(E.V0.LinkmicPlayMode_AudioChat_3x3_N_EMPTY))&&(i=!1),n.forEach(e=>{e===E.V0.LinkmicPlayMode_KTVSingingChallenge&&(D(),i=!0)}),(n.includes(E.V0.LinkmicPlayMode_Teamfight)||n.includes(E.V0.LinkmicPlayMode_AudioChat_3x3_N_EMPTY))&&(i=!1),i&&M()},[M,t]),p.useEffect(()=>null==A?void 0:A.on("KtvChallengeConfigMessage",e=>{e.forEach(e=>{let{method:n,payload:t}=e;if(!!n&&!!t)"WebcastKtvChallengeConfigMessage"===n&&(null==t?void 0:t.switch_status)==="1"&&M()})}),[M,A]),null};n.default=(0,I.Pi)(C)},671168:function(e,n,t){t(706056);var i=t(101199),o=t(542901),r=t(110934),l=t(335924);n.Z=()=>{let{linkmicStore:{linkMicSeats:e,choosePeopleArr:n,setChoosePeopleArr:t,setChoosePeopleAll:a,choosePanelVisible:u,isCrossLink:s,isNewVideoLinkmicRoom:d},roomStore:{roomInfo:c}}=(0,o.o)(),{isRoomBattle:_}=(0,r.Z)(),v=(0,l.Rs)("anchor_id");(0,i.useEffect)(()=>{var i,o,r,l,u,m,f,p,h;if(!(null==e?void 0:null===(i=e[0])||void 0===i?void 0:i.user))return;let g=null==c?void 0:null===(o=c.anchor)||void 0===o?void 0:o.id_str;if(n&&(null==n?void 0:n.length)!==0){let i={};_||s?Object.keys(e).forEach(n=>{n<=5&&(i[n]=e[n])}):i=e;let o=Object.values(i).map(e=>{var n,t;return null==e?void 0:null===(t=e.user)||void 0===t?void 0:null===(n=t.user)||void 0===n?void 0:n.id_str}),r=null==n?void 0:n.filter(e=>o.includes(e));r.length!==n.length&&t((null==r?void 0:r.length)>0?r:[g])}else{let n=[];try{n=JSON.parse(null!==(m=localStorage.getItem(`linkmic-last-choose-people-${null==c?void 0:c.roomId}`))&&void 0!==m?m:"[]")}catch(e){}let i=[];n.length>0?i=n:d&&v?i=[v]:(null==e?void 0:null===(u=e[0])||void 0===u?void 0:null===(l=u.user)||void 0===l?void 0:null===(r=l.user)||void 0===r?void 0:r.id_str)&&(i=[null==e?void 0:null===(h=e[0])||void 0===h?void 0:null===(p=h.user)||void 0===p?void 0:null===(f=p.user)||void 0===f?void 0:f.id_str]),t(i);let o=localStorage.getItem(`linkmic-last-choose-people-all-${null==c?void 0:c.roomId}`);a(void 0!==o&&"true"===o)}},[e,n,s,c,v,d,t,a])}},110934:function(e,n,t){t.d(n,{Y:function(){return m},Z:function(){return f}});var i=t("542901"),o=t("320165");t("101199");var r=t("890710"),l=t("469935"),a=t.n(l),u=t("901393"),s=t("556351"),d=t("744334");let c=e=>{let{title:n,content:t,confirmBtnText:i="确定",closeBtnText:r="取消",onConfirm:l,onClose:c,className:_}=e;return(0,o.jsx)(s.Z,{visible:!0,className:a()({[d.default.mask]:!0,[_]:!!_}),title:n,onCancel:c,closeable:!1,children:(0,o.jsxs)("div",{className:d.default.wrap,children:[(0,o.jsx)("div",{className:d.default.content,children:t}),(0,o.jsxs)("div",{className:d.default.operation,children:[(0,o.jsx)(u.zx,{type:u.L$.secondary,onClick:()=>{c&&c()},children:r}),(0,o.jsx)(u.zx,{onClick:()=>{l&&l()},children:i})]})]})})},_=function(){let e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{elementClass:i="confirm-modal"}=t,l=()=>{e&&n&&(null==n||n.classList.remove(i),r.unmountComponentAtNode(n),e.removeChild(n),e.style.overflow="")};return{showModal:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{title:a,content:u,confirmBtnText:s,closeBtnText:d,onConfirm:_,onClose:v,className:m}=t,f=async()=>{_&&await _(),l()},p=async()=>{v&&await v(),l()};!(n=(e=document.body).querySelector(`.${i}`))&&((n=document.createElement("div")).classList.add(i),e.appendChild(n),e.style.overflow="hidden",r.render((0,o.jsx)(c,{title:a,content:u,confirmBtnText:s,closeBtnText:d,onConfirm:f,onClose:p,className:m}),n))},destroyModal:l}};var v=t("941078"),m={Red:"1",Blue:"2"},f=()=>{let{linkmicStore:{teamfightInfo:e,linkMicSeats:n}}=(0,i.o)(),{isGroupFight:t,isRoomBattle:o,statusTexting:r,pickEmptySeatPositionByGroup:l,groupMemberCnts:a,willInterruptWithPosQuit:u,leftTeamScore:s,rightTeamScore:d,status:c,countDown:m,isInPunish:f,isGroupPlaying:p,redGroupSeats:h,blueGroupSeats:g}=(0,v.Z)({teamfightInfo:e,linkMicSeats:n}),{showModal:E}=_();return{isGroupFight:t,isRoomBattle:o,statusTexting:r,pickEmptySeatPositionByGroup:l,groupMemberCnts:a,willInterruptWithPosQuit:u,exitGameConfirm:(e,n)=>{if(!n)return;let t="1"===String(n)?"红队":"蓝队";E({title:`确认退出${t}吗`,content:`退出后${t}人数为 0,团战将自动结束`,onConfirm:()=>{e()}})},leftTeamScore:s,rightTeamScore:d,status:c,countDown:m,isInPunish:f,isGroupPlaying:p,redGroupSeats:h,blueGroupSeats:g}}},941078:function(e,n,t){t.d(n,{Z:function(){return u}}),t("591964"),t("706056"),t("490629");var i=t("101199"),o=t("788287"),r=t("746958"),l=()=>{let e=i.useRef(),[n,t]=i.useState(0),o=i.useCallback((n,i)=>{r(),t(n),e.current=setInterval(()=>{t(n=>n<=0?(null==i||i(),clearInterval(e.current),0):n-1)},1e3)},[]),r=i.useCallback(()=>{t(0),e.current&&(clearInterval(e.current),e.current=void 0)},[]);return i.useEffect(()=>()=>{e.current&&(t(0),clearInterval(e.current),e.current=void 0)},[]),{clearCountDown:r,startCountDown:o,countDown:n,countDownIntervelRef:e}},a=t("60444"),u=e=>{let{teamfightInfo:n,linkMicSeats:t}=e,u=i.useMemo(()=>(null==n?void 0:n.type)===o.yw.LinkmicTeamfightType_TWO_TEAM&&(null==n?void 0:n.status)!==o.Hj.LinkmicTeamfightStatus_FINISHED&&(null==n?void 0:n.status)!==o.Hj.LinkmicTeamfightStatus_NONE,[n]),s=i.useMemo(()=>(null==n?void 0:n.type)===o.yw.LinkmicTeamfightType_ROOM_BATTLE&&(null==n?void 0:n.status)!==o.Hj.LinkmicTeamfightStatus_FINISHED&&(null==n?void 0:n.status)!==o.Hj.LinkmicTeamfightStatus_NONE,[n]),d=i.useMemo(()=>(null==n?void 0:n.type)===o.yw.LinkmicTeamfightType_TWO_TEAM&&(null==n?void 0:n.status)===o.Hj.LinkmicTeamfightStatus_PLAYING,[n]),c=i.useMemo(()=>(null==n?void 0:n.type)===o.yw.LinkmicTeamfightType_TWO_TEAM&&(null==n?void 0:n.status)===o.Hj.LinkmicTeamfightStatus_PUNISHING,[n]),{countDown:_,startCountDown:v}=l(),{countDown:m,startCountDown:f}=l(),p=i.useMemo(()=>{var e;let t=null==n?void 0:null===(e=n.team_infos)||void 0===e?void 0:e.find(e=>"1"===String(null==e?void 0:e.team_id)),i=Number(null==t?void 0:t.score)||0;return{teamScore:i,score:i,scoreBlur:null==t?void 0:t.score_fuzzy,teamScoreBlur:null==t?void 0:t.score_fuzzy}},[null==n?void 0:n.team_infos]),h=i.useMemo(()=>{var e;let t=null==n?void 0:null===(e=n.team_infos)||void 0===e?void 0:e.find(e=>"2"===String(null==e?void 0:e.team_id)),i=Number(null==t?void 0:t.score)||0;return{teamScore:i,score:i,scoreBlur:null==t?void 0:t.score_fuzzy,teamScoreBlur:null==t?void 0:t.score_fuzzy}},[null==n?void 0:n.team_infos]),g=i.useCallback(e=>("1"===e?a.z:a.U).find(e=>{var n;return!(null===(n=t[e])||void 0===n?void 0:n.user)}),[t]),E=i.useMemo(()=>[a.z,a.U].map(e=>e.reduce((e,n)=>{var i;return e+((null==t?void 0:null===(i=t[n])||void 0===i?void 0:i.user)?1:0)},0)),[t]),y=i.useCallback((e,t)=>{if((null==n?void 0:n.status)===o.Hj.LinkmicTeamfightStatus_PLAYING){let n=a.z.includes(e),[i,o]=E;if((n?i:o)===1&&(!t||a.z.includes(t)!==n))return n?"1":"2"}},[t,n,E]);(0,i.useEffect)(()=>{if(!n)return;let{start_time:e,current_time_ms:t,duration:i,punish_start_time:r,punish_duration:l}=n;if(!!e&&"0"!==e)(null==n?void 0:n.status)===o.Hj.LinkmicTeamfightStatus_PLAYING&&v(Math.floor(i-(t/1e3-e))),(null==n?void 0:n.status)===o.Hj.LinkmicTeamfightStatus_PUNISHING&&f(Math.floor(l-(t/1e3-r)))},[n]);let I=i.useMemo(()=>{if(!!n)switch(null==n?void 0:n.status){case o.Hj.LinkmicTeamfightStatus_PREPARE:return"组队中";case o.Hj.LinkmicTeamfightStatus_PLAYING:return`团战${(0,r.Gm)(_)}`;case o.Hj.LinkmicTeamfightStatus_PUNISHING:return`战果${(0,r.Gm)(m)}`;default:return}},[n,_,m]);return{isGroupFight:u,isRoomBattle:s,statusTexting:I,pickEmptySeatPositionByGroup:g,groupMemberCnts:E,willInterruptWithPosQuit:y,leftTeamScore:p,rightTeamScore:h,status:i.useMemo(()=>null==n?void 0:n.status,[n]),countDown:_,isInPunish:c,isGroupPlaying:d,redGroupSeats:a.z,blueGroupSeats:a.U}}},170242:function(e,n,t){t(706056);var i=t(101199),o=t(542901),r=t(730481),l=t(198412),a=t.n(l),u=t(433063);n.Z=()=>{let{linkmicStore:{guestBattleInfo:e,isNewVideoLinkmicRoom:n},userStore:{userInfo:t}}=(0,o.o)(),l=a()(t,"user_attr.is_admin",!1),s=a()(t,"user_attr.admin_privileges",[]),d=i.useMemo(()=>!n&&l&&Array.isArray(s)&&(s.includes(r.s.LinkmicGuestBattlePrivilege)||s.includes(r.s.AudienceLinkmicPlaymodeControl)),[l,s]),{isGuestBattle:c,status:_,isInPunish:v,isGuestPlaying:m}=(0,u.Z)({guestBattleInfo:e});return{isGuestBattle:c,status:_,isInPunish:v,isGuestPlaying:m,isGuestBattleManger:d}}},433063:function(e,n,t){t(706056);var i=t(101199),o=t(877991);n.Z=e=>{let{guestBattleInfo:n}=e,t=i.useMemo(()=>!!(null==n?void 0:n.battle_id_str)&&Number(null==n?void 0:n.status)!==o.Nq.GuestBattle_NONE&&Number(null==n?void 0:n.status)!==o.Nq.GuestBattle_FINISH,[n]),r=i.useMemo(()=>t&&[o.Nq.GuestBattle_ON_GOING,o.Nq.GuestBattle_PAUSE].includes(null==n?void 0:n.status),[t]),l=i.useMemo(()=>t&&Number(null==n?void 0:n.status)===o.Nq.GuestBattle_SHOW_RESULT,[n,t]);return{isGuestBattle:t,status:i.useMemo(()=>null==n?void 0:n.status,[n]),isInPunish:l,isGuestPlaying:r}}},970359:function(e,n,t){t.d(n,{Z:function(){return S}});var i=t("629686");t("679308"),t("992871"),t("490629"),t("88856"),t("932651");var o=t("991879"),r=t("22496"),l=t("113515"),a=t("121422"),u=t("764283"),s=t("494857"),d={CloseRoomTypeNormal:0,0:"CloseRoomTypeNormal",CloseRoomTypeForceClose:1,1:"CloseRoomTypeForceClose",CloseRoomTypeFinish:2,2:"CloseRoomTypeFinish",CloseRoomTypeAnchorKickout:4,4:"CloseRoomTypeAnchorKickout",CloseRoomTypeAccountKickout:5,5:"CloseRoomTypeAccountKickout",CloseRoomTypeSelfOnRecord:6,6:"CloseRoomTypeSelfOnRecord",CloseRoomTypeFail:7,7:"CloseRoomTypeFail",CloseRoomTypeForbidden:8,8:"CloseRoomTypeForbidden",CloseRoomTypeCocosError:9,9:"CloseRoomTypeCocosError",CloseRoomTypeChangingRoom:10,10:"CloseRoomTypeChangingRoom",CloseRoomTypeForceByMSeq:11,11:"CloseRoomTypeForceByMSeq",CloseRoomTypeTermination:12,12:"CloseRoomTypeTermination",CloseRoomTypeNone:13,13:"CloseRoomTypeNone",CloseRoomTypeLiveGuestFinishRoom:14,14:"CloseRoomTypeLiveGuestFinishRoom"},c=t("750239"),_=t("825795"),v=t("160197"),m=t("46892"),f=t("396868"),p=t("687581"),h=t("618759"),g=t("198412"),E=t.n(g),y=t("795233"),I=t.n(y),P=t("101199"),L=t("542901"),N=t("335076");let C=()=>{let{roomStore:{roomInfo:e},linkmicStore:{setLinkStatus:n,linkStatus:t,setApplySource:l,setDevices:a,isNewVideoLinkmicRoom:c},eventStore:{linkmicEvent:_,slardarEvent:g}}=(0,L.o)(),{player:E}=(0,v.n)(),y=(null==e?void 0:e.roomId)||"";return P.useCallback((e,v,P)=>{var L;if(t===s.cK.NOT_LINK)return Promise.resolve();if(P&&"function"==typeof(null===(L=navigator)||void 0===L?void 0:L.sendBeacon)){let e=new URLSearchParams;return e.append("room_id",y),e.append("end_reason",`${d.CloseRoomTypeNormal}`),e.append("request_source","leave_normally"),navigator.sendBeacon(`${(0,m.Pe)()}/webcast/linkmic_audience/leave/?aid=6383&live_id=1`,e),Promise.resolve()}return t===s.cK.LINKED&&(null==_||_.liveLeaveLinkMicEvent(e,v),null==_||_.liveAudiencePlayModeRoomLinkDurationEvent()),(c?o.X9:o.TL)({room_id:y,end_reason:d.CloseRoomTypeNormal,request_source:"leave_normally"}).then(e=>{var t,o;let{data:r,logId:l}=e,{status_code:d}=r;if(null==g||g.linkmicLeaveRequestLog(d),0===d?(a({audio:void 0,video:void 0}),n(s.cK.NOT_LINK)):31001===d?I()():f.F.info("断开连线失败,请稍后重试",E.root),0!==d)return u.kg.event(`[${p.Tn.Error}]${p.Mo.LiveLeaveLinkError}`,{statusCode:d,logId:null!=l?l:"",message:(null==r?void 0:null===(o=r.data)||void 0===o?void 0:o.prompts)||"",is_client:(0,h.DT)()}),u.kg.error("断开连线失败",r,l),Promise.reject(r);if(c){let e=new CustomEvent("webcast_linkmic_leave_room",{detail:(0,i._)({},(null==r?void 0:r.data)||{})});null===(t=document)||void 0===t||t.dispatchEvent(e)}return Promise.resolve(r)}).finally(()=>{l(r.JW.NONE)})},[y,n,l,t,E,a,c])};var S=()=>{let{roomStore:{roomInfo:e},linkmicStore:{setLinkStatus:n,linkStatus:t,selectedPosition:d,setApplySource:m,setIsCandidate:g,linkMicSeats:y,setSelfLinkedPosition:S,linkMicConfig:T,setDevices:b,setFaceRecognitionShow:A,isNewVideoLinkmicRoom:k},userStore:{userInfo:R},paidLiveStore:{paidLiveAuth:w},eventStore:{linkmicEvent:O,linkmicBaseEvent:x,slardarEvent:M,rtcEvent:D}}=(0,L.o)(),{player:j}=(0,v.n)(),V=P.useMemo(()=>{var e;return null===(e=y[null!=d?d:""])||void 0===e?void 0:e.user},[y,d]),U=E()(e,"anchor.id_str",""),G=E()(e,"roomId",""),F=P.useCallback((e,t)=>{let{priorityPosition:i,teamFightTeamId:r}=t||{},l=i||d;return(k?o.HZ:o.q7)(Object.assign({room_id:G,anchor_id:U,link_type:e,apply_type:c.XC.NORMAL,guest_supported_vendor:4},void 0===l?{}:{position:l},r?{teamfight_team_id:r}:void 0)).then(e=>{var t,i,o,l,a;let{data:d,logId:c}=e,{status_code:v}=d;if(null==M||M.linkmicApplyRequestLog(v),0===v){if(n(s.cK.LINKING),null==D||D.livesdkRtcApplyJoinRoomEvent({type:"apply"}),T.config[_.V9.AU_BigPartyAcceptNeedVerified]===_.q2.OPEN||T.config[_.V9.AU_AudioChatAcceptNeedVerified]===_.q2.OPEN)f.F.info((null==d?void 0:null===(i=d.data)||void 0===i?void 0:i.prompts)||"申请成功,等待主播通过",j.root);else{let e=null==d?void 0:null===(o=d.data)||void 0===o?void 0:o.prompts;e&&f.F.info(e,j.root)}(null==d?void 0:null===(t=d.data)||void 0===t?void 0:t.auto_join_full)&&g(!0),null==O||O.liveApplyLinkMicEvent({grouppk_group:"1"===r?"red":"blue"})}else 4016005===v?f.F.info("当前直播间仅支持粉丝连线,请先关注主播",j.root):30010===v?f.F.info("您当前未实名认证,请去手机端进行实名认证后重试",j.root):4004272===v?A(!0):f.F.info((null==d?void 0:null===(l=d.data)||void 0===l?void 0:l.prompts)||"申请上麦失败,请稍后重试",j.root);return 0===v?Promise.resolve(d):(u.kg.event(`[${p.Tn.Error}]${p.Mo.LiveApplyLinkError}`,{statusCode:v,logId:null!=c?c:"",message:(null==d?void 0:null===(a=d.data)||void 0===a?void 0:a.prompts)||"",is_client:(0,h.DT)()}),u.kg.error("申请上麦失败",d,c),Promise.reject(d))})},[n,G,U,d,g,T.config,j,A,k]),Y=C(),Z=P.useCallback(()=>(0,o.JJ)(G).then(e=>{var t,i,o,a,d;let{data:c,logId:_}=e,{status_code:v}=c;if(null==M||M.linkmicJoinChannelLog(v),null==D||D.livesdkRtcJoinChannelEvent({code:v}),0===v){if(n(s.cK.LINKED),null==c?void 0:null===(t=c.data)||void 0===t?void 0:t.delegate_setting){let{enable_delegate:e}=null==c?void 0:null===(a=c.data)||void 0===a?void 0:a.delegate_setting;localStorage.setItem(l.QU,e?r.eG.ON:r.eG.OFF)}let e=null==c?void 0:null===(o=c.data)||void 0===o?void 0:null===(i=o.linked_users)||void 0===i?void 0:i.find(e=>{var n;return(null===(n=e.user)||void 0===n?void 0:n.id_str)===(null==R?void 0:R.id_str)});e&&S(e.user_position),f.F.info("连线成功",j.root),(x.isGuestBattle()||x.isGroupFight()||x.isRoomBattle())&&setTimeout(()=>{null==O||O.liveAudiencePlayModeRoomLinkEvent()},2e3)}return 0===v?Promise.resolve(c):(u.kg.event(`[${p.Tn.Error}]${p.Mo.LiveJoinChannelError}`,{statusCode:v,logId:null!=_?_:"",message:(null==c?void 0:null===(d=c.data)||void 0===d?void 0:d.prompts)||"",is_client:(0,h.DT)()}),u.kg.error("加入连麦房间失败",c,_),Promise.reject(c))}),[j,G,n,S,R]),K=P.useCallback(e=>Promise.resolve(e).then(e=>{var t,i;if(n(s.cK.LINKED),null==e?void 0:null===(t=e.join_channel_data)||void 0===t?void 0:t.delegate_setting){let{enable_delegate:n}=null==e?void 0:null===(i=e.join_channel_data)||void 0===i?void 0:i.delegate_setting;localStorage.setItem(l.QU,n?r.eG.ON:r.eG.OFF)}return f.F.info("连线成功",j.root),(x.isGuestBattle()||x.isGroupFight()||x.isRoomBattle())&&setTimeout(()=>{null==O||O.liveAudiencePlayModeRoomLinkEvent()},2e3),Promise.resolve()}),[j,G,n,R]),B=P.useCallback(e=>{var n,t;return(k?o.Dw:o.VV)({room_id:G,to_user_id:(null==V?void 0:null===(n=V.user)||void 0===n?void 0:n.id_str)||"",sec_to_user_id:e||(null==V?void 0:null===(t=V.user)||void 0===t?void 0:t.sec_uid)||"",silence_type:c.m$.SILENCE_TYPE_NORMAL}).then(e=>{var n,t,o;let{data:r,logId:l}=e,{status_code:a}=r;if(null==M||M.linkmicSilenceRequestLog(a),0!==a)return u.kg.event(`[${p.Tn.Error}]${p.Mo.LiveApplySilenceError}`,{statusCode:a,logId:null!=l?l:"",message:(null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.prompts)||"",is_client:(0,h.DT)()}),u.kg.error("静音失败",r,l),f.F.info((null==r?void 0:null===(o=r.data)||void 0===o?void 0:o.prompts)||"申请静音失败,请稍后重试",j.root),Promise.reject(r);if(f.F.info("静音成功"),k){let e=new CustomEvent("webcast_linkmic_stop_audio",{detail:(0,i._)({},(null==r?void 0:r.data)||{})});null===(n=document)||void 0===n||n.dispatchEvent(e)}return Promise.resolve(r)})},[G,V,j,k]),W=P.useCallback(e=>{var n,t;return(k?o.sQ:o.AE)({room_id:G,to_user_id:(null==V?void 0:null===(n=V.user)||void 0===n?void 0:n.id_str)||"",sec_to_user_id:e||(null==V?void 0:null===(t=V.user)||void 0===t?void 0:t.sec_uid)||""}).then(e=>{var n,t,o;let{data:r,logId:l}=e,{status_code:a}=r;if(0!==a)return u.kg.event(`[${p.Tn.Error}]${p.Mo.LiveApplyUnSilenceError}`,{statusCode:a,logId:null!=l?l:"",message:(null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.prompts)||"",is_client:(0,h.DT)()}),u.kg.error("取消静音失败",r,l),f.F.info((null==r?void 0:null===(o=r.data)||void 0===o?void 0:o.prompts)||"申请取消静音失败,请稍后重试",j.root),Promise.reject(r);if(f.F.info("取消静音成功",j.root),k){let e=new CustomEvent("webcast_linkmic_start_audio",{detail:(0,i._)({},(null==r?void 0:r.data)||{})});null===(n=document)||void 0===n||n.dispatchEvent(e)}return Promise.resolve(r)})},[G,V,j,k]),H=P.useCallback(e=>{let{from:n,to:t}=e||{};return null==O||O.liveGuestSwitchSeatEvent(d,{from:n,to:t}),(k?o.n8:o.oX)({room_id:G,to_position:d}).then(e=>{let{data:n,logId:t}=e,{status_code:i}=n;if(0===i)return Promise.resolve(n);if(4004177===i)I()();else{var o,r;u.kg.event(`[${p.Tn.Error}]${p.Mo.LiveSwitchMicError}`,{statusCode:i,logId:null!=t?t:"",message:(null==n?void 0:null===(o=n.data)||void 0===o?void 0:o.prompts)||"",is_client:(0,h.DT)()}),f.F.info((null==n?void 0:null===(r=n.data)||void 0===r?void 0:r.prompts)||"切换麦位失败",j.root),u.kg.error("切换麦位失败",n,t)}return Promise.reject(n)})},[G,d,j,k]),q=P.useCallback(e=>{var n;return(0,o.SR)(G,e||(null==V?void 0:null===(n=V.user)||void 0===n?void 0:n.id_str)||"").then(e=>{var n,t,o;let{data:r,logId:l}=e;if((null==r?void 0:r.status_code)!==0&&(u.kg.event(`[${p.Tn.Error}]${p.Mo.LiveEnableVideoError}`,{statusCode:null==r?void 0:r.status_code,logId:null!=l?l:"",message:(null==r?void 0:null===(n=r.data)||void 0===n?void 0:n.prompts)||"",is_client:(0,h.DT)()}),f.F.info((null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.prompts)||"申请开启视频失败, 请稍后重试",j.root)),(null==r?void 0:r.status_code)!==0)return(null==r?void 0:r.status_code)===4004272&&A(!0),u.kg.error("开启视频连线失败",r,l),Promise.reject(r);if(k){let e=new CustomEvent("webcast_linkmic_open_video",{detail:(0,i._)({},(null==r?void 0:r.data)||{})});null===(o=document)||void 0===o||o.dispatchEvent(e)}return Promise.resolve(r)})},[G,V,j,k]),z=P.useCallback(e=>{var n;return(0,o.cJ)(G,e||(null==V?void 0:null===(n=V.user)||void 0===n?void 0:n.id_str)||"").then(e=>{var n,t,o;let{data:r,logId:l}=e;if((null==r?void 0:r.status_code)!==0&&(u.kg.event(`[${p.Tn.Error}]${p.Mo.LiveDisableVideoError}`,{statusCode:null==r?void 0:r.status_code,logId:null!=l?l:"",message:(null==r?void 0:null===(n=r.data)||void 0===n?void 0:n.prompts)||"",is_client:(0,h.DT)()}),f.F.info((null==r?void 0:null===(t=r.data)||void 0===t?void 0:t.prompts)||"申请关闭视频失败, 请稍后重试",j.root)),(null==r?void 0:r.status_code)!==0)return u.kg.error("开启视频连线失败",r,l),Promise.reject(r);if(k){let e=new CustomEvent("webcast_linkmic_stop_video",{detail:(0,i._)({},(null==r?void 0:r.data)||{})});null===(o=document)||void 0===o||o.dispatchEvent(e)}return Promise.resolve(r)})},[G,V,j,k]),$=P.useCallback((e,n)=>{(0,o.bZ)({room_id:G,to_user_id:e,sec_to_user_id:n,request_source:"admin_stop_in_preview"}).then(e=>{let{data:n,logId:t}=e;if((null==n?void 0:n.status_code)!==0){var i;f.F.info((null==n?void 0:null===(i=n.data)||void 0===i?void 0:i.prompts)||"断开连线失败",j.root)}return(null==n?void 0:n.status_code)===0?Promise.resolve(n):(u.kg.error("断开连线失败",n,t),Promise.reject(n))})},[G,j]),Q=P.useCallback(function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(0,o.Ix)({room_id:G,to_user_id:e,invite_type:n,to_enlarge_pos:t}).then(e=>{let{data:t,logId:i}=e;if((null==t?void 0:t.status_code)!==0){var o;f.F.info((null==t?void 0:null===(o=t.data)||void 0===o?void 0:o.prompts)||"设置主咖失败",j.root)}return(null==t?void 0:t.status_code)===0?(n===c.fE.EnlargeGuestInviteType_ENLARGE&&f.F.info("已向嘉宾发送邀请,同意后嘉宾放大至主咖位"),Promise.resolve(t)):(u.kg.error("设置主咖失败",t,i),Promise.reject(t))})},[G,j]),J=P.useCallback(e=>{(0,o.E3)({room_id:G,kickout_uids_str:e}).then(e=>{var n,t;let{data:i,logId:o}=e;return((null==i?void 0:i.status_code)!==0&&f.F.info((null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.prompts)||"取消全部主咖失败",j.root),(null==i?void 0:i.status_code)!==0)?(u.kg.error("取消全部主咖失败",i,o),Promise.reject(i)):(null==i?void 0:i.prompts)?(f.F.info((null==i?void 0:null===(t=i.data)||void 0===t?void 0:t.prompts)||"取消全部主咖失败",j.root),Promise.reject(i)):Promise.resolve(i)})},[G]),X=P.useCallback((e,n)=>{(0,o.YG)({room_id:G,to_user_id:e,reply_type:n}).then(e=>{var n,t;let{data:o,logId:r}=e;if((null==o?void 0:o.status_code)!==0&&f.F.info((null==o?void 0:null===(n=o.data)||void 0===n?void 0:n.prompts)||"回复邀请失败",j.root),(null==o?void 0:o.status_code)!==0)return u.kg.error("回复邀请失败",o,r),Promise.reject(o);if(k){let e=new CustomEvent("webcast_linkmic_open_video",{detail:(0,i._)({},(null==o?void 0:o.data)||{})});null===(t=document)||void 0===t||t.dispatchEvent(e)}return Promise.resolve(o)})},[G,j,k]);return{apply:F,leave:Y,join:Z,joinWithoutChannle:K,silence:B,unSilence:W,enableVideo:q,disableVideo:z,switchMic:H,kickout:$,enlargeInvite:Q,enlargeClose:J,applyCameraInvite:X,applyLinkInvite:P.useCallback((e,n,t)=>{let r=k?o.Ks:o.fF,l={room_id:G,sec_to_user_id:e,reply_type:n,link_type:t};k&&(l.to_user_id=e),r(l).then(e=>{var n,t;let{data:o,logId:r}=e;if((null==o?void 0:o.status_code)!==0){if((null==o?void 0:o.status_code)===30010){f.F.info("您当前未实名认证,请去手机端进行实名认证后重试",j.root);return}(null==o?void 0:o.status_code)===4004272&&A(!0),f.F.info((null==o?void 0:null===(n=o.data)||void 0===n?void 0:n.prompts)||"回复邀请失败",j.root)}if((null==o?void 0:o.status_code)!==0)return u.kg.error("回复邀请失败",o,r),Promise.reject(o);{u.kg.info("同意上麦回调",o),null==M||M.linkmicReadyToLink(N.CT.Invite);let e=new CustomEvent("webcast_join_room_invite",{detail:(0,i._)({},(0,a.OM)(null==o?void 0:o.data))});return null===(t=document)||void 0===t||t.dispatchEvent(e),Promise.resolve(o)}})},[G,j,A]),isNewVideoLinkmicRoom:k}}},110798:function(e,n,t){t.d(n,{Fk:function(){return S},Lq:function(){return T},wz:function(){return b}});var i=t(629686),o=t(402748);t(490629),t(706056),t(374954),t(240148),t(759943);var r=t(229757),l=t.n(r),a=t(198412),u=t.n(a),s=t(795233),d=t.n(s),c=t(908219),_=t.n(c),v=t(156674),m=t.n(v),f=t(101199),p=t(502615),h=t(950257),g=t(160197),E=t(746958),y=t(457596),I=t(181159),P=t(684864),L=t(473682),N=t(414061),C=t(494857);let S=(()=>{let e={};return[...Array(9)].forEach((n,t)=>{e[t]={idx:t}}),e})(),T=e=>{let n={};return[...Array(e)].forEach((e,t)=>{n[t]={idx:t}}),n},b=e=>{let{enable:n,setSeats:t,getUsers:r,getPositions:a,setLayout:s,layout:c,selfLinkMicId:v,onUsersUpdate:b,roomIdStr:A,getSeats:k,audioPower:R,linkRoomType:w="video",uiLayout:O,setUiLayout:x=d(),incomingPlayer:M=null,linkStatus:D,setIsPk:j}=e,{player:V}=(0,g.n)(),U=M||V,G=f.useRef(0),F=f.useCallback(_()((e,n)=>{var s,d,c,_,v,m,f,p,h;let g=r(),E=null===(v=window)||void 0===v?void 0:null===(_=v.__STORE__)||void 0===_?void 0:null===(c=_.roomStore)||void 0===c?void 0:null===(d=c.roomInfo)||void 0===d?void 0:null===(s=d.anchor)||void 0===s?void 0:s.id_str;if((null==e?void 0:e.length)===0&&(null===(m=Object.keys(g))||void 0===m?void 0:m.length)>1&&n===I.V_.LINKMICUILAYOUT_AUDIOCHAT_TOP2V4V4)return;let y=a(),P=!1,L=l()(S);if(n===I.V_.LINKMICUILAYOUT_LIVE_PARTNER_DYNAMIC||n===I.V_.LINKMICUILAYOUT_VIDEOEQUALDYNAMICLAYOUT?L={}:n===I.V_.LINKMICUILAYOUT_AUDIOCHAT_TOP2V4V4&&(L=T(10)),e.forEach(e=>{var t,i;let o;let r=g[u()(e,"uid_str","")];"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),[I.V_.LINKMICUILAYOUT_LIVE_PARTNER_DYNAMIC].includes(n)&&r&&"number"==typeof r.user_position&&(o=r.user_position),("number"==typeof o||"string"==typeof o)&&(L[o]={user:null!=r?r:null===(i=L[o])||void 0===i?void 0:i.user,idx:Number(o)}),(null===(t=k()[o])||void 0===t?void 0:t.linkmic_id_str)!==(null==r?void 0:r.linkmic_id_str)&&(P=!0),(!r||r.user_position!==o)&&(P=!0)}),Object.keys(y).forEach(e=>{L[e].info=(0,i._)({},y[e])}),e.length!==Object.keys(g).length&&(![I.V_.LINKMICUILAYOUT_VIDEOCHAT_ENLARGEGUEST1V6,I.V_.LINKMICUILAYOUT_VIDEOCHATFLOATWINDOWLAYOUT].includes(n)||0!==e.length)&&(P=!0),P&&b&&b(),1===Object.keys(L).length&&[I.V_.LINKMICUILAYOUT_LIVE_PARTNER_DYNAMIC,I.V_.LINKMICUILAYOUT_VIDEOEQUALDYNAMICLAYOUT].includes(n)&&(L[1]={idx:1}),!(null===(f=L[0])||void 0===f?void 0:f.user)){let e=Object.values(g).find(e=>{var n;return(null==e?void 0:null===(n=e.user)||void 0===n?void 0:n.id_str)===E});if(null==e?void 0:null===(h=e.content)||void 0===h?void 0:null===(p=h.linkmic_audience_content)||void 0===p?void 0:p.is_mic_hidden){t(L);return}let n=u()(Object.values(L).find(n=>{var t,i,o;return(null==n?void 0:null===(i=n.user)||void 0===i?void 0:null===(t=i.user)||void 0===t?void 0:t.id_str)===(null==e?void 0:null===(o=e.user)||void 0===o?void 0:o.id_str)}),"idx",-1);n>0&&(L[n]={idx:n}),L[0]=(0,o._)((0,i._)({},L[0]),{user:e})}t(L)},500),[v,k,w]),Y=f.useCallback(_()(function(e,n){var s,c,_,v,f,p,g,E,y;arguments.length>2&&void 0!==arguments[2]&&arguments[2];let I=r(),P=null===(f=window)||void 0===f?void 0:null===(v=f.__STORE__)||void 0===v?void 0:null===(_=v.roomStore)||void 0===_?void 0:null===(c=_.roomInfo)||void 0===c?void 0:null===(s=c.anchor)||void 0===s?void 0:s.id_str;if((null==e?void 0:e.length)===0&&(null===(p=Object.keys(I))||void 0===p?void 0:p.length)>1&&[h.yP.AUDIO_1V8,h.yP.AUDIO_GRID].includes(n))return;let L=a(),N=!1,C=l()(S);if(n===h.yP.VIDEO_DYNAMIC&&(C={}),e.forEach(e=>{var t,i,o;let r;let l=I[u()(e,"uid_str","")];if("number"==typeof(null==e?void 0:e.type)&&"number"==typeof(null==l?void 0:l.link_type)&&(l.link_type=e.type),"number"==typeof(null==e?void 0:e.p)?r=e.p:"string"==typeof(null==e?void 0:e.p)?r=Number(e.p):l&&"number"==typeof l.user_position&&(r=l.user_position),[h.yP.AUDIO_1V8,h.yP.AUDIO_GRID].includes(n)&&l&&"number"==typeof l.user_position){let e=Object.values(I).find(e=>(null==e?void 0:e.user_position)===0);(null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.id_str)===P&&(r=l.user_position)}if(n===h.yP.VIDEO_1V6){let e=m()(I);(null==e?void 0:e.some(e=>{var n,t;return null==e?void 0:null===(t=e.content)||void 0===t?void 0:null===(n=t.linkmic_audience_content)||void 0===n?void 0:n.is_enlarged}))?d()():r+=1}else n===h.yP.VIDEO_1V8?r+=1:n===h.yP.VIDEO_DYNAMIC_FLOAT?r+=1:n===h.yP.VIDEO_6V6&&(r=({0:0,1:1,2:6,3:7,4:2,5:3,6:8,7:9,8:4,9:5,10:10,11:11})[r]);let a=n!==h.yP.VIDEO_6V6||Number(r)<h.Lf[h.yP.VIDEO_6V6];"audio"===w&&(null==l?void 0:l.link_type)===1&&a&&(l.link_type=2),("number"==typeof r||"string"==typeof r)&&(n===h.yP.VIDEO_DYNAMIC?l&&(C[r]={user:l,idx:Number(r)}):C[r]={user:null!=l?l:null===(i=C[r])||void 0===i?void 0:i.user,idx:Number(r)}),void 0!==n&&(null===(o=k()[r])||void 0===o?void 0:o.linkmic_id_str)!==(null==l?void 0:l.linkmic_id_str)&&(N=!0),(!l||l.user_position!==r)&&(N=!0)}),Object.keys(L).forEach(e=>{C[e].info=(0,i._)({},L[e])}),e.length!==Object.keys(I).length&&(n!==h.yP.VIDEO_1V6||0!==e.length)&&(N=!0),N&&b&&b(),1===Object.keys(C).length&&n===h.yP.VIDEO_DYNAMIC&&(C[1]={idx:1}),!(null===(g=C[0])||void 0===g?void 0:g.user)){let e=Object.values(I).find(e=>{var n;return(null==e?void 0:null===(n=e.user)||void 0===n?void 0:n.id_str)===P});if(null==e?void 0:null===(y=e.content)||void 0===y?void 0:null===(E=y.linkmic_audience_content)||void 0===E?void 0:E.is_mic_hidden){t(C);return}let n=u()(Object.values(C).find(n=>{var t,i,o;return(null==n?void 0:null===(i=n.user)||void 0===i?void 0:null===(t=i.user)||void 0===t?void 0:t.id_str)===(null==e?void 0:null===(o=e.user)||void 0===o?void 0:o.id_str)}),"idx",-1);n>0&&(C[n]={idx:n}),C[0]=(0,o._)((0,i._)({},C[0]),{user:e})}t(C)},500),[v,k,w]),Z=f.useCallback(e=>{e.forEach(e=>{let n=u()(e,"uid_str","");if(0!==e.talk)try{null==R||R.push(n,e)}catch(e){}})},[R]),K=f.useCallback(e=>{s(e),b&&b()},[b,s]),B=f.useCallback(e=>{if(100===(e=e.detail||e).code&&!!n)try{let n=new TextDecoder().decode(e.content),i=(0,E.KR)(n);if(i&&i.app_data){let e=JSON.parse(i.app_data);if(G.current>e.timestamp)return;G.current=e.timestamp;let{ui_layout:n}=e;if((0,P.D)().includes(Number(n))){let t=(0,L.M2)(Number(n));c!==t&&K(t),F(e.grids,n),Z(e.grids)}else switch(e.ver){case y.t.AUDIO_TALK_ROOM:c!==h.yP.AUDIO_1V8&&c!==h.yP.AUDIO_GRID&&K(h.yP.AUDIO_1V8),Y(e.grids,h.yP.AUDIO_1V8),Z(e.grids);break;case y.t.AUDIO_TALK_ROOM_1V8:c!==h.yP.AUDIO_1V8&&K(h.yP.AUDIO_1V8),Y(e.grids,h.yP.AUDIO_1V8),Z(e.grids);break;case y.t.VIDEO_TALK_ROOM:case y.t.VIDEO_EQUAL:c!==h.yP.VIDEO_GRID&&K(h.yP.VIDEO_GRID),Y(e.grids,h.yP.VIDEO_GRID),Z(e.grids);break;case y.t.VIDEO_DYNAMIC:c!==h.yP.VIDEO_DYNAMIC&&K(h.yP.VIDEO_DYNAMIC),Y(e.grids,h.yP.VIDEO_DYNAMIC),Z(e.grids);break;case y.t.VIDEO_DYNAMIC_FLOAT:c!==h.yP.VIDEO_DYNAMIC_FLOAT&&K(h.yP.VIDEO_DYNAMIC_FLOAT),Y(e.grids,h.yP.VIDEO_DYNAMIC_FLOAT),Z(e.grids);break;case y.t.VIDEO_C:c!==h.yP.VIDEO_1_V_8&&K(h.yP.VIDEO_1_V_8),Y(e.grids,h.yP.VIDEO_1_V_8),Z(e.grids);break;case y.t.VIDEO_DYNAMIC_1V6:c!==h.yP.VIDEO_1_V_6&&K(h.yP.VIDEO_1_V_6),Y(e.grids,h.yP.VIDEO_1_V_6),Z(e.grids);break;case y.t.VIDEO_DYNAMIC_1V3:c!==h.yP.VIDEO_1_V_3&&K(h.yP.VIDEO_1_V_3),Y(e.grids,h.yP.VIDEO_1_V_3),Z(e.grids);break;case y.t.VIDEO_T1B8:c!==h.yP.VIDEO_T1_V_B8&&K(h.yP.VIDEO_T1_V_B8),Y(e.grids,h.yP.VIDEO_T1_V_B8),Z(e.grids);break;case y.t.C_VIDEO_CAMERA:case y.t.VIDEO_CAMERA_NEW:c!==h.yP.VIDEO_1V6&&K(h.yP.VIDEO_1V6),Y(e.grids,h.yP.VIDEO_1V6),Z(e.grids);break;case y.t.VIDEO_1V8:c!==h.yP.VIDEO_1V8&&K(h.yP.VIDEO_1V8),Y(e.grids,h.yP.VIDEO_1V8),Z(e.grids);break;case y.t.VIDEO_2V4v4:c!==h.yP.VIDEO_2V4V4&&K(h.yP.VIDEO_2V4V4),Y(e.grids,h.yP.VIDEO_2V4V4),Z(e.grids);break;case y.t.VIDEO_6V6:c!==h.yP.VIDEO_6V6&&K(h.yP.VIDEO_6V6),A&&A===e.channel_id&&Y(e.grids,h.yP.VIDEO_6V6),Z(e.grids);break;case y.t.MULTI_ANCHOR:case y.t.PK:null==j||j(!0),c&&K(void 0);break;default:c&&K(void 0),null==j||j(!1)}}else{var t;(null==i?void 0:null===(t=i.source)||void 0===t?void 0:t.includes("TTLiveSDK"))&&K(void 0)}i&&i.audio_subtitle&&D!==C.cK.LINKED&&N.emit(N.EVENT.AudioStageUpdate,i.audio_subtitle)}catch(e){}},[Y,A,c,K,Z,n,F,O,x,D]);return f.useEffect(()=>(null==U||U.on(p.FP.SEI,B),()=>{null==U||U.off(p.FP.SEI,B)}),[U,B,n]),null}},220811:function(e,n,t){t.d(n,{dY:function(){return o},oQ:function(){return r}});var i=t(861581);let o=e=>`sslocal://webcast_webview?url=https%3A%2F%2Flf-webcast-gr-sourcecdn.bytegecko.com%2Fobj%2Fbyte-gurd-source-gr%2Fwebcast%2Fmono%2Fh5%2Frevenue_gift_exhibition_hall_h5_douyin%2Fpages%2Fgift_list%2Findex.html%3Fprofile_user_id%3D${e}%26showPcClose%3Dtrue`,r=(e,n)=>{let t="";return t=n?encodeURIComponent(`${n}?profile_user_id=${e}`):encodeURIComponent(`${i.w.Exhibition}&profile_user_id=${e}`),`sslocal://lynxview?url=${t}&type=popup&gravity=bottom&height_percent=75&web_bg_color=ff060a19&radius=23&radius_bottom_right=0&radius_bottom_left=0&enable_preload=all&add_safe_area_height=0&use_wk_falcon=2`}},811776:function(e,n,t){t.d(n,{gE:function(){return D},NM:function(){return V},Z4:function(){return Y},yG:function(){return O},zS:function(){return w},L4:function(){return j},BC:function(){return G},sk:function(){return F},B7:function(){return Z}}),t("490629");var i=t("320165"),o=t("101199"),r=t("255436"),l=t("559519"),a=t("279198"),u=t("964530"),s=t("795233"),d=t.n(s),c=t("806217"),_=t("695506"),v=t("147693"),m=t("542901"),f=t("629686"),p=t("890710"),h=t("928021"),g=t("26333"),E=t("469935"),y=t.n(E),I=t("237987"),P=t("506926");function L(){var e,n;let{singletonStore:{message:t},eventStore:{pkEvent:r}}=(0,m.o)(),{pipWin:l}=(0,g.ds)(),a=(0,o.useRef)(d()),u=o.useRef(null),[s,c]=(0,o.useState)(null),_=V(),v=null==s?void 0:null===(n=s.animation)||void 0===n?void 0:null===(e=n.url_list)||void 0===e?void 0:e[0],E=(null==s?void 0:s.status)!==1;return(0,o.useEffect)(()=>{if(!!_)return null==t?void 0:t.on("BattleDrawPropMessage",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],{payload:n}=e[0];n&&c(n)})},[t,_]),(0,o.useEffect)(()=>{var e;if(!v)return;let n=null===(e=u.current)||void 0===e?void 0:e.getBoundingClientRect(),t=(null==l?void 0:l.document)||document,o=t===document?(0,P.EF)(h.q):t.getElementById(h.q),_=E?n:(null==o?void 0:o.getBoundingClientRect())||n;if(!_||!n)return;let m=t.createElement("div");t.body.appendChild(m);let g=()=>{try{var e;null===(e=m.parentElement)||void 0===e||e.removeChild(m),(0,p.unmountComponentAtNode)(m),c(null),a.current=d()}catch(e){}};return a.current=g,(0,p.render)((0,i.jsx)("div",{className:y()(I.default.propDraw,(!!(null==l?void 0:l.document)||E)&&I.default.propDrawFail),style:{"--originx":`${n.x+n.width/2}px`,"--originy":`${n.y+n.height/2}px`,"--targetx":`${_.x+_.width/2}px`,"--targety":`${_.y+_.height/2-(_!==n?18:0)}px`},onAnimationEnd:()=>{g()},children:(0,i.jsx)("img",{src:v})}),m),window.collectEvent("livesdk_connection_get_buffer_card_result_show",(0,f._)({get_type:(null==s?void 0:s.reason)===1?"mvp":"high_money",is_get_buffer_card:Number(!E),prop_id:null==s?void 0:s.prop_id},null==r?void 0:r.getPKPropCardCommonParams())),()=>{g()}},[v,E]),(0,o.useEffect)(()=>()=>{a.current()},[]),(0,i.jsx)("div",{className:I.default.propDrawAnchor,ref:u})}var N=t("964591"),C=t.p+"media/fogBothBar.5f8674552ec844fa.webp",S=t.p+"media/fogRightBar.3dfecd1bd9263758.webp",T=t.p+"media/leftFreezeBar.0ff814886f92a44b.webp",b=t.p+"media/rightFreezeBar.f9696e67502b3f41.webp";let A={enablePropCard:!1,anchorEffectInfoMap:{},inEffectAnchorEffectInfoMap:{},openPropCardDesc:d(),openPropCardRules:d(),setFakePropInfo:d(),updateAnchorEffectInfoMapByJSON:d()},k=(0,l.kr)(A),R=e=>{let n=(0,u.dP)(e),[t,i]=(0,o.useState)({}),r=(0,c.Z)(()=>{i(n=>(0,u.PG)(e,n,!0))});return(0,_.Z)(()=>{r()},n?void 0:1e3,{immediate:!0}),(0,o.useEffect)(()=>{r()},[e]),t},w=(0,o.memo)((0,N.Pi)(e=>{let{children:n}=e,{singletonStore:{message:t},pkStore:{pkId:l,pkCountDown:a,isInPK:s}}=(0,m.o)(),[d,_]=(0,o.useState)(null),[v,f]=(0,o.useState)({}),p=(0,c.Z)(e=>{if(!e){f({});return}f((0,u.x$)(e))});(0,o.useEffect)(()=>{s||f({})},[s]),(0,o.useEffect)(()=>{null==t||t.on("BattleEffectContainerMessage",e=>{var n,t;let i=null===(t=e.find(e=>{var n;return(null==e?void 0:null===(n=e.payload)||void 0===n?void 0:n.battle_id)===l}))||void 0===t?void 0:null===(n=t.payload)||void 0===n?void 0:n.battle_effect_info;i&&p(i)}),null==t||t.on("BattleUpdatePropCardTaskMessage",e=>{var n,t;let i=null===(t=e.find(e=>{var n;return(null==e?void 0:null===(n=e.payload)||void 0===n?void 0:n.battle_id)===l}))||void 0===t?void 0:null===(n=t.payload)||void 0===n?void 0:n.battle_effect_info;i&&p(i)})},[t,l]),(0,o.useEffect)(()=>{!a&&f({})},[!a]);let h=(0,u.dP)(v);(0,o.useEffect)(()=>{if(h)return;let e=r.Z.setIntervalWarp(()=>{f(e=>(0,u.PG)(e,e))});return()=>{r.Z.clearIntervalWarp(e)}},[h]);let g=s?v:{},E=R(g);return(0,i.jsxs)(k.Provider,{value:{anchorEffectInfoMap:g,inEffectAnchorEffectInfoMap:E,openPropCardDesc:()=>{},openPropCardRules:()=>{},fakePropInfo:d,setFakePropInfo:_,updateAnchorEffectInfoMapByJSON:p,enablePropCard:!0},children:[n,(0,i.jsx)(L,{})]})})),O=(0,a.Z)(k),x=()=>O(e=>e.anchorEffectInfoMap),M=()=>O(e=>e.inEffectAnchorEffectInfoMap),D=e=>{let n=M();return(0,o.useMemo)(()=>{var t,i;return(null==n?void 0:null===(i=n[e])||void 0===i?void 0:null===(t=i[u.du.FreezeBuff])||void 0===t?void 0:t.length)>0},[e,n])},j=e=>O(n=>(0,u.PL)(e,n.anchorEffectInfoMap)),V=()=>O(e=>e.enablePropCard),U=e=>{var n;let t=M();return((null==t?void 0:null===(n=t[e])||void 0===n?void 0:n[u.du.Fog])||[]).length>0},G=()=>{let e=M();return(0,o.useMemo)(()=>(0,u.To)(e),[e])},F=e=>{let n=U(e);return{isAnchorInFog:n,isSomeAnchorInSuperFogEffect:!!G()}},Y=e=>{let{leftAnchorIdList:n=[],rightAnchorIdList:t=[]}=e,i=x(),r=M(),l=O(e=>e.fakePropInfo),{fakeEffect:a,fakeEffectIsSuperFog:s}=(0,o.useMemo)(()=>{let e={fakeEffect:void 0,fakeEffectIsSuperFog:!1},{type:t,sendTime:o}=l||{};if(!t)return e;for(let e of n){var r,a;let n=null==i?void 0:null===(a=i[e])||void 0===a?void 0:null===(r=a[t])||void 0===r?void 0:r.find(e=>Number(null==e?void 0:e.insert_time)>=o);if(n)return{fakeEffect:n,fakeEffectIsSuperFog:(null==n?void 0:n.is_super_prop)&&(0,u.q7)(null==n?void 0:n.type)}}return e},[i,l,n]),d=G(),c=s?a:d,_=!!c,{leftEffectInfo:v,rightEffectInfo:m,repeatedEffect:f}=(0,o.useMemo)(()=>{let e=e=>{if(!e||!(0,u.gQ)(e))return null;for(let o of n){var t,i;let n=null==r?void 0:null===(i=r[o])||void 0===i?void 0:null===(t=i[null==e?void 0:e.type])||void 0===t?void 0:t.find(n=>(null==n?void 0:n.insert_time)!==(null==e?void 0:e.insert_time));if(n)return n}},i=(()=>{for(let e of n){let{firstEffect:n}=(0,u.PL)(e,r);if(n)return n}})();if((!i||(0,u.q7)(null==i?void 0:i.type))&&c||s)return{leftEffectInfo:c,rightEffectInfo:c,repeatedEffect:e(c)};let o=a||i;return{leftEffectInfo:o,rightEffectInfo:(()=>{for(let i of t){var e,n;let t=null===(e=(0,u.Md)({anchorId:i,anchorEffectInfoMap:r,type:u.du.FreezeBuff}))||void 0===e?void 0:e[0];if(t)return t;let o=null===(n=(0,u.Md)({anchorId:i,anchorEffectInfoMap:r,type:1}))||void 0===n?void 0:n[0];if(o)return o}})(),repeatedEffect:o?e(o):null}},[r,n,t,c,a,s]),p=(0,u.FD)(v),h=(0,u.FD)(m),g=(0,u.FD)(f).barIcon,E=(0,u.q7)(null==v?void 0:v.type),y=(0,u.q7)(null==m?void 0:m.type),I=(0,u.W5)(null==v?void 0:v.type),P=(0,u.W5)(null==m?void 0:m.type),L=P?h.barIcon:p.barIcon,N=E||y||_,A=!v&&y,[k,R]=(0,o.useMemo)(()=>I&&P?[T,b]:I&&!P?[T,void 0]:!I&&P?[void 0,b]:E&&y?[C,C]:E&&!y?[null==p?void 0:p.barAuraIcon,void 0]:!v&&y?[void 0,S]:[null==p?void 0:p.barAuraIcon,void 0],[v,m,_]),w=!R&&h.barMiniIcon;return{leftEffectInfo:v,rightEffectInfo:m,needPkBarAlignCenter:N,needHideCenterIcon:A,centerIcon:L,leftAuraUrl:k,rightAuraUrl:R,rightMiniIcon:w,hideRightScore:(0,o.useMemo)(()=>_||t.some(e=>{var n;return null===(n=(0,u.Md)({anchorId:e,anchorEffectInfoMap:r,type:1}))||void 0===n?void 0:n.length}),[t,r,_]),hideLeftScore:_,isSomeAnchorInSuperFogEffect:_,repeatedCenterIcon:g}},Z=e=>{let{anchorId:n,showSelfFrezze:t}=e,{firstEffect:i,effectList:r,anchorEffectMap:l}=j(n),{tipText:a,targetEndTime:s,count:d,value:c}=(0,o.useMemo)(()=>{var e,n,o,a,s,d;if(!i)return{tipText:null,targetEndTime:null};let c=null===(e=l[u.du.FreezeBuff])||void 0===e?void 0:e[0];if(c){let e=(null===(o=c.prop_card_task)||void 0===o?void 0:o.current_value_str)||(null===(a=c.prop_card_task)||void 0===a?void 0:a.current_value)||"0",n=null===(s=c.prop_card_task)||void 0===s?void 0:s.effect_num;return{tipText:t?"你的待解冻值":"定身",count:n,value:e,totalValue:(null===(d=c.prop_card_task)||void 0===d?void 0:d.total_value)||e}}let{name:_,type:v,is_super_prop:m}=i,f=Object.entries(l).some(e=>{let[n,t]=e;return Number(n)!==v&&(null==t?void 0:t.length)}),p=null===(n=l[v])||void 0===n?void 0:n.some(e=>e.is_super_prop!==m);if(!f&&!p)return{tipText:`${_}生效中`,targetEndTime:Math.max(...l[i.type].map(e=>Number(e.end_time))),count:null};let h=(0,u.hN)(r);return{tipText:`${h?"超级":""}道具卡生效中`,targetEndTime:Math.max(...r.map(e=>Number(e.end_time))),count:r.length}},[i,t,l,r]);return{tipText:a,count:d,countDown:Math.floor((0,v.Z)({targetDate:s?new Date(s):void 0})[0]/1e3),firstEffect:i,value:c,totalValue:c}}},928021:function(e,n,t){t.d(n,{q:function(){return i}});let i="gift-icon-id"},252317:function(e,n,t){var i=t(629686),o=t(402748),r=t(811603);t(679308),t(706056),t(362051),t(117232);var l=t(101199),a=t(198412),u=t.n(a),s=t(880327),d=t(620865),c=t(601034),_=t(499059),v=t(953851),m=t(638052),f=t(19277),p=t(409250),h=t(426038),g=t(587554),E=t(396868),y=t(414061),I=t(687581),P=t(618759),L=t(709705),N=t(205082),C=t(57003),S=t(160197),T=t(119522),b=t(724146),A=t(764283),k=t(514873),R=t(384560),w=t(656671),O=t(174207),x=t(542901),M=t(355570),D=t(575697),j=t(806217),V=t(325322),U=t(917037),G=t(536793),F=t(690193);let Y=()=>{if(!(0,s.r)())return Array.from(document.querySelectorAll(".giftRechargeContaner")).find(e=>e.getBoundingClientRect().x>0)};n.Z=e=>{let{isInit:n=!1,processAfterFirstFrame:t=!1}=e||{},{userStore:{userInfo:a},roomStore:{roomInfo:s},linkmicStore:{choosePeopleArr:Z,useChoosePeopleFunc:K,eggModeInfo:B,linkMicSeats:W,selectedGiftWebcastUid:H},giftStore:{giftStatus:q,giftList:z,effectList:$,balance:Q,giftPanelShowFrom:J,setGiftComboHint:X,setGiftMessages:ee,setGiftPages:en,setEffectList:et,setBalance:ei,setGiftExtra:eo,setGiftLayer:er,setPaygrade:el},rechargeStore:{rechargeAuthStatus:ea},eventStore:{giftEvent:eu,slardarEvent:es}}=(0,x.o)(),{name:ed}=(0,C.V)(),{showRecharge:ec,hideRecharge:e_,updateRecharge:ev,hideOtherRecharge:em}=(0,T.y)({container:Y}),{showRecharge:ef,hideRecharge:ep}=(0,V.C)(),eh=(0,l.useRef)(!0),{player:eg}=(0,S.n)(),eE=u()(a,"id_str",""),ey=!!eE,eI=u()(s,"roomId",""),eP=u()(s,"anchor.sec_uid",""),eL=u()(s,"anchor.id_str",""),eN=(null==Z?void 0:Z[0])||"",eC=u()(s,"room.episode_extra"),eS=u()(eC,"episode_id_str",0)||0,eT=u()(eC,"mod.episode_stage"),eb=u()(w.$F,eT,w.dq.NORMAL),eA=u()(s,"room.others.group_live_data.is_group_live",0),{rechargeConfig:ek}=(0,d.K)(),eR=(0,G.T)(),ew=(0,l.useCallback)(async function(){var e,n,t,r,l,a;let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{type:d="recharge",balance:I=0,amount:P=0,sendGiftParams:L}=u,N={enter_from_merge:(0,c.yW)(),show_reason:null!==(l=w.St[d])&&void 0!==l?l:"other",live_window_type:null!==(a=null===(e=_.Le.getConfig(_.gI.LiveWindowStatus))||void 0===e?void 0:e.type)&&void 0!==a?a:"no_live_window",if_live_play:1,room_id:eI,anchor_id:eL,follow_status:(0,R.qZ)(null==s?void 0:null===(t=s.anchor)||void 0===t?void 0:null===(n=t.follow_info)||void 0===n?void 0:n.follow_status)?1:0},C=z.find(e=>e.id===(null==L?void 0:L.gift_id));null==em||em();let S=await (null===(r=v.a.getIAPRechargeParams)||void 0===r?void 0:r.call(v.a)),T=e=>{m.logInstance.sendLog("livesdkRechargeShowDuration",(0,o._)((0,i._)({},N),{charge_reason:d,duration:(null==e?void 0:e.duration)||0,if_recharge_success:(null==e?void 0:e.isSuccess)?1:0}))},b=(0,f.Dr)(p.Q.getItem({sKey:h.CookieKeys.Theme}));(0,g.jo)()?ef({showOfficialEntrance:!1,onShow:()=>{m.logInstance.sendLog("livesdkRechargeShowByContainer",(0,o._)((0,i._)({},N),{load_type:"vmok",charge_reason:d}))},container:Y(),requestPublicParams:S,type:d,title:U.B[d],needRechargePrice:I,giftPrice:P,additionalLogParams:N,onClose:T,theme:b,autoNextType:L?"gift":void 0,onAutoNextChange:e=>{L&&(eh.current=e,m.logInstance.sendLog("rechargeSendGiftClick",(0,o._)((0,i._)({},N),{status:e?"on":"off"})))},autoSendGiftParams:{giftImg:null==C?void 0:C.icon,giftName:null==C?void 0:C.name,balance:I,isEnoughMoney:!0},showRechargeResult:!1,onRechargeSuccess:e=>{let{newBalance:n=0}=e;ep(),eU(),m.logInstance.sendLog("livesdkRechargeSuccessByContainer",(0,o._)((0,i._)({},N),{load_type:"vmok",charge_reason:d})),eh.current&&L&&n>=P?eG((0,o._)((0,i._)({},L),{isAutoNext:!0})):E.F.info("充值成功")},onCombosItemClick:e=>{let{type:n,combo:t={}}=e||{};L&&"manual"===n&&y.emit(y.EVENT.updateRechargeAutoNext,{isEnoughMoney:Number(t.diamond_count)>=I,balance:I,giftImg:null==C?void 0:C.icon,giftName:null==C?void 0:C.name})}}):ec({requestPublicParams:S,type:d,balance:I,amount:P,additionalLogParams:N,onClose:T,theme:b,onAutoNextChange:e=>{L&&m.logInstance.sendLog("rechargeSendGiftClick",(0,o._)((0,i._)({},N),{status:e?"on":"off"}))},autoNext:!0,autoNextHtml:L?(0,M.w)({giftImg:null==C?void 0:C.icon,giftName:null==C?void 0:C.name,balance:I,coinName:(null==ek?void 0:ek.name)||"抖币",isEnoughMoney:!0}):void 0,onCombosItemClick:e=>{let{type:n,combo:t={}}=e||{};L&&"manual"===n&&ev({autoNextHtml:(0,M.w)({giftImg:null==C?void 0:C.icon,giftName:null==C?void 0:C.name,balance:I,coinName:(null==ek?void 0:ek.name)||"抖币",isEnoughMoney:Number(t.diamond_count)>=I})})},showRechargeResult:!1,onSuccess:e=>{let{autoNext:n,balance:t=0}=e;e_(),eU(),n&&L&&t>=P?eG((0,o._)((0,i._)({},L),{isAutoNext:!0})):E.F.info("充值成功")}}),(0,k.rp)(eg)},[eg,ec,eL,eI,s,ek,z,ef,ep]),eO=(0,l.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};O.JL((0,i._)({from_room_id:eI,to_room_id:eI,from_anchor_id:eL,to_user_id:eN||eL,gift_ids:null==e?void 0:e.gift_id},e)).then(n=>{let{data:t,logId:i}=n;if(0!==u()(t,"status_code"))return A.kg.error("获取礼物额外信息失败",t,i),Promise.reject(t);{let n=u()(t,"data.gift_extra",[]);return n.length>0&&eo(Number(null==e?void 0:e.gift_id),n),Promise.resolve(n)}})},[eI,eL,eo,eN]),ex=(0,l.useCallback)(e=>O.Hv((0,i._)({},e)).then(e=>{let{data:n,logId:t}=e;if(0!==u()(n,"status_code"))return A.kg.error("获取送礼消费分层失败",n,t),Promise.reject(n);{let e=u()(n,"data.gift_layer",0);return er(e),Promise.resolve(e)}}),[]),eM=(0,l.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O.JL((0,i._)({from_room_id:eI,to_room_id:eI,from_anchor_id:eL,to_user_id:eL,gift_ids:null==e?void 0:e.gift_id},e)).then(e=>{let{data:n,logId:t}=e;return 0===u()(n,"status_code")?Promise.resolve(u()(n,"data.gift_extra",[])):(A.kg.error("获取礼物额外信息失败",n,t),Promise.reject(n))})},[eI,eL,eo]),eD=(0,j.Z)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O.Xq((0,i._)({room_id:eI,to_room_id:eI,sec_anchor_id:eP,sec_to_user_id:eP,gift_scene:eb,to_episode_id:eS,fetch_giftlist_from:3},e)).then(async e=>{var n,t;let{data:i,logId:o}=e,r=u()(i,"status_code"),l=(null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.pages)||[];return 0===r?(en((0,k.Zk)({rawGiftPages:l,giftScene:eb})),await (0,b.v2)(),en((0,k.BU)(l)),Promise.resolve(i)):(E.F.info(u()(i,"data.prompts","获取礼物失败,请稍后重试")),A.ZN.error(I.Mo.LiveGiftListError,{content:{statusCode:r,message:(null==i?void 0:null===(t=i.data)||void 0===t?void 0:t.prompts)||"",logId:null!=o?o:"",is_client:(0,P.DT)(),data:i}}),Promise.reject(i))})}),ej=(0,l.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return arguments.length>1&&void 0!==arguments[1]&&arguments[1],t&&await (0,b.v2)(),O.ao((0,i._)({is_living:!1,download_assets_from:3},e),(null==eR?void 0:eR.effectGzip)?{"X-Tlb-Abtest":"br_max_length=5m,gzip_max_length=5m"}:{}).then(e=>{var n;let{data:t,logId:i}=e,o=u()(t,"status_code");if(0===o){let e=u()(t,"data.assets",[]);return et((0,k.Js)(e)),Promise.resolve(t)}return E.F.info(u()(t,"data.prompts","获取特效失败,请稍后重试")),A.ZN.error(I.Mo.LiveGiftEffectError,{content:{statusCode:o,message:(null==t?void 0:null===(n=t.data)||void 0===n?void 0:n.prompts)||"",logId:null!=i?i:"",is_client:(0,P.DT)(),data:t}}),Promise.reject(t)})},[et]),eV=(0,l.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return O.ao((0,i._)({is_living:!1,download_assets_from:3},e)).then(e=>{var n;let{data:t,logId:i}=e,o=u()(t,"status_code");if(0===o){let e=u()(t,"data.assets",[]);return Promise.resolve((0,k.Js)(e)[0])}return A.ZN.error(I.Mo.LiveSingleEffectError,{content:{statusCode:o,message:(null==t?void 0:null===(n=t.data)||void 0===n?void 0:n.prompts)||"",logId:null!=i?i:"",is_client:(0,P.DT)(),data:t}}),Promise.reject()})},[]),eU=(0,l.useCallback)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ey?O.sb((0,i._)({},e)).then(e=>{let{data:n,logId:t}=e,o=u()(n,"status_code");return 0===o?(ei(O.Jh(u()(n,"data"))),Promise.resolve(n)):(A.kg.event(`[${I.Tn.Error}]${I.Mo.LiveBalanceError}`,(0,i._)({statusCode:o,logId:null!=t?t:"",is_client:(0,P.DT)()},n)),E.F.info(u()(n,"data.prompts",`获取${ed}余额失败,请稍后重试`)),A.kg.error(`获取${ed}余额失败`,n,t),Promise.reject(n))}):0},[ey,ed,ei]),eG=(0,l.useCallback)(async function(){var e,n,t,l,s,d,c,_,v,m,f,p,h,g,C;let S=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},T=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!ey)return await (0,k.m8)("登录后即可送礼","live_gift"),(0,k.rp)(eg),Promise.reject();if(!q)return E.F.info("暂无送礼权限,请稍后重试"),(0,k.rp)(eg),Promise.reject();let{isToAnchor:b,giftSource:x,pageType:M,isAutoNext:j,isFromContainer:V=0}=S,U=(0,r._)(S,["isToAnchor","giftSource","pageType","isAutoNext","isFromContainer"]);if(null==es||null===(e=es.sendGiftApiEvent)||void 0===e||e.call(es,{params:S}),K&&!b){let{count:e,price:n}=S;if(n*e*(null!==(m=null==Z?void 0:Z.length)&&void 0!==m?m:0)>w.sF)return E.F.info("该礼物不支持成组送全麦"),S.count>1&&(null==eu||null===(f=eu.liveGiftGroupClick)||void 0===f||f.call(eu,{peopleCount:null!==(p=null==Z?void 0:Z.length)&&void 0!==p?p:1,giftId:null==S?void 0:S.gift_id,pageType:M,result:"fail"})),Promise.reject()}let G="request_song_list"===x?[]:K&&!b&&null!==(h=null==Z?void 0:Z.map(e=>e))&&void 0!==h?h:[eL];if(G.includes(eL)&&eE===eL)return E.F.info("不可为自己送礼"),(0,k.rp)(eg),Promise.reject();if(!eI)return Promise.reject();let Y=S.price*S.count,en="number"==typeof Y&&Y-Q>0,et=K&&!b&&(null==G?void 0:G.length)===1?null==G?void 0:G[0]:eL,ei=null===(t=Object.values(W||{}))||void 0===t?void 0:null===(n=t.find)||void 0===n?void 0:n.call(t,e=>{var n,t;return(null==e?void 0:null===(t=e.user)||void 0===t?void 0:null===(n=t.user)||void 0===n?void 0:n.id_str)===et});return O.hF((0,i._)((0,o._)((0,i._)({room_id:eI,to_room_id:(null==ei?void 0:null===(s=ei.user)||void 0===s?void 0:null===(l=s.user)||void 0===l?void 0:l.own_room_id)||eI,to_user_id:et,to_user_ids:K&&!b&&(null==G?void 0:G.length)!==1?JSON.stringify(G):""},H&&!b&&(null==G?void 0:G.length)===1?{to_webcast_uid:H}:{}),{room_anchor_id:eL,to_episode_id:eS,send_type:4,send_scene:null===k.Rc||void 0===k.Rc?void 0:(0,k.Rc)({isGroupLive:eA,useChoosePeopleFunc:K,anchorId:eL,linkMicSeats:W,toUserId:et}),gift_source:0,buff_level:0,tags_extra:JSON.stringify({gift_source:x,enter_from_merge:null!==(g=null===(c=window)||void 0===c?void 0:null===(d=c.__INVISIBLE_QUERY__)||void 0===d?void 0:d.enter_from_merge)&&void 0!==g?g:"",enter_method:null!==(C=null===(v=window)||void 0===v?void 0:null===(_=v.__INVISIBLE_QUERY__)||void 0===_?void 0:_.enter_method)&&void 0!==C?C:""})}),U)).then(async e=>{var n,t,r,l,s,d,c,_,v,m,f,p,h;let g;let{data:C,logId:b}=e,O=u()(C,"status_code");(0,F.WH)("SendGift_Record",(0,o._)((0,i._)({},S),{preNeedRecharge:en,nowNeedRecharge:40001===O,code:O,totalPrice:Y,balance:Q})),null==es||null===(n=es.sendGiftApiCbEvent)||void 0===n||n.call(es,{params:S,data:C}),S.count>1&&(null==eu||null===(t=eu.liveGiftGroupClick)||void 0===t||t.call(eu,{peopleCount:null!==(r=null==Z?void 0:Z.length)&&void 0!==r?r:1,giftId:u()(C,"data.gift_id"),pageType:M,result:0===O?"success":"fail"}));try{let e=u()(C,"data.diy_item_info","[]");e&&(g=JSON.parse(e))}catch(e){}if(0===O){let e=(0,k.mL)(u()(C,"data"),z,$,a,g,u()(U,"count"));(null==C?void 0:null===(l=C.data)||void 0===l?void 0:l.combo_hint)&&(null==C?void 0:null===(s=C.data)||void 0===s?void 0:s.gift_id)&&X({[C.data.gift_id]:{comboHint:null==C?void 0:null===(v=C.data)||void 0===v?void 0:v.combo_hint,curCount:null==C?void 0:null===(m=C.data)||void 0===m?void 0:m.combo_count}}),el(2);let n=null===(d=null!==(f=null==B?void 0:null===(_=B.egg_info)||void 0===_?void 0:null===(c=_.teamfight_egg_info)||void 0===c?void 0:c.team_egg_map)&&void 0!==f?f:{})||void 0===d?void 0:d[`${eI}`];(0,L.qQ)(N.storage.LocalStorageKeys.SendGiftTime,new Date().getTime()),ee(e),eU(),G.forEach(e=>{var t,o,r,l,a,s,d,c;null==eu||null===(l=eu.liveGiftSendEvent)||void 0===l||l.call(eu,(0,i._)({gift_id:u()(C,"data.gift_id"),combo_cnt:u()(C,"data.combo_count"),group_cnt:u()(C,"data.group_count"),gift_source:x,money_per_unit:u()(C,"data.gift_struct.diamond_count"),gift_cnt:S.count,money:S.count*u()(C,"data.gift_struct.diamond_count"),is_fans_club_gift:(0,R.dU)(u()(C,"data.gift_id"))?"1":"0",to_user_id:String(e),full_seats_cnt:G.length,is_from_container:V,gift_show_from:J,if_gold_series:(null==S?void 0:S.buff_level)>0||(null==S?void 0:S.plugin_id)?1:0,customize:(null==S?void 0:S.buff_level)>0||(null==S?void 0:S.plugin_id)?2:0,price:S.originPrice,customize_price:S.price-S.originPrice,pageType:M,tab_name:w.BS[M]||M,if_mini_window:(0,D.OL)(),mission_period:(null==n?void 0:n.status)?[2,3,4,5].includes(null==n?void 0:n.status)?"challenge":(null==n?void 0:n.status)===6?"buff":"":"",mission_id:null!==(a=null==n?void 0:n.egg_id)&&void 0!==a?a:"",mission_type:(null==n?void 0:n.egg_type)?(null==n?void 0:n.egg_type)===1?"moneymission":"cntmission":"",mission_target:null!==(s=null==n?void 0:null===(t=n.task_info)||void 0===t?void 0:t.target_score)&&void 0!==s?s:"",mission_time:null!==(d=null==n?void 0:null===(o=n.task_info)||void 0===o?void 0:o.task_duration)&&void 0!==d?d:"",mission_start_from_pkend:null!==(c=null==n?void 0:null===(r=n.task_info)||void 0===r?void 0:r.task_begin_relative_battle_end_time)&&void 0!==c?c:"",gift_position:null==S?void 0:S.sort,combo_position:null==S?void 0:S.combo_position,is_hotkey:null==S?void 0:S.is_hotkey},M===w.kQ.GIFT&&S.sortType?{order_type:S.sortType}:{}))}),j&&y.emit(y.EVENT.RechargeAutoSuccess,{giftId:u()(C,"data.gift_id")}),eu.liveConsumeEvent({statusCode:O,amount:Y,is_client:(0,P.DT)(),type:"gift_send"})}else 20003===O?await (0,k.m8)("登录后即可送礼","live_gift"):40001===O?T&&(ea?(E.F.info(`${ed}余额不足`),ew({type:"balance",balance:Y-Q,amount:Y,sendGiftParams:S})):E.F.info(`${ed}余额不足,请充值后再试`)):42201===O?E.F.info("为保障账号和资金安全,请先前往抖音app完成身份验证"):42202===O?E.F.info("为保障账号和资金安全,请先前往抖音app完成身份核对"):(E.F.info(u()(C,"data.prompts","送礼失败,请稍后重试")),A.ZN.fatal(I.Mo.LiveSendGiftError,{content:{statusCode:O,message:(null==C?void 0:null===(p=C.data)||void 0===p?void 0:p.prompts)||"",logId:null!=b?b:"",is_client:(0,P.DT)(),data:C}}));return 0===O?Promise.resolve(C):(A.ZN.error(I.Mo.LiveGiftSendCodeNotZero,{content:{statusCode:O,message:(null==C?void 0:null===(h=C.data)||void 0===h?void 0:h.prompts)||"",logId:null!=b?b:"",is_client:(0,P.DT)(),data:C}}),(0,k.rp)(eg),Promise.reject(C))})},[ey,q,a,eI,eS,z,$,Q,eg,eU,ee,ew,Z,J,K,eL,eu,es,ed,ea,eE,el,W,H,eA]),eF=n&&q;(0,l.useEffect)(()=>{eF&&(eD(),ej({},(null==eR?void 0:eR.effectGzip)?{"X-Tlb-Abtest":"br_max_length=5m,gzip_max_length=5m"}:{}))},[eF]);let eY=n&&ey;return(0,l.useEffect)(()=>{eY&&eU()},[eY]),{getGifts:eD,getEffects:ej,getSingleEffect:eV,getBalance:eU,sendGift:eG,handleRecharge:ew,giftScene:eb,getGiftExtra:eO,getMultiGiftExtra:eM,getGiftLayer:ex}}},464641:function(e,n,t){t.d(n,{Z:function(){return oP}});var i,o,r={};t.r(r),t.d(r,{AdaptedBySEIPlugin:function(){return tu},AdminPrivilegePlugin:function(){return tO.Z},AudioRoomPlugin:function(){return tk},CancelMutePlugin:function(){return n9.Z},ChangeDynamicBg:function(){return tX},DanmaSetting:function(){return nH},DanmakuNewPlugin:function(){return nz},DetailContextMenuPlugin:function(){return t9.Z},DoubleScreenPlugin:function(){return t6.Z},EffectPlugin:function(){return nB.Z},EffectSwitchPlugin:function(){return nY},FoldChatRoomCommentPlugin:function(){return nx.Z},GiftEffectPlugin:function(){return nZ.Z},GiftMenuPlugin:function(){return il},GiftTrayPlugin:function(){return nK.Z},GlobalControlPlugin:function(){return n3},GroupFightPlugin:function(){return tY},GroupLive:function(){return tQ.Z},GroupLivePlugin:function(){return t5},GuestBattlePlugin:function(){return tK},HintContainerPlugin:function(){return n2},InPicturePlugin:function(){return nA},LeadingLoginPlugin:function(){return tP},LinkMicApplyPlugin:function(){return t1},LinkMicDynamicPlugin:function(){return tD},LinkMicLayoutPlugin:function(){return tN},LinkMicPlayModeLimitPlugin:function(){return tw},LiveDebugStoragePlugin:function(){return iu},LiveFromAppTips:function(){return t8},LiveLike:function(){return nQ},LiveReserveCard:function(){return tq},MoreLiveEntrancePlugin:function(){return im},NewLinkInitPlugin:function(){return id},NewLinkMicLogicPlugin:function(){return ic.Z},NewPlayerErrorCover:function(){return td},NewRTCLayerPlugin:function(){return i_.Z},NewVideoRoomPlugin:function(){return tb},OrderSingPlugin:function(){return tG},PKSEIPlugin:function(){return tl},PKViewPlugin:function(){return t_},PaidLivePlugin:function(){return ty},PausePop:function(){return t2.Z},PicturePlugin:function(){return nO},PlayerEndCover:function(){return ti},PlayerLoggerPlugin:function(){return n7},PlayerTeaLogPlugin:function(){return tn},QualitySwitchNewPlugin:function(){return nJ.Z},RTCLayerPlugin:function(){return tx.Z},RefreshPlugin:function(){return n0},RotatePlugin:function(){return nD},ServiceCenterPlugin:function(){return it.Z},ShortTouchPlugin:function(){return tm},TheaterPlugin:function(){return nS},ToolBarPlugin:function(){return n4},TopEffectPlugin:function(){return tV.Z},TripleScreenPlugin:function(){return nV},UgcAvatar:function(){return t$},UpdateFunctionTypePlugin:function(){return tj.Z},VideoRoomPlugin:function(){return tS},VipLiveBoundaryPlugin:function(){return tg},VipViewPlugin:function(){return tp},VolumeMemoryPlugin:function(){return nG},VolumeWheelPlugin:function(){return to.Z},VrPlugin:function(){return io},WaterMark:function(){return ie}});var l={};t.r(l),t.d(l,{AudioCheatTips:function(){return iM},AutoRunModal:function(){return iO},ChatRoom:function(){return iy},DetailLayoutSideCard:function(){return iI.Z},LandPageContainer:function(){return iC},LiveShare:function(){return ib},LiveTDK:function(){return iR.Z},LivingPlayer:function(){return ih},OperatingBar:function(){return iA.Z},ProgrammeWrapper:function(){return ik.Z},RightPanelContainer:function(){return iP.Z},RoomInfoBar:function(){return iL.Z},RoomLogic:function(){return e_}});var a=t("629686"),u=t("402748");t("490629"),t("706056"),t("14275"),t("759943");var s=t("320165"),d=t("101199"),c=t("248996"),_=t("357045");let v=(0,_.t)(c.t.ContainerBackgroundLayout,c.W.ContainerBackgroundLayout),m=(0,_.t)(c.t.LeftBackgroundLayout,c.W.LeftBackgroundLayout),f=(0,_.t)(c.t.HeaderLayout,c.W.HeaderLayout),p=(0,_.t)(c.t.HeaderLeftLayout,c.W.HeaderLeftLayout),h=(0,_.t)(c.t.HeaderRightLayout,c.W.HeaderRightLayout),g=(0,_.t)(c.t.PlayerLayout,c.W.PlayerLayout);var E=t("898113");let y=(0,_.t)(c.t.RightPanelLayout,c.W.RightPanelLayout);var I=t("811008"),P={root:"jUr5YsCl",enlargeDynamicBackground:"afkXc1k4",left:"z84MkeaN",chatroomPanelContainer:"YDl7V0Y0",isClient:"jiqBaz7n",fullScreen:"i9BrWGyz",container:"umro0McX",containerOpt:"gklymYGq",right:"BXimpeFo",fold:"Dq1Ij0fu",header:"fMCZ_Aog",playerContainer:"lD5YgS0S",isImmersive:"kAHJOVYB",enterFromSide:"Kidu1ZOv",liveLayoutEnterFromSide:"cynCRw8x",enterFromBottom:"hpcs8ECq",liveLayoutEnterFromBottom:"DdonWMDV",noOperatingBar:"K9982rJX"},L=t("197752"),N=t("608553"),C=t("457706"),S=t("104891");t("679308");var T=t("518002"),b=t("39965"),A=t("855436");let k=(0,b.n)((0,A.ZP)(()=>t.e("10371").then(t.bind(t,384239)),{ssr:!1}),{name:S.l.EnterAndLeave,renderWhen:T._.LivingInit});var R=t("639601"),w=(0,b.n)((0,A.ZP)(()=>t.e("78939").then(t.bind(t,811223)),{ssr:!1}),{name:S.l.StreamCompute,renderWhen:T._.LivingInit}),O=t("542901"),x=t("752150"),M=t("198412"),D=t.n(M),j=t("975956"),V=()=>{let{giftStore:{setGiftTccStatus:e,setHoverGiftWhiteList:n,setDiyPluginIdWhiteList:t,setGiftBuffIdWhiteList:i,setDiyCardNameWhiteList:o,setHoverGiftWhiteListV2:r,setWanxiangGiftSwitch:l,setForceShowBuffList:a,setStarGuardEffectWhiteList:u,setMaxGiftTrayCount:s,setGiftBgEffectMap:c,setGiftTrayConfig:_},audienceStore:{setAudienceTccStatus:v},pkStore:{setPKTccStatus:m},fansClubStore:{setFansClubTccStatus:f},linkmicStore:{setChoosePeopleShowTCC:p},feedStore:{isActive:h},roomStore:{setLongtouchShowTcc:g,setUsePageUrlBannerId:E,setPollingFrequency:y,setLiveStaticParams:I}}=(0,O.o)(),P=(0,j.kF)();(0,d.useEffect)(()=>{try{(async()=>{let d=await (0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"gift_config"}),v=(null==P?void 0:P.XTTENV)?d.ppe_pc_live_backup:d,m=D()(v,"gift_status",!1),f=D()(v,"hover_gift_white_list",[]),p=D()(v,"hover_gift_white_list_v2",[]),h=D()(v,"diy_plugin_id_white_list",[]),g=D()(v,"gift_buff_id_white_list",[]),E=D()(v,"diy_card_name_white_list",[]),y=D()(v,"wanxiang_gift_switch",0),I=D()(v,"force_show_buff_list",[]),L=D()(v,"gift_bg_effect_map",{}),N=D()(v,"gift_tray_config",{}),C=D()(v,"star_guard_effect_white_list",[]),S=D()(v,"gift_tray_max_count",Number.MAX_SAFE_INTEGER);n(f),r(p),t(h),o(E),i(g),l(y),a(I),u(C),s(S),e(m),c(L),_(N)})()}catch(e){}},[h]),(0,d.useEffect)(()=>{try{(async()=>{let e=await (0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"pk_config"}),n=D()(e,"pk_status",!1);m(n)})()}catch(e){}},[h]),(0,d.useEffect)(()=>{try{(async()=>{let e=await (0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"audience_config"}),n=D()(e,"audience_status",!1);v(n)})()}catch(e){}},[h]),(0,d.useEffect)(()=>{try{(async()=>{let e=await (0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"fans_club_config"}),n=D()(e,"fans_status",!1);f(n)})()}catch(e){}},[h]),(0,d.useEffect)(()=>{try{(async()=>{let e=await (0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"choose_peoples_info"}),n=D()(e,"choose_people_show",!1);p(n)})()}catch(e){}},[h]),(0,d.useEffect)(()=>{try{(async()=>{let e=await (0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"banner"});g(D()(e,"long_touch.long_touch_show",!1)),E(D()(e,"long_touch.use_page_url_banner_id",[]))})()}catch(e){}},[h]),(0,d.useEffect)(()=>{try{(async()=>{let e=await (0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"polling_frequency"});y(e)})()}catch(e){}},[h]),(0,d.useEffect)(()=>{try{(async()=>{let e=await (0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"live_static_params"});I(e)})()}catch(e){}},[h])},U=t("762080"),G=t("991879"),F=t("928725"),Y=t("473682"),Z=t("589864"),K=t("997288"),B=t("282621"),W=t("684864"),H=()=>{let{linkmicStore:{setPlayModes:e,setImLinkMicLayout:n,setUiLayout:t,setFunctionType2:i,linkRoomType:o,setIsPlayModeNotSupport:r,layoutConfig:l,setLayoutConfig:a},singletonStore:{message:u},roomStore:{roomInfo:s,setNotSupportReason:c},userStore:{userInfo:_}}=(0,O.o)();(0,d.useEffect)(()=>{let o=D()(s,"room.linker_detail.linker_play_modes",[]),r=D()(s,"room.linker_detail.linker_ui_layout");e(o),t(r),(0,W.D)().includes(Number(r))?n((0,Y.M2)(r)):(0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"linkmic_layout_config"}).then(e=>{e&&(a(e),n((0,Y.M2)(r,e)))}),i(D()(s,"room.linker_detail.function_type"))},[s,n,i,e]);let v=(0,d.useCallback)((e,n,t)=>{(null==_?void 0:_.isReady)&&(0,Z.Qz)({anchor_id:D()(s,"anchor.id_str",""),room_id:null==s?void 0:s.roomId,user_id:null==_?void 0:_.id_str,scene:e,playmode:n,ui_layout:t})},[s,_]);(0,d.useEffect)(()=>{if(!o)return null==u?void 0:u.on("LinkMicMethod",e=>{e.forEach(e=>{let{method:i,payload:o}=e;if(!i||!o)return;let a=Number(o.message_type);if("WebcastLinkMicMethod"===i&&a===B.iM.TYPE_TURNON){let{ui_layout:e}=o;t(e);let i=(0,Y.M2)(e,l);i&&n(i)}if(a===B.iM.TYPE_TURNON){let{scene:e,play_modes:n=[],ui_layout:t}=o;if(e){let i=Number(e);(i===K.xs.Scene_KTV||i===K.xs.Scene_VideoKTV)&&(r(!0),v(i,n,t),c(U.Ly.MULTI_KTV))}}})})},[o,l,n,r,c])},q=t("764283"),z=e=>{let{roomStore:{roomInfo:n},cameraStore:{cameraInfo:t},singletonStore:{message:i},feedStore:{isActive:o}}=(0,O.o)(),{roomId:r=""}=n,{groupId:l,cameraId:u}=t||{},s=(0,d.useRef)({}),c=(0,d.useRef)(e);c.current=e;let _=(0,d.useCallback)(()=>{if(!s.current[r]&&!!o){if(!r){i.stop(),q.kg.info("stop by nil roomId");return}if(c.current){null==i||i.stop();return}i.start((0,a._)({room_id:r},u&&{sub_room_id:u},l&&{group_id:l})),s.current[r]=!0}},[r,l,u,i,o]);return(0,d.useEffect)(()=>{if(o){var e,n;let t=0;(null===(e=navigator)||void 0===e?void 0:e.hardwareConcurrency)<=4&&(null===(n=navigator)||void 0===n?void 0:n.deviceMemory)<=2&&(t=9500);let o=s.current;return setTimeout(()=>{r&&_()},t),()=>{r&&(null==i||i.stop(),o[r]=!1)}}},[r,l,u,_,e,i,o]),(0,d.useEffect)(()=>{if(!!r){if(c.current){null==i||i.stop();return}s.current[r]&&(null==i||i.pause(),s.current[r]=!1)}},[r,l,u,i]),_},$=t("103680"),Q=t("953851"),J=t("252317"),X=t("339808"),ee=t("259808"),en=t("964591"),et=t("387861"),ei=t("247167"),eo=t("973314");let er=(0,b.n)(()=>{let{linkmicStore:{dressListAll:e,setDressListAll:n},roomStore:{roomInfo:t}}=(0,O.o)();return(0,d.useEffect)(()=>{let i=[U.ke.MEDIA,U.ke.VS],o=D()(t,"room.live_room_mode","");(e||(null==e?void 0:e.length)===0)&&!i.includes(o)&&(null==t?void 0:t.roomId)&&(0,G.VT)({}).then(e=>{let{data:{status_code:t,data:i}}=e;0===t&&(null==i?void 0:i.dress_list)&&n(null==i?void 0:i.dress_list)})},[t]),null},{name:S.l.GetDressList,renderWhen:T._.FirstFrame,taskPriority:"background"});var el=(0,en.Pi)(()=>{var e;let{roomStore:{roomInfo:n,live_room_mode:t,setIsVerified:i,isAppOnly:o,isMedia:r,LandscapeChat:l,setDisableLiveRecommendOnEnd:a,setIsDanmakuFeatureOn:u},linkmicStore:{setLiveRoomMode:c},userStore:{userInfo:_},rechargeStore:{setRechargeAuthStatus:v},fansClubStore:{setFansClubAuthStatus:m},giftStore:{setGiftAuthStatus:f,setHandleRecharge:p},playerStore:{isLoadedData:h}}=(0,O.o)(),g=D()(n,"room.status");(0,d.useEffect)(()=>{u(!r&&l!==U.xW.OFF)},[r,l]),V(),H();let E=z(o),y=(0,d.useCallback)(()=>i(!0),[]);(0,F.ZP)({apis:F.w5.IM_API,roomId:null!==(e=n.roomId)&&void 0!==e?e:"",saveVerify:y});let{handleRecharge:I}=(0,J.Z)({isInit:!0,processAfterFirstFrame:!0}),P=(0,X.a)(),L=(0,d.useMemo)(()=>/iframe/.test(P.pathname),[P]);(0,d.useEffect)(()=>{let e=D()(n,"room.room_auth.Gift");!L&&n.roomId&&f(e)},[n,L]),(0,d.useEffect)(()=>{if(c(t),t===U.ke.MEDIA)return(0,eo.DP)(!0),()=>{(0,eo.DP)(!1)}},[t,c]),(0,d.useEffect)(()=>{h&&E()},[E,h]),(0,d.useEffect)(()=>{o&&(null==_?void 0:_.isReady)&&(0,Z.Qz)({anchor_id:D()(n,"anchor.id_str",""),room_id:(null==n?void 0:n.roomId)||"",user_id:(null==_?void 0:_.id_str)||"",enter_mode:null==n?void 0:n.enter_mode,scene:Number(Object.keys(D()(n,"room.linker_map",{}))),playmode:D()(n,"room.linker_detail.linker_play_modes",[]),ui_layout:D()(n,"room.linker_detail.linker_ui_layout")})},[o,n,_]),(0,d.useEffect)(()=>{try{(async()=>{var e;let n=await $.invoke("GET_IS_MAS"),t=await (null===(e=Q.a.canUseIap)||void 0===e?void 0:e.call(Q.a)),i=D()(n,"data");!(i&&!t)&&v(!0)})()}catch(e){v(!0)}},[]),(0,d.useEffect)(()=>{if(null==n?void 0:n.roomId){let e=D()(n,"room.live_room_mode",""),t=!0;(e===U.ke.MEDIA||e===U.ke.VS)&&(t=!1),m(t)}},[n]);let[N,C]=(0,d.useState)();(0,d.useEffect)(()=>{(0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"liveShareWhiteList"}).then(e=>{C(e)})},[]);let S=(0,et.k)(),T=(0,d.useMemo)(()=>{let e=null;if(N&&(e=N[null==S?void 0:S.XTTENV]?N[null==S?void 0:S.XTTENV]:N),!e)return!1;let{whiteList:t=[]}=e;return t.some(e=>String(e)===String(D()(n,"anchor.id_str"))||String(e)===String(n.roomId)||String(e)===String(n.web_rid))},[N,n,S]);return(0,d.useEffect)(()=>{a(T)},[T]),(0,d.useEffect)(()=>{p(I)},[I]),(0,d.useEffect)(()=>{if(!!(null==n?void 0:n.roomId))return(0,ei.startTraceLiveDetailEvent)(null==n?void 0:n.roomId)},[null==n?void 0:n.roomId]),(0,d.useEffect)(()=>{g===U.LV.END&&((0,ee.q)("ISLAND_SYNC_HEADER"),(0,ee.q)("ISLAND_LAYOUT_NAVIGATION"))},[g]),(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(er,{})})}),ea=(0,b.n)((0,A.ZP)(()=>t.e("86354").then(t.bind(t,775906)),{ssr:!1}),{name:S.l.RoomMessageConsume,renderWhen:T._.LivingInit}),eu=(0,b.n)((0,A.ZP)(()=>t.e("15403").then(t.bind(t,576436)),{ssr:!1}),{name:S.l.StreamCompute,renderWhen:T._.LivingInit}),es=(0,b.n)((0,A.ZP)(()=>t.e("2091").then(t.bind(t,531560)),{ssr:!1}),{name:S.l.RoomEvent,renderWhen:T._.LivingInit}),ed=(0,b.n)((0,A.ZP)(()=>t.e("10371").then(t.bind(t,77029)),{ssr:!1}),{name:S.l.PlayerControl,renderWhen:T._.FirstFrame,taskPriority:"user-blocking"});let ec=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(k,{}),(0,s.jsx)(R.Z,{}),(0,s.jsx)(w,{}),(0,s.jsx)(el,{}),(0,s.jsx)(ea,{}),(0,s.jsx)(eu,{}),(0,s.jsx)(es,{}),(0,s.jsx)(ed,{})]});var e_=(0,C.OV)({Component:ec,layoutName:c.t.PlayerLayout,ComponentName:S.l.RoomLogic,index:0}),ev=t("436698"),em=t("502615"),ef=t("232547"),ep=t("631979"),eh=t("721108"),eg=t("397176"),eE=t("142381");let ey=(0,_.t)(c.t.LinkMicBackgroundLayout,c.W.LinkMicBackgroundLayout),eI=(0,_.t)(c.t.LinkMicLayout,c.W.LinkMicLayout),eP=(0,_.t)(c.t.PlayerControlLayout,c.W.PlayerControlLayout),eL=(0,_.t)(c.t.LinkMicAnimationLayout,c.W.LinkMicAnimationLayout),eN=(0,_.t)(c.t.LikeLayout,c.W.LikeLayout),eC=(0,_.t)(c.t.GiftEffectLayout,c.W.GiftEffectLayout),eS=(0,_.t)(c.t.GiftTrayLayout,c.W.GiftTrayLayout),eT=(0,_.t)(c.t.GiftMenuLayout,c.W.GiftMenuLayout),eb=(0,_.t)(c.t.DanmakuLayout,c.W.DanmakuLayout),eA=(0,_.t)(c.t.TipsLayout,c.W.TipsLayout);var ek=t("659870");let eR=(0,_.t)(c.t.ShortTouchLayout,c.W.ShortTouchLayout),ew=(0,_.t)(c.t.WaterMarkLayout,c.W.WaterMarkLayout);var eO=t("981433"),ex=t("269196"),eM=t("360847"),eD=t("889429"),ej=t("462867"),eV=t("556287"),eU=t("575697"),eG=t("26333"),eF=t("469935"),eY=t.n(eF),eZ=t("679807"),eK=t("506887"),eB=t("873428"),eW=t("518523"),eH=t("414061"),eq=t("785701"),ez=t("59850"),e$=t("503669"),eQ=t("47014"),eJ=t("798795");let eX=()=>{let{userStore:{setPlayerUserHandlePause:e},playerStore:{playerInstance:n,setIsPlay:t,isPlay:i,setIsPlayed:o,setIsLoadedData:r,isFullScreen:l,setIsFullScreen:a,setIsTheaterOn:u,isTheaterOn:s},roomStore:{roomInfo:c,roomStatus:_,setFoldChatroom:v,setIsShowRefreshPage:m},streamStore:{setVideoInit:f},eventStore:{tabEvent:p}}=(0,O.o)(),h=d.useRef(0),g=D()(c,"room.id_str"),[E,y]=(0,d.useState)(!1),I=(0,ez.Z)(e=>{(0,e$.XC)(e),"number"!=typeof e&&(e=void 0),eK.z.markOnce("living_player_loaded_data"),(0,eJ.j)({roomId:g,type:"first_frame",duration:e}),r(!0)}),P=(0,ez.Z)(()=>{m(!1),h.current=0}),L=(0,ez.Z)(()=>{e(!0),o(!0),f&&f(!0),t(i+1),(0,eQ.yr)({isLive:1}),E?null==p||p.liveStartEvent({event_page:"live_detail",if_mini_window:(0,eU.OL)()}):y(!0)}),N=(0,ez.Z)(()=>{e(!1),null==p||p.livePauseEvent({event_page:"live_detail",if_mini_window:(0,eU.OL)()})}),C=(0,ez.Z)(e=>{!e&&eW.oh&&eH.emit(eH.EVENT.exitClientFullscreen),!l&&u(!1),a(e)}),S=(0,ez.Z)(()=>{(0,e$.XC)()}),T=(0,ez.Z)(()=>{if(h.current>1){null==m||m(!0);return}if(_===U.LV.LIVING&&h.current<=1){h.current=h.current+1,null==n||n.retry();return}if(_===U.LV.LIVING){null==n||n.retry();return}}),b=(0,d.useMemo)(()=>({[em.FP.PLAY]:L,[em.FP.PAUSE]:N,[em.FP.FULLSCREEN_CHANGE]:C,[em.FP.ENDED]:T,[em.FP.PLAYING]:P,[em.FP.LOADEDDATA]:I}),[L,N,C,T,P,I]);(0,d.useEffect)(()=>{if((0,eW.oh)()&&n){let{fullscreenTarget:e}=n.config.baseConfig,t=eH.listen(eH.EVENT.ControlLiveFullscreenByClient,t=>{let{isFull:i}=t;i?((0,eq.a)(),(0,eW.GP)(()=>{null==n||n.getFullscreen(e)})):null==n||n.exitFullscreen()});return n.on(em.FP.FULLSCREEN_CHANGE,e=>{eH.emit(eH.EVENT.ControlLiveFullscreenByClient,{isFull:e})}),()=>{null==t||t()}}},[n]),(0,d.useEffect)(()=>(!l&&!s&&v(!1),l||s?document.body.classList.add("xgplayer-fullscreen-parent"):document.body.classList.remove("xgplayer-fullscreen-parent"),()=>{document.body.classList.remove("xgplayer-fullscreen-parent")}),[l,s]);let A=d.useRef(!0);return(0,d.useEffect)(()=>{var e;(null==n?void 0:n.src)&&(null==n?void 0:null===(e=n._core)||void 0===e?void 0:e._errorInfo)&&A.current&&(A.current=!1,S())},[n,null==n?void 0:n.src]),b};var e0=t("958335"),e1=t("403300");let e2=(0,d.forwardRef)((e,n)=>(0,s.jsx)("svg",(0,u._)((0,a._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 8a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h13a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2h-13zm10 11h-1.501v2H20.5a1 1 0 0 0 1-1v-2.5h-2V19zm-7 0v-1.5h-2V20a1 1 0 0 0 1 1h2.499v-2H12.5zm0-6h1.499v-2H11.5a1 1 0 0 0-1 1v2.5h2V13zm7 0h-1.501v-2H20.5a1 1 0 0 1 1 1v2.5h-2V13z",fill:"#fff"})})));var e9=t("6025"),e6=t("958396"),e3=t("243970"),e5=t("335924"),e4=t("113515"),e8=t("121998");let e7=()=>{let{open_vip_panel:e=0}=e8.parse((0,e5.ht)())||{};if(!e){let n=sessionStorage.getItem(e4.UY),t=window&&window.__INVISIBLE_QUERY__;e=null==t?void 0:t.open_vip_panel;try{if(!(null==t?void 0:t.open_vip_panel)){let t=JSON.parse(n)||{};e=(null==t?void 0:t.open_vip_panel)||0}}catch(e){}}return!!e};var ne=t("995898"),nn=t("622063");let nt=()=>{var e,n;let t=(0,X.a)(),i=(0,ne.Nr)(t.pathname),o=null===nn.Z||void 0===nn.Z?void 0:null===(e=nn.Z.getPlayerInstance)||void 0===e?void 0:e.call(nn.Z),r=null===nn.Z||void 0===nn.Z?void 0:null===(n=nn.Z.getLoggerInstance)||void 0===n?void 0:n.call(nn.Z);return{reusePlayer:!!(i&&o&&r),playerInstance:o,loggerInstance:r}};var ni=t("160197"),no=t("806217");let nr=()=>{let{player:e}=(0,ni.n)(),{playerStore:{isTheaterOn:n,isFullScreen:t}}=(0,O.o)(),i=(0,d.useRef)(!1),o=(0,no.Z)(n=>{var t,i,o,r;let{isLock:l}=n,a=null===(r=document)||void 0===r?void 0:null===(o=r.activeElement)||void 0===o?void 0:null===(i=o.classList)||void 0===i?void 0:null===(t=i.contains)||void 0===t?void 0:t.call(i,ep.nk);if(!!l||!a)null==e||e.focus({isLock:l})});return(0,d.useEffect)(()=>{let n=()=>{i.current=!0,o({isLock:!0})};null==e||e.on(em.FP.PAUSE,n);let t=()=>{i.current=!1,o({isLock:!1})};return null==e||e.on(em.FP.PLAY,t),()=>{null==e||e.off(em.FP.PLAY,n),null==e||e.off("play",t)}},[e]),(0,d.useEffect)(()=>{if(e){var n;let t=null==e?void 0:null===(n=e.root)||void 0===n?void 0:n.querySelector(".douyin-player-controls");if(t){let e=()=>{if(!i.current)o({isLock:!0})},n=()=>{if(!i.current)o({isLock:!1})};return t.addEventListener("mouseenter",e),t.addEventListener("mouseleave",n),()=>{t.removeEventListener("mouseenter",e),t.removeEventListener("mouseleave",n)}}}},[e]),(0,d.useEffect)(()=>{if((0,eD.G6)()&&(t||n)){let e=document.querySelector("#douyin-right-container");if(e)return e.style.paddingTop="0px",()=>{e.style.paddingTop="var(--header-height)"}}},[t,n]),(0,d.useEffect)(()=>{o({isLock:!1}),setTimeout(()=>{try{var n;null===(n=e.root)||void 0===n||n.classList.add("douyin-player-controls-autohide")}catch(e){}},100)},[t,t,e]),null};var nl=t("536793"),na=t("858651"),nu=t("319722"),ns=t("905116"),nd=t("574939"),nc=t("878217"),n_=t("116310");let nv=(0,b.n)((0,A.ZP)(()=>t.e("79164").then(t.bind(t,812797)),{ssr:!1}),{name:S.l.LiveStallPerfReporter,renderWhen:T._.FirstFrame});var nm=t("845188");let nf=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],np=()=>{let e=document;return e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement||null},nh=()=>{let e=document,n=e.exitFullscreen||e.webkitExitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen;if("function"==typeof n)try{n.call(e)}catch(e){}},ng=e=>{if(!e)return;let n=e.requestFullscreen||e.webkitRequestFullscreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;if("function"==typeof n)try{n.call(e)}catch(e){}};var nE=t("666552"),ny=t("690193"),nI=(0,en.Pi)(()=>{let e=(0,na.useLiveFullscreenOptAB)(),n=(0,O.o)(),t=(0,no.Z)(()=>{var t,i,o;if(!(null==e?void 0:e.enable))return;let r=np();if(!r||!(0,nE.t)())return;let l=null==n?void 0:null===(o=n.playerStore)||void 0===o?void 0:null===(i=o.playerInstance)||void 0===i?void 0:null===(t=i.baseConfig)||void 0===t?void 0:t.fullscreenTarget;if(!!l)r!==l&&((0,ny.WH)("LiveFullScreenInterceptor_fullscreenTargetNotEqual",{enable:e.enable,requestWhenFullScreenTargetNotEqual:e.requestWhenFullScreenTargetNotEqual,fullscreenElementTag:null==r?void 0:r.tagName,fullscreenElementId:null==r?void 0:r.id,fullscreenElementClass:null==r?void 0:r.className,fullscreenTargetTag:null==l?void 0:l.tagName,fullscreenTargetId:null==l?void 0:l.id,fullscreenTargetClass:null==l?void 0:l.className,href:location.href}),nh(),e.requestWhenFullScreenTargetNotEqual&&ng(l))});return(0,d.useEffect)(()=>{if(!!(null==e?void 0:e.enable))return nf.forEach(e=>{document.addEventListener(e,t)}),()=>{nf.forEach(e=>{document.removeEventListener(e,t)})}},[null==e?void 0:e.enable,t]),null}),nP=(0,en.Pi)(e=>{var n,t;let{detailPage:i}=e,o=(0,O.o)(),{userStore:{userInfo:r,odin:l,headerUserInfo:u},playerStore:{setPlayerInstance:c,setPlayerLoggerInstance:_,setIsFullScreen:v,isFullScreen:m,setLoggerOptions:f,loggerOptions:p,playerInstance:h,setFullScreenTarget:g,playerLoggerInstance:E,setIsTheaterOn:y},activityIndicatorStore:{setJSBInstance:I},singletonStore:{message:P,setPlayer:N,setLiveContainer:C},rightPanelStore:{playerMargin:S},roomStore:{isDoubleScreen:b,setIsFocus:A,isAppOnly:k,roomInfo:R,playerCoverText:w,coverUrl:x},paidLiveStore:{isPaidLive:M},linkmicStore:{linkRoomType:j,functionType2:V},vipStore:{setIsShowVipPanel:U,vipInfoLoaded:G},vrStore:{isImmersive:F}}=o,Y=(0,d.useMemo)(()=>{},[r.id_str,null==l?void 0:l.user_unique_id]),Z=eg.s?void 0:document.body,K=(0,e6.d)(),B=(0,d.useMemo)(()=>{var e,n;return"live.douyin.com"===(eg.s?null==K?void 0:null===(n=K.request)||void 0===n?void 0:null===(e=n.header)||void 0===e?void 0:e.host:window.location.host)},[K]),W=(0,nu.S)("living"),H=(0,d.useMemo)(()=>{let e={autoplay:!0,volume:(0,ef.T1)(),muted:(0,ef.rC)(),fullscreenTarget:Z,worker:{recylable:!1},disconnectTime:5,enablePreloadWebTsSDK:B&&!!(null==W?void 0:W.enablePreloadWebTsSDK)};return Y&&(e.volumeWaterMark=Y),e},[Z,Y,b,M,W,B]),q=eX(),z=(0,nm.Xt)({RTMConfig:B?W:void 0}),$=(0,d.useMemo)(()=>(0,a._)({controls:{autoHide:!0},CompatibilityFullscreenPlugin:{keyboardCode:"KeyH",position:"top-right",IconExitFullscreen:e1.Z,IconFullscreen:e2}},z),[]),Q=(0,d.useMemo)(()=>{var e,n,t,o,r,l;let{nickname:a,avatar_thumb:u,id_str:s}=(null==R?void 0:R.anchor)||{},d=(null==R?void 0:null===(n=R.room)||void 0===n?void 0:null===(e=n.linker_detail)||void 0===e?void 0:e.linker_ui_layout)||0,c=null==R?void 0:null===(t=R.web_stream_url)||void 0===t?void 0:t.pull_datas,_=null==K?void 0:null===(r=K.request)||void 0===r?void 0:null===(o=r.header)||void 0===o?void 0:o["user-agent"];return{inlinePlayer:i&&!(_?/Safari/.test(_)&&!/Chrome/.test(_):(0,eD.G6)()),isDoubleScreen:b,meta:(()=>{if(c&&Object.keys(c).length>0){var e,n,t,i,o;let r=c[Object.keys(c)[0]];if((null==r?void 0:null===(e=r.extension)||void 0===e?void 0:e.camera_clip)&&(null==r?void 0:null===(n=r.extension)||void 0===n?void 0:n.game_clip)&&(null==r?void 0:null===(t=r.extension)||void 0===t?void 0:t.camera_hidden)===0){let e=(null==r?void 0:null===(i=r.extension)||void 0===i?void 0:i.game_clip)||{},n=(null==r?void 0:null===(o=r.extension)||void 0===o?void 0:o.camera_clip)||{};return{mainPointers:[e.x,e.y,e.w,e.h],miniPointers:[n.x,n.y,n.w,n.h],displayMode:0}}}})(),anchorInfo:{nickname:a,avatar:null==u?void 0:null===(l=u.url_list)||void 0===l?void 0:l[0],id_str:s},roomInfo:{roomId:null==R?void 0:R.roomId,linkerUiLayout:d}}},[b,R,i]),J=!!(w&&!(w===ep.kx.ANCHOR_BAN&&j)),X=(0,d.useMemo)(()=>{var e,n,t,i,o,a;return{user_id:r.id_str,device_id:null!==(a=null==l?void 0:l.user_unique_id)&&void 0!==a?a:"",scene:eh.C.liveDetail,live_type:D()(R,"room.live_room_mode",""),is_game:D()(R,"room.game_data.game_tag_info.is_game",2),is_live_end:J?1:0,is_shopping:!!(null===(n=D()(R,"room.toolbar_data"))||void 0===n?void 0:null===(e=n.entrance_list)||void 0===e?void 0:e.find(e=>e.component_type===ns.Ls.Cart)),is_game_live:(null===(i=D()(R,"room.toolbar_data"))||void 0===i?void 0:null===(t=i.entrance_list)||void 0===t?void 0:t.find(e=>e.component_type===ns.Ls.GamePromotion))?1:0,title:null==R?void 0:null===(o=R.room)||void 0===o?void 0:o.title}},[r.id_str,null==l?void 0:l.user_unique_id,null==R?void 0:null===(n=R.room)||void 0===n?void 0:n.live_room_mode,w,j,J,null==R?void 0:null===(t=R.room)||void 0===t?void 0:t.title]);(0,d.useEffect)(()=>{f(X)},[X]);let en=(0,L.bU)(),{reusePlayer:et,playerInstance:ei,loggerInstance:eo}=nt();(0,d.useEffect)(()=>{let e=new eO.Z(o);Object.freeze(e),I(e),e._fetchSetting(),window.__JSB__=e,window.__landPage_jsb__=e,window.__MESSAGE_INSTANCE__=P,window.__INDICATOR_UTIL__=ex.Qg},[o]),(0,d.useEffect)(()=>{e9.T.reset(),C(new e9.T(o))},[o]),(0,d.useEffect)(()=>{g(Z)},[Z]),(0,d.useEffect)(()=>{var e;e7()&&G&&(null==u?void 0:u.isLogin)&&(null==R?void 0:null===(e=R.room)||void 0===e?void 0:e.id_str)&&(0,nd.Z)("live")},[G,null==u?void 0:u.isLogin,R]),(0,d.useEffect)(()=>{let e=0;if(k){if(m||np()){var n;null==h||null===(n=h.exitFullscreen)||void 0===n||n.call(h),nh(),v(!1)}y(!1),document.body.classList.remove("xgplayer-fullscreen-parent"),e=window.requestAnimationFrame(()=>{(0,ee.q)("ISLAND_SYNC_HEADER"),(0,ee.q)("ISLAND_LAYOUT_NAVIGATION")})}return()=>{e&&window.cancelAnimationFrame(e)}},[k,m,h,v,y]);let er=(0,na.useInLivePlayerDegradeAB)(),el=(0,n_.X3)();return k?(0,s.jsx)(e0.Z,{avatar:D()(R.anchor,"avatar_thumb.url_list[0]",""),qrcode:R.qrcode_url,className:eM.Z.appOnly}):(0,s.jsxs)("div",{className:eY()(eM.Z.livingPlayer,"__livingPlayer__",{[eM.Z.hideLoadingAndControl]:!(null==h?void 0:h.src),[eM.Z.isImmersive]:F},el),style:{marginRight:S},id:eZ.f+((null==h?void 0:h.playerId)||""),children:[(0,s.jsx)(ej.TY,{className:eM.Z.basicPlayerPip,pipAnchorId:eU.MA.BasicPlayer,placeholder:(0,s.jsx)(eV.InPicturePlaceholder,{}),children:(0,s.jsxs)(ev.N,{disableLogger:J,onReady:function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];eK.z.markOnce("living_player_ready"),null===eB.sA||void 0===eB.sA||eB.sA.livePlayerInitEnd(...n)},onBeforePlayerInit:function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];eK.z.markOnce("living_player_before_player_init"),null===eB.sA||void 0===eB.sA||eB.sA.livePlayerInitStart(...n)},baseConfig:H,pluginsConfig:$,isPaidLive:M,logOptions:X,poster:er?x:void 0,onFocus:()=>{A(!0)},onBlur:()=>{A(!1)},onLoadedData:e=>{q.loadeddata(e),null==en||en.emit(T._.FirstFrame)},onPlaying:q[em.FP.PLAYING],onPlay:q[em.FP.PLAY],onPause:q[em.FP.PAUSE],onEnd:q[em.FP.ENDED],onFullScreenChange:q[em.FP.FULLSCREEN_CHANGE],ref:e=>{if(!!(null==e?void 0:e.player))(null==e?void 0:e.player)&&(null==e?void 0:e.player)!==h&&(c(null==e?void 0:e.player),N(null==e?void 0:e.player)),(null==e?void 0:e.logger)&&(null==e?void 0:e.logger)!==E&&_(null==e?void 0:e.logger)},playerAction:Q,disableDynamicBg:"audio"===j&&"audio_audience"!==V,reusePlayer:et,playerInstance:ei,loggerInstance:eo,role:"consumer",scene:"LivingPlayer",children:[(0,s.jsx)(nv,{}),(0,s.jsx)(eE.D,{className:eM.Z.layoutCommon}),(0,s.jsx)(ey,{className:eM.Z.layoutCommon}),(0,s.jsx)(eI,{className:eM.Z.layoutCommon}),(0,s.jsx)(eP,{className:eM.Z.layoutCommon}),(0,s.jsx)(eL,{className:eM.Z.layoutCommon}),(0,s.jsx)(eN,{className:eY()(eM.Z.layoutCommon,eM.Z.layoutLike)}),(0,s.jsx)(eC,{className:eM.Z.layoutCommon}),(0,s.jsx)(eS,{className:eM.Z.layoutCommon}),(0,s.jsx)(eT,{className:eM.Z.layoutCommon}),(0,s.jsx)(eb,{className:eM.Z.layoutCommon}),(0,s.jsx)(eA,{className:eY()(eM.Z.layoutCommon)}),(0,s.jsx)(ek.B,{className:eM.Z.layoutCommon}),(0,s.jsx)(eR,{className:eM.Z.layoutCommon}),(0,s.jsx)(e3.xr,{ref:e=>{e&&h&&e!==(null==h?void 0:h._pipRef)&&(h._pipRef=e)}}),(0,s.jsx)(ew,{className:eM.Z.layoutCommon}),(0,s.jsx)(nr,{}),(0,s.jsx)("div",{id:`gift_effect_bg_${null==R?void 0:R.roomId}`,style:{position:"absolute",left:0,bottom:"-4px",width:"100%",height:"auto",background:"transparent",pointerEvents:"none",zIndex:-1,opacity:"0.5"}}),(0,s.jsx)(nc.h,{source:"LivingPlayer"}),(0,s.jsx)(nI,{})]})}),(0,s.jsx)(eG.GZ,{isDoubleScreen:b})]})}),nL=t("913174"),nN=t("59592");let nC=(0,b.n)((0,A.ZP)(()=>t.e("88424").then(t.bind(t,615331)),{ssr:!1}),{name:S.l.TheaterPlugin,renderWhen:T._.FirstFrame,taskPriority:"user-visible"});(0,nL.GI)({name:S.l.TheaterPlugin,condition:e=>{let{pipContext:n}=e;return!0},Component:nC,index:0});var nS=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.TheaterPlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.TheaterPlugin,index:0}),nT=t("649189");let nb=(0,b.n)((0,A.ZP)(()=>Promise.resolve().then(t.bind(t,556287)),{ssr:!1}),{name:S.l.INPICTURE_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.INPICTURE_PLUGIN,condition:()=>!0,Component:nb,index:0});var nA=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.INPICTURE_PLUGIN}),layoutName:c.t.LinkMicAnimationLayout,ComponentName:S.l.INPICTURE_PLUGIN,index:0}),nk=t("618759"),nR=t("745285");let nw=(0,b.n)((0,A.ZP)(()=>t.e("11049").then(t.bind(t,839618)),{ssr:!1}),{name:S.l.PIP_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.PIP_PLUGIN,condition:e=>{let{store:n,pipContext:t}=e,{feedStore:{isActive:i},roomStore:{roomStatus:o,playerCoverText:r},linkmicStore:{linkRoomType:l}}=n||{},{isLivingPip:a,isNewLivingPipEnabled:u}=t;return i&&o!==U.LV.END&&"audio"!==l&&!r&&((0,nk.DT)()?u:u||(0,nR.Kv)())&&!a},Component:nw,index:0});var nO=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.PIP_PLUGIN}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.PIP_PLUGIN,index:0}),nx=t("127165");let nM=(0,b.n)((0,A.ZP)(()=>t.e("23881").then(t.bind(t,440998)),{ssr:!1}),{name:S.l.ROTATE_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.ROTATE_PLUGIN,condition:e=>{var n,t,i;let{store:o}=e,r=!0;try{!CSS.supports("rotate","none")&&(null==o?void 0:null===(i=o.roomStore)||void 0===i?void 0:i.isDoubleScreen)&&(r=!1)}catch(e){}return(null==o?void 0:null===(n=o.feedStore)||void 0===n?void 0:n.isActive)&&r&&!(null==o?void 0:null===(t=o.vrStore)||void 0===t?void 0:t.isInVrView)},Component:nM,index:0});var nD=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.ROTATE_PLUGIN}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.ROTATE_PLUGIN,index:0});let nj=(0,b.n)((0,A.ZP)(()=>t.e("3047").then(t.bind(t,45020)),{ssr:!1}),{name:S.l.TRIPLE_SCREEN_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.TRIPLE_SCREEN_PLUGIN,condition:e=>{let{store:n,pipContext:t}=e,{roomStore:{isDoubleScreen:i,roomInfo:o},pkStore:{pkStatus:r},paidLiveStore:{isPaidLive:l},linkmicStore:{linkRoomTypeHooks:a,isNewVideoLinkmicRoom:u},feedStore:{isActive:s},playerStore:{playerInstance:d},ecomStore:{cartVisible:c},vrStore:{isVrLive:_}}=n,v=D()(o,"room.status"),m=null==t?void 0:t.isLivingPip,f=Object.keys(D()(o,"room.linker_map")||{}).length>=1;if(!(null==o?void 0:o.room)||!(null==o?void 0:o.roomId))return!1;if(!(s&&v!==U.LV.END&&!r&&!i&&!l&&!m&&!a&&!f&&!c&&!_))try{null==d||d.updateConfig({pluginsConfig:{tripleVideo:{enable:!1}}})}catch(e){}return s&&v!==U.LV.END&&!r&&!i&&!l&&!m&&!a&&!f&&!c&&!_&&!u},Component:nj,index:0});var nV=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.TRIPLE_SCREEN_PLUGIN}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.TRIPLE_SCREEN_PLUGIN,index:0});let nU=(0,b.n)((0,A.ZP)(()=>Promise.resolve().then(t.bind(t,327674)),{ssr:!1}),{name:S.l.VolumeMemoryPlugin,renderWhen:T._.LivingInit});var nG=(0,C.OV)({Component:nU,layoutName:c.t.PlayerControlLayout,ComponentName:S.l.VolumeMemoryPlugin,index:0});let nF=(0,b.n)((0,A.ZP)(()=>Promise.all([t.e("40707"),t.e("48539")]).then(t.bind(t,93225)),{ssr:!1}),{name:S.l.EFFECT_SWITCH_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.EFFECT_SWITCH_PLUGIN,condition:e=>{let{pipContext:n,store:t}=e,{feedStore:{isActive:i},giftStore:{giftStatus:o}}=t;return!(null==n?void 0:n.isLivingPip)&&i&&o},Component:nF,index:0});var nY=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.EFFECT_SWITCH_PLUGIN}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.EFFECT_SWITCH_PLUGIN,index:0}),nZ=t("354356"),nK=t("909278"),nB=t("136037");let nW=(0,b.n)((0,A.ZP)(()=>t.e("25986").then(t.bind(t,274705)),{ssr:!1}),{name:S.l.DANMAKU_SETTINGS,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.DANMAKU_SETTINGS,condition:e=>{let{pipContext:n,store:t}=e,{roomStore:{isDanmakuFeatureOn:i}}=t;return!(null==n?void 0:n.isLivingPip)&&i},Component:nW,index:0});var nH=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.DANMAKU_SETTINGS}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.DANMAKU_SETTINGS,index:0});let nq=(0,b.n)((0,A.ZP)(()=>t.e("55756").then(t.bind(t,250008)),{ssr:!1}),{name:S.l.DANMAKU_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.DANMAKU_PLUGIN,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},vrStore:{isImmersive:i}}=n;return t&&!i},Component:nq,index:0});var nz=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.DANMAKU_PLUGIN}),layoutName:c.t.DanmakuLayout,ComponentName:S.l.DANMAKU_PLUGIN,index:0});let n$=(0,b.n)((0,A.ZP)(()=>t.e("44143").then(t.bind(t,978581)),{ssr:!1}),{name:S.l.Live_Like,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"user-blocking"});(0,nL.GI)({name:S.l.Live_Like,condition:e=>{let{store:n,pipContext:t}=e,{feedStore:{isActive:i}}=n;return i&&!(null==t?void 0:t.isLivingPip)},Component:n$,index:0});var nQ=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.Live_Like}),layoutName:c.t.LikeLayout,ComponentName:S.l.Live_Like,index:0}),nJ=t("588336");let nX=(0,b.n)((0,A.ZP)(()=>Promise.resolve().then(t.bind(t,85961)),{ssr:!1}),{name:S.l.RefreshPlugin,renderWhen:nT.d.afterComponent(S.l.ChatRoom)});(0,nL.GI)({name:S.l.RefreshPlugin,condition:()=>!0,Component:nX,index:0});var n0=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.RefreshPlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.RefreshPlugin,index:0});let n1=(0,b.n)((0,A.ZP)(()=>t.e("98058").then(t.bind(t,895182)),{ssr:!1}),{name:S.l.HintContainerPlugin,renderWhen:T._.FirstFrame,taskPriority:"user-visible"});(0,nL.GI)({name:S.l.HintContainerPlugin,condition:e=>{var n;let{store:t}=e;return null==t?void 0:null===(n=t.feedStore)||void 0===n?void 0:n.isActive},Component:n1,index:0});var n2=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.HintContainerPlugin}),layoutName:c.t.TipsLayout,ComponentName:S.l.HintContainerPlugin,index:0}),n9=t("479466");let n6=(0,b.n)((0,A.ZP)(()=>t.e("22299").then(t.bind(t,298244)),{ssr:!1}),{name:S.l.GlobalControlPlugin,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.GlobalControlPlugin,condition:e=>{var n;let{store:t}=e;return null==t?void 0:null===(n=t.feedStore)||void 0===n?void 0:n.isActive},Component:n6,index:0});var n3=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.GlobalControlPlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.GlobalControlPlugin,index:0});let n5=(0,b.n)((0,A.ZP)(()=>Promise.all([t.e("84813"),t.e("66660")]).then(t.bind(t,693561)),{ssr:!1}),{name:S.l.TOOL_BAR_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.TOOL_BAR_PLUGIN,condition:e=>{let{store:n}=e,{roomStore:{roomStatus:t,playerCoverText:i},vrStore:{isImmersive:o}}=n;return t!==U.LV.END&&i!==ep.kx.KICK_OUT&&!o},Component:n5,index:0});var n4=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.TOOL_BAR_PLUGIN}),layoutName:c.t.EcmoCardLayout,ComponentName:S.l.TOOL_BAR_PLUGIN,index:0});let n8=(0,b.n)((0,A.ZP)(()=>Promise.resolve().then(t.bind(t,200240)),{ssr:!1}),{name:S.l.PlayerLoggerPlugin,renderWhen:T._.LivingInit});(0,nL.GI)({name:S.l.PlayerLoggerPlugin,condition:()=>!0,Component:n8,index:0});var n7=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.PlayerLoggerPlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.PlayerLoggerPlugin,index:0});let te=(0,b.n)((0,A.ZP)(()=>Promise.resolve().then(t.bind(t,35679)),{ssr:!1}),{name:S.l.PlayerTeaLogPlugin,renderWhen:T._.FirstFrame,taskPriority:"background"});(0,nL.GI)({name:S.l.PlayerTeaLogPlugin,condition:e=>{var n;let{store:t}=e;return null==t?void 0:null===(n=t.feedStore)||void 0===n?void 0:n.isActive},Component:te,index:0});var tn=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.PlayerTeaLogPlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.PlayerTeaLogPlugin,index:0});let tt=(0,b.n)((0,A.ZP)(()=>Promise.resolve().then(t.bind(t,181208)),{ssr:!1}),{name:S.l.PlayerEndCover,renderWhen:T._.FirstFrame,taskPriority:"background"});(0,nL.GI)({name:S.l.PlayerEndCover,condition:e=>{let{store:n}=e,{roomStore:{playerCoverText:t},linkmicStore:{linkRoomType:i}}=n;return!!(t&&!(t===ep.kx.ANCHOR_BAN&&i))},Component:tt,index:0});var ti=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.PlayerEndCover}),layoutName:c.t.TipsLayout,ComponentName:S.l.PlayerEndCover,index:0}),to=t("691771");let tr=(0,b.n)((0,A.ZP)(()=>t.e("18419").then(t.bind(t,978603)),{ssr:!1}),{name:S.l.PKSEIPlugin,renderWhen:T._.LivingInit});(0,nL.GI)({name:S.l.PKSEIPlugin,condition:e=>{var n;let{store:t}=e;return null==t?void 0:null===(n=t.feedStore)||void 0===n?void 0:n.isActive},Component:tr,index:0});var tl=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.PKSEIPlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.PKSEIPlugin,index:0});let ta=(0,b.n)((0,A.ZP)(()=>Promise.resolve().then(t.bind(t,314810)),{ssr:!1}),{name:S.l.AdaptedBySEIPlugin,renderWhen:T._.LivingInit});(0,nL.GI)({name:S.l.AdaptedBySEIPlugin,condition:e=>{let{pipContext:n}=e;return!0},Component:ta,index:0});var tu=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.AdaptedBySEIPlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.AdaptedBySEIPlugin,index:0});let ts=(0,b.n)((0,A.ZP)(()=>t.e("624").then(t.bind(t,965395)),{ssr:!1}),{name:S.l.NewPlayerErrorCover,renderWhen:nT.d.afterComponent(S.l.ChatRoom)});(0,nL.GI)({name:S.l.NewPlayerErrorCover,condition:e=>{var n;let{store:t}=e;return null==t?void 0:null===(n=t.roomStore)||void 0===n?void 0:n.isShowRefreshPage},Component:ts,index:0});var td=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.NewPlayerErrorCover}),layoutName:c.t.TipsLayout,ComponentName:S.l.NewPlayerErrorCover,index:0});let tc=(0,b.n)((0,A.ZP)(()=>t.e("67393").then(t.bind(t,307085)),{ssr:!1}),{name:S.l.PK_VIEW_PLUGIN,renderWhen:T._.FirstFrame});(0,nL.GI)({name:S.l.PK_VIEW_PLUGIN,condition:e=>{var n,t;let{store:i}=e;return(null==i?void 0:null===(n=i.pkStore)||void 0===n?void 0:n.pkStatus)&&(null==i?void 0:null===(t=i.feedStore)||void 0===t?void 0:t.isActive)},Component:tc,index:0});var t_=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.PK_VIEW_PLUGIN}),layoutName:c.t.LinkMicLayout,ComponentName:S.l.PK_VIEW_PLUGIN,index:0});let tv=(0,b.n)((0,A.ZP)(()=>Promise.all([t.e("74792"),t.e("3805")]).then(t.bind(t,114884)),{ssr:!1}),{name:S.l.SHORT_CUT,renderWhen:T._.FirstFrame,taskPriority:"user-blocking"});(0,nL.GI)({name:S.l.SHORT_CUT,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},roomStore:{hideBanner:i,roomInfo:o},vrStore:{isImmersive:r}}=n;return t&&!i&&(null==o?void 0:o.roomId)&&!r},Component:tv,index:0});var tm=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.SHORT_CUT}),layoutName:c.t.ShortTouchLayout,ComponentName:S.l.SHORT_CUT,index:0});let tf=(0,b.n)((0,A.ZP)(()=>t.e("30574").then(t.bind(t,798846)),{ssr:!1}),{name:S.l.VIP_VIEW_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.VIP_VIEW_PLUGIN,condition:e=>{var n;let{store:t}=e;return null==t?void 0:null===(n=t.feedStore)||void 0===n?void 0:n.isActive},Component:tf,index:0});var tp=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.VIP_VIEW_PLUGIN}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.VIP_VIEW_PLUGIN,index:0});let th=(0,b.n)((0,A.ZP)(()=>t.e("7680").then(t.bind(t,487543)),{ssr:!1}),{name:S.l.VIP_LIVE_BOUNDARY,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.VIP_LIVE_BOUNDARY,condition:()=>!0,Component:th,index:0});var tg=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.VIP_LIVE_BOUNDARY}),layoutName:c.t.TipsLayout,ComponentName:S.l.VIP_LIVE_BOUNDARY,index:0});let tE=(0,b.n)((0,A.ZP)(()=>t.e("56362").then(t.bind(t,327512)),{ssr:!1}),{name:S.l.PaidLivePlugin,renderWhen:T._.FirstFrame});(0,nL.GI)({name:S.l.PaidLivePlugin,condition:e=>{let{store:n}=e,{paidLiveStore:{isPaidLive:t},roomStore:{roomStatus:i,playerCoverText:o}}=n;return t&&i!==U.LV.END&&o!==ep.kx.ANCHOR_BAN&&o!==ep.kx.KICK_OUT},Component:tE,index:0});var ty=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.PaidLivePlugin}),layoutName:c.t.TipsLayout,ComponentName:S.l.PaidLivePlugin,index:0});let tI=(0,b.n)((0,A.ZP)(()=>t.e("32284").then(t.bind(t,294405)),{ssr:!1}),{name:S.l.LeadingLoginPlugin,renderWhen:T._.FirstFrame,taskPriority:"user-visible"});(0,nL.GI)({name:S.l.LeadingLoginPlugin,condition:()=>!0,Component:tI,index:0});var tP=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LeadingLoginPlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.LeadingLoginPlugin,index:0});let tL=(0,b.n)((0,A.ZP)(()=>Promise.resolve().then(t.bind(t,651884)),{ssr:!1}),{name:S.l.LinkMicLayoutPlugin,renderWhen:T._.FirstFrame});(0,nL.GI)({name:S.l.LinkMicLayoutPlugin,condition:e=>{let{store:n}=e,{linkmicStore:{useNewLinkMicRender:t,linkRoomTypeHooks:i,isNewVideoLinkmicRoom:o},feedStore:{isActive:r}}=n;return r&&!o&&(t||"audio"===i||"video"===i)},Component:tL,index:0});var tN=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LinkMicLayoutPlugin}),layoutName:c.t.LinkMicLayout,ComponentName:S.l.LinkMicLayoutPlugin,index:0});let tC=(0,b.n)((0,A.ZP)(()=>Promise.all([t.e("33733"),t.e("24882"),t.e("31972"),t.e("48632"),t.e("64551")]).then(t.bind(t,468285)),{ssr:!1}),{name:S.l.VIDEO_ROOM_PLUGIN,renderWhen:T._.FirstFrame});(0,nL.GI)({name:S.l.VIDEO_ROOM_PLUGIN,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},linkmicStore:{useNewLinkMicRender:i,linkRoomType:o,isNewVideoLinkmicRoom:r}}=n;return t&&!i&&"video"===o&&!r},Component:tC,index:0});var tS=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.VIDEO_ROOM_PLUGIN}),layoutName:c.t.LinkMicLayout,ComponentName:S.l.VIDEO_ROOM_PLUGIN,index:0});let tT=(0,b.n)((0,A.ZP)(()=>Promise.all([t.e("33733"),t.e("31972"),t.e("48632"),t.e("16489")]).then(t.bind(t,648819)),{ssr:!1}),{name:S.l.NEW_VIDEO_ROOM_PLUGIN,renderWhen:T._.FirstFrame});(0,nL.GI)({name:S.l.NEW_VIDEO_ROOM_PLUGIN,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},linkmicStore:{useNewLinkMicRender:i,linkRoomType:o,isNewVideoLinkmicRoom:r}}=n;return t&&!i&&"video"===o&&r},Component:tT,index:0});var tb=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.NEW_VIDEO_ROOM_PLUGIN}),layoutName:c.t.LinkMicLayout,ComponentName:S.l.NEW_VIDEO_ROOM_PLUGIN,index:0});let tA=(0,b.n)((0,A.ZP)(()=>Promise.all([t.e("74792"),t.e("33733"),t.e("24882"),t.e("31972"),t.e("48632"),t.e("81387")]).then(t.bind(t,908707)),{ssr:!1}),{name:S.l.AUDIO_ROOM_PLUGIN,renderWhen:T._.FirstFrame});(0,nL.GI)({name:S.l.AUDIO_ROOM_PLUGIN,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},linkmicStore:{useNewLinkMicRender:i,linkRoomType:o}}=n;return t&&!i&&"audio"===o},Component:tA,index:0});var tk=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.AUDIO_ROOM_PLUGIN}),layoutName:c.t.LinkMicLayout,ComponentName:S.l.AUDIO_ROOM_PLUGIN,index:0});let tR=(0,b.n)((0,A.ZP)(()=>Promise.resolve().then(t.bind(t,271426)),{ssr:!1}),{name:S.l.LinkMicPlayModeLimitPlugin,renderWhen:T._.FirstFrame,taskPriority:"user-visible"});(0,nL.GI)({name:S.l.LinkMicPlayModeLimitPlugin,condition:()=>!0,Component:tR,index:0});var tw=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LinkMicPlayModeLimitPlugin}),layoutName:c.t.TipsLayout,ComponentName:S.l.LinkMicPlayModeLimitPlugin,index:0}),tO=t("551914"),tx=t("515717");let tM=(0,b.n)((0,A.ZP)(()=>Promise.all([t.e("33733"),t.e("31972"),t.e("48632"),t.e("35473")]).then(t.bind(t,269479)),{ssr:!1}),{name:S.l.LINK_MIC_DYNAMIC_CONFIG,renderWhen:T._.FirstFrame});(0,nL.GI)({name:S.l.LINK_MIC_DYNAMIC_CONFIG,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},linkmicStore:{useNewLinkMicRender:i}}=n;return!!(t&&i)},Component:tM,index:0});var tD=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LINK_MIC_DYNAMIC_CONFIG}),layoutName:c.t.LinkMicLayout,ComponentName:S.l.LINK_MIC_DYNAMIC_CONFIG,index:0}),tj=t("65897"),tV=t("138494");let tU=(0,b.n)((0,A.ZP)(()=>t.e("15463").then(t.bind(t,380565)),{ssr:!1}),{name:S.l.OrderSingPlugin,renderWhen:T._.FirstFrame,taskPriority:"user-visible"});(0,nL.GI)({name:S.l.OrderSingPlugin,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},linkmicStore:{orderSingInfo:i}}=n;return t&&!!i},Component:tU,index:0});var tG=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.OrderSingPlugin}),layoutName:c.t.LinkMicAnimationLayout,ComponentName:S.l.OrderSingPlugin,index:0});let tF=(0,b.n)((0,A.ZP)(()=>t.e("1977").then(t.bind(t,878741)),{ssr:!1}),{name:S.l.GroupFightPlugin,renderWhen:T._.FirstFrame});(0,nL.GI)({name:S.l.GroupFightPlugin,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},linkmicStore:{isGroupFight:i}}=n;return t&&i},Component:tF,index:0});var tY=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.GroupFightPlugin}),layoutName:c.t.LinkMicAnimationLayout,ComponentName:S.l.GroupFightPlugin,index:0});let tZ=(0,b.n)((0,A.ZP)(()=>t.e("62099").then(t.bind(t,950619)),{ssr:!1}),{name:S.l.GuestBattlePlugin,renderWhen:T._.FirstFrame,taskPriority:"user-visible"});(0,nL.GI)({name:S.l.GuestBattlePlugin,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},linkmicStore:{isGuestBattle:i,isNewVideoLinkmicRoom:o}}=n;return t&&i&&!o},Component:tZ,index:0});var tK=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.GuestBattlePlugin}),layoutName:c.t.LinkMicAnimationLayout,ComponentName:S.l.GuestBattlePlugin,index:0});let tB=(0,b.n)((0,A.ZP)(()=>t.e("46668").then(t.bind(t,159286)),{ssr:!1}),{name:S.l.LiveReserveCard,renderWhen:T._.LivingInit,taskPriority:"background"}),tW=(0,en.Pi)(e=>{let{singletonStore:{message:n}}=(0,O.o)(),[t,i]=d.useState(""),[o,r]=d.useState(""),[l,c]=d.useState(""),[_,v]=d.useState(!1);(0,d.useEffect)(()=>null==n?void 0:n.wrds.on("RoomDataSyncMessage","",e=>{var n,t,o,l,a,u,s,d;let _=null==e?void 0:null===(t=e.payload)||void 0===t?void 0:null===(n=t.payload)||void 0===n?void 0:n.highlight_items;if(null==_?void 0:null===(o=_[0])||void 0===o?void 0:o.appointment_data){let e=null==_?void 0:null===(l=_[0])||void 0===l?void 0:l.appointment_data;i(null!==(u=null==e?void 0:e.appointment_id)&&void 0!==u?u:""),r(null!==(s=null==e?void 0:e.date_text)&&void 0!==s?s:""),c(null!==(d=null==e?void 0:e.time_text)&&void 0!==d?d:""),v((null==e?void 0:null===(a=e.scheduled_weekdays)||void 0===a?void 0:a.length)>0)}else(null==_?void 0:_.length)===0&&i("")}),[n]);let m=(0,u._)((0,a._)({},e),{appointmentId:t,dateText:o,timeText:l,isCycle:_});return(0,s.jsx)(tB,(0,a._)({},m))});var tH=(0,en.Pi)(()=>{let{roomStore:{liveStatus:e},userStore:{userInfo:n},playerStore:{isFullScreen:t,isTheaterOn:i}}=(0,O.o)(),{isLivingPip:o}=(0,eG.ds)();return(0,s.jsx)(tW,{isNormalScreen:!(t&&!i),uid:D()(n,"id_str",""),isPip:o})});(0,nL.GI)({name:S.l.LiveReserveCard,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},roomStore:{hideBanner:i}}=n;return t&&!i},Component:tH,index:0});var tq=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LiveReserveCard}),layoutName:c.t.ShortTouchLayout,ComponentName:S.l.LiveReserveCard,index:0});let tz=(0,b.n)((0,A.ZP)(()=>t.e("46701").then(t.bind(t,917470)),{ssr:!1}),{name:S.l.UgcAvatar,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.UgcAvatar,condition:e=>{let{pipContext:n}=e;return!(null==n?void 0:n.isLivingPip)},Component:tz,index:0});var t$=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.UgcAvatar}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.UgcAvatar,index:0}),tQ=t("178506");let tJ=(0,b.n)((0,A.ZP)(()=>t.e("58992").then(t.bind(t,143402)),{ssr:!1}),{name:S.l.ChangeDynamicBg,renderWhen:T._.LivingInit});(0,nL.GI)({name:S.l.ChangeDynamicBg,condition:()=>!0,Component:tJ,index:0});var tX=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.ChangeDynamicBg}),layoutName:c.t.ContainerBackgroundLayout,ComponentName:S.l.ChangeDynamicBg,index:0});let t0=(0,b.n)((0,A.ZP)(()=>t.e("46722").then(t.bind(t,652137)),{ssr:!1}),{name:S.l.LinkMicApplyPlugin,renderWhen:T._.FirstFrame,taskPriority:"background"});(0,nL.GI)({name:S.l.LinkMicApplyPlugin,condition:e=>{let{store:n}=e,{feedStore:{isActive:t},linkmicStore:{linkRoomType:i},roomStore:{roomStatus:o}}=n;return!!(t&&i&&o!==U.LV.END)},Component:t0,index:1});var t1=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LinkMicApplyPlugin}),layoutName:c.t.LinkMicLayout,ComponentName:S.l.LinkMicApplyPlugin,index:1}),t2=t("473197"),t9=t("283962"),t6=t("237061");let t3=(0,b.n)((0,A.ZP)(()=>t.e("9613").then(t.bind(t,883358)),{ssr:!1}),{name:S.l.GROUP_LIVE_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom)});(0,nL.GI)({name:S.l.GROUP_LIVE_PLUGIN,condition:e=>{let{store:n,pipContext:t}=e,{feedStore:{isActive:i},linkmicStore:{isGroupLive:o}}=n,{isLivingPip:r}=t;return!r&&i&&o},Component:t3,index:0});var t5=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.GROUP_LIVE_PLUGIN}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.GROUP_LIVE_PLUGIN,index:0});let t4=(0,b.n)((0,A.ZP)(()=>t.e("67337").then(t.bind(t,475632)),{ssr:!1}),{name:S.l.LiveFromAppTips,renderWhen:nT.d.after(T._.FirstFrame),taskPriority:"user-visible"});(0,nL.GI)({name:S.l.LiveFromAppTips,condition:()=>!0,Component:t4,index:0});var t8=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LiveFromAppTips}),layoutName:c.t.TipsLayout,ComponentName:S.l.LiveFromAppTips,index:0});let t7=(0,b.n)((0,A.ZP)(()=>t.e("98716").then(t.bind(t,744524)),{ssr:!1}),{name:S.l.WaterMark,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.WaterMark,condition:e=>{let{store:n,pipContext:t}=e,{feedStore:{isActive:i}}=n;return i},Component:t7,index:0});var ie=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.WaterMark}),layoutName:c.t.WaterMarkLayout,ComponentName:S.l.WaterMark,index:0}),it=t("872239");let ii=(0,b.n)((0,A.ZP)(()=>t.e("95934").then(t.bind(t,558279)),{ssr:!1}),{name:S.l.VrPlugin,renderWhen:T._.LivingInit});(0,nL.GI)({name:S.l.VrPlugin,condition:e=>{let{pipContext:n,store:t}=e;return!0},Component:ii,index:0});var io=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.VrPlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.VrPlugin,index:0});let ir=(0,b.n)((0,A.ZP)(()=>t.e("81913").then(t.bind(t,328208)),{ssr:!1}),{name:S.l.Gift_MENU_PLUGIN,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"user-visible"});(0,nL.GI)({name:S.l.Gift_MENU_PLUGIN,condition:e=>{let{store:n,abTestData:t}=e,{feedStore:{isActive:i}}=n;return i&&(null==t?void 0:t.giftMenu)},Component:ir,index:0});var il=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.Gift_MENU_PLUGIN}),layoutName:c.t.GiftMenuLayout,ComponentName:S.l.Gift_MENU_PLUGIN,index:0});let ia=(0,b.n)((0,A.ZP)(()=>t.e("2358").then(t.bind(t,268326)),{ssr:!1}),{name:S.l.LiveDebugStoragePlugin,renderWhen:nT.d.afterComponent(S.l.ChatRoom)});(0,nL.GI)({name:S.l.LiveDebugStoragePlugin,condition:()=>!0,Component:ia,index:0});var iu=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LiveDebugStoragePlugin}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.LiveDebugStoragePlugin,index:0});let is=(0,b.n)((0,A.ZP)(()=>t.e("73260").then(t.bind(t,185143)),{ssr:!1}),{name:S.l.NewLinkInitPlugin,renderWhen:T._.FirstFrame});(0,nL.GI)({name:S.l.NewLinkInitPlugin,condition:()=>!0,Component:is,index:0});var id=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.NewLinkInitPlugin}),layoutName:c.t.LinkMicLayout,ComponentName:S.l.NewLinkInitPlugin,index:0}),ic=t("774549"),i_=t("373720");let iv=(0,b.n)((0,A.ZP)(()=>t.e("5615").then(t.bind(t,592033)),{ssr:!1}),{name:S.l.MoreLiveEntrancePlugin,renderWhen:T._.FirstFrame,taskPriority:"user-visible"});(0,nL.GI)({name:S.l.MoreLiveEntrancePlugin,condition:e=>{var n;let{store:t}=e;return null==t?void 0:null===(n=t.feedStore)||void 0===n?void 0:n.isActive},Component:iv,index:0});var im=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.MoreLiveEntrancePlugin}),layoutName:c.t.TipsLayout,ComponentName:S.l.MoreLiveEntrancePlugin,index:0});i=0;let ip=(0,b.n)(nP,{name:S.l.LIVING_PLAYER,renderWhen:T._.LivingInit});var ih=(0,C.OV)({Component:ip,layoutName:c.t.PlayerLayout,ComponentName:S.l.LIVING_PLAYER,index:1}),ig=t("769125");let iE=(0,b.n)((0,A.ZP)(()=>Promise.all([t.e("35867"),t.e("75404")]).then(t.bind(t,81937)),{ssr:!1}),{name:S.l.ChatRoom,renderWhen:T._.FirstFrame,fallback:(0,s.jsx)("div",{className:eY()(ig.Z.comment,ig.Z.commentOpt),children:(0,s.jsx)("div",{className:ig.Z.commentInput})})});(0,nL.GI)({name:S.l.ChatRoom,condition:e=>{let{store:n}=e,{roomStore:{roomInfo:t},vrStore:{isImmersive:i}}=n;return D()(t,"web_rid")&&!i},Component:iE,index:0});var iy=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.ChatRoom}),layoutName:c.t.RightBackgroundLayout,ComponentName:S.l.RoomLogic,index:0}),iI=t("613123"),iP=t("242948"),iL=t("100893");let iN=(0,b.n)((0,A.ZP)(()=>t.e("63199").then(t.bind(t,118160)),{ssr:!1}),{name:S.l.LandPageContainer,renderWhen:T._.FirstFrame,taskPriority:"background"});(0,nL.GI)({name:S.l.LandPageContainer,condition:e=>{let{store:n}=e,{roomStore:{roomStatus:t,hideBanner:i},vipStore:{showVipLiveBoundary:o}}=n;return(t!==U.LV.END||o)&&(!i||o)},Component:iN,index:0});var iC=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LandPageContainer}),layoutName:c.t.RightPanelLayout,ComponentName:S.l.LandPageContainer,index:0}),iS=t("728210");let iT=(0,b.n)(iS.Z,{name:S.l.LiveShare,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.LiveShare,condition:e=>{let{store:n}=e,{roomStore:{roomStatus:t},feedStore:{isActive:i}}=n;return i&&t!==U.LV.END},Component:iT,index:0});var ib=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.LiveShare}),layoutName:c.t.LeftBackgroundLayout,ComponentName:S.l.LiveShare,index:0}),iA=t("91066"),ik=t("463301"),iR=t("896241");let iw=(0,b.n)((0,A.ZP)(()=>t.e("34162").then(t.bind(t,828822)),{ssr:!1}),{name:S.l.AutoRunModal,renderWhen:nT.d.afterComponent(S.l.ChatRoom),taskPriority:"background"});(0,nL.GI)({name:S.l.AutoRunModal,condition:()=>!0,Component:iw,index:0});var iO=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.AutoRunModal}),layoutName:c.t.ContainerBackgroundLayout,ComponentName:S.l.AutoRunModal,index:0});let ix=(0,b.n)((0,A.ZP)(()=>t.e("17282").then(t.bind(t,89808)),{ssr:!1}),{name:S.l.AudioCheatTips,renderWhen:T._.FirstFrame,taskPriority:"background"});(0,nL.GI)({name:S.l.AudioCheatTips,condition:()=>!0,Component:ix,index:0});var iM=(0,C.OV)({Component:()=>(0,s.jsx)(nN.Z,{name:S.l.AudioCheatTips}),layoutName:c.t.PlayerControlLayout,ComponentName:S.l.AudioCheatTips,index:0}),iD=t("966155"),ij=t("396868"),iV=t("23091"),iU=t("950257"),iG=t("569144");t("76375");var iF=t("414644");let iY=e=>{let{type:n=iF.NI.emptyList}=e;return d.useEffect(()=>{eH.emit(eH.EVENT.livePlayerEndCoverShow,{filter_detail:n})},[]),(0,s.jsx)(iF.jj,(0,a._)({type:n,className:`live-room-error ${n}`,secondaryButtonTitle:iF.NI.serverError===n?"刷新":void 0},e))};var iZ=t("811776"),iK=t("757506");t("112459");var iB={iframePlayer:"vR5wQ2aY",isMobile:"f7by3uOz",hideFullScreen:"LHNzIxVT",liveTitlePlugin:"M4T3g4Cl",liveTitlePluginContainer:"opJZ0W9m",liveCommentPlugin:"b7ZF4Hi5",iframePlayerDefault:"H1kIp3AS"},iW=t("983218"),iH=t("336814"),iq=t("181208"),iz=t("200240"),i$=t("314810"),iQ=t("682839"),iJ=t("565291"),iX=t("605220"),i0=t("336483"),i1=t("805652"),i2=t("890710"),i9=(0,en.Pi)(e=>{let{userCount:n="",title:t="",showUserCount:i=!1,className:o}=e,{player:r}=(0,ni.n)(),l=d.useMemo(()=>{var e;return null==r?void 0:null===(e=r.root)||void 0===e?void 0:e.querySelector(".douyin-player-top-bar")},[r]);return l?(0,i2.createPortal)((0,s.jsxs)("div",{className:eY()(i1.Z.liveTitle,o),children:[(0,s.jsx)("span",{className:i1.Z.text,children:t}),i&&(0,s.jsx)(i0.A,{className:i1.Z.userCount,count:n})]}),l):null}),i6=t("35679"),i3=t("85961"),i5=t("977259"),i4=t("580200"),i8=t("653249"),i7=t("205082"),oe=t("667897"),on=t("380599"),ot=t("632168");let oi=(0,A.ZP)(()=>Promise.resolve().then(t.bind(t,573495)),{ssr:!1});var oo=(0,e3.rW)(function(e){let{webRid:n,roomTeaLogParams:t,onClick:i,scene:o,program:r,className:l,isPaidLive:a,viewType:u,isLogin:c,full:_}=e,[v,m]=(0,d.useState)({}),f=(0,d.useMemo)(()=>{var e,t;return v&&v[n]&&o&&(null===(t=v[n])||void 0===t?void 0:null===(e=t.scopes)||void 0===e?void 0:e.indexOf(o))>-1?v[n]:null},[n,o,v]),p=d.useMemo(()=>!(a&&(u===i7.PAID_LIVE_VIEW_TYPE.TRT_WATCH_FINISH||!c)),[a,u,c]);if((0,d.useEffect)(()=>{(async()=>{m(await (0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"entrance"}))})()},[o,n]),p){var h;return(0,s.jsx)(oe.G,{href:(null==f?void 0:f.url)||(0,i8.X)(`/${n}`),target:(null==f?void 0:f.html_target)||"_blank",passParams:t,onClick:i,className:_?ot.Z.full:"","data-e2e":"live-enter-room",children:(0,s.jsxs)("div",{className:eY()([ot.Z.enterRoom,l,ot.Z.loaded]),children:[(0,s.jsx)(oi,{className:ot.Z.enterRoomIcon}),(0,s.jsx)("span",{children:(null==r?void 0:null===(h=r.mod)||void 0===h?void 0:h.episode_stage)===on.jL.FIRST_LIVE?"点击进入首播":(null==f?void 0:f.enter_text)||"点击进入直播间"})]})})}return null}),or=t("651884"),ol=t("494857"),oa=t("271426"),ou=t("41151"),os=t("327674"),od=t("347751"),oc=t("259610");let o_=(0,A.ZP)(()=>t.e("95542").then(t.bind(t,13076)),{ssr:!1}),ov=(0,A.ZP)(()=>Promise.all([t.e("74792"),t.e("33733"),t.e("24882"),t.e("31972"),t.e("48632"),t.e("81387")]).then(t.bind(t,908707)),{ssr:!1}),om=(0,A.ZP)(()=>Promise.all([t.e("33733"),t.e("24882"),t.e("31972"),t.e("48632"),t.e("64551")]).then(t.bind(t,468285)),{ssr:!1}),of=(0,A.ZP)(()=>t.e("61505").then(t.bind(t,141159)),{ssr:!1});var op=(0,en.Pi)(e=>{var n,t,i,o,r,l,u,c,_,v,m,f,p,h,g,E;let{onPlay:y,onSend:I,isPause:P,refreshPlayer:L,anchorSecUserId:N}=e,C=d.useRef(!0),{userStore:{userInfo:T,odin:b,setPlayerUserHandlePause:A},roomStore:{roomInfo:k,playerCoverText:R,isVerified:w},linkmicStore:{linkRoomType:M,linkRoomTypeHooks:j,linkStatus:V},eventStore:{playerEvent:G,basicEvent:F},detailExtra:{iframeConf:Y,setIframeConf:Z},playerStore:{playerInstance:K,playerLoggerInstance:B,setPlayerInstance:W,setPlayerLoggerInstance:H},singletonStore:{setPlayer:q}}=(0,O.o)(),z=(0,i4.Z)(),$=D()(k,"room.status"),Q=(0,d.useRef)(),[J,X]=(0,d.useState)(!1),ee=d.useMemo(()=>{if(Y){let e=Date.now(),{start:n,end:t}=Y;if(n&&t&&e>=n&&e<=t)return!0}return!1},[Y]),en=d.useMemo(()=>JSON.parse(D()(k,"room.stream_url.live_core_sdk_data.pull_data.stream_data","null")),[k]);(0,d.useEffect)(()=>{if(!C.current&&(null==T?void 0:T.isReady)){var e,n;null==G||G.livePlayEvent({anchor_id:D()(k,"anchor.id_str",""),room_id:k.roomId||"",muted:Q.current.getPlayer().muted,stream_type:z,enter_method_temai:null===(n=window)||void 0===n?void 0:null===(e=n.__INVISIBLE_QUERY__)||void 0===e?void 0:e.enter_method_temai}),C.current=!0}},[k,T,z,C]),(0,d.useEffect)(()=>(window.__IFRAME_PLAYER__=Q.current,document.body.style.overflowX="hidden",()=>{document.body.style.overflowX="auto"}),[]);let et=(0,d.useMemo)(()=>({enter_from_merge:"web_iframe"}),[]),ei=d.useRef(!eg.s&&(0,ef.rC)());d.useEffect(()=>{var e,n,t,i,o,r,l,a,u;let s=null===(e=Q.current)||void 0===e?void 0:e.getPlayer();if(!!s)V===ol.cK.LINKED?(ei.current=s.muted,s.muted=!0,null===(t=s.plugins)||void 0===t||null===(n=t.play)||void 0===n||n.hide(),null===(o=s.plugins)||void 0===o||null===(i=o.volume)||void 0===i||i.hide()):V===ol.cK.NOT_LINK&&(s.muted=ei.current,null===(l=s.plugins)||void 0===l||null===(r=l.play)||void 0===r||r.show(),null===(u=s.plugins)||void 0===u||null===(a=u.volume)||void 0===a||a.show())},[V]);let eo=(0,ou.Z)(),er=(0,d.useMemo)(()=>({autoplay:!0,volume:(0,ef.T1)(),muted:!1,decryption:null}),[]),el=(0,d.useMemo)(()=>{if("undefined"!=typeof window){let e=e8.parse(window.location.search);return(null==e?void 0:e.disableFullscreen)==="true"}return!1},[]);(0,d.useEffect)(()=>{k.web_rid&&(0,x.ZP)({service_name:"webcast.douyin.live_pc",key:"iframe_conf"}).then(e=>{Z(e[String(k.web_rid)])})},[k]),(0,d.useEffect)(()=>{var e,n,t,i;let o=null===(n=Q.current)||void 0===n?void 0:null===(e=n.getPlayer)||void 0===e?void 0:e.call(n);o&&(0,nk.tq)()&&(null==o||null===(t=o.setAttribute)||void 0===t||t.call(o,"playsinline",!0),null==o||null===(i=o.setAttribute)||void 0===i||i.call(o,"webkit-playsinline",!0))},[null===(t=Q.current)||void 0===t?void 0:null===(n=t.getPlayer)||void 0===n?void 0:n.call(t)]),(0,d.useEffect)(()=>{var e,n,t,i,o,r,l,a;let u=null===(n=Q.current)||void 0===n?void 0:null===(e=n.getPlayer)||void 0===e?void 0:e.call(n);(0,nk.tq)()&&(null==u?void 0:u.root)&&(null==u||null===(o=u.root)||void 0===o||null===(i=o.classList)||void 0===i||null===(t=i.add)||void 0===t||t.call(i,iB.isMobile)),el&&(null==u?void 0:u.root)&&(null==u||null===(a=u.root)||void 0===a||null===(l=a.classList)||void 0===l||null===(r=l.add)||void 0===r||r.call(l,iB.hideFullScreen))},[(0,nk.tq)(),el]);let ea=null==Y?void 0:Y.resolution,eu=(0,nm.qH)({h264PullData:null==k?void 0:null===(r=k.room)||void 0===r?void 0:null===(o=r.stream_url)||void 0===o?void 0:null===(i=o.live_core_sdk_data)||void 0===i?void 0:i.pull_data,h265PullData:null==k?void 0:null===(u=k.web_stream_url)||void 0===u?void 0:null===(l=u.live_core_sdk_data)||void 0===l?void 0:l.pull_data,canUseStreamPlugin:!0,qualityLimit:ea?(0,oc.bY)(ea):void 0});return(0,s.jsxs)("div",{onClick:()=>{var e,n;null===(n=Q.current)||void 0===n||null===(e=n.getPlayer())||void 0===e||e.focus({})},children:[(0,s.jsx)(ec,{}),ee?(0,s.jsxs)(ev.N,{className:eY()(iB.iframePlayer,"iframe-player",{[iB.hideFullScreen]:el,[iB.isMobile]:(0,nk.tq)()}),volume:(0,ef.T1)(),disabledLogger:!!(R&&!(R===ep.kx.ANCHOR_BAN&&M)),closeVideoClick:!0,ref:e=>{if(Q.current={getPlayer:()=>null==e?void 0:e.player},(null==e?void 0:e.player)&&(null==e?void 0:e.player)!==K){var n;W(null==e?void 0:e.player),q(null==e?void 0:e.player),null==e||null===(n=e.player)||void 0===n||n.on("error",e=>{})}(null==e?void 0:e.logger)&&(null==e?void 0:e.logger)!==B&&H(null==e?void 0:e.logger)},onFullScreen:e=>{X(e)},icons:{loadingIcon:(0,i5.renderToString)((0,s.jsx)(iW.gb,{className:"live-player-loading",text:"视频加载中"}))},onUserAction:e=>{"switch_play_pause"===e.action&&A(!e.paused)},loggerOptions:{user_id:null==T?void 0:T.id_str,device_id:b.user_unique_id,scene:eh.C.iframe},baseConfig:er,pluginsConfig:eu,scene:"IframePlayer",children:["audio"===M&&$!==U.LV.END&&(0,s.jsx)(iQ.k,{componentName:S.l.AUDIO_ROOM_PLUGIN,children:(0,s.jsx)(ov,{isVerifyed:w})}),"video"===M&&$!==U.LV.END&&(0,s.jsx)(iQ.k,{componentName:S.l.VIDEO_ROOM_PLUGIN,children:(0,s.jsx)(om,{})}),("audio"===j||"video"===j)&&(0,s.jsx)(or.LinkMicLayoutPlugin,{isVerifyed:w}),R&&(0,s.jsx)(iq.PlayerEndCover,{cover:D()(k.anchor,"avatar_thumb.url_list[0]",""),anchorSecUserId:N,children:R}),(0,s.jsx)(iz.PlayerLoggerPlugin,{ext:(0,a._)({_is_new_version:null!==(E=null===(c=window)||void 0===c?void 0:c.isNewVersionFirstOpen)&&void 0!==E?E:"",enter_from_merge:null==F?void 0:null===(_=F.getEnterEventParams())||void 0===_?void 0:_.enter_from_merge,enter_method:null==F?void 0:null===(v=F.getEnterEventParams())||void 0===v?void 0:v.enter_method,is_preview:1},eo)}),(0,s.jsx)(iJ.Z,{}),(0,s.jsx)(os.VolumeMemoryPlugin,{}),(0,s.jsx)(i6.default,{}),(0,s.jsx)(oa.LinkMicPlayModeLimitPlugin,{isVerifyed:w}),(0,s.jsx)(i3.RefreshPluginWrap,{position:0,index:1,props:{}}),(0,s.jsx)(iQ.k,{componentName:S.l.TITLE_PLUGIN,children:(0,s.jsx)(i9,{containerClassName:iB.liveTitlePlugin,className:iB.liveTitlePluginContainer,position:"rootTop",title:null===(m=k.room)||void 0===m?void 0:m.title,userCount:(0,iH.jQ)(k.room)})}),(0,s.jsx)(i$.AdaptedBySEIPlugin,{}),(null==Y?void 0:null===(f=Y.plugins)||void 0===f?void 0:f.includes("danmaku"))&&(0,s.jsx)(iQ.k,{componentName:S.l.DANMAKU_PLUGIN,children:(0,s.jsx)(o_,{on:!0,feature:!0})}),(null==Y?void 0:null===(p=Y.plugins)||void 0===p?void 0:p.includes("enter"))&&(0,s.jsx)(oo,{props:{webRid:k.web_rid,roomTeaLogParams:et},webRid:k.web_rid,roomTeaLogParams:et}),(null==Y?void 0:null===(h=Y.plugins)||void 0===h?void 0:h.includes("comment"))&&(0,s.jsx)(iQ.k,{componentName:S.l.COMMENT_PLUGIN,children:(0,s.jsx)(iX.FoldChatRoomCommentPlugin,{position:0,props:{containerClassName:iB.liveCommentPlugin,isLogin:null==T?void 0:T.id_str,onSend:I,isIframe:!0},containerClassName:iB.liveCommentPlugin,isLogin:null==T?void 0:T.id_str,onSend:I,isIframe:!0})}),(0,s.jsx)(od.default,{}),(null==Y?void 0:null===(g=Y.plugins)||void 0===g?void 0:g.includes("bitrate"))&&en&&(0,s.jsx)(iQ.k,{componentName:S.l.QUALITY_SWITCH_PLUGIN,children:(0,s.jsx)(of,{})}),(0,s.jsx)(nc.h,{source:"IframePlayer"})]}):(0,s.jsx)("div",{className:iB.iframePlayerDefault,children:"「前往抖音电脑版,查看更多精彩直播」"})]})}),oh=t("106370");let og=(0,A.ZP)(()=>t.e("82199").then(t.bind(t,6480)),{ssr:!1});var oE=t("395686");o=0;let oy=(0,en.Pi)(e=>{var n,t;let i=null!==(n=e.pathname)&&void 0!==n?n:"",o=(0,d.useMemo)(()=>(0,N.O)(),[]),r=(0,nl.T)(),l=(0,O.o)(),{roomStore:{foldChatroom:a,roomInfo:u,roomStatus:c,isPlayer:_},playerStore:{isFullScreen:C,isTheaterOn:S,setIsTheaterOn:T},pkStore:{pkStatus:b},linkmicStore:{linkRoomType:A,linkMicLayout:k},detailExtra:{inRoomError:R,status_code:w},vrStore:{isImmersive:x},rightPanelStore:{operatingBarPluginIsShow:M}}=l,j=(0,eG.ds)(),V=(0,d.useMemo)(()=>({abTestData:r,store:l,pipContext:j}),[r,l,j]);(0,nd.R)();let G=1===Number((0,na.useUseEnterRoomAnimationAB)()),F=(0,d.useMemo)(()=>{var e;return G&&(0,ne.Nr)(i)&&!!(null===nn.Z||void 0===nn.Z?void 0:null===(e=nn.Z.getPlayerInstance)||void 0===e?void 0:e.call(nn.Z))},[]),[Y,Z]=(0,d.useState)(F),K=d.useRef(!F),B=!!((null==u?void 0:u.room)&&(null==u?void 0:u.web_rid)),W=d.useRef(B);W.current=B,(0,d.useEffect)(()=>{if(!F)return;let e=setTimeout(()=>{K.current=!0,W.current&&Z(!1)},350),n=setTimeout(()=>Z(!1),1500);return()=>{clearTimeout(e),clearTimeout(n)}},[]),(0,d.useEffect)(()=>{F&&K.current&&B&&Z(!1)},[F,B]);let H=(0,d.useMemo)(()=>{if(Y){var e;let n=null===nn.Z||void 0===nn.Z?void 0:null===(e=nn.Z.getEnterIsLandscapeHint)||void 0===e?void 0:e.call(nn.Z);return!!C||!0!==n&&!0}return(null==u?!void 0:!u.room)||c===U.LV.END||(null==u?!void 0:!u.web_stream_url)||!u.web_rid||!!C||1===D()(u,"room.stream_url.stream_orientation")&&!b&&"audio"!==A&&"video"!==A},[u,A,b,C,S,c,Y]),{enlargeDynamicBg:q,enlargePadding:z}=(0,iG.K)(),$="4003073"===w,Q="4003222"===w,J="4003233"===w,[X,en]=d.useState(!1);(0,d.useEffect)(()=>{if(!Q&&!J||!X&&J)return;(0,ne.Nr)(i)&&(history.back(),ij.F.info("主播已设置直播间人数上限,暂不可进入"));let e=setTimeout(()=>{window.history.length>1&&document.referrer&&document.referrer.includes("douyin.com")||(0,ne.Nr)(i)?history.back():document.referrer.includes("live.douyin.com")?window.open("https://live.douyin.com/","_self"):document.referrer.includes("www.douyin.com")?window.open("https://www.douyin.com/?recommend=1","_self"):window.open("https://live.douyin.com/","_self")},3e3);return()=>{clearTimeout(e)}},[Q,X,J,i]);let et=R&&"4003099"!==w||!_||$||Q||J;(0,d.useEffect)(()=>{et&&((0,ee.q)("ISLAND_SYNC_HEADER"),(0,ee.q)("ISLAND_LAYOUT_NAVIGATION"),T(!1))},[et]);let ei=(0,oh.y)(et);return et?(0,s.jsxs)(s.Fragment,{children:[ei,J&&(0,s.jsx)(og,{setMaxMemberError:en,webRid:null==u?void 0:u.web_rid}),(0,s.jsx)(iY,{type:"serverError",title:Q?"主播已设置直播间人数上限,暂不可进入":$?"当前直播间在本区域未开放":"服务器开小差了,点击刷新重试",primaryButtonTitle:$||Q?"":"刷新",primaryButtonAction:()=>{var e,n;null===(n=window)||void 0===n||null===(e=n.location)||void 0===e||e.reload()}})]}):u?(0,s.jsx)(iD.Z,{context:V,children:(0,s.jsx)(L.Gw,{uuid:o,children:(0,s.jsx)(iK.P,{value:{detailPage:e.detailPage},children:(0,s.jsxs)(n_.tA,{children:[(0,s.jsx)(eJ.EA,{roomId:null!==(t=u.roomId)&&void 0!==t?t:""}),(0,s.jsx)("div",{className:eY()(P.root,{__playerIsFull:!0,__fullScreenOrTheaterOn:C||S,[P.fullScreen]:C||S,[P.fold]:a,__roomInfoBarInner:H,__roomInfoBarOuter:!H&&!x,__seamlessEnterAnim:F,__isAudioRoom:"audio"===A&&k!==iU.yP.MATE_CUSTOM,__isVideoRoom:"video"===A,__hasOptionBar:!0,[P.enlargeDynamicBackground]:q,[P.enlargePadding]:z,[P.isClient]:(0,nk.DT)(),[P.isImmersive]:x}),"data-e2e":"living-container",children:(0,s.jsxs)(v,{className:eY()(P.container,P.containerOpt),children:[(0,s.jsxs)(m,{className:P.left,children:[(0,s.jsxs)(f,{className:P.header,children:[(0,s.jsx)(p,{}),(0,s.jsx)(h,{})]}),(0,s.jsx)(iZ.zS,{children:(0,s.jsx)(g,{className:P.playerContainer})}),(0,s.jsx)(E.H,{className:eY()(P.bottom,{[P.enterFromBottom]:F,[P.noOperatingBar]:F&&!Y&&!1===M})}),(0,s.jsx)(y,{className:eY()({[P.enterFromSide]:F})})]}),(0,s.jsx)(I.P,{className:P.right})]})})]})})})}):null}),oI=(0,oE.J1)(oy);function oP(e){let n=(0,X.a)(),t=(0,d.useMemo)(()=>/iframe/.test(n.pathname),[n]);return(0,s.jsx)(iV.vD,{children:t?(0,s.jsx)(op,{}):(0,s.jsx)(oI,(0,u._)((0,a._)({},e),{pathname:n.pathname}))})}},104891:function(e,n,t){t.d(n,{l:function(){return i}});var i={TRIPLE_SCREEN_PLUGIN:"triple_screen_plugin",ROTATE_PLUGIN:"rotate_plugin",GLOBAL_APP:"global_app",GIFT_BAR:"gift_bar",GIFT_BAR_MINI:"gift_bar_mini",HEADER:"header",NAVIGATION:"navigation",SIDEBAR:"siderbar",CATEGORY_TAB:"category_tab",TAB:"tab",TITLE_PLUGIN:"title_plugin",FOLLOW_PLUGIN:"follow_plugin",COMMENT_PLUGIN:"comment_plugin",GIFT_SWITCH_PLUGIN:"gift_switch_plugin",GIFT_BAR_PLUGIN:"gift_bar_plugin",EFFECT_SWITCH_PLUGIN:"effect_switch_plugin",GIFT_TRAY_PLUGIN:"gift_tray_plugin",GIFT_EFFECT_PLUGIN:"gift_effect_plugin",FANS_CLUB_PLUGIN:"fans_club_plugin",EXHIBITION_VIEW_PLUGIN:"exhibition_view_plugin",VIP_VIEW_PLUGIN:"vip_view_plugin",EFFECT_PLUGIN:"effect_plugin",HOUR_RANK_LIST_VIEW_PLUGIN:"hour_rank_list_view_plugin",TOOL_BAR_PLUGIN:"tool_bar_plugin",QUALITY_SWITCH_PLUGIN:"quality_switch_plugin",DANMAKU_PLUGIN:"danmaku_plugin",AUDIO_ROOM_PLUGIN:"audio_room_plugin",VIDEO_ROOM_PLUGIN:"video_room_plugin",RTC_LAYER_PLUGIN:"rtc_layer_plugin",PK_VIEW_PLUGIN:"pk_view_plugin",PIP_PLUGIN:"pip_plugin",INPICTURE_PLUGIN:"inpicture_plugin",ADMIN_PRIVILEGE_PLUGIN:"admin_privilege_plugin",LIVING_PLAYER:"living_plyaer",IFRAME_PLAYER:"iframe_player",GIFT_ITEM:"gift_item",GIFT_PANEL:"gift_panel",LIVE_CATEGORY:"live_category",LIVE_CARD:"live_card",RANK_LIST:"rank_list",ORDER_SING_LIST:"order_sing_list",ORDER_SING_RULE:"order_sing_rule",PROMOTION_POP:"promotion_pop",PROMOTION_LIST_WRAPPER:"promotion_list_wrapper",FANS_CLUB_POPUP:"fans_club_popup",USER_POPUP:"user_popup",CHAT_ROOM_PANEL:"chat_room_panel",AUDIENCE_PANEL:"audience_panel",FIXED_CHAT:"fixed_chat",LIVE_CAROUSEL:"live_carousel",LIVE_COVER:"live_cover",LIVE_FULLPLAYER_QULIATY:"live_fullplayer_quality",Live_Like:"live_like",Live_Flutter_Like:"live_flutter_like",DANMAKU_SETTINGS:"danmaku_settings",VIP_LIVE_BOUNDARY:"vip_live_boundary",FOLD_CHAT_ROOM_COMMENT_PLUGIN:"fold_chat_room_comment_plugin",LIVING_PIP_WINDOW:"living-pip-window",SHORT_CUT:"short_cut",SERVICE_CENTER_PLUGIN:"service_center_plugin",QUALITY_SWITCH:"quality_switch",LivePreviewEnterRoom:"LivePreviewEnterRoom",LiveUserProfile:"live_user_profile",LOTTERY_COMPONENT:"lottery_componet",LOTTERY_COMPONENT_PLUGIN:"lottery_componet_plugin",LINK_MIC_DYNAMIC_CONFIG:"link_mic_dynamic_config",LIVE_RESERVE_CARD:"live_reserve_card",StreamCompute:"StreamCompute",RoomLogic:"RoomLogic",EnterAndLeave:"EnterAndLeave",LiveStallPerfReporter:"LiveStallPerfReporter",ForceLoginRecorder:"ForceLoginRecorder",ChatRoom:"ChatRoom",Tracking:"Tracking",RoomInit:"RoomInit",RoomMessageConsume:"RoomMessageConsume",StatusHandler:"StatusHandler",RoomEvent:"RoomEvent",RightPanelContainer:"RightPanelContainer",DetailLayoutSideCard:"DetailLayoutSideCard",RoomInfoBar:"RoomInfoBar",LandPageContainer:"LandPageContainer",LiveShare:"LiveShare",OperatingBar:"OperatingBar",TheaterPlugin:"TheaterPlugin",KeyBindPlugin:"KeyBindPlugin",VolumeMemoryPlugin:"VolumeMemoryPlugin",RefreshPlugin:"RefreshPlugin",LiveDebugStoragePlugin:"LiveDebugStoragePlugin",HintContainerPlugin:"HintContainerPlugin",CancelMutePlugin:"CancelMutePlugin",GlobalControlPlugin:"GlobalControlPlugin",PlayerLoggerPlugin:"PlayerLoggerPlugin",PlayerTeaLogPlugin:"PlayerTeaLogPlugin",PlayerEndCover:"PlayerEndCover",VolumeWheelPlugin:"VolumeWheelPlugin",AdaptedBySEIPlugin:"AdaptedBySEIPlugin",PKSEIPlugin:"PKSEIPlugin",NewPlayerErrorCover:"NewPlayerErrorCover",PaidLivePlugin:"PaidLivePlugin",LeadingLoginPlugin:"LeadingLoginPlugin",LinkMicLayoutPlugin:"LinkMicLayoutPlugin",LinkMicPlayModeLimitPlugin:"LinkMicPlayModeLimitPlugin",UpdateFunctionTypePlugin:"UpdateFunctionTypePlugin",TopEffectPlugin:"TopEffectPlugin",OrderSingPlugin:"OrderSingPlugin",GroupFightPlugin:"GroupFightPlugin",GuestBattlePlugin:"GuestBattlePlugin",LiveReserveCard:"LiveReserveCard",PlayerControl:"PlayerControl",UgcAvatar:"UgcAvatar",PlayerEventConsume:"PlayerEventConsume",GroupLive:"GroupLive",ChangeDynamicBg:"ChangeDynamicBg",LinkMicApplyPlugin:"LinkMicApplyPlugin",ORDER_SING_SELECT_GUEST:"order_sing_select_guest",PausePop:"PausePop",DetailContextMenuPlugin:"DetailContextMenuPlugin",DoubleScreenPlugin:"DoubleScreenPlugin",ProgrammeWrapper:"ProgrammeWrapper",LiveTDK:"LiveTDK",AutoRunModal:"AutoRunModal",AudioCheatTips:"AudioCheatTips",GetDressList:"GetDressList",GROUP_LIVE_PLUGIN:"group_live_plugin",LiveFromAppTips:"LiveFromAppTips",MoreLiveEntrancePlugin:"MoreLiveEntrancePlugin",COMMENT_EDITOR:"comment_editor",WaterMark:"WaterMark",LIVE_CARD_IN_MIX_PLAYER:"live_card_in_mix_player",AiHelper:"AiHelper",VrPlugin:"VrPlugin",NewLinkInitPlugin:"NewLinkInitPlugin",Gift_MENU_PLUGIN:"GiftMenu",LIVE_CHANNEL_BANNER_ROOMS:"LIVE_CHANNEL_BANNER_ROOMS",LIVE_CHANNEL_BANNER:"LIVE_CHANNEL_BANNER",NEW_VIDEO_ROOM_PLUGIN:"new_video_room_plugin",NEW_RTC_LAYER_PLUGIN:"new_rtc_layer_plugin",NewLinkMicLogicPlugin:"NewLinkMicLogicPlugin",LIVE_CHANNEL_RECOMMEND_LIST:"LIVE_CHANNEL_RECOMMEND_LIST",LIVE_CHANNEL_FOLLOW_LIST:"LIVE_CHANNEL_FOLLOW_LIST",LIVE_CHANNEL_HOT_CATEGORY:"LIVE_CHANNEL_HOT_CATEGORY"}},345754:function(e,n,t){t.d(n,{AY:function(){return l},HI:function(){return a},NY:function(){return r},WK:function(){return o},kc:function(){return i}});var i={WEBCAST_CHAT_MESSAGE:"WebcastChatMessage",WEBCAST_GIFT_MESSAGE:"WebcastGiftMessage"};let o=[{desc:"一行",value:.1,key:1,log:.1},{desc:"两行",value:.2,key:5,log:.2},{desc:"25%",value:.25,key:2,log:.4},{desc:"50%",value:.5,key:3,log:.5},{desc:"80%",value:.8,key:4,log:.8}],r=[{desc:"超小",value:16,width:`${16}px`,key:5,log:-1},{desc:"小号",value:20,width:"20px",key:1,log:0},{desc:"适中",value:24,width:`${22}px`,key:2,log:1},{desc:"大号",value:28,width:`${26}px`,key:3,log:2},{desc:"超大",value:32,width:`${30}px`,key:4,log:3}],l=[{desc:"较慢",value:18e3,key:1,log:0},{desc:"适中",value:14400,key:2,log:1},{desc:"较快",value:10800,key:3,log:2}],a={opacity:80,area:3,fontSize:1,speed:1,giftOn:!0,packageOn:!0}},721108:function(e,n,t){t.d(n,{C:function(){return i}});var i={iframe:"iframe",liveCard:"live_card",liveSmallCard:"live_small_card",liveCarousel:"live_carousel",liveDetail:"live_detail",mediaDetail:"live_media_detail",smallWindow:"live_small_window",liveCollege:"live_college",liveSearch:"live_search",liveSlider:"live_slider",liveFeedFull:"live_feed_full",liveModal:"live_modal"}},59592:function(e,n,t){var i=t(320165),o=t(101199),r=t(301930),l=t(964591),a=t(37482);n.Z=(0,o.memo)((0,l.Pi)(e=>{let{children:n,name:t}=e,l=(0,o.useContext)(r.h),u=a.Z.getIocItem(l,t);return u?(0,i.jsx)(u.Component,{children:n}):null}))},301930:function(e,n,t){t.d(n,{T:function(){return r},h:function(){return o}});var i=t(320165);let o=t(101199).createContext([]),r=e=>{let{children:n,context:t}=e;return(0,i.jsx)(o.Provider,{value:t,children:n})}},913174:function(e,n,t){t.d(n,{GI:function(){return o}});var i=t(37482);let o=i.Z.defineIoc.bind(i.Z)},37482:function(e,n,t){var i=t(480333);t(374954),t(591964),t(117232);var o=t(731343);n.Z=new class e{defineIoc(e){!this.iocList.find(n=>n.name===e.name&&n.index===e.index)&&this.iocList.push(e)}getIocList(e){return Object.values(this.iocList.filter(n=>n.condition(e)).reduce((e,n)=>((!e[n.name]||e[n.name].index<n.index)&&(e[n.name]=n),e),{}))}getIocItem(e,n){return this.iocList.filter(e=>e.name===n).filter(n=>n.condition(e)).sort((e,n)=>n-e)[0]}constructor(){(0,i._)(this,"iocList",[]),(0,i._)(this,"context",{}),(0,o.makeAutoObservable)(this)}}},357045:function(e,n,t){t.d(n,{t:function(){return s}});var i=t(629686),o=t(402748);t(117232);var r=t(320165),l=t(3721),a=t(101199),u=t(757506);let s=(e,n)=>(l.Z.setLayout({name:e,id:e}),(0,a.memo)(t=>{let{className:s="",style:d={},children:c}=t,_=l.Z.getComponent(e),v=(0,u.i)(),m=_.filter(e=>e.location===l.h.Before).sort((e,n)=>e.index-n.index),f=_.filter(e=>e.location===l.h.After).sort((e,n)=>e.index-n.index),p=(0,a.useRef)(null);return a.useEffect(()=>{let e=p.current;return()=>{try{null==e||e.remove()}catch(e){}}},[]),(0,r.jsxs)("div",{className:s,style:(0,o._)((0,i._)({},d),{zIndex:n}),ref:p,id:e,children:[m.map(e=>(0,r.jsx)(a.Fragment,{children:(0,r.jsx)(e.Component,(0,i._)({},v))},e.id)),c,f.map(e=>(0,r.jsx)(a.Fragment,{children:(0,r.jsx)(e.Component,(0,i._)({},v))},e.id))]})}))},3721:function(e,n,t){t.d(n,{h:function(){return l}});var i=t(480333),o=t(629686);t(374954);var r=t(731343),l={Before:"before",After:"after"};n.Z=new class e{defineLayoutItem(e){let n=(0,o._)({index:0,id:e.ComponentName,location:"after"},e);!this.layoutConfig[n.layoutName]&&(this.layoutConfig[n.layoutName]=[]),!this.layoutConfig[n.layoutName].find(e=>e.ComponentName===n.ComponentName)&&this.layoutConfig[n.layoutName].push(n)}getComponent(e){return this.layoutConfig[e]||[]}setLayout(e){this.layouts[e.name]=e}getLayout(e){return this.layouts[e]}deleteLayout(e){delete this.layouts[e]}getLayoutRoot(e){let n=this.layouts[e];return n?document.querySelector(`#${n.id}`):null}constructor(){(0,i._)(this,"layoutConfig",{}),(0,i._)(this,"layouts",{}),(0,r.makeAutoObservable)(this,{})}}},757506:function(e,n,t){t.d(n,{P:function(){return l},i:function(){return a}});var i=t(320165),o=t(101199);let r=o.createContext({}),l=e=>(0,i.jsx)(r.Provider,{value:e.value,children:e.children}),a=()=>o.useContext(r)},39965:function(e,n,t){t.d(n,{n:function(){return v}});var i=t(629686),o=t(320165),r=t(101199),l=t(682839),a=t(430576),u=t(197752),s=t(318966),d=t(397176),c=t(964591),_=t(176209);function v(e,n){let{ErrorBoundary:t=l.k,name:v,fallback:m=(0,o.jsx)(o.Fragment,{}),renderWhen:f,timeout:p}=n;function h(n){let t=(0,u.bU)();return(0,r.useEffect)(()=>{null==t||t.emitComponentAfter(v,{})},[t]),(0,o.jsx)(e,(0,i._)({},n))}return(0,c.Pi)(function(e){let n=(0,a.$)({renderWhen:(0,_.VZ)(v)||f,timeout:p||(0,_.UX)()||3e3,componentName:v}),l=(0,u.bU)();(0,r.useMemo)(()=>{n&&(null==l||l.emitComponentBefore(v,{}))},[n,l]);let c=(0,r.useMemo)(()=>{if(!d.s)return(0,s.OK)()},[]);return n?(0,o.jsx)(t,{componentName:v,_slardarInstance:c,children:(0,o.jsx)(h,(0,i._)({},e))}):m},{forwardRef:!1})}},197752:function(e,n,t){t.d(n,{Gw:function(){return a},bU:function(){return u}});var i=t(320165),o=t(101199),r=t(649189);let l=o.createContext(null),a=e=>{let{children:n,uuid:t}=e,a=(0,o.useMemo)(()=>new r.d(t),[t]),u=(0,o.useRef)(a);return u.current=a,(0,o.useEffect)(()=>()=>{var e;null==u||null===(e=u.current)||void 0===e||e.destroy()},[]),(0,i.jsx)(l.Provider,{value:a,children:n})},u=()=>o.useContext(l)},649189:function(e,n,t){t.d(n,{d:function(){return r}});var i=t(480333);t(490629);var o=t(254486);class r{static after(e){return"__after__"+e}static before(e){return"__before__"+e}static unmountComponent(e){return"__unmountComponent__"+e}static beforeFn(e){return"__beforeFn__"+e}static afterFn(e){return"__afterFn__"+e}static beforeComponent(e){return"__beforeComponent__"+e}static afterComponent(e){return"__afterComponent__"+e}static forceUnmountComponent(e){return"__forceUnmountComponent__"+e}static forceMountComponent(e){return"__forceMountComponent__"+e}on(e,n){return this.eventBus.on(e,n),()=>this.eventBus.off(e,n)}onImmediately(e,n){return this.emitedEvents.has(e)?(n(),()=>{}):(this.on(e,n),()=>this.eventBus.off(e,n))}off(e,n){this.eventBus.off(e,n)}emit(e,n){this.eventBus.emit(e,n)}onComponentBefore(e,n){return this.eventBus.on(r.beforeComponent(e),n),()=>this.eventBus.off(r.beforeComponent(e),n)}onComponentAfter(e,n){return this.eventBus.on(r.afterComponent(e),n),()=>this.eventBus.off(r.afterComponent(e),n)}onFnBefore(e,n){return this.eventBus.on(r.beforeFn(e),n),()=>this.eventBus.off(r.beforeFn(e),n)}onFnAfter(e,n){return this.eventBus.on(r.afterFn(e),n),()=>this.eventBus.off(r.afterFn(e),n)}emitComponentBefore(e,n){this.eventBus.emit(r.beforeComponent(e),n)}emitComponentAfter(e,n){this.eventBus.emit(r.afterComponent(e),n)}emitFnBefore(e,n){this.eventBus.emit(r.beforeFn(e),n)}emitFnAfter(e,n){this.eventBus.emit(r.afterFn(e),n)}emitUnmountComponent(e,n){this.eventBus.emit(r.unmountComponent(e),n)}onUnmountComponent(e,n){return this.eventBus.on(r.unmountComponent(e),n),()=>this.eventBus.off(r.unmountComponent(e),n)}onForceUnmountComponent(e,n){return this.eventBus.on(r.forceUnmountComponent(e),n),()=>this.eventBus.off(r.forceUnmountComponent(e),n)}onForceMountComponent(e,n){return this.eventBus.on(r.forceMountComponent(e),n),()=>this.eventBus.off(r.forceMountComponent(e),n)}dispatchForceUnmountComponent(e){this.eventBus.emit(r.forceUnmountComponent(e),{})}dispatchForceMountComponent(e){this.eventBus.emit(r.forceMountComponent(e),{})}get id(){return this._id}destroy(){try{this.eventBus.all.clear()}catch(e){}}constructor(e){var n=this;(0,i._)(this,"eventBus",(0,o.Z)()),(0,i._)(this,"_id",void 0),(0,i._)(this,"emitedEvents",new Set),this._id=e;let t=this.eventBus.emit.bind(this.eventBus);this.eventBus.emit=function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];n.emitedEvents.add(i[0]),t(...i)}}}},885163:function(e,n,t){t.d(n,{W6:function(){return i}});var i={TPYE_LINKER_UNKNOWN:0,0:"TPYE_LINKER_UNKNOWN",TYPE_LINKER_CREATE:1,1:"TYPE_LINKER_CREATE",TYPE_LINKER_CLOSE:2,2:"TYPE_LINKER_CLOSE",TYPE_LINKER_INVITE:3,3:"TYPE_LINKER_INVITE",TYPE_LINKER_APPLY:4,4:"TYPE_LINKER_APPLY",TYPE_LINKER_REPLY:5,5:"TYPE_LINKER_REPLY",TPYE_LINKER_ENTER:6,6:"TPYE_LINKER_ENTER",TPYE_LINKER_LEAVE:7,7:"TPYE_LINKER_LEAVE",TYPE_LINKER_PERMIT:8,8:"TYPE_LINKER_PERMIT",TPYE_LINKER_CANCEL_INVITE:9,9:"TPYE_LINKER_CANCEL_INVITE",TYPE_LINKER_WAITING_LIST_CHANGE:10,10:"TYPE_LINKER_WAITING_LIST_CHANGE",TYPE_LINKER_LINKED_LIST_CHANGE:11,11:"TYPE_LINKER_LINKED_LIST_CHANGE",TYPE_LINKER_UPDATE_USER:12,12:"TYPE_LINKER_UPDATE_USER",TPYE_LINKER_KICK_OUT:13,13:"TPYE_LINKER_KICK_OUT",TPYE_LINKER_CANCEL_APPLY:14,14:"TPYE_LINKER_CANCEL_APPLY",TYPE_LINKER_BAN:15,15:"TYPE_LINKER_BAN",TYPE_LINKER_DISPATCH_ITEM:16,16:"TYPE_LINKER_DISPATCH_ITEM",TYPE_LINKER_VIOLATION_REMINDER:17,17:"TYPE_LINKER_VIOLATION_REMINDER",TYPE_LINKER_UPDATE_LINK_TYPE_APPLY:18,18:"TYPE_LINKER_UPDATE_LINK_TYPE_APPLY",TYPE_LINKER_UPDATE_LINK_TYPE_REPLY:19,19:"TYPE_LINKER_UPDATE_LINK_TYPE_REPLY",TYPE_LINKER_AVATAR_AUDIT:20,20:"TYPE_LINKER_AVATAR_AUDIT",TYPE_APPlY_EXPIRED:22,22:"TYPE_APPlY_EXPIRED",TYPE_APPLY_STRONG_REMINDER:23,23:"TYPE_APPLY_STRONG_REMINDER",TYPE_ANCHOR_STREAM_SWITCH:24,24:"TYPE_ANCHOR_STREAM_SWITCH",TYPE_LINKER_CLICK_SCREEN:25,25:"TYPE_LINKER_CLICK_SCREEN",TYPE_LINKER_LOCK_POSITION:26,26:"TYPE_LINKER_LOCK_POSITION",TYPE_LINKER_FOLLOW_STRONG_GUIDE:27,27:"TYPE_LINKER_FOLLOW_STRONG_GUIDE",TYPE_LINKER_SHARE_VIDEO_IM:28,28:"TYPE_LINKER_SHARE_VIDEO_IM",TYPE_GUEST_INVITE:29,29:"TYPE_GUEST_INVITE",TYPE_GUEST_EXIT_CAST_SCREEN:30,30:"TYPE_GUEST_EXIT_CAST_SCREEN",TYPE_LINKER_SWITCH_SCENE:31,31:"TYPE_LINKER_SWITCH_SCENE",TYPE_LINK_PHASEINFO:32,32:"TYPE_LINK_PHASEINFO",TYPE_LINKER_CHANGE_PLAY_MODE:33,33:"TYPE_LINKER_CHANGE_PLAY_MODE",TYPE_LOW_BALANCE_FOR_PAID_LINKMIC:34,34:"TYPE_LOW_BALANCE_FOR_PAID_LINKMIC",TYPE_DEGRADE_ALERT:35,35:"TYPE_DEGRADE_ALERT",TYPE_ENLARGE_GUEST_INVITE:36,36:"TYPE_ENLARGE_GUEST_INVITE",TYPE_ENLARGE_GUEST_REPLY:37,37:"TYPE_ENLARGE_GUEST_REPLY",TYPE_ENLARGE_GUEST_APPLY:38,38:"TYPE_ENLARGE_GUEST_APPLY",TYPE_LINK_PREPARE_APPLY:39,39:"TYPE_LINK_PREPARE_APPLY",TYPE_LINK_CANCEL_PREPARE_APPLY:40,40:"TYPE_LINK_CANCEL_PREPARE_APPLY",TYPE_LINKER_CROSS_ROOM_UPDATE:41,41:"TYPE_LINKER_CROSS_ROOM_UPDATE",TYPE_LINKER_CHANGE_MULTI_PK_TEAM_INFO:42,42:"TYPE_LINKER_CHANGE_MULTI_PK_TEAM_INFO",TYPE_CROSS_ROOM_LINK_INVITE:43,43:"TYPE_CROSS_ROOM_LINK_INVITE",TYPE_CROSS_ROOM_LINK_REPLY:44,44:"TYPE_CROSS_ROOM_LINK_REPLY",TYPE_CROSS_ROOM_LINK_CANCEL_INVITE:45,45:"TYPE_CROSS_ROOM_LINK_CANCEL_INVITE",TYPE_LINK_RESUME_AUDIENCE:46,46:"TYPE_LINK_RESUME_AUDIENCE",TYPE_LINK_BATTLE_CONNECT:47,47:"TYPE_LINK_BATTLE_CONNECT",TYPE_RESUME_APPLY:48,48:"TYPE_RESUME_APPLY",TYPE_CROSS_ROOM_RTC_INFO:49,49:"TYPE_CROSS_ROOM_RTC_INFO",TYPE_ANCHOR_UPDATE_LINKMIC_CONFIG:50,50:"TYPE_ANCHOR_UPDATE_LINKMIC_CONFIG",TYPE_ANCHOR_UPDATE_LAYOUT:51,51:"TYPE_ANCHOR_UPDATE_LAYOUT",TYPE_APPLY_RANK_CHANGE:52,52:"TYPE_APPLY_RANK_CHANGE",TYPE_CHANGE_MEDIA_INFO:53,53:"TYPE_CHANGE_MEDIA_INFO",TYPE_LINKER_UILAYOUT_CHANGE:54,54:"TYPE_LINKER_UILAYOUT_CHANGE",TYPE_UPDATE_WAITING_USER_OFFSET:55,55:"TYPE_UPDATE_WAITING_USER_OFFSET",TYPE_REMOVE_WAITING_USER:56,56:"TYPE_REMOVE_WAITING_USER",TYPE_LINKER_PREPARE_INVITE:57,57:"TYPE_LINKER_PREPARE_INVITE",TYPE_LINKER_PREPARE_REPLY:58,58:"TYPE_LINKER_PREPARE_REPLY",TYPE_LINKER_CONFIRM_UNSILENCE:59,59:"TYPE_LINKER_CONFIRM_UNSILENCE",TYPE_LINKER_SWITCH_CHANNEL_INVITE:60,60:"TYPE_LINKER_SWITCH_CHANNEL_INVITE",TYPE_LINKER_SWITCH_CHANNEL_REPLY:61,61:"TYPE_LINKER_SWITCH_CHANNEL_REPLY",TYPE_LINKER_SWITCH_CHANNEL_CANCEL:62,62:"TYPE_LINKER_SWITCH_CHANNEL_CANCEL",TYPE_AUDIO_AVATAR_NOTICE:63,63:"TYPE_AUDIO_AVATAR_NOTICE",TYPE_RTC_ACTION:64,64:"TYPE_RTC_ACTION",TYPE_LINKER_CROSS_LINK_INFO_UPDATE:65,65:"TYPE_LINKER_CROSS_LINK_INFO_UPDATE",TYPE_LINKER_CROSS_LINK_FINISH:66,66:"TYPE_LINKER_CROSS_LINK_FINISH",TYPE_INIT_CHAT_ROOM:67,67:"TYPE_INIT_CHAT_ROOM",TYPE_LINKER_AUDIENCE_WAITING_LIST_CHANGE:68,68:"TYPE_LINKER_AUDIENCE_WAITING_LIST_CHANGE",TYPE_LINKER_UPDATE_LINK_TYPE_FORCE_OPEN_CAMERA:69,69:"TYPE_LINKER_UPDATE_LINK_TYPE_FORCE_OPEN_CAMERA",TYPE_LINKER_ENLARGE_UPDATE:70,70:"TYPE_LINKER_ENLARGE_UPDATE",TYPE_LINKER_CLIENT_UI_INFO_CHANGE:71,71:"TYPE_LINKER_CLIENT_UI_INFO_CHANGE",TYPE_LINKER_LIVE_CORE_BIZ_TAG_CHANGE:72,72:"TYPE_LINKER_LIVE_CORE_BIZ_TAG_CHANGE",TYPE_ANCHOR_LINKMIC_JOIN:73,73:"TYPE_ANCHOR_LINKMIC_JOIN",TYPE_ANCHOR_LINKMIC_QUIT:74,74:"TYPE_ANCHOR_LINKMIC_QUIT",TYPE_RESERVED_ROOM_BATTLE_RING:75,75:"TYPE_RESERVED_ROOM_BATTLE_RING",TPYE_LINKER_SYS_KICK_OUT:101,101:"TPYE_LINKER_SYS_KICK_OUT",TPYE_LINKER_SYNC_WRDS:1e4,1e4:"TPYE_LINKER_SYNC_WRDS",TYPE_LINKER_POS_ATTR:10001,10001:"TYPE_LINKER_POS_ATTR",TYPE_RTS_UPDATE_STATUS:10002,10002:"TYPE_RTS_UPDATE_STATUS"}},282621:function(e,n,t){t.d(n,{iM:function(){return i}});var i={TYPE_NONE:0,0:"TYPE_NONE",TYPE_TURNON:1,1:"TYPE_TURNON",TYPE_PERMIT:2,2:"TYPE_PERMIT",TYPE_KICKOUTED:3,3:"TYPE_KICKOUTED",TYPE_FINISH:4,4:"TYPE_FINISH",TYPE_WAITING_LIST_CHANGED:5,5:"TYPE_WAITING_LIST_CHANGED",TYPE_LINKED_LIST_CHANGED:6,6:"TYPE_LINKED_LIST_CHANGED",TYPE_ALL_LIST_CHANGED:7,7:"TYPE_ALL_LIST_CHANGED",TYPE_FAN_TICKET_CHANGED:8,8:"TYPE_FAN_TICKET_CHANGED",TYPE_RANKING_UPDATE:9,9:"TYPE_RANKING_UPDATE",TYPE_SILENCE:10,10:"TYPE_SILENCE",TYPE_UNSILENCE:11,11:"TYPE_UNSILENCE",TYPE_INVITE:12,12:"TYPE_INVITE",TYPE_REPLY:13,13:"TYPE_REPLY",TYPE_AUTO_JOIN:14,14:"TYPE_AUTO_JOIN",TYPE_AGREE_ADMIN_FIRST_INVITE:15,15:"TYPE_AGREE_ADMIN_FIRST_INVITE",TYPE_SILENCE_PASSIVE:16,16:"TYPE_SILENCE_PASSIVE",TYPE_SWITCH_SCENE:17,17:"TYPE_SWITCH_SCENE",TYPE_JOIN_GAME_BARRAGE_RTC:18,18:"TYPE_JOIN_GAME_BARRAGE_RTC",TYPE_LEAVE_GAME_BARRAGE_RTC:19,19:"TYPE_LEAVE_GAME_BARRAGE_RTC",TYPE_BATTLE_DATA:202,202:"TYPE_BATTLE_DATA"}},598659:function(e,n,t){t.d(n,{p:function(){return i}}),t(679308);let i=()=>Promise.resolve().then(t.bind(t,746517)).then(e=>e.liveShowAccount)},772810:function(e,n,t){t.d(n,{Dk:function(){return u},L6:function(){return v},gf:function(){return c},nE:function(){return s},o9:function(){return d}});var i=t(629686),o=t(402748);t(362051),t(490629);var r=t(345754),l=t(414061),a=t(101199);let u=(e,n,t,a)=>{if(t&&a){let r=JSON.parse(window.localStorage.getItem("DanmaSetting_GiftAndPackage")),l=(null==r?void 0:r[`${a}_${t}`])||{};r?window.localStorage.setItem("DanmaSetting_GiftAndPackage",JSON.stringify((0,o._)((0,i._)({},r),{[`${a}_${t}`]:(0,o._)((0,i._)({},l),{expired:Date.now()+864e5,[e]:n})}))):window.localStorage.setItem("DanmaSetting_GiftAndPackage",JSON.stringify({[`${a}_${t}`]:{expired:Date.now()+864e5,giftOn:"giftOn"!==e||n,packageOn:"packageOn"!==e||n}}))}else{let t=JSON.parse(window.localStorage.getItem("danmakuConfig"));t?window.localStorage.setItem("danmakuConfig",JSON.stringify((0,o._)((0,i._)({},t),{[e]:n}))):window.localStorage.setItem("danmakuConfig",JSON.stringify((0,o._)((0,i._)({},r.HI),{[e]:n}))),l.emit("liveDanmakuSettingChange")}},s=(e,n,t,i)=>{if(n&&t){var o;let l=i?`${t}`:`${t}_${n}`,a=null===(o=JSON.parse(window.localStorage.getItem("DanmaSetting_GiftAndPackage")))||void 0===o?void 0:o[l];return a&&(null==a?void 0:a.expired)>Date.now()?(null==a?void 0:a[e])!==void 0?null==a?void 0:a[e]:r.HI[e]:r.HI[e]}{let n=JSON.parse(window.localStorage.getItem("danmakuConfig"));return n?Number(null==n?void 0:n[e]):r.HI[e]}},d=()=>{try{return!window.localStorage.getItem("isDanmaHint")}catch(e){return!0}},c=()=>{try{window.localStorage.setItem("isDanmaHint","1")}catch(e){}},_=()=>{var e,n,t,o,l,a,u,s;let d=r.HI;try{d=JSON.parse(localStorage.getItem("danmakuConfig"))||r.HI}catch(e){}let c=null!==(o=d.area)&&void 0!==o?o:r.HI.area,_=(0,i._)({start:.01,end:null===(e=r.WK[null!=c?c:r.HI.fontSize])||void 0===e?void 0:e.value},1===c||0===c?{lines:c+1}:{}),v=(null!==(l=d.opacity)&&void 0!==l?l:100)/100,m=null===(n=r.NY[null!==(a=d.fontSize)&&void 0!==a?a:r.HI.fontSize])||void 0===n?void 0:n.value,f=null===(t=r.AY[null!==(u=d.speed)&&void 0!==u?u:r.HI.speed])||void 0===t?void 0:t.value,p=null!==(s=_.lines)&&void 0!==s?s:1/0,h=_.end;return _.end,{area:_,opacity:v,fontSize:m,speed:f,maxLineCount:p,maxHeightRate:h}},v=()=>{let[e,n]=(0,a.useState)(()=>_());return(0,a.useEffect)(()=>l.listen("liveDanmakuSettingChange",()=>{n(_())}),[]),e}},506926:function(e,n,t){t.d(n,{EF:function(){return l},PQ:function(){return r},k2:function(){return i},ve:function(){return o}});let i=()=>{var e;return null!==(e=Array.from(document.querySelectorAll("#playerPopup")).find(e=>e.getBoundingClientRect().height>0))&&void 0!==e?e:null},o=()=>{var e;return null!==(e=Array.from(document.querySelectorAll('[data-e2e="living-container"]')).find(e=>{var n;return(null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.height)>0}))&&void 0!==e?e:null},r=()=>{var e;return null!==(e=Array.from(document.querySelectorAll("#user_control_panel")).find(e=>e.getBoundingClientRect().height>0))&&void 0!==e?e:null},l=function(){var e;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return null!==(e=Array.from(document.querySelectorAll(`#${n}`)).find(e=>e.getBoundingClientRect().height>0))&&void 0!==e?e:null}},573871:function(e,n,t){t.d(n,{o:function(){return a}});var i=t(629686),o=t(601034),r=t(335924),l=t(542901);function a(){let e=(0,l.o)(),n=()=>{var n,t,i;let{linkmicStore:l,roomStore:a}=e||{},u=(null==l?void 0:l.linkRoomType)==="audio"?"voice_live":"";return{anchor_id:null==a?void 0:null===(n=a.roomInfo)||void 0===n?void 0:n.roomId,room_id:null==a?void 0:null===(i=a.roomInfo)||void 0===i?void 0:null===(t=i.anchor)||void 0===t?void 0:t.id_str,enter_from_merge:(0,o.yW)(),enter_method:(0,r.Rs)("enter_method"),request_id:(0,r.Rs)("request_id"),action_type:"click",liveType:u}};return(e,t)=>{var o,r;null===(o=(r=window).collectEvent)||void 0===o||o.call(r,e,(0,i._)({},n(),t))}}},57003:function(e,n,t){t.d(n,{V:function(){return l}}),t(76375);var i=t(257795),o=t(101199);let{Currency:r}=i;function l(){let e=(0,o.useContext)(r);if(void 0===e)throw Error("Currency must be used within Provider");return e}},251356:function(e,n,t){t.d(n,{Y:function(){return A},w:function(){return k}});var i=t("629686"),o=t("402748");t("679308"),t("490629"),t("706056");var r=t("101199"),l=t("198412"),a=t.n(l),u=t("409250"),s=t("205082"),d=t("953851");t("559352");var c=t("807922");let _=(e,n)=>{var t,i;if(!(null==e?void 0:null===(t=e.room)||void 0===t?void 0:t.stream_url)&&!n)return{};let o=(null==n?void 0:n.pull_datas)||((null==e?void 0:null===(i=e.room)||void 0===i?void 0:i.stream_url)?e.room.stream_url.pull_datas:{})||{},r=Object.keys(o)[0];return o[r]},v=(e,n)=>{var t,r,l,u,s;let d=a()(e,"room",{}),_=a()(d,"episode_extra",{}),v=a()(_,"camera_infos",[]),m=null!==(s=null==n?void 0:n.useDefaultCameraId)&&void 0!==s&&s,f={id:null==d?void 0:d.id_str,title:(null==_?void 0:_.main_camera_title)||(null==_?void 0:_.title),cover:(null==_?void 0:_.main_camera_cover)||(null==_?void 0:_.cover),isMainCamera:!0,h264Stream:null==d?void 0:d.stream_url,h265Stream:null==e?void 0:e.web_stream_url,matchId:null==_?void 0:null===(t=_.main_camera_match_info)||void 0===t?void 0:t.match_id_str,cameraId:m?null==_?void 0:_.default_camera_id_str_v2:null==_?void 0:_.episode_id_str,groupId:null==_?void 0:_.group_id_str,hasMatchStats:(null==_?void 0:null===(l=_.main_camera_match_info)||void 0===l?void 0:null===(r=l.event_ids)||void 0===r?void 0:r.length)===1},p=null==v?void 0:null===(u=v.map)||void 0===u?void 0:u.call(v,n=>{var t,r,l,u,s,d;let{paid_live_type:_}=n,v=null===(l=e.room)||void 0===l?void 0:null===(r=l.episode_extra)||void 0===r?void 0:null===(t=r.privilege_info_v2)||void 0===t?void 0:t[c.xc.EQUITABLE_CAMERA_POSITION],m=_===c.xc.EQUITABLE_CAMERA_POSITION?{max_duration:a()(v,"paid_live_info.max_duration",180),paid_live_base_info:{duration:a()(v,"paid_live_info.duration",0),view_right:a()(v,"paid_live_info.view_right",0),ticket_session_id_str:a()(v,"entity_id_str")},paid_live_biz_extra:{prepay_cashier_jump_url:a()(v,"privilege_url.prepay_cashier_jump_url","")}}:null==n?void 0:n.camera_paid_info;return(0,o._)((0,i._)({},n),{camera_paid_info:m,id:null==n?void 0:n.camera_id_str,title:null==n?void 0:n.title,cover:null==n?void 0:n.cover,isMainCamera:!1,h264Stream:null==n?void 0:n.stream_info,h265Stream:{},matchId:null==n?void 0:null===(u=n.camera_match_info)||void 0===u?void 0:u.match_id_str,cameraId:null==n?void 0:n.camera_id_str,groupId:null==n?void 0:n.group_id_str,hasMatchStats:(null==n?void 0:null===(d=n.camera_match_info)||void 0===d?void 0:null===(s=d.event_ids)||void 0===s?void 0:s.length)===1})});return p.unshift(f),{mainCameraInfo:f,cameraInfoList:p}};var m=t("336814"),f=t("456818"),p=t("21660");t("228983"),t("759943"),t("683656"),t("932651"),t("968336"),t("656562"),t("992871"),t("362051");var h=t("121998"),g=t("578777"),E=t("597100"),y=t("397176");let I=e=>e.split("?")[0].replace(/\//g,"_"),P=(e,n)=>{let t=(0,h.parse)(n.split("?")[1]),o=n.split("?")[0],r=(0,i._)({aid:6383,device_platform:"web"},t);!y.s&&Object.assign(r,(0,g.f)());let l=(0,h.stringify)(r);return o.startsWith("http")?`${o}?${l}`:y.s&&!E.r8?`consul:${e}${o}?${l}`:`${(0,E.ZP)().API_DOMAIN+o}?${l}`},L={"Content-type":"application/x-www-form-urlencoded"},N=async function(e,n){var t,r,l,a,u,s,d,c;let _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},v=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"webcast.web.api",m=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},f=P(v,n);if(null==e||null===(r=e.logger)||void 0===r||null===(t=r.info)||void 0===t||t.call(r,"request path:",f),!e)return window.fetch(f,(0,o._)((0,i._)({credentials:"same-origin"},_),{headers:(0,i._)({},L,_.headers)}));{let t=(0,i._)((0,o._)((0,i._)({handleMethod:I(n)},_),{metrics:e.metrics,headers:(0,i._)((0,o._)((0,i._)({},null!==(l=e.app.config.fetch.headers)&&void 0!==l?l:{}),{Cookie:e.headers.cookie,"user-agent":e.headers["user-agent"],"x-use-ppe":null!==(a=e.headers["x-use-ppe"])&&void 0!==a?a:"","x-use-boe":null!==(u=e.headers["x-use-boe"])&&void 0!==u?u:"","x-tt-env":null!==(s=e.headers["x-tt-env"])&&void 0!==s?s:"","X-Real-IP":e.headers["x-real-ip"],"X-Forwarded-For":e.header["x-forwarded-for"]}),L,_.headers)}),null!=m?m:{});e.headers["x-tt-stress"]&&(t.headers["x-tt-stress"]=e.headers["x-tt-stress"]);try{e.measureTime("fetch");let n=await e.fetch(f,t);return e.measureTimeEnd("fetch",{url:new URL(f).pathname,status:n.status,retry:0,error:0}),n}catch(i){null===(c=e.metrics)||void 0===c||null===(d=c.emitCounter)||void 0===d||d.call(c,"isomorphic_request.retry",1,e.app.config.psm,{url:f});let n=await e.fetch(f,t).catch(n=>{throw e.measureTimeEnd("fetch",{url:new URL(f).pathname,status:-1,retry:1,error:1}),n});return e.measureTimeEnd("fetch",{url:new URL(f).pathname,status:n.status,retry:1,error:0}),n}}};async function C(e,n,t){var i,o,r,l,a,u,s,d;let c=await N(t,`/webcast/web/conf/skin/?${(0,h.stringify)({room_id:e,anchor_id:n})}`,{method:"GET"}),_=c.headers.get("x-tt-logid");if(200!==c.status)return null==t||null===(i=t.logger)||void 0===i||i.error("[getTheme] not 200",_),null==t||null===(r=t.metrics)||void 0===r||null===(o=r.emitCounter)||void 0===o||o.call(r,"get_theme_error",1,""),{};let{data:v={}}=null!==(l=await c.json())&&void 0!==l?l:{};try{return JSON.parse(null==v?void 0:null===(a=v.skin)||void 0===a?void 0:a.conf)}catch(e){return null==t||null===(u=t.logger)||void 0===u||u.error("[getTheme]",e,_),null==t||null===(d=t.metrics)||void 0===d||null===(s=d.emitCounter)||void 0===s||s.call(d,"parse_theme_error",1,""),{}}}var S=t("542901"),T=t("754730"),b=t("858651");let A=async function(){let{webRid:e,isPreEnterRoom:n,store:t,query:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{webRid:"",isPreEnterRoom:!1,store:{},query:{}},l=async()=>{var t,i,o,r,l;let u,s,d,c;let _=[],v=window.liveDetailDataAPI;v instanceof Promise?(delete window.liveDetailDataAPI,_=await v):_=await (0,f.Y)({webRid:e,isPreEnterRoom:n});let[p,h,g,E,y,I=[]]=_,{roomInfo:P,relevantRooms:L,logId:N}=p,S=null==P?void 0:P.roomId,T=null==P?void 0:null===(t=P.anchor)||void 0===t?void 0:t.id_str,b=(null==P?void 0:null===(r=P.room)||void 0===r?void 0:null===(o=r.others)||void 0===o?void 0:null===(i=o.web_skin)||void 0===i?void 0:i.enable_skin)?await C(S,T):void 0;p.relevantRooms=L.map(e=>(0,m.bj)(e,N));let A=a()(P,"room.episode_extra.season_id_str"),k=null==I?void 0:I.includes(A);return(l=c||(c={}))[l.TRYWATCH_LEAD=3]="TRYWATCH_LEAD",{rawRes:p,iframeConf:h,linkmicHeartConfig:g,qualitySettings:E,clatity_guide:3,themeConfig:b,isSpider:!1,isAsianGames:!1,isOlympicGame:k,defaultMoreLeague:u,defaultMatchStatsDetail:s,defaultTagMatchInfo:d}};try{var d,c,h,g,E,y,I,P,L,N,S,A,k,R,w,O,x,M,D,j,V,U,G,F,Y,Z,K,B,W,H,q,z,$,Q,J,X,ee,en,et,ei,eo,er,el;let{rawRes:n,iframeConf:m,linkmicHeartConfig:f,qualitySettings:C,clatity_guide:ea,themeConfig:eu,isAsianGames:es,isOlympicGame:ed,defaultMoreLeague:ec,defaultMatchStatsDetail:e_,defaultTagMatchInfo:ev}=await l(),{roomInfo:em,error:ef,status_code:ep,errorPageMessage:eh,logId:eg,errorPrompts:eE,relevantRooms:ey,isUseVVC:eI}=n,eP={Digg:null==em?void 0:null===(c=em.room)||void 0===c?void 0:null===(d=c.room_auth)||void 0===d?void 0:d.Digg,SpecialStyle:null==em?void 0:null===(g=em.room)||void 0===g?void 0:null===(h=g.room_auth)||void 0===h?void 0:h.SpecialStyle};if(null==t||null===(y=t.roomStore)||void 0===y||null===(E=y.setIsAsianGames)||void 0===E||E.call(y,es),null==t||null===(P=t.roomStore)||void 0===P||null===(I=P.setIsOlympicGame)||void 0===I||I.call(P,ed),t.roomStore&&a()(em,"room.others.programme.enable_programme",!1)&&(t.roomStore.enableProgramme=!0),(null==em?void 0:null===(S=em.room)||void 0===S?void 0:null===(N=S.others)||void 0===N?void 0:null===(L=N.web_skin)||void 0===L?void 0:L.enable_skin)&&eu){t.layoutStore.rawThemeConfig=eu;let{force_enable_h265:e,hideCategory:n,showNavigation:i,hideFooter:o,forceTheme:r,immersive:l,banner:a,programme:u,appointment:s,transparentHeader:d,resource:c,navigationSelected:_,hideRelevantRoom:v,programmeFill:m,disableUnLoginFilter:f,playerMargin:h}=eu;f&&t.layoutStore&&(t.layoutStore.disableUnLoginFilter=!0),e&&t.roomStore&&(t.roomStore.forceEnableH265=!0),void 0!==_&&t.layoutStore&&(t.layoutStore.navigationSelected=_),u&&t.roomStore&&(t.roomStore.abProgramme=!0),v&&t.layoutStore&&(t.layoutStore.hasRelevantRoom=!1),m&&t.layoutStore&&(t.layoutStore.programmeFill=m),h&&t.layoutStore&&(t.layoutStore.playerMargin=h),s&&(null===(z=t.roomStore)||void 0===z||z.setAppointment(!0)),n&&(null===($=t.layoutStore)||void 0===$||$.setModule("categoryTab",p.p.DISABLE)),i&&(null===(Q=t.layoutStore)||void 0===Q||Q.setModule("navigation",p.p.ENABLE)),o&&(null===(J=t.layoutStore)||void 0===J||J.setModule("footer",p.p.DISABLE)),r&&(null===(X=t.layoutStore)||void 0===X||X.setForceTheme(r)),d&&(null===(ee=t.layoutStore)||void 0===ee||ee.setHeaderOpacity(d)),l&&(null===(en=t.layoutStore)||void 0===en||en.setImmersive(!0)),a&&(null===(et=t.layoutStore)||void 0===et||et.setSpecialBanner(a)),c&&(null===(ei=t.layoutStore)||void 0===ei||ei.setResource(c))}null===(A=t.appStore)||void 0===A||A.setIsOpenLongTask(!0),null===(k=t.appStore)||void 0===k||k.setLinkMicHeartConfig(f),null===(R=t.roomStore)||void 0===R||R.setRoomInfo(em),null===(x=t.roomStore)||void 0===x||x.setUgcLive(null==em?void 0:null===(O=em.room)||void 0===O?void 0:null===(w=O.scene_type_info)||void 0===w?void 0:w.commentary_type),null===(j=t.roomStore)||void 0===j||j.setGameHiddle(null===(D=_(em))||void 0===D?void 0:null===(M=D.extension)||void 0===M?void 0:M.game_hidden),null===(V=t.roomStore)||void 0===V||V.setLikeStatus(eP),null===(G=t.paidLiveStore)||void 0===G||G.setPaidLiveData(null==em?void 0:null===(U=em.room)||void 0===U?void 0:U.paid_live_data),null===(F=t.roomStore)||void 0===F||F.setRelativeRooms(ey);let eL=r.message_from||"live",eN=a()(n,"loginLead",{}),{singleControlTime:eC,singleControlMaxShowTime:eS}=C,eT=u.Q.getItem({sKey:s.storage.CookieKeys.WebcastLeadingLastShowTime}),eb=u.Q.getItem({sKey:s.storage.CookieKeys.WebcastLeadingTotalShowTimes});null===(Y=t.streamStore)||void 0===Y||Y.setLeadingData((0,o._)((0,i._)({},eN),{clatity_guide:ea,last_show_time:eT,total_show_times:eb})),null===(Z=t.streamStore)||void 0===Z||Z.setRenderTime(Date.now()),null===(K=t.streamStore)||void 0===K||K.setSingleControlTime(Number(eC)),null===(B=t.streamStore)||void 0===B||B.setSingleControlMaxShowTime(Number(eS));let{mainCameraInfo:eA,cameraInfoList:ek}=v(em,{useDefaultCameraId:(0,b.getLiveCameraIdFixAB)()});null===(W=t.cameraStore)||void 0===W||W.setMainCameraInfo(eA),null===(H=t.cameraStore)||void 0===H||H.setCameraInfoList(ek);let eR=null==r?void 0:r.camera_id,ew=null==ek?void 0:null===(q=ek.find)||void 0===q?void 0:q.call(ek,e=>(null==e?void 0:e.cameraId)===eR);if(!ew||(null==ew?void 0:ew.isMainCamera))null===(el=t.cameraStore)||void 0===el||el.setCameraInfo(eA);else{let e=(0,o._)((0,i._)({},em),{room:(0,o._)((0,i._)({},em.room),{stream_url:null==ew?void 0:ew.h264Stream,title:null==ew?void 0:ew.title}),web_stream_url:null==ew?void 0:ew.h265Stream});null===(eo=t.roomStore)||void 0===eo||eo.setRoomInfo(e),null===(er=t.cameraStore)||void 0===er||er.setCameraInfo(ew)}t.streamStore.isUseVVC=eI&&(0,T.Kw)(em);let eO={errorPrompts:eE,logId:eg,status_code:ep,error:ef,errorPageMessage:eh,iframeConf:m[e],messageFrom:eL,isSpider:!1,defaultMoreLeague:ec,defaultMatchStatsDetail:e_,defaultTagMatchInfo:ev};t.detailExtra.setDetailExtra(eO)}catch(e){}},k=e=>{var n;let{webRid:t,query:i,isPreEnterRoom:o}=e,l=d.a.useClientDetect(),a=(0,S.o)();null==a||null===(n=a.layoutStore)||void 0===n||n.setHint(location.hostname,location.pathname,l,!!i.hidehead),a.layoutStore.setHardCategoryTab(p.p.DISABLE),(0,r.useEffect)(()=>{A({webRid:t,query:i,isPreEnterRoom:o,store:a})},[])}},474844:function(e,n,t){t.d(n,{Z:function(){return c}});var i=t(629686);t(112459),t(759943),t(228983);var o=t(584293),r=t(113515),l=t(764283),a=t(56924),u=t(650639),s=t(339808),d=t(310968);function c(){let e=(0,s.a)(),n=e=>{let{referrer:n}=document;-1>=n.indexOf("douyin.com")?(e.enter_from_merge="link_share",e.enter_method="direct_open"):e.enter_from_merge="page_refresh"};(0,a.C)(()=>{var t;if(!o._.find(n=>(0,u.m)(n,e.pathname)))return;let a={};try{let e=sessionStorage.getItem(r.UY);e?!(null==(a=JSON.parse(null!=e?e:"{}"))?void 0:a.enter_from_merge)&&n(a):n(a)}catch(e){l.kg.error("解析路由数据失败",e)}window.__INVISIBLE_QUERY__=(0,i._)({},null!==(t=window.__INVISIBLE_QUERY__)&&void 0!==t?t:{},a);let{remainQuery:s,remainQueryString:c}=(0,d.It)(e.search.split("?")[1]);window.history.replaceState({},"",e.pathname+c)},[])}},580200:function(e,n,t){var i=t(380599),o=t(397176),r=t(762080),l=t(542901),a=t(101199),u=t(198412),s=t.n(u);n.Z=()=>{let{roomStore:{roomInfo:e}}=(0,l.o)();return(0,a.useMemo)(()=>{var n,t;return o.s?"":(null===(t=window)||void 0===t?void 0:null===(n=t.__INVISIBLE_QUERY__)||void 0===n?void 0:n.enter_from_merge)==="web_share_link"&&e.enter_mode===r.gE.APP?i.R5.QRCODE:i.FO[s()(e,"room.stream_url.stream_orientation")]||""},[e])}},21198:function(e,n,t){t.d(n,{a:function(){return l}});var i=t(480333);t(374954);var o=t(942155),r=t.n(o);class l{push(e,n){this.powers[e]?(this.powers[e].length<2||this.powers[e].pop(),this.powers[e].push(n)):this.powers[e]=[n],0!==this.status[e]&&(this.status[e]=0,clearTimeout(this.timer[e]),this.timer[e]=setTimeout(()=>this.publish(e),100))}on(e,n){this.ee.on(e,n)}off(e,n){this.ee.off(e,n),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 n=this.powers[e].shift();n&&this.ee.emit(e,n),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,i._)(this,"ee",void 0),(0,i._)(this,"powers",{}),(0,i._)(this,"status",{}),(0,i._)(this,"timer",{}),(0,i._)(this,"interval",850),this.ee=new(r())}}},724146:function(e,n,t){t.d(n,{he:function(){return a},v2:function(){return u},zA:function(){return l}}),t(679308),t(490629),t(88856);var i=t(414061),o=t(509523);let r=Promise.resolve(),l=()=>{r=new Promise(e=>{i.listen(i.EVENT.afterVideoPlayed,()=>{e()})})},a=e=>{let{callback:n,timeout:t=1e4}=e,i=null;Promise.race([r,new Promise(e=>{i=setTimeout(()=>{e()},t)})]).finally(()=>{o.p.postTask({task:()=>{n()},priority:"user-visible"}),i&&clearTimeout(i)})},u=e=>{let n=null,{timeout:t=1e4}=e||{};return Promise.race([r,new Promise(e=>{n=setTimeout(()=>{e()},t)})]).finally(()=>{n&&clearTimeout(n)})}},569144:function(e,n,t){t.d(n,{K:function(){return l}});var i=t(356336),o=t(536793);let r=(e,n)=>{try{var t;let i=(0,o.T)();if(n)return n(null==i?void 0:i[e]);return null!==(t=null==i?void 0:i[e])&&void 0!==t?t:void 0}catch(e){return}},l=()=>r("enlargeDynamicBackground",e=>{let n=!1,t=!1;switch(e){case i.EnlargeDynamicBgVersion.V1:n=!0;break;case i.EnlargeDynamicBgVersion.V2:t=!0;break;case i.EnlargeDynamicBgVersion.V3:n=!0,t=!0}return{enlargeDynamicBg:n,enlargePadding:t}})},298602:function(e,n,t){t.d(n,{q:function(){return r}}),t(362051);var i=t(56924),o=t(752150);function r(e){let{message:n,socketData:t}=e;(0,i.C)(()=>{var e,i,r;let l="websocketkey20230220",a=[];try{a=JSON.parse(null!==(i=null===(e=localStorage)||void 0===e?void 0:e.getItem(l))&&void 0!==i?i:"[]")}catch(e){}if(!!n)if(t)null==n||n.setWebsocketKey(t),null===(r=localStorage)||void 0===r||r.setItem(l,JSON.stringify(t));else{let e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;(0,o.ZP)({service_name:"webcast.douyin.live_pc",key:"message_websocket_params"}).then(e=>{var t;null==n||n.setWebsocketKey(e),null===(t=localStorage)||void 0===t||t.setItem(l,JSON.stringify(e))}).catch(i=>{t>1?e(t-1):null==n||n.setWebsocketKey(a)})};e(2)}},[n])}},471729:function(e,n,t){t.d(n,{i:function(){return a}});var i=t(757309),o=t.n(i),r=t(915821),l=t(264034);let a=t.n(l)()(()=>{var e,n;let t=new(o())().getResult(),i=null==t?void 0:null===(e=t.browser)||void 0===e?void 0:e.name,l=null==t?void 0:null===(n=t.browser)||void 0===n?void 0:n.version;switch(i){case"Chrome":case"Edge":return(0,r.y)(l,">","84.0.0.0");case"Safari":return(0,r.y)(l,">","14.1.0.0");case"Opera":return(0,r.y)(l,">","70.0.0.0");case"Firefox":return(0,r.y)(l,">","79.0.0.0");default:return!0}})},176209:function(e,n,t){t.d(n,{Ee:function(){return d},UX:function(){return a},VM:function(){return l},VZ:function(){return s},iD:function(){return u}});var i=t(858651),o=t(356336);let r=e=>{let n=(0,i.getLiveLoadStrategyConfig)(e);return function(e){var n;let{maxCoreCount:t,maxMemorySize:o}=(null===(n=(0,i.getLiveLoadStrategyConfig)(e))||void 0===n?void 0:n.lowDevice)||{maxCoreCount:0,maxMemorySize:0};if("undefined"==typeof window||"undefined"==typeof navigator||!t||!o)return!1;let{hardwareConcurrency:r=1/0,deviceMemory:l=1/0}=navigator||{};return r<=t||l<=o}(e)?(null==n?void 0:n.lowDeviceStrategy)||(0,o.genDefaultLiveLoadStrategyConfig)().lowDeviceStrategy:(null==n?void 0:n.highDeviceStrategy)||(0,o.genDefaultLiveLoadStrategyConfig)().highDeviceStrategy};function l(){return(0,i.getInLiveLoadStrategyAB)()?2e3:r().navigationHydrateDelayTime}function a(){return(0,i.getInLiveLoadStrategyAB)()?r().lifeCycleDefaultTimeout:3e3}function u(){return!!(0,i.getInLiveLoadStrategyAB)()&&!!r().lifeCycleUseScheduler}function s(e){var n,t;if(!!(0,i.getInLiveLoadStrategyAB)())return null==r?void 0:null===(t=r())||void 0===t?void 0:null===(n=t.lifeCycleSpecialRenderWhenConfig)||void 0===n?void 0:n[e]}function d(e){var n,t;if(!!(0,i.getInLiveLoadStrategyAB)())return null==r?void 0:null===(t=r())||void 0===t?void 0:null===(n=t.lifeCycleSpecialTaskPriority)||void 0===n?void 0:n[e]}},319722:function(e,n,t){t.d(n,{S:function(){return v}});var i=t(629686),o=t(402748);t(490629);var r=t(101199),l=t(618759),a=t(461014),u=t(858651),s=t(690193);let d=e=>{let{scene:n,abTestData:t}=e;switch(n){case"search":return{clientRTMConfig:(0,u.getLiveSearchRTMABConfigInClient)(t),webRTMConfig:(0,u.getLiveSearchRTMABConfigInWeb)(t)};case"living":return{clientRTMConfig:(0,u.getLiveLivingRTMABConfigInClient)(t),webRTMConfig:(0,u.getLiveLivingRTMABConfigInWeb)(t)};default:return{clientRTMConfig:void 0,webRTMConfig:void 0}}},c=e=>{let{clientRTMConfig:n,webRTMConfig:t}=e;return(0,l.iQ)("6.8.0")?(0,o._)((0,i._)({},n),{enable:!!(null==n?void 0:n.enable),extraQuery:(null==n?void 0:n.extraQuery)||{protocol_stack:"go"},type:"client"}):(0,a.m)()?(0,o._)((0,i._)({},t),{enable:!!(null==t?void 0:t.enable),type:"web"}):{enable:!1,enableCdnList:[],type:void 0}},_=function(){for(var e,n,t=arguments.length,i=Array(t),o=0;o<t;o++)i[o]=arguments[o];try{let{clientRTMConfig:n,webRTMConfig:t}=d(...i),o=c({clientRTMConfig:n,webRTMConfig:t});return(0,s.WH)("getLiveRTMConfig_success",{scene:null===(e=i[0])||void 0===e?void 0:e.scene,clientRTMConfig:n,webRTMConfig:t,result:o}),o}catch(e){return(0,s.WH)("getLiveRTMConfig_error",{scene:null===(n=i[0])||void 0===n?void 0:n.scene,error:e}),{enable:!1,enableCdnList:[],type:void 0}}},v=e=>{let n=(0,u.useGetAllAbTestData)();return(0,r.useMemo)(()=>_({scene:e,abTestData:n}),[e,n])}},232547:function(e,n,t){t.d(n,{Sv:function(){return d},T1:function(){return c},n$:function(){return _},rC:function(){return v},w:function(){return m}});var i=t(629686),o=t(402748);t(414931);var r=t(113515),l=t(75138),a=t(409250),u=t(426038),s=t(397176);function d(){var e,n;if(s.s)return 0;let t=localStorage.getItem((0,l.DS)()?r.YN:r.xQ);if(!!(t=null!==(n=null===(e=(a.Q.getItem({sKey:u.CookieKeys.VolumeInfo})||{}).volume)||void 0===e?void 0:e.toString())&&void 0!==n?n:t))return Number(t)}function c(){var e;return null!==(e=d())&&void 0!==e?e:.6}function _(e){let n=a.Q.getItem({sKey:u.CookieKeys.VolumeInfo})||{};return a.Q.setItem(u.CookieKeys.VolumeInfo,(0,o._)((0,i._)({},n),{volume:e})),localStorage.setItem((0,l.DS)()?r.YN:r.xQ,e.toString())}function v(){var e;if(s.s)return!1;let n="1"===localStorage.getItem((0,l.DS)()?r.FR:r.mI);return n=null!==(e=(a.Q.getItem({sKey:u.CookieKeys.VolumeInfo})||{}).isMute)&&void 0!==e?e:n}function m(e){let n=a.Q.getItem({sKey:u.CookieKeys.VolumeInfo})||{};return a.Q.setItem(u.CookieKeys.VolumeInfo,(0,o._)((0,i._)({},n),{isMute:e,isUserMute:e})),localStorage.setItem((0,l.DS)()?r.FR:r.mI,e?"1":"0")}},575697:function(e,n,t){t.d(n,{CL:function(){return l},MA:function(){return r},OL:function(){return u},bA:function(){return a}});var i=t(534133),o=t(745285),r={BasicPlayer:"living-basic-player",Background:"living-background"};let l="living-pip-id",a=()=>(0,i.IT)(l),u=()=>a()||(0,o.DJ)()?1:0},310968:function(e,n,t){t.d(n,{Bo:function(){return _},It:function(){return m}});var i=t(629686),o=t(402748);t(591964),t(414931),t(14275),t(759943),t(362051);var r=t(113515),l=t(121998),a=t(318966),u=t(995898),s=t(409250),d=t(426038);let c=["enter_from_merge","enter_method","ug_source","material_group_id","resource_space_id",/^_transparent_/,"web_live_page","web_live_tab","web_live_tab_2","web_live_tab_3","more_detail","game_name","title_type","cover_type","is_recommend","stream_type","room_id","evening_type","search_params","action_type","previous_page","request_id","live_type","function_type","seat_fit_status","insert_task_id","live_reason","aspect_ratio","from_landscape_tab","group_id","is_livehead_preview_mini_window_show","enter_method_temai","show_rank","show_cnt","cid","msToken","if_paid_live_card","entrance_form","ticket_entrance","if_qianchuan_ad","ad_type","live_ad_creative_id","live_ad_id","X-Bogus","ad_log_extra","if_browser_limited","open_promotion_list","open_promotion_detail","message_from","video_id","mini_window_show_type","search_tab","live_position","url_source","xigua_webid","push_id","otherParams","enter_method_on_cellphone","enter_from_on_cellphone","is_replaced_live","preview_type","web_card_rank","show_type","im_watch_assistant_order","tablive_feed_guide_scene","follow_status","column_type"],_=()=>{let{group_id:e=""}=window.__INVISIBLE_QUERY__||{};return e},v=()=>{let e=(0,u.Nr)(location.pathname);window.addEventListener("beforeunload",()=>{try{if(e){var n;s.Q.setItem(d.CookieKeys.LiveInvisibleQuery,(0,l.stringify)(null===(n=window)||void 0===n?void 0:n.__INVISIBLE_QUERY__),60)}}catch(e){}})},m=e=>{try{let n=(0,l.parse)(e);try{let e=s.Q.getItem({sKey:d.CookieKeys.LiveInvisibleQuery});e&&(window.__INVISIBLE_QUERY__=(0,l.parse)(e),s.Q.removeItem(d.CookieKeys.LiveInvisibleQuery)),v()}catch(e){}let t=Object.keys(n).reduce((e,t)=>{if(c.some(e=>("[object RegExp]"===Object.prototype.toString.call(e)&&e.test(t)||"[object String]"===Object.prototype.toString.call(e)&&e===t)&&void 0!==n[t])){if("string"==typeof n[t])window.__INVISIBLE_QUERY__[t]=n[t];else if("object"==typeof n[t]){var r;(null===(r=n[t])||void 0===r?void 0:r.length)>0&&(window.__INVISIBLE_QUERY__[t]=n[t][n[t].length-1])}return e}return(0,o._)((0,i._)({},e),{[t]:n[t]})},{});sessionStorage.setItem(r.UY,JSON.stringify(window.__INVISIBLE_QUERY__));let a=Object.keys(t).length?`?${(0,l.stringify)(t)}`:"";return{remainQuery:t,remainQueryString:a}}catch(i){var n,t;return null===(t=(0,a.OK)())||void 0===t||null===(n=t.sendEvent)||void 0===n||n.call(t,{name:"filterAndUpdateInvisibleQuery_error",categories:{error:i,queryString:e},type:"event"}),{remainQuery:{},remainQueryString:""}}}},724610:function(e,n,t){t.d(n,{D:function(){return i}});let i=(e,n)=>{try{return JSON.parse(e)}catch(e){return null!=n?n:{}}}},474149:function(e,n,t){t.d(n,{$:function(){return f}}),t(490629),t(591964),t(679308);var i=t(320165),o=t(101199),r=t(469935),l=t.n(r),a=t(670556),u=t(440863),s=t(214676),d=t(729477),c=t(346674),_=t(234150),v=t(684103),m={light:"isLight",dark:"isDark"};function f(e){var n,t;let{theme:r,linkItems:f,subLinkItems:p,innerLink:h=[],showInnerLink:g=!0,fetchInnerLinkAfterLCP:E=!1,className:y,defaultValue:I}=e,[P,L]=(0,o.useState)(()=>null==h?void 0:h.reduce((e,n)=>e.concat(null==n?void 0:n.links),[])),N=(0,v.u)({defaultValue:I}),C=f||(null==N?void 0:null===(n=N.footer)||void 0===n?void 0:n.links)||[],S=p||(null==N?void 0:null===(t=N.footer)||void 0===t?void 0:t.subLinks)||[];return(0,o.useEffect)(()=>{let e=null==h?void 0:h.reduce((e,n)=>e.concat(null==n?void 0:n.links),[]),n=!1;if(!(null==e?void 0:e.length)&&g){let e=()=>{(async()=>{var e,t;let[i,o]=await Promise.all([(0,d.Ws)(),(0,d.F8)()]),r=(null==i?void 0:i.statusCode)===0?null==i?void 0:i.data:[],l=(null==o?void 0:o.statusCode)===0?[{links:null==o?void 0:null===(t=o.data)||void 0===t?void 0:null===(e=t.map)||void 0===e?void 0:e.call(t,e=>({url:null==e?void 0:e.url,anchor:null==e?void 0:e.keyword}))}]:[];!n&&L(r.concat(l).reduce((e,n)=>e.concat(null==n?void 0:n.links),[]))})()};E?u.H(e):e()}return()=>{n=!0}},[]),(0,o.useEffect)(()=>{g&&!(null==P?void 0:P.length)&&(null==h?void 0:h.length)&&L(null==h?void 0:h.reduce((e,n)=>e.concat(null==n?void 0:n.links),[]))},[h,g,P]),(0,i.jsx)("footer",{className:l()(m[r],y),"data-e2e":"page-footer",children:(0,i.jsxs)("div",{className:c.default.footerWrapper,children:[(0,i.jsxs)(a.NoSSR,{children:[(0,i.jsx)("div",{className:c.default.linkItems,children:!!C.length&&C.map((e,n)=>(0,i.jsx)("div",{className:c.default.linkItem,children:(0,i.jsx)(_.a,{href:e.url,target:"_blank",rel:`noopener noreferrer ${(0,s.P)(e.title)}`,isNeedSeoOpt:!(null==e?void 0:e.needExtraParams),children:e.title})},n))}),!!S.length&&S.map((e,n)=>(0,i.jsx)("div",{className:c.default.subLinkItems,children:!!e.length&&e.map((e,n)=>(0,i.jsxs)("div",{className:c.default.subLinkItem,children:[e.icon&&(0,i.jsx)("img",{className:c.default.icon,src:e.icon,alt:"icon"}),e.url?(0,i.jsx)(_.a,{href:e.url,target:"_blank",rel:"noopener noreferrer nofollow",children:e.title}):(0,i.jsx)("span",{children:e.title})]},n))},`group_${n}`))]}),!!P.length&&g&&(0,i.jsxs)("div",{className:c.default.innerLinkContainer,children:[(0,i.jsx)("span",{className:c.default.divide}),(0,i.jsx)("span",{className:c.default.innerLinkTitle,children:"热门:"}),P.map(e=>(0,i.jsx)("span",{className:c.default.innerLinkItem,children:(0,i.jsx)(_.a,{href:e.url,target:"_blank",rel:"noopener noreferrer",children:e.anchor})},e.url))]})]})})}},462867:function(e,n,t){t.d(n,{F6:function(){return c},TY:function(){return _},pu:function(){return v}});var i=t(629686),o=t(402748),r=t(811603),l=t(320165),a=t(101199),u=t(890710);t(795233);var s=t(23091),d=t(534133);let c=e=>{let{children:n,pipId:t=s.Zi}=e,{pipInfo:i}=(0,s.fl)();return i&&i.pipId===t?(0,u.createPortal)(n,i.window.document.body):null},_=e=>{var{children:n,pipAnchorId:t,placeholder:c,className:_}=e,v=(0,r._)(e,["children","pipAnchorId","placeholder","className"]);let{pipInfo:m,pipAnchorEleMapRef:f}=(0,s.fl)(),p=(0,a.useRef)(null),h=(0,a.useMemo)(d.ie,[]);return h&&(f.current[t]=h),(0,a.useEffect)(()=>()=>{delete f.current[t]},[t,f]),(0,a.useEffect)(()=>{var e;if(!m&&!!h)null===(e=p.current)||void 0===e||e.appendChild(h)},[h,m]),(0,l.jsxs)("div",(0,o._)((0,i._)({ref:p,"data-anchor-id":t,className:_},v),{children:[m?c:null,h?(0,u.createPortal)(n,h):n]}))},v=e=>{var{pipAnchorId:n}=e,t=(0,r._)(e,["pipAnchorId"]);let o=(0,a.useRef)(null),{pipAnchorEleMapRef:u,pipInfo:d}=(0,s.fl)();return(0,a.useEffect)(()=>{let e=u.current[n];if(!!d&&!!o.current&&!!e)o.current.appendChild(e)},[n,u,d]),(0,l.jsx)("div",(0,i._)({"data-anchor-id":n,ref:o},t))}},534133:function(e,n,t){t.d(n,{IT:function(){return l},hp:function(){return r},ie:function(){return a},nz:function(){return u}}),t(414931),t(591964),t(679308),t(490629),t(283791),t(890710);var i=t(499059);function o(e){var n;let t=new MutationObserver(n=>{try{let t=n.reduce((e,n)=>"childList"!==n.type?e:e.concat(Array.from(n.addedNodes).filter(e=>e instanceof HTMLLinkElement||e instanceof HTMLStyleElement)),[]);if(0===t.length)return;let i=document.createDocumentFragment();t.forEach(e=>i.appendChild(e.cloneNode())),e.document.head.appendChild(i)}catch(e){}});if(t.observe(document.head,{attributes:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!1}),null===(n=i.Le.getConfig(i.gI.AbtestData))||void 0===n?void 0:n.enableMemoryLeakFix){let n=()=>{t.disconnect(),e.removeEventListener("pagehide",n)};return e.addEventListener("pagehide",n),()=>{t.disconnect(),e.removeEventListener("pagehide",n)}}e.addEventListener("pagehide",()=>{t.disconnect()})}async function r(e){var n,t;let{pipId:r,width:l,height:a}=e,u=await documentPictureInPicture.requestWindow({width:l,height:a});if(u.name=r,t=u,Array.from(document.styleSheets).forEach(e=>{try{let n=Array.from(e.cssRules).map(e=>e.cssText).join(""),i=document.createElement("style");i.textContent=n,t.document.head.appendChild(i)}catch(i){let n=document.createElement("link");if(null===e.href)return;n.rel="stylesheet",n.type=e.type,n.media=e.media.toString(),n.href=e.href,t.document.head.appendChild(n)}}),null===(n=i.Le.getConfig(i.gI.AbtestData))||void 0===n?void 0:n.enableMemoryLeakFix){let e=o(u);u.__disconnectPipStyleObserver__=e}else o(u);return u}let l=e=>{var n,t;return"undefined"!=typeof window&&(null===(t=window.documentPictureInPicture)||void 0===t?void 0:null===(n=t.window)||void 0===n?void 0:n.name)===e};function a(){if("undefined"==typeof document)return;let e=document.createElement("div");return e.classList.add("pip-anchor"),e}function u(){try{let{innerHeight:e,outerHeight:n}=documentPictureInPicture.window;return n-e>4}catch(e){return!1}}},209054:function(e,n,t){t.d(n,{Up:function(){return r},hp:function(){return i}}),t(14275),t(759943);let i=()=>{let{host:e}=location;return/live\.douyin\.com/.test(e)},o=e=>i()||/^\/(root|follow)\/live(\/|$)/.test(null!=e?e:location.pathname),r=(e,n)=>!!((null==e?void 0:e.imIsReplaceTab)||(null==e?void 0:e.imIsSlidePopup)||(null==e?void 0:e.liveSideAreaEntry)===1&&o(n))},47014:function(e,n,t){t.d(n,{$I:function(){return u},Fp:function(){return s},yr:function(){return a}}),t(706056),t(490629);var i=t(101199),o=t(499059),r=t(601034),l=t(773453);let a=e=>{try{if(performance.getEntriesByName("recommend_mounted").length>0){var n,t,i,a;performance.mark("recommend_video_play"),performance.measure("recommendMountedToPlay","recommend_mounted","recommend_video_play");let u=null===(n=performance.getEntriesByName("recommendMountedToPlay")[0])||void 0===n?void 0:n.duration,s=null!==(t=o.Le.getConfig(o.gI.PageEntered))&&void 0!==t?t:[],d=!s.includes(location.pathname);d&&o.Le.setConfig(o.gI.PageEntered,[...s,location.pathname]),!isNaN(u)&&l.i.sendLog("recommendFirstVideoPlay",{cost:Math.floor(u),from_cache:null!==(i=null==e?void 0:e.fromCache)&&void 0!==i?i:0,is_first:d?1:0,path:location.pathname,enter_from:(0,r.yW)(),is_live:null!==(a=null==e?void 0:e.isLive)&&void 0!==a?a:0}),performance.clearMarks("recommend_mounted"),performance.clearMarks("recommend_video_play"),performance.clearMeasures("recommendMountedToPlay")}}catch(e){}},u=e=>{(0,i.useEffect)(()=>(performance.mark("multi_page_mounted"),()=>{performance.getEntriesByName("multi_page_mounted").length>0&&performance.clearMarks("multi_page_mounted")}),[e])},s=()=>{try{if(performance.getEntriesByName("multi_page_mounted").length>0){var e;performance.mark("page_available"),performance.measure("mountedToAvailable","multi_page_mounted","page_available");let n=null===(e=performance.getEntriesByName("mountedToAvailable")[0])||void 0===e?void 0:e.duration;!isNaN(n)&&l.i.sendLog("pageMountedToAvailable",{cost:Math.floor(n),path:location.pathname}),performance.clearMarks("multi_page_mounted"),performance.clearMarks("page_available"),performance.clearMeasures("mountedToAvailable")}}catch(e){}}},746546:function(e,n,t){t.d(n,{$P:function(){return k},FE:function(){return R},G:function(){return w},N7:function(){return O},Q2:function(){return P},Sn:function(){return b},Ws:function(){return S},XK:function(){return y},XQ:function(){return I},YB:function(){return C},du:function(){return N},jZ:function(){return T},w:function(){return L},y3:function(){return A}});var i=t(629686),o=t(402748),r=t(811603);t(679308),t(362051);var l=t(30995),a=t(987826),u=t(911429),s=t(732199),d=t(431940),c=t.n(d);let{COMMON_SEARCH_PARAMS:_}=l;function v(e){var n,t,i;return{text:null!==(n=null==e?void 0:e.text)&&void 0!==n?n:"",iconUrl:null!==(t=null==e?void 0:e.icon_url)&&void 0!==t?t:"",jumpUrl:null!==(i=null==e?void 0:e.jump_url)&&void 0!==i?i:""}}function m(e){var n,t,i,o;return{userAvatar:null!==(n=null==e?void 0:e.user_avatar)&&void 0!==n?n:"",userNickname:null!==(t=null==e?void 0:e.user_nickname)&&void 0!==t?t:"",text:null!==(i=null==e?void 0:e.text)&&void 0!==i?i:"",imageList:null!==(o=null==e?void 0:e.image_list)&&void 0!==o?o:[]}}function f(e){var n,t,i,o,r;return{image:null!==(n=null==e?void 0:e.image)&&void 0!==n?n:"",name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"",price:(i=Number(null==e?void 0:e.price)/100,i),sales:null!==(o=null==e?void 0:e.sales)&&void 0!==o?o:0,productUrl:null!==(r=null==e?void 0:e.product_url)&&void 0!==r?r:""}}function p(e){var n,t,i,o,r,l,a,u,s,d,c,_,f,p,h,g,E,y,I,P,L,N,C,S,T,b,A,k,R,w,O,x,M,D,j,V,U,G,F,Y,Z,K,B,W,H,q;let{item_info:z,status_code:$,log_pb:Q}=e;return{statusCode:$,logPb:null!==(k=null==Q?void 0:Q.impr_id)&&void 0!==k?k:"",itemInfo:{productInfo:{name:null!==(R=null==z?void 0:null===(n=z.product_info)||void 0===n?void 0:n.name)&&void 0!==R?R:"",price:(w=Number(null==z?void 0:null===(t=z.product_info)||void 0===t?void 0:t.price)/100,w),promiseTextList:null!==(O=null==z?void 0:null===(i=z.product_info)||void 0===i?void 0:i.promise_text_list)&&void 0!==O?O:[],logisticsTextList:null!==(x=null==z?void 0:null===(o=z.product_info)||void 0===o?void 0:o.logistics_text_list)&&void 0!==x?x:[],imageUrlList:null!==(M=null==z?void 0:null===(r=z.product_info)||void 0===r?void 0:r.image_url_list)&&void 0!==M?M:[],scheme:null!==(D=null==z?void 0:null===(l=z.product_info)||void 0===l?void 0:l.scheme)&&void 0!==D?D:"",schemeQRcodeBase64:null!==(j=null==z?void 0:null===(a=z.product_info)||void 0===a?void 0:a.scheme_qrcode_base64)&&void 0!==j?j:""},shopInfo:{name:null!==(V=null==z?void 0:null===(u=z.shop_info)||void 0===u?void 0:u.name)&&void 0!==V?V:"",image:null!==(U=null==z?void 0:null===(s=z.shop_info)||void 0===s?void 0:s.image)&&void 0!==U?U:"",label:v(null==z?void 0:null===(d=z.shop_info)||void 0===d?void 0:d.label),score:null!==(G=null==z?void 0:null===(c=z.shop_info)||void 0===c?void 0:c.score)&&void 0!==G?G:0,percent:null!==(F=null==z?void 0:null===(_=z.shop_info)||void 0===_?void 0:_.percent)&&void 0!==F?F:0,tagList:null!==(Y=null==z?void 0:null===(h=z.shop_info)||void 0===h?void 0:null===(p=h.tag_list)||void 0===p?void 0:null===(f=p.map)||void 0===f?void 0:f.call(p,v))&&void 0!==Y?Y:[],accountName:null!==(Z=null==z?void 0:null===(g=z.shop_info)||void 0===g?void 0:g.account_name)&&void 0!==Z?Z:""},commentInfo:{totalCount:null!==(K=null==z?void 0:null===(E=z.comment_info)||void 0===E?void 0:E.total_count)&&void 0!==K?K:0,tagList:null!==(B=null==z?void 0:null===(y=z.comment_info)||void 0===y?void 0:y.tag_list)&&void 0!==B?B:[],commentList:null!==(W=null==z?void 0:null===(L=z.comment_info)||void 0===L?void 0:null===(P=L.comment_list)||void 0===P?void 0:null===(I=P.map)||void 0===I?void 0:I.call(P,m))&&void 0!==W?W:[]},extraInfo:{productParams:null!==(H=null==z?void 0:null===(S=z.extra_info)||void 0===S?void 0:null===(C=S.product_params)||void 0===C?void 0:null===(N=C.map)||void 0===N?void 0:N.call(C,e=>{var n,t;return{name:null!==(n=e.name)&&void 0!==n?n:"",value:null!==(t=e.value)&&void 0!==t?t:""}}))&&void 0!==H?H:[],detailImageList:null!==(q=null==z?void 0:null===(A=z.extra_info)||void 0===A?void 0:null===(b=A.detail_image_list)||void 0===b?void 0:null===(T=b.map)||void 0===T?void 0:T.call(b,e=>null!=e?e:""))&&void 0!==q?q:[]}}}}function h(e){var n;let{status_code:t,product_preview_list:i,log_pb:o}=e;return{statusCode:t,logPb:null!==(n=null==o?void 0:o.impr_id)&&void 0!==n?n:"",productPreviewList:null==i?void 0:i.map(e=>f(e))}}function g(e){var n,t;let{status_code:i,video_info_list:o,has_product_data:r,product_card:l,log_pb:a}=e;return{statusCode:i,logPb:null!==(n=null==a?void 0:a.impr_id)&&void 0!==n?n:"",videoInfoList:null!==(t=null==o?void 0:o.map(e=>(0,s.s0)(e)))&&void 0!==t?t:[],hasProductData:null!=r&&r,productCard:r?f(l):void 0}}function E(e){let{promotions:n=[],top_promotion:t,target_promotions:i=[],status_code:o,next_offset:r=-1,log_id:l,page_header:a,page_hint:u}=e||{};return{statusCode:o,promotions:n,topPromotion:t,targetPromotions:i,nextOffset:r,logId:l,pageHeader:a,pageHint:u}}async function y(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=await (0,u.U2)("/aweme/v1/web/seo/ecom/detail/product_meta",(0,o._)((0,i._)({},_),{product_id:e}),{},void 0,n,{});return(0,s.RL)(t,p)}async function I(e){let{productId:n="0",itemId:t,needProductCard:r=!1}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=await (0,u.U2)("/aweme/v1/web/seo/ecom/detail/related_video",(0,o._)((0,i._)({},_),{product_id:n,item_id:t,need_product_card:r}),{},void 0,l,{});return(0,s.RL)(a,g)}async function P(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=await (0,u.U2)("/aweme/v1/web/seo/ecom/detail/recommend_product",(0,o._)((0,i._)({},_),{product_id:e}),{},void 0,n,{});return(0,s.RL)(t,h)}async function L(e){let{roomId:n,authorId:t,offset:r,limit:l=20}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=await (0,u.v_)("/live/promotions/page/",(0,o._)((0,i._)({},_),{room_id:n,author_id:t,offset:r,limit:l}),{},void 0,a);return(0,s.RL)(d,E)}async function N(e){let{roomId:n,authorId:t}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return await (0,u.v_)("/live/promotions/page/top/",(0,o._)((0,i._)({},_),{room_id:n,author_id:t}),{},void 0,r)}async function C(e,n){let{roomId:t,authorId:l,productId:a}=e;return(0,r._)(e,["roomId","authorId","productId"]),await (0,u.U2)(n,(0,i._)((0,o._)((0,i._)({},_),{room_id:t,author_id:l,product_infos:JSON.stringify([{product_id:a}])}),e),{},void 0,null)}async function S(e){return(0,u.U2)("/aweme/v1/commerce/order/getUserAuth/",(0,o._)((0,i._)({},_),{user_id:e,app_id:a.APP_ID}))}async function T(e){return(0,u.U2)("/aweme/v1/commerce/order/saveUserAuth/",(0,o._)((0,i._)({},_),{user_id:e,app_id:a.APP_ID,auth_flag:1}))}async function b(e){let{roomId:n,authorId:t,liveSceneId:r=0,entranceInfo:l}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return await (0,u.U2)("/live/promotions/pop/v3/",(0,o._)((0,i._)({},_),{room_id:n,author_id:t,live_scene_id:r,entrance_info:l}),{},void 0,a)}async function A(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{promotionId:t,originType:o,roomId:r,secAuthorId:l,itemId:a}=e||{};return await (0,u.v_)("/ecom/product/detail/saas/pc/",(0,i._)({is_h5:1,origin_type:o},_),{is_h5:1,use_new_price:1,bff_type:2,room_id:r,live_room_id:r,item_id:a,sec_author_id:l,origin_type:o,promotion_ids:String(t),ec_promotion_id:t},void 0,n)}async function k(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{promotionId:t,originType:i}=e||{};return await (0,u.v_)("/aweme/v2/shop/promotion/pack/detail/",{is_h5:1,origin_type:i},{is_h5:1,bff_type:2,origin_type:i,promotion_id:t},void 0,n)}async function R(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{productId:t,shopId:r,cursor:l,count:a,statId:s,tagId:d,sortType:v}=e||{};return await (0,u.U2)("/aweme/v1/web/ecom/product/comments/",(0,o._)((0,i._)({},_),{product_id:t,shop_id:r,cursor:l,count:a,stat_id:s,tag_id:d,sort_type:v}),{transformResponse:e=>c().parse(e)},void 0,n)}async function w(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{productId:t,shopId:r,statId:l}=e||{};return await (0,u.U2)("/aweme/v1/web/ecom/product/comment/counter/",(0,o._)((0,i._)({},_),{product_id:t,shop_id:r,stat_id:l}),{},void 0,n)}async function O(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{commentId:t,action:i}=e;return await (0,u.v_)("/aweme/v1/web/ecom/comment/action/",_,{comment_id:t,action:i},void 0,n)}},521682:function(e,n,t){t(490629);var i=t(320165),o=t(101199);t(414621);var r=t(469935),l=t.n(r),a=t(871437),u=t(386017),s=t(688454),d=t(829358);n.Z=function(e){let{className:n,onEmojiClick:t,style:r,emojiList:c,showEmoji:_,emojiTea:v,setShowEmoji:m}=e,{list:f}=(0,o.useContext)(a.Z),{roomStore:{activityEmojiGroup:p}}=(0,d.oR)(),[h,g]=o.useState([]),E=(null==f?void 0:f.length)>0?f:c,y=(0,o.useRef)(null),[I,P]=o.useState(!1);o.useEffect(()=>{if(_){var e,n;null==v||v.livesdkEmojiShow({tab_title:null==p?void 0:null===(n=p[0])||void 0===n?void 0:null===(e=n.emoji_group)||void 0===e?void 0:e.name}),window.__act_message_source__=""}g((0,u.PA)(E))},[E,_,p]);let L=(0,o.useCallback)(function(e,n){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];i&&(null==v||v.livesdkEmojiClick({emoji_name:e.display_name,tab:n})),null==t||t(e)},[t]),N=(0,o.useCallback)(e=>{var n,t;(null==y?void 0:y.current)&&!(null==y?void 0:null===(t=y.current)||void 0===t?void 0:null===(n=t.contains)||void 0===n?void 0:n.call(t,null==e?void 0:e.target))&&I&&(null==m||m(!1))},[I]);(0,o.useEffect)(()=>(document.addEventListener("click",N),!I&&P(!0),()=>{document.removeEventListener("click",N)}),[I,P,N]);let C=(0,o.useRef)(null);return(0,o.useEffect)(()=>{C.current&&C.current.addEventListener("wheel",e=>{e.stopPropagation()})},[]),(0,i.jsx)("div",{className:l()("emoji-panel",n),style:r,onClick:e=>e.stopPropagation(),ref:y,children:(0,i.jsxs)("div",{className:"emoji-panel-list",onWheel:e=>{e.stopPropagation()},ref:C,children:[(null==h?void 0:h.length)>0&&(0,i.jsxs)("div",{className:"emoji-panel__common",children:[(0,i.jsx)("h3",{children:"最常使用"}),(0,i.jsx)("div",{className:"emoji-panel__common-use-list",children:null==h?void 0:h.map(e=>(0,i.jsx)("img",{onClick:()=>t&&L(e,"quick"),src:e.url,className:l()("emoji-panel__common-img")}))})]}),(0,i.jsx)(s.Z,{onClick:e=>t&&L(e,"all",!1),emojiTea:v}),(0,i.jsxs)("div",{className:"emoji-panel__all",children:[(null==h?void 0:h.length)>0&&(0,i.jsx)("h3",{children:"全部表情"}),(0,i.jsx)("div",{className:"emoji-panel__all-list",children:null==E?void 0:E.map(e=>(0,i.jsx)("img",{onClick:()=>t&&L(e,"all"),src:e.url,className:l()("emoji-panel__all-img")}))})]})]})})}},688454:function(e,n,t){var i=t(320165);t(101199);var o=t(64483),r=t(829358),l=t(396868);n.Z=(0,o.Pi)(e=>{let{onClick:n,emojiTea:t}=e,{roomStore:{activityEmojiGroup:o}}=(0,r.oR)();return o&&0!==o.length?(0,i.jsx)("div",{children:o.map(e=>(0,i.jsxs)("div",{className:"emoji-panel__common",children:[(0,i.jsx)("h3",{children:e.emoji_group.name}),(0,i.jsx)("div",{className:"emoji-panel__common_group_list",children:e.emoji_group.emoji_list.map(o=>(0,i.jsx)("div",{className:"img-item-wrap",children:(0,i.jsx)("img",{className:"img-item",src:o.emoji.url_list[0],onClick:()=>{var i,r,a;if(null==t||t.livesdkEmojiClick({tab_title:null==e?void 0:null===(i=e.emoji_group)||void 0===i?void 0:i.name,emoji_type:"tab_activity",emoji_name:`[${e.emoji_group.name}_${o.name}]`}),Number(e.end_time)<new Date().getTime()/1e3){l.F.info("活动已结束,该表情不可用");return}n&&n({display_name:`[${e.emoji_group.name}_${o.name}]`,emojiId:null==o?void 0:o.id_str,isEmojiGroup:!0,url:null==o?void 0:null===(a=o.emoji)||void 0===a?void 0:null===(r=a.url_list)||void 0===r?void 0:r[0]})}})},o.name))})]},e.emoji_group.name))}):null})},88411:function(e,n,t){t.d(n,{_:function(){return A}});var i=t("629686"),o=t("402748");t("490629");var r=t("320165"),l=t("101199"),a=t("469935"),u=t.n(a),s=e=>{let{items:n,defaultActiveKey:t,activeKey:i}=e,[o,a]=(0,l.useState)(t);return(0,l.useEffect)(()=>{a(i)},[i]),(0,r.jsxs)("div",{className:"tabs-wrapper",children:[(0,r.jsx)("div",{className:"tabs-nav-list-wrapper",children:null==n?void 0:n.map(e=>(0,r.jsx)("div",{onClick:n=>{n.stopPropagation(),a(e.key)},className:u()("tabs-nav-list-item",e.key===o?"active":""),children:e.label},e.key))}),(0,r.jsx)("div",{className:"tabs-nav-panel-list-wrapper",children:null==n?void 0:n.map(e=>(0,r.jsx)("div",{className:u()("tabs-nav-panel-item",e.key===o?"active":"inActive"),children:e.children},e.key))})]})};let d=(0,l.forwardRef)((e,n)=>(0,r.jsx)("svg",(0,o._)((0,i._)({width:19,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:(0,r.jsx)("path",{d:"M9.5 5.124v-.001m0 0a4.098 4.098 0 0 0-3.067-1.41c-2.1 0-3.75 1.634-3.75 3.714 0 2.547 2.307 4.623 5.802 7.77l.027.025.574.513a.618.618 0 0 0 .412.158M9.5 5.123h-.002m.002 0a4.098 4.098 0 0 1 3.066-1.41c2.1 0 3.75 1.634 3.75 3.714 0 2.547-2.306 4.623-5.802 7.77l-.027.025-.574.513a.618.618 0 0 1-.415.158m0 0h.003M7.02 7.431l2.48 3.718 2.478-3.718",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})));var c=t("829358"),_=t("336814"),v=t("762080"),m=t("937521"),f=t("396868"),p=t("901393");let h=(0,l.forwardRef)((e,n)=>(0,r.jsx)("svg",(0,o._)((0,i._)({xmlns:"http://www.w3.org/2000/svg",width:7,height:9,fill:"none",ref:n},e),{children:(0,r.jsx)("path",{d:"M1.574 3.585v-.81a2.025 2.025 0 1 1 4.05 0v.81h.405a.81.81 0 0 1 .81.81V8.04a.81.81 0 0 1-.81.81H1.17a.81.81 0 0 1-.81-.81V4.395a.81.81 0 0 1 .81-.81h.405zm3.24-.81a1.215 1.215 0 1 0-2.43 0v.81h2.43v-.81z",fill:"currentColor"})})));var g=t("198412"),E=t.n(g),y=t("908219"),I=t.n(y),P=t("574939");let L=e=>{var n,t,i;let{}=e,{vipStore:{vipEmojiConfig:o,setIsShowVipPanel:a,isVip:u},vipStore:s,roomStore:{roomInfo:d},singletonStore:{message:h}}=(0,c.oR)(),g=(0,l.useRef)(null),y=(0,l.useCallback)(()=>{document.dispatchEvent(new MouseEvent("click"))},[]),I=async e=>{y();let{data:n}=await (0,m.W)({room_id_str:null==d?void 0:d.roomId,episode_id:E()(d,"room.episode_extra.episode_id_str"),stage:E()(d,"room.episode_extra.mod.episode_stage"),type:3,emoji_id:e,content:""});switch(n.status_code){case v.Ze.SUCCESS:null==h||h.queuePush((0,_.Wd)(n.data));break;case v.Ze.MUTE:f.F.info(n.data.prompts||"你已被禁言");break;case v.Ze.WORD_LIMITED:f.F.info(n.data.prompts||"超出字数限制");break;default:f.F.info(n.data.prompts||"服务出现异常")}},L=(0,l.useRef)();return l.useEffect(()=>{if(L.current){let e=e=>{var n;null==e||null===(n=e.stopPropagation)||void 0===n||n.call(e)};return L.current.addEventListener("wheel",e),()=>{var n,t;null===(t=L.current)||void 0===t||null===(n=t.removeEventListener)||void 0===n||n.call(t,"wheel",e)}}},[]),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"vip-emoji-panel-wrapper",ref:g,children:[u?null:(0,r.jsxs)("div",{className:"vip-emoji-subscribe",children:[(0,r.jsx)("span",{children:"开通会员后可使用以下表情"}),(0,r.jsx)(p.zx,{size:"small",onClick:()=>{y(),(0,P.Z)("subscribe_emoji_panel")},style:{height:"24px",fontSize:"12px",padding:"0 8px",margin:"0",minWidth:"auto"},children:null==s?void 0:null===(t=s.vipEmojiConfig)||void 0===t?void 0:null===(n=t.emoji_tab_info)||void 0===n?void 0:n.btn_text})]}),(0,r.jsx)("div",{className:"vip-emoji-item-list-wrapper",ref:L,children:null==o?void 0:null===(i=o.emoji_list)||void 0===i?void 0:i.map((e,n)=>(0,r.jsx)(l.Fragment,{children:(0,r.jsx)(N,{locked:!u,config:e,containerRef:g,onSendEmoji:I})},n))})]})})},N=e=>{var n,t;let{locked:i,config:o,containerRef:l,onSendEmoji:a}=e,s=(e,n)=>{if(i)return e.stopPropagation(),f.F.info({text:"开通直播间会员后可使用以下表情",className:"emoji-panel__emoji-toast"},l,2e3);null==a||a(n)};return(0,r.jsxs)("div",{className:u()("vip-emoji-item",i?"disabled":""),onClick:I()(e=>s(e,o.id),2e3),children:[i?(0,r.jsx)(h,{className:"vip-emoji-icon-block"}):null,(0,r.jsx)("img",{src:null==o?void 0:null===(t=o.img)||void 0===t?void 0:null===(n=t.url_list)||void 0===n?void 0:n[0],alt:null==o?void 0:o.text})]})};var C=t("871437"),S=t("386017"),T=t("688454"),b=function(e){let{className:n,style:t,emojiList:i,emojiTea:o,onEmojiClick:a}=e,{list:s}=(0,l.useContext)(C.Z),[d,c]=l.useState([]),_=(null==s?void 0:s.length)>0?s:i,v=(0,l.useRef)(null);l.useEffect(()=>{c((0,S.PA)(_))},[_]);let m=(0,l.useCallback)((e,n)=>{null==o||o.livesdkEmojiClick({emoji_name:e.display_name,tab:n}),null==a||a(e)},[a]),f=(0,l.useRef)();return(0,l.useEffect)(()=>{f.current&&f.current.addEventListener("wheel",e=>{e.stopPropagation()})},[]),(0,r.jsx)("div",{className:u()("emoji-panel-normal-wrapper",n),style:t,ref:v,children:(0,r.jsxs)("div",{className:"emoji-panel-list",onWheel:e=>{e.stopPropagation()},ref:f,children:[(null==d?void 0:d.length)>0&&(0,r.jsxs)("div",{className:"emoji-panel__common",children:[(0,r.jsx)("h3",{children:"最常使用"}),(0,r.jsx)("div",{className:"emoji-panel__common-use-list",children:null==d?void 0:d.map(e=>(0,r.jsx)("img",{onClick:()=>m(e,"quick"),src:e.url,className:u()("emoji-panel__common-img")},e.url))})]}),(0,r.jsx)(T.Z,{onClick:e=>a&&m(e,"all"),emojiTea:o}),(0,r.jsxs)("div",{className:"emoji-panel__all",children:[(null==d?void 0:d.length)>0&&(0,r.jsx)("h3",{children:"全部表情"}),(0,r.jsx)("div",{className:"emoji-panel__all-list",children:null==_?void 0:_.map(e=>(0,r.jsx)("img",{onClick:()=>m(e,"all"),src:e.url,className:u()("emoji-panel__all-img")},e.url))})]})]})})};let A=l.memo(l.forwardRef((e,n)=>{let{wrapStyle:t,style:a,emojiList:_,onEmojiClick:v,emojiTea:m}=e,[f,p]=(0,l.useState)(!1),[h,g]=(0,l.useState)("emoji"),E=(0,l.useCallback)(()=>{p(!1)},[]);(0,l.useEffect)(()=>(document.addEventListener("click",E),()=>{document.removeEventListener("click",E)}),[]),(0,l.useImperativeHandle)(n,()=>({show:e=>{p(!0),e&&g(e)},hide:()=>{p(!1)},toggle:()=>{p(!f)}}));let{isInPreview:y}=(0,c.DQ)();return(0,r.jsx)("div",{ref:n,className:u()("emoji-panel-wrapper",f?"":"invisible",{isInPreview:y}),onClick:e=>{e.stopPropagation()},style:t,children:(0,r.jsx)("div",{style:(0,o._)((0,i._)({},a),{height:"100%"}),children:(0,r.jsx)(s,{defaultActiveKey:"emoji",activeKey:h,items:[{label:"小表情",key:"emoji",children:(0,r.jsx)(b,{emojiList:_,onEmojiClick:v,emojiTea:m})},{label:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(d,{style:{marginRight:"4px"}}),"会员表情"]}),key:"vipEmoji",children:(0,r.jsx)(L,{})}]})})})}))},871437:function(e,n,t){t.d(n,{u:function(){return r}});var i=t(101199);let o=i.createContext({display:!1,input:!1,map:{},list:[],icon:"",showEmoji:!1,setShowEmoji:()=>{}}),r=()=>i.useContext(o);n.Z=o},829358:function(e,n,t){t.d(n,{DQ:function(){return c},FD:function(){return _},_i:function(){return d},cT:function(){return f},oR:function(){return s},od:function(){return v},t:function(){return m}});var i=t(229403),o=t(542901),r=t(864235),l=t(573871),a=t(373529),u=t(178148);let s=o.o,d=i._i,c=()=>({}),_=r.FD,v=l.o,m=()=>a.S,f=()=>u.l},386017:function(e,n,t){t.d(n,{BQ:function(){return _},M9:function(){return l},PA:function(){return d},p3:function(){return a},qA:function(){return s},yO:function(){return c}}),t(414931),t(374954),t(490629),t(228983),t(759943),t(117232),t(362051);var i=t(361073),o=t.n(i);t(198412);var r=t(401918);function l(e){return e?"string"==typeof e?e:"number"==typeof e?`${e}`:o().fromBits(e.low,e.high,e.unsigned).toString():""}t(101199);let a=e=>{var n,t;return l((null==e?void 0:null===(t=e.payload)||void 0===t?void 0:null===(n=t.common)||void 0===n?void 0:n.msg_id)||(0,r.Z)())},u=e=>!isNaN(Number(e)),s=e=>Object.keys(e).filter(e=>!u(e)).map(n=>e[n]),d=e=>{let n={};try{var t;n=JSON.parse(null!==(t=window.localStorage.getItem("commonEmoji"))&&void 0!==t?t:"")}catch(e){n={}}let i=Object.keys(n),o=[];return i.length>0&&i.forEach((n,t)=>{if(t<6){var i;let t=null==e?void 0:null===(i=e.filter(e=>(null==e?void 0:e.display_name)===n))||void 0===i?void 0:i[0];t&&o.push(t)}}),o},c=(e,n)=>{let t=e.split(/(\[.*?])/),i=[];return n?(t.forEach(e=>{var t;null==n||null===(t=n.emoji_group)||void 0===t||t.emoji_list.forEach(t=>{var o;e===`[${null==n?void 0:null===(o=n.emoji_group)||void 0===o?void 0:o.name}_${null==t?void 0:t.name}]`&&i.push(t)})}),i):i},_=(e,n)=>{if(0===c(e,n).length||!n)return"";try{var t;let i=[];return null==n||null===(t=n.emoji_group)||void 0===t||t.emoji_list.forEach(t=>{var o;let r=`[${null==n?void 0:null===(o=n.emoji_group)||void 0===o?void 0:o.name}_${null==t?void 0:t.name}]`,l=0,a=0;for(let n=0;n<e.length;n++){let o=e[n];"["===o&&(l=n),"]"===o&&(a=n,e.slice(l,a+1)===r&&i.push({type:1,value:t.id,start:l,length:r.length}))}}),i.sort((e,n)=>e.start-n.start),JSON.stringify(i)}catch(e){return""}}},64483:function(e,n,t){t.d(n,{Pi:function(){return f}}),t("76375");var i,o,r=t("731343"),l=t("101199");if(!l.useState)throw Error("mobx-react-lite requires React with Hooks support");if(!r.makeObservable)throw Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var a=t("890710");function u(e){e()}t("482861");var s=t("893598"),d=t("169248");t("313036");var c=t("385670"),_="function"==typeof Symbol&&Symbol.for,v=_?Symbol.for("react.forward_ref"):"function"==typeof l.forwardRef&&(0,l.forwardRef)(function(e){return null}).$$typeof,m=_?Symbol.for("react.memo"):"function"==typeof l.memo&&(0,l.memo)(function(e){return null}).$$typeof;function f(e,n){if(m&&e.$$typeof===m)throw Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if((0,c.F)())return e;var t,i=null!==(t=null==n?void 0:n.forwardRef)&&void 0!==t&&t,o=e,r=e.displayName||e.name;if(v&&e.$$typeof===v&&(i=!0,"function"!=typeof(o=e.render)))throw Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var a=function(e,n){return(0,s.S)(function(){return o(e,n)},r)};return""!==r&&(a.displayName=r),e.contextTypes&&(a.contextTypes=e.contextTypes),i&&(a=(0,l.forwardRef)(a)),function(e,n){Object.keys(e).forEach(function(t){!p[t]&&Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})}(e,a=(0,l.memo)(a)),a}var p={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};t("759777"),t("490629"),t("374954"),t("932651"),(i=a.unstable_batchedUpdates)||(i=u),(0,r.configure)({reactionScheduler:i}),d.O.finalizeAllImmediately},385670:function(e,n,t){t.d(n,{F:function(){return i}});function i(){return!1}},893598:function(e,n,t){t.d(n,{S:function(){return _}}),t("313036"),t("490629"),t("374954");var i=t("731343"),o=t("101199");function r(e){return(0,i.getDependencyTree)(e)}var l=t("169248"),a=t("385670"),u=function(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,o,r=t.call(e),l=[];try{for(;(void 0===n||n-- >0)&&!(i=r.next()).done;)l.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return l};function s(e){return"observer".concat(e)}var d=function(){};function c(){return new d}function _(e,n){if(void 0===n&&(n="observed"),(0,a.F)())return e();var t,d,_=u(o.useState(c),1)[0],v=u(o.useState(),2)[1],m=function(){return v([])},f=o.useRef(null);!f.current&&(f.current={reaction:null,mounted:!1,changedBeforeMount:!1});var p=f.current;if(!p.reaction&&(p.reaction=new i.Reaction(s(n),function(){p.mounted?m():p.changedBeforeMount=!0}),l.O.register(_,p,p)),o.useDebugValue(p.reaction,r),o.useEffect(function(){return l.O.unregister(p),p.mounted=!0,p.reaction?p.changedBeforeMount&&(p.changedBeforeMount=!1,m()):(p.reaction=new i.Reaction(s(n),function(){m()}),m()),function(){p.reaction.dispose(),p.reaction=null,p.mounted=!1,p.changedBeforeMount=!1}},[]),p.reaction.track(function(){try{t=e()}catch(e){d=e}}),d)throw d;return t}},169248:function(e,n,t){t.d(n,{O:function(){return o}}),t("490629");var i=function(){function e(e){var n=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(n.sweepTimeout),n.sweepTimeout=void 0;var t=Date.now();n.registrations.forEach(function(i,o){t-i.registeredAt>=e&&(n.finalize(i.value),n.registrations.delete(o))}),n.registrations.size>0&&n.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){n.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,n,t){this.registrations.set(t,{value:n,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),o=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:i)(function(e){var n;null===(n=e.reaction)||void 0===n||n.dispose(),e.reaction=null})},684434:function(e,n,t){var i=t(629686),o=t(402748),r=t(320165),l=t(101199);let a=(0,l.forwardRef)((e,n)=>(0,r.jsx)("svg",(0,o._)((0,i._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:(0,r.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"})})));n.Z=a},838679:function(e,n,t){var i=t(629686),o=t(402748),r=t(320165),l=t(101199);let a=(0,l.forwardRef)((e,n)=>(0,r.jsxs)("svg",(0,o._)((0,i._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:n},e),{children:[(0,r.jsx)("path",{d:"M8 8c0 1.105-.672 2-1.5 2S5 9.105 5 8s.672-2 1.5-2S8 6.895 8 8zM13.5 10c.828 0 1.5-.895 1.5-2s-.672-2-1.5-2-1.5.895-1.5 2 .672 2 1.5 2zM10 14.53c-1.657 0-3-.96-3-2.143 0-1.183 6-1.183 6 0 0 1.184-1.343 2.143-3 2.143z",fill:"#fff",fillOpacity:".5"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zM2 10a8 8 0 1 1 16 0 8 8 0 0 1-16 0z",fill:"#fff",fillOpacity:".5"})]})));n.Z=a}}]); |