/*! VERSION | 10.78.9 */"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4963],{86592:(e,s,t)=>{t.d(s,{q:()=>F});var l=t(18775),i=t(76482),n=t(27378),o=t(48204),r=t(10269),a=t(84807),c=t(35840),h=t(73545),d=t(33914),u=t(39120),p=t(59593),v=t(84946);let m=p.BROWSER_CAPABILITIES.desktop&&!p.BROWSER_CAPABILITIES.isTablet,A={setControlsBlockVisibility:a.TK,updateViewCamSendTip:a.ED,hideActionMenu:r.fO};class E extends n.Component{componentWillUnmount(){this.hideControlsDebounce.cancel()}render(){return n.createElement(u.Z,{propsUpdateToActionsMap:this.propsUpdateToActionsMap,...this.props},n.createElement(v.G.Provider,{value:this.handlers},this.props.children))}constructor(...e){super(...e),(0,l._)(this,"wereShown",!1),(0,l._)(this,"isIgnoreMouseLeave",!1),(0,l._)(this,"propsUpdateToActionsMap",[{update:"modelId",action:()=>{p.BROWSER_CAPABILITIES.desktop||this.wereShown||this.showControlsAndRunHideDelay()}},{update:e=>!!(e.isFullscreen&&!this.props.isFullscreen),action:()=>{this.isIgnoreMouseLeave=!0,setTimeout(()=>{this.isIgnoreMouseLeave=!1})}}]),(0,l._)(this,"showControlsAndRunHideDelay",()=>{let{isControlsBlockVisible:e}=this.props;this.hideControlsDebounce(),e||this.props.setControlsBlockVisibility(!0)}),(0,l._)(this,"updateHideDelay",()=>{let{isControlsBlockVisible:e}=this.props;e&&this.hideControlsDebounce()}),(0,l._)(this,"hideControls",()=>{let{isControlsBlockVisible:e}=this.props;e&&(this.wereShown=!0,this.hideControlsDebounce.cancel(),this.props.setControlsBlockVisibility(!1))}),(0,l._)(this,"hideControlsDebounce",(0,i.Z)(()=>{let{isFullscreen:e}=this.props;e||this.hideControls()},4e3)),(0,l._)(this,"onBackgroundClick",()=>{let{isControlsBlockVisible:e,isFullscreenTipMenu:s,isFullscreenSendTip:t}=this.props;if(t){this.props.updateViewCamSendTip(null);return}if(s){this.props.hideActionMenu();return}!m&&e?this.hideControls():this.showControlsAndRunHideDelay()}),(0,l._)(this,"onMouseMoveOrEnter",()=>{p.BROWSER_CAPABILITIES.touch?this.updateHideDelay():this.showControlsAndRunHideDelay()}),(0,l._)(this,"onMouseLeave",()=>{this.isIgnoreMouseLeave||this.hideControls()}),(0,l._)(this,"handlers",{onBackgroundClick:this.onBackgroundClick,onMouseMoveOrEnter:this.onMouseMoveOrEnter,onMouseLeave:this.onMouseLeave})}}let F=(0,o.$j)(e=>({modelId:(0,c.n5)(e),isControlsBlockVisible:(0,h.Pd)(e),isFullscreen:(0,d.cU)(e),isFullscreenTipMenu:(0,h.pk)(e),isFullscreenSendTip:(0,d.yc)(e),isChatFocused:(0,c.zo)(e)}),A)(E)},52317:(e,s,t)=>{t.d(s,{q:()=>O});var l=t(18775),i=t(27378),n=t(48204),o=t(30754),r=t.n(o),a=t(68256),c=t(84807),h=t(80439),d=t(73545),u=t(33914),p=t(10642),v=t(83550),m=t(39120),A=t(59593),E=t(99748),F=t(62512),M=t(63256),y=t(98371),I=t(62182),C=t(27251),P=t(58320);class S{updateIosFullscreenRootClass(e){let s="ios-fullscreen";e?document.documentElement.classList.add(s):document.documentElement.classList.remove(s)}updateFullscreenBodyStyles(e){let{body:s}=document,{mac:t,safari:l}=A.BROWSER_CAPABILITIES;s.style.overflow=e?"hidden":"auto",t&&l&&(s.style.position=e?"fixed":"relative")}updateStyles(e){A.BROWSER_CAPABILITIES.iOS?this.updateIosFullscreenRootClass(e):this.updateFullscreenBodyStyles(e)}enter(){this.isActive||(this.updateStyles(!0),this.isActive=!0)}exit(){this.isActive&&(this.updateStyles(!1),this.isActive=!1)}constructor(){(0,l._)(this,"isActive",!1)}}var g=t(6679);let R=null,_=null;class B{get isPlayerInFullscreenMode(){return r().isEnabled&&r().isFullscreen&&r().element===this.getPlayerElem()}enterNativeFullscreen(){let e=this.getPlayerElem();return r().isEnabled&&e?r().request(e,{navigationUI:"hide"}):Promise.reject()}exitNativeFullscreen(){r().isEnabled&&r().exit()}movePortalRootIntoPlayerWrapper(){let e=this.getPlayerElem();null!=_||(_=document.getElementById(g.e)),_&&e&&e.appendChild(_)}movePortalRootBeforeReactRoot(){null!=R||(R=document.getElementById("body")),null!=_||(_=document.getElementById(g.e)),R&&_&&document.body.insertBefore(_,R)}async enter(){this.isPlayerInFullscreenMode||await this.enterNativeFullscreen(),!this.isModalsHackApplied&&this.shouldUseModalsHack&&(this.movePortalRootIntoPlayerWrapper(),this.setShouldRenderAllModalsInPortal(!0),this.isModalsHackApplied=!0),this.isActive=!0}exit(){this.isModalsHackApplied&&(this.setShouldRenderAllModalsInPortal(!1),this.movePortalRootBeforeReactRoot(),this.isModalsHackApplied=!1),this.isPlayerInFullscreenMode&&this.exitNativeFullscreen(),this.isActive=!1}get isIncompleteFullscreenEnter(){return this.isPlayerInFullscreenMode&&!this.isActive}get isIncompleteFullscreenExit(){return!this.isPlayerInFullscreenMode&&this.isActive}constructor(e){(0,l._)(this,"getPlayerElem",void 0),(0,l._)(this,"setShouldRenderAllModalsInPortal",void 0),(0,l._)(this,"shouldUseModalsHack",!1),(0,l._)(this,"isActive",!1),(0,l._)(this,"isModalsHackApplied",!1),this.getPlayerElem=e.getPlayerElem,this.setShouldRenderAllModalsInPortal=e.setShouldRenderAllModalsInPortal,this.shouldUseModalsHack=e.shouldUseModalsHack}}let w={toggleFullscreen:c.V9,setShouldRenderAllModalsInPortal:v.F5,setNativeFullscreenFail:c.L};class f extends i.Component{componentDidMount(){r().isEnabled&&r().on("change",this.onFullscreenChange),(0,F.H0)(this,document,"keydown",this.onKeyDown)}componentWillUnmount(){if(r().isEnabled&&r().off("change",this.onFullscreenChange),(0,F.OM)(this),document.pictureInPictureElement){var e,s;null===(e=(s=document).exitPictureInPicture)||void 0===e||e.call(s)}this.exitFullscreen()}onOrientationChange(){let{isMobile:e,isBlurVideoOnPrivate:s,isBroadcastingPageOpen:t,isAnyModalOpened:l,isFullscreen:i,shouldRenderPlayerOnBackground:n,windowOrientation:o}=this.props;if(!e||t||s||n||!i&&l||A.BROWSER_CAPABILITIES.iOS&&A.BROWSER_CAPABILITIES.firefoxMobile&&(0,E.gT)())return;let r="landscape"===o||"landscape-primary"===o||"landscape-secondary"===o;i!==r&&this.props.toggleFullscreen(r)}render(){return i.createElement(m.Z,{propsUpdateToActionsMap:this.propsUpdateToActionsMap,...this.props})}constructor(...e){super(...e),(0,l._)(this,"cssFullscreenSwitcher",new S),(0,l._)(this,"nativeFullscreenSwitcher",new B({getPlayerElem:()=>this.props.playerRef.current,setShouldRenderAllModalsInPortal:this.props.setShouldRenderAllModalsInPortal,shouldUseModalsHack:this.props.isRealFullscreenEnabled})),(0,l._)(this,"propsUpdateToActionsMap",[{update:I.Xd,action:()=>this.onOrientationChange()},{update:["isBroadcastingPageOpen"],action:()=>{this.props.isFullscreen&&this.props.toggleFullscreen(!1)}},{update:"isFullscreen",action:()=>{this.props.isFullscreen?this.enterFullscreen():this.exitFullscreen()}},{update:"isAnyModalOpened",action:()=>{!this.props.isRealFullscreenEnabled&&r().isFullscreen&&this.props.isAnyModalOpened&&this.props.isFullscreen&&this.props.toggleFullscreen(!1)}}]),(0,l._)(this,"onKeyDown",e=>{this.props.isFullscreen&&e.keyCode===A.KEY_CODES.escape&&(e.preventDefault(),e.stopPropagation(),this.props.toggleFullscreen(!1))}),(0,l._)(this,"onFullscreenChange",()=>{if(this.nativeFullscreenSwitcher.isIncompleteFullscreenEnter){this.props.toggleFullscreen(!0);return}this.nativeFullscreenSwitcher.isIncompleteFullscreenExit&&this.props.toggleFullscreen(!1)}),(0,l._)(this,"enterFullscreen",()=>{let{shouldUseNativeFullscreen:e,isBlurVideoOnPrivate:s}=this.props;if(!s){if(e){this.nativeFullscreenSwitcher.enter().catch(()=>{p.ZP.info("Can't request native fullscreen, use css fullscreen"),this.props.setNativeFullscreenFail(),this.cssFullscreenSwitcher.enter()});return}this.cssFullscreenSwitcher.enter()}}),(0,l._)(this,"exitFullscreen",async()=>{this.nativeFullscreenSwitcher.exit(),this.cssFullscreenSwitcher.exit()})}}let O=(0,n.$j)(e=>({isFullscreen:(0,u.cU)(e),windowOrientation:(0,C.Mp)(e),isBroadcastingPageOpen:(0,h.iD)(e),isMobile:(0,y.W7)(e),isAnyModalOpened:(0,C.dY)(e)||(0,a.yz)(e),shouldUseNativeFullscreen:(0,P.aW)(e),isRealFullscreenEnabled:(0,M.TYw)(e),isBlurVideoOnPrivate:(0,P.$C)(e),shouldRenderPlayerOnBackground:(0,d.qe)(e)}),w)(f)},38629:(e,s,t)=>{t.r(s),t.d(s,{PlayerWrapper:()=>M,default:()=>y});var l=t(27378),i=t(84946),n=t(86592),o=t(52317),r=t(73545),a=t(33914),c=t(99748),h=t(98846),d=t(95654),u=t(36886),p=t(63256),v=t(12712),m=t(14151),A=t(58320);let E=(0,h.n)({resolved:{},chunkName:()=>"SendMassMessagesModal",isReady(e){let s=this.resolve(e);return!0===this.resolved[s]&&!!t.m[s]},importAsync:()=>Promise.all([t.e(1813),t.e(5937),t.e(5774)]).then(t.bind(t,74603)),requireAsync(e){let s=this.resolve(e);return this.resolved[s]=!1,this.importAsync(e).then(e=>(this.resolved[s]=!0,e))},requireSync(e){let s=this.resolve(e);return t(s)},resolve:()=>74603},{fallback:void 0,ssr:!1}),F=e=>{let{onMouseLeave:s,onMouseMoveOrEnter:t}=(0,i.E)(),n=(0,l.useRef)(null),h=(0,d.C)(r.UP),F=(0,d.C)(r.Pd),M=(0,d.C)(A.Aq),y=(0,d.C)(a.cU),I=(0,d.C)(v.z),C=(0,d.C)(r.nz),P=(0,d.C)(p.hXr),S=(0,u.t)(),{children:g,className:R}=e,_=(0,c.AK)("player-wrapper","broadcast-type-webrtc",`player-type-${S?M:"unknown"}`,R,{fullscreen:y,"native-fullscreen":C,isTheatreMode:I,hover:F,cam2cam:h});return l.createElement("div",{className:_,onMouseMove:t,onMouseEnter:t,onMouseLeave:s,ref:n},l.createElement(o.q,{playerRef:n}),l.createElement("div",{id:m.PE}),l.createElement("div",{className:"content"},g,P&&l.createElement(E,null)))},M=e=>l.createElement(n.q,null,l.createElement(F,e)),y=M}}]);