@liquidcommercedev/rmn-sdk 1.5.0-beta.48 → 1.5.0-beta.49
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/index.cjs
CHANGED
@@ -285,6 +285,7 @@ function bind(fn, thisArg) {
|
|
285
285
|
|
286
286
|
const {toString: toString$1} = Object.prototype;
|
287
287
|
const {getPrototypeOf} = Object;
|
288
|
+
const {iterator, toStringTag} = Symbol;
|
288
289
|
|
289
290
|
const kindOf = (cache => thing => {
|
290
291
|
const str = toString$1.call(thing);
|
@@ -325,7 +326,7 @@ const isUndefined = typeOfTest('undefined');
|
|
325
326
|
*/
|
326
327
|
function isBuffer$1(val) {
|
327
328
|
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
328
|
-
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
329
|
+
&& isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
329
330
|
}
|
330
331
|
|
331
332
|
/**
|
@@ -370,7 +371,7 @@ const isString = typeOfTest('string');
|
|
370
371
|
* @param {*} val The value to test
|
371
372
|
* @returns {boolean} True if value is a Function, otherwise false
|
372
373
|
*/
|
373
|
-
const isFunction = typeOfTest('function');
|
374
|
+
const isFunction$1 = typeOfTest('function');
|
374
375
|
|
375
376
|
/**
|
376
377
|
* Determine if a value is a Number
|
@@ -411,7 +412,28 @@ const isPlainObject = (val) => {
|
|
411
412
|
}
|
412
413
|
|
413
414
|
const prototype = getPrototypeOf(val);
|
414
|
-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(
|
415
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
416
|
+
};
|
417
|
+
|
418
|
+
/**
|
419
|
+
* Determine if a value is an empty object (safely handles Buffers)
|
420
|
+
*
|
421
|
+
* @param {*} val The value to test
|
422
|
+
*
|
423
|
+
* @returns {boolean} True if value is an empty object, otherwise false
|
424
|
+
*/
|
425
|
+
const isEmptyObject = (val) => {
|
426
|
+
// Early return for non-objects or Buffers to prevent RangeError
|
427
|
+
if (!isObject$1(val) || isBuffer$1(val)) {
|
428
|
+
return false;
|
429
|
+
}
|
430
|
+
|
431
|
+
try {
|
432
|
+
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
433
|
+
} catch (e) {
|
434
|
+
// Fallback for any other objects that might cause RangeError with Object.keys()
|
435
|
+
return false;
|
436
|
+
}
|
415
437
|
};
|
416
438
|
|
417
439
|
/**
|
@@ -457,7 +479,7 @@ const isFileList = kindOfTest('FileList');
|
|
457
479
|
*
|
458
480
|
* @returns {boolean} True if value is a Stream, otherwise false
|
459
481
|
*/
|
460
|
-
const isStream = (val) => isObject$1(val) && isFunction(val.pipe);
|
482
|
+
const isStream = (val) => isObject$1(val) && isFunction$1(val.pipe);
|
461
483
|
|
462
484
|
/**
|
463
485
|
* Determine if a value is a FormData
|
@@ -470,10 +492,10 @@ const isFormData = (thing) => {
|
|
470
492
|
let kind;
|
471
493
|
return thing && (
|
472
494
|
(typeof FormData === 'function' && thing instanceof FormData) || (
|
473
|
-
isFunction(thing.append) && (
|
495
|
+
isFunction$1(thing.append) && (
|
474
496
|
(kind = kindOf(thing)) === 'formdata' ||
|
475
497
|
// detect form-data instance
|
476
|
-
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
498
|
+
(kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
|
477
499
|
)
|
478
500
|
)
|
479
501
|
)
|
@@ -536,6 +558,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
536
558
|
fn.call(null, obj[i], i, obj);
|
537
559
|
}
|
538
560
|
} else {
|
561
|
+
// Buffer check
|
562
|
+
if (isBuffer$1(obj)) {
|
563
|
+
return;
|
564
|
+
}
|
565
|
+
|
539
566
|
// Iterate over object keys
|
540
567
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
541
568
|
const len = keys.length;
|
@@ -549,6 +576,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
549
576
|
}
|
550
577
|
|
551
578
|
function findKey(obj, key) {
|
579
|
+
if (isBuffer$1(obj)){
|
580
|
+
return null;
|
581
|
+
}
|
582
|
+
|
552
583
|
key = key.toLowerCase();
|
553
584
|
const keys = Object.keys(obj);
|
554
585
|
let i = keys.length;
|
@@ -589,7 +620,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
589
620
|
* @returns {Object} Result of all merge properties
|
590
621
|
*/
|
591
622
|
function merge(/* obj1, obj2, obj3, ... */) {
|
592
|
-
const {caseless} = isContextDefined(this) && this || {};
|
623
|
+
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
593
624
|
const result = {};
|
594
625
|
const assignValue = (val, key) => {
|
595
626
|
const targetKey = caseless && findKey(result, key) || key;
|
@@ -599,7 +630,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
599
630
|
result[targetKey] = merge({}, val);
|
600
631
|
} else if (isArray$1(val)) {
|
601
632
|
result[targetKey] = val.slice();
|
602
|
-
} else {
|
633
|
+
} else if (!skipUndefined || !isUndefined(val)) {
|
603
634
|
result[targetKey] = val;
|
604
635
|
}
|
605
636
|
};
|
@@ -622,7 +653,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
622
653
|
*/
|
623
654
|
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
624
655
|
forEach(b, (val, key) => {
|
625
|
-
if (thisArg && isFunction(val)) {
|
656
|
+
if (thisArg && isFunction$1(val)) {
|
626
657
|
a[key] = bind(val, thisArg);
|
627
658
|
} else {
|
628
659
|
a[key] = val;
|
@@ -762,13 +793,13 @@ const isTypedArray = (TypedArray => {
|
|
762
793
|
* @returns {void}
|
763
794
|
*/
|
764
795
|
const forEachEntry = (obj, fn) => {
|
765
|
-
const generator = obj && obj[
|
796
|
+
const generator = obj && obj[iterator];
|
766
797
|
|
767
|
-
const
|
798
|
+
const _iterator = generator.call(obj);
|
768
799
|
|
769
800
|
let result;
|
770
801
|
|
771
|
-
while ((result =
|
802
|
+
while ((result = _iterator.next()) && !result.done) {
|
772
803
|
const pair = result.value;
|
773
804
|
fn.call(obj, pair[0], pair[1]);
|
774
805
|
}
|
@@ -838,13 +869,13 @@ const reduceDescriptors = (obj, reducer) => {
|
|
838
869
|
const freezeMethods = (obj) => {
|
839
870
|
reduceDescriptors(obj, (descriptor, name) => {
|
840
871
|
// skip restricted props in strict mode
|
841
|
-
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
872
|
+
if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
842
873
|
return false;
|
843
874
|
}
|
844
875
|
|
845
876
|
const value = obj[name];
|
846
877
|
|
847
|
-
if (!isFunction(value)) return;
|
878
|
+
if (!isFunction$1(value)) return;
|
848
879
|
|
849
880
|
descriptor.enumerable = false;
|
850
881
|
|
@@ -881,6 +912,8 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
881
912
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
882
913
|
};
|
883
914
|
|
915
|
+
|
916
|
+
|
884
917
|
/**
|
885
918
|
* If the thing is a FormData object, return true, otherwise return false.
|
886
919
|
*
|
@@ -889,7 +922,7 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
889
922
|
* @returns {boolean}
|
890
923
|
*/
|
891
924
|
function isSpecCompliantForm(thing) {
|
892
|
-
return !!(thing && isFunction(thing.append) && thing[
|
925
|
+
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
893
926
|
}
|
894
927
|
|
895
928
|
const toJSONObject = (obj) => {
|
@@ -902,6 +935,11 @@ const toJSONObject = (obj) => {
|
|
902
935
|
return;
|
903
936
|
}
|
904
937
|
|
938
|
+
//Buffer check
|
939
|
+
if (isBuffer$1(source)) {
|
940
|
+
return source;
|
941
|
+
}
|
942
|
+
|
905
943
|
if(!('toJSON' in source)) {
|
906
944
|
stack[i] = source;
|
907
945
|
const target = isArray$1(source) ? [] : {};
|
@@ -926,7 +964,7 @@ const toJSONObject = (obj) => {
|
|
926
964
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
927
965
|
|
928
966
|
const isThenable = (thing) =>
|
929
|
-
thing && (isObject$1(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
967
|
+
thing && (isObject$1(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
930
968
|
|
931
969
|
// original code
|
932
970
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
@@ -950,7 +988,7 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
950
988
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
951
989
|
})(
|
952
990
|
typeof setImmediate === 'function',
|
953
|
-
isFunction(_global.postMessage)
|
991
|
+
isFunction$1(_global.postMessage)
|
954
992
|
);
|
955
993
|
|
956
994
|
const asap = typeof queueMicrotask !== 'undefined' ?
|
@@ -958,6 +996,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
|
958
996
|
|
959
997
|
// *********************
|
960
998
|
|
999
|
+
|
1000
|
+
const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
1001
|
+
|
1002
|
+
|
961
1003
|
var utils$1 = {
|
962
1004
|
isArray: isArray$1,
|
963
1005
|
isArrayBuffer,
|
@@ -969,6 +1011,7 @@ var utils$1 = {
|
|
969
1011
|
isBoolean,
|
970
1012
|
isObject: isObject$1,
|
971
1013
|
isPlainObject,
|
1014
|
+
isEmptyObject,
|
972
1015
|
isReadableStream,
|
973
1016
|
isRequest,
|
974
1017
|
isResponse,
|
@@ -978,7 +1021,7 @@ var utils$1 = {
|
|
978
1021
|
isFile,
|
979
1022
|
isBlob,
|
980
1023
|
isRegExp,
|
981
|
-
isFunction,
|
1024
|
+
isFunction: isFunction$1,
|
982
1025
|
isStream,
|
983
1026
|
isURLSearchParams,
|
984
1027
|
isTypedArray,
|
@@ -1013,7 +1056,8 @@ var utils$1 = {
|
|
1013
1056
|
isAsyncFn,
|
1014
1057
|
isThenable,
|
1015
1058
|
setImmediate: _setImmediate,
|
1016
|
-
asap
|
1059
|
+
asap,
|
1060
|
+
isIterable
|
1017
1061
|
};
|
1018
1062
|
|
1019
1063
|
var lookup = [];
|
@@ -3080,11 +3124,18 @@ AxiosError$1.from = (error, code, config, request, response, customProps) => {
|
|
3080
3124
|
return prop !== 'isAxiosError';
|
3081
3125
|
});
|
3082
3126
|
|
3083
|
-
|
3127
|
+
const msg = error && error.message ? error.message : 'Error';
|
3084
3128
|
|
3085
|
-
|
3129
|
+
// Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
|
3130
|
+
const errCode = code == null && error ? error.code : code;
|
3131
|
+
AxiosError$1.call(axiosError, msg, errCode, config, request, response);
|
3086
3132
|
|
3087
|
-
|
3133
|
+
// Chain the original error on the standard field; non-enumerable to avoid JSON noise
|
3134
|
+
if (error && axiosError.cause == null) {
|
3135
|
+
Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
|
3136
|
+
}
|
3137
|
+
|
3138
|
+
axiosError.name = (error && error.name) || 'Error';
|
3088
3139
|
|
3089
3140
|
customProps && Object.assign(axiosError, customProps);
|
3090
3141
|
|
@@ -3209,6 +3260,10 @@ function toFormData$1(obj, formData, options) {
|
|
3209
3260
|
return value.toISOString();
|
3210
3261
|
}
|
3211
3262
|
|
3263
|
+
if (utils$1.isBoolean(value)) {
|
3264
|
+
return value.toString();
|
3265
|
+
}
|
3266
|
+
|
3212
3267
|
if (!useBlob && utils$1.isBlob(value)) {
|
3213
3268
|
throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
|
3214
3269
|
}
|
@@ -3371,9 +3426,7 @@ function encode$1(val) {
|
|
3371
3426
|
replace(/%3A/gi, ':').
|
3372
3427
|
replace(/%24/g, '$').
|
3373
3428
|
replace(/%2C/gi, ',').
|
3374
|
-
replace(/%20/g, '+')
|
3375
|
-
replace(/%5B/gi, '[').
|
3376
|
-
replace(/%5D/gi, ']');
|
3429
|
+
replace(/%20/g, '+');
|
3377
3430
|
}
|
3378
3431
|
|
3379
3432
|
/**
|
@@ -3570,7 +3623,7 @@ var platform = {
|
|
3570
3623
|
};
|
3571
3624
|
|
3572
3625
|
function toURLEncodedForm(data, options) {
|
3573
|
-
return toFormData$1(data, new platform.classes.URLSearchParams(),
|
3626
|
+
return toFormData$1(data, new platform.classes.URLSearchParams(), {
|
3574
3627
|
visitor: function(value, key, path, helpers) {
|
3575
3628
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
3576
3629
|
this.append(key, value.toString('base64'));
|
@@ -3578,8 +3631,9 @@ function toURLEncodedForm(data, options) {
|
|
3578
3631
|
}
|
3579
3632
|
|
3580
3633
|
return helpers.defaultVisitor.apply(this, arguments);
|
3581
|
-
}
|
3582
|
-
|
3634
|
+
},
|
3635
|
+
...options
|
3636
|
+
});
|
3583
3637
|
}
|
3584
3638
|
|
3585
3639
|
/**
|
@@ -3775,7 +3829,7 @@ const defaults = {
|
|
3775
3829
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
3776
3830
|
|
3777
3831
|
try {
|
3778
|
-
return JSON.parse(data);
|
3832
|
+
return JSON.parse(data, this.parseReviver);
|
3779
3833
|
} catch (e) {
|
3780
3834
|
if (strictJSONParsing) {
|
3781
3835
|
if (e.name === 'SyntaxError') {
|
@@ -3971,10 +4025,18 @@ let AxiosHeaders$1 = class AxiosHeaders {
|
|
3971
4025
|
setHeaders(header, valueOrRewrite);
|
3972
4026
|
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
3973
4027
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
3974
|
-
} else if (utils$1.
|
3975
|
-
|
3976
|
-
|
4028
|
+
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
4029
|
+
let obj = {}, dest, key;
|
4030
|
+
for (const entry of header) {
|
4031
|
+
if (!utils$1.isArray(entry)) {
|
4032
|
+
throw TypeError('Object iterator must return a key-value pair');
|
4033
|
+
}
|
4034
|
+
|
4035
|
+
obj[key = entry[0]] = (dest = obj[key]) ?
|
4036
|
+
(utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
|
3977
4037
|
}
|
4038
|
+
|
4039
|
+
setHeaders(obj, valueOrRewrite);
|
3978
4040
|
} else {
|
3979
4041
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
3980
4042
|
}
|
@@ -4116,6 +4178,10 @@ let AxiosHeaders$1 = class AxiosHeaders {
|
|
4116
4178
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
4117
4179
|
}
|
4118
4180
|
|
4181
|
+
getSetCookie() {
|
4182
|
+
return this.get("set-cookie") || [];
|
4183
|
+
}
|
4184
|
+
|
4119
4185
|
get [Symbol.toStringTag]() {
|
4120
4186
|
return 'AxiosHeaders';
|
4121
4187
|
}
|
@@ -4316,7 +4382,7 @@ function throttle(fn, freq) {
|
|
4316
4382
|
clearTimeout(timer);
|
4317
4383
|
timer = null;
|
4318
4384
|
}
|
4319
|
-
fn
|
4385
|
+
fn(...args);
|
4320
4386
|
};
|
4321
4387
|
|
4322
4388
|
const throttled = (...args) => {
|
@@ -4473,7 +4539,7 @@ function combineURLs(baseURL, relativeURL) {
|
|
4473
4539
|
*/
|
4474
4540
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
4475
4541
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
4476
|
-
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
|
4542
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
4477
4543
|
return combineURLs(baseURL, requestedURL);
|
4478
4544
|
}
|
4479
4545
|
return requestedURL;
|
@@ -4572,7 +4638,7 @@ function mergeConfig$1(config1, config2) {
|
|
4572
4638
|
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
4573
4639
|
};
|
4574
4640
|
|
4575
|
-
utils$1.forEach(Object.keys(
|
4641
|
+
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
4576
4642
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
4577
4643
|
const configValue = merge(config1[prop], config2[prop], prop);
|
4578
4644
|
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
@@ -4584,7 +4650,7 @@ function mergeConfig$1(config1, config2) {
|
|
4584
4650
|
var resolveConfig = (config) => {
|
4585
4651
|
const newConfig = mergeConfig$1({}, config);
|
4586
4652
|
|
4587
|
-
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
4653
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
4588
4654
|
|
4589
4655
|
newConfig.headers = headers = AxiosHeaders$1.from(headers);
|
4590
4656
|
|
@@ -4597,17 +4663,21 @@ var resolveConfig = (config) => {
|
|
4597
4663
|
);
|
4598
4664
|
}
|
4599
4665
|
|
4600
|
-
let contentType;
|
4601
|
-
|
4602
4666
|
if (utils$1.isFormData(data)) {
|
4603
4667
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
4604
|
-
headers.setContentType(undefined); //
|
4605
|
-
} else if ((
|
4606
|
-
//
|
4607
|
-
const
|
4608
|
-
headers
|
4668
|
+
headers.setContentType(undefined); // browser handles it
|
4669
|
+
} else if (utils$1.isFunction(data.getHeaders)) {
|
4670
|
+
// Node.js FormData (like form-data package)
|
4671
|
+
const formHeaders = data.getHeaders();
|
4672
|
+
// Only set safe headers to avoid overwriting security headers
|
4673
|
+
const allowedHeaders = ['content-type', 'content-length'];
|
4674
|
+
Object.entries(formHeaders).forEach(([key, val]) => {
|
4675
|
+
if (allowedHeaders.includes(key.toLowerCase())) {
|
4676
|
+
headers.set(key, val);
|
4677
|
+
}
|
4678
|
+
});
|
4609
4679
|
}
|
4610
|
-
}
|
4680
|
+
}
|
4611
4681
|
|
4612
4682
|
// Add xsrf header
|
4613
4683
|
// This is only done if running in a standard browser environment.
|
@@ -4724,15 +4794,18 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
4724
4794
|
};
|
4725
4795
|
|
4726
4796
|
// Handle low level network errors
|
4727
|
-
|
4728
|
-
|
4729
|
-
|
4730
|
-
|
4731
|
-
|
4732
|
-
|
4733
|
-
|
4797
|
+
request.onerror = function handleError(event) {
|
4798
|
+
// Browsers deliver a ProgressEvent in XHR onerror
|
4799
|
+
// (message may be empty; when present, surface it)
|
4800
|
+
// See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
|
4801
|
+
const msg = event && event.message ? event.message : 'Network Error';
|
4802
|
+
const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
|
4803
|
+
// attach the underlying event for consumers who want details
|
4804
|
+
err.event = event || null;
|
4805
|
+
reject(err);
|
4806
|
+
request = null;
|
4734
4807
|
};
|
4735
|
-
|
4808
|
+
|
4736
4809
|
// Handle timeout
|
4737
4810
|
request.ontimeout = function handleTimeout() {
|
4738
4811
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
@@ -4946,14 +5019,18 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
4946
5019
|
})
|
4947
5020
|
};
|
4948
5021
|
|
4949
|
-
const
|
4950
|
-
|
5022
|
+
const DEFAULT_CHUNK_SIZE = 64 * 1024;
|
5023
|
+
|
5024
|
+
const {isFunction} = utils$1;
|
5025
|
+
|
5026
|
+
const globalFetchAPI = (({Request, Response}) => ({
|
5027
|
+
Request, Response
|
5028
|
+
}))(utils$1.global);
|
5029
|
+
|
5030
|
+
const {
|
5031
|
+
ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1
|
5032
|
+
} = utils$1.global;
|
4951
5033
|
|
4952
|
-
// used only inside the fetch adapter
|
4953
|
-
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
4954
|
-
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
4955
|
-
async (str) => new Uint8Array(await new Response(str).arrayBuffer())
|
4956
|
-
);
|
4957
5034
|
|
4958
5035
|
const test = (fn, ...args) => {
|
4959
5036
|
try {
|
@@ -4963,211 +5040,268 @@ const test = (fn, ...args) => {
|
|
4963
5040
|
}
|
4964
5041
|
};
|
4965
5042
|
|
4966
|
-
const
|
4967
|
-
|
5043
|
+
const factory = (env) => {
|
5044
|
+
env = utils$1.merge.call({
|
5045
|
+
skipUndefined: true
|
5046
|
+
}, globalFetchAPI, env);
|
4968
5047
|
|
4969
|
-
const
|
4970
|
-
|
4971
|
-
|
4972
|
-
|
4973
|
-
duplexAccessed = true;
|
4974
|
-
return 'half';
|
4975
|
-
},
|
4976
|
-
}).headers.has('Content-Type');
|
5048
|
+
const {fetch: envFetch, Request, Response} = env;
|
5049
|
+
const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
|
5050
|
+
const isRequestSupported = isFunction(Request);
|
5051
|
+
const isResponseSupported = isFunction(Response);
|
4977
5052
|
|
4978
|
-
|
4979
|
-
|
5053
|
+
if (!isFetchSupported) {
|
5054
|
+
return false;
|
5055
|
+
}
|
4980
5056
|
|
4981
|
-
const
|
5057
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
|
4982
5058
|
|
4983
|
-
const
|
4984
|
-
|
5059
|
+
const encodeText = isFetchSupported && (typeof TextEncoder$1 === 'function' ?
|
5060
|
+
((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) :
|
5061
|
+
async (str) => new Uint8Array(await new Request(str).arrayBuffer())
|
5062
|
+
);
|
4985
5063
|
|
5064
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
5065
|
+
let duplexAccessed = false;
|
4986
5066
|
|
4987
|
-
const
|
4988
|
-
|
4989
|
-
|
5067
|
+
const hasContentType = new Request(platform.origin, {
|
5068
|
+
body: new ReadableStream$1(),
|
5069
|
+
method: 'POST',
|
5070
|
+
get duplex() {
|
5071
|
+
duplexAccessed = true;
|
5072
|
+
return 'half';
|
5073
|
+
},
|
5074
|
+
}).headers.has('Content-Type');
|
4990
5075
|
|
4991
|
-
|
4992
|
-
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
4993
|
-
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
|
4994
|
-
(_, config) => {
|
4995
|
-
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
4996
|
-
});
|
5076
|
+
return duplexAccessed && !hasContentType;
|
4997
5077
|
});
|
4998
|
-
})(new Response));
|
4999
5078
|
|
5000
|
-
const
|
5001
|
-
|
5002
|
-
return 0;
|
5003
|
-
}
|
5079
|
+
const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
|
5080
|
+
test(() => utils$1.isReadableStream(new Response('').body));
|
5004
5081
|
|
5005
|
-
|
5006
|
-
|
5007
|
-
}
|
5082
|
+
const resolvers = {
|
5083
|
+
stream: supportsResponseStream && ((res) => res.body)
|
5084
|
+
};
|
5008
5085
|
|
5009
|
-
|
5010
|
-
|
5011
|
-
|
5012
|
-
|
5086
|
+
isFetchSupported && ((() => {
|
5087
|
+
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
5088
|
+
!resolvers[type] && (resolvers[type] = (res, config) => {
|
5089
|
+
let method = res && res[type];
|
5090
|
+
|
5091
|
+
if (method) {
|
5092
|
+
return method.call(res);
|
5093
|
+
}
|
5094
|
+
|
5095
|
+
throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
|
5096
|
+
});
|
5013
5097
|
});
|
5014
|
-
|
5015
|
-
}
|
5098
|
+
})());
|
5016
5099
|
|
5017
|
-
|
5018
|
-
|
5019
|
-
|
5100
|
+
const getBodyLength = async (body) => {
|
5101
|
+
if (body == null) {
|
5102
|
+
return 0;
|
5103
|
+
}
|
5020
5104
|
|
5021
|
-
|
5022
|
-
|
5023
|
-
|
5105
|
+
if (utils$1.isBlob(body)) {
|
5106
|
+
return body.size;
|
5107
|
+
}
|
5024
5108
|
|
5025
|
-
|
5026
|
-
|
5027
|
-
|
5028
|
-
|
5109
|
+
if (utils$1.isSpecCompliantForm(body)) {
|
5110
|
+
const _request = new Request(platform.origin, {
|
5111
|
+
method: 'POST',
|
5112
|
+
body,
|
5113
|
+
});
|
5114
|
+
return (await _request.arrayBuffer()).byteLength;
|
5115
|
+
}
|
5029
5116
|
|
5030
|
-
|
5031
|
-
|
5117
|
+
if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
5118
|
+
return body.byteLength;
|
5119
|
+
}
|
5032
5120
|
|
5033
|
-
|
5034
|
-
|
5121
|
+
if (utils$1.isURLSearchParams(body)) {
|
5122
|
+
body = body + '';
|
5123
|
+
}
|
5035
5124
|
|
5036
|
-
|
5037
|
-
|
5038
|
-
|
5039
|
-
|
5040
|
-
|
5041
|
-
|
5042
|
-
|
5043
|
-
|
5044
|
-
|
5045
|
-
|
5046
|
-
|
5047
|
-
|
5048
|
-
|
5049
|
-
|
5050
|
-
|
5051
|
-
|
5052
|
-
|
5053
|
-
|
5054
|
-
|
5055
|
-
|
5056
|
-
|
5057
|
-
|
5058
|
-
|
5125
|
+
if (utils$1.isString(body)) {
|
5126
|
+
return (await encodeText(body)).byteLength;
|
5127
|
+
}
|
5128
|
+
};
|
5129
|
+
|
5130
|
+
const resolveBodyLength = async (headers, body) => {
|
5131
|
+
const length = utils$1.toFiniteNumber(headers.getContentLength());
|
5132
|
+
|
5133
|
+
return length == null ? getBodyLength(body) : length;
|
5134
|
+
};
|
5135
|
+
|
5136
|
+
return async (config) => {
|
5137
|
+
let {
|
5138
|
+
url,
|
5139
|
+
method,
|
5140
|
+
data,
|
5141
|
+
signal,
|
5142
|
+
cancelToken,
|
5143
|
+
timeout,
|
5144
|
+
onDownloadProgress,
|
5145
|
+
onUploadProgress,
|
5146
|
+
responseType,
|
5147
|
+
headers,
|
5148
|
+
withCredentials = 'same-origin',
|
5149
|
+
fetchOptions
|
5150
|
+
} = resolveConfig(config);
|
5151
|
+
|
5152
|
+
let _fetch = envFetch || fetch;
|
5153
|
+
|
5154
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
5155
|
+
|
5156
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
5157
|
+
|
5158
|
+
let request = null;
|
5159
|
+
|
5160
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
5059
5161
|
composedSignal.unsubscribe();
|
5060
|
-
|
5162
|
+
});
|
5061
5163
|
|
5062
|
-
|
5164
|
+
let requestContentLength;
|
5063
5165
|
|
5064
|
-
|
5065
|
-
|
5066
|
-
|
5067
|
-
|
5068
|
-
|
5069
|
-
|
5070
|
-
|
5071
|
-
|
5072
|
-
|
5073
|
-
|
5166
|
+
try {
|
5167
|
+
if (
|
5168
|
+
onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
|
5169
|
+
(requestContentLength = await resolveBodyLength(headers, data)) !== 0
|
5170
|
+
) {
|
5171
|
+
let _request = new Request(url, {
|
5172
|
+
method: 'POST',
|
5173
|
+
body: data,
|
5174
|
+
duplex: "half"
|
5175
|
+
});
|
5074
5176
|
|
5075
|
-
|
5177
|
+
let contentTypeHeader;
|
5076
5178
|
|
5077
|
-
|
5078
|
-
|
5079
|
-
|
5179
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
5180
|
+
headers.setContentType(contentTypeHeader);
|
5181
|
+
}
|
5080
5182
|
|
5081
|
-
|
5082
|
-
|
5083
|
-
|
5084
|
-
|
5085
|
-
|
5183
|
+
if (_request.body) {
|
5184
|
+
const [onProgress, flush] = progressEventDecorator(
|
5185
|
+
requestContentLength,
|
5186
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
5187
|
+
);
|
5086
5188
|
|
5087
|
-
|
5189
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
5190
|
+
}
|
5088
5191
|
}
|
5089
|
-
}
|
5090
5192
|
|
5091
|
-
|
5092
|
-
|
5093
|
-
|
5193
|
+
if (!utils$1.isString(withCredentials)) {
|
5194
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
5195
|
+
}
|
5094
5196
|
|
5095
|
-
|
5096
|
-
|
5097
|
-
|
5098
|
-
request = new Request(url, {
|
5099
|
-
...fetchOptions,
|
5100
|
-
signal: composedSignal,
|
5101
|
-
method: method.toUpperCase(),
|
5102
|
-
headers: headers.normalize().toJSON(),
|
5103
|
-
body: data,
|
5104
|
-
duplex: "half",
|
5105
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
5106
|
-
});
|
5197
|
+
// Cloudflare Workers throws when credentials are defined
|
5198
|
+
// see https://github.com/cloudflare/workerd/issues/902
|
5199
|
+
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
5107
5200
|
|
5108
|
-
|
5201
|
+
const resolvedOptions = {
|
5202
|
+
...fetchOptions,
|
5203
|
+
signal: composedSignal,
|
5204
|
+
method: method.toUpperCase(),
|
5205
|
+
headers: headers.normalize().toJSON(),
|
5206
|
+
body: data,
|
5207
|
+
duplex: "half",
|
5208
|
+
credentials: isCredentialsSupported ? withCredentials : undefined
|
5209
|
+
};
|
5109
5210
|
|
5110
|
-
|
5211
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
5111
5212
|
|
5112
|
-
|
5113
|
-
const options = {};
|
5213
|
+
let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
|
5114
5214
|
|
5115
|
-
|
5116
|
-
options[prop] = response[prop];
|
5117
|
-
});
|
5215
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
5118
5216
|
|
5119
|
-
|
5217
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
5218
|
+
const options = {};
|
5120
5219
|
|
5121
|
-
|
5122
|
-
|
5123
|
-
|
5124
|
-
) || [];
|
5220
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
5221
|
+
options[prop] = response[prop];
|
5222
|
+
});
|
5125
5223
|
|
5126
|
-
|
5127
|
-
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
5128
|
-
flush && flush();
|
5129
|
-
unsubscribe && unsubscribe();
|
5130
|
-
}),
|
5131
|
-
options
|
5132
|
-
);
|
5133
|
-
}
|
5224
|
+
const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
5134
5225
|
|
5135
|
-
|
5226
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
5227
|
+
responseContentLength,
|
5228
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
5229
|
+
) || [];
|
5136
5230
|
|
5137
|
-
|
5231
|
+
response = new Response(
|
5232
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
5233
|
+
flush && flush();
|
5234
|
+
unsubscribe && unsubscribe();
|
5235
|
+
}),
|
5236
|
+
options
|
5237
|
+
);
|
5238
|
+
}
|
5138
5239
|
|
5139
|
-
|
5240
|
+
responseType = responseType || 'text';
|
5140
5241
|
|
5141
|
-
|
5142
|
-
settle(resolve, reject, {
|
5143
|
-
data: responseData,
|
5144
|
-
headers: AxiosHeaders$1.from(response.headers),
|
5145
|
-
status: response.status,
|
5146
|
-
statusText: response.statusText,
|
5147
|
-
config,
|
5148
|
-
request
|
5149
|
-
});
|
5150
|
-
})
|
5151
|
-
} catch (err) {
|
5152
|
-
unsubscribe && unsubscribe();
|
5242
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
5153
5243
|
|
5154
|
-
|
5155
|
-
|
5156
|
-
|
5157
|
-
{
|
5158
|
-
|
5159
|
-
|
5160
|
-
|
5244
|
+
!isStreamResponse && unsubscribe && unsubscribe();
|
5245
|
+
|
5246
|
+
return await new Promise((resolve, reject) => {
|
5247
|
+
settle(resolve, reject, {
|
5248
|
+
data: responseData,
|
5249
|
+
headers: AxiosHeaders$1.from(response.headers),
|
5250
|
+
status: response.status,
|
5251
|
+
statusText: response.statusText,
|
5252
|
+
config,
|
5253
|
+
request
|
5254
|
+
});
|
5255
|
+
})
|
5256
|
+
} catch (err) {
|
5257
|
+
unsubscribe && unsubscribe();
|
5258
|
+
|
5259
|
+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
5260
|
+
throw Object.assign(
|
5261
|
+
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
|
5262
|
+
{
|
5263
|
+
cause: err.cause || err
|
5264
|
+
}
|
5265
|
+
)
|
5266
|
+
}
|
5267
|
+
|
5268
|
+
throw AxiosError$1.from(err, err && err.code, config, request);
|
5161
5269
|
}
|
5270
|
+
}
|
5271
|
+
};
|
5272
|
+
|
5273
|
+
const seedCache = new Map();
|
5162
5274
|
|
5163
|
-
|
5275
|
+
const getFetch = (config) => {
|
5276
|
+
let env = config ? config.env : {};
|
5277
|
+
const {fetch, Request, Response} = env;
|
5278
|
+
const seeds = [
|
5279
|
+
Request, Response, fetch
|
5280
|
+
];
|
5281
|
+
|
5282
|
+
let len = seeds.length, i = len,
|
5283
|
+
seed, target, map = seedCache;
|
5284
|
+
|
5285
|
+
while (i--) {
|
5286
|
+
seed = seeds[i];
|
5287
|
+
target = map.get(seed);
|
5288
|
+
|
5289
|
+
target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
|
5290
|
+
|
5291
|
+
map = target;
|
5164
5292
|
}
|
5165
|
-
|
5293
|
+
|
5294
|
+
return target;
|
5295
|
+
};
|
5296
|
+
|
5297
|
+
getFetch();
|
5166
5298
|
|
5167
5299
|
const knownAdapters = {
|
5168
5300
|
http: httpAdapter,
|
5169
5301
|
xhr: xhrAdapter,
|
5170
|
-
fetch:
|
5302
|
+
fetch: {
|
5303
|
+
get: getFetch,
|
5304
|
+
}
|
5171
5305
|
};
|
5172
5306
|
|
5173
5307
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
@@ -5186,7 +5320,7 @@ const renderReason = (reason) => `- ${reason}`;
|
|
5186
5320
|
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
5187
5321
|
|
5188
5322
|
var adapters = {
|
5189
|
-
getAdapter: (adapters) => {
|
5323
|
+
getAdapter: (adapters, config) => {
|
5190
5324
|
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
5191
5325
|
|
5192
5326
|
const {length} = adapters;
|
@@ -5209,7 +5343,7 @@ var adapters = {
|
|
5209
5343
|
}
|
5210
5344
|
}
|
5211
5345
|
|
5212
|
-
if (adapter) {
|
5346
|
+
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
5213
5347
|
break;
|
5214
5348
|
}
|
5215
5349
|
|
@@ -5277,7 +5411,7 @@ function dispatchRequest(config) {
|
|
5277
5411
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
5278
5412
|
}
|
5279
5413
|
|
5280
|
-
const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
|
5414
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
5281
5415
|
|
5282
5416
|
return adapter(config).then(function onAdapterResolution(response) {
|
5283
5417
|
throwIfCancellationRequested(config);
|
@@ -5311,7 +5445,7 @@ function dispatchRequest(config) {
|
|
5311
5445
|
});
|
5312
5446
|
}
|
5313
5447
|
|
5314
|
-
const VERSION$1 = "1.
|
5448
|
+
const VERSION$1 = "1.12.2";
|
5315
5449
|
|
5316
5450
|
const validators$1 = {};
|
5317
5451
|
|
@@ -5419,7 +5553,7 @@ const validators = validator.validators;
|
|
5419
5553
|
*/
|
5420
5554
|
let Axios$1 = class Axios {
|
5421
5555
|
constructor(instanceConfig) {
|
5422
|
-
this.defaults = instanceConfig;
|
5556
|
+
this.defaults = instanceConfig || {};
|
5423
5557
|
this.interceptors = {
|
5424
5558
|
request: new InterceptorManager(),
|
5425
5559
|
response: new InterceptorManager()
|
@@ -5550,8 +5684,8 @@ let Axios$1 = class Axios {
|
|
5550
5684
|
|
5551
5685
|
if (!synchronousRequestInterceptors) {
|
5552
5686
|
const chain = [dispatchRequest.bind(this), undefined];
|
5553
|
-
chain.unshift
|
5554
|
-
chain.push
|
5687
|
+
chain.unshift(...requestInterceptorChain);
|
5688
|
+
chain.push(...responseInterceptorChain);
|
5555
5689
|
len = chain.length;
|
5556
5690
|
|
5557
5691
|
promise = Promise.resolve(config);
|
@@ -5567,8 +5701,6 @@ let Axios$1 = class Axios {
|
|
5567
5701
|
|
5568
5702
|
let newConfig = config;
|
5569
5703
|
|
5570
|
-
i = 0;
|
5571
|
-
|
5572
5704
|
while (i < len) {
|
5573
5705
|
const onFulfilled = requestInterceptorChain[i++];
|
5574
5706
|
const onRejected = requestInterceptorChain[i++];
|
@@ -7147,7 +7279,7 @@ const LETTERLIKE_SYMBOLS_MAP = {
|
|
7147
7279
|
'℠': '',
|
7148
7280
|
'℡': '',
|
7149
7281
|
'™': '',
|
7150
|
-
|
7282
|
+
℮: '',
|
7151
7283
|
ℯ: '',
|
7152
7284
|
ℰ: '',
|
7153
7285
|
ℱ: '',
|
@@ -7158,7 +7290,7 @@ const LETTERLIKE_SYMBOLS_MAP = {
|
|
7158
7290
|
ℶ: '',
|
7159
7291
|
ℷ: '',
|
7160
7292
|
ℸ: '',
|
7161
|
-
|
7293
|
+
℘: '',
|
7162
7294
|
};
|
7163
7295
|
const CURRENCY_SYMBOLS_MAP = {
|
7164
7296
|
'₠': '',
|
@@ -7401,7 +7533,7 @@ class NormalizeStringHelper {
|
|
7401
7533
|
*/
|
7402
7534
|
removeLeadingZerosIfNumber(text) {
|
7403
7535
|
// If the string is not a number, return it as is
|
7404
|
-
if (isNaN(Number(text))) {
|
7536
|
+
if (Number.isNaN(Number(text))) {
|
7405
7537
|
return text;
|
7406
7538
|
}
|
7407
7539
|
// If the string consists of only zeros, return "0"
|
@@ -7522,7 +7654,7 @@ class ObjectHelper {
|
|
7522
7654
|
if (this.isArray(value)) {
|
7523
7655
|
return this.mergeArrayValues(targetValue, value);
|
7524
7656
|
}
|
7525
|
-
|
7657
|
+
if (typeof value === 'object') {
|
7526
7658
|
return this.mergeObjectValues(targetValue, value);
|
7527
7659
|
}
|
7528
7660
|
return (_a = value !== null && value !== void 0 ? value : targetValue) !== null && _a !== void 0 ? _a : undefined;
|
@@ -7880,7 +8012,11 @@ function getAugmentedNamespace(n) {
|
|
7880
8012
|
var f = n.default;
|
7881
8013
|
if (typeof f == "function") {
|
7882
8014
|
var a = function a () {
|
7883
|
-
|
8015
|
+
var isInstance = false;
|
8016
|
+
try {
|
8017
|
+
isInstance = this instanceof a;
|
8018
|
+
} catch {}
|
8019
|
+
if (isInstance) {
|
7884
8020
|
return Reflect.construct(f, arguments, this.constructor);
|
7885
8021
|
}
|
7886
8022
|
return f.apply(this, arguments);
|
@@ -16633,8 +16769,7 @@ class ApiError {
|
|
16633
16769
|
var _a, _b, _c, _d, _e, _f, _g;
|
16634
16770
|
const e = error;
|
16635
16771
|
this.cause = (_d = (_b = (_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.data.statusCode) !== null && _b !== void 0 ? _b : (_c = e === null || e === void 0 ? void 0 : e.response) === null || _c === void 0 ? void 0 : _c.status) !== null && _d !== void 0 ? _d : 0;
|
16636
|
-
this.errorMessage =
|
16637
|
-
(_g = (_f = (_e = e === null || e === void 0 ? void 0 : e.response) === null || _e === void 0 ? void 0 : _e.data.message) !== null && _f !== void 0 ? _f : e === null || e === void 0 ? void 0 : e.message) !== null && _g !== void 0 ? _g : `There's been an error related to the API request to LiquidCommerce RMN Services.`;
|
16772
|
+
this.errorMessage = (_g = (_f = (_e = e === null || e === void 0 ? void 0 : e.response) === null || _e === void 0 ? void 0 : _e.data.message) !== null && _f !== void 0 ? _f : e === null || e === void 0 ? void 0 : e.message) !== null && _g !== void 0 ? _g : `There's been an error related to the API request to LiquidCommerce RMN Services.`;
|
16638
16773
|
}
|
16639
16774
|
}
|
16640
16775
|
|
@@ -16723,10 +16858,7 @@ class EncryptedApi {
|
|
16723
16858
|
async joseEncrypt(data, key, exp) {
|
16724
16859
|
// Encode and sign data
|
16725
16860
|
const currentDate = new Date();
|
16726
|
-
const token = new SignJWT(data)
|
16727
|
-
.setProtectedHeader({ alg: 'HS256' })
|
16728
|
-
.setIssuedAt(currentDate.getTime())
|
16729
|
-
.setExpirationTime(exp);
|
16861
|
+
const token = new SignJWT(data).setProtectedHeader({ alg: 'HS256' }).setIssuedAt(currentDate.getTime()).setExpirationTime(exp);
|
16730
16862
|
const signedToken = await token.sign(Buffer.from(key));
|
16731
16863
|
// Encrypt and format payload
|
16732
16864
|
return cryptoJsExports.AES.encrypt(signedToken, key).toString();
|
@@ -16764,6 +16896,7 @@ class BaseApi extends BaseApiAbstract {
|
|
16764
16896
|
});
|
16765
16897
|
}
|
16766
16898
|
getPartnerSite() {
|
16899
|
+
// biome-ignore lint/complexity/useOptionalChain: Type guard required before property access
|
16767
16900
|
if (typeof window !== 'undefined' && window.location) {
|
16768
16901
|
return window.location.origin;
|
16769
16902
|
}
|
@@ -16806,6 +16939,7 @@ class BaseApi extends BaseApiAbstract {
|
|
16806
16939
|
async post(path, data, configOverrides) {
|
16807
16940
|
let requestData = data;
|
16808
16941
|
if (![exports.RMN_ENV.LOCAL, exports.RMN_ENV.DEVELOPMENT].includes(this.authInfo.env)) {
|
16942
|
+
// biome-ignore lint/complexity/useDateNow: Timestamp needed for authentication headers
|
16809
16943
|
const timestamp = new Date().getTime();
|
16810
16944
|
configOverrides = {
|
16811
16945
|
...configOverrides,
|
@@ -16874,20 +17008,17 @@ class BaseApi extends BaseApiAbstract {
|
|
16874
17008
|
let responseData = (response === null || response === void 0 ? void 0 : response.data) ? response.data : null;
|
16875
17009
|
let isEncrypted = false;
|
16876
17010
|
let timestamp = 0;
|
16877
|
-
if (
|
17011
|
+
if (
|
17012
|
+
// biome-ignore lint/complexity/useOptionalChain: Explicit null checks preferred for readability
|
17013
|
+
(response === null || response === void 0 ? void 0 : response.headers) &&
|
16878
17014
|
((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a.has) &&
|
16879
17015
|
((_b = response === null || response === void 0 ? void 0 : response.headers) === null || _b === void 0 ? void 0 : _b.has(REQUEST_CLOUD_PROTECTED_KEY)) &&
|
16880
17016
|
((_c = response === null || response === void 0 ? void 0 : response.headers) === null || _c === void 0 ? void 0 : _c.has(REQUEST_CLOUD_PROTECTED_TIMESTAMP)) &&
|
16881
17017
|
((_d = response === null || response === void 0 ? void 0 : response.headers) === null || _d === void 0 ? void 0 : _d.get)) {
|
16882
17018
|
isEncrypted = ((_e = response === null || response === void 0 ? void 0 : response.headers) === null || _e === void 0 ? void 0 : _e.get(REQUEST_CLOUD_PROTECTED_KEY)) === 'true';
|
16883
|
-
timestamp = ((_f = response === null || response === void 0 ? void 0 : response.headers) === null || _f === void 0 ? void 0 : _f.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
|
16884
|
-
|
16885
|
-
|
16886
|
-
}
|
16887
|
-
if (responseData &&
|
16888
|
-
isEncrypted &&
|
16889
|
-
this.objectHelper.includes(responseData, 't') &&
|
16890
|
-
timestamp > 0) {
|
17019
|
+
timestamp = ((_f = response === null || response === void 0 ? void 0 : response.headers) === null || _f === void 0 ? void 0 : _f.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP)) ? Number((_g = response === null || response === void 0 ? void 0 : response.headers) === null || _g === void 0 ? void 0 : _g.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP)) : 0;
|
17020
|
+
}
|
17021
|
+
if (responseData && isEncrypted && this.objectHelper.includes(responseData, 't') && timestamp > 0) {
|
16891
17022
|
const { t: encryptedPayload } = responseData;
|
16892
17023
|
const decryptedData = await this.encryptedApi.handleDecryption(encryptedPayload, timestamp);
|
16893
17024
|
if (decryptedData === null || decryptedData === void 0 ? void 0 : decryptedData.payload) {
|
@@ -17046,9 +17177,7 @@ class BaseSpotComponent extends BaseElement {
|
|
17046
17177
|
if (!this.initialized || !this.dataInitialized || !isBrowser) {
|
17047
17178
|
return;
|
17048
17179
|
}
|
17049
|
-
this._container = this._config.useShadowDom
|
17050
|
-
? this.shadowRoot || this.attachShadow({ mode: 'open' })
|
17051
|
-
: this;
|
17180
|
+
this._container = this._config.useShadowDom ? this.shadowRoot || this.attachShadow({ mode: 'open' }) : this;
|
17052
17181
|
this._container.innerHTML = '';
|
17053
17182
|
const style = document.createElement('style');
|
17054
17183
|
style.textContent = this.baseStyles() + this.styles();
|
@@ -17247,10 +17376,7 @@ class LocalStorageService {
|
|
17247
17376
|
const decryptedData = this.decryptData(localStorageData);
|
17248
17377
|
const parsedData = JSON.parse(decryptedData);
|
17249
17378
|
if (Array.isArray(parsedData)) {
|
17250
|
-
const data = Object.fromEntries(parsedData.map((spot) => [
|
17251
|
-
spot[ENUM_SPOT_ARRAY_INDEX.SPOT_ID],
|
17252
|
-
this.spotArrayToObject(spot),
|
17253
|
-
]));
|
17379
|
+
const data = Object.fromEntries(parsedData.map((spot) => [spot[ENUM_SPOT_ARRAY_INDEX.SPOT_ID], this.spotArrayToObject(spot)]));
|
17254
17380
|
this.spots = this.objectToMap(data);
|
17255
17381
|
}
|
17256
17382
|
else {
|
@@ -17266,7 +17392,7 @@ class LocalStorageService {
|
|
17266
17392
|
updateLocalStorage() {
|
17267
17393
|
var _a;
|
17268
17394
|
if (!this.spots)
|
17269
|
-
return
|
17395
|
+
return;
|
17270
17396
|
const spotsObj = this.mapToObject(this.spots);
|
17271
17397
|
const data = Object.values(spotsObj).map((spot) => this.spotObjectToArray(spot));
|
17272
17398
|
try {
|
@@ -17704,9 +17830,9 @@ function convertHexToRgba(hex, opacity = 1) {
|
|
17704
17830
|
// Remove # if present
|
17705
17831
|
const cleanHex = hex.replace('#', '');
|
17706
17832
|
// Convert hex to RGB
|
17707
|
-
const r = parseInt(cleanHex.substring(0, 2), 16);
|
17708
|
-
const g = parseInt(cleanHex.substring(2, 4), 16);
|
17709
|
-
const b = parseInt(cleanHex.substring(4, 6), 16);
|
17833
|
+
const r = Number.parseInt(cleanHex.substring(0, 2), 16);
|
17834
|
+
const g = Number.parseInt(cleanHex.substring(2, 4), 16);
|
17835
|
+
const b = Number.parseInt(cleanHex.substring(4, 6), 16);
|
17710
17836
|
// Return rgba string
|
17711
17837
|
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
17712
17838
|
}
|
@@ -17734,10 +17860,7 @@ function generateGradientColor(overlay, fallback = '') {
|
|
17734
17860
|
}
|
17735
17861
|
function importFonts(...fonts) {
|
17736
17862
|
const fontsToImport = fonts.length === 0 ? ['sourceSans', 'cormorant'] : fonts;
|
17737
|
-
return [
|
17738
|
-
FONTS.preconnect,
|
17739
|
-
...fontsToImport.map((font) => FONTS[font]),
|
17740
|
-
].join('');
|
17863
|
+
return [FONTS.preconnect, ...fontsToImport.map((font) => FONTS[font])].join('');
|
17741
17864
|
}
|
17742
17865
|
function renderElement(tag, className, content) {
|
17743
17866
|
return (content === null || content === void 0 ? void 0 : content.trim()) ? `<${tag} class="${className}">${content}</${tag}>` : '';
|
@@ -17784,7 +17907,7 @@ class BillboardV1SE extends BaseSpotComponent {
|
|
17784
17907
|
elements.forEach((element) => {
|
17785
17908
|
if (element instanceof HTMLElement) {
|
17786
17909
|
if (!this.originalFontSizes.has(element)) {
|
17787
|
-
const originalSize = parseFloat(window.getComputedStyle(element).fontSize);
|
17910
|
+
const originalSize = Number.parseFloat(window.getComputedStyle(element).fontSize);
|
17788
17911
|
this.originalFontSizes.set(element, originalSize);
|
17789
17912
|
}
|
17790
17913
|
const originalSize = this.originalFontSizes.get(element);
|
@@ -18679,20 +18802,26 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18679
18802
|
`;
|
18680
18803
|
}
|
18681
18804
|
styles() {
|
18682
|
-
const { textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, mobileTextBlockPosition = textBlockPosition, } = this._data;
|
18805
|
+
const { textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, mobileTextBlockPosition = textBlockPosition, showContentGradient = true, } = this._data;
|
18683
18806
|
const desktopGradientDirection = this.getGradientDirection(textBlockPosition);
|
18684
18807
|
const mobileGradientDirection = this.getGradientDirection(mobileTextBlockPosition);
|
18685
18808
|
const linearGradient = generateGradientColor(this._config.overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%');
|
18686
18809
|
const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
|
18687
18810
|
const prefix = this._config.prefix;
|
18811
|
+
// Determine mobile background image based on hasContent and enableGradient
|
18812
|
+
const mobileBackgroundImage = this.hasContent && showContentGradient
|
18813
|
+
? `background-image: linear-gradient(${mobileGradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");`
|
18814
|
+
: `background-image: url("${mobilePrimaryImage}");`;
|
18815
|
+
// Determine desktop background image based on hasContent and enableGradient
|
18816
|
+
const desktopBackgroundImage = this.hasContent && showContentGradient
|
18817
|
+
? `background-image: linear-gradient(${desktopGradientDirection}, ${linearGradient}), url("${primaryImage}");`
|
18818
|
+
: `background-image: url("${primaryImage}");`;
|
18688
18819
|
return `
|
18689
18820
|
.${prefix} {
|
18690
18821
|
display: flex;
|
18691
18822
|
width: 100%;
|
18692
18823
|
height: 100%;
|
18693
|
-
${
|
18694
|
-
? `background-image: linear-gradient(${mobileGradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");`
|
18695
|
-
: `background-image: url("${mobilePrimaryImage}");`}
|
18824
|
+
${mobileBackgroundImage}
|
18696
18825
|
background-size: cover;
|
18697
18826
|
background-repeat: no-repeat;
|
18698
18827
|
background-position: center;
|
@@ -18811,9 +18940,7 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
|
|
18811
18940
|
|
18812
18941
|
@container (min-width: 640px) {
|
18813
18942
|
.${prefix} {
|
18814
|
-
${
|
18815
|
-
? `background-image: linear-gradient(${desktopGradientDirection}, ${linearGradient}), url("${primaryImage}");`
|
18816
|
-
: `background-image: url("${primaryImage}");`}
|
18943
|
+
${desktopBackgroundImage}
|
18817
18944
|
}
|
18818
18945
|
|
18819
18946
|
.${prefix}__text > * {
|
@@ -19400,7 +19527,7 @@ class RbInTextSE extends BaseSpotComponent {
|
|
19400
19527
|
`;
|
19401
19528
|
}
|
19402
19529
|
styles() {
|
19403
|
-
const { textColor = '#212121', backgroundColor = 'transparent', textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.LEFT
|
19530
|
+
const { textColor = '#212121', backgroundColor = 'transparent', textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.LEFT } = this._data;
|
19404
19531
|
const prefix = this._config.prefix;
|
19405
19532
|
return `
|
19406
19533
|
.${prefix} {
|
@@ -19871,7 +19998,7 @@ class RbLongToutTallSE extends BaseSpotComponent {
|
|
19871
19998
|
`;
|
19872
19999
|
}
|
19873
20000
|
styles() {
|
19874
|
-
const { textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, mobileTextBlockPosition = textBlockPosition
|
20001
|
+
const { textBlockPosition = exports.ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, mobileTextBlockPosition = textBlockPosition } = this._data;
|
19875
20002
|
const desktopGradientDirection = this.getGradientDirection(textBlockPosition);
|
19876
20003
|
const mobileGradientDirection = this.getGradientDirection(mobileTextBlockPosition);
|
19877
20004
|
const linearGradient = generateGradientColor(this._config.overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%');
|
@@ -20333,7 +20460,7 @@ class RbSmallDiscoverToutSE extends BaseSpotComponent {
|
|
20333
20460
|
`;
|
20334
20461
|
}
|
20335
20462
|
styles() {
|
20336
|
-
const { textColor = '#000000', backgroundColor = 'transparent', primaryImage, mobilePrimaryImage = primaryImage
|
20463
|
+
const { textColor = '#000000', backgroundColor = 'transparent', primaryImage, mobilePrimaryImage = primaryImage } = this._data;
|
20337
20464
|
const prefix = this._config.prefix;
|
20338
20465
|
return `
|
20339
20466
|
.${prefix} {
|
@@ -20503,10 +20630,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20503
20630
|
description: mobileDescription,
|
20504
20631
|
}
|
20505
20632
|
: { header, description };
|
20506
|
-
const elements = [
|
20507
|
-
renderElement('h2', `${prefix}__header`, content.header),
|
20508
|
-
renderElement('p', `${prefix}__description`, content.description),
|
20509
|
-
];
|
20633
|
+
const elements = [renderElement('h2', `${prefix}__header`, content.header), renderElement('p', `${prefix}__description`, content.description)];
|
20510
20634
|
return `
|
20511
20635
|
<div class="${prefix}__text ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
|
20512
20636
|
${elements.join('')}
|
@@ -20645,9 +20769,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20645
20769
|
|
20646
20770
|
@container (max-width: 639px) {
|
20647
20771
|
.${prefix}::before {
|
20648
|
-
${this.hasContent
|
20649
|
-
? `background: linear-gradient(${mobileGradientDirection}, ${linearGradient});`
|
20650
|
-
: ``}
|
20772
|
+
${this.hasContent ? `background: linear-gradient(${mobileGradientDirection}, ${linearGradient});` : ''}
|
20651
20773
|
}
|
20652
20774
|
|
20653
20775
|
.${prefix}__text-block-mobile--${exports.ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
|
@@ -20703,9 +20825,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
|
|
20703
20825
|
|
20704
20826
|
@container (min-width: 640px) {
|
20705
20827
|
.${prefix}::before {
|
20706
|
-
${this.hasContent
|
20707
|
-
? `background: linear-gradient(${desktopGradientDirection}, ${linearGradient});`
|
20708
|
-
: ``}
|
20828
|
+
${this.hasContent ? `background: linear-gradient(${desktopGradientDirection}, ${linearGradient});` : ''}
|
20709
20829
|
}
|
20710
20830
|
|
20711
20831
|
.${prefix}__text > * {
|
@@ -21325,18 +21445,14 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
21325
21445
|
this.cloneToOriginalMap.set(newSpot, original);
|
21326
21446
|
// Add event delegation
|
21327
21447
|
let isDragging = false;
|
21328
|
-
slideElement.addEventListener('mousedown', () =>
|
21329
|
-
|
21448
|
+
slideElement.addEventListener('mousedown', () => {
|
21449
|
+
isDragging = false;
|
21450
|
+
});
|
21451
|
+
slideElement.addEventListener('mousemove', () => {
|
21452
|
+
isDragging = true;
|
21453
|
+
});
|
21330
21454
|
// Delegate all events to the original element
|
21331
|
-
const eventTypes = [
|
21332
|
-
'click',
|
21333
|
-
'mouseenter',
|
21334
|
-
'mouseleave',
|
21335
|
-
'mouseover',
|
21336
|
-
'mouseout',
|
21337
|
-
'focus',
|
21338
|
-
'blur',
|
21339
|
-
];
|
21455
|
+
const eventTypes = ['click', 'mouseenter', 'mouseleave', 'mouseover', 'mouseout', 'focus', 'blur'];
|
21340
21456
|
eventTypes.forEach((eventType) => {
|
21341
21457
|
newSpot.addEventListener(eventType, (e) => {
|
21342
21458
|
if (eventType === 'click' && isDragging) {
|
@@ -21623,8 +21739,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
21623
21739
|
updateDragPosition() {
|
21624
21740
|
if (!this.elements.slidesContainer || this.state.isTransitioning)
|
21625
21741
|
return;
|
21626
|
-
const translateX = -this.state.virtualIndex * 100 -
|
21627
|
-
(this.state.dragDistance / this.state.containerWidth) * 100;
|
21742
|
+
const translateX = -this.state.virtualIndex * 100 - (this.state.dragDistance / this.state.containerWidth) * 100;
|
21628
21743
|
this.elements.slidesContainer.style.transform = `translateX(${translateX}%)`;
|
21629
21744
|
this.elements.slidesContainer.style.transition = 'none';
|
21630
21745
|
}
|
@@ -21632,6 +21747,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
21632
21747
|
* Navigates to a specific slide
|
21633
21748
|
* Used primarily by dot navigation
|
21634
21749
|
*/
|
21750
|
+
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: Used for dot navigation
|
21635
21751
|
goToSlide(index) {
|
21636
21752
|
if (this.state.isTransitioning)
|
21637
21753
|
return;
|
@@ -21817,9 +21933,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
|
|
21817
21933
|
* Ensures only valid positions are used
|
21818
21934
|
*/
|
21819
21935
|
validateButtonsPosition() {
|
21820
|
-
if (this.state.useButtons &&
|
21821
|
-
!this.state.buttons.together &&
|
21822
|
-
this.state.buttons.position !== 'middle-sides') {
|
21936
|
+
if (this.state.useButtons && !this.state.buttons.together && this.state.buttons.position !== 'middle-sides') {
|
21823
21937
|
console.warn('LiquidCommerce Rmn Sdk: When buttons are not together, only "middle-sides" is allowed. Defaulting to "middle-sides".');
|
21824
21938
|
this.state.buttons.position = 'middle-sides';
|
21825
21939
|
}
|
@@ -22216,7 +22330,7 @@ class MonitorService {
|
|
22216
22330
|
}
|
22217
22331
|
}
|
22218
22332
|
}
|
22219
|
-
async fireAndPublishSpotEvent({ spotEvent, eventUrl, placementId, spotId, spotType
|
22333
|
+
async fireAndPublishSpotEvent({ spotEvent, eventUrl, placementId, spotId, spotType }) {
|
22220
22334
|
await fireEvent({
|
22221
22335
|
spotType,
|
22222
22336
|
event: spotEvent,
|
@@ -22235,8 +22349,7 @@ class MonitorService {
|
|
22235
22349
|
return AnalyticsTool.Other;
|
22236
22350
|
}
|
22237
22351
|
// Check for GTM
|
22238
|
-
if (typeof window.google_tag_manager !== 'undefined' ||
|
22239
|
-
typeof window.dataLayer !== 'undefined') {
|
22352
|
+
if (typeof window.google_tag_manager !== 'undefined' || typeof window.dataLayer !== 'undefined') {
|
22240
22353
|
return AnalyticsTool.GoogleTagManager;
|
22241
22354
|
}
|
22242
22355
|
// Check for GA (both Universal Analytics and GA4)
|
@@ -22419,14 +22532,10 @@ class SpotManagerService {
|
|
22419
22532
|
}
|
22420
22533
|
deepMerge(current, updates) {
|
22421
22534
|
return {
|
22422
|
-
identifier: updates.identifier
|
22423
|
-
? { ...current.identifier, ...updates.identifier }
|
22424
|
-
: current.identifier,
|
22535
|
+
identifier: updates.identifier ? { ...current.identifier, ...updates.identifier } : current.identifier,
|
22425
22536
|
dom: updates.dom ? { ...current.dom, ...updates.dom } : current.dom,
|
22426
22537
|
state: updates.state ? { ...current.state, ...updates.state } : current.state,
|
22427
|
-
displayConfig: updates.displayConfig
|
22428
|
-
? { ...current.displayConfig, ...updates.displayConfig }
|
22429
|
-
: current.displayConfig,
|
22538
|
+
displayConfig: updates.displayConfig ? { ...current.displayConfig, ...updates.displayConfig } : current.displayConfig,
|
22430
22539
|
};
|
22431
22540
|
}
|
22432
22541
|
}
|
@@ -22627,9 +22736,7 @@ class BrowserRmnClient {
|
|
22627
22736
|
if (!placement || !injectData) {
|
22628
22737
|
this.spotManagerService.updateSpotLifecycleState(placementId, {
|
22629
22738
|
state: {
|
22630
|
-
error: !placement
|
22631
|
-
? `Placement element not found for id "${placementId}".`
|
22632
|
-
: `Placement not found for id "${placementId}".`,
|
22739
|
+
error: !placement ? `Placement element not found for id "${placementId}".` : `Placement not found for id "${placementId}".`,
|
22633
22740
|
mounted: false,
|
22634
22741
|
loading: false,
|
22635
22742
|
},
|
@@ -22651,7 +22758,7 @@ class BrowserRmnClient {
|
|
22651
22758
|
if (!skeletonElement) {
|
22652
22759
|
this.spotManagerService.updateSpotLifecycleState(injectData.placementId, {
|
22653
22760
|
state: {
|
22654
|
-
error:
|
22761
|
+
error: 'Failed to create skeleton loader element.',
|
22655
22762
|
loading: true,
|
22656
22763
|
},
|
22657
22764
|
});
|
@@ -22864,7 +22971,7 @@ class BrowserRmnClient {
|
|
22864
22971
|
if (!carouselElement) {
|
22865
22972
|
this.spotManagerService.updateSpotLifecycleState(placementId, {
|
22866
22973
|
state: {
|
22867
|
-
error:
|
22974
|
+
error: 'Failed to inject spot carousel element. Could not create spot carousel element.',
|
22868
22975
|
mounted: false,
|
22869
22976
|
loading: false,
|
22870
22977
|
},
|
@@ -22939,23 +23046,21 @@ class ServerRmnClient {
|
|
22939
23046
|
/**
|
22940
23047
|
* Publishes the spot data for a given placement ID to the RMN.
|
22941
23048
|
*
|
22942
|
-
* @param {string}
|
22943
|
-
* @param {ISpot}
|
23049
|
+
* @param {string} _placementId - The unique identifier for the placement.
|
23050
|
+
* @param {ISpot} _spot - The spot data.
|
22944
23051
|
* @return {void} - Does not return any value.
|
22945
23052
|
*/
|
22946
|
-
|
22947
|
-
publishSpotToRmn(placementId, spot) {
|
23053
|
+
publishSpotToRmn(_placementId, _spot) {
|
22948
23054
|
console.warn('RmnSdk: Publishing spot elements is not supported in server-side environment.');
|
22949
23055
|
}
|
22950
23056
|
/**
|
22951
23057
|
* Injects the spot elements into their provided placement.
|
22952
23058
|
*
|
22953
|
-
* @param {IInjectSpotElementParams}
|
23059
|
+
* @param {IInjectSpotElementParams} _params - Parameters for injecting spot elements.
|
22954
23060
|
*
|
22955
23061
|
* @return {Promise<void>} - A promise that resolves when the spot elements are injected.
|
22956
23062
|
*/
|
22957
|
-
|
22958
|
-
async injectSpotElement(params) {
|
23063
|
+
async injectSpotElement(_params) {
|
22959
23064
|
console.warn('RmnSdk: Injecting spot elements is not supported in server-side environment.');
|
22960
23065
|
}
|
22961
23066
|
}
|