Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,53 @@
|
||||
/* Metro module 14318; source: modules/age_gate/AgeGateActionCreators.tsx; dependencies: [1229, 661, 14317, 683, 507, 694, 2] */
|
||||
function _fun108380(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14515:6, offset: 0x0231ea82, size: 184 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(1229) /* metro dependency 1229: AgeGateConstants */).AgeGateAnalyticAction;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.AnalyticEvents;
|
||||
const env0_5 = constantsModule.Endpoints;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/AgeGateActionCreators.tsx');
|
||||
exports.submitDateOfBirth = submitDateOfBirth;
|
||||
exports.preventUnderageRegistration = function(a0) {
|
||||
importDefault(dependencyMap[5]).dispatch({type: 'AGE_GATE_PREVENT_UNDERAGE_REGISTRATION'});
|
||||
var defaultImport2 = importDefault(dependencyMap[3]);
|
||||
var AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
|
||||
defaultImport2.track(AGE_GATE_ACTION, {source: a0,
|
||||
action: AgeGateAnalyticAction.AGE_GATE_PREVENT_UNDERAGE_REGISTRATION});
|
||||
};
|
||||
exports.logoutUnderageNewUser = function(a0) {
|
||||
importDefault(dependencyMap[5]).dispatch({type: 'AGE_GATE_LOGOUT_UNDERAGE_NEW_USER'});
|
||||
var defaultImport2 = importDefault(dependencyMap[3]);
|
||||
var AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
|
||||
defaultImport2.track(AGE_GATE_ACTION, {source: a0,
|
||||
action: AgeGateAnalyticAction.AGE_GATE_LOGOUT_UNDERAGE_NEW_USER});
|
||||
};
|
||||
}
|
||||
|
||||
function submitDateOfBirth(a0, a1) { // fn#108381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14515:267, offset: 0x0231eb3a, size: 203 bytes, params: 3, frame: 19
|
||||
var object3;
|
||||
const env0_0 = a1;
|
||||
(importDefault(14317) /* metro dependency 14317: trackAgeGateSubmitted */)(a0, a1);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
|
||||
const AGE_GATE_SUBMITTED = AgeGateAnalyticAction.AGE_GATE_SUBMITTED;
|
||||
Reflect.apply(track, defaultImport, [AGE_GATE_ACTION, {source: a1, action: AGE_GATE_SUBMITTED}]);
|
||||
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
|
||||
const patch = HTTP.patch;
|
||||
object3 = {};
|
||||
const ME = Endpoints.ME;
|
||||
object3.url = ME;
|
||||
object3.oldFormErrors = true;
|
||||
const object4 = {};
|
||||
object4.date_of_birth = a0.format('YYYY-MM-DD');
|
||||
object3.body = object4;
|
||||
object3.rejectWithError = false;
|
||||
return Reflect.apply(patch, HTTP, [object3]).then(function({body}) {
|
||||
importDefault(dependencyMap[5]).dispatch({type: 'CURRENT_USER_UPDATE', user: body});
|
||||
importDefault(dependencyMap[3]).track(AnalyticEvents.AGE_GATE_ACTION, {source: require,
|
||||
action: AgeGateAnalyticAction.AGE_GATE_SUCCESS});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Metro module 1229; source: modules/age_gate/AgeGateConstants.tsx; dependencies: [672, 2] */
|
||||
function _fun13787(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1356:6, offset: 0x00df4cb5, size: 485 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const HOUR = Millis.HOUR;
|
||||
const value = 2 * HOUR;
|
||||
object2 = {AUTH: 'Register Age Gate', NEW_USER_FLOW: 'NUF', CLAIM_ACCOUNT: 'Claim Age Gate',
|
||||
NSFW_CHANNEL: 'NSFW Channel', NSFW_SERVER: 'NSFW Server', NSFW_SERVER_INVITE: 'NSFW Server Invite',
|
||||
NSFW_SERVER_INVITE_EMBED: 'NSFW Server Invite Embed', NSFW_VOICE_CHANNEL: 'NSFW Voice Channel',
|
||||
LARGE_GUILD: 'Large Guild', ACCESS_LARGE_GUILD_UNDERAGE: 'Access Large Guild Access Underage',
|
||||
JOIN_LARGE_GUILD_UNDERAGE: 'Join Large Guild Underage', FAMILY_CENTER: 'Family Center', REGISTER: 'Register',
|
||||
DEEP_LINK_PROMPT: 'Deep Link Prompt', UNSPECIFIED: 'Unspecified'};
|
||||
const Set = global.Set;
|
||||
const NSFW_CHANNEL = object2.NSFW_CHANNEL;
|
||||
const NSFW_VOICE_CHANNEL = object2.NSFW_VOICE_CHANNEL;
|
||||
const NSFW_SERVER = object2.NSFW_SERVER;
|
||||
const set = new Set([NSFW_CHANNEL, NSFW_VOICE_CHANNEL, NSFW_SERVER]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/AgeGateConstants.tsx');
|
||||
exports.AGE_GATE_REGISTER_TIMEOUT_MS = value;
|
||||
exports.NEW_USER_AGE_GATE_MODAL_KEY = 'new-user-age-gate-modal';
|
||||
exports.EXISTING_USER_AGE_GATE_MODAL_KEY = 'existing-user-age-gate-modal';
|
||||
exports.AgeGateSource = object2;
|
||||
exports.REACTIVE_CHECK_AGE_GATE_SOURCES = set;
|
||||
exports.AgeGateAnalyticAction = {AGE_GATE_OPEN: 'AGE_GATE_OPEN', AGE_GATE_CLOSE: 'AGE_GATE_CLOSE',
|
||||
AGE_GATE_SUBMITTED: 'AGE_GATE_SUBMITTED', AGE_GATE_SUCCESS: 'AGE_GATE_SUCCESS',
|
||||
AGE_GATE_FAILURE: 'AGE_GATE_FAILURE', AGE_GATE_UNDERAGE: 'AGE_GATE_UNDERAGE',
|
||||
AGE_GATE_PREVENT_UNDERAGE_REGISTRATION: 'AGE_GATE_PREVENT_UNDERAGE_REGISTRATION',
|
||||
AGE_GATE_LOGOUT_UNDERAGE_NEW_USER: 'AGE_GATE_LOGOUT_UNDERAGE_NEW_USER'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/* Metro module 5075; source: modules/age_gate/AgeGateModalActionCreators.tsx; dependencies: [1229, 661, 683, 694, 5076, 1230, 2] */
|
||||
function _fun44012(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5253:6, offset: 0x01165a68, size: 204 bytes, params: 8, frame: 18
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(1229) /* metro dependency 1229: AgeGateConstants */).AgeGateAnalyticAction;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = constantsModule.Routes;
|
||||
const env0_5 = constantsModule.AnalyticEvents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/AgeGateModalActionCreators.tsx');
|
||||
exports.openAgeGateModal = openAgeGateModal;
|
||||
exports.closeAgeGateModal = function(a0) {
|
||||
importDefault(dependencyMap[3]).wait(_fun44015);
|
||||
if (a0 !== undefined) {
|
||||
importDefault(dependencyMap[2]).track(AnalyticEvents.AGE_GATE_ACTION, {source: a0,
|
||||
action: AgeGateAnalyticAction.AGE_GATE_CLOSE});
|
||||
}
|
||||
};
|
||||
exports.openSuccessAgeGateModal = function(a0) {
|
||||
importDefault(dependencyMap[3]).wait(_fun44017);
|
||||
var defaultImport2 = importDefault(dependencyMap[2]);
|
||||
var AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
|
||||
defaultImport2.track(AGE_GATE_ACTION, {source: a0, action: AgeGateAnalyticAction.AGE_GATE_SUCCESS});
|
||||
};
|
||||
exports.openFailureAgeGateModal = function(a0, a1) {
|
||||
var env0_0 = a1;
|
||||
importDefault(dependencyMap[3]).wait(_fun44019);
|
||||
var defaultImport2 = importDefault(dependencyMap[2]);
|
||||
var AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
|
||||
defaultImport2.track(AGE_GATE_ACTION, {source: a0, action: AgeGateAnalyticAction.AGE_GATE_FAILURE});
|
||||
};
|
||||
exports.closeFailedAgeGate = function() {
|
||||
importDefault(dependencyMap[4]).logoutInternal();
|
||||
var moduleValue = require(dependencyMap[5]);
|
||||
var LOGIN = Routes.LOGIN;
|
||||
moduleValue.transitionTo(LOGIN, {source: 'age_gate_modal'});
|
||||
};
|
||||
}
|
||||
|
||||
function openAgeGateModal(a0) { // fn#44013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5253:268, offset: 0x01165b34, size: 112 bytes, params: 2, frame: 19
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
|
||||
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: 'Enter Your Birthday', source: {section: a0}}]);
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AGE_GATE_MODAL_OPEN', source: a0});
|
||||
}
|
||||
|
||||
function closeAgeGateModal(a0) { // fn#44014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5253:450, offset: 0x01165ba4, size: 113 bytes, params: 2, frame: 16
|
||||
var defaultImport2;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun44015);
|
||||
if (a0 !== undefined) {
|
||||
defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
defaultImport2.track(AnalyticEvents.AGE_GATE_ACTION, {source: a0,
|
||||
action: AgeGateAnalyticAction.AGE_GATE_CLOSE});
|
||||
}
|
||||
}
|
||||
|
||||
function openSuccessAgeGateModal(a0) { // fn#44016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5253:655, offset: 0x01165c46, size: 101 bytes, params: 2, frame: 16
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun44017);
|
||||
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport2.track;
|
||||
const AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
|
||||
const AGE_GATE_SUCCESS = AgeGateAnalyticAction.AGE_GATE_SUCCESS;
|
||||
Reflect.apply(track, defaultImport2, [AGE_GATE_ACTION, {source: a0, action: AGE_GATE_SUCCESS}]);
|
||||
}
|
||||
|
||||
function openFailureAgeGateModal(a0, a1) { // fn#44018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5253:865, offset: 0x01165cdc, size: 108 bytes, params: 3, frame: 16
|
||||
const env0_0 = a1;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun44019);
|
||||
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport2.track;
|
||||
const AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
|
||||
const AGE_GATE_FAILURE = AgeGateAnalyticAction.AGE_GATE_FAILURE;
|
||||
Reflect.apply(track, defaultImport2, [AGE_GATE_ACTION, {source: a0, action: AGE_GATE_FAILURE}]);
|
||||
}
|
||||
|
||||
function _fun44015() { // fn#44015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5253:494, offset: 0x01165c15, size: 49 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AGE_GATE_MODAL_CLOSE'});
|
||||
}
|
||||
|
||||
function _fun44017() { // fn#44017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5253:705, offset: 0x01165cab, size: 49 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AGE_GATE_SUCCESS_MODAL_OPEN'});
|
||||
}
|
||||
|
||||
function _fun44019() { // fn#44019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5253:917, offset: 0x01165d48, size: 61 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'AGE_GATE_FAILURE_MODAL_OPEN',
|
||||
underageMessage: require});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 14307; source: modules/age_gate/AgeGateStore.tsx; dependencies: [6, 7, 15, 17, 18, 1229, 566, 694, 2] */
|
||||
function _fun108278(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14504:6, offset: 0x0231ad70, size: 301 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_1 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_2 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_3 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_4 = importDefault(18) /* metro dependency 18 */;
|
||||
(require(1229) /* metro dependency 1229: AgeGateConstants */).AGE_GATE_REGISTER_TIMEOUT_MS;
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun108282(Store);
|
||||
value.displayName = 'AgeGateStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{AGE_GATE_PREVENT_UNDERAGE_REGISTRATION: function() {
|
||||
env0_5 = true;
|
||||
var Date = global.Date;
|
||||
Date.now();
|
||||
}, LOGIN_SUCCESS: function() {
|
||||
env0_5 = false;
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/AgeGateStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_108279() { // fn#108279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14504:185, offset: 0x0231ae9d, size: 98 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_108279_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun108282(a0) { // fn#108282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14504:393, offset: 0x0231aeff, size: 74 bytes, params: 2, frame: 15
|
||||
const closure = AgeGateStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'isUnderageAnonymous', value: value_108284}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,465 @@
|
||||
/* Metro module 5072; source: modules/age_gate/AgeGateUtils.tsx; dependencies: [1422, 1379, 5073, 1867, 1878, 1229, 661, 1244, 21, 4813, 3835, 4861, 566, 5074, 1948, 5075, 5087, 2] */
|
||||
function _fun43969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:6, offset: 0x01163fe5, size: 647 bytes, params: 8, frame: 27
|
||||
const env0_0 = require;
|
||||
const closure = shouldAgeVerifyForAgeGate;
|
||||
const closure2 = useShouldAgeVerifyForAgeGate;
|
||||
const closure3 = isChannelContentGated;
|
||||
const closure4 = useIsChannelContentGated;
|
||||
const closure5 = isCurrentUserMissingDateOfBirth;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildNSFW;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildNSFWAgreeStore = importDefault(5073) /* metro dependency 5073: GuildNSFWAgreeStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const AgeGateSource = (require(1229) /* metro dependency 1229: AgeGateConstants */).AgeGateSource;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const GuildNSFWContentLevel = constantsModule.GuildNSFWContentLevel;
|
||||
const env0_9 = constantsModule.HelpdeskArticles;
|
||||
const Date = global.Date;
|
||||
const date = new Date('06/16/2020');
|
||||
const AGE_RESTRICTED = GuildNSFWContentLevel.AGE_RESTRICTED;
|
||||
items = [AGE_RESTRICTED];
|
||||
const EXPLICIT = GuildNSFWContentLevel.EXPLICIT;
|
||||
items[1] = EXPLICIT;
|
||||
const Set = global.Set;
|
||||
const NSFW_SERVER = AgeGateSource.NSFW_SERVER;
|
||||
const NSFW_SERVER_INVITE = AgeGateSource.NSFW_SERVER_INVITE;
|
||||
const NSFW_SERVER_INVITE_EMBED = AgeGateSource.NSFW_SERVER_INVITE_EMBED;
|
||||
const set = new Set([NSFW_SERVER, NSFW_SERVER_INVITE, NSFW_SERVER_INVITE_EMBED]);
|
||||
const closure6 = shouldShowAgeGateForCurrentUser;
|
||||
const closure7 = shouldShowAgeGateForGuildContentLevel;
|
||||
const closure8 = shouldShowAgeGateForChannelId;
|
||||
const closure9 = shouldShowAgeGateForVoiceChannel;
|
||||
const closure10 = isChannelOrGuildNSFW;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/AgeGateUtils.tsx');
|
||||
exports.SERVER_AGE_GATE_SOURCES = set;
|
||||
exports.userNeedsAgeGate = userNeedsAgeGate;
|
||||
exports.guildNeedsAgeGate = guildNeedsAgeGate;
|
||||
exports.shouldAgeVerifyForAgeGate = closure;
|
||||
exports.useShouldAgeVerifyForAgeGate = closure2;
|
||||
exports.useAgeGateVerifyContentForGuild = useAgeGateVerifyContentForGuild;
|
||||
exports.useAgeGateVerifyContent = useAgeGateVerifyContent;
|
||||
exports.shouldShowAgeGateForCurrentUser = closure6;
|
||||
exports.shouldShowAgeGateForGuildContentLevel = closure7;
|
||||
exports.shouldShowAgeGateForChannelId = closure8;
|
||||
exports.shouldShowAgeGateForVoiceChannel = closure9;
|
||||
exports.maybeOpenAgeGateForVoiceChannel = maybeOpenAgeGateForVoiceChannel;
|
||||
exports.maybeShowAgeGate = maybeShowAgeGate;
|
||||
exports.isChannelOrGuildNSFW = closure10;
|
||||
exports.isChannelAgeVerificationGated = isChannelAgeVerificationGated;
|
||||
exports.userCannotSeeNSFWContent = userCannotSeeNSFWContent;
|
||||
exports.isChannelContentGated = closure3;
|
||||
exports.useIsChannelContentGated = closure4;
|
||||
exports.useShouldHideChannelContent = useShouldHideChannelContent;
|
||||
exports.isCurrentUserMissingDateOfBirth = closure5;
|
||||
exports.shouldAgeVerifyForSettingsToggles = shouldAgeVerifyForSettingsToggles;
|
||||
exports.useShouldAgeVerifyForSettingsToggles = useShouldAgeVerifyForSettingsToggles;
|
||||
}
|
||||
|
||||
function shouldAgeVerifyForAgeGate() { // fn#43970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:375, offset: 0x0116426c, size: 90 bytes, params: 1, frame: 15
|
||||
let value = require(4813) /* metro dependency 4813: AgeVerificationUtils */;
|
||||
value = value.shouldShowTiggerPawtect();
|
||||
const regionalFeatureConfigUtilsModule = require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */;
|
||||
const isFeatureAgeGated = regionalFeatureConfigUtilsModule.isFeatureAgeGated;
|
||||
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
|
||||
const AGE_GATED_SPACES = AgeGatedFeature.AGE_GATED_SPACES;
|
||||
return Reflect.apply(isFeatureAgeGated, regionalFeatureConfigUtilsModule, [AGE_GATED_SPACES]) && value;
|
||||
}
|
||||
|
||||
function useShouldAgeVerifyForAgeGate() { // fn#43971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:532, offset: 0x011642c6, size: 90 bytes, params: 1, frame: 14
|
||||
var value;
|
||||
const useIsFeatureAgeGated = (require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */).useIsFeatureAgeGated;
|
||||
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
|
||||
const AGE_GATED_SPACES = AgeGatedFeature.AGE_GATED_SPACES;
|
||||
value = Reflect.apply(useIsFeatureAgeGated, value, [AGE_GATED_SPACES]);
|
||||
return value && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useShouldShowTiggerPawtect();
|
||||
}
|
||||
|
||||
function isChannelContentGated(a0) { // fn#43972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:1286, offset: 0x01164320, size: 240 bytes, params: 2, frame: 19
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
const value2 = GuildNSFWAgreeStore.didAgree(a0.guild_id);
|
||||
const nsfwAllowed = UserStore.getCurrentUser()?.nsfwAllowed;
|
||||
const regionalFeatureConfigUtilsModule = require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */;
|
||||
const isFeatureAgeGated = regionalFeatureConfigUtilsModule.isFeatureAgeGated;
|
||||
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
|
||||
const AGE_GATED_SPACES = AgeGatedFeature.AGE_GATED_SPACES;
|
||||
const isFeatureAgeGated2 = Reflect.apply(isFeatureAgeGated, regionalFeatureConfigUtilsModule, [AGE_GATED_SPACES]);
|
||||
const shouldShowTiggerPawtect2 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).shouldShowTiggerPawtect();
|
||||
let r2 = value2 && !(nsfwAllowed === false);
|
||||
r2 = r2 ? shouldShowTiggerPawtect2 && isFeatureAgeGated2 : !r2;
|
||||
if (a0.isNSFW()) {
|
||||
if (r2) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
const guild = GuildStore.getGuild(a0.guild_id);
|
||||
return guild != null && (isGuildNSFW(guild) && r2);
|
||||
}
|
||||
|
||||
function useIsChannelContentGated(a0) { // fn#43973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:1644, offset: 0x01164410, size: 296 bytes, params: 2, frame: 22
|
||||
var r0;
|
||||
var r7;
|
||||
var r1;
|
||||
var isNSFW2;
|
||||
var value12;
|
||||
const env0_0 = a0;
|
||||
var value;
|
||||
const value2 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useShouldShowTiggerPawtect();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildNSFWAgreeStore], _fun43974);
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun43975);
|
||||
const regionalFeatureConfigUtilsModule = require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */;
|
||||
const useIsFeatureAgeGated = regionalFeatureConfigUtilsModule.useIsFeatureAgeGated;
|
||||
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
|
||||
const AGE_GATED_SPACES = AgeGatedFeature.AGE_GATED_SPACES;
|
||||
const value5 = Reflect.apply(useIsFeatureAgeGated, regionalFeatureConfigUtilsModule, [AGE_GATED_SPACES]);
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun43976);
|
||||
let r2 = value3 && !value4;
|
||||
const r4 = r2 ? value5 && value2 : !r2;
|
||||
const value8 = a0 != null;
|
||||
if (value8) {
|
||||
isNSFW2 = a0.isNSFW();
|
||||
r7 = isNSFW2 ? !r4 : !isNSFW2;
|
||||
if (r7) {
|
||||
value12 = guild != null;
|
||||
if (value12) {
|
||||
value = isGuildNSFW(guild);
|
||||
value = !(value ? !r4 : !value);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value12;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = !r7;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value8;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function isCurrentUserMissingDateOfBirth() { // fn#43977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:2146, offset: 0x011645bf, size: 37 bytes, params: 1, frame: 11
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
return currentUser != null && currentUser.nsfwAllowed == null;
|
||||
}
|
||||
|
||||
function shouldShowAgeGateForCurrentUser() { // fn#43978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:738, offset: 0x011645e4, size: 56 bytes, params: 1, frame: 10
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
if (currentUser == null) {
|
||||
return false;
|
||||
}
|
||||
return currentUser.nsfwAllowed !== true || shouldAgeVerifyForAgeGate();
|
||||
}
|
||||
|
||||
function shouldShowAgeGateForGuildContentLevel(a0) { // fn#43979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:889, offset: 0x0116461c, size: 62 bytes, params: 2, frame: 14
|
||||
var guild;
|
||||
if (shouldShowAgeGateForCurrentUser()) {
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
guild = GuildStore.getGuild(a0);
|
||||
return guild != null && isGuildNSFW(guild);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function shouldShowAgeGateForChannelId(a0) { // fn#43980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:1021, offset: 0x0116465a, size: 59 bytes, params: 2, frame: 14
|
||||
const shouldShowAgeGateForCurrentUser2 = shouldShowAgeGateForCurrentUser();
|
||||
return !(shouldShowAgeGateForCurrentUser2 ? a0 == null : !shouldShowAgeGateForCurrentUser2) && isChannelContentGated(ChannelStore.getChannel(a0));
|
||||
}
|
||||
|
||||
function shouldShowAgeGateForVoiceChannel(a0) { // fn#43981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:1144, offset: 0x01164695, size: 30 bytes, params: 2, frame: 12
|
||||
return shouldAgeVerifyForAgeGate() && shouldShowAgeGateForChannelId(a0);
|
||||
}
|
||||
|
||||
function isChannelOrGuildNSFW(a0) { // fn#43982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:1234, offset: 0x011646b3, size: 64 bytes, params: 2, frame: 14
|
||||
var r1;
|
||||
var r0;
|
||||
var isGuildNSFWBinding;
|
||||
let value = a0 != null;
|
||||
if (value) {
|
||||
value = a0.isNSFW();
|
||||
if (value) {
|
||||
r1 = value;
|
||||
} else {
|
||||
isGuildNSFWBinding = isGuildNSFW;
|
||||
value = GuildStore.getGuild(a0.guild_id);
|
||||
value = isGuildNSFWBinding(value);
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function userNeedsAgeGate() { // fn#43983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:2365, offset: 0x011646f3, size: 96 bytes, params: 1, frame: 15
|
||||
var r0;
|
||||
var defaultImport;
|
||||
var value4;
|
||||
var binding;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const value3 = currentUser != null;
|
||||
if (value3) {
|
||||
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value4 = defaultImport.extractTimestamp(currentUser.id);
|
||||
binding = env0_10;
|
||||
r0 = value4 > binding.getTime();
|
||||
} else {
|
||||
r0 = value3;
|
||||
}
|
||||
r0 = r0 && currentUser.nsfwAllowed == null;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function guildNeedsAgeGate({nsfwLevel}) { // fn#43984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:2519, offset: 0x01164753, size: 28 bytes, params: 2, frame: 11
|
||||
return env0_11.includes(nsfwLevel);
|
||||
}
|
||||
|
||||
function useAgeGateVerifyContentForGuild(a0) { // fn#43985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:2729, offset: 0x0116476f, size: 927 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
var r9;
|
||||
const NsfwSpaceWarningModalType = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).NsfwSpaceWarningModalType;
|
||||
var format;
|
||||
var defaultImport;
|
||||
const value2 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useIsAgeVerified();
|
||||
const isGuildNSFW2 = isGuildNSFW(a0);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun43986);
|
||||
const value4 = useShouldAgeVerifyForAgeGate();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const value5 = Reflect.apply(string, intl, [isGuildNSFW2 ? t.xi46lg : t.ZmwvDc]);
|
||||
object2 = {};
|
||||
if (value4) {
|
||||
object2.title = value5;
|
||||
if (value2) {
|
||||
format = intl.format;
|
||||
object2.description = isGuildNSFW2 ? Reflect.apply(format, intl, [t['8tk6bB'], {}]) : Reflect.apply(format,
|
||||
intl,
|
||||
[t.XQZvwn, {}]);
|
||||
object2.agreement = intl.string(t.Zt4Mf4);
|
||||
object2.modalType = NsfwSpaceWarningModalType.NSFW_CHANNEL_AGE_VERIFY;
|
||||
} else {
|
||||
string = intl.string;
|
||||
object2.description = isGuildNSFW2 ? Reflect.apply(string, intl, [t.V6Gmu9]) : Reflect.apply(string, intl,
|
||||
[t['5rygLk']]);
|
||||
object2.agreement = intl.string(t.FDSSia);
|
||||
object2.modalType = NsfwSpaceWarningModalType.NSFW_CHANNEL_AGE_VERIFY;
|
||||
}
|
||||
} else if (value3) {
|
||||
object2.title = intl.string(isGuildNSFW2 ? t['H0SG/g'] : t.NEabBa);
|
||||
format = intl.format;
|
||||
r9 = isGuildNSFW2 ? t['6++3cX'] : t['2kHZes'];
|
||||
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
object2.description = Reflect.apply(format, intl, [r9,
|
||||
{helpURL: defaultImport.getArticleURL(HelpdeskArticles.NSFW_AGE_GATING)}]);
|
||||
object2.agreement = null;
|
||||
object2.modalType = NsfwSpaceWarningModalType.NSFW_CHANNEL_UNDERAGE;
|
||||
} else {
|
||||
object2.title = value5;
|
||||
object2.description = intl.string(isGuildNSFW2 ? t.ZtuRts : t.E4Cd5I);
|
||||
object2.agreement = intl.string(t.wVq7uo);
|
||||
object2.modalType = NsfwSpaceWarningModalType.NSFW_CHANNEL_VERIFIED;
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useAgeGateVerifyContent(a0) { // fn#43987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:3974, offset: 0x01164b0e, size: 1286 bytes, params: 2, frame: 22
|
||||
var r7;
|
||||
var r1;
|
||||
var r4;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var format;
|
||||
var property;
|
||||
var defaultImport;
|
||||
var object2;
|
||||
const value2 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useIsAgeVerified();
|
||||
const value3 = useShouldAgeVerifyForAgeGate();
|
||||
const NSFW_SERVER = AgeGateSource.NSFW_SERVER;
|
||||
let r6 = a0 === NSFW_SERVER || a0 === AgeGateSource.NSFW_SERVER_INVITE;
|
||||
r6 = !r6 ? a0 === AgeGateSource.NSFW_SERVER_INVITE_EMBED : r6;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [UserStore];
|
||||
const value7 = Reflect.apply(useStateFromStores, fluxModule, [object, _fun43988]);
|
||||
const JOIN_LARGE_GUILD_UNDERAGE = AgeGateSource.JOIN_LARGE_GUILD_UNDERAGE;
|
||||
if (a0 === JOIN_LARGE_GUILD_UNDERAGE) {
|
||||
r4 = a0 === AgeGateSource.JOIN_LARGE_GUILD_UNDERAGE ? t['u/xsK9'] : t.MjQbfi;
|
||||
object = {};
|
||||
string = intl.string;
|
||||
object.description = value2 ? Reflect.apply(string, intl, [t.SAoMVJ]) : Reflect.apply(string, intl, [t.SxY4IW]);
|
||||
string = intl.string;
|
||||
object.agreement = value2 ? Reflect.apply(string, intl, [t.Zt4Mf4]) : Reflect.apply(string, intl, [t.FDSSia]);
|
||||
object2 = {};
|
||||
object2.verifyTitle = intl.string(r4);
|
||||
object2.verifyGateDescription = object.description;
|
||||
object2.verifyAgreementButtonText = object.agreement;
|
||||
return object2;
|
||||
}
|
||||
const ACCESS_LARGE_GUILD_UNDERAGE = AgeGateSource.ACCESS_LARGE_GUILD_UNDERAGE;
|
||||
if (a0 === ACCESS_LARGE_GUILD_UNDERAGE) {
|
||||
r4 = a0 === AgeGateSource.JOIN_LARGE_GUILD_UNDERAGE ? t['u/xsK9'] : t.MjQbfi;
|
||||
object = {};
|
||||
string = intl.string;
|
||||
object.description = value2 ? Reflect.apply(string, intl, [t.SAoMVJ]) : Reflect.apply(string, intl, [t.SxY4IW]);
|
||||
string = intl.string;
|
||||
object.agreement = value2 ? Reflect.apply(string, intl, [t.Zt4Mf4]) : Reflect.apply(string, intl, [t.FDSSia]);
|
||||
object2 = {};
|
||||
object2.verifyTitle = intl.string(r4);
|
||||
object2.verifyGateDescription = object.description;
|
||||
object2.verifyAgreementButtonText = object.agreement;
|
||||
return object2;
|
||||
}
|
||||
if (value2) {
|
||||
object = {};
|
||||
object.verifyAgreementButtonText = intl.string(t.Zt4Mf4);
|
||||
format = intl.format;
|
||||
object.verifyGateDescription = r6 ? Reflect.apply(format, intl, [t['8tk6bB'], {}]) : Reflect.apply(format, intl,
|
||||
[t.XQZvwn, {}]);
|
||||
string = intl.string;
|
||||
r6 = r6 ? Reflect.apply(string, intl, [t.xi46lg]) : Reflect.apply(string, intl, [t.ZmwvDc]);
|
||||
object.verifyTitle = r6;
|
||||
r1 = object;
|
||||
} else if (a0 === AgeGateSource.LARGE_GUILD) {
|
||||
object = {};
|
||||
object.verifyTitle = intl.string(t['7ymzsL']);
|
||||
object.verifyGateDescription = intl.string(t.SxY4IW);
|
||||
object.verifyAgreementButtonText = intl.string(t.FDSSia);
|
||||
r1 = object;
|
||||
} else if (value7) {
|
||||
if (r6) {
|
||||
if (value3) {
|
||||
object = {};
|
||||
object.verifyAgreementButtonText = intl.string(t.FDSSia);
|
||||
string = intl.string;
|
||||
r7 = r6 ? Reflect.apply(string, intl, [t.V6Gmu9]) : Reflect.apply(string, intl, [t['5rygLk']]);
|
||||
object.verifyGateDescription = r7;
|
||||
string = intl.string;
|
||||
r7 = r6 ? Reflect.apply(string, intl, [t.xi46lg]) : Reflect.apply(string, intl, [t.ZmwvDc]);
|
||||
object.verifyTitle = r7;
|
||||
r1 = object;
|
||||
} else {
|
||||
object = {};
|
||||
object.verifyTitle = intl.string(t['H0SG/g']);
|
||||
format = intl.format;
|
||||
property = t['6++3cX'];
|
||||
defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
object.verifyGateDescription = Reflect.apply(format, intl, [property,
|
||||
{helpURL: defaultImport.getArticleURL(HelpdeskArticles.AGE_GATE)}]);
|
||||
object.verifyAgreementButtonText = null;
|
||||
r1 = object;
|
||||
}
|
||||
} else {
|
||||
object = {};
|
||||
object.verifyAgreementButtonText = intl.string(t.FDSSia);
|
||||
string = intl.string;
|
||||
r7 = r6 ? Reflect.apply(string, intl, [t.V6Gmu9]) : Reflect.apply(string, intl, [t['5rygLk']]);
|
||||
object.verifyGateDescription = r7;
|
||||
string = intl.string;
|
||||
r7 = r6 ? Reflect.apply(string, intl, [t.xi46lg]) : Reflect.apply(string, intl, [t.ZmwvDc]);
|
||||
object.verifyTitle = r7;
|
||||
r1 = object;
|
||||
}
|
||||
} else {
|
||||
object = {};
|
||||
object.verifyAgreementButtonText = intl.string(t.FDSSia);
|
||||
string = intl.string;
|
||||
r7 = r6 ? Reflect.apply(string, intl, [t.V6Gmu9]) : Reflect.apply(string, intl, [t['5rygLk']]);
|
||||
object.verifyGateDescription = r7;
|
||||
string = intl.string;
|
||||
r7 = r6 ? Reflect.apply(string, intl, [t.xi46lg]) : Reflect.apply(string, intl, [t.ZmwvDc]);
|
||||
object.verifyTitle = r7;
|
||||
r1 = object;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
|
||||
function maybeOpenAgeGateForVoiceChannel(a0) { // fn#43989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:6004, offset: 0x01165014, size: 71 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var moduleValue;
|
||||
const shouldShowAgeGateForVoiceChannel2 = shouldShowAgeGateForVoiceChannel(a0);
|
||||
if (shouldShowAgeGateForVoiceChannel2) {
|
||||
moduleValue = require(5075) /* metro dependency 5075: AgeGateModalActionCreators */;
|
||||
moduleValue.openAgeGateModal(AgeGateSource.NSFW_VOICE_CHANNEL);
|
||||
r0 = true;
|
||||
} else {
|
||||
r0 = !!shouldShowAgeGateForVoiceChannel2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function maybeShowAgeGate(a0, a1, a2) { // fn#43990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:6118, offset: 0x0116505b, size: 167 bytes, params: 4, frame: 15
|
||||
var r3;
|
||||
var moduleValue;
|
||||
let value = a2;
|
||||
if (shouldShowAgeGateForGuildContentLevel(a0)) {
|
||||
r3 = value == null ? AgeGateSource.NSFW_SERVER : env0_12.has(value) ? value : AgeGateSource.NSFW_SERVER;
|
||||
value = require(5075) /* metro dependency 5075: AgeGateModalActionCreators */;
|
||||
value.openAgeGateModal(r3);
|
||||
} else if (isCurrentUserMissingDateOfBirth() && shouldShowAgeGateForChannelId(a1)) {
|
||||
moduleValue = require(5075) /* metro dependency 5075: AgeGateModalActionCreators */;
|
||||
moduleValue.openAgeGateModal(value ?? AgeGateSource.NSFW_CHANNEL);
|
||||
}
|
||||
}
|
||||
|
||||
function isChannelAgeVerificationGated(a0) { // fn#43991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:6468, offset: 0x01165102, size: 65 bytes, params: 2, frame: 13
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
return isChannelOrGuildNSFW(a0) && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).shouldShowTiggerPawtect();
|
||||
}
|
||||
|
||||
function userCannotSeeNSFWContent(a0) { // fn#43992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:6594, offset: 0x01165143, size: 69 bytes, params: 2, frame: 14
|
||||
if (a0 == null) {
|
||||
return false;
|
||||
}
|
||||
return isChannelOrGuildNSFW(a0) && !(UserStore.getCurrentUser()?.nsfwAllowed === true);
|
||||
}
|
||||
|
||||
function useShouldHideChannelContent(a0) { // fn#43993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:6851, offset: 0x01165188, size: 56 bytes, params: 2, frame: 14
|
||||
const value2 = useIsChannelContentGated(a0);
|
||||
let value = require(5087) /* metro dependency 5087: SpoilerChannelUtils */;
|
||||
value = value.useIsChannelSpoilerGated(a0);
|
||||
return value2 || value;
|
||||
}
|
||||
|
||||
function shouldAgeVerifyForSettingsToggles() { // fn#43994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:7079, offset: 0x011651c0, size: 90 bytes, params: 1, frame: 14
|
||||
var value;
|
||||
const isFeatureAgeGated = (require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */).isFeatureAgeGated;
|
||||
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
|
||||
const COMMANDS_TOGGLE = AgeGatedFeature.COMMANDS_TOGGLE;
|
||||
value = Reflect.apply(isFeatureAgeGated, value, [COMMANDS_TOGGLE]);
|
||||
return value && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).shouldShowTiggerPawtect();
|
||||
}
|
||||
|
||||
function useShouldAgeVerifyForSettingsToggles() { // fn#43995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:7287, offset: 0x0116521a, size: 90 bytes, params: 1, frame: 14
|
||||
var value;
|
||||
const useIsFeatureAgeGated = (require(3835) /* metro dependency 3835: RegionalFeatureConfigUtils */).useIsFeatureAgeGated;
|
||||
const AgeGatedFeature = (require(4861) /* metro dependency 4861: AgeGatedFeature */).AgeGatedFeature;
|
||||
const COMMANDS_TOGGLE = AgeGatedFeature.COMMANDS_TOGGLE;
|
||||
value = Reflect.apply(useIsFeatureAgeGated, value, [COMMANDS_TOGGLE]);
|
||||
return value && (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useShouldShowTiggerPawtect();
|
||||
}
|
||||
|
||||
function _fun43974() { // fn#43974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:1759, offset: 0x01164538, size: 47 bytes, params: 1, frame: 13
|
||||
return GuildNSFWAgreeStore.didAgree(env0_0?.guild_id);
|
||||
}
|
||||
|
||||
function _fun43975() { // fn#43975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:1838, offset: 0x01164567, size: 41 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return UserStore.getCurrentUser()?.nsfwAllowed === false;
|
||||
}
|
||||
|
||||
function _fun43976() { // fn#43976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5250:2025, offset: 0x01164590, size: 47 bytes, params: 1, frame: 13
|
||||
return GuildStore.getGuild(env0_0?.guild_id);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
/* Metro module 1865; source: modules/age_gate/ServerNSFWLevelExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun20057(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1992:6, offset: 0x00ebd96a, size: 164 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'name': '2025-09-server-nsfw-level', 'kind': 'user',
|
||||
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/ServerNSFWLevelExperiment.tsx');
|
||||
exports.ServerNSFWLevelExperiment = value;
|
||||
exports.isServerNSFWLevelEnabled = isServerNSFWLevelEnabled;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* Metro module 6935; source: modules/age_gate/getPreviousSafeRouteForNsfwReturn.native.tsx; dependencies: [6936, 1379, 1935, 661, 5072, 5087, 2] */
|
||||
function _fun55130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7113:6, offset: 0x01376af8, size: 205 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const navigationHistoryStoreModule = require(6936) /* metro dependency 6936: NavigationHistoryStore */;
|
||||
const env0_2 = navigationHistoryStoreModule.CHANNEL_PREFIX;
|
||||
const env0_3 = navigationHistoryStoreModule.GUILD_PREFIX;
|
||||
const env0_4 = navigationHistoryStoreModule.getIdFromHistoryItem;
|
||||
const navigationHistoryStore = importDefault(6936) /* metro dependency 6936: NavigationHistoryStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).ME;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/getPreviousSafeRouteForNsfwReturn.native.tsx');
|
||||
exports.default = getPreviousSafeRouteForNsfwReturn;
|
||||
}
|
||||
|
||||
function getPreviousSafeRouteForNsfwReturn() { // fn#55131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7113:319, offset: 0x01376bc5, size: 437 bytes, params: 1, frame: 28
|
||||
var r9;
|
||||
var r18;
|
||||
var property;
|
||||
var idFromHistoryItem;
|
||||
var startsWith;
|
||||
var getDefaultChannel;
|
||||
var value4;
|
||||
var moduleValue;
|
||||
var isChannelContentGated;
|
||||
var moduleValue2;
|
||||
var isChannelSpoilerGated;
|
||||
var getChannel;
|
||||
var value5;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
var guild_id;
|
||||
var value6;
|
||||
const getState = NavigationHistoryStore.getState;
|
||||
const history = Reflect.apply(getState, NavigationHistoryStore, []).history;
|
||||
const value2 = history.length - 2;
|
||||
if (value2 >= 0) {
|
||||
r9 = value2;
|
||||
reducibleLoop1: while (true) {
|
||||
property = history[r9];
|
||||
idFromHistoryItem = getIdFromHistoryItem(property);
|
||||
startsWith = property.startsWith;
|
||||
if (Reflect.apply(startsWith, property, [CHANNEL_PREFIX])) {
|
||||
getChannel = ChannelStore.getChannel;
|
||||
value5 = Reflect.apply(getChannel, ChannelStore, [idFromHistoryItem]);
|
||||
reducibleJoin13: while (true) {
|
||||
if (value5 == null) {
|
||||
break reducibleJoin13;
|
||||
}
|
||||
moduleValue3 = require(5072) /* metro dependency 5072: AgeGateUtils */;
|
||||
isChannelContentGated = moduleValue3.isChannelContentGated;
|
||||
if (Reflect.apply(isChannelContentGated, moduleValue3, [value5])) {
|
||||
break reducibleJoin13;
|
||||
}
|
||||
moduleValue4 = require(5087) /* metro dependency 5087: SpoilerChannelUtils */;
|
||||
isChannelSpoilerGated = moduleValue4.isChannelSpoilerGated;
|
||||
if (Reflect.apply(isChannelSpoilerGated, moduleValue4, [value5])) {
|
||||
break reducibleJoin13;
|
||||
}
|
||||
break reducibleLoop1;
|
||||
}
|
||||
} else {
|
||||
startsWith = property.startsWith;
|
||||
reducibleJoin13: while (true) {
|
||||
if (Reflect.apply(startsWith, property, [GUILD_PREFIX])) {
|
||||
getDefaultChannel = GuildChannelStore.getDefaultChannel;
|
||||
value4 = Reflect.apply(getDefaultChannel, GuildChannelStore, [idFromHistoryItem]);
|
||||
if (value4 == null) {
|
||||
break reducibleJoin13;
|
||||
}
|
||||
moduleValue = require(5072) /* metro dependency 5072: AgeGateUtils */;
|
||||
isChannelContentGated = moduleValue.isChannelContentGated;
|
||||
if (Reflect.apply(isChannelContentGated, moduleValue, [value4])) {
|
||||
break reducibleJoin13;
|
||||
}
|
||||
moduleValue2 = require(5087) /* metro dependency 5087: SpoilerChannelUtils */;
|
||||
isChannelSpoilerGated = moduleValue2.isChannelSpoilerGated;
|
||||
if (!Reflect.apply(isChannelSpoilerGated, moduleValue2, [value4])) {
|
||||
return {guildId: idFromHistoryItem, channelId: value4.id};
|
||||
}
|
||||
break reducibleJoin13;
|
||||
}
|
||||
break reducibleJoin13;
|
||||
}
|
||||
}
|
||||
value6 = typeof r9 === 'bigint' ? r9 - 1n : +r9 - 1;
|
||||
if (!(value6 >= 0)) {
|
||||
return null;
|
||||
}
|
||||
r9 = value6;
|
||||
continue reducibleLoop1;
|
||||
}
|
||||
guild_id = value5.guild_id;
|
||||
reducibleJoin12: while (true) {
|
||||
if (guild_id != null) {
|
||||
r18 = guild_id;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
r18 = ME;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
return {guildId: r18, channelId: idFromHistoryItem};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
/* Metro module 15653; source: modules/age_gate/native/AgeGateManager.tsx; dependencies: [5, 6, 7, 15, 17, 18, 1379, 1934, 3969, 1229, 661, 5072, 5080, 15654, 1962, 676, 4860, 2] */
|
||||
function _fun119985(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:6, offset: 0x0251d347, size: 358 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
let value = require(1229) /* metro dependency 1229: AgeGateConstants */;
|
||||
const env0_12 = value.EXISTING_USER_AGE_GATE_MODAL_KEY;
|
||||
const env0_13 = value.AgeGateSource;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_14 = value.ChannelTypes;
|
||||
const env0_15 = value.GuildNSFWContentLevel;
|
||||
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun119989(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/AgeGateManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_119986() { // fn#119986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:307, offset: 0x0251d4ad, size: 98 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_119986_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun119989(a0) { // fn#119989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:510, offset: 0x0251d50f, size: 176 bytes, params: 2, frame: 16
|
||||
const closure = AgeGateManager;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: 'handlePostConnectionOpen', value: value_119991}, {key: 'handleChannelSelect',
|
||||
value: value_119992}, {key: 'handleAgeGateModalOpen', value: value_119993}, {key: 'handleAgeGateModalClose',
|
||||
value: function() {
|
||||
importDefault(dependencyMap[12]).popWithKey(EXISTING_USER_AGE_GATE_MODAL_KEY);
|
||||
}}, {key: 'handleGuildUpdate', value: value_119997}]);
|
||||
}
|
||||
|
||||
function AgeGateManager(a0) { // fn#119990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:522, offset: 0x0251d5bf, size: 197 bytes, params: 2, frame: 19
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_4;
|
||||
binding(this, AgeGateManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_7(AgeGateManager);
|
||||
binding = env1_6;
|
||||
if (_isNativeReflectConstruct_119986()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_7(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.actions = {POST_CONNECTION_OPEN: value.handlePostConnectionOpen, CHANNEL_SELECT: value.handleChannelSelect,
|
||||
AGE_GATE_MODAL_OPEN: value.handleAgeGateModalOpen, AGE_GATE_MODAL_CLOSE: value.handleAgeGateModalClose,
|
||||
GUILD_UPDATE: value.handleGuildUpdate};
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_119991() { // fn#119991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1057, offset: 0x0251d684, size: 67 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
(require(5072) /* metro dependency 5072: AgeGateUtils */).maybeShowAgeGate(SelectedGuildStore.getGuildId(),
|
||||
SelectedChannelStore.getChannelId());
|
||||
}
|
||||
|
||||
function value_119992({guildId, channelId}) { // fn#119992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1174, offset: 0x0251d6c7, size: 108 bytes, params: 2, frame: 16
|
||||
const value = environment.__proto__;
|
||||
if (guildId != null && ChannelStore.getChannel(channelId)?.type !== ChannelTypes.GUILD_VOICE) {
|
||||
(require(5072) /* metro dependency 5072: AgeGateUtils */).maybeShowAgeGate(guildId, channelId);
|
||||
}
|
||||
}
|
||||
|
||||
function value_119993({source}) { // fn#119993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1349, offset: 0x0251d733, size: 80 bytes, params: 2, frame: 17
|
||||
const defaultImport = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
||||
defaultImport.pushLazy(env1_3(_fun119995), {source: source}, EXISTING_USER_AGE_GATE_MODAL_KEY);
|
||||
}
|
||||
|
||||
function value_119997({guild}) { // fn#119997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1658, offset: 0x0251d847, size: 112 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const guildId = SelectedGuildStore.getGuildId();
|
||||
if (guildId != null && guild.id === guildId && guild.owner_configured_content_level === GuildNSFWContentLevel.AGE_RESTRICTED) {
|
||||
value = require(5072) /* metro dependency 5072: AgeGateUtils */;
|
||||
value.maybeShowAgeGate(guild.id, null);
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun119995() { // fn#119995, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15861:1391, offset: 0x0251d78e, size: 143 bytes, params: 1, frame: 17
|
||||
var object2;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
const binding = env3_0;
|
||||
const binding2 = env3_2;
|
||||
const value3 = binding(binding2[14]);
|
||||
let property = binding2[13];
|
||||
yield value3(property, binding2.paths);
|
||||
const value4 = undefined;
|
||||
if (false) {
|
||||
return value4;
|
||||
}
|
||||
property = value4.default;
|
||||
const AUTH = env3_13.AUTH;
|
||||
if (AgeGateManager === AUTH) {
|
||||
object2 = {};
|
||||
object2.animation = env3_0(env3_2[15]).ModalAnimation.SLIDE_IN_OUT;
|
||||
property.modalConfig = object2;
|
||||
}
|
||||
return property;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/* Metro module 8581; source: modules/age_gate/native/AgeGateUtils.tsx; dependencies: [1867, 3784, 1878, 661, 477, 5080, 8582, 1962, 7867, 2] */
|
||||
function _fun67879(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8766:6, offset: 0x01c36606, size: 271 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const GuildNSFWContentLevel = constantsModule.GuildNSFWContentLevel;
|
||||
const env0_7 = constantsModule.Permissions;
|
||||
const Set = global.Set;
|
||||
const EXPLICIT = GuildNSFWContentLevel.EXPLICIT;
|
||||
const AGE_RESTRICTED = GuildNSFWContentLevel.AGE_RESTRICTED;
|
||||
const set = new Set([EXPLICIT, AGE_RESTRICTED]);
|
||||
const closure = isNSFWInvite;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/AgeGateUtils.tsx');
|
||||
exports.isNSFWInvite = closure;
|
||||
exports.handleNSFWGuildInvite = handleNSFWGuildInvite;
|
||||
exports.shouldNSFWGateGuild = shouldNSFWGateGuild;
|
||||
}
|
||||
|
||||
function isNSFWInvite(a0) { // fn#67880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8766:232, offset: 0x01c36715, size: 67 bytes, params: 2, frame: 16
|
||||
const binding = env0_8;
|
||||
return binding.has((a0 == null || a0.guild == null ? undefined : a0.guild.nsfw_level) ?? GuildNSFWContentLevel.DEFAULT);
|
||||
}
|
||||
|
||||
function handleNSFWGuildInvite(a0) { // fn#67881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8766:454, offset: 0x01c36758, size: 222 bytes, params: 2, frame: 19
|
||||
var r1;
|
||||
var r0;
|
||||
var isNSFWInvite2;
|
||||
var defaultImport;
|
||||
var pushLazy;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const moduleValue = require(dependencyMap[4]);
|
||||
if (moduleValue.isIOS()) {
|
||||
isNSFWInvite2 = isNSFWInvite(a0);
|
||||
r1 = isNSFWInvite2 ? GuildStore.getGuild(a0 == null || a0.guild == null ? value2 : a0.guild.id) != null : !isNSFWInvite2;
|
||||
if (r1) {
|
||||
r0 = !r1;
|
||||
} else {
|
||||
defaultImport = importDefault(dependencyMap[5]);
|
||||
pushLazy = defaultImport.pushLazy;
|
||||
value = require(dependencyMap[7]);
|
||||
value = value(dependencyMap[6], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport, [value,
|
||||
{guildId: a0 == null || a0.guild == null ? value2 : a0.guild.id}]);
|
||||
value = true;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function shouldNSFWGateGuild(a0) { // fn#67882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8766:709, offset: 0x01c36836, size: 310 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var r3;
|
||||
var guild;
|
||||
var currentUser;
|
||||
var nsfwLevel;
|
||||
var value8;
|
||||
var value9;
|
||||
var nsfwAllowed;
|
||||
var value;
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
guild = GuildStore.getGuild(a0);
|
||||
currentUser = UserStore.getCurrentUser();
|
||||
if (guild == null) {
|
||||
return false;
|
||||
}
|
||||
if (currentUser == null) {
|
||||
return false;
|
||||
}
|
||||
r0 = PermissionStore.can(Permissions.ADMINISTRATOR, guild) || PermissionStore.can(Permissions.MANAGE_GUILD,
|
||||
guild);
|
||||
r0 = !r0 ? PermissionStore.can(Permissions.KICK_MEMBERS, guild) : r0;
|
||||
r0 = !r0 ? PermissionStore.can(Permissions.BAN_MEMBERS, guild) : r0;
|
||||
nsfwLevel = guild.nsfwLevel;
|
||||
value8 = nsfwLevel === GuildNSFWContentLevel.AGE_RESTRICTED;
|
||||
nsfwLevel = guild.nsfwLevel;
|
||||
value9 = nsfwLevel === GuildNSFWContentLevel.EXPLICIT;
|
||||
nsfwAllowed = currentUser.nsfwAllowed;
|
||||
if (nsfwAllowed) {
|
||||
value = require(7867) /* metro dependency 7867: AgeRestrictedContentSettingsUtils */;
|
||||
value = value.getViewNsfwGuildsOrDefault();
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = nsfwAllowed;
|
||||
}
|
||||
value = !r0;
|
||||
r0 = r0 ? value : value9 ? !!value9 : value8 && !r3;
|
||||
return r0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 15655; source: modules/age_gate/native/ExistingUserAgeGateConstants.tsx; dependencies: [2] */
|
||||
function _fun120020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15863:6, offset: 0x0251e187, size: 144 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/ExistingUserAgeGateConstants.tsx');
|
||||
exports.ExistingUserAgeGateScreens = {AgeGate: 'AgeGate', AgeGateConfirm: 'AgeGateConfirm', Blocked: 'Blocked',
|
||||
NSFWBlocked: 'NSFWBlocked', NSFWGateGuild: 'NSFWGateGuild', Pawtect: 'Pawtect'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
/* Metro module 14344; source: modules/age_gate/native/components/AgeGateUnderage.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 8973, 1484, 5282, 5286, 1244, 8584, 9004, 5473, 9003, 6766, 1948, 4573, 4578, 2] */
|
||||
function _fun108552(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14541:6, offset: 0x023251d9, size: 237 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.Fragment;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun108553);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/AgeGateUnderage.tsx');
|
||||
exports.default = AgeGateUnderage;
|
||||
}
|
||||
|
||||
function _fun108553(a0) { // fn#108553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14541:212, offset: 0x023252c6, size: 128 bytes, params: 2, frame: 14
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
return {container: {'alignItems': 'center', 'justifyContent': 'center', 'flex': 1, 'padding': 16, 'paddingTop': 0,
|
||||
paddingBottom: a0 ? 80 : 0, backgroundColor: BACKGROUND_BASE_LOW}, header: {marginTop: 16},
|
||||
body: {'marginTop': 8, 'lineHeight': 20, 'textAlign': 'center'}, buttonWrapper: {'width': '100%',
|
||||
'marginTop': 24}};
|
||||
}
|
||||
|
||||
function AgeGateUnderage({onClose, underageMessage, existingUser, fromRegister, disableSwipe}) { // fn#108554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14541:595, offset: 0x02325346, size: 1008 bytes, params: 2, frame: 34
|
||||
var r20;
|
||||
var r11;
|
||||
var r5;
|
||||
var format;
|
||||
var b0QzXe;
|
||||
var object;
|
||||
var intl2;
|
||||
var defaultImport4;
|
||||
var jsxRuntimeEnv0_7Binding;
|
||||
var items2;
|
||||
var Button;
|
||||
var object9;
|
||||
existingUser = !(existingUser === undefined) && existingUser;
|
||||
fromRegister = !(fromRegister === undefined) && fromRegister;
|
||||
disableSwipe = !(disableSwipe === undefined) && disableSwipe;
|
||||
const value2 = (importDefault(8973) /* metro dependency 8973: useWideAuthView */)();
|
||||
const styles = useStyles(value2);
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
value3.useLayoutEffect(_fun108555, [onClose, existingUser, value3, disableSwipe]);
|
||||
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(function() {
|
||||
onClose();
|
||||
return true;
|
||||
});
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r15 = existingUser ? Reflect.apply(string, intl, [t['NR/zrG']]) : Reflect.apply(string, intl, [t.nCB6Ga]);
|
||||
const items3 = [value2 ? null : ((Component) => <Component />)(importDefault(8584) /* metro dependency 8584: BackgroundImage */)];
|
||||
items3[1] = ((Component) => <Component />)(importDefault(9004) /* metro dependency 9004: AuthNavbarPlaceholder */);
|
||||
const ShieldSpotIllustration = (require(5473) /* metro dependency 5473: native */).ShieldSpotIllustration;
|
||||
items3[2] = <ShieldSpotIllustration />;
|
||||
items3[3] = ((Component) => <Component style={styles.header}>{r15}</Component>)(importDefault(9003) /* metro dependency 9003: AuthHeader */);
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
if (fromRegister) {
|
||||
r11 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.GDQgHL);
|
||||
} else {
|
||||
format = intl.format;
|
||||
b0QzXe = (require(1244) /* metro dependency 1244: indexNative */).t.b0QzXe;
|
||||
object = {};
|
||||
if (underageMessage != null) {
|
||||
r20 = underageMessage;
|
||||
} else {
|
||||
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r20 = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.WqEH4D);
|
||||
}
|
||||
object.underageMessage = r20;
|
||||
defaultImport4 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
object.helpURL = defaultImport4.getArticleURL(HelpdeskArticles.AGE_GATE);
|
||||
r11 = Reflect.apply(format, intl, [b0QzXe, object]);
|
||||
}
|
||||
items3[4] = <TextWithIOSLinkWorkaround style={styles.body} variant="text-md/medium" color="interactive-text-default">{r11}</TextWithIOSLinkWorkaround>;
|
||||
if (existingUser) {
|
||||
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
||||
items2 = [((Text) => <Text style={styles.body} variant="text-md/medium" color="interactive-text-default">{intl.format(t['3axQdB'],
|
||||
|
||||
{days: 30})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)];
|
||||
var viewBinding2Props = {style: styles.buttonWrapper};
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items2[1] = <View {...viewBinding2Props}><Button onPress={onClose} text={intl.string(t.JhDw5o)} grow /></View>;
|
||||
r5 = <>{items2}</>;
|
||||
} else {
|
||||
r5 = null;
|
||||
}
|
||||
items3[5] = r5;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun108555() { // fn#108555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14541:773, offset: 0x02325736, size: 99 bytes, params: 1, frame: 15
|
||||
var environment;
|
||||
var r4;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
const binding = env0_3;
|
||||
const setOptions = binding.setOptions;
|
||||
if (existingUser) {
|
||||
r4 = function() {
|
||||
return null;
|
||||
};
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
|
||||
r4 = moduleValue.getHeaderBackButton(onClose);
|
||||
}
|
||||
Reflect.apply(setOptions, binding, [{headerLeft: r4, gestureEnabled: !disableSwipe}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* Metro module 15660; source: modules/age_gate/native/components/AgeGateVerify.tsx; dependencies: [31, 27, 33, 4501, 697, 5072, 4813, 6618, 5473, 4573, 4578, 5263, 5074, 2] */
|
||||
function _fun120052(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15868:6, offset: 0x0251f57b, size: 306 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'padding': null, 'flex': 1, 'alignItems': 'center', 'justifyContent': 'center'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.padding = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.gap = PX_16;
|
||||
const env0_6 = Reflect.apply(createStyles, value, [{container: object, header: {textAlign: 'center'},
|
||||
body: {textAlign: 'center'}, buttonWrapper: {width: '100%'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/AgeGateVerify.tsx');
|
||||
exports.default = AgeGateVerify;
|
||||
}
|
||||
|
||||
function AgeGateVerify({source}) { // fn#120053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15868:467, offset: 0x0251f6ad, size: 389 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const {verifyAgreementButtonText, verifyGateDescription,
|
||||
verifyTitle} = (require(5072) /* metro dependency 5072: AgeGateUtils */).useAgeGateVerifyContent(source);
|
||||
(require(4813) /* metro dependency 4813: AgeVerificationUtils */).useMaybePerformReactiveCheckForSource(source);
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const ShieldSpotIllustration = (require(5473) /* metro dependency 5473: native */).ShieldSpotIllustration;
|
||||
const items2 = [<ShieldSpotIllustration />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <Text style={styles.header} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{verifyTitle}</Text>;
|
||||
items2[2] = <Text style={styles.body} variant="text-md/medium" color="interactive-text-default">{verifyGateDescription}</Text>;
|
||||
items2[3] = verifyAgreementButtonText != null && <View style={styles.buttonWrapper}>{((Button) => <Button text={verifyAgreementButtonText} onPress={function() {
|
||||
var defaultImport = importDefault(dependencyMap[11]);
|
||||
var object = {};
|
||||
object.entryPoint = require(dependencyMap[12]).AgeVerificationModalEntryPoint.NSFW_AGE_GATE;
|
||||
defaultImport.showAgeVerificationGetStartedModal(object);
|
||||
}} grow />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
|
||||
return (
|
||||
<SafeAreaPaddingView top style={styles.container}>
|
||||
{items2}
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* Metro module 8583; source: modules/age_gate/native/components/Constants.tsx; dependencies: [2] */
|
||||
function _fun67886(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8768:6, offset: 0x01c36e43, size: 111 bytes, params: 8, frame: 16
|
||||
var object2;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object2 = {MODAL: 0};
|
||||
object2[0] = 'MODAL';
|
||||
object2.GUILD_SIDEBAR = 1;
|
||||
object2[1] = 'GUILD_SIDEBAR';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/Constants.tsx');
|
||||
exports.NsfwGateSource = object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
/* Metro module 15658; source: modules/age_gate/native/components/DateInput.tsx; dependencies: [31, 27, 33, 3738, 4080, 9066, 1962, 8967, 1305, 2] */
|
||||
function _fun120038(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15866:6, offset: 0x0251eda7, size: 197 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const initialDate = function() {
|
||||
return subtractYearsFromToday(10);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).Keyboard;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.forwardRef(_fun120041);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/DateInput.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function subtractYearsFromToday(a0) { // fn#120039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15866:139, offset: 0x0251ee6c, size: 73 bytes, params: 2, frame: 13
|
||||
const value = (importDefault(3738) /* metro dependency 3738 */)();
|
||||
value.set('year', value.year() - a0);
|
||||
return value.toDate();
|
||||
}
|
||||
|
||||
function _fun120041({date, onChangeDate, label, style, error}, a1) { // fn#120041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15866:310, offset: 0x0251eec8, size: 382 bytes, params: 3, frame: 24
|
||||
const env0_3 = undefined;
|
||||
const closure = onPress_120043;
|
||||
const binding = env0_3;
|
||||
const value3 = binding.useRef(null);
|
||||
binding.useImperativeHandle(a1, function() {
|
||||
return {focus: _fun120045};
|
||||
});
|
||||
const r7 = date?.format('L') ?? undefined;
|
||||
const value6 = (importDefault(3738) /* metro dependency 3738 */)(initialDate()).format('L');
|
||||
const FreeFormInputGroup = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
|
||||
const value7 = '';
|
||||
const r12 = r7 ?? value7;
|
||||
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
|
||||
const NEVER = ClearButtonVisibility.NEVER;
|
||||
return (
|
||||
<FreeFormInputGroup
|
||||
style={style}
|
||||
ref={value3}
|
||||
value={r12}
|
||||
placeholder={value6}
|
||||
returnKeyType="next"
|
||||
textContentType="none"
|
||||
autoCapitalize="none"
|
||||
clearButtonVisibility={NEVER}
|
||||
editable={false}
|
||||
forceAccessibleContainer
|
||||
accessibilityLabel={value7 + label + ', ' + (r7 ?? value6)}
|
||||
onPress={closure}
|
||||
label={label}
|
||||
error={error}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function updateDate(a0) { // fn#120042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15866:393, offset: 0x0251f046, size: 44 bytes, params: 2, frame: 12
|
||||
onChangeDate(a0);
|
||||
const current = env0_3.current;
|
||||
if (current != null) {
|
||||
current.blur();
|
||||
}
|
||||
}
|
||||
|
||||
function onPress_120043() { // fn#120043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15866:457, offset: 0x0251f072, size: 199 bytes, params: 1, frame: 20
|
||||
Keyboard.dismiss();
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(dependencyMap[4]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
const value3 = require(dependencyMap[6])(dependencyMap[5], dependencyMap.paths);
|
||||
const object2 = {};
|
||||
object2.onSubmit = updateDate;
|
||||
object2.title = label;
|
||||
let r6 = date == null ? value2 : date.toDate();
|
||||
r6 = r6 ?? initialDate();
|
||||
object2.startDate = r6;
|
||||
const subtractYearsFromTodayBinding = subtractYearsFromToday;
|
||||
object2.maximumDate = subtractYearsFromTodayBinding(3);
|
||||
object2.minimumDate = subtractYearsFromTodayBinding(100);
|
||||
object2.requireDateChanged = true;
|
||||
Reflect.apply(openLazy, defaultImport, [value3, 'DatePicker', object2]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun120044() { // fn#120044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15866:771, offset: 0x0251f139, size: 18 bytes, params: 1, frame: 2
|
||||
return {focus: function() {
|
||||
onPress_120043();
|
||||
}};
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,126 @@
|
||||
/* Metro module 15659; source: modules/age_gate/native/components/ExistingUserAgeGateConfirm.tsx; dependencies: [5, 57, 31, 27, 661, 33, 4501, 1484, 6618, 4573, 1244, 6766, 1948, 4578, 2] */
|
||||
function _fun120046(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15867:6, offset: 0x0251f14b, size: 325 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_7 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'padding': 16,
|
||||
'flex': 1, 'alignItems': 'center', 'justifyContent': 'center'}, header: {'textAlign': 'center',
|
||||
'marginBottom': 8}, body: {'textAlign': 'center', 'lineHeight': 20, 'marginBottom': 16},
|
||||
buttonWrapper: {width: '100%'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/ExistingUserAgeGateConfirm.tsx');
|
||||
exports.default = ExistingUserAgeGateConfirm;
|
||||
}
|
||||
|
||||
function ExistingUserAgeGateConfirm({age, onConfirm}) { // fn#120047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15867:536, offset: 0x0251f290, size: 581 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const [property, env0_2] = env0_4(env0_5.useState(false), 2);
|
||||
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let format = intl.format;
|
||||
const items2 = [<Text style={styles.header} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(format,
|
||||
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.wumolR, {age: age}])}</Text>];
|
||||
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
|
||||
format = intl.format;
|
||||
const n3QjDE = (require(1244) /* metro dependency 1244: indexNative */).t.n3QjDE;
|
||||
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
const getArticleURL = defaultImport.getArticleURL;
|
||||
const AGE_GATE = HelpdeskArticles.AGE_GATE;
|
||||
items2[1] = <TextWithIOSLinkWorkaround style={styles.body} variant="text-md/medium" color="interactive-text-default">{Reflect.apply(format,
|
||||
intl, [n3QjDE, {helpURL: Reflect.apply(getArticleURL, defaultImport, [AGE_GATE])}])}</TextWithIOSLinkWorkaround>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items2[2] = <View style={styles.buttonWrapper}><Button loading={property} disabled={property} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6tahin'])} onPress={function() {
|
||||
return ExistingUserAgeGateConfirm_handleConfirm.apply(this, arguments);
|
||||
}} grow /></View>;
|
||||
return (
|
||||
<SafeAreaPaddingView top style={styles.container}>
|
||||
{items2}
|
||||
</SafeAreaPaddingView>
|
||||
);
|
||||
}
|
||||
|
||||
function ExistingUserAgeGateConfirm_handleConfirm() { // fn#120048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15867:669, owner: ExistingUserAgeGateConfirm._handleConfirm, offset: 0x0251f4d5, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return env1_3(_fun120050).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun120050() { // fn#120050, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15867:720, offset: 0x0251f515, size: 102 bytes, params: 1, frame: 14
|
||||
var moduleValue;
|
||||
var value3;
|
||||
var value4;
|
||||
var shouldShowError;
|
||||
var pop;
|
||||
var error;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
dependencyMap(true);
|
||||
reducibleJoin3: while (true) {
|
||||
reduciblePort14: while (true) {
|
||||
exceptionLanding13: while (true) {
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding13;
|
||||
}
|
||||
break reducibleJoin3;
|
||||
}
|
||||
pop = importDefault.pop;
|
||||
Reflect.apply(pop, importDefault, []);
|
||||
break reduciblePort14;
|
||||
}
|
||||
dependencyMap(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
moduleValue = require();
|
||||
} catch (error) {
|
||||
break exceptionLanding13;
|
||||
}
|
||||
yield moduleValue;
|
||||
try {
|
||||
value3 = undefined;
|
||||
value4 = false;
|
||||
} catch (error) {
|
||||
break exceptionLanding13;
|
||||
}
|
||||
if (value4) {
|
||||
return value3;
|
||||
}
|
||||
try {
|
||||
shouldShowError = value3.shouldShowError;
|
||||
} catch (error) {
|
||||
break exceptionLanding13;
|
||||
}
|
||||
reducibleJoin14: while (true) {
|
||||
if (shouldShowError) {
|
||||
try {
|
||||
} catch (error) {
|
||||
break exceptionLanding13;
|
||||
}
|
||||
try {
|
||||
pop = importDefault.pop;
|
||||
} catch (error) {
|
||||
break exceptionLanding13;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(pop, importDefault, []);
|
||||
} catch (error) {
|
||||
break exceptionLanding13;
|
||||
}
|
||||
break reducibleJoin14;
|
||||
}
|
||||
break reducibleJoin14;
|
||||
}
|
||||
dependencyMap(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
/* Metro module 15654; source: modules/age_gate/native/components/ExistingUserAgeGateModal.tsx; dependencies: [31, 3969, 1229, 15655, 661, 33, 477, 3857, 15656, 1244, 5075, 6593, 5080, 683, 480, 5282, 15657, 15659, 15660, 14344, 8582, 5072, 4813, 5280, 2] */
|
||||
function _fun119998(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:6, offset: 0x0251d8b7, size: 267 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const renderHeaderTitle = function() {
|
||||
return null;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const ageGateConstantsModule = require(1229) /* metro dependency 1229: AgeGateConstants */;
|
||||
const env0_5 = ageGateConstantsModule.AgeGateAnalyticAction;
|
||||
const env0_6 = ageGateConstantsModule.AgeGateSource;
|
||||
const env0_7 = (require(15655) /* metro dependency 15655: ExistingUserAgeGateConstants */).ExistingUserAgeGateScreens;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/ExistingUserAgeGateModal.tsx');
|
||||
exports.default = ExistingUserAgeGateModal;
|
||||
}
|
||||
|
||||
function onClose_119999() { // fn#119999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:246, offset: 0x0251d9c2, size: 37 bytes, params: 1, frame: 11
|
||||
(require(5075) /* metro dependency 5075: AgeGateModalActionCreators */).closeAgeGateModal();
|
||||
}
|
||||
|
||||
function getScreens_120001(a0) { // fn#120001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:335, offset: 0x0251d9e7, size: 404 bytes, params: 2, frame: 23
|
||||
const env0_0 = a0;
|
||||
const r6 = generateOnBack(a0) ?? (function() {
|
||||
});
|
||||
const object3 = {};
|
||||
const AgeGate = ExistingUserAgeGateScreens.AgeGate;
|
||||
const object4 = {fullscreen: true};
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const USER_AGE_GATE = ImpressionNames.USER_AGE_GATE;
|
||||
object4.impressionName = USER_AGE_GATE;
|
||||
object4.impressionProperties = {existing_user: true};
|
||||
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(r6);
|
||||
const renderHeaderTitleBinding = renderHeaderTitle;
|
||||
object4.headerTitle = renderHeaderTitleBinding;
|
||||
object4.render = render_120009;
|
||||
object3[AgeGate] = object4;
|
||||
const AgeGateConfirm = ExistingUserAgeGateScreens.AgeGateConfirm;
|
||||
object3[AgeGateConfirm] = {fullscreen: true, headerTitle: renderHeaderTitleBinding, render: render_120013};
|
||||
const Pawtect = ExistingUserAgeGateScreens.Pawtect;
|
||||
const object6 = {fullscreen: true};
|
||||
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(r6);
|
||||
const USER_AGE_GATE_VERIFY = ImpressionNames.USER_AGE_GATE_VERIFY;
|
||||
object6.impressionName = USER_AGE_GATE_VERIFY;
|
||||
object6.headerTitle = renderHeaderTitleBinding;
|
||||
object6.render = render_120014;
|
||||
object3[Pawtect] = object6;
|
||||
const Blocked = ExistingUserAgeGateScreens.Blocked;
|
||||
object3[Blocked] = {fullscreen: true, headerTitle: renderHeaderTitleBinding,
|
||||
impressionProperties: {existing_user: true}, render: render_120015};
|
||||
const NSFWGateGuild = ExistingUserAgeGateScreens.NSFWGateGuild;
|
||||
const object7 = {headerTitle: renderHeaderTitleBinding};
|
||||
object7.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(r6);
|
||||
object7.render = render_120016;
|
||||
object3[NSFWGateGuild] = object7;
|
||||
return object3;
|
||||
}
|
||||
|
||||
function ExistingUserAgeGateModal({source}) { // fn#120017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:2386, offset: 0x0251e043, size: 265 bytes, params: 2, frame: 22
|
||||
const value2 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useShouldAgeVerifyForAgeGate();
|
||||
const binding = env0_3;
|
||||
const env0_1 = binding.useRef(value2);
|
||||
const ageVerificationUtilsModule = require(4813) /* metro dependency 4813: AgeVerificationUtils */;
|
||||
const useWatchAgeVerificationStatusChange = ageVerificationUtilsModule.useWatchAgeVerificationStatusChange;
|
||||
const useCallback = binding.useCallback;
|
||||
Reflect.apply(useWatchAgeVerificationStatusChange, ageVerificationUtilsModule, [Reflect.apply(useCallback, binding,
|
||||
[_fun120018, [source]])]);
|
||||
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
||||
const useMemo = binding.useMemo;
|
||||
const items2 = [source];
|
||||
const r5 = value2 ? ExistingUserAgeGateScreens.Pawtect : ExistingUserAgeGateScreens.AgeGate;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Navigator
|
||||
screens={Reflect.apply(useMemo, binding, [function() {
|
||||
return getScreens_120001(source);
|
||||
}, items2])}
|
||||
initialRouteName={r5}
|
||||
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function generateOnBack(a0) { // fn#120002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:375, owner: getScreens_120001.generateOnBack, offset: 0x0251db7b, size: 193 bytes, params: 2, frame: 4
|
||||
const env0_0 = a0;
|
||||
const NSFW_SERVER_INVITE = AgeGateSource.NSFW_SERVER_INVITE;
|
||||
if (NSFW_SERVER_INVITE === a0) {
|
||||
return _fun120003;
|
||||
}
|
||||
const NSFW_SERVER_INVITE_EMBED = AgeGateSource.NSFW_SERVER_INVITE_EMBED;
|
||||
if (NSFW_SERVER_INVITE_EMBED === a0) {
|
||||
return _fun120003;
|
||||
}
|
||||
const JOIN_LARGE_GUILD_UNDERAGE = AgeGateSource.JOIN_LARGE_GUILD_UNDERAGE;
|
||||
if (JOIN_LARGE_GUILD_UNDERAGE === a0) {
|
||||
return _fun120004;
|
||||
}
|
||||
const ACCESS_LARGE_GUILD_UNDERAGE = AgeGateSource.ACCESS_LARGE_GUILD_UNDERAGE;
|
||||
if (ACCESS_LARGE_GUILD_UNDERAGE === a0) {
|
||||
return _fun120004;
|
||||
}
|
||||
const LARGE_GUILD = AgeGateSource.LARGE_GUILD;
|
||||
if (LARGE_GUILD === a0) {
|
||||
return _fun120004;
|
||||
}
|
||||
const NSFW_SERVER = AgeGateSource.NSFW_SERVER;
|
||||
if (NSFW_SERVER === a0) {
|
||||
return _fun120004;
|
||||
}
|
||||
const NSFW_CHANNEL = AgeGateSource.NSFW_CHANNEL;
|
||||
if (NSFW_CHANNEL === a0) {
|
||||
return _fun120005;
|
||||
}
|
||||
const NSFW_VOICE_CHANNEL = AgeGateSource.NSFW_VOICE_CHANNEL;
|
||||
if (NSFW_VOICE_CHANNEL === a0) {
|
||||
return _fun120006;
|
||||
}
|
||||
const FAMILY_CENTER = AgeGateSource.FAMILY_CENTER;
|
||||
if (FAMILY_CENTER === a0) {
|
||||
return _fun120007;
|
||||
}
|
||||
}
|
||||
|
||||
function getScreens_120001Render(a0, a1) { // fn#120009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:1281, owner: getScreens_120001.render, offset: 0x0251dda8, size: 82 bytes, params: 3, frame: 17
|
||||
const binding = env0_0;
|
||||
return ((Component) => <Component onSuccess={generateOnSuccess(binding,
|
||||
a1)} onClose={onClose_119999} source={binding} />)(importDefault(15657) /* metro dependency 15657: ExistingUserAgeGate */);
|
||||
}
|
||||
|
||||
function getScreens_120001Render_120013(a0) { // fn#120013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:1788, owner: getScreens_120001.render, offset: 0x0251df6f, size: 65 bytes, params: 2, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component {...a0} {...{['source']: env0_0}} />)(importDefault(15659) /* metro dependency 15659: ExistingUserAgeGateConfirm */);
|
||||
}
|
||||
|
||||
function getScreens_120001Render_120014() { // fn#120014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:1988, owner: getScreens_120001.render, offset: 0x0251dfb0, size: 50 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component source={env0_0} />)(importDefault(15660) /* metro dependency 15660: AgeGateVerify */);
|
||||
}
|
||||
|
||||
function getScreens_120001Render_120015(a0) { // fn#120015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:2120, owner: getScreens_120001.render, offset: 0x0251dfe2, size: 49 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component {...a0} />)(importDefault(14344) /* metro dependency 14344: AgeGateUnderage */);
|
||||
}
|
||||
|
||||
function getScreens_120001Render_120016() { // fn#120016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:2242, owner: getScreens_120001.render, offset: 0x0251e013, size: 48 bytes, params: 1, frame: 14
|
||||
return ((Component) => <Component onClose={onClose_119999} />)(importDefault(8582) /* metro dependency 8582: NsfwGateGuild */);
|
||||
}
|
||||
|
||||
function _fun120018() { // fn#120018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:2559, offset: 0x0251e14c, size: 59 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (env0_1.current) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(5075) /* metro dependency 5075: AgeGateModalActionCreators */;
|
||||
moduleValue.closeAgeGateModal(source);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120003() { // fn#120003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:476, offset: 0x0251dc3c, size: 45 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(5075) /* metro dependency 5075: AgeGateModalActionCreators */).closeAgeGateModal(env0_0);
|
||||
}
|
||||
|
||||
function _fun120004() { // fn#120004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:624, offset: 0x0251dc69, size: 124 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__.__proto__;
|
||||
const guildId = SelectedGuildStore.getGuildId();
|
||||
if (guildId != null) {
|
||||
(importDefault(6593) /* metro dependency 6593: GuildActionCreators */).nsfwReturnToSafety(guildId);
|
||||
}
|
||||
(require(5075) /* metro dependency 5075: AgeGateModalActionCreators */).closeAgeGateModal(env0_0);
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
|
||||
}
|
||||
|
||||
function _fun120005() { // fn#120005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:765, offset: 0x0251dce5, size: 98 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
const guildId = SelectedGuildStore.getGuildId();
|
||||
if (guildId != null) {
|
||||
(importDefault(6593) /* metro dependency 6593: GuildActionCreators */).nsfwReturnToSafety(guildId);
|
||||
}
|
||||
(require(5075) /* metro dependency 5075: AgeGateModalActionCreators */).closeAgeGateModal(env0_0);
|
||||
}
|
||||
|
||||
function _fun120006() { // fn#120006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:894, offset: 0x0251dd47, size: 97 bytes, params: 1, frame: 16
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popAll();
|
||||
const defaultImport2 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport2.track;
|
||||
const AGE_GATE_ACTION = AnalyticEvents.AGE_GATE_ACTION;
|
||||
const AGE_GATE_CLOSE = AgeGateAnalyticAction.AGE_GATE_CLOSE;
|
||||
Reflect.apply(track, defaultImport2, [AGE_GATE_ACTION, {source: env0_0, action: AGE_GATE_CLOSE}]);
|
||||
}
|
||||
|
||||
function generateOnSuccess(a0, a1) { // fn#120010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:1299, owner: getScreens_120001.render.generateOnSuccess, offset: 0x0251ddfa, size: 82 bytes, params: 3, frame: 12
|
||||
var environment;
|
||||
var r0;
|
||||
const env0_0 = a1;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const NSFW_SERVER_INVITE = AgeGateSource.NSFW_SERVER_INVITE;
|
||||
if (a0 !== NSFW_SERVER_INVITE) {
|
||||
r0 = _fun120012;
|
||||
} else {
|
||||
value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
r0 = value.isIOS() ? _fun120011 : _fun120012;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun120011() { // fn#120011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:1380, offset: 0x0251de4c, size: 148 bytes, params: 1, frame: 17
|
||||
const push = require.push;
|
||||
const NSFWGateGuild = ExistingUserAgeGateScreens.NSFWGateGuild;
|
||||
Reflect.apply(push, require, [NSFWGateGuild]);
|
||||
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
const open = defaultImport.open;
|
||||
const object2 = {key: 'AGE_GATE_AGE_VERIFIED', icon: importDefault(15656) /* metro dependency 15656 */};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gUiIGZ);
|
||||
Reflect.apply(open, defaultImport, [object2]);
|
||||
}
|
||||
|
||||
function _fun120012() { // fn#120012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15862:1513, offset: 0x0251dee0, size: 143 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
(require(5075) /* metro dependency 5075: AgeGateModalActionCreators */).closeAgeGateModal();
|
||||
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
const open = value.open;
|
||||
const object2 = {key: 'AGE_GATE_AGE_VERIFIED', icon: importDefault(15656) /* metro dependency 15656 */};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gUiIGZ);
|
||||
Reflect.apply(open, value, [object2]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/* Metro module 11980; source: modules/age_gate/native/components/NsfwGateChat.tsx; dependencies: [31, 27, 33, 4501, 697, 11981, 4573, 1244, 2] */
|
||||
function _fun91969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12166:6, offset: 0x0207835c, size: 328 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.Image;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
const env0_7 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.container = {'flex': 1, 'backgroundColor': null, 'alignItems': 'center', 'justifyContent': 'center',
|
||||
backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const object4 = {};
|
||||
object4.height = StyleSheet.hairlineWidth;
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
object2.border = object4;
|
||||
object2.description = {'marginTop': 16, 'textAlign': 'center'};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/NsfwGateChat.tsx');
|
||||
exports.default = _default_91970;
|
||||
}
|
||||
|
||||
function _default_91970() { // fn#91970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12166:469, offset: 0x020784a4, size: 247 bytes, params: 1, frame: 25
|
||||
const styles = useStyles();
|
||||
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
||||
const view = <View style={styles.border} />;
|
||||
const image = <Image source={importDefault(11981) /* metro dependency 11981 */} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const W4Qyxr = (require(1244) /* metro dependency 1244: indexNative */).t.W4Qyxr;
|
||||
return (
|
||||
<>
|
||||
{view}
|
||||
<View style={styles.container}>
|
||||
{image}
|
||||
<Text
|
||||
style={styles.description}
|
||||
variant="text-md/medium"
|
||||
color="text-muted"
|
||||
>
|
||||
{Reflect.apply(string, intl, [W4Qyxr])}
|
||||
</Text>
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
/* Metro module 8582; source: modules/age_gate/native/components/NsfwGateGuild.tsx; dependencies: [31, 27, 1945, 1878, 8583, 661, 33, 4501, 697, 1244, 1948, 683, 7867, 8584, 8587, 4573, 4578, 2] */
|
||||
function _fun67883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8767:6, offset: 0x01c3696c, size: 391 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_4 = value.View;
|
||||
const env0_5 = value.Image;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_8 = (require(8583) /* metro dependency 8583: Constants */).NsfwGateSource;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = value.AnalyticEvents;
|
||||
const env0_10 = value.HelpdeskArticles;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
const env0_13 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'alignItems': 'center',
|
||||
'justifyContent': 'center', 'padding': 16, backgroundColor: BACKGROUND_BASE_LOW},
|
||||
header: {'textAlign': 'center', 'marginBottom': 8}, description: {'textAlign': 'center', 'marginBottom': 16},
|
||||
image: {marginBottom: 16}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/NsfwGateGuild.tsx');
|
||||
exports.default = _default_67884;
|
||||
}
|
||||
|
||||
function _default_67884({onClose, guildId}) { // fn#67884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8767:533, offset: 0x01c36af3, size: 636 bytes, params: 2, frame: 28
|
||||
const styles = useStyles();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const value2 = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.vAymlG]);
|
||||
string = intl.string;
|
||||
const Crj6eC = (require(1244) /* metro dependency 1244: indexNative */).t.Crj6eC;
|
||||
const value3 = Reflect.apply(string, intl, [Crj6eC]);
|
||||
const format = intl.format;
|
||||
const Z12LNW = (require(1244) /* metro dependency 1244: indexNative */).t.Z12LNW;
|
||||
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
const getArticleURL = defaultImport.getArticleURL;
|
||||
const NSFW_GUILD_GUIDELINES = HelpdeskArticles.NSFW_GUILD_GUIDELINES;
|
||||
const value4 = Reflect.apply(format, intl, [Z12LNW, {helpURL: Reflect.apply(getArticleURL, defaultImport,
|
||||
[NSFW_GUILD_GUIDELINES])}]);
|
||||
env0_3.useEffect(_fun67885, [guildId, UserStore.getCurrentUser()]);
|
||||
const items2 = [((Component) => <Component />)(importDefault(8584) /* metro dependency 8584: BackgroundImage */)];
|
||||
items2[1] = <Image source={importDefault(8587) /* metro dependency 8587 */} style={styles.image} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[2] = <Text style={styles.header} variant="heading-xl/extrabold" color="mobile-text-heading-primary">{value2}</Text>;
|
||||
items2[3] = <Text style={styles.description} variant="text-md/normal" color="text-default">{value3}</Text>;
|
||||
items2[4] = <Text style={styles.description} variant="text-md/normal" color="text-default">{value4}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items2[5] = <Button onPress={onClose} size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.gRqiWV)} />;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun67885() { // fn#67885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8767:788, offset: 0x01c36d6f, size: 212 bytes, params: 1, frame: 22
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const GUILD_NSFW_GATE_VIEWED = AnalyticEvents.GUILD_NSFW_GATE_VIEWED;
|
||||
const object2 = {};
|
||||
object2.guild_id = guildId;
|
||||
object2.user_id = env0_1 == null ? value2 : env0_1.id;
|
||||
object2.is_member = GuildMemberStore.isMember(guildId, env0_1 == null ? value2 : env0_1.id);
|
||||
object2.is_user_opted_in_to_age_restricted_servers = (env0_1 == null ? value2 : env0_1.nsfwAllowed) && (require(7867) /* metro dependency 7867: AgeRestrictedContentSettingsUtils */).getViewNsfwGuildsOrDefault();
|
||||
const MODAL = NsfwGateSource.MODAL;
|
||||
object2.source = MODAL;
|
||||
Reflect.apply(track, defaultImport, [GUILD_NSFW_GATE_VIEWED, object2]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/* Metro module 12682; source: modules/age_gate/native/components/NsfwGateGuildSettingsActionSheet.tsx; dependencies: [31, 33, 12683, 6805, 6758, 6807, 1244, 4080, 6613, 12684, 2] */
|
||||
function _fun97164(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12872:6, offset: 0x021755f5, size: 147 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/NsfwGateGuildSettingsActionSheet.tsx');
|
||||
exports.default = NsfwGateGuildSettingsActionSheet;
|
||||
}
|
||||
|
||||
function NsfwGateGuildSettingsActionSheet({guild}) { // fn#97165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12872:247, offset: 0x02175688, size: 403 bytes, params: 2, frame: 28
|
||||
var object2;
|
||||
const value2 = (require(12683) /* metro dependency 12683: useMessageRequestPrivacyOption */).useMessageRequestPrivacyOption({guild: guild});
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
object2 = {};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
object2.header = <BottomSheetTitleHeader title={guild.name} />;
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
const Group = ActionSheetRow.Group;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const items2 = [<ActionSheetRow label={Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.h850Ss])} onPress={onPress_97166} />];
|
||||
const RestrictedGuildPrivacyOption = (require(12684) /* metro dependency 12684: GuildActionSheetActions */).RestrictedGuildPrivacyOption;
|
||||
items2[1] = <RestrictedGuildPrivacyOption guild={guild} />;
|
||||
items2[2] = value2;
|
||||
string = intl.string;
|
||||
const J2TBi3 = (require(1244) /* metro dependency 1244: indexNative */).t.J2TBi3;
|
||||
items2[3] = <ActionSheetRow variant="danger" label={Reflect.apply(string, intl,
|
||||
[J2TBi3])} onPress={onPress_97167} />;
|
||||
return (
|
||||
<ActionSheet {...object2}>
|
||||
<Group hasIcons={false}>
|
||||
{items2}
|
||||
</Group>
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function NsfwGateGuildSettingsActionSheetOnPress() { // fn#97166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12872:583, owner: NsfwGateGuildSettingsActionSheet.onPress, offset: 0x0217581b, size: 72 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
value = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
|
||||
value.open(guild.id);
|
||||
}
|
||||
|
||||
function NsfwGateGuildSettingsActionSheetOnPress_97167() { // fn#97167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12872:783, owner: NsfwGateGuildSettingsActionSheet.onPress, offset: 0x02175863, size: 45 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(12684) /* metro dependency 12684: GuildActionSheetActions */;
|
||||
return value.handleLeaveServer(guild);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
/* Metro module 14740; source: modules/age_gate/native/components/NsfwGateGuildSidebar.tsx; dependencies: [31, 27, 1945, 1867, 1878, 8583, 661, 33, 4501, 697, 566, 683, 7867, 14553, 1305, 6597, 14741, 1244, 1948, 2] */
|
||||
function _fun111185(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14937:6, offset: 0x02396d52, size: 374 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_8 = (require(8583) /* metro dependency 8583: Constants */).NsfwGateSource;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = value.AnalyticEvents;
|
||||
const env0_10 = value.HelpdeskArticles;
|
||||
const env0_11 = value.Fonts;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PANEL_BG = (importDefault(697) /* metro dependency 697: native */).colors.PANEL_BG;
|
||||
const env0_14 = Reflect.apply(createStyles, value, [{container: {flex: 1, backgroundColor: PANEL_BG},
|
||||
emptyStateContainer: {flex: 1}, emptyStateImageContainer: {marginBottom: 16}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/native/components/NsfwGateGuildSidebar.tsx');
|
||||
exports.default = _default_111186;
|
||||
}
|
||||
|
||||
function _default_111186({style, guildId}) { // fn#111186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14937:429, offset: 0x02396ec8, size: 497 bytes, params: 2, frame: 27
|
||||
var r0;
|
||||
var items2;
|
||||
var RefreshEmptyState;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var format;
|
||||
var NQuXf0;
|
||||
var defaultImport3;
|
||||
const styles = useStyles();
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
||||
return GuildStore.getGuild(guildId);
|
||||
});
|
||||
env0_3.useEffect(_fun111188, [guildId, guild, UserStore.getCurrentUser()]);
|
||||
if (guild == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: [styles.container, style]};
|
||||
items2 = [((Component) => <Component guild={guild} showExtraButtons={false} />)(importDefault(14553) /* metro dependency 14553: ChannelListStickyHeader */)];
|
||||
RefreshEmptyState = (require(1305) /* metro dependency 1305: native */).RefreshEmptyState;
|
||||
var refreshEmptyStateProps2 = {imageStyle: styles.emptyStateImageContainer,
|
||||
titleStyle: (importDefault(6597) /* metro dependency 6597: TextStyles */)(Fonts.DISPLAY_EXTRABOLD,
|
||||
undefined,
|
||||
16), containerStyle: styles.emptyStateContainer, source: importDefault(14741) /* metro dependency 14741 */,
|
||||
title: intl.string(t.bAVpRR)};
|
||||
format = intl.format;
|
||||
NQuXf0 = t.NQuXf0;
|
||||
defaultImport3 = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
|
||||
refreshEmptyStateProps2.body = Reflect.apply(format, intl, [NQuXf0,
|
||||
{helpURL: defaultImport3.getArticleURL(HelpdeskArticles.NSFW_GUILD_GUIDELINES)}]);
|
||||
items2[1] = <RefreshEmptyState {...refreshEmptyStateProps2} />;
|
||||
r0 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun111188() { // fn#111188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14937:559, offset: 0x023970b9, size: 188 bytes, params: 1, frame: 20
|
||||
var r5;
|
||||
var value4;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var GUILD_NSFW_GATE_VIEWED;
|
||||
var object2;
|
||||
var guildIdBinding;
|
||||
var binding;
|
||||
var id;
|
||||
var isMember;
|
||||
var nsfwAllowed;
|
||||
var value;
|
||||
if (env0_2 != null && guild != null) {
|
||||
value4 = environment.__proto__;
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
GUILD_NSFW_GATE_VIEWED = AnalyticEvents.GUILD_NSFW_GATE_VIEWED;
|
||||
object2 = {};
|
||||
guildIdBinding = guildId;
|
||||
object2.guild_id = guildIdBinding;
|
||||
binding = env0_2;
|
||||
id = binding.id;
|
||||
object2.user_id = id;
|
||||
isMember = GuildMemberStore.isMember;
|
||||
id = binding.id;
|
||||
object2.is_member = Reflect.apply(isMember, GuildMemberStore, [guildIdBinding, id]);
|
||||
nsfwAllowed = binding.nsfwAllowed;
|
||||
if (nsfwAllowed) {
|
||||
value = require(7867) /* metro dependency 7867: AgeRestrictedContentSettingsUtils */;
|
||||
value = value.getViewNsfwGuildsOrDefault();
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = nsfwAllowed;
|
||||
}
|
||||
object2.is_user_opted_in_to_age_restricted_servers = r5;
|
||||
object2.source = NsfwGateSource.GUILD_SIDEBAR;
|
||||
Reflect.apply(track, defaultImport, [GUILD_NSFW_GATE_VIEWED, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 9618; source: modules/age_gate/useIsNsfwGated.tsx; dependencies: [5073, 1878, 566, 2] */
|
||||
function _fun75342(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#75342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9804:6, offset: 0x01dab1ff, size: 130 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildNSFWAgreeStore = importDefault(5073) /* metro dependency 5073: GuildNSFWAgreeStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/age_gate/useIsNsfwGated.tsx');
|
||||
exports.default = useIsNsfwGated;
|
||||
}
|
||||
|
||||
function useIsNsfwGated(a0) { // fn#75343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9804:195, offset: 0x01dab281, size: 132 bytes, params: 2, frame: 20
|
||||
const env0_0 = a0;
|
||||
const nsfw = a0.nsfw;
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
const value3 = Reflect.apply(useStateFromStores, fluxModule, [[UserStore], _fun75344]) === false;
|
||||
const value = fluxModule.useStateFromStores([GuildNSFWAgreeStore], _fun75345);
|
||||
return nsfw && (value ? value3 : !value);
|
||||
}
|
||||
|
||||
function _fun75344() { // fn#75344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9804:274, offset: 0x01dab305, size: 35 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return UserStore.getCurrentUser()?.nsfwAllowed;
|
||||
}
|
||||
|
||||
function _fun75345() { // fn#75345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9804:380, offset: 0x01dab328, size: 32 bytes, params: 1, frame: 11
|
||||
return GuildNSFWAgreeStore.didAgree(env0_0.guild_id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user