/* Metro module 12675; source: modules/share/useFetchShareEmbed.tsx; dependencies: [5, 57, 31, 1471, 11467, 690, 2] */ function _fun97116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:6, offset: 0x0217373b, size: 153 bytes, params: 8, frame: 19 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 */; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/useFetchShareEmbed.tsx'); exports.default = useFetchShareEmbed; } function useFetchShareEmbed(a0) { // fn#97117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:206, offset: 0x021737d4, size: 193 bytes, params: 2, frame: 21 const env0_0 = a0; const binding = env0_5; let useState = binding.useState; const value2 = Reflect.apply(useState, binding, [undefined]); const binding2 = env0_4; let value = binding2(value2, 2); const property = value[0]; const env0_1 = value[1]; useState = binding.useState; value = binding2(Reflect.apply(useState, binding, [false]), 2); const property2 = value[0]; const env0_2 = value[1]; useState = binding.useState; value = binding2(Reflect.apply(useState, binding, [false]), 2); const property3 = value[0]; const env0_3 = value[1]; var env0_4 = binding.useRef(true); var env0_5 = binding.useRef(undefined); binding.useEffect(_fun97118, [a0]); return {embed: property, isLoading: property2, hasTriedResolving: property3}; } function _fun97118() { // fn#97118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:419, offset: 0x02173895, size: 256 bytes, params: 1, frame: 17 var value6; if (env0_0 == null) { env0_4.current = false; env0_1(undefined); return undefined; } if (env0_0 === '') { env0_4.current = false; env0_1(undefined); return undefined; } const binding = env0_0; const match = binding.match; const value3 = undefined; const URL_REGEX = (importDefault(1471) /* metro dependency 1471: URLUtils */).URL_REGEX; const value4 = Reflect.apply(match, binding, [URL_REGEX]); const r3 = value4 == null ? value3 : value4.at(0); if (r3 !== env0_5.current) { env0_5.current = r3; if (r3 == null) { env0_1(value3); env0_4.current = false; return value3; } value6 = _fun97119(); if (env0_4.current) { env0_4.current = false; value6(); } var env0_1 = global.setTimeout(value6, 1000); return _fun97127; } return value3; } function _fun97119() { // fn#97119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:625, offset: 0x02173995, size: 36 bytes, params: 1, frame: 12 const env0_0 = env2_3(_fun97121); return _fun97126; } function _fun97127() { // fn#97127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:967, offset: 0x02173b39, size: 24 bytes, params: 1, frame: 11 global.clearTimeout(env0_1); } function* _fun97121() { // fn#97121, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:645, offset: 0x021739c4, size: 344 bytes, params: 1, frame: 19 var environment; var value; var value2; var value3; var binding; var binding2; var property; var value4; var unfurlEmbedUrl; var value5; var object; var value6; var value7; var value8; var embeds; var length; var value9; var batchUpdates; var error; exceptionLanding44: while (true) { value = undefined; value2 = false; if (value2) { return value; } value = environment.__proto__.__proto__.__proto__; reducibleJoin4: while (true) { reduciblePort43: while (true) { exceptionLanding39: while (true) { try { try { } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } break reducibleJoin4; } try { } catch (error) { break exceptionLanding44; } try { importDefault(undefined); } catch (error) { break exceptionLanding44; } break reduciblePort43; } value = environment.__proto__.__proto__.__proto__.__proto__; binding = env4_0; value = binding(env4_2[5]); batchUpdates = value.batchUpdates; Reflect.apply(batchUpdates, value, [_fun97124]); return undefined; } try { try { dependencyMap(true); } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } value3 = environment.__proto__.__proto__.__proto__.__proto__; try { try { binding = env4_0; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { binding2 = env4_2; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { property = binding2[4]; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { value4 = binding(property); } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { unfurlEmbedUrl = value4.unfurlEmbedUrl; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } value5 = environment.__proto__.__proto__; try { try { binding = env2_0; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { object = []; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { object[0] = binding; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { value6 = Reflect.apply(unfurlEmbedUrl, value4, [object]); } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } yield value6; try { try { value7 = undefined; value8 = false; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } if (value8) { value = env4_0(env4_2[5]); value.batchUpdates(_fun97122); return value7; } try { try { embeds = value7.embeds; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { length = embeds.length; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { value9 = length === 0; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } if (value9) { try { try { } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { importDefault(undefined); } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } binding = env4_0; value = binding(env4_2[5]); value.batchUpdates(_fun97123); return undefined; } try { try { } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { object = {}; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { embeds = value7.embeds; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { property = embeds[0]; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { object.embed = property; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { binding = env2_0; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { object.url = binding; } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } try { try { importDefault(object); } catch (error) { break exceptionLanding39; } } catch (error) { break exceptionLanding44; } value = environment.__proto__.__proto__.__proto__.__proto__; binding = env4_0; value = binding(env4_2[5]); batchUpdates = value.batchUpdates; Reflect.apply(batchUpdates, value, [_fun97124]); return undefined; } value = environment.__proto__.__proto__.__proto__.__proto__; env4_0(env4_2[5]).batchUpdates(_fun97125); throw error; } function _fun97122() { // fn#97122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:830, offset: 0x02173b1c, size: 29 bytes, params: 1, frame: 12 env4_3(true); dependencyMap(false); }