@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.esm.js CHANGED
@@ -283,6 +283,7 @@ function bind(fn, thisArg) {
283
283
 
284
284
  const {toString: toString$1} = Object.prototype;
285
285
  const {getPrototypeOf} = Object;
286
+ const {iterator, toStringTag} = Symbol;
286
287
 
287
288
  const kindOf = (cache => thing => {
288
289
  const str = toString$1.call(thing);
@@ -323,7 +324,7 @@ const isUndefined = typeOfTest('undefined');
323
324
  */
324
325
  function isBuffer$1(val) {
325
326
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
326
- && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
327
+ && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
327
328
  }
328
329
 
329
330
  /**
@@ -368,7 +369,7 @@ const isString = typeOfTest('string');
368
369
  * @param {*} val The value to test
369
370
  * @returns {boolean} True if value is a Function, otherwise false
370
371
  */
371
- const isFunction = typeOfTest('function');
372
+ const isFunction$1 = typeOfTest('function');
372
373
 
373
374
  /**
374
375
  * Determine if a value is a Number
@@ -409,7 +410,28 @@ const isPlainObject = (val) => {
409
410
  }
410
411
 
411
412
  const prototype = getPrototypeOf(val);
412
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
413
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
414
+ };
415
+
416
+ /**
417
+ * Determine if a value is an empty object (safely handles Buffers)
418
+ *
419
+ * @param {*} val The value to test
420
+ *
421
+ * @returns {boolean} True if value is an empty object, otherwise false
422
+ */
423
+ const isEmptyObject = (val) => {
424
+ // Early return for non-objects or Buffers to prevent RangeError
425
+ if (!isObject$1(val) || isBuffer$1(val)) {
426
+ return false;
427
+ }
428
+
429
+ try {
430
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
431
+ } catch (e) {
432
+ // Fallback for any other objects that might cause RangeError with Object.keys()
433
+ return false;
434
+ }
413
435
  };
414
436
 
415
437
  /**
@@ -455,7 +477,7 @@ const isFileList = kindOfTest('FileList');
455
477
  *
456
478
  * @returns {boolean} True if value is a Stream, otherwise false
457
479
  */
458
- const isStream = (val) => isObject$1(val) && isFunction(val.pipe);
480
+ const isStream = (val) => isObject$1(val) && isFunction$1(val.pipe);
459
481
 
460
482
  /**
461
483
  * Determine if a value is a FormData
@@ -468,10 +490,10 @@ const isFormData = (thing) => {
468
490
  let kind;
469
491
  return thing && (
470
492
  (typeof FormData === 'function' && thing instanceof FormData) || (
471
- isFunction(thing.append) && (
493
+ isFunction$1(thing.append) && (
472
494
  (kind = kindOf(thing)) === 'formdata' ||
473
495
  // detect form-data instance
474
- (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
496
+ (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
475
497
  )
476
498
  )
477
499
  )
@@ -534,6 +556,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
534
556
  fn.call(null, obj[i], i, obj);
535
557
  }
536
558
  } else {
559
+ // Buffer check
560
+ if (isBuffer$1(obj)) {
561
+ return;
562
+ }
563
+
537
564
  // Iterate over object keys
538
565
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
539
566
  const len = keys.length;
@@ -547,6 +574,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
547
574
  }
548
575
 
549
576
  function findKey(obj, key) {
577
+ if (isBuffer$1(obj)){
578
+ return null;
579
+ }
580
+
550
581
  key = key.toLowerCase();
551
582
  const keys = Object.keys(obj);
552
583
  let i = keys.length;
@@ -587,7 +618,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
587
618
  * @returns {Object} Result of all merge properties
588
619
  */
589
620
  function merge(/* obj1, obj2, obj3, ... */) {
590
- const {caseless} = isContextDefined(this) && this || {};
621
+ const {caseless, skipUndefined} = isContextDefined(this) && this || {};
591
622
  const result = {};
592
623
  const assignValue = (val, key) => {
593
624
  const targetKey = caseless && findKey(result, key) || key;
@@ -597,7 +628,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
597
628
  result[targetKey] = merge({}, val);
598
629
  } else if (isArray$1(val)) {
599
630
  result[targetKey] = val.slice();
600
- } else {
631
+ } else if (!skipUndefined || !isUndefined(val)) {
601
632
  result[targetKey] = val;
602
633
  }
603
634
  };
@@ -620,7 +651,7 @@ function merge(/* obj1, obj2, obj3, ... */) {
620
651
  */
621
652
  const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
622
653
  forEach(b, (val, key) => {
623
- if (thisArg && isFunction(val)) {
654
+ if (thisArg && isFunction$1(val)) {
624
655
  a[key] = bind(val, thisArg);
625
656
  } else {
626
657
  a[key] = val;
@@ -760,13 +791,13 @@ const isTypedArray = (TypedArray => {
760
791
  * @returns {void}
761
792
  */
762
793
  const forEachEntry = (obj, fn) => {
763
- const generator = obj && obj[Symbol.iterator];
794
+ const generator = obj && obj[iterator];
764
795
 
765
- const iterator = generator.call(obj);
796
+ const _iterator = generator.call(obj);
766
797
 
767
798
  let result;
768
799
 
769
- while ((result = iterator.next()) && !result.done) {
800
+ while ((result = _iterator.next()) && !result.done) {
770
801
  const pair = result.value;
771
802
  fn.call(obj, pair[0], pair[1]);
772
803
  }
@@ -836,13 +867,13 @@ const reduceDescriptors = (obj, reducer) => {
836
867
  const freezeMethods = (obj) => {
837
868
  reduceDescriptors(obj, (descriptor, name) => {
838
869
  // skip restricted props in strict mode
839
- if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
870
+ if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
840
871
  return false;
841
872
  }
842
873
 
843
874
  const value = obj[name];
844
875
 
845
- if (!isFunction(value)) return;
876
+ if (!isFunction$1(value)) return;
846
877
 
847
878
  descriptor.enumerable = false;
848
879
 
@@ -879,6 +910,8 @@ const toFiniteNumber = (value, defaultValue) => {
879
910
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
880
911
  };
881
912
 
913
+
914
+
882
915
  /**
883
916
  * If the thing is a FormData object, return true, otherwise return false.
884
917
  *
@@ -887,7 +920,7 @@ const toFiniteNumber = (value, defaultValue) => {
887
920
  * @returns {boolean}
888
921
  */
889
922
  function isSpecCompliantForm(thing) {
890
- return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
923
+ return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
891
924
  }
892
925
 
893
926
  const toJSONObject = (obj) => {
@@ -900,6 +933,11 @@ const toJSONObject = (obj) => {
900
933
  return;
901
934
  }
902
935
 
936
+ //Buffer check
937
+ if (isBuffer$1(source)) {
938
+ return source;
939
+ }
940
+
903
941
  if(!('toJSON' in source)) {
904
942
  stack[i] = source;
905
943
  const target = isArray$1(source) ? [] : {};
@@ -924,7 +962,7 @@ const toJSONObject = (obj) => {
924
962
  const isAsyncFn = kindOfTest('AsyncFunction');
925
963
 
926
964
  const isThenable = (thing) =>
927
- thing && (isObject$1(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
965
+ thing && (isObject$1(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
928
966
 
929
967
  // original code
930
968
  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
@@ -948,7 +986,7 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
948
986
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
949
987
  })(
950
988
  typeof setImmediate === 'function',
951
- isFunction(_global.postMessage)
989
+ isFunction$1(_global.postMessage)
952
990
  );
953
991
 
954
992
  const asap = typeof queueMicrotask !== 'undefined' ?
@@ -956,6 +994,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
956
994
 
957
995
  // *********************
958
996
 
997
+
998
+ const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
999
+
1000
+
959
1001
  var utils$1 = {
960
1002
  isArray: isArray$1,
961
1003
  isArrayBuffer,
@@ -967,6 +1009,7 @@ var utils$1 = {
967
1009
  isBoolean,
968
1010
  isObject: isObject$1,
969
1011
  isPlainObject,
1012
+ isEmptyObject,
970
1013
  isReadableStream,
971
1014
  isRequest,
972
1015
  isResponse,
@@ -976,7 +1019,7 @@ var utils$1 = {
976
1019
  isFile,
977
1020
  isBlob,
978
1021
  isRegExp,
979
- isFunction,
1022
+ isFunction: isFunction$1,
980
1023
  isStream,
981
1024
  isURLSearchParams,
982
1025
  isTypedArray,
@@ -1011,7 +1054,8 @@ var utils$1 = {
1011
1054
  isAsyncFn,
1012
1055
  isThenable,
1013
1056
  setImmediate: _setImmediate,
1014
- asap
1057
+ asap,
1058
+ isIterable
1015
1059
  };
1016
1060
 
1017
1061
  var lookup = [];
@@ -3078,11 +3122,18 @@ AxiosError$1.from = (error, code, config, request, response, customProps) => {
3078
3122
  return prop !== 'isAxiosError';
3079
3123
  });
3080
3124
 
3081
- AxiosError$1.call(axiosError, error.message, code, config, request, response);
3125
+ const msg = error && error.message ? error.message : 'Error';
3082
3126
 
3083
- axiosError.cause = error;
3127
+ // Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
3128
+ const errCode = code == null && error ? error.code : code;
3129
+ AxiosError$1.call(axiosError, msg, errCode, config, request, response);
3084
3130
 
3085
- axiosError.name = error.name;
3131
+ // Chain the original error on the standard field; non-enumerable to avoid JSON noise
3132
+ if (error && axiosError.cause == null) {
3133
+ Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
3134
+ }
3135
+
3136
+ axiosError.name = (error && error.name) || 'Error';
3086
3137
 
3087
3138
  customProps && Object.assign(axiosError, customProps);
3088
3139
 
@@ -3207,6 +3258,10 @@ function toFormData$1(obj, formData, options) {
3207
3258
  return value.toISOString();
3208
3259
  }
3209
3260
 
3261
+ if (utils$1.isBoolean(value)) {
3262
+ return value.toString();
3263
+ }
3264
+
3210
3265
  if (!useBlob && utils$1.isBlob(value)) {
3211
3266
  throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
3212
3267
  }
@@ -3369,9 +3424,7 @@ function encode$1(val) {
3369
3424
  replace(/%3A/gi, ':').
3370
3425
  replace(/%24/g, '$').
3371
3426
  replace(/%2C/gi, ',').
3372
- replace(/%20/g, '+').
3373
- replace(/%5B/gi, '[').
3374
- replace(/%5D/gi, ']');
3427
+ replace(/%20/g, '+');
3375
3428
  }
3376
3429
 
3377
3430
  /**
@@ -3568,7 +3621,7 @@ var platform = {
3568
3621
  };
3569
3622
 
3570
3623
  function toURLEncodedForm(data, options) {
3571
- return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
3624
+ return toFormData$1(data, new platform.classes.URLSearchParams(), {
3572
3625
  visitor: function(value, key, path, helpers) {
3573
3626
  if (platform.isNode && utils$1.isBuffer(value)) {
3574
3627
  this.append(key, value.toString('base64'));
@@ -3576,8 +3629,9 @@ function toURLEncodedForm(data, options) {
3576
3629
  }
3577
3630
 
3578
3631
  return helpers.defaultVisitor.apply(this, arguments);
3579
- }
3580
- }, options));
3632
+ },
3633
+ ...options
3634
+ });
3581
3635
  }
3582
3636
 
3583
3637
  /**
@@ -3773,7 +3827,7 @@ const defaults = {
3773
3827
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
3774
3828
 
3775
3829
  try {
3776
- return JSON.parse(data);
3830
+ return JSON.parse(data, this.parseReviver);
3777
3831
  } catch (e) {
3778
3832
  if (strictJSONParsing) {
3779
3833
  if (e.name === 'SyntaxError') {
@@ -3969,10 +4023,18 @@ let AxiosHeaders$1 = class AxiosHeaders {
3969
4023
  setHeaders(header, valueOrRewrite);
3970
4024
  } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
3971
4025
  setHeaders(parseHeaders(header), valueOrRewrite);
3972
- } else if (utils$1.isHeaders(header)) {
3973
- for (const [key, value] of header.entries()) {
3974
- setHeader(value, key, rewrite);
4026
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
4027
+ let obj = {}, dest, key;
4028
+ for (const entry of header) {
4029
+ if (!utils$1.isArray(entry)) {
4030
+ throw TypeError('Object iterator must return a key-value pair');
4031
+ }
4032
+
4033
+ obj[key = entry[0]] = (dest = obj[key]) ?
4034
+ (utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
3975
4035
  }
4036
+
4037
+ setHeaders(obj, valueOrRewrite);
3976
4038
  } else {
3977
4039
  header != null && setHeader(valueOrRewrite, header, rewrite);
3978
4040
  }
@@ -4114,6 +4176,10 @@ let AxiosHeaders$1 = class AxiosHeaders {
4114
4176
  return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
4115
4177
  }
4116
4178
 
4179
+ getSetCookie() {
4180
+ return this.get("set-cookie") || [];
4181
+ }
4182
+
4117
4183
  get [Symbol.toStringTag]() {
4118
4184
  return 'AxiosHeaders';
4119
4185
  }
@@ -4314,7 +4380,7 @@ function throttle(fn, freq) {
4314
4380
  clearTimeout(timer);
4315
4381
  timer = null;
4316
4382
  }
4317
- fn.apply(null, args);
4383
+ fn(...args);
4318
4384
  };
4319
4385
 
4320
4386
  const throttled = (...args) => {
@@ -4471,7 +4537,7 @@ function combineURLs(baseURL, relativeURL) {
4471
4537
  */
4472
4538
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
4473
4539
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
4474
- if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
4540
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
4475
4541
  return combineURLs(baseURL, requestedURL);
4476
4542
  }
4477
4543
  return requestedURL;
@@ -4570,7 +4636,7 @@ function mergeConfig$1(config1, config2) {
4570
4636
  headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
4571
4637
  };
4572
4638
 
4573
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
4639
+ utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
4574
4640
  const merge = mergeMap[prop] || mergeDeepProperties;
4575
4641
  const configValue = merge(config1[prop], config2[prop], prop);
4576
4642
  (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
@@ -4582,7 +4648,7 @@ function mergeConfig$1(config1, config2) {
4582
4648
  var resolveConfig = (config) => {
4583
4649
  const newConfig = mergeConfig$1({}, config);
4584
4650
 
4585
- let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
4651
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
4586
4652
 
4587
4653
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
4588
4654
 
@@ -4595,17 +4661,21 @@ var resolveConfig = (config) => {
4595
4661
  );
4596
4662
  }
4597
4663
 
4598
- let contentType;
4599
-
4600
4664
  if (utils$1.isFormData(data)) {
4601
4665
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
4602
- headers.setContentType(undefined); // Let the browser set it
4603
- } else if ((contentType = headers.getContentType()) !== false) {
4604
- // fix semicolon duplication issue for ReactNative FormData implementation
4605
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
4606
- headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
4666
+ headers.setContentType(undefined); // browser handles it
4667
+ } else if (utils$1.isFunction(data.getHeaders)) {
4668
+ // Node.js FormData (like form-data package)
4669
+ const formHeaders = data.getHeaders();
4670
+ // Only set safe headers to avoid overwriting security headers
4671
+ const allowedHeaders = ['content-type', 'content-length'];
4672
+ Object.entries(formHeaders).forEach(([key, val]) => {
4673
+ if (allowedHeaders.includes(key.toLowerCase())) {
4674
+ headers.set(key, val);
4675
+ }
4676
+ });
4607
4677
  }
4608
- }
4678
+ }
4609
4679
 
4610
4680
  // Add xsrf header
4611
4681
  // This is only done if running in a standard browser environment.
@@ -4722,15 +4792,18 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
4722
4792
  };
4723
4793
 
4724
4794
  // Handle low level network errors
4725
- request.onerror = function handleError() {
4726
- // Real errors are hidden from us by the browser
4727
- // onerror should only fire if it's a network error
4728
- reject(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request));
4729
-
4730
- // Clean up request
4731
- request = null;
4795
+ request.onerror = function handleError(event) {
4796
+ // Browsers deliver a ProgressEvent in XHR onerror
4797
+ // (message may be empty; when present, surface it)
4798
+ // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
4799
+ const msg = event && event.message ? event.message : 'Network Error';
4800
+ const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
4801
+ // attach the underlying event for consumers who want details
4802
+ err.event = event || null;
4803
+ reject(err);
4804
+ request = null;
4732
4805
  };
4733
-
4806
+
4734
4807
  // Handle timeout
4735
4808
  request.ontimeout = function handleTimeout() {
4736
4809
  let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
@@ -4944,14 +5017,18 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
4944
5017
  })
4945
5018
  };
4946
5019
 
4947
- const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
4948
- const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
5020
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
5021
+
5022
+ const {isFunction} = utils$1;
5023
+
5024
+ const globalFetchAPI = (({Request, Response}) => ({
5025
+ Request, Response
5026
+ }))(utils$1.global);
5027
+
5028
+ const {
5029
+ ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1
5030
+ } = utils$1.global;
4949
5031
 
4950
- // used only inside the fetch adapter
4951
- const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
4952
- ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
4953
- async (str) => new Uint8Array(await new Response(str).arrayBuffer())
4954
- );
4955
5032
 
4956
5033
  const test = (fn, ...args) => {
4957
5034
  try {
@@ -4961,211 +5038,268 @@ const test = (fn, ...args) => {
4961
5038
  }
4962
5039
  };
4963
5040
 
4964
- const supportsRequestStream = isReadableStreamSupported && test(() => {
4965
- let duplexAccessed = false;
5041
+ const factory = (env) => {
5042
+ env = utils$1.merge.call({
5043
+ skipUndefined: true
5044
+ }, globalFetchAPI, env);
4966
5045
 
4967
- const hasContentType = new Request(platform.origin, {
4968
- body: new ReadableStream(),
4969
- method: 'POST',
4970
- get duplex() {
4971
- duplexAccessed = true;
4972
- return 'half';
4973
- },
4974
- }).headers.has('Content-Type');
5046
+ const {fetch: envFetch, Request, Response} = env;
5047
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
5048
+ const isRequestSupported = isFunction(Request);
5049
+ const isResponseSupported = isFunction(Response);
4975
5050
 
4976
- return duplexAccessed && !hasContentType;
4977
- });
5051
+ if (!isFetchSupported) {
5052
+ return false;
5053
+ }
4978
5054
 
4979
- const DEFAULT_CHUNK_SIZE = 64 * 1024;
5055
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
4980
5056
 
4981
- const supportsResponseStream = isReadableStreamSupported &&
4982
- test(() => utils$1.isReadableStream(new Response('').body));
5057
+ const encodeText = isFetchSupported && (typeof TextEncoder$1 === 'function' ?
5058
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) :
5059
+ async (str) => new Uint8Array(await new Request(str).arrayBuffer())
5060
+ );
4983
5061
 
5062
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
5063
+ let duplexAccessed = false;
4984
5064
 
4985
- const resolvers = {
4986
- stream: supportsResponseStream && ((res) => res.body)
4987
- };
5065
+ const hasContentType = new Request(platform.origin, {
5066
+ body: new ReadableStream$1(),
5067
+ method: 'POST',
5068
+ get duplex() {
5069
+ duplexAccessed = true;
5070
+ return 'half';
5071
+ },
5072
+ }).headers.has('Content-Type');
4988
5073
 
4989
- isFetchSupported && (((res) => {
4990
- ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
4991
- !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
4992
- (_, config) => {
4993
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
4994
- });
5074
+ return duplexAccessed && !hasContentType;
4995
5075
  });
4996
- })(new Response));
4997
5076
 
4998
- const getBodyLength = async (body) => {
4999
- if (body == null) {
5000
- return 0;
5001
- }
5077
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
5078
+ test(() => utils$1.isReadableStream(new Response('').body));
5002
5079
 
5003
- if(utils$1.isBlob(body)) {
5004
- return body.size;
5005
- }
5080
+ const resolvers = {
5081
+ stream: supportsResponseStream && ((res) => res.body)
5082
+ };
5006
5083
 
5007
- if(utils$1.isSpecCompliantForm(body)) {
5008
- const _request = new Request(platform.origin, {
5009
- method: 'POST',
5010
- body,
5084
+ isFetchSupported && ((() => {
5085
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
5086
+ !resolvers[type] && (resolvers[type] = (res, config) => {
5087
+ let method = res && res[type];
5088
+
5089
+ if (method) {
5090
+ return method.call(res);
5091
+ }
5092
+
5093
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
5094
+ });
5011
5095
  });
5012
- return (await _request.arrayBuffer()).byteLength;
5013
- }
5096
+ })());
5014
5097
 
5015
- if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
5016
- return body.byteLength;
5017
- }
5098
+ const getBodyLength = async (body) => {
5099
+ if (body == null) {
5100
+ return 0;
5101
+ }
5018
5102
 
5019
- if(utils$1.isURLSearchParams(body)) {
5020
- body = body + '';
5021
- }
5103
+ if (utils$1.isBlob(body)) {
5104
+ return body.size;
5105
+ }
5022
5106
 
5023
- if(utils$1.isString(body)) {
5024
- return (await encodeText(body)).byteLength;
5025
- }
5026
- };
5107
+ if (utils$1.isSpecCompliantForm(body)) {
5108
+ const _request = new Request(platform.origin, {
5109
+ method: 'POST',
5110
+ body,
5111
+ });
5112
+ return (await _request.arrayBuffer()).byteLength;
5113
+ }
5027
5114
 
5028
- const resolveBodyLength = async (headers, body) => {
5029
- const length = utils$1.toFiniteNumber(headers.getContentLength());
5115
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
5116
+ return body.byteLength;
5117
+ }
5030
5118
 
5031
- return length == null ? getBodyLength(body) : length;
5032
- };
5119
+ if (utils$1.isURLSearchParams(body)) {
5120
+ body = body + '';
5121
+ }
5033
5122
 
5034
- var fetchAdapter = isFetchSupported && (async (config) => {
5035
- let {
5036
- url,
5037
- method,
5038
- data,
5039
- signal,
5040
- cancelToken,
5041
- timeout,
5042
- onDownloadProgress,
5043
- onUploadProgress,
5044
- responseType,
5045
- headers,
5046
- withCredentials = 'same-origin',
5047
- fetchOptions
5048
- } = resolveConfig(config);
5049
-
5050
- responseType = responseType ? (responseType + '').toLowerCase() : 'text';
5051
-
5052
- let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
5053
-
5054
- let request;
5055
-
5056
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
5123
+ if (utils$1.isString(body)) {
5124
+ return (await encodeText(body)).byteLength;
5125
+ }
5126
+ };
5127
+
5128
+ const resolveBodyLength = async (headers, body) => {
5129
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
5130
+
5131
+ return length == null ? getBodyLength(body) : length;
5132
+ };
5133
+
5134
+ return async (config) => {
5135
+ let {
5136
+ url,
5137
+ method,
5138
+ data,
5139
+ signal,
5140
+ cancelToken,
5141
+ timeout,
5142
+ onDownloadProgress,
5143
+ onUploadProgress,
5144
+ responseType,
5145
+ headers,
5146
+ withCredentials = 'same-origin',
5147
+ fetchOptions
5148
+ } = resolveConfig(config);
5149
+
5150
+ let _fetch = envFetch || fetch;
5151
+
5152
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
5153
+
5154
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
5155
+
5156
+ let request = null;
5157
+
5158
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
5057
5159
  composedSignal.unsubscribe();
5058
- });
5160
+ });
5059
5161
 
5060
- let requestContentLength;
5162
+ let requestContentLength;
5061
5163
 
5062
- try {
5063
- if (
5064
- onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
5065
- (requestContentLength = await resolveBodyLength(headers, data)) !== 0
5066
- ) {
5067
- let _request = new Request(url, {
5068
- method: 'POST',
5069
- body: data,
5070
- duplex: "half"
5071
- });
5164
+ try {
5165
+ if (
5166
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
5167
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
5168
+ ) {
5169
+ let _request = new Request(url, {
5170
+ method: 'POST',
5171
+ body: data,
5172
+ duplex: "half"
5173
+ });
5072
5174
 
5073
- let contentTypeHeader;
5175
+ let contentTypeHeader;
5074
5176
 
5075
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
5076
- headers.setContentType(contentTypeHeader);
5077
- }
5177
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
5178
+ headers.setContentType(contentTypeHeader);
5179
+ }
5078
5180
 
5079
- if (_request.body) {
5080
- const [onProgress, flush] = progressEventDecorator(
5081
- requestContentLength,
5082
- progressEventReducer(asyncDecorator(onUploadProgress))
5083
- );
5181
+ if (_request.body) {
5182
+ const [onProgress, flush] = progressEventDecorator(
5183
+ requestContentLength,
5184
+ progressEventReducer(asyncDecorator(onUploadProgress))
5185
+ );
5084
5186
 
5085
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
5187
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
5188
+ }
5086
5189
  }
5087
- }
5088
5190
 
5089
- if (!utils$1.isString(withCredentials)) {
5090
- withCredentials = withCredentials ? 'include' : 'omit';
5091
- }
5191
+ if (!utils$1.isString(withCredentials)) {
5192
+ withCredentials = withCredentials ? 'include' : 'omit';
5193
+ }
5092
5194
 
5093
- // Cloudflare Workers throws when credentials are defined
5094
- // see https://github.com/cloudflare/workerd/issues/902
5095
- const isCredentialsSupported = "credentials" in Request.prototype;
5096
- request = new Request(url, {
5097
- ...fetchOptions,
5098
- signal: composedSignal,
5099
- method: method.toUpperCase(),
5100
- headers: headers.normalize().toJSON(),
5101
- body: data,
5102
- duplex: "half",
5103
- credentials: isCredentialsSupported ? withCredentials : undefined
5104
- });
5195
+ // Cloudflare Workers throws when credentials are defined
5196
+ // see https://github.com/cloudflare/workerd/issues/902
5197
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
5105
5198
 
5106
- let response = await fetch(request);
5199
+ const resolvedOptions = {
5200
+ ...fetchOptions,
5201
+ signal: composedSignal,
5202
+ method: method.toUpperCase(),
5203
+ headers: headers.normalize().toJSON(),
5204
+ body: data,
5205
+ duplex: "half",
5206
+ credentials: isCredentialsSupported ? withCredentials : undefined
5207
+ };
5107
5208
 
5108
- const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
5209
+ request = isRequestSupported && new Request(url, resolvedOptions);
5109
5210
 
5110
- if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
5111
- const options = {};
5211
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
5112
5212
 
5113
- ['status', 'statusText', 'headers'].forEach(prop => {
5114
- options[prop] = response[prop];
5115
- });
5213
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
5116
5214
 
5117
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
5215
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
5216
+ const options = {};
5118
5217
 
5119
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
5120
- responseContentLength,
5121
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
5122
- ) || [];
5218
+ ['status', 'statusText', 'headers'].forEach(prop => {
5219
+ options[prop] = response[prop];
5220
+ });
5123
5221
 
5124
- response = new Response(
5125
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
5126
- flush && flush();
5127
- unsubscribe && unsubscribe();
5128
- }),
5129
- options
5130
- );
5131
- }
5222
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
5132
5223
 
5133
- responseType = responseType || 'text';
5224
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
5225
+ responseContentLength,
5226
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
5227
+ ) || [];
5134
5228
 
5135
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
5229
+ response = new Response(
5230
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
5231
+ flush && flush();
5232
+ unsubscribe && unsubscribe();
5233
+ }),
5234
+ options
5235
+ );
5236
+ }
5136
5237
 
5137
- !isStreamResponse && unsubscribe && unsubscribe();
5238
+ responseType = responseType || 'text';
5138
5239
 
5139
- return await new Promise((resolve, reject) => {
5140
- settle(resolve, reject, {
5141
- data: responseData,
5142
- headers: AxiosHeaders$1.from(response.headers),
5143
- status: response.status,
5144
- statusText: response.statusText,
5145
- config,
5146
- request
5147
- });
5148
- })
5149
- } catch (err) {
5150
- unsubscribe && unsubscribe();
5240
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
5151
5241
 
5152
- if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
5153
- throw Object.assign(
5154
- new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
5155
- {
5156
- cause: err.cause || err
5157
- }
5158
- )
5242
+ !isStreamResponse && unsubscribe && unsubscribe();
5243
+
5244
+ return await new Promise((resolve, reject) => {
5245
+ settle(resolve, reject, {
5246
+ data: responseData,
5247
+ headers: AxiosHeaders$1.from(response.headers),
5248
+ status: response.status,
5249
+ statusText: response.statusText,
5250
+ config,
5251
+ request
5252
+ });
5253
+ })
5254
+ } catch (err) {
5255
+ unsubscribe && unsubscribe();
5256
+
5257
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
5258
+ throw Object.assign(
5259
+ new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
5260
+ {
5261
+ cause: err.cause || err
5262
+ }
5263
+ )
5264
+ }
5265
+
5266
+ throw AxiosError$1.from(err, err && err.code, config, request);
5159
5267
  }
5268
+ }
5269
+ };
5270
+
5271
+ const seedCache = new Map();
5160
5272
 
5161
- throw AxiosError$1.from(err, err && err.code, config, request);
5273
+ const getFetch = (config) => {
5274
+ let env = config ? config.env : {};
5275
+ const {fetch, Request, Response} = env;
5276
+ const seeds = [
5277
+ Request, Response, fetch
5278
+ ];
5279
+
5280
+ let len = seeds.length, i = len,
5281
+ seed, target, map = seedCache;
5282
+
5283
+ while (i--) {
5284
+ seed = seeds[i];
5285
+ target = map.get(seed);
5286
+
5287
+ target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
5288
+
5289
+ map = target;
5162
5290
  }
5163
- });
5291
+
5292
+ return target;
5293
+ };
5294
+
5295
+ getFetch();
5164
5296
 
