apify-client 2.23.5-beta.32 → 2.23.5-beta.34
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/dist/bundle.js +383 -112
- package/dist/bundle.js.map +1 -1
- package/package.json +2 -2
package/dist/bundle.js
CHANGED
|
@@ -18122,7 +18122,7 @@ function isStream(value) {
|
|
|
18122
18122
|
function getVersionData() {
|
|
18123
18123
|
if (true) {
|
|
18124
18124
|
return {
|
|
18125
|
-
version: "2.23.5-beta.
|
|
18125
|
+
version: "2.23.5-beta.34"
|
|
18126
18126
|
};
|
|
18127
18127
|
}
|
|
18128
18128
|
// eslint-disable-next-line
|
|
@@ -22098,11 +22098,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22098
22098
|
/* import */ var _utils_js__rspack_import_0 = __webpack_require__(7275);
|
|
22099
22099
|
/* import */ var _core_AxiosError_js__rspack_import_2 = __webpack_require__(4062);
|
|
22100
22100
|
/* import */ var _helpers_composeSignals_js__rspack_import_4 = __webpack_require__(2723);
|
|
22101
|
-
/* import */ var
|
|
22102
|
-
/* import */ var
|
|
22103
|
-
/* import */ var
|
|
22101
|
+
/* import */ var _helpers_trackStream_js__rspack_import_6 = __webpack_require__(1791);
|
|
22102
|
+
/* import */ var _core_AxiosHeaders_js__rspack_import_10 = __webpack_require__(7110);
|
|
22103
|
+
/* import */ var _helpers_progressEventReducer_js__rspack_import_7 = __webpack_require__(7837);
|
|
22104
22104
|
/* import */ var _helpers_resolveConfig_js__rspack_import_3 = __webpack_require__(8382);
|
|
22105
|
-
/* import */ var
|
|
22105
|
+
/* import */ var _core_settle_js__rspack_import_11 = __webpack_require__(3853);
|
|
22106
22106
|
/* import */ var _helpers_estimateDataURLDecodedBytes_js__rspack_import_5 = __webpack_require__(1526);
|
|
22107
22107
|
/* import */ var _env_data_js__rspack_import_8 = __webpack_require__(9888);
|
|
22108
22108
|
/* import */ var _helpers_sanitizeHeaderValue_js__rspack_import_9 = __webpack_require__(8267);
|
|
@@ -22338,14 +22338,28 @@ const factory = (env) => {
|
|
|
22338
22338
|
|
|
22339
22339
|
let requestContentLength;
|
|
22340
22340
|
|
|
22341
|
+
// AxiosError we raise while the request body is being streamed. Captured
|
|
22342
|
+
// by identity so the catch block can surface it directly, regardless of
|
|
22343
|
+
// how the runtime wraps the resulting fetch rejection (undici exposes it
|
|
22344
|
+
// as `err.cause`; some browsers drop the original error entirely).
|
|
22345
|
+
let pendingBodyError = null;
|
|
22346
|
+
|
|
22347
|
+
const maxBodyLengthError = () =>
|
|
22348
|
+
new _core_AxiosError_js__rspack_import_2["default"](
|
|
22349
|
+
'Request body larger than maxBodyLength limit',
|
|
22350
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_BAD_REQUEST,
|
|
22351
|
+
config,
|
|
22352
|
+
request
|
|
22353
|
+
);
|
|
22354
|
+
|
|
22341
22355
|
try {
|
|
22342
22356
|
// HTTP basic authentication
|
|
22343
22357
|
let auth = undefined;
|
|
22344
22358
|
const configAuth = own('auth');
|
|
22345
22359
|
|
|
22346
22360
|
if (configAuth) {
|
|
22347
|
-
const username = configAuth
|
|
22348
|
-
const password = configAuth
|
|
22361
|
+
const username = _utils_js__rspack_import_0["default"].getSafeProp(configAuth, 'username') || '';
|
|
22362
|
+
const password = _utils_js__rspack_import_0["default"].getSafeProp(configAuth, 'password') || '';
|
|
22349
22363
|
auth = {
|
|
22350
22364
|
username,
|
|
22351
22365
|
password
|
|
@@ -22394,53 +22408,96 @@ const factory = (env) => {
|
|
|
22394
22408
|
}
|
|
22395
22409
|
}
|
|
22396
22410
|
|
|
22397
|
-
// Enforce maxBodyLength against
|
|
22398
|
-
//
|
|
22399
|
-
//
|
|
22400
|
-
//
|
|
22411
|
+
// Enforce maxBodyLength against known-size bodies before dispatch using
|
|
22412
|
+
// the body's *actual* size — never a caller-declared Content-Length,
|
|
22413
|
+
// which could under-report to slip an oversized body past the check.
|
|
22414
|
+
// Unknown-size streams return undefined here and are counted per-chunk
|
|
22415
|
+
// below as fetch consumes them.
|
|
22401
22416
|
if (hasMaxBodyLength && method !== 'get' && method !== 'head') {
|
|
22402
|
-
const outboundLength = await
|
|
22403
|
-
if (
|
|
22404
|
-
|
|
22405
|
-
|
|
22406
|
-
|
|
22407
|
-
|
|
22408
|
-
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
22409
|
-
'Request body larger than maxBodyLength limit',
|
|
22410
|
-
_core_AxiosError_js__rspack_import_2["default"].ERR_BAD_REQUEST,
|
|
22411
|
-
config,
|
|
22412
|
-
request
|
|
22413
|
-
);
|
|
22417
|
+
const outboundLength = await getBodyLength(data);
|
|
22418
|
+
if (typeof outboundLength === 'number' && isFinite(outboundLength)) {
|
|
22419
|
+
requestContentLength = outboundLength;
|
|
22420
|
+
if (outboundLength > maxBodyLength) {
|
|
22421
|
+
throw maxBodyLengthError();
|
|
22422
|
+
}
|
|
22414
22423
|
}
|
|
22415
22424
|
}
|
|
22416
22425
|
|
|
22426
|
+
// A streamed body under maxBodyLength must be counted as fetch consumes
|
|
22427
|
+
// it; its size is never trusted from a caller-declared Content-Length.
|
|
22428
|
+
const mustEnforceStreamBody =
|
|
22429
|
+
hasMaxBodyLength && (_utils_js__rspack_import_0["default"].isReadableStream(data) || _utils_js__rspack_import_0["default"].isStream(data));
|
|
22430
|
+
|
|
22431
|
+
const trackRequestStream = (stream, onProgress, flush) =>
|
|
22432
|
+
(0,_helpers_trackStream_js__rspack_import_6.trackStream)(
|
|
22433
|
+
stream,
|
|
22434
|
+
DEFAULT_CHUNK_SIZE,
|
|
22435
|
+
(loadedBytes) => {
|
|
22436
|
+
if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
|
|
22437
|
+
throw (pendingBodyError = maxBodyLengthError());
|
|
22438
|
+
}
|
|
22439
|
+
onProgress && onProgress(loadedBytes);
|
|
22440
|
+
},
|
|
22441
|
+
flush
|
|
22442
|
+
);
|
|
22443
|
+
|
|
22417
22444
|
if (
|
|
22418
|
-
onUploadProgress &&
|
|
22419
22445
|
supportsRequestStream &&
|
|
22420
22446
|
method !== 'get' &&
|
|
22421
22447
|
method !== 'head' &&
|
|
22422
|
-
(
|
|
22448
|
+
(onUploadProgress || mustEnforceStreamBody)
|
|
22423
22449
|
) {
|
|
22424
|
-
|
|
22425
|
-
|
|
22426
|
-
|
|
22427
|
-
|
|
22428
|
-
|
|
22450
|
+
requestContentLength =
|
|
22451
|
+
requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
|
|
22452
|
+
|
|
22453
|
+
// A declared length of 0 is only trusted to skip the wrap when we are
|
|
22454
|
+
// not enforcing a stream limit (which must not rely on that header).
|
|
22455
|
+
if (requestContentLength !== 0 || mustEnforceStreamBody) {
|
|
22456
|
+
let _request = new Request(url, {
|
|
22457
|
+
method: 'POST',
|
|
22458
|
+
body: data,
|
|
22459
|
+
duplex: 'half',
|
|
22460
|
+
});
|
|
22429
22461
|
|
|
22430
|
-
|
|
22462
|
+
let contentTypeHeader;
|
|
22431
22463
|
|
|
22432
|
-
|
|
22433
|
-
|
|
22434
|
-
|
|
22464
|
+
if (_utils_js__rspack_import_0["default"].isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
22465
|
+
headers.setContentType(contentTypeHeader);
|
|
22466
|
+
}
|
|
22435
22467
|
|
|
22436
|
-
|
|
22437
|
-
|
|
22438
|
-
|
|
22439
|
-
|
|
22440
|
-
|
|
22468
|
+
if (_request.body) {
|
|
22469
|
+
const [onProgress, flush] =
|
|
22470
|
+
(onUploadProgress &&
|
|
22471
|
+
(0,_helpers_progressEventReducer_js__rspack_import_7.progressEventDecorator)(
|
|
22472
|
+
requestContentLength,
|
|
22473
|
+
(0,_helpers_progressEventReducer_js__rspack_import_7.progressEventReducer)((0,_helpers_progressEventReducer_js__rspack_import_7.asyncDecorator)(onUploadProgress))
|
|
22474
|
+
)) ||
|
|
22475
|
+
[];
|
|
22441
22476
|
|
|
22442
|
-
|
|
22477
|
+
data = trackRequestStream(_request.body, onProgress, flush);
|
|
22478
|
+
}
|
|
22443
22479
|
}
|
|
22480
|
+
} else if (
|
|
22481
|
+
mustEnforceStreamBody &&
|
|
22482
|
+
!isRequestSupported &&
|
|
22483
|
+
isReadableStreamSupported &&
|
|
22484
|
+
method !== 'get' &&
|
|
22485
|
+
method !== 'head'
|
|
22486
|
+
) {
|
|
22487
|
+
data = trackRequestStream(data);
|
|
22488
|
+
} else if (
|
|
22489
|
+
mustEnforceStreamBody &&
|
|
22490
|
+
isRequestSupported &&
|
|
22491
|
+
!supportsRequestStream &&
|
|
22492
|
+
method !== 'get' &&
|
|
22493
|
+
method !== 'head'
|
|
22494
|
+
) {
|
|
22495
|
+
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
22496
|
+
'Stream request bodies are not supported by the current fetch implementation',
|
|
22497
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_NOT_SUPPORT,
|
|
22498
|
+
config,
|
|
22499
|
+
request
|
|
22500
|
+
);
|
|
22444
22501
|
}
|
|
22445
22502
|
|
|
22446
22503
|
if (!_utils_js__rspack_import_0["default"].isString(withCredentials)) {
|
|
@@ -22483,10 +22540,12 @@ const factory = (env) => {
|
|
|
22483
22540
|
? _fetch(request, fetchOptions)
|
|
22484
22541
|
: _fetch(url, resolvedOptions));
|
|
22485
22542
|
|
|
22543
|
+
const responseHeaders = _core_AxiosHeaders_js__rspack_import_10["default"].from(response.headers);
|
|
22544
|
+
|
|
22486
22545
|
// Cheap pre-check: if the server honestly declares a content-length that
|
|
22487
22546
|
// already exceeds the cap, reject before we start streaming.
|
|
22488
22547
|
if (hasMaxContentLength) {
|
|
22489
|
-
const declaredLength = _utils_js__rspack_import_0["default"].toFiniteNumber(
|
|
22548
|
+
const declaredLength = _utils_js__rspack_import_0["default"].toFiniteNumber(responseHeaders.getContentLength());
|
|
22490
22549
|
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
22491
22550
|
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
22492
22551
|
'maxContentLength size of ' + maxContentLength + ' exceeded',
|
|
@@ -22511,13 +22570,13 @@ const factory = (env) => {
|
|
|
22511
22570
|
options[prop] = response[prop];
|
|
22512
22571
|
});
|
|
22513
22572
|
|
|
22514
|
-
const responseContentLength = _utils_js__rspack_import_0["default"].toFiniteNumber(
|
|
22573
|
+
const responseContentLength = _utils_js__rspack_import_0["default"].toFiniteNumber(responseHeaders.getContentLength());
|
|
22515
22574
|
|
|
22516
22575
|
const [onProgress, flush] =
|
|
22517
22576
|
(onDownloadProgress &&
|
|
22518
|
-
(0,
|
|
22577
|
+
(0,_helpers_progressEventReducer_js__rspack_import_7.progressEventDecorator)(
|
|
22519
22578
|
responseContentLength,
|
|
22520
|
-
(0,
|
|
22579
|
+
(0,_helpers_progressEventReducer_js__rspack_import_7.progressEventReducer)((0,_helpers_progressEventReducer_js__rspack_import_7.asyncDecorator)(onDownloadProgress), true)
|
|
22521
22580
|
)) ||
|
|
22522
22581
|
[];
|
|
22523
22582
|
|
|
@@ -22538,7 +22597,7 @@ const factory = (env) => {
|
|
|
22538
22597
|
};
|
|
22539
22598
|
|
|
22540
22599
|
response = new Response(
|
|
22541
|
-
(0,
|
|
22600
|
+
(0,_helpers_trackStream_js__rspack_import_6.trackStream)(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
|
|
22542
22601
|
flush && flush();
|
|
22543
22602
|
unsubscribe && unsubscribe();
|
|
22544
22603
|
}),
|
|
@@ -22583,9 +22642,9 @@ const factory = (env) => {
|
|
|
22583
22642
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
22584
22643
|
|
|
22585
22644
|
return await new Promise((resolve, reject) => {
|
|
22586
|
-
(0,
|
|
22645
|
+
(0,_core_settle_js__rspack_import_11["default"])(resolve, reject, {
|
|
22587
22646
|
data: responseData,
|
|
22588
|
-
headers:
|
|
22647
|
+
headers: _core_AxiosHeaders_js__rspack_import_10["default"].from(response.headers),
|
|
22589
22648
|
status: response.status,
|
|
22590
22649
|
statusText: response.statusText,
|
|
22591
22650
|
config,
|
|
@@ -22606,6 +22665,23 @@ const factory = (env) => {
|
|
|
22606
22665
|
throw canceledError;
|
|
22607
22666
|
}
|
|
22608
22667
|
|
|
22668
|
+
// Surface a maxBodyLength violation we raised while the request body was
|
|
22669
|
+
// being streamed. Matching by identity (rather than reading
|
|
22670
|
+
// `err.cause.isAxiosError`) keeps the error deterministic across runtimes
|
|
22671
|
+
// and avoids both prototype-pollution reads and mis-attributing a foreign
|
|
22672
|
+
// AxiosError that merely happened to land in `err.cause`.
|
|
22673
|
+
if (pendingBodyError) {
|
|
22674
|
+
request && !pendingBodyError.request && (pendingBodyError.request = request);
|
|
22675
|
+
throw pendingBodyError;
|
|
22676
|
+
}
|
|
22677
|
+
|
|
22678
|
+
// Re-throw AxiosErrors we raised synchronously (data: URL / content-length
|
|
22679
|
+
// pre-checks, response size enforcement) without re-wrapping them.
|
|
22680
|
+
if (err instanceof _core_AxiosError_js__rspack_import_2["default"]) {
|
|
22681
|
+
request && !err.request && (err.request = request);
|
|
22682
|
+
throw err;
|
|
22683
|
+
}
|
|
22684
|
+
|
|
22609
22685
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
|
22610
22686
|
throw Object.assign(
|
|
22611
22687
|
new _core_AxiosError_js__rspack_import_2["default"](
|
|
@@ -23341,6 +23417,7 @@ class Axios {
|
|
|
23341
23417
|
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
23342
23418
|
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
23343
23419
|
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
|
|
23420
|
+
validateStatusUndefinedResolves: validators.transitional(validators.boolean),
|
|
23344
23421
|
},
|
|
23345
23422
|
false
|
|
23346
23423
|
);
|
|
@@ -23472,7 +23549,7 @@ class Axios {
|
|
|
23472
23549
|
|
|
23473
23550
|
getUri(config) {
|
|
23474
23551
|
config = (0,_mergeConfig_js__rspack_import_2["default"])(this.defaults, config);
|
|
23475
|
-
const fullPath = (0,_buildFullPath_js__rspack_import_7["default"])(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
23552
|
+
const fullPath = (0,_buildFullPath_js__rspack_import_7["default"])(config.baseURL, config.url, config.allowAbsoluteUrls, config);
|
|
23476
23553
|
return (0,_helpers_buildURL_js__rspack_import_8["default"])(fullPath, config.params, config.paramsSerializer);
|
|
23477
23554
|
}
|
|
23478
23555
|
}
|
|
@@ -23485,7 +23562,7 @@ _utils_js__rspack_import_3["default"].forEach(['delete', 'get', 'head', 'options
|
|
|
23485
23562
|
(0,_mergeConfig_js__rspack_import_2["default"])(config || {}, {
|
|
23486
23563
|
method,
|
|
23487
23564
|
url,
|
|
23488
|
-
data: (config
|
|
23565
|
+
data: config && _utils_js__rspack_import_3["default"].hasOwnProp(config, 'data') ? config.data : undefined,
|
|
23489
23566
|
})
|
|
23490
23567
|
);
|
|
23491
23568
|
};
|
|
@@ -23835,8 +23912,8 @@ class AxiosHeaders {
|
|
|
23835
23912
|
setHeaders(header, valueOrRewrite);
|
|
23836
23913
|
} else if (_utils_js__rspack_import_0["default"].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
23837
23914
|
setHeaders((0,_helpers_parseHeaders_js__rspack_import_2["default"])(header), valueOrRewrite);
|
|
23838
|
-
} else if (_utils_js__rspack_import_0["default"].isObject(header) && _utils_js__rspack_import_0["default"].
|
|
23839
|
-
let obj =
|
|
23915
|
+
} else if (_utils_js__rspack_import_0["default"].isObject(header) && _utils_js__rspack_import_0["default"].isSafeIterable(header)) {
|
|
23916
|
+
let obj = Object.create(null),
|
|
23840
23917
|
dest,
|
|
23841
23918
|
key;
|
|
23842
23919
|
for (const entry of header) {
|
|
@@ -23844,11 +23921,14 @@ class AxiosHeaders {
|
|
|
23844
23921
|
throw new TypeError('Object iterator must return a key-value pair');
|
|
23845
23922
|
}
|
|
23846
23923
|
|
|
23847
|
-
|
|
23848
|
-
|
|
23849
|
-
|
|
23850
|
-
|
|
23851
|
-
: entry[1];
|
|
23924
|
+
key = entry[0];
|
|
23925
|
+
|
|
23926
|
+
if (_utils_js__rspack_import_0["default"].hasOwnProp(obj, key)) {
|
|
23927
|
+
dest = obj[key];
|
|
23928
|
+
obj[key] = _utils_js__rspack_import_0["default"].isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
|
|
23929
|
+
} else {
|
|
23930
|
+
obj[key] = entry[1];
|
|
23931
|
+
}
|
|
23852
23932
|
}
|
|
23853
23933
|
|
|
23854
23934
|
setHeaders(obj, valueOrRewrite);
|
|
@@ -24165,12 +24245,39 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24165
24245
|
8262(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
24166
24246
|
"use strict";
|
|
24167
24247
|
__webpack_require__.r(__webpack_exports__);
|
|
24168
|
-
/* import */ var
|
|
24169
|
-
/* import */ var
|
|
24248
|
+
/* import */ var _AxiosError_js__rspack_import_0 = __webpack_require__(4062);
|
|
24249
|
+
/* import */ var _helpers_isAbsoluteURL_js__rspack_import_1 = __webpack_require__(9034);
|
|
24250
|
+
/* import */ var _helpers_combineURLs_js__rspack_import_2 = __webpack_require__(6787);
|
|
24251
|
+
|
|
24252
|
+
|
|
24170
24253
|
|
|
24171
24254
|
|
|
24172
24255
|
|
|
24173
24256
|
|
|
24257
|
+
const malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
24258
|
+
const httpProtocolControlCharacters = /[\t\n\r]/g;
|
|
24259
|
+
|
|
24260
|
+
function stripLeadingC0ControlOrSpace(url) {
|
|
24261
|
+
let i = 0;
|
|
24262
|
+
while (i < url.length && url.charCodeAt(i) <= 0x20) {
|
|
24263
|
+
i++;
|
|
24264
|
+
}
|
|
24265
|
+
return url.slice(i);
|
|
24266
|
+
}
|
|
24267
|
+
|
|
24268
|
+
function normalizeURLForProtocolCheck(url) {
|
|
24269
|
+
return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, '');
|
|
24270
|
+
}
|
|
24271
|
+
|
|
24272
|
+
function assertValidHttpProtocolURL(url, config) {
|
|
24273
|
+
if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
|
|
24274
|
+
throw new _AxiosError_js__rspack_import_0["default"](
|
|
24275
|
+
'Invalid URL: missing "//" after protocol',
|
|
24276
|
+
_AxiosError_js__rspack_import_0["default"].ERR_INVALID_URL,
|
|
24277
|
+
config
|
|
24278
|
+
);
|
|
24279
|
+
}
|
|
24280
|
+
}
|
|
24174
24281
|
|
|
24175
24282
|
/**
|
|
24176
24283
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
@@ -24182,10 +24289,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24182
24289
|
*
|
|
24183
24290
|
* @returns {string} The combined full path
|
|
24184
24291
|
*/
|
|
24185
|
-
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
24186
|
-
|
|
24292
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
24293
|
+
assertValidHttpProtocolURL(requestedURL, config);
|
|
24294
|
+
let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__rspack_import_1["default"])(requestedURL);
|
|
24187
24295
|
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
24188
|
-
|
|
24296
|
+
assertValidHttpProtocolURL(baseURL, config);
|
|
24297
|
+
return (0,_helpers_combineURLs_js__rspack_import_2["default"])(baseURL, requestedURL);
|
|
24189
24298
|
}
|
|
24190
24299
|
return requestedURL;
|
|
24191
24300
|
}
|
|
@@ -24376,6 +24485,28 @@ function mergeConfig(config1, config2) {
|
|
|
24376
24485
|
}
|
|
24377
24486
|
}
|
|
24378
24487
|
|
|
24488
|
+
function getMergedTransitionalOption(prop) {
|
|
24489
|
+
const transitional2 = _utils_js__rspack_import_1["default"].hasOwnProp(config2, 'transitional') ? config2.transitional : undefined;
|
|
24490
|
+
|
|
24491
|
+
if (!_utils_js__rspack_import_1["default"].isUndefined(transitional2)) {
|
|
24492
|
+
if (_utils_js__rspack_import_1["default"].isPlainObject(transitional2)) {
|
|
24493
|
+
if (_utils_js__rspack_import_1["default"].hasOwnProp(transitional2, prop)) {
|
|
24494
|
+
return transitional2[prop];
|
|
24495
|
+
}
|
|
24496
|
+
} else {
|
|
24497
|
+
return undefined;
|
|
24498
|
+
}
|
|
24499
|
+
}
|
|
24500
|
+
|
|
24501
|
+
const transitional1 = _utils_js__rspack_import_1["default"].hasOwnProp(config1, 'transitional') ? config1.transitional : undefined;
|
|
24502
|
+
|
|
24503
|
+
if (_utils_js__rspack_import_1["default"].isPlainObject(transitional1) && _utils_js__rspack_import_1["default"].hasOwnProp(transitional1, prop)) {
|
|
24504
|
+
return transitional1[prop];
|
|
24505
|
+
}
|
|
24506
|
+
|
|
24507
|
+
return undefined;
|
|
24508
|
+
}
|
|
24509
|
+
|
|
24379
24510
|
// eslint-disable-next-line consistent-return
|
|
24380
24511
|
function mergeDirectKeys(a, b, prop) {
|
|
24381
24512
|
if (_utils_js__rspack_import_1["default"].hasOwnProp(config2, prop)) {
|
|
@@ -24428,6 +24559,18 @@ function mergeConfig(config1, config2) {
|
|
|
24428
24559
|
(_utils_js__rspack_import_1["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
24429
24560
|
});
|
|
24430
24561
|
|
|
24562
|
+
if (
|
|
24563
|
+
_utils_js__rspack_import_1["default"].hasOwnProp(config2, 'validateStatus') &&
|
|
24564
|
+
_utils_js__rspack_import_1["default"].isUndefined(config2.validateStatus) &&
|
|
24565
|
+
getMergedTransitionalOption('validateStatusUndefinedResolves') === false
|
|
24566
|
+
) {
|
|
24567
|
+
if (_utils_js__rspack_import_1["default"].hasOwnProp(config1, 'validateStatus')) {
|
|
24568
|
+
config.validateStatus = getMergedValue(undefined, config1.validateStatus);
|
|
24569
|
+
} else {
|
|
24570
|
+
delete config.validateStatus;
|
|
24571
|
+
}
|
|
24572
|
+
}
|
|
24573
|
+
|
|
24431
24574
|
return config;
|
|
24432
24575
|
}
|
|
24433
24576
|
|
|
@@ -24722,6 +24865,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24722
24865
|
clarifyTimeoutError: false,
|
|
24723
24866
|
legacyInterceptorReqResOrdering: true,
|
|
24724
24867
|
advertiseZstdAcceptEncoding: false,
|
|
24868
|
+
validateStatusUndefinedResolves: true,
|
|
24725
24869
|
});
|
|
24726
24870
|
|
|
24727
24871
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -24734,7 +24878,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24734
24878
|
9888(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
24735
24879
|
"use strict";
|
|
24736
24880
|
__webpack_require__.r(__webpack_exports__);
|
|
24737
|
-
const VERSION = "1.
|
|
24881
|
+
const VERSION = "1.18.0";
|
|
24738
24882
|
__webpack_require__.d(__webpack_exports__, {
|
|
24739
24883
|
}, {
|
|
24740
24884
|
VERSION: VERSION
|
|
@@ -24967,15 +25111,17 @@ function buildURL(url, params, options) {
|
|
|
24967
25111
|
return url;
|
|
24968
25112
|
}
|
|
24969
25113
|
|
|
24970
|
-
const _encode = (options && options.encode) || encode;
|
|
24971
|
-
|
|
24972
25114
|
const _options = _utils_js__rspack_import_0["default"].isFunction(options)
|
|
24973
25115
|
? {
|
|
24974
25116
|
serialize: options,
|
|
24975
25117
|
}
|
|
24976
25118
|
: options;
|
|
24977
25119
|
|
|
24978
|
-
|
|
25120
|
+
// Read serializer options pollution-safely: own properties and methods on a
|
|
25121
|
+
// class/template prototype are honored, but values injected onto a polluted
|
|
25122
|
+
// Object.prototype are ignored.
|
|
25123
|
+
const _encode = _utils_js__rspack_import_0["default"].getSafeProp(_options, 'encode') || encode;
|
|
25124
|
+
const serializeFn = _utils_js__rspack_import_0["default"].getSafeProp(_options, 'serialize');
|
|
24979
25125
|
|
|
24980
25126
|
let serializedParams;
|
|
24981
25127
|
|
|
@@ -25178,16 +25324,23 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
25178
25324
|
1526(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25179
25325
|
"use strict";
|
|
25180
25326
|
__webpack_require__.r(__webpack_exports__);
|
|
25181
|
-
/* provided dependency */ var Buffer = __webpack_require__(8287).Buffer;
|
|
25182
25327
|
/**
|
|
25183
25328
|
* Estimate decoded byte length of a data:// URL *without* allocating large buffers.
|
|
25184
25329
|
* - For base64: compute exact decoded size using length and padding;
|
|
25185
25330
|
* handle %XX at the character-count level (no string allocation).
|
|
25186
|
-
* - For non-base64:
|
|
25331
|
+
* - For non-base64: compute the exact percent-decoded UTF-8 byte length.
|
|
25187
25332
|
*
|
|
25188
25333
|
* @param {string} url
|
|
25189
25334
|
* @returns {number}
|
|
25190
25335
|
*/
|
|
25336
|
+
const isHexDigit = (charCode) =>
|
|
25337
|
+
(charCode >= 48 && charCode <= 57) ||
|
|
25338
|
+
(charCode >= 65 && charCode <= 70) ||
|
|
25339
|
+
(charCode >= 97 && charCode <= 102);
|
|
25340
|
+
|
|
25341
|
+
const isPercentEncodedByte = (str, i, len) =>
|
|
25342
|
+
i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
25343
|
+
|
|
25191
25344
|
function estimateDataURLDecodedBytes(url) {
|
|
25192
25345
|
if (!url || typeof url !== 'string') return 0;
|
|
25193
25346
|
if (!url.startsWith('data:')) return 0;
|
|
@@ -25207,9 +25360,7 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
25207
25360
|
if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
|
|
25208
25361
|
const a = body.charCodeAt(i + 1);
|
|
25209
25362
|
const b = body.charCodeAt(i + 2);
|
|
25210
|
-
const isHex =
|
|
25211
|
-
((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
|
|
25212
|
-
((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
|
|
25363
|
+
const isHex = isHexDigit(a) && isHexDigit(b);
|
|
25213
25364
|
|
|
25214
25365
|
if (isHex) {
|
|
25215
25366
|
effectiveLen -= 2;
|
|
@@ -25250,18 +25401,17 @@ function estimateDataURLDecodedBytes(url) {
|
|
|
25250
25401
|
return bytes > 0 ? bytes : 0;
|
|
25251
25402
|
}
|
|
25252
25403
|
|
|
25253
|
-
if (typeof Buffer !== 'undefined' && typeof Buffer.byteLength === 'function') {
|
|
25254
|
-
return Buffer.byteLength(body, 'utf8');
|
|
25255
|
-
}
|
|
25256
|
-
|
|
25257
25404
|
// Compute UTF-8 byte length directly from UTF-16 code units without allocating
|
|
25258
25405
|
// a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).
|
|
25259
|
-
//
|
|
25260
|
-
//
|
|
25406
|
+
// Valid %XX triplets count as one decoded byte; this matches the bytes that
|
|
25407
|
+
// decodeURIComponent(body) would produce before Buffer re-encodes the string.
|
|
25261
25408
|
let bytes = 0;
|
|
25262
25409
|
for (let i = 0, len = body.length; i < len; i++) {
|
|
25263
25410
|
const c = body.charCodeAt(i);
|
|
25264
|
-
if (c
|
|
25411
|
+
if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {
|
|
25412
|
+
bytes += 1;
|
|
25413
|
+
i += 2;
|
|
25414
|
+
} else if (c < 0x80) {
|
|
25265
25415
|
bytes += 1;
|
|
25266
25416
|
} else if (c < 0x800) {
|
|
25267
25417
|
bytes += 2;
|
|
@@ -25289,10 +25439,25 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
25289
25439
|
7887(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
25290
25440
|
"use strict";
|
|
25291
25441
|
__webpack_require__.r(__webpack_exports__);
|
|
25292
|
-
/* import */ var
|
|
25442
|
+
/* import */ var _utils_js__rspack_import_2 = __webpack_require__(7275);
|
|
25443
|
+
/* import */ var _core_AxiosError_js__rspack_import_1 = __webpack_require__(4062);
|
|
25444
|
+
/* import */ var _toFormData_js__rspack_import_0 = __webpack_require__(665);
|
|
25445
|
+
|
|
25446
|
+
|
|
25447
|
+
|
|
25293
25448
|
|
|
25294
25449
|
|
|
25295
25450
|
|
|
25451
|
+
const MAX_DEPTH = _toFormData_js__rspack_import_0.DEFAULT_FORM_DATA_MAX_DEPTH;
|
|
25452
|
+
|
|
25453
|
+
function throwIfDepthExceeded(index) {
|
|
25454
|
+
if (index > MAX_DEPTH) {
|
|
25455
|
+
throw new _core_AxiosError_js__rspack_import_1["default"](
|
|
25456
|
+
'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,
|
|
25457
|
+
_core_AxiosError_js__rspack_import_1["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
25458
|
+
);
|
|
25459
|
+
}
|
|
25460
|
+
}
|
|
25296
25461
|
|
|
25297
25462
|
/**
|
|
25298
25463
|
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
@@ -25306,9 +25471,16 @@ function parsePropPath(name) {
|
|
|
25306
25471
|
// foo.x.y.z
|
|
25307
25472
|
// foo-x-y-z
|
|
25308
25473
|
// foo x y z
|
|
25309
|
-
|
|
25310
|
-
|
|
25311
|
-
|
|
25474
|
+
const path = [];
|
|
25475
|
+
const pattern = /\w+|\[(\w*)]/g;
|
|
25476
|
+
let match;
|
|
25477
|
+
|
|
25478
|
+
while ((match = pattern.exec(name)) !== null) {
|
|
25479
|
+
throwIfDepthExceeded(path.length);
|
|
25480
|
+
path.push(match[0] === '[]' ? '' : match[1] || match[0]);
|
|
25481
|
+
}
|
|
25482
|
+
|
|
25483
|
+
return path;
|
|
25312
25484
|
}
|
|
25313
25485
|
|
|
25314
25486
|
/**
|
|
@@ -25340,17 +25512,19 @@ function arrayToObject(arr) {
|
|
|
25340
25512
|
*/
|
|
25341
25513
|
function formDataToJSON(formData) {
|
|
25342
25514
|
function buildPath(path, value, target, index) {
|
|
25515
|
+
throwIfDepthExceeded(index);
|
|
25516
|
+
|
|
25343
25517
|
let name = path[index++];
|
|
25344
25518
|
|
|
25345
25519
|
if (name === '__proto__') return true;
|
|
25346
25520
|
|
|
25347
25521
|
const isNumericKey = Number.isFinite(+name);
|
|
25348
25522
|
const isLast = index >= path.length;
|
|
25349
|
-
name = !name &&
|
|
25523
|
+
name = !name && _utils_js__rspack_import_2["default"].isArray(target) ? target.length : name;
|
|
25350
25524
|
|
|
25351
25525
|
if (isLast) {
|
|
25352
|
-
if (
|
|
25353
|
-
target[name] =
|
|
25526
|
+
if (_utils_js__rspack_import_2["default"].hasOwnProp(target, name)) {
|
|
25527
|
+
target[name] = _utils_js__rspack_import_2["default"].isArray(target[name])
|
|
25354
25528
|
? target[name].concat(value)
|
|
25355
25529
|
: [target[name], value];
|
|
25356
25530
|
} else {
|
|
@@ -25360,23 +25534,23 @@ function formDataToJSON(formData) {
|
|
|
25360
25534
|
return !isNumericKey;
|
|
25361
25535
|
}
|
|
25362
25536
|
|
|
25363
|
-
if (!
|
|
25537
|
+
if (!_utils_js__rspack_import_2["default"].hasOwnProp(target, name) || !_utils_js__rspack_import_2["default"].isObject(target[name])) {
|
|
25364
25538
|
target[name] = [];
|
|
25365
25539
|
}
|
|
25366
25540
|
|
|
25367
25541
|
const result = buildPath(path, value, target[name], index);
|
|
25368
25542
|
|
|
25369
|
-
if (result &&
|
|
25543
|
+
if (result && _utils_js__rspack_import_2["default"].isArray(target[name])) {
|
|
25370
25544
|
target[name] = arrayToObject(target[name]);
|
|
25371
25545
|
}
|
|
25372
25546
|
|
|
25373
25547
|
return !isNumericKey;
|
|
25374
25548
|
}
|
|
25375
25549
|
|
|
25376
|
-
if (
|
|
25550
|
+
if (_utils_js__rspack_import_2["default"].isFormData(formData) && _utils_js__rspack_import_2["default"].isFunction(formData.entries)) {
|
|
25377
25551
|
const obj = {};
|
|
25378
25552
|
|
|
25379
|
-
|
|
25553
|
+
_utils_js__rspack_import_2["default"].forEachEntry(formData, (name, value) => {
|
|
25380
25554
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
25381
25555
|
});
|
|
25382
25556
|
|
|
@@ -25725,17 +25899,19 @@ function resolveConfig(config) {
|
|
|
25725
25899
|
newConfig.headers = headers = _core_AxiosHeaders_js__rspack_import_2["default"].from(headers);
|
|
25726
25900
|
|
|
25727
25901
|
newConfig.url = (0,_buildURL_js__rspack_import_3["default"])(
|
|
25728
|
-
(0,_core_buildFullPath_js__rspack_import_4["default"])(baseURL, url, allowAbsoluteUrls),
|
|
25902
|
+
(0,_core_buildFullPath_js__rspack_import_4["default"])(baseURL, url, allowAbsoluteUrls, newConfig),
|
|
25729
25903
|
own('params'),
|
|
25730
25904
|
own('paramsSerializer')
|
|
25731
25905
|
);
|
|
25732
25906
|
|
|
25733
25907
|
// HTTP basic authentication
|
|
25734
25908
|
if (auth) {
|
|
25909
|
+
const username = _utils_js__rspack_import_1["default"].getSafeProp(auth, 'username') || '';
|
|
25910
|
+
const password = _utils_js__rspack_import_1["default"].getSafeProp(auth, 'password') || '';
|
|
25911
|
+
|
|
25735
25912
|
headers.set(
|
|
25736
25913
|
'Authorization',
|
|
25737
|
-
'Basic ' +
|
|
25738
|
-
btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
|
|
25914
|
+
'Basic ' + btoa(username + ':' + (password ? encodeUTF8(password) : ''))
|
|
25739
25915
|
);
|
|
25740
25916
|
}
|
|
25741
25917
|
|
|
@@ -26035,6 +26211,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26035
26211
|
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
|
|
26036
26212
|
|
|
26037
26213
|
|
|
26214
|
+
// Default nesting limit shared with the inverse transform (formDataToJSON) so
|
|
26215
|
+
// the FormData <-> JSON round-trip stays symmetric.
|
|
26216
|
+
const DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
26217
|
+
|
|
26038
26218
|
/**
|
|
26039
26219
|
* Determines if the given thing is a array or js object.
|
|
26040
26220
|
*
|
|
@@ -26145,8 +26325,9 @@ function toFormData(obj, formData, options) {
|
|
|
26145
26325
|
const dots = options.dots;
|
|
26146
26326
|
const indexes = options.indexes;
|
|
26147
26327
|
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
26148
|
-
const maxDepth = options.maxDepth === undefined ?
|
|
26328
|
+
const maxDepth = options.maxDepth === undefined ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
|
|
26149
26329
|
const useBlob = _Blob && _utils_js__rspack_import_0["default"].isSpecCompliantForm(formData);
|
|
26330
|
+
const stack = [];
|
|
26150
26331
|
|
|
26151
26332
|
if (!_utils_js__rspack_import_0["default"].isFunction(visitor)) {
|
|
26152
26333
|
throw new TypeError('visitor must be a function');
|
|
@@ -26174,6 +26355,38 @@ function toFormData(obj, formData, options) {
|
|
|
26174
26355
|
return value;
|
|
26175
26356
|
}
|
|
26176
26357
|
|
|
26358
|
+
function throwIfMaxDepthExceeded(depth) {
|
|
26359
|
+
if (depth > maxDepth) {
|
|
26360
|
+
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
26361
|
+
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
26362
|
+
_core_AxiosError_js__rspack_import_2["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
26363
|
+
);
|
|
26364
|
+
}
|
|
26365
|
+
}
|
|
26366
|
+
|
|
26367
|
+
function stringifyWithDepthLimit(value, depth) {
|
|
26368
|
+
if (maxDepth === Infinity) {
|
|
26369
|
+
return JSON.stringify(value);
|
|
26370
|
+
}
|
|
26371
|
+
|
|
26372
|
+
const ancestors = [];
|
|
26373
|
+
|
|
26374
|
+
return JSON.stringify(value, function limitDepth(_key, currentValue) {
|
|
26375
|
+
if (!_utils_js__rspack_import_0["default"].isObject(currentValue)) {
|
|
26376
|
+
return currentValue;
|
|
26377
|
+
}
|
|
26378
|
+
|
|
26379
|
+
while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
|
|
26380
|
+
ancestors.pop();
|
|
26381
|
+
}
|
|
26382
|
+
|
|
26383
|
+
ancestors.push(currentValue);
|
|
26384
|
+
throwIfMaxDepthExceeded(depth + ancestors.length - 1);
|
|
26385
|
+
|
|
26386
|
+
return currentValue;
|
|
26387
|
+
});
|
|
26388
|
+
}
|
|
26389
|
+
|
|
26177
26390
|
/**
|
|
26178
26391
|
* Default visitor.
|
|
26179
26392
|
*
|
|
@@ -26197,7 +26410,7 @@ function toFormData(obj, formData, options) {
|
|
|
26197
26410
|
// eslint-disable-next-line no-param-reassign
|
|
26198
26411
|
key = metaTokens ? key : key.slice(0, -2);
|
|
26199
26412
|
// eslint-disable-next-line no-param-reassign
|
|
26200
|
-
value =
|
|
26413
|
+
value = stringifyWithDepthLimit(value, 1);
|
|
26201
26414
|
} else if (
|
|
26202
26415
|
(_utils_js__rspack_import_0["default"].isArray(value) && isFlatArray(value)) ||
|
|
26203
26416
|
((_utils_js__rspack_import_0["default"].isFileList(value) || _utils_js__rspack_import_0["default"].endsWith(key, '[]')) && (arr = _utils_js__rspack_import_0["default"].toArray(value)))
|
|
@@ -26230,8 +26443,6 @@ function toFormData(obj, formData, options) {
|
|
|
26230
26443
|
return false;
|
|
26231
26444
|
}
|
|
26232
26445
|
|
|
26233
|
-
const stack = [];
|
|
26234
|
-
|
|
26235
26446
|
const exposedHelpers = Object.assign(predicates, {
|
|
26236
26447
|
defaultVisitor,
|
|
26237
26448
|
convertValue,
|
|
@@ -26241,12 +26452,7 @@ function toFormData(obj, formData, options) {
|
|
|
26241
26452
|
function build(value, path, depth = 0) {
|
|
26242
26453
|
if (_utils_js__rspack_import_0["default"].isUndefined(value)) return;
|
|
26243
26454
|
|
|
26244
|
-
|
|
26245
|
-
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
26246
|
-
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
26247
|
-
_core_AxiosError_js__rspack_import_2["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
26248
|
-
);
|
|
26249
|
-
}
|
|
26455
|
+
throwIfMaxDepthExceeded(depth);
|
|
26250
26456
|
|
|
26251
26457
|
if (stack.indexOf(value) !== -1) {
|
|
26252
26458
|
throw new Error('Circular reference detected in ' + path.join('.'));
|
|
@@ -26280,6 +26486,7 @@ function toFormData(obj, formData, options) {
|
|
|
26280
26486
|
|
|
26281
26487
|
__webpack_require__.d(__webpack_exports__, {
|
|
26282
26488
|
}, {
|
|
26489
|
+
DEFAULT_FORM_DATA_MAX_DEPTH: DEFAULT_FORM_DATA_MAX_DEPTH,
|
|
26283
26490
|
"default": __rspack_default_export
|
|
26284
26491
|
});
|
|
26285
26492
|
|
|
@@ -26711,6 +26918,57 @@ const { toString } = Object.prototype;
|
|
|
26711
26918
|
const { getPrototypeOf } = Object;
|
|
26712
26919
|
const { iterator, toStringTag } = Symbol;
|
|
26713
26920
|
|
|
26921
|
+
/* Creating a function that will check if an object has a property. */
|
|
26922
|
+
const hasOwnProperty = (
|
|
26923
|
+
({ hasOwnProperty }) =>
|
|
26924
|
+
(obj, prop) =>
|
|
26925
|
+
hasOwnProperty.call(obj, prop)
|
|
26926
|
+
)(Object.prototype);
|
|
26927
|
+
|
|
26928
|
+
/**
|
|
26929
|
+
* Walk the prototype chain (excluding the shared Object.prototype) looking for
|
|
26930
|
+
* an own `prop`. This distinguishes genuine own/inherited members — including
|
|
26931
|
+
* class accessors and template prototypes — from members injected via
|
|
26932
|
+
* Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
|
|
26933
|
+
* live on Object.prototype itself and are therefore never matched.
|
|
26934
|
+
*
|
|
26935
|
+
* @param {*} thing The value whose chain to inspect
|
|
26936
|
+
* @param {string|symbol} prop The property key to look for
|
|
26937
|
+
*
|
|
26938
|
+
* @returns {boolean} True when `prop` is owned below Object.prototype
|
|
26939
|
+
*/
|
|
26940
|
+
const hasOwnInPrototypeChain = (thing, prop) => {
|
|
26941
|
+
let obj = thing;
|
|
26942
|
+
const seen = [];
|
|
26943
|
+
|
|
26944
|
+
while (obj != null && obj !== Object.prototype) {
|
|
26945
|
+
if (seen.indexOf(obj) !== -1) {
|
|
26946
|
+
return false;
|
|
26947
|
+
}
|
|
26948
|
+
seen.push(obj);
|
|
26949
|
+
|
|
26950
|
+
if (hasOwnProperty(obj, prop)) {
|
|
26951
|
+
return true;
|
|
26952
|
+
}
|
|
26953
|
+
obj = getPrototypeOf(obj);
|
|
26954
|
+
}
|
|
26955
|
+
return false;
|
|
26956
|
+
};
|
|
26957
|
+
|
|
26958
|
+
/**
|
|
26959
|
+
* Read `obj[prop]` only when it is safe from Object.prototype pollution. Own
|
|
26960
|
+
* properties and members inherited from a non-Object.prototype source (a class
|
|
26961
|
+
* instance or template object) are honored; a value reachable only through a
|
|
26962
|
+
* polluted Object.prototype is ignored and `undefined` is returned.
|
|
26963
|
+
*
|
|
26964
|
+
* @param {*} obj The source object
|
|
26965
|
+
* @param {string|symbol} prop The property key to read
|
|
26966
|
+
*
|
|
26967
|
+
* @returns {*} The resolved value, or undefined when unsafe/absent
|
|
26968
|
+
*/
|
|
26969
|
+
const getSafeProp = (obj, prop) =>
|
|
26970
|
+
obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;
|
|
26971
|
+
|
|
26714
26972
|
const kindOf = ((cache) => (thing) => {
|
|
26715
26973
|
const str = toString.call(thing);
|
|
26716
26974
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -26836,7 +27094,7 @@ const isBoolean = (thing) => thing === true || thing === false;
|
|
|
26836
27094
|
* @returns {boolean} True if value is a plain Object, otherwise false
|
|
26837
27095
|
*/
|
|
26838
27096
|
const isPlainObject = (val) => {
|
|
26839
|
-
if (
|
|
27097
|
+
if (!isObject(val)) {
|
|
26840
27098
|
return false;
|
|
26841
27099
|
}
|
|
26842
27100
|
|
|
@@ -26844,9 +27102,12 @@ const isPlainObject = (val) => {
|
|
|
26844
27102
|
return (
|
|
26845
27103
|
(prototype === null ||
|
|
26846
27104
|
prototype === Object.prototype ||
|
|
26847
|
-
|
|
26848
|
-
|
|
26849
|
-
|
|
27105
|
+
getPrototypeOf(prototype) === null) &&
|
|
27106
|
+
// Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
27107
|
+
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
27108
|
+
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
27109
|
+
!hasOwnInPrototypeChain(val, toStringTag) &&
|
|
27110
|
+
!hasOwnInPrototypeChain(val, iterator)
|
|
26850
27111
|
);
|
|
26851
27112
|
};
|
|
26852
27113
|
|
|
@@ -27373,13 +27634,6 @@ const toCamelCase = (str) => {
|
|
|
27373
27634
|
});
|
|
27374
27635
|
};
|
|
27375
27636
|
|
|
27376
|
-
/* Creating a function that will check if an object has a property. */
|
|
27377
|
-
const hasOwnProperty = (
|
|
27378
|
-
({ hasOwnProperty }) =>
|
|
27379
|
-
(obj, prop) =>
|
|
27380
|
-
hasOwnProperty.call(obj, prop)
|
|
27381
|
-
)(Object.prototype);
|
|
27382
|
-
|
|
27383
27637
|
const { propertyIsEnumerable } = Object.prototype;
|
|
27384
27638
|
|
|
27385
27639
|
/**
|
|
@@ -27593,6 +27847,20 @@ const asap =
|
|
|
27593
27847
|
|
|
27594
27848
|
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
27595
27849
|
|
|
27850
|
+
/**
|
|
27851
|
+
* Determine if a value is iterable via an iterator that is NOT sourced solely
|
|
27852
|
+
* from a polluted Object.prototype. Use this instead of `isIterable` whenever
|
|
27853
|
+
* the iterable comes from untrusted input (e.g. user-supplied header sources),
|
|
27854
|
+
* so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object
|
|
27855
|
+
* into an attacker-controlled entries iterator.
|
|
27856
|
+
*
|
|
27857
|
+
* @param {*} thing The value to test
|
|
27858
|
+
*
|
|
27859
|
+
* @returns {boolean} True if value has a non-polluted iterator
|
|
27860
|
+
*/
|
|
27861
|
+
const isSafeIterable = (thing) =>
|
|
27862
|
+
thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
|
|
27863
|
+
|
|
27596
27864
|
/* export default */ const __rspack_default_export = ({
|
|
27597
27865
|
isArray,
|
|
27598
27866
|
isArrayBuffer,
|
|
@@ -27637,6 +27905,8 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
27637
27905
|
isHTMLForm,
|
|
27638
27906
|
hasOwnProperty,
|
|
27639
27907
|
hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
|
|
27908
|
+
hasOwnInPrototypeChain,
|
|
27909
|
+
getSafeProp,
|
|
27640
27910
|
reduceDescriptors,
|
|
27641
27911
|
freezeMethods,
|
|
27642
27912
|
toObjectSet,
|
|
@@ -27653,6 +27923,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
27653
27923
|
setImmediate: _setImmediate,
|
|
27654
27924
|
asap,
|
|
27655
27925
|
isIterable,
|
|
27926
|
+
isSafeIterable,
|
|
27656
27927
|
});
|
|
27657
27928
|
|
|
27658
27929
|
__webpack_require__.d(__webpack_exports__, {
|