@blockchyp/blockchyp-ts 2.21.0 → 2.22.0

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.
@@ -3486,16 +3486,16 @@ function fromByteArray (uint8) {
3486
3486
  var w = this.words[i];
3487
3487
  var word = (((w << off) | carry) & 0xffffff).toString(16);
3488
3488
  carry = (w >>> (24 - off)) & 0xffffff;
3489
- if (carry !== 0 || i !== this.length - 1) {
3490
- out = zeros[6 - word.length] + word + out;
3491
- } else {
3492
- out = word + out;
3493
- }
3494
3489
  off += 2;
3495
3490
  if (off >= 26) {
3496
3491
  off -= 26;
3497
3492
  i--;
3498
3493
  }
3494
+ if (carry !== 0 || i !== this.length - 1) {
3495
+ out = zeros[6 - word.length] + word + out;
3496
+ } else {
3497
+ out = word + out;
3498
+ }
3499
3499
  }
3500
3500
  if (carry !== 0) {
3501
3501
  out = carry.toString(16) + out;
@@ -4955,6 +4955,7 @@ function fromByteArray (uint8) {
4955
4955
  this.words[i] = carry;
4956
4956
  this.length++;
4957
4957
  }
4958
+ this.length = num === 0 ? 1 : this.length;
4958
4959
 
4959
4960
  return this;
4960
4961
  };
@@ -17954,101 +17955,107 @@ module.exports = Hmac
17954
17955
  "use strict";
17955
17956
 
17956
17957
 
17957
- exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = __webpack_require__(3209)
17958
- exports.createHash = exports.Hash = __webpack_require__(7108)
17959
- exports.createHmac = exports.Hmac = __webpack_require__(3507)
17958
+ // eslint-disable-next-line no-multi-assign
17959
+ exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = __webpack_require__(3209);
17960
+
17961
+ // eslint-disable-next-line no-multi-assign
17962
+ exports.createHash = exports.Hash = __webpack_require__(7108);
17963
+
17964
+ // eslint-disable-next-line no-multi-assign
17965
+ exports.createHmac = exports.Hmac = __webpack_require__(3507);
17966
+
17967
+ var algos = __webpack_require__(5715);
17968
+ var algoKeys = Object.keys(algos);
17969
+ var hashes = [
17970
+ 'sha1',
17971
+ 'sha224',
17972
+ 'sha256',
17973
+ 'sha384',
17974
+ 'sha512',
17975
+ 'md5',
17976
+ 'rmd160'
17977
+ ].concat(algoKeys);
17960
17978
 
17961
- var algos = __webpack_require__(5715)
17962
- var algoKeys = Object.keys(algos)
17963
- var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)
17964
17979
  exports.getHashes = function () {
17965
- return hashes
17966
- }
17980
+ return hashes;
17981
+ };
17967
17982
 
17968
- var p = __webpack_require__(8396)
17969
- exports.pbkdf2 = p.pbkdf2
17970
- exports.pbkdf2Sync = p.pbkdf2Sync
17983
+ var p = __webpack_require__(8396);
17984
+ exports.pbkdf2 = p.pbkdf2;
17985
+ exports.pbkdf2Sync = p.pbkdf2Sync;
17971
17986
 
17972
- var aes = __webpack_require__(125)
17987
+ var aes = __webpack_require__(125);
17973
17988
 
17974
- exports.Cipher = aes.Cipher
17975
- exports.createCipher = aes.createCipher
17976
- exports.Cipheriv = aes.Cipheriv
17977
- exports.createCipheriv = aes.createCipheriv
17978
- exports.Decipher = aes.Decipher
17979
- exports.createDecipher = aes.createDecipher
17980
- exports.Decipheriv = aes.Decipheriv
17981
- exports.createDecipheriv = aes.createDecipheriv
17982
- exports.getCiphers = aes.getCiphers
17983
- exports.listCiphers = aes.listCiphers
17989
+ exports.Cipher = aes.Cipher;
17990
+ exports.createCipher = aes.createCipher;
17991
+ exports.Cipheriv = aes.Cipheriv;
17992
+ exports.createCipheriv = aes.createCipheriv;
17993
+ exports.Decipher = aes.Decipher;
17994
+ exports.createDecipher = aes.createDecipher;
17995
+ exports.Decipheriv = aes.Decipheriv;
17996
+ exports.createDecipheriv = aes.createDecipheriv;
17997
+ exports.getCiphers = aes.getCiphers;
17998
+ exports.listCiphers = aes.listCiphers;
17984
17999
 