5165
5297
  const knownAdapters = {
5166
5298
  http: httpAdapter,
5167
5299
  xhr: xhrAdapter,
5168
- fetch: fetchAdapter
5300
+ fetch: {
5301
+ get: getFetch,
5302
+ }
5169
5303
  };
5170
5304
 
5171
5305
  utils$1.forEach(knownAdapters, (fn, value) => {
@@ -5184,7 +5318,7 @@ const renderReason = (reason) => `- ${reason}`;
5184
5318
  const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
5185
5319
 
5186
5320
  var adapters = {
5187
- getAdapter: (adapters) => {
5321
+ getAdapter: (adapters, config) => {
5188
5322
  adapters = utils$1.isArray(adapters) ? adapters : [adapters];
5189
5323
 
5190
5324
  const {length} = adapters;
@@ -5207,7 +5341,7 @@ var adapters = {
5207
5341
  }
5208
5342
  }
5209
5343
 
5210
- if (adapter) {
5344
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
5211
5345
  break;
5212
5346
  }
5213
5347
 
@@ -5275,7 +5409,7 @@ function dispatchRequest(config) {
5275
5409
  config.headers.setContentType('application/x-www-form-urlencoded', false);
5276
5410
  }
5277
5411
 
5278
- const adapter = adapters.getAdapter(config.adapter || defaults.adapter);
5412
+ const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
5279
5413
 
5280
5414
  return adapter(config).then(function onAdapterResolution(response) {
5281
5415
  throwIfCancellationRequested(config);
@@ -5309,7 +5443,7 @@ function dispatchRequest(config) {
5309
5443
  });
5310
5444
  }
5311
5445
 
5312
- const VERSION$1 = "1.8.3";
5446
+ const VERSION$1 = "1.12.2";
5313
5447
 
5314
5448
  const validators$1 = {};
5315
5449
 
@@ -5417,7 +5551,7 @@ const validators = validator.validators;
5417
5551
  */
5418
5552
  let Axios$1 = class Axios {
5419
5553
  constructor(instanceConfig) {
5420
- this.defaults = instanceConfig;
5554
+ this.defaults = instanceConfig || {};
5421
5555
  this.interceptors = {
5422
5556
  request: new InterceptorManager(),
5423
5557
  response: new InterceptorManager()
@@ -5548,8 +5682,8 @@ let Axios$1 = class Axios {
5548
5682
 
5549
5683
  if (!synchronousRequestInterceptors) {
5550
5684
  const chain = [dispatchRequest.bind(this), undefined];
5551
- chain.unshift.apply(chain, requestInterceptorChain);
5552
- chain.push.apply(chain, responseInterceptorChain);
5685
+ chain.unshift(...requestInterceptorChain);
5686
+ chain.push(...responseInterceptorChain);
5553
5687
  len = chain.length;
5554
5688
 
5555
5689
  promise = Promise.resolve(config);
@@ -5565,8 +5699,6 @@ let Axios$1 = class Axios {
5565
5699
 
5566
5700
  let newConfig = config;
5567
5701
 
5568
- i = 0;
5569
-
5570
5702
  while (i < len) {
5571
5703
  const onFulfilled = requestInterceptorChain[i++];
5572
5704
  const onRejected = requestInterceptorChain[i++];
@@ -7145,7 +7277,7 @@ const LETTERLIKE_SYMBOLS_MAP = {
7145
7277
  '℠': '',
7146
7278
  '℡': '',
7147
7279
  '™': '',
7148
- '℮': '',
7280
+ ℮: '',
7149
7281
  ℯ: '',
7150
7282
  ℰ: '',
7151
7283
  ℱ: '',
@@ -7156,7 +7288,7 @@ const LETTERLIKE_SYMBOLS_MAP = {
7156
7288
  ℶ: '',
7157
7289
  ℷ: '',
7158
7290
  ℸ: '',
7159
- '℘': '',
7291
+ ℘: '',
7160
7292
  };
7161
7293
  const CURRENCY_SYMBOLS_MAP = {
7162
7294
  '₠': '',
@@ -7399,7 +7531,7 @@ class NormalizeStringHelper {
7399
7531
  */
7400
7532
  removeLeadingZerosIfNumber(text) {
7401
7533
  // If the string is not a number, return it as is
7402
- if (isNaN(Number(text))) {
7534
+ if (Number.isNaN(Number(text))) {
7403
7535
  return text;
7404
7536
  }
7405
7537
  // If the string consists of only zeros, return "0"
@@ -7520,7 +7652,7 @@ class ObjectHelper {
7520
7652
  if (this.isArray(value)) {
7521
7653
  return this.mergeArrayValues(targetValue, value);
7522
7654
  }
7523
- else if (typeof value === 'object') {
7655
+ if (typeof value === 'object') {
7524
7656
  return this.mergeObjectValues(targetValue, value);
7525
7657
  }
7526
7658
  return (_a = value !== null && value !== void 0 ? value : targetValue) !== null && _a !== void 0 ? _a : undefined;
@@ -7878,7 +8010,11 @@ function getAugmentedNamespace(n) {
7878
8010
  var f = n.default;
7879
8011
  if (typeof f == "function") {
7880
8012
  var a = function a () {
7881
- if (this instanceof a) {
8013
+ var isInstance = false;
8014
+ try {
8015
+ isInstance = this instanceof a;
8016
+ } catch {}
8017
+ if (isInstance) {
7882
8018
  return Reflect.construct(f, arguments, this.constructor);
7883
8019
  }
7884
8020
  return f.apply(this, arguments);
@@ -16631,8 +16767,7 @@ class ApiError {
16631
16767
  var _a, _b, _c, _d, _e, _f, _g;
16632
16768
  const e = error;
16633
16769
  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;
16634
- this.errorMessage =
16635
- (_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.`;
16770
+ 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.`;
16636
16771
  }
16637
16772
  }
16638
16773
 
@@ -16721,10 +16856,7 @@ class EncryptedApi {
16721
16856
  async joseEncrypt(data, key, exp) {
16722
16857
  // Encode and sign data
16723
16858
  const currentDate = new Date();
16724
- const token = new SignJWT(data)
16725
- .setProtectedHeader({ alg: 'HS256' })
16726
- .setIssuedAt(currentDate.getTime())
16727
- .setExpirationTime(exp);
16859
+ const token = new SignJWT(data).setProtectedHeader({ alg: 'HS256' }).setIssuedAt(currentDate.getTime()).setExpirationTime(exp);
16728
16860
  const signedToken = await token.sign(Buffer.from(key));
16729
16861
  // Encrypt and format payload
16730
16862
  return cryptoJsExports.AES.encrypt(signedToken, key).toString();
@@ -16762,6 +16894,7 @@ class BaseApi extends BaseApiAbstract {
16762
16894
  });
16763
16895
  }
16764
16896
  getPartnerSite() {
16897
+ // biome-ignore lint/complexity/useOptionalChain: Type guard required before property access
16765
16898
  if (typeof window !== 'undefined' && window.location) {
16766
16899
  return window.location.origin;
16767
16900
  }
@@ -16804,6 +16937,7 @@ class BaseApi extends BaseApiAbstract {
16804
16937
  async post(path, data, configOverrides) {
16805
16938
  let requestData = data;
16806
16939
  if (![RMN_ENV.LOCAL, RMN_ENV.DEVELOPMENT].includes(this.authInfo.env)) {
16940
+ // biome-ignore lint/complexity/useDateNow: Timestamp needed for authentication headers
16807
16941
  const timestamp = new Date().getTime();
16808
16942
  configOverrides = {
16809
16943
  ...configOverrides,
@@ -16872,20 +17006,17 @@ class BaseApi extends BaseApiAbstract {
16872
17006
  let responseData = (response === null || response === void 0 ? void 0 : response.data) ? response.data : null;
16873
17007
  let isEncrypted = false;
16874
17008
  let timestamp = 0;
16875
- if ((response === null || response === void 0 ? void 0 : response.headers) &&
17009
+ if (
17010
+ // biome-ignore lint/complexity/useOptionalChain: Explicit null checks preferred for readability
17011
+ (response === null || response === void 0 ? void 0 : response.headers) &&
16876
17012
  ((_a = response === null || response === void 0 ? void 0 : response.headers) === null || _a === void 0 ? void 0 : _a.has) &&
16877
17013
  ((_b = response === null || response === void 0 ? void 0 : response.headers) === null || _b === void 0 ? void 0 : _b.has(REQUEST_CLOUD_PROTECTED_KEY)) &&
16878
17014
  ((_c = response === null || response === void 0 ? void 0 : response.headers) === null || _c === void 0 ? void 0 : _c.has(REQUEST_CLOUD_PROTECTED_TIMESTAMP)) &&
16879
17015
  ((_d = response === null || response === void 0 ? void 0 : response.headers) === null || _d === void 0 ? void 0 : _d.get)) {
16880
17016
  isEncrypted = ((_e = response === null || response === void 0 ? void 0 : response.headers) === null || _e === void 0 ? void 0 : _e.get(REQUEST_CLOUD_PROTECTED_KEY)) === 'true';
16881
- timestamp = ((_f = response === null || response === void 0 ? void 0 : response.headers) === null || _f === void 0 ? void 0 : _f.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
16882
- ? Number((_g = response === null || response === void 0 ? void 0 : response.headers) === null || _g === void 0 ? void 0 : _g.get(REQUEST_CLOUD_PROTECTED_TIMESTAMP))
16883
- : 0;
16884
- }
16885
- if (responseData &&
16886
- isEncrypted &&
16887
- this.objectHelper.includes(responseData, 't') &&
16888
- timestamp > 0) {
17017
+ 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;
17018
+ }
17019
+ if (responseData && isEncrypted && this.objectHelper.includes(responseData, 't') && timestamp > 0) {
16889
17020
  const { t: encryptedPayload } = responseData;
16890
17021
  const decryptedData = await this.encryptedApi.handleDecryption(encryptedPayload, timestamp);
16891
17022
  if (decryptedData === null || decryptedData === void 0 ? void 0 : decryptedData.payload) {
@@ -17044,9 +17175,7 @@ class BaseSpotComponent extends BaseElement {
17044
17175
  if (!this.initialized || !this.dataInitialized || !isBrowser) {
17045
17176
  return;
17046
17177
  }
17047
- this._container = this._config.useShadowDom
17048
- ? this.shadowRoot || this.attachShadow({ mode: 'open' })
17049
- : this;
17178
+ this._container = this._config.useShadowDom ? this.shadowRoot || this.attachShadow({ mode: 'open' }) : this;
17050
17179
  this._container.innerHTML = '';
17051
17180
  const style = document.createElement('style');
17052
17181
  style.textContent = this.baseStyles() + this.styles();
@@ -17245,10 +17374,7 @@ class LocalStorageService {
17245
17374
  const decryptedData = this.decryptData(localStorageData);
17246
17375
  const parsedData = JSON.parse(decryptedData);
17247
17376
  if (Array.isArray(parsedData)) {
17248
- const data = Object.fromEntries(parsedData.map((spot) => [
17249
- spot[ENUM_SPOT_ARRAY_INDEX.SPOT_ID],
17250
- this.spotArrayToObject(spot),
17251
- ]));
17377
+ const data = Object.fromEntries(parsedData.map((spot) => [spot[ENUM_SPOT_ARRAY_INDEX.SPOT_ID], this.spotArrayToObject(spot)]));
17252
17378
  this.spots = this.objectToMap(data);
17253
17379
  }
17254
17380
  else {
@@ -17264,7 +17390,7 @@ class LocalStorageService {
17264
17390
  updateLocalStorage() {
17265
17391
  var _a;
17266
17392
  if (!this.spots)
17267
- return undefined;
17393
+ return;
17268
17394
  const spotsObj = this.mapToObject(this.spots);
17269
17395
  const data = Object.values(spotsObj).map((spot) => this.spotObjectToArray(spot));
17270
17396
  try {
@@ -17702,9 +17828,9 @@ function convertHexToRgba(hex, opacity = 1) {
17702
17828
  // Remove # if present
17703
17829
  const cleanHex = hex.replace('#', '');
17704
17830
  // Convert hex to RGB
17705
- const r = parseInt(cleanHex.substring(0, 2), 16);
17706
- const g = parseInt(cleanHex.substring(2, 4), 16);
17707
- const b = parseInt(cleanHex.substring(4, 6), 16);
17831
+ const r = Number.parseInt(cleanHex.substring(0, 2), 16);
17832
+ const g = Number.parseInt(cleanHex.substring(2, 4), 16);
17833
+ const b = Number.parseInt(cleanHex.substring(4, 6), 16);
17708
17834
  // Return rgba string
17709
17835
  return `rgba(${r}, ${g}, ${b}, ${opacity})`;
17710
17836
  }
@@ -17732,10 +17858,7 @@ function generateGradientColor(overlay, fallback = '') {
17732
17858
  }
17733
17859
  function importFonts(...fonts) {
17734
17860
  const fontsToImport = fonts.length === 0 ? ['sourceSans', 'cormorant'] : fonts;
17735
- return [
17736
- FONTS.preconnect,
17737
- ...fontsToImport.map((font) => FONTS[font]),
17738
- ].join('');
17861
+ return [FONTS.preconnect, ...fontsToImport.map((font) => FONTS[font])].join('');
17739
17862
  }
17740
17863
  function renderElement(tag, className, content) {
17741
17864
  return (content === null || content === void 0 ? void 0 : content.trim()) ? `<${tag} class="${className}">${content}</${tag}>` : '';
@@ -17782,7 +17905,7 @@ class BillboardV1SE extends BaseSpotComponent {
17782
17905
  elements.forEach((element) => {
17783
17906
  if (element instanceof HTMLElement) {
17784
17907
  if (!this.originalFontSizes.has(element)) {
17785
- const originalSize = parseFloat(window.getComputedStyle(element).fontSize);
17908
+ const originalSize = Number.parseFloat(window.getComputedStyle(element).fontSize);
17786
17909
  this.originalFontSizes.set(element, originalSize);
17787
17910
  }
17788
17911
  const originalSize = this.originalFontSizes.get(element);
@@ -18677,20 +18800,26 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18677
18800
  `;
18678
18801
  }
18679
18802
  styles() {
18680
- const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, mobileTextBlockPosition = textBlockPosition, } = this._data;
18803
+ const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, mobileTextBlockPosition = textBlockPosition, showContentGradient = true, } = this._data;
18681
18804
  const desktopGradientDirection = this.getGradientDirection(textBlockPosition);
18682
18805
  const mobileGradientDirection = this.getGradientDirection(mobileTextBlockPosition);
18683
18806
  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%');
18684
18807
  const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
18685
18808
  const prefix = this._config.prefix;
18809
+ // Determine mobile background image based on hasContent and enableGradient
18810
+ const mobileBackgroundImage = this.hasContent && showContentGradient
18811
+ ? `background-image: linear-gradient(${mobileGradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");`
18812
+ : `background-image: url("${mobilePrimaryImage}");`;
18813
+ // Determine desktop background image based on hasContent and enableGradient
18814
+ const desktopBackgroundImage = this.hasContent && showContentGradient
18815
+ ? `background-image: linear-gradient(${desktopGradientDirection}, ${linearGradient}), url("${primaryImage}");`
18816
+ : `background-image: url("${primaryImage}");`;
18686
18817
  return `
18687
18818
  .${prefix} {
18688
18819
  display: flex;
18689
18820
  width: 100%;
18690
18821
  height: 100%;
18691
- ${this.hasContent
18692
- ? `background-image: linear-gradient(${mobileGradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");`
18693
- : `background-image: url("${mobilePrimaryImage}");`}
18822
+ ${mobileBackgroundImage}
18694
18823
  background-size: cover;
18695
18824
  background-repeat: no-repeat;
18696
18825
  background-position: center;
@@ -18809,9 +18938,7 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18809
18938
 
18810
18939
  @container (min-width: 640px) {
18811
18940
  .${prefix} {
18812
- ${this.hasContent
18813
- ? `background-image: linear-gradient(${desktopGradientDirection}, ${linearGradient}), url("${primaryImage}");`
18814
- : `background-image: url("${primaryImage}");`}
18941
+ ${desktopBackgroundImage}
18815
18942
  }
18816
18943
 
18817
18944
  .${prefix}__text > * {
@@ -19398,7 +19525,7 @@ class RbInTextSE extends BaseSpotComponent {
19398
19525
  `;
19399
19526
  }
19400
19527
  styles() {
19401
- const { textColor = '#212121', backgroundColor = 'transparent', textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT, } = this._data;
19528
+ const { textColor = '#212121', backgroundColor = 'transparent', textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT } = this._data;
19402
19529
  const prefix = this._config.prefix;
19403
19530
  return `
19404
19531
  .${prefix} {
@@ -19869,7 +19996,7 @@ class RbLongToutTallSE extends BaseSpotComponent {
19869
19996
  `;
19870
19997
  }
19871
19998
  styles() {
19872
- const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, mobileTextBlockPosition = textBlockPosition, } = this._data;
19999
+ const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, mobileTextBlockPosition = textBlockPosition } = this._data;
19873
20000
  const desktopGradientDirection = this.getGradientDirection(textBlockPosition);
19874
20001
  const mobileGradientDirection = this.getGradientDirection(mobileTextBlockPosition);
19875
20002
  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%');
@@ -20331,7 +20458,7 @@ class RbSmallDiscoverToutSE extends BaseSpotComponent {
20331
20458
  `;
20332
20459
  }
20333
20460
  styles() {
20334
- const { textColor = '#000000', backgroundColor = 'transparent', primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
20461
+ const { textColor = '#000000', backgroundColor = 'transparent', primaryImage, mobilePrimaryImage = primaryImage } = this._data;
20335
20462
  const prefix = this._config.prefix;
20336
20463
  return `
20337
20464
  .${prefix} {
@@ -20501,10 +20628,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
20501
20628
  description: mobileDescription,
20502
20629
  }
20503
20630
  : { header, description };
20504
- const elements = [
20505
- renderElement('h2', `${prefix}__header`, content.header),
20506
- renderElement('p', `${prefix}__description`, content.description),
20507
- ];
20631
+ const elements = [renderElement('h2', `${prefix}__header`, content.header), renderElement('p', `${prefix}__description`, content.description)];
20508
20632
  return `
20509
20633
  <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition} ${prefix}__text-block-mobile--${mobileTextBlockPosition}">
20510
20634
  ${elements.join('')}
@@ -20643,9 +20767,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
20643
20767
 
20644
20768
  @container (max-width: 639px) {
20645
20769
  .${prefix}::before {
20646
- ${this.hasContent
20647
- ? `background: linear-gradient(${mobileGradientDirection}, ${linearGradient});`
20648
- : ``}
20770
+ ${this.hasContent ? `background: linear-gradient(${mobileGradientDirection}, ${linearGradient});` : ''}
20649
20771
  }
20650
20772
 
20651
20773
  .${prefix}__text-block-mobile--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
@@ -20701,9 +20823,7 @@ class RbVideoPlayerSE extends BaseSpotComponent {
20701
20823
 
20702
20824
  @container (min-width: 640px) {
20703
20825
  .${prefix}::before {
20704
- ${this.hasContent
20705
- ? `background: linear-gradient(${desktopGradientDirection}, ${linearGradient});`
20706
- : ``}
20826
+ ${this.hasContent ? `background: linear-gradient(${desktopGradientDirection}, ${linearGradient});` : ''}
20707
20827
  }
20708
20828
 
20709
20829
  .${prefix}__text > * {
@@ -21323,18 +21443,14 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
21323
21443
  this.cloneToOriginalMap.set(newSpot, original);
21324
21444
  // Add event delegation
21325
21445
  let isDragging = false;
21326
- slideElement.addEventListener('mousedown', () => (isDragging = false));
21327
- slideElement.addEventListener('mousemove', () => (isDragging = true));
21446
+ slideElement.addEventListener('mousedown', () => {
21447
+ isDragging = false;
21448
+ });
21449
+ slideElement.addEventListener('mousemove', () => {
21450
+ isDragging = true;
21451
+ });
21328
21452
  // Delegate all events to the original element
21329
- const eventTypes = [
21330
- 'click',
21331
- 'mouseenter',
21332
- 'mouseleave',
21333
- 'mouseover',
21334
- 'mouseout',
21335
- 'focus',
21336
- 'blur',
21337
- ];
21453
+ const eventTypes = ['click', 'mouseenter', 'mouseleave', 'mouseover', 'mouseout', 'focus', 'blur'];
21338
21454
  eventTypes.forEach((eventType) => {
21339
21455
  newSpot.addEventListener(eventType, (e) => {
21340
21456
  if (eventType === 'click' && isDragging) {
@@ -21621,8 +21737,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
21621
21737
  updateDragPosition() {
21622
21738
  if (!this.elements.slidesContainer || this.state.isTransitioning)
21623
21739
  return;
21624
- const translateX = -this.state.virtualIndex * 100 -
21625
- (this.state.dragDistance / this.state.containerWidth) * 100;
21740
+ const translateX = -this.state.virtualIndex * 100 - (this.state.dragDistance / this.state.containerWidth) * 100;
21626
21741
  this.elements.slidesContainer.style.transform = `translateX(${translateX}%)`;
21627
21742
  this.elements.slidesContainer.style.transition = 'none';
21628
21743
  }
@@ -21630,6 +21745,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
21630
21745
  * Navigates to a specific slide
21631
21746
  * Used primarily by dot navigation
21632
21747
  */
21748
+ // biome-ignore lint/correctness/noUnusedPrivateClassMembers: Used for dot navigation
21633
21749
  goToSlide(index) {
21634
21750
  if (this.state.isTransitioning)
21635
21751
  return;
@@ -21815,9 +21931,7 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
21815
21931
  * Ensures only valid positions are used
21816
21932
  */
21817
21933
  validateButtonsPosition() {
21818
- if (this.state.useButtons &&
21819
- !this.state.buttons.together &&
21820
- this.state.buttons.position !== 'middle-sides') {
21934
+ if (this.state.useButtons && !this.state.buttons.together && this.state.buttons.position !== 'middle-sides') {
21821
21935
  console.warn('LiquidCommerce Rmn Sdk: When buttons are not together, only "middle-sides" is allowed. Defaulting to "middle-sides".');
21822
21936
  this.state.buttons.position = 'middle-sides';
21823
21937
  }
@@ -22214,7 +22328,7 @@ class MonitorService {
22214
22328
  }
22215
22329
  }
22216
22330
  }
22217
- async fireAndPublishSpotEvent({ spotEvent, eventUrl, placementId, spotId, spotType, }) {
22331
+ async fireAndPublishSpotEvent({ spotEvent, eventUrl, placementId, spotId, spotType }) {
22218
22332
  await fireEvent({
22219
22333
  spotType,
22220
22334
  event: spotEvent,
@@ -22233,8 +22347,7 @@ class MonitorService {
22233
22347
  return AnalyticsTool.Other;
22234
22348
  }
22235
22349
  // Check for GTM
22236
- if (typeof window.google_tag_manager !== 'undefined' ||
22237
- typeof window.dataLayer !== 'undefined') {
22350
+ if (typeof window.google_tag_manager !== 'undefined' || typeof window.dataLayer !== 'undefined') {
22238
22351
  return AnalyticsTool.GoogleTagManager;
22239
22352
  }
22240
22353
  // Check for GA (both Universal Analytics and GA4)
@@ -22417,14 +22530,10 @@ class SpotManagerService {
22417
22530
  }
22418
22531
  deepMerge(current, updates) {
22419
22532
  return {
22420
- identifier: updates.identifier
22421
- ? { ...current.identifier, ...updates.identifier }
22422
- : current.identifier,
22533
+ identifier: updates.identifier ? { ...current.identifier, ...updates.identifier } : current.identifier,
22423
22534
  dom: updates.dom ? { ...current.dom, ...updates.dom } : current.dom,
22424
22535
  state: updates.state ? { ...current.state, ...updates.state } : current.state,
22425
- displayConfig: updates.displayConfig
22426
- ? { ...current.displayConfig, ...updates.displayConfig }
22427
- : current.displayConfig,
22536
+ displayConfig: updates.displayConfig ? { ...current.displayConfig, ...updates.displayConfig } : current.displayConfig,
22428
22537
  };
22429
22538
  }
22430
22539
  }
@@ -22625,9 +22734,7 @@ class BrowserRmnClient {
22625
22734
  if (!placement || !injectData) {
22626
22735
  this.spotManagerService.updateSpotLifecycleState(placementId, {
22627
22736
  state: {
22628
- error: !placement
22629
- ? `Placement element not found for id "${placementId}".`
22630
- : `Placement not found for id "${placementId}".`,
22737
+ error: !placement ? `Placement element not found for id "${placementId}".` : `Placement not found for id "${placementId}".`,
22631
22738
  mounted: false,
22632
22739
  loading: false,
22633
22740
  },
@@ -22649,7 +22756,7 @@ class BrowserRmnClient {
22649
22756
  if (!skeletonElement) {
22650
22757
  this.spotManagerService.updateSpotLifecycleState(injectData.placementId, {
22651
22758
  state: {
22652
- error: `Failed to create skeleton loader element.`,
22759
+ error: 'Failed to create skeleton loader element.',
22653
22760
  loading: true,
22654
22761
  },
22655
22762
  });
@@ -22862,7 +22969,7 @@ class BrowserRmnClient {
22862
22969
  if (!carouselElement) {
22863
22970
  this.spotManagerService.updateSpotLifecycleState(placementId, {
22864
22971
  state: {
22865
- error: `Failed to inject spot carousel element. Could not create spot carousel element.`,
22972
+ error: 'Failed to inject spot carousel element. Could not create spot carousel element.',
22866
22973
  mounted: false,
22867
22974
  loading: false,
22868
22975
  },
@@ -22937,23 +23044,21 @@ class ServerRmnClient {
22937
23044
  /**
22938
23045
  * Publishes the spot data for a given placement ID to the RMN.
22939
23046
  *
22940
- * @param {string} placementId - The unique identifier for the placement.
22941
- * @param {ISpot} spot - The spot data.
23047
+ * @param {string} _placementId - The unique identifier for the placement.
23048
+ * @param {ISpot} _spot - The spot data.
22942
23049
  * @return {void} - Does not return any value.
22943
23050
  */
22944
- // eslint-disable-next-line @typescript-eslint/no-unused-vars,no-unused-vars
22945
- publishSpotToRmn(placementId, spot) {
23051
+ publishSpotToRmn(_placementId, _spot) {
22946
23052
  console.warn('RmnSdk: Publishing spot elements is not supported in server-side environment.');
22947
23053
  }
22948
23054
  /**
22949
23055
  * Injects the spot elements into their provided placement.
22950
23056
  *
22951
- * @param {IInjectSpotElementParams} params - Parameters for injecting spot elements.
23057
+ * @param {IInjectSpotElementParams} _params - Parameters for injecting spot elements.
22952
23058
  *
22953
23059
  * @return {Promise<void>} - A promise that resolves when the spot elements are injected.
22954
23060
  */
22955
- // eslint-disable-next-line @typescript-eslint/no-unused-vars,no-unused-vars
22956
- async injectSpotElement(params) {
23061
+ async injectSpotElement(_params) {
22957
23062
  console.warn('RmnSdk: Injecting spot elements is not supported in server-side environment.');
22958
23063
  }
22959
23064
  }