185 lines
9.6 KiB
React
185 lines
9.6 KiB
React
/* Metro module 6434; source: unknown; dependencies: [6386, 6374, 6375, 6435] */
|
|
function _fun50483(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#50483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:6, offset: 0x0121b4e8, size: 117 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6386) /* metro dependency 6386 */;
|
|
const env0_3 = importDefault(6374) /* metro dependency 6374 */;
|
|
const env0_4 = importDefault(6375) /* metro dependency 6375 */;
|
|
exports.default = _fun50484();
|
|
}
|
|
|
|
function _fun50484() { // fn#50484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:128, offset: 0x0121b55d, size: 55 bytes, params: 1, frame: 14
|
|
return env0_4(ViewabilityManager_50485, [{key: 'shouldListenToVisibleIndices', get: function() {
|
|
return this.viewabilityHelpers.length > 0;
|
|
}}]);
|
|
}
|
|
|
|
function ViewabilityManager_50485(a0) { // fn#50485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:149, offset: 0x0121b594, size: 248 bytes, params: 2, frame: 19
|
|
var environment;
|
|
var viewabilityHelpers;
|
|
var push;
|
|
var createViewabilityHelper;
|
|
var viewabilityConfig;
|
|
const value = environment.__proto__;
|
|
env1_3(this, ViewabilityManager_50485);
|
|
this.viewabilityHelpers = [];
|
|
this.hasInteracted = false;
|
|
this.dispose = dispose_50486;
|
|
this.onVisibleIndicesChanged = onVisibleIndicesChanged_50488;
|
|
this.recordInteraction = recordInteraction_50489;
|
|
this.updateViewableItems = updateViewableItems;
|
|
this.recomputeViewableItems = recomputeViewableItems_50494;
|
|
this.createViewabilityHelper = createViewabilityHelper;
|
|
this.flashListRef = a0;
|
|
let props = a0.props;
|
|
if (props.onViewableItemsChanged !== null && a0.props.onViewableItemsChanged !== undefined) {
|
|
viewabilityHelpers = this.viewabilityHelpers;
|
|
push = viewabilityHelpers.push;
|
|
createViewabilityHelper = this.createViewabilityHelper;
|
|
props = a0.props;
|
|
viewabilityConfig = props.viewabilityConfig;
|
|
props = a0.props;
|
|
Reflect.apply(push, viewabilityHelpers, [Reflect.apply(createViewabilityHelper, this, [viewabilityConfig,
|
|
props.onViewableItemsChanged])]);
|
|
}
|
|
(a0.props.viewabilityConfigCallbackPairs ?? []).forEach(_fun50502);
|
|
}
|
|
|
|
function ViewabilityManager_50485Dispose() { // fn#50486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:282, owner: ViewabilityManager_50485.dispose, offset: 0x0121b68c, size: 34 bytes, params: 1, frame: 11
|
|
env0_0.viewabilityHelpers.forEach(function(a0) {
|
|
return a0.dispose();
|
|
});
|
|
}
|
|
|
|
function ViewabilityManager_50485OnVisibleIndicesChanged(a0) { // fn#50488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:387, owner: ViewabilityManager_50485.onVisibleIndicesChanged, offset: 0x0121b6ae, size: 25 bytes, params: 2, frame: 11
|
|
env0_0.updateViewableItems(a0);
|
|
}
|
|
|
|
function ViewabilityManager_50485RecordInteraction() { // fn#50489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:448, owner: ViewabilityManager_50485.recordInteraction, offset: 0x0121b6c7, size: 65 bytes, params: 1, frame: 12
|
|
var binding;
|
|
if (!env0_0.hasInteracted) {
|
|
binding = env0_0;
|
|
binding.hasInteracted = true;
|
|
binding.viewabilityHelpers.forEach(function(a0) {
|
|
a0.hasInteracted = true;
|
|
});
|
|
binding.updateViewableItems();
|
|
}
|
|
}
|
|
|
|
function ViewabilityManager_50485UpdateViewableItems(a0) { // fn#50491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:611, owner: ViewabilityManager_50485.updateViewableItems, offset: 0x0121b708, size: 301 bytes, params: 2, frame: 16
|
|
var r4;
|
|
var r7;
|
|
var current;
|
|
var props;
|
|
var value5;
|
|
var binding;
|
|
var bottomViewabilityInsetRef;
|
|
var topViewabilityInsetRef;
|
|
const env0_0 = a0;
|
|
let flashListRef = env0_0.flashListRef;
|
|
let recyclerlistview_unsafe = flashListRef.recyclerlistview_unsafe;
|
|
const value2 = undefined;
|
|
let r3 = recyclerlistview_unsafe == null ? value2 : recyclerlistview_unsafe.getRenderedSize();
|
|
r3 = r3 ?? env0_0.flashListRef.props.estimatedListSize;
|
|
if (value2 !== r3) {
|
|
if (env0_0.shouldListenToVisibleIndices) {
|
|
flashListRef = env0_0.flashListRef;
|
|
recyclerlistview_unsafe = flashListRef.recyclerlistview_unsafe;
|
|
r4 = recyclerlistview_unsafe == null ? value2 : recyclerlistview_unsafe.getCurrentScrollOffset();
|
|
value5 = 0;
|
|
r7 = r4 ?? value5;
|
|
binding = env0_0;
|
|
flashListRef = binding.flashListRef;
|
|
var env0_2 = r7 - flashListRef.firstItemOffset;
|
|
flashListRef = binding.flashListRef;
|
|
props = flashListRef.props;
|
|
bottomViewabilityInsetRef = props.bottomViewabilityInsetRef;
|
|
current = bottomViewabilityInsetRef == null ? value2 : bottomViewabilityInsetRef.current;
|
|
r4 = current ?? value5;
|
|
flashListRef = env0_0.flashListRef;
|
|
props = flashListRef.props;
|
|
topViewabilityInsetRef = props.topViewabilityInsetRef;
|
|
current = topViewabilityInsetRef == null ? value2 : topViewabilityInsetRef.current;
|
|
r3 = current ?? value5;
|
|
env0_0.viewabilityHelpers.forEach(_fun50492);
|
|
}
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function ViewabilityManager_50485RecomputeViewableItems() { // fn#50494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:1390, owner: ViewabilityManager_50485.recomputeViewableItems, offset: 0x0121b8bc, size: 44 bytes, params: 1, frame: 12
|
|
const binding = env0_0;
|
|
binding.viewabilityHelpers.forEach(function(a0) {
|
|
return a0.clearLastReportedViewableIndices();
|
|
});
|
|
binding.updateViewableItems();
|
|
}
|
|
|
|
function ViewabilityManager_50485CreateViewabilityHelper(a0, a1) { // fn#50496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:1544, owner: ViewabilityManager_50485.createViewabilityHelper, offset: 0x0121b8e8, size: 73 bytes, params: 3, frame: 13
|
|
var environment;
|
|
const env0_0 = a1;
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(6435) /* metro dependency 6435 */;
|
|
const value2 = Object.create(value.prototype, {constructor: {value: value}});
|
|
value = new value(a0, _fun50498);
|
|
return value instanceof Object ? value : value2;
|
|
}
|
|
|
|
function _fun50502({viewabilityConfig, onViewableItemsChanged}) { // fn#50502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:2309, offset: 0x0121ba4d, size: 54 bytes, params: 2, frame: 15
|
|
const binding = env0_0;
|
|
const viewabilityHelpers = binding.viewabilityHelpers;
|
|
viewabilityHelpers.push(binding.createViewabilityHelper(viewabilityConfig, onViewableItemsChanged));
|
|
}
|
|
|
|
function _fun50492(a0) { // fn#50492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:1162, offset: 0x0121b835, size: 89 bytes, params: 2, frame: 23
|
|
var environment;
|
|
const updateViewableItems = a0.updateViewableItems;
|
|
const value = environment.__proto__;
|
|
const horizontal = env1_0.flashListRef.props.horizontal;
|
|
Reflect.apply(updateViewableItems, a0, [horizontal != null && horizontal, env0_2, env0_3, env0_4, env0_1, _fun50493,
|
|
env0_0]);
|
|
}
|
|
|
|
function createViewabilityHelperMapViewToken_50497(a0, a1) { // fn#50497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:1564, owner: ViewabilityManager_50485.createViewabilityHelper.mapViewToken, offset: 0x0121b931, size: 156 bytes, params: 3, frame: 15
|
|
const value = environment.__proto__;
|
|
const data = env1_0.flashListRef.props.data;
|
|
const value2 = undefined;
|
|
const r2 = data == null ? value2 : data[a0];
|
|
const object2 = {index: a0, isViewable: a1, item: r2,
|
|
key: value2 === r2 || value2 === env1_0.flashListRef.props.keyExtractor ? a0.toString() : env1_0.flashListRef.props.keyExtractor(r2,
|
|
a0)};
|
|
const Date = global.Date;
|
|
object2.timestamp = Date.now();
|
|
return object2;
|
|
}
|
|
|
|
function _fun50498(a0, a1, a2) { // fn#50498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:1843, offset: 0x0121b9cd, size: 128 bytes, params: 4, frame: 19
|
|
var environment;
|
|
var object2;
|
|
var items2;
|
|
var concat;
|
|
var binding;
|
|
var value;
|
|
if (require != null) {
|
|
object2 = {};
|
|
object2.viewableItems = a0.map(function(a0) {
|
|
return createViewabilityHelperMapViewToken_50497(a0, true);
|
|
});
|
|
items2 = [];
|
|
concat = items2.concat;
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
binding = env3_2;
|
|
value = a1.map(_fun50500);
|
|
value = binding(value);
|
|
object2.changed = Reflect.apply(concat, items2, [value, binding(a2.map(_fun50501))]);
|
|
require(object2);
|
|
}
|
|
}
|
|
|
|
function _fun50493(a0) { // fn#50493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6612:1256, offset: 0x0121b88e, size: 46 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__.__proto__;
|
|
return env2_0.flashListRef.recyclerlistview_unsafe?.getLayout(a0);
|
|
}
|
|
|