Module 882991

928 characters · in 30a277b9d32d70b1.js
Dependencies
Required by (1)
Lazily required by (0)none
Lazily requires (1)
Source Raw
function(e,t,n){n.d(t,{A:()=>_});var i=n(627968);n(64700);var l=n(397927),a=n(73153),r=n(272355),s=n(961350),o=n(734057),d=n(528767),c=n(105530),u=n(652215);let A="STAGE_INVITED_TO_SPEAK_MODAL";class h extends r.A{_initialize(){a.h.subscribe("VOICE_STATE_UPDATES",this.handleVoiceStateUpdates)}_terminate(){a.h.unsubscribe("VOICE_STATE_UPDATES",this.handleVoiceStateUpdates)}handleVoiceStateUpdates=e=>{let{voiceStates:t}=e,a=s.default.getId(),r=d.A.getSession()?.sessionId,h=t.find(e=>e.userId===a&&e.sessionId===r);if(null==h)return;let _=h.channelId;if(null==_){(0,l.kBI)(A)&&(0,l.OoC)(A);return}let m=o.A.getChannel(_);if(!m?.isGuildStageVoice())return;let g=(0,c.eY)(h)===c.zF.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK;if(null!=m&&g){if((0,l.kBI)(A))return;(0,l.mMO)(async()=>{let{default:e}=await n.e("90037").then(n.bind(n,427412));return t=>(0,i.jsx)(e,{...t,channel:m})},{modalKey:A,onCloseRequest:u.FXj})}}}let _=new h}