78 lines
4.3 KiB
TypeScript
78 lines
4.3 KiB
TypeScript
/* Metro module 11740; source: modules/polls/PollAttachmentUtils.tsx; dependencies: [5, 7217, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as PollsConstantsModule from './PollsConstants.tsx'; /* Metro dependency 7217 */
|
|
|
|
function _fun89994(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#89994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:6, offset: 0x020264fa, size: 165 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/polls/PollAttachmentUtils.tsx');
|
|
exports.getFileNameFromGifUrl = function(a0, a1) {
|
|
var value = (0, global.decodeURIComponent)(a1);
|
|
value = value.split('/');
|
|
value = value.pop();
|
|
return '' + a0 + '-' + (value ?? 'temp.gif');
|
|
};
|
|
exports.getFilePathForGif = function(a0) {
|
|
return POLL_ATTACHMENT_FOLDER + '/' + a0;
|
|
};
|
|
exports.downloadPollGif = function() {
|
|
return _downloadPollGif.apply(this, arguments);
|
|
};
|
|
function _downloadPollGif() { // fn#89995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:139, offset: 0x0202659f, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun89997).apply(this, arguments);
|
|
function* _fun89997(a0) { // fn#89997, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:194, offset: 0x020265dc, size: 81 bytes, params: 2, frame: 13
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
yield global.fetch(a0);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
yield value.blob();
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
return ((a0) => {
|
|
var env0_0 = a0;
|
|
var property = global.FileReader;
|
|
var env0_1 = new property();
|
|
property = global.Promise;
|
|
value2 = Object.create(property.prototype, {constructor: {value: property}});
|
|
var value3 = new property(_fun89999);
|
|
return value3 instanceof Object ? value3 : value2;
|
|
})(value);
|
|
function convertBlobToBase64(a0) { // fn#89998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:235, offset: 0x0202662d, size: 76 bytes, params: 2, frame: 12
|
|
const env0_0 = a0;
|
|
const FileReader = global.FileReader;
|
|
let fileReader = new FileReader();
|
|
const Promise = global.Promise;
|
|
fileReader = Object.create(Promise.prototype, {constructor: {value: Promise}});
|
|
const promise = new Promise(_fun89999);
|
|
return promise instanceof Object ? promise : fileReader;
|
|
function _fun89999(a0, a1) { // fn#89999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:308, offset: 0x02026679, size: 57 bytes, params: 3, frame: 11
|
|
const env0_0 = a0;
|
|
PollsConstantsModule.POLL_ATTACHMENT_FOLDER.onload = onload_90000;
|
|
PollsConstantsModule.POLL_ATTACHMENT_FOLDER.onerror = a1;
|
|
PollsConstantsModule.POLL_ATTACHMENT_FOLDER.readAsDataURL(env0_0);
|
|
function onload_90000() { // fn#90000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11926:325, offset: 0x020266b2, size: 53 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__;
|
|
value = env1_1.result.split(',');
|
|
value = value.pop();
|
|
env0_0(value);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun89994, 11740, [5, 7217, 2]) /* metro module 11740, dependencies: [5, 7217, 2] */;
|