111 lines
5.0 KiB
React
111 lines
5.0 KiB
React
/* Metro module 426; source: unknown; dependencies: [57, 31, 33, 48, 427, 253] */
|
|
function _fun5943(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:467:6, offset: 0x00ceb0fa, size: 186 bytes, params: 8, frame: 20
|
|
const closure = createVirtualView;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const value = require(31) /* metro dependency 31 */;
|
|
const env0_4 = value.startTransition;
|
|
const env0_5 = value.useState;
|
|
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
|
exports.default = closure(null);
|
|
exports.createHiddenVirtualView = function(a0) {
|
|
return createVirtualView(a0);
|
|
};
|
|
exports._logs = {};
|
|
}
|
|
|
|
function createVirtualView(a0) { // fn#5944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:467:180, offset: 0x00ceb1b4, size: 46 bytes, params: 2, frame: 12
|
|
const env0_0 = a0;
|
|
const result = a0 !== env0_7;
|
|
return env0_3.forwardRef(VirtualView_withRef);
|
|
}
|
|
|
|
function VirtualView_withRef({children, nativeID, style, onModeChange}, a1) { // fn#5945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:467:243, owner: createVirtualView.VirtualView_withRef, offset: 0x00ceb1e2, size: 279 bytes, params: 3, frame: 27
|
|
var environment;
|
|
var r7;
|
|
var compose;
|
|
var object;
|
|
let value = environment.__proto__;
|
|
const [property, env0_1] = env1_2(useState(onModeChange), 2);
|
|
const value5 = property !== env1_7;
|
|
const defaultImport = importDefault(427) /* metro dependency 427 */;
|
|
const defaultImportProps = {initialHidden: result, nativeID: nativeID, ref: a1};
|
|
const VirtualViewRenderState = global.VirtualViewRenderState;
|
|
defaultImportProps.renderState = value5 ? VirtualViewRenderState.None : VirtualViewRenderState.Rendered;
|
|
if (value5) {
|
|
value = importDefault(253) /* metro dependency 253 */;
|
|
compose = value.compose;
|
|
object = {};
|
|
object.height = global.Math.abs((importDefault(48) /* metro dependency 48 */)(property));
|
|
value = Reflect.apply(compose, value, [style, object]);
|
|
r7 = value;
|
|
} else {
|
|
r7 = style;
|
|
}
|
|
defaultImportProps.style = r7;
|
|
defaultImportProps.onModeChange = onModeChange;
|
|
return ((Component) => <Component {...defaultImportProps}>{value5 ? null : children}</Component>)(defaultImport);
|
|
}
|
|
|
|
function onModeChange(a0) { // fn#5946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:467:569, owner: createVirtualView.VirtualView_withRef.onModeChange, offset: 0x00ceb2f9, size: 300 bytes, params: 2, frame: 22
|
|
var r6;
|
|
var bind;
|
|
var object2;
|
|
var height;
|
|
const defaultImport = importDefault(48) /* metro dependency 48 */;
|
|
let VirtualViewMode = global.VirtualViewMode;
|
|
const cast = VirtualViewMode.cast;
|
|
let nativeEvent = a0.nativeEvent;
|
|
const value2 = defaultImport(Reflect.apply(cast, VirtualViewMode, [nativeEvent.mode]));
|
|
let onModeChangeBinding = onModeChange;
|
|
const value4 = null;
|
|
if (value4 == onModeChangeBinding) {
|
|
r6 = value4;
|
|
} else {
|
|
onModeChangeBinding = onModeChange;
|
|
bind = onModeChangeBinding.bind;
|
|
object2 = {mode: value2};
|
|
object2.target = a0.currentTarget;
|
|
nativeEvent = a0.nativeEvent;
|
|
object2.targetRect = nativeEvent.targetRect;
|
|
nativeEvent = a0.nativeEvent;
|
|
object2.thresholdRect = nativeEvent.thresholdRect;
|
|
r6 = Reflect.apply(bind, onModeChangeBinding, [value4, object2]);
|
|
}
|
|
VirtualViewMode = global.VirtualViewMode;
|
|
const Visible = VirtualViewMode.Visible;
|
|
if (value2 !== Visible) {
|
|
if (value2 !== global.VirtualViewMode.Prerender) {
|
|
if (value2 !== global.VirtualViewMode.Hidden) {
|
|
throw global.Error("Match: No case succesfully matched. Make exhaustive or add a wildcard case using '_'. Argument: " + value2);
|
|
}
|
|
height = a0.nativeEvent.targetRect.height;
|
|
startTransition(_fun5947);
|
|
return undefined;
|
|
}
|
|
startTransition(_fun5948);
|
|
} else {
|
|
env0_1(env2_7);
|
|
if (value4 != r6) {
|
|
r6();
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun5947() { // fn#5947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:467:1042, offset: 0x00ceb425, size: 41 bytes, params: 1, frame: 12
|
|
env1_1(height);
|
|
if (env0_0 != null) {
|
|
env0_0();
|
|
}
|
|
}
|
|
|
|
function _fun5948() { // fn#5948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:467:1082, offset: 0x00ceb44e, size: 44 bytes, params: 1, frame: 12
|
|
env1_1(env3_7);
|
|
if (env0_0 != null) {
|
|
env0_0();
|
|
}
|
|
}
|
|
|