Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
54 lines
2.1 KiB
TypeScript
54 lines
2.1 KiB
TypeScript
// Module ID: 5487
|
|
// Function ID: 5488
|
|
// Name: CloudUploaderUtils
|
|
// Dependencies: [2112, 502, 1346, 5441, 12, 1241, 2]
|
|
// Exports: getUploadPayload, prepareMessagePayload
|
|
|
|
// Module 5487 (CloudUploaderUtils)
|
|
import _modDef12 from "module_12" /* 12 */;
|
|
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
|
|
import UploadUtils from "UploadUtils" /* 5441 */;
|
|
import LocaleStore from "LocaleStore" /* 2112 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
import DeveloperOptionsStore from "DeveloperOptionsStore" /* 1346 */;
|
|
|
|
require = fn;
|
|
function getUploadPayload(self) {
|
|
const obj = { filename: self.filename, file_size: self.currentSize, id: _modDef12.uniqueId(), original_content_type: "a" };
|
|
return obj;
|
|
}
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("lib/uploader/native/CloudUploaderUtils.tsx");
|
|
|
|
export default { getUploadPayload };
|
|
export const prepareMessagePayload = function prepareMessagePayload(Authorization, arr, arg2, arg3) {
|
|
const items = [];
|
|
const item = arr.forEach((item, index) => {
|
|
const merged = Object.assign(UploadUtils.getAttachmentPayload(item, index));
|
|
items.push({});
|
|
});
|
|
if (null != arg3) {
|
|
if (null != arg2) {
|
|
const obj = {};
|
|
let merged = Object.assign(arg2);
|
|
const items1 = [];
|
|
HermesBuiltin.arraySpread(items, HermesBuiltin.arraySpread(_modDef12.get(obj, arg3, []), 0));
|
|
let result = _modDef12.set(obj, arg3, items1);
|
|
}
|
|
const obj2 = { Authorization, "X-Debug-Options": DeveloperOptionsStore.getDebugOptionsHeaderValue(), "Accept-Language": LocaleStore.locale };
|
|
const superPropertiesBase64 = AnalyticsUtilsDefault.getSuperPropertiesBase64();
|
|
if (null != superPropertiesBase64) {
|
|
obj2["X-Super-Properties"] = superPropertiesBase64;
|
|
}
|
|
const fingerprint = AuthenticationStore.getFingerprint();
|
|
if (null != fingerprint) {
|
|
obj2["X-Fingerprint"] = fingerprint;
|
|
}
|
|
const obj5 = { headers: obj2, body: result };
|
|
return obj5;
|
|
}
|
|
result = {};
|
|
const merged1 = Object.assign(arg2);
|
|
result.attachments = items;
|
|
};
|
|
export { getUploadPayload };
|