17985
- var dh = __webpack_require__(5380)
18000
+ var dh = __webpack_require__(5380);
17986
18001
 
17987
- exports.DiffieHellmanGroup = dh.DiffieHellmanGroup
17988
- exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup
17989
- exports.getDiffieHellman = dh.getDiffieHellman
17990
- exports.createDiffieHellman = dh.createDiffieHellman
17991
- exports.DiffieHellman = dh.DiffieHellman
18002
+ exports.DiffieHellmanGroup = dh.DiffieHellmanGroup;
18003
+ exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup;
18004
+ exports.getDiffieHellman = dh.getDiffieHellman;
18005
+ exports.createDiffieHellman = dh.createDiffieHellman;
18006
+ exports.DiffieHellman = dh.DiffieHellman;
17992
18007
 
17993
- var sign = __webpack_require__(20)
18008
+ var sign = __webpack_require__(20);
17994
18009
 
17995
- exports.createSign = sign.createSign
17996
- exports.Sign = sign.Sign
17997
- exports.createVerify = sign.createVerify
17998
- exports.Verify = sign.Verify
18010
+ exports.createSign = sign.createSign;
18011
+ exports.Sign = sign.Sign;
18012
+ exports.createVerify = sign.createVerify;
18013
+ exports.Verify = sign.Verify;
17999
18014
 
18000
- exports.createECDH = __webpack_require__(1324)
18015
+ exports.createECDH = __webpack_require__(1324);
18001
18016
 
18002
- var publicEncrypt = __webpack_require__(7168)
18017
+ var publicEncrypt = __webpack_require__(7168);
18003
18018
 
18004
- exports.publicEncrypt = publicEncrypt.publicEncrypt
18005
- exports.privateEncrypt = publicEncrypt.privateEncrypt
18006
- exports.publicDecrypt = publicEncrypt.publicDecrypt
18007
- exports.privateDecrypt = publicEncrypt.privateDecrypt
18019
+ exports.publicEncrypt = publicEncrypt.publicEncrypt;
18020
+ exports.privateEncrypt = publicEncrypt.privateEncrypt;
18021
+ exports.publicDecrypt = publicEncrypt.publicDecrypt;
18022
+ exports.privateDecrypt = publicEncrypt.privateDecrypt;
18008
18023
 
18009
18024
  // the least I can do is make error messages for the rest of the node.js/crypto api.
18010
- // ;[
18025
+ // [
18011
18026
  // 'createCredentials'
18012
18027
  // ].forEach(function (name) {
18013
18028
  // exports[name] = function () {
18014
- // throw new Error([
18015
- // 'sorry, ' + name + ' is not implemented yet',
18016
- // 'we accept pull requests',
18017
- // 'https://github.com/crypto-browserify/crypto-browserify'
18018
- // ].join('\n'))
18019
- // }
18020
- // })
18029
+ // throw new Error('sorry, ' + name + ' is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify');
18030
+ // };
18031
+ // });
18021
18032
 
18022
- var rf = __webpack_require__(6983)
18033
+ var rf = __webpack_require__(6983);
18023
18034
 
18024
- exports.randomFill = rf.randomFill
18025
- exports.randomFillSync = rf.randomFillSync
18035
+ exports.randomFill = rf.randomFill;
18036
+ exports.randomFillSync = rf.randomFillSync;
18026
18037
 
18027
18038
  exports.createCredentials = function () {
18028
- throw new Error([
18029
- 'sorry, createCredentials is not implemented yet',
18030
- 'we accept pull requests',
18031
- 'https://github.com/crypto-browserify/crypto-browserify'
18032
- ].join('\n'))
18033
- }
18039
+ throw new Error('sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify');
18040
+ };
18034
18041
 
