@fileverse-dev/formulajs 4.4.11-mod-39 → 4.4.11-mod-38-patch-2

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.
@@ -1,4 +1,4 @@
1
- /* @fileverse-dev/formulajs v4.4.11-mod-39 */
1
+ /* @fileverse-dev/formulajs v4.4.11-mod-38-patch-1 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -5686,8 +5686,8 @@ function _typeof(o) {
5686
5686
  }
5687
5687
  return sum;
5688
5688
  };
5689
- var x1 = SUM(array1) / array1.length;
5690
- var x2 = SUM(array2) / array2.length;
5689
+ var x1 = SUM$1(array1) / array1.length;
5690
+ var x2 = SUM$1(array2) / array2.length;
5691
5691
  var sum1 = sumOfSquares(array1, x1) / (array1.length - 1);
5692
5692
  var sum2 = sumOfSquares(array2, x2) / (array2.length - 1);
5693
5693
  return sum1 / sum2;
@@ -6870,7 +6870,7 @@ function _typeof(o) {
6870
6870
  return STDEV.P(ref1);
6871
6871
 
6872
6872
  case 9:
6873
- return SUM(ref1);
6873
+ return SUM$1(ref1);
6874
6874
 
6875
6875
  case 10:
6876
6876
  return VAR.S(ref1);
@@ -7605,7 +7605,7 @@ function _typeof(o) {
7605
7605
  return STDEV.P(ref1);
7606
7606
 
7607
7607
  case 9:
7608
- return SUM(ref1);
7608
+ return SUM$1(ref1);
7609
7609
 
7610
7610
  case 10:
7611
7611
  return VAR.S(ref1);
@@ -7638,7 +7638,7 @@ function _typeof(o) {
7638
7638
  return STDEV.P(ref1);
7639
7639
 
7640
7640
  case 109:
7641
- return SUM(ref1);
7641
+ return SUM$1(ref1);
7642
7642
 
7643
7643
  case 110:
7644
7644
  return VAR.S(ref1);
@@ -7647,7 +7647,7 @@ function _typeof(o) {
7647
7647
  return VAR.P(ref1);
7648
7648
  }
7649
7649
  }
7650
- function SUM() {
7650
+ function SUM$1() {
7651
7651
  var result = 0;
7652
7652
  arrayEach(argsToArray(arguments), (function(value) {
7653
7653
  if (result instanceof Error) {
@@ -7660,7 +7660,7 @@ function _typeof(o) {
7660
7660
  var parsed = parseFloat(value);
7661
7661
  !isNaN(parsed) && (result += parsed);
7662
7662
  } else if (Array.isArray(value)) {
7663
- var inner_result = SUM.apply(null, value);
7663
+ var inner_result = SUM$1.apply(null, value);
7664
7664
  if (inner_result instanceof Error) {
7665
7665
  result = inner_result;
7666
7666
  } else {
@@ -7696,7 +7696,7 @@ function _typeof(o) {
7696
7696
  }
7697
7697
  function SUMIFS() {
7698
7698
  var values = applyCriteria.apply(void 0, arguments);
7699
- return SUM(values);
7699
+ return SUM$1(values);
7700
7700
  }
7701
7701
  function SUMPRODUCT() {
7702
7702
  if (!arguments || arguments.length === 0) {
@@ -9907,7 +9907,7 @@ function _typeof(o) {
9907
9907
  arrayEach(resultIndexes, (function(value) {
9908
9908
  targetValues.push(targetFields[value]);
9909
9909
  }));
9910
- return SUM(targetValues);
9910
+ return SUM$1(targetValues);
9911
9911
  }
9912
9912
  function DVAR(database, field, criteria) {
9913
9913
  if (isNaN(field) && typeof field !== "string") {
@@ -11211,26 +11211,47 @@ function _typeof(o) {
11211
11211
  })));
11212
11212
  return _handleScanRequest.apply(this, arguments);
11213
11213
  }
11214
- function FIREFLY(_x6, _x7, _x8) {
11214
+ function SUMTEST() {
11215
+ var result = 0;
11216
+ arrayEach(argsToArray(arguments), (function(value) {
11217
+ if (result instanceof Error) {
11218
+ return false;
11219
+ } else if (value instanceof Error) {
11220
+ result = value;
11221
+ } else if (typeof value === "number") {
11222
+ result += value;
11223
+ } else if (typeof value === "string") {
11224
+ var parsed = parseFloat(value);
11225
+ !isNaN(parsed) && (result += parsed);
11226
+ } else if (Array.isArray(value)) {
11227
+ var inner_result = SUM.apply(null, value);
11228
+ if (inner_result instanceof Error) {
11229
+ result = inner_result;
11230
+ } else {
11231
+ result += inner_result;
11232
+ }
11233
+ }
11234
+ }));
11235
+ return result;
11236
+ }
11237
+ function FIREFLY() {
11215
11238
  return _FIREFLY.apply(this, arguments);
11216
11239
  }
11217
11240
  function _FIREFLY() {
11218
- _FIREFLY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(platform, contentType, identifier) {
11241
+ _FIREFLY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee4() {
11219
11242
  var _typeMap$platform;
11220
- var start, end, API_KEY, baseUrl, headers, typeMap, platformType, query, url, res, json, _args4 = arguments;
11243
+ var API_KEY, baseUrl, headers, typeMap, _argsToArray3, _argsToArray4, platform, contentType, identifier, _argsToArray4$, start, _argsToArray4$2, end, platformType, query, url, res, json, _args4 = arguments;
11221
11244
  return _regeneratorRuntime().wrap((function _callee4$(_context4) {
11222
11245
  while (1) switch (_context4.prev = _context4.next) {
11223
11246
  case 0:
11224
- start = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : 0;
11225
- end = _args4.length > 4 && _args4[4] !== undefined ? _args4[4] : 10;
11226
11247
  API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Firefly);
11227
11248
  if (API_KEY) {
11228
- _context4.next = 5;
11249
+ _context4.next = 3;
11229
11250
  break;
11230
11251
  }
11231
11252
  return _context4.abrupt("return", "".concat(SERVICE_API_KEY.Firefly).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11232
11253
 
11233
- case 5:
11254
+ case 3:
11234
11255
  baseUrl = "https://openapi.firefly.land/v1/fileverse/fetch";
11235
11256
  headers = {
11236
11257
  "x-api-key": API_KEY
@@ -11246,14 +11267,18 @@ function _typeof(o) {
11246
11267
  replies: "lenspostid"
11247
11268
  }
11248
11269
  };
11270
+ _argsToArray3 = argsToArray(_args4), _argsToArray4 = _slicedToArray(_argsToArray3, 5),
11271
+ platform = _argsToArray4[0], contentType = _argsToArray4[1], identifier = _argsToArray4[2],
11272
+ _argsToArray4$ = _argsToArray4[3], start = _argsToArray4$ === void 0 ? 0 : _argsToArray4$,
11273
+ _argsToArray4$2 = _argsToArray4[4], end = _argsToArray4$2 === void 0 ? 10 : _argsToArray4$2;
11249
11274
  platformType = (_typeMap$platform = typeMap[platform]) === null || _typeMap$platform === void 0 ? void 0 : _typeMap$platform[contentType];
11250
11275
  if (platformType) {
11251
- _context4.next = 11;
11276
+ _context4.next = 10;
11252
11277
  break;
11253
11278
  }
11254
11279
  return _context4.abrupt("return", "".concat(SERVICE_API_KEY.Firefly).concat(ERROR_MESSAGES_FLAG.INVALID_TYPE));
11255
11280
 
11256
- case 11:
11281
+ case 10:
11257
11282
  query = identifier.split(",").map((function(s) {
11258
11283
  return s.trim();
11259
11284
  })).filter(Boolean).join(",");
@@ -11262,33 +11287,33 @@ function _typeof(o) {
11262
11287
  url.searchParams.set("type", platformType);
11263
11288
  url.searchParams.set("start", String(start));
11264
11289
  url.searchParams.set("end", String(end));
11265
- _context4.prev = 17;
11266
- _context4.next = 20;
11290
+ _context4.prev = 16;
11291
+ _context4.next = 19;
11267
11292
  return fetch(url.toString(), {
11268
11293
  headers: headers
11269
11294
  });
11270
11295
 
11271
- case 20:
11296
+ case 19:
11272
11297
  res = _context4.sent;
11273
11298
  if (res.ok) {
11274
- _context4.next = 23;
11299
+ _context4.next = 22;
11275
11300
  break;
11276
11301
  }
11277
11302
  throw new Error("HTTP ".concat(res.status));
11278
11303
 
11279
- case 23:
11280
- _context4.next = 25;
11304
+ case 22:
11305
+ _context4.next = 24;
11281
11306
  return res.json();
11282
11307
 
11283
- case 25:
11308
+ case 24:
11284
11309
  json = _context4.sent;
11285
11310
  if (Array.isArray(json === null || json === void 0 ? void 0 : json.data)) {
11286
- _context4.next = 28;
11311
+ _context4.next = 27;
11287
11312
  break;
11288
11313
  }
11289
11314
  return _context4.abrupt("return", []);
11290
11315
 
11291
- case 28:
11316
+ case 27:
11292
11317
  return _context4.abrupt("return", json.data.map((function(item) {
11293
11318
  var flat = {};
11294
11319
  for (var _i10 = 0, _Object$entries = Object.entries(item); _i10 < _Object$entries.length; _i10++) {
@@ -11301,26 +11326,26 @@ function _typeof(o) {
11301
11326
  return flat;
11302
11327
  })));
11303
11328
 
11304
- case 31:
11305
- _context4.prev = 31;
11306
- _context4.t0 = _context4["catch"](17);
11329
+ case 30:
11330
+ _context4.prev = 30;
11331
+ _context4.t0 = _context4["catch"](16);
11307
11332
  console.error("FIREFLY fetch error:", _context4.t0);
11308
11333
  return _context4.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11309
11334
 
11310
- case 35:
11335
+ case 34:
11311
11336
  case "end":
11312
11337
  return _context4.stop();
11313
11338
  }
11314
- }), _callee4, null, [ [ 17, 31 ] ]);
11339
+ }), _callee4, null, [ [ 16, 30 ] ]);
11315
11340
  })));
11316
11341
  return _FIREFLY.apply(this, arguments);
11317
11342
  }
11318
- function BLOCKSCOUT(_x9, _x0, _x1, _x10, _x11, _x12, _x13) {
11343
+ function BLOCKSCOUT() {
11319
11344
  return _BLOCKSCOUT.apply(this, arguments);
11320
11345
  }
11321
11346
  function _BLOCKSCOUT() {
11322
- _BLOCKSCOUT = _asyncToGenerator(_regeneratorRuntime().mark((function _callee5(address, type, chain, startTimestamp, endTimestamp, page, offset) {
11323
- var currentTimestamp, hostname, requestUrl, _json$result, _json$result2, response, json;
11347
+ _BLOCKSCOUT = _asyncToGenerator(_regeneratorRuntime().mark((function _callee5() {
11348
+ var _argsToArray5, _argsToArray6, address, type, chain, startTimestamp, endTimestamp, page, offset, currentTimestamp, hostname, requestUrl, _json$result, _json$result2, response, json, _args5 = arguments;
11324
11349
  return _regeneratorRuntime().wrap((function _callee5$(_context5) {
11325
11350
  while (1) switch (_context5.prev = _context5.next) {
11326
11351
  case 0:
@@ -11334,6 +11359,9 @@ function _typeof(o) {
11334
11359
  return _context5.abrupt("return", "TYPE_MISSING");
11335
11360
 
11336
11361
  case 3:
11362
+ _argsToArray5 = argsToArray(_args5), _argsToArray6 = _slicedToArray(_argsToArray5, 7),
11363
+ address = _argsToArray6[0], type = _argsToArray6[1], chain = _argsToArray6[2], startTimestamp = _argsToArray6[3],
11364
+ endTimestamp = _argsToArray6[4], page = _argsToArray6[5], offset = _argsToArray6[6];
11337
11365
  if (!startTimestamp) {
11338
11366
  currentTimestamp = Date.now();
11339
11367
  startTimestamp = currentTimestamp - 30 * 24 * 60 * 60 * 1e3;
@@ -11346,96 +11374,96 @@ function _typeof(o) {
11346
11374
  endTimestamp = toTimestamp(endTimestamp);
11347
11375
  }
11348
11376
  if (isAddress(address)) {
11349
- _context5.next = 10;
11377
+ _context5.next = 11;
11350
11378
  break;
11351
11379
  }
11352
- _context5.next = 9;
11380
+ _context5.next = 10;
11353
11381
  return fromEnsNameToAddress(address);
11354
11382
 
11355
- case 9:
11383
+ case 10:
11356
11384
  address = _context5.sent;
11357
11385
 
11358
- case 10:
11386
+ case 11:
11359
11387
  if (address) {
11360
- _context5.next = 12;
11388
+ _context5.next = 13;
11361
11389
  break;
11362
11390
  }
11363
11391
  return _context5.abrupt("return", "".concat(address).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11364
11392
 
11365
- case 12:
11393
+ case 13:
11366
11394
  hostname = BLOCKSCOUT_CHAINS_MAP[chain];
11367
11395
  _context5.t0 = type;
11368
- _context5.next = _context5.t0 === "stat" ? 16 : _context5.t0 === "txns" ? 18 : _context5.t0 === "tokens" ? 20 : 22;
11396
+ _context5.next = _context5.t0 === "stat" ? 17 : _context5.t0 === "txns" ? 19 : _context5.t0 === "tokens" ? 21 : 23;
11369
11397
  break;
11370
11398
 
11371
- case 16:
11399
+ case 17:
11372
11400
  requestUrl = "".concat(hostname, "/api/v2/addresses/").concat(address, "/counters");
11373
- return _context5.abrupt("break", 23);
11401
+ return _context5.abrupt("break", 24);
11374
11402
 
11375
- case 18:
11403
+ case 19:
11376
11404
  requestUrl = "".concat(hostname, "/api?module=account&action=txlist&address=").concat(address, "&start_timestamp=").concat(startTimestamp, "&end_timestamp=").concat(endTimestamp, "&page=").concat(page, "&offset=").concat(offset, "&sort=asc");
11377
- return _context5.abrupt("break", 23);
11405
+ return _context5.abrupt("break", 24);
11378
11406
 
11379
- case 20:
11407
+ case 21:
11380
11408
  requestUrl = "".concat(hostname, "/api?module=account&action=tokenlist&address=").concat(address);
11381
- return _context5.abrupt("break", 23);
11409
+ return _context5.abrupt("break", 24);
11382
11410
 
11383
- case 22:
11411
+ case 23:
11384
11412
  return _context5.abrupt("return", "INVALID_TYPE");
11385
11413
 
11386
- case 23:
11387
- _context5.prev = 23;
11388
- _context5.next = 26;
11414
+ case 24:
11415
+ _context5.prev = 24;
11416
+ _context5.next = 27;
11389
11417
  return fetch(requestUrl);
11390
11418
 
11391
- case 26:
11419
+ case 27:
11392
11420
  response = _context5.sent;
11393
11421
  if (response.ok) {
11394
- _context5.next = 29;
11422
+ _context5.next = 30;
11395
11423
  break;
11396
11424
  }
11397
11425
  throw new Error("HTTP error! Status: ".concat(response.status));
11398
11426
 
11399
- case 29:
11400
- _context5.next = 31;
11427
+ case 30:
11428
+ _context5.next = 32;
11401
11429
  return response.json();
11402
11430
 
11403
- case 31:
11431
+ case 32:
11404
11432
  json = _context5.sent;
11405
11433
  console.log(json);
11406
11434
  if (!(json !== null && json !== void 0 && (_json$result = json.result) !== null && _json$result !== void 0 && _json$result.includes("Invalid parameter(s)"))) {
11407
- _context5.next = 35;
11435
+ _context5.next = 36;
11408
11436
  break;
11409
11437
  }
11410
11438
  return _context5.abrupt("return", "INVALID_REQUEST_PARAMS");
11411
11439
 
11412
- case 35:
11440
+ case 36:
11413
11441
  if (!(json !== null && json !== void 0 && (_json$result2 = json.result) !== null && _json$result2 !== void 0 && _json$result2.includes("Not found"))) {
11414
- _context5.next = 37;
11442
+ _context5.next = 38;
11415
11443
  break;
11416
11444
  }
11417
11445
  return _context5.abrupt("return", "ADDRESS_NOT_FOUND");
11418
11446
 
11419
- case 37:
11447
+ case 38:
11420
11448
  if (!(type === "stat")) {
11421
- _context5.next = 39;
11449
+ _context5.next = 40;
11422
11450
  break;
11423
11451
  }
11424
11452
  return _context5.abrupt("return", [ json ]);
11425
11453
 
11426
- case 39:
11454
+ case 40:
11427
11455
  return _context5.abrupt("return", json.result);
11428
11456
 
11429
- case 42:
11430
- _context5.prev = 42;
11431
- _context5.t1 = _context5["catch"](23);
11457
+ case 43:
11458
+ _context5.prev = 43;
11459
+ _context5.t1 = _context5["catch"](24);
11432
11460
  return _context5.abrupt("return", "ERROR IN FETCHING");
11433
11461
 
11434
- case 45:
11462
+ case 46:
11435
11463
  case "end":
11436
11464
  return _context5.stop();
11437
11465
  }
11438
- }), _callee5, null, [ [ 23, 42 ] ]);
11466
+ }), _callee5, null, [ [ 24, 43 ] ]);
11439
11467
  })));
11440
11468
  return _BLOCKSCOUT.apply(this, arguments);
11441
11469
  }
@@ -11444,15 +11472,13 @@ function _typeof(o) {
11444
11472
  }
11445
11473
  function _BASESCAN() {
11446
11474
  _BASESCAN = _asyncToGenerator(_regeneratorRuntime().mark((function _callee6() {
11447
- var _len2, args, _key2, type, chain, address, startDate, endDate, page, limit, _args6 = arguments;
11475
+ var _argsToArray7, _argsToArray8, type, chain, address, startDate, endDate, page, limit, _args6 = arguments;
11448
11476
  return _regeneratorRuntime().wrap((function _callee6$(_context6) {
11449
11477
  while (1) switch (_context6.prev = _context6.next) {
11450
11478
  case 0:
11451
- for (_len2 = _args6.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
11452
- args[_key2] = _args6[_key2];
11453
- }
11454
- type = args[0], chain = args[1], address = args[2], startDate = args[3], endDate = args[4],
11455
- page = args[5], limit = args[6];
11479
+ _argsToArray7 = argsToArray(_args6), _argsToArray8 = _slicedToArray(_argsToArray7, 7),
11480
+ type = _argsToArray8[0], chain = _argsToArray8[1], address = _argsToArray8[2], startDate = _argsToArray8[3],
11481
+ endDate = _argsToArray8[4], page = _argsToArray8[5], limit = _argsToArray8[6];
11456
11482
  return _context6.abrupt("return", handleScanRequest({
11457
11483
  scanKey: SERVICE_API_KEY.Basescan,
11458
11484
  baseUrl: "https://api.basescan.org/api",
@@ -11465,7 +11491,7 @@ function _typeof(o) {
11465
11491
  offset: limit
11466
11492
  }));
11467
11493
 
11468
- case 3:
11494
+ case 2:
11469
11495
  case "end":
11470
11496
  return _context6.stop();
11471
11497
  }
@@ -11478,15 +11504,13 @@ function _typeof(o) {
11478
11504
  }
11479
11505
  function _GNOSISSCAN() {
11480
11506
  _GNOSISSCAN = _asyncToGenerator(_regeneratorRuntime().mark((function _callee7() {
11481
- var _len3, args, _key3, type, chain, address, startDate, endDate, page, limit, _args7 = arguments;
11507
+ var _argsToArray9, _argsToArray0, type, chain, address, startDate, endDate, page, limit, _args7 = arguments;
11482
11508
  return _regeneratorRuntime().wrap((function _callee7$(_context7) {
11483
11509
  while (1) switch (_context7.prev = _context7.next) {
11484
11510
  case 0:
11485
- for (_len3 = _args7.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
11486
- args[_key3] = _args7[_key3];
11487
- }
11488
- type = args[0], chain = args[1], address = args[2], startDate = args[3], endDate = args[4],
11489
- page = args[5], limit = args[6];
11511
+ _argsToArray9 = argsToArray(_args7), _argsToArray0 = _slicedToArray(_argsToArray9, 7),
11512
+ type = _argsToArray0[0], chain = _argsToArray0[1], address = _argsToArray0[2], startDate = _argsToArray0[3],
11513
+ endDate = _argsToArray0[4], page = _argsToArray0[5], limit = _argsToArray0[6];
11490
11514
  return _context7.abrupt("return", handleScanRequest({
11491
11515
  scanKey: SERVICE_API_KEY.Gnosisscan,
11492
11516
  baseUrl: "https://api.gnosisscan.io/api",
@@ -11499,7 +11523,7 @@ function _typeof(o) {
11499
11523
  offset: limit
11500
11524
  }));
11501
11525
 
11502
- case 3:
11526
+ case 2:
11503
11527
  case "end":
11504
11528
  return _context7.stop();
11505
11529
  }
@@ -11507,12 +11531,12 @@ function _typeof(o) {
11507
11531
  })));
11508
11532
  return _GNOSISSCAN.apply(this, arguments);
11509
11533
  }
11510
- function NEYNAR(_x14, _x15, _x16, _x17, _x18) {
11534
+ function NEYNAR() {
11511
11535
  return _NEYNAR.apply(this, arguments);
11512
11536
  }
11513
11537
  function _NEYNAR() {
11514
- _NEYNAR = _asyncToGenerator(_regeneratorRuntime().mark((function _callee8(fid, viewerFid, sortType, limit, cursor) {
11515
- var API_KEY, url, _json$users, response, json;
11538
+ _NEYNAR = _asyncToGenerator(_regeneratorRuntime().mark((function _callee8() {
11539
+ var API_KEY, _argsToArray1, _argsToArray10, fid, viewerFid, sortType, limit, cursor, url, _json$users, response, json, _args8 = arguments;
11516
11540
  return _regeneratorRuntime().wrap((function _callee8$(_context8) {
11517
11541
  while (1) switch (_context8.prev = _context8.next) {
11518
11542
  case 0:
@@ -11524,14 +11548,17 @@ function _typeof(o) {
11524
11548
  return _context8.abrupt("return", "".concat(SERVICE_API_KEY.Neynar).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11525
11549
 
11526
11550
  case 3:
11551
+ _argsToArray1 = argsToArray(_args8), _argsToArray10 = _slicedToArray(_argsToArray1, 5),
11552
+ fid = _argsToArray10[0], viewerFid = _argsToArray10[1], sortType = _argsToArray10[2],
11553
+ limit = _argsToArray10[3], cursor = _argsToArray10[4];
11527
11554
  url = new URL("https://api.neynar.com/v2/farcaster/followers");
11528
11555
  url.searchParams.set("fid", fid.toString());
11529
11556
  url.searchParams.set("sort_type", sortType);
11530
11557
  url.searchParams.set("limit", limit.toString());
11531
11558
  if (viewerFid !== null) url.searchParams.set("viewer_fid", viewerFid.toString());
11532
11559
  if (cursor) url.searchParams.set("cursor", cursor);
11533
- _context8.prev = 9;
11534
- _context8.next = 12;
11560
+ _context8.prev = 10;
11561
+ _context8.next = 13;
11535
11562
  return fetch(url.toString(), {
11536
11563
  headers: {
11537
11564
  "x-api-key": API_KEY,
@@ -11539,30 +11566,30 @@ function _typeof(o) {
11539
11566
  }
11540
11567
  });
11541
11568
 
11542
- case 12:
11569
+ case 13:
11543
11570
  response = _context8.sent;
11544
11571
  if (response.ok) {
11545
- _context8.next = 15;
11572
+ _context8.next = 16;
11546
11573
  break;
11547
11574
  }
11548
11575
  throw new Error("HTTP ".concat(response.status));
11549
11576
 
11550
- case 15:
11551
- _context8.next = 17;
11577
+ case 16:
11578
+ _context8.next = 18;
11552
11579
  return response.json();
11553
11580
 
11554
- case 17:
11581
+ case 18:
11555
11582
  json = _context8.sent;
11556
11583
  if (json !== null && json !== void 0 && (_json$users = json.users) !== null && _json$users !== void 0 && _json$users.length) {
11557
- _context8.next = 20;
11584
+ _context8.next = 21;
11558
11585
  break;
11559
11586
  }
11560
11587
  return _context8.abrupt("return", []);
11561
11588
 
11562
- case 20:
11563
- return _context8.abrupt("return", json.users.map((function(_ref4) {
11589
+ case 21:
11590
+ return _context8.abrupt("return", json.users.map((function(_ref3) {
11564
11591
  var _user$profile, _user$profile2;
11565
- var user = _ref4.user;
11592
+ var user = _ref3.user;
11566
11593
  return {
11567
11594
  username: user.username,
11568
11595
  custody_address: user.custody_address,
@@ -11572,48 +11599,49 @@ function _typeof(o) {
11572
11599
  };
11573
11600
  })));
11574
11601
 
11575
- case 23:
11576
- _context8.prev = 23;
11577
- _context8.t0 = _context8["catch"](9);
11602
+ case 24:
11603
+ _context8.prev = 24;
11604
+ _context8.t0 = _context8["catch"](10);
11578
11605
  console.error("NEYNAR_FETCH_FOLLOWERS error:", _context8.t0);
11579
11606
  return _context8.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11580
11607
 
11581
- case 27:
11608
+ case 28:
11582
11609
  case "end":
11583
11610
  return _context8.stop();
11584
11611
  }
11585
- }), _callee8, null, [ [ 9, 23 ] ]);
11612
+ }), _callee8, null, [ [ 10, 24 ] ]);
11586
11613
  })));
11587
11614
  return _NEYNAR.apply(this, arguments);
11588
11615
  }
11589
- function GNOSISPAY(_x19) {
11616
+ function GNOSISPAY() {
11590
11617
  return _GNOSISPAY.apply(this, arguments);
11591
11618
  }
11592
11619
  function _GNOSISPAY() {
11593
- _GNOSISPAY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee9(_ref3) {
11594
- var cardId, startDate, endDate, _ref3$limit, limit, _ref3$offset, offset, apiKeyKey, API_KEY, url, res, json;
11620
+ _GNOSISPAY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee9() {
11621
+ var apiKeyKey, API_KEY, _argsToArray11, _argsToArray12, cardId, startDate, endDate, _argsToArray12$, limit, _argsToArray12$2, offset, url, res, json, _args9 = arguments;
11595
11622
  return _regeneratorRuntime().wrap((function _callee9$(_context9) {
11596
11623
  while (1) switch (_context9.prev = _context9.next) {
11597
11624
  case 0:
11598
- cardId = _ref3.cardId, startDate = _ref3.startDate, endDate = _ref3.endDate, _ref3$limit = _ref3.limit,
11599
- limit = _ref3$limit === void 0 ? 20 : _ref3$limit, _ref3$offset = _ref3.offset,
11600
- offset = _ref3$offset === void 0 ? 0 : _ref3$offset;
11601
11625
  apiKeyKey = SERVICE_API_KEY.GnosisPay;
11602
11626
  API_KEY = window.localStorage.getItem(apiKeyKey);
11603
11627
  if (API_KEY) {
11604
- _context9.next = 5;
11628
+ _context9.next = 4;
11605
11629
  break;
11606
11630
  }
11607
11631
  return _context9.abrupt("return", "".concat(apiKeyKey).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11608
11632
 
11609
- case 5:
11633
+ case 4:
11610
11634
  if (cardId) {
11611
- _context9.next = 7;
11635
+ _context9.next = 6;
11612
11636
  break;
11613
11637
  }
11614
11638
  return _context9.abrupt("return", "".concat(apiKeyKey).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11615
11639
 
11616
- case 7:
11640
+ case 6:
11641
+ _argsToArray11 = argsToArray(_args9), _argsToArray12 = _slicedToArray(_argsToArray11, 5),
11642
+ cardId = _argsToArray12[0], startDate = _argsToArray12[1], endDate = _argsToArray12[2],
11643
+ _argsToArray12$ = _argsToArray12[3], limit = _argsToArray12$ === void 0 ? 20 : _argsToArray12$,
11644
+ _argsToArray12$2 = _argsToArray12[4], offset = _argsToArray12$2 === void 0 ? 0 : _argsToArray12$2;
11617
11645
  url = new URL("https://api.gnosispay.com/cards/".concat(cardId, "/transactions"));
11618
11646
  url.searchParams.set("limit", limit.toString());
11619
11647
  url.searchParams.set("offset", offset.toString());
@@ -11689,15 +11717,14 @@ function _typeof(o) {
11689
11717
  }
11690
11718
  function _ETHERSCAN() {
11691
11719
  _ETHERSCAN = _asyncToGenerator(_regeneratorRuntime().mark((function _callee0() {
11692
- var _len4, args, _key4, type, chain, address, startDate, endDate, page, limit, _args0 = arguments;
11720
+ var _argsToArray13, _argsToArray14, type, chain, address, startDate, endDate, page, limit, _args0 = arguments;
11693
11721
  return _regeneratorRuntime().wrap((function _callee0$(_context0) {
11694
11722
  while (1) switch (_context0.prev = _context0.next) {
11695
11723
  case 0:
11696
- for (_len4 = _args0.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
11697
- args[_key4] = _args0[_key4];
11698
- }
11699
- type = args[0], chain = args[1], address = args[2], startDate = args[3], endDate = args[4],
11700
- page = args[5], limit = args[6];
11724
+ _argsToArray13 = argsToArray(_args0), _argsToArray14 = _slicedToArray(_argsToArray13, 7),
11725
+ type = _argsToArray14[0], chain = _argsToArray14[1], address = _argsToArray14[2],
11726
+ startDate = _argsToArray14[3], endDate = _argsToArray14[4], page = _argsToArray14[5],
11727
+ limit = _argsToArray14[6];
11701
11728
  return _context0.abrupt("return", handleScanRequest({
11702
11729
  scanKey: SERVICE_API_KEY.Etherscan,
11703
11730
  baseUrl: "https://api.etherscan.io/v2/api",
@@ -11710,7 +11737,7 @@ function _typeof(o) {
11710
11737
  offset: limit
11711
11738
  }));
11712
11739
 
11713
- case 3:
11740
+ case 2:
11714
11741
  case "end":
11715
11742
  return _context0.stop();
11716
11743
  }
@@ -11718,49 +11745,51 @@ function _typeof(o) {
11718
11745
  })));
11719
11746
  return _ETHERSCAN.apply(this, arguments);
11720
11747
  }
11721
- function COINGECKO(_x20, _x21, _x22) {
11748
+ function COINGECKO() {
11722
11749
  return _COINGECKO.apply(this, arguments);
11723
11750
  }
11724
11751
  function _COINGECKO() {
11725
- _COINGECKO = _asyncToGenerator(_regeneratorRuntime().mark((function _callee1(category, param1, param2) {
11726
- var page, perPage, API_KEY, headers, url, lowerCategory, token, vsCurrencies, ecosystemMap, key, categoryVal, trend, _category, _trend, exchange, response, json, _json$status, message, output, _i11, _Object$entries2, _Object$entries2$_i, _token, prices, _i12, _Object$entries3, _Object$entries3$_i, currency, _value6, _key5, flatArray, _args1 = arguments;
11752
+ _COINGECKO = _asyncToGenerator(_regeneratorRuntime().mark((function _callee1() {
11753
+ var API_KEY, headers, url, _argsToArray15, _argsToArray16, category, param1, param2, _argsToArray16$, page, _argsToArray16$2, perPage, lowerCategory, token, vsCurrencies, ecosystemMap, key, categoryVal, trend, _category, _trend, exchange, response, json, _json$status, message, output, _i11, _Object$entries2, _Object$entries2$_i, _token, prices, _i12, _Object$entries3, _Object$entries3$_i, currency, _value6, _key2, flatArray, _args1 = arguments;
11727
11754
  return _regeneratorRuntime().wrap((function _callee1$(_context1) {
11728
11755
  while (1) switch (_context1.prev = _context1.next) {
11729
11756
  case 0:
11730
- page = _args1.length > 3 && _args1[3] !== undefined ? _args1[3] : 1;
11731
- perPage = _args1.length > 4 && _args1[4] !== undefined ? _args1[4] : 2;
11732
11757
  API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Coingecko);
11733
11758
  if (API_KEY) {
11734
- _context1.next = 5;
11759
+ _context1.next = 3;
11735
11760
  break;
11736
11761
  }
11737
11762
  return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11738
11763
 
11739
- case 5:
11764
+ case 3:
11740
11765
  headers = {
11741
11766
  accept: "application/json",
11742
11767
  "x-cg-demo-api-key": API_KEY
11743
11768
  };
11744
11769
  url = "";
11770
+ _argsToArray15 = argsToArray(_args1), _argsToArray16 = _slicedToArray(_argsToArray15, 5),
11771
+ category = _argsToArray16[0], param1 = _argsToArray16[1], param2 = _argsToArray16[2],
11772
+ _argsToArray16$ = _argsToArray16[3], page = _argsToArray16$ === void 0 ? 1 : _argsToArray16$,
11773
+ _argsToArray16$2 = _argsToArray16[4], perPage = _argsToArray16$2 === void 0 ? 2 : _argsToArray16$2;
11745
11774
  lowerCategory = (category || "").toLowerCase();
11746
11775
  _context1.t0 = lowerCategory;
11747
- _context1.next = _context1.t0 === "price" ? 11 : _context1.t0 === "market" ? 17 : _context1.t0 === "stablecoins" ? 27 : _context1.t0 === "derivatives" ? 31 : 34;
11776
+ _context1.next = _context1.t0 === "price" ? 10 : _context1.t0 === "market" ? 16 : _context1.t0 === "stablecoins" ? 26 : _context1.t0 === "derivatives" ? 30 : 33;
11748
11777
  break;
11749
11778
 
11750
- case 11:
11779
+ case 10:
11751
11780
  token = param1;
11752
11781
  vsCurrencies = param2;
11753
11782
  if (!(!token || !vsCurrencies)) {
11754
- _context1.next = 15;
11783
+ _context1.next = 14;
11755
11784
  break;
11756
11785
  }
11757
11786
  return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11758
11787
 
11759
- case 15:
11788
+ case 14:
11760
11789
  url = "https://api.coingecko.com/api/v3/simple/price?vs_currencies=".concat(vsCurrencies, "&ids=").concat(token);
11761
- return _context1.abrupt("break", 35);
11790
+ return _context1.abrupt("break", 34);
11762
11791
 
11763
- case 17:
11792
+ case 16:
11764
11793
  ecosystemMap = {
11765
11794
  eth: "ethereum-ecosystem",
11766
11795
  base: "base-ecosystem",
@@ -11777,70 +11806,70 @@ function _typeof(o) {
11777
11806
  trend = param2 ? "&price_change_percentage=".concat(param2) : "";
11778
11807
  url = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&include_tokens=top&page=".concat(page, "&per_page=").concat(perPage);
11779
11808
  if (!(key && !categoryVal)) {
11780
- _context1.next = 24;
11809
+ _context1.next = 23;
11781
11810
  break;
11782
11811
  }
11783
11812
  return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11784
11813
 
11785
- case 24:
11814
+ case 23:
11786
11815
  if (categoryVal) url += "&category=".concat(categoryVal);
11787
11816
  if (trend) url += trend;
11788
- return _context1.abrupt("break", 35);
11817
+ return _context1.abrupt("break", 34);
11789
11818
 
11790
- case 27:
11819
+ case 26:
11791
11820
  _category = !param1 || param1.toLowerCase() === "all" ? "stablecoins" : param1.toLowerCase();
11792
11821
  _trend = param2 ? "&price_change_percentage=".concat(param2) : "";
11793
11822
  url = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&category=".concat(_category, "&order=market_cap_desc&page=").concat(page, "&per_page=").concat(perPage).concat(_trend);
11794
- return _context1.abrupt("break", 35);
11823
+ return _context1.abrupt("break", 34);
11795
11824
 
11796
- case 31:
11825
+ case 30:
11797
11826
  exchange = param1;
11798
11827
  if (exchange) {
11799
11828
  url = "https://api.coingecko.com/api/v3/derivatives/exchanges/".concat(exchange, "?include_tickers=all");
11800
11829
  } else {
11801
11830
  url = "https://api.coingecko.com/api/v3/derivatives?page=".concat(page, "&per_page=").concat(perPage);
11802
11831
  }
11803
- return _context1.abrupt("break", 35);
11832
+ return _context1.abrupt("break", 34);
11804
11833
 
11805
- case 34:
11834
+ case 33:
11806
11835
  return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_PARAMS));
11807
11836
 
11808
- case 35:
11809
- _context1.prev = 35;
11810
- _context1.next = 38;
11837
+ case 34:
11838
+ _context1.prev = 34;
11839
+ _context1.next = 37;
11811
11840
  return fetch(url, {
11812
11841
  method: "GET",
11813
11842
  headers: headers
11814
11843
  });
11815
11844
 
11816
- case 38:
11845
+ case 37:
11817
11846
  response = _context1.sent;
11818
- _context1.next = 41;
11847
+ _context1.next = 40;
11819
11848
  return response.json();
11820
11849
 
11821
- case 41:
11850
+ case 40:
11822
11851
  json = _context1.sent;
11823
11852
  if (response.ok) {
11824
- _context1.next = 48;
11853
+ _context1.next = 47;
11825
11854
  break;
11826
11855
  }
11827
11856
  message = (json === null || json === void 0 || (_json$status = json.status) === null || _json$status === void 0 ? void 0 : _json$status.error_message) || "";
11828
11857
  if (!message.includes("API Key Missing")) {
11829
- _context1.next = 46;
11858
+ _context1.next = 45;
11830
11859
  break;
11831
11860
  }
11832
11861
  return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_API_KEY));
11833
11862
 
11834
- case 46:
11863
+ case 45:
11835
11864
  if (!(response.status === 429)) {
11836
- _context1.next = 48;
11865
+ _context1.next = 47;
11837
11866
  break;
11838
11867
  }
11839
11868
  return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.RATE_LIMIT));
11840
11869
 
11841
- case 48:
11870
+ case 47:
11842
11871
  if (!(lowerCategory === "price")) {
11843
- _context1.next = 52;
11872
+ _context1.next = 51;
11844
11873
  break;
11845
11874
  }
11846
11875
  output = {};
@@ -11850,45 +11879,45 @@ function _typeof(o) {
11850
11879
  for (_i12 = 0, _Object$entries3 = Object.entries(prices); _i12 < _Object$entries3.length; _i12++) {
11851
11880
  _Object$entries3$_i = _slicedToArray(_Object$entries3[_i12], 2), currency = _Object$entries3$_i[0],
11852
11881
  _value6 = _Object$entries3$_i[1];
11853
- _key5 = "".concat(_token.charAt(0).toUpperCase() + _token.slice(1), "_").concat(currency.toUpperCase());
11854
- output[_key5] = _value6;
11882
+ _key2 = "".concat(_token.charAt(0).toUpperCase() + _token.slice(1), "_").concat(currency.toUpperCase());
11883
+ output[_key2] = _value6;
11855
11884
  }
11856
11885
  }
11857
11886
  return _context1.abrupt("return", [ output ]);
11858
11887
 
11859
- case 52:
11888
+ case 51:
11860
11889
  flatArray = Array.isArray(json) ? json : [ json ];
11861
11890
  return _context1.abrupt("return", flatArray.map((function(item) {
11862
11891
  var flat = {};
11863
11892
  for (var _i13 = 0, _Object$entries4 = Object.entries(item); _i13 < _Object$entries4.length; _i13++) {
11864
- var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i13], 2), _key6 = _Object$entries4$_i[0], _value7 = _Object$entries4$_i[1];
11893
+ var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i13], 2), _key3 = _Object$entries4$_i[0], _value7 = _Object$entries4$_i[1];
11865
11894
  if (_typeof(_value7) !== "object" || _value7 === null) {
11866
- flat[_key6] = _value7;
11895
+ flat[_key3] = _value7;
11867
11896
  }
11868
11897
  }
11869
11898
  return flat;
11870
11899
  })));
11871
11900
 
11872
- case 56:
11873
- _context1.prev = 56;
11874
- _context1.t1 = _context1["catch"](35);
11901
+ case 55:
11902
+ _context1.prev = 55;
11903
+ _context1.t1 = _context1["catch"](34);
11875
11904
  console.error(_context1.t1);
11876
11905
  return _context1.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11877
11906
 
11878
- case 60:
11907
+ case 59:
11879
11908
  case "end":
11880
11909
  return _context1.stop();
11881
11910
  }
11882
- }), _callee1, null, [ [ 35, 56 ] ]);
11911
+ }), _callee1, null, [ [ 34, 55 ] ]);
11883
11912
  })));
11884
11913
  return _COINGECKO.apply(this, arguments);
11885
11914
  }
11886
- function EOA(_x23, _x24, _x25, _x26, _x27) {
11915
+ function EOA() {
11887
11916
  return _EOA.apply(this, arguments);
11888
11917
  }
11889
11918
  function _EOA() {
11890
- _EOA = _asyncToGenerator(_regeneratorRuntime().mark((function _callee11(addresses, category, chains, startTime, endTime) {
11891
- var page, offset, API_KEY, INPUTS, CHAINS, out, ADDRESS_MAP, _iterator, _step, input, resolved, ADDRS, _iterator2, _step2, _loop, _ret, fetchJSON, _fetchJSON, _args13 = arguments;
11919
+ _EOA = _asyncToGenerator(_regeneratorRuntime().mark((function _callee11() {
11920
+ var _argsToArray17, _argsToArray18, addresses, category, chains, startTime, endTime, _argsToArray18$, page, _argsToArray18$2, offset, someError, API_KEY, INPUTS, CHAINS, out, ADDRESS_MAP, _iterator, _step, input, resolved, ADDRS, _iterator2, _step2, _loop, _ret, fetchJSON, _fetchJSON, _args13 = arguments;
11892
11921
  return _regeneratorRuntime().wrap((function _callee11$(_context13) {
11893
11922
  while (1) switch (_context13.prev = _context13.next) {
11894
11923
  case 0:
@@ -11952,83 +11981,98 @@ function _typeof(o) {
11952
11981
  })));
11953
11982
  return _fetchJSON.apply(this, arguments);
11954
11983
  };
11955
- fetchJSON = function _fetchJSON2(_x35) {
11984
+ fetchJSON = function _fetchJSON2(_x8) {
11956
11985
  return _fetchJSON.apply(this, arguments);
11957
11986
  };
11958
- page = _args13.length > 5 && _args13[5] !== undefined ? _args13[5] : 1;
11959
- offset = _args13.length > 6 && _args13[6] !== undefined ? _args13[6] : 10;
11987
+ _argsToArray17 = argsToArray(_args13), _argsToArray18 = _slicedToArray(_argsToArray17, 7),
11988
+ addresses = _argsToArray18[0], category = _argsToArray18[1], chains = _argsToArray18[2],
11989
+ startTime = _argsToArray18[3], endTime = _argsToArray18[4], _argsToArray18$ = _argsToArray18[5],
11990
+ page = _argsToArray18$ === void 0 ? 1 : _argsToArray18$, _argsToArray18$2 = _argsToArray18[6],
11991
+ offset = _argsToArray18$2 === void 0 ? 10 : _argsToArray18$2;
11992
+ someError = anyError(addresses, category, chains, startTime, endTime, page, offset);
11993
+ if (!someError) {
11994
+ _context13.next = 6;
11995
+ break;
11996
+ }
11997
+ return _context13.abrupt("return", someError);
11998
+
11999
+ case 6:
11960
12000
  API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Etherscan);
11961
12001
  if (API_KEY) {
11962
- _context13.next = 7;
12002
+ _context13.next = 9;
11963
12003
  break;
11964
12004
  }
11965
12005
  return _context13.abrupt("return", "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11966
12006
 
11967
- case 7:
11968
- INPUTS = addresses.split(",").map((function(a) {
11969
- return a.trim();
11970
- })).filter(Boolean);
12007
+ case 9:
12008
+ if (typeof addresses === "string") {
12009
+ INPUTS = addresses.split(",").map((function(a) {
12010
+ return a.trim();
12011
+ })).filter(Boolean);
12012
+ } else if (_typeof(addresses) === "object") {
12013
+ INPUTS = addresses;
12014
+ }
11971
12015
  CHAINS = chains.split(",").map((function(c) {
11972
12016
  return c.trim();
11973
12017
  })).filter(Boolean);
11974
12018
  out = [];
11975
12019
  ADDRESS_MAP = {};
11976
12020
  _iterator = _createForOfIteratorHelper(INPUTS);
11977
- _context13.prev = 12;
12021
+ _context13.prev = 14;
11978
12022
  _iterator.s();
11979
12023
 
11980
- case 14:
12024
+ case 16:
11981
12025
  if ((_step = _iterator.n()).done) {
11982
- _context13.next = 32;
12026
+ _context13.next = 34;
11983
12027
  break;
11984
12028
  }
11985
12029
  input = _step.value;
11986
12030
  if (!isAddress(input)) {
11987
- _context13.next = 20;
12031
+ _context13.next = 22;
11988
12032
  break;
11989
12033
  }
11990
12034
  ADDRESS_MAP[input.toLowerCase()] = null;
11991
- _context13.next = 30;
12035
+ _context13.next = 32;
11992
12036
  break;
11993
12037
 
11994
- case 20:
11995
- _context13.prev = 20;
11996
- _context13.next = 23;
12038
+ case 22:
12039
+ _context13.prev = 22;
12040
+ _context13.next = 25;
11997
12041
  return fromEnsNameToAddress(input);
11998
12042
 
11999
- case 23:
12043
+ case 25:
12000
12044
  resolved = _context13.sent;
12001
12045
  if (resolved) ADDRESS_MAP[resolved.toLowerCase()] = input;
12002
- _context13.next = 30;
12046
+ _context13.next = 32;
12003
12047
  break;
12004
12048
 
12005
- case 27:
12006
- _context13.prev = 27;
12007
- _context13.t0 = _context13["catch"](20);
12049
+ case 29:
12050
+ _context13.prev = 29;
12051
+ _context13.t0 = _context13["catch"](22);
12008
12052
  return _context13.abrupt("return", "".concat(input).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
12009
12053
 
12010
- case 30:
12011
- _context13.next = 14;
12012
- break;
12013
-
12014
12054
  case 32:
12015
- _context13.next = 37;
12055
+ _context13.next = 16;
12016
12056
  break;
12017
12057
 
12018
12058
  case 34:
12019
- _context13.prev = 34;
12020
- _context13.t1 = _context13["catch"](12);
12059
+ _context13.next = 39;
12060
+ break;
12061
+
12062
+ case 36:
12063
+ _context13.prev = 36;
12064
+ _context13.t1 = _context13["catch"](14);
12021
12065
  _iterator.e(_context13.t1);
12022
12066
 
12023
- case 37:
12024
- _context13.prev = 37;
12067
+ case 39:
12068
+ _context13.prev = 39;
12025
12069
  _iterator.f();
12026
- return _context13.finish(37);
12070
+ return _context13.finish(39);
12027
12071
 
12028
- case 40:
12072
+ case 42:
12029
12073
  ADDRS = Object.keys(ADDRESS_MAP);
12030
12074
  _iterator2 = _createForOfIteratorHelper(CHAINS);
12031
- _context13.prev = 42;
12075
+ _context13.prev = 44;
12032
12076
  _loop = _regeneratorRuntime().mark((function _loop() {
12033
12077
  var chain, chainId, i, slice, action, url, _data, startBlock, endBlock, _loop2, _ret2, _i14, _ADDRS;
12034
12078
  return _regeneratorRuntime().wrap((function _loop$(_context11) {
@@ -12179,58 +12223,58 @@ function _typeof(o) {
12179
12223
  }));
12180
12224
  _iterator2.s();
12181
12225
 
12182
- case 45:
12226
+ case 47:
12183
12227
  if ((_step2 = _iterator2.n()).done) {
12184
- _context13.next = 54;
12228
+ _context13.next = 56;
12185
12229
  break;
12186
12230
  }
12187
- return _context13.delegateYield(_loop(), "t2", 47);
12231
+ return _context13.delegateYield(_loop(), "t2", 49);
12188
12232
 
12189
- case 47:
12233
+ case 49:
12190
12234
  _ret = _context13.t2;
12191
12235
  if (!(_ret === 0)) {
12192
- _context13.next = 50;
12236
+ _context13.next = 52;
12193
12237
  break;
12194
12238
  }
12195
- return _context13.abrupt("continue", 52);
12239
+ return _context13.abrupt("continue", 54);
12196
12240
 
12197
- case 50:
12241
+ case 52:
12198
12242
  if (!_ret) {
12199
- _context13.next = 52;
12243
+ _context13.next = 54;
12200
12244
  break;
12201
12245
  }
12202
12246
  return _context13.abrupt("return", _ret.v);
12203
12247
 
12204
- case 52:
12205
- _context13.next = 45;
12206
- break;
12207
-
12208
12248
  case 54:
12209
- _context13.next = 59;
12249
+ _context13.next = 47;
12210
12250
  break;
12211
12251
 
12212
12252
  case 56:
12213
- _context13.prev = 56;
12214
- _context13.t3 = _context13["catch"](42);
12253
+ _context13.next = 61;
12254
+ break;
12255
+
12256
+ case 58:
12257
+ _context13.prev = 58;
12258
+ _context13.t3 = _context13["catch"](44);
12215
12259
  _iterator2.e(_context13.t3);
12216
12260
 
12217
- case 59:
12218
- _context13.prev = 59;
12261
+ case 61:
12262
+ _context13.prev = 61;
12219
12263
  _iterator2.f();
12220
- return _context13.finish(59);
12264
+ return _context13.finish(61);
12221
12265
 
12222
- case 62:
12266
+ case 64:
12223
12267
  return _context13.abrupt("return", out);
12224
12268
 
12225
- case 63:
12269
+ case 65:
12226
12270
  case "end":
12227
12271
  return _context13.stop();
12228
12272
  }
12229
- }), _callee11, null, [ [ 12, 34, 37, 40 ], [ 20, 27 ], [ 42, 56, 59, 62 ] ]);
12273
+ }), _callee11, null, [ [ 14, 36, 39, 42 ], [ 22, 29 ], [ 44, 58, 61, 64 ] ]);
12230
12274
  })));
12231
12275
  return _EOA.apply(this, arguments);
12232
12276
  }
12233
- function FLVURL(_x28, _x29) {
12277
+ function FLVURL(_x6, _x7) {
12234
12278
  return _FLVURL.apply(this, arguments);
12235
12279
  }
12236
12280
  function _FLVURL() {
@@ -12254,116 +12298,119 @@ function _typeof(o) {
12254
12298
  })));
12255
12299
  return _FLVURL.apply(this, arguments);
12256
12300
  }
12257
- function SAFE(_x30, _x31, _x32, _x33, _x34) {
12301
+ function SAFE() {
12258
12302
  return _SAFE.apply(this, arguments);
12259
12303
  }
12260
12304
  function _SAFE() {
12261
- _SAFE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee13(address, utility, chain, limit, offset) {
12262
- var apiKey, chainIdentifier, url, response, json;
12305
+ _SAFE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee13() {
12306
+ var _argsToArray19, _argsToArray20, address, utility, chain, limit, offset, apiKey, chainIdentifier, url, response, json, _args15 = arguments;
12263
12307
  return _regeneratorRuntime().wrap((function _callee13$(_context15) {
12264
12308
  while (1) switch (_context15.prev = _context15.next) {
12265
12309
  case 0:
12310
+ _argsToArray19 = argsToArray(_args15), _argsToArray20 = _slicedToArray(_argsToArray19, 5),
12311
+ address = _argsToArray20[0], utility = _argsToArray20[1], chain = _argsToArray20[2],
12312
+ limit = _argsToArray20[3], offset = _argsToArray20[4];
12266
12313
  if (!(typeof limit !== "number" || limit < 0)) {
12267
- _context15.next = 2;
12314
+ _context15.next = 3;
12268
12315
  break;
12269
12316
  }
12270
12317
  return _context15.abrupt("return", "INVALID_LIMIT");
12271
12318
 
12272
- case 2:
12319
+ case 3:
12273
12320
  if (!(typeof offset !== "number" || offset < 0)) {
12274
- _context15.next = 4;
12321
+ _context15.next = 5;
12275
12322
  break;
12276
12323
  }
12277
12324
  return _context15.abrupt("return", "INVALID_OFFSET");
12278
12325
 
12279
- case 4:
12326
+ case 5:
12280
12327
  if (!(utility !== "txns")) {
12281
- _context15.next = 6;
12328
+ _context15.next = 7;
12282
12329
  break;
12283
12330
  }
12284
12331
  return _context15.abrupt("return", "UTILITY IS NOT SUPPORTED");
12285
12332
 
12286
- case 6:
12333
+ case 7:
12287
12334
  apiKey = window.localStorage.getItem(SERVICE_API_KEY.Safe);
12288
12335
  chainIdentifier = SAFE_CHAIN_MAP[chain];
12289
12336
  if (apiKey) {
12290
- _context15.next = 10;
12337
+ _context15.next = 11;
12291
12338
  break;
12292
12339
  }
12293
12340
  return _context15.abrupt("return", "".concat(SERVICE_API_KEY.Safe, "_MISSING"));
12294
12341
 
12295
- case 10:
12342
+ case 11:
12296
12343
  if (chainIdentifier) {
12297
- _context15.next = 12;
12344
+ _context15.next = 13;
12298
12345
  break;
12299
12346
  }
12300
12347
  return _context15.abrupt("return", "CHAIN IS NOT SUPPORTED");
12301
12348
 
12302
- case 12:
12349
+ case 13:
12303
12350
  if (isAddress(address)) {
12304
- _context15.next = 16;
12351
+ _context15.next = 17;
12305
12352
  break;
12306
12353
  }
12307
- _context15.next = 15;
12354
+ _context15.next = 16;
12308
12355
  return fromEnsNameToAddress(address);
12309
12356
 
12310
- case 15:
12357
+ case 16:
12311
12358
  address = _context15.sent;
12312
12359
 
12313
- case 16:
12360
+ case 17:
12314
12361
  if (address) {
12315
- _context15.next = 18;
12362
+ _context15.next = 19;
12316
12363
  break;
12317
12364
  }
12318
12365
  return _context15.abrupt("return", "".concat(address).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
12319
12366
 
12320
- case 18:
12367
+ case 19:
12321
12368
  url = "https://api.safe.global/tx-service/".concat(chainIdentifier, "/api/v2/safes/").concat(address, "/multisig-transactions?limit=").concat(limit, "&offset=").concat(offset);
12322
- _context15.prev = 19;
12323
- _context15.next = 22;
12369
+ _context15.prev = 20;
12370
+ _context15.next = 23;
12324
12371
  return fetch(url, {
12325
12372
  headers: {
12326
12373
  Authorization: "Bearer ".concat(apiKey)
12327
12374
  }
12328
12375
  });
12329
12376
 
12330
- case 22:
12377
+ case 23:
12331
12378
  response = _context15.sent;
12332
12379
  if (response.ok) {
12333
- _context15.next = 25;
12380
+ _context15.next = 26;
12334
12381
  break;
12335
12382
  }
12336
12383
  throw new Error("HTTP error! Status: ".concat(response.status));
12337
12384
 
12338
- case 25:
12339
- _context15.next = 27;
12385
+ case 26:
12386
+ _context15.next = 28;
12340
12387
  return response.json();
12341
12388
 
12342
- case 27:
12389
+ case 28:
12343
12390
  json = _context15.sent;
12344
12391
  if (Array.isArray(json.results)) {
12345
- _context15.next = 30;
12392
+ _context15.next = 31;
12346
12393
  break;
12347
12394
  }
12348
12395
  return _context15.abrupt("return", "INVALID API RESPONSE");
12349
12396
 
12350
- case 30:
12351
- return _context15.abrupt("return", json.results.map((function(_ref5) {
12352
- var confirmations = _ref5.confirmations, dataDecoded = _ref5.dataDecoded, rest = _objectWithoutProperties(_ref5, _excluded);
12397
+ case 31:
12398
+ return _context15.abrupt("return", json.results.map((function(_ref4) {
12399
+ var confirmations = _ref4.confirmations, dataDecoded = _ref4.dataDecoded, rest = _objectWithoutProperties(_ref4, _excluded);
12353
12400
  return rest;
12354
12401
  })));
12355
12402
 
12356
- case 33:
12357
- _context15.prev = 33;
12358
- _context15.t0 = _context15["catch"](19);
12403
+ case 34:
12404
+ _context15.prev = 34;
12405
+ _context15.t0 = _context15["catch"](20);
12359
12406
  console.log(_context15.t0);
12360
12407
  return _context15.abrupt("return", "ERROR IN FETCHING");
12361
12408
 
12362
- case 37:
12409
+ case 38:
12363
12410
  case "end":
12364
12411
  return _context15.stop();
12365
12412
  }
12366
- }), _callee13, null, [ [ 19, 33 ] ]);
12413
+ }), _callee13, null, [ [ 20, 34 ] ]);
12367
12414
  })));
12368
12415
  return _SAFE.apply(this, arguments);
12369
12416
  }
@@ -12721,11 +12768,12 @@ function _typeof(o) {
12721
12768
  exports.STEYX = STEYX;
12722
12769
  exports.SUBSTITUTE = SUBSTITUTE;
12723
12770
  exports.SUBTOTAL = SUBTOTAL;
12724
- exports.SUM = SUM;
12771
+ exports.SUM = SUM$1;
12725
12772
  exports.SUMIF = SUMIF;
12726
12773
  exports.SUMIFS = SUMIFS;
12727
12774
  exports.SUMPRODUCT = SUMPRODUCT;
12728
12775
  exports.SUMSQ = SUMSQ;
12776
+ exports.SUMTEST = SUMTEST;
12729
12777
  exports.SUMX2MY2 = SUMX2MY2;
12730
12778
  exports.SUMX2PY2 = SUMX2PY2;
12731
12779
  exports.SUMXMY2 = SUMXMY2;