/* Metro module 10277; source: modules/user_profile/utils/UserProfileStackedActivityCardUtils.tsx; dependencies: [661, 22, 2] */ function _fun79742(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10463:6, offset: 0x01e607ac, size: 154 bytes, params: 8, frame: 18 const env0_0 = require; const _arrayLikeToArray_79745 = function(a0, a1) { var r0; var r1; var r2; var value3; var length; var value5; var value = undefined; var value2 = value == null; reducibleJoin2: while (true) { if (value2) { r0 = value2; break reducibleJoin2; } value3 = value > a0.length; r0 = value3; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { length = a0.length; r1 = length; break reducibleJoin4; } r1 = value; break reducibleJoin4; } value = (0, global.Array)(r1); var value4 = 0; if (value4 < r1) { r2 = value4; reducibleLoop5: while (true) { value[r2] = a0[r2]; value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1; if (value5 < r1) { r2 = value5; continue reducibleLoop5; } break reducibleLoop5; } } return value; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_2 = (require(661) /* metro dependency 661: Constants */).ActivityTypes; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/utils/UserProfileStackedActivityCardUtils.tsx'); exports.getUserProfileLiveActivities = getUserProfileLiveActivities; exports.getUserProfileStackedActivityCards = getUserProfileStackedActivityCards; } function _createForOfIteratorHelperLoose_79743(a0, a1) { // fn#79743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10463:125, offset: 0x01e60846, size: 372 bytes, params: 3, frame: 20 var r6; var r9; var r5; var value3; var regexp; const env0_0 = a0; const Symbol = global.Symbol; let value = typeof Symbol !== 'undefined'; let r1 = value && a0[global.Symbol.iterator]; r1 = !r1 ? a0['@@iterator'] : r1; if (r1) { value = r1.call(a0); return value.next.bind(value); } const Array = global.Array; if (Array.isArray(a0)) { if (r1) { } return _fun79744; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_79745(a0, value); r5 = value; } else { value3 = ({}).toString.call(a0).slice(8, -1); r6 = value3 === 'Object' && a0.constructor; r9 = r6 ? a0.constructor.name : value3; if (r9 === 'Map') { r6 = global.Array.from(a0); } else if (r9 === 'Set') { r6 = global.Array.from(a0); } else if (r9 === 'Arguments') { value = _arrayLikeToArray_79745(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_79745(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun79744; } const TypeError = global.TypeError; throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.'); } function getUserProfileLiveActivities(a0) { // fn#79746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10463:1168, offset: 0x01e609ba, size: 68 bytes, params: 2, frame: 15 const value = require(22) /* metro dependency 22 */; return value.uniqWith(a0.filter(_fun79747), function(a0, a1) { var r0; var r1; r0 = a0.application_id != null && a1.application_id != null && a0.application_id === a1.application_id; if (!r0) { r1 = a0.name != null && a1.name != null; r1 = r1 && a0.name === a1.name; r0 = r1; } return r0; }); } function getUserProfileStackedActivityCards({stream, live, voiceChannel, voiceActivity, isPrivate}) { // fn#79749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10463:1475, offset: 0x01e60a8a, size: 204 bytes, params: 2, frame: 22 var r7; var r1; var value; var push; var value3; var value4; reducibleJoin2: while (true) { if (live !== undefined) { r7 = live; break reducibleJoin2; } r7 = []; break reducibleJoin2; } reducibleJoin4: while (true) { if (isPrivate !== undefined) { break reducibleJoin4; } value = false; isPrivate = value; break reducibleJoin4; } const items2 = []; reducibleJoin6: while (true) { if (stream == null) { break reducibleJoin6; } push = items2.push; Reflect.apply(push, items2, [{type: 'stream', stream: stream}]); break reducibleJoin6; } value = _createForOfIteratorHelperLoose_79743(r7); const value2 = value(); let done = value2.done; if (!done) { r7 = value2; reducibleLoop7: while (true) { value3 = r7.value; push = items2.push; Reflect.apply(push, items2, [{type: 'live', activity: value3}]); value4 = value(); done = value4.done; if (done) { break reducibleLoop7; } r7 = value4; continue reducibleLoop7; } } reducibleJoin10: while (true) { if (isPrivate) { r1 = isPrivate; break reducibleJoin10; } value = stream != null; r1 = value; break reducibleJoin10; } reducibleJoin12: while (true) { if (r1) { break reducibleJoin12; } value = voiceActivity != null; r1 = value; break reducibleJoin12; } reducibleJoin14: while (true) { if (r1) { break reducibleJoin14; } value = voiceChannel == null; r1 = value; break reducibleJoin14; } reducibleJoin16: while (true) { if (r1) { break reducibleJoin16; } push = items2.push; Reflect.apply(push, items2, [{type: 'voice', voiceChannel: voiceChannel}]); break reducibleJoin16; } return items2; } function _fun79747({type}) { // fn#79747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10463:1244, offset: 0x01e609fe, size: 44 bytes, params: 2, frame: 4 const value = environment.__proto__; const CUSTOM_STATUS = ActivityTypes.CUSTOM_STATUS; return type !== CUSTOM_STATUS && type !== ActivityTypes.HANG_STATUS; }