91 lines
4.2 KiB
JavaScript
91 lines
4.2 KiB
JavaScript
|
|
// Module ID: 8324
|
||
|
|
// Function ID: 65987
|
||
|
|
// Name: decideFileExtension
|
||
|
|
// Dependencies: []
|
||
|
|
// Exports: decideFileExtension
|
||
|
|
|
||
|
|
// Module 8324 (decideFileExtension)
|
||
|
|
let closure_2 = { "Null": 43429592147160320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, "Null": 13340564516523250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, "Null": 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000339519326633, "Null": -0.00010299696002858545, "Null": -106563631396035940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, "Null": 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000518728505263, "Null": 0.000000000000000000001827243588716781, "Null": 43429533506351125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, "Null": 13343560305114734000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 };
|
||
|
|
const _module = require(dependencyMap[1]);
|
||
|
|
const result = _module.fileFinishedImporting("modules/media/FileExtensionUtils.tsx");
|
||
|
|
|
||
|
|
export const decideFileExtension = function decideFileExtension(closure_0) {
|
||
|
|
let flag = arg2;
|
||
|
|
if (arg2 === undefined) {
|
||
|
|
flag = false;
|
||
|
|
}
|
||
|
|
let tmp;
|
||
|
|
if (flag) {
|
||
|
|
const toURLSafeResult = importDefault(dependencyMap[0]).toURLSafe(closure_0);
|
||
|
|
let formatted;
|
||
|
|
if (null != toURLSafeResult) {
|
||
|
|
const searchParams = toURLSafeResult.searchParams;
|
||
|
|
const str2 = searchParams.get("format");
|
||
|
|
if (null != str2) {
|
||
|
|
formatted = str2.toLowerCase();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
let tmp7;
|
||
|
|
if (null != formatted) {
|
||
|
|
if ("" !== formatted) {
|
||
|
|
let str4 = "jpg";
|
||
|
|
if ("jpeg" !== formatted) {
|
||
|
|
str4 = formatted;
|
||
|
|
}
|
||
|
|
tmp7 = str4;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
tmp = tmp7;
|
||
|
|
const obj = importDefault(dependencyMap[0]);
|
||
|
|
}
|
||
|
|
if (null == tmp) {
|
||
|
|
let tmp8;
|
||
|
|
if (null != arg1) {
|
||
|
|
tmp8 = closure_2[arg1.toLowerCase(arg1)];
|
||
|
|
if (null == tmp8) {
|
||
|
|
const str7 = arg1.split("/")[1];
|
||
|
|
let formatted1;
|
||
|
|
if (null != str7) {
|
||
|
|
formatted1 = str7.toLowerCase();
|
||
|
|
}
|
||
|
|
let str8 = "jpg";
|
||
|
|
if ("jpeg" !== formatted1) {
|
||
|
|
let tmp11;
|
||
|
|
if (null != formatted1) {
|
||
|
|
tmp11 = formatted1;
|
||
|
|
}
|
||
|
|
str8 = tmp11;
|
||
|
|
}
|
||
|
|
tmp8 = str8;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
tmp = tmp8;
|
||
|
|
}
|
||
|
|
if (null == tmp) {
|
||
|
|
const toURLSafeResult1 = importDefault(dependencyMap[0]).toURLSafe(closure_0);
|
||
|
|
let tmp14;
|
||
|
|
if (null != toURLSafeResult1) {
|
||
|
|
let formatted2;
|
||
|
|
if (null != toURLSafeResult1.pathname) {
|
||
|
|
const parts = str10.split(".");
|
||
|
|
if (null != parts) {
|
||
|
|
const str12 = parts.pop();
|
||
|
|
if (null != str12) {
|
||
|
|
formatted2 = str12.toLowerCase();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
let tmp13;
|
||
|
|
if (null != formatted2) {
|
||
|
|
if (formatted2.length <= 5) {
|
||
|
|
tmp13 = formatted2;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
tmp14 = tmp13;
|
||
|
|
}
|
||
|
|
tmp = tmp14;
|
||
|
|
const obj2 = importDefault(dependencyMap[0]);
|
||
|
|
}
|
||
|
|
return tmp;
|
||
|
|
};
|