62 lines
3.5 KiB
TypeScript
62 lines
3.5 KiB
TypeScript
/* Metro module 12620; source: modules/parent_tools/native/FamilyCenterNativeUtils.tsx; dependencies: [12621, 5117, 661, 683, 5118, 5080, 12622, 1962, 2] */
|
|
function _fun96789(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12810:6, offset: 0x021671ed, size: 199 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const familyCenterPendingConnectionStore = importDefault(12621) /* metro dependency 12621: FamilyCenterPendingConnectionStore */;
|
|
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
|
|
const env0_4 = familyCenterConstantsModule.FAMILY_CENTER_LINK_REQUEST_REGEX;
|
|
const env0_5 = familyCenterConstantsModule.FamilyCenterAction;
|
|
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterNativeUtils.tsx');
|
|
exports.FAMILY_CENTER_REQUEST_MODAL_KEY = 'family-center-request-modal';
|
|
exports.handleFamilyCenterQRCodeScan = handleFamilyCenterQRCodeScan;
|
|
exports.resumeFamilyCenterConnection = resumeFamilyCenterConnection;
|
|
}
|
|
|
|
function handleFamilyCenterQRCodeScan(a0, a1) { // fn#96790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12810:389, offset: 0x021672b4, size: 219 bytes, params: 3, frame: 22
|
|
const value2 = a0.match(FAMILY_CENTER_LINK_REQUEST_REGEX);
|
|
if (value2 === null) {
|
|
return null;
|
|
}
|
|
const property = value2[1];
|
|
const property2 = value2[2];
|
|
const defaultImport = importDefault(dependencyMap[3]);
|
|
const track = defaultImport.track;
|
|
const FAMILY_CENTER_ACTION = AnalyticEvents.FAMILY_CENTER_ACTION;
|
|
const ScanQRCode = FamilyCenterAction.ScanQRCode;
|
|
Reflect.apply(track, defaultImport, [FAMILY_CENTER_ACTION, {action: ScanQRCode, selected_teen_id: property,
|
|
source: a1}]);
|
|
importDefault(dependencyMap[4]).setPendingConnection(property, property2);
|
|
const defaultImport3 = importDefault(dependencyMap[5]);
|
|
const pushLazy = defaultImport3.pushLazy;
|
|
let value = require(dependencyMap[7]);
|
|
value = value(dependencyMap[6], dependencyMap.paths);
|
|
Reflect.apply(pushLazy, defaultImport3, [value, {userId: property, linkCode: property2},
|
|
'family-center-request-modal']);
|
|
}
|
|
|
|
function resumeFamilyCenterConnection() { // fn#96791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12810:674, offset: 0x0216738f, size: 150 bytes, params: 1, frame: 20
|
|
var r0;
|
|
var defaultImport2;
|
|
var pushLazy;
|
|
var value;
|
|
const pendingConnection = FamilyCenterPendingConnectionStore.getPendingConnection();
|
|
const value3 = pendingConnection != null;
|
|
if (value3) {
|
|
importDefault(dependencyMap[5]).popWithKey('family-center-request-modal');
|
|
defaultImport2 = importDefault(dependencyMap[5]);
|
|
pushLazy = defaultImport2.pushLazy;
|
|
value = require(dependencyMap[7]);
|
|
value = value(dependencyMap[6], dependencyMap.paths);
|
|
Reflect.apply(pushLazy, defaultImport2, [value, {userId: pendingConnection.teenId,
|
|
linkCode: pendingConnection.linkCode}, 'family-center-request-modal']);
|
|
value = true;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|