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

No files matched your search

@@ -1,21 +1,25 @@
/* Metro module 1889; source: modules/display_name_styles/DisplayNameStylesConstants.tsx; dependencies: [1890, 1891, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DisplayNameEffectModule from '../../external/discord_common/js/shared/shared-constants/DisplayNameEffect.tsx'; /* Metro dependency 1890 */
import * as DisplayNameFontModule from '../../external/discord_common/js/shared/shared-constants/DisplayNameFont.tsx'; /* Metro dependency 1891 */
function _fun20522(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2016:6, offset: 0x00ecb4f7, size: 1184 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
const SOLID = DisplayNameEffect.SOLID;
items = [SOLID];
items2 = [SOLID];
const GRADIENT = DisplayNameEffect.GRADIENT;
items[1] = GRADIENT;
items2[1] = GRADIENT;
const NEON = DisplayNameEffect.NEON;
items[2] = NEON;
items2[2] = NEON;
const TOON = DisplayNameEffect.TOON;
items[3] = TOON;
items2[3] = TOON;
const POP = DisplayNameEffect.POP;
items[4] = POP;
items2[4] = POP;
const Map = global.Map;
const DisplayNameFont = (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont;
const DisplayNameFont = (DisplayNameFontModule).DisplayNameFont;
const SINISTRE = DisplayNameFont.SINISTRE;
const NEO_CASTEL = DisplayNameFont.NEO_CASTEL;
const CHERRY_BOMB = DisplayNameFont.CHERRY_BOMB;
@@ -77,8 +81,8 @@ function _fun20522(global, require, importDefault, importAll, module, exports, d
}
return {start: r2, end: r1, name: ''};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesConstants.tsx');
exports.EFFECT_ORDER = items;
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesConstants.tsx');
exports.EFFECT_ORDER = items2;
exports.FONT_WEIGHTS = map;
exports.FLYWHEEL_FONTS = items10;
exports.FLYWHEEL_EFFECTS = items11;
@@ -93,32 +97,33 @@ function _fun20522(global, require, importDefault, importAll, module, exports, d
9497343, 6082490], [14287177, 16521573, 16095292, 13018645, 1027403], [747943, 1874155, 1628845, 695675,
2417517]];
exports.getColorPresetsForEffect = getColorPresetsForEffect;
}
function getColorPresetsForEffect(a0) { // fn#20524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2016:1945, offset: 0x00ecb9ea, size: 201 bytes, params: 2, frame: 15
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const GUMMY = DisplayNameEffect.GUMMY;
if (GUMMY === a0) {
return env0_4;
}
const PRISM = DisplayNameEffect.PRISM;
if (PRISM === a0) {
return env0_5;
}
const GRADIENT = DisplayNameEffect.GRADIENT;
if (GRADIENT === a0) {
return env0_3.map(function(a0) {
return [a0.start, a0.end];
function getColorPresetsForEffect(a0) { // fn#20524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2016:1945, offset: 0x00ecb9ea, size: 201 bytes, params: 2, frame: 15
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
const GUMMY = DisplayNameEffect.GUMMY;
if (GUMMY === a0) {
return env0_4;
}
const PRISM = DisplayNameEffect.PRISM;
if (PRISM === a0) {
return env0_5;
}
const GRADIENT = DisplayNameEffect.GRADIENT;
if (GRADIENT === a0) {
return env0_3.map(function(a0) {
return [a0.start, a0.end];
});
}
const GLOW = DisplayNameEffect.GLOW;
if (GLOW === a0) {
return env0_3.map(function(a0) {
return [a0.start, a0.end];
});
}
return env0_2.map(function(a0) {
return [a0];
});
}
const GLOW = DisplayNameEffect.GLOW;
if (GLOW === a0) {
return env0_3.map(function(a0) {
return [a0.start, a0.end];
});
}
return env0_2.map(function(a0) {
return [a0];
});
}
global.__d(_fun20522, 1889, [1890, 1891, 2]) /* metro module 1889, dependencies: [1890, 1891, 2] */;
@@ -1,9 +1,13 @@
/* Metro module 4637; source: modules/display_name_styles/DisplayNameStylesContext.tsx; dependencies: [31, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun39893(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4815:6, offset: 0x010eef9b, size: 110 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const context = (require(31) /* metro dependency 31 */).createContext({overrideSettings: false});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesContext.tsx');
const context = (ReactModule).createContext({overrideSettings: false});
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesContext.tsx');
exports.DisplayNameStylesContext = context;
}
global.__d(_fun39893, 4637, [31, 2]) /* metro module 4637, dependencies: [31, 2] */;
@@ -1,4 +1,9 @@
/* Metro module 8698; source: modules/display_name_styles/DisplayNameStylesFlywheelExperiment.tsx; dependencies: [1878, 1854, 566, 2] */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ApexModule from '../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun68347(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8883:6, offset: 0x01c4b22a, size: 291 bytes, params: 8, frame: 24
const env0_0 = require;
const useIsStaff = function() {
@@ -6,41 +11,41 @@ function _fun68347(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'kind': 'user', 'name': '2026-06-gummy-bears', defaultConfig: {enabled: false},
variations: {[1]: {enabled: true}}});
const apexExperiment = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'kind': 'user',
const apexExperiment = (ApexModule).createApexExperiment({'kind': 'user',
'name': '2026-06-gummy-viewers', defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesFlywheelExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesFlywheelExperiment.tsx');
exports.DisplayNameStylesFlywheelSettersExperiment = value;
exports.DisplayNameStylesFlywheelViewersExperiment = apexExperiment;
exports.useIsDisplayNameStylesFlywheelViewersEnabled = useIsDisplayNameStylesFlywheelViewersEnabled;
exports.useIsDisplayNameStylesFlywheelSettersEnabled = useIsDisplayNameStylesFlywheelSettersEnabled;
}
function useIsStaff() { // fn#68348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8883:364, offset: 0x01c4b34d, size: 59 bytes, params: 1, frame: 13
return (FluxModule).useStateFromStores([UserStore], _fun68349);
function _fun68349() { // fn#68349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8883:425, offset: 0x01c4b388, size: 49 bytes, params: 1, frame: 11
var r1;
let value = environment.__proto__;
value = UserStore.getCurrentUser();
if (value == null) {
r1 = undefined;
} else {
value = value.isStaff();
r1 = value;
}
return r1 != null && r1;
}
function useIsStaff() { // fn#68348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8883:364, offset: 0x01c4b34d, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun68349);
}
function useIsDisplayNameStylesFlywheelViewersEnabled(a0) { // fn#68350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8883:751, offset: 0x01c4b3b9, size: 47 bytes, params: 2, frame: 13
return useIsStaff() && env0_4.useConfig({location: a0}).enabled;
}
function useIsDisplayNameStylesFlywheelSettersEnabled(a0) { // fn#68351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8883:919, offset: 0x01c4b3e8, size: 47 bytes, params: 2, frame: 13
return useIsStaff() && env0_3.useConfig({location: a0}).enabled;
}
function _fun68349() { // fn#68349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8883:425, offset: 0x01c4b388, size: 49 bytes, params: 1, frame: 11
var r1;
let value = environment.__proto__;
value = UserStore.getCurrentUser();
if (value == null) {
r1 = undefined;
} else {
value = value.isStaff();
r1 = value;
}
return r1 != null && r1;
function useIsDisplayNameStylesFlywheelViewersEnabled(a0) { // fn#68350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8883:751, offset: 0x01c4b3b9, size: 47 bytes, params: 2, frame: 13
return useIsStaff() && env0_4.useConfig({location: a0}).enabled;
}
function useIsDisplayNameStylesFlywheelSettersEnabled(a0) { // fn#68351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8883:919, offset: 0x01c4b3e8, size: 47 bytes, params: 2, frame: 13
return useIsStaff() && env0_3.useConfig({location: a0}).enabled;
}
}
global.__d(_fun68347, 8698, [1878, 1854, 566, 2]) /* metro module 8698, dependencies: [1878, 1854, 566, 2] */;
@@ -1,25 +1,32 @@
/* Metro module 13793; source: modules/display_name_styles/DisplayNameStylesFontOrder.tsx; dependencies: [31, 1889, 1891, 8698, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as DisplayNameStylesConstantsModule from './DisplayNameStylesConstants.tsx'; /* Metro dependency 1889 */
import * as DisplayNameFontModule from '../../external/discord_common/js/shared/shared-constants/DisplayNameFont.tsx'; /* Metro dependency 1891 */
import * as DisplayNameStylesFlywheelExperimentModule from './DisplayNameStylesFlywheelExperiment.tsx'; /* Metro dependency 8698 */
function _fun105220(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13990:6, offset: 0x022b16ae, size: 373 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const FLYWHEEL_FONTS = (require(1889) /* metro dependency 1889: DisplayNameStylesConstants */).FLYWHEEL_FONTS;
const FLYWHEEL_FONTS = (DisplayNameStylesConstantsModule).FLYWHEEL_FONTS;
const {DEFAULT, ZILLA_SLAB, CHERRY_BOMB, CHICLE, MUSEO_MODERNO, NEO_CASTEL, PIXELIFY,
SINISTRE} = (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont;
SINISTRE} = (DisplayNameFontModule).DisplayNameFont;
const items2 = [];
arraySpread(items2, FLYWHEEL_FONTS, arraySpread(items2, [DEFAULT, ZILLA_SLAB, CHERRY_BOMB, CHICLE, MUSEO_MODERNO,
NEO_CASTEL, PIXELIFY, SINISTRE], 0, PIXELIFY), PIXELIFY);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesFontOrder.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesFontOrder.tsx');
exports.useVisibleFontOrder = useVisibleFontOrder;
function useVisibleFontOrder() { // fn#105221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13990:536, offset: 0x022b1823, size: 80 bytes, params: 1, frame: 14
return ReactModule.useMemo(_fun105222,
[(DisplayNameStylesFlywheelExperimentModule).useIsDisplayNameStylesFlywheelSettersEnabled('font-order')]);
function _fun105222() { // fn#105222, offset: 0x022b1873, size: 25 bytes, params: 1, frame: 3
return env0_0 ? env1_4 : env1_3;
}
}
}
function useVisibleFontOrder() { // fn#105221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13990:536, offset: 0x022b1823, size: 80 bytes, params: 1, frame: 14
return env0_2.useMemo(_fun105222,
[(require(8698) /* metro dependency 8698: DisplayNameStylesFlywheelExperiment */).useIsDisplayNameStylesFlywheelSettersEnabled('font-order')]);
}
function _fun105222() { // fn#105222, offset: 0x022b1873, size: 25 bytes, params: 1, frame: 3
return env0_0 ? env1_4 : env1_3;
}
global.__d(_fun105220, 13793, [31, 1889, 1891, 8698,
2]) /* metro module 13793, dependencies: [31, 1889, 1891, 8698, 2] */;
@@ -1,4 +1,8 @@
/* Metro module 1888; source: modules/display_name_styles/DisplayNameStylesUtils.tsx; dependencies: [1889, 1890, 674, 1891, 2] */
import Module00674 from '../../by-id/module-00674.js'; /* Metro dependency 674 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DisplayNameStylesConstantsModule from './DisplayNameStylesConstants.tsx'; /* Metro dependency 1889 */
function _fun20510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:6, offset: 0x00ecad41, size: 252 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_20513 = function(a0, a1) {
@@ -44,16 +48,10 @@ function _fun20510(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = selectWeightedFont;
const selectWeightedFont2 = selectWeightedFont;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const displayNameStylesConstantsModule = require(1889) /* metro dependency 1889: DisplayNameStylesConstants */;
const env0_3 = displayNameStylesConstantsModule.EFFECT_ORDER;
const env0_4 = displayNameStylesConstantsModule.FLYWHEEL_EFFECTS;
const env0_5 = displayNameStylesConstantsModule.FLYWHEEL_FONTS;
const env0_6 = displayNameStylesConstantsModule.FONT_WEIGHTS;
const env0_7 = displayNameStylesConstantsModule.getColorPresetsForEffect;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesUtils.tsx');
exports.getEffectColorCount = function(a0) {
if (require(dependencyMap[1]).DisplayNameEffect.GRADIENT === a0) {
return 2;
@@ -71,7 +69,7 @@ function _fun20510(global, require, importDefault, importAll, module, exports, d
var value = null;
return value == a0 ? value : {fontId: a0.font_id, effectId: a0.effect_id, colors: a0.colors};
};
exports.selectWeightedFont = closure;
exports.selectWeightedFont = selectWeightedFont2;
exports.generateRandomDisplayNameStyles = generateRandomDisplayNameStyles;
exports.applyFlywheelViewingFallback = applyFlywheelViewingFallback;
exports.hasNonLatinLetters = function(a0) {
@@ -84,190 +82,197 @@ function _fun20510(global, require, importDefault, importAll, module, exports, d
'g'), ''));
};
}
function _createForOfIteratorHelperLoose_20511(a0, a1) { // fn#20511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:214, offset: 0x00ecae3d, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_20511(a0, a1) { // fn#20511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:214, offset: 0x00ecae3d, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun20512;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_20513(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun20512;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_20513(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_20513(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_20513(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun20512;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun20512() { // fn#20512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:785, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun20512;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function selectWeightedFont(a0) { // fn#20514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1124, offset: 0x00ecafaf, size: 153 bytes, params: 2, frame: 21
var r2;
var value7;
var value8;
var value9;
var value10;
const value = 0;
const value2 = a0.reduce(_fun20515, value);
const Math = global.Math;
const value3 = Math.random() * value2;
const value5 = _createForOfIteratorHelperLoose_20511(a0);
const value6 = value5();
let done = value6.done;
if (done) {
return a0[a0.length - 1];
}
let r3 = value6;
let r8 = value3;
while (true) {
value7 = r3.value;
value8 = FONT_WEIGHTS.get(value7);
r2 = value8 ?? value;
value9 = r8 - r2;
if (value9 <= value) {
break;
}
value10 = value5();
done = value10.done;
function selectWeightedFont(a0) { // fn#20514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1124, offset: 0x00ecafaf, size: 153 bytes, params: 2, frame: 21
var r2;
var value7;
var value8;
var value9;
var value10;
const value = 0;
const value2 = a0.reduce(_fun20515, value);
const Math = global.Math;
const value3 = Math.random() * value2;
const value5 = _createForOfIteratorHelperLoose_20511(a0);
const value6 = value5();
let done = value6.done;
if (done) {
return a0[a0.length - 1];
}
r3 = value10;
r8 = value9;
continue;
let r3 = value6;
let r8 = value3;
while (true) {
value7 = r3.value;
value8 = FONT_WEIGHTS.get(value7);
r2 = value8 ?? value;
value9 = r8 - r2;
if (value9 <= value) {
break;
}
value10 = value5();
done = value10.done;
if (done) {
return a0[a0.length - 1];
}
r3 = value10;
r8 = value9;
continue;
}
return value7;
function _fun20515(a0, a1) { // fn#20515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1177, offset: 0x00ecb048, size: 43 bytes, params: 3, frame: 11
const value = environment.__proto__;
return a0 + (FONT_WEIGHTS.get(a1) ?? 0);
}
}
return value7;
}
function generateColorVariants(a0) { // fn#20517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1723, offset: 0x00ecb0f2, size: 478 bytes, params: 2, frame: 23
let value = (importDefault(674) /* metro dependency 674 */)(a0);
value = value.alpha(1);
const value2 = value.get('hsl.l');
const value3 = value.get('hsl.s');
let Math = global.Math;
const value4 = Math.min(1, 1.2 * value3);
Math = global.Math;
const value5 = Math.min(0.6, value2 + 0.1);
const object2 = {main: a0};
let set = value.set;
Math = global.Math;
object2.light1 = Reflect.apply(set, value, ['hsl.l', Math.min(1, 1.2 * value2)]).hex();
set = value.set;
Math = global.Math;
object2.light2 = Reflect.apply(set, value, ['hsl.l', Math.min(1, 1.6 * value2)]).hex();
set = value.set;
Math = global.Math;
object2.dark1 = Reflect.apply(set, value, ['hsl.l', Math.max(0, 0.6 * value2)]).hex();
set = value.set;
Math = global.Math;
object2.dark2 = Reflect.apply(set, value, ['hsl.l', Math.max(0, 0.2 * value2)]).hex();
set = value.set;
Math = global.Math;
object2.toonStroke = Reflect.apply(set, value, ['hsl.l', Math.max(0.12, 0.4 * value2)]).hex();
value = value.set('hsl.s', value4);
value = value.set('hsl.l', value5);
object2.neonStroke = value.hex();
return object2;
}
function generateRandomDisplayNameStyles(a0) { // fn#20519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:2379, offset: 0x00ecb306, size: 215 bytes, params: 2, frame: 20
let value = a1;
let r4 = value !== undefined ? value : false;
let Math = global.Math;
let floor = Math.floor;
const Math2 = global.Math;
const value2 = Math2.random();
let property = EFFECT_ORDER[Reflect.apply(floor, Math, [value2 * EFFECT_ORDER.length])];
r4 = r4 ? selectWeightedFont(a0) : a0[global.Math.floor(global.Math.random() * a0.length)];
value = getColorPresetsForEffect(property);
const object2 = {fontId: r4, effectId: property};
Math = global.Math;
floor = Math.floor;
const Math4 = global.Math;
property = value[Reflect.apply(floor, Math, [Math4.random() * value.length])];
const items2 = [];
arraySpread(items2, property, 0, value2);
object2.colors = items2;
return object2;
}
function applyFlywheelViewingFallback(a0, a1) { // fn#20520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:2654, offset: 0x00ecb3dd, size: 214 bytes, params: 3, frame: 15
var r1;
var object2;
const value = a0;
if (a1) {
return value;
function generateColorVariants(a0) { // fn#20517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1723, offset: 0x00ecb0f2, size: 478 bytes, params: 2, frame: 23
let value = (Module00674)(a0);
value = value.alpha(1);
const value2 = value.get('hsl.l');
const value3 = value.get('hsl.s');
let Math = global.Math;
const value4 = Math.min(1, 1.2 * value3);
Math = global.Math;
const value5 = Math.min(0.6, value2 + 0.1);
const object = {main: a0};
let set = value.set;
Math = global.Math;
object.light1 = Reflect.apply(set, value, ['hsl.l', Math.min(1, 1.2 * value2)]).hex();
set = value.set;
Math = global.Math;
object.light2 = Reflect.apply(set, value, ['hsl.l', Math.min(1, 1.6 * value2)]).hex();
set = value.set;
Math = global.Math;
object.dark1 = Reflect.apply(set, value, ['hsl.l', Math.max(0, 0.6 * value2)]).hex();
set = value.set;
Math = global.Math;
object.dark2 = Reflect.apply(set, value, ['hsl.l', Math.max(0, 0.2 * value2)]).hex();
set = value.set;
Math = global.Math;
object.toonStroke = Reflect.apply(set, value, ['hsl.l', Math.max(0.12, 0.4 * value2)]).hex();
value = value.set('hsl.s', value4);
value = value.set('hsl.l', value5);
object.neonStroke = value.hex();
return object;
}
if (value == null) {
return value;
function generateRandomDisplayNameStyles(a0) { // fn#20519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:2379, offset: 0x00ecb306, size: 215 bytes, params: 2, frame: 20
let value = a1;
let r4 = value !== undefined ? value : false;
let Math = global.Math;
let floor = Math.floor;
const Math2 = global.Math;
const value2 = Math2.random();
let property = EFFECT_ORDER[Reflect.apply(floor, Math, [value2 * EFFECT_ORDER.length])];
r4 = r4 ? selectWeightedFont(a0) : a0[global.Math.floor(global.Math.random() * a0.length)];
value = getColorPresetsForEffect(property);
const object = {fontId: r4, effectId: property};
Math = global.Math;
floor = Math.floor;
const Math4 = global.Math;
property = value[Reflect.apply(floor, Math, [Math4.random() * value.length])];
const items2 = [];
arraySpread(items2, property, 0, value2);
object.colors = items2;
return object;
}
const r5 = FLYWHEEL_FONTS.includes(value.fontId) ? (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont.DEFAULT : value.fontId;
const r4 = FLYWHEEL_EFFECTS.includes(value.effectId) ? (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID : value.effectId;
if (r5 !== value.fontId) {
object2 = {};
copyDataProperties(object2, value, r5);
object2['fontId'] = r5;
object2['effectId'] = r4;
r1 = object2;
} else if (r4 === value.effectId) {
r1 = value;
} else {
object2 = {};
copyDataProperties(object2, value, r5);
object2['fontId'] = r5;
object2['effectId'] = r4;
r1 = object2;
function applyFlywheelViewingFallback(a0, a1) { // fn#20520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:2654, offset: 0x00ecb3dd, size: 214 bytes, params: 3, frame: 15
var r1;
var object;
const value = a0;
if (a1) {
return value;
}
if (value == null) {
return value;
}
const r5 = FLYWHEEL_FONTS.includes(value.fontId) ? (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont.DEFAULT : value.fontId;
const r4 = FLYWHEEL_EFFECTS.includes(value.effectId) ? (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID : value.effectId;
if (r5 !== value.fontId) {
object = {};
copyDataProperties(object, value, r5);
object['fontId'] = r5;
object['effectId'] = r4;
r1 = object;
} else if (r4 === value.effectId) {
r1 = value;
} else {
object = {};
copyDataProperties(object, value, r5);
object['fontId'] = r5;
object['effectId'] = r4;
r1 = object;
}
return r1;
}
return r1;
}
function _fun20515(a0, a1) { // fn#20515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1177, offset: 0x00ecb048, size: 43 bytes, params: 3, frame: 11
const value = environment.__proto__;
return a0 + (FONT_WEIGHTS.get(a1) ?? 0);
}
global.__d(_fun20510, 1888, [1889, 1890, 674, 1891,
2]) /* metro module 1888, dependencies: [1889, 1890, 674, 1891, 2] */;
@@ -1,45 +1,48 @@
/* Metro module 13207; source: modules/display_name_styles/getDisplayNameStylesFontName.tsx; dependencies: [1891, 2582, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DisplayNameFontModule from '../../external/discord_common/js/shared/shared-constants/DisplayNameFont.tsx'; /* Metro dependency 1891 */
function _fun100772(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13397:6, offset: 0x021f7e7e, size: 632 bytes, params: 8, frame: 21
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
const DisplayNameFont = (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont;
object = {};
const DisplayNameFont = (DisplayNameFontModule).DisplayNameFont;
const DEFAULT = DisplayNameFont.DEFAULT;
const ZEL6mz = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).ZEL6mz;
object2[DEFAULT] = ZEL6mz;
object[DEFAULT] = ZEL6mz;
const CHERRY_BOMB = DisplayNameFont.CHERRY_BOMB;
object2[CHERRY_BOMB] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).rN7cuX;
object[CHERRY_BOMB] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).rN7cuX;
const CHICLE = DisplayNameFont.CHICLE;
const CbHHnL = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).CbHHnL;
object2[CHICLE] = CbHHnL;
object[CHICLE] = CbHHnL;
const MUSEO_MODERNO = DisplayNameFont.MUSEO_MODERNO;
object2[MUSEO_MODERNO] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).iEcEKO;
object[MUSEO_MODERNO] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).iEcEKO;
const NEO_CASTEL = DisplayNameFont.NEO_CASTEL;
const DL7jLZ = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).DL7jLZ;
object2[NEO_CASTEL] = DL7jLZ;
object[NEO_CASTEL] = DL7jLZ;
const PIXELIFY = DisplayNameFont.PIXELIFY;
object2[PIXELIFY] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).jq4aRp;
object[PIXELIFY] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).jq4aRp;
const SINISTRE = DisplayNameFont.SINISTRE;
object2[SINISTRE] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).jV9DN4;
object[SINISTRE] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).jV9DN4;
const ZILLA_SLAB = DisplayNameFont.ZILLA_SLAB;
const KMR8rT = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).KMR8rT;
object2[ZILLA_SLAB] = KMR8rT;
object[ZILLA_SLAB] = KMR8rT;
const PLAYPEN_SANS = DisplayNameFont.PLAYPEN_SANS;
object2[PLAYPEN_SANS] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['06QnFf'];
object[PLAYPEN_SANS] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['06QnFf'];
const ORBITRON = DisplayNameFont.ORBITRON;
const DtNlM9 = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).DtNlM9;
object2[ORBITRON] = DtNlM9;
object[ORBITRON] = DtNlM9;
const NEW_ROCKER = DisplayNameFont.NEW_ROCKER;
object2[NEW_ROCKER] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).wSMzUj;
object[NEW_ROCKER] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).wSMzUj;
const KALAM = DisplayNameFont.KALAM;
object2[KALAM] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).bdpoA7;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/getDisplayNameStylesFontName.tsx');
object[KALAM] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).bdpoA7;
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/getDisplayNameStylesFontName.tsx');
exports.default = getDisplayNameStylesFontName;
exports.DISPLAY_NAME_STYLES_FONT_NAMES = object2;
}
exports.DISPLAY_NAME_STYLES_FONT_NAMES = object;
function getDisplayNameStylesFontName(a0) { // fn#100773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13397:819, offset: 0x021f80f6, size: 50 bytes, params: 2, frame: 12
return env0_2[a0] ?? (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).ZEL6mz;
}
function getDisplayNameStylesFontName(a0) { // fn#100773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13397:819, offset: 0x021f80f6, size: 50 bytes, params: 2, frame: 12
return env0_2[a0] ?? (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).ZEL6mz;
}
global.__d(_fun100772, 13207, [1891, 2582, 2]) /* metro module 13207, dependencies: [1891, 2582, 2] */;
@@ -1,49 +1,57 @@
/* Metro module 4635; source: modules/display_name_styles/hooks/useDisplayNameStyles.tsx; dependencies: [31, 1945, 1878, 4636, 566, 4638, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import GuildIDContext from '../../guild/GuildIDContext.tsx'; /* Metro dependency 4638 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseDisplayNameStylesEnabledModule from './useDisplayNameStylesEnabled.tsx'; /* Metro dependency 4636 */
function _fun39886(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4813:6, offset: 0x010eec69, size: 154 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(31) /* metro dependency 31 */).useContext;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStyles.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStyles.tsx');
exports.default = useDisplayNameStyles;
}
function useDisplayNameStyles() { // fn#39887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4813:239, offset: 0x010eed03, size: 302 bytes, params: 1, frame: 21
let value = a0;
const value2 = undefined;
const r1 = value !== value2 ? value : {};
const env0_0 = r1.userId;
const guildId = r1.guildId;
const pendingDisplayNameStyles = r1.pendingDisplayNameStyles;
const value3 = (UseDisplayNameStylesEnabledModule).useDisplayNameStylesEnabled({location: 'useDisplayNameStyles'});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun39888);
const value5 = useContext(GuildIDContext);
const value6 = null;
const r6 = value6 != guildId ? guildId : value5;
value = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun39889);
return value3 ? value2 !== pendingDisplayNameStyles ? value6 !== pendingDisplayNameStyles || value6 == r6 ? pendingDisplayNameStyles : value6 == value4 ? value2 : value4.displayNameStyles : value6 != (value6 == value ? value2 : value.displayNameStyles) ? value6 == value ? value2 : value.displayNameStyles : value6 == value4 ? value2 : value4.displayNameStyles : value6;
function _fun39888() { // fn#39888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4813:434, offset: 0x010eee31, size: 55 bytes, params: 1, frame: 12
var r0;
var userStoreBinding;
var value2;
var value;
if (userId != null) {
value2 = environment.__proto__;
userStoreBinding = UserStore;
r0 = userStoreBinding.getUser(userId);
} else {
value = environment.__proto__;
value = UserStore.getCurrentUser();
r0 = value;
}
return r0;
}
function useDisplayNameStyles() { // fn#39887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4813:239, offset: 0x010eed03, size: 302 bytes, params: 1, frame: 21
let value = a0;
const value2 = undefined;
const r1 = value !== value2 ? value : {};
const env0_0 = r1.userId;
const guildId = r1.guildId;
const pendingDisplayNameStyles = r1.pendingDisplayNameStyles;
const value3 = (require(4636) /* metro dependency 4636: useDisplayNameStylesEnabled */).useDisplayNameStylesEnabled({location: 'useDisplayNameStyles'});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun39888);
const value5 = useContext(importDefault(4638) /* metro dependency 4638: GuildIDContext */);
const value6 = null;
const r6 = value6 != guildId ? guildId : value5;
value = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun39889);
return value3 ? value2 !== pendingDisplayNameStyles ? value6 !== pendingDisplayNameStyles || value6 == r6 ? pendingDisplayNameStyles : value6 == value4 ? value2 : value4.displayNameStyles : value6 != (value6 == value ? value2 : value.displayNameStyles) ? value6 == value ? value2 : value.displayNameStyles : value6 == value4 ? value2 : value4.displayNameStyles : value6;
}
function _fun39889() { // fn#39889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4813:546, offset: 0x010eee68, size: 65 bytes, params: 1, frame: 14
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding && value2 != env0_2 ? GuildMemberStore.getMember(guildId, env0_2.id) : value2;
}
function _fun39888() { // fn#39888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4813:434, offset: 0x010eee31, size: 55 bytes, params: 1, frame: 12
var r0;
var value2;
var value;
if (userId != null) {
value2 = environment.__proto__;
r0 = UserStore.getUser(userId);
} else {
value = environment.__proto__;
value = UserStore.getCurrentUser();
r0 = value;
}
return r0;
}
function _fun39889() { // fn#39889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4813:546, offset: 0x010eee68, size: 65 bytes, params: 1, frame: 14
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding && value2 != env0_2 ? GuildMemberStore.getMember(guildId, env0_2.id) : value2;
}
global.__d(_fun39886, 4635, [31, 1945, 1878, 4636, 566, 4638,
2]) /* metro module 4635, dependencies: [31, 1945, 1878, 4636, 566, 4638, 2] */;
@@ -1,52 +1,57 @@
/* Metro module 8700; source: modules/display_name_styles/hooks/useDisplayNameStylesAccessibleColors.tsx; dependencies: [31, 4502, 566, 1890, 8701, 4000, 674, 2] */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as DisplayNameEffectModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameEffect.tsx'; /* Metro dependency 1890 */
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
function _fun68354(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8885:6, offset: 0x01c4b690, 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesAccessibleColors.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesAccessibleColors.tsx');
exports.useDisplayNameStylesAccessibleColors = useDisplayNameStylesAccessibleColors;
}
function useDisplayNameStylesAccessibleColors({displayNameStyles, backgroundColor}) { // fn#68355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8885:263, offset: 0x01c4b719, size: 237 bytes, params: 2, frame: 19
let value = undefined;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.desaturateUserColors ? AccessibilityStore.saturation : 1;
});
const r7 = (displayNameStyles == null ? value : displayNameStyles.effectId) ?? (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID;
const env0_3 = r7;
value = require(8701) /* metro dependency 8701: useDisplayNameStylesEffectConfigs */;
value = value.useDisplayNameStylesEffectConfig(r7);
return env0_3.useMemo(_fun68357, [displayNameStyles, r7, value.minContrastRatio, value3, backgroundColor]);
function _fun68357() { // fn#68357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8885:570, offset: 0x01c4b825, size: 49 bytes, params: 1, frame: 11
return displayNameStyles == null ? [] : displayNameStyles.colors.map(_fun68358);
function _fun68358(a0) { // fn#68358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8885:599, offset: 0x01c4b856, size: 199 bytes, params: 2, frame: 19
var r4;
let value = environment.__proto__.__proto__;
const getAccessibleForegroundColor = ColorUtilsModule.getAccessibleForegroundColor;
const object = {};
object.foreground = (importDefault(674) /* metro dependency 674 */)(a0);
const binding = env1_3;
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
const TOON = DisplayNameEffect.TOON;
if (binding === TOON) {
value = importDefault(674) /* metro dependency 674 */;
value = value('#333');
r4 = value;
} else {
value = importDefault(674) /* metro dependency 674 */;
value = value(backgroundColor);
r4 = value;
}
object.background = r4;
object.ratio = env1_4.minContrastRatio;
object.saturationFactor = env1_2;
return Reflect.apply(getAccessibleForegroundColor, ColorUtilsModule, [object]).hex();
}
function useDisplayNameStylesAccessibleColors({displayNameStyles, backgroundColor}) { // fn#68355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8885:263, offset: 0x01c4b719, size: 237 bytes, params: 2, frame: 19
let value = undefined;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.desaturateUserColors ? AccessibilityStore.saturation : 1;
});
const r7 = (displayNameStyles == null ? value : displayNameStyles.effectId) ?? (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID;
const env0_3 = r7;
value = require(8701) /* metro dependency 8701: useDisplayNameStylesEffectConfigs */;
value = value.useDisplayNameStylesEffectConfig(r7);
return env0_3.useMemo(_fun68357, [displayNameStyles, r7, value.minContrastRatio, value3, backgroundColor]);
}
}
function _fun68357() { // fn#68357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8885:570, offset: 0x01c4b825, size: 49 bytes, params: 1, frame: 11
return displayNameStyles == null ? [] : displayNameStyles.colors.map(_fun68358);
}
function _fun68358(a0) { // fn#68358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8885:599, offset: 0x01c4b856, size: 199 bytes, params: 2, frame: 19
var r4;
let value = environment.__proto__.__proto__;
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const getAccessibleForegroundColor = colorUtilsModule.getAccessibleForegroundColor;
const object2 = {};
object2.foreground = (importDefault(674) /* metro dependency 674 */)(a0);
const binding = env1_3;
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const TOON = DisplayNameEffect.TOON;
if (binding === TOON) {
value = importDefault(674) /* metro dependency 674 */;
value = value('#333');
r4 = value;
} else {
value = importDefault(674) /* metro dependency 674 */;
value = value(backgroundColor);
r4 = value;
}
object2.background = r4;
object2.ratio = env1_4.minContrastRatio;
object2.saturationFactor = env1_2;
return Reflect.apply(getAccessibleForegroundColor, colorUtilsModule, [object2]).hex();
}
global.__d(_fun68354, 8700, [31, 4502, 566, 1890, 8701, 4000, 674,
2]) /* metro module 8700, dependencies: [31, 4502, 566, 1890, 8701, 4000, 674, 2] */;
@@ -1,68 +1,75 @@
/* Metro module 8701; source: modules/display_name_styles/hooks/useDisplayNameStylesEffectConfigs.tsx; dependencies: [31, 1890, 2582, 8702, 1244, 1891, 2] */
import UseDisplayNameStylesEffectDefaultColorsNative from './useDisplayNameStylesEffectDefaultColors.native.tsx'; /* Metro dependency 8702 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DisplayNameEffectModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameEffect.tsx'; /* Metro dependency 1890 */
import * as DisplayNameFontModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameFont.tsx'; /* Metro dependency 1891 */
function _fun68359(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8886:6, offset: 0x01c4b91d, size: 639 bytes, params: 8, frame: 21
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
object3 = {};
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
object = {};
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
let SOLID = DisplayNameEffect.SOLID;
const OpWJ3f = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).OpWJ3f;
object3[SOLID] = OpWJ3f;
object[SOLID] = OpWJ3f;
let GRADIENT = DisplayNameEffect.GRADIENT;
object3[GRADIENT] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['i9e/u1'];
object[GRADIENT] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['i9e/u1'];
let NEON = DisplayNameEffect.NEON;
object3[NEON] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).x68b1F;
object[NEON] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).x68b1F;
let TOON = DisplayNameEffect.TOON;
object3[TOON] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).otpeeM;
object[TOON] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).otpeeM;
let POP = DisplayNameEffect.POP;
object3[POP] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).cjQOKb;
object[POP] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).cjQOKb;
const GUMMY = DisplayNameEffect.GUMMY;
object3[GUMMY] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).x9Gtie;
object[GUMMY] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).x9Gtie;
let PRISM = DisplayNameEffect.PRISM;
object3[PRISM] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['/M7psm'];
const object4 = {};
SOLID = DisplayNameEffect.SOLID;
object4[SOLID] = 3;
GRADIENT = DisplayNameEffect.GRADIENT;
object4[GRADIENT] = 2.5;
const GLOW = DisplayNameEffect.GLOW;
object4[GLOW] = 2.5;
PRISM = DisplayNameEffect.PRISM;
object4[PRISM] = 2.5;
NEON = DisplayNameEffect.NEON;
object4[NEON] = 3;
TOON = DisplayNameEffect.TOON;
object4[TOON] = 3;
POP = DisplayNameEffect.POP;
object4[POP] = 3;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesEffectConfigs.tsx');
exports.DISPLAY_NAME_STYLES_EFFECT_NAMES = object3;
exports.useDisplayNameStylesEffectConfig = useDisplayNameStylesEffectConfig;
}
function useDisplayNameStylesEffectConfig(a0) { // fn#68360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8886:895, offset: 0x01c4bb9c, size: 82 bytes, params: 2, frame: 15
const env0_0 = a0;
return env0_3.useMemo(_fun68361, [a0,
(importDefault(8702) /* metro dependency 8702: useDisplayNameStylesEffectDefaultColorsNative */)()[a0]]);
}
function _fun68361() { // fn#68361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8886:977, offset: 0x01c4bbee, size: 187 bytes, params: 1, frame: 19
object[PRISM] = (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['/M7psm'];
const object2 = {};
const value = environment.__proto__;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
let binding = env1_4;
object2.name = Reflect.apply(string, intl,
[binding[env0_0] ?? (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).OpWJ3f]);
binding = env0_1;
object2.defaultColors = binding;
const DisplayNameFont = (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont;
const DEFAULT = DisplayNameFont.DEFAULT;
const binding2 = env0_0;
object2.previewStyles = {fontId: DEFAULT, effectId: binding2, colors: binding};
object2.minContrastRatio = env1_5[binding2] ?? 3;
return object2;
SOLID = DisplayNameEffect.SOLID;
object2[SOLID] = 3;
GRADIENT = DisplayNameEffect.GRADIENT;
object2[GRADIENT] = 2.5;
const GLOW = DisplayNameEffect.GLOW;
object2[GLOW] = 2.5;
PRISM = DisplayNameEffect.PRISM;
object2[PRISM] = 2.5;
NEON = DisplayNameEffect.NEON;
object2[NEON] = 3;
TOON = DisplayNameEffect.TOON;
object2[TOON] = 3;
POP = DisplayNameEffect.POP;
object2[POP] = 3;
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesEffectConfigs.tsx');
exports.DISPLAY_NAME_STYLES_EFFECT_NAMES = object;
exports.useDisplayNameStylesEffectConfig = useDisplayNameStylesEffectConfig;
function useDisplayNameStylesEffectConfig(a0) { // fn#68360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8886:895, offset: 0x01c4bb9c, size: 82 bytes, params: 2, frame: 15
const env0_0 = a0;
return ReactModule.useMemo(_fun68361, [a0,
(UseDisplayNameStylesEffectDefaultColorsNative)()[a0]]);
function _fun68361() { // fn#68361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8886:977, offset: 0x01c4bbee, size: 187 bytes, params: 1, frame: 19
const object = {};
const value = environment.__proto__;
const intl = (IndexNativeModule).intl;
const string = intl.string;
let binding = env1_4;
object.name = Reflect.apply(string, intl,
[binding[env0_0] ?? (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).OpWJ3f]);
binding = env0_1;
object.defaultColors = binding;
const DisplayNameFont = (DisplayNameFontModule).DisplayNameFont;
const DEFAULT = DisplayNameFont.DEFAULT;
const binding2 = env0_0;
object.previewStyles = {fontId: DEFAULT, effectId: binding2, colors: binding};
object.minContrastRatio = env1_5[binding2] ?? 3;
return object;
}
}
}
global.__d(_fun68359, 8701, [31, 1890, 2582, 8702, 1244, 1891,
2]) /* metro module 8701, dependencies: [31, 1890, 2582, 8702, 1244, 1891, 2] */;
@@ -1,41 +1,47 @@
/* Metro module 8702; source: modules/display_name_styles/hooks/useDisplayNameStylesEffectDefaultColors.native.tsx; dependencies: [31, 673, 3860, 697, 1890, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ColorUtilsModule from '../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as DisplayNameEffectModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameEffect.tsx'; /* Metro dependency 1890 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
function _fun68362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8887:6, offset: 0x01c4bca9, size: 121 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesEffectDefaultColors.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesEffectDefaultColors.native.tsx');
exports.default = useDisplayNameStylesEffectDefaultColors;
function useDisplayNameStylesEffectDefaultColors() { // fn#68363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8887:234, offset: 0x01c4bd22, size: 124 bytes, params: 1, frame: 19
const hex2int = ColorUtilsModule.hex2int;
const useToken = UseTokenModule.useToken;
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
return ReactModule.useMemo(_fun68364, [Reflect.apply(hex2int, ColorUtilsModule, [Reflect.apply(useToken, UseTokenModule,
[TEXT_DEFAULT])])]);
function _fun68364() { // fn#68364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8887:372, offset: 0x01c4bd9e, size: 449 bytes, params: 1, frame: 17
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
const SOLID = DisplayNameEffect.SOLID;
const binding = env0_0;
const GRADIENT = DisplayNameEffect.GRADIENT;
const GLOW = DisplayNameEffect.GLOW;
const GUMMY = DisplayNameEffect.GUMMY;
const PRISM = DisplayNameEffect.PRISM;
const TOON = DisplayNameEffect.TOON;
const NEON = DisplayNameEffect.NEON;
const POP = DisplayNameEffect.POP;
const TEST_1 = DisplayNameEffect.TEST_1;
const TEST_2 = DisplayNameEffect.TEST_2;
const TEST_3 = DisplayNameEffect.TEST_3;
const TEST_4 = DisplayNameEffect.TEST_4;
return {[SOLID]: [binding], [GRADIENT]: [7183099, 6082490], [GLOW]: [7183099, 6082490], [GUMMY]: [7183099, 6082490,
16762000, 14970082], [PRISM]: [16332578, 16095292, 13018645, 2417517, 1874155], [TOON]: [15999128],
[NEON]: [6888941], [POP]: [1036166], [TEST_1]: [binding], [TEST_2]: [binding], [TEST_3]: [binding],
[TEST_4]: [binding]};
}
}
}
function useDisplayNameStylesEffectDefaultColors() { // fn#68363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8887:234, offset: 0x01c4bd22, size: 124 bytes, params: 1, frame: 19
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const hex2int = colorUtilsModule.hex2int;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
return env0_3.useMemo(_fun68364, [Reflect.apply(hex2int, colorUtilsModule, [Reflect.apply(useToken, useTokenModule,
[TEXT_DEFAULT])])]);
}
function _fun68364() { // fn#68364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8887:372, offset: 0x01c4bd9e, size: 449 bytes, params: 1, frame: 17
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const SOLID = DisplayNameEffect.SOLID;
const binding = env0_0;
const GRADIENT = DisplayNameEffect.GRADIENT;
const GLOW = DisplayNameEffect.GLOW;
const GUMMY = DisplayNameEffect.GUMMY;
const PRISM = DisplayNameEffect.PRISM;
const TOON = DisplayNameEffect.TOON;
const NEON = DisplayNameEffect.NEON;
const POP = DisplayNameEffect.POP;
const TEST_1 = DisplayNameEffect.TEST_1;
const TEST_2 = DisplayNameEffect.TEST_2;
const TEST_3 = DisplayNameEffect.TEST_3;
const TEST_4 = DisplayNameEffect.TEST_4;
return {[SOLID]: [binding], [GRADIENT]: [7183099, 6082490], [GLOW]: [7183099, 6082490], [GUMMY]: [7183099, 6082490,
16762000, 14970082], [PRISM]: [16332578, 16095292, 13018645, 2417517, 1874155], [TOON]: [15999128],
[NEON]: [6888941], [POP]: [1036166], [TEST_1]: [binding], [TEST_2]: [binding], [TEST_3]: [binding],
[TEST_4]: [binding]};
}
global.__d(_fun68362, 8702, [31, 673, 3860, 697, 1890,
2]) /* metro module 8702, dependencies: [31, 673, 3860, 697, 1890, 2] */;
@@ -1,20 +1,25 @@
/* Metro module 4636; source: modules/display_name_styles/hooks/useDisplayNameStylesEnabled.tsx; dependencies: [31, 4502, 566, 4637, 2] */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as DisplayNameStylesContextModule from '../DisplayNameStylesContext.tsx'; /* Metro dependency 4637 */
function _fun39890(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4814:6, offset: 0x010eeea9, size: 134 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useContext;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesEnabled.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesEnabled.tsx');
exports.useDisplayNameStylesEnabled = useDisplayNameStylesEnabled;
function useDisplayNameStylesEnabled() { // fn#39891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4814:256, offset: 0x010eef2f, size: 93 bytes, params: 1, frame: 17
const displayNameStylesEnabled = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.displayNameStylesEnabled;
});
const DisplayNameStylesContext = (DisplayNameStylesContextModule).DisplayNameStylesContext;
return displayNameStylesEnabled || useContext(DisplayNameStylesContext).overrideSettings;
}
}
function useDisplayNameStylesEnabled() { // fn#39891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4814:256, offset: 0x010eef2f, size: 93 bytes, params: 1, frame: 17
const displayNameStylesEnabled = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.displayNameStylesEnabled;
});
const DisplayNameStylesContext = (require(4637) /* metro dependency 4637: DisplayNameStylesContext */).DisplayNameStylesContext;
return displayNameStylesEnabled || useContext(DisplayNameStylesContext).overrideSettings;
}
global.__d(_fun39890, 4636, [31, 4502, 566, 4637,
2]) /* metro module 4636, dependencies: [31, 4502, 566, 4637, 2] */;
@@ -1,60 +1,65 @@
/* Metro module 13792; source: modules/display_name_styles/hooks/useDisplayNameStylesHandleApply.tsx; dependencies: [31, 661, 1890, 7613, 8400, 683, 1891, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as DisplayNameEffectModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameEffect.tsx'; /* Metro dependency 1890 */
function _fun105217(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13989:6, offset: 0x022b142e, size: 143 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesHandleApply.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesHandleApply.tsx');
exports.useDisplayNameStylesHandleApply = useDisplayNameStylesHandleApply;
}
function useDisplayNameStylesHandleApply({hasChanges, selectedFontId, selectedEffectId, selectedColors, defaultColor, guildId, isTryItOut, onClose}) { // fn#105218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13989:268, offset: 0x022b14bd, size: 147 bytes, params: 2, frame: 21
return selectedColors.useCallback(_fun105219, [hasChanges, selectedFontId, selectedEffectId, selectedColors,
defaultColor, onClose, guildId, isTryItOut]);
}
function _fun105219() { // fn#105219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13989:448, offset: 0x022b1550, size: 350 bytes, params: 1, frame: 20
var r3;
var r2;
var selectedColorsBinding;
var selectedEffectIdBinding;
var value2;
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
var object2;
var defaultImport;
var track;
var DISPLAY_NAME_STYLES_APPLIED;
if (hasChanges) {
selectedColorsBinding = selectedColors;
selectedEffectIdBinding = selectedEffectId;
value2 = environment.__proto__;
r3 = selectedEffectIdBinding === DisplayNameEffect.SOLID && selectedColors.length > 0;
r3 = r3 && selectedColors[0] === defaultColor;
r2 = r3 ? [] : selectedColorsBinding;
object2 = {};
object2.fontId = selectedFontId;
object2.effectId = selectedEffectId;
object2.colors = r2;
if (isTryItOut) {
(require(7613) /* metro dependency 7613: UserProfileActionCreators */).setTryItOutDisplayNameStyles(object2);
} else {
(require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({guildId: guildId,
displayNameStyles: object2});
}
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
DISPLAY_NAME_STYLES_APPLIED = AnalyticEvents.DISPLAY_NAME_STYLES_APPLIED;
object2 = {};
object2.font_name = (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont[selectedFontId];
object2.effect_name = DisplayNameEffect[selectedEffectId];
object2.colors = selectedColors;
Reflect.apply(track, defaultImport, [DISPLAY_NAME_STYLES_APPLIED, object2]);
if (onClose != null) {
onClose();
function useDisplayNameStylesHandleApply({hasChanges, selectedFontId, selectedEffectId, selectedColors, defaultColor, guildId, isTryItOut, onClose}) { // fn#105218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13989:268, offset: 0x022b14bd, size: 147 bytes, params: 2, frame: 21
return selectedColors.useCallback(_fun105219, [hasChanges, selectedFontId, selectedEffectId, selectedColors,
defaultColor, onClose, guildId, isTryItOut]);
function _fun105219() { // fn#105219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13989:448, offset: 0x022b1550, size: 350 bytes, params: 1, frame: 20
var r3;
var r2;
var selectedColorsBinding;
var selectedEffectIdBinding;
var value2;
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
var object;
var defaultImport;
var track;
var DISPLAY_NAME_STYLES_APPLIED;
if (hasChanges) {
selectedColorsBinding = selectedColors;
selectedEffectIdBinding = selectedEffectId;
value2 = environment.__proto__;
r3 = selectedEffectIdBinding === DisplayNameEffect.SOLID && selectedColors.length > 0;
r3 = r3 && selectedColors[0] === defaultColor;
r2 = r3 ? [] : selectedColorsBinding;
object = {};
object.fontId = selectedFontId;
object.effectId = selectedEffectId;
object.colors = r2;
if (isTryItOut) {
(require(7613) /* metro dependency 7613: UserProfileActionCreators */).setTryItOutDisplayNameStyles(object);
} else {
(require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges({guildId: guildId,
displayNameStyles: object});
}
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
DISPLAY_NAME_STYLES_APPLIED = AnalyticEvents.DISPLAY_NAME_STYLES_APPLIED;
object = {};
object.font_name = (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont[selectedFontId];
object.effect_name = DisplayNameEffect[selectedEffectId];
object.colors = selectedColors;
Reflect.apply(track, defaultImport, [DISPLAY_NAME_STYLES_APPLIED, object]);
if (onClose != null) {
onClose();
}
}
}
}
}
global.__d(_fun105217, 13792, [31, 661, 1890, 7613, 8400, 683, 1891,
2]) /* metro module 13792, dependencies: [31, 661, 1890, 7613, 8400, 683, 1891, 2] */;
@@ -1,41 +1,47 @@
/* Metro module 13791; source: modules/display_name_styles/hooks/useDisplayNameStylesPendingName.tsx; dependencies: [7624, 1945, 3995, 566, 2] */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import UserProfileSettingsStore from '../../user_profile/UserProfileSettingsStore.tsx'; /* Metro dependency 7624 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun105214(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13988:6, offset: 0x022b12b8, size: 134 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userProfileSettingsStore = importDefault(7624) /* metro dependency 7624: UserProfileSettingsStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesPendingName.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/hooks/useDisplayNameStylesPendingName.tsx');
exports.useDisplayNameStylesPendingName = useDisplayNameStylesPendingName;
}
function useDisplayNameStylesPendingName(a0, a1) { // fn#105215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13988:253, offset: 0x022b133e, size: 144 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileSettingsStore,
GuildMemberStore], _fun105216, [a1,
a0]) ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(a0) ?? '';
}
function _fun105216() { // fn#105216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13988:362, offset: 0x022b13ce, size: 96 bytes, params: 1, frame: 17
var r1;
var r0;
var pendingNickname;
let value = environment.__proto__;
const pendingChanges = UserProfileSettingsStore.getPendingChanges(require);
if (require != null) {
pendingNickname = pendingChanges.pendingNickname;
if (pendingNickname != null) {
r1 = pendingNickname;
} else {
value = undefined;
value = GuildMemberStore.getNick(require, env0_0 == null ? value : env0_0.id);
r1 = value;
function useDisplayNameStylesPendingName(a0, a1) { // fn#105215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13988:253, offset: 0x022b133e, size: 144 bytes, params: 3, frame: 19
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileSettingsStore,
GuildMemberStore], _fun105216, [a1,
a0]) ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(a0) ?? '';
function _fun105216() { // fn#105216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13988:362, offset: 0x022b13ce, size: 96 bytes, params: 1, frame: 17
var r1;
var r0;
var pendingNickname;
var guildMemberStoreBinding;
let value = environment.__proto__;
const pendingChanges = UserProfileSettingsStore.getPendingChanges(require);
if (require != null) {
pendingNickname = pendingChanges.pendingNickname;
if (pendingNickname != null) {
r1 = pendingNickname;
} else {
guildMemberStoreBinding = GuildMemberStore;
value = undefined;
value = guildMemberStoreBinding.getNick(require, env0_0 == null ? value : env0_0.id);
r1 = value;
}
r0 = r1;
} else {
r0 = pendingChanges.pendingGlobalName;
}
return r0;
}
r0 = r1;
} else {
r0 = pendingChanges.pendingGlobalName;
}
return r0;
}
global.__d(_fun105214, 13791, [7624, 1945, 3995, 566,
2]) /* metro module 13791, dependencies: [7624, 1945, 3995, 566, 2] */;
@@ -1,289 +1,296 @@
/* Metro module 2582; source: modules/display_name_styles/intl/DisplayNameStyles.messages.js; dependencies: [1247, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 1282, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AssetJsonUtilsModule from '../../asset_json/native/AssetJsonUtils.tsx'; /* Metro dependency 1247 */
import * as Module01282Module from '../../../by-id/module-01282.js'; /* Metro dependency 1282 */
function _fun23740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#23740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:6, offset: 0x00f11774, size: 453 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {bg: bg_23741, cs: cs_23743, da: da_23745, de: de_23747, el: el_23749};
object2['en-GB'] = _fun23751;
object2['es-419'] = _fun23753;
object2['es-ES'] = _fun23755;
object2.fi = fi_23757;
object2.fr = fr_23759;
object2.hi = hi_23761;
object2.hr = hr_23763;
object2.hu = hu_23765;
object2.it = it_23767;
object2.ja = ja_23769;
object2.ko = ko_23771;
object2.lt = lt_23773;
object2.nl = nl_23775;
object2.no = no_23777;
object2.pl = pl_23779;
object2['pt-BR'] = _fun23781;
object2.ro = ro_23783;
object2.ru = ru_23785;
object2['sv-SE'] = _fun23787;
object2.th = th_23789;
object2.tr = tr_23791;
object2.uk = uk_23793;
object2.vi = vi_23795;
object2['zh-CN'] = _fun23797;
object2['zh-TW'] = _fun23799;
object2['en-US'] = _fun23801;
let value = require(1282) /* metro dependency 1282 */;
value = value.createLoader(object2, 'en-US');
const messagesProxy = (require(1282) /* metro dependency 1282 */).makeMessagesProxy(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/intl/DisplayNameStyles.messages.js');
object = {bg: bg_23741, cs: cs_23743, da: da_23745, de: de_23747, el: el_23749};
object['en-GB'] = _fun23751;
object['es-419'] = _fun23753;
object['es-ES'] = _fun23755;
object.fi = fi_23757;
object.fr = fr_23759;
object.hi = hi_23761;
object.hr = hr_23763;
object.hu = hu_23765;
object.it = it_23767;
object.ja = ja_23769;
object.ko = ko_23771;
object.lt = lt_23773;
object.nl = nl_23775;
object.no = no_23777;
object.pl = pl_23779;
object['pt-BR'] = _fun23781;
object.ro = ro_23783;
object.ru = ru_23785;
object['sv-SE'] = _fun23787;
object.th = th_23789;
object.tr = tr_23791;
object.uk = uk_23793;
object.vi = vi_23795;
object['zh-CN'] = _fun23797;
object['zh-TW'] = _fun23799;
object['en-US'] = _fun23801;
let value = Module01282Module;
value = value.createLoader(object, 'en-US');
const messagesProxy = (Module01282Module).makeMessagesProxy(value);
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/intl/DisplayNameStyles.messages.js');
exports.default = messagesProxy;
exports.messagesLoader = value;
function bg_23741() { // fn#23741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:102, offset: 0x00f11939, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2583) /* metro dependency 2583 */);
return value.then(function(a0) {
return {default: a0};
});
}
function cs_23743() { // fn#23743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:165, offset: 0x00f1197a, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2584) /* metro dependency 2584 */);
return value.then(function(a0) {
return {default: a0};
});
}
function da_23745() { // fn#23745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:228, offset: 0x00f119bb, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2585) /* metro dependency 2585 */);
return value.then(function(a0) {
return {default: a0};
});
}
function de_23747() { // fn#23747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:291, offset: 0x00f119fc, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2586) /* metro dependency 2586 */);
return value.then(function(a0) {
return {default: a0};
});
}
function el_23749() { // fn#23749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:354, offset: 0x00f11a3d, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2587) /* metro dependency 2587 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23751() { // fn#23751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:422, offset: 0x00f11a7e, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2588) /* metro dependency 2588 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23753() { // fn#23753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:491, offset: 0x00f11abf, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2589) /* metro dependency 2589 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23755() { // fn#23755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:559, offset: 0x00f11b00, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2590) /* metro dependency 2590 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fi_23757() { // fn#23757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:622, offset: 0x00f11b41, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2591) /* metro dependency 2591 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fr_23759() { // fn#23759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:685, offset: 0x00f11b82, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2592) /* metro dependency 2592 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hi_23761() { // fn#23761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:749, offset: 0x00f11bc3, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2593) /* metro dependency 2593 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hr_23763() { // fn#23763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:813, offset: 0x00f11c04, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2594) /* metro dependency 2594 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hu_23765() { // fn#23765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:877, offset: 0x00f11c45, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2595) /* metro dependency 2595 */);
return value.then(function(a0) {
return {default: a0};
});
}
function it_23767() { // fn#23767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:941, offset: 0x00f11c86, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2596) /* metro dependency 2596 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ja_23769() { // fn#23769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1005, offset: 0x00f11cc7, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2597) /* metro dependency 2597 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ko_23771() { // fn#23771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1069, offset: 0x00f11d08, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2598) /* metro dependency 2598 */);
return value.then(function(a0) {
return {default: a0};
});
}
function lt_23773() { // fn#23773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1133, offset: 0x00f11d49, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2599) /* metro dependency 2599 */);
return value.then(function(a0) {
return {default: a0};
});
}
function nl_23775() { // fn#23775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1197, offset: 0x00f11d8a, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2600) /* metro dependency 2600 */);
return value.then(function(a0) {
return {default: a0};
});
}
function no_23777() { // fn#23777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1261, offset: 0x00f11dcb, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2601) /* metro dependency 2601 */);
return value.then(function(a0) {
return {default: a0};
});
}
function pl_23779() { // fn#23779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1325, offset: 0x00f11e0c, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2602) /* metro dependency 2602 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23781() { // fn#23781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1394, offset: 0x00f11e4d, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2603) /* metro dependency 2603 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ro_23783() { // fn#23783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1458, offset: 0x00f11e8e, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2604) /* metro dependency 2604 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ru_23785() { // fn#23785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1522, offset: 0x00f11ecf, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2605) /* metro dependency 2605 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23787() { // fn#23787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1591, offset: 0x00f11f10, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2606) /* metro dependency 2606 */);
return value.then(function(a0) {
return {default: a0};
});
}
function th_23789() { // fn#23789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1655, offset: 0x00f11f51, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2607) /* metro dependency 2607 */);
return value.then(function(a0) {
return {default: a0};
});
}
function tr_23791() { // fn#23791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1719, offset: 0x00f11f92, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2608) /* metro dependency 2608 */);
return value.then(function(a0) {
return {default: a0};
});
}
function uk_23793() { // fn#23793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1783, offset: 0x00f11fd3, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2609) /* metro dependency 2609 */);
return value.then(function(a0) {
return {default: a0};
});
}
function vi_23795() { // fn#23795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1847, offset: 0x00f12014, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2610) /* metro dependency 2610 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23797() { // fn#23797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1916, offset: 0x00f12055, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2611) /* metro dependency 2611 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23799() { // fn#23799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1985, offset: 0x00f12096, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2612) /* metro dependency 2612 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23801() { // fn#23801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:2054, offset: 0x00f120d7, size: 65 bytes, params: 1, frame: 14
let value = AssetJsonUtilsModule;
value = value.loadJsonAsset(require(2613) /* metro dependency 2613 */);
return value.then(function(a0) {
return {default: a0};
});
}
}
function bg_23741() { // fn#23741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:102, offset: 0x00f11939, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2583) /* metro dependency 2583 */);
return value.then(function(a0) {
return {default: a0};
});
}
function cs_23743() { // fn#23743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:165, offset: 0x00f1197a, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2584) /* metro dependency 2584 */);
return value.then(function(a0) {
return {default: a0};
});
}
function da_23745() { // fn#23745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:228, offset: 0x00f119bb, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2585) /* metro dependency 2585 */);
return value.then(function(a0) {
return {default: a0};
});
}
function de_23747() { // fn#23747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:291, offset: 0x00f119fc, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2586) /* metro dependency 2586 */);
return value.then(function(a0) {
return {default: a0};
});
}
function el_23749() { // fn#23749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:354, offset: 0x00f11a3d, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2587) /* metro dependency 2587 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23751() { // fn#23751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:422, offset: 0x00f11a7e, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2588) /* metro dependency 2588 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23753() { // fn#23753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:491, offset: 0x00f11abf, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2589) /* metro dependency 2589 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23755() { // fn#23755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:559, offset: 0x00f11b00, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2590) /* metro dependency 2590 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fi_23757() { // fn#23757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:622, offset: 0x00f11b41, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2591) /* metro dependency 2591 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fr_23759() { // fn#23759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:685, offset: 0x00f11b82, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2592) /* metro dependency 2592 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hi_23761() { // fn#23761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:749, offset: 0x00f11bc3, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2593) /* metro dependency 2593 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hr_23763() { // fn#23763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:813, offset: 0x00f11c04, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2594) /* metro dependency 2594 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hu_23765() { // fn#23765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:877, offset: 0x00f11c45, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2595) /* metro dependency 2595 */);
return value.then(function(a0) {
return {default: a0};
});
}
function it_23767() { // fn#23767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:941, offset: 0x00f11c86, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2596) /* metro dependency 2596 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ja_23769() { // fn#23769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1005, offset: 0x00f11cc7, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2597) /* metro dependency 2597 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ko_23771() { // fn#23771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1069, offset: 0x00f11d08, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2598) /* metro dependency 2598 */);
return value.then(function(a0) {
return {default: a0};
});
}
function lt_23773() { // fn#23773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1133, offset: 0x00f11d49, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2599) /* metro dependency 2599 */);
return value.then(function(a0) {
return {default: a0};
});
}
function nl_23775() { // fn#23775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1197, offset: 0x00f11d8a, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2600) /* metro dependency 2600 */);
return value.then(function(a0) {
return {default: a0};
});
}
function no_23777() { // fn#23777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1261, offset: 0x00f11dcb, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2601) /* metro dependency 2601 */);
return value.then(function(a0) {
return {default: a0};
});
}
function pl_23779() { // fn#23779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1325, offset: 0x00f11e0c, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2602) /* metro dependency 2602 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23781() { // fn#23781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1394, offset: 0x00f11e4d, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2603) /* metro dependency 2603 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ro_23783() { // fn#23783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1458, offset: 0x00f11e8e, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2604) /* metro dependency 2604 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ru_23785() { // fn#23785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1522, offset: 0x00f11ecf, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2605) /* metro dependency 2605 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23787() { // fn#23787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1591, offset: 0x00f11f10, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2606) /* metro dependency 2606 */);
return value.then(function(a0) {
return {default: a0};
});
}
function th_23789() { // fn#23789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1655, offset: 0x00f11f51, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2607) /* metro dependency 2607 */);
return value.then(function(a0) {
return {default: a0};
});
}
function tr_23791() { // fn#23791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1719, offset: 0x00f11f92, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2608) /* metro dependency 2608 */);
return value.then(function(a0) {
return {default: a0};
});
}
function uk_23793() { // fn#23793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1783, offset: 0x00f11fd3, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2609) /* metro dependency 2609 */);
return value.then(function(a0) {
return {default: a0};
});
}
function vi_23795() { // fn#23795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1847, offset: 0x00f12014, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2610) /* metro dependency 2610 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23797() { // fn#23797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1916, offset: 0x00f12055, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2611) /* metro dependency 2611 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23799() { // fn#23799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:1985, offset: 0x00f12096, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2612) /* metro dependency 2612 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun23801() { // fn#23801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2709:2054, offset: 0x00f120d7, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2613) /* metro dependency 2613 */);
return value.then(function(a0) {
return {default: a0};
});
}
global.__d(_fun23740, 2582, [1247, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595,
2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613,
1282,
2]) /* metro module 2582, dependencies: [1247, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 2610, 2611, 2612, 2613, 1282, 2] */;
@@ -1,52 +1,63 @@
/* Metro module 14917; source: modules/display_name_styles/native/DisplayNameStylesCoachmark.tsx; dependencies: [31, 27, 1376, 33, 4501, 1244, 2582, 8543, 5473, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NativeModule from '../../../design/assets/native.tsx'; /* Metro dependency 5473 */
import * as UseCoachmarkNativeModule from '../../../design/components/Coachmark/native/useCoachmark.native.tsx'; /* Metro dependency 8543 */
function _fun112860(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15114:6, offset: 0x023df1b6, size: 239 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 env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({coachmarkImageContainer: {'alignItems': 'center',
const env0_7 = (CreateStylesModule).createStyles({coachmarkImageContainer: {'alignItems': 'center',
'justifyContent': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesCoachmark.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesCoachmark.tsx');
exports.default = DisplayNameStylesCoachmark;
function CoachmarkImage_112861() { // fn#112861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15114:266, offset: 0x023df2a5, size: 95 bytes, params: 1, frame: 17
const styles = useStyles();
const DisplayNameAbstractUI = (NativeModule).DisplayNameAbstractUI;
return (
<View style={styles.coachmarkImageContainer}>
<DisplayNameAbstractUI
width={160}
height={68}
resizeMode="contain"
/>
</View>
);
}
function DisplayNameStylesCoachmark({targetRef, visible, markAsDismissed}) { // fn#112862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15114:542, offset: 0x023df304, size: 136 bytes, params: 2, frame: 17
const value2 = ReactModule.useCallback(function() {
markAsDismissed(ContentDismissActionType.USER_DISMISS);
}, [markAsDismissed]);
const useMemo = ReactModule.useMemo;
(UseCoachmarkNativeModule).useCoachmark(targetRef, Reflect.apply(useMemo,
ReactModule, [_fun112864, [value2, visible]]));
return null;
function _fun112864() { // fn#112864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15114:685, offset: 0x023df38c, size: 158 bytes, params: 1, frame: 18
const object = {};
const intl = (IndexNativeModule).intl;
object.title = intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['1AE464']);
object.description = intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).jhmU5E);
object.visible = visible;
object.position = 'bottom';
object.onDismiss = env0_2;
object.renderImgComponent = renderImgComponent_112865;
return object;
function renderImgComponent_112865() { // fn#112865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15114:843, offset: 0x01e9e3c1, size: 23 bytes, params: 1, frame: 13
return <CoachmarkImage_112861 />;
}
}
}
}
function CoachmarkImage_112861() { // fn#112861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15114:266, offset: 0x023df2a5, size: 95 bytes, params: 1, frame: 17
const styles = useStyles();
const DisplayNameAbstractUI = (require(5473) /* metro dependency 5473: native */).DisplayNameAbstractUI;
return (
<View style={styles.coachmarkImageContainer}>
<DisplayNameAbstractUI
width={160}
height={68}
resizeMode="contain"
/>
</View>
);
}
function DisplayNameStylesCoachmark({targetRef, visible, markAsDismissed}) { // fn#112862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15114:542, offset: 0x023df304, size: 136 bytes, params: 2, frame: 17
const binding = env0_3;
const value2 = binding.useCallback(function() {
markAsDismissed(ContentDismissActionType.USER_DISMISS);
}, [markAsDismissed]);
const useMemo = binding.useMemo;
(require(8543) /* metro dependency 8543: useCoachmarkNative */).useCoachmark(targetRef, Reflect.apply(useMemo,
binding, [_fun112864, [value2, visible]]));
return null;
}
function _fun112864() { // fn#112864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15114:685, offset: 0x023df38c, size: 158 bytes, params: 1, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['1AE464']);
object2.description = intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).jhmU5E);
object2.visible = visible;
object2.position = 'bottom';
object2.onDismiss = env0_2;
object2.renderImgComponent = renderImgComponent_112865;
return object2;
}
global.__d(_fun112860, 14917, [31, 27, 1376, 33, 4501, 1244, 2582, 8543, 5473,
2]) /* metro module 14917, dependencies: [31, 27, 1376, 33, 4501, 1244, 2582, 8543, 5473, 2] */;
@@ -1,197 +1,230 @@
/* Metro module 13799; source: modules/display_name_styles/native/DisplayNameStylesColorPickerSheet.tsx; dependencies: [57, 31, 27, 1889, 661, 33, 4501, 697, 7326, 8702, 4081, 4080, 13189, 683, 6275, 6758, 1244, 2582, 4578, 22, 673, 1890, 13797, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseDisplayNameStylesEffectDefaultColorsNative from '../hooks/useDisplayNameStylesEffectDefaultColors.native.tsx'; /* Metro dependency 8702 */
import ShowCustomColorPickerActionSheet from '../../color_picker/native/showCustomColorPickerActionSheet.tsx'; /* Metro dependency 13189 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DisplayNameStylesConstantsModule from '../DisplayNameStylesConstants.tsx'; /* Metro dependency 1889 */
import * as DisplayNameEffectModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameEffect.tsx'; /* Metro dependency 1890 */
import * as HapticUtilsNativeModule from '../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as UseBottomSheetRefModule from '../../../design/components/Sheet/native/useBottomSheetRef.tsx'; /* Metro dependency 7326 */
import * as EyeDropperIconModule from '../../../design/components/Icon/native/redesign/generated/EyeDropperIcon.tsx'; /* Metro dependency 13797 */
function _fun105255(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:6, offset: 0x022b31ec, size: 586 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Pressable;
const env0_7 = (require(1889) /* metro dependency 1889: DisplayNameStylesConstants */).getColorPresetsForEffect;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.header = {paddingTop: 4};
object2.headerTrailing = {'justifyContent': 'center', 'alignItems': 'center'};
object2.container = {flex: 1};
const object3 = {};
object = {};
object.header = {paddingTop: 4};
object.headerTrailing = {'justifyContent': 'center', 'alignItems': 'center'};
object.container = {flex: 1};
const object4 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object4.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingBottom = PX_16;
object2.contentContainer = object3;
const object6 = {};
object4.paddingBottom = PX_16;
object.contentContainer = object4;
const object5 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.gap = PX_16;
object5.gap = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginBottom = PX_16;
object2.presetGrid = object6;
object5.marginBottom = PX_16;
object.presetGrid = object5;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.presetRow = {'gap': null, 'flexDirection': 'row', 'justifyContent': 'center', gap: PX_16};
const object8 = {'width': 40, 'height': 40, 'borderRadius': null, 'borderWidth': 2, 'borderColor': 'transparent'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.presetColor = object8;
object.presetRow = {'gap': null, 'flexDirection': 'row', 'justifyContent': 'center', gap: PX_16};
const object7 = {'width': 40, 'height': 40, 'borderRadius': null, 'borderWidth': 2, 'borderColor': 'transparent'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.presetColor = object7;
const CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
object2.presetColorSelected = {borderColor: CONTROL_BRAND_FOREGROUND};
object.presetColorSelected = {borderColor: CONTROL_BRAND_FOREGROUND};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.buttonsContainer = {flexDirection: 'row', gap: PX_16};
object2.button = {flex: 1};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesColorPickerSheet.tsx');
object.buttonsContainer = {flexDirection: 'row', gap: PX_16};
object.button = {flex: 1};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesColorPickerSheet.tsx');
exports.default = DisplayNameStylesColorPickerSheet_105256;
}
function DisplayNameStylesColorPickerSheet_105256({selectedColor, selectedEffectId, onSelectColor}) { // fn#105256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:867, offset: 0x022b3436, size: 1114 bytes, params: 2, frame: 38
var object4;
const styles = useStyles();
const env0_3 = styles;
const useBottomSheetRefModule = require(7326) /* metro dependency 7326: useBottomSheetRef */;
const useBottomSheetRef = useBottomSheetRefModule.useBottomSheetRef;
const bottomSheetRef = Reflect.apply(useBottomSheetRef, useBottomSheetRefModule, []).bottomSheetRef;
const property = (importDefault(8702) /* metro dependency 8702: useDisplayNameStylesEffectDefaultColorsNative */)()[selectedEffectId];
const binding = property;
const value2 = binding.useMemo(_fun105257, [selectedEffectId]);
const [property2, env0_6] = env0_3(binding.useState(selectedColor), 2);
const value5 = binding.useMemo(_fun105259, [property2, selectedColor]);
const env0_8 = binding.useCallback(_fun105260, []);
const value6 = binding.useCallback(_fun105261, [property, onSelectColor]);
const value7 = binding.useCallback(_fun105262, [property2, onSelectColor]);
const value8 = binding.useCallback(_fun105264, [value5, property2, onSelectColor, property]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object4 = {ref: bottomSheetRef};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl,
[(importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['6OxgN7']]);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const XqMe3N = (require(1244) /* metro dependency 1244: indexNative */).t.XqMe3N;
object2.trailing = <View style={styles.headerTrailing}><Button text={Reflect.apply(string, intl,
[XqMe3N])} onPress={value8} variant="primary" size="sm" /></View>;
object4.header = <View style={styles.header}><BottomSheetTitleHeader {...object2} /></View>;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const view = <View style={styles.presetGrid}>{defaultImport.chunk(value2.slice(0, 12), 6).map(_fun105265)}</View>;
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const SOLID = DisplayNameEffect.SOLID;
const r11 = selectedEffectId === SOLID && <View style={styles.button}><Button text={intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).gIeJTK)} onPress={value6} variant="secondary" size="md" grow /></View>;
const buttonProps = {'text': null, 'onPress': null, 'variant': 'secondary', 'size': 'md', 'icon': null,
'grow': true, text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['FHBa/1']),
onPress: value7};
const EyeDropperIcon = (require(13797) /* metro dependency 13797: EyeDropperIcon */).EyeDropperIcon;
buttonProps.icon = <EyeDropperIcon size="sm" />;
return (
<BottomSheet {...object4}>
<View style={styles.container}>
<View style={styles.contentContainer}>
{view}
<View style={styles.buttonsContainer}>
{r11}
<View style={styles.button}>
<Button {...buttonProps} />
function DisplayNameStylesColorPickerSheet_105256({selectedColor, selectedEffectId, onSelectColor}) { // fn#105256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:867, offset: 0x022b3436, size: 1114 bytes, params: 2, frame: 38
var object3;
const styles = useStyles();
const styles2 = styles;
const useBottomSheetRef = UseBottomSheetRefModule.useBottomSheetRef;
const bottomSheetRef = Reflect.apply(useBottomSheetRef, UseBottomSheetRefModule, []).bottomSheetRef;
const property = (UseDisplayNameStylesEffectDefaultColorsNative)()[selectedEffectId];
const binding = property;
const value2 = binding.useMemo(_fun105257, [selectedEffectId]);
const [property2, env0_6] = styles2(binding.useState(selectedColor), 2);
const value5 = binding.useMemo(_fun105259, [property2, selectedColor]);
const env0_8 = binding.useCallback(_fun105260, []);
const value6 = binding.useCallback(_fun105261, [property, onSelectColor]);
const value7 = binding.useCallback(_fun105262, [property2, onSelectColor]);
const value8 = binding.useCallback(_fun105264, [value5, property2, onSelectColor, property]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object3 = {ref: bottomSheetRef};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl,
[(importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['6OxgN7']]);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const XqMe3N = (IndexNativeModule).t.XqMe3N;
object.trailing = (
<View style={styles.headerTrailing}>
<Button
text={Reflect.apply(string, intl, [XqMe3N])}
onPress={value8}
variant="primary"
size="sm"
/>
</View>
);
object3.header = (
<View style={styles.header}>
<BottomSheetTitleHeader {...object} />
</View>
);
const defaultImport = Module00022;
const view = (
<View style={styles.presetGrid}>
{defaultImport.chunk(value2.slice(0, 12), 6).map(_fun105265)}
</View>
);
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
const SOLID = DisplayNameEffect.SOLID;
const r11 = selectedEffectId === SOLID && <View style={styles.button}><Button text={intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).gIeJTK)} onPress={value6} variant="secondary" size="md" grow /></View>;
const buttonProps = {'text': null, 'onPress': null, 'variant': 'secondary', 'size': 'md', 'icon': null,
'grow': true, text: intl.string((IndexNativeModule).t['FHBa/1']),
onPress: value7};
const EyeDropperIcon = (EyeDropperIconModule).EyeDropperIcon;
buttonProps.icon = <EyeDropperIcon size="sm" />;
return (
<BottomSheet {...object3}>
<View style={styles.container}>
<View style={styles.contentContainer}>
{view}
<View style={styles.buttonsContainer}>
{r11}
<View style={styles.button}>
<Button {...buttonProps} />
</View>
</View>
</View>
</View>
</View>
</BottomSheet>
);
}
</BottomSheet>
);
function _fun105257() { // fn#105257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1047, offset: 0x022b3890, size: 42 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return getColorPresetsForEffect(selectedEffectId).map(function(a0) {
return a0[0];
});
}
function _fun105257() { // fn#105257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1047, offset: 0x022b3890, size: 42 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return getColorPresetsForEffect(selectedEffectId).map(function(a0) {
return a0[0];
});
}
function _fun105259() { // fn#105259, offset: 0x022b38ba, size: 17 bytes, params: 1, frame: 2
return env0_5 !== selectedColor;
}
function _fun105259() { // fn#105259, offset: 0x022b38ba, size: 17 bytes, params: 1, frame: 2
return env0_5 !== selectedColor;
}
function _fun105260(a0) { // fn#105260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1164, offset: 0x01fc7eff, size: 19 bytes, params: 2, frame: 11
env0_6(a0);
}
function _fun105261() { // fn#105261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1196, offset: 0x022b38cb, size: 107 bytes, params: 1, frame: 15
const value = environment.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
onSelectColor(env0_4[0]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun105261() { // fn#105261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1196, offset: 0x022b38cb, size: 107 bytes, params: 1, frame: 15
const value = environment.__proto__;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = HapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_LIGHT = HapticFeedbackTypes.IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
onSelectColor(ReactModule[0]);
(ActionSheetActionCreators).hideActionSheet();
}
function _fun105262() { // fn#105262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1336, offset: 0x022b3936, size: 68 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
(importDefault(13189) /* metro dependency 13189: showCustomColorPickerActionSheet */)({color: env0_5,
onSelect: onSelect_105263, actionButtonVariant: 'primary'});
}
function _fun105262() { // fn#105262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1336, offset: 0x022b3936, size: 68 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
(ShowCustomColorPickerActionSheet)({color: env0_5,
onSelect: onSelect_105263, actionButtonVariant: 'primary'});
function onSelect_105263(a0) { // fn#105263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1368, offset: 0x022b397a, size: 100 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = HapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_MEDIUM]);
onSelectColor(a0);
(ActionSheetActionCreators).hideActionSheet();
}
}
function _fun105264() { // fn#105264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1538, offset: 0x022b39de, size: 185 bytes, params: 1, frame: 18
var onSelectColorBinding;
var binding;
var defaultImport;
const value = environment.__proto__;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = HapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_MEDIUM]);
if (DisplayNameStylesConstantsModule.getColorPresetsForEffect) {
onSelectColorBinding = onSelectColor;
binding = env0_5;
onSelectColorBinding(binding);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.DISPLAY_NAME_STYLES_COLOR_SELECTED, {default: binding === ReactModule[0],
colors: [binding]});
}
(ActionSheetActionCreators).hideActionSheet();
}
function _fun105265(a0, a1) { // fn#105265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:2213, offset: 0x022b3a97, size: 74 bytes, params: 3, frame: 17
const env0_0 = a1;
return (
<View style={styles.presetRow} key={a1}>
{a0.map(_fun105266)}
</View>
);
function _fun105266(a0, a1) { // fn#105266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:2259, offset: 0x022b3ae1, size: 196 bytes, params: 3, frame: 22
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__;
const object = {onPress: onPress_105267};
const items2 = [styles.presetColor];
const object2 = {};
object2.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
items2[1] = object2;
items2[2] = a0 === env1_5 && styles.presetColorSelected;
object.style = items2;
object.accessibilityRole = 'button';
object.accessibilityLabel = (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
return <Pressable {...object} key={6 * require + a1} />;
function onPress_105267() { // fn#105267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:2279, offset: 0x022b3ba5, size: 23 bytes, params: 1, frame: 11
return env2_8(env0_0);
}
}
}
function _fun105264() { // fn#105264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1538, offset: 0x022b39de, size: 185 bytes, params: 1, frame: 18
var onSelectColorBinding;
var binding;
var defaultImport;
const value = environment.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_MEDIUM]);
if (env0_7) {
onSelectColorBinding = onSelectColor;
binding = env0_5;
onSelectColorBinding(binding);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.DISPLAY_NAME_STYLES_COLOR_SELECTED, {default: binding === env0_4[0],
colors: [binding]});
}
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun105265(a0, a1) { // fn#105265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:2213, offset: 0x022b3a97, size: 74 bytes, params: 3, frame: 17
const env0_0 = a1;
return (
<View style={styles.presetRow} key={a1}>
{a0.map(_fun105266)}
</View>
);
}
function onSelect_105263(a0) { // fn#105263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:1368, offset: 0x022b397a, size: 100 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_MEDIUM]);
onSelectColor(a0);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun105266(a0, a1) { // fn#105266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:2259, offset: 0x022b3ae1, size: 196 bytes, params: 3, frame: 22
var environment;
const env0_0 = a0;
const value = environment.__proto__.__proto__;
const object3 = {onPress: onPress_105267};
const items2 = [styles.presetColor];
const object4 = {};
object4.backgroundColor = (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
items2[1] = object4;
items2[2] = a0 === env1_5 && styles.presetColorSelected;
object3.style = items2;
object3.accessibilityRole = 'button';
object3.accessibilityLabel = (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
return <Pressable {...object3} key={6 * require + a1} />;
}
function onPress_105267() { // fn#105267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13996:2279, offset: 0x022b3ba5, size: 23 bytes, params: 1, frame: 11
return env2_8(env0_0);
}
global.__d(_fun105255, 13799, [57, 31, 27, 1889, 661, 33, 4501, 697, 7326, 8702, 4081, 4080, 13189, 683, 6275, 6758,
1244, 2582, 4578, 22, 673, 1890, 13797,
2]) /* metro module 13799, dependencies: [57, 31, 27, 1889, 661, 33, 4501, 697, 7326, 8702, 4081, 4080, 13189, 683, 6275, 6758, 1244, 2582, 4578, 22, 673, 1890, 13797, 2] */;
@@ -1,35 +1,40 @@
/* Metro module 13208; source: modules/display_name_styles/native/DisplayNameStylesColorSwatch.tsx; dependencies: [27, 33, 4501, 697, 4589, 673, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ColorUtilsModule from '../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun100774(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13398:6, offset: 0x021f8128, size: 218 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'width': 24, 'height': 24};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{colorSwatch: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesColorSwatch.tsx');
const createStyles = CreateStylesModule.createStyles;
const object2 = {'width': 24, 'height': 24};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{colorSwatch: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesColorSwatch.tsx');
exports.default = DisplayNameStylesColorSwatch;
}
function DisplayNameStylesColorSwatch({colors}) { // fn#100775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13398:325, offset: 0x021f8202, size: 227 bytes, params: 2, frame: 19
const styles = useStyles();
if (colors.length >= 2) {
return ((Component) => <Component colors={colors.map(_fun100776)} start={{'x': 0, 'y': 0}} end={{'x': 1,
'y': 0}} style={styles.colorSwatch} />)(importDefault(4589) /* metro dependency 4589 */);
}
return (
<View
style={[styles.colorSwatch,
{backgroundColor: colors.length > 0 ? (require(673) /* metro dependency 673: ColorUtils */).int2hex(colors[0]) : '#000000'}]}
/>
);
function _fun100776(a0) { // fn#100776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13398:432, offset: 0x021f82e5, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (ColorUtilsModule).int2hex(a0);
}
function DisplayNameStylesColorSwatch({colors}) { // fn#100775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13398:325, offset: 0x021f8202, size: 227 bytes, params: 2, frame: 19
const styles = useStyles();
if (colors.length >= 2) {
return ((Component) => <Component colors={colors.map(_fun100776)} start={{'x': 0, 'y': 0}} end={{'x': 1,
'y': 0}} style={styles.colorSwatch} />)(importDefault(4589) /* metro dependency 4589 */);
}
return (
<View
style={[styles.colorSwatch,
{backgroundColor: colors.length > 0 ? (require(673) /* metro dependency 673: ColorUtils */).int2hex(colors[0]) : '#000000'}]}
/>
);
}
function _fun100776(a0) { // fn#100776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13398:432, offset: 0x021f82e5, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
}
global.__d(_fun100774, 13208, [27, 33, 4501, 697, 4589, 673,
2]) /* metro module 13208, dependencies: [27, 33, 4501, 697, 4589, 673, 2] */;
@@ -1,105 +1,176 @@
/* Metro module 13800; source: modules/display_name_styles/native/DisplayNameStylesEditPreview.tsx; dependencies: [31, 27, 33, 4501, 697, 8402, 1901, 8489, 1244, 2582, 10507, 3826, 1305, 8696, 8697, 4573, 2] */
import DisplayNameStylesMessages from '../intl/DisplayNameStyles.messages.js'; /* Metro dependency 2582 */
import UserProfilePreview from '../../user_profile/native/UserProfilePreview.tsx'; /* Metro dependency 8489 */
import UsernameWithEffects from './UsernameWithEffects.tsx'; /* Metro dependency 8696 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UtilsModule from '../../collectibles/nameplates/utils.tsx'; /* Metro dependency 1901 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ProfileCustomizationUtilsModule from '../../profile_customization/ProfileCustomizationUtils.tsx'; /* Metro dependency 8402 */
import * as TypesModule from '../types.tsx'; /* Metro dependency 8697 */
import * as NameplatePreviewModule from '../../collectibles/nameplates/native/NameplatePreview.tsx'; /* Metro dependency 10507 */
function _fun105268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13997:6, offset: 0x022b3bbc, size: 512 bytes, params: 8, frame: 23
var object2;
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;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.previewSection = {'marginBottom': null, 'alignItems': 'center', 'alignSelf': 'center', 'width': '100%',
object.previewSection = {'marginBottom': null, 'alignItems': 'center', 'alignSelf': 'center', 'width': '100%',
'maxWidth': 360, marginBottom: PX_24};
const object5 = {'marginTop': -18, 'alignSelf': 'flex-end', 'width': 260, 'borderRadius': null, 'borderWidth': 1};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const object3 = {'marginTop': -18, 'alignSelf': 'flex-end', 'width': 260, 'borderRadius': null, 'borderWidth': 1};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object5.borderColor = BACKGROUND_MOD_SUBTLE;
object2.chatPreviewWrapper = object5;
object2.nameplatePreviewWrapper = {'marginTop': -6, 'width': 260};
const object6 = {flexDirection: 'row'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.borderColor = BACKGROUND_MOD_SUBTLE;
object.chatPreviewWrapper = object3;
object.nameplatePreviewWrapper = {'marginTop': -6, 'width': 260};
const object4 = {flexDirection: 'row'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.padding = PX_16;
object4.padding = PX_16;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.backgroundColor = BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.gap = PX_12;
object2.chatContainer = object6;
object2.chatContent = {flex: 1};
object2.chatHeader = {'flexDirection': 'row', 'alignItems': 'baseline', 'gap': 6};
object2.chatTimestamp = {marginTop: -8};
object2.chatMessageText = {};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesEditPreview.tsx');
object4.gap = PX_12;
object.chatContainer = object4;
object.chatContent = {flex: 1};
object.chatHeader = {'flexDirection': 'row', 'alignItems': 'baseline', 'gap': 6};
object.chatTimestamp = {marginTop: -8};
object.chatMessageText = {};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesEditPreview.tsx');
exports.default = DisplayNameStylesEditPreview;
}
function ChatPreview({user, displayName, displayNameStyles, guildId}) { // fn#105269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13997:796, offset: 0x022b3dbc, size: 519 bytes, params: 2, frame: 33
const styles = useStyles();
const value2 = env0_3.useMemo(_fun105270, []);
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
const avatar = <Avatar user={user} size={NORMAL} guildId={guildId} />;
const UsernameWithEffects = importDefault(8696) /* metro dependency 8696: UsernameWithEffects */;
const id = user.id;
const EffectDisplayType = (require(8697) /* metro dependency 8697: types */).EffectDisplayType;
const PLAIN = EffectDisplayType.PLAIN;
const usernameWithEffects = <UsernameWithEffects userId={id} guildId={guildId} userName={displayName} variant="text-md/semibold" effectDisplayType={PLAIN} lineClamp={1} pendingDisplayNameStyles={displayNameStyles} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const view = <View style={styles.chatHeader}>{usernameWithEffects}<Text variant="text-xs/medium" color="text-muted" style={styles.chatTimestamp}>{value2}</Text></View>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.chatContainer} pointerEvents="none">
{avatar}
<View style={styles.chatContent}>
{view}
function ChatPreview({user, displayName, displayNameStyles, guildId}) { // fn#105269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13997:796, offset: 0x022b3dbc, size: 519 bytes, params: 2, frame: 33
const styles = useStyles();
const value2 = ReactModule.useMemo(_fun105270, []);
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
const avatar = (
<Avatar
user={user}
size={NORMAL}
guildId={guildId}
/>
);
const id = user.id;
const EffectDisplayType = (TypesModule).EffectDisplayType;
const PLAIN = EffectDisplayType.PLAIN;
const usernameWithEffects = (
<UsernameWithEffects
userId={id}
guildId={guildId}
userName={displayName}
variant="text-md/semibold"
effectDisplayType={PLAIN}
lineClamp={1}
pendingDisplayNameStyles={displayNameStyles}
/>
);
const Text = (TextModule).Text;
const view = (
<View style={styles.chatHeader}>
{usernameWithEffects}
<Text
variant="text-md/normal"
color="text-default"
style={styles.chatMessageText}
variant="text-xs/medium"
color="text-muted"
style={styles.chatTimestamp}
>
{intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).h5Cuej)}
{value2}
</Text>
</View>
</View>
);
}
);
const intl = (IndexNativeModule).intl;
return (
<View style={styles.chatContainer} pointerEvents="none">
{avatar}
<View style={styles.chatContent}>
{view}
<Text
variant="text-md/normal"
color="text-default"
style={styles.chatMessageText}
>
{intl.string((DisplayNameStylesMessages).h5Cuej)}
</Text>
</View>
</View>
);
function _fun105270() { // fn#105270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13997:894, offset: 0x022b3fc3, size: 69 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(3826) /* metro dependency 3826: DateUtils */;
const calendarFormat = value.calendarFormat;
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
return Reflect.apply(calendarFormat, value, [date instanceof Object ? date : value2, true]);
}
function DisplayNameStylesEditPreview({user, displayName, guildId, selectedFontId, selectedEffectId, selectedColors}) { // fn#105271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13997:1660, offset: 0x022b4008, size: 513 bytes, params: 2, frame: 32
const styles = useStyles();
const {userNameplate, guildNameplate,
pendingNameplate} = (require(8402) /* metro dependency 8402: ProfileCustomizationUtils */).useGuildMemberAndUserPendingNameplate(user,
guildId);
const nameplateData = (require(1901) /* metro dependency 1901: utils */).getNameplateData(guildNameplate);
const value5 = env0_3.useMemo(function() {
return {fontId: selectedFontId, effectId: selectedEffectId, colors: selectedColors};
}, [selectedFontId, selectedEffectId, selectedColors]);
const UserProfilePreview = importDefault(8489) /* metro dependency 8489: UserProfilePreview */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [<UserProfilePreview user={user} displayName={displayName} guildId={guildId} displayNameStylesOverride={value5} compact hideFrame maxWidth={320} accessibilityLabel={intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).zoh6MT)} />];
items2[1] = <View style={styles.chatPreviewWrapper}><ChatPreview user={user} displayName={displayName} displayNameStyles={value5} guildId={guildId} /></View>;
const NameplatePreview = (require(10507) /* metro dependency 10507: NameplatePreview */).NameplatePreview;
items2[2] = <View style={styles.nameplatePreviewWrapper}><NameplatePreview user={user} nameplate={pendingNameplate} nameplateData={pendingNameplate == null ? nameplateData ?? userNameplate : undefined} guildId={guildId} pendingDisplayNameStyles={value5} pendingGlobalName={displayName} /></View>;
return (
<View style={styles.previewSection}>
{items2}
</View>
);
}
}
function DisplayNameStylesEditPreview({user, displayName, guildId, selectedFontId, selectedEffectId, selectedColors}) { // fn#105271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13997:1660, offset: 0x022b4008, size: 513 bytes, params: 2, frame: 32
const styles = useStyles();
const {userNameplate, guildNameplate,
pendingNameplate} = (ProfileCustomizationUtilsModule).useGuildMemberAndUserPendingNameplate(user,
guildId);
const nameplateData = (UtilsModule).getNameplateData(guildNameplate);
const value5 = ReactModule.useMemo(function() {
return {fontId: selectedFontId, effectId: selectedEffectId, colors: selectedColors};
}, [selectedFontId, selectedEffectId, selectedColors]);
const intl = (IndexNativeModule).intl;
const items2 = [
<UserProfilePreview
user={user}
displayName={displayName}
guildId={guildId}
displayNameStylesOverride={value5}
compact
hideFrame
maxWidth={320}
accessibilityLabel={intl.string((DisplayNameStylesMessages).zoh6MT)}
/>,
];
items2[1] = (
<View style={styles.chatPreviewWrapper}>
<ChatPreview
user={user}
displayName={displayName}
displayNameStyles={value5}
guildId={guildId}
/>
</View>
);
const NameplatePreview = (NameplatePreviewModule).NameplatePreview;
items2[2] = (
<View style={styles.nameplatePreviewWrapper}>
<NameplatePreview
user={user}
nameplate={pendingNameplate}
nameplateData={pendingNameplate == null ? nameplateData ?? userNameplate : undefined}
guildId={guildId}
pendingDisplayNameStyles={value5}
pendingGlobalName={displayName}
/>
</View>
);
return (
<View style={styles.previewSection}>
{items2}
</View>
);
}
function _fun105270() { // fn#105270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13997:894, offset: 0x022b3fc3, size: 69 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(3826) /* metro dependency 3826: DateUtils */;
const calendarFormat = value.calendarFormat;
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
return Reflect.apply(calendarFormat, value, [date instanceof Object ? date : value2, true]);
}
global.__d(_fun105268, 13800, [31, 27, 33, 4501, 697, 8402, 1901, 8489, 1244, 2582, 10507, 3826, 1305, 8696, 8697,
4573,
2]) /* metro module 13800, dependencies: [31, 27, 33, 4501, 697, 8402, 1901, 8489, 1244, 2582, 10507, 3826, 1305, 8696, 8697, 4573, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,146 +1,181 @@
/* Metro module 13795; source: modules/display_name_styles/native/DisplayNameStylesEffectPickerSheet.tsx; dependencies: [57, 31, 27, 1889, 33, 4501, 697, 7326, 8698, 1890, 4081, 4080, 6275, 6758, 1244, 2582, 4578, 4572, 8701, 8696, 8697, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UsernameWithEffects from './UsernameWithEffects.tsx'; /* Metro dependency 8696 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DisplayNameStylesConstantsModule from '../DisplayNameStylesConstants.tsx'; /* Metro dependency 1889 */
import * as DisplayNameEffectModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameEffect.tsx'; /* Metro dependency 1890 */
import * as HapticUtilsNativeModule from '../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as UseBottomSheetRefModule from '../../../design/components/Sheet/native/useBottomSheetRef.tsx'; /* Metro dependency 7326 */
import * as TypesModule from '../types.tsx'; /* Metro dependency 8697 */
import * as UseDisplayNameStylesEffectConfigsModule from '../hooks/useDisplayNameStylesEffectConfigs.tsx'; /* Metro dependency 8701 */
function _fun105229(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:6, offset: 0x022b2044, size: 499 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Pressable;
const env0_7 = (require(1889) /* metro dependency 1889: DisplayNameStylesConstants */).EFFECT_ORDER;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.header = {paddingTop: 4};
object2.headerTrailing = {'justifyContent': 'center', 'alignItems': 'center'};
object2.container = {flex: 1};
const object3 = {};
object = {};
object.header = {paddingTop: 4};
object.headerTrailing = {'justifyContent': 'center', 'alignItems': 'center'};
object.container = {flex: 1};
const object4 = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.padding = PX_8;
object4.padding = PX_8;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingLeft = PX_16;
object3.alignItems = 'center';
object2.contentContainer = object3;
object2.gridContainer = {'flexWrap': 'wrap', 'width': 350};
const object6 = {'width': 109, 'height': 80, 'backgroundColor': null, 'borderRadius': null, 'borderWidth': 1,
object4.paddingLeft = PX_16;
object4.alignItems = 'center';
object.contentContainer = object4;
object.gridContainer = {'flexWrap': 'wrap', 'width': 350};
const object5 = {'width': 109, 'height': 80, 'backgroundColor': null, 'borderRadius': null, 'borderWidth': 1,
'borderColor': null, 'justifyContent': 'center', 'alignItems': 'center'};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object6.backgroundColor = BACKGROUND_MOD_MUTED;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object5.backgroundColor = BACKGROUND_MOD_MUTED;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object6.borderColor = BACKGROUND_MOD_SUBTLE;
object2.effectCard = object6;
object5.borderColor = BACKGROUND_MOD_SUBTLE;
object.effectCard = object5;
const CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
object2.effectCardSelected = {borderColor: CONTROL_BRAND_FOREGROUND};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesEffectPickerSheet.tsx');
object.effectCardSelected = {borderColor: CONTROL_BRAND_FOREGROUND};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesEffectPickerSheet.tsx');
exports.default = DisplayNameStylesEffectPickerSheet;
}
function EffectTile({userId, effectId, selected, onClick}) { // fn#105230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:749, offset: 0x022b2237, size: 351 bytes, params: 2, frame: 26
const styles = useStyles();
const intl = (IndexNativeModule).intl;
const string = intl.string;
const DISPLAY_NAME_STYLES_EFFECT_NAMES = (UseDisplayNameStylesEffectConfigsModule).DISPLAY_NAME_STYLES_EFFECT_NAMES;
const value2 = Reflect.apply(string, intl,
[DISPLAY_NAME_STYLES_EFFECT_NAMES[effectId] ?? (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).OpWJ3f]);
const value3 = (UseDisplayNameStylesEffectConfigsModule).useDisplayNameStylesEffectConfig(effectId);
const object2 = {selected: selected};
const items2 = [styles.effectCard];
items2[1] = selected && styles.effectCardSelected;
const EffectDisplayType = (TypesModule).EffectDisplayType;
const STATIC = EffectDisplayType.STATIC;
return (
<Pressable
onPress={onClick}
accessibilityRole="button"
accessibilityLabel={value2}
accessibilityState={object2}
key={effectId}
>
<View style={items2}>
<UsernameWithEffects
userId={userId}
userName={value2}
effectDisplayType={STATIC}
pendingDisplayNameStyles={value3.previewStyles}
variant="text-md/semibold"
/>
</View>
</Pressable>
);
}
function EffectTile({userId, effectId, selected, onClick}) { // fn#105230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:749, offset: 0x022b2237, size: 351 bytes, params: 2, frame: 26
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const DISPLAY_NAME_STYLES_EFFECT_NAMES = (require(8701) /* metro dependency 8701: useDisplayNameStylesEffectConfigs */).DISPLAY_NAME_STYLES_EFFECT_NAMES;
const value2 = Reflect.apply(string, intl,
[DISPLAY_NAME_STYLES_EFFECT_NAMES[effectId] ?? (importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).OpWJ3f]);
const value3 = (require(8701) /* metro dependency 8701: useDisplayNameStylesEffectConfigs */).useDisplayNameStylesEffectConfig(effectId);
const object = {selected: selected};
const items2 = [styles.effectCard];
items2[1] = selected && styles.effectCardSelected;
const UsernameWithEffects = importDefault(8696) /* metro dependency 8696: UsernameWithEffects */;
const EffectDisplayType = (require(8697) /* metro dependency 8697: types */).EffectDisplayType;
const STATIC = EffectDisplayType.STATIC;
return (
<Pressable
onPress={onClick}
accessibilityRole="button"
accessibilityLabel={value2}
accessibilityState={object}
key={effectId}
>
<View style={items2}>
<UsernameWithEffects
function DisplayNameStylesEffectPickerSheet({userId, selectedEffectId, onSelectEffect}) { // fn#105231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:1305, offset: 0x022b2396, size: 781 bytes, params: 2, frame: 37
var r16;
var r0;
var object;
var value3;
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
var BottomSheet;
var BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var env0_3Binding = undefined;
const styles = useStyles();
const useBottomSheetRef = UseBottomSheetRefModule.useBottomSheetRef;
const bottomSheetRef = Reflect.apply(useBottomSheetRef, UseBottomSheetRefModule, []).bottomSheetRef;
if ((require(8698) /* metro dependency 8698: DisplayNameStylesFlywheelExperiment */).useIsDisplayNameStylesFlywheelSettersEnabled('DisplayNameStylesEffectPickerSheet')) {
object = [];
value3 = arraySpread(object, EFFECT_ORDER, 0, undefined);
object[value3] = DisplayNameEffect.PRISM;
object[value3 + 1] = DisplayNameEffect.GUMMY;
r16 = object;
} else {
r16 = EFFECT_ORDER;
}
const binding = undefined;
var [property, env0_3] = env0_3Binding(binding.useState(selectedEffectId), 2);
const value7 = property !== selectedEffectId;
const env0_5 = binding.useCallback(_fun105232, []);
if (userId == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object = {ref: bottomSheetRef};
var viewBindingProps = {style: styles.header};
BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object.header = (
<View {...viewBindingProps}>
<BottomSheetTitleHeader
title={intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).RVtMxT)}
trailing={<View style={styles.headerTrailing}>
{((Button) => <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XqMe3N)} onPress={binding.useCallback(_fun105233,
[value7, property,
onSelectEffect])} variant="primary" size="sm" />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
</View>}
/>
</View>
);
r0 = (
<BottomSheet {...object}>
<View style={styles.container}>
<View style={styles.contentContainer}>
{((Stack) => <Stack direction="horizontal" spacing={8} style={styles.gridContainer}>{r16.map(_fun105234)}</Stack>)((require(4572) /* metro dependency 4572: StackNative */).Stack)}
</View>
</View>
</BottomSheet>
);
}
return r0;
function _fun105232(a0) { // fn#105232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:1682, offset: 0x01b85a95, size: 19 bytes, params: 2, frame: 11
env0_3(a0);
}
function _fun105233() { // fn#105233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:1714, offset: 0x022b26a3, size: 112 bytes, params: 1, frame: 15
const value = environment.__proto__;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = HapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_MEDIUM]);
if (ReactModule) {
onSelectEffect(env0_2);
}
(ActionSheetActionCreators).hideActionSheet();
}
function _fun105234(a0) { // fn#105234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:2330, offset: 0x022b2713, size: 74 bytes, params: 2, frame: 17
const env0_0 = a0;
return (
<EffectTile
userId={userId}
userName={value2}
effectDisplayType={STATIC}
pendingDisplayNameStyles={value3.previewStyles}
variant="text-md/semibold"
effectId={a0}
selected={a0 === env0_2}
onClick={onClick_105235}
key={a0}
/>
</View>
</Pressable>
);
}
);
function onClick_105235() { // fn#105235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:2390, offset: 0x01bda28e, size: 23 bytes, params: 1, frame: 11
return env1_5(env0_0);
}
}
function DisplayNameStylesEffectPickerSheet({userId, selectedEffectId, onSelectEffect}) { // fn#105231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:1305, offset: 0x022b2396, size: 781 bytes, params: 2, frame: 37
var r16;
var r0;
var object;
var value3;
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
var BottomSheet;
var BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var env0_3Binding = undefined;
const styles = useStyles();
const useBottomSheetRefModule = require(7326) /* metro dependency 7326: useBottomSheetRef */;
const useBottomSheetRef = useBottomSheetRefModule.useBottomSheetRef;
const bottomSheetRef = Reflect.apply(useBottomSheetRef, useBottomSheetRefModule, []).bottomSheetRef;
if ((require(8698) /* metro dependency 8698: DisplayNameStylesFlywheelExperiment */).useIsDisplayNameStylesFlywheelSettersEnabled('DisplayNameStylesEffectPickerSheet')) {
object = [];
value3 = arraySpread(object, EFFECT_ORDER, 0, undefined);
object[value3] = DisplayNameEffect.PRISM;
object[value3 + 1] = DisplayNameEffect.GUMMY;
r16 = object;
} else {
r16 = EFFECT_ORDER;
}
const binding = undefined;
var [property, env0_3] = env0_3Binding(binding.useState(selectedEffectId), 2);
const value7 = property !== selectedEffectId;
const env0_5 = binding.useCallback(_fun105232, []);
if (userId == null) {
r0 = null;
} else {
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object = {ref: bottomSheetRef};
var viewBindingProps = {style: styles.header};
BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object.header = <View {...viewBindingProps}><BottomSheetTitleHeader title={intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).RVtMxT)} trailing={<View style={styles.headerTrailing}>{((Button) => <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XqMe3N)} onPress={binding.useCallback(_fun105233,
[value7, property,
onSelectEffect])} variant="primary" size="sm" />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>} /></View>;
r0 = <BottomSheet {...object}><View style={styles.container}><View style={styles.contentContainer}>{((Stack) => <Stack direction="horizontal" spacing={8} style={styles.gridContainer}>{r16.map(_fun105234)}</Stack>)((require(4572) /* metro dependency 4572: StackNative */).Stack)}</View></View></BottomSheet>;
}
return r0;
}
function _fun105233() { // fn#105233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:1714, offset: 0x022b26a3, size: 112 bytes, params: 1, frame: 15
const value = environment.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_MEDIUM]);
if (env0_4) {
onSelectEffect(env0_2);
}
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun105234(a0) { // fn#105234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13992:2330, offset: 0x022b2713, size: 74 bytes, params: 2, frame: 17
const env0_0 = a0;
return (
<EffectTile
userId={userId}
effectId={a0}
selected={a0 === env0_2}
onClick={onClick_105235}
key={a0}
/>
);
}
global.__d(_fun105229, 13795, [57, 31, 27, 1889, 33, 4501, 697, 7326, 8698, 1890, 4081, 4080, 6275, 6758, 1244,
2582, 4578, 4572, 8701, 8696, 8697,
2]) /* metro module 13795, dependencies: [57, 31, 27, 1889, 33, 4501, 697, 7326, 8698, 1890, 4081, 4080, 6275, 6758, 1244, 2582, 4578, 4572, 8701, 8696, 8697, 2] */;
@@ -1,146 +1,199 @@
/* Metro module 13794; source: modules/display_name_styles/native/DisplayNameStylesFontPickerSheet.tsx; dependencies: [57, 31, 27, 482, 33, 4501, 697, 7326, 13793, 1891, 1888, 4081, 4080, 6275, 6758, 1244, 2582, 4578, 4572, 13207, 8699, 4573, 4068, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import GetDisplayNameStylesFontName from '../getDisplayNameStylesFontName.tsx'; /* Metro dependency 13207 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DisplayNameStylesUtilsModule from '../DisplayNameStylesUtils.tsx'; /* Metro dependency 1888 */
import * as DisplayNameFontModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameFont.tsx'; /* Metro dependency 1891 */
import * as HapticUtilsNativeModule from '../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as UseBottomSheetRefModule from '../../../design/components/Sheet/native/useBottomSheetRef.tsx'; /* Metro dependency 7326 */
import * as UseDisplayNameStylesFontModule from './useDisplayNameStylesFont.tsx'; /* Metro dependency 8699 */
import * as DisplayNameStylesFontOrderModule from '../DisplayNameStylesFontOrder.tsx'; /* Metro dependency 13793 */
function _fun105223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13991:6, offset: 0x022b188c, size: 664 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Pressable;
const env0_7 = (require(482) /* metro dependency 482: Constants */).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.header = {paddingTop: 4};
object2.headerTrailing = {'justifyContent': 'center', 'alignItems': 'center'};
object2.container = {flex: 1};
object = {};
object.header = {paddingTop: 4};
object.headerTrailing = {'justifyContent': 'center', 'alignItems': 'center'};
object.container = {flex: 1};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.contentContainer = {padding: PX_8, alignItems: 'center'};
object2.gridContainer = {'flexWrap': 'wrap', 'maxWidth': 350};
const object3 = {'width': 79, 'height': 79, 'backgroundColor': null, 'borderRadius': null, 'borderWidth': 1,
object.contentContainer = {padding: PX_8, alignItems: 'center'};
object.gridContainer = {'flexWrap': 'wrap', 'maxWidth': 350};
const object5 = {'width': 79, 'height': 79, 'backgroundColor': null, 'borderRadius': null, 'borderWidth': 1,
'borderColor': null, 'justifyContent': 'center', 'alignItems': 'center'};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object3.backgroundColor = BACKGROUND_MOD_MUTED;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object5.backgroundColor = BACKGROUND_MOD_MUTED;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object3.borderColor = BACKGROUND_MOD_SUBTLE;
object2.fontCard = object3;
object5.borderColor = BACKGROUND_MOD_SUBTLE;
object.fontCard = object5;
const CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
object2.fontCardSelected = {borderColor: CONTROL_BRAND_FOREGROUND};
object2.fontText = {'fontSize': 24, 'lineHeight': 34, 'textAlign': 'center', 'textAlignVertical': 'center'};
const object4 = {'flexDirection': 'row', 'alignItems': 'center'};
object.fontCardSelected = {borderColor: CONTROL_BRAND_FOREGROUND};
object.fontText = {'fontSize': 24, 'lineHeight': 34, 'textAlign': 'center', 'textAlignVertical': 'center'};
const object6 = {'flexDirection': 'row', 'alignItems': 'center'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.gap = PX_8;
object6.gap = PX_8;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingHorizontal = PX_12;
object6.paddingHorizontal = PX_12;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingVertical = PX_8;
object6.paddingVertical = PX_8;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.backgroundColor = BACKGROUND_BASE_LOWEST;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginTop = PX_16;
object2.nonLatinDisclaimer = object4;
object2.disclaimerText = {flex: 1};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesFontPickerSheet.tsx');
object6.marginTop = PX_16;
object.nonLatinDisclaimer = object6;
object.disclaimerText = {flex: 1};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesFontPickerSheet.tsx');
exports.default = DisplayNameStylesFontPickerSheet;
}
function DisplayNameStylesFontPickerSheet({selectedFontId, onSelectFont, displayName}) { // fn#105224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13991:1105, offset: 0x022b1b24, size: 856 bytes, params: 2, frame: 34
var object4;
var items2;
const styles = useStyles();
const useBottomSheetRefModule = require(7326) /* metro dependency 7326: useBottomSheetRef */;
const useBottomSheetRef = useBottomSheetRefModule.useBottomSheetRef;
const bottomSheetRef = Reflect.apply(useBottomSheetRef, useBottomSheetRefModule, []).bottomSheetRef;
const value2 = (require(13793) /* metro dependency 13793: DisplayNameStylesFontOrder */).useVisibleFontOrder();
const binding = env0_4;
const [property, env0_3] = env0_3Binding(binding.useState(selectedFontId), 2);
const DisplayNameFont = (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont;
const DEFAULT = DisplayNameFont.DEFAULT;
const value5 = property !== DEFAULT;
const hasNonLatinLetters2 = (require(1888) /* metro dependency 1888: DisplayNameStylesUtils */).hasNonLatinLetters(displayName);
const value6 = property !== selectedFontId;
const env0_5 = binding.useCallback(_fun105225, []);
const value7 = binding.useCallback(_fun105226, [value6, property, onSelectFont]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object4 = {ref: bottomSheetRef};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.title = Reflect.apply(string, intl,
[(importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['0JCuGm']]);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const XqMe3N = (require(1244) /* metro dependency 1244: indexNative */).t.XqMe3N;
object2.trailing = <View style={styles.headerTrailing}><Button text={Reflect.apply(string, intl,
[XqMe3N])} onPress={value7} variant="primary" size="sm" /></View>;
object4.header = <View style={styles.header}><BottomSheetTitleHeader {...object2} /></View>;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const stack = <Stack direction="horizontal" align="center" justify="center" spacing={8} style={styles.gridContainer}>{value2.map(_fun105227)}</Stack>;
let r9 = value5 && hasNonLatinLetters2;
if (r9) {
var viewBinding2Props = {style: styles.nonLatinDisclaimer};
items2 = [((CircleInformationIcon) => <CircleInformationIcon size="sm" />)((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)];
items2[1] = ((Text) => <Text variant="text-xs/normal" color="text-subtle" style={styles.disclaimerText}>{intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['+O1xL2'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r9 = <View {...viewBinding2Props}>{items2}</View>;
}
return (
<BottomSheet {...object4}>
<View style={styles.container}>
<View style={styles.contentContainer}>
{stack}
{r9}
function DisplayNameStylesFontPickerSheet({selectedFontId, onSelectFont, displayName}) { // fn#105224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13991:1105, offset: 0x022b1b24, size: 856 bytes, params: 2, frame: 34
var object3;
var items2;
const styles = useStyles();
const useBottomSheetRef = UseBottomSheetRefModule.useBottomSheetRef;
const bottomSheetRef = Reflect.apply(useBottomSheetRef, UseBottomSheetRefModule, []).bottomSheetRef;
const value2 = (DisplayNameStylesFontOrderModule).useVisibleFontOrder();
const [property, env0_3] = env0_3Binding(ReactModule.useState(selectedFontId), 2);
const DisplayNameFont = (DisplayNameFontModule).DisplayNameFont;
const DEFAULT = DisplayNameFont.DEFAULT;
const value5 = property !== DEFAULT;
const hasNonLatinLetters2 = (DisplayNameStylesUtilsModule).hasNonLatinLetters(displayName);
const value6 = property !== selectedFontId;
const env0_5 = ReactModule.useCallback(_fun105225, []);
const value7 = ReactModule.useCallback(_fun105226, [value6, property, onSelectFont]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object3 = {ref: bottomSheetRef};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const object = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
object.title = Reflect.apply(string, intl,
[(importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['0JCuGm']]);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const XqMe3N = (IndexNativeModule).t.XqMe3N;
object.trailing = (
<View style={styles.headerTrailing}>
<Button
text={Reflect.apply(string, intl, [XqMe3N])}
onPress={value7}
variant="primary"
size="sm"
/>
</View>
);
object3.header = (
<View style={styles.header}>
<BottomSheetTitleHeader {...object} />
</View>
);
const Stack = (StackNativeModule).Stack;
const stack = (
<Stack
direction="horizontal"
align="center"
justify="center"
spacing={8}
style={styles.gridContainer}
>
{value2.map(_fun105227)}
</Stack>
);
let r9 = value5 && hasNonLatinLetters2;
if (r9) {
var viewBinding2Props = {style: styles.nonLatinDisclaimer};
const CircleInformationIcon = (require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon;
items2 = [
<CircleInformationIcon size="sm" />,
];
items2[1] = ((Text) => <Text variant="text-xs/normal" color="text-subtle" style={styles.disclaimerText}>{intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['+O1xL2'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
r9 = (
<View {...viewBinding2Props}>
{items2}
</View>
</View>
</BottomSheet>
);
}
);
}
return (
<BottomSheet {...object3}>
<View style={styles.container}>
<View style={styles.contentContainer}>
{stack}
{r9}
</View>
</View>
</BottomSheet>
);
function _fun105225(a0) { // fn#105225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13991:1418, offset: 0x01b85a95, size: 19 bytes, params: 2, frame: 11
env0_3(a0);
}
function _fun105226() { // fn#105226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13991:1450, offset: 0x022b1e7c, size: 112 bytes, params: 1, frame: 15
const value = environment.__proto__;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = HapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_MEDIUM]);
if (result) {
onSelectFont(env0_2);
}
(ActionSheetActionCreators).hideActionSheet();
}
function _fun105227(a0) { // fn#105227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13991:2089, offset: 0x022b1eec, size: 344 bytes, params: 2, frame: 24
const env0_0 = a0;
const value2 = a0 === env0_2;
const intl = (IndexNativeModule).intl;
const value4 = intl.string((GetDisplayNameStylesFontName)(a0));
const DISPLAY_NAME_STYLES_FONT_FAMILY_MAP = (UseDisplayNameStylesFontModule).DISPLAY_NAME_STYLES_FONT_FAMILY_MAP;
const r12 = DISPLAY_NAME_STYLES_FONT_FAMILY_MAP[a0] ?? Fonts.PRIMARY_SEMIBOLD;
const pressableBindingProps = {onPress: onPress_105228, accessibilityRole: 'button', accessibilityLabel: value4,
accessibilityState: {selected: value2}};
const items2 = [styles.fontCard];
items2[1] = value2 && styles.fontCardSelected;
const Text = (TextModule).Text;
return (
<Pressable {...pressableBindingProps} key={a0}>
<View style={items2}>
<Text
variant="text-lg/semibold"
color={value2 ? 'mobile-text-heading-primary' : 'text-default'}
style={[styles.fontText, {fontFamily: r12}]}
>
{'Gg'}
</Text>
</View>
</Pressable>
);
function onPress_105228() { // fn#105228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13991:2244, offset: 0x01bda28e, size: 23 bytes, params: 1, frame: 11
return env1_5(env0_0);
}
}
function _fun105226() { // fn#105226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13991:1450, offset: 0x022b1e7c, size: 112 bytes, params: 1, frame: 15
const value = environment.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_MEDIUM]);
if (result) {
onSelectFont(env0_2);
}
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun105227(a0) { // fn#105227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13991:2089, offset: 0x022b1eec, size: 344 bytes, params: 2, frame: 24
const env0_0 = a0;
const value2 = a0 === env0_2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value4 = intl.string((importDefault(13207) /* metro dependency 13207: getDisplayNameStylesFontName */)(a0));
const DISPLAY_NAME_STYLES_FONT_FAMILY_MAP = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).DISPLAY_NAME_STYLES_FONT_FAMILY_MAP;
const r12 = DISPLAY_NAME_STYLES_FONT_FAMILY_MAP[a0] ?? Fonts.PRIMARY_SEMIBOLD;
const pressableBindingProps = {onPress: onPress_105228, accessibilityRole: 'button', accessibilityLabel: value4,
accessibilityState: {selected: value2}};
const items2 = [styles.fontCard];
items2[1] = value2 && styles.fontCardSelected;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Pressable {...pressableBindingProps} key={a0}>
<View style={items2}>
<Text
variant="text-lg/semibold"
color={value2 ? 'mobile-text-heading-primary' : 'text-default'}
style={[styles.fontText, {fontFamily: r12}]}
>
{'Gg'}
</Text>
</View>
</Pressable>
);
}
global.__d(_fun105223, 13794, [57, 31, 27, 482, 33, 4501, 697, 7326, 13793, 1891, 1888, 4081, 4080, 6275, 6758,
1244, 2582, 4578, 4572, 13207, 8699, 4573, 4068,
2]) /* metro module 13794, dependencies: [57, 31, 27, 482, 33, 4501, 697, 7326, 13793, 1891, 1888, 4081, 4080, 6275, 6758, 1244, 2582, 4578, 4572, 13207, 8699, 4573, 4068, 2] */;
@@ -1,201 +1,254 @@
/* Metro module 13796; source: modules/display_name_styles/native/DisplayNameStylesGradientPickerSheet.tsx; dependencies: [57, 31, 27, 1889, 661, 33, 4501, 697, 8701, 1888, 4081, 683, 4080, 13189, 6275, 6758, 4578, 1244, 4589, 673, 13797, 22, 5278, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import LinearGradient from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../../external/discord_common/js/shared/utils/ColorUtils.tsx'; /* Metro dependency 673 */
import * as DisplayNameStylesUtilsModule from '../DisplayNameStylesUtils.tsx'; /* Metro dependency 1888 */
import * as DisplayNameStylesConstantsModule from '../DisplayNameStylesConstants.tsx'; /* Metro dependency 1889 */
import * as HapticUtilsNativeModule from '../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as UseDisplayNameStylesEffectConfigsModule from '../hooks/useDisplayNameStylesEffectConfigs.tsx'; /* Metro dependency 8701 */
import * as EyeDropperIconModule from '../../../design/components/Icon/native/redesign/generated/EyeDropperIcon.tsx'; /* Metro dependency 13797 */
function _fun105236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:6, offset: 0x022b275d, size: 739 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Pressable;
const env0_7 = (require(1889) /* metro dependency 1889: DisplayNameStylesConstants */).getColorPresetsForEffect;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object7 = {'paddingVertical': null, 'paddingHorizontal': null, 'flexGrow': 1, 'justifyContent': 'center',
object = {};
const object2 = {'paddingVertical': null, 'paddingHorizontal': null, 'flexGrow': 1, 'justifyContent': 'center',
'alignItems': 'center'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object7.paddingVertical = PX_12;
object2.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object7.paddingHorizontal = PX_12;
object2.paddingHorizontal = PX_12;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.gap = PX_16;
object3.body = object7;
object2.gap = PX_16;
object.body = object2;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.gradientContainer = {'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center',
object.gradientContainer = {'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center',
paddingHorizontal: PX_8};
const object9 = {'left': null, 'right': null, 'position': 'absolute', 'flexDirection': 'row',
const object4 = {'left': null, 'right': null, 'position': 'absolute', 'flexDirection': 'row',
'justifyContent': 'space-between'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.left = PX_24;
object4.left = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object9.right = PX_24;
object3.dropperContainer = object9;
const object10 = {borderColor: 'white'};
object4.right = PX_24;
object.dropperContainer = object4;
const object5 = {borderColor: 'white'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.padding = PX_8;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object10.borderWidth = 1;
object3.dropper = object10;
const object11 = {'height': 50, 'width': '100%'};
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.gradient = object11;
object5.padding = PX_8;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.borderWidth = 1;
object.dropper = object5;
const object6 = {'height': 50, 'width': '100%'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.gradient = object6;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.optionContainer = {'flexDirection': 'row', 'flexWrap': 'wrap', paddingHorizontal: PX_4};
object3.swatchWrapper = {'width': '25%', 'padding': 2};
const object12 = {'height': 40, 'borderRadius': null, 'overflow': 'hidden', 'borderWidth': 2,
object.optionContainer = {'flexDirection': 'row', 'flexWrap': 'wrap', paddingHorizontal: PX_4};
object.swatchWrapper = {'width': '25%', 'padding': 2};
const object8 = {'height': 40, 'borderRadius': null, 'overflow': 'hidden', 'borderWidth': 2,
'borderColor': 'transparent'};
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.pressable = object12;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.pressable = object8;
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3.selected = {borderColor: BACKGROUND_BRAND};
object3.option = {flex: 1};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesGradientPickerSheet.tsx');
object.selected = {borderColor: BACKGROUND_BRAND};
object.option = {flex: 1};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesGradientPickerSheet.tsx');
exports.default = DisplayNameStylesColorPickerSheet;
}
function DisplayNameStylesColorPickerSheet({selectedColors, selectedEffectId, onSelectColors}) { // fn#105237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1182, offset: 0x022b2a40, size: 824 bytes, params: 2, frame: 32
var object2;
const styles = useStyles();
const value2 = (require(8701) /* metro dependency 8701: useDisplayNameStylesEffectConfigs */).useDisplayNameStylesEffectConfig(selectedEffectId);
const env0_3 = value2;
const effectColorCount = (require(1888) /* metro dependency 1888: DisplayNameStylesUtils */).getEffectColorCount(selectedEffectId);
const binding = env0_4;
const value4 = binding.useMemo(function() {
return getColorPresetsForEffect(selectedEffectId);
}, [selectedEffectId]);
const [property, env0_6] = env0_3(binding.useState(selectedColors), 2);
const value7 = binding.useCallback(_fun105239, [property, onSelectColors]);
const value8 = binding.useCallback(_fun105240, [value4, value2.defaultColors]);
const env0_7 = binding.useCallback(_fun105241, [property]);
const env0_8 = binding.useCallback(_fun105245, []);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const name = value2.name;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const XqMe3N = (require(1244) /* metro dependency 1244: indexNative */).t.XqMe3N;
object2.header = <BottomSheetTitleHeader title={name} trailing={<Button variant="primary" size="sm" text={Reflect.apply(string,
intl, [XqMe3N])} onPress={value7} />} />;
let value = importDefault(4589) /* metro dependency 4589 */;
value = ((Component) => <Component style={styles.gradient} colors={property.map(_fun105246)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} />)(value);
const Array = global.Array;
const items2 = [<View style={styles.gradientContainer}>{value}<View style={styles.dropperContainer}>{Array.from({length: effectColorCount}).map(_fun105247)}</View></View>];
items2[1] = <View style={styles.optionContainer}>{value4.map(_fun105249)}</View>;
items2[2] = <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)} onPress={value8} variant="secondary" />;
return (
<BottomSheet {...object2}>
<View style={styles.body}>
{items2}
function DisplayNameStylesColorPickerSheet({selectedColors, selectedEffectId, onSelectColors}) { // fn#105237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1182, offset: 0x022b2a40, size: 824 bytes, params: 2, frame: 32
const styles = useStyles();
const value2 = (UseDisplayNameStylesEffectConfigsModule).useDisplayNameStylesEffectConfig(selectedEffectId);
const env0_3 = value2;
const effectColorCount = (DisplayNameStylesUtilsModule).getEffectColorCount(selectedEffectId);
const value4 = ReactModule.useMemo(function() {
return getColorPresetsForEffect(selectedEffectId);
}, [selectedEffectId]);
const [property, env0_6] = env0_3(ReactModule.useState(selectedColors), 2);
const value7 = ReactModule.useCallback(_fun105239, [property, onSelectColors]);
const value8 = ReactModule.useCallback(_fun105240, [value4, value2.defaultColors]);
const env0_7 = ReactModule.useCallback(_fun105241, [property]);
const env0_8 = ReactModule.useCallback(_fun105245, []);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const name = value2.name;
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const XqMe3N = (require(1244) /* metro dependency 1244: indexNative */).t.XqMe3N;
object.header = (
<BottomSheetTitleHeader
title={name}
trailing={<Button
variant="primary"
size="sm"
text={Reflect.apply(string, intl, [XqMe3N])}
onPress={value7}
/>}
/>
);
let value = LinearGradient;
value = ((Component) => <Component style={styles.gradient} colors={property.map(_fun105246)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} />)(value);
const Array = global.Array;
const items2 = [
<View style={styles.gradientContainer}>
{value}
<View style={styles.dropperContainer}>
{Array.from({length: effectColorCount}).map(_fun105247)}
</View>
</View>,
];
items2[1] = (
<View style={styles.optionContainer}>
{value4.map(_fun105249)}
</View>
</BottomSheet>
);
}
);
items2[2] = (
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBZMsQ)}
onPress={value8}
variant="secondary"
/>
);
return (
<BottomSheet {...object}>
<View style={styles.body}>
{items2}
</View>
</BottomSheet>
);
function _fun105239() { // fn#105239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1454, offset: 0x022b2d78, size: 146 bytes, params: 1, frame: 18
const value = environment.__proto__;
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = HapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_MEDIUM]);
const onSelectColorsBinding = onSelectColors;
const binding = env0_5;
onSelectColorsBinding(binding);
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const DISPLAY_NAME_STYLES_COLOR_SELECTED = AnalyticEvents.DISPLAY_NAME_STYLES_COLOR_SELECTED;
Reflect.apply(track, defaultImport, [DISPLAY_NAME_STYLES_COLOR_SELECTED, {default: false, colors: binding}]);
(ActionSheetActionCreators).hideActionSheet();
}
function _fun105239() { // fn#105239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1454, offset: 0x022b2d78, size: 146 bytes, params: 1, frame: 18
const value = environment.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const HapticFeedbackTypes = hapticUtilsNativeModule.HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_MEDIUM]);
const onSelectColorsBinding = onSelectColors;
const binding = env0_5;
onSelectColorsBinding(binding);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const DISPLAY_NAME_STYLES_COLOR_SELECTED = AnalyticEvents.DISPLAY_NAME_STYLES_COLOR_SELECTED;
Reflect.apply(track, defaultImport, [DISPLAY_NAME_STYLES_COLOR_SELECTED, {default: false, colors: binding}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun105240() { // fn#105240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1669, offset: 0x022b2e0a, size: 58 bytes, params: 1, frame: 15
const binding = env0_6;
const r0 = ReactModule[0] ?? env0_3.defaultColors;
const items2 = [];
arraySpread(items2, r0, 0, null);
binding(items2);
}
function _fun105240() { // fn#105240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1669, offset: 0x022b2e0a, size: 58 bytes, params: 1, frame: 15
const binding = env0_6;
const r0 = env0_4[0] ?? env0_3.defaultColors;
const items2 = [];
arraySpread(items2, r0, 0, null);
binding(items2);
}
function _fun105241(a0) { // fn#105241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1761, offset: 0x022b2e44, size: 98 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(importDefault(13189) /* metro dependency 13189: showCustomColorPickerActionSheet */)({color: env0_5[a0] ?? 0,
onSelect: onSelect_105242, actionButtonVariant: 'primary'}, 'stack');
function onSelect_105242(a0) { // fn#105242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1816, offset: 0x022b2ea6, size: 87 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
let value = environment.__proto__.__proto__;
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
value = environment.__proto__;
env1_6(function(a0) {
return a0.map(_fun105244);
});
function _fun105243(a0) { // fn#105243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1898, offset: 0x022b2efd, size: 24 bytes, params: 2, frame: 11
return a0.map(_fun105244);
function _fun105244(a0, a1) { // fn#105244, offset: 0x022b2f15, size: 26 bytes, params: 3, frame: 3
return a1 !== env2_0 ? a0 : env1_0;
}
function _fun105241(a0) { // fn#105241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1761, offset: 0x022b2e44, size: 98 bytes, params: 2, frame: 16
var environment;
const env0_0 = a0;
const value = environment.__proto__;
(importDefault(13189) /* metro dependency 13189: showCustomColorPickerActionSheet */)({color: env0_5[a0] ?? 0,
onSelect: onSelect_105242, actionButtonVariant: 'primary'}, 'stack');
}
}
function _fun105245(a0) { // fn#105245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1994, offset: 0x022b2f2f, size: 32 bytes, params: 2, frame: 14
const binding = env0_6;
const items2 = [];
arraySpread(items2, a0, 0, undefined);
binding(items2);
}
}
function _fun105246(a0) { // fn#105246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2337, offset: 0x022b2f4f, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
}
}
function _fun105247(a0, a1) { // fn#105247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2461, offset: 0x022b2f78, size: 111 bytes, params: 3, frame: 17
const env0_0 = a1;
const pressableBindingProps = {style: styles.dropper, onPress: onPress_105248};
const EyeDropperIcon = (require(13797) /* metro dependency 13797: EyeDropperIcon */).EyeDropperIcon;
return (
<Pressable {...pressableBindingProps} key={a1}>
<EyeDropperIcon color="white" size="sm" />
</Pressable>
);
}
function _fun105245(a0) { // fn#105245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1994, offset: 0x022b2f2f, size: 32 bytes, params: 2, frame: 14
const binding = env0_6;
const items2 = [];
arraySpread(items2, a0, 0, undefined);
binding(items2);
}
function _fun105249(a0, a1) { // fn#105249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2624, offset: 0x022b2fe7, size: 268 bytes, params: 3, frame: 23
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const isEqual2 = (importDefault(22) /* metro dependency 22 */).isEqual(a0, env0_5);
const stylesBinding = styles;
const swatchWrapper = stylesBinding.swatchWrapper;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<View style={swatchWrapper} key={a1}>
<PressableOpacity style={[stylesBinding.pressable, isEqual2 && styles.selected]} onPress={onPress_105250}>
{((Component) => <Component style={styles.option} colors={a0.map(_fun105251)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} />)(importDefault(4589) /* metro dependency 4589 */)}
</PressableOpacity>
</View>
);
}
function _fun105246(a0) { // fn#105246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2337, offset: 0x022b2f4f, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__;
return (ColorUtilsModule).int2hex(a0);
}
function onSelect_105242(a0) { // fn#105242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1816, offset: 0x022b2ea6, size: 87 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
let value = environment.__proto__.__proto__;
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
value = environment.__proto__;
env1_6(function(a0) {
return a0.map(_fun105244);
});
}
function _fun105247(a0, a1) { // fn#105247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2461, offset: 0x022b2f78, size: 111 bytes, params: 3, frame: 17
const env0_0 = a1;
const pressableBindingProps = {style: styles.dropper, onPress: onPress_105248};
const EyeDropperIcon = (EyeDropperIconModule).EyeDropperIcon;
return (
<Pressable {...pressableBindingProps} key={a1}>
<EyeDropperIcon color="white" size="sm" />
</Pressable>
);
function onPress_105248() { // fn#105248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2497, offset: 0x013a4b60, size: 23 bytes, params: 1, frame: 11
return env1_7(require);
}
function _fun105251(a0) { // fn#105251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2835, offset: 0x022b30f3, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (require(673) /* metro dependency 673: ColorUtils */).int2hex(a0);
}
}
function _fun105249(a0, a1) { // fn#105249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2624, offset: 0x022b2fe7, size: 268 bytes, params: 3, frame: 23
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const isEqual2 = (Module00022).isEqual(a0, env0_5);
const stylesBinding = styles;
const swatchWrapper = stylesBinding.swatchWrapper;
const PressableOpacity = (PressablesModule).PressableOpacity;
return (
<View style={swatchWrapper} key={a1}>
<PressableOpacity style={[stylesBinding.pressable, isEqual2 && styles.selected]} onPress={onPress_105250}>
{((Component) => <Component style={styles.option} colors={a0.map(_fun105251)} start={{'x': 0,
'y': 0}} end={{'x': 1, 'y': 0}} />)(importDefault(4589) /* metro dependency 4589 */)}
</PressableOpacity>
</View>
);
function onPress_105250() { // fn#105250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2775, offset: 0x00e7cf74, size: 23 bytes, params: 1, frame: 11
return env1_8(env0_0);
}
function _fun105251(a0) { // fn#105251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:2835, offset: 0x022b30f3, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (ColorUtilsModule).int2hex(a0);
}
}
}
function _fun105243(a0) { // fn#105243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13993:1898, offset: 0x022b2efd, size: 24 bytes, params: 2, frame: 11
return a0.map(_fun105244);
}
global.__d(_fun105236, 13796, [57, 31, 27, 1889, 661, 33, 4501, 697, 8701, 1888, 4081, 683, 4080, 13189, 6275, 6758,
4578, 1244, 4589, 673, 13797, 22, 5278,
2]) /* metro module 13796, dependencies: [57, 31, 27, 1889, 661, 33, 4501, 697, 8701, 1888, 4081, 683, 4080, 13189, 6275, 6758, 4578, 1244, 4589, 673, 13797, 22, 5278, 2] */;
@@ -1,166 +1,231 @@
/* Metro module 15288; source: modules/display_name_styles/native/DisplayNameStylesMobileActionSheet.tsx; dependencies: [31, 27, 1878, 661, 1376, 33, 3875, 4002, 4048, 566, 3802, 15289, 15290, 7007, 5459, 3968, 1365, 6275, 6618, 6515, 5475, 15291, 477, 15292, 7897, 4573, 1244, 2582, 4578, 4501, 697, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as AccessibilityPreferencesContextModule from '../../../external/discord_common/js/packages/design/components/AccessibilityPreferencesContext/AccessibilityPreferencesContext.tsx'; /* Metro dependency 3875 */
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as ActionSheetHeaderBarNativeModule from '../../../design/components/Sheet/native/ActionSheetHeaderBar.native.tsx'; /* Metro dependency 6515 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as OpenUserSettingsModule from '../../user_settings/core/native/openUserSettings.tsx'; /* Metro dependency 7007 */
function _fun116934(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:6, offset: 0x0249c79c, size: 285 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 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.ImageBackground;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(661) /* metro dependency 661: Constants */;
const env0_7 = value.UserSettingsSections;
const env0_8 = value.Fonts;
const env0_9 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun116935);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesMobileActionSheet.tsx');
const env0_12 = (CreateStylesModule).createStyles(_fun116935);
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/DisplayNameStylesMobileActionSheet.tsx');
exports.default = _default_116936;
}
function _fun116935() { // fn#116935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:287, offset: 0x0249c8b9, size: 301 bytes, params: 1, frame: 18
const object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {alignItems: 'center', paddingHorizontal: PX_16};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.imageContainer = {'width': '100%', 'height': 162, 'alignItems': 'center', 'justifyContent': 'center',
marginVertical: PX_24};
object2.image = {'width': '100%', 'height': '100%'};
const object3 = {'textAlign': 'center', 'fontFamily': null, 'textTransform': 'uppercase'};
const GINTO_NORD_EXTRA_BOLD = Fonts.GINTO_NORD_EXTRA_BOLD;
object3.fontFamily = GINTO_NORD_EXTRA_BOLD;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.marginTop = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.marginBottom = PX_16;
object2.title = object3;
const object6 = {textAlign: 'center'};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.marginTop = PX_12;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object6.marginBottom = PX_32;
object2.subtitle = object6;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.actions = {gap: PX_12, width: '100%'};
return object2;
}
function _default_116936({markAsDismissed}) { // fn#116936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:827, offset: 0x0249c9e6, size: 1311 bytes, params: 2, frame: 39
const binding = env0_3;
const value2 = binding.useRef(null);
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)());
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const canUsePremiumProfileCustomization2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumProfileCustomization(currentUser);
const value3 = binding.useMemo(_fun116938, [isThemeDark2]);
const value4 = binding.useCallback(_fun116939, [canUsePremiumProfileCustomization2, markAsDismissed]);
const value5 = binding.useCallback(function() {
markAsDismissed(ContentDismissActionType.USER_DISMISS);
}, [markAsDismissed]);
const value6 = binding.useCallback(function() {
markAsDismissed(ContentDismissActionType.USER_DISMISS);
}, [markAsDismissed]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
const items3 = [<ActionSheetHeaderBar onPress={onPress_116945} />];
const items2 = [enabled && ((Component) => <Component source={{uri: importDefault(15291) /* metro dependency 15291: dns_halfsheet_static_2xPng */}} style={styles.image} resizeMode="contain" />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
const value9 = !enabled;
items2[1] = enabled ? value9 : (require(477) /* metro dependency 477: PlatformUtils */).isIOS() ? ((Component) => <Component source={{uri: importDefault(15292) /* metro dependency 15292: dns_halfsheet_animated_2xPng */}} style={styles.image} resizeMode="contain" enableAnimation={value9} />)(importDefault(5475) /* metro dependency 5475: FastImage */) : ((APNGPlayer) => <APNGPlayer url={importDefault(15292) /* metro dependency 15292: dns_halfsheet_animated_2xPng */} style={styles.image} autoplay />)((require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer);
items3[1] = <View style={styles.imageContainer}>{items2}</View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const value12 = 'black';
const r12 = isThemeDark2 ? 'white' : value12;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items3[2] = <Text variant="display-md" style={styles.title} color={r12}>{Reflect.apply(string, intl,
[(importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['1AE464']])}</Text>;
items3[3] = <Text variant="text-lg/medium" style={styles.subtitle} color={isThemeDark2 ? 'white' : value12}>{intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).tNYdiM)}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const RzWDqY = (require(1244) /* metro dependency 1244: indexNative */).t.RzWDqY;
const button = <Button text={Reflect.apply(string, intl, [RzWDqY])} variant="primary" size="lg" onPress={value4} />;
string = intl.string;
const TulDPl = (require(1244) /* metro dependency 1244: indexNative */).t.TulDPl;
items3[4] = <View style={styles.actions}>{button}<Button text={Reflect.apply(string, intl,
[TulDPl])} variant="secondary" size="lg" onPress={value5} /></View>;
return (
<BottomSheet
ref={value2}
onDismiss={value6}
startExpanded
handleDisabled
>
<ImageBackground source={value3} resizeMode="cover">
<SafeAreaPaddingView bottom>
<View style={styles.content}>
{items3}
</View>
</SafeAreaPaddingView>
</ImageBackground>
</BottomSheet>
);
}
function _fun116938() { // fn#116938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1109, offset: 0x0249cf05, size: 52 bytes, params: 1, frame: 13
const object2 = {};
object2.uri = importDefault(env0_2 ? dependencyMap[11] : dependencyMap[12]);
return object2;
}
function _fun116939() { // fn#116939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1161, offset: 0x0249cf39, size: 83 bytes, params: 1, frame: 14
var environment;
const binding = env0_3;
let value = environment.__proto__;
const r1 = binding ? UserSettingsSections.PROFILE_CUSTOMIZATION : UserSettingsSections.PROFILE_CUSTOMIZATION_TRY_IT_OUT;
value = require(7007) /* metro dependency 7007: openUserSettings */;
value.openUserSettings({screen: r1}, _fun116940);
}
function _default_116936OnPress() { // fn#116945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1918, owner: _default_116936.onPress, offset: 0x0249d07b, size: 54 bytes, params: 1, frame: 11
const current = env0_1.current;
if (current != null) {
current.closeActionSheet();
function _fun116935() { // fn#116935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:287, offset: 0x0249c8b9, size: 301 bytes, params: 1, frame: 18
const object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.content = {alignItems: 'center', paddingHorizontal: PX_16};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.imageContainer = {'width': '100%', 'height': 162, 'alignItems': 'center', 'justifyContent': 'center',
marginVertical: PX_24};
object.image = {'width': '100%', 'height': '100%'};
const object4 = {'textAlign': 'center', 'fontFamily': null, 'textTransform': 'uppercase'};
const GINTO_NORD_EXTRA_BOLD = Fonts.GINTO_NORD_EXTRA_BOLD;
object4.fontFamily = GINTO_NORD_EXTRA_BOLD;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.marginTop = PX_12;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginBottom = PX_16;
object.title = object4;
const object5 = {textAlign: 'center'};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.marginTop = PX_12;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.marginBottom = PX_32;
object.subtitle = object5;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.actions = {gap: PX_12, width: '100%'};
return object;
}
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
}
function _fun116940() { // fn#116940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1271, offset: 0x0249cf8c, size: 47 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__.__proto__;
(require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(function() {
require(dependencyMap[13]).openUserSettings({screen: UserSettingsSections.DISPLAY_NAME_STYLES}, _fun116942);
});
}
function _fun116941() { // fn#116941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1307, offset: 0x0249cfbb, size: 65 bytes, params: 1, frame: 14
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
const openUserSettings = openUserSettingsModule.openUserSettings;
const DISPLAY_NAME_STYLES = UserSettingsSections.DISPLAY_NAME_STYLES;
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: DISPLAY_NAME_STYLES}, _fun116942]);
}
function _fun116942() { // fn#116942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1370, offset: 0x0249cffc, size: 98 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const markAsDismissedBinding = markAsDismissed;
value = environment.__proto__.__proto__.__proto__.__proto__;
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
markAsDismissedBinding(TAKE_ACTION);
value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = value.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP;
const INDIRECT_ACTION = ContentDismissActionType.INDIRECT_ACTION;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, value, [DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP,
{dismissAction: INDIRECT_ACTION}]);
function _default_116936({markAsDismissed}) { // fn#116936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:827, offset: 0x0249c9e6, size: 1311 bytes, params: 2, frame: 39
const value2 = ReactModule.useRef(null);
const useContext = ReactModule.useContext;
const AccessibilityPreferencesContext = (AccessibilityPreferencesContextModule).AccessibilityPreferencesContext;
const enabled = Reflect.apply(useContext, ReactModule, [AccessibilityPreferencesContext]).reducedMotion.enabled;
const isThemeDark2 = (SharedModule).isThemeDark((UseTheme)());
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const canUsePremiumProfileCustomization2 = (PremiumUtils).canUsePremiumProfileCustomization(currentUser);
const value3 = ReactModule.useMemo(_fun116938, [isThemeDark2]);
const value4 = ReactModule.useCallback(_fun116939, [canUsePremiumProfileCustomization2, markAsDismissed]);
const value5 = ReactModule.useCallback(function() {
markAsDismissed(ContentDismissActionType.USER_DISMISS);
}, [markAsDismissed]);
const value6 = ReactModule.useCallback(function() {
markAsDismissed(ContentDismissActionType.USER_DISMISS);
}, [markAsDismissed]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const ActionSheetHeaderBar = (ActionSheetHeaderBarNativeModule).ActionSheetHeaderBar;
const items3 = [
<ActionSheetHeaderBar onPress={onPress_116945} />,
];
const items2 = [
enabled && ((Component) => <Component source={{uri: importDefault(15291) /* metro dependency 15291: dns_halfsheet_static_2xPng */}} style={styles.image} resizeMode="contain" />)(importDefault(5475) /* metro dependency 5475: FastImage */),
];
const value9 = !enabled;
items2[1] = (
enabled
? value9
: (
(require(477) /* metro dependency 477: PlatformUtils */).isIOS()
? ((Component) => <Component source={{uri: importDefault(15292) /* metro dependency 15292: dns_halfsheet_animated_2xPng */}} style={styles.image} resizeMode="contain" enableAnimation={value9} />)(importDefault(5475) /* metro dependency 5475: FastImage */)
: ((APNGPlayer) => <APNGPlayer url={importDefault(15292) /* metro dependency 15292: dns_halfsheet_animated_2xPng */} style={styles.image} autoplay />)((require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer)
)
);
items3[1] = (
<View style={styles.imageContainer}>
{items2}
</View>
);
const Text = (TextModule).Text;
const value12 = 'black';
const r12 = isThemeDark2 ? 'white' : value12;
const intl = (IndexNativeModule).intl;
let string = intl.string;
items3[2] = (
<Text
variant="display-md"
style={styles.title}
color={r12}
>
{Reflect.apply(string, intl,
[(importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */)['1AE464']])}
</Text>
);
items3[3] = (
<Text
variant="text-lg/medium"
style={styles.subtitle}
color={isThemeDark2 ? 'white' : value12}
>
{intl.string((importDefault(2582) /* metro dependency 2582: DisplayNameStylesMessages */).tNYdiM)}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const RzWDqY = (IndexNativeModule).t.RzWDqY;
const button = (
<Button
text={Reflect.apply(string, intl, [RzWDqY])}
variant="primary"
size="lg"
onPress={value4}
/>
);
string = intl.string;
const TulDPl = (IndexNativeModule).t.TulDPl;
items3[4] = (
<View style={styles.actions}>
{button}
<Button
text={Reflect.apply(string, intl, [TulDPl])}
variant="secondary"
size="lg"
onPress={value5}
/>
</View>
);
return (
<BottomSheet
ref={value2}
onDismiss={value6}
startExpanded
handleDisabled
>
<ImageBackground source={value3} resizeMode="cover">
<SafeAreaPaddingView bottom>
<View style={styles.content}>
{items3}
</View>
</SafeAreaPaddingView>
</ImageBackground>
</BottomSheet>
);
function _fun116938() { // fn#116938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1109, offset: 0x0249cf05, size: 52 bytes, params: 1, frame: 13
const object = {};
object.uri = importDefault(env0_2 ? dependencyMap[11] : dependencyMap[12]);
return object;
}
function _fun116939() { // fn#116939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1161, offset: 0x0249cf39, size: 83 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
const r1 = ReactModule ? UserSettingsSections.PROFILE_CUSTOMIZATION : UserSettingsSections.PROFILE_CUSTOMIZATION_TRY_IT_OUT;
value = require(7007) /* metro dependency 7007: openUserSettings */;
value.openUserSettings({screen: r1}, _fun116940);
function _fun116940() { // fn#116940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1271, offset: 0x0249cf8c, size: 47 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__.__proto__;
(require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(function() {
require(dependencyMap[13]).openUserSettings({screen: UserSettingsSections.DISPLAY_NAME_STYLES}, _fun116942);
});
function _fun116941() { // fn#116941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1307, offset: 0x0249cfbb, size: 65 bytes, params: 1, frame: 14
const openUserSettings = OpenUserSettingsModule.openUserSettings;
const DISPLAY_NAME_STYLES = UserSettingsSections.DISPLAY_NAME_STYLES;
Reflect.apply(openUserSettings, OpenUserSettingsModule, [{screen: DISPLAY_NAME_STYLES}, _fun116942]);
function _fun116942() { // fn#116942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1370, offset: 0x0249cffc, size: 98 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__.__proto__;
const markAsDismissedBinding = markAsDismissed;
value = environment.__proto__.__proto__.__proto__.__proto__;
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
markAsDismissedBinding(TAKE_ACTION);
value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = value.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP = DismissibleContent.DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP;
const INDIRECT_ACTION = ContentDismissActionType.INDIRECT_ACTION;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, value, [DISPLAY_NAME_STYLES_MOBILE_PROFILE_TOOLTIP,
{dismissAction: INDIRECT_ACTION}]);
}
}
}
}
function _default_116936OnPress() { // fn#116945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15485:1918, owner: _default_116936.onPress, offset: 0x0249d07b, size: 54 bytes, params: 1, frame: 11
const current = env0_1.current;
if (current != null) {
current.closeActionSheet();
}
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
}
}
}
global.__d(_fun116934, 15288, [31, 27, 1878, 661, 1376, 33, 3875, 4002, 4048, 566, 3802, 15289, 15290, 7007, 5459,
3968, 1365, 6275, 6618, 6515, 5475, 15291, 477, 15292, 7897, 4573, 1244, 2582, 4578, 4501, 697,
2]) /* metro module 15288, dependencies: [31, 27, 1878, 661, 1376, 33, 3875, 4002, 4048, 566, 3802, 15289, 15290, 7007, 5459, 3968, 1365, 6275, 6618, 6515, 5475, 15291, 477, 15292, 7897, 4573, 1244, 2582, 4578, 4501, 697, 2] */;
@@ -1,269 +1,323 @@
/* Metro module 8696; source: modules/display_name_styles/native/UsernameWithEffects.tsx; dependencies: [31, 27, 33, 1890, 4501, 697, 478, 4020, 8697, 4635, 8698, 1888, 4636, 8699, 3860, 8700, 4573, 3863, 8703, 1360, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseDisplayNameStyles from '../hooks/useDisplayNameStyles.tsx'; /* Metro dependency 4635 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as DisplayNameEffectModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameEffect.tsx'; /* Metro dependency 1890 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as GetNodeTextModule from '../../../design/utils/shared/getNodeText.tsx'; /* Metro dependency 3863 */
import * as FabricUtilsModule from '../../../utils/native/FabricUtils.tsx'; /* Metro dependency 4020 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseDisplayNameStylesEnabledModule from '../hooks/useDisplayNameStylesEnabled.tsx'; /* Metro dependency 4636 */
import * as DisplayNameStylesFlywheelExperimentModule from '../DisplayNameStylesFlywheelExperiment.tsx'; /* Metro dependency 8698 */
import * as UseDisplayNameStylesAccessibleColorsModule from '../hooks/useDisplayNameStylesAccessibleColors.tsx'; /* Metro dependency 8700 */
function _fun68340(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8881:6, offset: 0x01c4a34f, size: 371 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const calculateStrokeWidth = function(a0, a1) {
return a0 + 0.04 * a1;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.processColor;
const env0_6 = value2.PixelRatio;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
object2 = {};
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
let value = ReactModule;
object = {};
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
const NEON = DisplayNameEffect.NEON;
object2[NEON] = 1;
object[NEON] = 1;
const TOON = DisplayNameEffect.TOON;
object2[TOON] = 1.6;
object[TOON] = 1.6;
const POP = DisplayNameEffect.POP;
object2[POP] = 1.2;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun68342);
object[POP] = 1.2;
const env0_10 = (CreateStylesModule).createStyles(_fun68342);
value = value.memo(_fun68343);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/UsernameWithEffects.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/UsernameWithEffects.tsx');
exports.default = value;
exports.AVERAGE_FONT_WIDTH_RATIO = 0.6;
}
function _fun68342(a0, a1) { // fn#68342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8881:374, offset: 0x01c4a4dc, size: 825 bytes, params: 3, frame: 28
const value2 = PixelRatio.get();
const value3 = 0.04 * a1;
const value4 = 4 + 0.12 * a1;
const calculateStrokeWidthBinding = calculateStrokeWidth;
const binding = env0_9;
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const NEON = DisplayNameEffect.NEON;
const value5 = calculateStrokeWidthBinding(binding[NEON], a1);
const TOON = DisplayNameEffect.TOON;
const value6 = calculateStrokeWidthBinding(binding[TOON], a1);
const POP = DisplayNameEffect.POP;
const value7 = calculateStrokeWidthBinding(binding[POP], a1);
const Math = global.Math;
const value8 = Math.floor(value6 / 2) / value2;
const object3 = {};
const object4 = {};
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object4.color = WHITE;
object4.textShadowColor = a0;
object4.textShadowRadius = value4;
object4.textShadowOffset = {'width': 0, 'height': 0};
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
copyDataProperties(object4, platformUtilsModule.isIOS() ? {top: -value5 / 2, left: -value5 / 2, padding: value4,
marginVertical: -value4, marginLeft: -value4, marginRight: -value4 - value5} : {left: -value5,
paddingRight: value4, marginRight: -value4 - value5}, undefined);
object3.neon = object4;
const object8 = {position: 'relative'};
const isIOS2 = platformUtilsModule.isIOS();
const value11 = 0;
object8.top = isIOS2 ? -value7 / 2 : value11;
const moduleValue3 = platformUtilsModule;
object8.left = moduleValue3.isIOS() ? -value7 / 2 : value11;
const moduleValue4 = platformUtilsModule;
object8.marginRight = moduleValue4.isIOS() ? -value7 : value11;
object3.popContainer = object8;
const object9 = {color: a0, position: 'absolute'};
const isIosFabric2 = (require(4020) /* metro dependency 4020: FabricUtils */).isIosFabric();
const object11 = {};
const value15 = 1.2 + value3;
if (isIosFabric2) {
object11.top = value15;
} else {
object11.transform = [{translateY: value15}];
}
copyDataProperties(object9, object11, undefined);
object3.popBackLayer = object9;
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.popFrontLayer = {color: WHITE};
const object12 = {};
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object12.color = WHITE;
const moduleValue6 = platformUtilsModule;
object12.top = moduleValue6.isIOS() ? -value6 / 2 : value11;
const moduleValue7 = platformUtilsModule;
object12.left = moduleValue7.isIOS() ? -value6 / 2 : -value8;
const value = platformUtilsModule;
object12.marginRight = value.isIOS() ? -value6 : -value8;
object3.toon = object12;
return object3;
}
function _fun68343(a0) { // fn#68343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8881:1285, offset: 0x01c4a815, size: 2273 bytes, params: 2, frame: 45
var lineHeight;
var r15;
var r12;
var r8;
var r18;
var r21;
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
var Math;
var ceil;
var items2;
var items4;
var processColorBinding;
var items5;
var light2;
var light1;
var value23;
var value24;
var value25;
var value26;
var Text;
var items7;
var value28;
var value29;
var PerLetterEffect;
var object2;
var nodeText;
var object3;
const userId = a0.userId;
const guildId = a0.guildId;
const userName = a0.userName;
const effectDisplayType = a0.effectDisplayType;
const value = undefined;
const r14 = effectDisplayType !== value ? effectDisplayType : (require(8697) /* metro dependency 8697: types */).EffectDisplayType.STATIC;
const pendingDisplayNameStyles = a0.pendingDisplayNameStyles;
const defaultColor = a0.defaultColor;
const customFontLineHeight = a0.customFontLineHeight;
const object4 = {'userId': 0, 'guildId': 0, 'userName': 0, 'effectDisplayType': 0, 'pendingDisplayNameStyles': 0,
'defaultColor': 0, 'customFontLineHeight': 0};
const value3 = null;
silentSetPrototypeOf(object4, value3, undefined);
const value4 = copyDataProperties({}, a0, object4, undefined);
const value6 = (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: userId,
guildId: guildId, pendingDisplayNameStyles: pendingDisplayNameStyles});
const value8 = (require(1888) /* metro dependency 1888: DisplayNameStylesUtils */).applyFlywheelViewingFallback(value6,
(require(8698) /* metro dependency 8698: DisplayNameStylesFlywheelExperiment */).useIsDisplayNameStylesFlywheelViewersEnabled('UsernameWithEffects'));
const value9 = (require(4636) /* metro dependency 4636: useDisplayNameStylesEnabled */).useDisplayNameStylesEnabled({location: 'UsernameWithEffects'});
const value10 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: value8});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
let useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value11 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]);
const moduleValue6 = useTokenModule;
useToken = moduleValue6.useToken;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const value12 = Reflect.apply(useToken, moduleValue6, [WHITE]);
const value13 = (require(8700) /* metro dependency 8700: useDisplayNameStylesAccessibleColors */).useDisplayNameStylesAccessibleColors({displayNameStyles: value8,
backgroundColor: value11});
let r17 = value13.length > 0 ? value13[0] : value;
const effectId = value3 == value8 ? value : value8.effectId;
let r16 = value3 != effectId ? effectId : (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID;
const r23 = value3 != r17 ? (require(1888) /* metro dependency 1888: DisplayNameStylesUtils */).generateColorVariants(r17) : value3;
const value15 = 16;
const TextStyleSheet = require(dependencyMap[value15]).TextStyleSheet;
let property = TextStyleSheet[value4.variant];
const fontSize = value3 == property ? value : property.fontSize;
const r11 = value3 != fontSize ? fontSize : value15;
if (value3 != value10) {
if (value3 != customFontLineHeight) {
r15 = customFontLineHeight;
function _fun68342(a0, a1) { // fn#68342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8881:374, offset: 0x01c4a4dc, size: 825 bytes, params: 3, frame: 28
const value2 = PixelRatio.get();
const value3 = 0.04 * a1;
const value4 = 4 + 0.12 * a1;
const calculateStrokeWidthBinding = calculateStrokeWidth;
const binding = env0_9;
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
const NEON = DisplayNameEffect.NEON;
const value5 = calculateStrokeWidthBinding(binding[NEON], a1);
const TOON = DisplayNameEffect.TOON;
const value6 = calculateStrokeWidthBinding(binding[TOON], a1);
const POP = DisplayNameEffect.POP;
const value7 = calculateStrokeWidthBinding(binding[POP], a1);
const Math = global.Math;
const value8 = Math.floor(value6 / 2) / value2;
const object = {};
const object2 = {};
let WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.color = WHITE;
object2.textShadowColor = a0;
object2.textShadowRadius = value4;
object2.textShadowOffset = {'width': 0, 'height': 0};
copyDataProperties(object2, PlatformUtilsModule.isIOS() ? {top: -value5 / 2, left: -value5 / 2, padding: value4,
marginVertical: -value4, marginLeft: -value4, marginRight: -value4 - value5} : {left: -value5,
paddingRight: value4, marginRight: -value4 - value5}, undefined);
object.neon = object2;
const object5 = {position: 'relative'};
const isIOS2 = PlatformUtilsModule.isIOS();
const value11 = 0;
object5.top = isIOS2 ? -value7 / 2 : value11;
object5.left = PlatformUtilsModule.isIOS() ? -value7 / 2 : value11;
object5.marginRight = PlatformUtilsModule.isIOS() ? -value7 : value11;
object.popContainer = object5;
const object6 = {color: a0, position: 'absolute'};
const isIosFabric2 = (FabricUtilsModule).isIosFabric();
const object7 = {};
const value15 = 1.2 + value3;
if (isIosFabric2) {
object7.top = value15;
} else {
Math = global.Math;
ceil = Math.ceil;
property = require(dependencyMap[value15]).TextStyleSheet[value4.variant];
lineHeight = value3 == property ? value : property.lineHeight;
r15 = Reflect.apply(ceil, Math,
[(value3 != lineHeight ? lineHeight : 20) * (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).CUSTOM_FONT_LINE_HEIGHT_CORRECTION]);
object7.transform = [{translateY: value15}];
}
r12 = r15;
} else {
r12 = value;
copyDataProperties(object6, object7, undefined);
object.popBackLayer = object6;
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object.popFrontLayer = {color: WHITE};
const object10 = {};
WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object10.color = WHITE;
object10.top = PlatformUtilsModule.isIOS() ? -value6 / 2 : value11;
object10.left = PlatformUtilsModule.isIOS() ? -value6 / 2 : -value8;
object10.marginRight = PlatformUtilsModule.isIOS() ? -value6 : -value8;
object.toon = object10;
return object;
}
property = env0_9[r16];
const r20 = value3 != property ? calculateStrokeWidth(property, r11) : value;
const main = value3 == r23 ? value : r23.main;
const value19 = '';
let r19 = value3 != main ? main : value19;
const styles = useStyles(r19, r11);
const value20 = env0_3.useMemo(_fun68344, [userName, r11]);
if (value9) {
if (value3 == value6) {
return ((Text) => <Text {...value4} {...{['color']: defaultColor}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
function _fun68343(a0) { // fn#68343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8881:1285, offset: 0x01c4a815, size: 2273 bytes, params: 2, frame: 45
var lineHeight;
var r15;
var r12;
var r8;
var r18;
var r21;
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
var Math;
var ceil;
var items2;
var items4;
var processColorBinding;
var items5;
var light2;
var light1;
var value23;
var value24;
var value25;
var value26;
var Text;
var items7;
var value28;
var value29;
var PerLetterEffect;
var object;
var nodeText;
var object5;
const userId = a0.userId;
const guildId = a0.guildId;
const userName = a0.userName;
const effectDisplayType = a0.effectDisplayType;
const value = undefined;
const r14 = effectDisplayType !== value ? effectDisplayType : (require(8697) /* metro dependency 8697: types */).EffectDisplayType.STATIC;
const pendingDisplayNameStyles = a0.pendingDisplayNameStyles;
const defaultColor = a0.defaultColor;
const customFontLineHeight = a0.customFontLineHeight;
const object6 = {'userId': 0, 'guildId': 0, 'userName': 0, 'effectDisplayType': 0, 'pendingDisplayNameStyles': 0,
'defaultColor': 0, 'customFontLineHeight': 0};
const value3 = null;
silentSetPrototypeOf(object6, value3, undefined);
const value4 = copyDataProperties({}, a0, object6, undefined);
const value6 = (UseDisplayNameStyles)({userId: userId,
guildId: guildId, pendingDisplayNameStyles: pendingDisplayNameStyles});
const value8 = (require(1888) /* metro dependency 1888: DisplayNameStylesUtils */).applyFlywheelViewingFallback(value6,
(DisplayNameStylesFlywheelExperimentModule).useIsDisplayNameStylesFlywheelViewersEnabled('UsernameWithEffects'));
const value9 = (UseDisplayNameStylesEnabledModule).useDisplayNameStylesEnabled({location: 'UsernameWithEffects'});
const value10 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: value8});
let useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const value11 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOW]);
useToken = UseTokenModule.useToken;
const WHITE = (Native).colors.WHITE;
const value12 = Reflect.apply(useToken, UseTokenModule, [WHITE]);
const value13 = (UseDisplayNameStylesAccessibleColorsModule).useDisplayNameStylesAccessibleColors({displayNameStyles: value8,
backgroundColor: value11});
let r17 = value13.length > 0 ? value13[0] : value;
const effectId = value3 == value8 ? value : value8.effectId;
let r16 = value3 != effectId ? effectId : (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID;
const r23 = value3 != r17 ? (require(1888) /* metro dependency 1888: DisplayNameStylesUtils */).generateColorVariants(r17) : value3;
const value15 = 16;
const TextStyleSheet = require(dependencyMap[value15]).TextStyleSheet;
let property = TextStyleSheet[value4.variant];
const fontSize = value3 == property ? value : property.fontSize;
const r11 = value3 != fontSize ? fontSize : value15;
if (value3 != value10) {
if (value3 != customFontLineHeight) {
r15 = customFontLineHeight;
} else {
Math = global.Math;
ceil = Math.ceil;
property = require(dependencyMap[value15]).TextStyleSheet[value4.variant];
lineHeight = value3 == property ? value : property.lineHeight;
r15 = Reflect.apply(ceil, Math,
[(value3 != lineHeight ? lineHeight : 20) * (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).CUSTOM_FONT_LINE_HEIGHT_CORRECTION]);
}
r12 = r15;
} else {
r12 = value;
}
if (r14 === (require(8697) /* metro dependency 8697: types */).EffectDisplayType.PLAIN) {
return ((Text) => <Text {...value4} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [value4.style,
value3 != value10 && ({fontFamily: value10,
lineHeight: r12})]}} {...{['color']: defaultColor}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
if (value3 == r23) {
return ((Text) => <Text {...value4} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [value4.style,
value3 != value10 && ({fontFamily: value10,
lineHeight: r12})]}} {...{['color']: defaultColor}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
items2 = [value4.style];
items2[1] = value3 != value10 && ({fontFamily: value10, lineHeight: r12});
if (r16 === DisplayNameEffect.GUMMY) {
PerLetterEffect = importDefault(8703) /* metro dependency 8703: PerLetterEffect */;
object2 = {};
nodeText = (require(3863) /* metro dependency 3863: getNodeText */).getNodeText(userName);
object2.name = value3 != nodeText ? nodeText : value19;
object2.textStyle = items2;
object3 = {};
copyDataProperties(object3, value4, object4);
object3['gradientColors'] = value;
object3['gradientWidth'] = value20;
object3['gradientMode'] = 'clamp';
object3['gradientAngle'] = value;
object3['textStrokeWidth'] = value;
object3['textStrokeColor'] = value;
object2.textProps = object3;
object2.colors = value13;
return <PerLetterEffect {...object2} />;
}
if (DisplayNameEffect.GRADIENT === r16) {
value29 = value13.map(function(a0) {
return processColor(a0);
});
return ((Text) => <Text {...value4} {...{['gradientColors']: value29.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish)}} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [items2]}} {...{['gradientAngle']: 45}} {...{['textStrokeWidth']: value}} {...{['textStrokeColor']: value}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
if (DisplayNameEffect.PRISM === r16) {
value29 = value13.map(_fun68345);
return ((Text) => <Text {...value4} {...{['gradientColors']: value29.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish)}} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [items2]}} {...{['gradientAngle']: 45}} {...{['textStrokeWidth']: value}} {...{['textStrokeColor']: value}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
if (DisplayNameEffect.NEON === r16) {
value28 = processColor(value3 == r23 ? value : r23.neonStroke);
return ((Text) => <Text {...value4} {...{['gradientColors']: value}} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [[items2,
styles.neon]]}} {...{['gradientAngle']: value}} {...{['textStrokeWidth']: r20}} {...{['textStrokeColor']: value3 != value28 ? value28 : value}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
if (DisplayNameEffect.POP === r16) {
value25 = processColor(value3 == r23 ? value : r23.dark2);
value26 = processColor(value3 == r23 ? value : r23.main);
if (value3 != r23) {
var viewBindingProps = {style: styles.popContainer};
property = env0_9[r16];
const r20 = value3 != property ? calculateStrokeWidth(property, r11) : value;
const main = value3 == r23 ? value : r23.main;
const value19 = '';
let r19 = value3 != main ? main : value19;
const styles = useStyles(r19, r11);
const value20 = env0_3.useMemo(_fun68344, [userName, r11]);
if (value9) {
if (value3 == value6) {
return ((Text) => <Text {...value4} {...{['color']: defaultColor}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
if (r14 === (require(8697) /* metro dependency 8697: types */).EffectDisplayType.PLAIN) {
return ((Text) => <Text {...value4} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [value4.style,
value3 != value10 && ({fontFamily: value10,
lineHeight: r12})]}} {...{['color']: defaultColor}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
if (value3 == r23) {
return ((Text) => <Text {...value4} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [value4.style,
value3 != value10 && ({fontFamily: value10,
lineHeight: r12})]}} {...{['color']: defaultColor}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
items2 = [value4.style];
items2[1] = value3 != value10 && ({fontFamily: value10, lineHeight: r12});
if (r16 === DisplayNameEffect.GUMMY) {
PerLetterEffect = importDefault(8703) /* metro dependency 8703: PerLetterEffect */;
object = {};
nodeText = (require(3863) /* metro dependency 3863: getNodeText */).getNodeText(userName);
object.name = value3 != nodeText ? nodeText : value19;
object.textStyle = items2;
object5 = {};
copyDataProperties(object5, value4, object6);
object5['gradientColors'] = value;
object5['gradientWidth'] = value20;
object5['gradientMode'] = 'clamp';
object5['gradientAngle'] = value;
object5['textStrokeWidth'] = value;
object5['textStrokeColor'] = value;
object.textProps = object5;
object.colors = value13;
return <PerLetterEffect {...object} />;
}
if (DisplayNameEffect.GRADIENT === r16) {
value29 = value13.map(function(a0) {
return processColor(a0);
});
return ((Text) => <Text {...value4} {...{['gradientColors']: value29.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish)}} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [items2]}} {...{['gradientAngle']: 45}} {...{['textStrokeWidth']: value}} {...{['textStrokeColor']: value}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
if (DisplayNameEffect.PRISM === r16) {
value29 = value13.map(_fun68345);
return ((Text) => <Text {...value4} {...{['gradientColors']: value29.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish)}} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [items2]}} {...{['gradientAngle']: 45}} {...{['textStrokeWidth']: value}} {...{['textStrokeColor']: value}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
if (DisplayNameEffect.NEON === r16) {
value28 = processColor(value3 == r23 ? value : r23.neonStroke);
return ((Text) => <Text {...value4} {...{['gradientColors']: value}} {...{['gradientWidth']: value20}} {...{['gradientMode']: 'clamp'}} {...{['style']: [[items2,
styles.neon]]}} {...{['gradientAngle']: value}} {...{['textStrokeWidth']: r20}} {...{['textStrokeColor']: value3 != value28 ? value28 : value}}>{userName}</Text>)(require(dependencyMap[value15]).Text);
}
if (DisplayNameEffect.POP === r16) {
value25 = processColor(value3 == r23 ? value : r23.dark2);
value26 = processColor(value3 == r23 ? value : r23.main);
if (value3 != r23) {
var viewBindingProps = {style: styles.popContainer};
Text = require(dependencyMap[value15]).Text;
items7 = [
<Text
{...value4}
{...{['textStrokeWidth']: r20}}
{...{['textStrokeColor']: value3 != value26 ? value26 : value}}
{...{['style']: [items2, styles.popBackLayer]}}
>
{userName}
</Text>,
];
Text = require(dependencyMap[value15]).Text;
items7[1] = (
<Text
{...value4}
{...{['textStrokeWidth']: r20}}
{...{['textStrokeColor']: value3 != value25 ? value25 : value}}
{...{['style']: [items2, styles.popFrontLayer]}}
>
{userName}
</Text>
);
return (
<View {...viewBindingProps}>
{items7}
</View>
);
}
r16 = items2;
r17 = value;
r18 = value;
r19 = value;
r21 = value;
Text = require(dependencyMap[value15]).Text;
items7 = [<Text {...value4} {...{['textStrokeWidth']: r20}} {...{['textStrokeColor']: value3 != value26 ? value26 : value}} {...{['style']: [items2,
styles.popBackLayer]}}>{userName}</Text>];
Text = require(dependencyMap[value15]).Text;
items7[1] = <Text {...value4} {...{['textStrokeWidth']: r20}} {...{['textStrokeColor']: value3 != value25 ? value25 : value}} {...{['style']: [items2,
styles.popFrontLayer]}}>{userName}</Text>;
return (
<View {...viewBindingProps}>
{items7}
</View>
<Text
{...value4}
{...{['gradientColors']: r21}}
{...{['gradientWidth']: value20}}
{...{['gradientMode']: 'clamp'}}
{...{['style']: [r16]}}
{...{['gradientAngle']: r19}}
{...{['textStrokeWidth']: r18}}
{...{['textStrokeColor']: r17}}
>
{userName}
</Text>
);
}
r16 = items2;
r17 = value;
r18 = value;
r19 = value;
r21 = value;
if (DisplayNameEffect.TOON === r16) {
items4 = [items2];
items4[1] = styles.toon;
processColorBinding = processColor;
items5 = [processColorBinding(value12)];
light2 = r23.light2;
items5[1] = processColorBinding(light2);
light2 = r23.light2;
items5[2] = processColorBinding(light2);
light1 = r23.light1;
items5[3] = processColorBinding(light1);
light1 = r23.light1;
items5[4] = processColorBinding(light1);
items5[5] = processColorBinding(r23.main);
value23 = processColorBinding(r23.toonStroke);
r8 = value3 != value23 ? value23 : value;
value24 = 90;
r16 = items4;
r17 = r8;
r18 = r20;
r19 = value24;
r21 = items5;
} else {
(require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID;
r16 = [items2, {color: r17}];
r17 = value;
r18 = value;
r19 = value;
r21 = value;
}
Text = require(dependencyMap[value15]).Text;
return (
<Text
@@ -280,64 +334,27 @@ function _fun68343(a0) { // fn#68343, source: /ci/build/discord/discord/discord_
</Text>
);
}
if (DisplayNameEffect.TOON === r16) {
items4 = [items2];
items4[1] = styles.toon;
processColorBinding = processColor;
items5 = [processColorBinding(value12)];
light2 = r23.light2;
items5[1] = processColorBinding(light2);
light2 = r23.light2;
items5[2] = processColorBinding(light2);
light1 = r23.light1;
items5[3] = processColorBinding(light1);
light1 = r23.light1;
items5[4] = processColorBinding(light1);
items5[5] = processColorBinding(r23.main);
value23 = processColorBinding(r23.toonStroke);
r8 = value3 != value23 ? value23 : value;
value24 = 90;
r16 = items4;
r17 = r8;
r18 = r20;
r19 = value24;
r21 = items5;
} else {
(require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID;
r16 = [items2, {color: r17}];
r17 = value;
r18 = value;
r19 = value;
r21 = value;
}
Text = require(dependencyMap[value15]).Text;
return (
<Text
{...value4}
{...{['gradientColors']: r21}}
{...{['gradientWidth']: value20}}
{...{['gradientMode']: 'clamp'}}
{...{['style']: [r16]}}
{...{['gradientAngle']: r19}}
{...{['textStrokeWidth']: r18}}
{...{['textStrokeColor']: r17}}
>
<Text {...value4} {...{['color']: defaultColor}}>
{userName}
</Text>
);
function _fun68344() { // fn#68344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8881:2465, offset: 0x01c4b0f6, size: 94 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = undefined;
const nodeText = (GetNodeTextModule).getNodeText(userName);
return ((nodeText == null ? value : nodeText.length) ?? 10) * env0_1 * 0.6;
}
function _fun68345(a0) { // fn#68345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8881:3225, offset: 0x00dfcfe0, size: 19 bytes, params: 2, frame: 11
return processColor(a0);
}
}
Text = require(dependencyMap[value15]).Text;
return (
<Text {...value4} {...{['color']: defaultColor}}>
{userName}
</Text>
);
}
function _fun68344() { // fn#68344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8881:2465, offset: 0x01c4b0f6, size: 94 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = undefined;
const nodeText = (require(3863) /* metro dependency 3863: getNodeText */).getNodeText(userName);
return ((nodeText == null ? value : nodeText.length) ?? 10) * env0_1 * 0.6;
}
global.__d(_fun68340, 8696, [31, 27, 33, 1890, 4501, 697, 478, 4020, 8697, 4635, 8698, 1888, 4636, 8699, 3860, 8700,
4573, 3863, 8703, 1360,
2]) /* metro module 8696, dependencies: [31, 27, 33, 1890, 4501, 697, 478, 4020, 8697, 4635, 8698, 1888, 4636, 8699, 3860, 8700, 4573, 3863, 8703, 1360, 2] */;
@@ -1,26 +1,29 @@
/* Metro module 10611; source: modules/display_name_styles/native/createDisplayNameStylesMobile.tsx; dependencies: [4502, 1878, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun81761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10797:6, offset: 0x01edd37d, size: 122 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/createDisplayNameStylesMobile.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/createDisplayNameStylesMobile.tsx');
exports.createDisplayNameStylesMobile = createDisplayNameStylesMobile;
}
function createDisplayNameStylesMobile(a0, a1) { // fn#81762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10797:250, offset: 0x01edd3f7, size: 142 bytes, params: 3, frame: 15
const displayNameStylesEnabled = AccessibilityStore.displayNameStylesEnabled;
let value = UserStore.getCurrentUser();
let displayNameStyles = a0.displayNameStyles;
let r1 = value != null && value.id === a0.id;
displayNameStyles = r1 ? value.displayNameStyles : displayNameStyles;
value = undefined;
r1 = (a1 == null || a1.displayNameStyles == null ? value : a1.displayNameStyles.fontId) ?? (displayNameStyles == null ? value : displayNameStyles.fontId);
if (r1 != null) {
if (displayNameStylesEnabled) {
return {fontId: r1};
function createDisplayNameStylesMobile(a0, a1) { // fn#81762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10797:250, offset: 0x01edd3f7, size: 142 bytes, params: 3, frame: 15
const displayNameStylesEnabled = AccessibilityStore.displayNameStylesEnabled;
let value = UserStore.getCurrentUser();
let displayNameStyles = a0.displayNameStyles;
let r1 = value != null && value.id === a0.id;
displayNameStyles = r1 ? value.displayNameStyles : displayNameStyles;
value = undefined;
r1 = (a1 == null || a1.displayNameStyles == null ? value : a1.displayNameStyles.fontId) ?? (displayNameStyles == null ? value : displayNameStyles.fontId);
if (r1 != null) {
if (displayNameStylesEnabled) {
return {fontId: r1};
}
}
return value;
}
return value;
}
global.__d(_fun81761, 10611, [4502, 1878, 2]) /* metro module 10611, dependencies: [4502, 1878, 2] */;
@@ -1,60 +1,65 @@
/* Metro module 8703; source: modules/display_name_styles/native/effects/PerLetterEffect.tsx; dependencies: [31, 27, 33, 4501, 8704, 8705, 4573, 2] */
import Module08704 from '../../../../by-id/module-08704.js'; /* Metro dependency 8704 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun68365(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8888:6, offset: 0x01c4bf5f, size: 215 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_4 = value.View;
const env0_5 = value.Text;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {overflow: 'hidden'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/effects/PerLetterEffect.tsx');
const env0_7 = (CreateStylesModule).createStyles({container: {overflow: 'hidden'}});
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/effects/PerLetterEffect.tsx');
exports.default = PerLetterEffect;
}
function PerLetterEffect({name, textStyle, textProps, colors}) { // fn#68366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8888:311, offset: 0x01c4c036, size: 223 bytes, params: 2, frame: 21
const styles = useStyles();
const value2 = ReactModule.useMemo(_fun68367, [name, colors]);
const Text = (TextModule).Text;
return (
<View style={styles.container}>
<Text
{...textProps}
{...{['textBreakStrategy']: 'simple'}}
{...{['accessible']: true}}
{...{['accessibilityLabel']: textProps.accessibilityLabel ?? name}}
{...{['style']: textStyle}}
>
{value2}
</Text>
</View>
);
function _fun68367() { // fn#68367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8888:404, offset: 0x01c4c115, size: 94 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
const env0_0 = (Module08704)();
value = Reflect.apply((require(8705) /* metro dependency 8705: StringUtils */).splitGraphemes, value, [name]);
return value.map(_fun68368);
function _fun68368(a0, a1) { // fn#68368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8888:468, offset: 0x01c4c173, size: 179 bytes, params: 3, frame: 19
let binding = env0_0;
binding.lastIndex = 0;
const r1 = binding.test(a0) || a0.trim().length === 0;
const colorsBinding = colors;
const value5 = undefined;
const r7 = colorsBinding != null && colors.length > 0 ? r1 ? value5 : colors[env0_1 % colors.length] : value5;
if (!r1) {
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
return (
<Text style={r7 != null ? {color: r7} : value5} key={a1}>
{a0}
</Text>
);
}
function PerLetterEffect({name, textStyle, textProps, colors}) { // fn#68366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8888:311, offset: 0x01c4c036, size: 223 bytes, params: 2, frame: 21
const styles = useStyles();
const value2 = env0_3.useMemo(_fun68367, [name, colors]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.container}>
<Text
{...textProps}
{...{['textBreakStrategy']: 'simple'}}
{...{['accessible']: true}}
{...{['accessibilityLabel']: textProps.accessibilityLabel ?? name}}
{...{['style']: textStyle}}
>
{value2}
</Text>
</View>
);
}
}
function _fun68367() { // fn#68367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8888:404, offset: 0x01c4c115, size: 94 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
const env0_0 = (importDefault(8704) /* metro dependency 8704 */)();
value = Reflect.apply((require(8705) /* metro dependency 8705: StringUtils */).splitGraphemes, value, [name]);
return value.map(_fun68368);
}
function _fun68368(a0, a1) { // fn#68368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8888:468, offset: 0x01c4c173, size: 179 bytes, params: 3, frame: 19
let binding = env0_0;
binding.lastIndex = 0;
const r1 = binding.test(a0) || a0.trim().length === 0;
const colorsBinding = colors;
const value5 = undefined;
const r7 = colorsBinding != null && colors.length > 0 ? r1 ? value5 : colors[env0_1 % colors.length] : value5;
if (!r1) {
binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
return (
<Text style={r7 != null ? {color: r7} : value5} key={a1}>
{a0}
</Text>
);
}
global.__d(_fun68365, 8703, [31, 27, 33, 4501, 8704, 8705, 4573,
2]) /* metro module 8703, dependencies: [31, 27, 33, 4501, 8704, 8705, 4573, 2] */;
@@ -1,59 +1,63 @@
/* Metro module 8699; source: modules/display_name_styles/native/useDisplayNameStylesFont.tsx; dependencies: [1889, 1891, 4636, 8698, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DisplayNameStylesConstantsModule from '../DisplayNameStylesConstants.tsx'; /* Metro dependency 1889 */
import * as DisplayNameFontModule from '../../../external/discord_common/js/shared/shared-constants/DisplayNameFont.tsx'; /* Metro dependency 1891 */
function _fun68352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8884:6, offset: 0x01c4b417, size: 500 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(1889) /* metro dependency 1889: DisplayNameStylesConstants */).FLYWHEEL_FONTS;
object2 = {};
const DisplayNameFont = (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont;
object = {};
const DisplayNameFont = (DisplayNameFontModule).DisplayNameFont;
const CHERRY_BOMB = DisplayNameFont.CHERRY_BOMB;
object2[CHERRY_BOMB] = 'Sakura-Normal';
object[CHERRY_BOMB] = 'Sakura-Normal';
const CHICLE = DisplayNameFont.CHICLE;
object2[CHICLE] = 'Jellybean-Normal';
object[CHICLE] = 'Jellybean-Normal';
const MUSEO_MODERNO = DisplayNameFont.MUSEO_MODERNO;
object2[MUSEO_MODERNO] = 'Modern-Medium';
object[MUSEO_MODERNO] = 'Modern-Medium';
const NEO_CASTEL = DisplayNameFont.NEO_CASTEL;
object2[NEO_CASTEL] = 'Medieval-Normal';
object[NEO_CASTEL] = 'Medieval-Normal';
const PIXELIFY = DisplayNameFont.PIXELIFY;
object2[PIXELIFY] = '8Bit-Normal';
object[PIXELIFY] = '8Bit-Normal';
const SINISTRE = DisplayNameFont.SINISTRE;
object2[SINISTRE] = 'Vampyre-Normal';
object[SINISTRE] = 'Vampyre-Normal';
const ZILLA_SLAB = DisplayNameFont.ZILLA_SLAB;
object2[ZILLA_SLAB] = 'Tempo-SemiBold';
object[ZILLA_SLAB] = 'Tempo-SemiBold';
const PLAYPEN_SANS = DisplayNameFont.PLAYPEN_SANS;
object2[PLAYPEN_SANS] = 'PlaypenSans-Bold';
object[PLAYPEN_SANS] = 'PlaypenSans-Bold';
const ORBITRON = DisplayNameFont.ORBITRON;
object2[ORBITRON] = 'Orbitron-Bold';
object[ORBITRON] = 'Orbitron-Bold';
const NEW_ROCKER = DisplayNameFont.NEW_ROCKER;
object2[NEW_ROCKER] = 'NewRocker-Normal';
object[NEW_ROCKER] = 'NewRocker-Normal';
const KALAM = DisplayNameFont.KALAM;
object2[KALAM] = 'Kalam-Bold';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/native/useDisplayNameStylesFont.tsx');
object[KALAM] = 'Kalam-Bold';
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/native/useDisplayNameStylesFont.tsx');
exports.CUSTOM_FONT_LINE_HEIGHT_CORRECTION = 1.1;
exports.DISPLAY_NAME_STYLES_FONT_FAMILY_MAP = object2;
exports.DISPLAY_NAME_STYLES_FONT_FAMILY_MAP = object;
exports.useDisplayNameStylesFont = useDisplayNameStylesFont;
}
function useDisplayNameStylesFont({displayNameStyles}) { // fn#68353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8884:912, offset: 0x01c4b60b, size: 133 bytes, params: 2, frame: 18
var includes;
var fontId;
var binding;
if ((require(4636) /* metro dependency 4636: useDisplayNameStylesEnabled */).useDisplayNameStylesEnabled({location: 'useDisplayNameStylesFont-native'})) {
if (displayNameStyles == null) {
return undefined;
function useDisplayNameStylesFont({displayNameStyles}) { // fn#68353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8884:912, offset: 0x01c4b60b, size: 133 bytes, params: 2, frame: 18
var includes;
var fontId;
var binding;
if ((require(4636) /* metro dependency 4636: useDisplayNameStylesEnabled */).useDisplayNameStylesEnabled({location: 'useDisplayNameStylesFont-native'})) {
if (displayNameStyles == null) {
return undefined;
}
if ((require(8698) /* metro dependency 8698: DisplayNameStylesFlywheelExperiment */).useIsDisplayNameStylesFlywheelViewersEnabled('useDisplayNameStylesFont-native')) {
return env0_3[displayNameStyles.fontId];
}
includes = FLYWHEEL_FONTS.includes;
fontId = displayNameStyles.fontId;
if (Reflect.apply(includes, FLYWHEEL_FONTS, [fontId])) {
return undefined;
}
binding = env0_3;
fontId = displayNameStyles.fontId;
return binding[fontId];
}
if ((require(8698) /* metro dependency 8698: DisplayNameStylesFlywheelExperiment */).useIsDisplayNameStylesFlywheelViewersEnabled('useDisplayNameStylesFont-native')) {
return env0_3[displayNameStyles.fontId];
}
includes = FLYWHEEL_FONTS.includes;
fontId = displayNameStyles.fontId;
if (Reflect.apply(includes, FLYWHEEL_FONTS, [fontId])) {
return undefined;
}
binding = env0_3;
fontId = displayNameStyles.fontId;
return binding[fontId];
}
}
global.__d(_fun68352, 8699, [1889, 1891, 4636, 8698,
2]) /* metro module 8699, dependencies: [1889, 1891, 4636, 8698, 2] */;
+11 -8
View File
@@ -1,16 +1,19 @@
/* Metro module 8697; source: modules/display_name_styles/types.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun68346(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8882:6, offset: 0x01c4b154, size: 214 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const object = {PLAIN: 0};
object[0] = 'PLAIN';
object.STATIC = 1;
object[1] = 'STATIC';
object.ANIMATED = 2;
object[2] = 'ANIMATED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/types.tsx');
const object2 = {PLAIN: 0};
object2[0] = 'PLAIN';
object2.STATIC = 1;
object2[1] = 'STATIC';
object2.ANIMATED = 2;
object2[2] = 'ANIMATED';
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/types.tsx');
exports.DisplayNameStyleColorPreset = {TEAL: '#18b491', CYAN: '#3598db', VIOLET: '#995ab8', PINK: '#e91d63',
YELLOW: '#f1c410', ORANGE: '#e74c3c'};
exports.EffectDisplayType = object;
exports.EffectDisplayType = object2;
}
global.__d(_fun68346, 8697, [2]) /* metro module 8697, dependencies: [2] */;