@pendo/agent 2.320.0 → 2.320.2
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 +1 -1
- package/dist/pendo.module.js +183 -234
- package/dist/pendo.module.min.js +8 -8
- package/dist/servers.json +7 -7
- package/package.json +1 -1
package/dist/pendo.module.js
CHANGED
|
@@ -3967,8 +3967,8 @@ let SERVER = '';
|
|
|
3967
3967
|
let ASSET_HOST = '';
|
|
3968
3968
|
let ASSET_PATH = '';
|
|
3969
3969
|
let DESIGNER_SERVER = '';
|
|
3970
|
-
let VERSION = '2.320.
|
|
3971
|
-
let PACKAGE_VERSION = '2.320.
|
|
3970
|
+
let VERSION = '2.320.2_';
|
|
3971
|
+
let PACKAGE_VERSION = '2.320.2';
|
|
3972
3972
|
let LOADER = 'xhr';
|
|
3973
3973
|
/* eslint-enable web-sdk-eslint-rules/no-gulp-env-references */
|
|
3974
3974
|
/**
|
|
@@ -28990,8 +28990,8 @@ const initialize = makeSafe(function (options) {
|
|
|
28990
28990
|
// Register handlers passed through pendo_options
|
|
28991
28991
|
teardownFns.push(forwardInternalEvents(Events));
|
|
28992
28992
|
registerEventHandlers(options);
|
|
28993
|
-
teardownFns.push(initGuides(observer)); // this is safe. loadGuides actually does the loading.
|
|
28994
28993
|
teardownFns.push(initializeCrossFrameChannel(store));
|
|
28994
|
+
teardownFns.push(initGuides(observer)); // this is safe. loadGuides actually does the loading.
|
|
28995
28995
|
teardownFns.push(P2AutoLaunch.loadPluginJs());
|
|
28996
28996
|
teardownFns.push(initIdentityEvents()); // setup identify and meta event listeners
|
|
28997
28997
|
teardownFns.push(wirePage());
|
|
@@ -43243,24 +43243,20 @@ var NodeType$3 = /* @__PURE__ */ ((NodeType2) => {
|
|
|
43243
43243
|
NodeType2[NodeType2["Comment"] = 5] = "Comment";
|
|
43244
43244
|
return NodeType2;
|
|
43245
43245
|
})(NodeType$3 || {});
|
|
43246
|
-
const testableAccessors$
|
|
43246
|
+
const testableAccessors$1 = {
|
|
43247
43247
|
Node: ["childNodes", "parentNode", "parentElement", "textContent"],
|
|
43248
43248
|
ShadowRoot: ["host", "styleSheets"],
|
|
43249
43249
|
Element: ["shadowRoot"],
|
|
43250
|
-
MutationObserver: []
|
|
43251
|
-
EventTarget: [],
|
|
43252
|
-
Window: []
|
|
43250
|
+
MutationObserver: []
|
|
43253
43251
|
};
|
|
43254
|
-
const testableMethods$
|
|
43252
|
+
const testableMethods$1 = {
|
|
43255
43253
|
Node: ["contains", "getRootNode"],
|
|
43256
43254
|
ShadowRoot: ["getSelection"],
|
|
43257
43255
|
Element: ["querySelector", "querySelectorAll"],
|
|
43258
|
-
MutationObserver: ["constructor"]
|
|
43259
|
-
EventTarget: ["addEventListener", "removeEventListener"],
|
|
43260
|
-
Window: ["setTimeout"]
|
|
43256
|
+
MutationObserver: ["constructor"]
|
|
43261
43257
|
};
|
|
43262
|
-
const untaintedBasePrototype$
|
|
43263
|
-
function angularZoneUnpatchedAlternative$
|
|
43258
|
+
const untaintedBasePrototype$1 = {};
|
|
43259
|
+
function angularZoneUnpatchedAlternative$1(key) {
|
|
43264
43260
|
var _a2, _b;
|
|
43265
43261
|
const angularUnpatchedVersionSymbol = (_b = (_a2 = globalThis == null ? void 0 : globalThis.Zone) == null ? void 0 : _a2.__symbol__) == null ? void 0 : _b.call(_a2, key);
|
|
43266
43262
|
if (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) {
|
|
@@ -43269,12 +43265,12 @@ function angularZoneUnpatchedAlternative$2(key) {
|
|
|
43269
43265
|
return void 0;
|
|
43270
43266
|
}
|
|
43271
43267
|
}
|
|
43272
|
-
function getUntaintedPrototype$
|
|
43273
|
-
if (untaintedBasePrototype$
|
|
43274
|
-
return untaintedBasePrototype$
|
|
43275
|
-
const candidate = angularZoneUnpatchedAlternative$
|
|
43268
|
+
function getUntaintedPrototype$1(key) {
|
|
43269
|
+
if (untaintedBasePrototype$1[key])
|
|
43270
|
+
return untaintedBasePrototype$1[key];
|
|
43271
|
+
const candidate = angularZoneUnpatchedAlternative$1(key) || globalThis[key];
|
|
43276
43272
|
const defaultPrototype = candidate.prototype;
|
|
43277
|
-
const accessorNames = key in testableAccessors$
|
|
43273
|
+
const accessorNames = key in testableAccessors$1 ? testableAccessors$1[key] : void 0;
|
|
43278
43274
|
const isUntaintedAccessors = Boolean(
|
|
43279
43275
|
accessorNames && // @ts-expect-error 2345
|
|
43280
43276
|
accessorNames.every(
|
|
@@ -43286,7 +43282,7 @@ function getUntaintedPrototype$2(key) {
|
|
|
43286
43282
|
}
|
|
43287
43283
|
)
|
|
43288
43284
|
);
|
|
43289
|
-
const methodNames = key in testableMethods$
|
|
43285
|
+
const methodNames = key in testableMethods$1 ? testableMethods$1[key] : void 0;
|
|
43290
43286
|
const isUntaintedMethods = Boolean(
|
|
43291
43287
|
methodNames && methodNames.every(
|
|
43292
43288
|
// @ts-expect-error 2345
|
|
@@ -43297,7 +43293,7 @@ function getUntaintedPrototype$2(key) {
|
|
|
43297
43293
|
)
|
|
43298
43294
|
);
|
|
43299
43295
|
if (isUntaintedAccessors && isUntaintedMethods) {
|
|
43300
|
-
untaintedBasePrototype$
|
|
43296
|
+
untaintedBasePrototype$1[key] = candidate.prototype;
|
|
43301
43297
|
return candidate.prototype;
|
|
43302
43298
|
}
|
|
43303
43299
|
try {
|
|
@@ -43308,7 +43304,7 @@ function getUntaintedPrototype$2(key) {
|
|
|
43308
43304
|
const untaintedObject = win[key].prototype;
|
|
43309
43305
|
document.body.removeChild(iframeEl);
|
|
43310
43306
|
if (!untaintedObject) return defaultPrototype;
|
|
43311
|
-
return untaintedBasePrototype$
|
|
43307
|
+
return untaintedBasePrototype$1[key] = untaintedObject;
|
|
43312
43308
|
} catch {
|
|
43313
43309
|
return defaultPrototype;
|
|
43314
43310
|
}
|
|
@@ -43321,7 +43317,7 @@ function getUntaintedAccessor$1(key, instance, accessor) {
|
|
|
43321
43317
|
return untaintedAccessorCache$1[cacheKey].call(
|
|
43322
43318
|
instance
|
|
43323
43319
|
);
|
|
43324
|
-
const untaintedPrototype = getUntaintedPrototype$
|
|
43320
|
+
const untaintedPrototype = getUntaintedPrototype$1(key);
|
|
43325
43321
|
const untaintedAccessor = (_a2 = Object.getOwnPropertyDescriptor(
|
|
43326
43322
|
untaintedPrototype,
|
|
43327
43323
|
accessor
|
|
@@ -43330,17 +43326,17 @@ function getUntaintedAccessor$1(key, instance, accessor) {
|
|
|
43330
43326
|
untaintedAccessorCache$1[cacheKey] = untaintedAccessor;
|
|
43331
43327
|
return untaintedAccessor.call(instance);
|
|
43332
43328
|
}
|
|
43333
|
-
const untaintedMethodCache$
|
|
43334
|
-
function getUntaintedMethod$
|
|
43329
|
+
const untaintedMethodCache$1 = {};
|
|
43330
|
+
function getUntaintedMethod$1(key, instance, method) {
|
|
43335
43331
|
const cacheKey = `${key}.${String(method)}`;
|
|
43336
|
-
if (untaintedMethodCache$
|
|
43337
|
-
return untaintedMethodCache$
|
|
43332
|
+
if (untaintedMethodCache$1[cacheKey])
|
|
43333
|
+
return untaintedMethodCache$1[cacheKey].bind(
|
|
43338
43334
|
instance
|
|
43339
43335
|
);
|
|
43340
|
-
const untaintedPrototype = getUntaintedPrototype$
|
|
43336
|
+
const untaintedPrototype = getUntaintedPrototype$1(key);
|
|
43341
43337
|
const untaintedMethod = untaintedPrototype[method];
|
|
43342
43338
|
if (typeof untaintedMethod !== "function") return instance[method];
|
|
43343
|
-
untaintedMethodCache$
|
|
43339
|
+
untaintedMethodCache$1[cacheKey] = untaintedMethod;
|
|
43344
43340
|
return untaintedMethod.bind(instance);
|
|
43345
43341
|
}
|
|
43346
43342
|
function childNodes$1(n2) {
|
|
@@ -43356,10 +43352,10 @@ function textContent$1(n2) {
|
|
|
43356
43352
|
return getUntaintedAccessor$1("Node", n2, "textContent");
|
|
43357
43353
|
}
|
|
43358
43354
|
function contains$1(n2, other) {
|
|
43359
|
-
return getUntaintedMethod$
|
|
43355
|
+
return getUntaintedMethod$1("Node", n2, "contains")(other);
|
|
43360
43356
|
}
|
|
43361
43357
|
function getRootNode$1(n2) {
|
|
43362
|
-
return getUntaintedMethod$
|
|
43358
|
+
return getUntaintedMethod$1("Node", n2, "getRootNode")();
|
|
43363
43359
|
}
|
|
43364
43360
|
function host$1(n2) {
|
|
43365
43361
|
if (!n2 || !("host" in n2)) return null;
|
|
@@ -43373,13 +43369,13 @@ function shadowRoot$1(n2) {
|
|
|
43373
43369
|
return getUntaintedAccessor$1("Element", n2, "shadowRoot");
|
|
43374
43370
|
}
|
|
43375
43371
|
function querySelector$1(n2, selectors) {
|
|
43376
|
-
return getUntaintedMethod$
|
|
43372
|
+
return getUntaintedMethod$1("Element", n2, "querySelector")(selectors);
|
|
43377
43373
|
}
|
|
43378
43374
|
function querySelectorAll$1(n2, selectors) {
|
|
43379
|
-
return getUntaintedMethod$
|
|
43375
|
+
return getUntaintedMethod$1("Element", n2, "querySelectorAll")(selectors);
|
|
43380
43376
|
}
|
|
43381
43377
|
function mutationObserverCtor$1() {
|
|
43382
|
-
return getUntaintedPrototype$
|
|
43378
|
+
return getUntaintedPrototype$1("MutationObserver").constructor;
|
|
43383
43379
|
}
|
|
43384
43380
|
function patch$1(source, name, replacement) {
|
|
43385
43381
|
try {
|
|
@@ -43438,7 +43434,19 @@ function isShadowRoot(n2) {
|
|
|
43438
43434
|
function isNativeShadowDom(shadowRoot2) {
|
|
43439
43435
|
return Object.prototype.toString.call(shadowRoot2) === "[object ShadowRoot]";
|
|
43440
43436
|
}
|
|
43441
|
-
|
|
43437
|
+
function getNative$1(symbolName, windowObj = window) {
|
|
43438
|
+
var _a2, _b;
|
|
43439
|
+
const windowWithZone = windowObj;
|
|
43440
|
+
const angularZoneSymbol = (_b = (_a2 = windowWithZone == null ? void 0 : windowWithZone.Zone) == null ? void 0 : _a2.__symbol__) == null ? void 0 : _b.call(_a2, symbolName);
|
|
43441
|
+
if (angularZoneSymbol) {
|
|
43442
|
+
const zonelessImpl = windowWithZone[angularZoneSymbol];
|
|
43443
|
+
if (zonelessImpl) {
|
|
43444
|
+
return zonelessImpl;
|
|
43445
|
+
}
|
|
43446
|
+
}
|
|
43447
|
+
return windowWithZone[symbolName];
|
|
43448
|
+
}
|
|
43449
|
+
const nativeSetTimeout = typeof window !== "undefined" ? getNative$1("setTimeout").bind(window) : global.setTimeout;
|
|
43442
43450
|
function fixBrowserCompatibilityIssuesInCSS(cssText) {
|
|
43443
43451
|
if (cssText.includes(" background-clip: text;") && !cssText.includes(" -webkit-background-clip: text;")) {
|
|
43444
43452
|
cssText = cssText.replace(
|
|
@@ -44762,90 +44770,19 @@ function snapshot(n2, options) {
|
|
|
44762
44770
|
var __defProp2 = Object.defineProperty;
|
|
44763
44771
|
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
44764
44772
|
var __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
44765
|
-
|
|
44766
|
-
Node: ["childNodes", "parentNode", "parentElement", "textContent"],
|
|
44767
|
-
ShadowRoot: ["host", "styleSheets"],
|
|
44768
|
-
Element: ["shadowRoot"],
|
|
44769
|
-
MutationObserver: [],
|
|
44770
|
-
EventTarget: [],
|
|
44771
|
-
Window: []
|
|
44772
|
-
};
|
|
44773
|
-
const testableMethods$1 = {
|
|
44774
|
-
Node: ["contains", "getRootNode"],
|
|
44775
|
-
ShadowRoot: ["getSelection"],
|
|
44776
|
-
Element: ["querySelector", "querySelectorAll"],
|
|
44777
|
-
MutationObserver: ["constructor"],
|
|
44778
|
-
EventTarget: ["addEventListener", "removeEventListener"],
|
|
44779
|
-
Window: ["setTimeout"]
|
|
44780
|
-
};
|
|
44781
|
-
const untaintedBasePrototype$1 = {};
|
|
44782
|
-
function angularZoneUnpatchedAlternative$1(key) {
|
|
44773
|
+
function getNative(symbolName, windowObj = window) {
|
|
44783
44774
|
var _a2, _b;
|
|
44784
|
-
const
|
|
44785
|
-
|
|
44786
|
-
|
|
44787
|
-
|
|
44788
|
-
|
|
44789
|
-
|
|
44790
|
-
}
|
|
44791
|
-
function getUntaintedPrototype$1(key) {
|
|
44792
|
-
if (untaintedBasePrototype$1[key])
|
|
44793
|
-
return untaintedBasePrototype$1[key];
|
|
44794
|
-
const candidate = angularZoneUnpatchedAlternative$1(key) || globalThis[key];
|
|
44795
|
-
const defaultPrototype = candidate.prototype;
|
|
44796
|
-
const accessorNames = key in testableAccessors$1 ? testableAccessors$1[key] : void 0;
|
|
44797
|
-
const isUntaintedAccessors = Boolean(
|
|
44798
|
-
accessorNames && // @ts-expect-error 2345
|
|
44799
|
-
accessorNames.every(
|
|
44800
|
-
(accessor) => {
|
|
44801
|
-
var _a2, _b;
|
|
44802
|
-
return Boolean(
|
|
44803
|
-
(_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes("[native code]")
|
|
44804
|
-
);
|
|
44805
|
-
}
|
|
44806
|
-
)
|
|
44807
|
-
);
|
|
44808
|
-
const methodNames = key in testableMethods$1 ? testableMethods$1[key] : void 0;
|
|
44809
|
-
const isUntaintedMethods = Boolean(
|
|
44810
|
-
methodNames && methodNames.every(
|
|
44811
|
-
// @ts-expect-error 2345
|
|
44812
|
-
(method) => {
|
|
44813
|
-
var _a2;
|
|
44814
|
-
return typeof defaultPrototype[method] === "function" && ((_a2 = defaultPrototype[method]) == null ? void 0 : _a2.toString().includes("[native code]"));
|
|
44815
|
-
}
|
|
44816
|
-
)
|
|
44817
|
-
);
|
|
44818
|
-
if (isUntaintedAccessors && isUntaintedMethods) {
|
|
44819
|
-
untaintedBasePrototype$1[key] = candidate.prototype;
|
|
44820
|
-
return candidate.prototype;
|
|
44821
|
-
}
|
|
44822
|
-
try {
|
|
44823
|
-
const iframeEl = document.createElement("iframe");
|
|
44824
|
-
document.body.appendChild(iframeEl);
|
|
44825
|
-
const win = iframeEl.contentWindow;
|
|
44826
|
-
if (!win) return candidate.prototype;
|
|
44827
|
-
const untaintedObject = win[key].prototype;
|
|
44828
|
-
document.body.removeChild(iframeEl);
|
|
44829
|
-
if (!untaintedObject) return defaultPrototype;
|
|
44830
|
-
return untaintedBasePrototype$1[key] = untaintedObject;
|
|
44831
|
-
} catch {
|
|
44832
|
-
return defaultPrototype;
|
|
44775
|
+
const windowWithZone = windowObj;
|
|
44776
|
+
const angularZoneSymbol = (_b = (_a2 = windowWithZone == null ? void 0 : windowWithZone.Zone) == null ? void 0 : _a2.__symbol__) == null ? void 0 : _b.call(_a2, symbolName);
|
|
44777
|
+
if (angularZoneSymbol) {
|
|
44778
|
+
const zonelessImpl = windowWithZone[angularZoneSymbol];
|
|
44779
|
+
if (zonelessImpl) {
|
|
44780
|
+
return zonelessImpl;
|
|
44781
|
+
}
|
|
44833
44782
|
}
|
|
44783
|
+
return windowWithZone[symbolName];
|
|
44834
44784
|
}
|
|
44835
|
-
|
|
44836
|
-
function getUntaintedMethod$1(key, instance, method) {
|
|
44837
|
-
const cacheKey = `${key}.${String(method)}`;
|
|
44838
|
-
if (untaintedMethodCache$1[cacheKey])
|
|
44839
|
-
return untaintedMethodCache$1[cacheKey].bind(
|
|
44840
|
-
instance
|
|
44841
|
-
);
|
|
44842
|
-
const untaintedPrototype = getUntaintedPrototype$1(key);
|
|
44843
|
-
const untaintedMethod = untaintedPrototype[method];
|
|
44844
|
-
if (typeof untaintedMethod !== "function") return instance[method];
|
|
44845
|
-
untaintedMethodCache$1[cacheKey] = untaintedMethod;
|
|
44846
|
-
return untaintedMethod.bind(instance);
|
|
44847
|
-
}
|
|
44848
|
-
typeof window !== "undefined" ? getUntaintedMethod$1("Window", window, "setTimeout").bind(window) : global.setTimeout;
|
|
44785
|
+
typeof window !== "undefined" ? getNative("setTimeout").bind(window) : global.setTimeout;
|
|
44849
44786
|
class BaseRRNode {
|
|
44850
44787
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
44851
44788
|
constructor(..._args) {
|
|
@@ -44907,17 +44844,13 @@ const testableAccessors = {
|
|
|
44907
44844
|
Node: ["childNodes", "parentNode", "parentElement", "textContent"],
|
|
44908
44845
|
ShadowRoot: ["host", "styleSheets"],
|
|
44909
44846
|
Element: ["shadowRoot"],
|
|
44910
|
-
MutationObserver: []
|
|
44911
|
-
EventTarget: [],
|
|
44912
|
-
Window: []
|
|
44847
|
+
MutationObserver: []
|
|
44913
44848
|
};
|
|
44914
44849
|
const testableMethods = {
|
|
44915
44850
|
Node: ["contains", "getRootNode"],
|
|
44916
44851
|
ShadowRoot: ["getSelection"],
|
|
44917
44852
|
Element: ["querySelector", "querySelectorAll"],
|
|
44918
|
-
MutationObserver: ["constructor"]
|
|
44919
|
-
EventTarget: ["addEventListener", "removeEventListener"],
|
|
44920
|
-
Window: ["setTimeout"]
|
|
44853
|
+
MutationObserver: ["constructor"]
|
|
44921
44854
|
};
|
|
44922
44855
|
const untaintedBasePrototype = {};
|
|
44923
44856
|
function angularZoneUnpatchedAlternative(key) {
|
|
@@ -45098,11 +45031,20 @@ const index = {
|
|
|
45098
45031
|
mutationObserver: mutationObserverCtor,
|
|
45099
45032
|
patch
|
|
45100
45033
|
};
|
|
45034
|
+
function getWindow(documentOrWindow) {
|
|
45035
|
+
const defaultView = documentOrWindow.defaultView;
|
|
45036
|
+
return defaultView ? defaultView : documentOrWindow;
|
|
45037
|
+
}
|
|
45101
45038
|
function on(type, fn, target = document) {
|
|
45039
|
+
const windowObj = getWindow(target);
|
|
45040
|
+
const nativeAddEventListener = getNative$1(
|
|
45041
|
+
"addEventListener",
|
|
45042
|
+
windowObj
|
|
45043
|
+
);
|
|
45044
|
+
const nativeRemoveEventListener = getNative$1("removeEventListener", windowObj);
|
|
45102
45045
|
const options = { capture: true, passive: true };
|
|
45103
|
-
|
|
45104
|
-
|
|
45105
|
-
return () => getUntaintedMethod("EventTarget", eventTarget, "removeEventListener")(type, fn, options);
|
|
45046
|
+
nativeAddEventListener.call(target, type, fn, options);
|
|
45047
|
+
return () => nativeRemoveEventListener.call(target, type, fn, options);
|
|
45106
45048
|
}
|
|
45107
45049
|
const DEPARTED_MIRROR_ACCESS_WARNING = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";
|
|
45108
45050
|
let _mirror = {
|
|
@@ -51583,59 +51525,59 @@ function ConsoleCapture() {
|
|
|
51583
51525
|
}
|
|
51584
51526
|
|
|
51585
51527
|
function NetworkCapture() {
|
|
51586
|
-
|
|
51587
|
-
|
|
51588
|
-
|
|
51589
|
-
|
|
51590
|
-
|
|
51591
|
-
|
|
51592
|
-
|
|
51593
|
-
|
|
51594
|
-
|
|
51595
|
-
|
|
51596
|
-
|
|
51597
|
-
|
|
51598
|
-
|
|
51599
|
-
|
|
51600
|
-
|
|
51601
|
-
|
|
51602
|
-
|
|
51603
|
-
|
|
51604
|
-
|
|
51605
|
-
|
|
51606
|
-
|
|
51607
|
-
|
|
51528
|
+
var pluginAPI;
|
|
51529
|
+
var globalPendo;
|
|
51530
|
+
var requestMap = {};
|
|
51531
|
+
var buffer;
|
|
51532
|
+
var sendQueue;
|
|
51533
|
+
var sendInterval;
|
|
51534
|
+
var transport;
|
|
51535
|
+
var isPtmPaused;
|
|
51536
|
+
var requestBodyCb;
|
|
51537
|
+
var responseBodyCb;
|
|
51538
|
+
var pendoDevlogBaseUrl;
|
|
51539
|
+
var isCapturingNetworkLogs = false;
|
|
51540
|
+
var excludeRequestUrls = [];
|
|
51541
|
+
var CAPTURE_NETWORK_CONFIG = 'captureNetworkRequests';
|
|
51542
|
+
var NETWORK_SUB_TYPE = 'network';
|
|
51543
|
+
var NETWORK_LOGS_CONFIG = 'networkLogs';
|
|
51544
|
+
var NETWORK_LOGS_CONFIG_ALLOWED_REQUEST_HEADERS = 'networkLogs.allowedRequestHeaders';
|
|
51545
|
+
var NETWORK_LOGS_CONFIG_ALLOWED_RESPONSE_HEADERS = 'networkLogs.allowedResponseHeaders';
|
|
51546
|
+
var NETWORK_LOGS_CONFIG_CAPTURE_REQUEST_BODY = 'networkLogs.captureRequestBody';
|
|
51547
|
+
var NETWORK_LOGS_CONFIG_CAPTURE_RESPONSE_BODY = 'networkLogs.captureResponseBody';
|
|
51548
|
+
var NETWORK_LOGS_CONFIG_EXCLUDE_REQUEST_URLS = 'networkLogs.excludeRequestUrls';
|
|
51549
|
+
var allowedRequestHeaders = {
|
|
51608
51550
|
'content-type': true, 'content-length': true, 'accept': true, 'accept-language': true
|
|
51609
51551
|
};
|
|
51610
|
-
|
|
51552
|
+
var allowedResponseHeaders = {
|
|
51611
51553
|
'cache-control': true, 'content-length': true, 'content-type': true, 'content-language': true
|
|
51612
51554
|
};
|
|
51613
51555
|
return {
|
|
51614
51556
|
name: 'NetworkCapture',
|
|
51615
|
-
initialize,
|
|
51616
|
-
teardown,
|
|
51617
|
-
handleRequest,
|
|
51618
|
-
handleResponse,
|
|
51619
|
-
handleError,
|
|
51620
|
-
startCapture,
|
|
51621
|
-
createNetworkEvent,
|
|
51622
|
-
send,
|
|
51623
|
-
onPtmPaused,
|
|
51624
|
-
onPtmUnpaused,
|
|
51625
|
-
onAppHidden,
|
|
51626
|
-
onAppUnloaded,
|
|
51627
|
-
setCaptureState,
|
|
51628
|
-
recordingStarted,
|
|
51629
|
-
recordingStopped,
|
|
51630
|
-
addConfigOptions,
|
|
51631
|
-
processHeaderConfig,
|
|
51632
|
-
extractHeaders,
|
|
51633
|
-
setupBodyCallbacks,
|
|
51634
|
-
processBody,
|
|
51635
|
-
processRequestBody,
|
|
51636
|
-
processResponseBody,
|
|
51637
|
-
buildExcludeRequestUrls,
|
|
51638
|
-
isUrlExcluded,
|
|
51557
|
+
initialize: initialize,
|
|
51558
|
+
teardown: teardown,
|
|
51559
|
+
handleRequest: handleRequest,
|
|
51560
|
+
handleResponse: handleResponse,
|
|
51561
|
+
handleError: handleError,
|
|
51562
|
+
startCapture: startCapture,
|
|
51563
|
+
createNetworkEvent: createNetworkEvent,
|
|
51564
|
+
send: send,
|
|
51565
|
+
onPtmPaused: onPtmPaused,
|
|
51566
|
+
onPtmUnpaused: onPtmUnpaused,
|
|
51567
|
+
onAppHidden: onAppHidden,
|
|
51568
|
+
onAppUnloaded: onAppUnloaded,
|
|
51569
|
+
setCaptureState: setCaptureState,
|
|
51570
|
+
recordingStarted: recordingStarted,
|
|
51571
|
+
recordingStopped: recordingStopped,
|
|
51572
|
+
addConfigOptions: addConfigOptions,
|
|
51573
|
+
processHeaderConfig: processHeaderConfig,
|
|
51574
|
+
extractHeaders: extractHeaders,
|
|
51575
|
+
setupBodyCallbacks: setupBodyCallbacks,
|
|
51576
|
+
processBody: processBody,
|
|
51577
|
+
processRequestBody: processRequestBody,
|
|
51578
|
+
processResponseBody: processResponseBody,
|
|
51579
|
+
buildExcludeRequestUrls: buildExcludeRequestUrls,
|
|
51580
|
+
isUrlExcluded: isUrlExcluded,
|
|
51639
51581
|
get isCapturingNetworkLogs() {
|
|
51640
51582
|
return isCapturingNetworkLogs;
|
|
51641
51583
|
},
|
|
@@ -51670,9 +51612,9 @@ function NetworkCapture() {
|
|
|
51670
51612
|
function initialize(pendo, PluginAPI) {
|
|
51671
51613
|
pluginAPI = PluginAPI;
|
|
51672
51614
|
globalPendo = pendo;
|
|
51673
|
-
|
|
51615
|
+
var ConfigReader = pluginAPI.ConfigReader;
|
|
51674
51616
|
ConfigReader.addOption(CAPTURE_NETWORK_CONFIG, [ConfigReader.sources.PENDO_CONFIG_SRC], false);
|
|
51675
|
-
|
|
51617
|
+
var captureNetworkEnabled = ConfigReader.get(CAPTURE_NETWORK_CONFIG);
|
|
51676
51618
|
if (!captureNetworkEnabled)
|
|
51677
51619
|
return;
|
|
51678
51620
|
buffer = new DevlogBuffer(pendo, pluginAPI);
|
|
@@ -51683,7 +51625,7 @@ function NetworkCapture() {
|
|
|
51683
51625
|
processHeaderConfig(NETWORK_LOGS_CONFIG_ALLOWED_RESPONSE_HEADERS, allowedResponseHeaders);
|
|
51684
51626
|
setupBodyCallbacks();
|
|
51685
51627
|
buildExcludeRequestUrls();
|
|
51686
|
-
sendInterval = setInterval(()
|
|
51628
|
+
sendInterval = setInterval(function () {
|
|
51687
51629
|
if (!sendQueue.failed()) {
|
|
51688
51630
|
send();
|
|
51689
51631
|
}
|
|
@@ -51699,7 +51641,7 @@ function NetworkCapture() {
|
|
|
51699
51641
|
pendoDevlogBaseUrl = pluginAPI.transmit.buildBaseDataUrl(DEV_LOG_TYPE, globalPendo.apiKey);
|
|
51700
51642
|
}
|
|
51701
51643
|
function addConfigOptions() {
|
|
51702
|
-
|
|
51644
|
+
var ConfigReader = pluginAPI.ConfigReader;
|
|
51703
51645
|
ConfigReader.addOption(NETWORK_LOGS_CONFIG, [ConfigReader.sources.SNIPPET_SRC], {});
|
|
51704
51646
|
/**
|
|
51705
51647
|
* Additional request headers to capture in network logs.
|
|
@@ -51758,17 +51700,17 @@ function NetworkCapture() {
|
|
|
51758
51700
|
ConfigReader.addOption(NETWORK_LOGS_CONFIG_EXCLUDE_REQUEST_URLS, [ConfigReader.sources.SNIPPET_SRC], []);
|
|
51759
51701
|
}
|
|
51760
51702
|
function processHeaderConfig(configHeaderName, targetHeaders) {
|
|
51761
|
-
|
|
51703
|
+
var configHeaders = pluginAPI.ConfigReader.get(configHeaderName);
|
|
51762
51704
|
if (!configHeaders || configHeaders.length === 0)
|
|
51763
51705
|
return;
|
|
51764
|
-
globalPendo._.each(configHeaders, (header)
|
|
51706
|
+
globalPendo._.each(configHeaders, function (header) {
|
|
51765
51707
|
if (!header || !globalPendo._.isString(header))
|
|
51766
51708
|
return;
|
|
51767
51709
|
targetHeaders[header.toLowerCase()] = true;
|
|
51768
51710
|
});
|
|
51769
51711
|
}
|
|
51770
51712
|
function setupBodyCallbacks() {
|
|
51771
|
-
|
|
51713
|
+
var config = pluginAPI.ConfigReader.get(NETWORK_LOGS_CONFIG);
|
|
51772
51714
|
if (!config)
|
|
51773
51715
|
return;
|
|
51774
51716
|
if (globalPendo._.isFunction(config.captureRequestBody)) {
|
|
@@ -51779,11 +51721,11 @@ function NetworkCapture() {
|
|
|
51779
51721
|
}
|
|
51780
51722
|
}
|
|
51781
51723
|
function buildExcludeRequestUrls() {
|
|
51782
|
-
|
|
51724
|
+
var requestUrls = pluginAPI.ConfigReader.get(NETWORK_LOGS_CONFIG_EXCLUDE_REQUEST_URLS);
|
|
51783
51725
|
if (!requestUrls || requestUrls.length === 0)
|
|
51784
51726
|
return;
|
|
51785
|
-
globalPendo._.each(requestUrls, (requestUrl)
|
|
51786
|
-
|
|
51727
|
+
globalPendo._.each(requestUrls, function (requestUrl) {
|
|
51728
|
+
var processedRequestUrl = processUrlPattern(requestUrl);
|
|
51787
51729
|
if (!processedRequestUrl)
|
|
51788
51730
|
return;
|
|
51789
51731
|
excludeRequestUrls.push(processedRequestUrl);
|
|
@@ -51792,13 +51734,13 @@ function NetworkCapture() {
|
|
|
51792
51734
|
function processUrlPattern(url) {
|
|
51793
51735
|
if (!url)
|
|
51794
51736
|
return;
|
|
51795
|
-
|
|
51737
|
+
var isRegex = globalPendo._.isRegExp(url);
|
|
51796
51738
|
if (!globalPendo._.isString(url) && !isRegex)
|
|
51797
51739
|
return;
|
|
51798
51740
|
if (isRegex)
|
|
51799
51741
|
return url;
|
|
51800
|
-
|
|
51801
|
-
return new RegExp(
|
|
51742
|
+
var escapedUrl = pluginAPI.util.escapeRegExp(url);
|
|
51743
|
+
return new RegExp("^".concat(escapedUrl, "$"));
|
|
51802
51744
|
}
|
|
51803
51745
|
function onPtmPaused() {
|
|
51804
51746
|
isPtmPaused = true;
|
|
@@ -51806,8 +51748,9 @@ function NetworkCapture() {
|
|
|
51806
51748
|
function onPtmUnpaused() {
|
|
51807
51749
|
isPtmPaused = false;
|
|
51808
51750
|
if (!buffer.isEmpty()) {
|
|
51809
|
-
for (
|
|
51810
|
-
|
|
51751
|
+
for (var _i = 0, _a = buffer.events; _i < _a.length; _i++) {
|
|
51752
|
+
var event_1 = _a[_i];
|
|
51753
|
+
pluginAPI.Events.eventCaptured.trigger(event_1);
|
|
51811
51754
|
}
|
|
51812
51755
|
send();
|
|
51813
51756
|
}
|
|
@@ -51818,11 +51761,12 @@ function NetworkCapture() {
|
|
|
51818
51761
|
function onAppUnloaded() {
|
|
51819
51762
|
send({ unload: true });
|
|
51820
51763
|
}
|
|
51821
|
-
function setCaptureState(
|
|
51764
|
+
function setCaptureState(_a) {
|
|
51765
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.shouldCapture, shouldCapture = _c === void 0 ? false : _c, _d = _b.reason, reason = _d === void 0 ? '' : _d;
|
|
51822
51766
|
if (shouldCapture === isCapturingNetworkLogs)
|
|
51823
51767
|
return;
|
|
51824
51768
|
isCapturingNetworkLogs = shouldCapture;
|
|
51825
|
-
pluginAPI.log.info(
|
|
51769
|
+
pluginAPI.log.info("[NetworkCapture] Network request capture ".concat(shouldCapture ? 'started' : 'stopped').concat(reason ? ": ".concat(reason) : ''));
|
|
51826
51770
|
}
|
|
51827
51771
|
function recordingStarted() {
|
|
51828
51772
|
return setCaptureState({ shouldCapture: true, reason: 'recording started' });
|
|
@@ -51857,7 +51801,7 @@ function NetworkCapture() {
|
|
|
51857
51801
|
return false;
|
|
51858
51802
|
if (excludeRequestUrls.length === 0)
|
|
51859
51803
|
return false;
|
|
51860
|
-
return globalPendo._.some(excludeRequestUrls, (excludeRequestUrl)
|
|
51804
|
+
return globalPendo._.some(excludeRequestUrls, function (excludeRequestUrl) {
|
|
51861
51805
|
return excludeRequestUrl.test(url);
|
|
51862
51806
|
});
|
|
51863
51807
|
}
|
|
@@ -51871,7 +51815,7 @@ function NetworkCapture() {
|
|
|
51871
51815
|
return;
|
|
51872
51816
|
if (!response)
|
|
51873
51817
|
return;
|
|
51874
|
-
|
|
51818
|
+
var request = requestMap[response.requestId];
|
|
51875
51819
|
if (!request)
|
|
51876
51820
|
return;
|
|
51877
51821
|
// Skip capturing successful devlog events to avoid infinite loops
|
|
@@ -51883,9 +51827,9 @@ function NetworkCapture() {
|
|
|
51883
51827
|
delete requestMap[response.requestId];
|
|
51884
51828
|
return;
|
|
51885
51829
|
}
|
|
51886
|
-
|
|
51887
|
-
request,
|
|
51888
|
-
response
|
|
51830
|
+
var networkEvent = createNetworkEvent({
|
|
51831
|
+
request: request,
|
|
51832
|
+
response: response
|
|
51889
51833
|
});
|
|
51890
51834
|
if (!isPtmPaused) {
|
|
51891
51835
|
pluginAPI.Events.eventCaptured.trigger(networkEvent);
|
|
@@ -51893,7 +51837,8 @@ function NetworkCapture() {
|
|
|
51893
51837
|
buffer.push(networkEvent);
|
|
51894
51838
|
delete requestMap[response.requestId];
|
|
51895
51839
|
}
|
|
51896
|
-
function handleError(
|
|
51840
|
+
function handleError(_a) {
|
|
51841
|
+
var error = _a.error, context = _a.context;
|
|
51897
51842
|
if (!isCapturingNetworkLogs)
|
|
51898
51843
|
return;
|
|
51899
51844
|
if (error.requestId && requestMap[error.requestId]) {
|
|
@@ -51907,13 +51852,13 @@ function NetworkCapture() {
|
|
|
51907
51852
|
}
|
|
51908
51853
|
}
|
|
51909
51854
|
function extractHeaders(headers, allowedHeaders) {
|
|
51910
|
-
|
|
51855
|
+
var _a = globalPendo._, keys = _a.keys, reduce = _a.reduce;
|
|
51911
51856
|
if (!headers || !allowedHeaders)
|
|
51912
51857
|
return [];
|
|
51913
|
-
return reduce(keys(headers), (acc, key)
|
|
51914
|
-
|
|
51858
|
+
return reduce(keys(headers), function (acc, key) {
|
|
51859
|
+
var normalizedKey = key.toLowerCase();
|
|
51915
51860
|
if (allowedHeaders[normalizedKey]) {
|
|
51916
|
-
acc.push(
|
|
51861
|
+
acc.push("".concat(key, ": ").concat(headers[key]));
|
|
51917
51862
|
}
|
|
51918
51863
|
return acc;
|
|
51919
51864
|
}, []);
|
|
@@ -51921,15 +51866,16 @@ function NetworkCapture() {
|
|
|
51921
51866
|
function processBody(body, contentType) {
|
|
51922
51867
|
if (!body || !globalPendo._.isString(body))
|
|
51923
51868
|
return '';
|
|
51924
|
-
|
|
51869
|
+
var processedBody = maskSensitiveFields({ string: body, contentType: contentType, _: globalPendo._ });
|
|
51925
51870
|
return truncate(processedBody, true);
|
|
51926
51871
|
}
|
|
51927
|
-
function processRequestBody(
|
|
51872
|
+
function processRequestBody(_a) {
|
|
51873
|
+
var request = _a.request;
|
|
51928
51874
|
if (!request || !request.body || !requestBodyCb)
|
|
51929
51875
|
return '';
|
|
51930
51876
|
try {
|
|
51931
|
-
|
|
51932
|
-
|
|
51877
|
+
var body = requestBodyCb(request.body, { request: request });
|
|
51878
|
+
var contentType = globalPendo._.get(request, 'headers.content-type', '');
|
|
51933
51879
|
return processBody(body, contentType);
|
|
51934
51880
|
}
|
|
51935
51881
|
catch (error) {
|
|
@@ -51937,12 +51883,13 @@ function NetworkCapture() {
|
|
|
51937
51883
|
return '[Failed to process request body]';
|
|
51938
51884
|
}
|
|
51939
51885
|
}
|
|
51940
|
-
function processResponseBody(
|
|
51886
|
+
function processResponseBody(_a) {
|
|
51887
|
+
var response = _a.response;
|
|
51941
51888
|
if (!response || !response.body || !responseBodyCb)
|
|
51942
51889
|
return '';
|
|
51943
51890
|
try {
|
|
51944
|
-
|
|
51945
|
-
|
|
51891
|
+
var body = responseBodyCb(response.body, { response: response });
|
|
51892
|
+
var contentType = globalPendo._.get(response, 'headers.content-type', '');
|
|
51946
51893
|
return processBody(body, contentType);
|
|
51947
51894
|
}
|
|
51948
51895
|
catch (error) {
|
|
@@ -51950,32 +51897,34 @@ function NetworkCapture() {
|
|
|
51950
51897
|
return '[Failed to process response body]';
|
|
51951
51898
|
}
|
|
51952
51899
|
}
|
|
51953
|
-
function createNetworkEvent(
|
|
51954
|
-
|
|
51955
|
-
|
|
51956
|
-
|
|
51957
|
-
|
|
51900
|
+
function createNetworkEvent(_a) {
|
|
51901
|
+
var request = _a.request, response = _a.response;
|
|
51902
|
+
var devLogEnvelope = createDevLogEnvelope(pluginAPI, globalPendo);
|
|
51903
|
+
var requestHeaders = extractHeaders(request.headers, allowedRequestHeaders);
|
|
51904
|
+
var responseHeaders = extractHeaders(response.headers, allowedResponseHeaders);
|
|
51905
|
+
var networkEvent = __assign(__assign({}, devLogEnvelope), { subType: NETWORK_SUB_TYPE, devLogMethod: request.method, devLogStatusCode: response.status, devLogRequestUrl: request.url, devLogRequestHeaders: requestHeaders, devLogResponseHeaders: responseHeaders, devLogCount: 1 });
|
|
51958
51906
|
if (requestBodyCb) {
|
|
51959
|
-
networkEvent.devLogRequestBody = processRequestBody({ request });
|
|
51907
|
+
networkEvent.devLogRequestBody = processRequestBody({ request: request });
|
|
51960
51908
|
}
|
|
51961
51909
|
if (responseBodyCb) {
|
|
51962
|
-
networkEvent.devLogResponseBody = processResponseBody({ response });
|
|
51910
|
+
networkEvent.devLogResponseBody = processResponseBody({ response: response });
|
|
51963
51911
|
}
|
|
51964
51912
|
return networkEvent;
|
|
51965
51913
|
}
|
|
51966
|
-
function send(
|
|
51914
|
+
function send(_a) {
|
|
51915
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.unload, unload = _c === void 0 ? false : _c, _d = _b.hidden, hidden = _d === void 0 ? false : _d;
|
|
51967
51916
|
if (!buffer || buffer.isEmpty())
|
|
51968
51917
|
return;
|
|
51969
51918
|
if (!globalPendo.isSendingEvents()) {
|
|
51970
51919
|
buffer.clear();
|
|
51971
51920
|
return;
|
|
51972
51921
|
}
|
|
51973
|
-
|
|
51922
|
+
var payloads = buffer.pack();
|
|
51974
51923
|
if (unload || hidden) {
|
|
51975
51924
|
sendQueue.drain(payloads, unload);
|
|
51976
51925
|
}
|
|
51977
51926
|
else {
|
|
51978
|
-
sendQueue.push(
|
|
51927
|
+
sendQueue.push.apply(sendQueue, payloads);
|
|
51979
51928
|
}
|
|
51980
51929
|
}
|
|
51981
51930
|
}
|
|
@@ -52309,13 +52258,13 @@ var predictGuidesScript = function (_a) {
|
|
|
52309
52258
|
cleanupArray.push(createFloatingModal({ recordId: recordId, configuration: configuration }));
|
|
52310
52259
|
};
|
|
52311
52260
|
|
|
52312
|
-
|
|
52313
|
-
|
|
52314
|
-
|
|
52315
|
-
|
|
52261
|
+
var PredictGuides = function () {
|
|
52262
|
+
var pluginApiRef = null;
|
|
52263
|
+
var cleanupArray = [];
|
|
52264
|
+
var cleanup = function () {
|
|
52316
52265
|
var _a;
|
|
52317
52266
|
(_a = pluginApiRef === null || pluginApiRef === void 0 ? void 0 : pluginApiRef.log) === null || _a === void 0 ? void 0 : _a.debug('[predict] cleaning up');
|
|
52318
|
-
for (
|
|
52267
|
+
for (var i = 0; i < cleanupArray.length; i++) {
|
|
52319
52268
|
try {
|
|
52320
52269
|
cleanupArray[i]();
|
|
52321
52270
|
}
|
|
@@ -52323,44 +52272,44 @@ const PredictGuides = () => {
|
|
|
52323
52272
|
}
|
|
52324
52273
|
cleanupArray = [];
|
|
52325
52274
|
};
|
|
52326
|
-
|
|
52275
|
+
var initialize = function (_pendo, PluginAPI) {
|
|
52327
52276
|
pluginApiRef = PluginAPI;
|
|
52328
|
-
|
|
52329
|
-
|
|
52277
|
+
var configReader = PluginAPI.ConfigReader;
|
|
52278
|
+
var PREDICT_GUIDES_CONFIG = 'predictGuides';
|
|
52330
52279
|
configReader.addOption(PREDICT_GUIDES_CONFIG, [
|
|
52331
52280
|
configReader.sources.SNIPPET_SRC,
|
|
52332
52281
|
configReader.sources.PENDO_CONFIG_SRC
|
|
52333
52282
|
], false);
|
|
52334
|
-
|
|
52283
|
+
var predictGuidesEnabled = configReader.get(PREDICT_GUIDES_CONFIG);
|
|
52335
52284
|
if (!predictGuidesEnabled)
|
|
52336
52285
|
return;
|
|
52337
|
-
|
|
52286
|
+
var log = PluginAPI.log.debug.bind(PluginAPI.log);
|
|
52338
52287
|
pluginApiRef.Events.urlChanged.on(cleanup);
|
|
52339
|
-
|
|
52288
|
+
var script = {
|
|
52340
52289
|
name: 'PredictFrameScript',
|
|
52341
|
-
script(step, _guide, pendo) {
|
|
52342
|
-
predictGuidesScript({ step, pendo, cleanupArray, cleanup, log });
|
|
52343
|
-
this.on('unmounted', (evt)
|
|
52290
|
+
script: function (step, _guide, pendo) {
|
|
52291
|
+
predictGuidesScript({ step: step, pendo: pendo, cleanupArray: cleanupArray, cleanup: cleanup, log: log });
|
|
52292
|
+
this.on('unmounted', function (evt) {
|
|
52344
52293
|
if (evt.reason !== 'hidden')
|
|
52345
52294
|
cleanup();
|
|
52346
52295
|
});
|
|
52347
52296
|
},
|
|
52348
|
-
test(step, _guide) {
|
|
52349
|
-
|
|
52297
|
+
test: function (step, _guide) {
|
|
52298
|
+
var stepName = step.name || '';
|
|
52350
52299
|
return PREDICT_STEP_REGEX.test(stepName);
|
|
52351
52300
|
}
|
|
52352
52301
|
};
|
|
52353
52302
|
pluginApiRef.GlobalRuntime.addGlobalScript(script);
|
|
52354
52303
|
};
|
|
52355
|
-
|
|
52304
|
+
var teardown = function () {
|
|
52356
52305
|
var _a, _b;
|
|
52357
52306
|
cleanup();
|
|
52358
52307
|
(_b = (_a = pluginApiRef === null || pluginApiRef === void 0 ? void 0 : pluginApiRef.Events) === null || _a === void 0 ? void 0 : _a.urlChanged) === null || _b === void 0 ? void 0 : _b.off(cleanup);
|
|
52359
52308
|
};
|
|
52360
52309
|
return {
|
|
52361
52310
|
name: 'PredictGuides',
|
|
52362
|
-
initialize,
|
|
52363
|
-
teardown
|
|
52311
|
+
initialize: initialize,
|
|
52312
|
+
teardown: teardown
|
|
52364
52313
|
};
|
|
52365
52314
|
};
|
|
52366
52315
|
|