18035
18042
  exports.constants = {
18036
- 'DH_CHECK_P_NOT_SAFE_PRIME': 2,
18037
- 'DH_CHECK_P_NOT_PRIME': 1,
18038
- 'DH_UNABLE_TO_CHECK_GENERATOR': 4,
18039
- 'DH_NOT_SUITABLE_GENERATOR': 8,
18040
- 'NPN_ENABLED': 1,
18041
- 'ALPN_ENABLED': 1,
18042
- 'RSA_PKCS1_PADDING': 1,
18043
- 'RSA_SSLV23_PADDING': 2,
18044
- 'RSA_NO_PADDING': 3,
18045
- 'RSA_PKCS1_OAEP_PADDING': 4,
18046
- 'RSA_X931_PADDING': 5,
18047
- 'RSA_PKCS1_PSS_PADDING': 6,
18048
- 'POINT_CONVERSION_COMPRESSED': 2,
18049
- 'POINT_CONVERSION_UNCOMPRESSED': 4,
18050
- 'POINT_CONVERSION_HYBRID': 6
18051
- }
18043
+ DH_CHECK_P_NOT_SAFE_PRIME: 2,
18044
+ DH_CHECK_P_NOT_PRIME: 1,
18045
+ DH_UNABLE_TO_CHECK_GENERATOR: 4,
18046
+ DH_NOT_SUITABLE_GENERATOR: 8,
18047
+ NPN_ENABLED: 1,
18048
+ ALPN_ENABLED: 1,
18049
+ RSA_PKCS1_PADDING: 1,
18050
+ RSA_SSLV23_PADDING: 2,
18051
+ RSA_NO_PADDING: 3,
18052
+ RSA_PKCS1_OAEP_PADDING: 4,
18053
+ RSA_X931_PADDING: 5,
18054
+ RSA_PKCS1_PSS_PADDING: 6,
18055
+ POINT_CONVERSION_COMPRESSED: 2,
18056
+ POINT_CONVERSION_UNCOMPRESSED: 4,
18057
+ POINT_CONVERSION_HYBRID: 6
18058
+ };
18052
18059
 
18053
18060
 
18054
18061
  /***/ }),
@@ -21406,8 +21413,27 @@ EC.prototype.genKeyPair = function genKeyPair(options) {
21406
21413
  }
21407
21414
  };
21408
21415
 
