@pendo/agent 2.279.5 → 2.280.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 +25 -10
- package/dist/pendo.module.js +263 -138
- package/dist/pendo.module.min.js +19 -21
- package/package.json +1 -1
package/dist/pendo.module.js
CHANGED
|
@@ -3118,6 +3118,16 @@ var ConfigReader = (function () {
|
|
|
3118
3118
|
* @type {string[]}
|
|
3119
3119
|
*/
|
|
3120
3120
|
addOption('analytics.excludeEvents', [SNIPPET_SRC, PENDO_CONFIG_SRC], []);
|
|
3121
|
+
/**
|
|
3122
|
+
* Write events to localStorage when the page is unloaded instead of sending them immediately.
|
|
3123
|
+
*
|
|
3124
|
+
* @access public
|
|
3125
|
+
* @category Config/Analytics
|
|
3126
|
+
* @name analytics.localStorageUnload
|
|
3127
|
+
* @default false
|
|
3128
|
+
* @type {boolean}
|
|
3129
|
+
*/
|
|
3130
|
+
addOption('analytics.localStorageUnload', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
|
|
3121
3131
|
/**
|
|
3122
3132
|
* If set to `true`, the Agent will log out when various events internal to the Agent occur.
|
|
3123
3133
|
*
|
|
@@ -3891,8 +3901,8 @@ var SERVER = '';
|
|
|
3891
3901
|
var ASSET_HOST = '';
|
|
3892
3902
|
var ASSET_PATH = '';
|
|
3893
3903
|
var DESIGNER_ENV = '';
|
|
3894
|
-
var VERSION = '2.
|
|
3895
|
-
var PACKAGE_VERSION = '2.
|
|
3904
|
+
var VERSION = '2.280.1_';
|
|
3905
|
+
var PACKAGE_VERSION = '2.280.1';
|
|
3896
3906
|
var LOADER = 'xhr';
|
|
3897
3907
|
/* eslint-enable agent-eslint-rules/no-gulp-env-references */
|
|
3898
3908
|
/**
|
|
@@ -4024,6 +4034,18 @@ function compress(json_obj, encoding) {
|
|
|
4024
4034
|
}
|
|
4025
4035
|
}
|
|
4026
4036
|
|
|
4037
|
+
function getZoneSafeMethod$1(_, method, target = window) {
|
|
4038
|
+
var zoneSymbol = '__symbol__';
|
|
4039
|
+
/* global Zone */
|
|
4040
|
+
if (typeof Zone !== 'undefined' && _.isFunction(Zone[zoneSymbol])) {
|
|
4041
|
+
var fn = target[Zone[zoneSymbol](method)];
|
|
4042
|
+
if (_.isFunction(fn)) {
|
|
4043
|
+
return fn;
|
|
4044
|
+
}
|
|
4045
|
+
}
|
|
4046
|
+
return target[method];
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4027
4049
|
var crc32_min = {exports: {}};
|
|
4028
4050
|
|
|
4029
4051
|
/*
|
|
@@ -4117,15 +4139,7 @@ function isSfdcLightning() {
|
|
|
4117
4139
|
return typeof $A !== 'undefined' && _.isFunction($A.get) && _.isString($A.get('$Browser.formFactor'));
|
|
4118
4140
|
}
|
|
4119
4141
|
function getZoneSafeMethod(method, target = window) {
|
|
4120
|
-
|
|
4121
|
-
/* global Zone */
|
|
4122
|
-
if (typeof Zone !== 'undefined' && _.isFunction(Zone[zoneSymbol])) {
|
|
4123
|
-
var fn = target[Zone[zoneSymbol](method)];
|
|
4124
|
-
if (_.isFunction(fn)) {
|
|
4125
|
-
return fn;
|
|
4126
|
-
}
|
|
4127
|
-
}
|
|
4128
|
-
return target[method];
|
|
4142
|
+
return getZoneSafeMethod$1(_, method, target);
|
|
4129
4143
|
}
|
|
4130
4144
|
function getIsFiniteImpl(window) {
|
|
4131
4145
|
return _.isFunction(window.isFinite) ? window.isFinite
|
|
@@ -12035,6 +12049,53 @@ class SendQueue {
|
|
|
12035
12049
|
}
|
|
12036
12050
|
}
|
|
12037
12051
|
|
|
12052
|
+
const UNSENT_EVENTS_KEY = 'unsentEvents';
|
|
12053
|
+
const UNSENT_EVENTS_DURATION = 6 * 24 * 60 * 60 * 1000; // 6 days
|
|
12054
|
+
class LocalStorageEventBuffer {
|
|
12055
|
+
constructor() {
|
|
12056
|
+
this.events = {};
|
|
12057
|
+
}
|
|
12058
|
+
send(key, queue) {
|
|
12059
|
+
const data = this.events[key];
|
|
12060
|
+
if (!data)
|
|
12061
|
+
return;
|
|
12062
|
+
let request = data.shift();
|
|
12063
|
+
while (request) {
|
|
12064
|
+
queue.push(request);
|
|
12065
|
+
request = data.shift();
|
|
12066
|
+
}
|
|
12067
|
+
delete this.events[key];
|
|
12068
|
+
}
|
|
12069
|
+
push(key, obj) {
|
|
12070
|
+
const data = this.events[key] || [];
|
|
12071
|
+
data.push(obj);
|
|
12072
|
+
this.events[key] = data;
|
|
12073
|
+
}
|
|
12074
|
+
read(storage) {
|
|
12075
|
+
/**
|
|
12076
|
+
* If enabled, Pendo will write pending events to local storage before unloading the page
|
|
12077
|
+
* rather than attempting to send them. The events will be sent the next time the page is loaded.
|
|
12078
|
+
*
|
|
12079
|
+
* @name _pendo_unsentEvents
|
|
12080
|
+
* @category Cookies/localStorage
|
|
12081
|
+
* @access public
|
|
12082
|
+
* @label UNSENT_EVENTS_KEY
|
|
12083
|
+
*/
|
|
12084
|
+
storage.registry.addLocal(UNSENT_EVENTS_KEY);
|
|
12085
|
+
this.events = JSON.parse(storage.read(UNSENT_EVENTS_KEY) || '{}');
|
|
12086
|
+
storage.clear(UNSENT_EVENTS_KEY);
|
|
12087
|
+
}
|
|
12088
|
+
write(storage) {
|
|
12089
|
+
if (_.size(this.events) > 0) {
|
|
12090
|
+
storage.write(UNSENT_EVENTS_KEY, JSON.stringify(this.events), UNSENT_EVENTS_DURATION);
|
|
12091
|
+
}
|
|
12092
|
+
else {
|
|
12093
|
+
storage.clear(UNSENT_EVENTS_KEY);
|
|
12094
|
+
}
|
|
12095
|
+
}
|
|
12096
|
+
}
|
|
12097
|
+
var localStorageEventBuffer = new LocalStorageEventBuffer();
|
|
12098
|
+
|
|
12038
12099
|
var defaultTrackName = '_PENDO_UNNAMED_';
|
|
12039
12100
|
var SILO_AVG_COMPRESSION_RATIO = 5;
|
|
12040
12101
|
/**
|
|
@@ -12487,9 +12548,19 @@ function reliableSendEventForUnload(options) {
|
|
|
12487
12548
|
return q.resolve();
|
|
12488
12549
|
};
|
|
12489
12550
|
}
|
|
12551
|
+
function convertSiloToObject(silo, next) {
|
|
12552
|
+
silo.length = 0;
|
|
12553
|
+
const siloObj = {};
|
|
12554
|
+
for (let key in silo) {
|
|
12555
|
+
if (silo.hasOwnProperty(key)) {
|
|
12556
|
+
siloObj[key] = silo[key];
|
|
12557
|
+
}
|
|
12558
|
+
}
|
|
12559
|
+
next(siloObj);
|
|
12560
|
+
}
|
|
12490
12561
|
function createSiloQueue(options) {
|
|
12491
12562
|
return pipeline(filterAnalyticsDisabled, filterAccountIdsForSendQueue, compressSilo, shortenUrlFields(options.shorten), compressSilo, // re-compress only if the url was shortened
|
|
12492
|
-
errorLogger(), addSiloParams(options), addAccountIdParamIfAdoptPartner, addSourceParamIfPresent);
|
|
12563
|
+
errorLogger(), addSiloParams(options), addAccountIdParamIfAdoptPartner, addSourceParamIfPresent, convertSiloToObject);
|
|
12493
12564
|
}
|
|
12494
12565
|
class SendQueueSplitter {
|
|
12495
12566
|
constructor(queues) {
|
|
@@ -12514,14 +12585,20 @@ function createSendQueue(options, send, guaranteedSend) {
|
|
|
12514
12585
|
send = send || defaultSendEvent(options);
|
|
12515
12586
|
guaranteedSend = guaranteedSend || reliableSendEventForUnload(options);
|
|
12516
12587
|
const apiKeys = getApiKeysFromOptions(options);
|
|
12517
|
-
const queues = _.map(apiKeys, (apiKey) => {
|
|
12588
|
+
const queues = _.map(apiKeys, (apiKey, i) => {
|
|
12518
12589
|
const queue = new SendQueue(function (request, isUnload, failureCount) {
|
|
12519
12590
|
if (failureCount) {
|
|
12520
12591
|
request.params = _.extend({}, request.params, {
|
|
12521
12592
|
'rt': failureCount
|
|
12522
12593
|
});
|
|
12523
12594
|
}
|
|
12524
|
-
if (isUnload) {
|
|
12595
|
+
if (options.localStorageUnload && isUnload) {
|
|
12596
|
+
if (i === 0) {
|
|
12597
|
+
localStorageEventBuffer.push(options.beacon, request);
|
|
12598
|
+
}
|
|
12599
|
+
return q.resolve();
|
|
12600
|
+
}
|
|
12601
|
+
else if (isUnload) {
|
|
12525
12602
|
return guaranteedSend(apiKey, request);
|
|
12526
12603
|
}
|
|
12527
12604
|
else {
|
|
@@ -12534,7 +12611,9 @@ function createSendQueue(options, send, guaranteedSend) {
|
|
|
12534
12611
|
queue.retryPending = true;
|
|
12535
12612
|
return queue;
|
|
12536
12613
|
});
|
|
12537
|
-
|
|
12614
|
+
const queueSplitter = new SendQueueSplitter(queues);
|
|
12615
|
+
localStorageEventBuffer.send(options.beacon, queueSplitter);
|
|
12616
|
+
return queueSplitter;
|
|
12538
12617
|
}
|
|
12539
12618
|
function filterNonGuideAnalytics(beacon) {
|
|
12540
12619
|
return function (event, next) {
|
|
@@ -12633,17 +12712,17 @@ var events;
|
|
|
12633
12712
|
var trackEvents;
|
|
12634
12713
|
var eventQueue;
|
|
12635
12714
|
var trackEventQueue;
|
|
12636
|
-
function initializeEventBuffer() {
|
|
12715
|
+
function initializeEventBuffer(options) {
|
|
12637
12716
|
events = buffers.events = eventCache;
|
|
12638
12717
|
trackEvents = buffers.trackEvents = trackEventCache;
|
|
12639
|
-
eventQueue = createEventQueue({
|
|
12718
|
+
eventQueue = createEventQueue(_.extend({
|
|
12640
12719
|
'cache': events,
|
|
12641
12720
|
'silos': buffers.silos,
|
|
12642
12721
|
'apiKey': getAllApiKeys,
|
|
12643
12722
|
'beacon': 'ptm',
|
|
12644
12723
|
'allowPost': true
|
|
12645
|
-
});
|
|
12646
|
-
trackEventQueue = createEventQueue({
|
|
12724
|
+
}, options));
|
|
12725
|
+
trackEventQueue = createEventQueue(_.extend({
|
|
12647
12726
|
'cache': trackEvents,
|
|
12648
12727
|
'silos': buffers.trackEventSilos,
|
|
12649
12728
|
'apiKey': getAllApiKeys,
|
|
@@ -12652,7 +12731,7 @@ function initializeEventBuffer() {
|
|
|
12652
12731
|
'params': {
|
|
12653
12732
|
'type': 'track'
|
|
12654
12733
|
}
|
|
12655
|
-
});
|
|
12734
|
+
}, options));
|
|
12656
12735
|
addEventQueue(eventQueue);
|
|
12657
12736
|
addEventQueue(trackEventQueue);
|
|
12658
12737
|
return () => {
|
|
@@ -13163,12 +13242,6 @@ var wirePage = function (eventList) {
|
|
|
13163
13242
|
Events.appHidden.trigger();
|
|
13164
13243
|
}
|
|
13165
13244
|
}, ConfigReader.get('preventUnloadListener')));
|
|
13166
|
-
Events.appHidden.on(() => {
|
|
13167
|
-
flushNow(true, { 'hidden': true });
|
|
13168
|
-
});
|
|
13169
|
-
Events.appUnloaded.on(() => {
|
|
13170
|
-
flushNow(true, { 'unload': true });
|
|
13171
|
-
});
|
|
13172
13245
|
const shouldInterceptStopPropagation = ConfigReader.get('interceptStopPropagation', true);
|
|
13173
13246
|
const shouldInterceptPreventDefault = ConfigReader.get('interceptPreventDefault', true);
|
|
13174
13247
|
if (shouldInterceptStopPropagation) {
|
|
@@ -14870,6 +14943,20 @@ function findBlockById(id, json) {
|
|
|
14870
14943
|
}
|
|
14871
14944
|
}
|
|
14872
14945
|
|
|
14946
|
+
function addInlineStyles(config, id, styles, element = document.head) {
|
|
14947
|
+
let styleTag = document.getElementById(id);
|
|
14948
|
+
if (!styleTag) {
|
|
14949
|
+
styleTag = document.createElement('style');
|
|
14950
|
+
styleTag.setAttribute('id', id);
|
|
14951
|
+
if (config.get('inlineStyleNonce')) {
|
|
14952
|
+
styleTag.setAttribute('nonce', config.get('inlineStyleNonce'));
|
|
14953
|
+
}
|
|
14954
|
+
styleTag.innerHTML = styles;
|
|
14955
|
+
styleTag = element.appendChild(styleTag);
|
|
14956
|
+
}
|
|
14957
|
+
return styleTag;
|
|
14958
|
+
}
|
|
14959
|
+
|
|
14873
14960
|
var BuildingBlockTemplates = (function () {
|
|
14874
14961
|
return {
|
|
14875
14962
|
'buildNodesFromTemplate': buildNodesFromTemplate,
|
|
@@ -15288,8 +15375,7 @@ var BuildingBlockTemplates = (function () {
|
|
|
15288
15375
|
var generatedHtml = announcementStep.guideElement;
|
|
15289
15376
|
var elementId = generatedHtml[0].id;
|
|
15290
15377
|
var styleString = '#' + elementId + ' h1::after { display:none; }';
|
|
15291
|
-
|
|
15292
|
-
styleElem.innerHTML = styleString;
|
|
15378
|
+
addInlineStyles(ConfigReader, `pendo-whats-new-style-${elementId}`, styleString, generatedHtml[0]);
|
|
15293
15379
|
if (bubbleConfig) {
|
|
15294
15380
|
miniBubble = generateUnreadAnnouncementMiniBubble(bubbleConfig);
|
|
15295
15381
|
miniBubble.props.style.top = '20px';
|
|
@@ -19141,9 +19227,7 @@ var BuildingBlockResourceCenter = (function () {
|
|
|
19141
19227
|
var mergedUnseenCountCss = _.extend(defaultUnseenCountCss, unseenCountCss);
|
|
19142
19228
|
bubbleEle.css(mergedBubbleCss);
|
|
19143
19229
|
unseenCountEle.css(mergedUnseenCountCss);
|
|
19144
|
-
var styleEle;
|
|
19145
19230
|
if (!isOldIE(10) && !shouldNotAddInlineStyles()) {
|
|
19146
|
-
styleEle = dom(document.createElement('style')).attr('id', 'pendo-resource-center-bubble-animation');
|
|
19147
19231
|
var rgbColor = hexToRgb(notificationBubbleConfig['background-color']);
|
|
19148
19232
|
var rgbString = 'rgb(' + rgbColor.r + ', ' + rgbColor.g + ', ' + rgbColor.b + ')';
|
|
19149
19233
|
var pulseAnimation = '@keyframes pulse { ' +
|
|
@@ -19164,24 +19248,15 @@ var BuildingBlockResourceCenter = (function () {
|
|
|
19164
19248
|
'will-change: transform; ' +
|
|
19165
19249
|
'}';
|
|
19166
19250
|
var bubbleStyles = pulseAnimation + ' ' + bubblePseudoEleCss;
|
|
19167
|
-
|
|
19168
|
-
styleEle.styleSheet.cssText = bubbleStyles;
|
|
19169
|
-
}
|
|
19170
|
-
else {
|
|
19171
|
-
styleEle[0].innerHTML = bubbleStyles;
|
|
19172
|
-
}
|
|
19251
|
+
addInlineStyles(ConfigReader, 'pendo-resource-center-bubble-animation', bubbleStyles);
|
|
19173
19252
|
}
|
|
19174
19253
|
unseenCountEle.text(unseenCount);
|
|
19175
19254
|
return {
|
|
19176
19255
|
'bubbleEle': bubbleEle,
|
|
19177
|
-
'unseenCountEle': unseenCountEle
|
|
19178
|
-
'styleEle': styleEle
|
|
19256
|
+
'unseenCountEle': unseenCountEle
|
|
19179
19257
|
};
|
|
19180
19258
|
}
|
|
19181
19259
|
function appendNotificationBubble(notificationBubbleElements, targetElement) {
|
|
19182
|
-
if (notificationBubbleElements.styleEle) {
|
|
19183
|
-
notificationBubbleElements.styleEle.appendTo(targetElement);
|
|
19184
|
-
}
|
|
19185
19260
|
notificationBubbleElements.unseenCountEle.appendTo(notificationBubbleElements.bubbleEle);
|
|
19186
19261
|
notificationBubbleElements.bubbleEle.appendTo(targetElement);
|
|
19187
19262
|
}
|
|
@@ -20745,7 +20820,11 @@ function Wrappable() {
|
|
|
20745
20820
|
var debugEnabled = 'debug-enabled';
|
|
20746
20821
|
function getDebuggingStorage() {
|
|
20747
20822
|
try {
|
|
20748
|
-
|
|
20823
|
+
const debuggingStorage = JSON.parse(agentStorage.read(debugEnabled, true) || getCookie(debugEnabled));
|
|
20824
|
+
if (typeof debuggingStorage === 'boolean') { // v1 debugger storage format
|
|
20825
|
+
return { 'enabled': debuggingStorage };
|
|
20826
|
+
}
|
|
20827
|
+
return debuggingStorage || {};
|
|
20749
20828
|
}
|
|
20750
20829
|
catch (e) {
|
|
20751
20830
|
return {};
|
|
@@ -22131,7 +22210,6 @@ var DesignerV2 = (function () {
|
|
|
22131
22210
|
'isValidDesignerHost': isValidDesignerHost,
|
|
22132
22211
|
'isValidTarget': isValidTarget,
|
|
22133
22212
|
'addCommunicationIframe': addCommunicationIframe,
|
|
22134
|
-
'addStylesToPage': addStylesToPage,
|
|
22135
22213
|
'hostConfig': { 'host': host },
|
|
22136
22214
|
'isDesignerFrame': isDesignerFrame,
|
|
22137
22215
|
'addScriptToPage': addScriptToPage
|
|
@@ -22311,7 +22389,7 @@ var DesignerV2 = (function () {
|
|
|
22311
22389
|
function launchDesigner(options) {
|
|
22312
22390
|
var baseFolder = 'latest';
|
|
22313
22391
|
var gcsBucket = 'designer';
|
|
22314
|
-
|
|
22392
|
+
addInlineStyles(ConfigReader, 'designer-styles', getStyles());
|
|
22315
22393
|
var designerShimsSrc = host + '/' + gcsBucket + '/' + baseFolder + '/plugin.js';
|
|
22316
22394
|
addScriptToPage('designer-shims', designerShimsSrc);
|
|
22317
22395
|
if (pendo$1.DESIGNER_VERSION) {
|
|
@@ -22384,16 +22462,6 @@ var DesignerV2 = (function () {
|
|
|
22384
22462
|
container.appendChild(iframe);
|
|
22385
22463
|
return container;
|
|
22386
22464
|
}
|
|
22387
|
-
function addStylesToPage(styleId, styles) {
|
|
22388
|
-
if (document.getElementById(styleId))
|
|
22389
|
-
return;
|
|
22390
|
-
var styleNode = document.createElement('style');
|
|
22391
|
-
styleNode.setAttribute('id', styleId);
|
|
22392
|
-
styleNode.type = 'text/css';
|
|
22393
|
-
var styleText = document.createTextNode(styles);
|
|
22394
|
-
styleNode.appendChild(styleText);
|
|
22395
|
-
document.getElementsByTagName('head')[0].appendChild(styleNode);
|
|
22396
|
-
}
|
|
22397
22465
|
function addScriptToPage(scriptId, scriptURL, attributes) {
|
|
22398
22466
|
if (document.getElementById(scriptId))
|
|
22399
22467
|
return;
|
|
@@ -22514,7 +22582,7 @@ var P2AutoLaunch = (function () {
|
|
|
22514
22582
|
'box-sizing': 'border-box'
|
|
22515
22583
|
};
|
|
22516
22584
|
var modalContainer = createUIElement('div', ids.container, modalStyles);
|
|
22517
|
-
|
|
22585
|
+
addInlineStyles(ConfigReader, ids.style, buildPseudoStyles(pseudoStyles), modalContainer);
|
|
22518
22586
|
modalContainer.appendChild(createHeader(isVia));
|
|
22519
22587
|
modalContainer.appendChild(createBody());
|
|
22520
22588
|
modalContainer.appendChild(createFooter(token));
|
|
@@ -22639,14 +22707,6 @@ var P2AutoLaunch = (function () {
|
|
|
22639
22707
|
return acc + key + '{' + buildStyles(value) + '} ';
|
|
22640
22708
|
}, '');
|
|
22641
22709
|
}
|
|
22642
|
-
function createPseudoStyles() {
|
|
22643
|
-
var styleNode = document.createElement('style');
|
|
22644
|
-
styleNode.setAttribute('id', ids.style);
|
|
22645
|
-
styleNode.type = 'text/css';
|
|
22646
|
-
var styleText = document.createTextNode(buildPseudoStyles(pseudoStyles));
|
|
22647
|
-
styleNode.appendChild(styleText);
|
|
22648
|
-
return styleNode;
|
|
22649
|
-
}
|
|
22650
22710
|
function createUIElement(type, id, styles) {
|
|
22651
22711
|
var ele = document.createElement(type);
|
|
22652
22712
|
ele.setAttribute('id', id);
|
|
@@ -23532,11 +23592,12 @@ var findAllItemsInGuidelistBy = function (fn) {
|
|
|
23532
23592
|
return arr;
|
|
23533
23593
|
}, []);
|
|
23534
23594
|
};
|
|
23535
|
-
var _updateGuideStepStatus = function (guideId, stepId, seenState, time, dismissCount) {
|
|
23595
|
+
var _updateGuideStepStatus = function (guideId, stepId, seenState, time, dismissCount, destinationStepId) {
|
|
23536
23596
|
var step = findStepInGuide(findGuideById(guideId), stepId);
|
|
23537
23597
|
if (step) {
|
|
23538
23598
|
step.seenState = seenState;
|
|
23539
23599
|
step.lastSeenAt = time;
|
|
23600
|
+
step.destinationStepId = destinationStepId;
|
|
23540
23601
|
if (dismissCount !== undefined) {
|
|
23541
23602
|
step.dismissCount = dismissCount;
|
|
23542
23603
|
}
|
|
@@ -24017,7 +24078,7 @@ var onGuideAdvanced = function (evt, step, isIntermediateStep) {
|
|
|
24017
24078
|
'seenReason': step.seenReason,
|
|
24018
24079
|
'visitorId': get_visitor_id()
|
|
24019
24080
|
});
|
|
24020
|
-
_updateGuideStepStatus(currentGuide.id, step.id, 'advanced', stepNow);
|
|
24081
|
+
_updateGuideStepStatus(currentGuide.id, step.id, 'advanced', stepNow, undefined, destinationStepId);
|
|
24021
24082
|
}
|
|
24022
24083
|
return onGuideAdvanced(currentGuide.steps[destinationIndex], step, true);
|
|
24023
24084
|
}
|
|
@@ -24043,7 +24104,7 @@ var onGuideAdvanced = function (evt, step, isIntermediateStep) {
|
|
|
24043
24104
|
dismissCount = _.get(step, 'dismissCount', 0) + 1;
|
|
24044
24105
|
}
|
|
24045
24106
|
var now = new Date().getTime();
|
|
24046
|
-
_updateGuideStepStatus(guideId, stepId, 'advanced', now, dismissCount);
|
|
24107
|
+
_updateGuideStepStatus(guideId, stepId, 'advanced', now, dismissCount, destinationStepId);
|
|
24047
24108
|
var guide = _.isFunction(step.getGuide) && step.getGuide();
|
|
24048
24109
|
var doNotResume = guide && guide.attributes && guide.attributes.doNotResume;
|
|
24049
24110
|
if (!doNotResume) {
|
|
@@ -24129,7 +24190,7 @@ var onGuidePrevious = function (evt, step) {
|
|
|
24129
24190
|
advancedGuide(guideId, step.id, get_visitor_id(), seenReason, language, false, destinationStepId);
|
|
24130
24191
|
log.info('update guide status');
|
|
24131
24192
|
var now = new Date().getTime();
|
|
24132
|
-
_updateGuideStepStatus(step.guideId, step.id, 'advanced', now);
|
|
24193
|
+
_updateGuideStepStatus(step.guideId, step.id, 'advanced', now, undefined, destinationStepId);
|
|
24133
24194
|
var guide = _.isFunction(step.getGuide) && step.getGuide();
|
|
24134
24195
|
var doNotResume = guide && guide.attributes && guide.attributes.doNotResume;
|
|
24135
24196
|
if (!doNotResume) {
|
|
@@ -25149,7 +25210,7 @@ var getGuideEventCache = function () {
|
|
|
25149
25210
|
return guideEvtCache;
|
|
25150
25211
|
};
|
|
25151
25212
|
function createGuideEventQueue(options) {
|
|
25152
|
-
const processSilos = pipeline(filterAnalyticsDisabled, splitSiloOnFieldChange('visitor_id'), splitSiloOnFieldChange('props.guide_id'), splitSiloOnFieldChange('props.source'), compressSilo, errorLogger(), addSiloParams(options), addAccountIdParamIfAdoptPartner, addSourceParamIfPresent);
|
|
25213
|
+
const processSilos = pipeline(filterAnalyticsDisabled, splitSiloOnFieldChange('visitor_id'), splitSiloOnFieldChange('props.guide_id'), splitSiloOnFieldChange('props.source'), compressSilo, errorLogger(), addSiloParams(options), addAccountIdParamIfAdoptPartner, addSourceParamIfPresent, convertSiloToObject);
|
|
25153
25214
|
const packageSilos = pipeline(eventSequence, siloReducer(options.cache), _.noop // do not move to the silo queue until manual flush
|
|
25154
25215
|
);
|
|
25155
25216
|
return new EventQueue(_.extend({ processSilos, packageSilos }, options));
|
|
@@ -25175,28 +25236,32 @@ function listenForTabIdChange() {
|
|
|
25175
25236
|
store.dispatch('frames/join');
|
|
25176
25237
|
});
|
|
25177
25238
|
}
|
|
25178
|
-
function initGuideAnalytics() {
|
|
25239
|
+
function initGuideAnalytics(options) {
|
|
25179
25240
|
if (!guideEventQueue) {
|
|
25180
|
-
guideEventQueue = createGuideEventQueue({
|
|
25241
|
+
guideEventQueue = createGuideEventQueue(_.extend({
|
|
25181
25242
|
'cache': guideEvtCache,
|
|
25182
25243
|
'apiKey': function () { return pendo$1.apiKey; },
|
|
25183
25244
|
'beacon': 'guide',
|
|
25184
25245
|
'allowPost': true,
|
|
25185
25246
|
'preferFetch': sniffer.safari
|
|
25186
|
-
});
|
|
25247
|
+
}, options));
|
|
25187
25248
|
}
|
|
25188
25249
|
if (!pollEventQueue) {
|
|
25189
|
-
pollEventQueue = createGuideEventQueue({
|
|
25250
|
+
pollEventQueue = createGuideEventQueue(_.extend({
|
|
25190
25251
|
'cache': [],
|
|
25191
25252
|
'apiKey': function () { return pendo$1.apiKey; },
|
|
25192
25253
|
'beacon': 'poll',
|
|
25193
25254
|
'allowPost': true,
|
|
25194
25255
|
'preferFetch': sniffer.safari
|
|
25195
|
-
});
|
|
25256
|
+
}, options));
|
|
25196
25257
|
}
|
|
25258
|
+
addEventQueue(guideEventQueue);
|
|
25259
|
+
addEventQueue(pollEventQueue);
|
|
25197
25260
|
return () => {
|
|
25198
25261
|
guideEventQueue.clear();
|
|
25199
25262
|
pollEventQueue.clear();
|
|
25263
|
+
removeEventQueue(guideEventQueue);
|
|
25264
|
+
removeEventQueue(pollEventQueue);
|
|
25200
25265
|
};
|
|
25201
25266
|
}
|
|
25202
25267
|
function securityPolicyViolationFn(evt) {
|
|
@@ -25221,14 +25286,12 @@ function securityPolicyViolationFn(evt) {
|
|
|
25221
25286
|
*/
|
|
25222
25287
|
var initGuides = function () {
|
|
25223
25288
|
const teardownFns = [];
|
|
25224
|
-
teardownFns.push(initGuideAnalytics(
|
|
25289
|
+
teardownFns.push(initGuideAnalytics({
|
|
25290
|
+
'localStorageUnload': ConfigReader.get('analytics.localStorageUnload')
|
|
25291
|
+
}));
|
|
25225
25292
|
GuideMonitor.run();
|
|
25226
25293
|
teardownFns.push(GuideMonitor.stop);
|
|
25227
|
-
Events.appHidden.on(function () {
|
|
25228
|
-
processGuideEventCache({ 'hidden': true });
|
|
25229
|
-
});
|
|
25230
25294
|
Events.appUnloaded.on(function () {
|
|
25231
|
-
processGuideEventCache({ 'unload': true });
|
|
25232
25295
|
store.dispatch('frames/leave');
|
|
25233
25296
|
});
|
|
25234
25297
|
Events.metadata.on(function (event) {
|
|
@@ -26345,7 +26408,8 @@ const PluginAPI = {
|
|
|
26345
26408
|
'util': {
|
|
26346
26409
|
'trim': trim,
|
|
26347
26410
|
'base64EncodeString': base64EncodeString,
|
|
26348
|
-
'parseUrl': parseUrl
|
|
26411
|
+
'parseUrl': parseUrl,
|
|
26412
|
+
'addInlineStyles': _.partial(addInlineStyles, ConfigReader)
|
|
26349
26413
|
},
|
|
26350
26414
|
'constants': {
|
|
26351
26415
|
URL_MAX_LENGTH
|
|
@@ -26726,7 +26790,11 @@ const initialize = makeSafe(function (options) {
|
|
|
26726
26790
|
if (ConfigReader.get('preferBroadcastChannel')) {
|
|
26727
26791
|
SingletonMessageHandler.secure(true);
|
|
26728
26792
|
}
|
|
26729
|
-
|
|
26793
|
+
const localStorageUnloadEnabled = ConfigReader.get('analytics.localStorageUnload');
|
|
26794
|
+
localStorageEventBuffer.read(agentStorage);
|
|
26795
|
+
teardownFns.push(initializeEventBuffer({
|
|
26796
|
+
'localStorageUnload': localStorageUnloadEnabled
|
|
26797
|
+
}));
|
|
26730
26798
|
if (pendoCore) {
|
|
26731
26799
|
/**
|
|
26732
26800
|
* Current visitor id for pendo installation, either anonymous or identified. Used to determine
|
|
@@ -26789,6 +26857,15 @@ const initialize = makeSafe(function (options) {
|
|
|
26789
26857
|
Events.appUsage.on(ResourceCenterActivity.handler);
|
|
26790
26858
|
teardownFns.push(flushEvery(SEND_INTERVAL));
|
|
26791
26859
|
}
|
|
26860
|
+
Events.appHidden.on(() => {
|
|
26861
|
+
flushNow(true, { 'hidden': true });
|
|
26862
|
+
});
|
|
26863
|
+
Events.appUnloaded.on(() => {
|
|
26864
|
+
flushNow(true, { 'unload': true });
|
|
26865
|
+
if (localStorageUnloadEnabled) {
|
|
26866
|
+
localStorageEventBuffer.write(agentStorage);
|
|
26867
|
+
}
|
|
26868
|
+
});
|
|
26792
26869
|
// Remove existing visitor and account identification cookies if
|
|
26793
26870
|
// disablePersistence is set to true via administration UI or snippet
|
|
26794
26871
|
if (!shouldPersist()) {
|
|
@@ -32929,7 +33006,7 @@ var DesignerConnect = (function () {
|
|
|
32929
33006
|
}
|
|
32930
33007
|
}
|
|
32931
33008
|
function onConnectMessage(data, msg) {
|
|
32932
|
-
if (globalPendo.
|
|
33009
|
+
if (!globalPendo.designer) {
|
|
32933
33010
|
var messageOrigin = msg.origin;
|
|
32934
33011
|
globalPendo.stopGuides();
|
|
32935
33012
|
globalPendo.buffers.lock();
|
|
@@ -33116,8 +33193,14 @@ var PromoteMetadata = (function () {
|
|
|
33116
33193
|
}
|
|
33117
33194
|
function createSchemaGroup(metadata) {
|
|
33118
33195
|
if (shouldPersist()) {
|
|
33119
|
-
|
|
33120
|
-
|
|
33196
|
+
try {
|
|
33197
|
+
const storedSchemaGroup = pluginApi.agentStorage.read(SCHEMA_GROUP);
|
|
33198
|
+
cachedSchemaGroup = storedSchemaGroup ? JSON.parse(storedSchemaGroup) : {};
|
|
33199
|
+
cachedSchemaGroup = removePrefixes(cachedSchemaGroup);
|
|
33200
|
+
}
|
|
33201
|
+
catch (e) {
|
|
33202
|
+
resetCachedSchemaGroup();
|
|
33203
|
+
}
|
|
33121
33204
|
}
|
|
33122
33205
|
var __sg__ = getSchemaGroup();
|
|
33123
33206
|
_.each(['visitor', 'account', 'parentAccount'], function (kind) {
|
|
@@ -35132,7 +35215,7 @@ var Branding = (function () {
|
|
|
35132
35215
|
link.href = 'https://www.pendo.io/pendo-free/nps?utm_source=pendo_app&utm_medium=branded-nps&utm_campaign=free-branded-nps';
|
|
35133
35216
|
link.target = '_blank';
|
|
35134
35217
|
var img = document.createElement('img');
|
|
35135
|
-
img.setAttribute('src',
|
|
35218
|
+
img.setAttribute('src', getAssetHost() + '/img/nps-branding.png');
|
|
35136
35219
|
link.appendChild(img);
|
|
35137
35220
|
link.style.display = 'inline-block';
|
|
35138
35221
|
var div = document.createElement('div');
|
|
@@ -36180,9 +36263,11 @@ const FrustrationEvent = (function () {
|
|
|
36180
36263
|
|
|
36181
36264
|
// A guide that show nested inside another element.
|
|
36182
36265
|
// Multiple embedded guides can show at the same time.
|
|
36183
|
-
const buildGuideBehaviors = function ({
|
|
36266
|
+
const buildGuideBehaviors = function ({ globalPendo, pluginApi }) {
|
|
36267
|
+
const guide = this;
|
|
36184
36268
|
const { _ } = globalPendo;
|
|
36185
|
-
const
|
|
36269
|
+
const { store } = pluginApi;
|
|
36270
|
+
this.process = function () {
|
|
36186
36271
|
const guide = this;
|
|
36187
36272
|
let guideElement = null;
|
|
36188
36273
|
const containerSelector = '[id^="pendo-guide-container"]';
|
|
@@ -36204,7 +36289,7 @@ const buildGuideBehaviors = function ({ store, globalPendo }) {
|
|
|
36204
36289
|
guide.hide();
|
|
36205
36290
|
}
|
|
36206
36291
|
};
|
|
36207
|
-
|
|
36292
|
+
this.getActiveStep = function () {
|
|
36208
36293
|
const guide = this;
|
|
36209
36294
|
if (!guide)
|
|
36210
36295
|
return null;
|
|
@@ -36212,31 +36297,51 @@ const buildGuideBehaviors = function ({ store, globalPendo }) {
|
|
|
36212
36297
|
return step.isShown();
|
|
36213
36298
|
});
|
|
36214
36299
|
};
|
|
36215
|
-
|
|
36300
|
+
this.shouldAutoDisplay = function () {
|
|
36216
36301
|
const guide = this;
|
|
36217
36302
|
return (guide.shouldShowSnoozedGuide() || guide.shouldRepeatGuide() || _.all(guide.steps, function (step) {
|
|
36218
36303
|
return step.shouldRepeat() || (!step.isSnoozed() && step.seenState !== 'dismissed');
|
|
36219
36304
|
}));
|
|
36220
36305
|
};
|
|
36221
|
-
|
|
36306
|
+
this.show = function (reason) {
|
|
36222
36307
|
const guide = this;
|
|
36223
36308
|
const firstStep = _.first(guide.steps);
|
|
36224
|
-
|
|
36225
|
-
|
|
36226
|
-
|
|
36227
|
-
|
|
36228
|
-
|
|
36309
|
+
if (guide.forceShowFirstStep) {
|
|
36310
|
+
guide.forceShowFirstStep = false;
|
|
36311
|
+
return firstStep.show('reason');
|
|
36312
|
+
}
|
|
36313
|
+
const steps = guide.steps.map((step) => {
|
|
36314
|
+
// The stored step state is most up to date. Fallback to the guides payload
|
|
36315
|
+
return _.get(store, `state.guideState.steps.${step.id}`, stepToLastSeenObject(step));
|
|
36316
|
+
});
|
|
36317
|
+
const lastSeenStep = _.max(steps, function ({ time }) { return time; });
|
|
36318
|
+
if (lastSeenStep && lastSeenStep.state == 'advanced' && !lastSeenStep.destinationStepId) {
|
|
36319
|
+
return guide.findStepById(lastSeenStep.guideStepId).dismiss();
|
|
36229
36320
|
}
|
|
36230
36321
|
const nextStep = guide.nextStep(lastSeenStep) || firstStep;
|
|
36231
36322
|
return nextStep.show(reason);
|
|
36232
36323
|
};
|
|
36233
|
-
|
|
36324
|
+
// when embedded guide is initialized set the forceShowFirstStep property.
|
|
36325
|
+
// This property is deleted after the guide shows because we no longer want to foce show the first step.
|
|
36326
|
+
// The propert is reset on urlChanged events.
|
|
36327
|
+
if (!this.hasOwnProperty('forceShowFirstStep')) {
|
|
36328
|
+
this.forceShowFirstStep = _.get(guide, 'attributes.restartOnReload');
|
|
36329
|
+
}
|
|
36330
|
+
this.isShownInThisFrame = function () {
|
|
36234
36331
|
const guide = this;
|
|
36235
36332
|
return _.any(guide.steps, function (step) {
|
|
36236
36333
|
return step.isRendered() || step.isLocked();
|
|
36237
36334
|
});
|
|
36238
36335
|
};
|
|
36239
|
-
|
|
36336
|
+
// Maps step fields to an last seen step object. See the guide.nextStep function.
|
|
36337
|
+
const stepToLastSeenObject = ({ id, guideId, seenReason, seenState, lastSeenAt, destinationStepId }) => ({
|
|
36338
|
+
guideId,
|
|
36339
|
+
'guideStepId': id,
|
|
36340
|
+
seenReason,
|
|
36341
|
+
'state': seenState,
|
|
36342
|
+
'time': lastSeenAt,
|
|
36343
|
+
destinationStepId
|
|
36344
|
+
});
|
|
36240
36345
|
};
|
|
36241
36346
|
const buildStepBehaviors = function ({ pluginApi, _ }) {
|
|
36242
36347
|
const step = this;
|
|
@@ -36250,18 +36355,16 @@ const buildStepBehaviors = function ({ pluginApi, _ }) {
|
|
|
36250
36355
|
}
|
|
36251
36356
|
if (!step._onShown)
|
|
36252
36357
|
return null;
|
|
36253
|
-
|
|
36358
|
+
this.onShown = function (reason) {
|
|
36254
36359
|
const step = this;
|
|
36255
36360
|
const shouldTriggerGuideSeen = !step.lastSeenAt || !!pluginApi.ConfigReader.get('enableAllEmbeddedGuideEvents');
|
|
36256
36361
|
return step._onShown(reason, shouldTriggerGuideSeen);
|
|
36257
36362
|
};
|
|
36258
|
-
return { onShown };
|
|
36259
36363
|
};
|
|
36260
36364
|
|
|
36261
36365
|
const EmbeddedGuides = (function () {
|
|
36262
36366
|
let pluginApi;
|
|
36263
36367
|
let globalPendo;
|
|
36264
|
-
let embeddedGuideBehaviors;
|
|
36265
36368
|
let _;
|
|
36266
36369
|
const embeddedGuides = [];
|
|
36267
36370
|
let _oldEmbeddedGuides = [];
|
|
@@ -36276,11 +36379,11 @@ const EmbeddedGuides = (function () {
|
|
|
36276
36379
|
globalPendo = pendo;
|
|
36277
36380
|
_ = globalPendo._;
|
|
36278
36381
|
exportPublicEmbeddedGuideApi(pendo);
|
|
36279
|
-
embeddedGuideBehaviors = buildGuideBehaviors({ 'store': pluginApi.store, globalPendo });
|
|
36280
36382
|
pluginApi.Events.on('deliverablesLoaded', clearEmbeddedGuides);
|
|
36281
36383
|
pluginApi.Events.on('guideLoopStopped', hideAllEmbeddedGuides);
|
|
36282
36384
|
pluginApi.Events.on('guideListChanged', initializeEmbeddedGuides);
|
|
36283
|
-
pluginApi.
|
|
36385
|
+
pluginApi.Events.on('urlChanged', setForceShowFirstStepFlags);
|
|
36386
|
+
pluginApi.GuideLoop.addUpdatePhase(processEmbeddedGuides);
|
|
36284
36387
|
pluginApi.guides.addProcessor(extractEmbeddedGuides);
|
|
36285
36388
|
pluginApi.GuideActivity.registerGuideResolver(getGuideObjectFromEvent);
|
|
36286
36389
|
this.removeResizeEvent = pendo.attachEvent(window, 'resize', redrawEmbeddedGuides);
|
|
@@ -36290,16 +36393,17 @@ const EmbeddedGuides = (function () {
|
|
|
36290
36393
|
pluginApi.Events.off('deliverablesLoaded', clearEmbeddedGuides);
|
|
36291
36394
|
pluginApi.Events.off('guideLoopStopped', hideAllEmbeddedGuides);
|
|
36292
36395
|
pluginApi.Events.off('guideListChanged', initializeEmbeddedGuides);
|
|
36293
|
-
pluginApi.
|
|
36396
|
+
pluginApi.Events.off('urlChanged', setForceShowFirstStepFlags);
|
|
36397
|
+
pluginApi.GuideLoop.removeUpdatePhase(processEmbeddedGuides);
|
|
36294
36398
|
pluginApi.guides.removeProcessor(extractEmbeddedGuides);
|
|
36295
36399
|
pluginApi.GuideActivity.removeGuideResolver(getGuideObjectFromEvent);
|
|
36296
36400
|
if (this.removeResizeEvent)
|
|
36297
36401
|
this.removeResizeEvent();
|
|
36298
36402
|
_oldEmbeddedGuides.length = 0;
|
|
36299
36403
|
}
|
|
36300
|
-
function
|
|
36404
|
+
function processEmbeddedGuides() {
|
|
36301
36405
|
_.forEach(embeddedGuides, function (guide) {
|
|
36302
|
-
guide.
|
|
36406
|
+
guide.process();
|
|
36303
36407
|
});
|
|
36304
36408
|
}
|
|
36305
36409
|
function hideAllEmbeddedGuides() {
|
|
@@ -36315,6 +36419,13 @@ const EmbeddedGuides = (function () {
|
|
|
36315
36419
|
pluginApi.guides.removeDisplayableGuides('embeddedGuides');
|
|
36316
36420
|
embeddedGuides.length = 0;
|
|
36317
36421
|
}
|
|
36422
|
+
// This function syncs the forceShowFirstStep with the restartOnReload property on guides
|
|
36423
|
+
// This function is run on the urlChanged event.
|
|
36424
|
+
function setForceShowFirstStepFlags() {
|
|
36425
|
+
_.forEach(embeddedGuides, function (guide) {
|
|
36426
|
+
guide.forceShowFirstStep = !!_.get(guide, 'attributes.restartOnReload');
|
|
36427
|
+
});
|
|
36428
|
+
}
|
|
36318
36429
|
function extractEmbeddedGuides(guide) {
|
|
36319
36430
|
if (isEmbedded(guide)) {
|
|
36320
36431
|
if (!_.some(embeddedGuides, ({ id }) => id === guide.id)) {
|
|
@@ -36377,10 +36488,9 @@ const EmbeddedGuides = (function () {
|
|
|
36377
36488
|
}
|
|
36378
36489
|
function applyEmbeddedGuideBehaviors() {
|
|
36379
36490
|
_.map(embeddedGuides, function (guide) {
|
|
36380
|
-
|
|
36491
|
+
buildGuideBehaviors.call(guide, { globalPendo, pluginApi });
|
|
36381
36492
|
_.map(guide.steps, function (step) {
|
|
36382
|
-
|
|
36383
|
-
Object.assign(step, stepBehaviors);
|
|
36493
|
+
buildStepBehaviors.call(step, { pluginApi, _ });
|
|
36384
36494
|
});
|
|
36385
36495
|
});
|
|
36386
36496
|
}
|
|
@@ -36454,6 +36564,7 @@ class SessionManager {
|
|
|
36454
36564
|
* @label SESSION_ID
|
|
36455
36565
|
*/
|
|
36456
36566
|
this.api.agentStorage.registry.addLocal(SESSION_ID);
|
|
36567
|
+
this.suffix = this.api.ConfigReader.get('identityStorageSuffix');
|
|
36457
36568
|
}
|
|
36458
36569
|
teardown() {
|
|
36459
36570
|
_.each(this.subscriptions, function (unsubscribe) {
|
|
@@ -36483,23 +36594,25 @@ class SessionManager {
|
|
|
36483
36594
|
capturedEvent.sessionId = sessionInfo.sessionId;
|
|
36484
36595
|
}
|
|
36485
36596
|
sessionInfo(defaultId = this.pendo.randomString(16)) {
|
|
36486
|
-
let currentSessionInfo = this.api.agentStorage.read(SESSION_ID)
|
|
36597
|
+
let currentSessionInfo = this.api.agentStorage.read(SESSION_ID, false, this.suffix) ||
|
|
36598
|
+
this.api.agentStorage.read(SESSION_ID);
|
|
36487
36599
|
if (!currentSessionInfo) {
|
|
36488
36600
|
currentSessionInfo = JSON.stringify({
|
|
36489
36601
|
'sessionId': defaultId,
|
|
36490
36602
|
'timestamp': new Date().getTime()
|
|
36491
36603
|
});
|
|
36492
|
-
this.api.agentStorage.write(SESSION_ID, currentSessionInfo);
|
|
36604
|
+
this.api.agentStorage.write(SESSION_ID, currentSessionInfo, undefined, false, true, this.suffix);
|
|
36493
36605
|
}
|
|
36494
36606
|
return JSON.parse(currentSessionInfo);
|
|
36495
36607
|
}
|
|
36496
36608
|
clearSessionInfo() {
|
|
36497
36609
|
this.api.agentStorage.clear(SESSION_ID);
|
|
36610
|
+
this.api.agentStorage.clear(SESSION_ID, false, this.suffix);
|
|
36498
36611
|
return this.sessionInfo();
|
|
36499
36612
|
}
|
|
36500
36613
|
storeLastInteractionEventInformation(sessionInfo, timestamp) {
|
|
36501
36614
|
sessionInfo.timestamp = timestamp;
|
|
36502
|
-
this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo));
|
|
36615
|
+
this.api.agentStorage.write(SESSION_ID, JSON.stringify(sessionInfo), undefined, false, true, this.suffix);
|
|
36503
36616
|
}
|
|
36504
36617
|
}
|
|
36505
36618
|
var SessionManager$1 = new SessionManager();
|
|
@@ -36855,6 +36968,7 @@ class WebAnalytics {
|
|
|
36855
36968
|
*/
|
|
36856
36969
|
this.api.agentStorage.registry.addLocal(WEB_ANALYTICS_STORAGE_KEY);
|
|
36857
36970
|
this.storeParameters(params, PluginAPI.agentStorage);
|
|
36971
|
+
this.suffix = this.api.ConfigReader.get('identityStorageSuffix');
|
|
36858
36972
|
}
|
|
36859
36973
|
extractParameters(url, referrer) {
|
|
36860
36974
|
const locationUrl = new URL(url);
|
|
@@ -36915,11 +37029,12 @@ class WebAnalytics {
|
|
|
36915
37029
|
storeParameters(params, storage) {
|
|
36916
37030
|
if (this.pendo._.size(params) > 0) {
|
|
36917
37031
|
this.utm = params;
|
|
36918
|
-
storage.write(WEB_ANALYTICS_STORAGE_KEY, JSON.stringify(params));
|
|
37032
|
+
storage.write(WEB_ANALYTICS_STORAGE_KEY, JSON.stringify(params), undefined, false, true, this.suffix);
|
|
36919
37033
|
}
|
|
36920
37034
|
}
|
|
36921
37035
|
loadParameters(storage) {
|
|
36922
|
-
const storedParamsJson = storage.read(WEB_ANALYTICS_STORAGE_KEY)
|
|
37036
|
+
const storedParamsJson = storage.read(WEB_ANALYTICS_STORAGE_KEY, false, this.suffix) ||
|
|
37037
|
+
storage.read(WEB_ANALYTICS_STORAGE_KEY);
|
|
36923
37038
|
if (storedParamsJson)
|
|
36924
37039
|
return JSON.parse(storedParamsJson);
|
|
36925
37040
|
return null;
|
|
@@ -36941,6 +37056,7 @@ class WebAnalytics {
|
|
|
36941
37056
|
this.utm = null;
|
|
36942
37057
|
const agentStorage = this.api.agentStorage;
|
|
36943
37058
|
agentStorage.clear(WEB_ANALYTICS_STORAGE_KEY);
|
|
37059
|
+
agentStorage.clear(WEB_ANALYTICS_STORAGE_KEY, false, this.suffix);
|
|
36944
37060
|
const params = this.extractParameters(window.location.href, document.referrer);
|
|
36945
37061
|
this.storeParameters(params, agentStorage);
|
|
36946
37062
|
}
|
|
@@ -37304,14 +37420,12 @@ const FormValidation = (function () {
|
|
|
37304
37420
|
return true;
|
|
37305
37421
|
}
|
|
37306
37422
|
function appendValidationStyles() {
|
|
37307
|
-
|
|
37308
|
-
|
|
37309
|
-
|
|
37423
|
+
if (validationGuides.length === 0)
|
|
37424
|
+
return;
|
|
37425
|
+
pluginApi.util.addInlineStyles('pendo-form-validation-styles', `input[data-pendo-field-valid="false"] {
|
|
37310
37426
|
border-color: red !important;
|
|
37311
37427
|
outline-color: red !important;
|
|
37312
|
-
}
|
|
37313
|
-
`;
|
|
37314
|
-
document.head.appendChild(style);
|
|
37428
|
+
}`);
|
|
37315
37429
|
}
|
|
37316
37430
|
function focusField(event) {
|
|
37317
37431
|
var _a, _b;
|
|
@@ -37990,6 +38104,18 @@ var guideMarkdownUtil = {
|
|
|
37990
38104
|
removeMarkdownSyntax
|
|
37991
38105
|
};
|
|
37992
38106
|
|
|
38107
|
+
function getZoneSafeMethod(_, method, target = window) {
|
|
38108
|
+
var zoneSymbol = '__symbol__';
|
|
38109
|
+
/* global Zone */
|
|
38110
|
+
if (typeof Zone !== 'undefined' && _.isFunction(Zone[zoneSymbol])) {
|
|
38111
|
+
var fn = target[Zone[zoneSymbol](method)];
|
|
38112
|
+
if (_.isFunction(fn)) {
|
|
38113
|
+
return fn;
|
|
38114
|
+
}
|
|
38115
|
+
}
|
|
38116
|
+
return target[method];
|
|
38117
|
+
}
|
|
38118
|
+
|
|
37993
38119
|
// Does not support submit and go to
|
|
37994
38120
|
const goToRegex = new RegExp(guideMarkdownUtil.goToString);
|
|
37995
38121
|
const PollBranching = {
|
|
@@ -38029,6 +38155,7 @@ const PollBranching = {
|
|
|
38029
38155
|
'characterData': true,
|
|
38030
38156
|
'subtree': false
|
|
38031
38157
|
};
|
|
38158
|
+
const MutationObserver = getZoneSafeMethod(pendo._, 'MutationObserver');
|
|
38032
38159
|
const observer = new MutationObserver(applyBranchingIndicators);
|
|
38033
38160
|
observer.observe(target, config);
|
|
38034
38161
|
function applyBranchingIndicators(mutations) {
|
|
@@ -38176,6 +38303,7 @@ const MetadataSubstitution = {
|
|
|
38176
38303
|
'characterData': true,
|
|
38177
38304
|
'subtree': false
|
|
38178
38305
|
};
|
|
38306
|
+
const MutationObserver = getZoneSafeMethod(pendo._, 'MutationObserver');
|
|
38179
38307
|
const observer = new MutationObserver(applySubstitutionIndicators);
|
|
38180
38308
|
observer.observe(target, config);
|
|
38181
38309
|
function applySubstitutionIndicators(mutations) {
|
|
@@ -38491,6 +38619,7 @@ const RequiredQuestions = {
|
|
|
38491
38619
|
'characterData': true,
|
|
38492
38620
|
'subtree': false
|
|
38493
38621
|
};
|
|
38622
|
+
const MutationObserver = getZoneSafeMethod(pendo._, 'MutationObserver');
|
|
38494
38623
|
const observer = new MutationObserver(applyRequiredIndicators);
|
|
38495
38624
|
observer.observe(target, config);
|
|
38496
38625
|
function applyRequiredIndicators(mutations) {
|
|
@@ -38613,6 +38742,7 @@ const SkipToEligibleStep = {
|
|
|
38613
38742
|
'characterData': true,
|
|
38614
38743
|
'subtree': false
|
|
38615
38744
|
};
|
|
38745
|
+
const MutationObserver = getZoneSafeMethod(pendo._, 'MutationObserver');
|
|
38616
38746
|
const observer = new MutationObserver(applySkipStepIndicator);
|
|
38617
38747
|
observer.observe(target, config);
|
|
38618
38748
|
// create an observer instance
|
|
@@ -43866,15 +43996,14 @@ function VocPortal() {
|
|
|
43866
43996
|
const width = `${widthValue}${widthUnit}${widthIsImportant ? ' !important' : ''}`;
|
|
43867
43997
|
const height = `${heightValue}${heightUnit}${heightIsImportant ? ' !important' : ''}`;
|
|
43868
43998
|
const container = document.getElementById('pendo-resource-center-container');
|
|
43869
|
-
|
|
43870
|
-
styleElem.innerHTML = `#pendo-resource-center-container:has(iframe[src*="portal"][src*="mode=rc"]) {
|
|
43871
|
-
width: ${width};
|
|
43872
|
-
height: ${height};
|
|
43873
|
-
._pendo-step-container-size {
|
|
43999
|
+
pluginAPI.util.addInlineStyles('pendo-voc-portal-styles', `#pendo-resource-center-container:has(iframe[src*="portal"][src*="mode=rc"]) {
|
|
43874
44000
|
width: ${width};
|
|
43875
44001
|
height: ${height};
|
|
43876
|
-
|
|
43877
|
-
|
|
44002
|
+
._pendo-step-container-size {
|
|
44003
|
+
width: ${width};
|
|
44004
|
+
height: ${height};
|
|
44005
|
+
}
|
|
44006
|
+
}`, container);
|
|
43878
44007
|
resizePortalIframe();
|
|
43879
44008
|
}
|
|
43880
44009
|
catch (err) {
|
|
@@ -44005,8 +44134,10 @@ function Feedback() {
|
|
|
44005
44134
|
}
|
|
44006
44135
|
function handleIdentityChange(event) {
|
|
44007
44136
|
const visitorId = globalPendo._.get(event, 'data.0.visitor_id') || globalPendo._.get(event, 'data.0.options.visitor.id');
|
|
44008
|
-
if (globalPendo.isAnonymousVisitor(visitorId))
|
|
44137
|
+
if (globalPendo.isAnonymousVisitor(visitorId)) {
|
|
44138
|
+
removeFeedbackWidget();
|
|
44009
44139
|
return;
|
|
44140
|
+
}
|
|
44010
44141
|
pingOrInitialize();
|
|
44011
44142
|
}
|
|
44012
44143
|
function handleReady() {
|
|
@@ -44021,6 +44152,8 @@ function Feedback() {
|
|
|
44021
44152
|
widgetLoaded = false;
|
|
44022
44153
|
feedbackAllowedProductId = '';
|
|
44023
44154
|
initialized = false;
|
|
44155
|
+
pluginApi.agentStorage.clear(notificationCountCookie);
|
|
44156
|
+
pluginApi.agentStorage.clear(PING_COOKIE);
|
|
44024
44157
|
}
|
|
44025
44158
|
function getWidgetInitialSource() {
|
|
44026
44159
|
return siteUrl + '/html/widget/notLoaded.html';
|
|
@@ -44272,14 +44405,6 @@ function Feedback() {
|
|
|
44272
44405
|
break;
|
|
44273
44406
|
}
|
|
44274
44407
|
}
|
|
44275
|
-
function addStylesToPage(styleId, styles) {
|
|
44276
|
-
if (globalPendo.dom(`#${styleId}`)[0])
|
|
44277
|
-
return;
|
|
44278
|
-
const styleNode = globalPendo.dom(document.createElement('style'));
|
|
44279
|
-
styleNode.attr('id', styleId);
|
|
44280
|
-
styleNode.html(styles);
|
|
44281
|
-
styleNode.appendTo(document.head);
|
|
44282
|
-
}
|
|
44283
44408
|
function initialiseWidget(settings) {
|
|
44284
44409
|
var feedbackSettings = globalPendo._.extend(settings, {
|
|
44285
44410
|
'triggerColor': '#' + settings.triggerColor,
|
|
@@ -44287,7 +44412,7 @@ function Feedback() {
|
|
|
44287
44412
|
});
|
|
44288
44413
|
registerTurbolinksHook();
|
|
44289
44414
|
var positionInfo = getTriggerPositions(feedbackSettings);
|
|
44290
|
-
|
|
44415
|
+
pluginApi.util.addInlineStyles(elemIds.feedbackStyles, getPseudoStyles(positionInfo.horizontalPosition));
|
|
44291
44416
|
if (!settings.customTrigger) {
|
|
44292
44417
|
createTrigger(feedbackSettings, positionInfo);
|
|
44293
44418
|
}
|
|
@@ -44410,7 +44535,7 @@ function Feedback() {
|
|
|
44410
44535
|
background: #3e566f !important;
|
|
44411
44536
|
}
|
|
44412
44537
|
`;
|
|
44413
|
-
|
|
44538
|
+
pluginApi.util.addInlineStyles('pendo-feedback-trigger-styles', pseudoStyles);
|
|
44414
44539
|
}
|
|
44415
44540
|
function createTrigger(settings, positionInfo) {
|
|
44416
44541
|
addTriggerPseudoStyles();
|
|
@@ -44468,7 +44593,7 @@ function Feedback() {
|
|
|
44468
44593
|
z-index: 9002 !important;
|
|
44469
44594
|
}
|
|
44470
44595
|
`;
|
|
44471
|
-
|
|
44596
|
+
pluginApi.util.addInlineStyles(elemIds.feedbackFrameStyles, styles);
|
|
44472
44597
|
}
|
|
44473
44598
|
function initialiseWidgetFrame(horizontalPosition) {
|
|
44474
44599
|
addWidgetVisibleButtonStyles(horizontalPosition);
|
|
@@ -44937,7 +45062,7 @@ function stringifyStylesheet(s2) {
|
|
|
44937
45062
|
}
|
|
44938
45063
|
let sheetHref = s2.href;
|
|
44939
45064
|
if (!sheetHref && s2.ownerNode && s2.ownerNode.ownerDocument) {
|
|
44940
|
-
sheetHref = s2.ownerNode.ownerDocument.
|
|
45065
|
+
sheetHref = s2.ownerNode.ownerDocument.baseURI;
|
|
44941
45066
|
}
|
|
44942
45067
|
const stringifiedRules = Array.from(
|
|
44943
45068
|
rules2,
|