@digipair/skill-microsoft 0.21.2 → 0.21.7

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.
Files changed (3) hide show
  1. package/index.cjs.js +634 -1385
  2. package/index.esm.js +634 -1385
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -2354,7 +2354,7 @@ function _create_class$E(Constructor, protoProps, staticProps) {
2354
2354
  if (staticProps) _defineProperties$E(Constructor, staticProps);
2355
2355
  return Constructor;
2356
2356
  }
2357
- function _ts_generator$p(thisArg, body) {
2357
+ function _ts_generator$o(thisArg, body) {
2358
2358
  var f, y, t, g, _ = {
2359
2359
  label: 0,
2360
2360
  sent: function() {
@@ -2471,7 +2471,7 @@ function _ts_generator$p(thisArg, body) {
2471
2471
  var _this = this;
2472
2472
  return _async_to_generator$o(function() {
2473
2473
  var _this_performanceClient, autodetectedRegionName, options, localIMDSVersionResponse, currentIMDSVersion, currentIMDSVersionResponse;
2474
- return _ts_generator$p(this, function(_state) {
2474
+ return _ts_generator$o(this, function(_state) {
2475
2475
  switch(_state.label){
2476
2476
  case 0:
2477
2477
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RegionDiscoveryDetectRegion, _this.correlationId);
@@ -2573,7 +2573,7 @@ function _ts_generator$p(thisArg, body) {
2573
2573
  var _this = this;
2574
2574
  return _async_to_generator$o(function() {
2575
2575
  var _this_performanceClient;
2576
- return _ts_generator$p(this, function(_state) {
2576
+ return _ts_generator$o(this, function(_state) {
2577
2577
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetRegionFromIMDS, _this.correlationId);
2578
2578
  return [
2579
2579
  2,
@@ -2593,7 +2593,7 @@ function _ts_generator$p(thisArg, body) {
2593
2593
  var _this = this;
2594
2594
  return _async_to_generator$o(function() {
2595
2595
  var _this_performanceClient, response;
2596
- return _ts_generator$p(this, function(_state) {
2596
+ return _ts_generator$o(this, function(_state) {
2597
2597
  switch(_state.label){
2598
2598
  case 0:
2599
2599
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RegionDiscoveryGetCurrentVersion, _this.correlationId);
@@ -3006,7 +3006,7 @@ function _define_property$i(obj, key, value) {
3006
3006
  }
3007
3007
  return obj;
3008
3008
  }
3009
- function _instanceof$j(left, right) {
3009
+ function _instanceof$i(left, right) {
3010
3010
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3011
3011
  return !!right[Symbol.hasInstance](left);
3012
3012
  } else {
@@ -3052,7 +3052,7 @@ function _object_spread_props$8(target, source) {
3052
3052
  }
3053
3053
  return target;
3054
3054
  }
3055
- function _ts_generator$o(thisArg, body) {
3055
+ function _ts_generator$n(thisArg, body) {
3056
3056
  var f, y, t, g, _ = {
3057
3057
  label: 0,
3058
3058
  sent: function() {
@@ -3416,7 +3416,7 @@ function _ts_generator$o(thisArg, body) {
3416
3416
  var _this = this;
3417
3417
  return _async_to_generator$n(function() {
3418
3418
  var _this_performanceClient, _this_performanceClient1, metadataEntity, cloudDiscoverySource, endpointSource;
3419
- return _ts_generator$o(this, function(_state) {
3419
+ return _ts_generator$n(this, function(_state) {
3420
3420
  switch(_state.label){
3421
3421
  case 0:
3422
3422
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityResolveEndpointsAsync, _this.correlationId);
@@ -3504,7 +3504,7 @@ function _ts_generator$o(thisArg, body) {
3504
3504
  var _this = this;
3505
3505
  return _async_to_generator$n(function() {
3506
3506
  var _this_performanceClient, localMetadata, _this_authorityOptions_azureRegionConfiguration, hardcodedMetadata, metadata, _this_authorityOptions_azureRegionConfiguration1;
3507
- return _ts_generator$o(this, function(_state) {
3507
+ return _ts_generator$n(this, function(_state) {
3508
3508
  switch(_state.label){
3509
3509
  case 0:
3510
3510
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityUpdateEndpointMetadata, _this.correlationId);
@@ -3664,7 +3664,7 @@ function _ts_generator$o(thisArg, body) {
3664
3664
  var _this = this;
3665
3665
  return _async_to_generator$n(function() {
3666
3666
  var _this_performanceClient, options, openIdConfigurationEndpoint, response, isValidResponse, e;
3667
- return _ts_generator$o(this, function(_state) {
3667
+ return _ts_generator$n(this, function(_state) {
3668
3668
  switch(_state.label){
3669
3669
  case 0:
3670
3670
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityGetEndpointMetadataFromNetwork, _this.correlationId);
@@ -3737,7 +3737,7 @@ function _ts_generator$o(thisArg, body) {
3737
3737
  var _this = this;
3738
3738
  return _async_to_generator$n(function() {
3739
3739
  var _this_performanceClient, _this_authorityOptions_azureRegionConfiguration, userConfiguredAzureRegion, _this_authorityOptions_azureRegionConfiguration1, autodetectedRegionName;
3740
- return _ts_generator$o(this, function(_state) {
3740
+ return _ts_generator$n(this, function(_state) {
3741
3741
  switch(_state.label){
3742
3742
  case 0:
3743
3743
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityUpdateMetadataWithRegionalInformation, _this.correlationId);
@@ -3791,7 +3791,7 @@ function _ts_generator$o(thisArg, body) {
3791
3791
  var _this = this;
3792
3792
  return _async_to_generator$n(function() {
3793
3793
  var _this_performanceClient, localMetadataSource, metadata;
3794
- return _ts_generator$o(this, function(_state) {
3794
+ return _ts_generator$n(this, function(_state) {
3795
3795
  switch(_state.label){
3796
3796
  case 0:
3797
3797
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityUpdateCloudDiscoveryMetadata, _this.correlationId);
@@ -3906,7 +3906,7 @@ function _ts_generator$o(thisArg, body) {
3906
3906
  var _this = this;
3907
3907
  return _async_to_generator$n(function() {
3908
3908
  var _this_performanceClient, instanceDiscoveryEndpoint, options, match, response, typedResponseBody, metadata, error, typedError;
3909
- return _ts_generator$o(this, function(_state) {
3909
+ return _ts_generator$n(this, function(_state) {
3910
3910
  switch(_state.label){
3911
3911
  case 0:
3912
3912
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityGetCloudDiscoveryMetadataFromNetwork, _this.correlationId);
@@ -3963,7 +3963,7 @@ function _ts_generator$o(thisArg, body) {
3963
3963
  ];
3964
3964
  case 3:
3965
3965
  error = _state.sent();
3966
- if (_instanceof$j(error, AuthError)) {
3966
+ if (_instanceof$i(error, AuthError)) {
3967
3967
  _this.logger.error("There was a network error while attempting to get the cloud discovery instance metadata.\nError: ".concat(error.errorCode, "\nError Description: ").concat(error.errorMessage));
3968
3968
  } else {
3969
3969
  typedError = error;
@@ -4222,7 +4222,7 @@ function _async_to_generator$m(fn) {
4222
4222
  });
4223
4223
  };
4224
4224
  }
4225
- function _ts_generator$n(thisArg, body) {
4225
+ function _ts_generator$m(thisArg, body) {
4226
4226
  var f, y, t, g, _ = {
4227
4227
  label: 0,
4228
4228
  sent: function() {
@@ -4336,7 +4336,7 @@ function _createDiscoveredInstance() {
4336
4336
  * @internal
4337
4337
  */ _async_to_generator$m(function(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) {
4338
4338
  var authorityUriFinal, acquireTokenAuthority;
4339
- return _ts_generator$n(this, function(_state) {
4339
+ return _ts_generator$m(this, function(_state) {
4340
4340
  switch(_state.label){
4341
4341
  case 0:
4342
4342
  performanceClient === null || performanceClient === void 0 ? void 0 : performanceClient.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);
@@ -4403,7 +4403,7 @@ function _async_to_generator$l(fn) {
4403
4403
  });
4404
4404
  };
4405
4405
  }
4406
- function _ts_generator$m(thisArg, body) {
4406
+ function _ts_generator$l(thisArg, body) {
4407
4407
  var f, y, t, g, _ = {
4408
4408
  label: 0,
4409
4409
  sent: function() {
@@ -4507,7 +4507,7 @@ function _getClientAssertion() {
4507
4507
  * Licensed under the MIT License.
4508
4508
  */ _async_to_generator$l(function(clientAssertion, clientId, tokenEndpoint) {
4509
4509
  var config;
4510
- return _ts_generator$m(this, function(_state) {
4510
+ return _ts_generator$l(this, function(_state) {
4511
4511
  if (typeof clientAssertion === "string") {
4512
4512
  return [
4513
4513
  2,
@@ -4603,7 +4603,7 @@ function _async_to_generator$k(fn) {
4603
4603
  });
4604
4604
  };
4605
4605
  }
4606
- function _ts_generator$l(thisArg, body) {
4606
+ function _ts_generator$k(thisArg, body) {
4607
4607
  var f, y, t, g, _ = {
4608
4608
  label: 0,
4609
4609
  sent: function() {
@@ -4719,35 +4719,35 @@ function _ts_generator$l(thisArg, body) {
4719
4719
  },
4720
4720
  getPublicKeyThumbprint: function getPublicKeyThumbprint() {
4721
4721
  return _async_to_generator$k(function() {
4722
- return _ts_generator$l(this, function(_state) {
4722
+ return _ts_generator$k(this, function(_state) {
4723
4723
  throw createClientAuthError(methodNotImplemented);
4724
4724
  });
4725
4725
  })();
4726
4726
  },
4727
4727
  removeTokenBindingKey: function removeTokenBindingKey() {
4728
4728
  return _async_to_generator$k(function() {
4729
- return _ts_generator$l(this, function(_state) {
4729
+ return _ts_generator$k(this, function(_state) {
4730
4730
  throw createClientAuthError(methodNotImplemented);
4731
4731
  });
4732
4732
  })();
4733
4733
  },
4734
4734
  clearKeystore: function clearKeystore() {
4735
4735
  return _async_to_generator$k(function() {
4736
- return _ts_generator$l(this, function(_state) {
4736
+ return _ts_generator$k(this, function(_state) {
4737
4737
  throw createClientAuthError(methodNotImplemented);
4738
4738
  });
4739
4739
  })();
4740
4740
  },
4741
4741
  signJwt: function signJwt() {
4742
4742
  return _async_to_generator$k(function() {
4743
- return _ts_generator$l(this, function(_state) {
4743
+ return _ts_generator$k(this, function(_state) {
4744
4744
  throw createClientAuthError(methodNotImplemented);
4745
4745
  });
4746
4746
  })();
4747
4747
  },
4748
4748
  hashString: function hashString() {
4749
4749
  return _async_to_generator$k(function() {
4750
- return _ts_generator$l(this, function(_state) {
4750
+ return _ts_generator$k(this, function(_state) {
4751
4751
  throw createClientAuthError(methodNotImplemented);
4752
4752
  });
4753
4753
  })();
@@ -4990,7 +4990,7 @@ function _create_class$C(Constructor, protoProps, staticProps) {
4990
4990
  }();
4991
4991
 
4992
4992
  /* eslint-disable header/header */ var name$1 = "@azure/msal-common";
4993
- var version$1 = "14.13.0";
4993
+ var version$1 = "14.13.1";
4994
4994
 
4995
4995
  function _array_like_to_array$a(arr, len) {
4996
4996
  if (len == null || len > arr.length) len = arr.length;
@@ -5399,20 +5399,35 @@ function _object_without_properties_loose(source, excluded) {
5399
5399
  */ function tenantIdMatchesHomeTenant(tenantId, homeAccountId) {
5400
5400
  return !!tenantId && !!homeAccountId && tenantId === homeAccountId.split(".")[1];
5401
5401
  }
5402
- function buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims) {
5403
- var oid = idTokenClaims.oid, sub = idTokenClaims.sub, tid = idTokenClaims.tid, name = idTokenClaims.name, tfp = idTokenClaims.tfp, acr = idTokenClaims.acr;
5404
- /**
5405
- * Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence:
5406
- * tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens.
5407
- * tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios.
5408
- * acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway.
5409
- */ var tenantId = tid || tfp || acr || "";
5410
- return {
5411
- tenantId: tenantId,
5412
- localAccountId: oid || sub || "",
5413
- name: name,
5414
- isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId)
5415
- };
5402
+ /**
5403
+ * Build tenant profile
5404
+ * @param homeAccountId - Home account identifier for this account object
5405
+ * @param localAccountId - Local account identifer for this account object
5406
+ * @param tenantId - Full tenant or organizational id that this account belongs to
5407
+ * @param idTokenClaims - Claims from the ID token
5408
+ * @returns
5409
+ */ function buildTenantProfile(homeAccountId, localAccountId, tenantId, idTokenClaims) {
5410
+ if (idTokenClaims) {
5411
+ var oid = idTokenClaims.oid, sub = idTokenClaims.sub, tid = idTokenClaims.tid, name = idTokenClaims.name, tfp = idTokenClaims.tfp, acr = idTokenClaims.acr;
5412
+ /**
5413
+ * Since there is no way to determine if the authority is AAD or B2C, we exhaust all the possible claims that can serve as tenant ID with the following precedence:
5414
+ * tid - TenantID claim that identifies the tenant that issued the token in AAD. Expected in all AAD ID tokens, not present in B2C ID Tokens.
5415
+ * tfp - Trust Framework Policy claim that identifies the policy that was used to authenticate the user. Functions as tenant for B2C scenarios.
5416
+ * acr - Authentication Context Class Reference claim used only with older B2C policies. Fallback in case tfp is not present, but likely won't be present anyway.
5417
+ */ var _$tenantId = tid || tfp || acr || "";
5418
+ return {
5419
+ tenantId: _$tenantId,
5420
+ localAccountId: oid || sub || "",
5421
+ name: name,
5422
+ isHomeTenant: tenantIdMatchesHomeTenant(_$tenantId, homeAccountId)
5423
+ };
5424
+ } else {
5425
+ return {
5426
+ tenantId: tenantId,
5427
+ localAccountId: localAccountId,
5428
+ isHomeTenant: tenantIdMatchesHomeTenant(tenantId, homeAccountId)
5429
+ };
5430
+ }
5416
5431
  }
5417
5432
  /**
5418
5433
  * Replaces account info that varies by tenant profile sourced from the ID token claims passed in with the tenant-specific account info
@@ -5433,7 +5448,7 @@ function buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims) {
5433
5448
  if (idTokenClaims) {
5434
5449
  // Ignore isHomeTenant, loginHint, and sid which are part of tenant profile but not base account info
5435
5450
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5436
- var _buildTenantProfileFromIdTokenClaims = buildTenantProfileFromIdTokenClaims(baseAccountInfo.homeAccountId, idTokenClaims); _buildTenantProfileFromIdTokenClaims.isHomeTenant; var claimsSourcedTenantProfile = _object_without_properties(_buildTenantProfileFromIdTokenClaims, [
5451
+ var _buildTenantProfile = buildTenantProfile(baseAccountInfo.homeAccountId, baseAccountInfo.localAccountId, baseAccountInfo.tenantId, idTokenClaims); _buildTenantProfile.isHomeTenant; var claimsSourcedTenantProfile = _object_without_properties(_buildTenantProfile, [
5437
5452
  "isHomeTenant"
5438
5453
  ]);
5439
5454
  updatedAccountInfo = _object_spread_props$7(_object_spread$b({}, updatedAccountInfo, claimsSourcedTenantProfile), {
@@ -5631,12 +5646,10 @@ function _create_class$A(Constructor, protoProps, staticProps) {
5631
5646
  if (accountDetails.tenantProfiles) {
5632
5647
  account.tenantProfiles = accountDetails.tenantProfiles;
5633
5648
  } else {
5634
- var tenantProfiles = [];
5635
- if (accountDetails.idTokenClaims) {
5636
- var tenantProfile = buildTenantProfileFromIdTokenClaims(accountDetails.homeAccountId, accountDetails.idTokenClaims);
5637
- tenantProfiles.push(tenantProfile);
5638
- }
5639
- account.tenantProfiles = tenantProfiles;
5649
+ var tenantProfile = buildTenantProfile(accountDetails.homeAccountId, account.localAccountId, account.realm, accountDetails.idTokenClaims);
5650
+ account.tenantProfiles = [
5651
+ tenantProfile
5652
+ ];
5640
5653
  }
5641
5654
  return account;
5642
5655
  }
@@ -5974,7 +5987,7 @@ function _inherits$c(subClass, superClass) {
5974
5987
  });
5975
5988
  if (superClass) _set_prototype_of$c(subClass, superClass);
5976
5989
  }
5977
- function _instanceof$i(left, right) {
5990
+ function _instanceof$h(left, right) {
5978
5991
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
5979
5992
  return !!right[Symbol.hasInstance](left);
5980
5993
  } else {
@@ -6037,7 +6050,7 @@ function _create_super$c(Derived) {
6037
6050
  return _possible_constructor_return$c(this, result);
6038
6051
  };
6039
6052
  }
6040
- function _ts_generator$k(thisArg, body) {
6053
+ function _ts_generator$j(thisArg, body) {
6041
6054
  var f, y, t, g, _ = {
6042
6055
  label: 0,
6043
6056
  sent: function() {
@@ -6203,16 +6216,10 @@ function _ts_generator$k(thisArg, body) {
6203
6216
  value: function buildTenantProfiles(cachedAccounts, accountFilter) {
6204
6217
  var _this = this;
6205
6218
  return cachedAccounts.flatMap(function(accountEntity) {
6206
- return _this.getAccountInfoForTenantProfiles(accountEntity, accountFilter);
6219
+ return _this.getTenantProfilesFromAccountEntity(accountEntity, accountFilter === null || accountFilter === void 0 ? void 0 : accountFilter.tenantId, accountFilter);
6207
6220
  });
6208
6221
  }
6209
6222
  },
6210
- {
6211
- key: "getAccountInfoForTenantProfiles",
6212
- value: function getAccountInfoForTenantProfiles(accountEntity, accountFilter) {
6213
- return this.getTenantProfilesFromAccountEntity(accountEntity, accountFilter === null || accountFilter === void 0 ? void 0 : accountFilter.tenantId, accountFilter);
6214
- }
6215
- },
6216
6223
  {
6217
6224
  key: "getTenantedAccountInfoByFilter",
6218
6225
  value: function getTenantedAccountInfoByFilter(accountInfo, tokenKeys, tenantProfile, tenantProfileFilter) {
@@ -6319,7 +6326,7 @@ function _ts_generator$k(thisArg, body) {
6319
6326
  var _this = this;
6320
6327
  return _async_to_generator$j(function() {
6321
6328
  var e, _this_commonLogger, _this_commonLogger1, _this_commonLogger2, _this_commonLogger3;
6322
- return _ts_generator$k(this, function(_state) {
6329
+ return _ts_generator$j(this, function(_state) {
6323
6330
  switch(_state.label){
6324
6331
  case 0:
6325
6332
  if (!cacheRecord) {
@@ -6364,7 +6371,7 @@ function _ts_generator$k(thisArg, body) {
6364
6371
  case 4:
6365
6372
  e = _state.sent();
6366
6373
  (_this_commonLogger = _this.commonLogger) === null || _this_commonLogger === void 0 ? void 0 : _this_commonLogger.error("CacheManager.saveCacheRecord: failed");
6367
- if (_instanceof$i(e, Error)) {
6374
+ if (_instanceof$h(e, Error)) {
6368
6375
  (_this_commonLogger1 = _this.commonLogger) === null || _this_commonLogger1 === void 0 ? void 0 : _this_commonLogger1.errorPii("CacheManager.saveCacheRecord: ".concat(e.message), correlationId);
6369
6376
  if (e.name === "QuotaExceededError" || e.name === "NS_ERROR_DOM_QUOTA_REACHED" || e.message.includes("exceeded the quota")) {
6370
6377
  (_this_commonLogger2 = _this.commonLogger) === null || _this_commonLogger2 === void 0 ? void 0 : _this_commonLogger2.error("CacheManager.saveCacheRecord: exceeded storage quota", correlationId);
@@ -6394,7 +6401,7 @@ function _ts_generator$k(thisArg, body) {
6394
6401
  var _this = this;
6395
6402
  return _async_to_generator$j(function() {
6396
6403
  var accessTokenFilter, tokenKeys, currentScopes, removedAccessTokens;
6397
- return _ts_generator$k(this, function(_state) {
6404
+ return _ts_generator$j(this, function(_state) {
6398
6405
  switch(_state.label){
6399
6406
  case 0:
6400
6407
  accessTokenFilter = {
@@ -6669,7 +6676,7 @@ function _ts_generator$k(thisArg, body) {
6669
6676
  var _this = this;
6670
6677
  return _async_to_generator$j(function() {
6671
6678
  var allAccountKeys, removedAccounts;
6672
- return _ts_generator$k(this, function(_state) {
6679
+ return _ts_generator$j(this, function(_state) {
6673
6680
  switch(_state.label){
6674
6681
  case 0:
6675
6682
  allAccountKeys = _this.getAccountKeys();
@@ -6700,7 +6707,7 @@ function _ts_generator$k(thisArg, body) {
6700
6707
  var _this = this;
6701
6708
  return _async_to_generator$j(function() {
6702
6709
  var account;
6703
- return _ts_generator$k(this, function(_state) {
6710
+ return _ts_generator$j(this, function(_state) {
6704
6711
  switch(_state.label){
6705
6712
  case 0:
6706
6713
  account = _this.getAccount(accountKey, _this.commonLogger);
@@ -6733,7 +6740,7 @@ function _ts_generator$k(thisArg, body) {
6733
6740
  var _this = this;
6734
6741
  return _async_to_generator$j(function() {
6735
6742
  var allTokenKeys, accountId, removedCredentials;
6736
- return _ts_generator$k(this, function(_state) {
6743
+ return _ts_generator$j(this, function(_state) {
6737
6744
  switch(_state.label){
6738
6745
  case 0:
6739
6746
  allTokenKeys = _this.getTokenKeys();
@@ -6834,7 +6841,7 @@ function _ts_generator$k(thisArg, body) {
6834
6841
  var _this = this;
6835
6842
  return _async_to_generator$j(function() {
6836
6843
  var credential, accessTokenWithAuthSchemeEntity, kid;
6837
- return _ts_generator$k(this, function(_state) {
6844
+ return _ts_generator$j(this, function(_state) {
6838
6845
  switch(_state.label){
6839
6846
  case 0:
6840
6847
  credential = _this.getAccessTokenCredential(key);
@@ -7653,7 +7660,7 @@ function _ts_generator$k(thisArg, body) {
7653
7660
  key: "clear",
7654
7661
  value: function clear() {
7655
7662
  return _async_to_generator$j(function() {
7656
- return _ts_generator$k(this, function(_state) {
7663
+ return _ts_generator$j(this, function(_state) {
7657
7664
  throw createClientAuthError(methodNotImplemented);
7658
7665
  });
7659
7666
  })();
@@ -7732,7 +7739,7 @@ function _object_spread$9(target) {
7732
7739
  }
7733
7740
  return target;
7734
7741
  }
7735
- function _ts_generator$j(thisArg, body) {
7742
+ function _ts_generator$i(thisArg, body) {
7736
7743
  var f, y, t, g, _ = {
7737
7744
  label: 0,
7738
7745
  sent: function() {
@@ -7848,14 +7855,14 @@ var DEFAULT_CACHE_OPTIONS$1 = {
7848
7855
  var DEFAULT_NETWORK_IMPLEMENTATION = {
7849
7856
  sendGetRequestAsync: function sendGetRequestAsync() {
7850
7857
  return _async_to_generator$i(function() {
7851
- return _ts_generator$j(this, function(_state) {
7858
+ return _ts_generator$i(this, function(_state) {
7852
7859
  throw createClientAuthError(methodNotImplemented);
7853
7860
  });
7854
7861
  })();
7855
7862
  },
7856
7863
  sendPostRequestAsync: function sendPostRequestAsync() {
7857
7864
  return _async_to_generator$i(function() {
7858
- return _ts_generator$j(this, function(_state) {
7865
+ return _ts_generator$i(this, function(_state) {
7859
7866
  throw createClientAuthError(methodNotImplemented);
7860
7867
  });
7861
7868
  })();
@@ -8193,14 +8200,14 @@ function _create_class$x(Constructor, protoProps, staticProps) {
8193
8200
  if (staticProps) _defineProperties$x(Constructor, staticProps);
8194
8201
  return Constructor;
8195
8202
  }
8196
- function _instanceof$h(left, right) {
8203
+ function _instanceof$g(left, right) {
8197
8204
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
8198
8205
  return !!right[Symbol.hasInstance](left);
8199
8206
  } else {
8200
8207
  return left instanceof right;
8201
8208
  }
8202
8209
  }
8203
- function _ts_generator$i(thisArg, body) {
8210
+ function _ts_generator$h(thisArg, body) {
8204
8211
  var f, y, t, g, _ = {
8205
8212
  label: 0,
8206
8213
  sent: function() {
@@ -8316,7 +8323,7 @@ function _ts_generator$i(thisArg, body) {
8316
8323
  var _this = this;
8317
8324
  return _async_to_generator$h(function() {
8318
8325
  var response, e;
8319
- return _ts_generator$i(this, function(_state) {
8326
+ return _ts_generator$h(this, function(_state) {
8320
8327
  switch(_state.label){
8321
8328
  case 0:
8322
8329
  ThrottlingUtils.preProcess(_this.cacheManager, thumbprint);
@@ -8340,7 +8347,7 @@ function _ts_generator$i(thisArg, body) {
8340
8347
  ];
8341
8348
  case 3:
8342
8349
  e = _state.sent();
8343
- if (_instanceof$h(e, AuthError)) {
8350
+ if (_instanceof$g(e, AuthError)) {
8344
8351
  throw e;
8345
8352
  } else {
8346
8353
  throw createClientAuthError(networkError);
@@ -9058,7 +9065,7 @@ function _create_class$u(Constructor, protoProps, staticProps) {
9058
9065
  if (staticProps) _defineProperties$u(Constructor, staticProps);
9059
9066
  return Constructor;
9060
9067
  }
9061
- function _ts_generator$h(thisArg, body) {
9068
+ function _ts_generator$g(thisArg, body) {
9062
9069
  var f, y, t, g, _ = {
9063
9070
  label: 0,
9064
9071
  sent: function() {
@@ -9219,7 +9226,7 @@ function _ts_generator$h(thisArg, body) {
9219
9226
  var _this = this;
9220
9227
  return _async_to_generator$g(function() {
9221
9228
  var _response_body_refresh_token, _response_headers, _this_performanceClient, _this_performanceClient1, response;
9222
- return _ts_generator$h(this, function(_state) {
9229
+ return _ts_generator$g(this, function(_state) {
9223
9230
  switch(_state.label){
9224
9231
  case 0:
9225
9232
  if (queuedEvent) {
@@ -9260,7 +9267,7 @@ function _ts_generator$h(thisArg, body) {
9260
9267
  var _this = this;
9261
9268
  return _async_to_generator$g(function() {
9262
9269
  var _this_performanceClient, cloudInstanceAuthorityUri, cloudInstanceAuthority;
9263
- return _ts_generator$h(this, function(_state) {
9270
+ return _ts_generator$g(this, function(_state) {
9264
9271
  switch(_state.label){
9265
9272
  case 0:
9266
9273
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId);
@@ -9641,7 +9648,7 @@ function _object_spread$8(target) {
9641
9648
  }
9642
9649
  return target;
9643
9650
  }
9644
- function _ts_generator$g(thisArg, body) {
9651
+ function _ts_generator$f(thisArg, body) {
9645
9652
  var f, y, t, g, _ = {
9646
9653
  label: 0,
9647
9654
  sent: function() {
@@ -9761,7 +9768,7 @@ function _ts_generator$g(thisArg, body) {
9761
9768
  var _this = this;
9762
9769
  return _async_to_generator$f(function() {
9763
9770
  var _this_performanceClient, reqCnf, reqCnfString;
9764
- return _ts_generator$g(this, function(_state) {
9771
+ return _ts_generator$f(this, function(_state) {
9765
9772
  switch(_state.label){
9766
9773
  case 0:
9767
9774
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.PopTokenGenerateCnf, request.correlationId);
@@ -9794,7 +9801,7 @@ function _ts_generator$g(thisArg, body) {
9794
9801
  var _this = this;
9795
9802
  return _async_to_generator$f(function() {
9796
9803
  var _this_performanceClient, kidThumbprint;
9797
- return _ts_generator$g(this, function(_state) {
9804
+ return _ts_generator$f(this, function(_state) {
9798
9805
  switch(_state.label){
9799
9806
  case 0:
9800
9807
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.PopTokenGenerateKid, request.correlationId);
@@ -9826,7 +9833,7 @@ function _ts_generator$g(thisArg, body) {
9826
9833
  */ function signPopToken(accessToken, keyId, request) {
9827
9834
  var _this = this;
9828
9835
  return _async_to_generator$f(function() {
9829
- return _ts_generator$g(this, function(_state) {
9836
+ return _ts_generator$f(this, function(_state) {
9830
9837
  return [
9831
9838
  2,
9832
9839
  _this.signPayload(accessToken, keyId, request)
@@ -9848,7 +9855,7 @@ function _ts_generator$g(thisArg, body) {
9848
9855
  var _this = this;
9849
9856
  return _async_to_generator$f(function() {
9850
9857
  var resourceRequestMethod, resourceRequestUri, shrClaims, shrNonce, shrOptions, resourceUrlString, resourceUrlComponents;
9851
- return _ts_generator$g(this, function(_state) {
9858
+ return _ts_generator$f(this, function(_state) {
9852
9859
  // Deconstruct request to extract SHR parameters
9853
9860
  resourceRequestMethod = request.resourceRequestMethod, resourceRequestUri = request.resourceRequestUri, shrClaims = request.shrClaims, shrNonce = request.shrNonce, shrOptions = request.shrOptions;
9854
9861
  resourceUrlString = resourceRequestUri ? new UrlString(resourceRequestUri) : undefined;
@@ -9977,7 +9984,7 @@ function _create_class$q(Constructor, protoProps, staticProps) {
9977
9984
  if (staticProps) _defineProperties$q(Constructor, staticProps);
9978
9985
  return Constructor;
9979
9986
  }
9980
- function _ts_generator$f(thisArg, body) {
9987
+ function _ts_generator$e(thisArg, body) {
9981
9988
  var f, y, t, g, _ = {
9982
9989
  label: 0,
9983
9990
  sent: function() {
@@ -10173,7 +10180,7 @@ function _ts_generator$f(thisArg, body) {
10173
10180
  var _this = this;
10174
10181
  return _async_to_generator$e(function() {
10175
10182
  var _this_performanceClient, idTokenClaims, authTime, requestStateObj, cacheRecord, cacheContext, key, account;
10176
- return _ts_generator$f(this, function(_state) {
10183
+ return _ts_generator$e(this, function(_state) {
10177
10184
  switch(_state.label){
10178
10185
  case 0:
10179
10186
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.HandleServerTokenResponse, serverTokenResponse.correlation_id);
@@ -10362,7 +10369,7 @@ function _ts_generator$f(thisArg, body) {
10362
10369
  */ function generateAuthenticationResult(cryptoObj, authority, cacheRecord, fromTokenCache, request, idTokenClaims, requestState, serverTokenResponse, requestId) {
10363
10370
  return _async_to_generator$e(function() {
10364
10371
  var _cacheRecord_idToken, _cacheRecord_idToken1, _cacheRecord_accessToken, _cacheRecord_account, _cacheRecord_account1, accessToken, responseScopes, expiresOn, extExpiresOn, refreshOn, familyId, popTokenGenerator, _cacheRecord_accessToken1, secret, keyId, uid, tid, accountInfo;
10365
- return _ts_generator$f(this, function(_state) {
10372
+ return _ts_generator$e(this, function(_state) {
10366
10373
  switch(_state.label){
10367
10374
  case 0:
10368
10375
  accessToken = Constants$1.EMPTY_STRING;
@@ -10469,10 +10476,11 @@ function buildAccountToCache(cacheStorage, authority, homeAccountId, base64Decod
10469
10476
  nativeAccountId: nativeAccountId
10470
10477
  }, authority, base64Decode);
10471
10478
  var tenantProfiles = baseAccount.tenantProfiles || [];
10472
- if (claimsTenantId && idTokenClaims && !tenantProfiles.find(function(tenantProfile) {
10473
- return tenantProfile.tenantId === claimsTenantId;
10479
+ var tenantId = claimsTenantId || baseAccount.realm;
10480
+ if (tenantId && !tenantProfiles.find(function(tenantProfile) {
10481
+ return tenantProfile.tenantId === tenantId;
10474
10482
  })) {
10475
- var newTenantProfile = buildTenantProfileFromIdTokenClaims(homeAccountId, idTokenClaims);
10483
+ var newTenantProfile = buildTenantProfile(homeAccountId, baseAccount.localAccountId, tenantId, idTokenClaims);
10476
10484
  tenantProfiles.push(newTenantProfile);
10477
10485
  }
10478
10486
  baseAccount.tenantProfiles = tenantProfiles;
@@ -10631,7 +10639,7 @@ function _create_super$9(Derived) {
10631
10639
  return _possible_constructor_return$9(this, result);
10632
10640
  };
10633
10641
  }
10634
- function _ts_generator$e(thisArg, body) {
10642
+ function _ts_generator$d(thisArg, body) {
10635
10643
  var f, y, t, g, _ = {
10636
10644
  label: 0,
10637
10645
  sent: function() {
@@ -10761,7 +10769,7 @@ function _ts_generator$e(thisArg, body) {
10761
10769
  var _this = this;
10762
10770
  return _async_to_generator$d(function() {
10763
10771
  var _this_performanceClient, queryString;
10764
- return _ts_generator$e(this, function(_state) {
10772
+ return _ts_generator$d(this, function(_state) {
10765
10773
  switch(_state.label){
10766
10774
  case 0:
10767
10775
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.GetAuthCodeUrl, request.correlationId);
@@ -10790,7 +10798,7 @@ function _ts_generator$e(thisArg, body) {
10790
10798
  var _this = this;
10791
10799
  return _async_to_generator$d(function() {
10792
10800
  var _this_performanceClient, _response_headers, reqTimestamp, response, requestId, responseHandler;
10793
- return _ts_generator$e(this, function(_state) {
10801
+ return _ts_generator$d(this, function(_state) {
10794
10802
  switch(_state.label){
10795
10803
  case 0:
10796
10804
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientAcquireToken, request.correlationId);
@@ -10862,7 +10870,7 @@ function _ts_generator$e(thisArg, body) {
10862
10870
  var _this = this;
10863
10871
  return _async_to_generator$d(function() {
10864
10872
  var _this_performanceClient, _request_tokenBodyParameters, queryParametersString, endpoint, requestBody, ccsCredential, clientInfo, headers, thumbprint;
10865
- return _ts_generator$e(this, function(_state) {
10873
+ return _ts_generator$d(this, function(_state) {
10866
10874
  switch(_state.label){
10867
10875
  case 0:
10868
10876
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientExecuteTokenRequest, request.correlationId);
@@ -10916,7 +10924,7 @@ function _ts_generator$e(thisArg, body) {
10916
10924
  var _this = this;
10917
10925
  return _async_to_generator$d(function() {
10918
10926
  var _this_performanceClient, _request_tokenBodyParameters, parameterBuilder, clientAssertion, _, popTokenGenerator, reqCnfData, generatedReqCnfData, correlationId, ccsCred, clientInfo, clientInfo1;
10919
- return _ts_generator$e(this, function(_state) {
10927
+ return _ts_generator$d(this, function(_state) {
10920
10928
  switch(_state.label){
10921
10929
  case 0:
10922
10930
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientCreateTokenRequestBody, request.correlationId);
@@ -11069,7 +11077,7 @@ function _ts_generator$e(thisArg, body) {
11069
11077
  var _this = this;
11070
11078
  return _async_to_generator$d(function() {
11071
11079
  var _this_performanceClient, _request_extraQueryParameters, parameterBuilder, requestScopes, correlationId, accountSid, accountLoginHintClaim, clientInfo, clientInfo1, clientInfo2, popTokenGenerator, reqCnfData, generatedReqCnfData;
11072
- return _ts_generator$e(this, function(_state) {
11080
+ return _ts_generator$d(this, function(_state) {
11073
11081
  switch(_state.label){
11074
11082
  case 0:
11075
11083
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.AuthClientCreateQueryString, request.correlationId);
@@ -11350,7 +11358,7 @@ function _inherits$8(subClass, superClass) {
11350
11358
  });
11351
11359
  if (superClass) _set_prototype_of$8(subClass, superClass);
11352
11360
  }
11353
- function _instanceof$g(left, right) {
11361
+ function _instanceof$f(left, right) {
11354
11362
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
11355
11363
  return !!right[Symbol.hasInstance](left);
11356
11364
  } else {
@@ -11437,7 +11445,7 @@ function _create_super$8(Derived) {
11437
11445
  return _possible_constructor_return$8(this, result);
11438
11446
  };
11439
11447
  }
11440
- function _ts_generator$d(thisArg, body) {
11448
+ function _ts_generator$c(thisArg, body) {
11441
11449
  var f, y, t, g, _ = {
11442
11450
  label: 0,
11443
11451
  sent: function() {
@@ -11553,7 +11561,7 @@ function _ts_generator$d(thisArg, body) {
11553
11561
  var _this = this;
11554
11562
  return _async_to_generator$c(function() {
11555
11563
  var _this_performanceClient, _response_headers, reqTimestamp, response, requestId, responseHandler;
11556
- return _ts_generator$d(this, function(_state) {
11564
+ return _ts_generator$c(this, function(_state) {
11557
11565
  switch(_state.label){
11558
11566
  case 0:
11559
11567
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireToken, request.correlationId);
@@ -11586,7 +11594,7 @@ function _ts_generator$d(thisArg, body) {
11586
11594
  var _this = this;
11587
11595
  return _async_to_generator$c(function() {
11588
11596
  var _this_performanceClient, isFOCI, e, noFamilyRTInCache, clientMismatchErrorWithFamilyRT;
11589
- return _ts_generator$d(this, function(_state) {
11597
+ return _ts_generator$c(this, function(_state) {
11590
11598
  switch(_state.label){
11591
11599
  case 0:
11592
11600
  // Cannot renew token if no request object is given.
@@ -11623,8 +11631,8 @@ function _ts_generator$d(thisArg, body) {
11623
11631
  ];
11624
11632
  case 3:
11625
11633
  e = _state.sent();
11626
- noFamilyRTInCache = _instanceof$g(e, InteractionRequiredAuthError) && e.errorCode === noTokensFound;
11627
- clientMismatchErrorWithFamilyRT = _instanceof$g(e, ServerError) && e.errorCode === Errors.INVALID_GRANT_ERROR && e.subError === Errors.CLIENT_MISMATCH_ERROR;
11634
+ noFamilyRTInCache = _instanceof$f(e, InteractionRequiredAuthError) && e.errorCode === noTokensFound;
11635
+ clientMismatchErrorWithFamilyRT = _instanceof$f(e, ServerError) && e.errorCode === Errors.INVALID_GRANT_ERROR && e.subError === Errors.CLIENT_MISMATCH_ERROR;
11628
11636
  // if family Refresh Token (FRT) cache acquisition fails or if client_mismatch error is seen with FRT, reattempt with application Refresh Token (ART)
11629
11637
  if (noFamilyRTInCache || clientMismatchErrorWithFamilyRT) {
11630
11638
  return [
@@ -11655,7 +11663,7 @@ function _ts_generator$d(thisArg, body) {
11655
11663
  var _this = this;
11656
11664
  return _async_to_generator$c(function() {
11657
11665
  var _this_performanceClient, refreshToken, refreshTokenRequest, e, badRefreshTokenKey;
11658
- return _ts_generator$d(this, function(_state) {
11666
+ return _ts_generator$c(this, function(_state) {
11659
11667
  switch(_state.label){
11660
11668
  case 0:
11661
11669
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientAcquireTokenWithCachedRefreshToken, request.correlationId);
@@ -11695,7 +11703,7 @@ function _ts_generator$d(thisArg, body) {
11695
11703
  ];
11696
11704
  case 3:
11697
11705
  e = _state.sent();
11698
- if (_instanceof$g(e, InteractionRequiredAuthError) && e.subError === badToken) {
11706
+ if (_instanceof$f(e, InteractionRequiredAuthError) && e.subError === badToken) {
11699
11707
  // Remove bad refresh token from cache
11700
11708
  _this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");
11701
11709
  badRefreshTokenKey = generateCredentialKey(refreshToken);
@@ -11721,7 +11729,7 @@ function _ts_generator$d(thisArg, body) {
11721
11729
  var _this = this;
11722
11730
  return _async_to_generator$c(function() {
11723
11731
  var _this_performanceClient, _request_tokenBodyParameters, queryParametersString, endpoint, requestBody, headers, thumbprint;
11724
- return _ts_generator$d(this, function(_state) {
11732
+ return _ts_generator$c(this, function(_state) {
11725
11733
  switch(_state.label){
11726
11734
  case 0:
11727
11735
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientExecuteTokenRequest, request.correlationId);
@@ -11763,7 +11771,7 @@ function _ts_generator$d(thisArg, body) {
11763
11771
  var _this = this;
11764
11772
  return _async_to_generator$c(function() {
11765
11773
  var _this_performanceClient, _request_tokenBodyParameters, _this_config_authOptions_authority_options_OIDCOptions, correlationId, parameterBuilder, clientAssertion, _, popTokenGenerator, reqCnfData, generatedReqCnfData, clientInfo;
11766
- return _ts_generator$d(this, function(_state) {
11774
+ return _ts_generator$c(this, function(_state) {
11767
11775
  switch(_state.label){
11768
11776
  case 0:
11769
11777
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.RefreshTokenClientCreateTokenRequestBody, request.correlationId);
@@ -11975,7 +11983,7 @@ function _inherits$7(subClass, superClass) {
11975
11983
  });
11976
11984
  if (superClass) _set_prototype_of$7(subClass, superClass);
11977
11985
  }
11978
- function _instanceof$f(left, right) {
11986
+ function _instanceof$e(left, right) {
11979
11987
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
11980
11988
  return !!right[Symbol.hasInstance](left);
11981
11989
  } else {
@@ -12109,7 +12117,7 @@ function _create_super$7(Derived) {
12109
12117
  return _possible_constructor_return$7(this, result);
12110
12118
  };
12111
12119
  }
12112
- function _ts_generator$c(thisArg, body) {
12120
+ function _ts_generator$b(thisArg, body) {
12113
12121
  var f, y, t, g, _ = {
12114
12122
  label: 0,
12115
12123
  sent: function() {
@@ -12225,7 +12233,7 @@ function _ts_generator$c(thisArg, body) {
12225
12233
  var _this = this;
12226
12234
  return _async_to_generator$b(function() {
12227
12235
  var _request_scopes, _ref, authResponse, cacheOutcome, refreshTokenClient, e, refreshTokenClient1;
12228
- return _ts_generator$c(this, function(_state) {
12236
+ return _ts_generator$b(this, function(_state) {
12229
12237
  switch(_state.label){
12230
12238
  case 0:
12231
12239
  _state.trys.push([
@@ -12261,7 +12269,7 @@ function _ts_generator$c(thisArg, body) {
12261
12269
  ];
12262
12270
  case 2:
12263
12271
  e = _state.sent();
12264
- if (_instanceof$f(e, ClientAuthError) && e.errorCode === tokenRefreshRequired) {
12272
+ if (_instanceof$e(e, ClientAuthError) && e.errorCode === tokenRefreshRequired) {
12265
12273
  refreshTokenClient1 = new RefreshTokenClient(_this.config, _this.performanceClient);
12266
12274
  return [
12267
12275
  2,
@@ -12288,7 +12296,7 @@ function _ts_generator$c(thisArg, body) {
12288
12296
  var _this = this;
12289
12297
  return _async_to_generator$b(function() {
12290
12298
  var _this_performanceClient, lastCacheOutcome, requestTenantId, tokenKeys, cachedAccessToken, environment, cacheRecord;
12291
- return _ts_generator$c(this, function(_state) {
12299
+ return _ts_generator$b(this, function(_state) {
12292
12300
  switch(_state.label){
12293
12301
  case 0:
12294
12302
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.SilentFlowClientAcquireCachedToken, request.correlationId);
@@ -12369,7 +12377,7 @@ function _ts_generator$c(thisArg, body) {
12369
12377
  var _this = this;
12370
12378
  return _async_to_generator$b(function() {
12371
12379
  var _this_performanceClient, idTokenClaims, authTime;
12372
- return _ts_generator$c(this, function(_state) {
12380
+ return _ts_generator$b(this, function(_state) {
12373
12381
  (_this_performanceClient = _this.performanceClient) === null || _this_performanceClient === void 0 ? void 0 : _this_performanceClient.addQueueMeasurement(PerformanceEvents.SilentFlowClientGenerateResultFromCacheRecord, request.correlationId);
12374
12382
  if (cacheRecord.idToken) {
12375
12383
  idTokenClaims = extractTokenClaims(cacheRecord.idToken.secret, _this.config.cryptoInterface.base64Decode);
@@ -12413,7 +12421,7 @@ function _create_class$m(Constructor, protoProps, staticProps) {
12413
12421
  if (staticProps) _defineProperties$m(Constructor, staticProps);
12414
12422
  return Constructor;
12415
12423
  }
12416
- function _instanceof$e(left, right) {
12424
+ function _instanceof$d(left, right) {
12417
12425
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
12418
12426
  return !!right[Symbol.hasInstance](left);
12419
12427
  } else {
@@ -12496,8 +12504,8 @@ function _instanceof$e(left, right) {
12496
12504
  lastRequests.errors.shift();
12497
12505
  }
12498
12506
  lastRequests.failedRequests.push(this.apiId, this.correlationId);
12499
- if (_instanceof$e(error, Error) && !!error && error.toString()) {
12500
- if (_instanceof$e(error, AuthError)) {
12507
+ if (_instanceof$d(error, Error) && !!error && error.toString()) {
12508
+ if (_instanceof$d(error, AuthError)) {
12501
12509
  if (error.subError) {
12502
12510
  lastRequests.errors.push(error.subError);
12503
12511
  } else if (error.errorCode) {
@@ -12899,6 +12907,8 @@ var ProxyStatus = {
12899
12907
  */ var JwtConstants = {
12900
12908
  ALGORITHM: "alg",
12901
12909
  RSA_256: "RS256",
12910
+ PSS_256: "PS256",
12911
+ X5T_256: "x5t#S256",
12902
12912
  X5T: "x5t",
12903
12913
  X5C: "x5c",
12904
12914
  AUDIENCE: "aud",
@@ -13108,7 +13118,7 @@ function _unsupported_iterable_to_array$6(o, minLen) {
13108
13118
  if (n === "Map" || n === "Set") return Array.from(n);
13109
13119
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
13110
13120
  }
13111
- function _ts_generator$b(thisArg, body) {
13121
+ function _ts_generator$a(thisArg, body) {
13112
13122
  var f, y, t, g, _ = {
13113
13123
  label: 0,
13114
13124
  sent: function() {
@@ -13224,7 +13234,7 @@ function _ts_generator$b(thisArg, body) {
13224
13234
  */ function sendGetRequestAsync(url, options, timeout) {
13225
13235
  var _this = this;
13226
13236
  return _async_to_generator$a(function() {
13227
- return _ts_generator$b(this, function(_state) {
13237
+ return _ts_generator$a(this, function(_state) {
13228
13238
  if (_this.proxyUrl) {
13229
13239
  return [
13230
13240
  2,
@@ -13249,7 +13259,7 @@ function _ts_generator$b(thisArg, body) {
13249
13259
  */ function sendPostRequestAsync(url, options) {
13250
13260
  var _this = this;
13251
13261
  return _async_to_generator$a(function() {
13252
- return _ts_generator$b(this, function(_state) {
13262
+ return _ts_generator$a(this, function(_state) {
13253
13263
  if (_this.proxyUrl) {
13254
13264
  return [
13255
13265
  2,
@@ -13621,78 +13631,282 @@ function createManagedIdentityError(errorCode) {
13621
13631
  return new ManagedIdentityError(errorCode);
13622
13632
  }
13623
13633
 
13624
- function _define_property$5(obj, key, value) {
13625
- if (key in obj) {
13626
- Object.defineProperty(obj, key, {
13627
- value: value,
13628
- enumerable: true,
13629
- configurable: true,
13630
- writable: true
13631
- });
13632
- } else {
13633
- obj[key] = value;
13634
+ function _assert_this_initialized$5(self) {
13635
+ if (self === void 0) {
13636
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
13634
13637
  }
13635
- return obj;
13638
+ return self;
13636
13639
  }
13637
- function _object_spread$4(target) {
13638
- for(var i = 1; i < arguments.length; i++){
13639
- var source = arguments[i] != null ? arguments[i] : {};
13640
- var ownKeys = Object.keys(source);
13641
- if (typeof Object.getOwnPropertySymbols === "function") {
13642
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
13643
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
13644
- }));
13645
- }
13646
- ownKeys.forEach(function(key) {
13647
- _define_property$5(target, key, source[key]);
13648
- });
13640
+ function _class_call_check$i(instance, Constructor) {
13641
+ if (!(instance instanceof Constructor)) {
13642
+ throw new TypeError("Cannot call a class as a function");
13649
13643
  }
13650
- return target;
13651
13644
  }
13652
- function ownKeys$3(object, enumerableOnly) {
13653
- var keys = Object.keys(object);
13654
- if (Object.getOwnPropertySymbols) {
13655
- var symbols = Object.getOwnPropertySymbols(object);
13656
- if (enumerableOnly) {
13657
- symbols = symbols.filter(function(sym) {
13658
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
13659
- });
13645
+ function _defineProperties$i(target, props) {
13646
+ for(var i = 0; i < props.length; i++){
13647
+ var descriptor = props[i];
13648
+ descriptor.enumerable = descriptor.enumerable || false;
13649
+ descriptor.configurable = true;
13650
+ if ("value" in descriptor) descriptor.writable = true;
13651
+ Object.defineProperty(target, descriptor.key, descriptor);
13652
+ }
13653
+ }
13654
+ function _create_class$i(Constructor, protoProps, staticProps) {
13655
+ if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
13656
+ if (staticProps) _defineProperties$i(Constructor, staticProps);
13657
+ return Constructor;
13658
+ }
13659
+ function _get_prototype_of$5(o) {
13660
+ _get_prototype_of$5 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
13661
+ return o.__proto__ || Object.getPrototypeOf(o);
13662
+ };
13663
+ return _get_prototype_of$5(o);
13664
+ }
13665
+ function _inherits$5(subClass, superClass) {
13666
+ if (typeof superClass !== "function" && superClass !== null) {
13667
+ throw new TypeError("Super expression must either be null or a function");
13668
+ }
13669
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
13670
+ constructor: {
13671
+ value: subClass,
13672
+ writable: true,
13673
+ configurable: true
13660
13674
  }
13661
- keys.push.apply(keys, symbols);
13675
+ });
13676
+ if (superClass) _set_prototype_of$5(subClass, superClass);
13677
+ }
13678
+ function _possible_constructor_return$5(self, call) {
13679
+ if (call && (_type_of$d(call) === "object" || typeof call === "function")) {
13680
+ return call;
13662
13681
  }
13663
- return keys;
13682
+ return _assert_this_initialized$5(self);
13664
13683
  }
13665
- function _object_spread_props$3(target, source) {
13666
- source = source != null ? source : {};
13667
- if (Object.getOwnPropertyDescriptors) {
13668
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
13669
- } else {
13670
- ownKeys$3(Object(source)).forEach(function(key) {
13671
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
13672
- });
13684
+ function _set_prototype_of$5(o, p) {
13685
+ _set_prototype_of$5 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
13686
+ o.__proto__ = p;
13687
+ return o;
13688
+ };
13689
+ return _set_prototype_of$5(o, p);
13690
+ }
13691
+ function _type_of$d(obj) {
13692
+ "@swc/helpers - typeof";
13693
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
13694
+ }
13695
+ function _is_native_reflect_construct$5() {
13696
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
13697
+ if (Reflect.construct.sham) return false;
13698
+ if (typeof Proxy === "function") return true;
13699
+ try {
13700
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
13701
+ return true;
13702
+ } catch (e) {
13703
+ return false;
13673
13704
  }
13674
- return target;
13705
+ }
13706
+ function _create_super$5(Derived) {
13707
+ var hasNativeReflectConstruct = _is_native_reflect_construct$5();
13708
+ return function _createSuperInternal() {
13709
+ var Super = _get_prototype_of$5(Derived), result;
13710
+ if (hasNativeReflectConstruct) {
13711
+ var NewTarget = _get_prototype_of$5(this).constructor;
13712
+ result = Reflect.construct(Super, arguments, NewTarget);
13713
+ } else {
13714
+ result = Super.apply(this, arguments);
13715
+ }
13716
+ return _possible_constructor_return$5(this, result);
13717
+ };
13675
13718
  }
13676
13719
  /*
13677
13720
  * Copyright (c) Microsoft Corporation. All rights reserved.
13678
13721
  * Licensed under the MIT License.
13679
- */ var DEFAULT_AUTH_OPTIONS = {
13680
- clientId: Constants$1.EMPTY_STRING,
13681
- authority: Constants$1.DEFAULT_AUTHORITY,
13682
- clientSecret: Constants$1.EMPTY_STRING,
13683
- clientAssertion: Constants$1.EMPTY_STRING,
13684
- clientCertificate: {
13685
- thumbprint: Constants$1.EMPTY_STRING,
13686
- privateKey: Constants$1.EMPTY_STRING,
13687
- x5c: Constants$1.EMPTY_STRING
13722
+ */ /**
13723
+ * NodeAuthErrorMessage class containing string constants used by error codes and messages.
13724
+ */ var NodeAuthErrorMessage = {
13725
+ invalidLoopbackAddressType: {
13726
+ code: "invalid_loopback_server_address_type",
13727
+ desc: "Loopback server address is not type string. This is unexpected."
13688
13728
  },
13689
- knownAuthorities: [],
13690
- cloudDiscoveryMetadata: Constants$1.EMPTY_STRING,
13691
- authorityMetadata: Constants$1.EMPTY_STRING,
13692
- clientCapabilities: [],
13693
- protocolMode: ProtocolMode.AAD,
13694
- azureCloudOptions: {
13695
- azureCloudInstance: AzureCloudInstance.None,
13729
+ unableToLoadRedirectUri: {
13730
+ code: "unable_to_load_redirectUrl",
13731
+ desc: "Loopback server callback was invoked without a url. This is unexpected."
13732
+ },
13733
+ noAuthCodeInResponse: {
13734
+ code: "no_auth_code_in_response",
13735
+ desc: "No auth code found in the server response. Please check your network trace to determine what happened."
13736
+ },
13737
+ noLoopbackServerExists: {
13738
+ code: "no_loopback_server_exists",
13739
+ desc: "No loopback server exists yet."
13740
+ },
13741
+ loopbackServerAlreadyExists: {
13742
+ code: "loopback_server_already_exists",
13743
+ desc: "Loopback server already exists. Cannot create another."
13744
+ },
13745
+ loopbackServerTimeout: {
13746
+ code: "loopback_server_timeout",
13747
+ desc: "Timed out waiting for auth code listener to be registered."
13748
+ },
13749
+ stateNotFoundError: {
13750
+ code: "state_not_found",
13751
+ desc: "State not found. Please verify that the request originated from msal."
13752
+ },
13753
+ thumbprintMissing: {
13754
+ code: "thumbprint_missing_from_client_certificate",
13755
+ desc: "Client certificate does not contain a SHA-1 or SHA-256 thumbprint."
13756
+ }
13757
+ };
13758
+ var NodeAuthError = /*#__PURE__*/ function(AuthError) {
13759
+ _inherits$5(NodeAuthError, AuthError);
13760
+ var _super = _create_super$5(NodeAuthError);
13761
+ function NodeAuthError(errorCode, errorMessage) {
13762
+ _class_call_check$i(this, NodeAuthError);
13763
+ var _this;
13764
+ _this = _super.call(this, errorCode, errorMessage);
13765
+ _this.name = "NodeAuthError";
13766
+ return _this;
13767
+ }
13768
+ _create_class$i(NodeAuthError, null, [
13769
+ {
13770
+ key: "createInvalidLoopbackAddressTypeError",
13771
+ value: /**
13772
+ * Creates an error thrown if loopback server address is of type string.
13773
+ */ function createInvalidLoopbackAddressTypeError() {
13774
+ return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, "".concat(NodeAuthErrorMessage.invalidLoopbackAddressType.desc));
13775
+ }
13776
+ },
13777
+ {
13778
+ key: "createUnableToLoadRedirectUrlError",
13779
+ value: /**
13780
+ * Creates an error thrown if the loopback server is unable to get a url.
13781
+ */ function createUnableToLoadRedirectUrlError() {
13782
+ return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, "".concat(NodeAuthErrorMessage.unableToLoadRedirectUri.desc));
13783
+ }
13784
+ },
13785
+ {
13786
+ key: "createNoAuthCodeInResponseError",
13787
+ value: /**
13788
+ * Creates an error thrown if the server response does not contain an auth code.
13789
+ */ function createNoAuthCodeInResponseError() {
13790
+ return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, "".concat(NodeAuthErrorMessage.noAuthCodeInResponse.desc));
13791
+ }
13792
+ },
13793
+ {
13794
+ key: "createNoLoopbackServerExistsError",
13795
+ value: /**
13796
+ * Creates an error thrown if the loopback server has not been spun up yet.
13797
+ */ function createNoLoopbackServerExistsError() {
13798
+ return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, "".concat(NodeAuthErrorMessage.noLoopbackServerExists.desc));
13799
+ }
13800
+ },
13801
+ {
13802
+ key: "createLoopbackServerAlreadyExistsError",
13803
+ value: /**
13804
+ * Creates an error thrown if a loopback server already exists when attempting to create another one.
13805
+ */ function createLoopbackServerAlreadyExistsError() {
13806
+ return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, "".concat(NodeAuthErrorMessage.loopbackServerAlreadyExists.desc));
13807
+ }
13808
+ },
13809
+ {
13810
+ key: "createLoopbackServerTimeoutError",
13811
+ value: /**
13812
+ * Creates an error thrown if the loopback server times out registering the auth code listener.
13813
+ */ function createLoopbackServerTimeoutError() {
13814
+ return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, "".concat(NodeAuthErrorMessage.loopbackServerTimeout.desc));
13815
+ }
13816
+ },
13817
+ {
13818
+ key: "createStateNotFoundError",
13819
+ value: /**
13820
+ * Creates an error thrown when the state is not present.
13821
+ */ function createStateNotFoundError() {
13822
+ return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
13823
+ }
13824
+ },
13825
+ {
13826
+ key: "createThumbprintMissingError",
13827
+ value: /**
13828
+ * Creates an error thrown when client certificate was provided, but neither the SHA-1 or SHA-256 thumbprints were provided
13829
+ */ function createThumbprintMissingError() {
13830
+ return new NodeAuthError(NodeAuthErrorMessage.thumbprintMissing.code, NodeAuthErrorMessage.thumbprintMissing.desc);
13831
+ }
13832
+ }
13833
+ ]);
13834
+ return NodeAuthError;
13835
+ }(AuthError);
13836
+
13837
+ function _define_property$5(obj, key, value) {
13838
+ if (key in obj) {
13839
+ Object.defineProperty(obj, key, {
13840
+ value: value,
13841
+ enumerable: true,
13842
+ configurable: true,
13843
+ writable: true
13844
+ });
13845
+ } else {
13846
+ obj[key] = value;
13847
+ }
13848
+ return obj;
13849
+ }
13850
+ function _object_spread$4(target) {
13851
+ for(var i = 1; i < arguments.length; i++){
13852
+ var source = arguments[i] != null ? arguments[i] : {};
13853
+ var ownKeys = Object.keys(source);
13854
+ if (typeof Object.getOwnPropertySymbols === "function") {
13855
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
13856
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
13857
+ }));
13858
+ }
13859
+ ownKeys.forEach(function(key) {
13860
+ _define_property$5(target, key, source[key]);
13861
+ });
13862
+ }
13863
+ return target;
13864
+ }
13865
+ function ownKeys$3(object, enumerableOnly) {
13866
+ var keys = Object.keys(object);
13867
+ if (Object.getOwnPropertySymbols) {
13868
+ var symbols = Object.getOwnPropertySymbols(object);
13869
+ if (enumerableOnly) {
13870
+ symbols = symbols.filter(function(sym) {
13871
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
13872
+ });
13873
+ }
13874
+ keys.push.apply(keys, symbols);
13875
+ }
13876
+ return keys;
13877
+ }
13878
+ function _object_spread_props$3(target, source) {
13879
+ source = source != null ? source : {};
13880
+ if (Object.getOwnPropertyDescriptors) {
13881
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
13882
+ } else {
13883
+ ownKeys$3(Object(source)).forEach(function(key) {
13884
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
13885
+ });
13886
+ }
13887
+ return target;
13888
+ }
13889
+ /*
13890
+ * Copyright (c) Microsoft Corporation. All rights reserved.
13891
+ * Licensed under the MIT License.
13892
+ */ var DEFAULT_AUTH_OPTIONS = {
13893
+ clientId: Constants$1.EMPTY_STRING,
13894
+ authority: Constants$1.DEFAULT_AUTHORITY,
13895
+ clientSecret: Constants$1.EMPTY_STRING,
13896
+ clientAssertion: Constants$1.EMPTY_STRING,
13897
+ clientCertificate: {
13898
+ thumbprint: Constants$1.EMPTY_STRING,
13899
+ thumbprintSha256: Constants$1.EMPTY_STRING,
13900
+ privateKey: Constants$1.EMPTY_STRING,
13901
+ x5c: Constants$1.EMPTY_STRING
13902
+ },
13903
+ knownAuthorities: [],
13904
+ cloudDiscoveryMetadata: Constants$1.EMPTY_STRING,
13905
+ authorityMetadata: Constants$1.EMPTY_STRING,
13906
+ clientCapabilities: [],
13907
+ protocolMode: ProtocolMode.AAD,
13908
+ azureCloudOptions: {
13909
+ azureCloudInstance: AzureCloudInstance.None,
13696
13910
  tenant: Constants$1.EMPTY_STRING
13697
13911
  },
13698
13912
  skipAuthorityMetadataCache: false
@@ -13737,6 +13951,10 @@ var DEFAULT_TELEMETRY_OPTIONS = {
13737
13951
  loggerOptions: (system === null || system === void 0 ? void 0 : system.loggerOptions) || DEFAULT_LOGGER_OPTIONS,
13738
13952
  disableInternalRetries: (system === null || system === void 0 ? void 0 : system.disableInternalRetries) || false
13739
13953
  });
13954
+ // if client certificate was provided, ensure that at least one of the SHA-1 or SHA-256 thumbprints were provided
13955
+ if (!!auth.clientCertificate && !!!auth.clientCertificate.thumbprint && !!!auth.clientCertificate.thumbprintSha256) {
13956
+ throw NodeAuthError.createStateNotFoundError();
13957
+ }
13740
13958
  return {
13741
13959
  auth: _object_spread$4({}, DEFAULT_AUTH_OPTIONS, auth),
13742
13960
  broker: _object_spread$4({}, broker),
@@ -13807,12 +14025,12 @@ function v4(options, buf, offset) {
13807
14025
  return stringify(rnds);
13808
14026
  }
13809
14027
 
13810
- function _class_call_check$i(instance, Constructor) {
14028
+ function _class_call_check$h(instance, Constructor) {
13811
14029
  if (!(instance instanceof Constructor)) {
13812
14030
  throw new TypeError("Cannot call a class as a function");
13813
14031
  }
13814
14032
  }
13815
- function _defineProperties$i(target, props) {
14033
+ function _defineProperties$h(target, props) {
13816
14034
  for(var i = 0; i < props.length; i++){
13817
14035
  var descriptor = props[i];
13818
14036
  descriptor.enumerable = descriptor.enumerable || false;
@@ -13821,9 +14039,9 @@ function _defineProperties$i(target, props) {
13821
14039
  Object.defineProperty(target, descriptor.key, descriptor);
13822
14040
  }
13823
14041
  }
13824
- function _create_class$i(Constructor, protoProps, staticProps) {
13825
- if (protoProps) _defineProperties$i(Constructor.prototype, protoProps);
13826
- if (staticProps) _defineProperties$i(Constructor, staticProps);
14042
+ function _create_class$h(Constructor, protoProps, staticProps) {
14043
+ if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
14044
+ if (staticProps) _defineProperties$h(Constructor, staticProps);
13827
14045
  return Constructor;
13828
14046
  }
13829
14047
  /*
@@ -13831,9 +14049,9 @@ function _create_class$i(Constructor, protoProps, staticProps) {
13831
14049
  * Licensed under the MIT License.
13832
14050
  */ var GuidGenerator = /*#__PURE__*/ function() {
13833
14051
  function GuidGenerator() {
13834
- _class_call_check$i(this, GuidGenerator);
14052
+ _class_call_check$h(this, GuidGenerator);
13835
14053
  }
13836
- _create_class$i(GuidGenerator, [
14054
+ _create_class$h(GuidGenerator, [
13837
14055
  {
13838
14056
  /**
13839
14057
  *
@@ -13858,12 +14076,12 @@ function _create_class$i(Constructor, protoProps, staticProps) {
13858
14076
  return GuidGenerator;
13859
14077
  }();
13860
14078
 
13861
- function _class_call_check$h(instance, Constructor) {
14079
+ function _class_call_check$g(instance, Constructor) {
13862
14080
  if (!(instance instanceof Constructor)) {
13863
14081
  throw new TypeError("Cannot call a class as a function");
13864
14082
  }
13865
14083
  }
13866
- function _defineProperties$h(target, props) {
14084
+ function _defineProperties$g(target, props) {
13867
14085
  for(var i = 0; i < props.length; i++){
13868
14086
  var descriptor = props[i];
13869
14087
  descriptor.enumerable = descriptor.enumerable || false;
@@ -13872,9 +14090,9 @@ function _defineProperties$h(target, props) {
13872
14090
  Object.defineProperty(target, descriptor.key, descriptor);
13873
14091
  }
13874
14092
  }
13875
- function _create_class$h(Constructor, protoProps, staticProps) {
13876
- if (protoProps) _defineProperties$h(Constructor.prototype, protoProps);
13877
- if (staticProps) _defineProperties$h(Constructor, staticProps);
14093
+ function _create_class$g(Constructor, protoProps, staticProps) {
14094
+ if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
14095
+ if (staticProps) _defineProperties$g(Constructor, staticProps);
13878
14096
  return Constructor;
13879
14097
  }
13880
14098
  /*
@@ -13882,9 +14100,9 @@ function _create_class$h(Constructor, protoProps, staticProps) {
13882
14100
  * Licensed under the MIT License.
13883
14101
  */ var EncodingUtils = /*#__PURE__*/ function() {
13884
14102
  function EncodingUtils() {
13885
- _class_call_check$h(this, EncodingUtils);
14103
+ _class_call_check$g(this, EncodingUtils);
13886
14104
  }
13887
- _create_class$h(EncodingUtils, null, [
14105
+ _create_class$g(EncodingUtils, null, [
13888
14106
  {
13889
14107
  key: "base64Encode",
13890
14108
  value: /**
@@ -13932,12 +14150,12 @@ function _create_class$h(Constructor, protoProps, staticProps) {
13932
14150
  return EncodingUtils;
13933
14151
  }();
13934
14152
 
13935
- function _class_call_check$g(instance, Constructor) {
14153
+ function _class_call_check$f(instance, Constructor) {
13936
14154
  if (!(instance instanceof Constructor)) {
13937
14155
  throw new TypeError("Cannot call a class as a function");
13938
14156
  }
13939
14157
  }
13940
- function _defineProperties$g(target, props) {
14158
+ function _defineProperties$f(target, props) {
13941
14159
  for(var i = 0; i < props.length; i++){
13942
14160
  var descriptor = props[i];
13943
14161
  descriptor.enumerable = descriptor.enumerable || false;
@@ -13946,9 +14164,9 @@ function _defineProperties$g(target, props) {
13946
14164
  Object.defineProperty(target, descriptor.key, descriptor);
13947
14165
  }
13948
14166
  }
13949
- function _create_class$g(Constructor, protoProps, staticProps) {
13950
- if (protoProps) _defineProperties$g(Constructor.prototype, protoProps);
13951
- if (staticProps) _defineProperties$g(Constructor, staticProps);
14167
+ function _create_class$f(Constructor, protoProps, staticProps) {
14168
+ if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
14169
+ if (staticProps) _defineProperties$f(Constructor, staticProps);
13952
14170
  return Constructor;
13953
14171
  }
13954
14172
  /*
@@ -13956,9 +14174,9 @@ function _create_class$g(Constructor, protoProps, staticProps) {
13956
14174
  * Licensed under the MIT License.
13957
14175
  */ var HashUtils = /*#__PURE__*/ function() {
13958
14176
  function HashUtils() {
13959
- _class_call_check$g(this, HashUtils);
14177
+ _class_call_check$f(this, HashUtils);
13960
14178
  }
13961
- _create_class$g(HashUtils, [
14179
+ _create_class$f(HashUtils, [
13962
14180
  {
13963
14181
  /**
13964
14182
  * generate 'SHA256' hash
@@ -14001,12 +14219,12 @@ function _async_to_generator$9(fn) {
14001
14219
  });
14002
14220
  };
14003
14221
  }
14004
- function _class_call_check$f(instance, Constructor) {
14222
+ function _class_call_check$e(instance, Constructor) {
14005
14223
  if (!(instance instanceof Constructor)) {
14006
14224
  throw new TypeError("Cannot call a class as a function");
14007
14225
  }
14008
14226
  }
14009
- function _defineProperties$f(target, props) {
14227
+ function _defineProperties$e(target, props) {
14010
14228
  for(var i = 0; i < props.length; i++){
14011
14229
  var descriptor = props[i];
14012
14230
  descriptor.enumerable = descriptor.enumerable || false;
@@ -14015,12 +14233,12 @@ function _defineProperties$f(target, props) {
14015
14233
  Object.defineProperty(target, descriptor.key, descriptor);
14016
14234
  }
14017
14235
  }
14018
- function _create_class$f(Constructor, protoProps, staticProps) {
14019
- if (protoProps) _defineProperties$f(Constructor.prototype, protoProps);
14020
- if (staticProps) _defineProperties$f(Constructor, staticProps);
14236
+ function _create_class$e(Constructor, protoProps, staticProps) {
14237
+ if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
14238
+ if (staticProps) _defineProperties$e(Constructor, staticProps);
14021
14239
  return Constructor;
14022
14240
  }
14023
- function _ts_generator$a(thisArg, body) {
14241
+ function _ts_generator$9(thisArg, body) {
14024
14242
  var f, y, t, g, _ = {
14025
14243
  label: 0,
14026
14244
  sent: function() {
@@ -14122,10 +14340,10 @@ function _ts_generator$a(thisArg, body) {
14122
14340
  * https://tools.ietf.org/html/rfc7636#page-8
14123
14341
  */ var PkceGenerator = /*#__PURE__*/ function() {
14124
14342
  function PkceGenerator() {
14125
- _class_call_check$f(this, PkceGenerator);
14343
+ _class_call_check$e(this, PkceGenerator);
14126
14344
  this.hashUtils = new HashUtils();
14127
14345
  }
14128
- _create_class$f(PkceGenerator, [
14346
+ _create_class$e(PkceGenerator, [
14129
14347
  {
14130
14348
  key: "generatePkceCodes",
14131
14349
  value: /**
@@ -14135,7 +14353,7 @@ function _ts_generator$a(thisArg, body) {
14135
14353
  var _this = this;
14136
14354
  return _async_to_generator$9(function() {
14137
14355
  var verifier, challenge;
14138
- return _ts_generator$a(this, function(_state) {
14356
+ return _ts_generator$9(this, function(_state) {
14139
14357
  verifier = _this.generateCodeVerifier();
14140
14358
  challenge = _this.generateCodeChallengeFromVerifier(verifier);
14141
14359
  return [
@@ -14210,12 +14428,12 @@ function _async_to_generator$8(fn) {
14210
14428
  });
14211
14429
  };
14212
14430
  }
14213
- function _class_call_check$e(instance, Constructor) {
14431
+ function _class_call_check$d(instance, Constructor) {
14214
14432
  if (!(instance instanceof Constructor)) {
14215
14433
  throw new TypeError("Cannot call a class as a function");
14216
14434
  }
14217
14435
  }
14218
- function _defineProperties$e(target, props) {
14436
+ function _defineProperties$d(target, props) {
14219
14437
  for(var i = 0; i < props.length; i++){
14220
14438
  var descriptor = props[i];
14221
14439
  descriptor.enumerable = descriptor.enumerable || false;
@@ -14224,12 +14442,12 @@ function _defineProperties$e(target, props) {
14224
14442
  Object.defineProperty(target, descriptor.key, descriptor);
14225
14443
  }
14226
14444
  }
14227
- function _create_class$e(Constructor, protoProps, staticProps) {
14228
- if (protoProps) _defineProperties$e(Constructor.prototype, protoProps);
14229
- if (staticProps) _defineProperties$e(Constructor, staticProps);
14445
+ function _create_class$d(Constructor, protoProps, staticProps) {
14446
+ if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
14447
+ if (staticProps) _defineProperties$d(Constructor, staticProps);
14230
14448
  return Constructor;
14231
14449
  }
14232
- function _ts_generator$9(thisArg, body) {
14450
+ function _ts_generator$8(thisArg, body) {
14233
14451
  var f, y, t, g, _ = {
14234
14452
  label: 0,
14235
14453
  sent: function() {
@@ -14333,13 +14551,13 @@ function _ts_generator$9(thisArg, body) {
14333
14551
  * @public
14334
14552
  */ var CryptoProvider = /*#__PURE__*/ function() {
14335
14553
  function CryptoProvider() {
14336
- _class_call_check$e(this, CryptoProvider);
14554
+ _class_call_check$d(this, CryptoProvider);
14337
14555
  // Browser crypto needs to be validated first before any other classes can be set.
14338
14556
  this.pkceGenerator = new PkceGenerator();
14339
14557
  this.guidGenerator = new GuidGenerator();
14340
14558
  this.hashUtils = new HashUtils();
14341
14559
  }
14342
- _create_class$e(CryptoProvider, [
14560
+ _create_class$d(CryptoProvider, [
14343
14561
  {
14344
14562
  /**
14345
14563
  * base64 URL safe encoded string
@@ -14433,7 +14651,7 @@ function _ts_generator$9(thisArg, body) {
14433
14651
  */ function hashString(plainText) {
14434
14652
  var _this = this;
14435
14653
  return _async_to_generator$8(function() {
14436
- return _ts_generator$9(this, function(_state) {
14654
+ return _ts_generator$8(this, function(_state) {
14437
14655
  return [
14438
14656
  2,
14439
14657
  EncodingUtils.base64EncodeUrl(_this.hashUtils.sha256(plainText).toString("base64"), "base64")
@@ -14454,7 +14672,7 @@ function _array_like_to_array$5(arr, len) {
14454
14672
  function _array_without_holes$3(arr) {
14455
14673
  if (Array.isArray(arr)) return _array_like_to_array$5(arr);
14456
14674
  }
14457
- function _assert_this_initialized$5(self) {
14675
+ function _assert_this_initialized$4(self) {
14458
14676
  if (self === void 0) {
14459
14677
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
14460
14678
  }
@@ -14489,12 +14707,12 @@ function _async_to_generator$7(fn) {
14489
14707
  });
14490
14708
  };
14491
14709
  }
14492
- function _class_call_check$d(instance, Constructor) {
14710
+ function _class_call_check$c(instance, Constructor) {
14493
14711
  if (!(instance instanceof Constructor)) {
14494
14712
  throw new TypeError("Cannot call a class as a function");
14495
14713
  }
14496
14714
  }
14497
- function _defineProperties$d(target, props) {
14715
+ function _defineProperties$c(target, props) {
14498
14716
  for(var i = 0; i < props.length; i++){
14499
14717
  var descriptor = props[i];
14500
14718
  descriptor.enumerable = descriptor.enumerable || false;
@@ -14503,9 +14721,9 @@ function _defineProperties$d(target, props) {
14503
14721
  Object.defineProperty(target, descriptor.key, descriptor);
14504
14722
  }
14505
14723
  }
14506
- function _create_class$d(Constructor, protoProps, staticProps) {
14507
- if (protoProps) _defineProperties$d(Constructor.prototype, protoProps);
14508
- if (staticProps) _defineProperties$d(Constructor, staticProps);
14724
+ function _create_class$c(Constructor, protoProps, staticProps) {
14725
+ if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
14726
+ if (staticProps) _defineProperties$c(Constructor, staticProps);
14509
14727
  return Constructor;
14510
14728
  }
14511
14729
  function _define_property$4(obj, key, value) {
@@ -14521,13 +14739,13 @@ function _define_property$4(obj, key, value) {
14521
14739
  }
14522
14740
  return obj;
14523
14741
  }
14524
- function _get_prototype_of$5(o) {
14525
- _get_prototype_of$5 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
14742
+ function _get_prototype_of$4(o) {
14743
+ _get_prototype_of$4 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
14526
14744
  return o.__proto__ || Object.getPrototypeOf(o);
14527
14745
  };
14528
- return _get_prototype_of$5(o);
14746
+ return _get_prototype_of$4(o);
14529
14747
  }
14530
- function _inherits$5(subClass, superClass) {
14748
+ function _inherits$4(subClass, superClass) {
14531
14749
  if (typeof superClass !== "function" && superClass !== null) {
14532
14750
  throw new TypeError("Super expression must either be null or a function");
14533
14751
  }
@@ -14538,9 +14756,9 @@ function _inherits$5(subClass, superClass) {
14538
14756
  configurable: true
14539
14757
  }
14540
14758
  });
14541
- if (superClass) _set_prototype_of$5(subClass, superClass);
14759
+ if (superClass) _set_prototype_of$4(subClass, superClass);
14542
14760
  }
14543
- function _instanceof$d(left, right) {
14761
+ function _instanceof$c(left, right) {
14544
14762
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
14545
14763
  return !!right[Symbol.hasInstance](left);
14546
14764
  } else {
@@ -14568,23 +14786,23 @@ function _object_spread$3(target) {
14568
14786
  }
14569
14787
  return target;
14570
14788
  }
14571
- function _possible_constructor_return$5(self, call) {
14572
- if (call && (_type_of$d(call) === "object" || typeof call === "function")) {
14789
+ function _possible_constructor_return$4(self, call) {
14790
+ if (call && (_type_of$c(call) === "object" || typeof call === "function")) {
14573
14791
  return call;
14574
14792
  }
14575
- return _assert_this_initialized$5(self);
14793
+ return _assert_this_initialized$4(self);
14576
14794
  }
14577
- function _set_prototype_of$5(o, p) {
14578
- _set_prototype_of$5 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
14795
+ function _set_prototype_of$4(o, p) {
14796
+ _set_prototype_of$4 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
14579
14797
  o.__proto__ = p;
14580
14798
  return o;
14581
14799
  };
14582
- return _set_prototype_of$5(o, p);
14800
+ return _set_prototype_of$4(o, p);
14583
14801
  }
14584
14802
  function _to_consumable_array$3(arr) {
14585
14803
  return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$3();
14586
14804
  }
14587
- function _type_of$d(obj) {
14805
+ function _type_of$c(obj) {
14588
14806
  "@swc/helpers - typeof";
14589
14807
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
14590
14808
  }
@@ -14596,7 +14814,7 @@ function _unsupported_iterable_to_array$5(o, minLen) {
14596
14814
  if (n === "Map" || n === "Set") return Array.from(n);
14597
14815
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
14598
14816
  }
14599
- function _is_native_reflect_construct$5() {
14817
+ function _is_native_reflect_construct$4() {
14600
14818
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
14601
14819
  if (Reflect.construct.sham) return false;
14602
14820
  if (typeof Proxy === "function") return true;
@@ -14607,20 +14825,20 @@ function _is_native_reflect_construct$5() {
14607
14825
  return false;
14608
14826
  }
14609
14827
  }
14610
- function _create_super$5(Derived) {
14611
- var hasNativeReflectConstruct = _is_native_reflect_construct$5();
14828
+ function _create_super$4(Derived) {
14829
+ var hasNativeReflectConstruct = _is_native_reflect_construct$4();
14612
14830
  return function _createSuperInternal() {
14613
- var Super = _get_prototype_of$5(Derived), result;
14831
+ var Super = _get_prototype_of$4(Derived), result;
14614
14832
  if (hasNativeReflectConstruct) {
14615
- var NewTarget = _get_prototype_of$5(this).constructor;
14833
+ var NewTarget = _get_prototype_of$4(this).constructor;
14616
14834
  result = Reflect.construct(Super, arguments, NewTarget);
14617
14835
  } else {
14618
14836
  result = Super.apply(this, arguments);
14619
14837
  }
14620
- return _possible_constructor_return$5(this, result);
14838
+ return _possible_constructor_return$4(this, result);
14621
14839
  };
14622
14840
  }
14623
- function _ts_generator$8(thisArg, body) {
14841
+ function _ts_generator$7(thisArg, body) {
14624
14842
  var f, y, t, g, _ = {
14625
14843
  label: 0,
14626
14844
  sent: function() {
@@ -14722,10 +14940,10 @@ function _ts_generator$8(thisArg, body) {
14722
14940
  * This class implements Storage for node, reading cache from user specified storage location or an extension library
14723
14941
  * @public
14724
14942
  */ var NodeStorage = /*#__PURE__*/ function(CacheManager) {
14725
- _inherits$5(NodeStorage, CacheManager);
14726
- var _super = _create_super$5(NodeStorage);
14943
+ _inherits$4(NodeStorage, CacheManager);
14944
+ var _super = _create_super$4(NodeStorage);
14727
14945
  function NodeStorage(logger, clientId, cryptoImpl, staticAuthorityOptions) {
14728
- _class_call_check$d(this, NodeStorage);
14946
+ _class_call_check$c(this, NodeStorage);
14729
14947
  var _this;
14730
14948
  _this = _super.call(this, clientId, cryptoImpl, logger, staticAuthorityOptions);
14731
14949
  _this.cache = {};
@@ -14733,7 +14951,7 @@ function _ts_generator$8(thisArg, body) {
14733
14951
  _this.logger = logger;
14734
14952
  return _this;
14735
14953
  }
14736
- _create_class$d(NodeStorage, [
14954
+ _create_class$c(NodeStorage, [
14737
14955
  {
14738
14956
  /**
14739
14957
  * Queue up callbacks
@@ -14771,7 +14989,7 @@ function _ts_generator$8(thisArg, body) {
14771
14989
  if (typeof value !== "object") {
14772
14990
  continue;
14773
14991
  }
14774
- if (_instanceof$d(value, AccountEntity)) {
14992
+ if (_instanceof$c(value, AccountEntity)) {
14775
14993
  inMemoryCache.accounts[key] = value;
14776
14994
  } else if (isIdTokenEntity(value)) {
14777
14995
  inMemoryCache.idTokens[key] = value;
@@ -15159,7 +15377,7 @@ function _ts_generator$8(thisArg, body) {
15159
15377
  var _this = this;
15160
15378
  return _async_to_generator$7(function() {
15161
15379
  var cacheKeys;
15162
- return _ts_generator$8(this, function(_state) {
15380
+ return _ts_generator$7(this, function(_state) {
15163
15381
  _this.logger.trace("Clearing cache entries created by MSAL");
15164
15382
  // read inMemoryCache
15165
15383
  cacheKeys = _this.getKeys();
@@ -15247,12 +15465,12 @@ function _async_to_generator$6(fn) {
15247
15465
  });
15248
15466
  };
15249
15467
  }
15250
- function _class_call_check$c(instance, Constructor) {
15468
+ function _class_call_check$b(instance, Constructor) {
15251
15469
  if (!(instance instanceof Constructor)) {
15252
15470
  throw new TypeError("Cannot call a class as a function");
15253
15471
  }
15254
15472
  }
15255
- function _defineProperties$c(target, props) {
15473
+ function _defineProperties$b(target, props) {
15256
15474
  for(var i = 0; i < props.length; i++){
15257
15475
  var descriptor = props[i];
15258
15476
  descriptor.enumerable = descriptor.enumerable || false;
@@ -15261,9 +15479,9 @@ function _defineProperties$c(target, props) {
15261
15479
  Object.defineProperty(target, descriptor.key, descriptor);
15262
15480
  }
15263
15481
  }
15264
- function _create_class$c(Constructor, protoProps, staticProps) {
15265
- if (protoProps) _defineProperties$c(Constructor.prototype, protoProps);
15266
- if (staticProps) _defineProperties$c(Constructor, staticProps);
15482
+ function _create_class$b(Constructor, protoProps, staticProps) {
15483
+ if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
15484
+ if (staticProps) _defineProperties$b(Constructor, staticProps);
15267
15485
  return Constructor;
15268
15486
  }
15269
15487
  function _define_property$3(obj, key, value) {
@@ -15318,7 +15536,7 @@ function _object_spread_props$2(target, source) {
15318
15536
  }
15319
15537
  return target;
15320
15538
  }
15321
- function _ts_generator$7(thisArg, body) {
15539
+ function _ts_generator$6(thisArg, body) {
15322
15540
  var f, y, t, g, _ = {
15323
15541
  label: 0,
15324
15542
  sent: function() {
@@ -15428,7 +15646,7 @@ function _ts_generator$7(thisArg, body) {
15428
15646
  * @public
15429
15647
  */ var TokenCache = /*#__PURE__*/ function() {
15430
15648
  function TokenCache(storage, logger, cachePlugin) {
15431
- _class_call_check$c(this, TokenCache);
15649
+ _class_call_check$b(this, TokenCache);
15432
15650
  this.cacheHasChanged = false;
15433
15651
  this.storage = storage;
15434
15652
  this.storage.registerChangeEmitter(this.handleChangeEvent.bind(this));
@@ -15437,7 +15655,7 @@ function _ts_generator$7(thisArg, body) {
15437
15655
  }
15438
15656
  this.logger = logger;
15439
15657
  }
15440
- _create_class$c(TokenCache, [
15658
+ _create_class$b(TokenCache, [
15441
15659
  {
15442
15660
  /**
15443
15661
  * Set to true if cache state has changed since last time serialize or writeToPersistence was called
@@ -15497,7 +15715,7 @@ function _ts_generator$7(thisArg, body) {
15497
15715
  var _this = this;
15498
15716
  return _async_to_generator$6(function() {
15499
15717
  var cacheContext;
15500
- return _ts_generator$7(this, function(_state) {
15718
+ return _ts_generator$6(this, function(_state) {
15501
15719
  switch(_state.label){
15502
15720
  case 0:
15503
15721
  _this.logger.trace("getAllAccounts called");
@@ -15562,7 +15780,7 @@ function _ts_generator$7(thisArg, body) {
15562
15780
  var _this = this;
15563
15781
  return _async_to_generator$6(function() {
15564
15782
  var allAccounts;
15565
- return _ts_generator$7(this, function(_state) {
15783
+ return _ts_generator$6(this, function(_state) {
15566
15784
  switch(_state.label){
15567
15785
  case 0:
15568
15786
  return [
@@ -15600,7 +15818,7 @@ function _ts_generator$7(thisArg, body) {
15600
15818
  var _this = this;
15601
15819
  return _async_to_generator$6(function() {
15602
15820
  var allAccounts;
15603
- return _ts_generator$7(this, function(_state) {
15821
+ return _ts_generator$6(this, function(_state) {
15604
15822
  switch(_state.label){
15605
15823
  case 0:
15606
15824
  return [
@@ -15636,7 +15854,7 @@ function _ts_generator$7(thisArg, body) {
15636
15854
  var _this = this;
15637
15855
  return _async_to_generator$6(function() {
15638
15856
  var cacheContext;
15639
- return _ts_generator$7(this, function(_state) {
15857
+ return _ts_generator$6(this, function(_state) {
15640
15858
  switch(_state.label){
15641
15859
  case 0:
15642
15860
  _this.logger.trace("removeAccount called");
@@ -15874,7 +16092,7 @@ SafeBuffer.allocUnsafeSlow = function(size) {
15874
16092
 
15875
16093
  /*global module, process*/
15876
16094
 
15877
- function _type_of$c(obj) {
16095
+ function _type_of$b(obj) {
15878
16096
  "@swc/helpers - typeof";
15879
16097
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
15880
16098
  }
@@ -15908,7 +16126,7 @@ function DataStream$2(data) {
15908
16126
  }).bind(this));
15909
16127
  return this;
15910
16128
  }
15911
- throw new TypeError("Unexpected data type (" + (typeof data === "undefined" ? "undefined" : _type_of$c(data)) + ")");
16129
+ throw new TypeError("Unexpected data type (" + (typeof data === "undefined" ? "undefined" : _type_of$b(data)) + ")");
15912
16130
  }
15913
16131
  util$3.inherits(DataStream$2, Stream$2);
15914
16132
  DataStream$2.prototype.write = function write(data) {
@@ -16593,7 +16811,7 @@ var TokenExpiredError_1 = TokenExpiredError$1;
16593
16811
  * Helpers.
16594
16812
  */
16595
16813
 
16596
- function _type_of$b(obj) {
16814
+ function _type_of$a(obj) {
16597
16815
  "@swc/helpers - typeof";
16598
16816
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
16599
16817
  }
@@ -16617,7 +16835,7 @@ var y = d * 365.25;
16617
16835
  * @api public
16618
16836
  */ var ms$1 = function(val, options) {
16619
16837
  options = options || {};
16620
- var type = typeof val === "undefined" ? "undefined" : _type_of$b(val);
16838
+ var type = typeof val === "undefined" ? "undefined" : _type_of$a(val);
16621
16839
  if (type === "string" && val.length > 0) {
16622
16840
  return parse$7(val);
16623
16841
  } else if (type === "number" && isFinite(val)) {
@@ -17060,12 +17278,12 @@ var identifiers$1 = {
17060
17278
  rcompareIdentifiers: rcompareIdentifiers
17061
17279
  };
17062
17280
 
17063
- function _class_call_check$b(instance, Constructor) {
17281
+ function _class_call_check$a(instance, Constructor) {
17064
17282
  if (!(instance instanceof Constructor)) {
17065
17283
  throw new TypeError("Cannot call a class as a function");
17066
17284
  }
17067
17285
  }
17068
- function _defineProperties$b(target, props) {
17286
+ function _defineProperties$a(target, props) {
17069
17287
  for(var i = 0; i < props.length; i++){
17070
17288
  var descriptor = props[i];
17071
17289
  descriptor.enumerable = descriptor.enumerable || false;
@@ -17074,19 +17292,19 @@ function _defineProperties$b(target, props) {
17074
17292
  Object.defineProperty(target, descriptor.key, descriptor);
17075
17293
  }
17076
17294
  }
17077
- function _create_class$b(Constructor, protoProps, staticProps) {
17078
- if (protoProps) _defineProperties$b(Constructor.prototype, protoProps);
17079
- if (staticProps) _defineProperties$b(Constructor, staticProps);
17295
+ function _create_class$a(Constructor, protoProps, staticProps) {
17296
+ if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
17297
+ if (staticProps) _defineProperties$a(Constructor, staticProps);
17080
17298
  return Constructor;
17081
17299
  }
17082
- function _instanceof$c(left, right) {
17300
+ function _instanceof$b(left, right) {
17083
17301
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17084
17302
  return !!right[Symbol.hasInstance](left);
17085
17303
  } else {
17086
17304
  return left instanceof right;
17087
17305
  }
17088
17306
  }
17089
- function _type_of$a(obj) {
17307
+ function _type_of$9(obj) {
17090
17308
  "@swc/helpers - typeof";
17091
17309
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
17092
17310
  }
@@ -17097,16 +17315,16 @@ var parseOptions$2 = parseOptions_1;
17097
17315
  var compareIdentifiers = identifiers$1.compareIdentifiers;
17098
17316
  var SemVer$f = /*#__PURE__*/ function() {
17099
17317
  function SemVer(version, options) {
17100
- _class_call_check$b(this, SemVer);
17318
+ _class_call_check$a(this, SemVer);
17101
17319
  options = parseOptions$2(options);
17102
- if (_instanceof$c(version, SemVer)) {
17320
+ if (_instanceof$b(version, SemVer)) {
17103
17321
  if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
17104
17322
  return version;
17105
17323
  } else {
17106
17324
  version = version.version;
17107
17325
  }
17108
17326
  } else if (typeof version !== "string") {
17109
- throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$a(version), '".'));
17327
+ throw new TypeError('Invalid version. Must be a string. Got type "'.concat(typeof version === "undefined" ? "undefined" : _type_of$9(version), '".'));
17110
17328
  }
17111
17329
  if (version.length > MAX_LENGTH) {
17112
17330
  throw new TypeError("version is longer than ".concat(MAX_LENGTH, " characters"));
@@ -17152,7 +17370,7 @@ var SemVer$f = /*#__PURE__*/ function() {
17152
17370
  this.build = m[5] ? m[5].split(".") : [];
17153
17371
  this.format();
17154
17372
  }
17155
- _create_class$b(SemVer, [
17373
+ _create_class$a(SemVer, [
17156
17374
  {
17157
17375
  key: "format",
17158
17376
  value: function format() {
@@ -17173,7 +17391,7 @@ var SemVer$f = /*#__PURE__*/ function() {
17173
17391
  key: "compare",
17174
17392
  value: function compare(other) {
17175
17393
  debug$2("SemVer.compare", this.version, this.options, other);
17176
- if (!_instanceof$c(other, SemVer)) {
17394
+ if (!_instanceof$b(other, SemVer)) {
17177
17395
  if (typeof other === "string" && other === this.version) {
17178
17396
  return 0;
17179
17397
  }
@@ -17188,7 +17406,7 @@ var SemVer$f = /*#__PURE__*/ function() {
17188
17406
  {
17189
17407
  key: "compareMain",
17190
17408
  value: function compareMain(other) {
17191
- if (!_instanceof$c(other, SemVer)) {
17409
+ if (!_instanceof$b(other, SemVer)) {
17192
17410
  other = new SemVer(other, this.options);
17193
17411
  }
17194
17412
  return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
@@ -17197,7 +17415,7 @@ var SemVer$f = /*#__PURE__*/ function() {
17197
17415
  {
17198
17416
  key: "comparePre",
17199
17417
  value: function comparePre(other) {
17200
- if (!_instanceof$c(other, SemVer)) {
17418
+ if (!_instanceof$b(other, SemVer)) {
17201
17419
  other = new SemVer(other, this.options);
17202
17420
  }
17203
17421
  // NOT having a prerelease is > having one
@@ -17230,14 +17448,14 @@ var SemVer$f = /*#__PURE__*/ function() {
17230
17448
  {
17231
17449
  key: "compareBuild",
17232
17450
  value: function compareBuild(other) {
17233
- if (!_instanceof$c(other, SemVer)) {
17451
+ if (!_instanceof$b(other, SemVer)) {
17234
17452
  other = new SemVer(other, this.options);
17235
17453
  }
17236
17454
  var i = 0;
17237
17455
  do {
17238
17456
  var a = this.build[i];
17239
17457
  var b = other.build[i];
17240
- debug$2("prerelease compare", i, a, b);
17458
+ debug$2("build compare", i, a, b);
17241
17459
  if (a === undefined && b === undefined) {
17242
17460
  return 0;
17243
17461
  } else if (b === undefined) {
@@ -17385,7 +17603,7 @@ var SemVer$f = /*#__PURE__*/ function() {
17385
17603
  }();
17386
17604
  var semver$4 = SemVer$f;
17387
17605
 
17388
- function _instanceof$b(left, right) {
17606
+ function _instanceof$a(left, right) {
17389
17607
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17390
17608
  return !!right[Symbol.hasInstance](left);
17391
17609
  } else {
@@ -17395,7 +17613,7 @@ function _instanceof$b(left, right) {
17395
17613
  var SemVer$e = semver$4;
17396
17614
  var parse$6 = function(version, options) {
17397
17615
  var throwErrors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
17398
- if (_instanceof$b(version, SemVer$e)) {
17616
+ if (_instanceof$a(version, SemVer$e)) {
17399
17617
  return version;
17400
17618
  }
17401
17619
  try {
@@ -17423,7 +17641,7 @@ var clean$1 = function(version, options) {
17423
17641
  };
17424
17642
  var clean_1 = clean$1;
17425
17643
 
17426
- function _instanceof$a(left, right) {
17644
+ function _instanceof$9(left, right) {
17427
17645
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17428
17646
  return !!right[Symbol.hasInstance](left);
17429
17647
  } else {
@@ -17438,7 +17656,7 @@ var inc$1 = function(version, release, options, identifier, identifierBase) {
17438
17656
  options = undefined;
17439
17657
  }
17440
17658
  try {
17441
- return new SemVer$d(_instanceof$a(version, SemVer$d) ? version.version : version, options).inc(release, identifier, identifierBase).version;
17659
+ return new SemVer$d(_instanceof$9(version, SemVer$d) ? version.version : version, options).inc(release, identifier, identifierBase).version;
17442
17660
  } catch (er) {
17443
17661
  return null;
17444
17662
  }
@@ -17643,7 +17861,7 @@ var cmp$2 = function(a, op, b, loose) {
17643
17861
  };
17644
17862
  var cmp_1 = cmp$2;
17645
17863
 
17646
- function _instanceof$9(left, right) {
17864
+ function _instanceof$8(left, right) {
17647
17865
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17648
17866
  return !!right[Symbol.hasInstance](left);
17649
17867
  } else {
@@ -17654,7 +17872,7 @@ var SemVer$7 = semver$4;
17654
17872
  var parse$1 = parse_1;
17655
17873
  var _require$4 = re$4.exports, re$2 = _require$4.safeRe, t$2 = _require$4.t;
17656
17874
  var coerce$1 = function(version, options) {
17657
- if (_instanceof$9(version, SemVer$7)) {
17875
+ if (_instanceof$8(version, SemVer$7)) {
17658
17876
  return version;
17659
17877
  }
17660
17878
  if (typeof version === "number") {
@@ -17700,517 +17918,12 @@ var coerce$1 = function(version, options) {
17700
17918
  };
17701
17919
  var coerce_1 = coerce$1;
17702
17920
 
17703
- function _ts_generator$6(thisArg, body) {
17704
- var f, y, t, g, _ = {
17705
- label: 0,
17706
- sent: function() {
17707
- if (t[0] & 1) throw t[1];
17708
- return t[1];
17709
- },
17710
- trys: [],
17711
- ops: []
17712
- };
17713
- return g = {
17714
- next: verb(0),
17715
- "throw": verb(1),
17716
- "return": verb(2)
17717
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
17718
- return this;
17719
- }), g;
17720
- function verb(n) {
17721
- return function(v) {
17722
- return step([
17723
- n,
17724
- v
17725
- ]);
17726
- };
17727
- }
17728
- function step(op) {
17729
- if (f) throw new TypeError("Generator is already executing.");
17730
- while(_)try {
17731
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
17732
- if (y = 0, t) op = [
17733
- op[0] & 2,
17734
- t.value
17735
- ];
17736
- switch(op[0]){
17737
- case 0:
17738
- case 1:
17739
- t = op;
17740
- break;
17741
- case 4:
17742
- _.label++;
17743
- return {
17744
- value: op[1],
17745
- done: false
17746
- };
17747
- case 5:
17748
- _.label++;
17749
- y = op[1];
17750
- op = [
17751
- 0
17752
- ];
17753
- continue;
17754
- case 7:
17755
- op = _.ops.pop();
17756
- _.trys.pop();
17757
- continue;
17758
- default:
17759
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
17760
- _ = 0;
17761
- continue;
17762
- }
17763
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
17764
- _.label = op[1];
17765
- break;
17766
- }
17767
- if (op[0] === 6 && _.label < t[1]) {
17768
- _.label = t[1];
17769
- t = op;
17770
- break;
17771
- }
17772
- if (t && _.label < t[2]) {
17773
- _.label = t[2];
17774
- _.ops.push(op);
17775
- break;
17776
- }
17777
- if (t[2]) _.ops.pop();
17778
- _.trys.pop();
17779
- continue;
17780
- }
17781
- op = body.call(thisArg, _);
17782
- } catch (e) {
17783
- op = [
17784
- 6,
17785
- e
17786
- ];
17787
- y = 0;
17788
- } finally{
17789
- f = t = 0;
17790
- }
17791
- if (op[0] & 5) throw op[1];
17792
- return {
17793
- value: op[0] ? op[1] : void 0,
17794
- done: true
17795
- };
17796
- }
17797
- }
17798
- var iterator = function(Yallist) {
17799
- Yallist.prototype[Symbol.iterator] = function() {
17800
- var walker;
17801
- return _ts_generator$6(this, function(_state) {
17802
- switch(_state.label){
17803
- case 0:
17804
- walker = this.head;
17805
- _state.label = 1;
17806
- case 1:
17807
- if (!walker) return [
17808
- 3,
17809
- 4
17810
- ];
17811
- return [
17812
- 4,
17813
- walker.value
17814
- ];
17815
- case 2:
17816
- _state.sent();
17817
- _state.label = 3;
17818
- case 3:
17819
- walker = walker.next;
17820
- return [
17821
- 3,
17822
- 1
17823
- ];
17824
- case 4:
17825
- return [
17826
- 2
17827
- ];
17828
- }
17829
- });
17830
- };
17831
- };
17832
-
17833
- function _instanceof$8(left, right) {
17834
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
17835
- return !!right[Symbol.hasInstance](left);
17836
- } else {
17837
- return left instanceof right;
17838
- }
17839
- }
17840
- var yallist = Yallist$1;
17841
- Yallist$1.Node = Node;
17842
- Yallist$1.create = Yallist$1;
17843
- function Yallist$1(list) {
17844
- var self = this;
17845
- if (!_instanceof$8(self, Yallist$1)) {
17846
- self = new Yallist$1();
17847
- }
17848
- self.tail = null;
17849
- self.head = null;
17850
- self.length = 0;
17851
- if (list && typeof list.forEach === "function") {
17852
- list.forEach(function(item) {
17853
- self.push(item);
17854
- });
17855
- } else if (arguments.length > 0) {
17856
- for(var i = 0, l = arguments.length; i < l; i++){
17857
- self.push(arguments[i]);
17858
- }
17859
- }
17860
- return self;
17861
- }
17862
- Yallist$1.prototype.removeNode = function(node) {
17863
- if (node.list !== this) {
17864
- throw new Error("removing node which does not belong to this list");
17865
- }
17866
- var next = node.next;
17867
- var prev = node.prev;
17868
- if (next) {
17869
- next.prev = prev;
17870
- }
17871
- if (prev) {
17872
- prev.next = next;
17873
- }
17874
- if (node === this.head) {
17875
- this.head = next;
17876
- }
17877
- if (node === this.tail) {
17878
- this.tail = prev;
17879
- }
17880
- node.list.length--;
17881
- node.next = null;
17882
- node.prev = null;
17883
- node.list = null;
17884
- return next;
17885
- };
17886
- Yallist$1.prototype.unshiftNode = function(node) {
17887
- if (node === this.head) {
17888
- return;
17889
- }
17890
- if (node.list) {
17891
- node.list.removeNode(node);
17892
- }
17893
- var head = this.head;
17894
- node.list = this;
17895
- node.next = head;
17896
- if (head) {
17897
- head.prev = node;
17898
- }
17899
- this.head = node;
17900
- if (!this.tail) {
17901
- this.tail = node;
17902
- }
17903
- this.length++;
17904
- };
17905
- Yallist$1.prototype.pushNode = function(node) {
17906
- if (node === this.tail) {
17907
- return;
17908
- }
17909
- if (node.list) {
17910
- node.list.removeNode(node);
17911
- }
17912
- var tail = this.tail;
17913
- node.list = this;
17914
- node.prev = tail;
17915
- if (tail) {
17916
- tail.next = node;
17917
- }
17918
- this.tail = node;
17919
- if (!this.head) {
17920
- this.head = node;
17921
- }
17922
- this.length++;
17923
- };
17924
- Yallist$1.prototype.push = function() {
17925
- for(var i = 0, l = arguments.length; i < l; i++){
17926
- push(this, arguments[i]);
17927
- }
17928
- return this.length;
17929
- };
17930
- Yallist$1.prototype.unshift = function() {
17931
- for(var i = 0, l = arguments.length; i < l; i++){
17932
- unshift(this, arguments[i]);
17933
- }
17934
- return this.length;
17935
- };
17936
- Yallist$1.prototype.pop = function() {
17937
- if (!this.tail) {
17938
- return undefined;
17939
- }
17940
- var res = this.tail.value;
17941
- this.tail = this.tail.prev;
17942
- if (this.tail) {
17943
- this.tail.next = null;
17944
- } else {
17945
- this.head = null;
17946
- }
17947
- this.length--;
17948
- return res;
17949
- };
17950
- Yallist$1.prototype.shift = function() {
17951
- if (!this.head) {
17952
- return undefined;
17953
- }
17954
- var res = this.head.value;
17955
- this.head = this.head.next;
17956
- if (this.head) {
17957
- this.head.prev = null;
17958
- } else {
17959
- this.tail = null;
17960
- }
17961
- this.length--;
17962
- return res;
17963
- };
17964
- Yallist$1.prototype.forEach = function(fn, thisp) {
17965
- thisp = thisp || this;
17966
- for(var walker = this.head, i = 0; walker !== null; i++){
17967
- fn.call(thisp, walker.value, i, this);
17968
- walker = walker.next;
17969
- }
17970
- };
17971
- Yallist$1.prototype.forEachReverse = function(fn, thisp) {
17972
- thisp = thisp || this;
17973
- for(var walker = this.tail, i = this.length - 1; walker !== null; i--){
17974
- fn.call(thisp, walker.value, i, this);
17975
- walker = walker.prev;
17976
- }
17977
- };
17978
- Yallist$1.prototype.get = function(n) {
17979
- for(var i = 0, walker = this.head; walker !== null && i < n; i++){
17980
- // abort out of the list early if we hit a cycle
17981
- walker = walker.next;
17982
- }
17983
- if (i === n && walker !== null) {
17984
- return walker.value;
17985
- }
17986
- };
17987
- Yallist$1.prototype.getReverse = function(n) {
17988
- for(var i = 0, walker = this.tail; walker !== null && i < n; i++){
17989
- // abort out of the list early if we hit a cycle
17990
- walker = walker.prev;
17991
- }
17992
- if (i === n && walker !== null) {
17993
- return walker.value;
17994
- }
17995
- };
17996
- Yallist$1.prototype.map = function(fn, thisp) {
17997
- thisp = thisp || this;
17998
- var res = new Yallist$1();
17999
- for(var walker = this.head; walker !== null;){
18000
- res.push(fn.call(thisp, walker.value, this));
18001
- walker = walker.next;
18002
- }
18003
- return res;
18004
- };
18005
- Yallist$1.prototype.mapReverse = function(fn, thisp) {
18006
- thisp = thisp || this;
18007
- var res = new Yallist$1();
18008
- for(var walker = this.tail; walker !== null;){
18009
- res.push(fn.call(thisp, walker.value, this));
18010
- walker = walker.prev;
18011
- }
18012
- return res;
18013
- };
18014
- Yallist$1.prototype.reduce = function(fn, initial) {
18015
- var acc;
18016
- var walker = this.head;
18017
- if (arguments.length > 1) {
18018
- acc = initial;
18019
- } else if (this.head) {
18020
- walker = this.head.next;
18021
- acc = this.head.value;
18022
- } else {
18023
- throw new TypeError("Reduce of empty list with no initial value");
18024
- }
18025
- for(var i = 0; walker !== null; i++){
18026
- acc = fn(acc, walker.value, i);
18027
- walker = walker.next;
18028
- }
18029
- return acc;
18030
- };
18031
- Yallist$1.prototype.reduceReverse = function(fn, initial) {
18032
- var acc;
18033
- var walker = this.tail;
18034
- if (arguments.length > 1) {
18035
- acc = initial;
18036
- } else if (this.tail) {
18037
- walker = this.tail.prev;
18038
- acc = this.tail.value;
18039
- } else {
18040
- throw new TypeError("Reduce of empty list with no initial value");
18041
- }
18042
- for(var i = this.length - 1; walker !== null; i--){
18043
- acc = fn(acc, walker.value, i);
18044
- walker = walker.prev;
18045
- }
18046
- return acc;
18047
- };
18048
- Yallist$1.prototype.toArray = function() {
18049
- var arr = new Array(this.length);
18050
- for(var i = 0, walker = this.head; walker !== null; i++){
18051
- arr[i] = walker.value;
18052
- walker = walker.next;
18053
- }
18054
- return arr;
18055
- };
18056
- Yallist$1.prototype.toArrayReverse = function() {
18057
- var arr = new Array(this.length);
18058
- for(var i = 0, walker = this.tail; walker !== null; i++){
18059
- arr[i] = walker.value;
18060
- walker = walker.prev;
18061
- }
18062
- return arr;
18063
- };
18064
- Yallist$1.prototype.slice = function(from, to) {
18065
- to = to || this.length;
18066
- if (to < 0) {
18067
- to += this.length;
18068
- }
18069
- from = from || 0;
18070
- if (from < 0) {
18071
- from += this.length;
18072
- }
18073
- var ret = new Yallist$1();
18074
- if (to < from || to < 0) {
18075
- return ret;
18076
- }
18077
- if (from < 0) {
18078
- from = 0;
18079
- }
18080
- if (to > this.length) {
18081
- to = this.length;
18082
- }
18083
- for(var i = 0, walker = this.head; walker !== null && i < from; i++){
18084
- walker = walker.next;
18085
- }
18086
- for(; walker !== null && i < to; i++, walker = walker.next){
18087
- ret.push(walker.value);
18088
- }
18089
- return ret;
18090
- };
18091
- Yallist$1.prototype.sliceReverse = function(from, to) {
18092
- to = to || this.length;
18093
- if (to < 0) {
18094
- to += this.length;
18095
- }
18096
- from = from || 0;
18097
- if (from < 0) {
18098
- from += this.length;
18099
- }
18100
- var ret = new Yallist$1();
18101
- if (to < from || to < 0) {
18102
- return ret;
18103
- }
18104
- if (from < 0) {
18105
- from = 0;
18106
- }
18107
- if (to > this.length) {
18108
- to = this.length;
18109
- }
18110
- for(var i = this.length, walker = this.tail; walker !== null && i > to; i--){
18111
- walker = walker.prev;
18112
- }
18113
- for(; walker !== null && i > from; i--, walker = walker.prev){
18114
- ret.push(walker.value);
18115
- }
18116
- return ret;
18117
- };
18118
- Yallist$1.prototype.splice = function(start, deleteCount) {
18119
- for(var _len = arguments.length, nodes = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
18120
- nodes[_key - 2] = arguments[_key];
18121
- }
18122
- if (start > this.length) {
18123
- start = this.length - 1;
18124
- }
18125
- if (start < 0) {
18126
- start = this.length + start;
18127
- }
18128
- for(var i = 0, walker = this.head; walker !== null && i < start; i++){
18129
- walker = walker.next;
18130
- }
18131
- var ret = [];
18132
- for(var i = 0; walker && i < deleteCount; i++){
18133
- ret.push(walker.value);
18134
- walker = this.removeNode(walker);
18135
- }
18136
- if (walker === null) {
18137
- walker = this.tail;
18138
- }
18139
- if (walker !== this.head && walker !== this.tail) {
18140
- walker = walker.prev;
18141
- }
18142
- for(var i = 0; i < nodes.length; i++){
18143
- walker = insert(this, walker, nodes[i]);
18144
- }
18145
- return ret;
18146
- };
18147
- Yallist$1.prototype.reverse = function() {
18148
- var head = this.head;
18149
- var tail = this.tail;
18150
- for(var walker = head; walker !== null; walker = walker.prev){
18151
- var p = walker.prev;
18152
- walker.prev = walker.next;
18153
- walker.next = p;
18154
- }
18155
- this.head = tail;
18156
- this.tail = head;
18157
- return this;
18158
- };
18159
- function insert(self, node, value) {
18160
- var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self);
18161
- if (inserted.next === null) {
18162
- self.tail = inserted;
18163
- }
18164
- if (inserted.prev === null) {
18165
- self.head = inserted;
18166
- }
18167
- self.length++;
18168
- return inserted;
18169
- }
18170
- function push(self, item) {
18171
- self.tail = new Node(item, self.tail, null, self);
18172
- if (!self.head) {
18173
- self.head = self.tail;
18174
- }
18175
- self.length++;
18176
- }
18177
- function unshift(self, item) {
18178
- self.head = new Node(item, null, self.head, self);
18179
- if (!self.tail) {
18180
- self.tail = self.head;
18181
- }
18182
- self.length++;
18183
- }
18184
- function Node(value, prev, next, list) {
18185
- if (!_instanceof$8(this, Node)) {
18186
- return new Node(value, prev, next, list);
18187
- }
18188
- this.list = list;
18189
- this.value = value;
18190
- if (prev) {
18191
- prev.next = this;
18192
- this.prev = prev;
18193
- } else {
18194
- this.prev = null;
18195
- }
18196
- if (next) {
18197
- next.prev = this;
18198
- this.next = next;
18199
- } else {
18200
- this.next = null;
18201
- }
18202
- }
18203
- try {
18204
- // add if support for Symbol.iterator is present
18205
- iterator(Yallist$1);
18206
- } catch (er) {}
18207
-
18208
- function _class_call_check$a(instance, Constructor) {
17921
+ function _class_call_check$9(instance, Constructor) {
18209
17922
  if (!(instance instanceof Constructor)) {
18210
17923
  throw new TypeError("Cannot call a class as a function");
18211
17924
  }
18212
17925
  }
18213
- function _defineProperties$a(target, props) {
17926
+ function _defineProperties$9(target, props) {
18214
17927
  for(var i = 0; i < props.length; i++){
18215
17928
  var descriptor = props[i];
18216
17929
  descriptor.enumerable = descriptor.enumerable || false;
@@ -18219,366 +17932,58 @@ function _defineProperties$a(target, props) {
18219
17932
  Object.defineProperty(target, descriptor.key, descriptor);
18220
17933
  }
18221
17934
  }
18222
- function _create_class$a(Constructor, protoProps, staticProps) {
18223
- if (protoProps) _defineProperties$a(Constructor.prototype, protoProps);
18224
- if (staticProps) _defineProperties$a(Constructor, staticProps);
17935
+ function _create_class$9(Constructor, protoProps, staticProps) {
17936
+ if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
17937
+ if (staticProps) _defineProperties$9(Constructor, staticProps);
18225
17938
  return Constructor;
18226
17939
  }
18227
- // A linked list to keep track of recently-used-ness
18228
- var Yallist = yallist;
18229
- var MAX = Symbol("max");
18230
- var LENGTH = Symbol("length");
18231
- var LENGTH_CALCULATOR = Symbol("lengthCalculator");
18232
- var ALLOW_STALE = Symbol("allowStale");
18233
- var MAX_AGE = Symbol("maxAge");
18234
- var DISPOSE = Symbol("dispose");
18235
- var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
18236
- var LRU_LIST = Symbol("lruList");
18237
- var CACHE = Symbol("cache");
18238
- var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
18239
- var naiveLength = function() {
18240
- return 1;
18241
- };
18242
- // lruList is a yallist where the head is the youngest
18243
- // item, and the tail is the oldest. the list contains the Hit
18244
- // objects as the entries.
18245
- // Each Hit object has a reference to its Yallist.Node. This
18246
- // never changes.
18247
- //
18248
- // cache is a Map (or PseudoMap) that matches the keys to
18249
- // the Yallist.Node object.
18250
17940
  var LRUCache = /*#__PURE__*/ function() {
18251
- function LRUCache(options) {
18252
- _class_call_check$a(this, LRUCache);
18253
- if (typeof options === "number") options = {
18254
- max: options
18255
- };
18256
- if (!options) options = {};
18257
- if (options.max && (typeof options.max !== "number" || options.max < 0)) throw new TypeError("max must be a non-negative number");
18258
- // Kind of weird to have a default max of Infinity, but oh well.
18259
- this[MAX] = options.max || Infinity;
18260
- var lc = options.length || naiveLength;
18261
- this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
18262
- this[ALLOW_STALE] = options.stale || false;
18263
- if (options.maxAge && typeof options.maxAge !== "number") throw new TypeError("maxAge must be a number");
18264
- this[MAX_AGE] = options.maxAge || 0;
18265
- this[DISPOSE] = options.dispose;
18266
- this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
18267
- this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
18268
- this.reset();
18269
- }
18270
- _create_class$a(LRUCache, [
18271
- {
18272
- key: "max",
18273
- get: function get() {
18274
- return this[MAX];
18275
- },
18276
- set: // resize the cache when the max changes.
18277
- function set(mL) {
18278
- if (typeof mL !== "number" || mL < 0) throw new TypeError("max must be a non-negative number");
18279
- this[MAX] = mL || Infinity;
18280
- trim(this);
18281
- }
18282
- },
18283
- {
18284
- key: "allowStale",
18285
- get: function get() {
18286
- return this[ALLOW_STALE];
18287
- },
18288
- set: function set(allowStale) {
18289
- this[ALLOW_STALE] = !!allowStale;
18290
- }
18291
- },
18292
- {
18293
- key: "maxAge",
18294
- get: function get() {
18295
- return this[MAX_AGE];
18296
- },
18297
- set: function set(mA) {
18298
- if (typeof mA !== "number") throw new TypeError("maxAge must be a non-negative number");
18299
- this[MAX_AGE] = mA;
18300
- trim(this);
18301
- }
18302
- },
18303
- {
18304
- key: "lengthCalculator",
18305
- get: function get() {
18306
- return this[LENGTH_CALCULATOR];
18307
- },
18308
- set: // resize the cache when the lengthCalculator changes.
18309
- function set(lC) {
18310
- var _this = this;
18311
- if (typeof lC !== "function") lC = naiveLength;
18312
- if (lC !== this[LENGTH_CALCULATOR]) {
18313
- this[LENGTH_CALCULATOR] = lC;
18314
- this[LENGTH] = 0;
18315
- this[LRU_LIST].forEach(function(hit) {
18316
- hit.length = _this[LENGTH_CALCULATOR](hit.value, hit.key);
18317
- _this[LENGTH] += hit.length;
18318
- });
18319
- }
18320
- trim(this);
18321
- }
18322
- },
18323
- {
18324
- key: "length",
18325
- get: function get() {
18326
- return this[LENGTH];
18327
- }
18328
- },
18329
- {
18330
- key: "itemCount",
18331
- get: function get() {
18332
- return this[LRU_LIST].length;
18333
- }
18334
- },
18335
- {
18336
- key: "rforEach",
18337
- value: function rforEach(fn, thisp) {
18338
- thisp = thisp || this;
18339
- for(var walker = this[LRU_LIST].tail; walker !== null;){
18340
- var prev = walker.prev;
18341
- forEachStep(this, fn, walker, thisp);
18342
- walker = prev;
18343
- }
18344
- }
18345
- },
18346
- {
18347
- key: "forEach",
18348
- value: function forEach(fn, thisp) {
18349
- thisp = thisp || this;
18350
- for(var walker = this[LRU_LIST].head; walker !== null;){
18351
- var next = walker.next;
18352
- forEachStep(this, fn, walker, thisp);
18353
- walker = next;
18354
- }
18355
- }
18356
- },
18357
- {
18358
- key: "keys",
18359
- value: function keys() {
18360
- return this[LRU_LIST].toArray().map(function(k) {
18361
- return k.key;
18362
- });
18363
- }
18364
- },
18365
- {
18366
- key: "values",
18367
- value: function values() {
18368
- return this[LRU_LIST].toArray().map(function(k) {
18369
- return k.value;
18370
- });
18371
- }
18372
- },
17941
+ function LRUCache() {
17942
+ _class_call_check$9(this, LRUCache);
17943
+ this.max = 1000;
17944
+ this.map = new Map();
17945
+ }
17946
+ _create_class$9(LRUCache, [
18373
17947
  {
18374
- key: "reset",
18375
- value: function reset() {
18376
- var _this = this;
18377
- if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
18378
- this[LRU_LIST].forEach(function(hit) {
18379
- return _this[DISPOSE](hit.key, hit.value);
18380
- });
17948
+ key: "get",
17949
+ value: function get(key) {
17950
+ var value = this.map.get(key);
17951
+ if (value === undefined) {
17952
+ return undefined;
17953
+ } else {
17954
+ // Remove the key from the map and add it to the end
17955
+ this.map.delete(key);
17956
+ this.map.set(key, value);
17957
+ return value;
18381
17958
  }
18382
- this[CACHE] = new Map() // hash of items by key
18383
- ;
18384
- this[LRU_LIST] = new Yallist() // list of items in order of use recency
18385
- ;
18386
- this[LENGTH] = 0 // length of items in the list
18387
- ;
18388
- }
18389
- },
18390
- {
18391
- key: "dump",
18392
- value: function dump() {
18393
- var _this = this;
18394
- return this[LRU_LIST].map(function(hit) {
18395
- return isStale(_this, hit) ? false : {
18396
- k: hit.key,
18397
- v: hit.value,
18398
- e: hit.now + (hit.maxAge || 0)
18399
- };
18400
- }).toArray().filter(function(h) {
18401
- return h;
18402
- });
18403
17959
  }
18404
17960
  },
18405
17961
  {
18406
- key: "dumpLru",
18407
- value: function dumpLru() {
18408
- return this[LRU_LIST];
17962
+ key: "delete",
17963
+ value: function _delete(key) {
17964
+ return this.map.delete(key);
18409
17965
  }
18410
17966
  },
18411
17967
  {
18412
17968
  key: "set",
18413
- value: function set(key, value, maxAge) {
18414
- maxAge = maxAge || this[MAX_AGE];
18415
- if (maxAge && typeof maxAge !== "number") throw new TypeError("maxAge must be a number");
18416
- var now = maxAge ? Date.now() : 0;
18417
- var len = this[LENGTH_CALCULATOR](value, key);
18418
- if (this[CACHE].has(key)) {
18419
- if (len > this[MAX]) {
18420
- del(this, this[CACHE].get(key));
18421
- return false;
18422
- }
18423
- var node = this[CACHE].get(key);
18424
- var item = node.value;
18425
- // dispose of the old one before overwriting
18426
- // split out into 2 ifs for better coverage tracking
18427
- if (this[DISPOSE]) {
18428
- if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value);
18429
- }
18430
- item.now = now;
18431
- item.maxAge = maxAge;
18432
- item.value = value;
18433
- this[LENGTH] += len - item.length;
18434
- item.length = len;
18435
- this.get(key);
18436
- trim(this);
18437
- return true;
18438
- }
18439
- var hit = new Entry(key, value, len, now, maxAge);
18440
- // oversized objects fall out of cache automatically.
18441
- if (hit.length > this[MAX]) {
18442
- if (this[DISPOSE]) this[DISPOSE](key, value);
18443
- return false;
18444
- }
18445
- this[LENGTH] += hit.length;
18446
- this[LRU_LIST].unshift(hit);
18447
- this[CACHE].set(key, this[LRU_LIST].head);
18448
- trim(this);
18449
- return true;
18450
- }
18451
- },
18452
- {
18453
- key: "has",
18454
- value: function has(key) {
18455
- if (!this[CACHE].has(key)) return false;
18456
- var hit = this[CACHE].get(key).value;
18457
- return !isStale(this, hit);
18458
- }
18459
- },
18460
- {
18461
- key: "get",
18462
- value: function get1(key) {
18463
- return get(this, key, true);
18464
- }
18465
- },
18466
- {
18467
- key: "peek",
18468
- value: function peek(key) {
18469
- return get(this, key, false);
18470
- }
18471
- },
18472
- {
18473
- key: "pop",
18474
- value: function pop() {
18475
- var node = this[LRU_LIST].tail;
18476
- if (!node) return null;
18477
- del(this, node);
18478
- return node.value;
18479
- }
18480
- },
18481
- {
18482
- key: "del",
18483
- value: function del1(key) {
18484
- del(this, this[CACHE].get(key));
18485
- }
18486
- },
18487
- {
18488
- key: "load",
18489
- value: function load(arr) {
18490
- // reset the cache
18491
- this.reset();
18492
- var now = Date.now();
18493
- // A previous serialized cache has the most recent items first
18494
- for(var l = arr.length - 1; l >= 0; l--){
18495
- var hit = arr[l];
18496
- var expiresAt = hit.e || 0;
18497
- if (expiresAt === 0) // the item was created without expiration in a non aged cache
18498
- this.set(hit.k, hit.v);
18499
- else {
18500
- var maxAge = expiresAt - now;
18501
- // dont add already expired items
18502
- if (maxAge > 0) {
18503
- this.set(hit.k, hit.v, maxAge);
18504
- }
17969
+ value: function set(key, value) {
17970
+ var deleted = this.delete(key);
17971
+ if (!deleted && value !== undefined) {
17972
+ // If cache is full, delete the least recently used item
17973
+ if (this.map.size >= this.max) {
17974
+ var firstKey = this.map.keys().next().value;
17975
+ this.delete(firstKey);
18505
17976
  }
17977
+ this.map.set(key, value);
18506
17978
  }
18507
- }
18508
- },
18509
- {
18510
- key: "prune",
18511
- value: function prune() {
18512
- var _this = this;
18513
- this[CACHE].forEach(function(value, key) {
18514
- return get(_this, key, false);
18515
- });
17979
+ return this;
18516
17980
  }
18517
17981
  }
18518
17982
  ]);
18519
- return LRUCache;
18520
- }();
18521
- var get = function(self, key, doUse) {
18522
- var node = self[CACHE].get(key);
18523
- if (node) {
18524
- var hit = node.value;
18525
- if (isStale(self, hit)) {
18526
- del(self, node);
18527
- if (!self[ALLOW_STALE]) return undefined;
18528
- } else {
18529
- if (doUse) {
18530
- if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now();
18531
- self[LRU_LIST].unshiftNode(node);
18532
- }
18533
- }
18534
- return hit.value;
18535
- }
18536
- };
18537
- var isStale = function(self, hit) {
18538
- if (!hit || !hit.maxAge && !self[MAX_AGE]) return false;
18539
- var diff = Date.now() - hit.now;
18540
- return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
18541
- };
18542
- var trim = function(self) {
18543
- if (self[LENGTH] > self[MAX]) {
18544
- for(var walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;){
18545
- // We know that we're about to delete this one, and also
18546
- // what the next least recently used key will be, so just
18547
- // go ahead and set it now.
18548
- var prev = walker.prev;
18549
- del(self, walker);
18550
- walker = prev;
18551
- }
18552
- }
18553
- };
18554
- var del = function(self, node) {
18555
- if (node) {
18556
- var hit = node.value;
18557
- if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value);
18558
- self[LENGTH] -= hit.length;
18559
- self[CACHE].delete(hit.key);
18560
- self[LRU_LIST].removeNode(node);
18561
- }
18562
- };
18563
- var Entry = function Entry(key, value, length, now, maxAge) {
18564
- _class_call_check$a(this, Entry);
18565
- this.key = key;
18566
- this.value = value;
18567
- this.length = length;
18568
- this.now = now;
18569
- this.maxAge = maxAge || 0;
18570
- };
18571
- var forEachStep = function(self, fn, node, thisp) {
18572
- var hit = node.value;
18573
- if (isStale(self, hit)) {
18574
- del(self, node);
18575
- if (!self[ALLOW_STALE]) hit = undefined;
18576
- }
18577
- if (hit) fn.call(thisp, hit.value, hit.key, self);
18578
- };
18579
- var lruCache = LRUCache;
17983
+ return LRUCache;
17984
+ }();
17985
+ var lrucache = LRUCache;
18580
17986
 
18581
- // hoisted class for cyclic dependency
18582
17987
  function _array_like_to_array$3(arr, len) {
18583
17988
  if (len == null || len > arr.length) len = arr.length;
18584
17989
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
@@ -18587,12 +17992,12 @@ function _array_like_to_array$3(arr, len) {
18587
17992
  function _array_without_holes$1(arr) {
18588
17993
  if (Array.isArray(arr)) return _array_like_to_array$3(arr);
18589
17994
  }
18590
- function _class_call_check$9(instance, Constructor) {
17995
+ function _class_call_check$8(instance, Constructor) {
18591
17996
  if (!(instance instanceof Constructor)) {
18592
17997
  throw new TypeError("Cannot call a class as a function");
18593
17998
  }
18594
17999
  }
18595
- function _defineProperties$9(target, props) {
18000
+ function _defineProperties$8(target, props) {
18596
18001
  for(var i = 0; i < props.length; i++){
18597
18002
  var descriptor = props[i];
18598
18003
  descriptor.enumerable = descriptor.enumerable || false;
@@ -18601,9 +18006,9 @@ function _defineProperties$9(target, props) {
18601
18006
  Object.defineProperty(target, descriptor.key, descriptor);
18602
18007
  }
18603
18008
  }
18604
- function _create_class$9(Constructor, protoProps, staticProps) {
18605
- if (protoProps) _defineProperties$9(Constructor.prototype, protoProps);
18606
- if (staticProps) _defineProperties$9(Constructor, staticProps);
18009
+ function _create_class$8(Constructor, protoProps, staticProps) {
18010
+ if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
18011
+ if (staticProps) _defineProperties$8(Constructor, staticProps);
18607
18012
  return Constructor;
18608
18013
  }
18609
18014
  function _instanceof$7(left, right) {
@@ -18630,10 +18035,12 @@ function _unsupported_iterable_to_array$3(o, minLen) {
18630
18035
  if (n === "Map" || n === "Set") return Array.from(n);
18631
18036
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
18632
18037
  }
18038
+ var SPACE_CHARACTERS = /\s+/g;
18039
+ // hoisted class for cyclic dependency
18633
18040
  var Range$b = /*#__PURE__*/ function() {
18634
18041
  function Range(range, options) {
18635
18042
  var _this = this;
18636
- _class_call_check$9(this, Range);
18043
+ _class_call_check$8(this, Range);
18637
18044
  options = parseOptions$1(options);
18638
18045
  if (_instanceof$7(range, Range)) {
18639
18046
  if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
@@ -18650,7 +18057,7 @@ var Range$b = /*#__PURE__*/ function() {
18650
18057
  range
18651
18058
  ]
18652
18059
  ];
18653
- this.format();
18060
+ this.formatted = undefined;
18654
18061
  return this;
18655
18062
  }
18656
18063
  this.options = options;
@@ -18659,7 +18066,7 @@ var Range$b = /*#__PURE__*/ function() {
18659
18066
  // First reduce all whitespace as much as possible so we do not have to rely
18660
18067
  // on potentially slow regexes like \s*. This is then stored and used for
18661
18068
  // future error messages as well.
18662
- this.raw = range.trim().split(/\s+/).join(" ");
18069
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
18663
18070
  // First, split on ||
18664
18071
  this.set = this.raw.split("||")// map the range to a 2d array of comparators
18665
18072
  .map(function(r) {
@@ -18713,15 +18120,33 @@ var Range$b = /*#__PURE__*/ function() {
18713
18120
  }
18714
18121
  }
18715
18122
  }
18716
- this.format();
18123
+ this.formatted = undefined;
18717
18124
  }
18718
- _create_class$9(Range, [
18125
+ _create_class$8(Range, [
18126
+ {
18127
+ key: "range",
18128
+ get: function get() {
18129
+ if (this.formatted === undefined) {
18130
+ this.formatted = "";
18131
+ for(var i = 0; i < this.set.length; i++){
18132
+ if (i > 0) {
18133
+ this.formatted += "||";
18134
+ }
18135
+ var comps = this.set[i];
18136
+ for(var k = 0; k < comps.length; k++){
18137
+ if (k > 0) {
18138
+ this.formatted += " ";
18139
+ }
18140
+ this.formatted += comps[k].toString().trim();
18141
+ }
18142
+ }
18143
+ }
18144
+ return this.formatted;
18145
+ }
18146
+ },
18719
18147
  {
18720
18148
  key: "format",
18721
18149
  value: function format() {
18722
- this.range = this.set.map(function(comps) {
18723
- return comps.join(" ").trim();
18724
- }).join("||").trim();
18725
18150
  return this.range;
18726
18151
  }
18727
18152
  },
@@ -18856,10 +18281,8 @@ var Range$b = /*#__PURE__*/ function() {
18856
18281
  return Range;
18857
18282
  }();
18858
18283
  var range = Range$b;
18859
- var LRU = lruCache;
18860
- var cache = new LRU({
18861
- max: 1000
18862
- });
18284
+ var LRU = lrucache;
18285
+ var cache = new LRU();
18863
18286
  var parseOptions$1 = parseOptions_1;
18864
18287
  var Comparator$4 = comparator;
18865
18288
  var debug$1 = debug_1;
@@ -19083,8 +18506,9 @@ var replaceGTE0 = function(comp, options) {
19083
18506
  // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
19084
18507
  // 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
19085
18508
  // 1.2 - 3.4 => >=1.2.0 <3.5.0-0
18509
+ // TODO build?
19086
18510
  var hyphenReplace = function(incPr) {
19087
- return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) {
18511
+ return function($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) {
19088
18512
  if (isX(fM)) {
19089
18513
  from = "";
19090
18514
  } else if (isX(fm)) {
@@ -19142,12 +18566,12 @@ var testSet = function(set, version, options) {
19142
18566
  return true;
19143
18567
  };
19144
18568
 
19145
- function _class_call_check$8(instance, Constructor) {
18569
+ function _class_call_check$7(instance, Constructor) {
19146
18570
  if (!(instance instanceof Constructor)) {
19147
18571
  throw new TypeError("Cannot call a class as a function");
19148
18572
  }
19149
18573
  }
19150
- function _defineProperties$8(target, props) {
18574
+ function _defineProperties$7(target, props) {
19151
18575
  for(var i = 0; i < props.length; i++){
19152
18576
  var descriptor = props[i];
19153
18577
  descriptor.enumerable = descriptor.enumerable || false;
@@ -19156,9 +18580,9 @@ function _defineProperties$8(target, props) {
19156
18580
  Object.defineProperty(target, descriptor.key, descriptor);
19157
18581
  }
19158
18582
  }
19159
- function _create_class$8(Constructor, protoProps, staticProps) {
19160
- if (protoProps) _defineProperties$8(Constructor.prototype, protoProps);
19161
- if (staticProps) _defineProperties$8(Constructor, staticProps);
18583
+ function _create_class$7(Constructor, protoProps, staticProps) {
18584
+ if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
18585
+ if (staticProps) _defineProperties$7(Constructor, staticProps);
19162
18586
  return Constructor;
19163
18587
  }
19164
18588
  function _instanceof$6(left, right) {
@@ -19172,7 +18596,7 @@ var ANY$2 = Symbol("SemVer ANY");
19172
18596
  // hoisted class for cyclic dependency
19173
18597
  var Comparator$3 = /*#__PURE__*/ function() {
19174
18598
  function Comparator(comp, options) {
19175
- _class_call_check$8(this, Comparator);
18599
+ _class_call_check$7(this, Comparator);
19176
18600
  options = parseOptions(options);
19177
18601
  if (_instanceof$6(comp, Comparator)) {
19178
18602
  if (comp.loose === !!options.loose) {
@@ -19193,7 +18617,7 @@ var Comparator$3 = /*#__PURE__*/ function() {
19193
18617
  }
19194
18618
  debug("comp", this);
19195
18619
  }
19196
- _create_class$8(Comparator, [
18620
+ _create_class$7(Comparator, [
19197
18621
  {
19198
18622
  key: "parse",
19199
18623
  value: function parse(comp) {
@@ -19440,7 +18864,7 @@ var validRange$1 = function(range, options) {
19440
18864
  };
19441
18865
  var valid$1 = validRange$1;
19442
18866
 
19443
- function _type_of$9(obj) {
18867
+ function _type_of$8(obj) {
19444
18868
  "@swc/helpers - typeof";
19445
18869
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
19446
18870
  }
@@ -19518,7 +18942,7 @@ var outside$3 = function(version, range, hilo, options) {
19518
18942
  // but note that everything is flipped for the "ltr" function.
19519
18943
  for(var i = 0; i < range.set.length; ++i){
19520
18944
  var _ret = _loop(i);
19521
- if (_type_of$9(_ret) === "object") return _ret.v;
18945
+ if (_type_of$8(_ret) === "object") return _ret.v;
19522
18946
  }
19523
18947
  return true;
19524
18948
  };
@@ -20414,7 +19838,7 @@ var verify = function(jwtString, secretOrPublicKey, options, callback) {
20414
19838
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
20415
19839
  */
20416
19840
 
20417
- /** Used as references for various `Number` constants. */ function _type_of$8(obj) {
19841
+ /** Used as references for various `Number` constants. */ function _type_of$7(obj) {
20418
19842
  "@swc/helpers - typeof";
20419
19843
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
20420
19844
  }
@@ -20808,7 +20232,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
20808
20232
  * _.isObject(null);
20809
20233
  * // => false
20810
20234
  */ function isObject$2(value) {
20811
- var type = typeof value === "undefined" ? "undefined" : _type_of$8(value);
20235
+ var type = typeof value === "undefined" ? "undefined" : _type_of$7(value);
20812
20236
  return !!value && (type == "object" || type == "function");
20813
20237
  }
20814
20238
  /**
@@ -20873,7 +20297,7 @@ var INFINITY$2 = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER$2 = 1.7
20873
20297
  * _.isSymbol('abc');
20874
20298
  * // => false
20875
20299
  */ function isSymbol$2(value) {
20876
- return (typeof value === "undefined" ? "undefined" : _type_of$8(value)) == "symbol" || isObjectLike$6(value) && objectToString$6.call(value) == symbolTag$2;
20300
+ return (typeof value === "undefined" ? "undefined" : _type_of$7(value)) == "symbol" || isObjectLike$6(value) && objectToString$6.call(value) == symbolTag$2;
20877
20301
  }
20878
20302
  /**
20879
20303
  * Converts `value` to a finite number.
@@ -21106,7 +20530,7 @@ var lodash_isboolean = isBoolean$1;
21106
20530
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
21107
20531
  */
21108
20532
 
21109
- /** Used as references for various `Number` constants. */ function _type_of$7(obj) {
20533
+ /** Used as references for various `Number` constants. */ function _type_of$6(obj) {
21110
20534
  "@swc/helpers - typeof";
21111
20535
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
21112
20536
  }
@@ -21176,7 +20600,7 @@ var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308, NAN$1 = 0 / 0;
21176
20600
  * _.isObject(null);
21177
20601
  * // => false
21178
20602
  */ function isObject$1(value) {
21179
- var type = typeof value === "undefined" ? "undefined" : _type_of$7(value);
20603
+ var type = typeof value === "undefined" ? "undefined" : _type_of$6(value);
21180
20604
  return !!value && (type == "object" || type == "function");
21181
20605
  }
21182
20606
  /**
@@ -21222,7 +20646,7 @@ var INFINITY$1 = 1 / 0, MAX_INTEGER$1 = 1.7976931348623157e+308, NAN$1 = 0 / 0;
21222
20646
  * _.isSymbol('abc');
21223
20647
  * // => false
21224
20648
  */ function isSymbol$1(value) {
21225
- return (typeof value === "undefined" ? "undefined" : _type_of$7(value)) == "symbol" || isObjectLike$4(value) && objectToString$4.call(value) == symbolTag$1;
20649
+ return (typeof value === "undefined" ? "undefined" : _type_of$6(value)) == "symbol" || isObjectLike$4(value) && objectToString$4.call(value) == symbolTag$1;
21226
20650
  }
21227
20651
  /**
21228
20652
  * Converts `value` to a finite number.
@@ -21611,7 +21035,7 @@ var lodash_isstring = isString$1;
21611
21035
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
21612
21036
  */
21613
21037
 
21614
- /** Used as the `TypeError` message for "Functions" methods. */ function _type_of$6(obj) {
21038
+ /** Used as the `TypeError` message for "Functions" methods. */ function _type_of$5(obj) {
21615
21039
  "@swc/helpers - typeof";
21616
21040
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
21617
21041
  }
@@ -21706,7 +21130,7 @@ var FUNC_ERROR_TEXT = "Expected a function";
21706
21130
  * _.isObject(null);
21707
21131
  * // => false
21708
21132
  */ function isObject(value) {
21709
- var type = typeof value === "undefined" ? "undefined" : _type_of$6(value);
21133
+ var type = typeof value === "undefined" ? "undefined" : _type_of$5(value);
21710
21134
  return !!value && (type == "object" || type == "function");
21711
21135
  }
21712
21136
  /**
@@ -21752,7 +21176,7 @@ var FUNC_ERROR_TEXT = "Expected a function";
21752
21176
  * _.isSymbol('abc');
21753
21177
  * // => false
21754
21178
  */ function isSymbol(value) {
21755
- return (typeof value === "undefined" ? "undefined" : _type_of$6(value)) == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
21179
+ return (typeof value === "undefined" ? "undefined" : _type_of$5(value)) == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag;
21756
21180
  }
21757
21181
  /**
21758
21182
  * Converts `value` to a finite number.
@@ -21865,7 +21289,7 @@ function _instanceof$3(left, right) {
21865
21289
  return left instanceof right;
21866
21290
  }
21867
21291
  }
21868
- function _type_of$5(obj) {
21292
+ function _type_of$4(obj) {
21869
21293
  "@swc/helpers - typeof";
21870
21294
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
21871
21295
  }
@@ -22072,7 +21496,7 @@ var sign = function(payload, secretOrPrivateKey, options, callback) {
22072
21496
  return typeof options[opt] !== "undefined";
22073
21497
  });
22074
21498
  if (invalid_options.length > 0) {
22075
- return failure(new Error("invalid " + invalid_options.join(",") + " option for " + (typeof payload === "undefined" ? "undefined" : _type_of$5(payload)) + " payload"));
21499
+ return failure(new Error("invalid " + invalid_options.join(",") + " option for " + (typeof payload === "undefined" ? "undefined" : _type_of$4(payload)) + " payload"));
22076
21500
  }
22077
21501
  }
22078
21502
  if (typeof payload.exp !== "undefined" && typeof options.expiresIn !== "undefined") {
@@ -22167,12 +21591,12 @@ var jsonwebtoken = {
22167
21591
  TokenExpiredError: TokenExpiredError_1
22168
21592
  };
22169
21593
 
22170
- function _class_call_check$7(instance, Constructor) {
21594
+ function _class_call_check$6(instance, Constructor) {
22171
21595
  if (!(instance instanceof Constructor)) {
22172
21596
  throw new TypeError("Cannot call a class as a function");
22173
21597
  }
22174
21598
  }
22175
- function _defineProperties$7(target, props) {
21599
+ function _defineProperties$6(target, props) {
22176
21600
  for(var i = 0; i < props.length; i++){
22177
21601
  var descriptor = props[i];
22178
21602
  descriptor.enumerable = descriptor.enumerable || false;
@@ -22181,9 +21605,9 @@ function _defineProperties$7(target, props) {
22181
21605
  Object.defineProperty(target, descriptor.key, descriptor);
22182
21606
  }
22183
21607
  }
22184
- function _create_class$7(Constructor, protoProps, staticProps) {
22185
- if (protoProps) _defineProperties$7(Constructor.prototype, protoProps);
22186
- if (staticProps) _defineProperties$7(Constructor, staticProps);
21608
+ function _create_class$6(Constructor, protoProps, staticProps) {
21609
+ if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
21610
+ if (staticProps) _defineProperties$6(Constructor, staticProps);
22187
21611
  return Constructor;
22188
21612
  }
22189
21613
  function _define_property$2(obj, key, value) {
@@ -22207,9 +21631,9 @@ function _define_property$2(obj, key, value) {
22207
21631
  * @public
22208
21632
  */ var ClientAssertion = /*#__PURE__*/ function() {
22209
21633
  function ClientAssertion() {
22210
- _class_call_check$7(this, ClientAssertion);
21634
+ _class_call_check$6(this, ClientAssertion);
22211
21635
  }
22212
- _create_class$7(ClientAssertion, [
21636
+ _create_class$6(ClientAssertion, [
22213
21637
  {
22214
21638
  /**
22215
21639
  * Update JWT for certificate based clientAssertion, if passed by the user, uses it as is
@@ -22243,14 +21667,14 @@ function _define_property$2(obj, key, value) {
22243
21667
  this.jwtAudience = jwtAudience;
22244
21668
  var issuedAt = nowSeconds();
22245
21669
  this.expirationTime = issuedAt + 600;
21670
+ var algorithm = this.useSha256 ? JwtConstants.PSS_256 : JwtConstants.RSA_256;
22246
21671
  var header = {
22247
- alg: JwtConstants.RSA_256,
22248
- x5t: EncodingUtils.base64EncodeUrl(this.thumbprint, "hex")
21672
+ alg: algorithm
22249
21673
  };
21674
+ var thumbprintHeader = this.useSha256 ? JwtConstants.X5T_256 : JwtConstants.X5T;
21675
+ Object.assign(header, _define_property$2({}, thumbprintHeader, EncodingUtils.base64EncodeUrl(this.thumbprint, "hex")));
22250
21676
  if (this.publicCertificate) {
22251
- Object.assign(header, {
22252
- x5c: this.publicCertificate
22253
- });
21677
+ Object.assign(header, _define_property$2({}, JwtConstants.X5C, this.publicCertificate));
22254
21678
  }
22255
21679
  var _obj;
22256
21680
  var payload = (_obj = {}, _define_property$2(_obj, JwtConstants.AUDIENCE, this.jwtAudience), _define_property$2(_obj, JwtConstants.EXPIRATION_TIME, this.expirationTime), _define_property$2(_obj, JwtConstants.ISSUER, this.issuer), _define_property$2(_obj, JwtConstants.SUBJECT, this.issuer), _define_property$2(_obj, JwtConstants.NOT_BEFORE, issuedAt), _define_property$2(_obj, JwtConstants.JWT_ID, cryptoProvider.createNewGuid()), _obj);
@@ -22283,6 +21707,7 @@ function _define_property$2(obj, key, value) {
22283
21707
  {
22284
21708
  key: "fromCertificate",
22285
21709
  value: /**
21710
+ * @deprecated Use fromCertificateWithSha256Thumbprint instead, with a SHA-256 thumprint
22286
21711
  * Initialize the ClientAssertion class from the certificate passed by the user
22287
21712
  * @param thumbprint - identifier of a certificate
22288
21713
  * @param privateKey - secret key
@@ -22291,6 +21716,25 @@ function _define_property$2(obj, key, value) {
22291
21716
  var clientAssertion = new ClientAssertion();
22292
21717
  clientAssertion.privateKey = privateKey;
22293
21718
  clientAssertion.thumbprint = thumbprint;
21719
+ clientAssertion.useSha256 = false;
21720
+ if (publicCertificate) {
21721
+ clientAssertion.publicCertificate = this.parseCertificate(publicCertificate);
21722
+ }
21723
+ return clientAssertion;
21724
+ }
21725
+ },
21726
+ {
21727
+ key: "fromCertificateWithSha256Thumbprint",
21728
+ value: /**
21729
+ * Initialize the ClientAssertion class from the certificate passed by the user
21730
+ * @param thumbprint - identifier of a certificate
21731
+ * @param privateKey - secret key
21732
+ * @param publicCertificate - electronic document provided to prove the ownership of the public key
21733
+ */ function fromCertificateWithSha256Thumbprint(thumbprint, privateKey, publicCertificate) {
21734
+ var clientAssertion = new ClientAssertion();
21735
+ clientAssertion.privateKey = privateKey;
21736
+ clientAssertion.thumbprint = thumbprint;
21737
+ clientAssertion.useSha256 = true;
22294
21738
  if (publicCertificate) {
22295
21739
  clientAssertion.publicCertificate = this.parseCertificate(publicCertificate);
22296
21740
  }
@@ -22324,198 +21768,7 @@ function _define_property$2(obj, key, value) {
22324
21768
  }();
22325
21769
 
22326
21770
  /* eslint-disable header/header */ var name = "@azure/msal-node";
22327
- var version = "2.10.0";
22328
-
22329
- function _assert_this_initialized$4(self) {
22330
- if (self === void 0) {
22331
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
22332
- }
22333
- return self;
22334
- }
22335
- function _class_call_check$6(instance, Constructor) {
22336
- if (!(instance instanceof Constructor)) {
22337
- throw new TypeError("Cannot call a class as a function");
22338
- }
22339
- }
22340
- function _defineProperties$6(target, props) {
22341
- for(var i = 0; i < props.length; i++){
22342
- var descriptor = props[i];
22343
- descriptor.enumerable = descriptor.enumerable || false;
22344
- descriptor.configurable = true;
22345
- if ("value" in descriptor) descriptor.writable = true;
22346
- Object.defineProperty(target, descriptor.key, descriptor);
22347
- }
22348
- }
22349
- function _create_class$6(Constructor, protoProps, staticProps) {
22350
- if (protoProps) _defineProperties$6(Constructor.prototype, protoProps);
22351
- if (staticProps) _defineProperties$6(Constructor, staticProps);
22352
- return Constructor;
22353
- }
22354
- function _get_prototype_of$4(o) {
22355
- _get_prototype_of$4 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
22356
- return o.__proto__ || Object.getPrototypeOf(o);
22357
- };
22358
- return _get_prototype_of$4(o);
22359
- }
22360
- function _inherits$4(subClass, superClass) {
22361
- if (typeof superClass !== "function" && superClass !== null) {
22362
- throw new TypeError("Super expression must either be null or a function");
22363
- }
22364
- subClass.prototype = Object.create(superClass && superClass.prototype, {
22365
- constructor: {
22366
- value: subClass,
22367
- writable: true,
22368
- configurable: true
22369
- }
22370
- });
22371
- if (superClass) _set_prototype_of$4(subClass, superClass);
22372
- }
22373
- function _possible_constructor_return$4(self, call) {
22374
- if (call && (_type_of$4(call) === "object" || typeof call === "function")) {
22375
- return call;
22376
- }
22377
- return _assert_this_initialized$4(self);
22378
- }
22379
- function _set_prototype_of$4(o, p) {
22380
- _set_prototype_of$4 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
22381
- o.__proto__ = p;
22382
- return o;
22383
- };
22384
- return _set_prototype_of$4(o, p);
22385
- }
22386
- function _type_of$4(obj) {
22387
- "@swc/helpers - typeof";
22388
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
22389
- }
22390
- function _is_native_reflect_construct$4() {
22391
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
22392
- if (Reflect.construct.sham) return false;
22393
- if (typeof Proxy === "function") return true;
22394
- try {
22395
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
22396
- return true;
22397
- } catch (e) {
22398
- return false;
22399
- }
22400
- }
22401
- function _create_super$4(Derived) {
22402
- var hasNativeReflectConstruct = _is_native_reflect_construct$4();
22403
- return function _createSuperInternal() {
22404
- var Super = _get_prototype_of$4(Derived), result;
22405
- if (hasNativeReflectConstruct) {
22406
- var NewTarget = _get_prototype_of$4(this).constructor;
22407
- result = Reflect.construct(Super, arguments, NewTarget);
22408
- } else {
22409
- result = Super.apply(this, arguments);
22410
- }
22411
- return _possible_constructor_return$4(this, result);
22412
- };
22413
- }
22414
- /*
22415
- * Copyright (c) Microsoft Corporation. All rights reserved.
22416
- * Licensed under the MIT License.
22417
- */ /**
22418
- * NodeAuthErrorMessage class containing string constants used by error codes and messages.
22419
- */ var NodeAuthErrorMessage = {
22420
- invalidLoopbackAddressType: {
22421
- code: "invalid_loopback_server_address_type",
22422
- desc: "Loopback server address is not type string. This is unexpected."
22423
- },
22424
- unableToLoadRedirectUri: {
22425
- code: "unable_to_load_redirectUrl",
22426
- desc: "Loopback server callback was invoked without a url. This is unexpected."
22427
- },
22428
- noAuthCodeInResponse: {
22429
- code: "no_auth_code_in_response",
22430
- desc: "No auth code found in the server response. Please check your network trace to determine what happened."
22431
- },
22432
- noLoopbackServerExists: {
22433
- code: "no_loopback_server_exists",
22434
- desc: "No loopback server exists yet."
22435
- },
22436
- loopbackServerAlreadyExists: {
22437
- code: "loopback_server_already_exists",
22438
- desc: "Loopback server already exists. Cannot create another."
22439
- },
22440
- loopbackServerTimeout: {
22441
- code: "loopback_server_timeout",
22442
- desc: "Timed out waiting for auth code listener to be registered."
22443
- },
22444
- stateNotFoundError: {
22445
- code: "state_not_found",
22446
- desc: "State not found. Please verify that the request originated from msal."
22447
- }
22448
- };
22449
- var NodeAuthError = /*#__PURE__*/ function(AuthError) {
22450
- _inherits$4(NodeAuthError, AuthError);
22451
- var _super = _create_super$4(NodeAuthError);
22452
- function NodeAuthError(errorCode, errorMessage) {
22453
- _class_call_check$6(this, NodeAuthError);
22454
- var _this;
22455
- _this = _super.call(this, errorCode, errorMessage);
22456
- _this.name = "NodeAuthError";
22457
- return _this;
22458
- }
22459
- _create_class$6(NodeAuthError, null, [
22460
- {
22461
- key: "createInvalidLoopbackAddressTypeError",
22462
- value: /**
22463
- * Creates an error thrown if loopback server address is of type string.
22464
- */ function createInvalidLoopbackAddressTypeError() {
22465
- return new NodeAuthError(NodeAuthErrorMessage.invalidLoopbackAddressType.code, "".concat(NodeAuthErrorMessage.invalidLoopbackAddressType.desc));
22466
- }
22467
- },
22468
- {
22469
- key: "createUnableToLoadRedirectUrlError",
22470
- value: /**
22471
- * Creates an error thrown if the loopback server is unable to get a url.
22472
- */ function createUnableToLoadRedirectUrlError() {
22473
- return new NodeAuthError(NodeAuthErrorMessage.unableToLoadRedirectUri.code, "".concat(NodeAuthErrorMessage.unableToLoadRedirectUri.desc));
22474
- }
22475
- },
22476
- {
22477
- key: "createNoAuthCodeInResponseError",
22478
- value: /**
22479
- * Creates an error thrown if the server response does not contain an auth code.
22480
- */ function createNoAuthCodeInResponseError() {
22481
- return new NodeAuthError(NodeAuthErrorMessage.noAuthCodeInResponse.code, "".concat(NodeAuthErrorMessage.noAuthCodeInResponse.desc));
22482
- }
22483
- },
22484
- {
22485
- key: "createNoLoopbackServerExistsError",
22486
- value: /**
22487
- * Creates an error thrown if the loopback server has not been spun up yet.
22488
- */ function createNoLoopbackServerExistsError() {
22489
- return new NodeAuthError(NodeAuthErrorMessage.noLoopbackServerExists.code, "".concat(NodeAuthErrorMessage.noLoopbackServerExists.desc));
22490
- }
22491
- },
22492
- {
22493
- key: "createLoopbackServerAlreadyExistsError",
22494
- value: /**
22495
- * Creates an error thrown if a loopback server already exists when attempting to create another one.
22496
- */ function createLoopbackServerAlreadyExistsError() {
22497
- return new NodeAuthError(NodeAuthErrorMessage.loopbackServerAlreadyExists.code, "".concat(NodeAuthErrorMessage.loopbackServerAlreadyExists.desc));
22498
- }
22499
- },
22500
- {
22501
- key: "createLoopbackServerTimeoutError",
22502
- value: /**
22503
- * Creates an error thrown if the loopback server times out registering the auth code listener.
22504
- */ function createLoopbackServerTimeoutError() {
22505
- return new NodeAuthError(NodeAuthErrorMessage.loopbackServerTimeout.code, "".concat(NodeAuthErrorMessage.loopbackServerTimeout.desc));
22506
- }
22507
- },
22508
- {
22509
- key: "createStateNotFoundError",
22510
- value: /**
22511
- * Creates an error thrown when the state is not present.
22512
- */ function createStateNotFoundError() {
22513
- return new NodeAuthError(NodeAuthErrorMessage.stateNotFoundError.code, NodeAuthErrorMessage.stateNotFoundError.desc);
22514
- }
22515
- }
22516
- ]);
22517
- return NodeAuthError;
22518
- }(AuthError);
21771
+ var version = "2.11.1";
22519
21772
 
22520
21773
  function _assert_this_initialized$3(self) {
22521
21774
  if (self === void 0) {
@@ -25141,7 +24394,7 @@ function _ts_generator$1(thisArg, body) {
25141
24394
  _class_call_check$1(this, ConfidentialClientApplication);
25142
24395
  var _this;
25143
24396
  _this = _super.call(this, configuration);
25144
- _this.setClientCredential(_this.config);
24397
+ _this.setClientCredential();
25145
24398
  _this.appTokenProvider = undefined;
25146
24399
  return _this;
25147
24400
  }
@@ -25325,14 +24578,10 @@ function _ts_generator$1(thisArg, body) {
25325
24578
  },
25326
24579
  {
25327
24580
  key: "setClientCredential",
25328
- value: function setClientCredential(configuration) {
25329
- var clientSecretNotEmpty = !!configuration.auth.clientSecret;
25330
- var clientAssertionNotEmpty = !!configuration.auth.clientAssertion;
25331
- var certificate = configuration.auth.clientCertificate || {
25332
- thumbprint: Constants$1.EMPTY_STRING,
25333
- privateKey: Constants$1.EMPTY_STRING
25334
- };
25335
- var certificateNotEmpty = !!certificate.thumbprint || !!certificate.privateKey;
24581
+ value: function setClientCredential() {
24582
+ var clientSecretNotEmpty = !!this.config.auth.clientSecret;
24583
+ var clientAssertionNotEmpty = !!this.config.auth.clientAssertion;
24584
+ var certificateNotEmpty = (!!this.config.auth.clientCertificate.thumbprint || !!this.config.auth.clientCertificate.thumbprintSha256) && !!this.config.auth.clientCertificate.privateKey;
25336
24585
  /*
25337
24586
  * If app developer configures this callback, they don't need a credential
25338
24587
  * i.e. AzureSDK can get token from Managed Identity without a cert / secret
@@ -25343,19 +24592,19 @@ function _ts_generator$1(thisArg, body) {
25343
24592
  if (clientSecretNotEmpty && clientAssertionNotEmpty || clientAssertionNotEmpty && certificateNotEmpty || clientSecretNotEmpty && certificateNotEmpty) {
25344
24593
  throw createClientAuthError(invalidClientCredential);
25345
24594
  }
25346
- if (configuration.auth.clientSecret) {
25347
- this.clientSecret = configuration.auth.clientSecret;
24595
+ if (this.config.auth.clientSecret) {
24596
+ this.clientSecret = this.config.auth.clientSecret;
25348
24597
  return;
25349
24598
  }
25350
- if (configuration.auth.clientAssertion) {
25351
- this.developerProvidedClientAssertion = configuration.auth.clientAssertion;
24599
+ if (this.config.auth.clientAssertion) {
24600
+ this.developerProvidedClientAssertion = this.config.auth.clientAssertion;
25352
24601
  return;
25353
24602
  }
25354
24603
  if (!certificateNotEmpty) {
25355
24604
  throw createClientAuthError(invalidClientCredential);
25356
24605
  } else {
25357
- var _configuration_auth_clientCertificate;
25358
- this.clientAssertion = ClientAssertion.fromCertificate(certificate.thumbprint, certificate.privateKey, (_configuration_auth_clientCertificate = configuration.auth.clientCertificate) === null || _configuration_auth_clientCertificate === void 0 ? void 0 : _configuration_auth_clientCertificate.x5c);
24606
+ this.clientAssertion = !!this.config.auth.clientCertificate.thumbprintSha256 ? ClientAssertion.fromCertificateWithSha256Thumbprint(this.config.auth.clientCertificate.thumbprintSha256, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c) : ClientAssertion.fromCertificate(// guaranteed to be a string, due to prior error checking in this function
24607
+ this.config.auth.clientCertificate.thumbprint, this.config.auth.clientCertificate.privateKey, this.config.auth.clientCertificate.x5c);
25359
24608
  }
25360
24609
  }
25361
24610
  }