21409
- EC.prototype._truncateToN = function _truncateToN(msg, truncOnly) {
21410
- var delta = msg.byteLength() * 8 - this.n.bitLength();
21416
+ EC.prototype._truncateToN = function _truncateToN(msg, truncOnly, bitLength) {
21417
+ var byteLength;
21418
+ if (BN.isBN(msg) || typeof msg === 'number') {
21419
+ msg = new BN(msg, 16);
21420
+ byteLength = msg.byteLength();
21421
+ } else if (typeof msg === 'object') {
21422
+ // BN assumes an array-like input and asserts length
21423
+ byteLength = msg.length;
21424
+ msg = new BN(msg, 16);
21425
+ } else {
21426
+ // BN converts the value to string
21427
+ var str = msg.toString();
21428
+ // HEX encoding
21429
+ byteLength = (str.length + 1) >>> 1;
21430
+ msg = new BN(str, 16);
21431
+ }
21432
+ // Allow overriding
21433
+ if (typeof bitLength !== 'number') {
21434
+ bitLength = byteLength * 8;
21435
+ }
21436
+ var delta = bitLength - this.n.bitLength();
21411
21437
  if (delta > 0)
21412
21438
  msg = msg.ushrn(delta);
21413
21439
  if (!truncOnly && msg.cmp(this.n) >= 0)
@@ -21424,8 +21450,18 @@ EC.prototype.sign = function sign(msg, key, enc, options) {
21424
21450
  if (!options)
21425
21451
  options = {};
21426
21452
 
21453
+ if (typeof msg !== 'string' && typeof msg !== 'number' && !BN.isBN(msg)) {
21454
+ assert(typeof msg === 'object' && msg && typeof msg.length === 'number',
21455
+ 'Expected message to be an array-like, a hex string, or a BN instance');
21456
+ assert((msg.length >>> 0) === msg.length); // non-negative 32-bit integer
21457
+ for (var i = 0; i < msg.length; i++) assert((msg[i] & 255) === msg[i]);
21458
+ }
21459
+
21427
21460
  key = this.keyFromPrivate(key, enc);
21428
- msg = this._truncateToN(new BN(msg, 16));
21461
+ msg = this._truncateToN(msg, false, options.msgBitLength);
21462
+
21463
+ // Would fail further checks, but let's make the error message clear
21464
+ assert(!msg.isNeg(), 'Can not sign a negative message');
21429
21465
 
21430
21466
  // Zero-extend key to provide enough entropy
21431
21467
  var bytes = this.n.byteLength();
@@ -21434,6 +21470,9 @@ EC.prototype.sign = function sign(msg, key, enc, options) {
21434
21470
  // Zero-extend nonce to have the same byte size as N
21435
21471
  var nonce = msg.toArray('be', bytes);
21436
21472
 
21473
+ // Recheck nonce to be bijective to msg
21474
+ assert((new BN(nonce)).eq(msg), 'Can not sign message');
21475
+
21437
21476
  // Instantiate Hmac_DRBG
21438
21477
  var drbg = new HmacDRBG({
21439
21478
  hash: this.hash,
@@ -21481,8 +21520,11 @@ EC.prototype.sign = function sign(msg, key, enc, options) {
21481
21520
  }
21482
21521
  };
21483
21522
 
21484
- EC.prototype.verify = function verify(msg, signature, key, enc) {
21485
- msg = this._truncateToN(new BN(msg, 16));
21523
+ EC.prototype.verify = function verify(msg, signature, key, enc, options) {
21524
+ if (!options)
21525
+ options = {};
21526
+
21527
+ msg = this._truncateToN(msg, false, options.msgBitLength);
21486
21528
  key = this.keyFromPublic(key, enc);
21487
21529
  signature = new Signature(signature, 'hex');
21488
21530
 
@@ -21690,8 +21732,8 @@ KeyPair.prototype.sign = function sign(msg, enc, options) {
21690
21732
  return this.ec.sign(msg, this, enc, options);
21691
21733
  };
21692
21734
 
21693
- KeyPair.prototype.verify = function verify(msg, signature) {
21694
- return this.ec.verify(msg, signature, this);
21735
+ KeyPair.prototype.verify = function verify(msg, signature, options) {
21736
+ return this.ec.verify(msg, signature, this, undefined, options);
21695
21737
  };
21696
21738
 
21697
21739
  KeyPair.prototype.inspect = function inspect() {
@@ -60550,7 +60592,7 @@ exports.TokenMetadataResponse = TokenMetadataResponse;
60550
60592
  */
60551
60593
  class CustomerToken {
60552
60594
  // Constructor with default values for optional fields
60553
- constructor(token = null, maskedPan = null, expiryMonth = null, expiryYear = null, paymentType = null, customers = null) {
60595
+ constructor(token = null, maskedPan = null, expiryMonth = null, expiryYear = null, paymentType = null, accountType = null, accountHolderType = null, bankName = null, routingNumber = null, customers = null) {
60554
60596
  /**
60555
60597
  * BlockChyp assigned customer id.
60556
60598
  */
@@ -60571,6 +60613,22 @@ class CustomerToken {
60571
60613
  * Payment type.
60572
60614
  */
60573
60615
  this.paymentType = null;
60616
+ /**
60617
+ * Bank account type (checking, saving).
60618
+ */
60619
+ this.accountType = null;
60620
+ /**
60621
+ * Bank account holder type (personal, business).
60622
+ */
60623
+ this.accountHolderType = null;
60624
+ /**
60625
+ * Bank name.
60626
+ */
60627
+ this.bankName = null;
60628
+ /**
60629
+ * Routing number.
60630
+ */
60631
+ this.routingNumber = null;
60574
60632
  /**
60575
60633
  * Models customer records associated with a payment token.
60576
60634
  */
@@ -60580,6 +60638,10 @@ class CustomerToken {
60580
60638
  this.expiryMonth = expiryMonth;
60581
60639
  this.expiryYear = expiryYear;
60582
60640
  this.paymentType = paymentType;
60641
+ this.accountType = accountType;
60642
+ this.accountHolderType = accountHolderType;
60643
+ this.bankName = bankName;
60644
+ this.routingNumber = routingNumber;
60583
60645
  this.customers = customers;
60584
60646
  }
60585
60647
  }
@@ -61621,7 +61683,7 @@ exports.VoidResponse = VoidResponse;
61621
61683
  */
61622
61684
  class EnrollRequest {
61623
61685
  // Constructor with default values for optional fields
61624
- constructor(timeout = null, test = null, transactionRef = undefined, autogeneratedRef = null, async = null, queue = null, waitForRemovedCard = false, force = false, orderRef = undefined, destinationAccount = undefined, testCase = undefined, token = undefined, track1 = undefined, track2 = undefined, pan = undefined, routingNumber = undefined, cardholderName = undefined, expMonth = undefined, expYear = undefined, cvv = undefined, address = undefined, postalCode = undefined, manualEntry = false, ksn = undefined, pinBlock = undefined, cardType = undefined, paymentType = undefined, terminalName = undefined, resetConnection = null, entryMethod = undefined, customer = undefined, recurring = false, subscription = false, cardMetadataLookup = false) {
61686
+ constructor(timeout = null, test = null, transactionRef = undefined, autogeneratedRef = null, async = null, queue = null, waitForRemovedCard = false, force = false, orderRef = undefined, destinationAccount = undefined, testCase = undefined, token = undefined, track1 = undefined, track2 = undefined, pan = undefined, routingNumber = undefined, cardholderName = undefined, expMonth = undefined, expYear = undefined, cvv = undefined, address = undefined, postalCode = undefined, manualEntry = false, ksn = undefined, pinBlock = undefined, cardType = undefined, paymentType = undefined, terminalName = undefined, resetConnection = null, entryMethod = undefined, customer = undefined, recurring = false, subscription = false, cardMetadataLookup = false, accountType = undefined, accountHolderType = undefined, bankName = undefined) {
61625
61687
  /**
61626
61688
  * The request timeout in seconds.
61627
61689
  */
@@ -61684,6 +61746,9 @@ class EnrollRequest {
61684
61746
  this.recurring = recurring;
61685
61747
  this.subscription = subscription;
61686
61748
  this.cardMetadataLookup = cardMetadataLookup;
61749
+ this.accountType = accountType;
61750
+ this.accountHolderType = accountHolderType;
61751
+ this.bankName = bankName;
61687
61752
  }
61688
61753
  }
61689
61754
  exports.EnrollRequest = EnrollRequest;
@@ -61692,7 +61757,7 @@ exports.EnrollRequest = EnrollRequest;
61692
61757
  */
61693
61758
  class EnrollResponse {
61694
61759
  // Constructor with default values for optional fields
61695
- constructor(success = null, error = null, responseDescription = null, approved = null, authCode = undefined, authResponseCode = undefined, transactionId = null, batchId = undefined, transactionRef = undefined, transactionType = null, timestamp = null, tickBlock = null, test = null, destinationAccount = undefined, sig = undefined, token = undefined, entryMethod = undefined, paymentType = undefined, network = undefined, logo = undefined, maskedPan = undefined, publicKey = undefined, ScopeAlert = false, cardHolder = undefined, expMonth = undefined, expYear = undefined, avsResponse = null, receiptSuggestions = null, customer = undefined, customers = null, sigFile = undefined, cardMetadata = undefined) {
61760
+ constructor(success = null, error = null, responseDescription = null, approved = null, authCode = undefined, authResponseCode = undefined, transactionId = null, batchId = undefined, transactionRef = undefined, transactionType = null, timestamp = null, tickBlock = null, test = null, destinationAccount = undefined, sig = undefined, token = undefined, entryMethod = undefined, paymentType = undefined, network = undefined, logo = undefined, maskedPan = undefined, publicKey = undefined, ScopeAlert = false, cardHolder = undefined, expMonth = undefined, expYear = undefined, avsResponse = null, receiptSuggestions = null, customer = undefined, customers = null, sigFile = undefined, cardMetadata = undefined, accountType = undefined, accountHolderType = undefined, bankName = undefined) {
61696
61761
  /**
61697
61762
  * Whether or not the request succeeded.
61698
61763
  */
@@ -61773,6 +61838,9 @@ class EnrollResponse {
61773
61838
  this.customers = customers;
61774
61839
  this.sigFile = sigFile;
61775
61840
  this.cardMetadata = cardMetadata;
61841
+ this.accountType = accountType;
61842
+ this.accountHolderType = accountHolderType;
61843
+ this.bankName = bankName;
61776
61844
  }
61777
61845
  }
61778
61846
  exports.EnrollResponse = EnrollResponse;
@@ -70294,7 +70362,7 @@ exports.createContext = Script.createContext = function (context) {
70294
70362
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
70295
70363
 
70296
70364
  "use strict";
70297
- // Axios v1.7.7 Copyright (c) 2024 Matt Zabriskie and contributors
70365
+ /*! Axios v1.9.0 Copyright (c) 2025 Matt Zabriskie and contributors */
70298
70366
 
70299
70367
 
70300
70368
  function bind(fn, thisArg) {
@@ -70307,6 +70375,7 @@ function bind(fn, thisArg) {
70307
70375
 
70308
70376
  const {toString} = Object.prototype;
70309
70377
  const {getPrototypeOf} = Object;
70378
+ const {iterator, toStringTag} = Symbol;
70310
70379
 
70311
70380
  const kindOf = (cache => thing => {
70312
70381
  const str = toString.call(thing);
@@ -70433,7 +70502,7 @@ const isPlainObject = (val) => {
70433
70502
  }
70434
70503
 
70435
70504
  const prototype = getPrototypeOf(val);
70436
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
70505
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
70437
70506
  };
70438
70507
 
70439
70508
  /**
@@ -70784,13 +70853,13 @@ const isTypedArray = (TypedArray => {
70784
70853
  * @returns {void}
70785
70854
  */
70786
70855
  const forEachEntry = (obj, fn) => {
70787
- const generator = obj && obj[Symbol.iterator];
70856
+ const generator = obj && obj[iterator];
70788
70857
 
70789
- const iterator = generator.call(obj);
70858
+ const _iterator = generator.call(obj);
70790
70859
 
70791
70860
  let result;
70792
70861
 
70793
- while ((result = iterator.next()) && !result.done) {
70862
+ while ((result = _iterator.next()) && !result.done) {
70794
70863
  const pair = result.value;
70795
70864
  fn.call(obj, pair[0], pair[1]);
70796
70865
  }
@@ -70903,26 +70972,6 @@ const toFiniteNumber = (value, defaultValue) => {
70903
70972
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
70904
70973
  };
70905
70974
 
70906
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
70907
-
70908
- const DIGIT = '0123456789';
70909
-
70910
- const ALPHABET = {
70911
- DIGIT,
70912
- ALPHA,
70913
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
70914
- };
70915
-
70916
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
70917
- let str = '';
70918
- const {length} = alphabet;
70919
- while (size--) {
70920
- str += alphabet[Math.random() * length|0];
70921
- }
70922
-
70923
- return str;
70924
- };
70925
-
70926
70975
  /**
70927
70976
  * If the thing is a FormData object, return true, otherwise return false.
70928
70977
  *
@@ -70931,7 +70980,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
70931
70980
  * @returns {boolean}
70932
70981
  */
70933
70982
  function isSpecCompliantForm(thing) {
70934
- return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
70983
+ return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
70935
70984
  }
70936
70985
 
70937
70986
  const toJSONObject = (obj) => {
@@ -71000,6 +71049,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
71000
71049
 
71001
71050
  // *********************
71002
71051
 
71052
+
71053
+ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
71054
+
71055
+
71003
71056
  var utils$1 = {
71004
71057
  isArray,
71005
71058
  isArrayBuffer,
@@ -71050,14 +71103,13 @@ var utils$1 = {
71050
71103
  findKey,
71051
71104
  global: _global,
71052
71105
  isContextDefined,
71053
- ALPHABET,
71054
- generateString,
71055
71106
  isSpecCompliantForm,
71056
71107
  toJSONObject,
71057
71108
  isAsyncFn,
71058
71109
  isThenable,
71059
71110
  setImmediate: _setImmediate,
71060
- asap
71111
+ asap,
71112
+ isIterable
71061
71113
  };
71062
71114
 
71063
71115
  /**
@@ -71448,7 +71500,7 @@ function encode(val) {
71448
71500
  *
71449
71501
  * @param {string} url The base of the url (e.g., http://www.google.com)
71450
71502
  * @param {object} [params] The params to be appended
71451
- * @param {?object} options
71503
+ * @param {?(object|Function)} options
71452
71504
  *
71453
71505
  * @returns {string} The formatted url
71454
71506
  */
@@ -71460,6 +71512,12 @@ function buildURL(url, params, options) {
71460
71512
 
71461
71513
  const _encode = options && options.encode || encode;
71462
71514
 
71515
+ if (utils$1.isFunction(options)) {
71516
+ options = {
71517
+ serialize: options
71518
+ };
71519
+ }
71520
+
71463
71521
  const serializeFn = options && options.serialize;
71464
71522
 
71465
71523
  let serializedParams;
@@ -72036,10 +72094,18 @@ class AxiosHeaders {
72036
72094
  setHeaders(header, valueOrRewrite);
72037
72095
  } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
72038
72096
  setHeaders(parseHeaders(header), valueOrRewrite);
72039
- } else if (utils$1.isHeaders(header)) {
72040
- for (const [key, value] of header.entries()) {
72041
- setHeader(value, key, rewrite);
72097
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
72098
+ let obj = {}, dest, key;
72099
+ for (const entry of header) {
72100
+ if (!utils$1.isArray(entry)) {
72101
+ throw TypeError('Object iterator must return a key-value pair');
72102
+ }
72103
+
72104
+ obj[key = entry[0]] = (dest = obj[key]) ?
72105
+ (utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
72042
72106
  }
72107
+
72108
+ setHeaders(obj, valueOrRewrite);
72043
72109
  } else {
72044
72110
  header != null && setHeader(valueOrRewrite, header, rewrite);
72045
72111
  }
@@ -72181,6 +72247,10 @@ class AxiosHeaders {
72181
72247
  return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
72182
72248
  }
72183
72249
 
72250
+ getSetCookie() {
72251
+ return this.get("set-cookie") || [];
72252
+ }
72253
+
72184
72254
  get [Symbol.toStringTag]() {
72185
72255
  return 'AxiosHeaders';
72186
72256
  }
@@ -72448,68 +72518,18 @@ const progressEventDecorator = (total, throttled) => {
72448
72518
 
72449
72519
  const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
72450
72520
 
72451
- var isURLSameOrigin = platform.hasStandardBrowserEnv ?
72452
-
72453
- // Standard browser envs have full support of the APIs needed to test
72454
- // whether the request URL is of the same origin as current location.
72455
- (function standardBrowserEnv() {
72456
- const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
72457
- const urlParsingNode = document.createElement('a');
72458
- let originURL;
72521
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
72522
+ url = new URL(url, platform.origin);
72459
72523
 
72460
- /**
72461
- * Parse a URL to discover its components
72462
- *
72463
- * @param {String} url The URL to be parsed
72464
- * @returns {Object}
72465
- */
72466
- function resolveURL(url) {
72467
- let href = url;
72468
-
72469
- if (msie) {
72470
- // IE needs attribute set twice to normalize properties
72471
- urlParsingNode.setAttribute('href', href);
72472
- href = urlParsingNode.href;
72473
- }
72474
-
72475
- urlParsingNode.setAttribute('href', href);
72476
-
72477
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
72478
- return {
72479
- href: urlParsingNode.href,
72480
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
72481
- host: urlParsingNode.host,
72482
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
72483
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
72484
- hostname: urlParsingNode.hostname,
72485
- port: urlParsingNode.port,
72486
- pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
72487
- urlParsingNode.pathname :
72488
- '/' + urlParsingNode.pathname
72489
- };
72490
- }
72491
-
72492
- originURL = resolveURL(window.location.href);
72493
-
72494
- /**
72495
- * Determine if a URL shares the same origin as the current location
72496
- *
72497
- * @param {String} requestURL The URL to test
72498
- * @returns {boolean} True if URL shares the same origin, otherwise false
72499
- */
72500
- return function isURLSameOrigin(requestURL) {
72501
- const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
72502
- return (parsed.protocol === originURL.protocol &&
72503
- parsed.host === originURL.host);
72504
- };
72505
- })() :
72506
-
72507
- // Non standard browser envs (web workers, react-native) lack needed support.
72508
- (function nonStandardBrowserEnv() {
72509
- return function isURLSameOrigin() {
72510
- return true;
72511
- };
72512
- })();
72524
+ return (
72525
+ origin.protocol === url.protocol &&
72526
+ origin.host === url.host &&
72527
+ (isMSIE || origin.port === url.port)
72528
+ );
72529
+ })(
72530
+ new URL(platform.origin),
72531
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
72532
+ ) : () => true;
72513
72533
 
72514
72534
  var cookies = platform.hasStandardBrowserEnv ?
72515
72535
 
@@ -72588,8 +72608,9 @@ function combineURLs(baseURL, relativeURL) {
72588
72608
  *
72589
72609
  * @returns {string} The combined full path
72590
72610
  */
72591
- function buildFullPath(baseURL, requestedURL) {
72592
- if (baseURL && !isAbsoluteURL(requestedURL)) {
72611
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
72612
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
72613
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
72593
72614
  return combineURLs(baseURL, requestedURL);
72594
72615
  }
72595
72616
  return requestedURL;
@@ -72611,7 +72632,7 @@ function mergeConfig(config1, config2) {
72611
72632
  config2 = config2 || {};
72612
72633
  const config = {};
72613
72634
 
72614
- function getMergedValue(target, source, caseless) {
72635
+ function getMergedValue(target, source, prop, caseless) {
72615
72636
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
72616
72637
  return utils$1.merge.call({caseless}, target, source);
72617
72638
  } else if (utils$1.isPlainObject(source)) {
@@ -72623,11 +72644,11 @@ function mergeConfig(config1, config2) {
72623
72644
  }
72624
72645
 
72625
72646
  // eslint-disable-next-line consistent-return
72626
- function mergeDeepProperties(a, b, caseless) {
72647
+ function mergeDeepProperties(a, b, prop , caseless) {
72627
72648
  if (!utils$1.isUndefined(b)) {
72628
- return getMergedValue(a, b, caseless);
72649
+ return getMergedValue(a, b, prop , caseless);
72629
72650
  } else if (!utils$1.isUndefined(a)) {
72630
- return getMergedValue(undefined, a, caseless);
72651
+ return getMergedValue(undefined, a, prop , caseless);
72631
72652
  }
72632
72653
  }
72633
72654
 
@@ -72685,7 +72706,7 @@ function mergeConfig(config1, config2) {
72685
72706
  socketPath: defaultToConfig2,
72686
72707
  responseEncoding: defaultToConfig2,
72687
72708
  validateStatus: mergeDirectKeys,
72688
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
72709
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
72689
72710
  };
72690
72711
 
72691
72712
  utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
@@ -72704,7 +72725,7 @@ var resolveConfig = (config) => {
72704
72725
 
72705
72726
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
72706
72727
 
72707
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
72728
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
72708
72729
 
72709
72730
  // HTTP basic authentication
72710
72731
  if (auth) {
@@ -73269,7 +73290,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
73269
73290
  } catch (err) {
73270
73291
  unsubscribe && unsubscribe();
73271
73292
 
73272
- if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
73293
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
73273
73294
  throw Object.assign(
73274
73295
  new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
73275
73296
  {
@@ -73429,7 +73450,7 @@ function dispatchRequest(config) {
73429
73450
  });
73430
73451
  }
73431
73452
 
73432
- const VERSION = "1.7.7";
73453
+ const VERSION = "1.9.0";
73433
73454
 
73434
73455
  const validators$1 = {};
73435
73456
 
@@ -73480,6 +73501,14 @@ validators$1.transitional = function transitional(validator, version, message) {
73480
73501
  };
73481
73502
  };
73482
73503
 
73504
+ validators$1.spelling = function spelling(correctSpelling) {
73505
+ return (value, opt) => {
73506
+ // eslint-disable-next-line no-console
73507
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
73508
+ return true;
73509
+ }
73510
+ };
73511
+
73483
73512
  /**
73484
73513
  * Assert object's properties type
73485
73514
  *
@@ -73529,7 +73558,7 @@ const validators = validator.validators;
73529
73558
  */
73530
73559
  class Axios {
73531
73560
  constructor(instanceConfig) {
73532
- this.defaults = instanceConfig;
73561
+ this.defaults = instanceConfig || {};
73533
73562
  this.interceptors = {
73534
73563
  request: new InterceptorManager$1(),
73535
73564
  response: new InterceptorManager$1()
@@ -73549,9 +73578,9 @@ class Axios {
73549
73578
  return await this._request(configOrUrl, config);
73550
73579
  } catch (err) {
73551
73580
  if (err instanceof Error) {
73552
- let dummy;
73581
+ let dummy = {};
73553
73582
 
73554
- Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
73583
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
73555
73584
 
73556
73585
  // slice off the Error: ... line
73557
73586
  const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
@@ -73606,6 +73635,18 @@ class Axios {
73606
73635
  }
73607
73636
  }
73608
73637
 
73638
+ // Set config.allowAbsoluteUrls
73639
+ if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
73640
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
73641
+ } else {
73642
+ config.allowAbsoluteUrls = true;
73643
+ }
73644
+
73645
+ validator.assertOptions(config, {
73646
+ baseUrl: validators.spelling('baseURL'),
73647
+ withXsrfToken: validators.spelling('withXSRFToken')
73648
+ }, true);
73649
+
73609
73650
  // Set config.method
73610
73651
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
73611
73652
 
@@ -73696,7 +73737,7 @@ class Axios {
73696
73737
 
73697
73738
  getUri(config) {
73698
73739
  config = mergeConfig(this.defaults, config);
73699
- const fullPath = buildFullPath(config.baseURL, config.url);
73740
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
73700
73741
  return buildURL(fullPath, config.params, config.paramsSerializer);
73701
73742
  }
73702
73743
  }
@@ -74087,7 +74128,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"modp1":{"gen":"02","prime":"ffffffff
74087
74128
  /***/ ((module) => {
74088
74129
 
74089
74130
  "use strict";
74090
- module.exports = {"rE":"6.5.7"};
74131
+ module.exports = {"rE":"6.6.1"};
74091
74132
 
74092
74133
  /***/ }),
74093
74134