375 lines
17 KiB
TypeScript
375 lines
17 KiB
TypeScript
/* Metro module 15750; source: modules/user_identifiers/native/IOSUserIdentifiersManager.tsx; dependencies: [5, 6, 7, 15, 17, 18, 27, 1878, 661, 477, 15751, 507, 683, 1216, 4860, 2] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
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 UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import AutomaticLifecycleManager from '../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
|
|
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun120943(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15958:6, offset: 0x0253b1d9, size: 306 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = AutomaticLifecycleManager;
|
|
value = _fun120947(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_identifiers/native/IOSUserIdentifiersManager.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_120944() { // fn#120944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15958:217, offset: 0x0253b30b, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_120944_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun120947(a0) { // fn#120947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15958:416, offset: 0x0253b36d, size: 135 bytes, params: 2, frame: 17
|
|
const IOSUserIdentifiersManager2 = IOSUserIdentifiersManager;
|
|
Inherits(IOSUserIdentifiersManager2, a0);
|
|
const env0_1 = Module00005(_fun120951);
|
|
const items2 = [{key: 'onPostConnectionOpen', value: value_120952}];
|
|
const env0_0 = Module00005(_fun120954);
|
|
items2[1] = {key: 'syncAppTransactionId', value: value_120955};
|
|
return CreateClass(IOSUserIdentifiersManager2, items2);
|
|
function IOSUserIdentifiersManager(a0) { // fn#120948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15958:428, offset: 0x0253b3f4, size: 152 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_4;
|
|
binding(this, IOSUserIdentifiersManager);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_7(IOSUserIdentifiersManager);
|
|
binding = env1_6;
|
|
if (_isNativeReflectConstruct_120944()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_7(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_120949};
|
|
return value;
|
|
function IOSUserIdentifiersManagerPOST_CONNECTION_OPEN() { // fn#120949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15958:721, owner: IOSUserIdentifiersManager.POST_CONNECTION_OPEN, offset: 0x0253b48c, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.onPostConnectionOpen();
|
|
}
|
|
|
|
}
|
|
|
|
function* _fun120951() { // fn#120951, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15958:860, offset: 0x0253b4aa, size: 142 bytes, params: 1, frame: 15
|
|
var value4;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var value3 = env2_0(env2_2[9]);
|
|
if (value3.isIOS()) {
|
|
value4 = env2_0(env2_2[10]);
|
|
if (value4.isIOSAppTransactionIdTrackingEnabled('IOSUserIdentifiersManager')) {
|
|
value = env2_10.getCurrentUser();
|
|
if (value == null) {
|
|
return undefined;
|
|
}
|
|
yield this.syncAppTransactionId(value);
|
|
value = undefined;
|
|
return undefined;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_120952() { // fn#120952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15958:1043, offset: 0x00c3b2ba, size: 30 bytes, params: 1, frame: 13
|
|
return env0_1.apply(this, arguments);
|
|
}
|
|
|
|
function* _fun120954(a0) { // fn#120954, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15958:1149, offset: 0x0253b543, size: 373 bytes, params: 2, frame: 19
|
|
var binding;
|
|
var DCDAppTransactionManager;
|
|
var getAppTransactionId;
|
|
var value3;
|
|
var value4;
|
|
var value5;
|
|
var appTransactionId;
|
|
var value6;
|
|
var value7;
|
|
var appTransactionIds;
|
|
var value8;
|
|
var includes;
|
|
var value9;
|
|
var binding2;
|
|
var property;
|
|
var value10;
|
|
var HTTP;
|
|
var post;
|
|
var object;
|
|
var object2;
|
|
var value11;
|
|
var value12;
|
|
var value13;
|
|
var binding3;
|
|
var value14;
|
|
var track;
|
|
var APP_TRANSACTION_ID_SYNCED;
|
|
var error;
|
|
var binding4;
|
|
var value15;
|
|
var captureException;
|
|
var value16;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort55: while (true) {
|
|
exceptionLanding54: while (true) {
|
|
try {
|
|
binding = env2_9;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
binding = env2_1;
|
|
binding4 = env2_2;
|
|
value15 = binding(binding4[13]);
|
|
captureException = value15.captureException;
|
|
Reflect.apply(captureException, value15, [error, {tags: {'source': 'ios_user_identifiers_manager',
|
|
'step': 'sync_app_transaction_id'}}]);
|
|
value16 = binding(binding4[12]);
|
|
track = value16.track;
|
|
APP_TRANSACTION_ID_SYNCED = env2_11.APP_TRANSACTION_ID_SYNCED;
|
|
Reflect.apply(track, value16, [APP_TRANSACTION_ID_SYNCED, {success: false}]);
|
|
break reduciblePort55;
|
|
}
|
|
return undefined;
|
|
}
|
|
try {
|
|
DCDAppTransactionManager = binding.DCDAppTransactionManager;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
getAppTransactionId = DCDAppTransactionManager.getAppTransactionId;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value3 = Reflect.apply(getAppTransactionId, DCDAppTransactionManager, []);
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
yield value3;
|
|
try {
|
|
value4 = undefined;
|
|
value5 = false;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
if (value5) {
|
|
return value4;
|
|
}
|
|
try {
|
|
appTransactionId = value4.appTransactionId;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value6 = appTransactionId == null;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
if (!value6) {
|
|
try {
|
|
value7 = appTransactionId === '';
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
reducibleJoin52: while (true) {
|
|
if (!value7) {
|
|
try {
|
|
appTransactionIds = a0.appTransactionIds;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value8 = appTransactionIds == null;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
if (!value8) {
|
|
try {
|
|
includes = appTransactionIds.includes;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value9 = Reflect.apply(includes, appTransactionIds, [appTransactionId]);
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
reducibleJoin23: while (true) {
|
|
if (value9) {
|
|
return undefined;
|
|
}
|
|
break reducibleJoin23;
|
|
}
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
property = binding2[11];
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value10 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
HTTP = value10.HTTP;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
post = HTTP.post;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
object = {'url': '/users/@me/app-transaction-ids', 'body': null, 'rejectWithError': true};
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
object2.app_transaction_id = appTransactionId;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
object.body = object2;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value11 = Reflect.apply(post, HTTP, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
yield value11;
|
|
try {
|
|
value12 = undefined;
|
|
value13 = false;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
if (value13) {
|
|
return value12;
|
|
}
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
property = binding3[12];
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
value14 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
track = value14.track;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
binding = env2_11;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
APP_TRANSACTION_ID_SYNCED = binding.APP_TRANSACTION_ID_SYNCED;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
object.success = true;
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
try {
|
|
Reflect.apply(track, value14, [APP_TRANSACTION_ID_SYNCED, object]);
|
|
} catch (error) {
|
|
break exceptionLanding54;
|
|
}
|
|
return undefined;
|
|
}
|
|
break reducibleJoin52;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function value_120955() { // fn#120955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15958:1675, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun120943, 15750, [5, 6, 7, 15, 17, 18, 27, 1878, 661, 477, 15751, 507, 683, 1216, 4860,
|
|
2]) /* metro module 15750, dependencies: [5, 6, 7, 15, 17, 18, 27, 1878, 661, 477, 15751, 507, 683, 1216, 4860, 2] */;
|