139 lines
8.2 KiB
TypeScript
139 lines
8.2 KiB
TypeScript
/* Metro module 5119; source: modules/parent_tools/FamilyCenterControlledSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1350, 1314, 566, 694, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as Preloaded_user_settingsModule from '../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/preloaded_user_settings.tsx'; /* Metro dependency 1314 */
|
|
import * as UserSettingsUtilsModule from '../user_settings/UserSettingsUtils.tsx'; /* Metro dependency 1350 */
|
|
|
|
function _fun44876(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:6, offset: 0x0117afe8, size: 333 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let env0_8 = {};
|
|
let env0_9 = {};
|
|
const Store = (Flux).Store;
|
|
let value = _fun44880(Store);
|
|
value.displayName = 'FamilyCenterControlledSettingsStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{FAMILY_CENTER_TEEN_SETTINGS_FETCH_START: function() {
|
|
env0_7 = true;
|
|
}, FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS: FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS,
|
|
FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS: FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS,
|
|
FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS: FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS, LOGOUT: function() {
|
|
env0_8 = {};
|
|
env0_9 = {};
|
|
env0_7 = false;
|
|
}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/FamilyCenterControlledSettingsStore.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_44877() { // fn#44877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:148, offset: 0x0117b135, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_44877_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun44880(a0) { // fn#44880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:366, offset: 0x0117b193, size: 189 bytes, params: 2, frame: 16
|
|
const FamilyCenterControlledSettingsStore2 = FamilyCenterControlledSettingsStore;
|
|
Inherits(FamilyCenterControlledSettingsStore2, a0);
|
|
return CreateClass(FamilyCenterControlledSettingsStore2, [{key: 'getSettings', value: value_44882},
|
|
{key: 'getControlledSettings', value: value_44883}, {key: 'hasSettingsForUser', value: value_44884},
|
|
{key: 'getConsents', value: value_44885}, {key: 'hasConsented', value: value_44886}, {key: 'isLoading',
|
|
get: get_44887}]);
|
|
function FamilyCenterControlledSettingsStore() { // fn#44881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:378, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_2(this, FamilyCenterControlledSettingsStore);
|
|
const value3 = env1_5(FamilyCenterControlledSettingsStore);
|
|
return env1_4(this, _isNativeReflectConstruct_44877() ? global.Reflect.construct(value3, arguments,
|
|
env1_5(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_44882(a0) { // fn#44882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:772, offset: 0x00ff623a, size: 16 bytes, params: 2, frame: 2
|
|
return env1_8[a0];
|
|
}
|
|
|
|
function value_44883(a0) { // fn#44883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:833, offset: 0x00ff623a, size: 16 bytes, params: 2, frame: 2
|
|
return env1_8[a0];
|
|
}
|
|
|
|
function value_44884(a0) { // fn#44884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:891, offset: 0x0117b250, size: 22 bytes, params: 2, frame: 2
|
|
return env1_8[a0] != null;
|
|
}
|
|
|
|
function value_44885(a0) { // fn#44885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:948, offset: 0x010197cf, size: 16 bytes, params: 2, frame: 2
|
|
return env1_9[a0];
|
|
}
|
|
|
|
function value_44886(a0, a1) { // fn#44886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1000, offset: 0x0117b266, size: 60 bytes, params: 3, frame: 5
|
|
if (a0 == null) {
|
|
return false;
|
|
}
|
|
const value = environment.__proto__;
|
|
const property = env1_9[a0];
|
|
return property != null && (property[a1] != null && property[a1].consented);
|
|
}
|
|
|
|
function get_44887() { // fn#44887, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
|
|
return env1_7;
|
|
}
|
|
|
|
}
|
|
|
|
function FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS({userId, settings, consents}) { // fn#44889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1367, offset: 0x0117b2af, size: 98 bytes, params: 2, frame: 16
|
|
var value;
|
|
var binding;
|
|
if (settings != null) {
|
|
binding = env0_8;
|
|
value = require(1350) /* metro dependency 1350: UserSettingsUtils */;
|
|
binding[userId] = value.b64ToPreloadedUserSettingsProto(settings);
|
|
}
|
|
if (consents != null) {
|
|
env0_9[userId] = consents;
|
|
}
|
|
}
|
|
|
|
function FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS({userId, consents}) { // fn#44890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1578, offset: 0x0117b311, size: 29 bytes, params: 2, frame: 3
|
|
env0_9[userId] = consents;
|
|
}
|
|
|
|
function FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS({userId, settings}) { // fn#44891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1693, offset: 0x0117b32e, size: 108 bytes, params: 2, frame: 20
|
|
const value2 = (UserSettingsUtilsModule).b64ToPreloadedUserSettingsProto(settings);
|
|
const binding = env0_8;
|
|
const mergeTopLevelFields = UserSettingsUtilsModule.mergeTopLevelFields;
|
|
const PreloadedUserSettings = (Preloaded_user_settingsModule).PreloadedUserSettings;
|
|
binding[userId] = Reflect.apply(mergeTopLevelFields, UserSettingsUtilsModule, [PreloadedUserSettings,
|
|
env0_8[userId], value2]);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun44876, 5119, [6, 7, 15, 17, 18, 1350, 1314, 566, 694,
|
|
2]) /* metro module 5119, dependencies: [6, 7, 15, 17, 18, 1350, 1314, 566, 694, 2] */;
|