1800 lines
96 KiB
TypeScript
1800 lines
96 KiB
TypeScript
/* Metro module 15405; source: modules/voice_panel/native/VoicePanelController.tsx; dependencies: [57, 31, 27, 4502, 1378, 4606, 9559, 10724, 7730, 1379, 4259, 4294, 7710, 11795, 11793, 661, 4237, 8044, 4299, 11796, 33, 15406, 4017, 7739, 672, 15407, 566, 3857, 10696, 1244, 15408, 15409, 8899, 7860, 15410, 1478, 1585, 15432, 11797, 11282, 22, 491, 1239, 690, 10712, 11534, 4827, 683, 7717, 4610, 15362, 4508, 15433, 7712, 4863, 4015, 5459, 15434, 15435, 3774, 15436, 15442, 15443, 15367, 1216, 15444, 11794, 4037, 2] */
|
|
function _fun117729(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:6, offset: 0x024bf1dc, size: 859 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_117732 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
const env0_5 = (require(27) /* metro dependency 27 */).AppState;
|
|
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
|
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
|
|
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
|
|
const appFreezeStore = importDefault(9559) /* metro dependency 9559: AppFreezeStore */;
|
|
const safeAreaDisabledStore = importDefault(10724) /* metro dependency 10724: SafeAreaDisabledStore */;
|
|
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
|
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
|
const voicePanelStore = importDefault(7710) /* metro dependency 7710: VoicePanelStore */;
|
|
let value = require(11795) /* metro dependency 11795: VoicePanelConstants */;
|
|
const env0_16 = value.VoicePanelModes;
|
|
const env0_17 = value.getAnalyticsNameForVoicePanelMode;
|
|
value = require(11793) /* metro dependency 11793: VoicePanelControlsConstants */;
|
|
const env0_18 = value.CONTROLS_HEIGHT;
|
|
const env0_19 = value.CONTROLS_HEIGHT_PTT;
|
|
const env0_20 = value.CONTROLS_HIDE_TIMEOUT;
|
|
const env0_21 = value.VoicePanelControlsModes;
|
|
value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_22 = value.AnalyticEvents;
|
|
const env0_23 = value.ComponentActions;
|
|
const env0_24 = value.InputModes;
|
|
const env0_25 = (require(4237) /* metro dependency 4237: Constants */).OrientationLockState;
|
|
const env0_26 = (require(8044) /* metro dependency 8044: ActivityPanelConstants */).ActivityPanelModes;
|
|
const env0_27 = (require(4299) /* metro dependency 4299: CallConstants */).isActivityParticipant;
|
|
const env0_28 = (require(11796) /* metro dependency 11796: MorphablePanelConstants */).MorphablePanelModes;
|
|
const env0_29 = (require(33) /* metro dependency 33 */).jsx;
|
|
object = {code: 'function VoicePanelControllerTsx1(){const{focused,mode,connected}=this.__closure;var _focused$get;return[(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id,mode.get(),connected.get()];}'};
|
|
object = {code: 'function VoicePanelControllerTsx2(props,previous){const{cheapWorkletArrayShallowEqual,runOnJS,handleAnimatedReaction}=this.__closure;if(cheapWorkletArrayShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const[focusedParticipantId,voicePanelMode,connectedValue]=props;runOnJS(handleAnimatedReaction)({focusedParticipantId:focusedParticipantId,voicePanelMode:voicePanelMode,connectedValue:connectedValue});}'};
|
|
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
|
const MINUTE = Millis.MINUTE;
|
|
const env0_32 = 5 * MINUTE;
|
|
object = {code: 'function VoicePanelControllerTsx3(){const{focused,pipState}=this.__closure;var _focused$get;return[(_focused$get=focused.get())===null||_focused$get===void 0?void 0:_focused$get.id,pipState.id];}'};
|
|
object = {code: 'function VoicePanelControllerTsx4(props,previous){const{cheapWorkletArrayShallowEqual,runOnJS,handleStateUpdates}=this.__closure;if(cheapWorkletArrayShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const[focusedId,pipParticipantId]=props;runOnJS(handleStateUpdates)({focusedId:focusedId,pipParticipantId:pipParticipantId});}'};
|
|
object = {code: 'function VoicePanelControllerTsx5(value){const{isFocusedVideoZoomed}=this.__closure;isFocusedVideoZoomed.set(value);}'};
|
|
object = {code: 'function VoicePanelControllerTsx6(){const{mode,VoicePanelModes,MorphablePanelModes}=this.__closure;switch(mode.get()){case VoicePanelModes.PANEL:{return MorphablePanelModes.PANEL;}case VoicePanelModes.PIP:{return MorphablePanelModes.PIP;}default:{return MorphablePanelModes.UNDEFINED;}}}'};
|
|
object = {code: 'function VoicePanelControllerTsx7(){const{mode}=this.__closure;return mode.get();}'};
|
|
object = {code: 'function VoicePanelControllerTsx8(value){const{VoicePanelModes,runOnJS,_queueHideControls,_clearHideControlsQueue}=this.__closure;if(value===VoicePanelModes.PANEL){runOnJS(_queueHideControls)();}else{runOnJS(_clearHideControlsQueue)();}}'};
|
|
object = {code: 'function VoicePanelControllerTsx9(){const{connected}=this.__closure;return connected.get();}'};
|
|
object = {code: 'function VoicePanelControllerTsx10(connected){const{updateSharedValueIfChanged,controlsSpecs,pushToTalk,CONTROLS_HEIGHT_PTT,CONTROLS_HEIGHT}=this.__closure;updateSharedValueIfChanged(controlsSpecs,{height:pushToTalk&&connected?CONTROLS_HEIGHT_PTT:CONTROLS_HEIGHT,pushToTalk:pushToTalk});}'};
|
|
object = {code: 'function VoicePanelControllerTsx11({windowState:windowState,safeAreaState:safeAreaState,contentState:contentState}){const{isConnected,cheapWorkletShallowEqual,contentDimensions,windowDimensions,safeArea,runOnJS,executeLayoutManagerEffect}=this.__closure;if(isConnected&&!cheapWorkletShallowEqual(contentDimensions.get(),contentState)){contentDimensions.set(contentState);}if(!cheapWorkletShallowEqual(windowDimensions.get(),windowState)){windowDimensions.set(windowState);}if(!cheapWorkletShallowEqual(safeArea.get(),safeAreaState)){safeArea.set(safeAreaState);}runOnJS(executeLayoutManagerEffect)();}'};
|
|
object = {code: 'function VoicePanelControllerTsx12(){const{connected,mode,sharedTransitionState}=this.__closure;return[connected.get(),mode.get(),sharedTransitionState.get()];}'};
|
|
object = {code: 'function VoicePanelControllerTsx13(props,previous){const{cheapWorkletArrayShallowEqual,TransitionStates,VoicePanelModes,runOnJS,setMode}=this.__closure;if(cheapWorkletArrayShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const[isConnected,currentMode,currentTransitionState]=props;if(currentTransitionState===TransitionStates.YEETED){if(currentMode!==VoicePanelModes.DISMISSED){runOnJS(setMode)(VoicePanelModes.DISMISSED);}}else if(currentMode===VoicePanelModes.DISMISSED){var _previous$;let previousMode=(_previous$=previous===null||previous===void 0?void 0:previous[1])!==null&&_previous$!==void 0?_previous$:VoicePanelModes.PANEL;switch(previousMode){case VoicePanelModes.PANEL:case VoicePanelModes.PIP:if(!isConnected){previousMode=VoicePanelModes.PANEL;}break;default:previousMode=VoicePanelModes.PANEL;}runOnJS(setMode)(previousMode);}else if(!isConnected&&(previous===null||previous===void 0?void 0:previous[0])===true&¤tMode===VoicePanelModes.PIP){runOnJS(setMode)(VoicePanelModes.PANEL);}}'};
|
|
object = {code: 'function VoicePanelControllerTsx14(){const{mode,controlsSpecs}=this.__closure;return[mode.get(),controlsSpecs.get().mode];}'};
|
|
object = {code: 'function VoicePanelControllerTsx15(props,previous){const{cheapWorkletArrayShallowEqual,VoicePanelControlsModes,VoicePanelModes,runOnJS,dismissKeyboard}=this.__closure;if(cheapWorkletArrayShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const[currentMode,currentControlsMode]=props;if(currentControlsMode!==VoicePanelControlsModes.DRAWER||currentMode!==VoicePanelModes.PANEL||(previous===null||previous===void 0?void 0:previous[0])!==VoicePanelModes.PANEL){runOnJS(dismissKeyboard)();}}'};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_panel/native/VoicePanelController.tsx');
|
|
exports.default = VoicePanelController;
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_117730(a0, a1) { // fn#117730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:637, offset: 0x024bf537, size: 372 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun117731;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_117732(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_117732(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_117732(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun117731;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
}
|
|
|
|
function useLayoutManagerState({windowDimensions, safeArea, contentDimensions, isConnected, layoutManager, items, pushToTalk}) { // fn#117733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:4637, offset: 0x024bf6ab, size: 670 bytes, params: 2, frame: 30
|
|
let env0_3 = isConnected;
|
|
let env0_4 = layoutManager;
|
|
let binding = env0_4;
|
|
let useState = binding.useState;
|
|
const value3 = env0_3(Reflect.apply(useState, binding, [_fun117734]), 2);
|
|
const property = value3[0];
|
|
const property2 = value3[1];
|
|
binding = env0_4;
|
|
useState = binding.useState;
|
|
const useSafeAreaInsetsNativeModule = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
|
|
const getSafeAreaInsets = useSafeAreaInsetsNativeModule.getSafeAreaInsets;
|
|
const value5 = env0_3(Reflect.apply(useState, binding, [Reflect.apply(getSafeAreaInsets,
|
|
useSafeAreaInsetsNativeModule, [])]), 2);
|
|
const property3 = value5[0];
|
|
const property4 = value5[1];
|
|
const value6 = (require(11797) /* metro dependency 11797: VoicePanelCardLayoutManager */).useManagerSubscription(layoutManager);
|
|
binding = env0_4;
|
|
const useRef = binding.useRef;
|
|
let object2 = {timeout: -1, layoutKey: value6, connected: isConnected, windowState: property,
|
|
safeAreaState: property3, contentDimensions: {'width': 0, 'height': 0}};
|
|
object2 = {isConnected: isConnected, currentUpdatesRef: Reflect.apply(useRef, binding, [object2]),
|
|
setWindowState: property2, setSafeAreaState: property4};
|
|
useUpdateLayoutManagerState(object2);
|
|
env0_4.useLayoutEffect(_fun117744, [env0_4.useCallback(_fun117739, [])]);
|
|
env0_4.useLayoutEffect(_fun117748, [isConnected, env0_4.useId()]);
|
|
layoutManager.updateState(items, {windowWidth: property.width, windowHeight: property.height,
|
|
safeAreaLeft: property3.left, safeAreaRight: property3.right, safeAreaTop: property3.top,
|
|
safeAreaBottom: property3.bottom, controlBarSize: pushToTalk ? CONTROLS_HEIGHT_PTT : CONTROLS_HEIGHT});
|
|
env0_4.useLayoutEffect(_fun117750, [contentDimensions, layoutManager.getContentDimensions(), value6, layoutManager,
|
|
safeArea, property3, windowDimensions, property, isConnected]);
|
|
env0_4.useEffect(function() {
|
|
var closure = _fun117754;
|
|
var env0_4 = closure;
|
|
if (require(dependencyMap[46]).isStable) {
|
|
return undefined;
|
|
}
|
|
var env0_0 = (0, global.setInterval)(closure, 1000);
|
|
var env0_1 = null;
|
|
var env0_2 = AppState.addEventListener('change', _fun117756);
|
|
var env0_3 = false;
|
|
return _fun117757;
|
|
}, [layoutManager]);
|
|
env0_4.useLayoutEffect(function() {
|
|
return _fun117759;
|
|
}, []);
|
|
}
|
|
|
|
function VoicePanelController({channelId, guildId, children, transitionState, transitionCleanUp}) { // fn#117760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:10600, offset: 0x024c0336, size: 1578 bytes, params: 2, frame: 43
|
|
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
|
|
return MediaEngineStore.getMode() === InputModes.PUSH_TO_TALK;
|
|
});
|
|
let property = env0_3(env0_4.useState(_fun117762), 1)[0];
|
|
env0_4.useEffect(function() {
|
|
return _fun117764;
|
|
}, [property]);
|
|
const {items,
|
|
isConnected} = (importDefault(15435) /* metro dependency 15435: useVoicePanelParticipants */)(channelId,
|
|
guildId);
|
|
var env0_3 = useMountedCards(items, isConnected);
|
|
const value7 = useCoreSharedState(channelId, isConnected, items, value3);
|
|
var env0_4 = value7.channelType;
|
|
const connected = value7.connected;
|
|
const contentDimensions = value7.contentDimensions;
|
|
const env0_7 = value7.dragScrolling;
|
|
const focused = value7.focused;
|
|
const env0_9 = value7.isCall;
|
|
const layoutManager = value7.layoutManager;
|
|
const mode = value7.mode;
|
|
const env0_12 = value7.preJoinContentSize;
|
|
const safeArea = value7.safeArea;
|
|
const env0_14 = value7.scrollPosition;
|
|
const windowDimensions = value7.windowDimensions;
|
|
const env0_16 = value7.wrapperDimensions;
|
|
const env0_17 = value7.isFocusedVideoZoomed;
|
|
const env0_18 = value7.setIsFocusedVideoZoomed;
|
|
const env0_19 = value7.useReducedMotion;
|
|
const env0_20 = value7.wrapperOffset;
|
|
const env0_21 = value7.morphablePanelMode;
|
|
const env0_22 = value7.panelCardStillInPIP;
|
|
const value8 = useControlsState(mode, isConnected, connected, value3);
|
|
const env0_23 = value8.generateStateLocker;
|
|
const controlsSpecs = value8.controlsSpecs;
|
|
const showControls = value8.showControls;
|
|
const env0_26 = value8.hideControls;
|
|
const setControlsMode = value8.setControlsMode;
|
|
const value9 = useSelectedMode({channelId: channelId, isConnected: isConnected, mode: mode, connected: connected,
|
|
transitionState: transitionState, controlsSpecs: controlsSpecs, setControlsMode: setControlsMode});
|
|
const selectedMode = value9.selectedMode;
|
|
const setMode = value9.setMode;
|
|
const env0_30 = value9.dismissPanel;
|
|
const value10 = useManuallyFocusedItem({guildId: guildId, channelId: channelId, layoutManager: layoutManager,
|
|
focused: focused});
|
|
const manualFocusedItem = value10.manualFocusedItem;
|
|
const env0_31 = value10.setFocused;
|
|
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
|
|
_fun117812);
|
|
useLayoutManagerState({isConnected: isConnected, windowDimensions: windowDimensions,
|
|
contentDimensions: contentDimensions, safeArea: safeArea, layoutManager: layoutManager, items: items,
|
|
pushToTalk: value3});
|
|
env0_4.useLayoutEffect(_fun117813, [selectedMode, value11]);
|
|
useKeyboardDismissHandler({mode: mode, controlsSpecs: controlsSpecs});
|
|
useTransitionState({channelId: channelId, transitionState: transitionState, transitionCleanUp: transitionCleanUp,
|
|
connected: connected, mode: mode, setMode: setMode});
|
|
const value13 = (require(15436) /* metro dependency 15436: useControllerPIPState */).useControllerPIPState({channelId: channelId,
|
|
connected: isConnected, focusedId: manualFocusedItem ?? undefined, layoutManager: layoutManager,
|
|
mode: selectedMode});
|
|
const env0_33 = (importDefault(15442) /* metro dependency 15442: usePIPAvoidanceSpecs */)({mode: mode,
|
|
controlsSpecs: controlsSpecs, safeArea: safeArea, windowDimensions: windowDimensions});
|
|
useSelectedParticipantEffects({channelId: channelId, selectedMode: selectedMode,
|
|
manualFocusedItem: manualFocusedItem});
|
|
useHandleThermalState({channelId: channelId, focused: focused, pipState: value13,
|
|
manuallyFocusedId: manualFocusedItem});
|
|
useActivityFocused({channelId: channelId, focused: focused, mode: mode, connected: connected});
|
|
useActivityConnected({setControlsMode: setControlsMode});
|
|
useSpeakingWhileMutedNotification({showControls: showControls});
|
|
(importDefault(15443) /* metro dependency 15443: usePanelOpenState */)(channelId, mode, setMode, connected);
|
|
(importDefault(15367) /* metro dependency 15367: useHandleOAuthNavigation */)();
|
|
VoicePanelControllerUseActivityOrientationState({isConnected: isConnected, selectedMode: selectedMode,
|
|
manualFocusedItem: manualFocusedItem, isNonVoiceEmbeddedActivityInPanelMode: value11});
|
|
useVoicePanelAnalytics({channelId: channelId, isConnected: isConnected, selectedMode: selectedMode});
|
|
const value14 = useShowFloatingCTA(mode);
|
|
const env0_34 = value14.showFloatingCTA;
|
|
const env0_35 = value14.setShowFloatingCTA;
|
|
const env0_36 = env0_4.useRef(undefined);
|
|
const value15 = env0_4.useRef(0);
|
|
env0_4.useEffect(_fun117855);
|
|
let current = value15.current;
|
|
if (current != null) {
|
|
current = value15.current;
|
|
value15.current = typeof current === 'bigint' ? current + 1n : +current + 1;
|
|
current = value15.current;
|
|
if (current > 10) {
|
|
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).addBreadcrumb({category: 'voice-panel',
|
|
message: 'VoicePanelController is rendering too many times (>' + value15.current + ')'});
|
|
value15.current = null;
|
|
}
|
|
}
|
|
property = env0_3(env0_4.useState(_fun117856), 1)[0];
|
|
const Provider = (importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */).Provider;
|
|
const VoicePanelPIPStateContext = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).VoicePanelPIPStateContext;
|
|
const Provider2 = VoicePanelPIPStateContext.Provider;
|
|
const Provider3 = (importDefault(4037) /* metro dependency 4037: GuildThemeGuildIdOverrideContext */).Provider;
|
|
return (
|
|
<Provider value={property}>
|
|
<Provider2 value={value13}>
|
|
<Provider3 value={guildId ?? null}>
|
|
{children}
|
|
</Provider3>
|
|
</Provider2>
|
|
</Provider>
|
|
);
|
|
}
|
|
|
|
function _fun117734() { // fn#117734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:4790, offset: 0x024bf949, size: 66 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__;
|
|
value = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
|
|
value = value.getWindowDimensions();
|
|
const width = value.width;
|
|
const height = value.height;
|
|
return {width: width, height: height, landscape: width > height};
|
|
}
|
|
|
|
function useUpdateLayoutManagerState({isConnected, currentUpdatesRef, setWindowState, setSafeAreaState}) { // fn#117735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:5141, owner: useLayoutManagerState.useUpdateLayoutManagerState, offset: 0x024bf98b, size: 95 bytes, params: 2, frame: 17
|
|
env1_4.useLayoutEffect(function() {
|
|
if (currentUpdatesRef.current.connected !== isConnected) {
|
|
currentUpdatesRef.current.connected = isConnected;
|
|
setWindowState(_fun117737);
|
|
setSafeAreaState(_fun117738);
|
|
}
|
|
}, [currentUpdatesRef, isConnected, setWindowState, setSafeAreaState]);
|
|
}
|
|
|
|
function _fun117739() { // fn#117739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:5799, offset: 0x024bfb3a, size: 70 bytes, params: 1, frame: 14
|
|
const clearTimeout = global.clearTimeout;
|
|
const binding = env0_10;
|
|
clearTimeout(binding.current.timeout);
|
|
binding.current.timeout = global.setTimeout(_fun117740, 60);
|
|
}
|
|
|
|
function _fun117744() { // fn#117744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:6154, offset: 0x024bfc93, size: 115 bytes, params: 1, frame: 15
|
|
var environment;
|
|
let closure = updateSafeAreas;
|
|
let value = environment.__proto__;
|
|
const env0_0 = (importDefault(10712) /* metro dependency 10712: subscribeToSafeAreaInsetsNative */)(closure);
|
|
value = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
|
|
const getSafeAreaInsets = value.getSafeAreaInsets;
|
|
closure(Reflect.apply(getSafeAreaInsets, value, []));
|
|
closure = updateWindowDimensions;
|
|
const env0_1 = (importDefault(11534) /* metro dependency 11534: subscribeToWindowDimensionsNative */)(closure);
|
|
closure();
|
|
return _fun117747;
|
|
}
|
|
|
|
function _fun117748() { // fn#117748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:6695, offset: 0x024bfe00, size: 70 bytes, params: 1, frame: 12
|
|
var environment;
|
|
var value2;
|
|
var state;
|
|
if (isConnected) {
|
|
value2 = environment.__proto__;
|
|
state = SafeAreaDisabledStore.getState();
|
|
state.requestSafeAreaDisableLock({key: env0_12, lockEnabled: true});
|
|
return _fun117749;
|
|
}
|
|
}
|
|
|
|
function _fun117750() { // fn#117750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:7071, offset: 0x024bfe7a, size: 232 bytes, params: 1, frame: 20
|
|
env0_10.current.layoutKey = env0_9;
|
|
const closure = function() {
|
|
return layoutManager.handleLayoutEffect();
|
|
};
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const runOnUI = reanimatedRexportModule.runOnUI;
|
|
const closure2 = e_117752;
|
|
const object2 = {};
|
|
object2.isConnected = isConnected;
|
|
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
|
|
object2.contentDimensions = contentDimensions;
|
|
object2.windowDimensions = windowDimensions;
|
|
object2.safeArea = safeArea;
|
|
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
|
object2.executeLayoutManagerEffect = closure;
|
|
closure2.__closure = object2;
|
|
closure2.__workletHash = 13791383688018;
|
|
closure2.__initData = env1_41;
|
|
Reflect.apply(runOnUI, reanimatedRexportModule, [closure2])({windowState: env0_5, safeAreaState: env0_7,
|
|
contentState: env0_13});
|
|
}
|
|
|
|
function _fun117753() { // fn#117753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:7808, offset: 0x024c0085, size: 125 bytes, params: 1, frame: 15
|
|
const closure = checkDimensions;
|
|
if ((require(4827) /* metro dependency 4827: ReleaseChannelUtilsNative */).isStable) {
|
|
return undefined;
|
|
}
|
|
const env0_0 = global.setInterval(closure, 1000);
|
|
const env0_2 = AppState.addEventListener('change', _fun117756);
|
|
return _fun117757;
|
|
}
|
|
|
|
function _fun117758() { // fn#117758, offset: 0x024c0308, size: 11 bytes, params: 1, frame: 1
|
|
return _fun117759;
|
|
}
|
|
|
|
function _fun117762() { // fn#117762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:10793, offset: 0x024c0981, size: 61 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(15434) /* metro dependency 15434: VoicePanelStreamOutputSinkStack */;
|
|
value = MediaEngineStore.getMediaEngine();
|
|
const value2 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
|
|
value = new defaultImport(value);
|
|
return value instanceof Object ? value : value2;
|
|
}
|
|
|
|
function _fun117763() { // fn#117763, offset: 0x024c09be, size: 11 bytes, params: 1, frame: 1
|
|
return _fun117764;
|
|
}
|
|
|
|
function useMountedCards(a0, a1) { // fn#117765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:10934, owner: VoicePanelController.useMountedCards, offset: 0x024c09dc, size: 105 bytes, params: 3, frame: 17
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
let value = environment.__proto__;
|
|
const property = env1_3(env1_4.useState(function() {
|
|
var Set = global.Set;
|
|
var value = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
var value2 = new Set();
|
|
return value2 instanceof Object ? value2 : value;
|
|
}), 1)[0];
|
|
env1_4.useEffect(_fun117767, [a1, a0, property]);
|
|
return property;
|
|
}
|
|
|
|
function useCoreSharedState(a0, a1, a2, a3) { // fn#117770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:11254, owner: VoicePanelController.useCoreSharedState, offset: 0x024c0b16, size: 1044 bytes, params: 5, frame: 38
|
|
var object2;
|
|
var environment;
|
|
let env0_0 = a0;
|
|
const env0_1 = a2;
|
|
const env0_2 = a3;
|
|
let value = environment.__proto__;
|
|
const channel = ChannelStore.getChannel(a0);
|
|
const value3 = undefined;
|
|
const r2 = channel == null ? value3 : channel.isDM();
|
|
const r14 = r2 != null && r2;
|
|
const type = channel == null ? value3 : channel.type;
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
let useSharedValue = reanimatedRexportModule.useSharedValue;
|
|
const value5 = Reflect.apply(useSharedValue, reanimatedRexportModule, [a1]);
|
|
const moduleValue2 = reanimatedRexportModule;
|
|
useSharedValue = moduleValue2.useSharedValue;
|
|
let PANEL = VoicePanelModes.PANEL;
|
|
const value6 = Reflect.apply(useSharedValue, moduleValue2, [PANEL]);
|
|
const windowDimensions = (require(1478) /* metro dependency 1478: useWindowDimensionsNative */).getWindowDimensions();
|
|
const value8 = reanimatedRexportModule.useSharedValue({width: windowDimensions.width,
|
|
height: windowDimensions.height, landscape: windowDimensions.width > windowDimensions.height});
|
|
const safeAreaInsets = (require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */).getSafeAreaInsets();
|
|
const moduleValue6 = reanimatedRexportModule;
|
|
useSharedValue = moduleValue6.useSharedValue;
|
|
object2 = {};
|
|
copyDataProperties(object2, safeAreaInsets, undefined);
|
|
const value10 = Reflect.apply(useSharedValue, moduleValue6, [object2]);
|
|
const maxPanelWidth = (require(15432) /* metro dependency 15432: PanelSizeUtils */).getMaxPanelWidth({windowWidth: windowDimensions.width,
|
|
connected: a1, safeAreaLeft: safeAreaInsets.left, safeAreaRight: safeAreaInsets.right});
|
|
const moduleValue8 = reanimatedRexportModule;
|
|
useSharedValue = moduleValue8.useSharedValue;
|
|
object2 = {};
|
|
object2.drawerHeight = windowDimensions.height;
|
|
object2.drawerWidth = maxPanelWidth;
|
|
object2.drawerX = (require(15432) /* metro dependency 15432: PanelSizeUtils */).getPanelX(windowDimensions.width,
|
|
maxPanelWidth);
|
|
object2.drawerY = windowDimensions.height;
|
|
object2.pipX = -1;
|
|
object2.pipY = -1;
|
|
object2.animated = true;
|
|
PANEL = VoicePanelModes.PANEL;
|
|
object2.mode = PANEL;
|
|
const value12 = Reflect.apply(useSharedValue, moduleValue8, [object2]);
|
|
const value13 = reanimatedRexportModule.useSharedValue(0);
|
|
const value14 = reanimatedRexportModule.useSharedValue(false);
|
|
const value15 = reanimatedRexportModule.useSharedValue(null);
|
|
const value16 = reanimatedRexportModule.useSharedValue(0);
|
|
const value17 = reanimatedRexportModule.useSharedValue(false);
|
|
const value18 = reanimatedRexportModule.useSharedValue(false);
|
|
const binding = env1_4;
|
|
const useCallback = binding.useCallback;
|
|
let closure = useCoreSharedStateC;
|
|
closure.__closure = {isFocusedVideoZoomed: value18};
|
|
closure.__workletHash = 13885070318174;
|
|
closure.__initData = env1_35;
|
|
const value19 = Reflect.apply(useCallback, binding, [closure, [value18]]);
|
|
const moduleValue16 = reanimatedRexportModule;
|
|
useSharedValue = moduleValue16.useSharedValue;
|
|
const useReducedMotion = AccessibilityStore.useReducedMotion;
|
|
const value20 = Reflect.apply(useSharedValue, moduleValue16, [useReducedMotion]);
|
|
env1_4.useEffect(function() {
|
|
var closure = _fun117773;
|
|
var env0_0 = closure;
|
|
AccessibilityStore.addReactChangeListener(closure);
|
|
return _fun117774;
|
|
}, [value20]);
|
|
const value21 = reanimatedRexportModule.useSharedValue({'gestureActive': false, 'x': 0, 'y': 0});
|
|
const moduleValue18 = reanimatedRexportModule;
|
|
const useDerivedValue = moduleValue18.useDerivedValue;
|
|
closure = useCoreSharedStateW;
|
|
closure.__closure = {mode: value6, VoicePanelModes: VoicePanelModes, MorphablePanelModes: MorphablePanelModes};
|
|
closure.__workletHash = 931249605381;
|
|
closure.__initData = env1_36;
|
|
const value22 = Reflect.apply(useDerivedValue, moduleValue18, [closure]);
|
|
const property = env1_3(env1_4.useState(_fun117776), 1)[0];
|
|
env1_4.useLayoutEffect(function() {
|
|
return _fun117778;
|
|
}, [property]);
|
|
object2 = {channelType: type, connected: value5};
|
|
value = reanimatedRexportModule;
|
|
useSharedValue = value.useSharedValue;
|
|
const getContentDimensions = property.getContentDimensions;
|
|
object2.contentDimensions = Reflect.apply(useSharedValue, value, [Reflect.apply(getContentDimensions, property,
|
|
[])]);
|
|
object2.dragScrolling = value14;
|
|
object2.focused = value15;
|
|
object2.isCall = r14;
|
|
object2.layoutManager = property;
|
|
object2.mode = value6;
|
|
object2.preJoinContentSize = value16;
|
|
object2.safeArea = value10;
|
|
object2.scrollPosition = value13;
|
|
object2.windowDimensions = value8;
|
|
object2.wrapperDimensions = value12;
|
|
object2.isFocusedVideoZoomed = value18;
|
|
object2.setIsFocusedVideoZoomed = value19;
|
|
object2.useReducedMotion = value20;
|
|
object2.wrapperOffset = value21;
|
|
object2.morphablePanelMode = value22;
|
|
object2.panelCardStillInPIP = value17;
|
|
return object2;
|
|
}
|
|
|
|
function useControlsState(a0, a1, a2, a3) { // fn#117779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:13804, owner: VoicePanelController.useControlsState, offset: 0x024c10b4, size: 862 bytes, params: 5, frame: 32
|
|
var object2;
|
|
let env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const env0_3 = a3;
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useSharedValue = reanimatedRexportModule.useSharedValue;
|
|
const FLOATING_DEFAULT = VoicePanelControlsModes.FLOATING_DEFAULT;
|
|
const value2 = Reflect.apply(useSharedValue, reanimatedRexportModule, [{mode: FLOATING_DEFAULT, locked: false,
|
|
height: a3 && a1 ? CONTROLS_HEIGHT_PTT : CONTROLS_HEIGHT, pushToTalk: a3}]);
|
|
let binding = env1_4;
|
|
let useRef = binding.useRef;
|
|
const env0_5 = Reflect.apply(useRef, binding, [-1]);
|
|
binding = env1_4;
|
|
let closure = _fun117780;
|
|
const value3 = binding.useCallback(closure, []);
|
|
const value4 = env1_4.useCallback(_fun117781, [value2, value3, a0]);
|
|
const {cancelControlsDebounce, setControlsMode} = env1_4.useMemo(_fun117783, [value2, value4]);
|
|
binding = env1_4;
|
|
useRef = binding.useRef;
|
|
const Set = global.Set;
|
|
const value6 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set();
|
|
const env0_10 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value6]);
|
|
const value8 = env1_4.useCallback(_fun117787, [value2, value4, value3]);
|
|
const value9 = env1_4.useCallback(_fun117790, [setControlsMode]);
|
|
const value10 = env1_4.useCallback(_fun117791, [setControlsMode, value2]);
|
|
const moduleValue2 = reanimatedRexportModule;
|
|
let useAnimatedReaction = moduleValue2.useAnimatedReaction;
|
|
closure = useControlsStateS;
|
|
closure.__closure = {mode: a0};
|
|
closure.__workletHash = 12140218650562;
|
|
closure.__initData = env1_37;
|
|
const closure2 = useControlsStateR;
|
|
object2 = {};
|
|
object2.VoicePanelModes = VoicePanelModes;
|
|
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
|
object2._queueHideControls = value4;
|
|
object2._clearHideControlsQueue = value3;
|
|
closure2.__closure = object2;
|
|
closure2.__workletHash = 7742206515980;
|
|
closure2.__initData = env1_38;
|
|
Reflect.apply(useAnimatedReaction, moduleValue2, [closure, closure2]);
|
|
env1_4.useLayoutEffect(_fun117794, [a3, value2, a1]);
|
|
const moduleValue3 = reanimatedRexportModule;
|
|
useAnimatedReaction = moduleValue3.useAnimatedReaction;
|
|
closure = function() {
|
|
return importDefault.get();
|
|
};
|
|
closure.__closure = {connected: a2};
|
|
closure.__workletHash = 16653595323628;
|
|
closure.__initData = env1_39;
|
|
const closure3 = useControlsStateL;
|
|
object2 = {};
|
|
object2.updateSharedValueIfChanged = importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */;
|
|
object2.controlsSpecs = value2;
|
|
object2.pushToTalk = a3;
|
|
object2.CONTROLS_HEIGHT_PTT = CONTROLS_HEIGHT_PTT;
|
|
object2.CONTROLS_HEIGHT = CONTROLS_HEIGHT;
|
|
closure3.__closure = object2;
|
|
closure3.__workletHash = 2154816141018;
|
|
closure3.__initData = env1_40;
|
|
Reflect.apply(useAnimatedReaction, moduleValue3, [closure, closure3]);
|
|
env1_4.useLayoutEffect(function() {
|
|
return _fun117798;
|
|
}, [cancelControlsDebounce, value3]);
|
|
env1_4.useEffect(function() {
|
|
var closure = _fun117800;
|
|
var env0_0 = closure;
|
|
var ComponentDispatch = require(dependencyMap[42]).ComponentDispatch;
|
|
ComponentDispatch.subscribe(ComponentActions.VOICE_PANEL_TIV_CLOSE, closure);
|
|
return _fun117801;
|
|
}, [setControlsMode]);
|
|
return {generateStateLocker: value8, setControlsMode: setControlsMode, showControls: value10, hideControls: value9,
|
|
controlsSpecs: value2};
|
|
}
|
|
|
|
function useSelectedMode({channelId, isConnected, mode, connected, transitionState, controlsSpecs, setControlsMode}) { // fn#117802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:16394, owner: VoicePanelController.useSelectedMode, offset: 0x024c1a0a, size: 223 bytes, params: 2, frame: 21
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
let binding = env1_4;
|
|
const useState = binding.useState;
|
|
const PANEL = VoicePanelModes.PANEL;
|
|
const value3 = env1_3(Reflect.apply(useState, binding, [PANEL]), 2);
|
|
const property = value3[0];
|
|
const property2 = value3[1];
|
|
env1_4.useLayoutEffect(_fun117803);
|
|
binding = env1_4;
|
|
const useCallback = binding.useCallback;
|
|
let object = [channelId, connected, mode, controlsSpecs, setControlsMode];
|
|
object = {selectedMode: property, setMode: property2, dismissPanel: Reflect.apply(useCallback, binding, [_fun117804,
|
|
object])};
|
|
return object;
|
|
}
|
|
|
|
function useManuallyFocusedItem({guildId, channelId, layoutManager, focused}) { // fn#117805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:17033, owner: VoicePanelController.useManuallyFocusedItem, offset: 0x024c1bef, size: 343 bytes, params: 2, frame: 22
|
|
const value = undefined;
|
|
const selectedParticipantId = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore],
|
|
function() {
|
|
return ChannelRTCStore.getSelectedParticipantId(channelId);
|
|
});
|
|
const value3 = env1_4.useCallback(_fun117807, [guildId, channelId]);
|
|
const env0_5 = env1_4.useRef(value);
|
|
env1_4.useLayoutEffect(_fun117808, [focused, selectedParticipantId,
|
|
layoutManager.getTargetDimensions(selectedParticipantId ?? value)]);
|
|
env1_4.useEffect(_fun117809, [selectedParticipantId,
|
|
(importDefault(15433) /* metro dependency 15433: useIsVoicePanelParticipantFocusable */)(guildId, channelId,
|
|
selectedParticipantId), value3]);
|
|
env1_4.useEffect(function() {
|
|
return _fun117811;
|
|
}, [value3]);
|
|
return {setFocused: value3, manualFocusedItem: selectedParticipantId};
|
|
}
|
|
|
|
function _fun117812() { // fn#117812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:17833, offset: 0x024c1e9e, size: 99 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
const connectedActivityLocation = EmbeddedActivitiesStore.getConnectedActivityLocation();
|
|
return connectedActivityLocation != null && (require(3774) /* metro dependency 3774: embeddedActivityLocationUtils */).getEmbeddedActivityLocationChannelId(connectedActivityLocation) !== channelId && EmbeddedActivitiesStore.getActivityPanelMode() === ActivityPanelModes.PANEL;
|
|
}
|
|
|
|
function _fun117813() { // fn#117813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:18144, offset: 0x024c1f01, size: 81 bytes, params: 1, frame: 12
|
|
var value;
|
|
const selectedModeBinding = selectedMode;
|
|
const PANEL = VoicePanelModes.PANEL;
|
|
if (selectedModeBinding === PANEL && env0_32) {
|
|
value = require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */;
|
|
value.updateActivityPanelMode(ActivityPanelModes.PIP);
|
|
}
|
|
}
|
|
|
|
function useKeyboardDismissHandler({mode, controlsSpecs}) { // fn#117814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:18219, owner: VoicePanelController.useKeyboardDismissHandler, offset: 0x024c1f52, size: 236 bytes, params: 2, frame: 21
|
|
var object2;
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
|
const closure = function() {
|
|
var items = [mode.get()];
|
|
items[1] = controlsSpecs.get().mode;
|
|
return items;
|
|
};
|
|
closure.__closure = {mode: mode, controlsSpecs: controlsSpecs};
|
|
closure.__workletHash = 10791754460802;
|
|
closure.__initData = env1_44;
|
|
const closure2 = useKeyboardDismissHandlerN;
|
|
object2 = {};
|
|
object2.cheapWorkletArrayShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual;
|
|
object2.VoicePanelControlsModes = VoicePanelControlsModes;
|
|
object2.VoicePanelModes = VoicePanelModes;
|
|
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
|
object2.dismissKeyboard = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
|
|
closure2.__closure = object2;
|
|
closure2.__workletHash = 16494740341507;
|
|
closure2.__initData = env1_45;
|
|
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
|
}
|
|
|
|
function useTransitionState({channelId, transitionState, transitionCleanUp, connected, mode, setMode}) { // fn#117817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:18921, owner: VoicePanelController.useTransitionState, offset: 0x024c213d, size: 374 bytes, params: 2, frame: 25
|
|
var object2;
|
|
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(transitionState);
|
|
env1_4.useLayoutEffect(_fun117818, [transitionState, value2, transitionCleanUp, channelId]);
|
|
env1_4.useLayoutEffect(function() {
|
|
return _fun117821;
|
|
}, [channelId]);
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
|
const closure = useTransitionStateH;
|
|
closure.__closure = {connected: connected, mode: mode, sharedTransitionState: value2};
|
|
closure.__workletHash = 7656858903152;
|
|
closure.__initData = env1_42;
|
|
const closure2 = useTransitionStateU;
|
|
object2 = {};
|
|
object2.cheapWorkletArrayShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual;
|
|
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
|
object2.TransitionStates = TransitionStates;
|
|
object2.VoicePanelModes = VoicePanelModes;
|
|
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
|
object2.setMode = setMode;
|
|
closure2.__closure = object2;
|
|
closure2.__workletHash = 5740547237317;
|
|
closure2.__initData = env1_43;
|
|
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
|
}
|
|
|
|
function useSelectedParticipantEffects({channelId, selectedMode, manualFocusedItem}) { // fn#117824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:20533, owner: VoicePanelController.useSelectedParticipantEffects, offset: 0x024c25ae, size: 118 bytes, params: 2, frame: 17
|
|
const env0_2 = env1_4.useRef(null);
|
|
env1_4.useLayoutEffect(_fun117825, [selectedMode, manualFocusedItem, channelId]);
|
|
env1_4.useLayoutEffect(_fun117826);
|
|
}
|
|
|
|
function useHandleThermalState({channelId, focused, pipState, manuallyFocusedId}) { // fn#117827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:20923, owner: VoicePanelController.useHandleThermalState, offset: 0x024c26d5, size: 299 bytes, params: 2, frame: 22
|
|
var object2;
|
|
const value2 = env1_4.useCallback(_fun117828, [channelId]);
|
|
env1_4.useEffect(_fun117829, [manuallyFocusedId, pipState, value2, channelId]);
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
|
const closure = function() {
|
|
return [focused.get()?.id, pipState.id];
|
|
};
|
|
closure.__closure = {focused: focused, pipState: pipState};
|
|
closure.__workletHash = 94735519164;
|
|
closure.__initData = env1_33;
|
|
const closure2 = useHandleThermalStateL;
|
|
object2 = {};
|
|
object2.cheapWorkletArrayShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual;
|
|
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
|
object2.handleStateUpdates = value2;
|
|
closure2.__closure = object2;
|
|
closure2.__workletHash = 15246095289306;
|
|
closure2.__initData = env1_34;
|
|
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
|
}
|
|
|
|
function useActivityFocused({channelId, focused, mode, connected}) { // fn#117834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:22518, owner: VoicePanelController.useActivityFocused, offset: 0x024c2b3d, size: 260 bytes, params: 2, frame: 23
|
|
var object2;
|
|
const value2 = env1_4.useCallback(_fun117835, [channelId]);
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
|
const closure = function() {
|
|
var items = [focused.get()?.id];
|
|
items[1] = mode.get();
|
|
items[2] = connected.get();
|
|
return items;
|
|
};
|
|
closure.__closure = {focused: focused, mode: mode, connected: connected};
|
|
closure.__workletHash = 16641161683997;
|
|
closure.__initData = env1_30;
|
|
const closure2 = useActivityFocusedL;
|
|
object2 = {};
|
|
object2.cheapWorkletArrayShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual;
|
|
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
|
object2.handleAnimatedReaction = value2;
|
|
closure2.__closure = object2;
|
|
closure2.__workletHash = 15290799116693;
|
|
closure2.__initData = env1_31;
|
|
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
|
}
|
|
|
|
function useActivityConnected({setControlsMode}) { // fn#117838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:23403, owner: VoicePanelController.useActivityConnected, offset: 0x024c2da4, size: 84 bytes, params: 2, frame: 15
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const binding = env1_4;
|
|
const useCallback = binding.useCallback;
|
|
(importDefault(15406) /* metro dependency 15406: useTransitionToConnectedActivityInVoice */)({onTransition: Reflect.apply(useCallback,
|
|
binding, [function() {
|
|
setControlsMode({mode: VoicePanelControlsModes.FLOATING_DEFAULT});
|
|
}, [setControlsMode]])});
|
|
}
|
|
|
|
function useSpeakingWhileMutedNotification({showControls}) { // fn#117840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:23566, owner: VoicePanelController.useSpeakingWhileMutedNotification, offset: 0x024c2e1b, size: 183 bytes, params: 2, frame: 18
|
|
const defaultImport = importDefault(15407) /* metro dependency 15407: MobileMuteIndicatorExperiment */;
|
|
const useConfig = defaultImport.useConfig;
|
|
const enableMuteWarning = Reflect.apply(useConfig, defaultImport,
|
|
[{location: 'VoicePanelController'}]).enableMuteWarning;
|
|
const env0_2 = env1_4.useRef(0);
|
|
env1_4.useEffect(_fun117842, [(require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore],
|
|
function() {
|
|
return MediaEngineStore.getSpeakingWhileMuted();
|
|
}), enableMuteWarning, showControls]);
|
|
}
|
|
|
|
function VoicePanelControllerUseActivityOrientationState({isConnected, selectedMode, manualFocusedItem, isNonVoiceEmbeddedActivityInPanelMode}) { // fn#117843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:24072, owner: VoicePanelController.useActivityOrientationState, offset: 0x024c2fcd, size: 214 bytes, params: 2, frame: 22
|
|
const {applicationId, activityOrientationLockState,
|
|
instanceId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore],
|
|
function() {
|
|
var r5;
|
|
var value2 = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
|
|
var value3 = undefined;
|
|
r5 = value2 == null ? value3 : value2.applicationId;
|
|
var object = {applicationId: r5};
|
|
object.instanceId = value2 == null ? value3 : value2.compositeInstanceId;
|
|
object.activityOrientationLockState = r5 == null ? OrientationLockState.UNLOCKED : EmbeddedActivitiesStore.getOrientationLockStateForApp(r5) ?? OrientationLockState.UNLOCKED;
|
|
return object;
|
|
});
|
|
env1_4.useLayoutEffect(_fun117845, [applicationId, isConnected, selectedMode, activityOrientationLockState,
|
|
manualFocusedItem, isNonVoiceEmbeddedActivityInPanelMode, instanceId]);
|
|
env1_4.useLayoutEffect(function() {
|
|
return _fun117847;
|
|
}, []);
|
|
}
|
|
|
|
function useVoicePanelAnalytics({channelId, isConnected, selectedMode}) { // fn#117848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:24997, owner: VoicePanelController.useVoicePanelAnalytics, offset: 0x024c3217, size: 79 bytes, params: 2, frame: 16
|
|
env1_4.useEffect(_fun117849, [selectedMode, channelId, isConnected]);
|
|
}
|
|
|
|
function useShowFloatingCTA(a0) { // fn#117850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:25281, owner: VoicePanelController.useShowFloatingCTA, offset: 0x024c32f1, size: 150 bytes, params: 2, frame: 16
|
|
const env0_0 = a0;
|
|
const env0_1 = env1_4.useRef(-1);
|
|
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(null);
|
|
const value3 = env1_4.useCallback(_fun117851, [a0, value2]);
|
|
env1_4.useLayoutEffect(function() {
|
|
return _fun117854;
|
|
}, []);
|
|
return {showFloatingCTA: value2, setShowFloatingCTA: value3};
|
|
}
|
|
|
|
function _fun117855() { // fn#117855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:25741, offset: 0x024c3432, size: 19 bytes, params: 1, frame: 2
|
|
env0_37.current = 0;
|
|
}
|
|
|
|
function _fun117856() { // fn#117856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:25972, offset: 0x024c3445, size: 355 bytes, params: 1, frame: 13
|
|
const object2 = {};
|
|
object2.channelId = channelId;
|
|
object2.channelType = channelType;
|
|
object2.connected = connected;
|
|
object2.contentDimensions = contentDimensions;
|
|
object2.controlsSpecs = controlsSpecs;
|
|
object2.dismissPanel = dismissPanel;
|
|
object2.dismissToPIPGestureRef = env0_36;
|
|
object2.dragScrolling = dragScrolling;
|
|
object2.focused = focused;
|
|
object2.generateStateLocker = generateStateLocker;
|
|
object2.guildId = guildId;
|
|
object2.hideControls = hideControls;
|
|
object2.isCall = isCall;
|
|
object2.isFocusedVideoZoomed = isFocusedVideoZoomed;
|
|
object2.layoutManager = layoutManager;
|
|
object2.mode = mode;
|
|
object2.morphablePanelMode = morphablePanelMode;
|
|
object2.mountedCards = env0_3;
|
|
object2.pipAvoidanceSpecs = env0_33;
|
|
object2.preJoinContentSize = preJoinContentSize;
|
|
object2.safeArea = safeArea;
|
|
object2.scrollPosition = scrollPosition;
|
|
object2.setControlsMode = setControlsMode;
|
|
object2.setFocused = setFocused;
|
|
object2.setIsFocusedVideoZoomed = setIsFocusedVideoZoomed;
|
|
object2.setMode = setMode;
|
|
object2.setShowFloatingCTA = setShowFloatingCTA;
|
|
object2.showControls = showControls;
|
|
object2.showFloatingCTA = showFloatingCTA;
|
|
object2.streamOutputSinkStack = env0_2;
|
|
const usePIPState = (require(15444) /* metro dependency 15444: VoicePanelPIPStateContext */).usePIPState;
|
|
object2.usePIPState = usePIPState;
|
|
object2.useReducedMotion = useReducedMotion;
|
|
object2.windowDimensions = windowDimensions;
|
|
object2.wrapperDimensions = wrapperDimensions;
|
|
object2.wrapperOffset = wrapperOffset;
|
|
object2.panelCardStillInPIP = panelCardStillInPIP;
|
|
return object2;
|
|
}
|
|
|
|
function _fun117736() { // fn#117736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:5270, offset: 0x024bf9ea, size: 85 bytes, params: 1, frame: 13
|
|
if (currentUpdatesRef.current.connected !== isConnected) {
|
|
currentUpdatesRef.current.connected = isConnected;
|
|
setWindowState(_fun117737);
|
|
setSafeAreaState(function(a0) {
|
|
var value = a0;
|
|
var currentUpdatesRefBinding = currentUpdatesRef;
|
|
currentUpdatesRefBinding.current.safeAreaState = require(dependencyMap[36]).getSafeAreaInsets();
|
|
return require(dependencyMap[23]).cheapWorkletShallowEqual(value,
|
|
currentUpdatesRefBinding.current.safeAreaState) ? value : currentUpdatesRef.current.safeAreaState;
|
|
});
|
|
}
|
|
}
|
|
|
|
function _fun117740() { // fn#117740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:5866, offset: 0x024bfb80, size: 78 bytes, params: 1, frame: 12
|
|
var environment;
|
|
const clearTimeout = global.clearTimeout;
|
|
let value = environment.__proto__;
|
|
clearTimeout(env1_10.current.timeout);
|
|
value = environment.__proto__.__proto__;
|
|
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun117741);
|
|
}
|
|
|
|
function updateSafeAreas(a0) { // fn#117745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:6179, offset: 0x024bfd06, size: 98 bytes, params: 2, frame: 15
|
|
var object2;
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
const cheapWorkletShallowEqual = value.cheapWorkletShallowEqual;
|
|
let current = env1_10.current;
|
|
if (!Reflect.apply(cheapWorkletShallowEqual, value, [current.safeAreaState, a0])) {
|
|
current = env1_10.current;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, value);
|
|
current.safeAreaState = object2;
|
|
env1_11();
|
|
}
|
|
}
|
|
|
|
function updateWindowDimensions() { // fn#117746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:6386, offset: 0x024bfd68, size: 152 bytes, params: 1, frame: 15
|
|
var r1;
|
|
let value = a0;
|
|
if (value !== undefined) {
|
|
r1 = value;
|
|
} else {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
|
|
value = value.getWindowDimensions();
|
|
r1 = value;
|
|
}
|
|
const width = r1.width;
|
|
const height = r1.height;
|
|
const object2 = {width: width, height: height, landscape: width > height};
|
|
value = environment.__proto__.__proto__;
|
|
value = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
if (!value.cheapWorkletShallowEqual(env1_10.current.windowState, object2)) {
|
|
env1_10.current.windowState = object2;
|
|
env1_11();
|
|
}
|
|
}
|
|
|
|
function _fun117749() { // fn#117749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:6776, offset: 0x024bfe46, size: 52 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__.__proto__;
|
|
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env1_12, lockEnabled: false});
|
|
}
|
|
|
|
function e_117752({windowState, safeAreaState, contentState}) { // fn#117752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:7179, offset: 0x024bff77, size: 270 bytes, params: 2, frame: 19
|
|
var r0;
|
|
var value2;
|
|
var moduleValue;
|
|
var cheapWorkletShallowEqual;
|
|
var contentDimensionsBinding;
|
|
let value = environment.__proto__;
|
|
const isConnectedBinding = isConnected;
|
|
if (isConnectedBinding) {
|
|
value2 = environment.__proto__.__proto__;
|
|
moduleValue = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
cheapWorkletShallowEqual = moduleValue.cheapWorkletShallowEqual;
|
|
contentDimensionsBinding = contentDimensions;
|
|
r0 = !Reflect.apply(cheapWorkletShallowEqual, moduleValue, [contentDimensionsBinding.get(), contentState]);
|
|
} else {
|
|
r0 = isConnectedBinding;
|
|
}
|
|
if (r0) {
|
|
contentDimensions.set(contentState);
|
|
}
|
|
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
cheapWorkletShallowEqual = cheapWorkletShallowEqualModule.cheapWorkletShallowEqual;
|
|
const windowDimensionsBinding = windowDimensions;
|
|
let get = windowDimensionsBinding.get;
|
|
if (!Reflect.apply(cheapWorkletShallowEqual, cheapWorkletShallowEqualModule, [Reflect.apply(get,
|
|
windowDimensionsBinding, []), windowState])) {
|
|
windowDimensions.set(windowState);
|
|
}
|
|
const moduleValue3 = cheapWorkletShallowEqualModule;
|
|
cheapWorkletShallowEqual = moduleValue3.cheapWorkletShallowEqual;
|
|
const safeAreaBinding = safeArea;
|
|
get = safeAreaBinding.get;
|
|
if (!Reflect.apply(cheapWorkletShallowEqual, moduleValue3, [Reflect.apply(get, safeAreaBinding, []),
|
|
safeAreaState])) {
|
|
safeArea.set(safeAreaState);
|
|
}
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
value.runOnJS(executeLayoutManagerEffect)();
|
|
}
|
|
|
|
function checkDimensions() { // fn#117754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:8095, offset: 0x024c0102, size: 126 bytes, params: 1, frame: 16
|
|
var environment;
|
|
var value2;
|
|
var windowDimensions;
|
|
var width;
|
|
var height;
|
|
var value4;
|
|
if (!env0_3) {
|
|
value2 = environment.__proto__.__proto__;
|
|
windowDimensions = (require(1478) /* metro dependency 1478: useWindowDimensionsNative */).getWindowDimensions();
|
|
width = windowDimensions.width;
|
|
height = windowDimensions.height;
|
|
var env0_1;
|
|
value4 = environment.__proto__;
|
|
if (layoutManager.checkDimensionsMismatch(width, height) != null) {
|
|
env0_1 = global.setTimeout(_fun117755, 250);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun117756(a0) { // fn#117756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:7914, offset: 0x024c0268, size: 107 bytes, params: 2, frame: 15
|
|
if (a0 !== 'active') {
|
|
if (a0 !== 'active') {
|
|
global.clearInterval(env0_0);
|
|
global.clearTimeout(env0_1);
|
|
}
|
|
} else if (env0_0 == null) {
|
|
env0_0 = global.setInterval(checkDimensions, 1000);
|
|
} else if (a0 !== 'active') {
|
|
global.clearInterval(env0_0);
|
|
global.clearTimeout(env0_1);
|
|
}
|
|
}
|
|
|
|
function _fun117757() { // fn#117757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:8045, offset: 0x024c02d3, size: 53 bytes, params: 1, frame: 13
|
|
global.clearInterval(env0_0);
|
|
global.clearTimeout(env0_1);
|
|
env0_2.remove();
|
|
}
|
|
|
|
function _fun117759() { // fn#117759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:8569, offset: 0x024c0313, size: 35 bytes, params: 1, frame: 11
|
|
return global.clearTimeout(env1_10.current.timeout);
|
|
}
|
|
|
|
function _fun117764() { // fn#117764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:10862, offset: 0x024c09c9, size: 19 bytes, params: 1, frame: 9
|
|
return env1_2.cleanUp();
|
|
}
|
|
|
|
function _fun117767() { // fn#117767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:11028, offset: 0x024c0a45, size: 90 bytes, params: 1, frame: 14
|
|
var environment;
|
|
var value;
|
|
if (require) {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
|
|
var env0_0 = value.runAfterInteractions(_fun117768, 100);
|
|
return _fun117769;
|
|
}
|
|
env0_2.clear();
|
|
}
|
|
|
|
function _fun117772() { // fn#117772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:12280, offset: 0x024c0f2a, size: 40 bytes, params: 1, frame: 12
|
|
AccessibilityStore.addReactChangeListener(onChange_117773);
|
|
return function() {
|
|
AccessibilityStore.removeReactChangeListener(onChange_117773);
|
|
};
|
|
}
|
|
|
|
function useCoreSharedStateW() { // fn#117775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:12525, owner: VoicePanelController.useCoreSharedState.W, offset: 0x024c0f91, size: 83 bytes, params: 1, frame: 10
|
|
const value = env0_3.get();
|
|
const PANEL = VoicePanelModes.PANEL;
|
|
if (PANEL === value) {
|
|
return MorphablePanelModes.PANEL;
|
|
}
|
|
const PIP = VoicePanelModes.PIP;
|
|
if (PIP === value) {
|
|
return MorphablePanelModes.PIP;
|
|
}
|
|
return MorphablePanelModes.UNDEFINED;
|
|
}
|
|
|
|
function _fun117776() { // fn#117776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:12755, offset: 0x024c0fe4, size: 178 bytes, params: 1, frame: 16
|
|
const value4 = new (importDefault(11797) /* metro dependency 11797: VoicePanelCardLayoutManager */)(env0_0);
|
|
value4.updateState(importDefault, {windowWidth: env0_4.width, windowHeight: env0_4.height,
|
|
safeAreaLeft: env0_5.left, safeAreaRight: env0_5.right, safeAreaTop: env0_5.top, safeAreaBottom: env0_5.bottom,
|
|
controlBarSize: importAll ? CONTROLS_HEIGHT_PTT : CONTROLS_HEIGHT});
|
|
return value4;
|
|
}
|
|
|
|
function _fun117777() { // fn#117777, offset: 0x024c1096, size: 11 bytes, params: 1, frame: 1
|
|
return _fun117778;
|
|
}
|
|
|
|
function _fun117780() { // fn#117780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:13976, offset: 0x024c1412, size: 60 bytes, params: 1, frame: 13
|
|
if (env0_5.current !== -1) {
|
|
global.clearTimeout(env0_5.current);
|
|
env0_5.current = -1;
|
|
}
|
|
}
|
|
|
|
function _fun117781() { // fn#117781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14059, offset: 0x024c144e, size: 74 bytes, params: 1, frame: 14
|
|
var environment;
|
|
var binding;
|
|
var setTimeout;
|
|
env0_6();
|
|
if (env0_5.current === -1) {
|
|
binding = env0_5;
|
|
setTimeout = global.setTimeout;
|
|
value = environment.__proto__.__proto__;
|
|
binding.current = setTimeout(_fun117782, CONTROLS_HIDE_TIMEOUT);
|
|
}
|
|
}
|
|
|
|
function _fun117783() { // fn#117783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14246, offset: 0x024c152c, size: 85 bytes, params: 1, frame: 14
|
|
var environment;
|
|
const closure = _setControlsMode;
|
|
const value = environment.__proto__.__proto__;
|
|
const env0_1 = (importDefault(22) /* metro dependency 22 */).debounce(closure, 200);
|
|
return {cancelControlsDebounce: cancelControlsDebounce, setControlsMode: setControlsMode_117786};
|
|
}
|
|
|
|
function _fun117787(a0) { // fn#117787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14620, offset: 0x024c162a, size: 78 bytes, params: 2, frame: 13
|
|
var environment;
|
|
let value = a0;
|
|
if (value == null) {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(491) /* metro dependency 491 */;
|
|
value = value.v4();
|
|
}
|
|
return {lock: lock, unlock: unlock};
|
|
}
|
|
|
|
function _fun117790() { // fn#117790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14933, offset: 0x024c1798, size: 65 bytes, params: 1, frame: 13
|
|
let value = a0;
|
|
const debounce = (value !== undefined ? value : {debounce: false}).debounce;
|
|
const setControlsModeBinding = setControlsMode;
|
|
value = environment.__proto__.__proto__;
|
|
const HIDDEN = VoicePanelControlsModes.HIDDEN;
|
|
setControlsModeBinding({mode: HIDDEN, debounce: debounce});
|
|
}
|
|
|
|
function _fun117791() { // fn#117791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:15018, offset: 0x024c17d9, size: 86 bytes, params: 1, frame: 14
|
|
const value = a0;
|
|
let debounce = (value !== undefined ? value : {}).debounce;
|
|
debounce = !(debounce === undefined) && debounce;
|
|
const setControlsModeBinding = setControlsMode;
|
|
const binding = env0_4;
|
|
const get = binding.get;
|
|
return setControlsModeBinding({mode: Reflect.apply(get, binding,
|
|
[]).returnMode ?? VoicePanelControlsModes.FLOATING_DEFAULT, debounce: debounce});
|
|
}
|
|
|
|
function useControlsStateR(a0) { // fn#117793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:15259, owner: VoicePanelController.useControlsState.r, offset: 0x024c182f, size: 112 bytes, params: 2, frame: 13
|
|
let value = environment.__proto__.__proto__;
|
|
const PANEL = VoicePanelModes.PANEL;
|
|
if (a0 === PANEL) {
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
value.runOnJS(env0_7)();
|
|
} else {
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
value.runOnJS(env0_6)();
|
|
}
|
|
}
|
|
|
|
function _fun117794() { // fn#117794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:15502, offset: 0x024c189f, size: 79 bytes, params: 1, frame: 17
|
|
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env0_4,
|
|
{height: importAll && require ? CONTROLS_HEIGHT_PTT : CONTROLS_HEIGHT, pushToTalk: importAll});
|
|
}
|
|
|
|
function useControlsStateL(a0) { // fn#117796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:15683, owner: VoicePanelController.useControlsState.l, offset: 0x024c18ee, size: 78 bytes, params: 2, frame: 17
|
|
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env0_4,
|
|
{height: importAll && a0 ? CONTROLS_HEIGHT_PTT : CONTROLS_HEIGHT, pushToTalk: importAll});
|
|
}
|
|
|
|
function _fun117797() { // fn#117797, offset: 0x024c193c, size: 11 bytes, params: 1, frame: 1
|
|
return _fun117798;
|
|
}
|
|
|
|
function _fun117799() { // fn#117799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:15965, offset: 0x024c195e, size: 75 bytes, params: 1, frame: 15
|
|
const closure = function() {
|
|
setControlsMode({mode: VoicePanelControlsModes.FLOATING_DEFAULT});
|
|
};
|
|
let ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
const subscribe = ComponentDispatch.subscribe;
|
|
let VOICE_PANEL_TIV_CLOSE = ComponentActions.VOICE_PANEL_TIV_CLOSE;
|
|
Reflect.apply(subscribe, ComponentDispatch, [VOICE_PANEL_TIV_CLOSE, closure]);
|
|
return function() {
|
|
var ComponentDispatch = require(dependencyMap[42]).ComponentDispatch;
|
|
var VOICE_PANEL_TIV_CLOSE = ComponentActions.VOICE_PANEL_TIV_CLOSE;
|
|
ComponentDispatch.unsubscribe(VOICE_PANEL_TIV_CLOSE, closeTiV);
|
|
};
|
|
}
|
|
|
|
function _fun117803() { // fn#117803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:16587, offset: 0x024c1ae9, size: 86 bytes, params: 1, frame: 13
|
|
var connectedBinding;
|
|
mode.set(env0_7);
|
|
const transitionStateBinding = transitionState;
|
|
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
|
const YEETED = TransitionStates.YEETED;
|
|
if (transitionStateBinding !== YEETED) {
|
|
connectedBinding = connected;
|
|
connectedBinding.set(isConnected);
|
|
}
|
|
}
|
|
|
|
function _fun117804() { // fn#117804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:16673, offset: 0x024c1b3f, size: 176 bytes, params: 1, frame: 15
|
|
var r3;
|
|
var r0;
|
|
var connectedBinding;
|
|
var state;
|
|
var value5;
|
|
const controlsSpecsBinding = controlsSpecs;
|
|
const get = controlsSpecsBinding.get;
|
|
const mode2 = Reflect.apply(get, controlsSpecsBinding, []).mode;
|
|
const DRAWER = VoicePanelControlsModes.DRAWER;
|
|
if (mode2 === DRAWER) {
|
|
setControlsMode({mode: VoicePanelControlsModes.FLOATING_DEFAULT});
|
|
r0 = true;
|
|
} else {
|
|
connectedBinding = connected;
|
|
if (connectedBinding.get()) {
|
|
value5 = mode.get() === VoicePanelModes.PANEL;
|
|
if (value5) {
|
|
env0_8(VoicePanelModes.PIP);
|
|
r3 = true;
|
|
} else {
|
|
r3 = value5;
|
|
}
|
|
r0 = r3;
|
|
} else {
|
|
state = VoicePanelStore.getState();
|
|
state.closeChannel(channelId);
|
|
r0 = true;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun117807(a0) { // fn#117807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:17209, offset: 0x024c1d61, size: 112 bytes, params: 2, frame: 16
|
|
var r0;
|
|
let value = a0 == null;
|
|
if (value) {
|
|
r0 = value;
|
|
} else {
|
|
value = environment.__proto__.__proto__;
|
|
value = require(15433) /* metro dependency 15433: useIsVoicePanelParticipantFocusable */;
|
|
value = value.isVoicePanelParticipantFocusable(guildId, channelId, a0);
|
|
r0 = value;
|
|
}
|
|
if (r0) {
|
|
value = environment.__proto__.__proto__;
|
|
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
|
|
value.selectParticipant(channelId, a0);
|
|
}
|
|
}
|
|
|
|
function _fun117808() { // fn#117808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:17396, offset: 0x024c1dd1, size: 141 bytes, params: 1, frame: 18
|
|
var r3;
|
|
var object2;
|
|
const selectedParticipantIdBinding = selectedParticipantId;
|
|
const value2 = null;
|
|
if (value2 != selectedParticipantIdBinding) {
|
|
object2 = {};
|
|
object2.id = selectedParticipantId;
|
|
copyDataProperties(object2, env0_6, undefined);
|
|
r3 = object2;
|
|
} else {
|
|
r3 = value2;
|
|
}
|
|
const value4 = undefined;
|
|
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
const cheapWorkletShallowEqual = cheapWorkletShallowEqualModule.cheapWorkletShallowEqual;
|
|
const r4 = value2 != r3 ? r3 : value4;
|
|
const current = env0_5.current;
|
|
if (!Reflect.apply(cheapWorkletShallowEqual, cheapWorkletShallowEqualModule, [r4,
|
|
value2 != current ? current : value4])) {
|
|
env0_5.current = r3;
|
|
focused.set(r3);
|
|
}
|
|
return value4;
|
|
}
|
|
|
|
function _fun117809() { // fn#117809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:17593, offset: 0x024c1e5e, size: 35 bytes, params: 1, frame: 11
|
|
if (selectedParticipantId != null) {
|
|
if (!env0_7) {
|
|
env0_4(null);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun117810() { // fn#117810, offset: 0x024c1e81, size: 11 bytes, params: 1, frame: 1
|
|
return _fun117811;
|
|
}
|
|
|
|
function useKeyboardDismissHandlerN(a0, a1) { // fn#117816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:18437, owner: VoicePanelController.useKeyboardDismissHandler.n, offset: 0x024c206e, size: 207 bytes, params: 3, frame: 18
|
|
var value4;
|
|
let value = a1;
|
|
const value3 = undefined;
|
|
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
const cheapWorkletArrayShallowEqual = cheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual;
|
|
let r2 = value ?? value3;
|
|
if (!Reflect.apply(cheapWorkletArrayShallowEqual, cheapWorkletShallowEqualModule, [a0, r2])) {
|
|
value4 = env2_3(a0, 2);
|
|
r2 = value4[1] === VoicePanelControlsModes.DRAWER && value4[0] === VoicePanelModes.PANEL;
|
|
if (r2) {
|
|
value = (value == null ? value3 : value[0]) === VoicePanelModes.PANEL;
|
|
r2 = value;
|
|
}
|
|
if (!r2) {
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
value.runOnJS((require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard)();
|
|
}
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function _fun117818() { // fn#117818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:19088, offset: 0x024c22b3, size: 167 bytes, params: 1, frame: 19
|
|
const binding = env0_6;
|
|
const set = binding.set;
|
|
const transitionStateBinding = transitionState;
|
|
Reflect.apply(set, binding, [transitionStateBinding]);
|
|
const TransitionStates = (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates;
|
|
const YEETED = TransitionStates.YEETED;
|
|
if (transitionStateBinding === YEETED) {
|
|
AppFreezeStore.getState().requestFreezeLock({lockEnabled: false, key: 'voice-panel-freeze-' + channelId});
|
|
var env0_0 = global.setTimeout(transitionCleanUp, 500);
|
|
return _fun117819;
|
|
}
|
|
}
|
|
|
|
function _fun117820() { // fn#117820, offset: 0x024c235a, size: 11 bytes, params: 1, frame: 1
|
|
return _fun117821;
|
|
}
|
|
|
|
function useTransitionStateH() { // fn#117822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:19435, owner: VoicePanelController.useTransitionState.h, offset: 0x024c23b1, size: 60 bytes, params: 1, frame: 11
|
|
const connectedBinding = connected;
|
|
let get = connectedBinding.get;
|
|
const items2 = [Reflect.apply(get, connectedBinding, [])];
|
|
const modeBinding = mode;
|
|
get = modeBinding.get;
|
|
items2[1] = Reflect.apply(get, modeBinding, []);
|
|
const binding = env0_6;
|
|
get = binding.get;
|
|
items2[2] = Reflect.apply(get, binding, []);
|
|
return items2;
|
|
}
|
|
|
|
function useTransitionStateU(a0, a1) { // fn#117823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:19573, owner: VoicePanelController.useTransitionState.u, offset: 0x024c23ed, size: 449 bytes, params: 3, frame: 21
|
|
var r5;
|
|
var r4;
|
|
var value4;
|
|
var property;
|
|
var property2;
|
|
let value = a1;
|
|
const value3 = undefined;
|
|
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
if (!cheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
|
|
value4 = env2_3(a0, 3);
|
|
property = value4[0];
|
|
property2 = value4[1];
|
|
if (value4[2] === (require(4508) /* metro dependency 4508: TransitionGroup */).TransitionStates.YEETED) {
|
|
if (property2 !== VoicePanelModes.DISMISSED) {
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
value = value.runOnJS(setMode);
|
|
value(VoicePanelModes.DISMISSED);
|
|
}
|
|
} else if (property2 === VoicePanelModes.DISMISSED) {
|
|
r5 = value == null ? value3 : value[1];
|
|
r5 = r5 ?? VoicePanelModes.PANEL;
|
|
r4 = (VoicePanelModes.PANEL === r5 || VoicePanelModes.PIP === r5) && property ? r5 : VoicePanelModes.PANEL;
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
value.runOnJS(setMode)(r4);
|
|
} else {
|
|
if (property) {
|
|
r5 = property;
|
|
} else {
|
|
value = (value == null ? value3 : value[0]) !== true;
|
|
r5 = value;
|
|
}
|
|
r5 = !r5 ? property2 !== VoicePanelModes.PIP : r5;
|
|
if (!r5) {
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
value = value.runOnJS(setMode);
|
|
value(VoicePanelModes.PANEL);
|
|
}
|
|
}
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function _fun117825() { // fn#117825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:20662, offset: 0x024c2624, size: 177 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__.__proto__;
|
|
const rTCConnection = RTCConnectionStore.getRTCConnection();
|
|
if (rTCConnection != null && RTCConnectionStore.getChannelId() === channelId) {
|
|
if (env0_2.current === VoicePanelModes.PIP) {
|
|
if (env0_2.current === VoicePanelModes.PIP && selectedMode !== VoicePanelModes.PIP) {
|
|
rTCConnection.setPipOpen(false);
|
|
}
|
|
} else if (selectedMode !== VoicePanelModes.PIP) {
|
|
if (env0_2.current === VoicePanelModes.PIP && selectedMode !== VoicePanelModes.PIP) {
|
|
rTCConnection.setPipOpen(false);
|
|
}
|
|
} else {
|
|
rTCConnection.setPipOpen(true);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun117828({focusedId, pipParticipantId}) { // fn#117828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:21035, offset: 0x024c2800, size: 438 bytes, params: 2, frame: 20
|
|
var isVideoEnabled2;
|
|
var defaultImport;
|
|
var open;
|
|
var object2;
|
|
var intl;
|
|
const value = environment.__proto__.__proto__;
|
|
const shouldReactToSeriousThermalStateWhenActivityFocused2 = ChannelCallLifecycleStore.shouldReactToSeriousThermalStateWhenActivityFocused();
|
|
const value2 = ChannelCallLifecycleStore.consumedRequestToRespondToSeriousThermalState();
|
|
const r5 = focusedId != null && isActivityParticipant(ChannelRTCStore.getParticipant(channelId, focusedId));
|
|
const r6 = pipParticipantId != null ? ChannelRTCStore.getParticipant(channelId, pipParticipantId) : undefined;
|
|
if (r5) {
|
|
if (shouldReactToSeriousThermalStateWhenActivityFocused2) {
|
|
if (!value2) {
|
|
isVideoEnabled2 = MediaEngineStore.isVideoEnabled();
|
|
if (isVideoEnabled2 || r6?.streamId != null && (r6 == null || r6.voiceState == null ? undefined : r6.voiceState.selfVideo) === true) {
|
|
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
|
open = defaultImport.open;
|
|
object2 = {'key': 'EMBEDDED_ACTIVITIES_VIDEO_DISABLED_FOR_THERMAL_STATE', 'icon': null,
|
|
'content': null,
|
|
'disableAnimations': true, 'toastDurationMs': 3000};
|
|
object2.icon = importDefault(15408) /* metro dependency 15408 */;
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.O2IlPT);
|
|
Reflect.apply(open, defaultImport, [object2]);
|
|
(require(15409) /* metro dependency 15409: trackActivityThermalStateNoticeShown */).trackActivityThermalStateNoticeShown();
|
|
}
|
|
if (isVideoEnabled2) {
|
|
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).setVideoEnabled(false);
|
|
}
|
|
(require(7860) /* metro dependency 7860: EmbeddedActivitiesActionCreators */).consumeRequestToReactToSeriousThermalState();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun117829() { // fn#117829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:21751, offset: 0x024c29b6, size: 138 bytes, params: 1, frame: 15
|
|
var environment;
|
|
const value = environment.__proto__.__proto__;
|
|
const BatchedStoreListener = (require(566) /* metro dependency 566: flux */).BatchedStoreListener;
|
|
const batchedStoreListener = new BatchedStoreListener([ChannelCallLifecycleStore, ChannelRTCStore], _fun117830);
|
|
batchedStoreListener.attach('thermal-state-reactions-' + channelId);
|
|
return _fun117831;
|
|
}
|
|
|
|
function useHandleThermalStateL(a0, a1) { // fn#117833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:22116, owner: VoicePanelController.useHandleThermalState.l, offset: 0x024c2aaf, size: 142 bytes, params: 3, frame: 17
|
|
var property;
|
|
var property2;
|
|
let value = a1;
|
|
const value3 = undefined;
|
|
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
if (!cheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
|
|
value = env2_3(a0, 2);
|
|
property = value[0];
|
|
property2 = value[1];
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
value = value.runOnJS(env0_4);
|
|
value({focusedId: property, pipParticipantId: property2});
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function _fun117835({focusedParticipantId, voicePanelMode, connectedValue}) { // fn#117835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:22615, offset: 0x024c2c41, size: 125 bytes, params: 2, frame: 16
|
|
var r0;
|
|
var r2;
|
|
var value;
|
|
var isActivityParticipantBinding;
|
|
if (connectedValue) {
|
|
value = environment.__proto__.__proto__;
|
|
value = voicePanelMode === VoicePanelModes.PANEL;
|
|
r0 = value;
|
|
} else {
|
|
r0 = connectedValue;
|
|
}
|
|
value = focusedParticipantId != null;
|
|
if (value) {
|
|
value = environment.__proto__.__proto__;
|
|
isActivityParticipantBinding = isActivityParticipant;
|
|
value = ChannelRTCStore.getParticipant(channelId, focusedParticipantId);
|
|
value = isActivityParticipantBinding(value);
|
|
r2 = value;
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
r2 = r2 && r0;
|
|
value = environment.__proto__.__proto__;
|
|
VoicePanelStore.getState().setIsActivityFocused(r2);
|
|
}
|
|
|
|
function useActivityFocusedL(a0, a1) { // fn#117837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:22976, owner: VoicePanelController.useActivityFocused.l, offset: 0x024c2d0a, size: 154 bytes, params: 3, frame: 17
|
|
var property;
|
|
var property2;
|
|
var property3;
|
|
let value = a1;
|
|
const value3 = undefined;
|
|
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
if (!cheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
|
|
value = env2_3(a0, 3);
|
|
property = value[0];
|
|
property2 = value[1];
|
|
property3 = value[2];
|
|
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
value = value.runOnJS(env0_4);
|
|
value({focusedParticipantId: property, voicePanelMode: property2, connectedValue: property3});
|
|
}
|
|
return value3;
|
|
}
|
|
|
|
function _fun117842() { // fn#117842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:23800, offset: 0x024c2ee7, size: 230 bytes, params: 1, frame: 17
|
|
var value3;
|
|
var value4;
|
|
var open;
|
|
var object2;
|
|
var intl;
|
|
var value;
|
|
if (speakingWhileMuted && enableMuteWarning) {
|
|
value3 = global.performance.now() - env0_2.current;
|
|
value4 = environment.__proto__.__proto__;
|
|
if (!(value3 < env2_32)) {
|
|
env0_2.current = global.performance.now();
|
|
showControls();
|
|
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
|
open = value.open;
|
|
object2 = {key: 'SPEAKING_WHILE_MUTED', icon: importDefault(10696) /* metro dependency 10696 */};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['29gnR4']);
|
|
object2.toastDurationMs = 3000;
|
|
Reflect.apply(open, value, [object2]);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun117845() { // fn#117845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:24580, offset: 0x024c3106, size: 225 bytes, params: 1, frame: 16
|
|
var selectedModeBinding;
|
|
var value2;
|
|
var manualFocusedItemBinding;
|
|
var moduleValue;
|
|
var getEmbeddedActivityParticipantId;
|
|
var object2;
|
|
if (!isNonVoiceEmbeddedActivityInPanelMode) {
|
|
selectedModeBinding = selectedMode;
|
|
value2 = environment.__proto__.__proto__;
|
|
if (selectedModeBinding !== VoicePanelModes.PANEL) {
|
|
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
|
|
} else if (isConnected) {
|
|
if (applicationId == null) {
|
|
(require(7717) /* metro dependency 7717: DeviceOrientation */).unlockOrientation({unlockAfterRotatingToPreviousLock: false});
|
|
} else {
|
|
manualFocusedItemBinding = manualFocusedItem;
|
|
moduleValue = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
|
|
getEmbeddedActivityParticipantId = moduleValue.getEmbeddedActivityParticipantId;
|
|
object2 = {};
|
|
object2.applicationId = applicationId;
|
|
object2.instanceId = instanceId;
|
|
if (manualFocusedItemBinding !== Reflect.apply(getEmbeddedActivityParticipantId, moduleValue,
|
|
[object2])) {
|
|
(require(7717) /* metro dependency 7717: DeviceOrientation */).unlockOrientation({unlockAfterRotatingToPreviousLock: false});
|
|
} else {
|
|
(importDefault(15362) /* metro dependency 15362: applyActivityOrientationLock */)(activityOrientationLockState);
|
|
}
|
|
}
|
|
} else {
|
|
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun117846() { // fn#117846, offset: 0x024c31e7, size: 11 bytes, params: 1, frame: 1
|
|
return _fun117847;
|
|
}
|
|
|
|
function _fun117849() { // fn#117849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:25086, offset: 0x024c3266, size: 139 bytes, params: 1, frame: 19
|
|
var defaultImport;
|
|
var track;
|
|
var VIDEO_LAYOUT_TOGGLED;
|
|
var object2;
|
|
var getAnalyticsNameForVoicePanelModeBinding;
|
|
var moduleValue;
|
|
const selectedModeBinding = selectedMode;
|
|
const DISMISSED = VoicePanelModes.DISMISSED;
|
|
if (selectedModeBinding !== DISMISSED && isConnected) {
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
track = defaultImport.track;
|
|
VIDEO_LAYOUT_TOGGLED = AnalyticEvents.VIDEO_LAYOUT_TOGGLED;
|
|
object2 = {};
|
|
getAnalyticsNameForVoicePanelModeBinding = getAnalyticsNameForVoicePanelMode;
|
|
object2.video_layout = getAnalyticsNameForVoicePanelModeBinding(selectedMode);
|
|
moduleValue = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
|
copyDataProperties(object2, moduleValue.collectVoiceAnalyticsMetadata(channelId),
|
|
getAnalyticsNameForVoicePanelModeBinding);
|
|
Reflect.apply(track, defaultImport, [VIDEO_LAYOUT_TOGGLED, object2]);
|
|
}
|
|
}
|
|
|
|
function _fun117851(a0) { // fn#117851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:25381, offset: 0x024c3387, size: 137 bytes, params: 2, frame: 15
|
|
var clearTimeout;
|
|
let binding = env0_0;
|
|
const value2 = binding.get();
|
|
const PANEL = VoicePanelModes.PANEL;
|
|
if (value2 === PANEL) {
|
|
binding = env0_2;
|
|
binding.set(a0);
|
|
if (a0 != null) {
|
|
clearTimeout = global.clearTimeout;
|
|
binding = env0_1;
|
|
clearTimeout(binding.current);
|
|
binding.current = global.setTimeout(_fun117852,
|
|
(require(15410) /* metro dependency 15410: VoicePanelFloatingCTAUtils */).FLOATING_CTA_HIDE_TIMEOUT);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun117853() { // fn#117853, offset: 0x024c3427, size: 11 bytes, params: 1, frame: 1
|
|
return _fun117854;
|
|
}
|
|
|
|
function _fun117737(a0) { // fn#117737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:5326, offset: 0x024bfa3f, size: 140 bytes, params: 2, frame: 20
|
|
const value = a0;
|
|
const {width, height} = (require(1478) /* metro dependency 1478: useWindowDimensionsNative */).getWindowDimensions();
|
|
const currentUpdatesRefBinding = currentUpdatesRef;
|
|
currentUpdatesRefBinding.current.windowState = {width: width, height: height, landscape: width > height};
|
|
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
return cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(value,
|
|
currentUpdatesRefBinding.current.windowState) ? value : currentUpdatesRef.current.windowState;
|
|
}
|
|
|
|
function _fun117741() { // fn#117741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:5927, offset: 0x024bfbce, size: 41 bytes, params: 1, frame: 13
|
|
env2_6(_fun117742);
|
|
env2_8(_fun117743);
|
|
}
|
|
|
|
function _fun117755() { // fn#117755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:8245, offset: 0x024c0180, size: 232 bytes, params: 1, frame: 18
|
|
var value6;
|
|
var value8;
|
|
var defaultImport;
|
|
const windowDimensions = (require(1478) /* metro dependency 1478: useWindowDimensionsNative */).getWindowDimensions();
|
|
const width2 = windowDimensions.width;
|
|
const height2 = windowDimensions.height;
|
|
if (width === width2 && height === height2) {
|
|
value6 = environment.__proto__.__proto__;
|
|
if (layoutManager.checkDimensionsMismatch(width2, height2) != null) {
|
|
value8 = environment.__proto__;
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport.track(AnalyticEvents.VOICE_PANEL_LAYOUT_DESYNC, {layout_width: env0_2.staleWidth,
|
|
layout_height: env0_2.staleHeight, window_width: width, window_height: height,
|
|
was_dirty: env0_2.wasDirty});
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun117768() { // fn#117768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:11077, offset: 0x024c0a9f, size: 88 bytes, params: 1, frame: 15
|
|
var r2;
|
|
var value5;
|
|
var add;
|
|
var id;
|
|
var value6;
|
|
let binding = env1_2;
|
|
binding.clear();
|
|
const value3 = _createForOfIteratorHelperLoose_117730(env1_0);
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
if (!done) {
|
|
for (r2 = value4; true; r2 = value6) {
|
|
value5 = r2.value;
|
|
binding = env1_2;
|
|
add = binding.add;
|
|
id = value5.id;
|
|
Reflect.apply(add, binding, [id]);
|
|
value6 = value3();
|
|
done = value6.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun117769() { // fn#117769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:11195, offset: 0x024c0af7, size: 31 bytes, params: 1, frame: 10
|
|
if (env0_0 != null) {
|
|
env0_0.cancel();
|
|
}
|
|
}
|
|
|
|
function onChange_117773() { // fn#117773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:12285, offset: 0x024c0f52, size: 34 bytes, params: 1, frame: 11
|
|
const useReducedMotion = AccessibilityStore.useReducedMotion;
|
|
env1_7.set(useReducedMotion);
|
|
}
|
|
|
|
function _fun117778() { // fn#117778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:13003, offset: 0x024c10a1, size: 19 bytes, params: 1, frame: 9
|
|
return env1_8.cleanUp();
|
|
}
|
|
|
|
function _fun117782() { // fn#117782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14107, offset: 0x024c1498, size: 148 bytes, params: 1, frame: 15
|
|
env1_6();
|
|
let binding = env1_0;
|
|
const value2 = binding.get();
|
|
const PANEL = VoicePanelModes.PANEL;
|
|
if (value2 === PANEL) {
|
|
binding = env1_4;
|
|
if (!(binding.get().mode !== VoicePanelControlsModes.FLOATING_DEFAULT || env1_4.get().locked)) {
|
|
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_4,
|
|
{mode: VoicePanelControlsModes.HIDDEN});
|
|
}
|
|
}
|
|
}
|
|
|
|
function _setControlsMode(a0, a1) { // fn#117784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14272, offset: 0x024c1581, size: 65 bytes, params: 3, frame: 15
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_4, {mode: a0,
|
|
returnMode: a1});
|
|
env1_7();
|
|
}
|
|
|
|
function cancelControlsDebounce() { // fn#117785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14391, offset: 0x024c15c2, size: 19 bytes, params: 1, frame: 9
|
|
return env0_1.cancel();
|
|
}
|
|
|
|
function setControlsMode_117786({mode, debounce, returnMode = VoicePanelControlsModes.FLOATING_DEFAULT}) { // fn#117786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14422, offset: 0x024c15d5, size: 85 bytes, params: 2, frame: 15
|
|
debounce = !(debounce === undefined) && debounce;
|
|
const binding = env0_1;
|
|
if (debounce) {
|
|
binding(mode, returnMode);
|
|
} else {
|
|
binding.cancel();
|
|
_setControlsMode(mode, returnMode);
|
|
}
|
|
}
|
|
|
|
function lock(a0) { // fn#117788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14662, offset: 0x024c1678, size: 144 bytes, params: 2, frame: 15
|
|
var object2;
|
|
var value3;
|
|
let current = env1_10.current;
|
|
if (!current.has(env0_0)) {
|
|
env1_6();
|
|
current = env1_10.current;
|
|
current.add(env0_0);
|
|
object2 = {};
|
|
current = env1_10.current;
|
|
object2.locked = current.size > 0;
|
|
if (a0 != null) {
|
|
object2.mode = a0;
|
|
}
|
|
value3 = environment.__proto__.__proto__.__proto__;
|
|
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_4, object2);
|
|
}
|
|
}
|
|
|
|
function unlock(a0) { // fn#117789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:14781, offset: 0x024c1708, size: 144 bytes, params: 2, frame: 15
|
|
var object2;
|
|
var value3;
|
|
let current = env1_10.current;
|
|
if (current.has(env0_0)) {
|
|
current = env1_10.current;
|
|
current.delete(env0_0);
|
|
object2 = {};
|
|
current = env1_10.current;
|
|
object2.locked = current.size > 0;
|
|
if (a0 != null) {
|
|
object2.mode = a0;
|
|
}
|
|
value3 = environment.__proto__.__proto__.__proto__;
|
|
(importDefault(11282) /* metro dependency 11282: updateSharedValueIfChangedNative */)(env1_4, object2);
|
|
env1_7();
|
|
}
|
|
}
|
|
|
|
function _fun117798() { // fn#117798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:15930, offset: 0x024c1947, size: 23 bytes, params: 1, frame: 10
|
|
cancelControlsDebounce();
|
|
env1_6();
|
|
}
|
|
|
|
function _fun117811() { // fn#117811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:17648, offset: 0x024c1e8c, size: 18 bytes, params: 1, frame: 11
|
|
return env1_4(null);
|
|
}
|
|
|
|
function _fun117821() { // fn#117821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:19310, offset: 0x024c2365, size: 76 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
AppFreezeStore.getState().requestFreezeLock({lockEnabled: false, key: 'voice-panel-freeze-' + channelId});
|
|
}
|
|
|
|
function _fun117830() { // fn#117830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:21805, offset: 0x024c2a40, size: 56 bytes, params: 1, frame: 14
|
|
const binding = env1_4;
|
|
const manuallyFocusedIdBinding = manuallyFocusedId;
|
|
const value2 = undefined;
|
|
binding({focusedId: manuallyFocusedIdBinding != null ? manuallyFocusedId : value2, pipParticipantId: pipState.id});
|
|
return value2;
|
|
}
|
|
|
|
function _fun117847() { // fn#117847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:24853, offset: 0x024c31f2, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return (require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
|
|
}
|
|
|
|
function _fun117852() { // fn#117852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:25470, offset: 0x024c3410, size: 23 bytes, params: 1, frame: 11
|
|
env1_2.set(null);
|
|
}
|
|
|
|
function _fun117742(a0) { // fn#117742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:5935, offset: 0x024bfbf7, size: 78 bytes, params: 2, frame: 14
|
|
const value = a0;
|
|
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
return cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(env3_10.current.windowState,
|
|
value) ? value : env3_10.current.windowState;
|
|
}
|
|
|
|
function _fun117743(a0) { // fn#117743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15602:6027, offset: 0x024bfc45, size: 78 bytes, params: 2, frame: 14
|
|
const value = a0;
|
|
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
|
return cheapWorkletShallowEqualModule.cheapWorkletShallowEqual(env3_10.current.safeAreaState,
|
|
value) ? value : env3_10.current.safeAreaState;
|
|
}
|
|
|