Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,72 @@
|
||||
/* Metro module 14063; source: modules/collectibles/native/hooks/useCardLayout.tsx; dependencies: [10020, 1478, 2] */
|
||||
function _fun106622(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14260:6, offset: 0x022e3144, size: 125 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const calculateTotalGaps_106623 = function(a0, a1) {
|
||||
var COLLECTIBLES_SHOP_CARD_GAP = require(dependencyMap[0]).COLLECTIBLES_SHOP_CARD_GAP;
|
||||
return a1 + COLLECTIBLES_SHOP_CARD_GAP * (a0 - 1);
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/hooks/useCardLayout.tsx');
|
||||
exports.useCardLayout = useCardLayout;
|
||||
}
|
||||
|
||||
function useCardLayout() { // fn#106625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14260:324, offset: 0x022e31f6, size: 539 bytes, params: 1, frame: 26
|
||||
var r0;
|
||||
var r32;
|
||||
var r15;
|
||||
var value11;
|
||||
var value12;
|
||||
const value2 = 1;
|
||||
const width = importDefault(dependencyMap[value2])().width;
|
||||
const r2 = width >= 320 ? 2 : value2;
|
||||
const value4 = 2;
|
||||
if (r2 < value4) {
|
||||
return {columns: r2, cardWidth: undefined, rowWidth: undefined};
|
||||
}
|
||||
const r6 = width >= 768 ? 4 : value4;
|
||||
const COLLECTIBLES_SHOP_CARD_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH;
|
||||
const value6 = COLLECTIBLES_SHOP_CARD_WIDTH * r2;
|
||||
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
|
||||
const value7 = width - (value6 + COLLECTIBLES_SHOP_CARD_GAP * (r2 - value2));
|
||||
const r3 = value7 < value4 * COLLECTIBLES_SHOP_CARD_GAP ? global.Math.max(4,
|
||||
value7) : value4 * COLLECTIBLES_SHOP_CARD_GAP;
|
||||
const value10 = calculateCardWidth_106624(r2, width, r3);
|
||||
const COLLECTIBLES_SHOP_CARD_MAX_WIDTH = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_MAX_WIDTH;
|
||||
if (value10 > COLLECTIBLES_SHOP_CARD_MAX_WIDTH) {
|
||||
if (r2 < r6) {
|
||||
r0 = r2;
|
||||
while (true) {
|
||||
value11 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
|
||||
value12 = calculateCardWidth_106624(value11, width, r3);
|
||||
if (!(value12 > COLLECTIBLES_SHOP_CARD_MAX_WIDTH)) {
|
||||
r32 = value11;
|
||||
r15 = value12;
|
||||
break;
|
||||
}
|
||||
if (value11 < r6) {
|
||||
r0 = value11;
|
||||
continue;
|
||||
}
|
||||
r32 = value11;
|
||||
r15 = value12;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
r32 = r2;
|
||||
r15 = value10;
|
||||
}
|
||||
} else {
|
||||
r32 = r2;
|
||||
r15 = value10;
|
||||
}
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
const Math2 = global.Math;
|
||||
const value14 = Reflect.apply(min, Math, [Math2.max(r15, COLLECTIBLES_SHOP_CARD_WIDTH),
|
||||
COLLECTIBLES_SHOP_CARD_MAX_WIDTH]);
|
||||
return value14 * r32 + calculateTotalGaps_106623(r32, r3) > width && r32 > value2 ? {columns: value2,
|
||||
cardWidth: undefined, rowWidth: undefined} : {columns: r32, cardWidth: value14,
|
||||
rowWidth: value14 * r32 + COLLECTIBLES_SHOP_CARD_GAP * (r32 - value2) + r3};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user