This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

+110 -76
View File
@@ -1,4 +1,12 @@
/* Metro module 9154; source: utils/native/InstantInviteUtils.tsx; dependencies: [1379, 1935, 3784, 661, 1244, 9050, 566, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as GuildChannelStoreModule from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
function _fun71749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:6, offset: 0x01d2c5c1, size: 809 bytes, params: 8, frame: 37
let env0_0 = require;
const closure = function(a0, a1) {
@@ -14,13 +22,9 @@ function _fun71749(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(1935) /* metro dependency 1935: GuildChannelStore */;
let value = GuildChannelStoreModule;
const env0_3 = value.GUILD_SELECTABLE_CHANNELS_KEY;
const env0_4 = value.GUILD_VOCAL_CHANNELS_KEY;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).Permissions;
value = closure(0, function() {
return require(dependencyMap[4]).intl.string(require(dependencyMap[4]).t.PqEzn8);
}, function() {
@@ -95,7 +99,7 @@ function _fun71749(global, require, importDefault, importAll, module, exports, d
return require(dependencyMap[4]).intl.formatToPlainString(require(dependencyMap[4]).t.gPl14C, {maxUses: 100});
});
const items3 = [value12, value13, value14, value15, value16, value17, value18];
(require(2) /* metro dependency 2 */).fileFinishedImporting('utils/native/InstantInviteUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('utils/native/InstantInviteUtils.tsx');
exports.INVITE_OPTIONS_FOREVER = value;
exports.INVITE_OPTIONS_7_DAYS = value2;
exports.INVITE_OPTIONS_14_DAYS = value3;
@@ -119,81 +123,111 @@ function _fun71749(global, require, importDefault, importAll, module, exports, d
exports.getInviteChannelId = getInviteChannelId;
exports.shouldRenderInvite = shouldRenderInvite;
exports.useShouldShowInviteInActionBar = useShouldShowInviteInActionBar;
}
function makeOption(a0, a1) { // fn#71750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:221, offset: 0x01d2c8ea, size: 70 bytes, params: 3, frame: 5
const value = a1;
const value2 = a2;
const env0_1 = value2 !== undefined ? value2 : value;
const object2 = {value: a0};
Object.defineProperty(object2, 'label', {get: function() {
return require();
}, set: undefined, enumerable: true, configurable: true});
Object.defineProperty(object2, 'descriptiveLabel', {get: _fun71752, set: undefined, enumerable: true,
configurable: true});
return object2;
}
function getInviteChannelId(a0, a1) { // fn#71780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:2738, offset: 0x01d2cf07, size: 195 bytes, params: 3, frame: 19
var r1;
var canWithPartialContext2;
var value5;
var channel;
const value = a0;
const value2 = null;
if (value2 == a1) {
return value2;
}
if (value2 != value) {
canWithPartialContext2 = PermissionStore.canWithPartialContext(Permissions.CREATE_INSTANT_INVITE,
{channelId: value});
value5 = a1[GUILD_SELECTABLE_CHANNELS_KEY].concat(a1[GUILD_VOCAL_CHANNELS_KEY]).find(function({channel}) {
return PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
});
if (canWithPartialContext2) {
channel = ChannelStore.getChannel(value);
r1 = value2 == channel ? value : channel.isThread() ? value2 == channel.parent_id ? value : channel.parent_id : value;
} else {
r1 = value2 != value5 ? value5.channel.id : value2;
function makeOption(a0, a1) { // fn#71750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:221, offset: 0x01d2c8ea, size: 70 bytes, params: 3, frame: 5
const value = a1;
const value2 = a2;
const env0_1 = value2 !== undefined ? value2 : value;
const object = {value: a0};
Object.defineProperty(object, 'label', {get: function() {
return require();
}, set: undefined, enumerable: true, configurable: true});
Object.defineProperty(object, 'descriptiveLabel', {get: _fun71752, set: undefined, enumerable: true,
configurable: true});
return object;
function _fun71751() { // fn#71751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:265, offset: 0x00cefeb4, size: 15 bytes, params: 1, frame: 9
return require();
}
} else {
r1 = value2;
function _fun71752() { // fn#71752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:289, offset: 0x01025531, size: 15 bytes, params: 1, frame: 9
return env0_1();
}
}
return r1;
}
function shouldRenderInvite(a0, a1) { // fn#71782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:3109, offset: 0x01d2cff1, size: 163 bytes, params: 3, frame: 19
var r1;
let value = undefined;
const value2 = (a1 == null ? value : a1.vanityURLCode) == null;
if (value2) {
r1 = value2;
} else {
value = require(9050) /* metro dependency 9050: canViewInviteModal */;
value = !value.canViewInviteModal(PermissionStore, a1);
r1 = value;
function getInviteChannelId(a0, a1) { // fn#71780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:2738, offset: 0x01d2cf07, size: 195 bytes, params: 3, frame: 19
var r1;
var permissionStoreBinding;
var canWithPartialContext2;
var value5;
var channel;
const value = a0;
const value2 = null;
if (value2 == a1) {
return value2;
}
if (value2 != value) {
permissionStoreBinding = PermissionStore;
canWithPartialContext2 = permissionStoreBinding.canWithPartialContext(Permissions.CREATE_INSTANT_INVITE,
{channelId: value});
value5 = a1[GUILD_SELECTABLE_CHANNELS_KEY].concat(a1[GUILD_VOCAL_CHANNELS_KEY]).find(function({channel}) {
return PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
});
if (canWithPartialContext2) {
channel = ChannelStore.getChannel(value);
r1 = value2 == channel ? value : channel.isThread() ? value2 == channel.parent_id ? value : channel.parent_id : value;
} else {
r1 = value2 != value5 ? value5.channel.id : value2;
}
} else {
r1 = value2;
}
return r1;
}
return r1 ? a0 != null && (a0[GUILD_SELECTABLE_CHANNELS_KEY].find(function({channel}) {
return PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
}) != null || a0[GUILD_VOCAL_CHANNELS_KEY].find(_fun71784) != null) : !r1;
}
function useShouldShowInviteInActionBar(a0) { // fn#71785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:3405, offset: 0x01d2d094, size: 226 bytes, params: 2, frame: 20
var r1;
var moduleValue2;
const env0_0 = a0;
const value2 = undefined;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildChannelStore],
_fun71786, [a0.id]);
const value4 = (a0 == null ? value2 : a0.vanityURLCode) == null;
if (value4) {
r1 = value4;
} else {
moduleValue2 = require(9050) /* metro dependency 9050: canViewInviteModal */;
r1 = !moduleValue2.canViewInviteModal(PermissionStore, a0);
function shouldRenderInvite(a0, a1) { // fn#71782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:3109, offset: 0x01d2cff1, size: 163 bytes, params: 3, frame: 19
var r1;
let value = undefined;
const value2 = (a1 == null ? value : a1.vanityURLCode) == null;
if (value2) {
r1 = value2;
} else {
value = require(9050) /* metro dependency 9050: canViewInviteModal */;
value = !value.canViewInviteModal(PermissionStore, a1);
r1 = value;
}
return r1 ? a0 != null && (a0[GUILD_SELECTABLE_CHANNELS_KEY].find(function({channel}) {
return PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
}) != null || a0[GUILD_VOCAL_CHANNELS_KEY].find(_fun71784) != null) : !r1;
function _fun71784({channel}) { // fn#71784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:3320, offset: 0x01d2cfca, size: 39 bytes, params: 2, frame: 13
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
return Reflect.apply(can, permissionStoreBinding, [CREATE_INSTANT_INVITE, channel]);
}
}
function useShouldShowInviteInActionBar(a0) { // fn#71785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:3405, offset: 0x01d2d094, size: 226 bytes, params: 2, frame: 20
var r1;
var moduleValue2;
const env0_0 = a0;
const value2 = undefined;
const value3 = (FluxModule).useStateFromStoresObject([GuildChannelStore],
_fun71786, [a0.id]);
const value4 = (a0 == null ? value2 : a0.vanityURLCode) == null;
if (value4) {
r1 = value4;
} else {
moduleValue2 = require(9050) /* metro dependency 9050: canViewInviteModal */;
r1 = !moduleValue2.canViewInviteModal(PermissionStore, a0);
}
return r1 ? value3 == null || (value3[GUILD_SELECTABLE_CHANNELS_KEY].find(function({channel}) {
return PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
}) != null || value3[GUILD_VOCAL_CHANNELS_KEY].find(_fun71788) != null) : !r1;
function _fun71786() { // fn#71786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:3492, offset: 0x01d2d176, size: 32 bytes, params: 1, frame: 11
return GuildChannelStore.getChannels(env0_0.id);
}
function _fun71788({channel}) { // fn#71788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9339:3704, offset: 0x01d2cfca, size: 39 bytes, params: 2, frame: 13
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
return Reflect.apply(can, permissionStoreBinding, [CREATE_INSTANT_INVITE, channel]);
}
}
return r1 ? value3 == null || (value3[GUILD_SELECTABLE_CHANNELS_KEY].find(function({channel}) {
return PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, channel);
}) != null || value3[GUILD_VOCAL_CHANNELS_KEY].find(_fun71788) != null) : !r1;
}
global.__d(_fun71749, 9154, [1379, 1935, 3784, 661, 1244, 9050, 566,
2]) /* metro module 9154, dependencies: [1379, 1935, 3784, 661, 1244, 9050, 566, 2] */;