/* Metro module 6481; source: unknown; dependencies: [6482, 6374, 6375, 6396, 6398, 6399, 6401, 6483, 6442, 6455] */ function _fun51029(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:6, offset: 0x01227488, size: 208 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); importDefault(6482) /* metro dependency 6482 */; const env0_2 = importDefault(6374) /* metro dependency 6374 */; const env0_3 = importDefault(6375) /* metro dependency 6375 */; const env0_4 = importDefault(6396) /* metro dependency 6396 */; const env0_5 = importDefault(6398) /* metro dependency 6398 */; const env0_6 = importDefault(6399) /* metro dependency 6399 */; const env0_7 = importDefault(6401) /* metro dependency 6401 */; const GridLayoutProvider = (require(6455) /* metro dependency 6455 */).GridLayoutProvider; exports.default = _fun51033(GridLayoutProvider); } function _isNativeReflectConstruct_51030() { // fn#51030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:175, offset: 0x01227558, 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_51030_isNativeReflectConstruct = function() { return !!result; })(); } function _fun51033(a0) { // fn#51033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:400, offset: 0x012275b6, size: 258 bytes, params: 2, frame: 16 const closure = GridLayoutProviderWithProps; env0_7(closure, a0); return env0_3(closure, [{key: 'updateProps', value: value_51038}, {key: 'hasExpired', get: function() { return this._hasExpired; }}, {key: 'markExpired', value: function() { this._hasExpired = true; }}, {key: 'reportItemLayout', value: function(a0) { var r4; var property; var value = this.getLayoutManager(); var value2 = undefined; if (value == null) { r4 = value2; } else { value = value.getLayouts(); r4 = value[a0]; } if (r4) { r4.isOverridden = true; property = this.averageWindow; property.addValue(this.props.horizontal ? r4.width : r4.height); } return value2; }}, {key: 'averageItemSize', get: function() { return this.averageWindow.currentValue; }}, {key: 'newLayoutManager', value: value_51043}, {key: 'updateCachedDimensions', value: function(a0, a1) { var r1; var Object; var property; var length = a0.length; var value = 0; if (value < length) { for (r1 = value; true; r1 = value) { Object = global.Object; property = a0[r1]; value = a1.getStyleOverridesForIndex(r1); a0[r1] = Object.assign({}, property, value); value = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1; if (!(value < length)) { break; } } } }}, {key: 'getCleanLayoutObj', value: function() { this.layoutObject.size = undefined; this.layoutObject.span = undefined; return this.layoutObject; }}, {key: 'getAdjustedRenderWindowSize', value: value_51048}]); } function GridLayoutProviderWithProps(a0, a1, a2, a3, a4, a5) { // fn#51034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:412, offset: 0x012276b8, size: 334 bytes, params: 7, frame: 22 var environment; const env0_0 = a1; const env0_1 = a2; const env0_2 = a3; const value = environment.__proto__; env1_2(this, GridLayoutProviderWithProps); const items = [a0, _fun51035, _fun51036, _fun51037, a5]; const value3 = env1_5(GridLayoutProviderWithProps); const value6 = env1_4(this, _isNativeReflectConstruct_51030() ? global.Reflect.construct(value3, items, env1_5(this).constructor) : value3.apply(this, items)); value6.layoutObject = {span: undefined, size: undefined}; value6.renderWindowInsets = {'width': 0, 'height': 0}; value6._hasExpired = false; value6.defaultEstimatedItemSize = 100; value6.props = a4; const AverageWindow = (require(6483) /* metro dependency 6483 */).AverageWindow; value6.averageWindow = new AverageWindow(1, a4.estimatedItemSize ?? value6.defaultEstimatedItemSize); value6.renderWindowInsets = value6.getAdjustedRenderWindowSize(value6.renderWindowInsets); return value6; } function value_51038(a0) { // fn#51038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:1304, offset: 0x0122789a, size: 175 bytes, params: 2, frame: 18 let value = environment.__proto__; const applyContentContainerInsetForLayoutManager = (require(6442) /* metro dependency 6442 */).applyContentContainerInsetForLayoutManager; const contentContainerStyle = a0.contentContainerStyle; const Boolean = global.Boolean; value = Reflect.apply(applyContentContainerInsetForLayoutManager, value, [{'height': 0, 'width': 0}, contentContainerStyle, Boolean(a0.horizontal)]); let r3 = this._hasExpired || this.props.numColumns !== a0.numColumns; r3 = !r3 ? value.height !== this.renderWindowInsets.height : r3; r3 = !r3 ? value.width !== this.renderWindowInsets.width : r3; this._hasExpired = r3; this.renderWindowInsets = value; this.props = a0; return this; } function value_51043(a0, a1, a2) { // fn#51043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:2126, offset: 0x012279d7, size: 281 bytes, params: 4, frame: 21 const Math = global.Math; const max = Math.max; const Math2 = global.Math; let value = Math2.round((this.props.horizontal ? a0.width : a0.height) / (this.props.estimatedItemSize ?? this.defaultEstimatedItemSize)); value = Reflect.apply(max, Math, [3, value]); const AverageWindow = (require(6483) /* metro dependency 6483 */).AverageWindow; let numColumns = this.props.numColumns; numColumns = !numColumns ? 1 : numColumns; value = 2 * numColumns * value; let averageWindow = this.averageWindow; const currentValue = averageWindow.currentValue; const value4 = Object.create(AverageWindow.prototype, {constructor: {value: AverageWindow}}); averageWindow = new AverageWindow(value, currentValue); this.averageWindow = averageWindow instanceof Object ? averageWindow : value4; value = value_51043_superPropGet(GridLayoutProviderWithProps, 'newLayoutManager', this, 3); value = value([this.getAdjustedRenderWindowSize(a0), a1, a2]); if (a2) { this.updateCachedDimensions(a2, value); } return value; } function value_51048(a0) { // fn#51048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:3100, offset: 0x01227bc1, size: 100 bytes, params: 2, frame: 19 let value = environment.__proto__; value = require(6442) /* metro dependency 6442 */; const applyContentContainerInsetForLayoutManager = value.applyContentContainerInsetForLayoutManager; const Object = global.Object; const value2 = Object.assign({}, a0); const contentContainerStyle = this.props.contentContainerStyle; const Boolean = global.Boolean; return Reflect.apply(applyContentContainerInsetForLayoutManager, value, [value2, contentContainerStyle, Boolean(this.props.horizontal)]); } function _fun51035(a0) { // fn#51035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:684, offset: 0x01227806, size: 44 bytes, params: 2, frame: 15 return require(a0, env0_3.props, env0_3.getCleanLayoutObj()); } function _fun51036(a0) { // fn#51036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:739, offset: 0x01227832, size: 44 bytes, params: 2, frame: 15 return importDefault(a0, env0_3.props, env0_3.getCleanLayoutObj()); } function _fun51037(a0) { // fn#51037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:794, offset: 0x0122785e, size: 60 bytes, params: 2, frame: 16 return importAll(a0, env0_3.props, env0_3.getCleanLayoutObj()) ?? env0_3.averageItemSize; } function value_51043_superPropGet(a0, a1, a2, a3) { // fn#51044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6659:2437, owner: value_51043._superPropGet, offset: 0x01227af0, size: 100 bytes, params: 5, frame: 18 let value = a0; const env0_0 = a2; const binding = env2_6; value = env2_5(1 & 3 ? value.prototype : value); value = binding(value, 'newLayoutManager', a2); return 2 & 3 ? typeof value !== 'function' ? value : _fun51045 : value; }