decord/source/module_1485.js

67 lines
1.9 KiB
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 1485
// Function ID: 1486
2026-07-20 16:05:17 +00:00
// Dependencies: []
2026-08-15 05:55:55 +00:00
// Module 1485
2026-07-20 16:05:17 +00:00
export default (str, SEPARATOR, arg2, maxKeys) => {
str = SEPARATOR;
if (!SEPARATOR) {
str = "&";
}
2026-07-29 08:29:29 +00:00
let str2 = arg2;
if (!arg2) {
2026-07-20 16:05:17 +00:00
str2 = "=";
}
const obj = {};
2026-08-04 21:03:28 +00:00
if (typeof str === "string") {
2026-07-20 16:05:17 +00:00
if (0 !== str.length) {
const parts = str.split(str);
let tmp = maxKeys;
if (maxKeys) {
2026-08-04 21:03:28 +00:00
tmp = typeof maxKeys.maxKeys === "number";
2026-07-20 16:05:17 +00:00
}
let num = 1000;
if (tmp) {
num = maxKeys.maxKeys;
}
let length = parts.length;
if (tmp2) {
length = num;
}
for (let num3 = 0; num3 < length; num3 = num3 + 1) {
2026-07-29 08:29:29 +00:00
let str5 = parts[num3];
let replaced = str5.replace(tmp11, "%20");
2026-07-20 16:05:17 +00:00
let index = replaced.indexOf(str2);
2026-07-29 08:29:29 +00:00
let tmp5 = num3;
let str6 = "";
2026-07-20 16:05:17 +00:00
let substr = replaced;
if (index >= 0) {
substr = replaced.substr(0, index);
2026-07-29 08:29:29 +00:00
str6 = replaced.substr(index + 1);
2026-07-20 16:05:17 +00:00
}
let _decodeURIComponent = decodeURIComponent;
let decodeURIComponentResult = decodeURIComponent(substr);
let _decodeURIComponent2 = decodeURIComponent;
2026-07-29 08:29:29 +00:00
let decodeURIComponentResult1 = decodeURIComponent(str6);
let _Object = Object;
let call = hasOwnProperty.call;
if (typeof call === "unknown" ? hasOwnProperty(decodeURIComponentResult) : call(obj, decodeURIComponentResult)) {
2026-07-20 16:05:17 +00:00
let _Array = Array;
let arr2 = obj[decodeURIComponentResult];
if (Array.isArray(obj[decodeURIComponentResult])) {
let arr = arr2.push(decodeURIComponentResult1);
} else {
let items = [arr2, decodeURIComponentResult1];
obj[decodeURIComponentResult] = items;
}
} else {
obj[decodeURIComponentResult] = decodeURIComponentResult1;
}
}
return obj;
}
}
return obj;
};