@pendo/agent 2.294.0 → 2.295.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3658,7 +3658,6 @@ var ConfigReader = (function () {
3658
3658
  /* eslint-enable no-console */
3659
3659
  })();
3660
3660
 
3661
- var PROD = 'prod';
3662
3661
  var EXTENSION_INSTALL_TYPE = 'extension';
3663
3662
  var NATIVE_INSTALL_TYPE = 'native';
3664
3663
  function getInstallType() {
@@ -3668,23 +3667,6 @@ function getInstallType() {
3668
3667
  function isExtensionAgent() {
3669
3668
  return getInstallType() === EXTENSION_INSTALL_TYPE;
3670
3669
  }
3671
- function subscriptionBucketPrefix(env) {
3672
- if (env === PROD) {
3673
- return 'pendo-static';
3674
- }
3675
- return globalBucket(env);
3676
- }
3677
- function globalBucket(env) {
3678
- if (env === PROD) {
3679
- return 'pendo-io-static';
3680
- }
3681
- if (env === 'prod-jp') {
3682
- return 'pendo-jp-prod-static';
3683
- }
3684
- var match = /^prod-(.+)$/.exec(env);
3685
- var envId = match && match.length > 1 ? match[1] : env;
3686
- return 'pendo-' + envId + '-static';
3687
- }
3688
3670
 
3689
3671
  function isNativeCode(fn) { return /native/.test(fn); }
3690
3672
  const detectNativeBrowserAPI = (name) => {
@@ -3692,11 +3674,11 @@ const detectNativeBrowserAPI = (name) => {
3692
3674
  return (fn && isNativeCode(fn));
3693
3675
  };
3694
3676
 
3695
- var isOldIE = function (olderThan, tVersion) {
3677
+ function isOldIE(olderThan, tVersion) {
3696
3678
  olderThan = olderThan || 10;
3697
3679
  tVersion = isNaN(trident) ? false : (tVersion ? (trident < tVersion) : true);
3698
3680
  return (tVersion && (msie < olderThan));
3699
- };
3681
+ }
3700
3682
  // "borrowed" from angular.js
3701
3683
  // https://github.com/angular/angular.js/blob/v1.2.27/src/ng/sniffer.js
3702
3684
  // NOTE:
@@ -3710,11 +3692,12 @@ var isOldIE = function (olderThan, tVersion) {
3710
3692
  // we've added trident to track this actual version of IE so we can
3711
3693
  // attempt to handle these cases too.
3712
3694
  // holds major version number for IE or NaN for real browsers
3713
- var msie, trident;
3695
+ const msie = determineMSIE(getUA());
3696
+ const trident = determineTrident(getUA(), msie);
3714
3697
  function pint(str) { return parseInt(str, 10); }
3715
- var lowercase = function (string) { return _.isString(string) ? string.toLowerCase() : string; };
3698
+ function lowercase(string) { return _.isString(string) ? string.toLowerCase() : string; }
3716
3699
  function isMinimumIEVersion(minVersion) {
3717
- var sniffer = this;
3700
+ const sniffer = this;
3718
3701
  if (isNaN(sniffer.msie) || sniffer.msie == null)
3719
3702
  return true;
3720
3703
  return sniffer.msie >= minVersion;
@@ -3724,36 +3707,34 @@ function getUA() {
3724
3707
  }
3725
3708
  // IE 11 changed the format of the UserAgent string.
3726
3709
  // See http://msdn.microsoft.com/en-us/library/ms537503.aspx
3727
- var determineMSIE = function (ua) {
3728
- var v = pint((/msie (\d+)/.exec(lowercase(ua)) || [])[1]);
3729
- if (isNaN(v)) {
3730
- v = pint((/trident\/.*; rv:(\d+)/.exec(lowercase(ua)) || [])[1]);
3731
- }
3732
- return v;
3733
- };
3734
- msie = determineMSIE(getUA());
3735
- var determineTrident = function (ua, ieV) {
3736
- var v = pint((/trident\/(\d+)/.exec(lowercase(ua)) || [])[1]);
3737
- if (isNaN(v) && ieV == 7) {
3738
- v = 3;
3739
- }
3740
- return v;
3741
- };
3742
- trident = determineTrident(getUA(), msie);
3743
- var eventSupport = {};
3744
- var android = pint((/android (\d+)/.exec(lowercase(getUA())) || [])[1]);
3745
- var boxee = /Boxee/i.test(getUA());
3746
- var pdocument = window.document || {};
3747
- var documentMode = pdocument.documentMode;
3748
- var vendorPrefix;
3749
- var vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/;
3750
- var bodyStyle = pdocument.body && pdocument.body.style;
3751
- var transitions = false;
3752
- var animations = false;
3753
- var match;
3710
+ function determineMSIE(userAgent) {
3711
+ let version = pint((/msie (\d+)/.exec(lowercase(userAgent)) || [])[1]);
3712
+ if (isNaN(version)) {
3713
+ version = pint((/trident\/.*; rv:(\d+)/.exec(lowercase(userAgent)) || [])[1]);
3714
+ }
3715
+ return version;
3716
+ }
3717
+ function determineTrident(userAgent, ieVersion) {
3718
+ let version = pint((/trident\/(\d+)/.exec(lowercase(userAgent)) || [])[1]);
3719
+ if (isNaN(version) && ieVersion == 7) {
3720
+ version = 3;
3721
+ }
3722
+ return version;
3723
+ }
3724
+ const eventSupport = {};
3725
+ const android = pint((/android (\d+)/.exec(lowercase(getUA())) || [])[1]);
3726
+ const boxee = /Boxee/i.test(getUA());
3727
+ const pdocument = window.document || {};
3728
+ const documentMode = pdocument.documentMode;
3729
+ let vendorPrefix;
3730
+ const vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/;
3731
+ const bodyStyle = pdocument.body && pdocument.body.style;
3732
+ let transitions = false;
3733
+ let animations = false;
3734
+ let match;
3754
3735
  if (bodyStyle) {
3755
3736
  // eslint-disable-next-line guard-for-in
3756
- for (var prop in bodyStyle) {
3737
+ for (const prop in bodyStyle) {
3757
3738
  match = vendorRegex.exec(prop);
3758
3739
  if (match) {
3759
3740
  vendorPrefix = match[0];
@@ -3771,7 +3752,7 @@ if (bodyStyle) {
3771
3752
  animations = _.isString(pdocument.body.style.webkitAnimation);
3772
3753
  }
3773
3754
  }
3774
- var isChromeExtension = window.chrome && window.chrome.runtime && window.chrome.runtime.id;
3755
+ const isChromeExtension = window.chrome && window.chrome.runtime && window.chrome.runtime.id;
3775
3756
  // Android has history.pushState, but it does not update location correctly
3776
3757
  // so let's not use the history API at all.
3777
3758
  // http://code.google.com/p/android/issues/detail?id=17471
@@ -3779,28 +3760,28 @@ var isChromeExtension = window.chrome && window.chrome.runtime && window.chrome.
3779
3760
  // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has
3780
3761
  // so let's not use the history API also
3781
3762
  // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined
3782
- var shouldWrapNativeHistory = _.memoize(function shouldWrapNativeHistory() {
3783
- var hasNativeHistory = window.history && window.history.pushState && window.history.replaceState;
3784
- var isHistoryFrozen = window.history && _.isFunction(Object.isFrozen) && Object.isFrozen(window.history);
3785
- var historyDescriptors = window.history && _.isFunction(Object.getOwnPropertyDescriptors) && Object.getOwnPropertyDescriptors(window.history);
3786
- var isHistoryWriteable = historyDescriptors && _.get(historyDescriptors, 'pushState.writable', true) && _.get(historyDescriptors, 'replaceState.writable', true);
3787
- var hasAndroidSupport = !(android < 4);
3763
+ const shouldWrapNativeHistory = _.memoize(function shouldWrapNativeHistory() {
3764
+ const hasNativeHistory = window.history && window.history.pushState && window.history.replaceState;
3765
+ const isHistoryFrozen = window.history && _.isFunction(Object.isFrozen) && Object.isFrozen(window.history);
3766
+ const historyDescriptors = window.history && _.isFunction(Object.getOwnPropertyDescriptors) && Object.getOwnPropertyDescriptors(window.history);
3767
+ const isHistoryWriteable = historyDescriptors && _.get(historyDescriptors, 'pushState.writable', true) && _.get(historyDescriptors, 'replaceState.writable', true);
3768
+ const hasAndroidSupport = !(android < 4);
3788
3769
  return !!(hasNativeHistory && !isHistoryFrozen && isHistoryWriteable && hasAndroidSupport && !boxee && !isExtensionAgent());
3789
3770
  });
3790
3771
  function shouldWrapHashChange() {
3791
- var hasNativeHashChange = 'onhashchange' in window;
3772
+ const hasNativeHashChange = 'onhashchange' in window;
3792
3773
  // IE8 compatible mode lies
3793
- var hasSupportedDocMode = (!documentMode || documentMode > 7);
3774
+ const hasSupportedDocMode = (!documentMode || documentMode > 7);
3794
3775
  return !!(hasNativeHashChange && hasSupportedDocMode && !isExtensionAgent());
3795
3776
  }
3796
3777
  function isMobileUserAgent() {
3797
3778
  return (/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i).test(getUA());
3798
3779
  }
3799
- // exports
3800
- var sniffer = {
3801
- // jshint -W018
3780
+ function isSafari(userAgent = getUA()) {
3781
+ return userAgent.indexOf('Safari') >= 0 && !userAgent.indexOf('Chrome') >= 0;
3782
+ }
3783
+ const sniffer = {
3802
3784
  supportsHistoryApi: shouldWrapNativeHistory,
3803
- // jshint +W018
3804
3785
  supportsHashChange: shouldWrapHashChange,
3805
3786
  hasEvent(event) {
3806
3787
  // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
@@ -3809,7 +3790,7 @@ var sniffer = {
3809
3790
  if (event == 'input' && msie == 9)
3810
3791
  return false;
3811
3792
  if (_.isUndefined(eventSupport[event])) {
3812
- var divElm = pdocument.createElement('div');
3793
+ const divElm = pdocument.createElement('div');
3813
3794
  eventSupport[event] = 'on' + event in divElm;
3814
3795
  }
3815
3796
  return eventSupport[event];
@@ -3820,7 +3801,7 @@ var sniffer = {
3820
3801
  android,
3821
3802
  msie,
3822
3803
  msieDocumentMode: documentMode,
3823
- safari: /apple/i.test(navigator.vendor),
3804
+ safari: isSafari(),
3824
3805
  sri: ('integrity' in document.createElement('script')),
3825
3806
  addEventListener: _.isFunction(window.addEventListener),
3826
3807
  MutationObserver: isNativeCode(window.MutationObserver),
@@ -3903,14 +3884,16 @@ var buildArrowDimensionsQM = function (dim, elementPos) {
3903
3884
  // If in module mode, all injected values will be empty.
3904
3885
  // In that case, we'll overwrite them on initAgent via overwriteBuiltConfigWithPendoConfig
3905
3886
  /* eslint-disable agent-eslint-rules/no-gulp-env-references */
3906
- var ENV = '';
3907
- var SERVER = '';
3908
- var ASSET_HOST = '';
3909
- var ASSET_PATH = '';
3910
- var DESIGNER_SERVER = '';
3911
- var VERSION = '2.294.0_';
3912
- var PACKAGE_VERSION = '2.294.0';
3913
- var LOADER = 'xhr';
3887
+ let ENV = '';
3888
+ let GLOBAL_BUCKET = '';
3889
+ let SUBSCRIPTION_BUCKET = '';
3890
+ let SERVER = '';
3891
+ let ASSET_HOST = '';
3892
+ let ASSET_PATH = '';
3893
+ let DESIGNER_SERVER = '';
3894
+ let VERSION = '2.295.0_';
3895
+ let PACKAGE_VERSION = '2.295.0';
3896
+ let LOADER = 'xhr';
3914
3897
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3915
3898
  /**
3916
3899
  * Returns current version of the Agent as a string. Also directly accessible at `pendo.VERSION`.
@@ -3921,26 +3904,31 @@ var LOADER = 'xhr';
3921
3904
  * @example
3922
3905
  * pendo.getVersion() => '2.150.0'
3923
3906
  */
3924
- var getVersion = function () {
3907
+ const getVersion = function () {
3925
3908
  if (isBrowserInQuirksmode()) {
3926
3909
  return VERSION + '+quirksmode';
3927
3910
  }
3928
3911
  return VERSION;
3929
3912
  };
3930
- var overwriteBuiltConfigWithPendoConfig = function () {
3913
+ const overwriteBuiltConfigWithPendoConfig = function () {
3931
3914
  ENV = getPendoConfigValue('env') || ENV;
3932
3915
  SERVER = getPendoConfigValue('server') || SERVER;
3933
3916
  ASSET_HOST = getPendoConfigValue('assetHost') || ASSET_HOST;
3934
3917
  ASSET_PATH = getPendoConfigValue('assetPath') || ASSET_PATH;
3935
3918
  DESIGNER_SERVER = getPendoConfigValue('designerServer') || DESIGNER_SERVER;
3936
- var versionSuffix = isExtensionAgent() ? ENV + '_ext' : ENV;
3919
+ GLOBAL_BUCKET = getPendoConfigValue('globalBucket') || GLOBAL_BUCKET;
3920
+ SUBSCRIPTION_BUCKET = getPendoConfigValue('subscriptionBucket') || SUBSCRIPTION_BUCKET;
3921
+ const versionSuffix = isExtensionAgent() ? ENV + '_ext' : ENV;
3937
3922
  VERSION = PACKAGE_VERSION + '_' + versionSuffix;
3938
3923
  };
3939
3924
  function isProdAgent() {
3940
3925
  return ENV.indexOf('prod') !== -1;
3941
3926
  }
3942
- function isBetaAgent(env, config) {
3943
- return !/prod/.test(env) || isStagingServer(config);
3927
+ function isRCAgent() {
3928
+ return ENV.indexOf('rc') !== -1;
3929
+ }
3930
+ function isBetaAgent(config) {
3931
+ return !isProdAgent() || isStagingServer(config);
3944
3932
  }
3945
3933
 
3946
3934
  var rtrim = /^\s+|\s+$/g;
@@ -11424,25 +11412,17 @@ function isTrustedOrigin(host) {
11424
11412
  return true;
11425
11413
  if (host === getAssetHost())
11426
11414
  return true;
11427
- // Domains that Pendo owns
11428
- var patterns = [
11429
- /^https:\/\/(app|via|adopt)(\.eu|\.us|\.gov|\.jpn|\.hsbc|\.au)?\.pendo\.io$/,
11430
- /^https:\/\/((adopt\.)?us1\.)?(app|via|adopt)\.pendo\.io$/,
11431
- /^https:\/\/([0-9]{8}t[0-9]{4}-dot-)pendo-(io|eu|us1|govramp|jp-prod|hsbc|au)\.appspot\.com$/,
11432
- /^https:\/\/hotfix-(ops|app)-([0-9]+-dot-)pendo-(io|eu|us1|govramp|jp-prod|hsbc|au)\.appspot\.com$/,
11433
- /^https:\/\/pendo-(io|eu|us1|govramp|jp-prod|hsbc|au)-static\.storage\.googleapis\.com$/,
11434
- /^https:\/\/(us1\.)?cdn(\.eu|\.jpn|\.gov|\.hsbc|\.au)?\.pendo\.io$/
11435
- ];
11436
- if (!isProdAgent()) {
11437
- patterns = patterns.concat([
11438
- /^https:\/\/([a-zA-Z0-9-]+\.)*pendo-dev\.com$/,
11439
- /^https:\/\/([a-zA-Z0-9-]+-dot-)?pendo-(dev|test|io|us1|govramp|jp-prod|hsbc|au|batman|magic|atlas|wildlings|ionchef|mobile-guides|mobile-hummus|mobile-fbi|mobile-plat|eu|eu-dev|apollo|security|perfserf|freeze|armada|voc|mcfly|calypso|dap|scrum-ops|ml|helix|uat)\.appspot\.com$/,
11440
- /^https:\/\/via\.pendo\.local:\d{4}$/,
11441
- /^https:\/\/adopt\.pendo\.local:\d{4}$/,
11442
- /^https:\/\/local\.pendo\.io:\d{4}$/,
11443
- new RegExp('^https://pendo-' + ENV + '-static\\.storage\\.googleapis\\.com$')
11444
- ]);
11445
- }
11415
+ // Domains that Pendo owns, will be swapped in by build patches
11416
+ const patterns = [
11417
+ /^https:\/\/(adopt\.)?((us1)\.)?(app|via|adopt|cdn)(\.(au|eu|gov|hsbc|jpn))?\.pendo\.io$/,
11418
+ /^https:\/\/([0-9]{8}t[0-9]{4}-dot-)pendo-(au|eu|govramp|hsbc|io|jp-prod|us1)\.appspot\.com$/,
11419
+ /^https:\/\/hotfix-(ops|app)-([0-9]+-dot-)pendo-(au|eu|govramp|hsbc|io|jp-prod|us1)\.appspot\.com$/,
11420
+ /^https:\/\/pendo-(au|eu|govramp|hsbc|io|jp-prod|us1)-static\.storage\.googleapis\.com$/,
11421
+ /^https:\/\/([a-zA-Z0-9-]+\.?)*\.pendo-dev\.com$/,
11422
+ /^https:\/\/([a-zA-Z0-9-]+-dot-)?pendo-(apollo|armada|atlas|batman|calypso|dap|dev|dr-us-east1|eu-dev|freeze|helix|link|magic|mcfly|ml|mobile-fbi|mobile-guides|mobile-hummus|mobile-plat|perfserf|voc|wildlings|ionchef|scrum-ops|security|test|uat|au|eu|govramp|hsbc|io|jp-prod|us1)\.appspot\.com$/,
11423
+ /^https:\/\/(via|adopt|local)\.pendo\.(local|io):\d{4}$/,
11424
+ /^https:\/\/pendo-(apollo|armada|atlas|batman|calypso|dap|dev|dr-us-east1|eu-dev|freeze|helix|link|magic|mcfly|ml|mobile-fbi|mobile-guides|mobile-hummus|mobile-plat|perfserf|voc|wildlings|ionchef|scrum-ops|security|test|uat)-static\.storage\.googleapis\.com$/
11425
+ ]; // eslint-disable-line agent-eslint-rules/no-gulp-env-references
11446
11426
  var adoptHost = ConfigReader.get('adoptHost');
11447
11427
  if (adoptHost) {
11448
11428
  var fullHostname = 'https://' + adoptHost;
@@ -11491,7 +11471,7 @@ function addIntegrityAttribute(element, url) {
11491
11471
  var trustedOriginForLoadResource = function (origin) {
11492
11472
  var noAllowedOriginServers = ConfigReader.get('allowedOriginServers', []).length === 0;
11493
11473
  var isAdoptPartner = treatAsAdoptPartner();
11494
- if (noAllowedOriginServers || isAdoptPartner || !isBetaAgent(ENV, getPendoConfig())) {
11474
+ if (noAllowedOriginServers || isAdoptPartner || !isBetaAgent(getPendoConfig())) {
11495
11475
  return true;
11496
11476
  }
11497
11477
  return isTrustedOrigin(origin);
@@ -14615,11 +14595,11 @@ function replaceWithContentHost(str) {
14615
14595
  var contentHost = ConfigReader.getLocalConfig('contentHost');
14616
14596
  if (!contentHost || !str)
14617
14597
  return str;
14618
- var subBucketPattern = new RegExp('(https:)?\\/\\/' + subscriptionBucketPrefix(ENV) + '-\\d+\\.storage\\.googleapis\\.com', 'g');
14619
- var globalBucketPattern = new RegExp('(https:)?\\/\\/' + globalBucket(ENV) + '\\.storage\\.googleapis\\.com', 'g');
14598
+ var subBucketPattern = new RegExp(`(https:)?\\/\\/${SUBSCRIPTION_BUCKET}-\\d+\\.storage\\.googleapis\\.com`, 'g');
14599
+ var globalBucketPattern = new RegExp(`(https:)?\\/\\/${GLOBAL_BUCKET}\\.storage\\.googleapis\\.com`, 'g');
14620
14600
  return str.replace(subBucketPattern, contentHost)
14621
14601
  .replace(globalBucketPattern, contentHost)
14622
- .replace(new RegExp('(https:)?\\/\\/' + escapeRegExp(ASSET_HOST), 'g'), contentHost);
14602
+ .replace(new RegExp(`(https:)?\\/\\/${escapeRegExp(ASSET_HOST)}`, 'g'), contentHost);
14623
14603
  }
14624
14604
  function replaceObjectWithContentHost(obj) {
14625
14605
  var contentHost = ConfigReader.getLocalConfig('contentHost');
@@ -21927,6 +21907,11 @@ function startPreviewMode(window) {
21927
21907
  enableCookies(false);
21928
21908
  buffers.lock();
21929
21909
  setGuideLoader(PreviewGuideLoader);
21910
+ // This is to allow for data urls when previewing from the designer
21911
+ if (isInDesignerPreviewMode()) {
21912
+ const pendoConfig = getPendoConfig();
21913
+ pendoConfig.allowedOriginServers = [];
21914
+ }
21930
21915
  Events.startPreview.trigger();
21931
21916
  Events.leaderChanged.on(function (e) {
21932
21917
  store.dispatch('preview/write');
@@ -27202,6 +27187,14 @@ var GuideActivity = (function () {
27202
27187
  function isEventOnTextLink(appData) {
27203
27188
  return !!getTextLink(appData);
27204
27189
  }
27190
+ function getStepIdFromAppData(appData) {
27191
+ if (!appData)
27192
+ return;
27193
+ if (/^pendo-g-/.test(appData.id)) {
27194
+ return appData.id.replace(/^pendo-g-/, '');
27195
+ }
27196
+ return getStepIdFromAppData(appData.parentElem);
27197
+ }
27205
27198
  function getTextLink(appData) {
27206
27199
  if (appData.tag === 'A') {
27207
27200
  return { type: appData.tag, id: appData.id };
@@ -27399,7 +27392,19 @@ var GuideActivity = (function () {
27399
27392
  if (guide)
27400
27393
  return guide;
27401
27394
  }
27402
- return getActiveGuide();
27395
+ const stepId = getStepIdFromAppData(appData);
27396
+ const activeGuide = getActiveGuide();
27397
+ if (stepId && activeGuide && activeGuide.step && stepId != activeGuide.step.id) {
27398
+ let step;
27399
+ const guide = _.find(getLocalActiveGuides(), function (guide) {
27400
+ step = _.find(guide.steps, (step) => step.id === stepId);
27401
+ return !!step;
27402
+ });
27403
+ if (guide && step) {
27404
+ return { guide, step };
27405
+ }
27406
+ }
27407
+ return activeGuide;
27403
27408
  }
27404
27409
  })();
27405
27410
 
@@ -28917,13 +28922,13 @@ var logHistory = [];
28917
28922
  var errorHistory = [];
28918
28923
  const LOG_ENABLED = 'log-enabled';
28919
28924
  const ACTIVE_CONTEXTS = 'active-contexts';
28920
- var getDefaultLogOverride = function (env) {
28925
+ var getDefaultLogOverride = function () {
28921
28926
  var isEnabledCookie = agentStorage.read(LOG_ENABLED, true);
28922
28927
  if (isEnabledCookie !== null) {
28923
28928
  return isEnabledCookie == 'true';
28924
28929
  }
28925
28930
  // add welcome message and list logging status + contexts
28926
- return !_.contains(['prod', 'prod-eu', 'prod-us1', 'prod-jp', 'prod-hsbc', 'prod-au', 'prod-gov', 'rc'], env);
28931
+ return !isProdAgent() && !isRCAgent();
28927
28932
  };
28928
28933
  var getDefaultActiveContexts = function () {
28929
28934
  var ac = agentStorage.read(ACTIVE_CONTEXTS, true);
@@ -28968,7 +28973,7 @@ var disableLogging = function () {
28968
28973
  };
28969
28974
  function initLogging() {
28970
28975
  activeContexts = getDefaultActiveContexts();
28971
- logOverride = getDefaultLogOverride(ENV);
28976
+ logOverride = getDefaultLogOverride();
28972
28977
  log.addEventListener('log', writeLog);
28973
28978
  /**
28974
28979
  * Stores console logging status, set with `pendo.enableLogging()` or `pendo.disableLogging()`.
@@ -29961,7 +29966,7 @@ function LocationPublic(cmd) {
29961
29966
  }
29962
29967
  _.extend(LocationPublic, {
29963
29968
  getHref() {
29964
- return store.getters['location/href']();
29969
+ return pendoDotUrl.get();
29965
29970
  },
29966
29971
  clearTransforms() {
29967
29972
  store.commit('location/clearTransforms');
@@ -33608,6 +33613,9 @@ const DebuggerModule = (() => {
33608
33613
  // Unlike eligibility, here we're collecting all events into a singular list
33609
33614
  // this list is reverse chronological order
33610
33615
  state.eventsCaptured.unshift(event);
33616
+ if (state.eventsCaptured.length > 100) {
33617
+ state.eventsCaptured.pop();
33618
+ }
33611
33619
  },
33612
33620
  enableEventLogging(state, enabled) {
33613
33621
  state.enableEventLogging = enabled;
@@ -56071,11 +56079,12 @@ function isNativeCode(fn) { return /native/.test(fn); }
56071
56079
  // we've added trident to track this actual version of IE so we can
56072
56080
  // attempt to handle these cases too.
56073
56081
  // holds major version number for IE or NaN for real browsers
56074
- var msie;
56082
+ const msie = determineMSIE(getUA());
56083
+ determineTrident(getUA(), msie);
56075
56084
  function pint(str) { return parseInt(str, 10); }
56076
- var lowercase = function (string) { return _.isString(string) ? string.toLowerCase() : string; };
56085
+ function lowercase(string) { return _.isString(string) ? string.toLowerCase() : string; }
56077
56086
  function isMinimumIEVersion(minVersion) {
56078
- var sniffer = this;
56087
+ const sniffer = this;
56079
56088
  if (isNaN(sniffer.msie) || sniffer.msie == null)
56080
56089
  return true;
56081
56090
  return sniffer.msie >= minVersion;
@@ -56085,36 +56094,34 @@ function getUA() {
56085
56094
  }
56086
56095
  // IE 11 changed the format of the UserAgent string.
56087
56096
  // See http://msdn.microsoft.com/en-us/library/ms537503.aspx
56088
- var determineMSIE = function (ua) {
56089
- var v = pint((/msie (\d+)/.exec(lowercase(ua)) || [])[1]);
56090
- if (isNaN(v)) {
56091
- v = pint((/trident\/.*; rv:(\d+)/.exec(lowercase(ua)) || [])[1]);
56092
- }
56093
- return v;
56094
- };
56095
- msie = determineMSIE(getUA());
56096
- var determineTrident = function (ua, ieV) {
56097
- var v = pint((/trident\/(\d+)/.exec(lowercase(ua)) || [])[1]);
56098
- if (isNaN(v) && ieV == 7) {
56099
- v = 3;
56100
- }
56101
- return v;
56102
- };
56103
- determineTrident(getUA(), msie);
56104
- var eventSupport = {};
56105
- var android = pint((/android (\d+)/.exec(lowercase(getUA())) || [])[1]);
56106
- var boxee = /Boxee/i.test(getUA());
56107
- var pdocument = window.document || {};
56108
- var documentMode = pdocument.documentMode;
56109
- var vendorPrefix;
56110
- var vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/;
56111
- var bodyStyle = pdocument.body && pdocument.body.style;
56112
- var transitions = false;
56113
- var animations = false;
56114
- var match;
56097
+ function determineMSIE(userAgent) {
56098
+ let version = pint((/msie (\d+)/.exec(lowercase(userAgent)) || [])[1]);
56099
+ if (isNaN(version)) {
56100
+ version = pint((/trident\/.*; rv:(\d+)/.exec(lowercase(userAgent)) || [])[1]);
56101
+ }
56102
+ return version;
56103
+ }
56104
+ function determineTrident(userAgent, ieVersion) {
56105
+ let version = pint((/trident\/(\d+)/.exec(lowercase(userAgent)) || [])[1]);
56106
+ if (isNaN(version) && ieVersion == 7) {
56107
+ version = 3;
56108
+ }
56109
+ return version;
56110
+ }
56111
+ const eventSupport = {};
56112
+ const android = pint((/android (\d+)/.exec(lowercase(getUA())) || [])[1]);
56113
+ const boxee = /Boxee/i.test(getUA());
56114
+ const pdocument = window.document || {};
56115
+ const documentMode = pdocument.documentMode;
56116
+ let vendorPrefix;
56117
+ const vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/;
56118
+ const bodyStyle = pdocument.body && pdocument.body.style;
56119
+ let transitions = false;
56120
+ let animations = false;
56121
+ let match;
56115
56122
  if (bodyStyle) {
56116
56123
  // eslint-disable-next-line guard-for-in
56117
- for (var prop in bodyStyle) {
56124
+ for (const prop in bodyStyle) {
56118
56125
  match = vendorRegex.exec(prop);
56119
56126
  if (match) {
56120
56127
  vendorPrefix = match[0];
@@ -56132,7 +56139,7 @@ if (bodyStyle) {
56132
56139
  animations = _.isString(pdocument.body.style.webkitAnimation);
56133
56140
  }
56134
56141
  }
56135
- var isChromeExtension = window.chrome && window.chrome.runtime && window.chrome.runtime.id;
56142
+ const isChromeExtension = window.chrome && window.chrome.runtime && window.chrome.runtime.id;
56136
56143
  // Android has history.pushState, but it does not update location correctly
56137
56144
  // so let's not use the history API at all.
56138
56145
  // http://code.google.com/p/android/issues/detail?id=17471
@@ -56140,28 +56147,28 @@ var isChromeExtension = window.chrome && window.chrome.runtime && window.chrome.
56140
56147
  // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has
56141
56148
  // so let's not use the history API also
56142
56149
  // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined
56143
- var shouldWrapNativeHistory = _.memoize(function shouldWrapNativeHistory() {
56144
- var hasNativeHistory = window.history && window.history.pushState && window.history.replaceState;
56145
- var isHistoryFrozen = window.history && _.isFunction(Object.isFrozen) && Object.isFrozen(window.history);
56146
- var historyDescriptors = window.history && _.isFunction(Object.getOwnPropertyDescriptors) && Object.getOwnPropertyDescriptors(window.history);
56147
- var isHistoryWriteable = historyDescriptors && _.get(historyDescriptors, 'pushState.writable', true) && _.get(historyDescriptors, 'replaceState.writable', true);
56148
- var hasAndroidSupport = !(android < 4);
56150
+ const shouldWrapNativeHistory = _.memoize(function shouldWrapNativeHistory() {
56151
+ const hasNativeHistory = window.history && window.history.pushState && window.history.replaceState;
56152
+ const isHistoryFrozen = window.history && _.isFunction(Object.isFrozen) && Object.isFrozen(window.history);
56153
+ const historyDescriptors = window.history && _.isFunction(Object.getOwnPropertyDescriptors) && Object.getOwnPropertyDescriptors(window.history);
56154
+ const isHistoryWriteable = historyDescriptors && _.get(historyDescriptors, 'pushState.writable', true) && _.get(historyDescriptors, 'replaceState.writable', true);
56155
+ const hasAndroidSupport = !(android < 4);
56149
56156
  return !!(hasNativeHistory && !isHistoryFrozen && isHistoryWriteable && hasAndroidSupport && !boxee && !isExtensionAgent());
56150
56157
  });
56151
56158
  function shouldWrapHashChange() {
56152
- var hasNativeHashChange = 'onhashchange' in window;
56159
+ const hasNativeHashChange = 'onhashchange' in window;
56153
56160
  // IE8 compatible mode lies
56154
- var hasSupportedDocMode = (!documentMode || documentMode > 7);
56161
+ const hasSupportedDocMode = (!documentMode || documentMode > 7);
56155
56162
  return !!(hasNativeHashChange && hasSupportedDocMode && !isExtensionAgent());
56156
56163
  }
56157
56164
  function isMobileUserAgent() {
56158
56165
  return (/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i).test(getUA());
56159
56166
  }
56160
- // exports
56161
- var sniffer = {
56162
- // jshint -W018
56167
+ function isSafari(userAgent = getUA()) {
56168
+ return userAgent.indexOf('Safari') >= 0 && !userAgent.indexOf('Chrome') >= 0;
56169
+ }
56170
+ const sniffer = {
56163
56171
  supportsHistoryApi: shouldWrapNativeHistory,
56164
- // jshint +W018
56165
56172
  supportsHashChange: shouldWrapHashChange,
56166
56173
  hasEvent(event) {
56167
56174
  // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
@@ -56170,7 +56177,7 @@ var sniffer = {
56170
56177
  if (event == 'input' && msie == 9)
56171
56178
  return false;
56172
56179
  if (_.isUndefined(eventSupport[event])) {
56173
- var divElm = pdocument.createElement('div');
56180
+ const divElm = pdocument.createElement('div');
56174
56181
  eventSupport[event] = 'on' + event in divElm;
56175
56182
  }
56176
56183
  return eventSupport[event];
@@ -56181,7 +56188,7 @@ var sniffer = {
56181
56188
  android,
56182
56189
  msie,
56183
56190
  msieDocumentMode: documentMode,
56184
- safari: /apple/i.test(navigator.vendor),
56191
+ safari: isSafari(),
56185
56192
  sri: ('integrity' in document.createElement('script')),
56186
56193
  addEventListener: _.isFunction(window.addEventListener),
56187
56194
  MutationObserver: isNativeCode(window.MutationObserver),