clarity-js 0.7.24 → 0.7.26
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/build/clarity.extended.js +1 -1
- package/build/clarity.insight.js +1 -1
- package/build/clarity.js +161 -101
- package/build/clarity.min.js +1 -1
- package/build/clarity.module.js +161 -101
- package/build/clarity.performance.js +1 -1
- package/package.json +1 -1
- package/rollup.config.ts +1 -1
- package/src/core/version.ts +1 -1
- package/src/data/metadata.ts +6 -3
- package/src/insight/style.ts +52 -0
- package/src/layout/node.ts +10 -0
- package/src/layout/style.ts +26 -16
- package/src/layout/traverse.ts +1 -1
- package/types/data.d.ts +2 -1
package/build/clarity.js
CHANGED
|
@@ -142,7 +142,7 @@ function api(method) {
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
var startTime = 0;
|
|
145
|
-
function start$
|
|
145
|
+
function start$I() {
|
|
146
146
|
startTime = performance.now();
|
|
147
147
|
}
|
|
148
148
|
function time(event) {
|
|
@@ -150,11 +150,11 @@ function time(event) {
|
|
|
150
150
|
var ts = event && event.timeStamp > 0 ? event.timeStamp : performance.now();
|
|
151
151
|
return Math.max(Math.round(ts - startTime), 0);
|
|
152
152
|
}
|
|
153
|
-
function stop$
|
|
153
|
+
function stop$F() {
|
|
154
154
|
startTime = 0;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
var version$1 = "0.7.
|
|
157
|
+
var version$1 = "0.7.26";
|
|
158
158
|
|
|
159
159
|
// tslint:disable: no-bitwise
|
|
160
160
|
function hash (input, precision) {
|
|
@@ -358,11 +358,11 @@ function redact$1(value) {
|
|
|
358
358
|
var state$c = null;
|
|
359
359
|
var buffer = null;
|
|
360
360
|
var update$2 = false;
|
|
361
|
-
function start$
|
|
361
|
+
function start$H() {
|
|
362
362
|
update$2 = false;
|
|
363
|
-
reset$
|
|
363
|
+
reset$s();
|
|
364
364
|
}
|
|
365
|
-
function reset$
|
|
365
|
+
function reset$s() {
|
|
366
366
|
// Baseline state holds the previous values - if it is updated in the current payload,
|
|
367
367
|
// reset the state to current value after sending the previous state
|
|
368
368
|
if (update$2) {
|
|
@@ -424,23 +424,23 @@ function visibility(t, visible) {
|
|
|
424
424
|
}
|
|
425
425
|
update$2 = true;
|
|
426
426
|
}
|
|
427
|
-
function compute$
|
|
427
|
+
function compute$d() {
|
|
428
428
|
if (update$2) {
|
|
429
429
|
encode$1(4 /* Event.Baseline */);
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
|
-
function stop$
|
|
433
|
-
reset$
|
|
432
|
+
function stop$E() {
|
|
433
|
+
reset$s();
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
var baseline = /*#__PURE__*/Object.freeze({
|
|
437
437
|
__proto__: null,
|
|
438
438
|
activity: activity,
|
|
439
|
-
compute: compute$
|
|
440
|
-
reset: reset$
|
|
441
|
-
start: start$
|
|
439
|
+
compute: compute$d,
|
|
440
|
+
reset: reset$s,
|
|
441
|
+
start: start$H,
|
|
442
442
|
get state () { return state$c; },
|
|
443
|
-
stop: stop$
|
|
443
|
+
stop: stop$E,
|
|
444
444
|
track: track$8,
|
|
445
445
|
visibility: visibility
|
|
446
446
|
});
|
|
@@ -465,12 +465,12 @@ function event(a, b) {
|
|
|
465
465
|
|
|
466
466
|
var data$i = null;
|
|
467
467
|
var updates$3 = null;
|
|
468
|
-
function start$
|
|
468
|
+
function start$G() {
|
|
469
469
|
data$i = {};
|
|
470
470
|
updates$3 = {};
|
|
471
471
|
count$1(5 /* Metric.InvokeCount */);
|
|
472
472
|
}
|
|
473
|
-
function stop$
|
|
473
|
+
function stop$D() {
|
|
474
474
|
data$i = {};
|
|
475
475
|
updates$3 = {};
|
|
476
476
|
}
|
|
@@ -508,10 +508,10 @@ function max(metric, value) {
|
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
function compute$
|
|
511
|
+
function compute$c() {
|
|
512
512
|
encode$1(0 /* Event.Metric */);
|
|
513
513
|
}
|
|
514
|
-
function reset$
|
|
514
|
+
function reset$r() {
|
|
515
515
|
updates$3 = {};
|
|
516
516
|
}
|
|
517
517
|
|
|
@@ -526,11 +526,11 @@ var data$h;
|
|
|
526
526
|
var last = 0;
|
|
527
527
|
var interval = 0;
|
|
528
528
|
var timeout$6 = null;
|
|
529
|
-
function start$
|
|
529
|
+
function start$F() {
|
|
530
530
|
interval = 60000 /* Setting.PingInterval */;
|
|
531
531
|
last = 0;
|
|
532
532
|
}
|
|
533
|
-
function reset$
|
|
533
|
+
function reset$q() {
|
|
534
534
|
if (timeout$6) {
|
|
535
535
|
clearTimeout(timeout$6);
|
|
536
536
|
}
|
|
@@ -548,7 +548,7 @@ function ping() {
|
|
|
548
548
|
suspend();
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function stop$
|
|
551
|
+
function stop$C() {
|
|
552
552
|
clearTimeout(timeout$6);
|
|
553
553
|
last = 0;
|
|
554
554
|
interval = 0;
|
|
@@ -557,16 +557,16 @@ function stop$B() {
|
|
|
557
557
|
var ping$1 = /*#__PURE__*/Object.freeze({
|
|
558
558
|
__proto__: null,
|
|
559
559
|
get data () { return data$h; },
|
|
560
|
-
reset: reset$
|
|
561
|
-
start: start$
|
|
562
|
-
stop: stop$
|
|
560
|
+
reset: reset$q,
|
|
561
|
+
start: start$F,
|
|
562
|
+
stop: stop$C
|
|
563
563
|
});
|
|
564
564
|
|
|
565
565
|
var data$g = null;
|
|
566
|
-
function start$
|
|
566
|
+
function start$E() {
|
|
567
567
|
data$g = {};
|
|
568
568
|
}
|
|
569
|
-
function stop$
|
|
569
|
+
function stop$B() {
|
|
570
570
|
data$g = {};
|
|
571
571
|
}
|
|
572
572
|
function track$7(event, time) {
|
|
@@ -586,25 +586,25 @@ function track$7(event, time) {
|
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
function compute$
|
|
589
|
+
function compute$b() {
|
|
590
590
|
encode$1(36 /* Event.Summary */);
|
|
591
591
|
}
|
|
592
|
-
function reset$
|
|
592
|
+
function reset$p() {
|
|
593
593
|
data$g = {};
|
|
594
594
|
}
|
|
595
595
|
|
|
596
596
|
var summary = /*#__PURE__*/Object.freeze({
|
|
597
597
|
__proto__: null,
|
|
598
|
-
compute: compute$
|
|
598
|
+
compute: compute$b,
|
|
599
599
|
get data () { return data$g; },
|
|
600
|
-
reset: reset$
|
|
601
|
-
start: start$
|
|
602
|
-
stop: stop$
|
|
600
|
+
reset: reset$p,
|
|
601
|
+
start: start$E,
|
|
602
|
+
stop: stop$B,
|
|
603
603
|
track: track$7
|
|
604
604
|
});
|
|
605
605
|
|
|
606
606
|
var data$f = null;
|
|
607
|
-
function start$
|
|
607
|
+
function start$D() {
|
|
608
608
|
if (!config$1.lean && config$1.upgrade) {
|
|
609
609
|
config$1.upgrade("Config" /* Constant.Config */);
|
|
610
610
|
}
|
|
@@ -628,15 +628,15 @@ function upgrade(key) {
|
|
|
628
628
|
encode$1(3 /* Event.Upgrade */);
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
|
-
function stop$
|
|
631
|
+
function stop$A() {
|
|
632
632
|
data$f = null;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
var upgrade$1 = /*#__PURE__*/Object.freeze({
|
|
636
636
|
__proto__: null,
|
|
637
637
|
get data () { return data$f; },
|
|
638
|
-
start: start$
|
|
639
|
-
stop: stop$
|
|
638
|
+
start: start$D,
|
|
639
|
+
stop: stop$A,
|
|
640
640
|
upgrade: upgrade
|
|
641
641
|
});
|
|
642
642
|
|
|
@@ -694,8 +694,8 @@ function __generator(thisArg, body) {
|
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
var data$e = null;
|
|
697
|
-
function start$
|
|
698
|
-
reset$
|
|
697
|
+
function start$C() {
|
|
698
|
+
reset$o();
|
|
699
699
|
}
|
|
700
700
|
function set(variable, value) {
|
|
701
701
|
var values = typeof value === "string" /* Constant.String */ ? [value] : value;
|
|
@@ -750,14 +750,14 @@ function log$2(variable, value) {
|
|
|
750
750
|
data$e[variable] = validValues;
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
function compute$
|
|
753
|
+
function compute$a() {
|
|
754
754
|
encode$1(34 /* Event.Variable */);
|
|
755
755
|
}
|
|
756
|
-
function reset$
|
|
756
|
+
function reset$o() {
|
|
757
757
|
data$e = {};
|
|
758
758
|
}
|
|
759
|
-
function stop$
|
|
760
|
-
reset$
|
|
759
|
+
function stop$z() {
|
|
760
|
+
reset$o();
|
|
761
761
|
}
|
|
762
762
|
function redact(input) {
|
|
763
763
|
return input && input.length >= 5 /* Setting.WordLength */ ?
|
|
@@ -791,13 +791,13 @@ function detect(input) {
|
|
|
791
791
|
|
|
792
792
|
var variable = /*#__PURE__*/Object.freeze({
|
|
793
793
|
__proto__: null,
|
|
794
|
-
compute: compute$
|
|
794
|
+
compute: compute$a,
|
|
795
795
|
get data () { return data$e; },
|
|
796
796
|
identify: identify,
|
|
797
|
-
reset: reset$
|
|
797
|
+
reset: reset$o,
|
|
798
798
|
set: set,
|
|
799
|
-
start: start$
|
|
800
|
-
stop: stop$
|
|
799
|
+
start: start$C,
|
|
800
|
+
stop: stop$z
|
|
801
801
|
});
|
|
802
802
|
|
|
803
803
|
var supported$1 = "CompressionStream" /* Constant.CompressionStream */ in window;
|
|
@@ -859,32 +859,32 @@ function read(stream) {
|
|
|
859
859
|
}
|
|
860
860
|
|
|
861
861
|
var modules$1 = [baseline, dimension, variable, limit, summary, metadata$1, envelope$1, upload$1, ping$1, upgrade$1, extract];
|
|
862
|
-
function start$
|
|
862
|
+
function start$B() {
|
|
863
863
|
// Metric needs to be initialized before we can start measuring. so metric is not wrapped in measure
|
|
864
|
-
start$
|
|
864
|
+
start$G();
|
|
865
865
|
modules$1.forEach(function (x) { return measure(x.start)(); });
|
|
866
866
|
}
|
|
867
|
-
function stop$
|
|
867
|
+
function stop$y() {
|
|
868
868
|
// Stop modules in the reverse order of their initialization
|
|
869
869
|
// The ordering below should respect inter-module dependency.
|
|
870
870
|
// E.g. if upgrade depends on upload, then upgrade needs to end before upload.
|
|
871
871
|
// Similarly, if upload depends on metadata, upload needs to end before metadata.
|
|
872
872
|
modules$1.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
|
|
873
|
-
stop$
|
|
873
|
+
stop$D();
|
|
874
874
|
}
|
|
875
|
-
function compute$
|
|
876
|
-
compute$
|
|
877
|
-
compute$
|
|
875
|
+
function compute$9() {
|
|
876
|
+
compute$a();
|
|
877
|
+
compute$d();
|
|
878
878
|
compute$2();
|
|
879
|
+
compute$c();
|
|
879
880
|
compute$b();
|
|
880
|
-
compute$a();
|
|
881
881
|
compute$3();
|
|
882
882
|
compute$4();
|
|
883
883
|
}
|
|
884
884
|
|
|
885
885
|
var history$5 = [];
|
|
886
886
|
var data$d;
|
|
887
|
-
function start$
|
|
887
|
+
function start$A() {
|
|
888
888
|
history$5 = [];
|
|
889
889
|
max(26 /* Metric.Automation */, navigator.webdriver ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */);
|
|
890
890
|
try {
|
|
@@ -908,7 +908,7 @@ function check$4(id, target, input) {
|
|
|
908
908
|
|
|
909
909
|
var excludeClassNames = "load,active,fixed,visible,focus,show,collaps,animat" /* Constant.ExcludeClassNames */.split("," /* Constant.Comma */);
|
|
910
910
|
var selectorMap = {};
|
|
911
|
-
function reset$
|
|
911
|
+
function reset$n() {
|
|
912
912
|
selectorMap = {};
|
|
913
913
|
}
|
|
914
914
|
function get$1(input, type) {
|
|
@@ -997,7 +997,7 @@ function filter(value) {
|
|
|
997
997
|
var selector = /*#__PURE__*/Object.freeze({
|
|
998
998
|
__proto__: null,
|
|
999
999
|
get: get$1,
|
|
1000
|
-
reset: reset$
|
|
1000
|
+
reset: reset$n
|
|
1001
1001
|
});
|
|
1002
1002
|
|
|
1003
1003
|
var index = 1;
|
|
@@ -1016,14 +1016,14 @@ var idMap = null; // Maps node => id.
|
|
|
1016
1016
|
var iframeMap = null; // Maps iframe's contentDocument => parent iframe element
|
|
1017
1017
|
var privacyMap = null; // Maps node => Privacy (enum)
|
|
1018
1018
|
var fraudMap = null; // Maps node => FraudId (number)
|
|
1019
|
-
function start$
|
|
1020
|
-
reset$
|
|
1019
|
+
function start$z() {
|
|
1020
|
+
reset$m();
|
|
1021
1021
|
parse$1(document, true);
|
|
1022
1022
|
}
|
|
1023
|
-
function stop$
|
|
1024
|
-
reset$
|
|
1023
|
+
function stop$x() {
|
|
1024
|
+
reset$m();
|
|
1025
1025
|
}
|
|
1026
|
-
function reset$
|
|
1026
|
+
function reset$m() {
|
|
1027
1027
|
index = 1;
|
|
1028
1028
|
values = [];
|
|
1029
1029
|
updateMap = [];
|
|
@@ -1039,7 +1039,7 @@ function reset$l() {
|
|
|
1039
1039
|
iframeMap = new WeakMap();
|
|
1040
1040
|
privacyMap = new WeakMap();
|
|
1041
1041
|
fraudMap = new WeakMap();
|
|
1042
|
-
reset$
|
|
1042
|
+
reset$n();
|
|
1043
1043
|
}
|
|
1044
1044
|
// We parse new root nodes for any regions or masked nodes in the beginning (document) and
|
|
1045
1045
|
// later whenever there are new additions or modifications to DOM (mutations)
|
|
@@ -1375,8 +1375,8 @@ var dom = /*#__PURE__*/Object.freeze({
|
|
|
1375
1375
|
lookup: lookup,
|
|
1376
1376
|
parse: parse$1,
|
|
1377
1377
|
sameorigin: sameorigin,
|
|
1378
|
-
start: start$
|
|
1379
|
-
stop: stop$
|
|
1378
|
+
start: start$z,
|
|
1379
|
+
stop: stop$x,
|
|
1380
1380
|
update: update$1,
|
|
1381
1381
|
updates: updates$2
|
|
1382
1382
|
});
|
|
@@ -1404,7 +1404,7 @@ function resume$1() {
|
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
|
-
function reset$
|
|
1407
|
+
function reset$l() {
|
|
1408
1408
|
tracker = {};
|
|
1409
1409
|
queuedTasks = [];
|
|
1410
1410
|
activeTask = null;
|
|
@@ -1474,7 +1474,7 @@ function state$b(timer) {
|
|
|
1474
1474
|
// If this task is no longer being tracked, send stop message to the caller
|
|
1475
1475
|
return 2 /* Task.Stop */;
|
|
1476
1476
|
}
|
|
1477
|
-
function start$
|
|
1477
|
+
function start$y(timer) {
|
|
1478
1478
|
tracker[key(timer)] = { start: performance.now(), calls: 0, yield: 30 /* Setting.LongTask */ };
|
|
1479
1479
|
}
|
|
1480
1480
|
function restart$2(timer) {
|
|
@@ -1482,12 +1482,12 @@ function restart$2(timer) {
|
|
|
1482
1482
|
if (tracker && tracker[id]) {
|
|
1483
1483
|
var c = tracker[id].calls;
|
|
1484
1484
|
var y = tracker[id].yield;
|
|
1485
|
-
start$
|
|
1485
|
+
start$y(timer);
|
|
1486
1486
|
tracker[id].calls = c + 1;
|
|
1487
1487
|
tracker[id].yield = y;
|
|
1488
1488
|
}
|
|
1489
1489
|
}
|
|
1490
|
-
function stop$
|
|
1490
|
+
function stop$w(timer) {
|
|
1491
1491
|
var end = performance.now();
|
|
1492
1492
|
var id = key(timer);
|
|
1493
1493
|
var duration = end - tracker[id].start;
|
|
@@ -1507,7 +1507,7 @@ function suspend$1(timer) {
|
|
|
1507
1507
|
case 0:
|
|
1508
1508
|
id = key(timer);
|
|
1509
1509
|
if (!(id in tracker)) return [3 /*break*/, 2];
|
|
1510
|
-
stop$
|
|
1510
|
+
stop$w(timer);
|
|
1511
1511
|
_a = tracker[id];
|
|
1512
1512
|
return [4 /*yield*/, wait()];
|
|
1513
1513
|
case 1:
|
|
@@ -1620,14 +1620,14 @@ function tokenize (tokens) {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
|
|
1622
1622
|
var data$c;
|
|
1623
|
-
function reset$
|
|
1623
|
+
function reset$k() {
|
|
1624
1624
|
data$c = null;
|
|
1625
1625
|
}
|
|
1626
|
-
function start$
|
|
1627
|
-
reset$
|
|
1628
|
-
compute$
|
|
1626
|
+
function start$x() {
|
|
1627
|
+
reset$k();
|
|
1628
|
+
compute$8();
|
|
1629
1629
|
}
|
|
1630
|
-
function compute$
|
|
1630
|
+
function compute$8() {
|
|
1631
1631
|
var body = document.body;
|
|
1632
1632
|
var d = document.documentElement;
|
|
1633
1633
|
var bodyClientWidth = body ? body.clientWidth : null;
|
|
@@ -1650,12 +1650,51 @@ function compute$7() {
|
|
|
1650
1650
|
encode$4(8 /* Event.Document */);
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
|
+
function stop$v() {
|
|
1654
|
+
reset$k();
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
var state$a = [];
|
|
1658
|
+
var replace = null;
|
|
1659
|
+
var replaceSync = null;
|
|
1660
|
+
function start$w() {
|
|
1661
|
+
reset$j();
|
|
1662
|
+
if (replace === null) {
|
|
1663
|
+
replace = CSSStyleSheet.prototype.replace;
|
|
1664
|
+
CSSStyleSheet.prototype.replace = function () {
|
|
1665
|
+
if (active()) {
|
|
1666
|
+
max(36 /* Metric.ConstructedStyles */, 1);
|
|
1667
|
+
}
|
|
1668
|
+
return replace.apply(this, arguments);
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
if (replaceSync === null) {
|
|
1672
|
+
replaceSync = CSSStyleSheet.prototype.replaceSync;
|
|
1673
|
+
CSSStyleSheet.prototype.replaceSync = function () {
|
|
1674
|
+
if (active()) {
|
|
1675
|
+
max(36 /* Metric.ConstructedStyles */, 1);
|
|
1676
|
+
}
|
|
1677
|
+
return replaceSync.apply(this, arguments);
|
|
1678
|
+
};
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
function checkDocumentStyles(documentNode) {
|
|
1682
|
+
if (!(documentNode === null || documentNode === void 0 ? void 0 : documentNode.adoptedStyleSheets)) {
|
|
1683
|
+
// if we don't have adoptedStyledSheets on the Node passed to us, we can short circuit.
|
|
1684
|
+
return;
|
|
1685
|
+
}
|
|
1686
|
+
max(36 /* Metric.ConstructedStyles */, 1);
|
|
1687
|
+
}
|
|
1688
|
+
function compute$7() {
|
|
1689
|
+
checkDocumentStyles(document);
|
|
1690
|
+
}
|
|
1691
|
+
function reset$j() {
|
|
1692
|
+
state$a = [];
|
|
1693
|
+
}
|
|
1653
1694
|
function stop$u() {
|
|
1654
1695
|
reset$j();
|
|
1655
1696
|
}
|
|
1656
1697
|
|
|
1657
|
-
var state$a = [];
|
|
1658
|
-
|
|
1659
1698
|
var state$9 = [];
|
|
1660
1699
|
var animationPlay = null;
|
|
1661
1700
|
var animationPause = null;
|
|
@@ -1788,6 +1827,7 @@ function encode$4 (type, timer, ts) {
|
|
|
1788
1827
|
tokens.push(entry.data.newIds);
|
|
1789
1828
|
queue(tokens);
|
|
1790
1829
|
}
|
|
1830
|
+
reset$j();
|
|
1791
1831
|
return [3 /*break*/, 13];
|
|
1792
1832
|
case 4:
|
|
1793
1833
|
for (_e = 0, _f = state$a; _e < _f.length; _e++) {
|
|
@@ -1798,6 +1838,7 @@ function encode$4 (type, timer, ts) {
|
|
|
1798
1838
|
tokens.push(entry.data.cssRules);
|
|
1799
1839
|
queue(tokens);
|
|
1800
1840
|
}
|
|
1841
|
+
reset$j();
|
|
1801
1842
|
_l.label = 5;
|
|
1802
1843
|
case 5:
|
|
1803
1844
|
for (_g = 0, _h = state$9; _g < _h.length; _g++) {
|
|
@@ -2710,6 +2751,7 @@ function processNode (node, source) {
|
|
|
2710
2751
|
// later whenever there are new additions or modifications to DOM (mutations)
|
|
2711
2752
|
if (node === document)
|
|
2712
2753
|
parse$1(document);
|
|
2754
|
+
checkDocumentStyles(node);
|
|
2713
2755
|
observe$2(node);
|
|
2714
2756
|
break;
|
|
2715
2757
|
case Node.DOCUMENT_FRAGMENT_NODE:
|
|
@@ -2733,6 +2775,7 @@ function processNode (node, source) {
|
|
|
2733
2775
|
// the same way we observe real shadow DOM nodes (encapsulation provided by the browser).
|
|
2734
2776
|
dom[call](node, shadowRoot.host, { tag: "*P" /* Constant.PolyfillShadowDomTag */, attributes: {} }, source);
|
|
2735
2777
|
}
|
|
2778
|
+
checkDocumentStyles(node);
|
|
2736
2779
|
}
|
|
2737
2780
|
break;
|
|
2738
2781
|
case Node.TEXT_NODE:
|
|
@@ -2849,6 +2892,16 @@ function processNode (node, source) {
|
|
|
2849
2892
|
var linkData = { tag: tag, attributes: attributes };
|
|
2850
2893
|
dom[call](node, parent, linkData, source);
|
|
2851
2894
|
break;
|
|
2895
|
+
case "VIDEO":
|
|
2896
|
+
case "AUDIO":
|
|
2897
|
+
case "SOURCE":
|
|
2898
|
+
// Ignoring any base64 src attribute for media elements to prevent big unused tokens to be sent and shock the network
|
|
2899
|
+
if ("src" /* Constant.Src */ in attributes && attributes["src" /* Constant.Src */].startsWith("data:")) {
|
|
2900
|
+
delete attributes["src" /* Constant.Src */];
|
|
2901
|
+
}
|
|
2902
|
+
var mediaTag = { tag: tag, attributes: attributes };
|
|
2903
|
+
dom[call](node, parent, mediaTag, source);
|
|
2904
|
+
break;
|
|
2852
2905
|
default:
|
|
2853
2906
|
var data = { tag: tag, attributes: attributes };
|
|
2854
2907
|
if (element.shadowRoot) {
|
|
@@ -3058,7 +3111,7 @@ function handle$1(m) {
|
|
|
3058
3111
|
track$7(6 /* Event.Mutation */, now);
|
|
3059
3112
|
mutations.push({ time: now, mutations: m });
|
|
3060
3113
|
schedule$1(process$1, 1 /* Priority.High */).then(function () {
|
|
3061
|
-
setTimeout(compute$
|
|
3114
|
+
setTimeout(compute$8);
|
|
3062
3115
|
measure(compute$6)();
|
|
3063
3116
|
});
|
|
3064
3117
|
}
|
|
@@ -3069,7 +3122,7 @@ function process$1() {
|
|
|
3069
3122
|
switch (_b.label) {
|
|
3070
3123
|
case 0:
|
|
3071
3124
|
timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
|
|
3072
|
-
start$
|
|
3125
|
+
start$y(timer);
|
|
3073
3126
|
_b.label = 1;
|
|
3074
3127
|
case 1:
|
|
3075
3128
|
if (!(mutations.length > 0)) return [3 /*break*/, 8];
|
|
@@ -3125,7 +3178,7 @@ function process$1() {
|
|
|
3125
3178
|
_b.sent();
|
|
3126
3179
|
return [3 /*break*/, 1];
|
|
3127
3180
|
case 8:
|
|
3128
|
-
stop$
|
|
3181
|
+
stop$w(timer);
|
|
3129
3182
|
return [2 /*return*/];
|
|
3130
3183
|
}
|
|
3131
3184
|
});
|
|
@@ -3560,7 +3613,7 @@ function queue(tokens, transmit) {
|
|
|
3560
3613
|
// We enrich the data going out with the existing upload. In these cases, call to upload comes with 'transmit' set to false.
|
|
3561
3614
|
if (transmit && timeout === null) {
|
|
3562
3615
|
if (type !== 25 /* Event.Ping */) {
|
|
3563
|
-
reset$
|
|
3616
|
+
reset$q();
|
|
3564
3617
|
}
|
|
3565
3618
|
timeout = setTimeout(upload, gap);
|
|
3566
3619
|
queuedTime = now;
|
|
@@ -3596,7 +3649,8 @@ function upload(final) {
|
|
|
3596
3649
|
// Otherwise you run a risk of infinite loop.
|
|
3597
3650
|
compute$6();
|
|
3598
3651
|
compute$5();
|
|
3599
|
-
compute$
|
|
3652
|
+
compute$9();
|
|
3653
|
+
compute$7();
|
|
3600
3654
|
last = final === true;
|
|
3601
3655
|
e = JSON.stringify(envelope(last));
|
|
3602
3656
|
a = "[".concat(analysis.join(), "]");
|
|
@@ -4079,7 +4133,7 @@ function encode$1 (event) {
|
|
|
4079
4133
|
tokens.push(b.data.activityTime);
|
|
4080
4134
|
queue(tokens, false);
|
|
4081
4135
|
}
|
|
4082
|
-
reset$
|
|
4136
|
+
reset$s();
|
|
4083
4137
|
break;
|
|
4084
4138
|
case 25 /* Event.Ping */:
|
|
4085
4139
|
tokens.push(data$h.gap);
|
|
@@ -4113,7 +4167,7 @@ function encode$1 (event) {
|
|
|
4113
4167
|
tokens.push(v);
|
|
4114
4168
|
tokens.push(data$e[v]);
|
|
4115
4169
|
}
|
|
4116
|
-
reset$
|
|
4170
|
+
reset$o();
|
|
4117
4171
|
queue(tokens, false);
|
|
4118
4172
|
}
|
|
4119
4173
|
break;
|
|
@@ -4128,7 +4182,7 @@ function encode$1 (event) {
|
|
|
4128
4182
|
// However, for data over the wire, we round it off to milliseconds precision.
|
|
4129
4183
|
tokens.push(Math.round(updates$3[m]));
|
|
4130
4184
|
}
|
|
4131
|
-
reset$
|
|
4185
|
+
reset$r();
|
|
4132
4186
|
queue(tokens, false);
|
|
4133
4187
|
}
|
|
4134
4188
|
break;
|
|
@@ -4154,7 +4208,7 @@ function encode$1 (event) {
|
|
|
4154
4208
|
tokens.push(key);
|
|
4155
4209
|
tokens.push([].concat.apply([], data$g[e]));
|
|
4156
4210
|
}
|
|
4157
|
-
reset$
|
|
4211
|
+
reset$p();
|
|
4158
4212
|
queue(tokens, false);
|
|
4159
4213
|
}
|
|
4160
4214
|
break;
|
|
@@ -4341,8 +4395,9 @@ function id() {
|
|
|
4341
4395
|
function consent(status) {
|
|
4342
4396
|
if (status === void 0) { status = true; }
|
|
4343
4397
|
if (!status) {
|
|
4344
|
-
|
|
4345
|
-
setCookie("
|
|
4398
|
+
config$1.track = false;
|
|
4399
|
+
setCookie("_clsk" /* Constant.SessionKey */, "" /* Constant.Empty */, -Number.MAX_VALUE);
|
|
4400
|
+
setCookie("_clck" /* Constant.CookieKey */, "" /* Constant.Empty */, -Number.MAX_VALUE);
|
|
4346
4401
|
stop();
|
|
4347
4402
|
window.setTimeout(start, 250 /* Setting.RestartDelay */);
|
|
4348
4403
|
return;
|
|
@@ -4513,7 +4568,9 @@ function encodeCookieValue(value) {
|
|
|
4513
4568
|
return encodeURIComponent(value);
|
|
4514
4569
|
}
|
|
4515
4570
|
function setCookie(key, value, time) {
|
|
4516
|
-
if
|
|
4571
|
+
// only write cookies if we are currently in a cookie writing mode (and they are supported)
|
|
4572
|
+
// OR if we are trying to write an empty cookie (i.e. clear the cookie value out)
|
|
4573
|
+
if ((config$1.track || value == "" /* Constant.Empty */) && ((navigator && navigator.cookieEnabled) || supported(document, "cookie" /* Constant.Cookie */))) {
|
|
4517
4574
|
// Some browsers automatically url encode cookie values if they are not url encoded.
|
|
4518
4575
|
// We therefore encode and decode cookie values ourselves.
|
|
4519
4576
|
var encodedValue = encodeCookieValue(value);
|
|
@@ -4723,8 +4780,8 @@ function stop$6() {
|
|
|
4723
4780
|
var status = false;
|
|
4724
4781
|
function start$6() {
|
|
4725
4782
|
status = true;
|
|
4726
|
-
start$
|
|
4727
|
-
reset$
|
|
4783
|
+
start$I();
|
|
4784
|
+
reset$l();
|
|
4728
4785
|
reset$1();
|
|
4729
4786
|
reset$2();
|
|
4730
4787
|
start$7();
|
|
@@ -4733,8 +4790,8 @@ function stop$5() {
|
|
|
4733
4790
|
stop$6();
|
|
4734
4791
|
reset$2();
|
|
4735
4792
|
reset$1();
|
|
4736
|
-
reset$
|
|
4737
|
-
stop$
|
|
4793
|
+
reset$l();
|
|
4794
|
+
stop$F();
|
|
4738
4795
|
status = false;
|
|
4739
4796
|
}
|
|
4740
4797
|
function active() {
|
|
@@ -4788,7 +4845,7 @@ function restart() {
|
|
|
4788
4845
|
}
|
|
4789
4846
|
|
|
4790
4847
|
function start$5() {
|
|
4791
|
-
start$
|
|
4848
|
+
start$A();
|
|
4792
4849
|
start$e();
|
|
4793
4850
|
start$d();
|
|
4794
4851
|
}
|
|
@@ -4804,7 +4861,7 @@ var diagnostic = /*#__PURE__*/Object.freeze({
|
|
|
4804
4861
|
|
|
4805
4862
|
function start$4() {
|
|
4806
4863
|
schedule$1(discover, 1 /* Priority.High */).then(function () {
|
|
4807
|
-
measure(compute$
|
|
4864
|
+
measure(compute$8)();
|
|
4808
4865
|
measure(compute$6)();
|
|
4809
4866
|
});
|
|
4810
4867
|
}
|
|
@@ -4816,14 +4873,15 @@ function discover() {
|
|
|
4816
4873
|
case 0:
|
|
4817
4874
|
ts = time();
|
|
4818
4875
|
timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
|
|
4819
|
-
start$
|
|
4876
|
+
start$y(timer);
|
|
4820
4877
|
return [4 /*yield*/, traverse(document, timer, 0 /* Source.Discover */)];
|
|
4821
4878
|
case 1:
|
|
4822
4879
|
_a.sent();
|
|
4880
|
+
checkDocumentStyles(document);
|
|
4823
4881
|
return [4 /*yield*/, encode$4(5 /* Event.Discover */, timer, ts)];
|
|
4824
4882
|
case 2:
|
|
4825
4883
|
_a.sent();
|
|
4826
|
-
stop$
|
|
4884
|
+
stop$w(timer);
|
|
4827
4885
|
return [2 /*return*/];
|
|
4828
4886
|
}
|
|
4829
4887
|
});
|
|
@@ -4833,17 +4891,19 @@ function discover() {
|
|
|
4833
4891
|
function start$3() {
|
|
4834
4892
|
// The order below is important
|
|
4835
4893
|
// and is determined by interdependencies of modules
|
|
4836
|
-
start$
|
|
4894
|
+
start$x();
|
|
4837
4895
|
start$u();
|
|
4838
|
-
start$
|
|
4896
|
+
start$z();
|
|
4839
4897
|
start$h();
|
|
4840
4898
|
start$4();
|
|
4899
|
+
start$w();
|
|
4841
4900
|
start$v();
|
|
4842
4901
|
}
|
|
4843
4902
|
function stop$3() {
|
|
4844
4903
|
stop$s();
|
|
4845
|
-
stop$
|
|
4904
|
+
stop$x();
|
|
4846
4905
|
stop$f();
|
|
4906
|
+
stop$v();
|
|
4847
4907
|
stop$u();
|
|
4848
4908
|
stop$t();
|
|
4849
4909
|
}
|
|
@@ -5039,7 +5099,7 @@ function start(config$1) {
|
|
|
5039
5099
|
if (check()) {
|
|
5040
5100
|
config(config$1);
|
|
5041
5101
|
start$6();
|
|
5042
|
-
start$
|
|
5102
|
+
start$B();
|
|
5043
5103
|
modules.forEach(function (x) { return measure(x.start)(); });
|
|
5044
5104
|
// If it's an internal call to start, without explicit configuration,
|
|
5045
5105
|
// re-process any newly accumulated items in the queue
|
|
@@ -5070,7 +5130,7 @@ function stop() {
|
|
|
5070
5130
|
if (active()) {
|
|
5071
5131
|
// Stop modules in the reverse order of their initialization and start queuing up items again
|
|
5072
5132
|
modules.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
|
|
5073
|
-
stop$
|
|
5133
|
+
stop$y();
|
|
5074
5134
|
stop$5();
|
|
5075
5135
|
setup();
|
|
5076
5136
|
}
|