Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,38 @@
|
||||
/* Metro module 15125; source: modules/guild_themes/GuildThemeAnalyticsUtils.tsx; dependencies: [1867, 2] */
|
||||
function _fun115317(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15322:6, offset: 0x0245c750, size: 106 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/GuildThemeAnalyticsUtils.tsx');
|
||||
exports.collectGuildThemeAnalyticsMetadata = collectGuildThemeAnalyticsMetadata;
|
||||
}
|
||||
|
||||
function collectGuildThemeAnalyticsMetadata(a0) { // fn#115318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15322:226, offset: 0x0245c7ba, size: 146 bytes, params: 2, frame: 15
|
||||
var presetId;
|
||||
var object2;
|
||||
var themeSettings;
|
||||
if (a0 == null) {
|
||||
return null;
|
||||
}
|
||||
let value = GuildStore.getGuild(a0);
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
const guildTheme = value.guildTheme;
|
||||
if (guildTheme != null) {
|
||||
if (guildTheme.enabled) {
|
||||
object2 = {guild_theme_enabled: true};
|
||||
themeSettings = guildTheme.themeSettings;
|
||||
value = undefined;
|
||||
object2.guild_theme_is_custom = (themeSettings == null ? value : themeSettings.customUserThemeSettings) != null;
|
||||
themeSettings = guildTheme.themeSettings;
|
||||
presetId = themeSettings == null ? value : themeSettings.presetId;
|
||||
if (presetId != null) {
|
||||
object2.guild_theme_preset_id = presetId;
|
||||
}
|
||||
return object2;
|
||||
}
|
||||
}
|
||||
return {'guild_theme_enabled': false, 'guild_theme_is_custom': false};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/* Metro module 14558; source: modules/guild_themes/GuildThemeNuxUtils.tsx; dependencies: [5, 1348, 4044, 1362, 2] */
|
||||
function _fun110098(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14755:6, offset: 0x0236a593, size: 154 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(5) /* metro dependency 5 */;
|
||||
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/GuildThemeNuxUtils.tsx');
|
||||
exports.getInitialGuildThemeNuxSelection = function() {
|
||||
return UserSettingsProtoStore.getDefaultGuildThemePreference() === require(dependencyMap[2]).GuildThemeSourcePreference.PERSONAL ? require(dependencyMap[2]).GuildThemeSourcePreference.PERSONAL : require(dependencyMap[2]).GuildThemeSourcePreference.GUILD;
|
||||
};
|
||||
exports.saveGuildThemeNuxPreference = function() {
|
||||
return _saveGuildThemeNuxPreference.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _saveGuildThemeNuxPreference() { // fn#110099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14755:116, offset: 0x0236a62d, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_2(_fun110101).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun110101(a0, a1) { // fn#110101, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14755:195, offset: 0x0236a66a, size: 155 bytes, params: 3, frame: 15
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var GuildThemeSourcePreference = env2_0(env2_1[2]).GuildThemeSourcePreference;
|
||||
var r6 = a1 ? GuildThemeSourcePreference.PERSONAL : GuildThemeSourcePreference.GUILD;
|
||||
var value3 = env2_0(env2_1[3]);
|
||||
yield value3.setDefaultGuildThemePreference(r6);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = env2_0(env2_1[3]);
|
||||
yield value.clearGuildThemeSourcePreferenceOverride(a0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,236 @@
|
||||
/* Metro module 4004; source: modules/guild_themes/GuildThemePresets.tsx; dependencies: [482, 674, 4005, 2] */
|
||||
function _fun32953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:6, offset: 0x0102300d, size: 1277 bytes, params: 8, frame: 31
|
||||
var object13;
|
||||
const env0_0 = require;
|
||||
const closure = function(a0, a1, a2) {
|
||||
return {color: a0, angle: 0, baseMix: a2, colors: [{hex: a0, stop: 0}, {hex: a1, stop: 100}]};
|
||||
};
|
||||
const closure2 = function(a0, a1) {
|
||||
return a1 === ThemeTypes.LIGHT ? a0.lightAppearance : a0.darkAppearance;
|
||||
};
|
||||
const getRandomInteger = function(a0, a1) {
|
||||
var Math = global.Math;
|
||||
var Math2 = global.Math;
|
||||
return Math.floor(Math2.random() * (a1 - a0 + 1)) + a0;
|
||||
};
|
||||
const closure3 = getSaturationPinnedColor;
|
||||
const closure4 = getToneAdjustedColor;
|
||||
const closure5 = function(a0) {
|
||||
return a0 === ThemeTypes.LIGHT ? {'minTone': 55, 'maxTone': 75} : {'minTone': 15, 'maxTone': 35};
|
||||
};
|
||||
const closure6 = getThemeAdjustedToneColor;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
object13 = {'TWILIGHT': 1, 'PLUM': 2, 'FIRE': 3, 'GOLD_DUST': 4, 'MOSS': 5, 'JADE': 6, 'OBSIDIAN': 7, 'OCEAN': 8,
|
||||
'DENIM': 9, 'BLURPLE': 10};
|
||||
let TWILIGHT = object13.TWILIGHT;
|
||||
const items2 = [TWILIGHT];
|
||||
let DENIM = object13.DENIM;
|
||||
items2[1] = DENIM;
|
||||
let OCEAN = object13.OCEAN;
|
||||
items2[2] = OCEAN;
|
||||
let BLURPLE = object13.BLURPLE;
|
||||
items2[3] = BLURPLE;
|
||||
let OBSIDIAN = object13.OBSIDIAN;
|
||||
items2[4] = OBSIDIAN;
|
||||
let PLUM = object13.PLUM;
|
||||
items2[5] = PLUM;
|
||||
let FIRE = object13.FIRE;
|
||||
items2[6] = FIRE;
|
||||
let GOLD_DUST = object13.GOLD_DUST;
|
||||
items2[7] = GOLD_DUST;
|
||||
let MOSS = object13.MOSS;
|
||||
items2[8] = MOSS;
|
||||
let JADE = object13.JADE;
|
||||
items2[9] = JADE;
|
||||
const object14 = {};
|
||||
TWILIGHT = object13.TWILIGHT;
|
||||
const object15 = {};
|
||||
const TWILIGHT2 = object13.TWILIGHT;
|
||||
object15.id = TWILIGHT2;
|
||||
object15.darkAppearance = closure('#69426A', '#111731', 100);
|
||||
object15.lightAppearance = closure('#FA9EFF', '#5A7EFE', 100);
|
||||
object14[TWILIGHT] = object15;
|
||||
DENIM = object13.DENIM;
|
||||
const object16 = {};
|
||||
const DENIM2 = object13.DENIM;
|
||||
object16.id = DENIM2;
|
||||
object16.darkAppearance = closure('#5359AD', '#121238', 100);
|
||||
object16.lightAppearance = closure('#DBDBFF', '#6060FF', 100);
|
||||
object14[DENIM] = object16;
|
||||
OCEAN = object13.OCEAN;
|
||||
const object17 = {};
|
||||
const OCEAN2 = object13.OCEAN;
|
||||
object17.id = OCEAN2;
|
||||
object17.darkAppearance = closure('#245B92', '#141D40', 100);
|
||||
object17.lightAppearance = closure('#9ADBF7', '#2D3CCA', 100);
|
||||
object14[OCEAN] = object17;
|
||||
BLURPLE = object13.BLURPLE;
|
||||
const object18 = {};
|
||||
const BLURPLE2 = object13.BLURPLE;
|
||||
object18.id = BLURPLE2;
|
||||
object18.darkAppearance = closure('#533D9E', '#1A1035', 100);
|
||||
object18.lightAppearance = closure('#C3BFFF', '#816BDC', 100);
|
||||
object14[BLURPLE] = object18;
|
||||
OBSIDIAN = object13.OBSIDIAN;
|
||||
const object19 = {};
|
||||
const OBSIDIAN2 = object13.OBSIDIAN;
|
||||
object19.id = OBSIDIAN2;
|
||||
object19.darkAppearance = closure('#5E4C85', '#1E1740', 100);
|
||||
object19.lightAppearance = closure('#B59DF2', '#8F89D2', 100);
|
||||
object14[OBSIDIAN] = object19;
|
||||
PLUM = object13.PLUM;
|
||||
const object20 = {};
|
||||
const PLUM2 = object13.PLUM;
|
||||
object20.id = PLUM2;
|
||||
object20.darkAppearance = closure('#8A3F7F', '#2C0D25', 100);
|
||||
object20.lightAppearance = closure('#E893FF', '#FFADDC', 100);
|
||||
object14[PLUM] = object20;
|
||||
FIRE = object13.FIRE;
|
||||
const object21 = {};
|
||||
const FIRE2 = object13.FIRE;
|
||||
object21.id = FIRE2;
|
||||
object21.darkAppearance = closure('#9B2C2C', '#2A0C0C', 50);
|
||||
object21.lightAppearance = closure('#FFEBCA', '#FF8989', 50);
|
||||
object14[FIRE] = object21;
|
||||
GOLD_DUST = object13.GOLD_DUST;
|
||||
const object22 = {};
|
||||
const GOLD_DUST2 = object13.GOLD_DUST;
|
||||
object22.id = GOLD_DUST2;
|
||||
object22.darkAppearance = closure('#6C523D', '#241912', 50);
|
||||
object22.lightAppearance = closure('#FFE7DA', '#FFD89B', 50);
|
||||
object14[GOLD_DUST] = object22;
|
||||
MOSS = object13.MOSS;
|
||||
const object23 = {};
|
||||
const MOSS2 = object13.MOSS;
|
||||
object23.id = MOSS2;
|
||||
object23.darkAppearance = closure('#58694E', '#222A1C', 50);
|
||||
object23.lightAppearance = closure('#B7D19F', '#B1DCA4', 50);
|
||||
object14[MOSS] = object23;
|
||||
JADE = object13.JADE;
|
||||
const object24 = {};
|
||||
const JADE2 = object13.JADE;
|
||||
object24.id = JADE2;
|
||||
object24.darkAppearance = closure('#297071', '#18203F', 50);
|
||||
object24.lightAppearance = closure('#C5F0D2', '#60ADB2', 50);
|
||||
object14[JADE] = object24;
|
||||
const Set = global.Set;
|
||||
Object = global.Object;
|
||||
let set = new Set(Object.values(object13));
|
||||
set = items2.map(_fun32961);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/GuildThemePresets.tsx');
|
||||
exports.GUILD_THEME_PRESET_IDS = object13;
|
||||
exports.GUILD_THEME_DEFAULT_BASE_MIX = 74;
|
||||
exports.GUILD_THEME_DEFAULT_COLOR = '#5865F2';
|
||||
exports.GUILD_THEME_MIN_TONE = 15;
|
||||
exports.GUILD_THEME_MAX_TONE = 75;
|
||||
exports.GUILD_THEME_CUSTOM_SATURATION = 0.4;
|
||||
exports.GUILD_THEME_TONE_TRIM = 40;
|
||||
exports.GUILD_THEME_PRESETS = set;
|
||||
exports.getGuildThemePreset = getGuildThemePreset;
|
||||
exports.getDefaultGuildThemePresetSettings = getDefaultGuildThemePresetSettings;
|
||||
exports.getGuildThemePresetAppearance = closure2;
|
||||
exports.getLinearGradientForGuildThemePreset = getLinearGradientForGuildThemePreset;
|
||||
exports.getSingleColorGuildThemeGradientColors = getSingleColorGuildThemeGradientColors;
|
||||
exports.getRandomSingleColorGuildTheme = getRandomSingleColorGuildTheme;
|
||||
exports.getSaturationPinnedColor = closure3;
|
||||
exports.getToneAdjustedColor = closure4;
|
||||
exports.getGuildThemeToneRange = closure5;
|
||||
exports.getThemeAdjustedToneColor = closure6;
|
||||
exports.getHueAdjustedColor = getHueAdjustedColor;
|
||||
}
|
||||
|
||||
function getSaturationPinnedColor(a0) { // fn#32957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:2155, offset: 0x010235b6, size: 72 bytes, params: 2, frame: 13
|
||||
let value = importDefault(674) /* metro dependency 674 */;
|
||||
value = value(a0);
|
||||
value = value.set('hsl.s', 0.4);
|
||||
return value.hex();
|
||||
}
|
||||
|
||||
function getToneAdjustedColor(a0, a1) { // fn#32958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:2232, offset: 0x010235fe, size: 128 bytes, params: 3, frame: 17
|
||||
let value = importDefault(674) /* metro dependency 674 */;
|
||||
value = value(a0);
|
||||
const set = value.set;
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
value = Reflect.apply(set, value, ['hsl.l', Reflect.apply(max, Math, [0.15, Math2.min(0.75, a1 / 100)])]);
|
||||
return value.hex();
|
||||
}
|
||||
|
||||
function getThemeAdjustedToneColor(a0, a1) { // fn#32960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:2440, offset: 0x010236b1, size: 172 bytes, params: 3, frame: 20
|
||||
const {minTone, maxTone} = getGuildThemeToneRange(a1);
|
||||
let value = importDefault(674) /* metro dependency 674 */;
|
||||
value = value(a0);
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
value = value.set('hsl.l', (minTone + (Reflect.apply(max, Math, [15, Math2.min(75,
|
||||
100 * value.get('hsl.l'))]) - 15) / 60 * (maxTone - minTone)) / 100);
|
||||
return value.hex();
|
||||
}
|
||||
|
||||
function getGuildThemePreset(a0) { // fn#32962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:2983, offset: 0x0102375d, size: 46 bytes, params: 2, frame: 14
|
||||
const value = null;
|
||||
return value != a0 && env0_5.has(a0) ? env0_4[a0] : value;
|
||||
}
|
||||
|
||||
function getDefaultGuildThemePresetSettings() { // fn#32963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:3132, offset: 0x0102378b, size: 34 bytes, params: 1, frame: 3
|
||||
return {presetId: env0_6[0].id, customUserThemeSettings: undefined};
|
||||
}
|
||||
|
||||
function getLinearGradientForGuildThemePreset(a0, a1) { // fn#32964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:3336, offset: 0x010237ad, size: 102 bytes, params: 3, frame: 17
|
||||
const guildThemePresetAppearance = getGuildThemePresetAppearance(a0, a1);
|
||||
return 'linear-gradient(' + guildThemePresetAppearance.angle + 'deg, ' + guildThemePresetAppearance.colors.map(function({hex,
|
||||
stop}) {
|
||||
return '' + hex + ' ' + stop + '%';
|
||||
}).join(', ') + ')';
|
||||
}
|
||||
|
||||
function getSingleColorGuildThemeGradientColors(a0, a1) { // fn#32966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:3575, offset: 0x01023843, size: 172 bytes, params: 3, frame: 19
|
||||
const themeAdjustedToneColor = getThemeAdjustedToneColor(a0, a1);
|
||||
const value3 = (importDefault(674) /* metro dependency 674 */)(themeAdjustedToneColor);
|
||||
const LIGHT = ThemeTypes.LIGHT;
|
||||
const r9 = a1 !== LIGHT ? -0.2 : 0.2;
|
||||
const Math = global.Math;
|
||||
const max = Math.max;
|
||||
const Math2 = global.Math;
|
||||
const min = Math2.min;
|
||||
const get = value3.get;
|
||||
let value = Reflect.apply(min, Math2, [1, Reflect.apply(get, value3, ['hsl.l']) + r9]);
|
||||
value = Reflect.apply(max, Math, [0, value]);
|
||||
const items2 = [themeAdjustedToneColor];
|
||||
value = value3.set('hsl.l', value);
|
||||
items2[1] = value.hex();
|
||||
return items2;
|
||||
}
|
||||
|
||||
function getRandomSingleColorGuildTheme() { // fn#32967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:3809, offset: 0x010238ef, size: 197 bytes, params: 1, frame: 22
|
||||
const COLOR_PALETTE = (require(4005) /* metro dependency 4005: CustomThemesRandomUtils */).COLOR_PALETTE;
|
||||
const getRandomIntegerBinding = getRandomInteger;
|
||||
const COLOR_PALETTE2 = (require(4005) /* metro dependency 4005: CustomThemesRandomUtils */).COLOR_PALETTE;
|
||||
const property = COLOR_PALETTE[getRandomIntegerBinding(0, COLOR_PALETTE2.length - 1)];
|
||||
const object2 = {};
|
||||
const getSaturationPinnedColorBinding = getSaturationPinnedColor;
|
||||
const getToneAdjustedColorBinding = getToneAdjustedColor;
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
const Math2 = global.Math;
|
||||
const round = Math2.round;
|
||||
let value = (importDefault(674) /* metro dependency 674 */)(property);
|
||||
value = value.get('hsl.l');
|
||||
value = Reflect.apply(round, Math2, [100 * value]);
|
||||
object2.color = getSaturationPinnedColorBinding(getToneAdjustedColorBinding(property, Reflect.apply(min, Math, [45,
|
||||
value])));
|
||||
object2.baseMix = getRandomIntegerBinding(70, 80);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getHueAdjustedColor(a0, a1) { // fn#32968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4162:4301, offset: 0x010239b4, size: 65 bytes, params: 3, frame: 13
|
||||
let value = importDefault(674) /* metro dependency 674 */;
|
||||
value = value(a0);
|
||||
value = value.set('hsl.h', a1);
|
||||
return value.hex();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 4040; source: modules/guild_themes/GuildThemePreviewConstants.tsx; dependencies: [2] */
|
||||
function _fun33302(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4198:6, offset: 0x0102bff5, size: 134 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/GuildThemePreviewConstants.tsx');
|
||||
exports.GuildThemePreviewOrigin = {GUILD_SETTINGS: 'guild_settings', PERK_MODAL: 'perk_modal'};
|
||||
exports.GuildThemePreviewOwner = {GUILD_SETTINGS: 'guild_settings', PREVIEW_PANEL: 'preview_panel'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
/* Metro module 4039; source: modules/guild_themes/GuildThemePreviewStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 4040, 4041, 694, 1866, 22, 566, 2] */
|
||||
function _fun33267(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:6, offset: 0x0102b363, size: 540 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = GUILD_THEME_PREVIEW_END;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const {GuildThemePreviewOrigin,
|
||||
GuildThemePreviewOwner} = require(4040) /* metro dependency 4040: GuildThemePreviewConstants */;
|
||||
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
|
||||
let timeout = new Timeout();
|
||||
const env0_10 = {'guildId': null, 'draft': null, 'original': null, 'draftEnabled': false, 'originalEnabled': false,
|
||||
'origin': null, 'owner': null, 'isSaving': false, 'isAwaitingGuildUpdate': false, 'saveError': null};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun33273(Store).displayName = 'GuildThemePreviewStore';
|
||||
timeout = new timeout(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{GUILD_THEME_PREVIEW_START: GUILD_THEME_PREVIEW_START,
|
||||
GUILD_THEME_PREVIEW_SELECT_PRESET: GUILD_THEME_PREVIEW_SELECT_PRESET,
|
||||
GUILD_THEME_PREVIEW_UPDATE_CUSTOM: GUILD_THEME_PREVIEW_UPDATE_CUSTOM,
|
||||
GUILD_THEME_PREVIEW_TRANSFER_OWNERSHIP: GUILD_THEME_PREVIEW_TRANSFER_OWNERSHIP,
|
||||
GUILD_THEME_PREVIEW_END: closure, GUILD_THEME_PREVIEW_SAVE_START: GUILD_THEME_PREVIEW_SAVE_START,
|
||||
GUILD_THEME_PREVIEW_SAVE_SUCCESS: GUILD_THEME_PREVIEW_SAVE_SUCCESS_33293,
|
||||
GUILD_THEME_PREVIEW_SAVE_FAILURE: GUILD_THEME_PREVIEW_SAVE_FAILURE,
|
||||
GUILD_SETTINGS_GUILD_THEME_SAVE_SUCCESS: GUILD_SETTINGS_GUILD_THEME_SAVE_SUCCESS_33297,
|
||||
USER_SETTINGS_MODAL_OPEN: closure, CHANNEL_SELECT: CHANNEL_SELECT_33298, GUILD_DELETE: GUILD_DELETE_33299,
|
||||
GUILD_MEMBER_REMOVE: GUILD_MEMBER_REMOVE_33300, GUILD_UPDATE: GUILD_UPDATE_33301, LOGOUT: closure});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/GuildThemePreviewStore.tsx');
|
||||
exports.default = timeout;
|
||||
exports.GuildThemePreviewOrigin = GuildThemePreviewOrigin;
|
||||
exports.GuildThemePreviewOwner = GuildThemePreviewOwner;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_33268() { // fn#33268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:223, offset: 0x0102b57f, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_33268_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function clearAwaitingGuildUpdateTimeout() { // fn#33271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:599, offset: 0x0102b5dd, size: 21 bytes, params: 1, frame: 9
|
||||
env0_9.stop();
|
||||
}
|
||||
|
||||
function GUILD_THEME_PREVIEW_END() { // fn#33272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:651, offset: 0x0102b5f2, size: 76 bytes, params: 1, frame: 11
|
||||
var r0;
|
||||
const r1 = env0_10.guildId == null && !env0_9.isStarted();
|
||||
if (r1) {
|
||||
r0 = !r1;
|
||||
} else {
|
||||
clearAwaitingGuildUpdateTimeout();
|
||||
env0_10 = {'guildId': null, 'draft': null, 'original': null, 'draftEnabled': false, 'originalEnabled': false,
|
||||
'origin': null, 'owner': null, 'isSaving': false, 'isAwaitingGuildUpdate': false, 'saveError': null};
|
||||
r0 = true;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun33273(a0) { // fn#33273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:911, offset: 0x0102b63e, size: 344 bytes, params: 2, frame: 16
|
||||
const closure = GuildThemePreviewStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(AuthenticationStore);
|
||||
}}, {key: 'guildId', get: get_33276}, {key: 'draft', get: get_33277}, {key: 'original', get: get_33278},
|
||||
{key: 'draftEnabled', get: get_33279}, {key: 'originalEnabled', get: get_33280}, {key: 'origin',
|
||||
get: get_33281}, {key: 'owner', get: get_33282}, {key: 'isActive', get: get_33283}, {key: 'isSaving',
|
||||
get: get_33284}, {key: 'isAwaitingGuildUpdate', get: get_33285}, {key: 'saveError', get: get_33286},
|
||||
{key: 'hasChanges', value: value_33287}]);
|
||||
}
|
||||
|
||||
function GUILD_THEME_PREVIEW_START({guildId, draft, original, draftEnabled, originalEnabled, origin, owner}) { // fn#33288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:2120, offset: 0x0102b91e, size: 183 bytes, params: 2, frame: 22
|
||||
clearAwaitingGuildUpdateTimeout();
|
||||
const object2 = {guildId: guildId};
|
||||
object2.draft = (require(1866) /* metro dependency 1866: guildThemeSerialization */).cloneGuildThemeSettings(draft);
|
||||
object2.original = (require(1866) /* metro dependency 1866: guildThemeSerialization */).cloneGuildThemeSettings(original);
|
||||
object2.draftEnabled = draftEnabled;
|
||||
object2.originalEnabled = originalEnabled;
|
||||
object2.origin = origin;
|
||||
owner = owner ?? env0_10.owner;
|
||||
object2.owner = owner;
|
||||
object2.isSaving = false;
|
||||
object2.isAwaitingGuildUpdate = false;
|
||||
object2.saveError = null;
|
||||
}
|
||||
|
||||
function GUILD_THEME_PREVIEW_SELECT_PRESET({presetId}) { // fn#33289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:2509, offset: 0x0102b9d5, size: 181 bytes, params: 2, frame: 16
|
||||
var object3;
|
||||
var value4;
|
||||
if (env0_10.guildId == null) {
|
||||
return false;
|
||||
}
|
||||
const object4 = {presetId: presetId, customUserThemeSettings: undefined};
|
||||
const moduleValue = require(22) /* metro dependency 22 */;
|
||||
const isEqual2 = moduleValue.isEqual(env0_10.draft, object4);
|
||||
let r0 = isEqual2 ? !env0_10.draftEnabled : !isEqual2;
|
||||
if (r0) {
|
||||
clearAwaitingGuildUpdateTimeout();
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env0_10, moduleValue);
|
||||
object3['draft'] = object4;
|
||||
value4 = true;
|
||||
object3['draftEnabled'] = value4;
|
||||
object3['isAwaitingGuildUpdate'] = false;
|
||||
object3['saveError'] = null;
|
||||
r0 = value4;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GUILD_THEME_PREVIEW_UPDATE_CUSTOM({colors, gradientAngle, baseMix}) { // fn#33290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:2831, offset: 0x0102ba8a, size: 233 bytes, params: 2, frame: 20
|
||||
var object2;
|
||||
var value4;
|
||||
if (env0_10.guildId == null) {
|
||||
return false;
|
||||
}
|
||||
const object4 = {presetId: undefined};
|
||||
const items2 = [];
|
||||
arraySpread(items2, colors, 0, colors);
|
||||
object4.customUserThemeSettings = {colors: items2, gradientColorStops: [], gradientAngle: gradientAngle,
|
||||
baseMix: baseMix};
|
||||
const moduleValue = require(22) /* metro dependency 22 */;
|
||||
const isEqual2 = moduleValue.isEqual(env0_10.draft, object4);
|
||||
let r0 = isEqual2 ? !env0_10.draftEnabled : !isEqual2;
|
||||
if (r0) {
|
||||
clearAwaitingGuildUpdateTimeout();
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_10, 0);
|
||||
object2['draft'] = object4;
|
||||
value4 = true;
|
||||
object2['draftEnabled'] = value4;
|
||||
object2['isAwaitingGuildUpdate'] = false;
|
||||
object2['saveError'] = null;
|
||||
r0 = value4;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GUILD_THEME_PREVIEW_TRANSFER_OWNERSHIP({owner}) { // fn#33291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:3244, offset: 0x0102bb73, size: 77 bytes, params: 2, frame: 14
|
||||
var object2;
|
||||
let r0 = env0_10.guildId != null && env0_10.owner !== owner;
|
||||
if (r0) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_10, owner);
|
||||
object2['owner'] = owner;
|
||||
r0 = true;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GUILD_THEME_PREVIEW_SAVE_START() { // fn#33292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:3413, offset: 0x0102bbc0, size: 65 bytes, params: 1, frame: 14
|
||||
clearAwaitingGuildUpdateTimeout();
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_10, undefined);
|
||||
object2['isSaving'] = true;
|
||||
object2['isAwaitingGuildUpdate'] = false;
|
||||
object2['saveError'] = null;
|
||||
}
|
||||
|
||||
function GUILD_THEME_PREVIEW_SAVE_SUCCESS_33293({guildId, guildTheme}) { // fn#33293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:3569, offset: 0x0102bc01, size: 256 bytes, params: 2, frame: 20
|
||||
if (env0_10.guildId == null) {
|
||||
return false;
|
||||
}
|
||||
if (guildId !== env0_10.guildId) {
|
||||
return false;
|
||||
}
|
||||
const r7 = guildTheme?.themeSettings ?? null;
|
||||
const enabled = guildTheme?.enabled;
|
||||
const r4 = enabled != null && enabled;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_10, undefined);
|
||||
object2['draft'] = (require(1866) /* metro dependency 1866: guildThemeSerialization */).cloneGuildThemeSettings(r7);
|
||||
object2['original'] = (require(1866) /* metro dependency 1866: guildThemeSerialization */).cloneGuildThemeSettings(r7);
|
||||
object2['draftEnabled'] = r4;
|
||||
object2['originalEnabled'] = r4;
|
||||
object2['isSaving'] = false;
|
||||
object2['isAwaitingGuildUpdate'] = true;
|
||||
object2['saveError'] = null;
|
||||
scheduleAwaitingGuildUpdateTimeout();
|
||||
return true;
|
||||
}
|
||||
|
||||
function GUILD_THEME_PREVIEW_SAVE_FAILURE({guildId, error}) { // fn#33296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:4170, offset: 0x0102bd6c, size: 110 bytes, params: 2, frame: 15
|
||||
var object2;
|
||||
let r0 = env0_10.guildId != null && guildId === env0_10.guildId;
|
||||
if (r0) {
|
||||
clearAwaitingGuildUpdateTimeout();
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_10, undefined);
|
||||
object2['isSaving'] = false;
|
||||
object2['isAwaitingGuildUpdate'] = false;
|
||||
object2['saveError'] = error;
|
||||
r0 = true;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GUILD_SETTINGS_GUILD_THEME_SAVE_SUCCESS_33297({guildId}) { // fn#33297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:4395, offset: 0x0102bdda, size: 57 bytes, params: 2, frame: 11
|
||||
return env0_10.guildId != null && guildId === env0_10.guildId && GUILD_THEME_PREVIEW_END();
|
||||
}
|
||||
|
||||
function CHANNEL_SELECT_33298({guildId}) { // fn#33298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:4545, offset: 0x0102be13, size: 59 bytes, params: 2, frame: 11
|
||||
let r0 = env0_10.guildId != null && guildId !== env0_10.guildId;
|
||||
if (r0) {
|
||||
GUILD_THEME_PREVIEW_END();
|
||||
r0 = true;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GUILD_DELETE_33299({guild}) { // fn#33299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:4710, offset: 0x0102be4e, size: 64 bytes, params: 2, frame: 11
|
||||
let r0 = env0_10.guildId != null && guild.id === env0_10.guildId;
|
||||
if (r0) {
|
||||
GUILD_THEME_PREVIEW_END();
|
||||
r0 = true;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GUILD_MEMBER_REMOVE_33300({guildId, user}) { // fn#33300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:4828, offset: 0x0102be8e, size: 93 bytes, params: 2, frame: 12
|
||||
var r1;
|
||||
var r0;
|
||||
const id = user.id;
|
||||
const getId = AuthenticationStore.getId;
|
||||
const value2 = id === Reflect.apply(getId, AuthenticationStore, []);
|
||||
if (value2) {
|
||||
r1 = env0_10.guildId != null && guildId === env0_10.guildId;
|
||||
if (r1) {
|
||||
GUILD_THEME_PREVIEW_END();
|
||||
r1 = true;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function GUILD_UPDATE_33301({guild}) { // fn#33301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:4971, offset: 0x0102beeb, size: 266 bytes, params: 2, frame: 18
|
||||
var enabled;
|
||||
var r5;
|
||||
var themeSettings;
|
||||
var r8;
|
||||
var r2;
|
||||
var r0;
|
||||
var theme;
|
||||
var value6;
|
||||
var value7;
|
||||
var moduleValue;
|
||||
var value8;
|
||||
var value9;
|
||||
var value11;
|
||||
var moduleValue2;
|
||||
const isAwaitingGuildUpdate = env0_10.isAwaitingGuildUpdate;
|
||||
let r1 = isAwaitingGuildUpdate ? env0_10.guildId == null : !isAwaitingGuildUpdate;
|
||||
r1 = !r1 ? guild.id !== env0_10.guildId : r1;
|
||||
if (r1) {
|
||||
r0 = !r1;
|
||||
} else {
|
||||
theme = guild.theme;
|
||||
value6 = undefined;
|
||||
value7 = value6 !== theme;
|
||||
if (value7) {
|
||||
moduleValue = require(1866) /* metro dependency 1866: guildThemeSerialization */;
|
||||
value8 = moduleValue.fromServerGuildTheme(guild.theme);
|
||||
value9 = null;
|
||||
enabled = value9 == value8 ? value6 : value8.enabled;
|
||||
r5 = value9 != enabled && enabled;
|
||||
themeSettings = value9 == value8 ? value6 : value8.themeSettings;
|
||||
r8 = value9 != themeSettings ? themeSettings : value9;
|
||||
value11 = r5 === env0_10.originalEnabled;
|
||||
if (value11) {
|
||||
moduleValue2 = require(22) /* metro dependency 22 */;
|
||||
r2 = moduleValue2.isEqual(r8, env0_10.original);
|
||||
} else {
|
||||
r2 = value11;
|
||||
}
|
||||
if (r2) {
|
||||
GUILD_THEME_PREVIEW_END();
|
||||
r2 = true;
|
||||
} else {
|
||||
r2 = !!r2;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = value7;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function get_33276() { // fn#33276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1299, offset: 0x0102b807, size: 14 bytes, params: 1, frame: 1
|
||||
return env1_10.guildId;
|
||||
}
|
||||
|
||||
function get_33277() { // fn#33277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1346, offset: 0x0102b815, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.draft;
|
||||
}
|
||||
|
||||
function get_33278() { // fn#33278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1394, offset: 0x0102b824, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.original;
|
||||
}
|
||||
|
||||
function get_33279() { // fn#33279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1449, offset: 0x0102b833, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.draftEnabled;
|
||||
}
|
||||
|
||||
function get_33280() { // fn#33280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1511, offset: 0x0102b842, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.originalEnabled;
|
||||
}
|
||||
|
||||
function get_33281() { // fn#33281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1567, offset: 0x0102b851, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.origin;
|
||||
}
|
||||
|
||||
function get_33282() { // fn#33282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1613, offset: 0x0102b860, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.owner;
|
||||
}
|
||||
|
||||
function get_33283() { // fn#33283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1661, offset: 0x0102b86f, size: 20 bytes, params: 1, frame: 2
|
||||
return env1_10.guildId != null;
|
||||
}
|
||||
|
||||
function get_33284() { // fn#33284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1717, offset: 0x0102b883, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.isSaving;
|
||||
}
|
||||
|
||||
function get_33285() { // fn#33285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1781, offset: 0x0102b892, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.isAwaitingGuildUpdate;
|
||||
}
|
||||
|
||||
function get_33286() { // fn#33286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1846, offset: 0x0102b8a1, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_10.saveError;
|
||||
}
|
||||
|
||||
function value_33287() { // fn#33287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:1902, offset: 0x0102b8b0, size: 110 bytes, params: 1, frame: 15
|
||||
var r1;
|
||||
var r0;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
const value = environment.__proto__;
|
||||
const value2 = env1_10.guildId != null;
|
||||
if (value2) {
|
||||
value3 = env1_10.draftEnabled !== env1_10.originalEnabled;
|
||||
if (value3) {
|
||||
r1 = value3;
|
||||
} else {
|
||||
moduleValue = require(22) /* metro dependency 22 */;
|
||||
r1 = !moduleValue.isEqual(env1_10.draft, env1_10.original);
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function scheduleAwaitingGuildUpdateTimeout() { // fn#33294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:3953, owner: GUILD_THEME_PREVIEW_SAVE_SUCCESS_33293.scheduleAwaitingGuildUpdateTimeout, offset: 0x0102bd01, size: 43 bytes, params: 1, frame: 14
|
||||
clearAwaitingGuildUpdateTimeout();
|
||||
env1_9.start(10000, _fun33295);
|
||||
}
|
||||
|
||||
function _fun33295() { // fn#33295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4197:4046, offset: 0x0102bd2c, size: 64 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
if (env2_10.isAwaitingGuildUpdate) {
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GUILD_THEME_PREVIEW_END'});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
/* Metro module 4038; source: modules/guild_themes/GuildThemeResolver.tsx; dependencies: [31, 1348, 1867, 3969, 4039, 4042, 661, 4004, 566, 4043, 4044, 2] */
|
||||
function _fun33249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:6, offset: 0x0102aca5, size: 344 bytes, params: 8, frame: 23
|
||||
let env0_0 = require;
|
||||
const closure = resolveRenderableGuildThemeSettings;
|
||||
const closure2 = resolveSavedActiveGuildTheme;
|
||||
const useSavedActiveGuildThemeForGuildId = function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
var value2 = require(dependencyMap[8]).useStateFromStores([GuildStore, GuildThemeRuntimeStore], _fun33253, [a0,
|
||||
a1]);
|
||||
return value2.useMemo(_fun33254, [value2]);
|
||||
};
|
||||
const closure3 = getActiveGuildThemeForGuildId;
|
||||
const closure4 = useActiveGuildThemeForGuildId;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const guildThemePreviewStore = importDefault(4039) /* metro dependency 4039: GuildThemePreviewStore */;
|
||||
const guildThemeRuntimeStore = importDefault(4042) /* metro dependency 4042: GuildThemeRuntimeStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/GuildThemeResolver.tsx');
|
||||
exports.resolveRenderableGuildThemeSettings = closure;
|
||||
exports.isRenderableGuildThemeSettings = isRenderableGuildThemeSettings;
|
||||
exports.resolveSavedActiveGuildTheme = closure2;
|
||||
exports.useEnabledGuildThemeForGuildId = useEnabledGuildThemeForGuildId;
|
||||
exports.getActiveGuildThemeForGuildId = closure3;
|
||||
exports.getActiveGuildTheme = getActiveGuildTheme;
|
||||
exports.useActiveGuildThemeForGuildId = closure4;
|
||||
exports.useActiveGuildTheme = useActiveGuildTheme;
|
||||
exports.useIsGuildThemePreviewActive = function() {
|
||||
return require(dependencyMap[8]).useStateFromStores([GuildThemePreviewStore], _fun33266);
|
||||
};
|
||||
}
|
||||
|
||||
function resolveRenderableGuildThemeSettings(a0) { // fn#33250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:180, offset: 0x0102adfd, size: 189 bytes, params: 2, frame: 15
|
||||
const value = null;
|
||||
if (value == a0) {
|
||||
return value;
|
||||
}
|
||||
const customUserThemeSettings = a0.customUserThemeSettings;
|
||||
const r1 = value == (value == customUserThemeSettings ? undefined : customUserThemeSettings.colors) || customUserThemeSettings.colors.length !== 1 ? value : value == customUserThemeSettings.gradientColorStops ? {type: 'custom',
|
||||
customUserThemeSettings: customUserThemeSettings} : customUserThemeSettings.gradientColorStops.length > 0 ? value : {type: 'custom',
|
||||
customUserThemeSettings: customUserThemeSettings};
|
||||
if (value != r1) {
|
||||
return r1;
|
||||
}
|
||||
const guildThemePreset = (require(4004) /* metro dependency 4004: GuildThemePresets */).getGuildThemePreset(a0.presetId);
|
||||
return value != guildThemePreset ? {type: 'preset', preset: guildThemePreset} : value;
|
||||
}
|
||||
|
||||
function resolveSavedActiveGuildTheme(a0) { // fn#33251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:608, offset: 0x0102aeba, size: 49 bytes, params: 2, frame: 13
|
||||
const value = null;
|
||||
return (value == a0 ? undefined : a0.enabled) !== true ? value : resolveRenderableGuildThemeSettings(a0.themeSettings);
|
||||
}
|
||||
|
||||
function useSavedActiveGuildThemeForGuildId(a0, a1) { // fn#33252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:745, offset: 0x0102aeeb, size: 124 bytes, params: 3, frame: 18
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore,
|
||||
GuildThemeRuntimeStore], _fun33253, [a0, a1]);
|
||||
return value2.useMemo(_fun33254, [value2]);
|
||||
}
|
||||
|
||||
function getActiveGuildThemeForGuildId(a0) { // fn#33255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:1076, offset: 0x0102afee, size: 208 bytes, params: 2, frame: 17
|
||||
var guild;
|
||||
var features;
|
||||
var guildThemeSnapshot;
|
||||
const value = a1;
|
||||
if (a0 != null) {
|
||||
var moduleValue = require(4043) /* metro dependency 4043: ServerThemeUserExperiment */;
|
||||
var getServerThemeUserEnabled = moduleValue.getServerThemeUserEnabled;
|
||||
if (Reflect.apply(getServerThemeUserEnabled, moduleValue,
|
||||
[value !== undefined ? value : 'getActiveGuildThemeForGuildId'])) {
|
||||
guild = GuildStore.getGuild(a0);
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
features = guild.features;
|
||||
if (features.has(GuildFeatures.GUILD_THEME)) {
|
||||
if (UserSettingsProtoStore.resolveGuildThemeSourcePreference(a0) === (require(4044) /* metro dependency 4044: Client */).GuildThemeSourcePreference.PERSONAL) {
|
||||
return null;
|
||||
}
|
||||
guildThemeSnapshot = GuildThemeRuntimeStore.getGuildThemeSnapshot(a0);
|
||||
return resolveSavedActiveGuildTheme(guildThemeSnapshot !== undefined ? guildThemeSnapshot : guild.guildTheme);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function useActiveGuildThemeForGuildId(a0) { // fn#33256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:1486, offset: 0x0102b0be, size: 239 bytes, params: 2, frame: 23
|
||||
const value = a1;
|
||||
const env0_0 = a0;
|
||||
const value2 = (require(4043) /* metro dependency 4043: ServerThemeUserExperiment */).useServerThemeUserEnabled(value !== undefined ? value : 'useActiveGuildThemeForGuildId');
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildThemePreviewStore],
|
||||
function() {
|
||||
}, [a0, value2]);
|
||||
return value3.useMemo(_fun33259, [useSavedActiveGuildThemeForGuildId(a0, value2),
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([UserSettingsProtoStore], _fun33258, [a0,
|
||||
value2]), value3]);
|
||||
}
|
||||
|
||||
function useEnabledGuildThemeForGuildId(a0) { // fn#33261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:2349, offset: 0x0102b26b, size: 62 bytes, params: 2, frame: 15
|
||||
let value = a1;
|
||||
const r4 = value !== undefined ? value : 'useEnabledGuildThemeForGuildId';
|
||||
value = require(4043) /* metro dependency 4043: ServerThemeUserExperiment */;
|
||||
value = value.useServerThemeUserEnabled(r4);
|
||||
return useSavedActiveGuildThemeForGuildId(a0, value);
|
||||
}
|
||||
|
||||
function getActiveGuildTheme() { // fn#33262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:2594, offset: 0x0102b2a9, size: 37 bytes, params: 1, frame: 13
|
||||
return getActiveGuildThemeForGuildId(SelectedGuildStore.getGuildId(), 'getActiveGuildTheme');
|
||||
}
|
||||
|
||||
function useActiveGuildTheme() { // fn#33263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:2785, offset: 0x0102b2ce, size: 73 bytes, params: 1, frame: 15
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
return useActiveGuildThemeForGuildId(Reflect.apply(useStateFromStores, fluxModule, [[SelectedGuildStore],
|
||||
function() {
|
||||
return SelectedGuildStore.getGuildId();
|
||||
}]), 'useActiveGuildTheme');
|
||||
}
|
||||
|
||||
function useIsGuildThemePreviewActive() { // fn#33265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:2961, offset: 0x0102b32a, size: 57 bytes, params: 1, frame: 13
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildThemePreviewStore], function() {
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun33253() { // fn#33253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:834, offset: 0x0102af67, size: 112 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
var guild;
|
||||
var features;
|
||||
var guildThemeSnapshot;
|
||||
if (env0_0 != null) {
|
||||
if (require) {
|
||||
value2 = environment.__proto__;
|
||||
guild = GuildStore.getGuild(env0_0);
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
features = guild.features;
|
||||
if (features.has(GuildFeatures.GUILD_THEME)) {
|
||||
guildThemeSnapshot = GuildThemeRuntimeStore.getGuildThemeSnapshot(env0_0);
|
||||
return guildThemeSnapshot !== undefined ? guildThemeSnapshot : guild.guildTheme;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun33254() { // fn#33254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:1034, offset: 0x0102afd7, size: 23 bytes, params: 1, frame: 11
|
||||
return resolveSavedActiveGuildTheme(env0_2);
|
||||
}
|
||||
|
||||
function _fun33258() { // fn#33258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:1730, offset: 0x0102b1ad, size: 83 bytes, params: 1, frame: 12
|
||||
const GuildThemeSourcePreference = (require(4044) /* metro dependency 4044: Client */).GuildThemeSourcePreference;
|
||||
return env0_0 == null ? GuildThemeSourcePreference.PERSONAL : env0_1 ? UserSettingsProtoStore.resolveGuildThemeSourcePreference(env0_0) : GuildThemeSourcePreference.PERSONAL;
|
||||
}
|
||||
|
||||
function _fun33259() { // fn#33259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4196:1855, offset: 0x0102b200, size: 82 bytes, params: 1, frame: 14
|
||||
return env0_2 !== undefined ? resolveRenderableGuildThemeSettings(env0_2) : env0_4 === (require(4044) /* metro dependency 4044: Client */).GuildThemeSourcePreference.PERSONAL ? null : env0_3;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
/* Metro module 4042; source: modules/guild_themes/GuildThemeRuntimeStore.tsx; dependencies: [6, 7, 15, 17, 18, 1867, 3969, 1866, 22, 566, 694, 2] */
|
||||
function _fun33341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:6, offset: 0x0102c9dd, size: 411 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const closure = CACHE_LOADED_33348;
|
||||
const closure2 = GUILD_SETTINGS_GUILD_THEME_SAVE_SUCCESS_33350;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun33351(Store);
|
||||
value.displayName = 'GuildThemeRuntimeStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CACHE_LOADED: closure,
|
||||
CACHE_LOADED_LAZY: closure, CHANNEL_SELECT: CHANNEL_SELECT_33355, CONNECTION_OPEN: closure,
|
||||
GUILD_DELETE: function({guild}) {
|
||||
return snapshotSelectedGuildAfterSelectedGuildChange(guild.id);
|
||||
}, GUILD_MEMBER_REMOVE: function({guildId}) {
|
||||
return snapshotSelectedGuildAfterSelectedGuildChange(guildId);
|
||||
}, GUILD_SETTINGS_GUILD_THEME_SAVE_SUCCESS: closure2, GUILD_THEME_PREVIEW_SAVE_SUCCESS: closure2,
|
||||
OVERLAY_INITIALIZE: closure, LOGOUT: function() {
|
||||
return clearSelectedGuildThemeSnapshot();
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/GuildThemeRuntimeStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_33342() { // fn#33342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:168, offset: 0x0102cb78, size: 94 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_33342_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function clearSelectedGuildThemeSnapshot() { // fn#33345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:372, offset: 0x0102cbd6, size: 24 bytes, params: 1, frame: 4
|
||||
return env0_9 != null && true;
|
||||
}
|
||||
|
||||
function setSelectedGuildThemeSnapshot(a0, a1) { // fn#33346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:443, offset: 0x0102cbee, size: 105 bytes, params: 3, frame: 17
|
||||
var r0;
|
||||
var moduleValue;
|
||||
const value3 = env0_9?.guildId !== a0;
|
||||
if (value3) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
moduleValue = require(22) /* metro dependency 22 */;
|
||||
r0 = !moduleValue.isEqual(env0_9.guildTheme, a1);
|
||||
}
|
||||
r0 = r0 && true;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function snapshotSelectedGuildId(a0) { // fn#33347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:603, offset: 0x0102cc57, size: 102 bytes, params: 2, frame: 17
|
||||
var r0;
|
||||
var value;
|
||||
var setSelectedGuildThemeSnapshotBinding;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var cloneGuildTheme;
|
||||
if (a0 == null) {
|
||||
r0 = clearSelectedGuildThemeSnapshot();
|
||||
} else {
|
||||
setSelectedGuildThemeSnapshotBinding = setSelectedGuildThemeSnapshot;
|
||||
value2 = undefined;
|
||||
moduleValue = require(1866) /* metro dependency 1866: guildThemeSerialization */;
|
||||
cloneGuildTheme = moduleValue.cloneGuildTheme;
|
||||
value = GuildStore.getGuild(a0);
|
||||
value = setSelectedGuildThemeSnapshotBinding(a0, Reflect.apply(cloneGuildTheme, moduleValue,
|
||||
[value == null ? value2 : value.guildTheme]));
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function CACHE_LOADED_33348() { // fn#33348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:834, offset: 0x0102ccbd, size: 30 bytes, params: 1, frame: 11
|
||||
return snapshotSelectedGuildId(SelectedGuildStore.getGuildId());
|
||||
}
|
||||
|
||||
function snapshotSelectedGuildAfterSelectedGuildChange(a0) { // fn#33349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:914, offset: 0x0102ccdb, size: 68 bytes, params: 2, frame: 14
|
||||
if (env0_9?.guildId !== a0) {
|
||||
return false;
|
||||
}
|
||||
const guildId = SelectedGuildStore.getGuildId();
|
||||
return guildId !== a0 && snapshotSelectedGuildId(guildId);
|
||||
}
|
||||
|
||||
function GUILD_SETTINGS_GUILD_THEME_SAVE_SUCCESS_33350({guildId, guildTheme}) { // fn#33350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:1087, offset: 0x0102cd1f, size: 83 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var setSelectedGuildThemeSnapshotBinding;
|
||||
var value;
|
||||
const getGuildId = SelectedGuildStore.getGuildId;
|
||||
const value2 = guildId === Reflect.apply(getGuildId, SelectedGuildStore, []);
|
||||
if (value2) {
|
||||
setSelectedGuildThemeSnapshotBinding = setSelectedGuildThemeSnapshot;
|
||||
value = require(1866) /* metro dependency 1866: guildThemeSerialization */;
|
||||
value = setSelectedGuildThemeSnapshotBinding(guildId, value.cloneGuildTheme(guildTheme));
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun33351(a0) { // fn#33351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:1237, offset: 0x0102cd72, size: 91 bytes, params: 2, frame: 16
|
||||
const closure = GuildThemeRuntimeStore;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(GuildStore, SelectedGuildStore);
|
||||
}}, {key: 'getGuildThemeSnapshot', value: value_33354}]);
|
||||
}
|
||||
|
||||
function CHANNEL_SELECT_33355({guildId}) { // fn#33355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:1894, offset: 0x0102ce17, size: 70 bytes, params: 2, frame: 14
|
||||
return guildId == null ? clearSelectedGuildThemeSnapshot() : env0_9?.guildId !== env0_9?.guildId && snapshotSelectedGuildId(env0_9?.guildId);
|
||||
}
|
||||
|
||||
function value_33354(a0) { // fn#33354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4200:1643, offset: 0x0102cdeb, size: 44 bytes, params: 2, frame: 5
|
||||
const binding = env1_9;
|
||||
const value2 = undefined;
|
||||
return a0 !== (binding == null ? value2 : binding.guildId) ? value2 : env1_9.guildTheme;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
/* Metro module 1866; source: modules/guild_themes/guildThemeSerialization.tsx; dependencies: [2] */
|
||||
function _fun20059(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1993:6, offset: 0x00ebda0e, size: 157 bytes, params: 8, frame: 18
|
||||
const cloneCustomUserThemeSettings = function(a0) {
|
||||
var r5;
|
||||
var r3;
|
||||
var object;
|
||||
var property;
|
||||
var items;
|
||||
var value;
|
||||
var items3;
|
||||
if (a0 != null) {
|
||||
object = {};
|
||||
property = a0.colors;
|
||||
items = [];
|
||||
value = arraySpread(items, property, 0, r5);
|
||||
object.colors = items;
|
||||
property = a0.gradientColorStops;
|
||||
r3 = property ?? [];
|
||||
items3 = [];
|
||||
arraySpread(items3, r3, 0, value);
|
||||
object.gradientColorStops = items3;
|
||||
object.gradientAngle = a0.gradientAngle;
|
||||
object.baseMix = a0.baseMix;
|
||||
return object;
|
||||
}
|
||||
};
|
||||
const closure = cloneGuildThemeSettings;
|
||||
const fromServerCustomUserThemeSettings = function(a0) {
|
||||
var r1;
|
||||
var object;
|
||||
var property;
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
object = {colors: a0.colors};
|
||||
property = a0.gradient_color_stops;
|
||||
r1 = property ?? [];
|
||||
object.gradientColorStops = r1;
|
||||
property = a0.gradient_angle;
|
||||
value = 0;
|
||||
object.gradientAngle = property ?? value;
|
||||
property = a0.base_mix;
|
||||
r1 = property ?? value;
|
||||
object.baseMix = r1;
|
||||
return object;
|
||||
}
|
||||
};
|
||||
const closure2 = fromServerGuildThemeSettings;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/guildThemeSerialization.tsx');
|
||||
exports.cloneGuildThemeSettings = closure;
|
||||
exports.cloneGuildTheme = cloneGuildTheme;
|
||||
exports.toServerGuildThemeSettings = toServerGuildThemeSettings;
|
||||
exports.fromServerGuildThemeSettings = closure2;
|
||||
exports.fromServerGuildTheme = fromServerGuildTheme;
|
||||
}
|
||||
|
||||
function cloneGuildThemeSettings(a0) { // fn#20061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1993:238, offset: 0x00ebdb0b, size: 55 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
var object2;
|
||||
const value = null;
|
||||
if (value == a0) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.presetId = a0.presetId;
|
||||
object2.customUserThemeSettings = cloneCustomUserThemeSettings(a0.customUserThemeSettings);
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function fromServerGuildThemeSettings(a0) { // fn#20063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1993:622, offset: 0x00ebdb9d, size: 97 bytes, params: 2, frame: 14
|
||||
var preset_id;
|
||||
var r0;
|
||||
var object2;
|
||||
let value = null;
|
||||
if (value == a0) {
|
||||
r0 = value;
|
||||
} else {
|
||||
preset_id = a0.preset_id;
|
||||
if (value != preset_id) {
|
||||
object2 = {};
|
||||
preset_id = a0.preset_id;
|
||||
value = undefined;
|
||||
preset_id = value == preset_id ? value : a0.preset_id;
|
||||
object2.presetId = preset_id;
|
||||
object2.customUserThemeSettings = fromServerCustomUserThemeSettings(a0.custom_user_theme_settings);
|
||||
r0 = object2;
|
||||
} else if (value == a0.custom_user_theme_settings) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
preset_id = a0.preset_id;
|
||||
value = undefined;
|
||||
preset_id = value == preset_id ? value : a0.preset_id;
|
||||
object2.presetId = preset_id;
|
||||
object2.customUserThemeSettings = fromServerCustomUserThemeSettings(a0.custom_user_theme_settings);
|
||||
r0 = object2;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function cloneGuildTheme(a0) { // fn#20064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1993:1073, offset: 0x00ebdbfe, size: 53 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
var object2;
|
||||
const value = null;
|
||||
if (value == a0) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.enabled = a0.enabled;
|
||||
object2.themeSettings = cloneGuildThemeSettings(a0.themeSettings);
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function toServerGuildThemeSettings(a0) { // fn#20065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1993:1226, offset: 0x00ebdc33, size: 187 bytes, params: 2, frame: 19
|
||||
var r6;
|
||||
var r1;
|
||||
var r0;
|
||||
var object3;
|
||||
var presetId;
|
||||
var customUserThemeSettings;
|
||||
var object4;
|
||||
var colors;
|
||||
var items2;
|
||||
var value2;
|
||||
var gradientColorStops;
|
||||
var items3;
|
||||
var gradientAngle;
|
||||
var baseMix;
|
||||
const value = null;
|
||||
if (value == a0) {
|
||||
r0 = {'preset_id': null, 'custom_user_theme_settings': null};
|
||||
} else {
|
||||
object3 = {};
|
||||
presetId = a0.presetId;
|
||||
object3.preset_id = value != presetId ? presetId : value;
|
||||
customUserThemeSettings = a0.customUserThemeSettings;
|
||||
if (value == customUserThemeSettings) {
|
||||
r1 = value;
|
||||
} else {
|
||||
object4 = {};
|
||||
colors = customUserThemeSettings.colors;
|
||||
items2 = [];
|
||||
value2 = 0;
|
||||
arraySpread(items2, colors, value2, undefined);
|
||||
object4.colors = items2;
|
||||
gradientColorStops = customUserThemeSettings.gradientColorStops;
|
||||
if (value != gradientColorStops) {
|
||||
gradientColorStops = customUserThemeSettings.gradientColorStops;
|
||||
items3 = [];
|
||||
arraySpread(items3, gradientColorStops, value2, undefined);
|
||||
r6 = items3;
|
||||
} else {
|
||||
r6 = [];
|
||||
}
|
||||
object4.gradient_color_stops = r6;
|
||||
gradientAngle = customUserThemeSettings.gradientAngle;
|
||||
r6 = value != gradientAngle ? gradientAngle : value2;
|
||||
object4.gradient_angle = r6;
|
||||
baseMix = customUserThemeSettings.baseMix;
|
||||
object4.base_mix = value != baseMix ? baseMix : value2;
|
||||
r1 = object4;
|
||||
}
|
||||
object3.custom_user_theme_settings = r1;
|
||||
r0 = object3;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function fromServerGuildTheme(a0) { // fn#20066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1993:1713, offset: 0x00ebdcee, size: 47 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
var object2;
|
||||
const value = null;
|
||||
if (value == a0) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.enabled = a0.enabled;
|
||||
object2.themeSettings = fromServerGuildThemeSettings(a0);
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 4037; source: modules/guild_themes/native/GuildThemeGuildIdOverrideContext.tsx; dependencies: [31, 2] */
|
||||
function _fun33248(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#33248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4195:6, offset: 0x0102ac3d, size: 104 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
value = value.createContext(undefined);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/native/GuildThemeGuildIdOverrideContext.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,329 @@
|
||||
/* Metro module 14557; source: modules/guild_themes/native/GuildThemeNuxActionSheet.tsx; dependencies: [5, 57, 31, 27, 3969, 4042, 1376, 33, 3, 4501, 697, 14558, 4044, 566, 4080, 1244, 6275, 14559, 4573, 7988, 7987, 1305, 4578, 2] */
|
||||
function _fun110088(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14754:6, offset: 0x02369b02, size: 560 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
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 selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const guildThemeRuntimeStore = importDefault(4042) /* metro dependency 4042: GuildThemeRuntimeStore */;
|
||||
const env0_9 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
value = importDefault(3) /* metro dependency 3: Logger */;
|
||||
value = new value('GuildThemeNuxActionSheet');
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.padding = PX_16;
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.paddingTop = PX_8;
|
||||
object4.paddingBottom = 0;
|
||||
object3.container = object4;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.title = {textAlign: 'center', marginBottom: PX_8};
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.description = {textAlign: 'center', marginBottom: PX_24};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.options = {marginBottom: PX_12};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.warning = {marginBottom: PX_12};
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.footer = {gap: PX_8};
|
||||
const env0_13 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/native/GuildThemeNuxActionSheet.tsx');
|
||||
exports.default = GuildThemeNuxActionSheet;
|
||||
exports.GUILD_THEME_NUX_ACTION_SHEET_KEY = 'GuildThemeNuxActionSheet';
|
||||
}
|
||||
|
||||
function GuildThemeNuxActionSheet({guildId, markAsDismissed}) { // fn#110089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14754:758, offset: 0x02369d32, size: 1596 bytes, params: 2, frame: 38
|
||||
const HelpMessage = (require(1305) /* metro dependency 1305: native */).HelpMessage;
|
||||
const styles = useStyles();
|
||||
const binding = env0_5;
|
||||
let useState = binding.useState;
|
||||
const getInitialGuildThemeNuxSelection = (require(14558) /* metro dependency 14558: GuildThemeNuxUtils */).getInitialGuildThemeNuxSelection;
|
||||
const value2 = Reflect.apply(useState, binding, [getInitialGuildThemeNuxSelection]);
|
||||
const binding2 = env0_4;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const env0_2 = value3[1];
|
||||
useState = binding.useState;
|
||||
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
|
||||
const property2 = value5[0];
|
||||
const env0_3 = value5[1];
|
||||
useState = binding.useState;
|
||||
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property3 = value6[0];
|
||||
var env0_4 = value6[1];
|
||||
var env0_5 = binding.useRef(false);
|
||||
const GuildThemeSourcePreference = (require(4044) /* metro dependency 4044: Client */).GuildThemeSourcePreference;
|
||||
let PERSONAL = GuildThemeSourcePreference.PERSONAL;
|
||||
const value7 = property === PERSONAL;
|
||||
const guildId2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
|
||||
function() {
|
||||
return SelectedGuildStore.getGuildId();
|
||||
});
|
||||
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildThemeRuntimeStore],
|
||||
_fun110091, [guildId]);
|
||||
binding.useEffect(_fun110092, [guildId, guildId2]);
|
||||
const value9 = binding.useCallback(_fun110093, []);
|
||||
const value10 = binding.useCallback(_fun110094, [markAsDismissed]);
|
||||
const value12 = binding.useCallback(env0_3(_fun110096), [guildId, value7, markAsDismissed, guildId2]);
|
||||
const value13 = binding.useCallback(_fun110097, [value10]);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r12 = value7 ? Reflect.apply(string, intl, [t.cvoikF]) : Reflect.apply(string, intl, [t['cY+Oob']]);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const bottomSheetProps = {startExpanded: true,
|
||||
dismissAccessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq),
|
||||
onDismiss: value13, contentStyles: styles.container};
|
||||
const items2 = [((Component) => <Component themeSettings={value8} isPersonal={value7} />)(importDefault(14559) /* metro dependency 14559: GuildThemeNuxPreviewGraphic */)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
const Q9zFy9 = (require(1244) /* metro dependency 1244: indexNative */).t.Q9zFy9;
|
||||
items2[1] = <Text accessibilityRole="header" variant="heading-xl/semibold" color="mobile-text-heading-primary" style={styles.title}>{Reflect.apply(string,
|
||||
intl, [Q9zFy9])}</Text>;
|
||||
string = intl.string;
|
||||
const XLpBLj = (require(1244) /* metro dependency 1244: indexNative */).t.XLpBLj;
|
||||
items2[2] = <Text variant="text-md/normal" color="text-default" style={styles.description}>{Reflect.apply(string,
|
||||
intl, [XLpBLj])}</Text>;
|
||||
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
string = intl.string;
|
||||
const aN3RNQ = (require(1244) /* metro dependency 1244: indexNative */).t.aN3RNQ;
|
||||
const GUILD = GuildThemeSourcePreference.GUILD;
|
||||
const tableRadioRow = <TableRadioRow label={Reflect.apply(string, intl, [aN3RNQ])} value={GUILD} />;
|
||||
string = intl.string;
|
||||
const js8y7t = (require(1244) /* metro dependency 1244: indexNative */).t.js8y7t;
|
||||
PERSONAL = GuildThemeSourcePreference.PERSONAL;
|
||||
items2[3] = <View style={styles.options}><TableRadioGroup hasIcons={false} value={property} onChange={value9}>{tableRadioRow}<TableRadioRow label={Reflect.apply(string,
|
||||
intl, [js8y7t])} value={PERSONAL} /></TableRadioGroup></View>;
|
||||
items2[4] = value7 ? <View style={styles.warning}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.WARNING} borderRadius={(importDefault(697) /* metro dependency 697: native */).radii.md}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tTHQAy)}</HelpMessage></View> : null;
|
||||
items2[5] = property2 != null ? <View style={styles.warning}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.ERROR} borderRadius={(importDefault(697) /* metro dependency 697: native */).radii.md}>{property2}</HelpMessage></View> : null;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items2[6] = <View style={styles.footer}><Button text={r12} variant={value7 ? 'secondary' : 'primary'} loading={property3} disabled={property3} onPress={value12} /></View>;
|
||||
return (
|
||||
<BottomSheet {...bottomSheetProps}>
|
||||
{items2}
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun110091() { // fn#110091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14754:1151, offset: 0x0236a381, size: 66 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = GuildThemeRuntimeStore.getGuildThemeSnapshot(guildId);
|
||||
const value2 = null;
|
||||
return value2 != value && value.enabled && value2 != value.themeSettings ? value.themeSettings : value2;
|
||||
}
|
||||
|
||||
function _fun110092() { // fn#110092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14754:1271, offset: 0x0236a3c3, size: 61 bytes, params: 1, frame: 11
|
||||
var value;
|
||||
if (guildId !== guildId) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
value.hideActionSheet('GuildThemeNuxActionSheet');
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110093(a0) { // fn#110093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14754:1341, offset: 0x0236a400, size: 30 bytes, params: 2, frame: 12
|
||||
env0_3(null);
|
||||
env0_2(a0);
|
||||
}
|
||||
|
||||
function _fun110094(a0) { // fn#110094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14754:1381, offset: 0x0236a41e, size: 45 bytes, params: 2, frame: 11
|
||||
if (!env0_5.current) {
|
||||
env0_5.current = true;
|
||||
markAsDismissed(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun110096() { // fn#110096, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14754:1442, offset: 0x0236a456, size: 288 bytes, params: 1, frame: 18
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value4;
|
||||
var saveGuildThemeNuxPreference;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var error;
|
||||
var binding3;
|
||||
var binding4;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var fEptJP;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
if (SelectedGuildStore === require) {
|
||||
env1_4(true);
|
||||
env1_3(null);
|
||||
try {
|
||||
binding = env2_0;
|
||||
} catch (error) {
|
||||
binding = env2_12;
|
||||
binding.error('Failed to save guild theme NUX preference', error);
|
||||
binding = env1_3;
|
||||
binding3 = env2_0;
|
||||
binding4 = env2_2;
|
||||
intl = binding3(binding4[15]).intl;
|
||||
string = intl.string;
|
||||
t = binding3(binding4[15]).t;
|
||||
fEptJP = t.fEptJP;
|
||||
binding(Reflect.apply(string, intl, [fEptJP]));
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env2_2;
|
||||
} catch (error) {
|
||||
binding = env2_12;
|
||||
binding.error('Failed to save guild theme NUX preference', error);
|
||||
binding = env1_3;
|
||||
binding3 = env2_0;
|
||||
binding4 = env2_2;
|
||||
intl = binding3(binding4[15]).intl;
|
||||
string = intl.string;
|
||||
t = binding3(binding4[15]).t;
|
||||
fEptJP = t.fEptJP;
|
||||
binding(Reflect.apply(string, intl, [fEptJP]));
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[11];
|
||||
} catch (error) {
|
||||
binding = env2_12;
|
||||
binding.error('Failed to save guild theme NUX preference', error);
|
||||
binding = env1_3;
|
||||
binding3 = env2_0;
|
||||
binding4 = env2_2;
|
||||
intl = binding3(binding4[15]).intl;
|
||||
string = intl.string;
|
||||
t = binding3(binding4[15]).t;
|
||||
fEptJP = t.fEptJP;
|
||||
binding(Reflect.apply(string, intl, [fEptJP]));
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value4 = binding(property);
|
||||
} catch (error) {
|
||||
binding = env2_12;
|
||||
binding.error('Failed to save guild theme NUX preference', error);
|
||||
binding = env1_3;
|
||||
binding3 = env2_0;
|
||||
binding4 = env2_2;
|
||||
intl = binding3(binding4[15]).intl;
|
||||
string = intl.string;
|
||||
t = binding3(binding4[15]).t;
|
||||
fEptJP = t.fEptJP;
|
||||
binding(Reflect.apply(string, intl, [fEptJP]));
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
saveGuildThemeNuxPreference = value4.saveGuildThemeNuxPreference;
|
||||
} catch (error) {
|
||||
binding = env2_12;
|
||||
binding.error('Failed to save guild theme NUX preference', error);
|
||||
binding = env1_3;
|
||||
binding3 = env2_0;
|
||||
binding4 = env2_2;
|
||||
intl = binding3(binding4[15]).intl;
|
||||
string = intl.string;
|
||||
t = binding3(binding4[15]).t;
|
||||
fEptJP = t.fEptJP;
|
||||
binding(Reflect.apply(string, intl, [fEptJP]));
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env2_12;
|
||||
binding.error('Failed to save guild theme NUX preference', error);
|
||||
binding = env1_3;
|
||||
binding3 = env2_0;
|
||||
binding4 = env2_2;
|
||||
intl = binding3(binding4[15]).intl;
|
||||
string = intl.string;
|
||||
t = binding3(binding4[15]).t;
|
||||
fEptJP = t.fEptJP;
|
||||
binding(Reflect.apply(string, intl, [fEptJP]));
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
binding = env2_12;
|
||||
binding.error('Failed to save guild theme NUX preference', error);
|
||||
binding = env1_3;
|
||||
binding3 = env2_0;
|
||||
binding4 = env2_2;
|
||||
intl = binding3(binding4[15]).intl;
|
||||
string = intl.string;
|
||||
t = binding3(binding4[15]).t;
|
||||
fEptJP = t.fEptJP;
|
||||
binding(Reflect.apply(string, intl, [fEptJP]));
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value5 = Reflect.apply(saveGuildThemeNuxPreference, value4, [require, View]);
|
||||
} catch (error) {
|
||||
binding = env2_12;
|
||||
binding.error('Failed to save guild theme NUX preference', error);
|
||||
binding = env1_3;
|
||||
binding3 = env2_0;
|
||||
binding4 = env2_2;
|
||||
intl = binding3(binding4[15]).intl;
|
||||
string = intl.string;
|
||||
t = binding3(binding4[15]).t;
|
||||
fEptJP = t.fEptJP;
|
||||
binding(Reflect.apply(string, intl, [fEptJP]));
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
yield value5;
|
||||
try {
|
||||
value6 = undefined;
|
||||
value7 = false;
|
||||
} catch (error) {
|
||||
binding = env2_12;
|
||||
binding.error('Failed to save guild theme NUX preference', error);
|
||||
binding = env1_3;
|
||||
binding3 = env2_0;
|
||||
binding4 = env2_2;
|
||||
intl = binding3(binding4[15]).intl;
|
||||
string = intl.string;
|
||||
t = binding3(binding4[15]).t;
|
||||
fEptJP = t.fEptJP;
|
||||
binding(Reflect.apply(string, intl, [fEptJP]));
|
||||
env1_4(false);
|
||||
return undefined;
|
||||
}
|
||||
if (value7) {
|
||||
return value6;
|
||||
}
|
||||
env1_5.current = true;
|
||||
var TAKE_ACTION = env2_9.TAKE_ACTION;
|
||||
importDefault(TAKE_ACTION);
|
||||
binding = env2_1;
|
||||
binding(env2_2[14]).hideActionSheet('GuildThemeNuxActionSheet');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110097() { // fn#110097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14754:1745, offset: 0x0236a576, size: 29 bytes, params: 1, frame: 11
|
||||
const binding = env0_8;
|
||||
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
||||
binding(USER_DISMISS);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Metro module 14559; source: modules/guild_themes/native/GuildThemeNuxPreviewGraphic.tsx; dependencies: [31, 27, 33, 4501, 697, 14560, 2] */
|
||||
function _fun110104(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14756:6, offset: 0x0236a77a, size: 228 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{container: {'width': '100%',
|
||||
'aspectRatio': 1.7777777777777777, 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_24}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/native/GuildThemeNuxPreviewGraphic.tsx');
|
||||
exports.default = GuildThemeNuxPreviewGraphic;
|
||||
}
|
||||
|
||||
function GuildThemeNuxPreviewGraphic({themeSettings, isPersonal}) { // fn#110105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14756:395, offset: 0x0236a85e, size: 112 bytes, params: 2, frame: 18
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View
|
||||
accessibilityElementsHidden
|
||||
importantForAccessibility="no-hide-descendants"
|
||||
style={styles.container}
|
||||
>
|
||||
{((Component) => <Component themeSettings={isPersonal ? null : themeSettings} />)(importDefault(14560) /* metro dependency 14560: GuildThemePreviewArt */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/* Metro module 14560; source: modules/guild_themes/native/GuildThemePreviewArt.tsx; dependencies: [31, 27, 33, 4501, 697, 4004, 14561, 4048, 4589, 2] */
|
||||
function _fun110106(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14757:6, offset: 0x0236a8ce, size: 291 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 env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'position': 'relative', 'width': 256, 'aspectRatio': 1.5705521472392638, 'overflow': 'hidden'};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{previewArt: object,
|
||||
previewOverlay: {'position': 'absolute', 'top': 7.314, 'left': 7.461, 'width': 259.862, 'height': 154.514}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/native/GuildThemePreviewArt.tsx');
|
||||
exports.default = GuildThemePreviewArt;
|
||||
}
|
||||
|
||||
function PreviewOverlay() { // fn#110107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14757:425, offset: 0x0236a9f1, size: 86 bytes, params: 1, frame: 17
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View pointerEvents="none" style={styles.previewOverlay}>
|
||||
{((Component) => <Component />)(importDefault(14561) /* metro dependency 14561: GuildThemePreviewOverlay */)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function GuildThemePreviewArt({themeSettings, style}) { // fn#110108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14757:638, offset: 0x0236aa47, size: 257 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const value3 = env0_3.useMemo(_fun110109, [themeSettings,
|
||||
(importDefault(4048) /* metro dependency 4048: useTheme */)()]);
|
||||
items2 = [styles.previewArt, style];
|
||||
return value3 == null ? <View style={items2}><PreviewOverlay /></View> : ((Component) => <Component colors={value3.colors} locations={value3.locations} useAngle angle={value3.angle} style={items2}><PreviewOverlay /></Component>)(importDefault(4589) /* metro dependency 4589 */);
|
||||
}
|
||||
|
||||
function _fun110109() { // fn#110109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14757:730, offset: 0x0236ab48, size: 30 bytes, params: 1, frame: 13
|
||||
return getGradientConfig(themeSettings, env0_1);
|
||||
}
|
||||
|
||||
function getGradientConfig(a0, a1) { // fn#110110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14757:734, offset: 0x0236ab66, size: 273 bytes, params: 3, frame: 22
|
||||
var environment;
|
||||
var colors;
|
||||
var value;
|
||||
var moduleValue;
|
||||
var value2;
|
||||
var object2;
|
||||
var value3;
|
||||
var singleColorGuildThemeGradientColors;
|
||||
var items2;
|
||||
if (a0 != null) {
|
||||
var customUserThemeSettings = a0.customUserThemeSettings;
|
||||
if (customUserThemeSettings == null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
moduleValue = require(4004) /* metro dependency 4004: GuildThemePresets */;
|
||||
value2 = moduleValue.getGuildThemePreset(a0.presetId);
|
||||
if (value2 != null) {
|
||||
value = require(4004) /* metro dependency 4004: GuildThemePresets */;
|
||||
value = value.getGuildThemePresetAppearance(value2, a1);
|
||||
object2 = {};
|
||||
colors = value.colors;
|
||||
object2.colors = colors.map(function(a0) {
|
||||
return a0.hex;
|
||||
});
|
||||
colors = value.colors;
|
||||
object2.locations = colors.map(_fun110112);
|
||||
object2.angle = value.angle;
|
||||
return object2;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
colors = customUserThemeSettings.colors;
|
||||
value = 0;
|
||||
var property = colors[value];
|
||||
if (property != null) {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
singleColorGuildThemeGradientColors = (require(4004) /* metro dependency 4004: GuildThemePresets */).getSingleColorGuildThemeGradientColors(property,
|
||||
|
||||
|
||||
a1);
|
||||
items2 = [];
|
||||
arraySpread(items2, singleColorGuildThemeGradientColors, value, undefined);
|
||||
return {colors: items2, angle: customUserThemeSettings.gradientAngle ?? value};
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
moduleValue = require(4004) /* metro dependency 4004: GuildThemePresets */;
|
||||
value2 = moduleValue.getGuildThemePreset(a0.presetId);
|
||||
if (value2 != null) {
|
||||
value = require(4004) /* metro dependency 4004: GuildThemePresets */;
|
||||
value = value.getGuildThemePresetAppearance(value2, a1);
|
||||
object2 = {};
|
||||
colors = value.colors;
|
||||
object2.colors = colors.map(function(a0) {
|
||||
return a0.hex;
|
||||
});
|
||||
colors = value.colors;
|
||||
object2.locations = colors.map(_fun110112);
|
||||
object2.angle = value.angle;
|
||||
return object2;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 14561; source: modules/guild_themes/native/GuildThemePreviewOverlay.tsx; dependencies: [31, 33, 7744, 2] */
|
||||
function _fun110113(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14758:6, offset: 0x0236ac77, 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/guild_themes/native/GuildThemePreviewOverlay.tsx');
|
||||
exports.default = GuildThemePreviewOverlay;
|
||||
}
|
||||
|
||||
function GuildThemePreviewOverlay(a0) { // fn#110114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14758:231, offset: 0x0236ad0a, size: 1494 bytes, params: 2, frame: 26
|
||||
const defaultImport = importDefault(7744) /* metro dependency 7744 */;
|
||||
const defaultImportProps = {...a0};
|
||||
defaultImportProps['preserveAspectRatio'] = 'none';
|
||||
defaultImportProps['width'] = '100%';
|
||||
defaultImportProps['height'] = '100%';
|
||||
defaultImportProps['viewBox'] = '0 0 259.862 154.514';
|
||||
defaultImportProps['fill'] = 'none';
|
||||
const G = (require(7744) /* metro dependency 7744 */).G;
|
||||
const Path = (require(7744) /* metro dependency 7744 */).Path;
|
||||
const items4 = [<Path d="M20.8821 7.1867C20.8821 3.21759 24.0659 0 27.9932 0H84.8821V154.514H20.8821V7.1867Z" fill="black" fillOpacity="0.1" />];
|
||||
items4[1] = <Path d="M248.055 0.225335H85.0491V154.266H248.055V0.225335Z" fill="black" fillOpacity="0.25" />;
|
||||
const G2 = (require(7744) /* metro dependency 7744 */).G;
|
||||
const items2 = [<Path d="M99.2224 43.2126C103.136 43.2126 106.31 40.0048 106.31 36.0479C106.31 32.091 103.136 28.8832 99.2224 28.8832C95.3082 28.8832 92.1351 32.091 92.1351 36.0479C92.1351 40.0048 95.3082 43.2126 99.2224 43.2126Z" fill="white" />];
|
||||
items2[1] = <Path d="M125.795 31.1038H112.802C111.824 31.1038 111.031 31.9059 111.031 32.8951C111.031 33.8842 111.824 34.6863 112.802 34.6863H125.795C126.774 34.6863 127.567 33.8842 127.567 32.8951C127.567 31.9059 126.774 31.1038 125.795 31.1038Z" fill="white" />;
|
||||
items2[2] = <Path d="M111.031 39.7954C111.031 39.1359 111.559 38.6011 112.212 38.6011H163.004C163.656 38.6011 164.185 39.1359 164.185 39.7954C164.185 40.4547 163.656 40.9895 163.004 40.9895H112.212C111.559 40.9895 111.031 40.4547 111.031 39.7954Z" fill="white" />;
|
||||
items2[3] = <Path d="M99.2224 67.095C103.136 67.095 106.31 63.8872 106.31 59.9303C106.31 55.9734 103.136 52.7656 99.2224 52.7656C95.3082 52.7656 92.1351 55.9734 92.1351 59.9303C92.1351 63.8872 95.3082 67.095 99.2224 67.095Z" fill="white" />;
|
||||
items2[4] = <Path d="M130.52 54.9867H112.802C111.824 54.9867 111.031 55.7886 111.031 56.7777C111.031 57.7671 111.824 58.569 112.802 58.569H130.52C131.499 58.569 132.292 57.7671 132.292 56.7777C132.292 55.7886 131.499 54.9867 130.52 54.9867Z" fill="white" />;
|
||||
items2[5] = <Path d="M111.031 63.6776C111.031 63.0181 111.559 62.4833 112.212 62.4833H137.017C137.67 62.4833 138.198 63.0181 138.198 63.6776C138.198 64.3369 137.67 64.8717 137.017 64.8717H112.212C111.559 64.8717 111.031 64.3369 111.031 63.6776Z" fill="white" />;
|
||||
items2[6] = <Path d="M99.2224 90.9774C103.136 90.9774 106.31 87.7696 106.31 83.8127C106.31 79.8558 103.136 76.6481 99.2224 76.6481C95.3082 76.6481 92.1351 79.8558 92.1351 83.8127C92.1351 87.7696 95.3082 90.9774 99.2224 90.9774Z" fill="white" />;
|
||||
items2[7] = <Path d="M143.514 78.8689H112.802C111.824 78.8689 111.031 79.671 111.031 80.6601C111.031 81.6493 111.824 82.4514 112.802 82.4514H143.514C144.492 82.4514 145.286 81.6493 145.286 80.6601C145.286 79.671 144.492 78.8689 143.514 78.8689Z" fill="white" />;
|
||||
items2[8] = <Path d="M111.031 87.5598C111.031 86.9005 111.559 86.3657 112.212 86.3657H158.279C158.931 86.3657 159.46 86.9005 159.46 87.5598C159.46 88.2193 158.931 88.7541 158.279 88.7541H112.212C111.559 88.7541 111.031 88.2193 111.031 87.5598Z" fill="white" />;
|
||||
items4[2] = <G2 opacity="0.2">{items2}</G2>;
|
||||
items4[3] = <Path opacity="0.2" d="M76.1873 8.28431H28.9391C28.4497 8.28431 28.0532 8.68527 28.0532 9.1799C28.0532 9.67453 28.4497 10.0755 28.9391 10.0755H76.1873C76.6765 10.0755 77.0733 9.67453 77.0733 9.1799C77.0733 8.68527 76.6765 8.28431 76.1873 8.28431Z" fill="#D9D9D9" />;
|
||||
items4[4] = <Path opacity="0.2" d="M141.155 8.28431H93.9068C93.4174 8.28431 93.0208 8.68527 93.0208 9.1799C93.0208 9.67453 93.4174 10.0755 93.9068 10.0755H141.155C141.644 10.0755 142.041 9.67453 142.041 9.1799C142.041 8.68527 141.644 8.28431 141.155 8.28431Z" fill="#D9D9D9" />;
|
||||
items4[5] = <Path opacity="0.2" d="M9.44965 3.80698H4.72483C2.11537 3.80698 0 5.94547 0 8.58343V13.3599C0 15.9979 2.11537 18.1363 4.72483 18.1363H9.44965C12.0591 18.1363 14.1745 15.9979 14.1745 13.3599V8.58343C14.1745 5.94547 12.0591 3.80698 9.44965 3.80698Z" fill="white" />;
|
||||
items4[6] = <Path opacity="0.2" d="M13.5839 24.1077H0.590606C0.264409 24.1077 0 24.375 0 24.7049C0 25.0345 0.264409 25.3018 0.590606 25.3018H13.5839C13.91 25.3018 14.1745 25.0345 14.1745 24.7049C14.1745 24.375 13.91 24.1077 13.5839 24.1077Z" fill="white" fillOpacity="0.55" />;
|
||||
items4[7] = <Path opacity="0.2" d="M9.44965 31.2709H4.72483C2.11537 31.2709 0 33.4096 0 36.0474V40.8239C0 43.4618 2.11537 45.6005 4.72483 45.6005H9.44965C12.0591 45.6005 14.1745 43.4618 14.1745 40.8239V36.0474C14.1745 33.4096 12.0591 31.2709 9.44965 31.2709Z" fill="white" />;
|
||||
items4[8] = <Path opacity="0.5" d="M9.44965 51.5718H4.72483C2.11537 51.5718 0 53.7103 0 56.3481V61.1246C0 63.7627 2.11537 65.9012 4.72483 65.9012H9.44965C12.0591 65.9012 14.1745 63.7627 14.1745 61.1246V56.3481C14.1745 53.7103 12.0591 51.5718 9.44965 51.5718Z" fill="white" />;
|
||||
items4[9] = <Path opacity="0.05" d="M259.862 18.1359H21.2575V19.3299H259.862V18.1359Z" fill="white" />;
|
||||
const G3 = (require(7744) /* metro dependency 7744 */).G;
|
||||
const items3 = [<Path d="M44.2994 29.7789H30.1249C29.6356 29.7789 29.239 30.18 29.239 30.6745C29.239 31.1692 29.6356 31.5701 30.1249 31.5701H44.2994C44.7885 31.5701 45.1853 31.1692 45.1853 30.6745C45.1853 30.18 44.7885 29.7789 44.2994 29.7789Z" fill="white" stroke="white" strokeWidth="0.723776" />];
|
||||
items3[1] = <Path d="M33.6659 47.9852C36.6001 47.9852 38.9791 45.5804 38.9791 42.6139C38.9791 39.6474 36.6001 37.2427 33.6659 37.2427C30.7315 37.2427 28.3528 39.6474 28.3528 42.6139C28.3528 45.5804 30.7315 47.9852 33.6659 47.9852Z" fill="white" />;
|
||||
items3[2] = <Path d="M59.6471 41.7178H45.4727C44.9833 41.7178 44.5868 42.1187 44.5868 42.6132C44.5868 43.1079 44.9833 43.5088 45.4727 43.5088H59.6471C60.1363 43.5088 60.5331 43.1079 60.5331 42.6132C60.5331 42.1187 60.1363 41.7178 59.6471 41.7178Z" fill="white" stroke="white" strokeWidth="0.723776" />;
|
||||
items3[3] = <Path d="M33.6659 63.5031C36.6001 63.5031 38.9791 61.0984 38.9791 58.1319C38.9791 55.1654 36.6001 52.7607 33.6659 52.7607C30.7315 52.7607 28.3528 55.1654 28.3528 58.1319C28.3528 61.0984 30.7315 63.5031 33.6659 63.5031Z" fill="white" />;
|
||||
items3[4] = <Path d="M73.8216 57.2358H45.4727C44.9833 57.2358 44.5868 57.6367 44.5868 58.1314C44.5868 58.6259 44.9833 59.0268 45.4727 59.0268H73.8216C74.311 59.0268 74.7075 58.6259 74.7075 58.1314C74.7075 57.6367 74.311 57.2358 73.8216 57.2358Z" fill="white" stroke="white" strokeWidth="0.723776" />;
|
||||
items3[5] = <Path d="M33.6659 79.0211C36.6001 79.0211 38.9791 76.6164 38.9791 73.6499C38.9791 70.6836 36.6001 68.2787 33.6659 68.2787C30.7315 68.2787 28.3528 70.6836 28.3528 73.6499C28.3528 76.6164 30.7315 79.0211 33.6659 79.0211Z" fill="white" />;
|
||||
items3[6] = <Path d="M67.9155 72.7538H45.4727C44.9833 72.7538 44.5868 73.1547 44.5868 73.6494C44.5868 74.1438 44.9833 74.5448 45.4727 74.5448H67.9155C68.4049 74.5448 68.8015 74.1438 68.8015 73.6494C68.8015 73.1547 68.4049 72.7538 67.9155 72.7538Z" fill="white" stroke="white" strokeWidth="0.723776" />;
|
||||
items4[10] = <G3 opacity="0.2">{items3}</G3>;
|
||||
items4[11] = <Path d="M73.2348 124.413H4.72483C2.11537 124.413 0 126.551 0 129.189V143.519C0 146.157 2.11537 148.295 4.72483 148.295H73.2348C75.8444 148.295 77.9597 146.157 77.9597 143.519V129.189C77.9597 126.551 75.8444 124.413 73.2348 124.413Z" fill="white" fillOpacity="0.08" />;
|
||||
items4[12] = <Path opacity="0.3" d="M11.8111 143.518C15.7253 143.518 18.8983 140.31 18.8983 136.353C18.8983 132.396 15.7253 129.188 11.8111 129.188C7.89693 129.188 4.72387 132.396 4.72387 136.353C4.72387 140.31 7.89693 143.518 11.8111 143.518Z" fill="white" />;
|
||||
const G4 = (require(7744) /* metro dependency 7744 */).G;
|
||||
items4[13] = <G4 opacity="0.3"><Path d="M56.1027 131.209H25.3914C24.4127 131.209 23.6196 132.011 23.6196 133C23.6196 133.989 24.4127 134.791 25.3914 134.791H56.1027C57.0811 134.791 57.8745 133.989 57.8745 133C57.8745 132.011 57.0811 131.209 56.1027 131.209Z" fill="white" /><Path d="M44.2905 137.918H25.3914C24.4127 137.918 23.6196 138.72 23.6196 139.709C23.6196 140.698 24.4127 141.5 25.3914 141.5H44.2905C45.2693 141.5 46.0624 140.698 46.0624 139.709C46.0624 138.72 45.2693 137.918 44.2905 137.918Z" fill="white" /></G4>;
|
||||
const G5 = (require(7744) /* metro dependency 7744 */).G;
|
||||
items4[14] = <G5 opacity="0.5"><Path d="M235.061 124.413H98.041C94.779 124.413 92.1349 127.086 92.1349 130.383V142.324C92.1349 145.622 94.779 148.295 98.041 148.295H235.061C238.322 148.295 240.966 145.622 240.966 142.324V130.383C240.966 127.086 238.322 124.413 235.061 124.413Z" fill="white" fillOpacity="0.08" /></G5>;
|
||||
return ((Component) => <Component {...defaultImportProps}><G>{items4}</G></Component>)(defaultImport);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 14556; source: modules/guild_themes/native/useGuildThemeNuxTrigger.tsx; dependencies: [31, 3849, 566, 14557, 14557, 1962, 4080, 14562, 2] */
|
||||
function _fun110084(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14753:6, offset: 0x02369966, size: 137 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/native/useGuildThemeNuxTrigger.tsx');
|
||||
exports.default = useGuildThemeNuxTrigger;
|
||||
}
|
||||
|
||||
function useGuildThemeNuxTrigger(a0) { // fn#110085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14753:215, offset: 0x023699ef, size: 122 bytes, params: 2, frame: 17
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
(importDefault(14562) /* metro dependency 14562: useGuildThemeNuxTrigger */)(a0,
|
||||
{isNuxOpen: Reflect.apply(useStateFromStores, fluxModule, [[ActionSheetStore], function() {
|
||||
return ActionSheetStore.getKey() === require(dependencyMap[3]).GUILD_THEME_NUX_ACTION_SHEET_KEY;
|
||||
}]), openNux: env0_3.useCallback(_fun110087, [])});
|
||||
}
|
||||
|
||||
function _fun110087(a0) { // fn#110087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14753:366, offset: 0x02369a9c, size: 102 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const value2 = require(dependencyMap[5])(dependencyMap[4], dependencyMap.paths);
|
||||
value = importDefault(dependencyMap[6]);
|
||||
const openLazy = value.openLazy;
|
||||
const GUILD_THEME_NUX_ACTION_SHEET_KEY = require(dependencyMap[3]).GUILD_THEME_NUX_ACTION_SHEET_KEY;
|
||||
Reflect.apply(openLazy, value, [value2, GUILD_THEME_NUX_ACTION_SHEET_KEY, a0, 'stack']);
|
||||
return value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
/* Metro module 4006; source: modules/guild_themes/native/useRoutedActiveGuildTheme.tsx; dependencies: [57, 31, 661, 4007, 4008, 4037, 4038, 2] */
|
||||
function _fun32972(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#32972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4164:6, offset: 0x01023fe8, size: 175 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const getActiveGuildThemeGuildIdSnapshot = function() {
|
||||
var value5;
|
||||
var value2 = require(dependencyMap[4]).getRootNavigationRef();
|
||||
var value3 = null;
|
||||
if (value3 != value2) {
|
||||
if (value2.isReady()) {
|
||||
value5 = _fun32975(value2.getRootState());
|
||||
return value3 == value5 || value5 === ME ? value3 : value5;
|
||||
}
|
||||
}
|
||||
return value3;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).ME;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/native/useRoutedActiveGuildTheme.tsx');
|
||||
exports.default = function() {
|
||||
return require(dependencyMap[6]).useActiveGuildThemeForGuildId(_fun32978());
|
||||
};
|
||||
}
|
||||
|
||||
function getGuildIdFromNavigationState(a0) { // fn#32973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4164:129, offset: 0x01024097, size: 95 bytes, params: 2, frame: 14
|
||||
var guildId;
|
||||
var r0;
|
||||
var property;
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
var routes = a0.routes;
|
||||
if (routes != null) {
|
||||
property = routes[a0.index];
|
||||
value = undefined;
|
||||
guildId = property == null || property.params == null ? value : property.params.guildId;
|
||||
if (guildId != null) {
|
||||
r0 = guildId;
|
||||
} else {
|
||||
value = getGuildIdFromNavigationState(property == null ? value : property.state);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getActiveGuildThemeGuildIdSnapshot() { // fn#32974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4164:353, offset: 0x010240f6, size: 102 bytes, params: 1, frame: 13
|
||||
var value5;
|
||||
const rootNavigationRef = (require(4008) /* metro dependency 4008: RootNavigationRefNative */).getRootNavigationRef();
|
||||
let value3 = null;
|
||||
if (value3 != rootNavigationRef) {
|
||||
if (rootNavigationRef.isReady()) {
|
||||
value5 = ((a0) => {
|
||||
var r4;
|
||||
var getGuildIdFromNavigationStateBinding = getGuildIdFromNavigationState;
|
||||
var value2 = undefined;
|
||||
var value3 = getGuildIdFromNavigationStateBinding(a0);
|
||||
if (value3 != null) {
|
||||
return value3;
|
||||
}
|
||||
r4 = a0 == null || a0.routes == null ? value2 : a0.routes.map((require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceMainRoute).find(_fun32976);
|
||||
return getGuildIdFromNavigationState(r4 == null ? value2 : r4.state);
|
||||
})(rootNavigationRef.getRootState());
|
||||
return value3 == value5 || value5 === ME ? value3 : value5;
|
||||
}
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function useRoutedActiveGuildTheme() { // fn#32977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4164:887, offset: 0x010241dc, size: 49 bytes, params: 1, frame: 13
|
||||
return (require(4038) /* metro dependency 4038: GuildThemeResolver */).useActiveGuildThemeForGuildId(useRoutedActiveGuildThemeGuildId());
|
||||
}
|
||||
|
||||
function getGuildIdFromRootNavigationState(a0) { // fn#32975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4164:479, owner: getActiveGuildThemeGuildIdSnapshot.getGuildIdFromRootNavigationState, offset: 0x0102415c, size: 128 bytes, params: 2, frame: 18
|
||||
const getGuildIdFromNavigationStateBinding = getGuildIdFromNavigationState;
|
||||
const value2 = undefined;
|
||||
const guildIdFromNavigationStateBinding = getGuildIdFromNavigationStateBinding(a0);
|
||||
if (guildIdFromNavigationStateBinding != null) {
|
||||
return guildIdFromNavigationStateBinding;
|
||||
}
|
||||
const r4 = a0 == null || a0.routes == null ? value2 : a0.routes.map((require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).coerceMainRoute).find(function(a0) {
|
||||
return a0 != null;
|
||||
});
|
||||
return getGuildIdFromNavigationState(r4 == null ? value2 : r4.state);
|
||||
}
|
||||
|
||||
function useRoutedActiveGuildThemeGuildId() { // fn#32978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4164:930, owner: useRoutedActiveGuildTheme.useRoutedActiveGuildThemeGuildId, offset: 0x0102420d, size: 128 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_4;
|
||||
const value2 = binding.useContext(importDefault(4037) /* metro dependency 4037: GuildThemeGuildIdOverrideContext */);
|
||||
const useState = binding.useState;
|
||||
const value4 = env1_3(Reflect.apply(useState, binding, [getActiveGuildThemeGuildIdSnapshot]), 2);
|
||||
const property = value4[0];
|
||||
const env0_0 = value4[1];
|
||||
binding.useEffect(_fun32979, []);
|
||||
return value2 === undefined ? property : value2 === ME ? null : value2;
|
||||
}
|
||||
|
||||
function _fun32979() { // fn#32979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4164:1094, offset: 0x0102428d, size: 72 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
var closure;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4008) /* metro dependency 4008: RootNavigationRefNative */;
|
||||
value = value.getRootNavigationRef();
|
||||
if (value != null) {
|
||||
closure = handleStateChange_32980;
|
||||
closure();
|
||||
return value.addListener('state', closure);
|
||||
}
|
||||
}
|
||||
|
||||
function handleStateChange_32980() { // fn#32980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4164:1170, offset: 0x010242d5, size: 27 bytes, params: 1, frame: 11
|
||||
env1_0(getActiveGuildThemeGuildIdSnapshot());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 14562; source: modules/guild_themes/useGuildThemeNuxTrigger.tsx; dependencies: [57, 31, 1376, 4038, 7013, 1365, 2] */
|
||||
function _fun110115(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14759:6, offset: 0x0236b2e0, size: 169 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).DismissibleContentGroupName;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_themes/useGuildThemeNuxTrigger.tsx');
|
||||
exports.default = useGuildThemeNuxTrigger_110116;
|
||||
exports.GUILD_THEME_NUX_DELAY_MS = 2000;
|
||||
}
|
||||
|
||||
function useGuildThemeNuxTrigger_110116(a0, {isNuxOpen, openNux}) { // fn#110116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14759:246, offset: 0x0236b389, size: 336 bytes, params: 3, frame: 21
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
const env0_0 = a0;
|
||||
const env0_2 = openNux;
|
||||
const value2 = (require(4038) /* metro dependency 4038: GuildThemeResolver */).useEnabledGuildThemeForGuildId(a0,
|
||||
'GuildThemeNuxTrigger');
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
const useSelectedDismissibleContent = useSelectedDismissibleContentModule.useSelectedDismissibleContent;
|
||||
const r4 = value2 != null ? [DismissibleContent.GUILD_THEME_NUX] : [];
|
||||
let GUILD_THEME_NUX = DismissibleContentGroupName.GUILD_THEME_NUX;
|
||||
const value4 = env0_2(Reflect.apply(useSelectedDismissibleContent, useSelectedDismissibleContentModule, [r4,
|
||||
GUILD_THEME_NUX]), 2);
|
||||
const property = value4[0];
|
||||
const property2 = value4[1];
|
||||
const env0_3 = property2;
|
||||
GUILD_THEME_NUX = DismissibleContent.GUILD_THEME_NUX;
|
||||
const value5 = property === GUILD_THEME_NUX;
|
||||
const binding = env0_3;
|
||||
const env0_5 = binding.useRef(false);
|
||||
binding.useEffect(_fun110117, [a0]);
|
||||
binding.useEffect(_fun110118, [value5, isNuxOpen, a0, property2, openNux]);
|
||||
}
|
||||
|
||||
function _fun110117() { // fn#110117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14759:592, offset: 0x0236b4d9, size: 19 bytes, params: 1, frame: 2
|
||||
env0_5.current = false;
|
||||
}
|
||||
|
||||
function _fun110118() { // fn#110118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14759:630, offset: 0x0236b4ec, size: 77 bytes, params: 1, frame: 14
|
||||
if (env0_4) {
|
||||
if (isNuxOpen) {
|
||||
return undefined;
|
||||
}
|
||||
if (env0_5.current) {
|
||||
return undefined;
|
||||
}
|
||||
var env0_0 = global.setTimeout(_fun110119, 2000);
|
||||
return _fun110122;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110119() { // fn#110119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14759:675, offset: 0x0236b539, size: 94 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_5.current = true;
|
||||
const Promise = global.Promise;
|
||||
Promise.resolve(openNux({guildId: env1_0, markAsDismissed: markAsDismissed_110120})).catch(_fun110121);
|
||||
}
|
||||
|
||||
function markAsDismissed_110120(a0) { // fn#110120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14759:747, offset: 0x0236b597, size: 38 bytes, params: 2, frame: 13
|
||||
if (!env0_0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
env2_3(a0, true);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun110121() { // fn#110121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14759:780, offset: 0x0236b5bd, size: 19 bytes, params: 1, frame: 2
|
||||
env2_5.current = false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user