@indfnd/utils 0.1.39 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/ind-utils.es.js +173 -84
- package/dist/ind-utils.umd.cjs +17 -17
- package/package.json +1 -1
- package/src/utils/token.ts +23 -11
- package/types/api/com.d.ts +2 -4
- package/types/api/index-desc.d.ts +2 -4
- package/types/api/index.d.ts +7 -7
- package/types/api/item.d.ts +4 -6
- package/types/api/permission.d.ts +2 -2
- package/types/api/platform/base64.d.ts +5 -5
- package/types/api/platform/config.d.ts +2 -2
- package/types/api/platform/dict.d.ts +4 -6
- package/types/api/platform/index.d.ts +6 -6
- package/types/api/platform/menu.d.ts +11 -21
- package/types/api/platform/oss.d.ts +8 -16
- package/types/api/platform/user.d.ts +12 -19
- package/types/api/user.d.ts +2 -2
- package/types/config/base.config.d.ts +33 -33
- package/types/config/dev.config.d.ts +3 -3
- package/types/config/index.d.ts +6 -6
- package/types/config/prod.config.d.ts +3 -3
- package/types/index.d.ts +4 -4
- package/types/utils/base64.d.ts +22 -22
- package/types/utils/blob.d.ts +3 -3
- package/types/utils/cache/dict-cache.d.ts +3 -3
- package/types/utils/cache/index-desc.d.ts +4 -4
- package/types/utils/cache/index.d.ts +4 -4
- package/types/utils/cache/permission-cache.d.ts +4 -4
- package/types/utils/cache/user-cache.d.ts +4 -4
- package/types/utils/date.d.ts +4 -4
- package/types/utils/enum.d.ts +39 -43
- package/types/utils/event.d.ts +5 -13
- package/types/utils/excel.d.ts +5 -5
- package/types/utils/half-year.d.ts +6 -6
- package/types/utils/index.d.ts +20 -20
- package/types/utils/is-type.d.ts +33 -33
- package/types/utils/mime-type.d.ts +67 -67
- package/types/utils/number.d.ts +8 -8
- package/types/utils/quarter.d.ts +7 -7
- package/types/utils/request/axios.extends.d.ts +6 -18
- package/types/utils/request/cache-rules.d.ts +3 -3
- package/types/utils/request/content-type.d.ts +9 -9
- package/types/utils/request/index.d.ts +9 -9
- package/types/utils/request/interceptors.d.ts +4 -4
- package/types/utils/request/url-params.d.ts +6 -6
- package/types/utils/sm3/index.d.ts +6 -6
- package/types/utils/sm3/sm3.d.ts +3 -3
- package/types/utils/storage.d.ts +8 -8
- package/types/utils/table.d.ts +31 -40
- package/types/utils/token.d.ts +3 -3
- package/types/utils/token.d.ts.map +1 -1
- package/types/utils/uuid.d.ts +4 -4
- package/types/utils/validate.d.ts +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.40](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.39...v0.1.40) (2026-03-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* 升级axios ([3ea2a37](http://git.inspur.com/imp-ec/ind-front/ind-utils/commit/3ea2a37b7ff6eae81ebdb6545e3c49c2c3f4c90e))
|
|
11
|
+
|
|
5
12
|
### [0.1.39](http://git.inspur.com/imp-ec/ind-front/ind-utils/compare/v0.1.38...v0.1.39) (2026-03-09)
|
|
6
13
|
|
|
7
14
|
|
package/dist/ind-utils.es.js
CHANGED
|
@@ -3885,7 +3885,7 @@ var compactQueue = function compactQueue2(queue) {
|
|
|
3885
3885
|
}
|
|
3886
3886
|
};
|
|
3887
3887
|
var arrayToObject = function arrayToObject2(source, options) {
|
|
3888
|
-
var obj = options && options.plainObjects ?
|
|
3888
|
+
var obj = options && options.plainObjects ? { __proto__: null } : {};
|
|
3889
3889
|
for (var i = 0; i < source.length; ++i) {
|
|
3890
3890
|
if (typeof source[i] !== "undefined") {
|
|
3891
3891
|
obj[i] = source[i];
|
|
@@ -3897,7 +3897,7 @@ var merge = function merge2(target, source, options) {
|
|
|
3897
3897
|
if (!source) {
|
|
3898
3898
|
return target;
|
|
3899
3899
|
}
|
|
3900
|
-
if (typeof source !== "object") {
|
|
3900
|
+
if (typeof source !== "object" && typeof source !== "function") {
|
|
3901
3901
|
if (isArray$3(target)) {
|
|
3902
3902
|
target.push(source);
|
|
3903
3903
|
} else if (target && typeof target === "object") {
|
|
@@ -3947,7 +3947,7 @@ var assign = function assignSingleSource(target, source) {
|
|
|
3947
3947
|
return acc;
|
|
3948
3948
|
}, target);
|
|
3949
3949
|
};
|
|
3950
|
-
var decode = function(str,
|
|
3950
|
+
var decode = function(str, defaultDecoder, charset) {
|
|
3951
3951
|
var strWithoutPlus = str.replace(/\+/g, " ");
|
|
3952
3952
|
if (charset === "iso-8859-1") {
|
|
3953
3953
|
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
@@ -3958,6 +3958,7 @@ var decode = function(str, decoder, charset) {
|
|
|
3958
3958
|
return strWithoutPlus;
|
|
3959
3959
|
}
|
|
3960
3960
|
};
|
|
3961
|
+
var limit = 1024;
|
|
3961
3962
|
var encode = function encode2(str, defaultEncoder, charset, kind, format) {
|
|
3962
3963
|
if (str.length === 0) {
|
|
3963
3964
|
return str;
|
|
@@ -3974,27 +3975,32 @@ var encode = function encode2(str, defaultEncoder, charset, kind, format) {
|
|
|
3974
3975
|
});
|
|
3975
3976
|
}
|
|
3976
3977
|
var out = "";
|
|
3977
|
-
for (var
|
|
3978
|
-
var
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3978
|
+
for (var j = 0; j < string.length; j += limit) {
|
|
3979
|
+
var segment = string.length >= limit ? string.slice(j, j + limit) : string;
|
|
3980
|
+
var arr = [];
|
|
3981
|
+
for (var i = 0; i < segment.length; ++i) {
|
|
3982
|
+
var c = segment.charCodeAt(i);
|
|
3983
|
+
if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats$2.RFC1738 && (c === 40 || c === 41)) {
|
|
3984
|
+
arr[arr.length] = segment.charAt(i);
|
|
3985
|
+
continue;
|
|
3986
|
+
}
|
|
3987
|
+
if (c < 128) {
|
|
3988
|
+
arr[arr.length] = hexTable[c];
|
|
3989
|
+
continue;
|
|
3990
|
+
}
|
|
3991
|
+
if (c < 2048) {
|
|
3992
|
+
arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63];
|
|
3993
|
+
continue;
|
|
3994
|
+
}
|
|
3995
|
+
if (c < 55296 || c >= 57344) {
|
|
3996
|
+
arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
3997
|
+
continue;
|
|
3998
|
+
}
|
|
3999
|
+
i += 1;
|
|
4000
|
+
c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
|
|
4001
|
+
arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
3994
4002
|
}
|
|
3995
|
-
|
|
3996
|
-
c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023);
|
|
3997
|
-
out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
|
|
4003
|
+
out += arr.join("");
|
|
3998
4004
|
}
|
|
3999
4005
|
return out;
|
|
4000
4006
|
};
|
|
@@ -4077,12 +4083,17 @@ var defaultFormat = formats$1["default"];
|
|
|
4077
4083
|
var defaults$1 = {
|
|
4078
4084
|
addQueryPrefix: false,
|
|
4079
4085
|
allowDots: false,
|
|
4086
|
+
allowEmptyArrays: false,
|
|
4087
|
+
arrayFormat: "indices",
|
|
4080
4088
|
charset: "utf-8",
|
|
4081
4089
|
charsetSentinel: false,
|
|
4090
|
+
commaRoundTrip: false,
|
|
4082
4091
|
delimiter: "&",
|
|
4083
4092
|
encode: true,
|
|
4093
|
+
encodeDotInKeys: false,
|
|
4084
4094
|
encoder: utils$1.encode,
|
|
4085
4095
|
encodeValuesOnly: false,
|
|
4096
|
+
filter: void 0,
|
|
4086
4097
|
format: defaultFormat,
|
|
4087
4098
|
formatter: formats$1.formatters[defaultFormat],
|
|
4088
4099
|
indices: false,
|
|
@@ -4096,7 +4107,7 @@ var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
|
|
|
4096
4107
|
return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
|
|
4097
4108
|
};
|
|
4098
4109
|
var sentinel = {};
|
|
4099
|
-
var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, strictNullHandling, skipNulls, encoder, filter2, sort, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, sideChannel2) {
|
|
4110
|
+
var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate2, format, formatter, encodeValuesOnly, charset, sideChannel2) {
|
|
4100
4111
|
var obj = object;
|
|
4101
4112
|
var tmpSc = sideChannel2;
|
|
4102
4113
|
var step = 0;
|
|
@@ -4156,14 +4167,19 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
|
|
|
4156
4167
|
var keys = Object.keys(obj);
|
|
4157
4168
|
objKeys = sort ? keys.sort(sort) : keys;
|
|
4158
4169
|
}
|
|
4159
|
-
var
|
|
4170
|
+
var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix);
|
|
4171
|
+
var adjustedPrefix = commaRoundTrip && isArray$2(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
|
|
4172
|
+
if (allowEmptyArrays && isArray$2(obj) && obj.length === 0) {
|
|
4173
|
+
return adjustedPrefix + "[]";
|
|
4174
|
+
}
|
|
4160
4175
|
for (var j = 0; j < objKeys.length; ++j) {
|
|
4161
4176
|
var key = objKeys[j];
|
|
4162
|
-
var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
|
|
4177
|
+
var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key];
|
|
4163
4178
|
if (skipNulls && value === null) {
|
|
4164
4179
|
continue;
|
|
4165
4180
|
}
|
|
4166
|
-
var
|
|
4181
|
+
var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key);
|
|
4182
|
+
var keyPrefix = isArray$2(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]");
|
|
4167
4183
|
sideChannel2.set(object, step);
|
|
4168
4184
|
var valueSideChannel = getSideChannel2();
|
|
4169
4185
|
valueSideChannel.set(sentinel, sideChannel2);
|
|
@@ -4172,8 +4188,10 @@ var stringify$1 = function stringify(object, prefix, generateArrayPrefix, commaR
|
|
|
4172
4188
|
keyPrefix,
|
|
4173
4189
|
generateArrayPrefix,
|
|
4174
4190
|
commaRoundTrip,
|
|
4191
|
+
allowEmptyArrays,
|
|
4175
4192
|
strictNullHandling,
|
|
4176
4193
|
skipNulls,
|
|
4194
|
+
encodeDotInKeys,
|
|
4177
4195
|
generateArrayPrefix === "comma" && encodeValuesOnly && isArray$2(obj) ? null : encoder,
|
|
4178
4196
|
filter2,
|
|
4179
4197
|
sort,
|
|
@@ -4192,6 +4210,12 @@ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
|
|
|
4192
4210
|
if (!opts) {
|
|
4193
4211
|
return defaults$1;
|
|
4194
4212
|
}
|
|
4213
|
+
if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
|
|
4214
|
+
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
4215
|
+
}
|
|
4216
|
+
if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") {
|
|
4217
|
+
throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
4218
|
+
}
|
|
4195
4219
|
if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
|
|
4196
4220
|
throw new TypeError("Encoder has to be a function.");
|
|
4197
4221
|
}
|
|
@@ -4211,13 +4235,29 @@ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
|
|
|
4211
4235
|
if (typeof opts.filter === "function" || isArray$2(opts.filter)) {
|
|
4212
4236
|
filter2 = opts.filter;
|
|
4213
4237
|
}
|
|
4238
|
+
var arrayFormat;
|
|
4239
|
+
if (opts.arrayFormat in arrayPrefixGenerators) {
|
|
4240
|
+
arrayFormat = opts.arrayFormat;
|
|
4241
|
+
} else if ("indices" in opts) {
|
|
4242
|
+
arrayFormat = opts.indices ? "indices" : "repeat";
|
|
4243
|
+
} else {
|
|
4244
|
+
arrayFormat = defaults$1.arrayFormat;
|
|
4245
|
+
}
|
|
4246
|
+
if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
|
|
4247
|
+
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
4248
|
+
}
|
|
4249
|
+
var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults$1.allowDots : !!opts.allowDots;
|
|
4214
4250
|
return {
|
|
4215
4251
|
addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
|
|
4216
|
-
allowDots
|
|
4252
|
+
allowDots,
|
|
4253
|
+
allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults$1.allowEmptyArrays,
|
|
4254
|
+
arrayFormat,
|
|
4217
4255
|
charset,
|
|
4218
4256
|
charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults$1.charsetSentinel,
|
|
4257
|
+
commaRoundTrip: !!opts.commaRoundTrip,
|
|
4219
4258
|
delimiter: typeof opts.delimiter === "undefined" ? defaults$1.delimiter : opts.delimiter,
|
|
4220
4259
|
encode: typeof opts.encode === "boolean" ? opts.encode : defaults$1.encode,
|
|
4260
|
+
encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults$1.encodeDotInKeys,
|
|
4221
4261
|
encoder: typeof opts.encoder === "function" ? opts.encoder : defaults$1.encoder,
|
|
4222
4262
|
encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
|
|
4223
4263
|
filter: filter2,
|
|
@@ -4245,19 +4285,8 @@ var stringify_1 = function(object, opts) {
|
|
|
4245
4285
|
if (typeof obj !== "object" || obj === null) {
|
|
4246
4286
|
return "";
|
|
4247
4287
|
}
|
|
4248
|
-
var arrayFormat;
|
|
4249
|
-
|
|
4250
|
-
arrayFormat = opts.arrayFormat;
|
|
4251
|
-
} else if (opts && "indices" in opts) {
|
|
4252
|
-
arrayFormat = opts.indices ? "indices" : "repeat";
|
|
4253
|
-
} else {
|
|
4254
|
-
arrayFormat = "indices";
|
|
4255
|
-
}
|
|
4256
|
-
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
|
4257
|
-
if (opts && "commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
|
|
4258
|
-
throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
|
|
4259
|
-
}
|
|
4260
|
-
var commaRoundTrip = generateArrayPrefix === "comma" && opts && opts.commaRoundTrip;
|
|
4288
|
+
var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
|
|
4289
|
+
var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip;
|
|
4261
4290
|
if (!objKeys) {
|
|
4262
4291
|
objKeys = Object.keys(obj);
|
|
4263
4292
|
}
|
|
@@ -4267,16 +4296,19 @@ var stringify_1 = function(object, opts) {
|
|
|
4267
4296
|
var sideChannel2 = getSideChannel2();
|
|
4268
4297
|
for (var i = 0; i < objKeys.length; ++i) {
|
|
4269
4298
|
var key = objKeys[i];
|
|
4270
|
-
|
|
4299
|
+
var value = obj[key];
|
|
4300
|
+
if (options.skipNulls && value === null) {
|
|
4271
4301
|
continue;
|
|
4272
4302
|
}
|
|
4273
4303
|
pushToArray(keys, stringify$1(
|
|
4274
|
-
|
|
4304
|
+
value,
|
|
4275
4305
|
key,
|
|
4276
4306
|
generateArrayPrefix,
|
|
4277
4307
|
commaRoundTrip,
|
|
4308
|
+
options.allowEmptyArrays,
|
|
4278
4309
|
options.strictNullHandling,
|
|
4279
4310
|
options.skipNulls,
|
|
4311
|
+
options.encodeDotInKeys,
|
|
4280
4312
|
options.encode ? options.encoder : null,
|
|
4281
4313
|
options.filter,
|
|
4282
4314
|
options.sort,
|
|
@@ -4305,31 +4337,39 @@ var has = Object.prototype.hasOwnProperty;
|
|
|
4305
4337
|
var isArray$1 = Array.isArray;
|
|
4306
4338
|
var defaults = {
|
|
4307
4339
|
allowDots: false,
|
|
4340
|
+
allowEmptyArrays: false,
|
|
4308
4341
|
allowPrototypes: false,
|
|
4309
4342
|
allowSparse: false,
|
|
4310
4343
|
arrayLimit: 20,
|
|
4311
4344
|
charset: "utf-8",
|
|
4312
4345
|
charsetSentinel: false,
|
|
4313
4346
|
comma: false,
|
|
4347
|
+
decodeDotInKeys: false,
|
|
4314
4348
|
decoder: utils.decode,
|
|
4315
4349
|
delimiter: "&",
|
|
4316
4350
|
depth: 5,
|
|
4351
|
+
duplicates: "combine",
|
|
4317
4352
|
ignoreQueryPrefix: false,
|
|
4318
4353
|
interpretNumericEntities: false,
|
|
4319
4354
|
parameterLimit: 1e3,
|
|
4320
4355
|
parseArrays: true,
|
|
4321
4356
|
plainObjects: false,
|
|
4322
|
-
|
|
4357
|
+
strictDepth: false,
|
|
4358
|
+
strictNullHandling: false,
|
|
4359
|
+
throwOnLimitExceeded: false
|
|
4323
4360
|
};
|
|
4324
4361
|
var interpretNumericEntities = function(str) {
|
|
4325
4362
|
return str.replace(/&#(\d+);/g, function($0, numberStr) {
|
|
4326
4363
|
return String.fromCharCode(parseInt(numberStr, 10));
|
|
4327
4364
|
});
|
|
4328
4365
|
};
|
|
4329
|
-
var parseArrayValue = function(val, options) {
|
|
4366
|
+
var parseArrayValue = function(val, options, currentArrayLength) {
|
|
4330
4367
|
if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
|
|
4331
4368
|
return val.split(",");
|
|
4332
4369
|
}
|
|
4370
|
+
if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
|
|
4371
|
+
throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
|
|
4372
|
+
}
|
|
4333
4373
|
return val;
|
|
4334
4374
|
};
|
|
4335
4375
|
var isoSentinel = "utf8=%26%2310003%3B";
|
|
@@ -4337,8 +4377,15 @@ var charsetSentinel = "utf8=%E2%9C%93";
|
|
|
4337
4377
|
var parseValues = function parseQueryStringValues(str, options) {
|
|
4338
4378
|
var obj = { __proto__: null };
|
|
4339
4379
|
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
|
|
4340
|
-
|
|
4341
|
-
var
|
|
4380
|
+
cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
4381
|
+
var limit2 = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
|
|
4382
|
+
var parts = cleanStr.split(
|
|
4383
|
+
options.delimiter,
|
|
4384
|
+
options.throwOnLimitExceeded ? limit2 + 1 : limit2
|
|
4385
|
+
);
|
|
4386
|
+
if (options.throwOnLimitExceeded && parts.length > limit2) {
|
|
4387
|
+
throw new RangeError("Parameter limit exceeded. Only " + limit2 + " parameter" + (limit2 === 1 ? "" : "s") + " allowed.");
|
|
4388
|
+
}
|
|
4342
4389
|
var skipIndex = -1;
|
|
4343
4390
|
var i;
|
|
4344
4391
|
var charset = options.charset;
|
|
@@ -4362,51 +4409,63 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
4362
4409
|
var part = parts[i];
|
|
4363
4410
|
var bracketEqualsPos = part.indexOf("]=");
|
|
4364
4411
|
var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
|
|
4365
|
-
var key
|
|
4412
|
+
var key;
|
|
4413
|
+
var val;
|
|
4366
4414
|
if (pos === -1) {
|
|
4367
4415
|
key = options.decoder(part, defaults.decoder, charset, "key");
|
|
4368
4416
|
val = options.strictNullHandling ? null : "";
|
|
4369
4417
|
} else {
|
|
4370
4418
|
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, "key");
|
|
4371
4419
|
val = utils.maybeMap(
|
|
4372
|
-
parseArrayValue(
|
|
4420
|
+
parseArrayValue(
|
|
4421
|
+
part.slice(pos + 1),
|
|
4422
|
+
options,
|
|
4423
|
+
isArray$1(obj[key]) ? obj[key].length : 0
|
|
4424
|
+
),
|
|
4373
4425
|
function(encodedVal) {
|
|
4374
4426
|
return options.decoder(encodedVal, defaults.decoder, charset, "value");
|
|
4375
4427
|
}
|
|
4376
4428
|
);
|
|
4377
4429
|
}
|
|
4378
4430
|
if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
|
|
4379
|
-
val = interpretNumericEntities(val);
|
|
4431
|
+
val = interpretNumericEntities(String(val));
|
|
4380
4432
|
}
|
|
4381
4433
|
if (part.indexOf("[]=") > -1) {
|
|
4382
4434
|
val = isArray$1(val) ? [val] : val;
|
|
4383
4435
|
}
|
|
4384
|
-
|
|
4436
|
+
var existing = has.call(obj, key);
|
|
4437
|
+
if (existing && options.duplicates === "combine") {
|
|
4385
4438
|
obj[key] = utils.combine(obj[key], val);
|
|
4386
|
-
} else {
|
|
4439
|
+
} else if (!existing || options.duplicates === "last") {
|
|
4387
4440
|
obj[key] = val;
|
|
4388
4441
|
}
|
|
4389
4442
|
}
|
|
4390
4443
|
return obj;
|
|
4391
4444
|
};
|
|
4392
4445
|
var parseObject = function(chain, val, options, valuesParsed) {
|
|
4393
|
-
var
|
|
4446
|
+
var currentArrayLength = 0;
|
|
4447
|
+
if (chain.length > 0 && chain[chain.length - 1] === "[]") {
|
|
4448
|
+
var parentKey = chain.slice(0, -1).join("");
|
|
4449
|
+
currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
|
|
4450
|
+
}
|
|
4451
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
|
|
4394
4452
|
for (var i = chain.length - 1; i >= 0; --i) {
|
|
4395
4453
|
var obj;
|
|
4396
4454
|
var root = chain[i];
|
|
4397
4455
|
if (root === "[]" && options.parseArrays) {
|
|
4398
|
-
obj = [].
|
|
4456
|
+
obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine([], leaf);
|
|
4399
4457
|
} else {
|
|
4400
|
-
obj = options.plainObjects ?
|
|
4458
|
+
obj = options.plainObjects ? { __proto__: null } : {};
|
|
4401
4459
|
var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
|
|
4402
|
-
var
|
|
4403
|
-
|
|
4460
|
+
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot;
|
|
4461
|
+
var index = parseInt(decodedRoot, 10);
|
|
4462
|
+
if (!options.parseArrays && decodedRoot === "") {
|
|
4404
4463
|
obj = { 0: leaf };
|
|
4405
|
-
} else if (!isNaN(index) && root !==
|
|
4464
|
+
} else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
|
|
4406
4465
|
obj = [];
|
|
4407
4466
|
obj[index] = leaf;
|
|
4408
|
-
} else if (
|
|
4409
|
-
obj[
|
|
4467
|
+
} else if (decodedRoot !== "__proto__") {
|
|
4468
|
+
obj[decodedRoot] = leaf;
|
|
4410
4469
|
}
|
|
4411
4470
|
}
|
|
4412
4471
|
leaf = obj;
|
|
@@ -4442,6 +4501,9 @@ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesPars
|
|
|
4442
4501
|
keys.push(segment[1]);
|
|
4443
4502
|
}
|
|
4444
4503
|
if (segment) {
|
|
4504
|
+
if (options.strictDepth === true) {
|
|
4505
|
+
throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
|
|
4506
|
+
}
|
|
4445
4507
|
keys.push("[" + key.slice(segment.index) + "]");
|
|
4446
4508
|
}
|
|
4447
4509
|
return parseObject(keys, val, options, valuesParsed);
|
|
@@ -4450,39 +4512,58 @@ var normalizeParseOptions = function normalizeParseOptions2(opts) {
|
|
|
4450
4512
|
if (!opts) {
|
|
4451
4513
|
return defaults;
|
|
4452
4514
|
}
|
|
4453
|
-
if (
|
|
4515
|
+
if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
|
|
4516
|
+
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
4517
|
+
}
|
|
4518
|
+
if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") {
|
|
4519
|
+
throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
|
|
4520
|
+
}
|
|
4521
|
+
if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") {
|
|
4454
4522
|
throw new TypeError("Decoder has to be a function.");
|
|
4455
4523
|
}
|
|
4456
4524
|
if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
|
|
4457
4525
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
4458
4526
|
}
|
|
4527
|
+
if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") {
|
|
4528
|
+
throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
|
|
4529
|
+
}
|
|
4459
4530
|
var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset;
|
|
4531
|
+
var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates;
|
|
4532
|
+
if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") {
|
|
4533
|
+
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
4534
|
+
}
|
|
4535
|
+
var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
|
|
4460
4536
|
return {
|
|
4461
|
-
allowDots
|
|
4537
|
+
allowDots,
|
|
4538
|
+
allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
|
|
4462
4539
|
allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes,
|
|
4463
4540
|
allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse,
|
|
4464
4541
|
arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults.arrayLimit,
|
|
4465
4542
|
charset,
|
|
4466
4543
|
charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
4467
4544
|
comma: typeof opts.comma === "boolean" ? opts.comma : defaults.comma,
|
|
4545
|
+
decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
|
|
4468
4546
|
decoder: typeof opts.decoder === "function" ? opts.decoder : defaults.decoder,
|
|
4469
4547
|
delimiter: typeof opts.delimiter === "string" || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
4470
4548
|
depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults.depth,
|
|
4549
|
+
duplicates,
|
|
4471
4550
|
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
4472
4551
|
interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
4473
4552
|
parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults.parameterLimit,
|
|
4474
4553
|
parseArrays: opts.parseArrays !== false,
|
|
4475
4554
|
plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults.plainObjects,
|
|
4476
|
-
|
|
4555
|
+
strictDepth: typeof opts.strictDepth === "boolean" ? !!opts.strictDepth : defaults.strictDepth,
|
|
4556
|
+
strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults.strictNullHandling,
|
|
4557
|
+
throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false
|
|
4477
4558
|
};
|
|
4478
4559
|
};
|
|
4479
4560
|
var parse$1 = function(str, opts) {
|
|
4480
4561
|
var options = normalizeParseOptions(opts);
|
|
4481
4562
|
if (str === "" || str === null || typeof str === "undefined") {
|
|
4482
|
-
return options.plainObjects ?
|
|
4563
|
+
return options.plainObjects ? { __proto__: null } : {};
|
|
4483
4564
|
}
|
|
4484
4565
|
var tempObj = typeof str === "string" ? parseValues(str, options) : str;
|
|
4485
|
-
var obj = options.plainObjects ?
|
|
4566
|
+
var obj = options.plainObjects ? { __proto__: null } : {};
|
|
4486
4567
|
var keys = Object.keys(tempObj);
|
|
4487
4568
|
for (var i = 0; i < keys.length; ++i) {
|
|
4488
4569
|
var key = keys[i];
|
|
@@ -4502,6 +4583,7 @@ var lib = {
|
|
|
4502
4583
|
parse,
|
|
4503
4584
|
stringify: stringify2
|
|
4504
4585
|
};
|
|
4586
|
+
var qs = lib;
|
|
4505
4587
|
function getUrlParams() {
|
|
4506
4588
|
const url = location.search;
|
|
4507
4589
|
const theRequest = new Object();
|
|
@@ -4535,22 +4617,29 @@ const CONTENT_TYPE = {
|
|
|
4535
4617
|
};
|
|
4536
4618
|
const TOKEN_KEY = "v8-token";
|
|
4537
4619
|
const TOKEN_KEY_IBP = "lambo-token";
|
|
4620
|
+
function isHb$3() {
|
|
4621
|
+
return window.location.pathname.includes("scyxweb");
|
|
4622
|
+
}
|
|
4538
4623
|
function setToken(token) {
|
|
4539
|
-
setLocalStorage(TOKEN_KEY, token);
|
|
4540
4624
|
setSessionStorage(TOKEN_KEY_IBP, token);
|
|
4541
|
-
|
|
4542
|
-
|
|
4625
|
+
if (!isHb$3) {
|
|
4626
|
+
setLocalStorage(TOKEN_KEY, token);
|
|
4627
|
+
Cookie.set("TOKEN_KEY", token, 1);
|
|
4628
|
+
Cookie.set("lambo-sso-key", token, 1);
|
|
4629
|
+
}
|
|
4543
4630
|
}
|
|
4544
4631
|
function getToken() {
|
|
4545
4632
|
let token = getSessionStorage(TOKEN_KEY_IBP);
|
|
4546
|
-
if (!
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4633
|
+
if (!isHb$3) {
|
|
4634
|
+
if (!token) {
|
|
4635
|
+
token = Cookie.get("lambo-sso-key");
|
|
4636
|
+
}
|
|
4637
|
+
if (!token) {
|
|
4638
|
+
token = Cookie.get("TOKEN_KEY");
|
|
4639
|
+
}
|
|
4640
|
+
if (!token) {
|
|
4641
|
+
token = getLocalStorage(TOKEN_KEY);
|
|
4642
|
+
}
|
|
4554
4643
|
}
|
|
4555
4644
|
return token || false;
|
|
4556
4645
|
}
|
|
@@ -4661,7 +4750,7 @@ function requestInterceptors(config2) {
|
|
|
4661
4750
|
const contentType = getContentType(config2.headers);
|
|
4662
4751
|
if (config2.method === "post") {
|
|
4663
4752
|
if (contentType === CONTENT_TYPE.form) {
|
|
4664
|
-
config2.data =
|
|
4753
|
+
config2.data = qs.stringify(config2.data);
|
|
4665
4754
|
}
|
|
4666
4755
|
}
|
|
4667
4756
|
return config2;
|
|
@@ -10323,22 +10412,22 @@ var lodash = { exports: {} };
|
|
|
10323
10412
|
var snakeCase = createCompounder(function(result2, word, index) {
|
|
10324
10413
|
return result2 + (index ? "_" : "") + word.toLowerCase();
|
|
10325
10414
|
});
|
|
10326
|
-
function split(string, separator,
|
|
10327
|
-
if (
|
|
10328
|
-
separator =
|
|
10415
|
+
function split(string, separator, limit2) {
|
|
10416
|
+
if (limit2 && typeof limit2 != "number" && isIterateeCall(string, separator, limit2)) {
|
|
10417
|
+
separator = limit2 = undefined$12;
|
|
10329
10418
|
}
|
|
10330
|
-
|
|
10331
|
-
if (!
|
|
10419
|
+
limit2 = limit2 === undefined$12 ? MAX_ARRAY_LENGTH : limit2 >>> 0;
|
|
10420
|
+
if (!limit2) {
|
|
10332
10421
|
return [];
|
|
10333
10422
|
}
|
|
10334
10423
|
string = toString3(string);
|
|
10335
10424
|
if (string && (typeof separator == "string" || separator != null && !isRegExp3(separator))) {
|
|
10336
10425
|
separator = baseToString(separator);
|
|
10337
10426
|
if (!separator && hasUnicode(string)) {
|
|
10338
|
-
return castSlice(stringToArray(string), 0,
|
|
10427
|
+
return castSlice(stringToArray(string), 0, limit2);
|
|
10339
10428
|
}
|
|
10340
10429
|
}
|
|
10341
|
-
return string.split(separator,
|
|
10430
|
+
return string.split(separator, limit2);
|
|
10342
10431
|
}
|
|
10343
10432
|
var startCase = createCompounder(function(result2, word, index) {
|
|
10344
10433
|
return result2 + (index ? " " : "") + upperFirst(word);
|