343 lines
12 KiB
TypeScript
343 lines
12 KiB
TypeScript
/* Metro module 9387; source: modules/connections/native/FederatedSocialModal.tsx; dependencies: [5, 57, 31, 661, 33, 4501, 4915, 1244, 5042, 3853, 9388, 6618, 4573, 8967, 1305, 4578, 5282, 5280, 2] */
|
|
function _fun73226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:6, offset: 0x01d63694, size: 279 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_5 = importAll(31) /* metro dependency 31 */;
|
|
const env0_6 = (require(661) /* metro dependency 661: Constants */).WebBrowserType;
|
|
const value = require(33) /* metro dependency 33 */;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.jsxs;
|
|
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {padding: 16},
|
|
description: {textAlign: 'center'}, input: {'paddingHorizontal': 0, 'paddingVertical': 0,
|
|
'marginVertical': 16}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connections/native/FederatedSocialModal.tsx');
|
|
exports.default = FederatedSocialModal;
|
|
}
|
|
|
|
function FederatedSocialModal(a0) { // fn#73227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:423, offset: 0x01d637ab, size: 296 bytes, params: 2, frame: 22
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const env0_0 = a0;
|
|
const value2 = undefined;
|
|
const value3 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(a0.platformType);
|
|
const r12 = (value3 == null ? value2 : value3.name) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bU/GZm']);
|
|
const object3 = {};
|
|
const object4 = {};
|
|
object4.headerTitle = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['ImMhq+'],
|
|
{serviceName: r12});
|
|
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(a0.onClose);
|
|
object4.render = render_73228;
|
|
object3.root = object4;
|
|
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
|
return <Navigator initialRouteName="root" screens={object3} />;
|
|
}
|
|
|
|
function FederatedSocialModalRender() { // fn#73228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:720, owner: FederatedSocialModal.render, offset: 0x01d638d3, size: 25 bytes, params: 1, frame: 11
|
|
return FederatedSocialModalScreen(env0_0);
|
|
}
|
|
|
|
function FederatedSocialModalScreen({location, successRedirect, platformType, onClose}) { // fn#73229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:724, owner: FederatedSocialModal.render.FederatedSocialModalScreen, offset: 0x01d638ec, size: 767 bytes, params: 2, frame: 34
|
|
var environment;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let value = environment.__proto__.__proto__;
|
|
const styles = useStyles();
|
|
const binding = env2_5;
|
|
let useState = binding.useState;
|
|
const value3 = Reflect.apply(useState, binding, ['']);
|
|
const binding2 = env2_4;
|
|
const value4 = binding2(value3, 2);
|
|
const property = value4[0];
|
|
const property2 = value4[1];
|
|
useState = binding.useState;
|
|
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
|
|
const property3 = value5[0];
|
|
const env0_5 = value5[1];
|
|
useState = binding.useState;
|
|
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property4 = value6[0];
|
|
const env0_6 = value6[1];
|
|
const r24 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType)?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bU/GZm']);
|
|
const value9 = _fun73230();
|
|
const exampleHandle = (require(9388) /* metro dependency 9388: FederatedSocialUtils */).getExampleHandle(platformType);
|
|
const value11 = (require(9388) /* metro dependency 9388: FederatedSocialUtils */).validateHandle(property,
|
|
platformType);
|
|
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const items2 = [<Text variant="text-md/normal" color="text-default" style={styles.description}>{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7TByKh'],
|
|
{serviceName: r24})}</Text>];
|
|
value = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
|
|
let string = intl.string;
|
|
const tZ9QFR = (require(1244) /* metro dependency 1244: indexNative */).t.tZ9QFR;
|
|
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
|
|
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
|
|
items2[1] = ((Component) => <Component autoFocus style={styles.input} label={Reflect.apply(string, intl,
|
|
[tZ9QFR])} placeholder={exampleHandle} error={property3} returnKeyType="done" onChangeText={property2} onSubmitEditing={value9} clearButtonVisibility={WITH_CONTENT} autoCapitalize="none" autoComplete="off" autoCorrect={false} />)(value);
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
string = intl.string;
|
|
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
|
|
items2[2] = <Button loading={property4} disabled={!value11} text={Reflect.apply(string, intl,
|
|
[PDTjLN])} onPress={value9} />;
|
|
return (
|
|
<SafeAreaPaddingView bottom style={styles.container}>
|
|
{items2}
|
|
</SafeAreaPaddingView>
|
|
);
|
|
}
|
|
|
|
function _fun73230() { // fn#73230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1049, offset: 0x01d63beb, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env3_3(_fun73232);
|
|
return _fun73233;
|
|
}
|
|
|
|
function* _fun73232() { // fn#73232, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1069, offset: 0x01d63c1a, size: 323 bytes, params: 1, frame: 20
|
|
var url;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value5;
|
|
var authorize;
|
|
var object2;
|
|
var binding3;
|
|
var binding4;
|
|
var binding5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var body;
|
|
var value9;
|
|
var value10;
|
|
var binding6;
|
|
var value11;
|
|
var openURLExternally;
|
|
var SAFARI;
|
|
var Error;
|
|
var prototype;
|
|
var error;
|
|
var value13;
|
|
var binding7;
|
|
var binding8;
|
|
var intl;
|
|
var string;
|
|
var t;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
env2_6(true);
|
|
env2_5(null);
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort50: while (true) {
|
|
exceptionLanding49: while (true) {
|
|
try {
|
|
binding = env5_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
binding = env2_5;
|
|
binding7 = env5_0;
|
|
binding8 = env5_2;
|
|
intl = binding7(binding8[7]).intl;
|
|
string = intl.string;
|
|
t = binding7(binding8[7]).t;
|
|
binding(Reflect.apply(string, intl, [t['7wbPNl']]));
|
|
env2_6(false);
|
|
break reduciblePort50;
|
|
}
|
|
return value;
|
|
}
|
|
try {
|
|
binding2 = env5_2;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding2[8];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value5 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
authorize = value5.authorize;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding3 = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object2.location = binding3;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding4 = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object2.successRedirect = binding4;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding5 = env2_4;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object2.handle = binding5;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(authorize, value5, [binding, object2]);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
try {
|
|
body = value7.body;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value9 = body == null;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
reducibleJoin27: while (true) {
|
|
if (value9) {
|
|
url = value;
|
|
break reducibleJoin27;
|
|
}
|
|
try {
|
|
url = body.url;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
break reducibleJoin27;
|
|
}
|
|
try {
|
|
value10 = url == null;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
if (!value10) {
|
|
try {
|
|
binding = env5_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding6 = env5_2;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding6[9];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value11 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
openURLExternally = value11.openURLExternally;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
url = body.url;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env5_6;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
SAFARI = binding.SAFARI;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
Reflect.apply(openURLExternally, value11, [url, SAFARI]);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding();
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
return value;
|
|
}
|
|
try {
|
|
Error = global.Error;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
prototype = Error.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
error = new Error();
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value13 = error instanceof Object ? error : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
throw value13;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
}
|
|
|