@pendo/agent 2.285.2 → 2.286.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.
@@ -3522,8 +3522,6 @@ var ConfigReader = (function () {
3522
3522
  addOption('trainingPartner');
3523
3523
  // Frustration
3524
3524
  addOption('errorClickLogging', [PENDO_CONFIG_SRC], false);
3525
- // Internal
3526
- addOption('forceParentDesigner', [SNIPPET_SRC]); // Only works in non-prod environments for automated testing
3527
3525
  // Embedded Guides
3528
3526
  addOption('enableAllEmbeddedGuideEvents', [PENDO_CONFIG_SRC], false);
3529
3527
  // Form Validation
@@ -3905,8 +3903,8 @@ var SERVER = '';
3905
3903
  var ASSET_HOST = '';
3906
3904
  var ASSET_PATH = '';
3907
3905
  var DESIGNER_SERVER = '';
3908
- var VERSION = '2.285.2_';
3909
- var PACKAGE_VERSION = '2.285.2';
3906
+ var VERSION = '2.286.0_';
3907
+ var PACKAGE_VERSION = '2.286.0';
3910
3908
  var LOADER = 'xhr';
3911
3909
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3912
3910
  /**
@@ -4388,6 +4386,21 @@ function createStorageShim(storageAccessor) {
4388
4386
  var pendoLocalStorage$4 = createStorageShim(function () { return window.localStorage; });
4389
4387
  var pendoSessionStorage$2 = createStorageShim(function () { return window.sessionStorage; });
4390
4388
 
4389
+ /**
4390
+ * Safely deserializes JSON if value is a valid json string.
4391
+ * If the argument is falsy or JSON.parse throws an exception, returns null.
4392
+ *
4393
+ * @param {string} value - The JSON string to parse
4394
+ * @returns {object} | {null} - The parsed object or null if parsing fails
4395
+ */
4396
+ function SafeJsonDeserializer(value) {
4397
+ try {
4398
+ return JSON.parse(value);
4399
+ }
4400
+ catch (error) {
4401
+ return null;
4402
+ }
4403
+ }
4391
4404
  var inMemoryCookies = {};
4392
4405
  var cookieDomain;
4393
4406
  var areCookiesEnabled = true;
@@ -4487,11 +4500,11 @@ class StorageRegistry {
4487
4500
  constructor() {
4488
4501
  this.keys = {};
4489
4502
  }
4490
- addLocal(key) {
4491
- this._add(key, 'local');
4503
+ addLocal(key, config) {
4504
+ this._add(key, 'local', config);
4492
4505
  }
4493
- addSession(key) {
4494
- this._add(key, 'session');
4506
+ addSession(key, config) {
4507
+ this._add(key, 'session', config);
4495
4508
  }
4496
4509
  hasLocal(key) {
4497
4510
  return this._has(key, 'local');
@@ -4499,13 +4512,46 @@ class StorageRegistry {
4499
4512
  hasSession(key) {
4500
4513
  return this._has(key, 'session');
4501
4514
  }
4502
- _add(key, type) {
4515
+ getKeyConfig(key, option, override) {
4516
+ if (doesExist(override)) {
4517
+ return override;
4518
+ }
4519
+ if (!this.keys[key]) {
4520
+ return undefined;
4521
+ }
4522
+ return this.keys[key][option];
4523
+ }
4524
+ getKeySerializer(key) {
4525
+ if (!this.keys[key]) {
4526
+ return _.identity;
4527
+ }
4528
+ return this.keys[key].serializer;
4529
+ }
4530
+ getKeyDeserializer(key) {
4531
+ if (!this.keys[key]) {
4532
+ return _.identity;
4533
+ }
4534
+ return this.keys[key].deserializer;
4535
+ }
4536
+ _add(key, type, config = {}) {
4537
+ config = _.extend({
4538
+ type,
4539
+ duration: null,
4540
+ isPlain: false,
4541
+ isSecure: false,
4542
+ cookieSuffix: undefined,
4543
+ serializer: _.identity,
4544
+ deserializer: _.identity
4545
+ }, config);
4503
4546
  if (this.keys[key])
4504
4547
  return;
4505
- this.keys[key] = type;
4548
+ this.keys[key] = config;
4506
4549
  }
4507
4550
  _has(key, type) {
4508
- return this.keys[key] === type;
4551
+ if (this.keys[key]) {
4552
+ return this.keys[key].type === type;
4553
+ }
4554
+ return false;
4509
4555
  }
4510
4556
  }
4511
4557
  /*
@@ -4571,21 +4617,28 @@ var agentStorage = (function () {
4571
4617
  }
4572
4618
  }
4573
4619
  // Will always return a string or null
4620
+ // no longer true as a deserializer added for a key will allow for any return value.
4621
+ // maintaining null as a non success return value should be the norm
4574
4622
  function read(name, isPlain, cookieSuffix) {
4623
+ isPlain = registry.getKeyConfig(name, 'isPlain', isPlain);
4624
+ cookieSuffix = registry.getKeyConfig(name, 'cookieSuffix', cookieSuffix);
4625
+ let rawValue;
4575
4626
  if (canUseLocalStorage()) {
4576
4627
  var key = !isPlain ? getPendoCookieKey(name, cookieSuffix) : name;
4577
- var val = ttlApply(localStorage.getItem(key));
4578
- if (val === null) {
4628
+ rawValue = ttlApply(localStorage.getItem(key));
4629
+ if (rawValue === null) {
4579
4630
  clear(name, isPlain, cookieSuffix);
4580
4631
  }
4581
- return val;
4582
- }
4583
- if (!isPlain) {
4584
- return get_pendo_cookie(name, cookieSuffix);
4585
4632
  }
4586
4633
  else {
4587
- return getCookie(name);
4634
+ if (!isPlain) {
4635
+ rawValue = get_pendo_cookie(name, cookieSuffix);
4636
+ }
4637
+ else {
4638
+ rawValue = getCookie(name);
4639
+ }
4588
4640
  }
4641
+ return registry.getKeyDeserializer(name)(rawValue);
4589
4642
  }
4590
4643
  function ttlApply(value) {
4591
4644
  if (value === null)
@@ -4608,6 +4661,11 @@ var agentStorage = (function () {
4608
4661
  }
4609
4662
  // consider assert type of val (what do we support? string, number, boolean? )
4610
4663
  function write(name, val, duration, isPlain, isSecure, cookieSuffix) {
4664
+ duration = registry.getKeyConfig(name, 'duration', duration);
4665
+ isPlain = registry.getKeyConfig(name, 'isPlain', isPlain);
4666
+ isSecure = registry.getKeyConfig(name, 'isSecure', isSecure);
4667
+ cookieSuffix = registry.getKeyConfig(name, 'cookieSuffix', cookieSuffix);
4668
+ val = registry.getKeySerializer(name)(val);
4611
4669
  resetCache(storageAvailable);
4612
4670
  if (canUseLocalStorage()) {
4613
4671
  // We'll try to write but if that fails, just fall down to cookies.
@@ -4637,6 +4695,8 @@ var agentStorage = (function () {
4637
4695
  });
4638
4696
  }
4639
4697
  function clear(name, isPlain, cookieSuffix) {
4698
+ isPlain = registry.getKeyConfig(name, 'isPlain', isPlain);
4699
+ cookieSuffix = registry.getKeyConfig(name, 'cookieSuffix', cookieSuffix);
4640
4700
  var key = !isPlain ? getPendoCookieKey(name, cookieSuffix) : name;
4641
4701
  if (canUseLocalStorage()) {
4642
4702
  return localStorage.removeItem(key);
@@ -11703,12 +11763,6 @@ var detectMaster = function () {
11703
11763
  };
11704
11764
  var getDesignerWindow = function () {
11705
11765
  var isPendo = new RegExp('^' + escapeRegExp(HOST).replace(/^https?:/, 'https?:'));
11706
- // If we are not in production then we will allow the config to force
11707
- // the designer window to just be parent instead of top. This is there
11708
- // to make cypress testing of Classic Designer (P1) work.
11709
- var forceParentDesigner = ConfigReader.get('forceParentDesigner');
11710
- if (!isProdAgent() && forceParentDesigner)
11711
- return window.parent;
11712
11766
  // If the agent is running in a Pendo app instance, talk to the
11713
11767
  // parent window to enable "inception mode", otherwise talk
11714
11768
  // directly to the top window.
@@ -11999,8 +12053,8 @@ class SendQueue {
11999
12053
  return failureCount;
12000
12054
  }
12001
12055
  pass(payload, dequeue = true) {
12002
- this.unloads['delete'](payload);
12003
- this.pending['delete'](payload);
12056
+ this.unloads.delete(payload);
12057
+ this.pending.delete(payload);
12004
12058
  this.failures.clear();
12005
12059
  const index = this.queue.indexOf(payload);
12006
12060
  if (index >= 0) {
@@ -12011,8 +12065,8 @@ class SendQueue {
12011
12065
  }
12012
12066
  }
12013
12067
  fail(payload, retry = true) {
12014
- this.unloads['delete'](payload);
12015
- this.pending['delete'](payload);
12068
+ this.unloads.delete(payload);
12069
+ this.pending.delete(payload);
12016
12070
  const failureCount = this.incrementFailure(payload);
12017
12071
  if (this.stopped || !retry)
12018
12072
  return;
@@ -14405,7 +14459,7 @@ var ContentLoader = (function (pendo) {
14405
14459
  log.critical(new Error('Response from the guide was not in proper JSON format'));
14406
14460
  entry.deferred.domJson.reject();
14407
14461
  }
14408
- })['catch'](function (e) {
14462
+ }).catch(function (e) {
14409
14463
  log.critical(e);
14410
14464
  Events.resourceFetchFail.trigger(contentContainer, e);
14411
14465
  entry.deferred.domJson.reject('Failed to load content');
@@ -14642,7 +14696,7 @@ var AsyncContent = (function () {
14642
14696
  return q.all(_.map(toProcess, (tuple) => {
14643
14697
  return AsyncContent.fetchContent(tuple[1]).then((resolution) => {
14644
14698
  tuple[0].resolve(resolution);
14645
- })['catch']((rejection) => {
14699
+ }).catch((rejection) => {
14646
14700
  tuple[0].reject(rejection);
14647
14701
  });
14648
14702
  }));
@@ -15247,7 +15301,7 @@ var BuildingBlockTemplates = (function () {
15247
15301
  delete listItem.templateChildren;
15248
15302
  listItem.props.id = listItem.props.id + '-' + index;
15249
15303
  listItem.props['data-pendo-show-guide-id'] = guide.id;
15250
- listItem.props['class'] += ' pendo-task-list-item';
15304
+ listItem.props.class += ' pendo-task-list-item';
15251
15305
  if (!listItem.actions)
15252
15306
  listItem.actions = [];
15253
15307
  var listItemAction = {
@@ -15376,7 +15430,7 @@ var BuildingBlockTemplates = (function () {
15376
15430
  miniBubble.props.style.top = guideTopPadding + containerTopPadding + 5 + 'px';
15377
15431
  }
15378
15432
  if (!BuildingBlockResourceCenter.hasAnnouncementBeenSeen(guide) && miniBubble) {
15379
- listItem.props['class'] += ' pendo-unseen-announcement';
15433
+ listItem.props.class += ' pendo-unseen-announcement';
15380
15434
  listItem.children.unshift(miniBubble);
15381
15435
  }
15382
15436
  delete listItem.templateName;
@@ -15402,7 +15456,7 @@ var BuildingBlockTemplates = (function () {
15402
15456
  miniBubble.props.style.top = '20px';
15403
15457
  }
15404
15458
  if (!BuildingBlockResourceCenter.hasAnnouncementBeenSeen(guide) && miniBubble) {
15405
- listItem.props['class'] += ' pendo-unseen-announcement';
15459
+ listItem.props.class += ' pendo-unseen-announcement';
15406
15460
  listItem.children = [miniBubble];
15407
15461
  }
15408
15462
  var listItemContainer = buildNodeFromJSON(listItem, announcementStep);
@@ -17967,7 +18021,7 @@ var updateVisitorOptions = function (options = {}) {
17967
18021
  * @category Identity
17968
18022
  * @param {object} options new metadata to set in the agent
17969
18023
  * @example
17970
- * pendo.updateOptions( { visitor: {"role":"admin"} }, { account: {"industry":"retail"} });
18024
+ * pendo.updateOptions( { visitor: { "role":"admin" } , account: { "industry":"retail" } });
17971
18025
  */
17972
18026
  var updateOptions = makeSafe(function (options) {
17973
18027
  var changedOptions = updateVisitorOptions(options);
@@ -18348,7 +18402,7 @@ var BuildingBlockResourceCenter = (function () {
18348
18402
  // Assign all modules for the RC on to the RC
18349
18403
  resourceCenter.modules = resourceCenterModules;
18350
18404
  resourceCenter.badgeHidden = true;
18351
- return q.all(promises)['catch'](() => {
18405
+ return q.all(promises).catch(() => {
18352
18406
  resourceCenter = null;
18353
18407
  log.error('Failed to load one or more Resource Center modules');
18354
18408
  return q.resolve();
@@ -20850,7 +20904,7 @@ class UpdateRunner {
20850
20904
  }
20851
20905
  }, this);
20852
20906
  this.paused = true;
20853
- promise.then(resume)['catch'](resume);
20907
+ promise.then(resume).catch(resume);
20854
20908
  }
20855
20909
  else if (currentPhase.isComplete()) {
20856
20910
  this.queue.shift();
@@ -20985,7 +21039,7 @@ function Wrappable() {
20985
21039
  var debugEnabled = 'debug-enabled';
20986
21040
  function getDebuggingStorage() {
20987
21041
  try {
20988
- const debuggingStorage = JSON.parse(agentStorage.read(debugEnabled, true) || getCookie(debugEnabled));
21042
+ const debuggingStorage = agentStorage.read(debugEnabled) || JSON.parse(getCookie(debugEnabled));
20989
21043
  if (typeof debuggingStorage === 'boolean') { // v1 debugger storage format
20990
21044
  return { enabled: debuggingStorage };
20991
21045
  }
@@ -22007,7 +22061,7 @@ function checkForGuidePreviewError(activeStep, currentStepIndex, previewFrame) {
22007
22061
  errors
22008
22062
  }
22009
22063
  }, location.origin);
22010
- })['catch'](_.noop);
22064
+ }).catch(_.noop);
22011
22065
  }
22012
22066
  function exitPreviewMode(designerConfig) {
22013
22067
  var currentPreviewGuideConfig = findStoredDesignerPreviewConfig();
@@ -22188,7 +22242,7 @@ function previewGuideRequest(config, id) {
22188
22242
  lastGuideStepSeen: preparePreviewLastGuideStepSeen(guidesArray, pendo$1.lastGuideStepSeen),
22189
22243
  guides: preparePreviewGuides(guidesArray)
22190
22244
  });
22191
- })['catch'](function (result) {
22245
+ }).catch(function (result) {
22192
22246
  sendPreviewModeFailureMessage(document, result);
22193
22247
  // passthrough rejections to subscribers
22194
22248
  return q.reject(result);
@@ -23619,8 +23673,6 @@ function onTurbolinksPageLoad(document, onPageLoad, beforeTurboCache) {
23619
23673
 
23620
23674
  var EMPTY_ARRAY_JZB = 'eJwFwIEIAAAAwDDQd3-N1QABFQC5';
23621
23675
  var AD_BLOCK_STORAGE_KEY = 'guides_blocked';
23622
- var BLOCKED_STORAGE_DURATION = 1800000; // 30 minutes
23623
- var NOT_BLOCKED_STORAGE_DURATION = 14400000; // 4 hours
23624
23676
  var GUIDE_GIF_BLOCKED = '1';
23625
23677
  var GUIDE_GIF_NOT_BLOCKED = '0';
23626
23678
  var GUIDE_GIF_BLOCKED_MSG = 'Guides disabled: unreachable endpoint guide.gif';
@@ -23632,11 +23684,11 @@ function setGuidesBlocked(testGuideGifResult) {
23632
23684
  if (testGuideGifResult.cached)
23633
23685
  return;
23634
23686
  if (testGuideGifResult.success) {
23635
- agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_NOT_BLOCKED, NOT_BLOCKED_STORAGE_DURATION);
23687
+ agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_NOT_BLOCKED);
23636
23688
  }
23637
23689
  else {
23638
23690
  log.info(GUIDE_GIF_BLOCKED_MSG);
23639
- agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_BLOCKED, BLOCKED_STORAGE_DURATION);
23691
+ agentStorage.write(AD_BLOCK_STORAGE_KEY, GUIDE_GIF_BLOCKED);
23640
23692
  }
23641
23693
  }
23642
23694
  function testGuideGifEndpoint(loader, apiKey) {
@@ -24787,8 +24839,8 @@ var getNextStepInMultistep = function (lastSeen, urlToCheck) {
24787
24839
  return currentGuide.nextStep(lastSeen, urlToCheck || getNormalizedUrl());
24788
24840
  };
24789
24841
  /**
24790
- * Returns the normalized URL sent from the backend with the guides payload. This wont always
24791
- * match the desired output from the customers url customizations if using location API.
24842
+ * Returns the normalized URL sent from the backend with the guides payload. This won't always
24843
+ * match the desired output from the customer's url customizations if using location API.
24792
24844
  *
24793
24845
  * @access public
24794
24846
  * @alias getCurrentUrl
@@ -25207,7 +25259,7 @@ var loadGuides = function (apiKey, visitorId, page, callback) {
25207
25259
  pendo$1.eventProperties = createEventPropertiesFromFeatures(pendo$1.features);
25208
25260
  let globalJsPromise = q.resolve();
25209
25261
  if (pendo$1.globalJsUrl) {
25210
- globalJsPromise = loadGlobalScriptOnce(replaceWithContentHost(pendo$1.globalJsUrl))['catch'](function (err) {
25262
+ globalJsPromise = loadGlobalScriptOnce(replaceWithContentHost(pendo$1.globalJsUrl)).catch(function (err) {
25211
25263
  log.error('Error loading global script: ', err);
25212
25264
  });
25213
25265
  }
@@ -25243,7 +25295,7 @@ var loadGuides = function (apiKey, visitorId, page, callback) {
25243
25295
  deferred.resolve();
25244
25296
  }
25245
25297
  }
25246
- })['catch'](function (err) {
25298
+ }).catch(function (err) {
25247
25299
  Events.guidesFailed.trigger();
25248
25300
  deferred.reject(err);
25249
25301
  });
@@ -25570,7 +25622,7 @@ var initGuides = function () {
25570
25622
  * @access public
25571
25623
  * @label AD_BLOCK_STORAGE_KEY
25572
25624
  */
25573
- agentStorage.registry.addLocal(AD_BLOCK_STORAGE_KEY);
25625
+ agentStorage.registry.addLocal(AD_BLOCK_STORAGE_KEY, { duration: 14400000 }); // 4 hours default duration
25574
25626
  GuideRuntime.initialize();
25575
25627
  return () => {
25576
25628
  reloadGuides.reset();
@@ -25738,7 +25790,7 @@ function reloadGuides(url) {
25738
25790
  reloadGuides.lastVisitorId = visitorId;
25739
25791
  reloadGuides.lastAccountId = accountId;
25740
25792
  reloadGuides.lastMetadataHash = metadataHash;
25741
- loadGuides(pendo$1.apiKey, visitorId, url)['catch'](_.noop);
25793
+ loadGuides(pendo$1.apiKey, visitorId, url).catch(_.noop);
25742
25794
  }
25743
25795
  reloadGuides.reset = function () {
25744
25796
  _.each(['lastUrl', 'lastVisitorId', 'lastAccountId', 'lastMetadataHash'], function (prop) {
@@ -27008,15 +27060,14 @@ const initialize = makeSafe(function (options) {
27008
27060
  */
27009
27061
  agentStorage.registry.addLocal(OPTIONS_HASH_KEY_NAME);
27010
27062
  /**
27011
- * Current state of the agent debugger. This is used to relaunch the debugger tool with the last
27012
- * used settings, either on the next time it is opened or after a page refresh.
27063
+ * Stores debugging configuration and state for the Pendo debugger.
27013
27064
  *
27014
27065
  * @name debug-enabled
27015
27066
  * @category Cookies/localStorage
27016
27067
  * @access public
27017
27068
  * @label debugEnabled
27018
27069
  */
27019
- agentStorage.registry.addLocal(debugEnabled);
27070
+ agentStorage.registry.addLocal(debugEnabled, { isPlain: true, serializer: JSON.stringify, deserializer: SafeJsonDeserializer });
27020
27071
  // Disable content pre-fetch for guide center
27021
27072
  pendo$1.disableGuideCenterContentSearch = options.disableGuideCenterContentSearch;
27022
27073
  // Register handlers passed through pendo_options
@@ -27872,7 +27923,7 @@ var enableLogging = function () {
27872
27923
  if (logOverride) {
27873
27924
  return 'logging already enabled';
27874
27925
  }
27875
- agentStorage.write(LOG_ENABLED, 'true', null, true);
27926
+ agentStorage.write(LOG_ENABLED, 'true');
27876
27927
  logOverride = true;
27877
27928
  return 'logging enabled';
27878
27929
  };
@@ -27888,7 +27939,7 @@ var disableLogging = function () {
27888
27939
  if (!logOverride) {
27889
27940
  return 'logging already disabled';
27890
27941
  }
27891
- agentStorage.write(LOG_ENABLED, 'false', null, true);
27942
+ agentStorage.write(LOG_ENABLED, 'false');
27892
27943
  logOverride = false;
27893
27944
  return 'logging disabled';
27894
27945
  };
@@ -27905,7 +27956,7 @@ function initLogging() {
27905
27956
  * @access public
27906
27957
  * @label LOG_ENABLED
27907
27958
  */
27908
- agentStorage.registry.addLocal(LOG_ENABLED);
27959
+ agentStorage.registry.addLocal(LOG_ENABLED, { isPlain: true });
27909
27960
  /**
27910
27961
  * DEPRECATED: Stores the active contexts for logging.
27911
27962
  *
@@ -27914,7 +27965,7 @@ function initLogging() {
27914
27965
  * @access private
27915
27966
  * @label ACTIVE_CONTEXTS
27916
27967
  */
27917
- agentStorage.registry.addLocal(ACTIVE_CONTEXTS);
27968
+ agentStorage.registry.addLocal(ACTIVE_CONTEXTS, { isPlain: true });
27918
27969
  }
27919
27970
  var createContexts = function (contexts, args) {
27920
27971
  return _.compact([].concat(contexts, args));
@@ -27994,7 +28045,7 @@ var getActiveContexts = function () {
27994
28045
  };
27995
28046
  var setActiveContexts = function (contexts) {
27996
28047
  activeContexts = createContexts(contexts);
27997
- agentStorage.write(ACTIVE_CONTEXTS, activeContexts.join(','), null, true);
28048
+ agentStorage.write(ACTIVE_CONTEXTS, activeContexts.join(','));
27998
28049
  };
27999
28050
  var doConsoleLog = function (msg, prefix) {
28000
28051
  if (!canWeLog())
@@ -30481,8 +30532,8 @@ function GuideStep(guide) {
30481
30532
  return;
30482
30533
  }
30483
30534
  var showPromise = GuideDisplay.show(step, reason);
30484
- if (showPromise && showPromise['catch']) {
30485
- showPromise['catch'](_.noop);
30535
+ if (showPromise && showPromise.catch) {
30536
+ showPromise.catch(_.noop);
30486
30537
  }
30487
30538
  return showPromise;
30488
30539
  };
@@ -31265,7 +31316,7 @@ var FramesModule = (function () {
31265
31316
  if (step) {
31266
31317
  var showLocalPromise = GuideDisplay.showLocal(step, payload.reason);
31267
31318
  if (isPromise(showLocalPromise)) {
31268
- showLocalPromise.then(afterShowLocal)['catch'](_.noop);
31319
+ showLocalPromise.then(afterShowLocal).catch(_.noop);
31269
31320
  }
31270
31321
  else {
31271
31322
  afterShowLocal(showLocalPromise);
@@ -32566,7 +32617,7 @@ const DebuggerModule = (() => {
32566
32617
  });
32567
32618
  });
32568
32619
  q.all(framePromises).then(results => results)
32569
- .then((results) => response(results))['catch']((error) => response({ error }));
32620
+ .then((results) => response(results)).catch((error) => response({ error }));
32570
32621
  }
32571
32622
  };
32572
32623
  const getters = {};
@@ -33399,10 +33450,10 @@ var PromoteMetadata = (function () {
33399
33450
  * @access public
33400
33451
  * @label SCHEMA_GROUP
33401
33452
  */
33402
- pluginApi.agentStorage.registry.addLocal(SCHEMA_GROUP);
33453
+ pluginApi.agentStorage.registry.addLocal(SCHEMA_GROUP, { isSecure: true, serializer: JSON.stringify, deserializer: SafeJsonDeserializer });
33403
33454
  if (shouldPersist()) {
33404
33455
  try {
33405
- cachedSchemaGroup = JSON.parse(pluginApi.agentStorage.read(SCHEMA_GROUP)) || {};
33456
+ cachedSchemaGroup = pluginApi.agentStorage.read(SCHEMA_GROUP);
33406
33457
  }
33407
33458
  catch (e) {
33408
33459
  resetCachedSchemaGroup();
@@ -33460,7 +33511,7 @@ var PromoteMetadata = (function () {
33460
33511
  if (shouldPersist()) {
33461
33512
  try {
33462
33513
  const storedSchemaGroup = pluginApi.agentStorage.read(SCHEMA_GROUP);
33463
- cachedSchemaGroup = storedSchemaGroup ? JSON.parse(storedSchemaGroup) : {};
33514
+ cachedSchemaGroup = storedSchemaGroup;
33464
33515
  cachedSchemaGroup = removePrefixes(cachedSchemaGroup);
33465
33516
  }
33466
33517
  catch (e) {
@@ -33485,7 +33536,7 @@ var PromoteMetadata = (function () {
33485
33536
  }
33486
33537
  });
33487
33538
  if (shouldPersist()) {
33488
- pluginApi.agentStorage.write(SCHEMA_GROUP, JSON.stringify(__sg__), undefined, false, true);
33539
+ pluginApi.agentStorage.write(SCHEMA_GROUP, __sg__);
33489
33540
  }
33490
33541
  return __sg__;
33491
33542
  }
@@ -34583,7 +34634,7 @@ function LauncherElement(config) {
34583
34634
  var element = dom(target).closest(selector);
34584
34635
  if (element.length) {
34585
34636
  if (isLauncherVisible()) {
34586
- agentStorage.write(LAUNCHER_CLOSED, 'yes', 10 * 24 * 60 * 60 * 1000);
34637
+ agentStorage.write(LAUNCHER_CLOSED, 'yes');
34587
34638
  }
34588
34639
  else {
34589
34640
  pendo$1.guideWidget.position(target);
@@ -35271,7 +35322,7 @@ var initLauncherPlugin = function (pendo, PluginAPI) {
35271
35322
  * @access public
35272
35323
  * @label LAUNCHER_CLOSED
35273
35324
  */
35274
- PluginAPI.agentStorage.registry.addLocal(LAUNCHER_CLOSED);
35325
+ PluginAPI.agentStorage.registry.addLocal(LAUNCHER_CLOSED, { duration: 10 * 24 * 60 * 60 * 1000 }); // 10 days default duration
35275
35326
  };
35276
35327
  var teardownLauncherPlugin = function (pendo, PluginAPI) {
35277
35328
  deregisterLoadGuideJobs(loadLauncherContentHandler);
@@ -36050,7 +36101,7 @@ function enableDebugging(andChain) {
36050
36101
  return;
36051
36102
  const debugging = getDebuggingStorage();
36052
36103
  debugging.enabled = true;
36053
- agentStorage.write(debugEnabled, JSON.stringify(debugging), null, true);
36104
+ agentStorage.write(debugEnabled, debugging);
36054
36105
  startDebuggingModuleIfEnabled();
36055
36106
  if (andChain) {
36056
36107
  return debugging;
@@ -36072,7 +36123,7 @@ function disableDebugging() {
36072
36123
  store.commit('debugger/debuggingEnabled', false);
36073
36124
  const debugging = getDebuggingStorage();
36074
36125
  debugging.enabled = false;
36075
- agentStorage.write(debugEnabled, JSON.stringify(debugging), null, true);
36126
+ agentStorage.write(debugEnabled, debugging);
36076
36127
  pendo$1.debugging = null;
36077
36128
  delete pendo$1.debugging;
36078
36129
  dom('#pendo-client-debugger').remove();
@@ -36835,9 +36886,11 @@ class SessionManager {
36835
36886
  this.api = PluginAPI;
36836
36887
  this.pendo = pendo;
36837
36888
  this.subscriptions = [
36889
+ this.api.attachEvent(this.api.Events, 'identify', _.bind(this.changeIdentity, this)),
36838
36890
  this.api.attachEvent(this.api.Events, 'eventCaptured', _.bind(this.eventCaptured, this))
36839
36891
  ];
36840
36892
  this.inactivityDuration = this.api.ConfigReader.get('inactivityDuration', THIRTY_MINUTES);
36893
+ this.suffix = this.api.ConfigReader.get('identityStorageSuffix');
36841
36894
  /**
36842
36895
  * Randomly generated string that identifies a session. This is similar to `pendo_tabId`,
36843
36896
  * but identifies the entire browser, rather than individual tabs.
@@ -36847,8 +36900,17 @@ class SessionManager {
36847
36900
  * @access public
36848
36901
  * @label SESSION_ID
36849
36902
  */
36850
- this.api.agentStorage.registry.addLocal(SESSION_ID);
36851
- this.suffix = this.api.ConfigReader.get('identityStorageSuffix');
36903
+ this.api.agentStorage.registry.addLocal(SESSION_ID, { cookieSuffix: this.suffix, isSecure: true });
36904
+ }
36905
+ changeIdentity(identifyEvent) {
36906
+ if (!identifyEvent || !identifyEvent.data || !identifyEvent.data.length)
36907
+ return;
36908
+ const { visitor_id, old_visitor_id } = identifyEvent.data[0];
36909
+ if (visitor_id !== old_visitor_id &&
36910
+ !this.pendo.isAnonymousVisitor(visitor_id) &&
36911
+ !this.pendo.isAnonymousVisitor(old_visitor_id)) {
36912
+ this.expireSession();
36913
+ }
36852
36914
  }
36853
36915
  teardown() {
36854
36916
  _.each(this.subscriptions, function (unsubscribe) {
@@ -36863,40 +36925,46 @@ class SessionManager {
36863
36925
  }
36864
36926
  return false;
36865
36927
  }
36928
+ expireSession() {
36929
+ const newSessionInfo = this.clearSessionInfo();
36930
+ this.api.Events.sessionChanged.trigger(newSessionInfo);
36931
+ return newSessionInfo;
36932
+ }
36866
36933
  eventCaptured(event) {
36867
36934
  if (!event || !event.data || !event.data.length)
36868
36935
  return;
36869
36936
  var capturedEvent = event.data[0];
36870
36937
  const eventTime = capturedEvent.browser_time || new Date().getTime();
36871
36938
  let sessionInfo = this.sessionInfo();
36872
- if (this.isExpired(sessionInfo, eventTime)) {
36873
- // the current event will be attributed to the *new* session
36874
- sessionInfo = this.clearSessionInfo();
36875
- this.api.Events.sessionChanged.trigger();
36939
+ if (capturedEvent.hasUserInteraction || capturedEvent.type !== 'recording') {
36940
+ if (this.isExpired(sessionInfo, eventTime)) {
36941
+ // the current event will be attributed to the *new* session
36942
+ sessionInfo = this.expireSession();
36943
+ }
36944
+ this.storeLastInteractionEventInformation(sessionInfo, eventTime);
36876
36945
  }
36877
- this.storeLastInteractionEventInformation(sessionInfo, eventTime);
36878
36946
  capturedEvent.sessionId = sessionInfo.sessionId;
36879
36947
  }
36880
36948
  sessionInfo(defaultId = this.pendo.randomString(16)) {
36881
- let currentSessionInfo = this.api.agentStorage.read(SESSION_ID, false, this.suffix) ||
36882
- this.api.agentStorage.read(SESSION_ID);
36949
+ let currentSessionInfo = this.api.agentStorage.read(SESSION_ID) ||
36950
+ this.api.agentStorage.read(SESSION_ID, false, '');
36883
36951
  if (!currentSessionInfo) {
36884
36952
  currentSessionInfo = JSON.stringify({
36885
36953
  sessionId: defaultId,
36886
36954
  timestamp: new Date().getTime()
36887
36955
  });
36888
- this.api.agentStorage.write(SESSION_ID, currentSessionInfo, undefined, false, true, this.suffix);
36956
+ this.api.agentStorage.write(SESSION_ID, currentSessionInfo);
36889
36957
  }
36890
36958
  return JSON.parse(currentSessionInfo);
36891
36959
  }
36892
36960
  clearSessionInfo() {
36893
36961
  this.api.agentStorage.clear(SESSION_ID);
36894
- this.api.agentStorage.clear(SESSION_ID, false, this.suffix);
36962
+ this.api.agentStorage.clear(SESSION_ID, false, '');
36895
36963
  return this.sessionInfo();
36896
36964
  }
36897
36965
  storeLastInteractionEventInformation(sessionInfo, timestamp) {
36898
36966
  sessionInfo.timestamp = timestamp;
36899
- this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo), undefined, false, true, this.suffix);
36967
+ this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo));
36900
36968
  }
36901
36969
  }
36902
36970
  var SessionManager$1 = new SessionManager();
@@ -37066,7 +37134,6 @@ const searchProviderRegex = new RegExp(`(${searchProviders.join('|')})`, 'i');
37066
37134
  const socialMediaSources = [
37067
37135
  'facebook',
37068
37136
  'twitter',
37069
- 'x',
37070
37137
  'linkedin',
37071
37138
  'instagram',
37072
37139
  'pinterest',
@@ -37085,7 +37152,15 @@ const socialMediaSources = [
37085
37152
  'qq',
37086
37153
  'line'
37087
37154
  ];
37155
+ // these are used for strict referrer checking of domains that cause false positive matches in regex checks
37156
+ const socialMediaDomains = [
37157
+ 't.co',
37158
+ 'x.com'
37159
+ ];
37088
37160
  const socialMediaRegex = new RegExp(`(${socialMediaSources.join('|')})`, 'i');
37161
+ function isSocialMediaReferral(referrer, _) {
37162
+ return isReferral(socialMediaRegex, referrer) || _.contains(socialMediaDomains, referrer);
37163
+ }
37089
37164
  // video sites - must be lowercase
37090
37165
  // this is used for checking the utm_source value to see if it is a video site (add others here as needed, or remove any that are not relevant)
37091
37166
  const videoSites = [
@@ -37149,11 +37224,15 @@ function calculateReferrerValue({ referrer, currentHost }) {
37149
37224
  // update this list to include other possible values for paid from utm_medium field
37150
37225
  // this is a regular expression, so you can use the pipe character to separate values
37151
37226
  // Anything containing 'cp' or 'ppc' or 'retargeting' will be considered a paid medium.
37152
- const paidMediumRegex = new RegExp('^(.*cp.*|ppc|retargeting)$');
37227
+ const paidMediumRegex = new RegExp('^(.*cp.*|ppc|retargeting|paid)$');
37153
37228
  // Regular expression to match email-related values in the utm_medium field
37154
37229
  // this is used to determine if the channel is Email
37155
37230
  // add other email-related values here, if needed
37156
37231
  const emailRegex = new RegExp('(.*email.*|.*e_mail.*|.*e mail.*|.*e-mail.*)', 'i');
37232
+ function utmIncludesValue(utm = '', value) {
37233
+ return utm.replace(/[^a-zA-Z]/g, '').includes(value);
37234
+ }
37235
+ // order is critical here, as the first match is returned, consider this when adding new channels and updating conditions
37157
37236
  const channels = [
37158
37237
  [undefined, ({ medium, source, referrer, gclid, fbclid }) => {
37159
37238
  return !medium && !source && referrer === 'self' && !gclid && !fbclid;
@@ -37162,74 +37241,75 @@ const channels = [
37162
37241
  return !medium && (!source || source === 'direct') && referrer === 'direct';
37163
37242
  }],
37164
37243
  ['Cross-network', ({ source, medium }) => {
37165
- return medium === 'cross-network' || source.match(crossNetworkPlatformsRegex);
37244
+ return utmIncludesValue(medium, 'crossnetwork') || source.match(crossNetworkPlatformsRegex);
37166
37245
  }],
37167
- ['Paid Search', ({ source, medium, gclid, _ }) => {
37246
+ ['Paid Search', ({ source, medium, referrer, gclid, _ }) => {
37168
37247
  return gclid ||
37169
- medium === 'paid-search' ||
37170
- (medium.match(paidMediumRegex) && _.contains(searchProviders, source));
37248
+ utmIncludesValue(medium, 'paidsearch') ||
37249
+ (medium.match(paidMediumRegex) && (_.contains(searchProviders, source) || isReferral(searchProviderRegex, referrer)));
37171
37250
  }],
37172
- ['Paid Social', ({ source, medium, fbclid, _ }) => {
37251
+ ['Paid Social', ({ source, medium, referrer, fbclid, _ }) => {
37173
37252
  return fbclid ||
37174
- medium === 'paid-social' ||
37175
- (medium.match(paidMediumRegex) && _.contains(socialMediaSources, source));
37253
+ utmIncludesValue(medium, 'paidsocial') ||
37254
+ (medium.match(paidMediumRegex) && (_.contains(socialMediaSources, source) || isSocialMediaReferral(referrer, _)));
37176
37255
  }],
37177
- ['Paid Video', ({ medium, source, _ }) => {
37178
- return medium == 'paid-video' ||
37179
- (medium.match(paidMediumRegex) && _.contains(videoSites, source));
37256
+ ['Paid Video', ({ medium, source, referrer, _ }) => {
37257
+ return utmIncludesValue(medium, 'paidvideo') ||
37258
+ (medium.match(paidMediumRegex) && (_.contains(videoSites, source) || isReferral(videoRegex, referrer)));
37180
37259
  }],
37181
37260
  ['Paid Shopping', ({ medium, source, referrer, _ }) => {
37182
- return medium == 'paid-shopping' ||
37183
- medium == 'shopping' ||
37261
+ return utmIncludesValue(medium, 'paidshopping') ||
37262
+ medium === 'shopping' || // needs to match strictly to not incorrectly match 'organic-shopping'
37184
37263
  ((isReferral(shoppingRegex, referrer) || _.contains(shoppingSites, source)) &&
37185
37264
  medium.match(paidMediumRegex));
37186
37265
  }],
37187
37266
  ['Display', ({ medium, _ }) => {
37188
- return _.contains(['display', 'cpm', 'banner', 'interstitial', 'expandable', 'programmatic'], medium);
37267
+ return _.contains(['display', 'cpm', 'banner', 'interstitial', 'expandable', 'programmatic'], medium) ||
37268
+ utmIncludesValue(medium, 'display');
37189
37269
  }],
37190
37270
  ['Paid Other', ({ medium, source, _ }) => {
37191
37271
  // Must be after all other paid channels in the list
37192
- return medium == 'paid-other' ||
37272
+ return utmIncludesValue(medium, 'paidother') ||
37193
37273
  medium.match(paidMediumRegex);
37194
37274
  }],
37195
37275
  ['Organic Search', ({ source, medium, referrer, _ }) => {
37196
- return (medium === 'organic' && _.contains(searchProviders, source)) || (!medium && isReferral(searchProviderRegex, referrer));
37276
+ return (utmIncludesValue(medium, 'organic') && _.contains(searchProviders, source)) || (!medium && isReferral(searchProviderRegex, referrer));
37197
37277
  }],
37198
37278
  ['Organic Social', ({ source, medium, referrer, _ }) => {
37199
- return (!medium && isReferral(socialMediaRegex, referrer)) ||
37200
- medium === 'social' ||
37279
+ return (!medium && isSocialMediaReferral(referrer, _)) ||
37280
+ utmIncludesValue(medium, 'social') ||
37201
37281
  (_.contains(socialMediaSources, source) && !medium.match(paidMediumRegex));
37202
37282
  }],
37203
37283
  ['Organic Video', ({ medium, referrer }) => {
37204
- return medium === 'video' ||
37284
+ return utmIncludesValue(medium, 'video') ||
37205
37285
  (!medium && isReferral(videoRegex, referrer));
37206
37286
  }],
37207
37287
  ['Organic Shopping', ({ medium, referrer }) => {
37208
- return medium === 'organic-shopping' ||
37288
+ return utmIncludesValue(medium, 'organicshopping') ||
37209
37289
  (!medium && isReferral(shoppingRegex, referrer));
37210
37290
  }],
37211
37291
  ['Email', ({ source, medium }) => {
37212
37292
  return medium.match(emailRegex) !== null ||
37213
37293
  source.match(emailRegex) !== null ||
37214
- medium === 'newsletter';
37294
+ utmIncludesValue(medium, 'newsletter');
37215
37295
  }],
37216
37296
  ['Affiliates', ({ medium }) => {
37217
- return medium === 'affiliate' || medium === 'partner';
37297
+ return utmIncludesValue(medium, 'affiliate') || utmIncludesValue(medium, 'partner');
37218
37298
  }],
37219
37299
  ['SMS', ({ source, medium }) => {
37220
- return source === 'sms' || medium === 'sms';
37300
+ return utmIncludesValue(source, 'sms') || utmIncludesValue(medium, 'sms');
37221
37301
  }],
37222
37302
  ['Push Notifications', ({ source, medium }) => {
37223
37303
  return medium.endsWith('push') ||
37224
- medium.indexOf('mobile') >= 0 ||
37225
- medium.indexOf('notification') >= 0 ||
37226
- source === 'firebase';
37304
+ utmIncludesValue(medium, 'mobile') ||
37305
+ utmIncludesValue(medium, 'notification') ||
37306
+ utmIncludesValue(source, 'firebase');
37227
37307
  }],
37228
37308
  ['Audio', ({ medium }) => {
37229
- return medium === 'podcast' || medium === 'audio';
37309
+ return utmIncludesValue(medium, 'podcast') || utmIncludesValue(medium, 'audio');
37230
37310
  }],
37231
37311
  ['Referral', ({ medium, referrer }) => {
37232
- return medium === 'referral' ||
37312
+ return utmIncludesValue(medium, 'referral') ||
37233
37313
  (!!referrer && referrer !== 'self' && referrer !== 'direct');
37234
37314
  }],
37235
37315
  ['Other', ({ medium, source }) => {
@@ -37919,13 +37999,15 @@ class DOMPrompt {
37919
37999
  // capture value from copy / paste
37920
38000
  this.capturePromptValue();
37921
38001
  }, true);
37922
- this.inputEl.addEventListener('keyup', (evt) => {
37923
- const wasEnterKey = evt.code === 'Enter';
37924
- this.capturePromptValue(wasEnterKey);
38002
+ this.inputEl.addEventListener('keydown', (evt) => {
38003
+ const wasEnterKey = evt.code === 'Enter' || evt.key === 'Enter' || evt.keyCode === 13;
37925
38004
  if (wasEnterKey) {
37926
38005
  this.submit(this.latestPromptValue);
37927
38006
  }
37928
38007
  }, true);
38008
+ this.inputEl.addEventListener('keyup', (evt) => {
38009
+ this.capturePromptValue();
38010
+ }, true);
37929
38011
  this.submitEl.addEventListener('click', () => {
37930
38012
  this.submit(this.latestPromptValue);
37931
38013
  }, true);
@@ -37953,7 +38035,8 @@ class DOMPrompt {
37953
38035
  return candidateValue.replace(filtersToUse, 'redacted');
37954
38036
  }
37955
38037
  submit(origVal) {
37956
- if (!origVal || !this.inputEl.get() || !this.submitEl.get())
38038
+ // Don't submit an empty prompt
38039
+ if (!origVal)
37957
38040
  return;
37958
38041
  const val = this.applyPrivacyFilter(origVal);
37959
38042
  // build the payload: id, value, was filter used
@@ -38008,7 +38091,7 @@ class PromptPlugin {
38008
38091
  // register config schema
38009
38092
  this.api.ConfigReader.addOption(this.configName, ['pendoconfig', 'snippet']);
38010
38093
  this.loadConfig(this.configName)
38011
- .then(config => this.onConfigLoaded(config))['catch'](() => { });
38094
+ .then(config => this.onConfigLoaded(config)).catch(() => { });
38012
38095
  }
38013
38096
  // a-fake-sync method - puts the api expectation of a promise in place now
38014
38097
  // making it easier in the future if the config looking becomes a network call
@@ -40201,7 +40284,7 @@ function Feedback() {
40201
40284
  * @access public
40202
40285
  * @label PING_COOKIE
40203
40286
  */
40204
- PluginAPI.agentStorage.registry.addLocal(PING_COOKIE);
40287
+ PluginAPI.agentStorage.registry.addLocal(PING_COOKIE, { duration: PING_COOKIE_EXPIRATION });
40205
40288
  return {
40206
40289
  validate
40207
40290
  };
@@ -40230,7 +40313,7 @@ function Feedback() {
40230
40313
  }
40231
40314
  else if (shouldInitializeFeedback() && !globalPendo._.isEmpty(options)) {
40232
40315
  const settings = pluginApi.ConfigReader.get('feedbackSettings');
40233
- init(options, settings)['catch'](globalPendo._.noop);
40316
+ init(options, settings).catch(globalPendo._.noop);
40234
40317
  }
40235
40318
  }
40236
40319
  function handleIdentityChange(event) {
@@ -40280,7 +40363,7 @@ function Feedback() {
40280
40363
  buttonHoverAndFocus);
40281
40364
  }
40282
40365
  function storeLastPingTime(feedbackOptions) {
40283
- pluginApi.agentStorage.write(PING_COOKIE, getPingCookieValue(feedbackOptions), PING_COOKIE_EXPIRATION);
40366
+ pluginApi.agentStorage.write(PING_COOKIE, getPingCookieValue(feedbackOptions));
40284
40367
  }
40285
40368
  function clearLastPingTime() {
40286
40369
  pluginApi.agentStorage.clear(PING_COOKIE);
@@ -40306,7 +40389,7 @@ function Feedback() {
40306
40389
  .postJSON(getFullUrl('/widget/pendo_ping'), toSend)
40307
40390
  .then((response) => {
40308
40391
  onWidgetPingResponse(response);
40309
- })['catch'](() => { onPingFailure(); });
40392
+ }).catch(() => { onPingFailure(); });
40310
40393
  }
40311
40394
  }
40312
40395
  return pluginApi.q.resolve();
@@ -46321,8 +46404,8 @@ class SendQueue {
46321
46404
  return failureCount;
46322
46405
  }
46323
46406
  pass(payload, dequeue = true) {
46324
- this.unloads['delete'](payload);
46325
- this.pending['delete'](payload);
46407
+ this.unloads.delete(payload);
46408
+ this.pending.delete(payload);
46326
46409
  this.failures.clear();
46327
46410
  const index = this.queue.indexOf(payload);
46328
46411
  if (index >= 0) {
@@ -46333,8 +46416,8 @@ class SendQueue {
46333
46416
  }
46334
46417
  }
46335
46418
  fail(payload, retry = true) {
46336
- this.unloads['delete'](payload);
46337
- this.pending['delete'](payload);
46419
+ this.unloads.delete(payload);
46420
+ this.pending.delete(payload);
46338
46421
  const failureCount = this.incrementFailure(payload);
46339
46422
  if (this.stopped || !retry)
46340
46423
  return;
@@ -46798,7 +46881,7 @@ class SessionRecorder {
46798
46881
  else if (visitorConfig && visitorConfig.enable && !this.isRecording()) {
46799
46882
  this._startRecordingForVisitor(visitorConfig);
46800
46883
  }
46801
- })['catch']((e) => {
46884
+ }).catch((e) => {
46802
46885
  this.api.log.critical('Failed to re-fetch recording config', { error: e });
46803
46886
  this.logStopReason('VISITOR_CONFIG_ERROR');
46804
46887
  });
@@ -46894,7 +46977,7 @@ class SessionRecorder {
46894
46977
  return;
46895
46978
  }
46896
46979
  this._startRecordingForVisitor(visitorConfig);
46897
- })['catch']((e) => {
46980
+ }).catch((e) => {
46898
46981
  this.restartPtm();
46899
46982
  this.api.log.critical('Failed to fetch recording config', { error: e });
46900
46983
  this.logStopReason('VISITOR_CONFIG_ERROR');
@@ -47214,7 +47297,8 @@ class SessionRecorder {
47214
47297
  lastKeyFrame: this.lastKeyFrameTime,
47215
47298
  recordingId: this.recordingId,
47216
47299
  recordingSessionId: this.sessionId(this.recordingId),
47217
- url: this.pendo.url.get()
47300
+ url: this.pendo.url.get(),
47301
+ hasUserInteraction: this.pendo._.any(this.buffer.data, this.isUserInteraction)
47218
47302
  }, tracer);
47219
47303
  if (this.transport.usesSelfHostedWorker) {
47220
47304
  payload.usesSelfHostedWorker = true;
@@ -47296,7 +47380,7 @@ class SessionRecorder {
47296
47380
  return this.transport.post(url, {
47297
47381
  body,
47298
47382
  keepalive: true
47299
- })['catch']((e) => {
47383
+ }).catch((e) => {
47300
47384
  this.api.log.critical('Failed to send reason for stopping recording', { error: e });
47301
47385
  });
47302
47386
  }
@@ -47312,7 +47396,7 @@ class SessionRecorder {
47312
47396
  return this.transport.post(url, {
47313
47397
  body,
47314
47398
  keepalive: true
47315
- })['catch']((e) => {
47399
+ }).catch((e) => {
47316
47400
  this.api.log.critical('Failed to send hosted resources for recording event', { error: e });
47317
47401
  });
47318
47402
  }
@@ -47593,7 +47677,7 @@ var WorkerFactory = /*#__PURE__*/createInlineWorkerFactory(/* rollup-plugin-web-
47593
47677
  sequence
47594
47678
  });
47595
47679
  }
47596
- })['catch'](function (e) {
47680
+ }).catch(function (e) {
47597
47681
  postMessage({
47598
47682
  error: e,
47599
47683
  sequence