246 lines
13 KiB
React
246 lines
13 KiB
React
/* Metro module 293; source: unknown; dependencies: [29, 6, 7, 15, 17, 18, 31, 33, 294, 112, 295, 300, 48, 253] */
|
|
function _fun4490(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#4490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:6, offset: 0x00cc43b1, size: 418 bytes, params: 8, frame: 22
|
|
var object4;
|
|
const env0_0 = require;
|
|
const env0_3 = ['drawerBackgroundColor', 'onDrawerStateChanged', 'renderNavigationView', 'onDrawerOpen',
|
|
'onDrawerClose'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
|
const env0_5 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_6 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_7 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_8 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_9 = importDefault(18) /* metro dependency 18 */;
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const env0_10 = (require(31) /* metro dependency 31 */).createRef;
|
|
const value2 = require(33) /* metro dependency 33 */;
|
|
const env0_11 = value2.jsx;
|
|
const env0_12 = value2.jsxs;
|
|
const env0_13 = ['Idle', 'Dragging', 'Settling'];
|
|
const Component = value.Component;
|
|
value = _fun4494(Component);
|
|
const value3 = importDefault(253) /* metro dependency 253 */;
|
|
const create = value3.create;
|
|
object4 = {base: {'flex': 1, 'elevation': 16}, mainSubview: {'position': 'absolute', 'top': 0, 'left': 0,
|
|
'right': 0, 'bottom': 0}, drawerSubview: {'position': 'absolute', 'top': 0, 'bottom': 0}};
|
|
const object5 = {};
|
|
object5.height = (importDefault(295) /* metro dependency 295 */).currentHeight;
|
|
object4.statusBar = object5;
|
|
const object6 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null,
|
|
'backgroundColor': 'rgba(0, 0, 0, 0.251)'};
|
|
object6.height = (importDefault(295) /* metro dependency 295 */).currentHeight;
|
|
object4.drawerStatusBar = object6;
|
|
const env0_14 = Reflect.apply(create, value3, [object4]);
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_4491() { // fn#4491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:324, offset: 0x00cc4553, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_4491_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun4494(a0) { // fn#4494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:582, offset: 0x00cc45b1, size: 280 bytes, params: 2, frame: 17
|
|
const closure = DrawerLayoutAndroid;
|
|
env0_9(closure, a0);
|
|
return env0_6(closure, [{key: 'render', value: value_4500}, {key: 'openDrawer', value: value_4501},
|
|
{key: 'closeDrawer', value: value_4502}, {key: 'blur', value: value_4503}, {key: 'focus', value: value_4504},
|
|
{key: 'measure', value: value_4505}, {key: 'measureInWindow', value: value_4506}, {key: 'measureLayout',
|
|
value: value_4507}, {key: 'setNativeProps', value: value_4508}], [{key: 'positions', get: function() {
|
|
global.console.warn('Setting DrawerLayoutAndroid drawerPosition using `DrawerLayoutAndroid.positions` is deprecated. Instead pass the string value "left" or "right"');
|
|
return {'Left': 'left', 'Right': 'right'};
|
|
}}]);
|
|
}
|
|
|
|
function DrawerLayoutAndroid() { // fn#4495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:594, offset: 0x00cc46c9, size: 269 bytes, params: 1, frame: 21
|
|
var r4;
|
|
var r7;
|
|
var r0;
|
|
var value7;
|
|
var Reflect;
|
|
var construct;
|
|
let binding = env1_5;
|
|
binding(this, DrawerLayoutAndroid);
|
|
const length = arguments.length;
|
|
const Array = global.Array;
|
|
const array = new Array(length);
|
|
const value6 = 0;
|
|
if (value6 < length) {
|
|
r4 = value6;
|
|
reducibleLoop1: while (true) {
|
|
array[r4] = arguments[r4];
|
|
value7 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
|
if (value7 < length) {
|
|
r4 = value7;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
const value8 = [].concat(array);
|
|
const value9 = env1_8(DrawerLayoutAndroid);
|
|
binding = env1_7;
|
|
if (_isNativeReflectConstruct_4491()) {
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
reducibleJoin6: while (true) {
|
|
if (value8) {
|
|
r7 = value8;
|
|
break reducibleJoin6;
|
|
}
|
|
r7 = [];
|
|
break reducibleJoin6;
|
|
}
|
|
r0 = Reflect.apply(construct, Reflect, [value9, r7, env1_8(this).constructor]);
|
|
} else {
|
|
r0 = value9.apply(this, value8);
|
|
}
|
|
const value12 = binding(this, r0);
|
|
value12._nativeRef = createRef();
|
|
value12.state = {drawerOpened: false};
|
|
value12._onDrawerSlide = _onDrawerSlide;
|
|
value12._onDrawerOpen = _onDrawerOpen;
|
|
value12._onDrawerClose = _onDrawerClose;
|
|
value12._onDrawerStateChanged = _onDrawerStateChanged;
|
|
return value12;
|
|
}
|
|
|
|
function value_4500() { // fn#4500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:1494, offset: 0x00cc490b, size: 695 bytes, params: 1, frame: 27
|
|
const props = this.props;
|
|
const drawerBackgroundColor = props.drawerBackgroundColor;
|
|
const r11 = drawerBackgroundColor === undefined ? 'white' : drawerBackgroundColor;
|
|
props.onDrawerStateChanged;
|
|
const renderNavigationView = props.renderNavigationView;
|
|
props.onDrawerOpen;
|
|
props.onDrawerClose;
|
|
value = environment.__proto__;
|
|
const value2 = env1_4(props, env1_3);
|
|
const value3 = this.props.statusBarBackgroundColor != null;
|
|
const value8 = ((Component) => <Component style={[env1_14.drawerSubview, {width: this.props.drawerWidth,
|
|
backgroundColor: r11}]} pointerEvents={this.state.drawerOpened ? 'auto' : 'none'} collapsable={false}>{renderNavigationView()}{value3 && ((Component) => <Component style={env1_14.drawerStatusBar} />)(importDefault(112) /* metro dependency 112 */)}</Component>)(importDefault(112) /* metro dependency 112 */);
|
|
const value11 = ((Component) => <Component style={env1_14.mainSubview} collapsable={false}>{value3 && ((Component) => <Component translucent backgroundColor={this.props.statusBarBackgroundColor} />)(importDefault(295) /* metro dependency 295 */)}{value3 && ((Component) => <Component style={[env1_14.statusBar,
|
|
{backgroundColor: this.props.statusBarBackgroundColor}]} />)(importDefault(112) /* metro dependency 112 */)}{this.props.children}</Component>)(importDefault(112) /* metro dependency 112 */);
|
|
const defaultImport6 = importDefault(300) /* metro dependency 300 */;
|
|
const Object = global.Object;
|
|
return ((Component) => <Component {...Object.assign({}, value2, {ref: this._nativeRef, drawerBackgroundColor: r11,
|
|
drawerWidth: this.props.drawerWidth, drawerPosition: this.props.drawerPosition,
|
|
drawerLockMode: this.props.drawerLockMode, style: [env1_14.base, this.props.style],
|
|
onDrawerSlide: this._onDrawerSlide, onDrawerOpen: this._onDrawerOpen, onDrawerClose: this._onDrawerClose,
|
|
onDrawerStateChanged: this._onDrawerStateChanged, children: [value11, value8]})} />)(defaultImport6);
|
|
}
|
|
|
|
function value_4501() { // fn#4501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:2602, offset: 0x00cc4bc2, size: 79 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
const Commands = (require(300) /* metro dependency 300 */).Commands;
|
|
Commands.openDrawer((importDefault(48) /* metro dependency 48 */)(this._nativeRef.current));
|
|
}
|
|
|
|
function value_4502() { // fn#4502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:2715, offset: 0x00cc4c11, size: 79 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
const Commands = (require(300) /* metro dependency 300 */).Commands;
|
|
Commands.closeDrawer((importDefault(48) /* metro dependency 48 */)(this._nativeRef.current));
|
|
}
|
|
|
|
function value_4503() { // fn#4503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:2823, offset: 0x00cc4c60, size: 56 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
value = importDefault(48) /* metro dependency 48 */;
|
|
value = value(this._nativeRef.current);
|
|
value.blur();
|
|
}
|
|
|
|
function value_4504() { // fn#4504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:2901, offset: 0x00cc4c98, size: 56 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
value = importDefault(48) /* metro dependency 48 */;
|
|
value = value(this._nativeRef.current);
|
|
value.focus();
|
|
}
|
|
|
|
function value_4505(a0) { // fn#4505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:2983, offset: 0x00cc4cd0, size: 60 bytes, params: 2, frame: 12
|
|
let value = environment.__proto__;
|
|
value = importDefault(48) /* metro dependency 48 */;
|
|
value = value(this._nativeRef.current);
|
|
value.measure(a0);
|
|
}
|
|
|
|
function value_4506(a0) { // fn#4506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:3079, offset: 0x00cc4d0c, size: 60 bytes, params: 2, frame: 12
|
|
let value = environment.__proto__;
|
|
value = importDefault(48) /* metro dependency 48 */;
|
|
value = value(this._nativeRef.current);
|
|
value.measureInWindow(a0);
|
|
}
|
|
|
|
function value_4507(a0, a1, a2) { // fn#4507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:3189, offset: 0x00cc4d48, size: 68 bytes, params: 4, frame: 16
|
|
let value = environment.__proto__;
|
|
value = importDefault(48) /* metro dependency 48 */;
|
|
value = value(this._nativeRef.current);
|
|
value.measureLayout(a0, a1, a2);
|
|
}
|
|
|
|
function value_4508(a0) { // fn#4508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:3304, offset: 0x00cc4d8c, size: 60 bytes, params: 2, frame: 12
|
|
let value = environment.__proto__;
|
|
value = importDefault(48) /* metro dependency 48 */;
|
|
value = value(this._nativeRef.current);
|
|
value.setNativeProps(a0);
|
|
}
|
|
|
|
function _onDrawerSlide(a0) { // fn#4496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:970, owner: DrawerLayoutAndroid._onDrawerSlide, offset: 0x00cc47d6, size: 102 bytes, params: 2, frame: 12
|
|
if (env0_0.props.onDrawerSlide) {
|
|
env0_0.props.onDrawerSlide(a0);
|
|
}
|
|
if (env0_0.props.keyboardDismissMode === 'on-drag') {
|
|
value = environment.__proto__.__proto__;
|
|
(importDefault(294) /* metro dependency 294 */)();
|
|
}
|
|
}
|
|
|
|
function _onDrawerOpen() { // fn#4497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:1098, owner: DrawerLayoutAndroid._onDrawerOpen, offset: 0x00cc483c, size: 68 bytes, params: 1, frame: 13
|
|
env0_0.setState({drawerOpened: true});
|
|
if (env0_0.props.onDrawerOpen) {
|
|
env0_0.props.onDrawerOpen();
|
|
}
|
|
}
|
|
|
|
function _onDrawerClose() { // fn#4498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:1202, owner: DrawerLayoutAndroid._onDrawerClose, offset: 0x00cc4880, size: 68 bytes, params: 1, frame: 13
|
|
env0_0.setState({drawerOpened: false});
|
|
if (env0_0.props.onDrawerClose) {
|
|
env0_0.props.onDrawerClose();
|
|
}
|
|
}
|
|
|
|
function _onDrawerStateChanged(a0) { // fn#4499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:334:1315, owner: DrawerLayoutAndroid._onDrawerStateChanged, offset: 0x00cc48c4, size: 71 bytes, params: 2, frame: 12
|
|
let props = env0_0.props;
|
|
let onDrawerStateChanged = props.onDrawerStateChanged;
|
|
if (onDrawerStateChanged) {
|
|
props = env0_0.props;
|
|
onDrawerStateChanged = props.onDrawerStateChanged;
|
|
value = environment.__proto__.__proto__;
|
|
Reflect.apply(onDrawerStateChanged, props, [env2_13[a0.nativeEvent.drawerState]]);
|
|
}
|
|
}
|
|
|