196 lines
10 KiB
TypeScript
196 lines
10 KiB
TypeScript
/* Metro module 4293; source: stores/CertifiedDeviceStore.tsx; dependencies: [6, 7, 15, 17, 18, 4291, 587, 22, 566, 694, 2] */
|
|
function _fun36360(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:6, offset: 0x0108ac47, size: 327 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_8 = (require(4291) /* metro dependency 4291: Constants */).DeviceTypes;
|
|
const env0_9 = {};
|
|
const env0_10 = {};
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
let value = _fun36368(Store);
|
|
value.displayName = 'CertifiedDeviceStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{CERTIFIED_DEVICES_SET: CERTIFIED_DEVICES_SET_36391});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/CertifiedDeviceStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_36361() { // fn#36361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:170, offset: 0x0108ad8e, 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_36361_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function getOrElse(a0, a1, a2) { // fn#36364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:406, offset: 0x0108adec, size: 35 bytes, params: 4, frame: 12
|
|
const value = a1;
|
|
const property = env0_10[a0];
|
|
return property == null ? value : a2(property);
|
|
}
|
|
|
|
function updateDevicesForApplication(a0, a1) { // fn#36365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:465, offset: 0x0108ae0f, size: 67 bytes, params: 3, frame: 15
|
|
const property = env0_9[a0];
|
|
if (property != null) {
|
|
property.forEach(_fun36366);
|
|
}
|
|
env0_9[a0] = a1;
|
|
a1.forEach(_fun36367);
|
|
}
|
|
|
|
function _fun36368(a0) { // fn#36368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:597, offset: 0x0108ae7c, size: 335 bytes, params: 2, frame: 16
|
|
const closure = CertifiedDeviceStore;
|
|
env0_7(closure, a0);
|
|
return env0_4(closure, [{key: 'initialize', value: value_36370}, {key: 'isCertified', value: value_36373},
|
|
{key: 'getCertifiedDevice', value: value_36374}, {key: 'getCertifiedDeviceName', value: function(a0, a1) {
|
|
var value = a1;
|
|
var value2 = this.getCertifiedDevice(a0);
|
|
return value2 == null ? value : '' + value2.vendor.name + ' ' + value2.model.name;
|
|
}}, {key: 'getCertifiedDeviceByType', value: value_36376}, {key: 'isHardwareMute', value: function(a0) {
|
|
return getOrElse(a0, false, _fun36379);
|
|
}}, {key: 'hasEchoCancellation', value: function(a0) {
|
|
return getOrElse(a0, false, _fun36381);
|
|
}}, {key: 'hasNoiseSuppression', value: function(a0) {
|
|
return getOrElse(a0, false, _fun36383);
|
|
}}, {key: 'hasAutomaticGainControl', value: function(a0) {
|
|
return getOrElse(a0, false, _fun36385);
|
|
}}, {key: 'getVendor', value: function(a0) {
|
|
return getOrElse(a0, null, _fun36387);
|
|
}}, {key: 'getModel', value: function(a0) {
|
|
return getOrElse(a0, null, _fun36389);
|
|
}}, {key: 'getRevision', value: value_36390}]);
|
|
}
|
|
|
|
function CERTIFIED_DEVICES_SET_36391({applicationId, devices}) { // fn#36391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:2227, offset: 0x0108b2fb, size: 89 bytes, params: 2, frame: 15
|
|
updateDevicesForApplication(applicationId, devices);
|
|
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
|
Storage.set('CertifiedDeviceStore', env0_9);
|
|
const binding = env0_11;
|
|
env0_11 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
|
|
function _fun36366({id}) { // fn#36366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:538, offset: 0x0108ae52, size: 21 bytes, params: 2, frame: 2
|
|
return delete env1_10[id];
|
|
}
|
|
|
|
function _fun36367(a0) { // fn#36367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:576, offset: 0x0108ae67, size: 21 bytes, params: 2, frame: 3
|
|
env1_10[a0.id] = a0;
|
|
return a0;
|
|
}
|
|
|
|
function value_36370() { // fn#36370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:927, offset: 0x0108b03c, size: 93 bytes, params: 1, frame: 14
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
|
|
const value2 = Storage.get('CertifiedDeviceStore');
|
|
if (value2 != null) {
|
|
(importDefault(22) /* metro dependency 22 */).forEach(value2, function(a0, a1) {
|
|
a0.forEach(_fun36372);
|
|
updateDevicesForApplication(a1, a0);
|
|
});
|
|
}
|
|
}
|
|
|
|
function value_36373(a0) { // fn#36373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1143, offset: 0x0108b0eb, size: 22 bytes, params: 2, frame: 2
|
|
return env1_10[a0] != null;
|
|
}
|
|
|
|
function value_36376(a0) { // fn#36376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1408, offset: 0x0108b153, size: 57 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
return defaultImport.find(env1_10, _fun36377);
|
|
}
|
|
|
|
function value_36378(a0) { // fn#36378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1489, offset: 0x0108b1a1, size: 30 bytes, params: 2, frame: 15
|
|
return getOrElse(a0, false, _fun36379);
|
|
}
|
|
|
|
function value_36380(a0) { // fn#36380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1603, offset: 0x0108b1e3, size: 30 bytes, params: 2, frame: 15
|
|
return getOrElse(a0, false, _fun36381);
|
|
}
|
|
|
|
function value_36382(a0) { // fn#36382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1721, offset: 0x0108b225, size: 30 bytes, params: 2, frame: 15
|
|
return getOrElse(a0, false, _fun36383);
|
|
}
|
|
|
|
function value_36384(a0) { // fn#36384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1843, offset: 0x0108b267, size: 30 bytes, params: 2, frame: 15
|
|
return getOrElse(a0, false, _fun36385);
|
|
}
|
|
|
|
function value_36386(a0) { // fn#36386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1955, offset: 0x0108b2a9, size: 30 bytes, params: 2, frame: 15
|
|
return getOrElse(a0, null, function(a0) {
|
|
return a0.vendor;
|
|
});
|
|
}
|
|
|
|
function value_36388(a0) { // fn#36388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:2030, offset: 0x0108b2d2, size: 30 bytes, params: 2, frame: 15
|
|
return getOrElse(a0, null, function(a0) {
|
|
return a0.model;
|
|
});
|
|
}
|
|
|
|
function _fun36371(a0, a1) { // fn#36371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:995, offset: 0x0108b099, size: 40 bytes, params: 3, frame: 13
|
|
a0.forEach(function(a0) {
|
|
if (a0.type === 'audioinput' && a0.hardwareMute) {
|
|
a0.hardwareMute = false;
|
|
}
|
|
});
|
|
updateDevicesForApplication(a1, a0);
|
|
}
|
|
|
|
function _fun36379(a0) { // fn#36379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1524, offset: 0x0108b1bf, size: 36 bytes, params: 2, frame: 3
|
|
const type = a0.type;
|
|
const value = environment.__proto__.__proto__;
|
|
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
|
|
return type === AUDIO_INPUT && a0.hardwareMute;
|
|
}
|
|
|
|
function _fun36381(a0) { // fn#36381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1638, offset: 0x0108b201, size: 36 bytes, params: 2, frame: 3
|
|
const type = a0.type;
|
|
const value = environment.__proto__.__proto__;
|
|
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
|
|
return type === AUDIO_INPUT && a0.echoCancellation;
|
|
}
|
|
|
|
function _fun36383(a0) { // fn#36383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1756, offset: 0x0108b243, size: 36 bytes, params: 2, frame: 3
|
|
const type = a0.type;
|
|
const value = environment.__proto__.__proto__;
|
|
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
|
|
return type === AUDIO_INPUT && a0.noiseSuppression;
|
|
}
|
|
|
|
function _fun36385(a0) { // fn#36385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4465:1878, offset: 0x0108b285, size: 36 bytes, params: 2, frame: 3
|
|
const type = a0.type;
|
|
const value = environment.__proto__.__proto__;
|
|
const AUDIO_INPUT = DeviceTypes.AUDIO_INPUT;
|
|
return type === AUDIO_INPUT && a0.automaticGainControl;
|
|
}
|
|
|