@pendo/agent 2.289.0 → 2.289.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dom.esm.js CHANGED
@@ -7292,7 +7292,7 @@ function getScreenPosition(element) {
7292
7292
  };
7293
7293
  }
7294
7294
 
7295
- var VERSION = '2.289.0_';
7295
+ var VERSION = '2.289.1_';
7296
7296
 
7297
7297
  var decodeURIComponent = _.isFunction(window.decodeURIComponent) ? window.decodeURIComponent : _.identity;
7298
7298
 
@@ -3903,8 +3903,8 @@ var SERVER = '';
3903
3903
  var ASSET_HOST = '';
3904
3904
  var ASSET_PATH = '';
3905
3905
  var DESIGNER_SERVER = '';
3906
- var VERSION = '2.289.0_';
3907
- var PACKAGE_VERSION = '2.289.0';
3906
+ var VERSION = '2.289.1_';
3907
+ var PACKAGE_VERSION = '2.289.1';
3908
3908
  var LOADER = 'xhr';
3909
3909
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3910
3910
  /**
@@ -47089,28 +47089,18 @@ class SessionRecorder {
47089
47089
  clearTimeout(this._changeIdentityTimer);
47090
47090
  this.visitorId = options.visitor.id;
47091
47091
  this.accountId = options.account.id;
47092
- return this.checkVisitorEligibility();
47093
- }
47094
- }
47095
- checkVisitorEligibility(continuationCallback) {
47096
- if (!this.isRecording() && this.pendo._.isNull(this.visitorId) && this.pendo._.isNull(this.accountId))
47097
- return;
47098
- return this.fetchVisitorConfig().then(visitorConfig => {
47099
- if ((!visitorConfig || !visitorConfig.enable) && this.isRecording()) {
47100
- this.stop();
47101
- }
47102
- if (visitorConfig && visitorConfig.enable && this.isRecording()) {
47103
- if (continuationCallback) {
47104
- continuationCallback.call(this);
47092
+ return this.fetchVisitorConfig().then(visitorConfig => {
47093
+ if ((!visitorConfig || !visitorConfig.enable) && this.isRecording()) {
47094
+ this.stop();
47105
47095
  }
47106
- }
47107
- if (visitorConfig && visitorConfig.enable && !this.isRecording()) {
47108
- this._startRecordingForVisitor(visitorConfig);
47109
- }
47110
- }).catch((e) => {
47111
- this.api.log.critical('Failed to re-fetch recording config', { error: e });
47112
- this.logStopReason('VISITOR_CONFIG_ERROR');
47113
- });
47096
+ else if (visitorConfig && visitorConfig.enable && !this.isRecording()) {
47097
+ this._startRecordingForVisitor(visitorConfig);
47098
+ }
47099
+ }).catch((e) => {
47100
+ this.api.log.critical('Failed to re-fetch recording config', { error: e });
47101
+ this.logStopReason('VISITOR_CONFIG_ERROR');
47102
+ });
47103
+ }
47114
47104
  }
47115
47105
  snapshot() {
47116
47106
  if (!this.isRecording())
@@ -47372,12 +47362,9 @@ class SessionRecorder {
47372
47362
  this.storeLastUserInteractionEventInformation(event, this.visitorId, this.accountId, skipUserInteractionCheck);
47373
47363
  const inactivityDuration = this.pendo._.get(this.visitorConfig, 'inactivityDuration', THIRTY_MINUTES);
47374
47364
  if (prevLastEmitTime && event.timestamp - prevLastEmitTime > inactivityDuration && !isSnapshot && !isMeta) {
47375
- const continuationCallback = function () {
47376
- this.send();
47377
- this.clearSessionInfo();
47378
- this.snapshot();
47379
- };
47380
- this.checkVisitorEligibility(continuationCallback);
47365
+ this.send();
47366
+ this.clearSessionInfo();
47367
+ this.snapshot();
47381
47368
  return; // ignore this current event, since we're about to get a fresh snapshot
47382
47369
  }
47383
47370
  /*
@@ -47413,16 +47400,8 @@ class SessionRecorder {
47413
47400
  const exceedsEventFreq = this.eventsSinceLastKeyFrame >= this.pendo._.get(this.visitorConfig, 'keyframeEventFrequency', 4548); // Defaults determined by BE originally, shouldn't really ever be used
47414
47401
  const exceedsRecordingSizeLimit = this.currentRecordingSize >= this.pendo._.get(this.visitorConfig, 'recordingSizeLimit', ONE_HUNDRED_MB_IN_BYTES);
47415
47402
  if (exceeds24Hours || (exceedsTimeFreq && exceedsEventFreq) || exceedsRecordingSizeLimit) {
47416
- const continuationCallback = function () {
47417
- this.currentRecordingSize = 0;
47418
- this.snapshot();
47419
- };
47420
- if (exceeds24Hours) {
47421
- this.checkVisitorEligibility(continuationCallback);
47422
- }
47423
- else {
47424
- continuationCallback.call(this);
47425
- }
47403
+ this.currentRecordingSize = 0;
47404
+ this.snapshot();
47426
47405
  }
47427
47406
  }
47428
47407
  }