@cloudcare/browser-rum 3.3.23 → 3.3.24
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/bundle/dataflux-rum.js +1 -1
- package/cjs/boot/buildEnv.js +1 -1
- package/cjs/domain/deflate/deflateWorker.js +1 -1
- package/cjs/domain/replay/record/canvasEncodeWorker.js +1 -1
- package/esm/boot/buildEnv.js +2 -5
- package/esm/boot/buildEnv.js.map +1 -1
- package/esm/boot/disabledRumPublicApi.js +2 -35
- package/esm/boot/disabledRumPublicApi.js.map +1 -1
- package/esm/boot/perStartRum.js +2 -260
- package/esm/boot/perStartRum.js.map +1 -1
- package/esm/boot/recorderApi.js +2 -338
- package/esm/boot/recorderApi.js.map +1 -1
- package/esm/boot/recorderApiStub.js +2 -21
- package/esm/boot/recorderApiStub.js.map +1 -1
- package/esm/boot/rum.entry.js +2 -13
- package/esm/boot/rum.entry.js.map +1 -1
- package/esm/boot/rum.js +2 -184
- package/esm/boot/rum.js.map +1 -1
- package/esm/boot/rum.slim.entry.js +2 -7
- package/esm/boot/rum.slim.entry.js.map +1 -1
- package/esm/boot/rumEntryFactory.js +2 -18
- package/esm/boot/rumEntryFactory.js.map +1 -1
- package/esm/boot/rumPublicApi.js +2 -344
- package/esm/boot/rumPublicApi.js.map +1 -1
- package/esm/boot/rumRecorderApiStub.js +2 -13
- package/esm/boot/rumRecorderApiStub.js.map +1 -1
- package/esm/boot/rumSlimConfiguration.js +2 -10
- package/esm/boot/rumSlimConfiguration.js.map +1 -1
- package/esm/boot/sessionReplayPublicApi.js +2 -43
- package/esm/boot/sessionReplayPublicApi.js.map +1 -1
- package/esm/boot/startRecording.js +2 -444
- package/esm/boot/startRecording.js.map +1 -1
- package/esm/constants.js +2 -28
- package/esm/constants.js.map +1 -1
- package/esm/domain/assembly.js +2 -213
- package/esm/domain/assembly.js.map +1 -1
- package/esm/domain/configuration.js +2 -323
- package/esm/domain/configuration.js.map +1 -1
- package/esm/domain/contexts/commonContext.js +2 -8
- package/esm/domain/contexts/commonContext.js.map +1 -1
- package/esm/domain/contexts/displayContext.js +2 -16
- package/esm/domain/contexts/displayContext.js.map +1 -1
- package/esm/domain/contexts/foregroundContexts.js +2 -103
- package/esm/domain/contexts/foregroundContexts.js.map +1 -1
- package/esm/domain/contexts/internalContext.js +2 -41
- package/esm/domain/contexts/internalContext.js.map +1 -1
- package/esm/domain/contexts/pageStateHistory.js +2 -104
- package/esm/domain/contexts/pageStateHistory.js.map +1 -1
- package/esm/domain/contexts/urlContexts.js +2 -85
- package/esm/domain/contexts/urlContexts.js.map +1 -1
- package/esm/domain/contexts/viewContexts.js +2 -45
- package/esm/domain/contexts/viewContexts.js.map +1 -1
- package/esm/domain/deflate/deflateEncoder.js +2 -592
- package/esm/domain/deflate/deflateEncoder.js.map +1 -1
- package/esm/domain/deflate/deflateWorker.js +2 -225
- package/esm/domain/deflate/deflateWorker.js.map +1 -1
- package/esm/domain/deflate/index.js +2 -3
- package/esm/domain/deflate/index.js.map +1 -1
- package/esm/domain/domMutationObservable.js +2 -62
- package/esm/domain/domMutationObservable.js.map +1 -1
- package/esm/domain/encoderStreamId.js +2 -6
- package/esm/domain/encoderStreamId.js.map +1 -1
- package/esm/domain/firstInputPolyfill.js +2 -77
- package/esm/domain/firstInputPolyfill.js.map +1 -1
- package/esm/domain/initViewportObservable.js +2 -36
- package/esm/domain/initViewportObservable.js.map +1 -1
- package/esm/domain/locationChangeObservable.js +2 -65
- package/esm/domain/locationChangeObservable.js.map +1 -1
- package/esm/domain/performanceObservable.js +2 -116
- package/esm/domain/performanceObservable.js.map +1 -1
- package/esm/domain/performanceUtils.js +2 -45
- package/esm/domain/performanceUtils.js.map +1 -1
- package/esm/domain/plugins.js +2 -59
- package/esm/domain/plugins.js.map +1 -1
- package/esm/domain/privacy.js +2 -266
- package/esm/domain/privacy.js.map +1 -1
- package/esm/domain/replay/record/canvasAutoSnapshot.js +2 -9
- package/esm/domain/replay/record/canvasAutoSnapshot.js.map +1 -1
- package/esm/domain/replay/record/canvasCommandCapture.js +2 -1275
- package/esm/domain/replay/record/canvasCommandCapture.js.map +1 -1
- package/esm/domain/replay/record/canvasCommandObserver.js +2 -1207
- package/esm/domain/replay/record/canvasCommandObserver.js.map +1 -1
- package/esm/domain/replay/record/canvasCommandSerializeArgs.js +2 -111
- package/esm/domain/replay/record/canvasCommandSerializeArgs.js.map +1 -1
- package/esm/domain/replay/record/canvasContext.js +2 -50
- package/esm/domain/replay/record/canvasContext.js.map +1 -1
- package/esm/domain/replay/record/canvasContinuousScheduler.js +2 -378
- package/esm/domain/replay/record/canvasContinuousScheduler.js.map +1 -1
- package/esm/domain/replay/record/canvasEncodeBridge.js +2 -692
- package/esm/domain/replay/record/canvasEncodeBridge.js.map +1 -1
- package/esm/domain/replay/record/canvasEncodeWorker.js +2 -164
- package/esm/domain/replay/record/canvasEncodeWorker.js.map +1 -1
- package/esm/domain/replay/record/canvasFrameSignature.js +2 -75
- package/esm/domain/replay/record/canvasFrameSignature.js.map +1 -1
- package/esm/domain/replay/record/canvasMutationRecord.js +2 -26
- package/esm/domain/replay/record/canvasMutationRecord.js.map +1 -1
- package/esm/domain/replay/record/canvasObserver.js +2 -420
- package/esm/domain/replay/record/canvasObserver.js.map +1 -1
- package/esm/domain/replay/record/canvasSerializeArgs.js +2 -101
- package/esm/domain/replay/record/canvasSerializeArgs.js.map +1 -1
- package/esm/domain/replay/record/canvasWebGLPluginHost.js +2 -26
- package/esm/domain/replay/record/canvasWebGLPluginHost.js.map +1 -1
- package/esm/domain/replay/record/elementsScrollPositions.js +2 -23
- package/esm/domain/replay/record/elementsScrollPositions.js.map +1 -1
- package/esm/domain/replay/record/index.js +2 -4
- package/esm/domain/replay/record/index.js.map +1 -1
- package/esm/domain/replay/record/mutationBatch.js +2 -562
- package/esm/domain/replay/record/mutationBatch.js.map +1 -1
- package/esm/domain/replay/record/mutationObserver.js +2 -2332
- package/esm/domain/replay/record/mutationObserver.js.map +1 -1
- package/esm/domain/replay/record/mutationResourceBudget.js +2 -137
- package/esm/domain/replay/record/mutationResourceBudget.js.map +1 -1
- package/esm/domain/replay/record/observers.js +2 -624
- package/esm/domain/replay/record/observers.js.map +1 -1
- package/esm/domain/replay/record/privacy.js +2 -1
- package/esm/domain/replay/record/privacy.js.map +1 -1
- package/esm/domain/replay/record/record.js +2 -3511
- package/esm/domain/replay/record/record.js.map +1 -1
- package/esm/domain/replay/record/serializationUtils.js +2 -677
- package/esm/domain/replay/record/serializationUtils.js.map +1 -1
- package/esm/domain/replay/record/serialize.js +2 -735
- package/esm/domain/replay/record/serialize.js.map +1 -1
- package/esm/domain/replay/record/shadowRootsController.js +2 -902
- package/esm/domain/replay/record/shadowRootsController.js.map +1 -1
- package/esm/domain/replay/record/utils.js +2 -36
- package/esm/domain/replay/record/utils.js.map +1 -1
- package/esm/domain/replay/record/viewports.js +2 -58
- package/esm/domain/replay/record/viewports.js.map +1 -1
- package/esm/domain/replay/replayStats.js +2 -59
- package/esm/domain/replay/replayStats.js.map +1 -1
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js +2 -31
- package/esm/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
- package/esm/domain/replay/segmentCollection/index.js +2 -3
- package/esm/domain/replay/segmentCollection/index.js.map +1 -1
- package/esm/domain/replay/segmentCollection/segment.js +2 -415
- package/esm/domain/replay/segmentCollection/segment.js.map +1 -1
- package/esm/domain/replay/segmentCollection/segmentCollection.js +2 -1114
- package/esm/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
- package/esm/domain/replay/startRecordBridge.js +2 -13
- package/esm/domain/replay/startRecordBridge.js.map +1 -1
- package/esm/domain/replay/timeAnchor.js +2 -20
- package/esm/domain/replay/timeAnchor.js.map +1 -1
- package/esm/domain/requestCollection.js +2 -121
- package/esm/domain/requestCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/actionCollection.js +2 -83
- package/esm/domain/rumEventsCollection/actions/actionCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/clickChain.js +2 -62
- package/esm/domain/rumEventsCollection/actions/clickChain.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js +2 -67
- package/esm/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js +2 -279
- package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js +2 -233
- package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/interactionSelectorCache.js +2 -21
- package/esm/domain/rumEventsCollection/actions/interactionSelectorCache.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js +2 -67
- package/esm/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -1
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js +2 -263
- package/esm/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/errorCollection.js +2 -93
- package/esm/domain/rumEventsCollection/error/errorCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/trackConsoleError.js +2 -12
- package/esm/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -1
- package/esm/domain/rumEventsCollection/error/trackReportError.js +2 -19
- package/esm/domain/rumEventsCollection/error/trackReportError.js.map +1 -1
- package/esm/domain/rumEventsCollection/longTask/longAnimationFrameCollection.js +2 -55
- package/esm/domain/rumEventsCollection/longTask/longAnimationFrameCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js +2 -38
- package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/matchRequestResourceEntry.js +2 -69
- package/esm/domain/rumEventsCollection/resource/matchRequestResourceEntry.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js +2 -294
- package/esm/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceTrackerManager.js +2 -232
- package/esm/domain/rumEventsCollection/resource/resourceTrackerManager.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js +2 -218
- package/esm/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js +2 -19
- package/esm/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js.map +1 -1
- package/esm/domain/rumEventsCollection/resource/webSocketCollection.js +2 -191
- package/esm/domain/rumEventsCollection/resource/webSocketCollection.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js +2 -47
- package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js +2 -42
- package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js +2 -117
- package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js +2 -20
- package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstHidden.js +2 -49
- package/esm/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackFirstInput.js +2 -41
- package/esm/domain/rumEventsCollection/view/trackFirstInput.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js +2 -44
- package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js +2 -153
- package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js +2 -54
- package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackLoadingTime.js +2 -50
- package/esm/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js +2 -73
- package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js +2 -84
- package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackSoftNavigationMetrics.js +2 -38
- package/esm/domain/rumEventsCollection/view/trackSoftNavigationMetrics.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js +2 -15
- package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/trackViews.js +2 -418
- package/esm/domain/rumEventsCollection/view/trackViews.js.map +1 -1
- package/esm/domain/rumEventsCollection/view/viewCollection.js +2 -127
- package/esm/domain/rumEventsCollection/view/viewCollection.js.map +1 -1
- package/esm/domain/rumSessionManager.js +2 -208
- package/esm/domain/rumSessionManager.js.map +1 -1
- package/esm/domain/tracing/ddtraceTracer.js +2 -40
- package/esm/domain/tracing/ddtraceTracer.js.map +1 -1
- package/esm/domain/tracing/getDocumentTraceId.js +2 -69
- package/esm/domain/tracing/getDocumentTraceId.js.map +1 -1
- package/esm/domain/tracing/jaegerTracer.js +2 -42
- package/esm/domain/tracing/jaegerTracer.js.map +1 -1
- package/esm/domain/tracing/sampler.js +2 -61
- package/esm/domain/tracing/sampler.js.map +1 -1
- package/esm/domain/tracing/skywalkingTracer.js +2 -90
- package/esm/domain/tracing/skywalkingTracer.js.map +1 -1
- package/esm/domain/tracing/traceIdentifier.js +2 -57
- package/esm/domain/tracing/traceIdentifier.js.map +1 -1
- package/esm/domain/tracing/tracer.js +2 -128
- package/esm/domain/tracing/tracer.js.map +1 -1
- package/esm/domain/tracing/w3cTraceParentTracer.js +2 -69
- package/esm/domain/tracing/w3cTraceParentTracer.js.map +1 -1
- package/esm/domain/tracing/zipkinMultiTracer.js +2 -42
- package/esm/domain/tracing/zipkinMultiTracer.js.map +1 -1
- package/esm/domain/tracing/zipkinSingleTracer.js +2 -41
- package/esm/domain/tracing/zipkinSingleTracer.js.map +1 -1
- package/esm/domain/trackEventCounts.js +2 -49
- package/esm/domain/trackEventCounts.js.map +1 -1
- package/esm/domain/usr/index.js +2 -38
- package/esm/domain/usr/index.js.map +1 -1
- package/esm/domain/visitorId/index.js +2 -406
- package/esm/domain/visitorId/index.js.map +1 -1
- package/esm/domain/waitPageActivityEnd.js +2 -142
- package/esm/domain/waitPageActivityEnd.js.map +1 -1
- package/esm/index.js +2 -4
- package/esm/index.js.map +1 -1
- package/esm/transport/startRumBatch.js +2 -74
- package/esm/transport/startRumBatch.js.map +1 -1
- package/esm/transport/startRumEventBridge.js +2 -9
- package/esm/transport/startRumEventBridge.js.map +1 -1
- package/esm/types/index.js +2 -1
- package/esm/types/index.js.map +1 -1
- package/esm/types/sessionReplayConstants.js +2 -46
- package/esm/types/sessionReplayConstants.js.map +1 -1
- package/package.json +5 -5
package/esm/domain/privacy.js
CHANGED
|
@@ -1,266 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export var MAX_ATTRIBUTE_VALUE_CHAR_LENGTH = 100000;
|
|
4
|
-
var TEXT_MASKING_CHAR = 'x';
|
|
5
|
-
export var MAX_PRIVACY_ANCESTOR_DEPTH = 1000;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Get node privacy level by iterating over its ancestors. When the direct parent privacy level is
|
|
9
|
-
* know, it is best to use something like:
|
|
10
|
-
*
|
|
11
|
-
* derivePrivacyLevelGivenParent(getNodeSelfPrivacyLevel(node), parentNodePrivacyLevel)
|
|
12
|
-
*/
|
|
13
|
-
export function getNodePrivacyLevel(node, defaultPrivacyLevel, cache) {
|
|
14
|
-
if (cache && cache.has(node)) {
|
|
15
|
-
return cache.get(node);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Resolve ancestors iteratively so an adversarially deep DOM cannot grow the
|
|
19
|
-
// JavaScript stack. If the watermark is crossed, fail closed: hiding the
|
|
20
|
-
// branch is safer than spending unbounded time resolving its privacy chain.
|
|
21
|
-
var unresolvedNodes = [];
|
|
22
|
-
var currentNode = node;
|
|
23
|
-
var inheritedPrivacyLevel;
|
|
24
|
-
while (currentNode) {
|
|
25
|
-
if (cache && cache.has(currentNode)) {
|
|
26
|
-
inheritedPrivacyLevel = cache.get(currentNode);
|
|
27
|
-
break;
|
|
28
|
-
}
|
|
29
|
-
if (unresolvedNodes.length >= MAX_PRIVACY_ANCESTOR_DEPTH) {
|
|
30
|
-
inheritedPrivacyLevel = NodePrivacyLevel.HIDDEN;
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
unresolvedNodes.push(currentNode);
|
|
34
|
-
currentNode = getParentNode(currentNode);
|
|
35
|
-
}
|
|
36
|
-
if (inheritedPrivacyLevel === undefined) {
|
|
37
|
-
inheritedPrivacyLevel = defaultPrivacyLevel;
|
|
38
|
-
}
|
|
39
|
-
while (unresolvedNodes.length) {
|
|
40
|
-
var unresolvedNode = unresolvedNodes.pop();
|
|
41
|
-
inheritedPrivacyLevel = reducePrivacyLevel(getNodeSelfPrivacyLevel(unresolvedNode), inheritedPrivacyLevel);
|
|
42
|
-
if (cache) {
|
|
43
|
-
cache.set(unresolvedNode, inheritedPrivacyLevel);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return inheritedPrivacyLevel;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Reduces the next privacy level based on self + parent privacy levels
|
|
51
|
-
*/
|
|
52
|
-
export function reducePrivacyLevel(childPrivacyLevel, parentNodePrivacyLevel) {
|
|
53
|
-
switch (parentNodePrivacyLevel) {
|
|
54
|
-
// These values cannot be overridden
|
|
55
|
-
case NodePrivacyLevel.HIDDEN:
|
|
56
|
-
case NodePrivacyLevel.IGNORE:
|
|
57
|
-
return parentNodePrivacyLevel;
|
|
58
|
-
}
|
|
59
|
-
switch (childPrivacyLevel) {
|
|
60
|
-
case NodePrivacyLevel.ALLOW:
|
|
61
|
-
case NodePrivacyLevel.MASK:
|
|
62
|
-
case NodePrivacyLevel.MASK_USER_INPUT:
|
|
63
|
-
case NodePrivacyLevel.HIDDEN:
|
|
64
|
-
case NodePrivacyLevel.IGNORE:
|
|
65
|
-
return childPrivacyLevel;
|
|
66
|
-
default:
|
|
67
|
-
return parentNodePrivacyLevel;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Determines the node's own privacy level without checking for ancestors.
|
|
73
|
-
*/
|
|
74
|
-
export function getNodeSelfPrivacyLevel(node) {
|
|
75
|
-
// Only Element types can have a privacy level set
|
|
76
|
-
if (!isElementNode(node)) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
var privAttr = node.getAttribute(PRIVACY_ATTR_NAME);
|
|
80
|
-
|
|
81
|
-
// Overrules for replay purpose
|
|
82
|
-
if (node.tagName === 'BASE') {
|
|
83
|
-
return NodePrivacyLevel.ALLOW;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Overrules to enforce end-user protection
|
|
87
|
-
if (node.tagName === 'INPUT') {
|
|
88
|
-
var inputElement = node;
|
|
89
|
-
if (inputElement.type === 'password' || inputElement.type === 'email' || inputElement.type === 'tel') {
|
|
90
|
-
return NodePrivacyLevel.MASK;
|
|
91
|
-
}
|
|
92
|
-
if (inputElement.type === 'hidden') {
|
|
93
|
-
return NodePrivacyLevel.MASK;
|
|
94
|
-
}
|
|
95
|
-
var autocomplete = inputElement.getAttribute('autocomplete');
|
|
96
|
-
// Handle input[autocomplete=cc-number/cc-csc/cc-exp/cc-exp-month/cc-exp-year]
|
|
97
|
-
if (autocomplete && autocomplete.indexOf('cc-') === 0) {
|
|
98
|
-
return NodePrivacyLevel.MASK;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// Check HTML privacy attributes and classes
|
|
103
|
-
if (privAttr === PRIVACY_ATTR_VALUE_HIDDEN || node.classList.contains(PRIVACY_CLASS_HIDDEN)) {
|
|
104
|
-
return NodePrivacyLevel.HIDDEN;
|
|
105
|
-
}
|
|
106
|
-
if (privAttr === PRIVACY_ATTR_VALUE_MASK || node.classList.contains(PRIVACY_CLASS_MASK)) {
|
|
107
|
-
return NodePrivacyLevel.MASK;
|
|
108
|
-
}
|
|
109
|
-
if (privAttr === PRIVACY_ATTR_VALUE_MASK_USER_INPUT || node.classList.contains(PRIVACY_CLASS_MASK_USER_INPUT)) {
|
|
110
|
-
return NodePrivacyLevel.MASK_USER_INPUT;
|
|
111
|
-
}
|
|
112
|
-
if (privAttr === PRIVACY_ATTR_VALUE_ALLOW || node.classList.contains(PRIVACY_CLASS_ALLOW)) {
|
|
113
|
-
return NodePrivacyLevel.ALLOW;
|
|
114
|
-
}
|
|
115
|
-
if (shouldIgnoreElement(node)) {
|
|
116
|
-
return NodePrivacyLevel.IGNORE;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Helper aiming to unify `mask` and `mask-user-input` privacy levels:
|
|
122
|
-
*
|
|
123
|
-
* In the `mask` case, it is trivial: we should mask the element.
|
|
124
|
-
*
|
|
125
|
-
* In the `mask-user-input` case, we should mask the element only if it is a "form" element or the
|
|
126
|
-
* direct parent is a form element for text nodes).
|
|
127
|
-
*
|
|
128
|
-
* Other `shouldMaskNode` cases are edge cases that should not matter too much (ex: should we mask a
|
|
129
|
-
* node if it is ignored or hidden? it doesn't matter since it won't be serialized).
|
|
130
|
-
*/
|
|
131
|
-
export function shouldMaskNode(configuration, node, privacyLevel) {
|
|
132
|
-
if (configuration.shouldMaskNode && configuration.shouldMaskNode(node, privacyLevel) === true) return true;
|
|
133
|
-
switch (privacyLevel) {
|
|
134
|
-
case NodePrivacyLevel.MASK:
|
|
135
|
-
case NodePrivacyLevel.HIDDEN:
|
|
136
|
-
case NodePrivacyLevel.IGNORE:
|
|
137
|
-
return true;
|
|
138
|
-
case NodePrivacyLevel.MASK_USER_INPUT:
|
|
139
|
-
return isTextNode(node) ? isFormElement(node.parentNode) : isFormElement(node);
|
|
140
|
-
default:
|
|
141
|
-
return false;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
function isFormElement(node) {
|
|
145
|
-
if (!node || node.nodeType !== node.ELEMENT_NODE) {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
var element = node;
|
|
149
|
-
if (element.tagName === 'INPUT') {
|
|
150
|
-
switch (element.type) {
|
|
151
|
-
case 'button':
|
|
152
|
-
case 'color':
|
|
153
|
-
case 'reset':
|
|
154
|
-
case 'submit':
|
|
155
|
-
return false;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
return !!FORM_PRIVATE_TAG_NAMES[element.tagName];
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Text censoring non-destructively maintains whitespace characters in order to preserve text shape
|
|
163
|
-
* during replay.
|
|
164
|
-
*/
|
|
165
|
-
export var censorText = function censorText(text) {
|
|
166
|
-
return text.replace(/\S/g, TEXT_MASKING_CHAR);
|
|
167
|
-
};
|
|
168
|
-
export function getTextContent(configuration, textNode, ignoreWhiteSpace, parentNodePrivacyLevel) {
|
|
169
|
-
// The parent node may not be a html element which has a tagName attribute.
|
|
170
|
-
// So just let it be undefined which is ok in this use case.
|
|
171
|
-
var parentTagName = textNode.parentElement && textNode.parentElement.tagName;
|
|
172
|
-
var textContent = textNode.textContent || '';
|
|
173
|
-
if (ignoreWhiteSpace && !textContent.trim()) {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
var nodePrivacyLevel = parentNodePrivacyLevel;
|
|
177
|
-
|
|
178
|
-
// var isStyle = parentTagName === 'STYLE' ? true : undefined
|
|
179
|
-
var isScript = parentTagName === 'SCRIPT';
|
|
180
|
-
if (isScript) {
|
|
181
|
-
// For perf reasons, we don't record script (heuristic)
|
|
182
|
-
textContent = CENSORED_STRING_MARK;
|
|
183
|
-
} else if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {
|
|
184
|
-
// Should never occur, but just in case, we set to CENSORED_MARK.
|
|
185
|
-
textContent = CENSORED_STRING_MARK;
|
|
186
|
-
} else if (shouldMaskNode(configuration, textNode, nodePrivacyLevel)) {
|
|
187
|
-
if (
|
|
188
|
-
// Scrambling the child list breaks text nodes for DATALIST/SELECT/OPTGROUP
|
|
189
|
-
parentTagName === 'DATALIST' || parentTagName === 'SELECT' || parentTagName === 'OPTGROUP') {
|
|
190
|
-
if (!textContent.trim()) {
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
} else if (parentTagName === 'OPTION') {
|
|
194
|
-
// <Option> has low entropy in charset + text length, so use `CENSORED_STRING_MARK` when masked
|
|
195
|
-
textContent = CENSORED_STRING_MARK;
|
|
196
|
-
} else {
|
|
197
|
-
textContent = censorText(textContent);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
// else if (isStyle && textContent) {
|
|
201
|
-
// try {
|
|
202
|
-
// // try to read style sheet
|
|
203
|
-
// if (textNode.nextSibling || textNode.previousSibling) {
|
|
204
|
-
// // This is not the only child of the stylesheet.
|
|
205
|
-
// // We can't read all of the sheet's .cssRules and expect them
|
|
206
|
-
// // to _only_ include the current rule(s) added by the text node.
|
|
207
|
-
// // So we'll be conservative and keep textContent as-is.
|
|
208
|
-
// } else if (
|
|
209
|
-
// textNode.parentNode &&
|
|
210
|
-
// textNode.parentNode.sheet &&
|
|
211
|
-
// textNode.parentNode.sheet.cssRules
|
|
212
|
-
// ) {
|
|
213
|
-
// textContent = getCssRulesString(textNode.parentNode.sheet)
|
|
214
|
-
// }
|
|
215
|
-
// } catch (err) {}
|
|
216
|
-
// textContent = switchToAbsoluteUrl(textContent, getHref())
|
|
217
|
-
// }
|
|
218
|
-
return textContent;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* We don't need this logic on the recorder side.
|
|
223
|
-
* For security related meta's, customer can mask themmanually given they
|
|
224
|
-
* are easy to identify in the HEAD tag.
|
|
225
|
-
*/
|
|
226
|
-
export function shouldIgnoreElement(element) {
|
|
227
|
-
if (element.nodeName === 'SCRIPT') {
|
|
228
|
-
return true;
|
|
229
|
-
}
|
|
230
|
-
if (element.nodeName === 'LINK') {
|
|
231
|
-
var relAttribute = getLowerCaseAttribute('rel');
|
|
232
|
-
return (
|
|
233
|
-
// Link as script - Ignore only when rel=preload, modulepreload or prefetch
|
|
234
|
-
/preload|prefetch/i.test(relAttribute) && getLowerCaseAttribute('as') === 'script' ||
|
|
235
|
-
// Favicons
|
|
236
|
-
relAttribute === 'shortcut icon' || relAttribute === 'icon'
|
|
237
|
-
);
|
|
238
|
-
}
|
|
239
|
-
if (element.nodeName === 'META') {
|
|
240
|
-
var nameAttribute = getLowerCaseAttribute('name');
|
|
241
|
-
var relAttribute = getLowerCaseAttribute('rel');
|
|
242
|
-
var propertyAttribute = getLowerCaseAttribute('property');
|
|
243
|
-
return (
|
|
244
|
-
// Favicons
|
|
245
|
-
/^msapplication-tile(image|color)$/.test(nameAttribute) || nameAttribute === 'application-name' || relAttribute === 'icon' || relAttribute === 'apple-touch-icon' || relAttribute === 'shortcut icon' ||
|
|
246
|
-
// Description
|
|
247
|
-
nameAttribute === 'keywords' || nameAttribute === 'description' ||
|
|
248
|
-
// Social
|
|
249
|
-
/^(og|twitter|fb):/.test(propertyAttribute) || /^(og|twitter):/.test(nameAttribute) || nameAttribute === 'pinterest' ||
|
|
250
|
-
// Robots
|
|
251
|
-
nameAttribute === 'robots' || nameAttribute === 'googlebot' || nameAttribute === 'bingbot' ||
|
|
252
|
-
// Http headers. Ex: X-UA-Compatible, Content-Type, Content-Language, cache-control,
|
|
253
|
-
// X-Translated-By
|
|
254
|
-
element.hasAttribute('http-equiv') ||
|
|
255
|
-
// Authorship
|
|
256
|
-
nameAttribute === 'author' || nameAttribute === 'generator' || nameAttribute === 'framework' || nameAttribute === 'publisher' || nameAttribute === 'progid' || /^article:/.test(propertyAttribute) || /^product:/.test(propertyAttribute) ||
|
|
257
|
-
// Verification
|
|
258
|
-
nameAttribute === 'google-site-verification' || nameAttribute === 'yandex-verification' || nameAttribute === 'csrf-token' || nameAttribute === 'p:domain_verify' || nameAttribute === 'verify-v1' || nameAttribute === 'verification' || nameAttribute === 'shopify-checkout-api-token'
|
|
259
|
-
);
|
|
260
|
-
}
|
|
261
|
-
function getLowerCaseAttribute(name) {
|
|
262
|
-
return (element.getAttribute(name) || '').toLowerCase();
|
|
263
|
-
}
|
|
264
|
-
return false;
|
|
265
|
-
}
|
|
266
|
-
//# sourceMappingURL=privacy.js.map
|
|
1
|
+
import{isElementNode,getParentNode,isTextNode}from"@cloudcare/browser-core";import{NodePrivacyLevel,PRIVACY_ATTR_NAME,PRIVACY_ATTR_VALUE_ALLOW,PRIVACY_ATTR_VALUE_MASK,PRIVACY_ATTR_VALUE_MASK_USER_INPUT,PRIVACY_ATTR_VALUE_HIDDEN,PRIVACY_CLASS_ALLOW,PRIVACY_CLASS_MASK,PRIVACY_CLASS_MASK_USER_INPUT,PRIVACY_CLASS_HIDDEN,FORM_PRIVATE_TAG_NAMES,CENSORED_STRING_MARK}from"../constants";export var MAX_ATTRIBUTE_VALUE_CHAR_LENGTH=1e5;export var MAX_PRIVACY_ANCESTOR_DEPTH=1e3;export function getNodePrivacyLevel(node,defaultPrivacyLevel,cache){if(cache&&cache.has(node))return cache.get(node);for(var inheritedPrivacyLevel,unresolvedNodes=[],currentNode=node;currentNode;){if(cache&&cache.has(currentNode)){inheritedPrivacyLevel=cache.get(currentNode);break}if(unresolvedNodes.length>=MAX_PRIVACY_ANCESTOR_DEPTH){inheritedPrivacyLevel=NodePrivacyLevel.HIDDEN;break}unresolvedNodes.push(currentNode),currentNode=getParentNode(currentNode)}for(void 0===inheritedPrivacyLevel&&(inheritedPrivacyLevel=defaultPrivacyLevel);unresolvedNodes.length;){var unresolvedNode=unresolvedNodes.pop();inheritedPrivacyLevel=reducePrivacyLevel(getNodeSelfPrivacyLevel(unresolvedNode),inheritedPrivacyLevel),cache&&cache.set(unresolvedNode,inheritedPrivacyLevel)}return inheritedPrivacyLevel}export function reducePrivacyLevel(childPrivacyLevel,parentNodePrivacyLevel){switch(parentNodePrivacyLevel){case NodePrivacyLevel.HIDDEN:case NodePrivacyLevel.IGNORE:return parentNodePrivacyLevel}switch(childPrivacyLevel){case NodePrivacyLevel.ALLOW:case NodePrivacyLevel.MASK:case NodePrivacyLevel.MASK_USER_INPUT:case NodePrivacyLevel.HIDDEN:case NodePrivacyLevel.IGNORE:return childPrivacyLevel;default:return parentNodePrivacyLevel}}export function getNodeSelfPrivacyLevel(node){if(isElementNode(node)){var privAttr=node.getAttribute(PRIVACY_ATTR_NAME);if("BASE"===node.tagName)return NodePrivacyLevel.ALLOW;if("INPUT"===node.tagName){var inputElement=node;if("password"===inputElement.type||"email"===inputElement.type||"tel"===inputElement.type)return NodePrivacyLevel.MASK;if("hidden"===inputElement.type)return NodePrivacyLevel.MASK;var autocomplete=inputElement.getAttribute("autocomplete");if(autocomplete&&0===autocomplete.indexOf("cc-"))return NodePrivacyLevel.MASK}return privAttr===PRIVACY_ATTR_VALUE_HIDDEN||node.classList.contains(PRIVACY_CLASS_HIDDEN)?NodePrivacyLevel.HIDDEN:privAttr===PRIVACY_ATTR_VALUE_MASK||node.classList.contains(PRIVACY_CLASS_MASK)?NodePrivacyLevel.MASK:privAttr===PRIVACY_ATTR_VALUE_MASK_USER_INPUT||node.classList.contains(PRIVACY_CLASS_MASK_USER_INPUT)?NodePrivacyLevel.MASK_USER_INPUT:privAttr===PRIVACY_ATTR_VALUE_ALLOW||node.classList.contains(PRIVACY_CLASS_ALLOW)?NodePrivacyLevel.ALLOW:shouldIgnoreElement(node)?NodePrivacyLevel.IGNORE:void 0}}export function shouldMaskNode(configuration,node,privacyLevel){if(configuration.shouldMaskNode&&!0===configuration.shouldMaskNode(node,privacyLevel))return!0;switch(privacyLevel){case NodePrivacyLevel.MASK:case NodePrivacyLevel.HIDDEN:case NodePrivacyLevel.IGNORE:return!0;case NodePrivacyLevel.MASK_USER_INPUT:return isTextNode(node)?isFormElement(node.parentNode):isFormElement(node);default:return!1}}function isFormElement(node){if(!node||node.nodeType!==node.ELEMENT_NODE)return!1;var element=node;if("INPUT"===element.tagName)switch(element.type){case"button":case"color":case"reset":case"submit":return!1}return!!FORM_PRIVATE_TAG_NAMES[element.tagName]}export var censorText=function censorText(text){return text.replace(/\S/g,"x")};export function getTextContent(configuration,textNode,ignoreWhiteSpace,parentNodePrivacyLevel){var parentTagName=textNode.parentElement&&textNode.parentElement.tagName,textContent=textNode.textContent||"";if(!ignoreWhiteSpace||textContent.trim()){var nodePrivacyLevel=parentNodePrivacyLevel;if("SCRIPT"===parentTagName)textContent=CENSORED_STRING_MARK;else if(nodePrivacyLevel===NodePrivacyLevel.HIDDEN)textContent=CENSORED_STRING_MARK;else if(shouldMaskNode(configuration,textNode,nodePrivacyLevel))if("DATALIST"===parentTagName||"SELECT"===parentTagName||"OPTGROUP"===parentTagName){if(!textContent.trim())return}else textContent="OPTION"===parentTagName?CENSORED_STRING_MARK:censorText(textContent);return textContent}}export function shouldIgnoreElement(element){if("SCRIPT"===element.nodeName)return!0;if("LINK"===element.nodeName){var relAttribute=getLowerCaseAttribute("rel");return/preload|prefetch/i.test(relAttribute)&&"script"===getLowerCaseAttribute("as")||"shortcut icon"===relAttribute||"icon"===relAttribute}if("META"===element.nodeName){var nameAttribute=getLowerCaseAttribute("name"),propertyAttribute=(relAttribute=getLowerCaseAttribute("rel"),getLowerCaseAttribute("property"));return/^msapplication-tile(image|color)$/.test(nameAttribute)||"application-name"===nameAttribute||"icon"===relAttribute||"apple-touch-icon"===relAttribute||"shortcut icon"===relAttribute||"keywords"===nameAttribute||"description"===nameAttribute||/^(og|twitter|fb):/.test(propertyAttribute)||/^(og|twitter):/.test(nameAttribute)||"pinterest"===nameAttribute||"robots"===nameAttribute||"googlebot"===nameAttribute||"bingbot"===nameAttribute||element.hasAttribute("http-equiv")||"author"===nameAttribute||"generator"===nameAttribute||"framework"===nameAttribute||"publisher"===nameAttribute||"progid"===nameAttribute||/^article:/.test(propertyAttribute)||/^product:/.test(propertyAttribute)||"google-site-verification"===nameAttribute||"yandex-verification"===nameAttribute||"csrf-token"===nameAttribute||"p:domain_verify"===nameAttribute||"verify-v1"===nameAttribute||"verification"===nameAttribute||"shopify-checkout-api-token"===nameAttribute}function getLowerCaseAttribute(name){return(element.getAttribute(name)||"").toLowerCase()}return!1}
|
|
2
|
+
//# sourceMappingURL=privacy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"privacy.js","names":["isElementNode","getParentNode","isTextNode","NodePrivacyLevel","PRIVACY_ATTR_NAME","PRIVACY_ATTR_VALUE_ALLOW","PRIVACY_ATTR_VALUE_MASK","PRIVACY_ATTR_VALUE_MASK_USER_INPUT","PRIVACY_ATTR_VALUE_HIDDEN","PRIVACY_CLASS_ALLOW","PRIVACY_CLASS_MASK","PRIVACY_CLASS_MASK_USER_INPUT","PRIVACY_CLASS_HIDDEN","FORM_PRIVATE_TAG_NAMES","CENSORED_STRING_MARK","MAX_ATTRIBUTE_VALUE_CHAR_LENGTH","
|
|
1
|
+
{"version":3,"file":"privacy.js","names":["isElementNode","getParentNode","isTextNode","NodePrivacyLevel","PRIVACY_ATTR_NAME","PRIVACY_ATTR_VALUE_ALLOW","PRIVACY_ATTR_VALUE_MASK","PRIVACY_ATTR_VALUE_MASK_USER_INPUT","PRIVACY_ATTR_VALUE_HIDDEN","PRIVACY_CLASS_ALLOW","PRIVACY_CLASS_MASK","PRIVACY_CLASS_MASK_USER_INPUT","PRIVACY_CLASS_HIDDEN","FORM_PRIVATE_TAG_NAMES","CENSORED_STRING_MARK","MAX_ATTRIBUTE_VALUE_CHAR_LENGTH","MAX_PRIVACY_ANCESTOR_DEPTH","getNodePrivacyLevel","node","defaultPrivacyLevel","cache","has","get","inheritedPrivacyLevel","unresolvedNodes","currentNode","length","HIDDEN","push","undefined","unresolvedNode","pop","reducePrivacyLevel","getNodeSelfPrivacyLevel","set","childPrivacyLevel","parentNodePrivacyLevel","IGNORE","ALLOW","MASK","MASK_USER_INPUT","privAttr","getAttribute","tagName","inputElement","type","autocomplete","indexOf","classList","contains","shouldIgnoreElement","shouldMaskNode","configuration","privacyLevel","isFormElement","parentNode","nodeType","ELEMENT_NODE","element","censorText","text","replace","getTextContent","textNode","ignoreWhiteSpace","parentTagName","parentElement","textContent","trim","nodePrivacyLevel","nodeName","relAttribute","getLowerCaseAttribute","test","nameAttribute","propertyAttribute","hasAttribute","name","toLowerCase"],"sources":["../../src/domain/privacy.js"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
export function takeAutoCanvasSnapshots(getCanvases,
|
|
2
|
-
|
|
3
|
-
return canvases.reduce(function (chain, canvas) {
|
|
4
|
-
return chain.then(function () {
|
|
5
|
-
return Promise.resolve(snapshotCanvas(canvas))["catch"](function () {});
|
|
6
|
-
});
|
|
7
|
-
}, Promise.resolve());
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=canvasAutoSnapshot.js.map
|
|
1
|
+
export function takeAutoCanvasSnapshots(getCanvases,snapshotCanvas){return Array.prototype.slice.call(getCanvases()).reduce((function(chain,canvas){return chain.then((function(){return Promise.resolve(snapshotCanvas(canvas)).catch((function(){}))}))}),Promise.resolve())}
|
|
2
|
+
//# sourceMappingURL=canvasAutoSnapshot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvasAutoSnapshot.js","names":["takeAutoCanvasSnapshots","getCanvases","snapshotCanvas","
|
|
1
|
+
{"version":3,"file":"canvasAutoSnapshot.js","names":["takeAutoCanvasSnapshots","getCanvases","snapshotCanvas","Array","prototype","slice","call","reduce","chain","canvas","then","Promise","resolve"],"sources":["../../../../src/domain/replay/record/canvasAutoSnapshot.js"],"mappings":"OAAO,SAASA,wBAAwBC,YAAaC,gBAEnD,OADeC,MAAMC,UAAUC,MAAMC,KAAKL,eAC1BM,QAAO,SAAUC,MAAOC,QACtC,OAAOD,MAAME,MAAK,WAChB,OAAOC,QAAQC,QAAQV,eAAeO,SAAQ,OAAO,WAAa,GACpE,GACF,GAAGE,QAAQC,UACb","ignoreList":[]}
|