clarity-js 0.6.31 → 0.6.32
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.js +55 -55
- package/build/clarity.min.js +1 -1
- package/build/clarity.module.js +55 -55
- package/package.json +1 -1
- package/src/core/api.ts +8 -0
- package/src/core/event.ts +4 -3
- package/src/core/version.ts +1 -1
- package/src/data/upload.ts +11 -8
- package/src/diagnostic/internal.ts +1 -15
- package/src/layout/mutation.ts +10 -9
- package/types/core.d.ts +7 -0
- package/types/data.d.ts +3 -0
- package/types/layout.d.ts +0 -2
package/build/clarity.js
CHANGED
|
@@ -67,6 +67,13 @@ var config$1 = {
|
|
|
67
67
|
upgrade: null
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
+
function api(method) {
|
|
71
|
+
// Zone.js, a popular package for Angular, overrides native browser APIs which can lead to inconsistent state for single page applications.
|
|
72
|
+
// Example issue: https://github.com/angular/angular/issues/31712
|
|
73
|
+
// As a work around, we ensuring Clarity access APIs outside of Zone (and use native implementation instead)
|
|
74
|
+
return window["Zone" /* Zone */] && "__symbol__" /* Symbol */ in window["Zone" /* Zone */] ? window["Zone" /* Zone */]["__symbol__" /* Symbol */](method) : method;
|
|
75
|
+
}
|
|
76
|
+
|
|
70
77
|
var startTime = 0;
|
|
71
78
|
function start$E() {
|
|
72
79
|
startTime = performance.now();
|
|
@@ -80,7 +87,7 @@ function stop$B() {
|
|
|
80
87
|
startTime = 0;
|
|
81
88
|
}
|
|
82
89
|
|
|
83
|
-
var version$1 = "0.6.
|
|
90
|
+
var version$1 = "0.6.32";
|
|
84
91
|
|
|
85
92
|
// tslint:disable: no-bitwise
|
|
86
93
|
function hash (input) {
|
|
@@ -614,7 +621,7 @@ function mangleText(value) {
|
|
|
614
621
|
var index = value.indexOf(first);
|
|
615
622
|
var prefix = value.substr(0, index);
|
|
616
623
|
var suffix = value.substr(index + trimmed.length);
|
|
617
|
-
return ""
|
|
624
|
+
return "".concat(prefix).concat(trimmed.length.toString(36)).concat(suffix);
|
|
618
625
|
}
|
|
619
626
|
return value;
|
|
620
627
|
}
|
|
@@ -807,7 +814,7 @@ function suspend$1(timer) {
|
|
|
807
814
|
});
|
|
808
815
|
}
|
|
809
816
|
function key(timer) {
|
|
810
|
-
return timer.id
|
|
817
|
+
return "".concat(timer.id, ".").concat(timer.cost);
|
|
811
818
|
}
|
|
812
819
|
function wait() {
|
|
813
820
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1032,7 +1039,7 @@ function encode$4 (type, timer, ts) {
|
|
|
1032
1039
|
}
|
|
1033
1040
|
tokens.push(suspend ? "*M" /* SuspendMutationTag */ : data[key]);
|
|
1034
1041
|
if (size && size.length === 2) {
|
|
1035
|
-
tokens.push(""
|
|
1042
|
+
tokens.push("".concat("#" /* Box */).concat(str$1(size[0]), ".").concat(str$1(size[1])));
|
|
1036
1043
|
}
|
|
1037
1044
|
break;
|
|
1038
1045
|
case "attributes":
|
|
@@ -1072,7 +1079,7 @@ function str$1(input) {
|
|
|
1072
1079
|
return input.toString(36);
|
|
1073
1080
|
}
|
|
1074
1081
|
function attribute(key, value, privacy) {
|
|
1075
|
-
return key
|
|
1082
|
+
return "".concat(key, "=").concat(scrub(value, key, privacy));
|
|
1076
1083
|
}
|
|
1077
1084
|
|
|
1078
1085
|
var data$b = [];
|
|
@@ -1225,13 +1232,12 @@ var history$3 = {};
|
|
|
1225
1232
|
var data$9;
|
|
1226
1233
|
function start$s() {
|
|
1227
1234
|
history$3 = {};
|
|
1228
|
-
bind(document, "securitypolicyviolation", csp);
|
|
1229
1235
|
}
|
|
1230
1236
|
function log$1(code, severity, name, message, stack) {
|
|
1231
1237
|
if (name === void 0) { name = null; }
|
|
1232
1238
|
if (message === void 0) { message = null; }
|
|
1233
1239
|
if (stack === void 0) { stack = null; }
|
|
1234
|
-
var key = name ? name
|
|
1240
|
+
var key = name ? "".concat(name, "|").concat(message) : "";
|
|
1235
1241
|
// While rare, it's possible for code to fail repeatedly during the lifetime of the same page
|
|
1236
1242
|
// In those cases, we only want to log the failure once and not spam logs with redundant information.
|
|
1237
1243
|
if (code in history$3 && history$3[code].indexOf(key) >= 0) {
|
|
@@ -1247,16 +1253,6 @@ function log$1(code, severity, name, message, stack) {
|
|
|
1247
1253
|
}
|
|
1248
1254
|
encode$3(33 /* Log */);
|
|
1249
1255
|
}
|
|
1250
|
-
function csp(e) {
|
|
1251
|
-
var upload = config$1.upload;
|
|
1252
|
-
// Look for first "/" starting after initial "https://" string
|
|
1253
|
-
var parts = upload && typeof upload === "string" /* String */ ? upload.substr(0, upload.indexOf("/", "https://" /* HTTPS */.length)).split("." /* Dot */) : [];
|
|
1254
|
-
var domain = parts.length >= 2 ? parts.splice(-2).join("." /* Dot */) : null;
|
|
1255
|
-
// Capture content security policy violation only if disposition value is not explicitly set to "report"
|
|
1256
|
-
if (domain && e.blockedURI && e.blockedURI.indexOf(domain) >= 0 && e["disposition"] !== "report" /* Report */) {
|
|
1257
|
-
log$1(7 /* ContentSecurityPolicy */, 1 /* Warning */, e.blockedURI);
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
1256
|
function stop$r() {
|
|
1261
1257
|
history$3 = {};
|
|
1262
1258
|
}
|
|
@@ -1295,7 +1291,7 @@ function metrics(root, value) {
|
|
|
1295
1291
|
root.querySelectorAll(match).forEach(function (e) { max(metricId, num$2(e.innerText, scale)); });
|
|
1296
1292
|
break;
|
|
1297
1293
|
case 2 /* Attribute */:
|
|
1298
|
-
root.querySelectorAll("["
|
|
1294
|
+
root.querySelectorAll("[".concat(match, "]")).forEach(function (e) { max(metricId, num$2(e.getAttribute(match), scale, false)); });
|
|
1299
1295
|
break;
|
|
1300
1296
|
case 1 /* Javascript */:
|
|
1301
1297
|
max(metricId, evaluate(match, "number" /* Number */));
|
|
@@ -1317,7 +1313,7 @@ function dimensions(root, value) {
|
|
|
1317
1313
|
root.querySelectorAll(match).forEach(function (e) { log(dimensionId, str(e.innerText)); });
|
|
1318
1314
|
break;
|
|
1319
1315
|
case 2 /* Attribute */:
|
|
1320
|
-
root.querySelectorAll("["
|
|
1316
|
+
root.querySelectorAll("[".concat(match, "]")).forEach(function (e) { log(dimensionId, str(e.getAttribute(match))); });
|
|
1321
1317
|
break;
|
|
1322
1318
|
case 1 /* Javascript */:
|
|
1323
1319
|
log(dimensionId, str(evaluate(match, "string" /* String */)));
|
|
@@ -1384,7 +1380,7 @@ function selector (input, beta) {
|
|
|
1384
1380
|
if (beta === void 0) { beta = false; }
|
|
1385
1381
|
var a = input.attributes;
|
|
1386
1382
|
var prefix = input.prefix ? input.prefix[beta ? 1 /* Beta */ : 0 /* Stable */] : null;
|
|
1387
|
-
var suffix = beta || ((a && !("class" /* Class */ in a)) || TAGS.indexOf(input.tag) >= 0) ? ":nth-of-type("
|
|
1383
|
+
var suffix = beta || ((a && !("class" /* Class */ in a)) || TAGS.indexOf(input.tag) >= 0) ? ":nth-of-type(".concat(input.position, ")") : "" /* Empty */;
|
|
1388
1384
|
switch (input.tag) {
|
|
1389
1385
|
case "STYLE":
|
|
1390
1386
|
case "TITLE":
|
|
@@ -1399,9 +1395,9 @@ function selector (input, beta) {
|
|
|
1399
1395
|
if (prefix === null) {
|
|
1400
1396
|
return "" /* Empty */;
|
|
1401
1397
|
}
|
|
1402
|
-
prefix = prefix
|
|
1398
|
+
prefix = "".concat(prefix, ">");
|
|
1403
1399
|
input.tag = input.tag.indexOf("svg:" /* SvgPrefix */) === 0 ? input.tag.substr("svg:" /* SvgPrefix */.length) : input.tag;
|
|
1404
|
-
var selector = ""
|
|
1400
|
+
var selector = "".concat(prefix).concat(input.tag).concat(suffix);
|
|
1405
1401
|
var classes = "class" /* Class */ in a && a["class" /* Class */].length > 0 ? a["class" /* Class */].trim().split(/\s+/) : null;
|
|
1406
1402
|
if (beta) {
|
|
1407
1403
|
// In beta mode, update selector to use "id" field when available. There are two exceptions:
|
|
@@ -1409,19 +1405,19 @@ function selector (input, beta) {
|
|
|
1409
1405
|
// (2) if "id" appears inside a shadow DOM, in which case we continue to prefix up to shadow DOM to prevent conflicts
|
|
1410
1406
|
var id = "id" /* Id */ in a && a["id" /* Id */].length > 0 ? a["id" /* Id */] : null;
|
|
1411
1407
|
classes = input.tag !== "BODY" /* BodyTag */ && classes ? classes.filter(function (c) { return !hasDigits(c); }) : [];
|
|
1412
|
-
selector = classes.length > 0 ? ""
|
|
1413
|
-
selector = id && hasDigits(id) === false ? getDomPrefix(prefix)
|
|
1408
|
+
selector = classes.length > 0 ? "".concat(prefix).concat(input.tag, ".").concat(classes.join(".")).concat(suffix) : selector;
|
|
1409
|
+
selector = id && hasDigits(id) === false ? "".concat(getDomPrefix(prefix), "#").concat(id) : selector;
|
|
1414
1410
|
}
|
|
1415
1411
|
else {
|
|
1416
1412
|
// Otherwise, fallback to stable mode, where we include class names as part of the selector
|
|
1417
|
-
selector = classes ? ""
|
|
1413
|
+
selector = classes ? "".concat(prefix).concat(input.tag, ".").concat(classes.join(".")).concat(suffix) : selector;
|
|
1418
1414
|
}
|
|
1419
1415
|
return selector;
|
|
1420
1416
|
}
|
|
1421
1417
|
}
|
|
1422
1418
|
function getDomPrefix(prefix) {
|
|
1423
1419
|
var shadowDomStart = prefix.lastIndexOf("*S" /* ShadowDomTag */);
|
|
1424
|
-
var iframeDomStart = prefix.lastIndexOf(""
|
|
1420
|
+
var iframeDomStart = prefix.lastIndexOf("".concat("iframe:" /* IFramePrefix */).concat("HTML" /* HTML */));
|
|
1425
1421
|
var domStart = Math.max(shadowDomStart, iframeDomStart);
|
|
1426
1422
|
if (domStart < 0) {
|
|
1427
1423
|
return "";
|
|
@@ -2864,11 +2860,8 @@ function observe$1(node) {
|
|
|
2864
2860
|
// For this reason, we need to wire up mutations every time we see a new shadow dom.
|
|
2865
2861
|
// Also, wrap it inside a try / catch. In certain browsers (e.g. legacy Edge), observer on shadow dom can throw errors
|
|
2866
2862
|
try {
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
// As a temporary work around, ensuring Clarity can invoke MutationObserver outside of Zone (and use native implementation instead)
|
|
2870
|
-
var api = window["Zone" /* Zone */] && "__symbol__" /* Symbol */ in window["Zone" /* Zone */] ? window["Zone" /* Zone */]["__symbol__" /* Symbol */]("MutationObserver" /* MutationObserver */) : "MutationObserver" /* MutationObserver */;
|
|
2871
|
-
var observer = api in window ? new window[api](measure(handle$1)) : null;
|
|
2863
|
+
var m = api("MutationObserver" /* MutationObserver */);
|
|
2864
|
+
var observer = m in window ? new window[m](measure(handle$1)) : null;
|
|
2872
2865
|
if (observer) {
|
|
2873
2866
|
observer.observe(node, { attributes: true, childList: true, characterData: true, subtree: true });
|
|
2874
2867
|
observers.push(observer);
|
|
@@ -3089,12 +3082,15 @@ function schedule(node) {
|
|
|
3089
3082
|
function trigger$1() {
|
|
3090
3083
|
for (var _i = 0, queue_1 = queue$1; _i < queue_1.length; _i++) {
|
|
3091
3084
|
var node = queue_1[_i];
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3085
|
+
// Generate a mutation for this node only if it still exists
|
|
3086
|
+
if (node) {
|
|
3087
|
+
var shadowRoot = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
3088
|
+
// Skip re-processing shadowRoot if it was already discovered
|
|
3089
|
+
if (shadowRoot && has(node)) {
|
|
3090
|
+
continue;
|
|
3091
|
+
}
|
|
3092
|
+
generate(node, shadowRoot ? "childList" /* ChildList */ : "characterData" /* CharacterData */);
|
|
3096
3093
|
}
|
|
3097
|
-
generate(node, shadowRoot ? "childList" /* ChildList */ : "characterData" /* CharacterData */);
|
|
3098
3094
|
}
|
|
3099
3095
|
queue$1 = [];
|
|
3100
3096
|
}
|
|
@@ -3446,8 +3442,8 @@ function upload(final) {
|
|
|
3446
3442
|
compute$8();
|
|
3447
3443
|
last = final === true;
|
|
3448
3444
|
e = JSON.stringify(envelope(last));
|
|
3449
|
-
a = "["
|
|
3450
|
-
p = sendPlaybackBytes ? "["
|
|
3445
|
+
a = "[".concat(analysis.join(), "]");
|
|
3446
|
+
p = sendPlaybackBytes ? "[".concat(playback.join(), "]") : "" /* Empty */;
|
|
3451
3447
|
encoded = { e: e, a: a, p: p };
|
|
3452
3448
|
payload = stringify(encoded);
|
|
3453
3449
|
if (!last) return [3 /*break*/, 1];
|
|
@@ -3474,7 +3470,7 @@ function upload(final) {
|
|
|
3474
3470
|
});
|
|
3475
3471
|
}
|
|
3476
3472
|
function stringify(encoded) {
|
|
3477
|
-
return encoded.p.length > 0 ? "{\"e\":"
|
|
3473
|
+
return encoded.p.length > 0 ? "{\"e\":".concat(encoded.e, ",\"a\":").concat(encoded.a, ",\"p\":").concat(encoded.p, "}") : "{\"e\":".concat(encoded.e, ",\"a\":").concat(encoded.a, "}");
|
|
3478
3474
|
}
|
|
3479
3475
|
function send(payload, zipped, sequence, beacon) {
|
|
3480
3476
|
if (beacon === void 0) { beacon = false; }
|
|
@@ -3487,10 +3483,14 @@ function send(payload, zipped, sequence, beacon) {
|
|
|
3487
3483
|
// However, we don't want to rely on it for every payload, since we have no ability to retry if the upload failed.
|
|
3488
3484
|
// Also, in case of sendBeacon, we do not have a way to alter HTTP headers and therefore can't send compressed payload
|
|
3489
3485
|
if (beacon && "sendBeacon" in navigator) {
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3486
|
+
try {
|
|
3487
|
+
// Navigator needs to be bound to sendBeacon before it is used to avoid errors in some browsers
|
|
3488
|
+
dispatched = navigator.sendBeacon.bind(navigator)(url, payload);
|
|
3489
|
+
if (dispatched) {
|
|
3490
|
+
done(sequence);
|
|
3491
|
+
}
|
|
3493
3492
|
}
|
|
3493
|
+
catch ( /* do nothing - and we will automatically fallback to XHR below */_a) { /* do nothing - and we will automatically fallback to XHR below */ }
|
|
3494
3494
|
}
|
|
3495
3495
|
// Before initiating XHR upload, we check if the data has already been uploaded using sendBeacon
|
|
3496
3496
|
// There are two cases when dispatched could still be false:
|
|
@@ -3534,7 +3534,7 @@ function check$3(xhr, sequence) {
|
|
|
3534
3534
|
if (xhr && xhr.readyState === 4 /* Done */ && transitData) {
|
|
3535
3535
|
// Attempt send payload again (as configured in settings) if we do not receive a success (2XX) response code back from the server
|
|
3536
3536
|
if ((xhr.status < 200 || xhr.status > 208) && transitData.attempts <= 1 /* RetryLimit */) {
|
|
3537
|
-
// We re-attempt in all cases except when server explicitly rejects our request with 4XX error
|
|
3537
|
+
// We re-attempt in all cases except when server explicitly rejects our request with 4XX error
|
|
3538
3538
|
if (xhr.status >= 400 && xhr.status < 500) {
|
|
3539
3539
|
// In case of a 4XX response from the server, we bail out instead of trying again
|
|
3540
3540
|
trigger(6 /* Server */);
|
|
@@ -3588,7 +3588,7 @@ function done(sequence) {
|
|
|
3588
3588
|
}
|
|
3589
3589
|
function delay() {
|
|
3590
3590
|
// Progressively increase delay as we continue to send more payloads from the client to the server
|
|
3591
|
-
// If we are not uploading data to a server, and instead invoking UploadCallback, in that case keep returning configured value
|
|
3591
|
+
// If we are not uploading data to a server, and instead invoking UploadCallback, in that case keep returning configured value
|
|
3592
3592
|
var gap = config$1.lean === false && discoverBytes > 0 ? 100 /* MinUploadDelay */ : data$1.sequence * config$1.delay;
|
|
3593
3593
|
return typeof config$1.upload === "string" /* String */ ? Math.max(Math.min(gap, 30000 /* MaxUploadDelay */), 100 /* MinUploadDelay */) : config$1.delay;
|
|
3594
3594
|
}
|
|
@@ -3750,7 +3750,7 @@ function log(dimension, value) {
|
|
|
3750
3750
|
// Check valid value before moving ahead
|
|
3751
3751
|
if (value) {
|
|
3752
3752
|
// Ensure received value is casted into a string if it wasn't a string to begin with
|
|
3753
|
-
value = ""
|
|
3753
|
+
value = "".concat(value);
|
|
3754
3754
|
if (!(dimension in data$3)) {
|
|
3755
3755
|
data$3[dimension] = [];
|
|
3756
3756
|
}
|
|
@@ -3931,7 +3931,7 @@ function session() {
|
|
|
3931
3931
|
output.session = parts[0];
|
|
3932
3932
|
output.count = num(parts[2]) + 1;
|
|
3933
3933
|
output.upgrade = num(parts[3]);
|
|
3934
|
-
output.upload = parts.length >= 6 ? ""
|
|
3934
|
+
output.upload = parts.length >= 6 ? "".concat("https://" /* HTTPS */).concat(parts[5], "/").concat(parts[4]) : "".concat("https://" /* HTTPS */).concat(parts[4]);
|
|
3935
3935
|
}
|
|
3936
3936
|
}
|
|
3937
3937
|
return output;
|
|
@@ -3956,11 +3956,11 @@ function user() {
|
|
|
3956
3956
|
// Check if we either got version-less cookie value or saw multiple copies of the user cookie crumbs
|
|
3957
3957
|
// In both these cases, we go ahead and delete the existing cookie set on current domain
|
|
3958
3958
|
if (parts.length === 1 || count > 1) {
|
|
3959
|
-
var deleted = ""
|
|
3959
|
+
var deleted = "".concat(";" /* Semicolon */).concat("expires=" /* Expires */).concat((new Date(0)).toUTCString()).concat(";path=/" /* Path */);
|
|
3960
3960
|
// First, delete current user cookie which might be set on current sub-domain vs. root domain
|
|
3961
|
-
document.cookie = "_clck" /* CookieKey
|
|
3961
|
+
document.cookie = "".concat("_clck" /* CookieKey */, "=").concat(deleted);
|
|
3962
3962
|
// Second, same thing for current session cookie so it can be re-written later with the root domain
|
|
3963
|
-
document.cookie = "_clsk" /* SessionKey
|
|
3963
|
+
document.cookie = "".concat("_clsk" /* SessionKey */, "=").concat(deleted);
|
|
3964
3964
|
}
|
|
3965
3965
|
// End code for backward compatibility
|
|
3966
3966
|
// Read version information and timestamp from cookie, if available
|
|
@@ -3997,19 +3997,19 @@ function setCookie(key, value, time) {
|
|
|
3997
3997
|
var expiry = new Date();
|
|
3998
3998
|
expiry.setDate(expiry.getDate() + time);
|
|
3999
3999
|
var expires = expiry ? "expires=" /* Expires */ + expiry.toUTCString() : "" /* Empty */;
|
|
4000
|
-
var cookie = key
|
|
4000
|
+
var cookie = "".concat(key, "=").concat(value).concat(";" /* Semicolon */).concat(expires).concat(";path=/" /* Path */);
|
|
4001
4001
|
try {
|
|
4002
4002
|
// Attempt to get the root domain only once and fall back to writing cookie on the current domain.
|
|
4003
4003
|
if (rootDomain === null) {
|
|
4004
4004
|
var hostname = location.hostname ? location.hostname.split("." /* Dot */) : [];
|
|
4005
4005
|
// Walk backwards on a domain and attempt to set a cookie, until successful
|
|
4006
4006
|
for (var i = hostname.length - 1; i >= 0; i--) {
|
|
4007
|
-
rootDomain = "."
|
|
4007
|
+
rootDomain = ".".concat(hostname[i]).concat(rootDomain ? rootDomain : "" /* Empty */);
|
|
4008
4008
|
// We do not wish to attempt writing a cookie on the absolute last part of the domain, e.g. .com or .net.
|
|
4009
4009
|
// So we start attempting after second-last part, e.g. .domain.com (PASS) or .co.uk (FAIL)
|
|
4010
4010
|
if (i < hostname.length - 1) {
|
|
4011
4011
|
// Write the cookie on the current computed top level domain
|
|
4012
|
-
document.cookie = ""
|
|
4012
|
+
document.cookie = "".concat(cookie).concat(";" /* Semicolon */).concat("domain=" /* Domain */).concat(rootDomain);
|
|
4013
4013
|
// Once written, check if the cookie exists and its value matches exactly with what we intended to set
|
|
4014
4014
|
// Checking for exact value match helps us eliminate a corner case where the cookie may already be present with a different value
|
|
4015
4015
|
// If the check is successful, no more action is required and we can return from the function since rootDomain cookie is already set
|
|
@@ -4027,7 +4027,7 @@ function setCookie(key, value, time) {
|
|
|
4027
4027
|
catch (_a) {
|
|
4028
4028
|
rootDomain = "" /* Empty */;
|
|
4029
4029
|
}
|
|
4030
|
-
document.cookie = rootDomain ? ""
|
|
4030
|
+
document.cookie = rootDomain ? "".concat(cookie).concat(";" /* Semicolon */).concat("domain=" /* Domain */).concat(rootDomain) : cookie;
|
|
4031
4031
|
}
|
|
4032
4032
|
}
|
|
4033
4033
|
|
|
@@ -4123,7 +4123,7 @@ function bind(target, event, listener, capture) {
|
|
|
4123
4123
|
// Wrapping following lines inside try / catch to cover edge cases where we might try to access an inaccessible element.
|
|
4124
4124
|
// E.g. Iframe may start off as same-origin but later turn into cross-origin, and the following lines will throw an exception.
|
|
4125
4125
|
try {
|
|
4126
|
-
target
|
|
4126
|
+
target[api("addEventListener" /* AddEventListener */)](event, listener, capture);
|
|
4127
4127
|
bindings.push({ event: event, target: target, listener: listener, capture: capture });
|
|
4128
4128
|
}
|
|
4129
4129
|
catch ( /* do nothing */_a) { /* do nothing */ }
|
|
@@ -4134,7 +4134,7 @@ function reset$1() {
|
|
|
4134
4134
|
var binding = bindings_1[_i];
|
|
4135
4135
|
// Wrapping inside try / catch to avoid situations where the element may be destroyed before we get a chance to unbind
|
|
4136
4136
|
try {
|
|
4137
|
-
binding.target
|
|
4137
|
+
binding.target[api("removeEventListener" /* RemoveEventListener */)](binding.event, binding.listener, binding.capture);
|
|
4138
4138
|
}
|
|
4139
4139
|
catch ( /* do nothing */_a) { /* do nothing */ }
|
|
4140
4140
|
}
|
package/build/clarity.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var t=Object.freeze({__proto__:null,get track(){return kr},get start(){return _r},get queue(){return Tr},get stop(){return xr}}),e=Object.freeze({__proto__:null,get data(){return Er},get start(){return Rr},get check(){return Ar},get trigger(){return Lr},get compute(){return Yr},get stop(){return Hr}}),n=Object.freeze({__proto__:null,get data(){return qr},get updates(){return Xr},get start(){return Wr},get stop(){return Ur},get log(){return Pr},get compute(){return Br},get reset(){return Fr}}),r=Object.freeze({__proto__:null,get data(){return Vr},get callback(){return Gr},get start(){return Zr},get userAgentData(){return Kr},get stop(){return Qr},get metadata(){return $r},get id(){return ta},get consent(){return ea},get clear(){return na},get save(){return ra}}),a=Object.freeze({__proto__:null,get data(){return fa},get start(){return ha},get stop(){return pa},get envelope(){return va}}),i={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,mask:[],unmask:[],regions:[],metrics:[],dimensions:[],cookies:[],report:null,upload:null,fallback:null,upgrade:null},o=0;function u(t){return void 0===t&&(t=null),t=t||performance.now(),Math.max(Math.round(t-o),0)}var s="0.6.31";function l(t){for(var e=5381,n=e,r=0;r<t.length;r+=2){if(e=(e<<5)+e^t.charCodeAt(r),r+1<t.length)n=(n<<5)+n^t.charCodeAt(r+1)}return Math.abs(e+11579*n).toString(36)}var c=null,d=null,f=!1;function h(){f&&(c={time:u(),event:4,data:{visible:d.visible,docWidth:d.docWidth,docHeight:d.docHeight,screenWidth:d.screenWidth,screenHeight:d.screenHeight,scrollX:d.scrollX,scrollY:d.scrollY,pointerX:d.pointerX,pointerY:d.pointerY,activityTime:d.activityTime}}),d=d||{visible:1,docWidth:0,docHeight:0,screenWidth:0,screenHeight:0,scrollX:0,scrollY:0,pointerX:0,pointerY:0,activityTime:0}}function p(t,e,n){switch(t){case 8:d.docWidth=e,d.docHeight=n;break;case 11:d.screenWidth=e,d.screenHeight=n;break;case 10:d.scrollX=e,d.scrollY=n;break;default:d.pointerX=e,d.pointerY=n}f=!0}function v(t){d.activityTime=t}function g(t,e){d.visible="visible"===e?1:0,d.visible||v(t),f=!0}function m(){f&&zr(4)}var b=Object.freeze({__proto__:null,get state(){return c},start:function(){f=!1,h()},reset:h,track:p,activity:v,visibility:g,compute:m,stop:function(){h()}}),y=null;function w(t,e){Ca()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(y={key:t,value:e},zr(24))}var k,E=null,S=null;function M(t,e){void 0===e&&(e=1),t in E||(E[t]=0),t in S||(S[t]=0),E[t]+=e,S[t]+=e}function O(t,e){null!==e&&(t in E||(E[t]=0),t in S||(S[t]=0),E[t]+=e,S[t]+=e)}function N(t,e){null!==e&&!1===isNaN(e)&&(t in E||(E[t]=0),(e>E[t]||0===E[t])&&(S[t]=e,E[t]=e))}function _(t,e,n){return window.setTimeout(ba(t),e,n)}function T(t){return window.clearTimeout(t)}var x=0,I=0,D=null;function C(){D&&T(D),D=_(j,I),x=u()}function j(){var t=u();k={gap:t-x},zr(25),k.gap<3e5?D=_(j,I):xa&&(w("clarity","suspend"),Fa(),["mousemove","touchstart"].forEach((function(t){return wa(document,t,za)})),["resize","scroll","pageshow"].forEach((function(t){return wa(window,t,za)})))}var z=Object.freeze({__proto__:null,get data(){return k},start:function(){I=6e4,x=0},reset:C,stop:function(){T(D),x=0,I=0}}),R=null;function A(t,e){if(t in R){var n=R[t],r=n[n.length-1];e-r[0]>100?R[t].push([e,0]):r[1]=e-r[0]}else R[t]=[[e,0]]}function L(){zr(36)}function Y(){R={}}var H=Object.freeze({__proto__:null,get data(){return R},start:function(){R={}},stop:function(){R={}},track:A,compute:L,reset:Y}),q=null;function X(t){Ca()&&i.lean&&(i.lean=!1,q={key:t},ra(),i.upgrade&&i.upgrade(t),zr(3))}var W=Object.freeze({__proto__:null,get data(){return q},start:function(){!i.lean&&i.upgrade&&i.upgrade("Config"),q=null},upgrade:X,stop:function(){q=null}}),U=null;function P(t,e){F(t,"string"==typeof e?[e]:e)}function B(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),F("userId",[t]),F("sessionId",[e]),F("pageId",[n])}function F(t,e){if(Ca()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in U?U[t]:[]),r=0;r<e.length;r++)"string"==typeof e[r]&&e[r].length<255&&n.push(e[r]);U[t]=n}}function V(){zr(34)}function G(){U={}}function J(t,e,n,r){return new(n||(n=Promise))((function(a,i){function o(t){try{s(r.next(t))}catch(t){i(t)}}function u(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}s((r=r.apply(t,e||[])).next())}))}function Z(t,e){var n,r,a,i,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]<a[3])){o.label=i[1];break}if(6===i[0]&&o.label<a[1]){o.label=a[1],a=i;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(i);break}a[2]&&o.ops.pop(),o.trys.pop();continue}i=e.call(t,o)}catch(t){i=[6,t],r=0}finally{n=a=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var K="CompressionStream"in window;function Q(t){return J(this,void 0,void 0,(function(){var e,n;return Z(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),K?(e=new ReadableStream({start:function(e){return J(this,void 0,void 0,(function(){return Z(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,$(e)]):[3,2];case 1:return[2,new(n.apply(Uint8Array,[void 0,r.sent()]))];case 2:return[3,4];case 3:return r.sent(),[3,4];case 4:return[2,null]}}))}))}function $(t){return J(this,void 0,void 0,(function(){var e,n,r,a,i;return Z(this,(function(o){switch(o.label){case 0:e=t.getReader(),n=[],r=!1,a=[],o.label=1;case 1:return r?[3,3]:[4,e.read()];case 2:return i=o.sent(),r=i.done,a=i.value,r?[2,n]:(n.push.apply(n,a),[3,1]);case 3:return[2,n]}}))}))}var tt=[b,n,Object.freeze({__proto__:null,get data(){return U},start:function(){G()},set:P,identify:B,compute:V,reset:G,stop:function(){G()}}),e,H,r,a,t,z,W];function et(){E={},S={},M(5),tt.forEach((function(t){return ba(t.start)()}))}function nt(){tt.slice().reverse().forEach((function(t){return ba(t.stop)()})),E={},S={}}function rt(){V(),m(),Br(),zr(0),L(),Yr()}function at(t,e,n,r){if(void 0===r&&(r=!1),t)switch(n){case 0:return t;case 1:switch(e){case"*T":case"value":case"placeholder":return function(t){for(var e=-1,n=!1,r=!1,a=!1,i=null,o=0;o<t.length;o++){var u=t.charCodeAt(o);n=n||u>=48&&u<=57,r=r||64===u,a=9===u||10===u||13===u||32===u,(0===o||o===t.length-1||a)&&((n||r)&&(null===i&&(i=t.split("")),ut(i,e,a?o:o+1)),a&&(n=!1,r=!1,e=o))}return i?i.join(""):t}(t);case"input":return ot(t)}return t;case 2:case 3:switch(e){case"*T":return r?function(t){var e=t.trim();if(e.length>0){var n=e[0],r=t.indexOf(n),a=t.substr(0,r),i=t.substr(r+e.length);return""+a+e.length.toString(36)+i}return t}(t):it(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":return ot(t);case"placeholder":return it(t)}}return t}function it(t){return t.replace(/\S/gi,"•")}function ot(t){for(var e=5*(Math.floor(t.length/5)+1),n="",r=0;r<e;r++)n+=r>0&&r%5==0?" ":"•";return n}function ut(t,e,n){for(var r=e+1;r<n;r++)t[r]="•"}var st={},lt=[],ct=null,dt=null,ft=null;function ht(){st={},lt=[],ct=null,dt=null}function pt(t,e){return void 0===e&&(e=0),J(this,void 0,void 0,(function(){var n,r,a;return Z(this,(function(i){for(n=0,r=lt;n<r.length;n++)if(r[n].task===t)return[2];return a=new Promise((function(n){lt[1===e?"unshift":"push"]({task:t,resolve:n,id:ta()})})),null===ct&&null===dt&&vt(),[2,a]}))}))}function vt(){var t=lt.shift();t&&(ct=t,t.task().then((function(){t.id===ta()&&(t.resolve(),ct=null,vt())})).catch((function(e){t.id===ta()&&(e&&Xt(0,1,e.name,e.message,e.stack),ct=null,vt())})))}function gt(t){var e=wt(t);return e in st?performance.now()-st[e].start>st[e].yield?0:1:2}function mt(t){st[wt(t)]={start:performance.now(),calls:0,yield:30}}function bt(t){var e=performance.now(),n=wt(t),r=e-st[n].start;O(t.cost,r),M(5),st[n].calls>0&&O(4,r)}function yt(t){return J(this,void 0,void 0,(function(){var e,n;return Z(this,(function(r){switch(r.label){case 0:return(e=wt(t))in st?(bt(t),n=st[e],[4,kt()]):[3,2];case 1:n.yield=r.sent().timeRemaining(),function(t){var e=wt(t);if(st&&st[e]){var n=st[e].calls,r=st[e].yield;mt(t),st[e].calls=n+1,st[e].yield=r}}(t),r.label=2;case 2:return[2,e in st?1:2]}}))}))}function wt(t){return t.id+"."+t.cost}function kt(){return J(this,void 0,void 0,(function(){return Z(this,(function(t){switch(t.label){case 0:return dt?[4,dt]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t){St(t,{timeout:5e3})}))]}}))}))}var Et,St=window.requestIdleCallback||function(t,e){var n=performance.now(),r=new MessageChannel,a=r.port1,i=r.port2;a.onmessage=function(r){var a=performance.now(),o=a-n,u=a-r.data;if(u>30&&o<e.timeout)requestAnimationFrame((function(){i.postMessage(a)}));else{var s=o>e.timeout;t({didTimeout:s,timeRemaining:function(){return s?30:Math.max(0,30-u)}})}},requestAnimationFrame((function(){i.postMessage(performance.now())}))};function Mt(){Et=null}function Ot(){var t=document.body,e=document.documentElement,n=t?t.clientWidth:null,r=t?t.scrollWidth:null,a=t?t.offsetWidth:null,i=e?e.clientWidth:null,o=e?e.scrollWidth:null,u=e?e.offsetWidth:null,s=Math.max(n,r,a,i,o,u),l=t?t.clientHeight:null,c=t?t.scrollHeight:null,d=t?t.offsetHeight:null,f=e?e.clientHeight:null,h=e?e.scrollHeight:null,p=e?e.offsetHeight:null,v=Math.max(l,c,d,f,h,p);null!==Et&&s===Et.width&&v===Et.height||null===s||null===v||(Et={width:s,height:v},Nt(8))}function Nt(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),J(this,void 0,void 0,(function(){var r,a,o,s,l,c,d,f,h,g,m,b,y,w,k,E,S,M,O,N,_,T,x,I,D,C;return Z(this,(function(j){switch(j.label){case 0:switch(r=n||u(),a=[r,t],t){case 8:return[3,1];case 7:return[3,2];case 37:return[3,3];case 5:case 6:return[3,4]}return[3,11];case 1:return o=Et,a.push(o.width),a.push(o.height),p(t,o.width,o.height),Tr(a),[3,11];case 2:for(s=0,l=Ie;s<l.length;s++)c=l[s],(a=[c.time,7]).push(c.data.id),a.push(c.data.interaction),a.push(c.data.visibility),a.push(c.data.name),Tr(a);return We(),[3,11];case 3:for(d=0,f=xt;d<f.length;d++)h=f[d],a.push(h.id),a.push(h.width),a.push(h.height);return jt(),Tr(a),[3,11];case 4:if(2===gt(e))return[3,11];if(!((g=Ne()).length>0))return[3,10];m=0,b=g,j.label=5;case 5:return m<b.length?(y=b[m],0!==(w=gt(e))?[3,7]:[4,yt(e)]):[3,9];case 6:w=j.sent(),j.label=7;case 7:if(2===w)return[3,9];for(k=y.data,E=y.metadata.active,S=y.metadata.suspend,M=y.metadata.privacy,O=function(t){var e=t.metadata.privacy;return"*T"===t.data.tag&&!(0===e||1===e)}(y),N=E?["tag","attributes","value"]:["tag"],function(t){if(!1===It)return;if(Dt=null===Dt?new ResizeObserver(Ct):Dt){var e=Se(t);if(e&&null!==e.metadata.size&&0===e.metadata.size.length){var n=Ee(t);if(n&&n.nodeType===Node.ELEMENT_NODE){var r=n,a=r.getBoundingClientRect();e.metadata.size=[Math.floor(100*a.width),Math.floor(100*a.height)],Dt.observe(r)}}}}(y.id),_=0,T=N;_<T.length;_++)if(k[x=T[_]])switch(x){case"tag":I=y.metadata.size,D=O?-1:1,a.push(y.id*D),y.parent&&E&&a.push(y.parent),y.previous&&E&&a.push(y.previous),a.push(S?"*M":k[x]),I&&2===I.length&&a.push("#"+_t(I[0])+"."+_t(I[1]));break;case"attributes":for(C in k[x])void 0!==k[x][C]&&a.push(Tt(C,k[x][C],M));break;case"value":a.push(at(k[x],k.tag,M,O))}j.label=8;case 8:return m++,[3,5];case 9:6===t&&v(r),Tr(function(t){for(var e=[],n={},r=0,a=null,i=0;i<t.length;i++)if("string"==typeof t[i]){var o=t[i],u=n[o]||-1;u>=0?a?a.push(u):(a=[u],e.push(a),r++):(a=null,e.push(o),n[o]=r++)}else a=null,e.push(t[i]),r++;return e}(a),!i.lean),j.label=10;case 10:return[3,11];case 11:return[2]}}))}))}function _t(t){return t.toString(36)}function Tt(t,e,n){return t+"="+at(e,t,n)}var xt=[],It=!1,Dt=null;function Ct(t){window.requestAnimationFrame((function(){for(var e=0,n=t;e<n.length;e++){var r=n[e],a=r.target,i=a?me(a):null;if(i){var o=Se(i).metadata.size,u=r.borderBoxSize,s=null,l=null;if(u&&u.length>0)s=Math.floor(100*u[0].inlineSize),l=Math.floor(100*u[0].blockSize);else{var c=a.getBoundingClientRect();s=Math.floor(100*c.width),l=Math.floor(100*c.height)}s!==o[0]&&l!==o[1]&&(o=[s,l],xt.push({id:i,width:s,height:l}))}}xt.length>0&&Nt(37)}))}function jt(){xt=[]}function zt(){jt(),Dt&&(Dt.disconnect(),Dt=null),It=!1}var Rt,At={};function Lt(t){var e=t.error||t;if(e.message in At||(At[e.message]=0),At[e.message]++>=5)return!0;if(e&&e.message){if(Rt={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},e.message.indexOf("ResizeObserver")>=0)return zt(),!1;Yt(31)}return!0}function Yt(t){return J(this,void 0,void 0,(function(){var e;return Z(this,(function(n){switch(e=[u(),t],t){case 31:e.push(Rt.message),e.push(Rt.line),e.push(Rt.column),e.push(Rt.stack),e.push(Rt.source),Tr(e);break;case 33:Ht&&(e.push(Ht.code),e.push(Ht.name),e.push(Ht.message),e.push(Ht.stack),e.push(Ht.severity),Tr(e,!1))}return[2]}))}))}var Ht,qt={};function Xt(t,e,n,r,a){void 0===n&&(n=null),void 0===r&&(r=null),void 0===a&&(a=null);var i=n?n+"|"+r:"";t in qt&&qt[t].indexOf(i)>=0||(Ht={code:t,name:n,message:r,stack:a,severity:e},t in qt?qt[t].push(i):qt[t]=[i],Yt(33))}function Wt(t){var e=i.upload,n=e&&"string"==typeof e?e.substr(0,e.indexOf("/","https://".length)).split("."):[],r=n.length>=2?n.splice(-2).join("."):null;r&&t.blockedURI&&t.blockedURI.indexOf(r)>=0&&"report"!==t.disposition&&Xt(7,1,t.blockedURI)}var Ut=/1/g,Pt=/[^0-9\.]/g,Bt=/[^0-9\.,]/g,Ft={};function Vt(t,e){for(var n=function(e){var n=e[0],r=e[1],a=e[2],i=e[3],o=!0;switch(a){case 0:o=i&&!!top.location.href.match(function(t){return Ft[t]=t in Ft?Ft[t]:new RegExp(t),Ft[t]}(i));break;case 1:o=i&&!!Gt(i)}o&&t.querySelectorAll(r).forEach((function(t){return Ae(t,n.toString())}))},r=0,a=e;r<a.length;r++){n(a[r])}}function Gt(t,e,n){void 0===e&&(e=null),void 0===n&&(n=window);var r=t.split("."),a=r.shift();return n&&n[a]?r.length>0?Gt(r.join("."),e,n[a]):null===e||e===typeof n[a]?n[a]:null:null}function Jt(t){return t?t.substr(0,256):t}function Zt(t,e,n){void 0===n&&(n=!0);try{e=e||1;var r=document.documentElement.lang;if(Intl&&Intl.NumberFormat&&r&&n){t=t.replace(Bt,"");var a=Intl.NumberFormat(r).format(11111).replace(Ut,""),i=Intl.NumberFormat(r).format(1.1).replace(Ut,"");return Math.round(parseFloat(t.replace(new RegExp("\\"+a,"g"),"").replace(new RegExp("\\"+i),"."))*e)}return Math.round(parseFloat(t.replace(Pt,""))*e)}catch(t){return null}}var Kt=["DIV","TR","P","LI","UL","A","BUTTON"];function Qt(t,e){void 0===e&&(e=!1);var n=t.attributes,r=t.prefix?t.prefix[e?1:0]:null,a=e||n&&!("class"in n)||Kt.indexOf(t.tag)>=0?":nth-of-type("+t.position+")":"";switch(t.tag){case"STYLE":case"TITLE":case"LINK":case"META":case"*T":case"*D":return"";case"HTML":return"HTML";default:if(null===r)return"";r+=">",t.tag=0===t.tag.indexOf("svg:")?t.tag.substr("svg:".length):t.tag;var i=""+r+t.tag+a,o="class"in n&&n.class.length>0?n.class.trim().split(/\s+/):null;if(e){var u="id"in n&&n.id.length>0?n.id:null;i=(o="BODY"!==t.tag&&o?o.filter((function(t){return!$t(t)})):[]).length>0?""+r+t.tag+"."+o.join(".")+a:i,i=u&&!1===$t(u)?function(t){var e=t.lastIndexOf("*S"),n=t.lastIndexOf("iframe:HTML"),r=Math.max(e,n);if(r<0)return"";var a=t.indexOf(">",r)+1;return t.substr(0,a)}(r)+"#"+u:i}else i=o?""+r+t.tag+"."+o.join(".")+a:i;return i}}function $t(t){for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n>=48&&n<=57)return!0}return!1}var te=1,ee=["password","hidden","email","tel"],ne=["addr","cell","code","dob","email","mob","name","phone","secret","social","ssn","tel","zip","pass","card","account","cvv","ccv"],re=["address","password","contact"],ae=[],ie=[],oe=[],ue={},se=[],le=[],ce=null,de=null,fe=null;function he(){ve(),ge(document,!0)}function pe(){ve()}function ve(){te=1,ae=[],ie=[],oe=[],ue={},se=[],le=[],ce=new WeakMap,de=new WeakMap,fe=new WeakMap}function ge(t,e){void 0===e&&(e=!1);try{e&&i.unmask.forEach((function(t){return t.indexOf("!")<0?le.push(t):se.push(t.substr(1))})),"querySelectorAll"in t&&(Vt(t,i.regions),function(t,e){for(var n=function(e){var n=e[0],r=e[1],a=e[2],i=e[3];if(a)switch(r){case 0:t.querySelectorAll(a).forEach((function(t){N(n,Zt(t.innerText,i))}));break;case 2:t.querySelectorAll("["+a+"]").forEach((function(t){N(n,Zt(t.getAttribute(a),i,!1))}));break;case 1:N(n,Gt(a,"number"))}},r=0,a=e;r<a.length;r++)n(a[r])}(t,i.metrics),function(t,e){for(var n=function(e){var n=e[0],r=e[1],a=e[2];if(a)switch(r){case 0:t.querySelectorAll(a).forEach((function(t){Pr(n,Jt(t.innerText))}));break;case 2:t.querySelectorAll("["+a+"]").forEach((function(t){Pr(n,Jt(t.getAttribute(a)))}));break;case 1:Pr(n,Jt(Gt(a,"string")))}},r=0,a=e;r<a.length;r++)n(a[r])}(t,i.dimensions),i.mask.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return fe.set(t,3)}))})),le.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return fe.set(t,0)}))})))}catch(t){Xt(5,1,t?t.name:null)}}function me(t,e){if(void 0===e&&(e=!1),null===t)return null;var n=ce.get(t);return!n&&e&&(n=te++,ce.set(t,n)),n||null}function be(t){var e=!1;if(t.nodeType===Node.ELEMENT_NODE&&"IFRAME"===t.tagName){var n=t;try{n.contentDocument&&(de.set(n.contentDocument,n),e=!0)}catch(t){}}return e}function ye(t){var e=t.nodeType===Node.DOCUMENT_NODE?t:null;return e&&de.has(e)?de.get(e):null}function we(t,e,n){if("object"==typeof t[n]&&"object"==typeof e[n]){for(var r in t[n])if(t[n][r]!==e[n][r])return!0;for(var r in e[n])if(e[n][r]!==t[n][r])return!0;return!1}return t[n]!==e[n]}function ke(t){var e=t.parent&&t.parent in ie?ie[t.parent]:null,n=e?e.selector:null,r=t.data,a=function(t,e){e.metadata.position=1;for(var n=t?t.children.indexOf(e.id):-1;n-- >0;){var r=ie[t.children[n]];if(e.data.tag===r.data.tag){e.metadata.position=r.metadata.position+1;break}}return e.metadata.position}(e,t),i={tag:r.tag,prefix:n,position:a,attributes:r.attributes};t.selector=[Qt(i),Qt(i,!0)],t.hash=t.selector.map((function(t){return t?l(t):null})),t.hash.forEach((function(e){return ue[e]=t.id}))}function Ee(t){return t in ae?ae[t]:null}function Se(t){return t in ie?ie[t]:null}function Me(t){var e=me(t);return e in ie?ie[e]:null}function Oe(t){return me(t)in ae}function Ne(){for(var t=[],e=0,n=oe;e<n.length;e++){var r=n[e];r in ie&&t.push(ie[r])}return oe=[],t}function _e(t){for(var e=null;null===e&&t.previousSibling;)e=me(t.previousSibling),t=t.previousSibling;return e}function Te(t,e,n,r){void 0===n&&(n=!0),void 0===r&&(r=!1);var a=oe.indexOf(t);a>=0&&1===e&&r?(oe.splice(a,1),oe.push(t)):-1===a&&n&&oe.push(t)}var xe=Object.freeze({__proto__:null,start:he,stop:pe,parse:ge,getId:me,add:function(t,e,n,r){var a=me(t,!0),o=e?me(e):null,u=_e(t),s=i.content?1:2,l=null,c=Le(t)?a:null;o>=0&&ie[o]&&((l=ie[o]).children.push(a),c=null===c?l.region:c,s=l.metadata.privacy),s=function(t,e,n,r){var a=e.attributes,i=e.tag.toUpperCase();if(fe.has(t))return fe.get(t);if("*T"===i&&n&&n.data){var o=n.selector?n.selector[0]:"";r="STYLE"===n.data.tag||"TITLE"===n.data.tag?0:r;for(var u=0,s=se;u<s.length;u++){var l=s[u];if(o.indexOf(l)>=0){r=0;break}}}if(null==a)return r;if("class"in a&&1===r)for(var c=0,d=re;c<d.length;c++){var f=d[c];if(a.class.indexOf(f)>=0){r=2;break}}if("INPUT"===i)if(0===r){for(var h="",p=0,v=Object.keys(a);p<v.length;p++){h+=a[v[p]].toLowerCase()}for(var g=0,m=ne;g<m.length;g++){var b=m[g];if(h.indexOf(b)>=0){r=2;break}}}else 1===r&&(r=a&&"submit"===a.type?0:2);"type"in a&&ee.indexOf(a.type)>=0&&(r=2);"data-clarity-mask"in a&&(r=3);"data-clarity-unmask"in a&&(r=0);return r}(t,n,l,s),n.attributes&&"data-clarity-region"in n.attributes&&(Ae(t,n.attributes["data-clarity-region"]),c=a),ae[a]=t,ie[a]={id:a,parent:o,previous:u,children:[],data:n,selector:null,hash:null,region:c,metadata:{active:!0,suspend:!1,privacy:s,position:null,size:null}},ke(ie[a]),function(t,e){var n=t.data,r="*T"===n.tag&&n.value&&n.value.length>15,a=2===t.metadata.privacy||3===t.metadata.privacy;r&&a&&e&&null===e.metadata.size&&(e.metadata.size=[]);"IMG"===n.tag&&3===t.metadata.privacy&&(t.metadata.size=[])}(ie[a],l),Te(a,r)},update:function(t,e,n,r){var a=me(t),i=e?me(e):null,o=_e(t),u=!1,s=!1;if(a in ie){var l=ie[a];if(l.metadata.active=!0,l.previous!==o&&(u=!0,l.previous=o),l.parent!==i){u=!0;var c=l.parent;if(l.parent=i,null!==i&&i>=0){var d=null===o?0:ie[i].children.indexOf(o)+1;ie[i].children.splice(d,0,a),l.region=Le(t)?a:ie[i].region}else!function(t,e){if(t in ie){var n=ie[t];n.metadata.active=!1,n.parent=null,Te(t,e)}}(a,r);if(null!==c&&c>=0){var f=ie[c].children.indexOf(a);f>=0&&ie[c].children.splice(f,1)}s=!0}for(var h in n)we(l.data,n,h)&&(u=!0,l.data[h]=n[h]);ke(l),Te(a,r,u,s)}},sameorigin:be,iframe:ye,getNode:Ee,getValue:Se,get:Me,lookup:function(t){return t in ue?ue[t]:null},has:Oe,updates:Ne}),Ie=[],De=null,Ce={},je=[],ze=!1,Re=null;function Ae(t,e){!1===De.has(t)&&(De.set(t,e),(Re=null===Re&&ze?new IntersectionObserver(He,{threshold:[0,.2,.4,.6,.8,1]}):Re)&&t&&t.nodeType===Node.ELEMENT_NODE&&Re.observe(t))}function Le(t){return De&&De.has(t)}function Ye(){for(var t=[],e=0,n=je;e<n.length;e++){var r=n[e],a=me(r.node);a in Ce||(a?(r.data.id=a,Ce[a]=r.data,Ie.push(Xe(r.data))):t.push(r))}je=t,Ie.length>0&&Nt(7)}function He(t){for(var e=0,n=t;e<n.length;e++){var r=n[e],a=r.target,i=r.boundingClientRect,o=r.intersectionRect,u=r.rootBounds;if(De.has(a)&&i.width+i.height>0&&u.width>0&&u.height>0){var s=a?me(a):null,l=s in Ce?Ce[s]:{id:s,name:De.get(a),interaction:16,visibility:0},c=(o?o.width*o.height*1/(u.width*u.height):0)>.05||r.intersectionRatio>.8,d=(c||10==l.visibility)&&Math.abs(i.top)+u.height>i.height;qe(a,l,l.interaction,d?13:c?10:0),l.visibility>=13&&Re&&Re.unobserve(a)}}Ie.length>0&&Nt(7)}function qe(t,e,n,r){var a=n>e.interaction||r>e.visibility;e.interaction=n>e.interaction?n:e.interaction,e.visibility=r>e.visibility?r:e.visibility,e.id?(e.id in Ce&&a||!(e.id in Ce))&&(Ce[e.id]=e,Ie.push(Xe(e))):je.push({node:t,data:e})}function Xe(t){return{time:u(),data:{id:t.id,interaction:t.interaction,visibility:t.visibility,name:t.name}}}function We(){Ie=[]}function Ue(t){var e={x:0,y:0};if(t&&t.offsetParent)do{var n=t.offsetParent,r=null===n?ye(t.ownerDocument):null;e.x+=t.offsetLeft,e.y+=t.offsetTop,t=r||n}while(t);return e}var Pe=["input","textarea","radio","button","canvas"],Be=[];function Fe(t){wa(t,"click",Ve.bind(this,9,t),!0)}function Ve(t,e,n){var r=ye(e),a=r?r.contentDocument.documentElement:document.documentElement,i="pageX"in n?Math.round(n.pageX):"clientX"in n?Math.round(n.clientX+a.scrollLeft):null,o="pageY"in n?Math.round(n.pageY):"clientY"in n?Math.round(n.clientY+a.scrollTop):null;if(r){var s=Ue(r);i=i?i+Math.round(s.x):i,o=o?o+Math.round(s.y):o}var l=cr(n),c=function(t){for(;t&&t!==document;){if(t.nodeType===Node.ELEMENT_NODE){var e=t;if("A"===e.tagName)return e}t=t.parentNode}return null}(l),d=function(t){var e=null,n=document.documentElement;if("function"==typeof t.getBoundingClientRect){var r=t.getBoundingClientRect();r&&r.width>0&&r.height>0&&(e={x:Math.floor(r.left+("pageXOffset"in window?window.pageXOffset:n.scrollLeft)),y:Math.floor(r.top+("pageYOffset"in window?window.pageYOffset:n.scrollTop)),w:Math.floor(r.width),h:Math.floor(r.height)})}return e}(l);0===n.detail&&d&&(i=Math.round(d.x+d.w/2),o=Math.round(d.y+d.h/2));var f=d?Math.max(Math.floor((i-d.x)/d.w*32767),0):0,h=d?Math.max(Math.floor((o-d.y)/d.h*32767),0):0;null!==i&&null!==o&&(Be.push({time:u(),event:t,data:{target:l,x:i,y:o,eX:f,eY:h,button:n.button,reaction:Je(l),context:Ze(c),text:Ge(l),link:c?c.href:null,hash:null}}),pt(fr.bind(this,t)))}function Ge(t){var e=null;if(t){var n=t.textContent||t.value||t.alt;n&&(e=n.trim().replace(/\s+/g," ").substr(0,25))}return e}function Je(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(Pe.indexOf(e)>=0)return 0}return 1}function Ze(t){if(t&&t.hasAttribute("target"))switch(t.getAttribute("target")){case"_blank":return 1;case"_parent":return 2;case"_top":return 3}return 0}function Ke(){Be=[]}var Qe=[];function $e(t,e){Qe.push({time:u(),event:38,data:{target:cr(e),action:t}}),pt(fr.bind(this,38))}function tn(){Qe=[]}var en=null,nn=[];function rn(t){var e=cr(t),n=Me(e);if(e&&e.type&&n){var r=void 0;switch(e.type){case"radio":case"checkbox":r=e.checked?"true":"false";break;case"range":r=e.value;break;default:r=at(e.value,"input",n.metadata.privacy)}var a={target:e,value:r};nn.length>0&&nn[nn.length-1].data.target===a.target&&nn.pop(),nn.push({time:u(),event:27,data:a}),T(en),en=_(an,500,27)}}function an(t){pt(fr.bind(this,t))}function on(){nn=[]}var un,sn=[],ln=null;function cn(t,e,n){var r=ye(e),a=r?r.contentDocument.documentElement:document.documentElement,i="pageX"in n?Math.round(n.pageX):"clientX"in n?Math.round(n.clientX+a.scrollLeft):null,o="pageY"in n?Math.round(n.pageY):"clientY"in n?Math.round(n.clientY+a.scrollTop):null;if(r){var s=Ue(r);i=i?i+Math.round(s.x):i,o=o?o+Math.round(s.y):o}null!==i&&null!==o&&fn({time:u(),event:t,data:{target:cr(n),x:i,y:o}})}function dn(t,e,n){var r=ye(e),a=r?r.contentDocument.documentElement:document.documentElement,i=n.changedTouches,o=u();if(i)for(var s=0;s<i.length;s++){var l=i[s],c="clientX"in l?Math.round(l.clientX+a.scrollLeft):null,d="clientY"in l?Math.round(l.clientY+a.scrollTop):null;c=c&&r?c+Math.round(r.offsetLeft):c,d=d&&r?d+Math.round(r.offsetTop):d,null!==c&&null!==d&&fn({time:o,event:t,data:{target:cr(n),x:c,y:d}})}}function fn(t){switch(t.event){case 12:case 15:case 19:var e=sn.length,n=e>1?sn[e-2]:null;n&&function(t,e){var n=t.data.x-e.data.x,r=t.data.y-e.data.y,a=Math.sqrt(n*n+r*r),i=e.time-t.time,o=e.data.target===t.data.target;return e.event===t.event&&o&&a<20&&i<25}(n,t)&&sn.pop(),sn.push(t),T(ln),ln=_(hn,500,t.event);break;default:sn.push(t),hn(t.event)}}function hn(t){pt(fr.bind(this,t))}function pn(){sn=[]}function vn(){var t=document.documentElement;un={width:t&&"clientWidth"in t?Math.min(t.clientWidth,window.innerWidth):window.innerWidth,height:t&&"clientHeight"in t?Math.min(t.clientHeight,window.innerHeight):window.innerHeight},fr(11)}function gn(){un=null}var mn=[],bn=null;function yn(t){void 0===t&&(t=null);var e=window,n=document.documentElement,r=t?cr(t):n;if(r&&r.nodeType===Node.DOCUMENT_NODE){var a=ye(r);e=a?a.contentWindow:e,r=n=r.documentElement}var i=r===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(r.scrollLeft),o=r===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(r.scrollTop),s={time:u(),event:10,data:{target:r,x:i,y:o}};if((null!==t||0!==i||0!==o)&&null!==i&&null!==o){var l=mn.length,c=l>1?mn[l-2]:null;c&&function(t,e){var n=t.data.x-e.data.x,r=t.data.y-e.data.y;return n*n+r*r<400&&e.time-t.time<25}(c,s)&&mn.pop(),mn.push(s),T(bn),bn=_(wn,500,10)}}function wn(t){pt(fr.bind(this,t))}var kn=null,En=null,Sn=null;function Mn(t){var e=(t.nodeType===Node.DOCUMENT_NODE?t:document).getSelection();if(null!==e&&!(null===e.anchorNode&&null===e.focusNode||e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset)){var n=kn.start?kn.start:null;null!==En&&null!==kn.start&&n!==e.anchorNode&&(T(Sn),On(21)),kn={start:e.anchorNode,startOffset:e.anchorOffset,end:e.focusNode,endOffset:e.focusOffset},En=e,T(Sn),Sn=_(On,500,21)}}function On(t){pt(fr.bind(this,t))}function Nn(){En=null,kn={start:0,startOffset:0,end:0,endOffset:0}}var _n,Tn,xn=[];function In(t){xn.push({time:u(),event:39,data:{target:cr(t)}}),pt(fr.bind(this,39))}function Dn(){xn=[]}function Cn(t){_n={name:t.type},fr(26),Fa()}function jn(){_n=null}function zn(){Tn={visible:"visibilityState"in document?document.visibilityState:"default"},fr(28)}function Rn(){Tn=null}function An(t){!function(t){var e=ye(t);wa(e?e.contentWindow:t===document?window:t,"scroll",yn,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Fe(t),function(t){wa(t,"cut",$e.bind(this,0),!0),wa(t,"copy",$e.bind(this,1),!0),wa(t,"paste",$e.bind(this,2),!0)}(t),function(t){wa(t,"mousedown",cn.bind(this,13,t),!0),wa(t,"mouseup",cn.bind(this,14,t),!0),wa(t,"mousemove",cn.bind(this,12,t),!0),wa(t,"mousewheel",cn.bind(this,15,t),!0),wa(t,"dblclick",cn.bind(this,16,t),!0),wa(t,"touchstart",dn.bind(this,17,t),!0),wa(t,"touchend",dn.bind(this,18,t),!0),wa(t,"touchmove",dn.bind(this,19,t),!0),wa(t,"touchcancel",dn.bind(this,20,t),!0)}(t),function(t){wa(t,"input",rn,!0)}(t),function(t){wa(t,"selectstart",Mn.bind(this,t),!0),wa(t,"selectionchange",Mn.bind(this,t),!0)}(t),function(t){wa(t,"submit",In,!0)}(t))}var Ln=Object.freeze({__proto__:null,start:function(){hr=[],vr(),Ke(),tn(),pn(),on(),wa(window,"resize",vn),vn(),wa(document,"visibilitychange",zn),zn(),mn=[],yn(),Nn(),Dn(),wa(window,"pagehide",Cn)},stop:function(){hr=[],vr(),Ke(),tn(),T(ln),sn.length>0&&hn(sn[sn.length-1].event),T(en),on(),gn(),Rn(),T(bn),mn=[],Nn(),T(Sn),Dn(),jn()},observe:An}),Yn=/[^0-9\.]/g;function Hn(t){for(var e=0,n=Object.keys(t);e<n.length;e++){var r=n[e],a=t[r];if("@type"===r&&"string"==typeof a)switch(a=(a=a.toLowerCase()).indexOf("article")>=0||a.indexOf("posting")>=0?"article":a){case"article":case"recipe":Pr(5,t[r]),Pr(8,t.creator),Pr(18,t.headline);break;case"product":Pr(5,t[r]),Pr(10,t.name),Pr(12,t.sku),t.brand&&Pr(6,t.brand.name);break;case"aggregaterating":t.ratingValue&&(N(11,qn(t.ratingValue,100)),N(18,qn(t.bestRating)),N(19,qn(t.worstRating))),N(12,qn(t.ratingCount)),N(17,qn(t.reviewCount));break;case"person":Pr(8,t.name);break;case"offer":Pr(7,t.availability),Pr(14,t.itemCondition),Pr(13,t.priceCurrency),Pr(12,t.sku),N(13,qn(t.price));break;case"brand":Pr(6,t.name)}null!==a&&"object"==typeof a&&Hn(a)}}function qn(t,e){if(void 0===e&&(e=1),null!==t)switch(typeof t){case"number":return Math.round(t*e);case"string":return Math.round(parseFloat(t.replace(Yn,""))*e)}return null}var Xn=["title","alt","onload","onfocus","onerror"],Wn=/[\r\n]+/g;function Un(t,e){var n=null;if(2===e&&!1===Oe(t))return n;0!==e&&t.nodeType===Node.TEXT_NODE&&t.parentElement&&"STYLE"===t.parentElement.tagName&&(t=t.parentNode);var r=!1===Oe(t)?"add":"update",a=t.parentElement?t.parentElement:null,i=t.ownerDocument!==document;switch(t.nodeType){case Node.DOCUMENT_TYPE_NODE:a=i&&t.parentNode?ye(t.parentNode):a;var o=t,u={tag:(i?"iframe:":"")+"*D",attributes:{name:o.name,publicId:o.publicId,systemId:o.systemId}};xe[r](t,a,u,e);break;case Node.DOCUMENT_NODE:t===document&&ge(document),Pn(t);break;case Node.DOCUMENT_FRAGMENT_NODE:var s=t;if(s.host)if(ge(s),"function"===typeof s.constructor&&s.constructor.toString().indexOf("[native code]")>=0){Pn(s);for(var l="",c=0,d=("adoptedStyleSheets"in s?s.adoptedStyleSheets:[]);c<d.length;c++){l+=Fn(d[c])}var f={tag:"*S",attributes:{style:l}};xe[r](t,s.host,f,e)}else xe[r](t,s.host,{tag:"*P",attributes:{}},e);break;case Node.TEXT_NODE:if(a=a||t.parentNode,"update"===r||a&&Oe(a)&&"STYLE"!==a.tagName){var h={tag:"*T",value:t.nodeValue};xe[r](t,a,h,e)}break;case Node.ELEMENT_NODE:var p=t,v=p.tagName,g=function(t){var e={},n=t.attributes;if(n&&n.length>0)for(var r=0;r<n.length;r++){var a=n[r].name;Xn.indexOf(a)<0&&(e[a]=n[r].value)}"INPUT"===t.tagName&&!("value"in e)&&t.value&&(e.value=t.value);return e}(p);switch(a=t.parentElement?t.parentElement:t.parentNode?t.parentNode:null,"http://www.w3.org/2000/svg"===p.namespaceURI&&(v="svg:"+v),v){case"HTML":a=i&&a?ye(a):null;var m={tag:(i?"iframe:":"")+v,attributes:g};xe[r](t,a,m,e);break;case"SCRIPT":if("type"in g&&"application/ld+json"===g.type)try{Hn(JSON.parse(p.text.replace(Wn,"")))}catch(t){}break;case"NOSCRIPT":break;case"META":var b="property"in g?"property":"name"in g?"name":null;if(b&&"content"in g){var y=g.content;switch(g[b]){case"og:title":Pr(20,y);break;case"og:type":Pr(19,y);break;case"generator":Pr(21,y)}}break;case"HEAD":var w={tag:v,attributes:g};location&&(w.attributes["*B"]=location.protocol+"//"+location.hostname),xe[r](t,a,w,e);break;case"STYLE":var k={tag:v,attributes:g,value:Bn(p)};xe[r](t,a,k,e);break;case"IFRAME":var E=t,S={tag:v,attributes:g};be(E)&&(!function(t){!1===Oe(t)&&wa(t,"load",lr.bind(this,t,"childList"),!0)}(E),S.attributes["*O"]="true",E.contentDocument&&E.contentWindow&&"loading"!==E.contentDocument.readyState&&(n=E.contentDocument)),xe[r](t,a,S,e);break;default:var M={tag:v,attributes:g};p.shadowRoot&&(n=p.shadowRoot),xe[r](t,a,M,e)}}return n}function Pn(t){Oe(t)||(!function(t){try{var e=window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__("MutationObserver"):"MutationObserver",n=e in window?new window[e](ba(rr)):null;n&&(n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),Gn.push(n))}catch(t){Xt(2,0,t?t.name:null)}}(t),An(t))}function Bn(t){var e=t.textContent?t.textContent.trim():"",n=t.dataset?Object.keys(t.dataset).length:0;return(0===e.length||n>0)&&(e=Fn(t.sheet)),e}function Fn(t){var e="",n=null;try{n=t?t.cssRules:[]}catch(t){if(Xt(1,1,t?t.name:null),t&&"SecurityError"!==t.name)throw t}if(null!==n)for(var r=0;r<n.length;r++)e+=n[r].cssText;return e}function Vn(t,e,n){return J(this,void 0,void 0,(function(){var r,a,i,o,u;return Z(this,(function(s){switch(s.label){case 0:r=[t],s.label=1;case 1:if(!(r.length>0))return[3,4];for(a=r.shift(),i=a.firstChild;i;)r.push(i),i=i.nextSibling;return 0!==(o=gt(e))?[3,3]:[4,yt(e)];case 2:o=s.sent(),s.label=3;case 3:return 2===o?[3,4]:((u=Un(a,n))&&r.push(u),[3,1]);case 4:return[2]}}))}))}var Gn=[],Jn=[],Zn=null,Kn=null,Qn=null,$n=[],tr=null,er=null,nr={};function rr(t){var e=u();A(6,e),Jn.push({time:e,mutations:t}),pt(ar,1).then((function(){ba(Ot)(),ba(Ye)()}))}function ar(){return J(this,void 0,void 0,(function(){var t,e,n,r,a,i,o,s,l;return Z(this,(function(c){switch(c.label){case 0:mt(t={id:ta(),cost:3}),c.label=1;case 1:if(!(Jn.length>0))return[3,8];e=Jn.shift(),n=0,r=e.mutations,c.label=2;case 2:return n<r.length?(a=r[n],0!==(i=gt(t))?[3,4]:[4,yt(t)]):[3,6];case 3:i=c.sent(),c.label=4;case 4:if(2===i)return[3,6];switch(o=a.target,(s=function(t,e){var n=t.target?Me(t.target.parentNode):null;if(n&&"HTML"!==n.data.tag){var r=u()>er,a=Me(t.target),i=a&&a.selector?a.selector.join():t.target.nodeName,o=[n.selector?n.selector.join():"",i,t.attributeName,ir(t.addedNodes),ir(t.removedNodes)].join();nr[o]=o in nr?nr[o]:[0];var s=nr[o];if(!1===r&&s[0]>=10&&or(s[1],2,e),s[0]=r?s[0]+1:1,10===s[0])return s[1]=t.removedNodes,"suspend";if(s[0]>10)return""}return t.type}(a,t))&&o&&o.ownerDocument&&ge(o.ownerDocument),s&&o&&o.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&o.host&&ge(o),s){case"attributes":Un(o,3);break;case"characterData":Un(o,4);break;case"childList":or(a.addedNodes,1,t),or(a.removedNodes,2,t);break;case"suspend":(l=Me(o))&&(l.metadata.suspend=!0)}c.label=5;case 5:return n++,[3,2];case 6:return[4,Nt(6,t,e.time)];case 7:return c.sent(),[3,1];case 8:return bt(t),[2]}}))}))}function ir(t){for(var e=[],n=0;t&&n<t.length;n++)e.push(t[n].nodeName);return e.join()}function or(t,e,n){return J(this,void 0,void 0,(function(){var r,a,i;return Z(this,(function(o){switch(o.label){case 0:r=t?t.length:0,a=0,o.label=1;case 1:return a<r?1!==e?[3,2]:(Vn(t[a],n,e),[3,5]):[3,6];case 2:return 0!==(i=gt(n))?[3,4]:[4,yt(n)];case 3:i=o.sent(),o.label=4;case 4:if(2===i)return[3,6];Un(t[a],e),o.label=5;case 5:return a++,[3,1];case 6:return[2]}}))}))}function ur(t){return $n.indexOf(t)<0&&$n.push(t),tr&&T(tr),tr=_(sr,33),t}function sr(){for(var t=0,e=$n;t<e.length;t++){var n=e[t],r=n&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE;r&&Oe(n)||lr(n,r?"childList":"characterData")}$n=[]}function lr(t,e){ba(rr)([{addedNodes:[t],attributeName:null,attributeNamespace:null,nextSibling:null,oldValue:null,previousSibling:null,removedNodes:[],target:t,type:e}])}function cr(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return er=u()+3e3,n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function dr(t,e){var n={id:0,hash:null,privacy:2,node:t};if(t){var r=Me(t);null!==r&&(n.id=r.id,n.hash=r.hash,n.privacy=r.metadata.privacy,r.region&&function(t,e){var n=Ee(t),r=t in Ce?Ce[t]:{id:t,visibility:0,interaction:16,name:De.get(n)},a=16;switch(e){case 9:a=20;break;case 27:a=30}qe(n,r,a,r.visibility)}(r.region,e))}return n}function fr(t){return J(this,void 0,void 0,(function(){var e,n,r,a,i,o,s,l,c,d,f,h,v,m,b,y,w,k,E,S,M,O,N,_,T,x,I,D,C;return Z(this,(function(j){switch(e=u(),n=[e,t],t){case 13:case 14:case 12:case 15:case 16:case 17:case 18:case 19:case 20:for(r=0,a=sn;r<a.length;r++)D=a[r],(i=dr(D.data.target,D.event)).id>0&&((n=[D.time,D.event]).push(i.id),n.push(D.data.x),n.push(D.data.y),Tr(n),p(D.event,D.data.x,D.data.y));pn();break;case 9:for(o=0,s=Be;o<s.length;o++)D=s[o],l=dr(D.data.target,D.event),n=[D.time,D.event],c=l.hash.join("."),n.push(l.id),n.push(D.data.x),n.push(D.data.y),n.push(D.data.eX),n.push(D.data.eY),n.push(D.data.button),n.push(D.data.reaction),n.push(D.data.context),n.push(at(D.data.text,"click",l.privacy)),n.push(D.data.link),n.push(c),Tr(n),gr(D.time,D.event,c,D.data.x,D.data.y,D.data.reaction,D.data.context);Ke();break;case 38:for(d=0,f=Qe;d<f.length;d++)D=f[d],n=[D.time,D.event],(T=dr(D.data.target,D.event)).id>0&&(n.push(T.id),n.push(D.data.action),Tr(n));tn();break;case 11:h=un,n.push(h.width),n.push(h.height),p(t,h.width,h.height),gn(),Tr(n);break;case 26:v=_n,n.push(v.name),jn(),Tr(n);break;case 27:for(m=0,b=nn;m<b.length;m++)D=b[m],y=dr(D.data.target,D.event),(n=[D.time,D.event]).push(y.id),n.push(D.data.value),Tr(n);on();break;case 21:(w=kn)&&(k=dr(w.start,t),E=dr(w.end,t),n.push(k.id),n.push(w.startOffset),n.push(E.id),n.push(w.endOffset),Nn(),Tr(n));break;case 10:for(S=0,M=mn;S<M.length;S++)D=M[S],(O=dr(D.data.target,D.event)).id>0&&((n=[D.time,D.event]).push(O.id),n.push(D.data.x),n.push(D.data.y),Tr(n),p(D.event,D.data.x,D.data.y));mn=[];break;case 39:for(N=0,_=xn;N<_.length;N++)D=_[N],n=[D.time,D.event],(T=dr(D.data.target,D.event)).id>0&&(n.push(T.id),Tr(n));Dn();break;case 22:for(x=0,I=pr;x<I.length;x++)D=I[x],(n=[D.time,D.event]).push(D.data.type),n.push(D.data.hash),n.push(D.data.x),n.push(D.data.y),n.push(D.data.reaction),n.push(D.data.context),Tr(n,!1);vr();break;case 28:C=Tn,n.push(C.visible),Tr(n),g(e,C.visible),Rn()}return[2]}))}))}var hr=[],pr=[];function vr(){pr=[]}function gr(t,e,n,r,a,i,o){void 0===i&&(i=1),void 0===o&&(o=0),hr.push({time:t,event:22,data:{type:e,hash:n,x:r,y:a,reaction:i,context:o}}),p(e,r,a)}var mr,br,yr,wr,kr,Er,Sr=0,Mr=0,Or=null,Nr=0;function _r(){wr=!0,Sr=0,Mr=0,Nr=0,mr=[],br=[],yr={},kr=null}function Tr(t,e){if(void 0===e&&(e=!0),wr){var n=u(),r=t.length>1?t[1]:null,a=JSON.stringify(t);switch(r){case 5:Sr+=a.length;case 37:case 6:Mr+=a.length,mr.push(a);break;default:br.push(a)}M(25);var o=function(){var t=!1===i.lean&&Sr>0?100:fa.sequence*i.delay;return"string"==typeof i.upload?Math.max(Math.min(t,3e4),100):i.delay}();n-Nr>2*o&&(T(Or),Or=null),e&&null===Or&&(25!==r&&C(),Or=_(Ir,o),Nr=n,Ar(Mr))}}function xr(){T(Or),Ir(!0),Sr=0,Mr=0,Nr=0,mr=[],br=[],yr={},kr=null,wr=!1}function Ir(t){return void 0===t&&(t=!1),J(this,void 0,void 0,(function(){var e,n,r,a,o,u,s,l;return Z(this,(function(c){switch(c.label){case 0:return Or=null,(e=!1===i.lean&&Mr>0&&(Mr<1048576||fa.sequence>0))&&N(1,1),Ye(),function(){var t=[];pr=[];for(var e=fa.start+fa.duration,n=Math.max(e-2e3,0),r=0,a=hr;r<a.length;r++){var i=a[r];i.time>=n&&(i.time<=e&&pr.push(i),t.push(i))}hr=t,fr(22)}(),rt(),n=!0===t,r=JSON.stringify(va(n)),a="["+br.join()+"]",o=e?"["+mr.join()+"]":"",u=function(t){return t.p.length>0?'{"e":'+t.e+',"a":'+t.a+',"p":'+t.p+"}":'{"e":'+t.e+',"a":'+t.a+"}"}({e:r,a:a,p:o}),n?(l=null,[3,3]):[3,1];case 1:return[4,Q(u)];case 2:l=c.sent(),c.label=3;case 3:return O(2,(s=l)?s.length:u.length),Dr(u,s,fa.sequence,n),br=[],e&&(mr=[],Mr=0,Sr=0),[2]}}))}))}function Dr(t,e,n,r){if(void 0===r&&(r=!1),"string"==typeof i.upload){var a=i.upload,o=!1;if(r&&"sendBeacon"in navigator&&(o=navigator.sendBeacon(a,t))&&jr(n),!1===o){n in yr?yr[n].attempts++:yr[n]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",a),null!==n&&(u.onreadystatechange=function(){ba(Cr)(u,n)}),u.withCredentials=!0,e?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(e)):u.send(t)}}else if(i.upload){(0,i.upload)(t),jr(n)}}function Cr(t,e){var n=yr[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?Lr(6):(0===t.status&&(i.upload=i.fallback?i.fallback:i.upload),Dr(n.data,null,e)):(kr={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&zr(2),200===t.status&&t.responseText&&function(t){switch(t&&t.length>0?t.split(" ")[0]:""){case"END":Lr(6);break;case"UPGRADE":X("Auto")}}(t.responseText),0===t.status&&(Dr(n.data,null,e,!0),Lr(3)),t.status>=200&&t.status<=208&&jr(e),delete yr[e]))}function jr(t){1===t&&ra()}function zr(t){var e=[u(),t];switch(t){case 4:var n=c;n&&((e=[n.time,n.event]).push(n.data.visible),e.push(n.data.docWidth),e.push(n.data.docHeight),e.push(n.data.screenWidth),e.push(n.data.screenHeight),e.push(n.data.scrollX),e.push(n.data.scrollY),e.push(n.data.pointerX),e.push(n.data.pointerY),e.push(n.data.activityTime),Tr(e,!1)),h();break;case 25:e.push(k.gap),Tr(e);break;case 35:e.push(Er.check),Tr(e,!1);break;case 3:e.push(q.key),Tr(e);break;case 2:e.push(kr.sequence),e.push(kr.attempts),e.push(kr.status),Tr(e,!1);break;case 24:e.push(y.key),e.push(y.value),Tr(e);break;case 34:var r=Object.keys(U);if(r.length>0){for(var a=0,i=r;a<i.length;a++){var o=i[a];e.push(o),e.push(U[o])}G(),Tr(e,!1)}break;case 0:var s=Object.keys(S);if(s.length>0){for(var l=0,d=s;l<d.length;l++){var f=d[l],p=parseInt(f,10);e.push(p),e.push(Math.round(S[f]))}S={},Tr(e,!1)}break;case 1:var v=Object.keys(Xr);if(v.length>0){for(var g=0,m=v;g<m.length;g++){var b=m[g];p=parseInt(b,10);e.push(p),e.push(Xr[b])}Fr(),Tr(e,!1)}break;case 36:var w=Object.keys(R);if(w.length>0){for(var E=0,M=w;E<M.length;E++){var O=M[E];p=parseInt(O,10);e.push(p),e.push([].concat.apply([],R[O]))}Y(),Tr(e,!1)}}}function Rr(){Er={check:0}}function Ar(t){if(0===Er.check){var e=Er.check;e=fa.sequence>=128?1:e,e=u()>72e5?2:e,(e=t>10485760?2:e)!==Er.check&&Lr(e)}}function Lr(t){Er.check=t,na(),Fa()}function Yr(){0!==Er.check&&zr(35)}function Hr(){Er=null}var qr=null,Xr=null;function Wr(){qr={},Xr={}}function Ur(){qr={},Xr={}}function Pr(t,e){e&&(e=""+e,t in qr||(qr[t]=[]),qr[t].indexOf(e)<0&&(qr[t].push(e),t in Xr||(Xr[t]=[]),Xr[t].push(e),qr[t].length>128&&Lr(5)))}function Br(){zr(1)}function Fr(){Xr={}}var Vr=null,Gr=null,Jr=null;function Zr(){Gr=null,Jr=null;var t=navigator&&"userAgent"in navigator?navigator.userAgent:"",e=document&&document.title?document.title:"",n=function(){var t={session:oa(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=la("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-ua(n[1])<18e5&&(t.session=n[0],t.count=ua(n[2])+1,t.upgrade=ua(n[3]),t.upload=n.length>=6?"https://"+n[5]+"/"+n[4]:"https://"+n[4])}return t}(),r=sa();Vr={projectId:i.projectId||l(location.host),userId:r.id,sessionId:n.session,pageNum:n.count},i.lean=i.track&&null!==n.upgrade?0===n.upgrade:i.lean,i.upload=i.track&&"string"==typeof i.upload&&n.upload&&n.upload.length>"https://".length?n.upload:i.upload,Pr(0,t),Pr(3,e),Pr(1,location.href),Pr(2,document.referrer),Pr(15,function(){var t=oa();if(i.track&&aa(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),Pr(16,document.documentElement.lang),Pr(17,document.dir),navigator&&(Pr(9,navigator.userLanguage||navigator.language),N(26,navigator.webdriver?1:0),Kr()),N(0,n.ts),N(1,0),screen&&(N(14,Math.round(screen.width)),N(15,Math.round(screen.height)),N(16,Math.round(screen.colorDepth)));for(var a=0,o=i.cookies;a<o.length;a++){var u=o[a],s=la(u);s&&P(u,s)}ia(r)}function Kr(){navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;Pr(22,t.platform),Pr(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){Pr(24,t.name+"~"+t.version)})),Pr(25,t.model),N(27,t.mobile?1:0)}))}function Qr(){Gr=null,Jr=null,Vr=null}function $r(t,e){void 0===e&&(e=!0),Vr&&!1===e?t(Vr,!i.lean):Gr=t}function ta(){return Vr?[Vr.userId,Vr.sessionId,Vr.pageNum].join("."):""}function ea(){Ca()&&(i.track=!0,ia(sa(),1))}function na(){ca("_clsk","",0)}function ra(){var t=Math.round(Date.now()),e=i.lean?0:1,n=i.upload&&"string"==typeof i.upload?i.upload.replace("https://",""):"";e&&Gr&&Gr(Vr,!i.lean),ca("_clsk",[Vr.sessionId,t,Vr.pageNum,e,n].join("|"),1)}function aa(t,e){try{return!!t[e]}catch(t){return!1}}function ia(t,e){void 0===e&&(e=null),e=null===e?t.consent:e;var n=Math.ceil((Date.now()+31536e6)/864e5);(null===t.expiry||Math.abs(n-t.expiry)>=1||t.consent!==e)&&ca("_clck",[Vr.userId,1,n.toString(36),e].join("|"),365)}function oa(){var t=Math.floor(Math.random()*Math.pow(2,32));return window&&window.crypto&&window.crypto.getRandomValues&&Uint32Array&&(t=window.crypto.getRandomValues(new Uint32Array(1))[0]),t.toString(36)}function ua(t,e){return void 0===e&&(e=10),parseInt(t,e)}function sa(){var t={id:oa(),expiry:null,consent:0},e=la("_clck");if(e&&e.length>0){for(var n=e.split("|"),r=0,a=0,o=document.cookie.split(";");a<o.length;a++){r+="_clck"===o[a].split("=")[0].trim()?1:0}if(1===n.length||r>1){var u=";expires="+new Date(0).toUTCString()+";path=/";document.cookie="_clck="+u,document.cookie="_clsk="+u}n.length>2&&(t.expiry=ua(n[2],36)),n.length>3&&1===ua(n[3])&&(t.consent=1),i.track=i.track||1===t.consent,t.id=i.track?n[0]:t.id}return t}function la(t){if(aa(document,"cookie")){var e=document.cookie.split(";");if(e)for(var n=0;n<e.length;n++){var r=e[n].split("=");if(r.length>1&&r[0]&&r[0].trim()===t)return r[1]}}return null}function ca(t,e,n){if(i.track&&(navigator&&navigator.cookieEnabled||aa(document,"cookie"))){var r=new Date;r.setDate(r.getDate()+n);var a=t+"="+e+";"+(r?"expires="+r.toUTCString():"")+";path=/";try{if(null===Jr){for(var o=location.hostname?location.hostname.split("."):[],u=o.length-1;u>=0;u--)if(Jr="."+o[u]+(Jr||""),u<o.length-1&&(document.cookie=a+";domain="+Jr,la(t)===e))return;Jr=""}}catch(t){Jr=""}document.cookie=Jr?a+";domain="+Jr:a}}var da,fa=null;function ha(){var t=Vr;fa={version:s,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function pa(){fa=null}function va(t){return fa.start=fa.start+fa.duration,fa.duration=u()-fa.start,fa.sequence++,fa.upload=t&&"sendBeacon"in navigator?1:0,fa.end=t?1:0,[fa.version,fa.sequence,fa.start,fa.duration,fa.projectId,fa.userId,fa.sessionId,fa.pageNum,fa.upload,fa.end]}function ga(){da=[]}function ma(t){if(da&&-1===da.indexOf(t.message)){var e=i.report;if(e&&e.length>0){var n={v:fa.version,p:fa.projectId,u:fa.userId,s:fa.sessionId,n:fa.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var r=new XMLHttpRequest;r.open("POST",e),r.send(JSON.stringify(n)),da.push(t.message)}}return t}function ba(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw ma(t)}var n=performance.now()-e;O(4,n),n>30&&(M(7),N(6,n))}}var ya=[];function wa(t,e,n,r){void 0===r&&(r=!1),n=ba(n);try{t.addEventListener(e,n,r),ya.push({event:e,target:t,listener:n,capture:r})}catch(t){}}function ka(){for(var t=0,e=ya;t<e.length;t++){var n=e[t];try{n.target.removeEventListener(n.event,n.listener,n.capture)}catch(t){}}ya=[]}var Ea=null,Sa=null,Ma=null,Oa=0;function Na(){return!(Oa++>20)||(Xt(4,0),!1)}function _a(){Oa=0,Ma!==Ta()&&(Fa(),window.setTimeout(Ba,250))}function Ta(){return location.href?location.href.replace(location.hash,""):location.href}var xa=!1;function Ia(){xa=!0,o=performance.now(),ht(),ka(),ga(),Ma=Ta(),Oa=0,wa(window,"popstate",_a),null===Ea&&(Ea=history.pushState),history.pushState=function(){Na()&&(Ea.apply(this,arguments),_a())},null===Sa&&(Sa=history.replaceState),history.replaceState=function(){Na()&&(Sa.apply(this,arguments),_a())}}function Da(){null!==Ea&&(history.pushState=Ea,Ea=null),null!==Sa&&(history.replaceState=Sa,Sa=null),Ma=null,Oa=0,ga(),ka(),ht(),o=0,xa=!1}function Ca(){return xa}function ja(t){if(null===t||xa)return!1;for(var e in t)e in i&&(i[e]=t[e]);return!0}function za(){Ba(),w("clarity","restart")}function Ra(){return J(this,void 0,void 0,(function(){var t,e;return Z(this,(function(n){switch(n.label){case 0:return t=u(),mt(e={id:ta(),cost:3}),[4,Vn(document,e,0)];case 1:return n.sent(),[4,Nt(5,e,t)];case 2:return n.sent(),bt(e),[2]}}))}))}var Aa,La=null;function Ya(){La=null}function Ha(t){La={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){J(this,void 0,void 0,(function(){var e,n;return Z(this,(function(r){switch(e=u(),n=[e,t],t){case 29:n.push(La.fetchStart),n.push(La.connectStart),n.push(La.connectEnd),n.push(La.requestStart),n.push(La.responseStart),n.push(La.responseEnd),n.push(La.domInteractive),n.push(La.domComplete),n.push(La.loadEventStart),n.push(La.loadEventEnd),n.push(La.redirectCount),n.push(La.size),n.push(La.type),n.push(La.protocol),n.push(La.encodedSize),n.push(La.decodedSize),Ya(),Tr(n,!1)}return[2]}))}))}(29)}var qa=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint"];function Xa(){try{Aa&&Aa.disconnect(),Aa=new PerformanceObserver(ba(Wa));for(var t=0,e=qa;t<e.length;t++){var n=e[t];PerformanceObserver.supportedEntryTypes.indexOf(n)>=0&&("layout-shift"===n&&O(9,0),Aa.observe({type:n,buffered:!0}))}}catch(t){Xt(3,1)}}function Wa(t){!function(t){for(var e=(!("visibilityState"in document)||"visible"===document.visibilityState),n=0;n<t.length;n++){var r=t[n];switch(r.entryType){case"navigation":Ha(r);break;case"resource":Pr(4,Ua(r.name));break;case"longtask":M(7);break;case"first-input":e&&N(10,r.processingStart-r.startTime);break;case"layout-shift":e&&!r.hadRecentInput&&O(9,1e3*r.value);break;case"largest-contentful-paint":e&&N(8,r.startTime)}}}(t.getEntries())}function Ua(t){var e=document.createElement("a");return e.href=t,e.hostname}var Pa=[Object.freeze({__proto__:null,start:function(){wa(window,"error",Lt),At={},qt={},wa(document,"securitypolicyviolation",Wt)},stop:function(){qt={}}}),Object.freeze({__proto__:null,start:function(){Mt(),Ot(),We(),Re=null,De=new WeakMap,Ce={},je=[],ze=!!window.IntersectionObserver,he(),function(){Gn=[],$n=[],tr=null,er=0,nr={},null===Zn&&(Zn=CSSStyleSheet.prototype.insertRule),null===Kn&&(Kn=CSSStyleSheet.prototype.deleteRule),null===Qn&&(Qn=Element.prototype.attachShadow),CSSStyleSheet.prototype.insertRule=function(){return ur(this.ownerNode),Zn.apply(this,arguments)},CSSStyleSheet.prototype.deleteRule=function(){return ur(this.ownerNode),Kn.apply(this,arguments)};try{Element.prototype.attachShadow=function(){return ur(Qn.apply(this,arguments))}}catch(t){Qn=null}}(),pt(Ra,1).then((function(){ba(Ot)(),ba(Ye)()})),jt(),Dt=null,It=!!window.ResizeObserver},stop:function(){We(),De=null,Ce={},je=[],Re&&(Re.disconnect(),Re=null),ze=!1,pe(),function(){for(var t=0,e=Gn;t<e.length;t++){var n=e[t];n&&n.disconnect()}Gn=[],null!==Zn&&(CSSStyleSheet.prototype.insertRule=Zn,Zn=null),null!==Kn&&(CSSStyleSheet.prototype.deleteRule=Kn,Kn=null),null!=Qn&&(Element.prototype.attachShadow=Qn,Qn=null),nr={},Jn=[],$n=[],er=0,tr=null}(),zt(),Mt()}}),Ln,Object.freeze({__proto__:null,start:function(){Ya(),function(){window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?"complete"!==document.readyState?wa(window,"load",_.bind(this,Xa,0)):Xa():Xt(3,0)}()},stop:function(){Aa&&Aa.disconnect(),Aa=null,Ya()}})];function Ba(t){void 0===t&&(t=null),function(){try{return!1===xa&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(ja(t),Ia(),et(),Pa.forEach((function(t){return ba(t.start)()})))}function Fa(){Ca()&&(Pa.slice().reverse().forEach((function(t){return ba(t.stop)()})),nt(),Da())}var Va=Object.freeze({__proto__:null,version:s,start:Ba,pause:function(){Ca()&&(w("clarity","pause"),null===dt&&(dt=new Promise((function(t){ft=t}))))},resume:function(){Ca()&&(dt&&(ft(),dt=null,null===ct&&vt()),w("clarity","resume"))},stop:Fa,consent:ea,event:w,identify:B,set:P,upgrade:X,metadata:$r});!function(){if("undefined"!=typeof window){var t=window,e="clarity";if(t[e]&&t[e].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var n=t[e]&&t[e].q||[];for(t[e]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return Va[t].apply(Va,e)},t[e].v=s;n.length>0;)t[e].apply(t,n.shift())}}()}();
|
|
1
|
+
!function(){"use strict";var t=Object.freeze({__proto__:null,get track(){return ka},get start(){return _a},get queue(){return Ta},get stop(){return xa}}),e=Object.freeze({__proto__:null,get data(){return Ea},get start(){return Ra},get check(){return Aa},get trigger(){return La},get compute(){return Ya},get stop(){return Ha}}),n=Object.freeze({__proto__:null,get data(){return qa},get updates(){return Xa},get start(){return Wa},get stop(){return Pa},get log(){return Ua},get compute(){return Ba},get reset(){return Fa}}),a=Object.freeze({__proto__:null,get data(){return Va},get callback(){return Ga},get start(){return Za},get userAgentData(){return Ka},get stop(){return Qa},get metadata(){return $a},get id(){return tr},get consent(){return er},get clear(){return nr},get save(){return ar}}),r=Object.freeze({__proto__:null,get data(){return fr},get start(){return hr},get stop(){return pr},get envelope(){return vr}}),i={projectId:null,delay:1e3,lean:!1,track:!0,content:!0,mask:[],unmask:[],regions:[],metrics:[],dimensions:[],cookies:[],report:null,upload:null,fallback:null,upgrade:null};function o(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var u=0;function c(t){return void 0===t&&(t=null),t=t||performance.now(),Math.max(Math.round(t-u),0)}var s="0.6.32";function l(t){for(var e=5381,n=e,a=0;a<t.length;a+=2){if(e=(e<<5)+e^t.charCodeAt(a),a+1<t.length)n=(n<<5)+n^t.charCodeAt(a+1)}return Math.abs(e+11579*n).toString(36)}var d=null,f=null,h=!1;function p(){h&&(d={time:c(),event:4,data:{visible:f.visible,docWidth:f.docWidth,docHeight:f.docHeight,screenWidth:f.screenWidth,screenHeight:f.screenHeight,scrollX:f.scrollX,scrollY:f.scrollY,pointerX:f.pointerX,pointerY:f.pointerY,activityTime:f.activityTime}}),f=f||{visible:1,docWidth:0,docHeight:0,screenWidth:0,screenHeight:0,scrollX:0,scrollY:0,pointerX:0,pointerY:0,activityTime:0}}function v(t,e,n){switch(t){case 8:f.docWidth=e,f.docHeight=n;break;case 11:f.screenWidth=e,f.screenHeight=n;break;case 10:f.scrollX=e,f.scrollY=n;break;default:f.pointerX=e,f.pointerY=n}h=!0}function g(t){f.activityTime=t}function m(t,e){f.visible="visible"===e?1:0,f.visible||g(t),h=!0}function b(){h&&za(4)}var y=Object.freeze({__proto__:null,get state(){return d},start:function(){h=!1,p()},reset:p,track:v,activity:g,visibility:m,compute:b,stop:function(){p()}}),w=null;function k(t,e){Cr()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(w={key:t,value:e},za(24))}var E,S=null,M=null;function O(t,e){void 0===e&&(e=1),t in S||(S[t]=0),t in M||(M[t]=0),S[t]+=e,M[t]+=e}function N(t,e){null!==e&&(t in S||(S[t]=0),t in M||(M[t]=0),S[t]+=e,M[t]+=e)}function _(t,e){null!==e&&!1===isNaN(e)&&(t in S||(S[t]=0),(e>S[t]||0===S[t])&&(M[t]=e,S[t]=e))}function T(t,e,n){return window.setTimeout(br(t),e,n)}function x(t){return window.clearTimeout(t)}var D=0,I=0,C=null;function j(){C&&x(C),C=T(z,I),D=c()}function z(){var t=c();E={gap:t-D},za(25),E.gap<3e5?C=T(z,I):xr&&(k("clarity","suspend"),Gr(),["mousemove","touchstart"].forEach((function(t){return wr(document,t,zr)})),["resize","scroll","pageshow"].forEach((function(t){return wr(window,t,zr)})))}var R=Object.freeze({__proto__:null,get data(){return E},start:function(){I=6e4,D=0},reset:j,stop:function(){x(C),D=0,I=0}}),A=null;function L(t,e){if(t in A){var n=A[t],a=n[n.length-1];e-a[0]>100?A[t].push([e,0]):a[1]=e-a[0]}else A[t]=[[e,0]]}function Y(){za(36)}function H(){A={}}var q=Object.freeze({__proto__:null,get data(){return A},start:function(){A={}},stop:function(){A={}},track:L,compute:Y,reset:H}),X=null;function W(t){Cr()&&i.lean&&(i.lean=!1,X={key:t},ar(),i.upgrade&&i.upgrade(t),za(3))}var P=Object.freeze({__proto__:null,get data(){return X},start:function(){!i.lean&&i.upgrade&&i.upgrade("Config"),X=null},upgrade:W,stop:function(){X=null}}),U=null;function B(t,e){V(t,"string"==typeof e?[e]:e)}function F(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),V("userId",[t]),V("sessionId",[e]),V("pageId",[n])}function V(t,e){if(Cr()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in U?U[t]:[]),a=0;a<e.length;a++)"string"==typeof e[a]&&e[a].length<255&&n.push(e[a]);U[t]=n}}function G(){za(34)}function J(){U={}}function Z(t,e,n,a){return new(n||(n=Promise))((function(r,i){function o(t){try{c(a.next(t))}catch(t){i(t)}}function u(t){try{c(a.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((a=a.apply(t,e||[])).next())}))}function K(t,e){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(r=2&i[0]?a.return:i[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,i[1])).done)return r;switch(a=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,a=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){o.label=i[1];break}if(6===i[0]&&o.label<r[1]){o.label=r[1],r=i;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(i);break}r[2]&&o.ops.pop(),o.trys.pop();continue}i=e.call(t,o)}catch(t){i=[6,t],a=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var Q="CompressionStream"in window;function $(t){return Z(this,void 0,void 0,(function(){var e,n;return K(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),Q?(e=new ReadableStream({start:function(e){return Z(this,void 0,void 0,(function(){return K(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,tt(e)]):[3,2];case 1:return[2,new(n.apply(Uint8Array,[void 0,a.sent()]))];case 2:return[3,4];case 3:return a.sent(),[3,4];case 4:return[2,null]}}))}))}function tt(t){return Z(this,void 0,void 0,(function(){var e,n,a,r,i;return K(this,(function(o){switch(o.label){case 0:e=t.getReader(),n=[],a=!1,r=[],o.label=1;case 1:return a?[3,3]:[4,e.read()];case 2:return i=o.sent(),a=i.done,r=i.value,a?[2,n]:(n.push.apply(n,r),[3,1]);case 3:return[2,n]}}))}))}var et=[y,n,Object.freeze({__proto__:null,get data(){return U},start:function(){J()},set:B,identify:F,compute:G,reset:J,stop:function(){J()}}),e,q,a,r,t,R,P];function nt(){S={},M={},O(5),et.forEach((function(t){return br(t.start)()}))}function at(){et.slice().reverse().forEach((function(t){return br(t.stop)()})),S={},M={}}function rt(){G(),b(),Ba(),za(0),Y(),Ya()}function it(t,e,n,a){if(void 0===a&&(a=!1),t)switch(n){case 0:return t;case 1:switch(e){case"*T":case"value":case"placeholder":return function(t){for(var e=-1,n=!1,a=!1,r=!1,i=null,o=0;o<t.length;o++){var u=t.charCodeAt(o);n=n||u>=48&&u<=57,a=a||64===u,r=9===u||10===u||13===u||32===u,(0===o||o===t.length-1||r)&&((n||a)&&(null===i&&(i=t.split("")),ct(i,e,r?o:o+1)),r&&(n=!1,a=!1,e=o))}return i?i.join(""):t}(t);case"input":return ut(t)}return t;case 2:case 3:switch(e){case"*T":return a?function(t){var e=t.trim();if(e.length>0){var n=e[0],a=t.indexOf(n),r=t.substr(0,a),i=t.substr(a+e.length);return"".concat(r).concat(e.length.toString(36)).concat(i)}return t}(t):ot(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":return ut(t);case"placeholder":return ot(t)}}return t}function ot(t){return t.replace(/\S/gi,"•")}function ut(t){for(var e=5*(Math.floor(t.length/5)+1),n="",a=0;a<e;a++)n+=a>0&&a%5==0?" ":"•";return n}function ct(t,e,n){for(var a=e+1;a<n;a++)t[a]="•"}var st={},lt=[],dt=null,ft=null,ht=null;function pt(){st={},lt=[],dt=null,ft=null}function vt(t,e){return void 0===e&&(e=0),Z(this,void 0,void 0,(function(){var n,a,r;return K(this,(function(i){for(n=0,a=lt;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){lt[1===e?"unshift":"push"]({task:t,resolve:n,id:tr()})})),null===dt&&null===ft&>(),[2,r]}))}))}function gt(){var t=lt.shift();t&&(dt=t,t.task().then((function(){t.id===tr()&&(t.resolve(),dt=null,gt())})).catch((function(e){t.id===tr()&&(e&&Wt(0,1,e.name,e.message,e.stack),dt=null,gt())})))}function mt(t){var e=kt(t);return e in st?performance.now()-st[e].start>st[e].yield?0:1:2}function bt(t){st[kt(t)]={start:performance.now(),calls:0,yield:30}}function yt(t){var e=performance.now(),n=kt(t),a=e-st[n].start;N(t.cost,a),O(5),st[n].calls>0&&N(4,a)}function wt(t){return Z(this,void 0,void 0,(function(){var e,n;return K(this,(function(a){switch(a.label){case 0:return(e=kt(t))in st?(yt(t),n=st[e],[4,Et()]):[3,2];case 1:n.yield=a.sent().timeRemaining(),function(t){var e=kt(t);if(st&&st[e]){var n=st[e].calls,a=st[e].yield;bt(t),st[e].calls=n+1,st[e].yield=a}}(t),a.label=2;case 2:return[2,e in st?1:2]}}))}))}function kt(t){return"".concat(t.id,".").concat(t.cost)}function Et(){return Z(this,void 0,void 0,(function(){return K(this,(function(t){switch(t.label){case 0:return ft?[4,ft]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2,new Promise((function(t){Mt(t,{timeout:5e3})}))]}}))}))}var St,Mt=window.requestIdleCallback||function(t,e){var n=performance.now(),a=new MessageChannel,r=a.port1,i=a.port2;r.onmessage=function(a){var r=performance.now(),o=r-n,u=r-a.data;if(u>30&&o<e.timeout)requestAnimationFrame((function(){i.postMessage(r)}));else{var c=o>e.timeout;t({didTimeout:c,timeRemaining:function(){return c?30:Math.max(0,30-u)}})}},requestAnimationFrame((function(){i.postMessage(performance.now())}))};function Ot(){St=null}function Nt(){var t=document.body,e=document.documentElement,n=t?t.clientWidth:null,a=t?t.scrollWidth:null,r=t?t.offsetWidth:null,i=e?e.clientWidth:null,o=e?e.scrollWidth:null,u=e?e.offsetWidth:null,c=Math.max(n,a,r,i,o,u),s=t?t.clientHeight:null,l=t?t.scrollHeight:null,d=t?t.offsetHeight:null,f=e?e.clientHeight:null,h=e?e.scrollHeight:null,p=e?e.offsetHeight:null,v=Math.max(s,l,d,f,h,p);null!==St&&c===St.width&&v===St.height||null===c||null===v||(St={width:c,height:v},_t(8))}function _t(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),Z(this,void 0,void 0,(function(){var a,r,o,u,s,l,d,f,h,p,m,b,y,w,k,E,S,M,O,N,_,T,x,D,I,C;return K(this,(function(j){switch(j.label){case 0:switch(a=n||c(),r=[a,t],t){case 8:return[3,1];case 7:return[3,2];case 37:return[3,3];case 5:case 6:return[3,4]}return[3,11];case 1:return o=St,r.push(o.width),r.push(o.height),v(t,o.width,o.height),Ta(r),[3,11];case 2:for(u=0,s=De;u<s.length;u++)l=s[u],(r=[l.time,7]).push(l.data.id),r.push(l.data.interaction),r.push(l.data.visibility),r.push(l.data.name),Ta(r);return We(),[3,11];case 3:for(d=0,f=Dt;d<f.length;d++)h=f[d],r.push(h.id),r.push(h.width),r.push(h.height);return zt(),Ta(r),[3,11];case 4:if(2===mt(e))return[3,11];if(!((p=Ne()).length>0))return[3,10];m=0,b=p,j.label=5;case 5:return m<b.length?(y=b[m],0!==(w=mt(e))?[3,7]:[4,wt(e)]):[3,9];case 6:w=j.sent(),j.label=7;case 7:if(2===w)return[3,9];for(k=y.data,E=y.metadata.active,S=y.metadata.suspend,M=y.metadata.privacy,O=function(t){var e=t.metadata.privacy;return"*T"===t.data.tag&&!(0===e||1===e)}(y),N=E?["tag","attributes","value"]:["tag"],function(t){if(!1===It)return;if(Ct=null===Ct?new ResizeObserver(jt):Ct){var e=Se(t);if(e&&null!==e.metadata.size&&0===e.metadata.size.length){var n=Ee(t);if(n&&n.nodeType===Node.ELEMENT_NODE){var a=n,r=a.getBoundingClientRect();e.metadata.size=[Math.floor(100*r.width),Math.floor(100*r.height)],Ct.observe(a)}}}}(y.id),_=0,T=N;_<T.length;_++)if(k[x=T[_]])switch(x){case"tag":D=y.metadata.size,I=O?-1:1,r.push(y.id*I),y.parent&&E&&r.push(y.parent),y.previous&&E&&r.push(y.previous),r.push(S?"*M":k[x]),D&&2===D.length&&r.push("".concat("#").concat(Tt(D[0]),".").concat(Tt(D[1])));break;case"attributes":for(C in k[x])void 0!==k[x][C]&&r.push(xt(C,k[x][C],M));break;case"value":r.push(it(k[x],k.tag,M,O))}j.label=8;case 8:return m++,[3,5];case 9:6===t&&g(a),Ta(function(t){for(var e=[],n={},a=0,r=null,i=0;i<t.length;i++)if("string"==typeof t[i]){var o=t[i],u=n[o]||-1;u>=0?r?r.push(u):(r=[u],e.push(r),a++):(r=null,e.push(o),n[o]=a++)}else r=null,e.push(t[i]),a++;return e}(r),!i.lean),j.label=10;case 10:return[3,11];case 11:return[2]}}))}))}function Tt(t){return t.toString(36)}function xt(t,e,n){return"".concat(t,"=").concat(it(e,t,n))}var Dt=[],It=!1,Ct=null;function jt(t){window.requestAnimationFrame((function(){for(var e=0,n=t;e<n.length;e++){var a=n[e],r=a.target,i=r?me(r):null;if(i){var o=Se(i).metadata.size,u=a.borderBoxSize,c=null,s=null;if(u&&u.length>0)c=Math.floor(100*u[0].inlineSize),s=Math.floor(100*u[0].blockSize);else{var l=r.getBoundingClientRect();c=Math.floor(100*l.width),s=Math.floor(100*l.height)}c!==o[0]&&s!==o[1]&&(o=[c,s],Dt.push({id:i,width:c,height:s}))}}Dt.length>0&&_t(37)}))}function zt(){Dt=[]}function Rt(){zt(),Ct&&(Ct.disconnect(),Ct=null),It=!1}var At,Lt={};function Yt(t){var e=t.error||t;if(e.message in Lt||(Lt[e.message]=0),Lt[e.message]++>=5)return!0;if(e&&e.message){if(At={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},e.message.indexOf("ResizeObserver")>=0)return Rt(),!1;Ht(31)}return!0}function Ht(t){return Z(this,void 0,void 0,(function(){var e;return K(this,(function(n){switch(e=[c(),t],t){case 31:e.push(At.message),e.push(At.line),e.push(At.column),e.push(At.stack),e.push(At.source),Ta(e);break;case 33:qt&&(e.push(qt.code),e.push(qt.name),e.push(qt.message),e.push(qt.stack),e.push(qt.severity),Ta(e,!1))}return[2]}))}))}var qt,Xt={};function Wt(t,e,n,a,r){void 0===n&&(n=null),void 0===a&&(a=null),void 0===r&&(r=null);var i=n?"".concat(n,"|").concat(a):"";t in Xt&&Xt[t].indexOf(i)>=0||(qt={code:t,name:n,message:a,stack:r,severity:e},t in Xt?Xt[t].push(i):Xt[t]=[i],Ht(33))}var Pt=/1/g,Ut=/[^0-9\.]/g,Bt=/[^0-9\.,]/g,Ft={};function Vt(t,e){for(var n=function(e){var n=e[0],a=e[1],r=e[2],i=e[3],o=!0;switch(r){case 0:o=i&&!!top.location.href.match(function(t){return Ft[t]=t in Ft?Ft[t]:new RegExp(t),Ft[t]}(i));break;case 1:o=i&&!!Gt(i)}o&&t.querySelectorAll(a).forEach((function(t){return Ae(t,n.toString())}))},a=0,r=e;a<r.length;a++){n(r[a])}}function Gt(t,e,n){void 0===e&&(e=null),void 0===n&&(n=window);var a=t.split("."),r=a.shift();return n&&n[r]?a.length>0?Gt(a.join("."),e,n[r]):null===e||e===typeof n[r]?n[r]:null:null}function Jt(t){return t?t.substr(0,256):t}function Zt(t,e,n){void 0===n&&(n=!0);try{e=e||1;var a=document.documentElement.lang;if(Intl&&Intl.NumberFormat&&a&&n){t=t.replace(Bt,"");var r=Intl.NumberFormat(a).format(11111).replace(Pt,""),i=Intl.NumberFormat(a).format(1.1).replace(Pt,"");return Math.round(parseFloat(t.replace(new RegExp("\\"+r,"g"),"").replace(new RegExp("\\"+i),"."))*e)}return Math.round(parseFloat(t.replace(Ut,""))*e)}catch(t){return null}}var Kt=["DIV","TR","P","LI","UL","A","BUTTON"];function Qt(t,e){void 0===e&&(e=!1);var n=t.attributes,a=t.prefix?t.prefix[e?1:0]:null,r=e||n&&!("class"in n)||Kt.indexOf(t.tag)>=0?":nth-of-type(".concat(t.position,")"):"";switch(t.tag){case"STYLE":case"TITLE":case"LINK":case"META":case"*T":case"*D":return"";case"HTML":return"HTML";default:if(null===a)return"";a="".concat(a,">"),t.tag=0===t.tag.indexOf("svg:")?t.tag.substr("svg:".length):t.tag;var i="".concat(a).concat(t.tag).concat(r),o="class"in n&&n.class.length>0?n.class.trim().split(/\s+/):null;if(e){var u="id"in n&&n.id.length>0?n.id:null;i=(o="BODY"!==t.tag&&o?o.filter((function(t){return!$t(t)})):[]).length>0?"".concat(a).concat(t.tag,".").concat(o.join(".")).concat(r):i,i=u&&!1===$t(u)?"".concat(function(t){var e=t.lastIndexOf("*S"),n=t.lastIndexOf("".concat("iframe:").concat("HTML")),a=Math.max(e,n);if(a<0)return"";var r=t.indexOf(">",a)+1;return t.substr(0,r)}(a),"#").concat(u):i}else i=o?"".concat(a).concat(t.tag,".").concat(o.join(".")).concat(r):i;return i}}function $t(t){for(var e=0;e<t.length;e++){var n=t.charCodeAt(e);if(n>=48&&n<=57)return!0}return!1}var te=1,ee=["password","hidden","email","tel"],ne=["addr","cell","code","dob","email","mob","name","phone","secret","social","ssn","tel","zip","pass","card","account","cvv","ccv"],ae=["address","password","contact"],re=[],ie=[],oe=[],ue={},ce=[],se=[],le=null,de=null,fe=null;function he(){ve(),ge(document,!0)}function pe(){ve()}function ve(){te=1,re=[],ie=[],oe=[],ue={},ce=[],se=[],le=new WeakMap,de=new WeakMap,fe=new WeakMap}function ge(t,e){void 0===e&&(e=!1);try{e&&i.unmask.forEach((function(t){return t.indexOf("!")<0?se.push(t):ce.push(t.substr(1))})),"querySelectorAll"in t&&(Vt(t,i.regions),function(t,e){for(var n=function(e){var n=e[0],a=e[1],r=e[2],i=e[3];if(r)switch(a){case 0:t.querySelectorAll(r).forEach((function(t){_(n,Zt(t.innerText,i))}));break;case 2:t.querySelectorAll("[".concat(r,"]")).forEach((function(t){_(n,Zt(t.getAttribute(r),i,!1))}));break;case 1:_(n,Gt(r,"number"))}},a=0,r=e;a<r.length;a++)n(r[a])}(t,i.metrics),function(t,e){for(var n=function(e){var n=e[0],a=e[1],r=e[2];if(r)switch(a){case 0:t.querySelectorAll(r).forEach((function(t){Ua(n,Jt(t.innerText))}));break;case 2:t.querySelectorAll("[".concat(r,"]")).forEach((function(t){Ua(n,Jt(t.getAttribute(r)))}));break;case 1:Ua(n,Jt(Gt(r,"string")))}},a=0,r=e;a<r.length;a++)n(r[a])}(t,i.dimensions),i.mask.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return fe.set(t,3)}))})),se.forEach((function(e){return t.querySelectorAll(e).forEach((function(t){return fe.set(t,0)}))})))}catch(t){Wt(5,1,t?t.name:null)}}function me(t,e){if(void 0===e&&(e=!1),null===t)return null;var n=le.get(t);return!n&&e&&(n=te++,le.set(t,n)),n||null}function be(t){var e=!1;if(t.nodeType===Node.ELEMENT_NODE&&"IFRAME"===t.tagName){var n=t;try{n.contentDocument&&(de.set(n.contentDocument,n),e=!0)}catch(t){}}return e}function ye(t){var e=t.nodeType===Node.DOCUMENT_NODE?t:null;return e&&de.has(e)?de.get(e):null}function we(t,e,n){if("object"==typeof t[n]&&"object"==typeof e[n]){for(var a in t[n])if(t[n][a]!==e[n][a])return!0;for(var a in e[n])if(e[n][a]!==t[n][a])return!0;return!1}return t[n]!==e[n]}function ke(t){var e=t.parent&&t.parent in ie?ie[t.parent]:null,n=e?e.selector:null,a=t.data,r=function(t,e){e.metadata.position=1;for(var n=t?t.children.indexOf(e.id):-1;n-- >0;){var a=ie[t.children[n]];if(e.data.tag===a.data.tag){e.metadata.position=a.metadata.position+1;break}}return e.metadata.position}(e,t),i={tag:a.tag,prefix:n,position:r,attributes:a.attributes};t.selector=[Qt(i),Qt(i,!0)],t.hash=t.selector.map((function(t){return t?l(t):null})),t.hash.forEach((function(e){return ue[e]=t.id}))}function Ee(t){return t in re?re[t]:null}function Se(t){return t in ie?ie[t]:null}function Me(t){var e=me(t);return e in ie?ie[e]:null}function Oe(t){return me(t)in re}function Ne(){for(var t=[],e=0,n=oe;e<n.length;e++){var a=n[e];a in ie&&t.push(ie[a])}return oe=[],t}function _e(t){for(var e=null;null===e&&t.previousSibling;)e=me(t.previousSibling),t=t.previousSibling;return e}function Te(t,e,n,a){void 0===n&&(n=!0),void 0===a&&(a=!1);var r=oe.indexOf(t);r>=0&&1===e&&a?(oe.splice(r,1),oe.push(t)):-1===r&&n&&oe.push(t)}var xe=Object.freeze({__proto__:null,start:he,stop:pe,parse:ge,getId:me,add:function(t,e,n,a){var r=me(t,!0),o=e?me(e):null,u=_e(t),c=i.content?1:2,s=null,l=Le(t)?r:null;o>=0&&ie[o]&&((s=ie[o]).children.push(r),l=null===l?s.region:l,c=s.metadata.privacy),c=function(t,e,n,a){var r=e.attributes,i=e.tag.toUpperCase();if(fe.has(t))return fe.get(t);if("*T"===i&&n&&n.data){var o=n.selector?n.selector[0]:"";a="STYLE"===n.data.tag||"TITLE"===n.data.tag?0:a;for(var u=0,c=ce;u<c.length;u++){var s=c[u];if(o.indexOf(s)>=0){a=0;break}}}if(null==r)return a;if("class"in r&&1===a)for(var l=0,d=ae;l<d.length;l++){var f=d[l];if(r.class.indexOf(f)>=0){a=2;break}}if("INPUT"===i)if(0===a){for(var h="",p=0,v=Object.keys(r);p<v.length;p++){h+=r[v[p]].toLowerCase()}for(var g=0,m=ne;g<m.length;g++){var b=m[g];if(h.indexOf(b)>=0){a=2;break}}}else 1===a&&(a=r&&"submit"===r.type?0:2);"type"in r&&ee.indexOf(r.type)>=0&&(a=2);"data-clarity-mask"in r&&(a=3);"data-clarity-unmask"in r&&(a=0);return a}(t,n,s,c),n.attributes&&"data-clarity-region"in n.attributes&&(Ae(t,n.attributes["data-clarity-region"]),l=r),re[r]=t,ie[r]={id:r,parent:o,previous:u,children:[],data:n,selector:null,hash:null,region:l,metadata:{active:!0,suspend:!1,privacy:c,position:null,size:null}},ke(ie[r]),function(t,e){var n=t.data,a="*T"===n.tag&&n.value&&n.value.length>15,r=2===t.metadata.privacy||3===t.metadata.privacy;a&&r&&e&&null===e.metadata.size&&(e.metadata.size=[]);"IMG"===n.tag&&3===t.metadata.privacy&&(t.metadata.size=[])}(ie[r],s),Te(r,a)},update:function(t,e,n,a){var r=me(t),i=e?me(e):null,o=_e(t),u=!1,c=!1;if(r in ie){var s=ie[r];if(s.metadata.active=!0,s.previous!==o&&(u=!0,s.previous=o),s.parent!==i){u=!0;var l=s.parent;if(s.parent=i,null!==i&&i>=0){var d=null===o?0:ie[i].children.indexOf(o)+1;ie[i].children.splice(d,0,r),s.region=Le(t)?r:ie[i].region}else!function(t,e){if(t in ie){var n=ie[t];n.metadata.active=!1,n.parent=null,Te(t,e)}}(r,a);if(null!==l&&l>=0){var f=ie[l].children.indexOf(r);f>=0&&ie[l].children.splice(f,1)}c=!0}for(var h in n)we(s.data,n,h)&&(u=!0,s.data[h]=n[h]);ke(s),Te(r,a,u,c)}},sameorigin:be,iframe:ye,getNode:Ee,getValue:Se,get:Me,lookup:function(t){return t in ue?ue[t]:null},has:Oe,updates:Ne}),De=[],Ie=null,Ce={},je=[],ze=!1,Re=null;function Ae(t,e){!1===Ie.has(t)&&(Ie.set(t,e),(Re=null===Re&&ze?new IntersectionObserver(He,{threshold:[0,.2,.4,.6,.8,1]}):Re)&&t&&t.nodeType===Node.ELEMENT_NODE&&Re.observe(t))}function Le(t){return Ie&&Ie.has(t)}function Ye(){for(var t=[],e=0,n=je;e<n.length;e++){var a=n[e],r=me(a.node);r in Ce||(r?(a.data.id=r,Ce[r]=a.data,De.push(Xe(a.data))):t.push(a))}je=t,De.length>0&&_t(7)}function He(t){for(var e=0,n=t;e<n.length;e++){var a=n[e],r=a.target,i=a.boundingClientRect,o=a.intersectionRect,u=a.rootBounds;if(Ie.has(r)&&i.width+i.height>0&&u.width>0&&u.height>0){var c=r?me(r):null,s=c in Ce?Ce[c]:{id:c,name:Ie.get(r),interaction:16,visibility:0},l=(o?o.width*o.height*1/(u.width*u.height):0)>.05||a.intersectionRatio>.8,d=(l||10==s.visibility)&&Math.abs(i.top)+u.height>i.height;qe(r,s,s.interaction,d?13:l?10:0),s.visibility>=13&&Re&&Re.unobserve(r)}}De.length>0&&_t(7)}function qe(t,e,n,a){var r=n>e.interaction||a>e.visibility;e.interaction=n>e.interaction?n:e.interaction,e.visibility=a>e.visibility?a:e.visibility,e.id?(e.id in Ce&&r||!(e.id in Ce))&&(Ce[e.id]=e,De.push(Xe(e))):je.push({node:t,data:e})}function Xe(t){return{time:c(),data:{id:t.id,interaction:t.interaction,visibility:t.visibility,name:t.name}}}function We(){De=[]}function Pe(t){var e={x:0,y:0};if(t&&t.offsetParent)do{var n=t.offsetParent,a=null===n?ye(t.ownerDocument):null;e.x+=t.offsetLeft,e.y+=t.offsetTop,t=a||n}while(t);return e}var Ue=["input","textarea","radio","button","canvas"],Be=[];function Fe(t){wr(t,"click",Ve.bind(this,9,t),!0)}function Ve(t,e,n){var a=ye(e),r=a?a.contentDocument.documentElement:document.documentElement,i="pageX"in n?Math.round(n.pageX):"clientX"in n?Math.round(n.clientX+r.scrollLeft):null,o="pageY"in n?Math.round(n.pageY):"clientY"in n?Math.round(n.clientY+r.scrollTop):null;if(a){var u=Pe(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}var s=la(n),l=function(t){for(;t&&t!==document;){if(t.nodeType===Node.ELEMENT_NODE){var e=t;if("A"===e.tagName)return e}t=t.parentNode}return null}(s),d=function(t){var e=null,n=document.documentElement;if("function"==typeof t.getBoundingClientRect){var a=t.getBoundingClientRect();a&&a.width>0&&a.height>0&&(e={x:Math.floor(a.left+("pageXOffset"in window?window.pageXOffset:n.scrollLeft)),y:Math.floor(a.top+("pageYOffset"in window?window.pageYOffset:n.scrollTop)),w:Math.floor(a.width),h:Math.floor(a.height)})}return e}(s);0===n.detail&&d&&(i=Math.round(d.x+d.w/2),o=Math.round(d.y+d.h/2));var f=d?Math.max(Math.floor((i-d.x)/d.w*32767),0):0,h=d?Math.max(Math.floor((o-d.y)/d.h*32767),0):0;null!==i&&null!==o&&(Be.push({time:c(),event:t,data:{target:s,x:i,y:o,eX:f,eY:h,button:n.button,reaction:Je(s),context:Ze(l),text:Ge(s),link:l?l.href:null,hash:null}}),vt(fa.bind(this,t)))}function Ge(t){var e=null;if(t){var n=t.textContent||t.value||t.alt;n&&(e=n.trim().replace(/\s+/g," ").substr(0,25))}return e}function Je(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(Ue.indexOf(e)>=0)return 0}return 1}function Ze(t){if(t&&t.hasAttribute("target"))switch(t.getAttribute("target")){case"_blank":return 1;case"_parent":return 2;case"_top":return 3}return 0}function Ke(){Be=[]}var Qe=[];function $e(t,e){Qe.push({time:c(),event:38,data:{target:la(e),action:t}}),vt(fa.bind(this,38))}function tn(){Qe=[]}var en=null,nn=[];function an(t){var e=la(t),n=Me(e);if(e&&e.type&&n){var a=void 0;switch(e.type){case"radio":case"checkbox":a=e.checked?"true":"false";break;case"range":a=e.value;break;default:a=it(e.value,"input",n.metadata.privacy)}var r={target:e,value:a};nn.length>0&&nn[nn.length-1].data.target===r.target&&nn.pop(),nn.push({time:c(),event:27,data:r}),x(en),en=T(rn,500,27)}}function rn(t){vt(fa.bind(this,t))}function on(){nn=[]}var un,cn=[],sn=null;function ln(t,e,n){var a=ye(e),r=a?a.contentDocument.documentElement:document.documentElement,i="pageX"in n?Math.round(n.pageX):"clientX"in n?Math.round(n.clientX+r.scrollLeft):null,o="pageY"in n?Math.round(n.pageY):"clientY"in n?Math.round(n.clientY+r.scrollTop):null;if(a){var u=Pe(a);i=i?i+Math.round(u.x):i,o=o?o+Math.round(u.y):o}null!==i&&null!==o&&fn({time:c(),event:t,data:{target:la(n),x:i,y:o}})}function dn(t,e,n){var a=ye(e),r=a?a.contentDocument.documentElement:document.documentElement,i=n.changedTouches,o=c();if(i)for(var u=0;u<i.length;u++){var s=i[u],l="clientX"in s?Math.round(s.clientX+r.scrollLeft):null,d="clientY"in s?Math.round(s.clientY+r.scrollTop):null;l=l&&a?l+Math.round(a.offsetLeft):l,d=d&&a?d+Math.round(a.offsetTop):d,null!==l&&null!==d&&fn({time:o,event:t,data:{target:la(n),x:l,y:d}})}}function fn(t){switch(t.event){case 12:case 15:case 19:var e=cn.length,n=e>1?cn[e-2]:null;n&&function(t,e){var n=t.data.x-e.data.x,a=t.data.y-e.data.y,r=Math.sqrt(n*n+a*a),i=e.time-t.time,o=e.data.target===t.data.target;return e.event===t.event&&o&&r<20&&i<25}(n,t)&&cn.pop(),cn.push(t),x(sn),sn=T(hn,500,t.event);break;default:cn.push(t),hn(t.event)}}function hn(t){vt(fa.bind(this,t))}function pn(){cn=[]}function vn(){var t=document.documentElement;un={width:t&&"clientWidth"in t?Math.min(t.clientWidth,window.innerWidth):window.innerWidth,height:t&&"clientHeight"in t?Math.min(t.clientHeight,window.innerHeight):window.innerHeight},fa(11)}function gn(){un=null}var mn=[],bn=null;function yn(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?la(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){var r=ye(a);e=r?r.contentWindow:e,a=n=a.documentElement}var i=a===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(a.scrollLeft),o=a===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(a.scrollTop),u={time:c(),event:10,data:{target:a,x:i,y:o}};if((null!==t||0!==i||0!==o)&&null!==i&&null!==o){var s=mn.length,l=s>1?mn[s-2]:null;l&&function(t,e){var n=t.data.x-e.data.x,a=t.data.y-e.data.y;return n*n+a*a<400&&e.time-t.time<25}(l,u)&&mn.pop(),mn.push(u),x(bn),bn=T(wn,500,10)}}function wn(t){vt(fa.bind(this,t))}var kn=null,En=null,Sn=null;function Mn(t){var e=(t.nodeType===Node.DOCUMENT_NODE?t:document).getSelection();if(null!==e&&!(null===e.anchorNode&&null===e.focusNode||e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset)){var n=kn.start?kn.start:null;null!==En&&null!==kn.start&&n!==e.anchorNode&&(x(Sn),On(21)),kn={start:e.anchorNode,startOffset:e.anchorOffset,end:e.focusNode,endOffset:e.focusOffset},En=e,x(Sn),Sn=T(On,500,21)}}function On(t){vt(fa.bind(this,t))}function Nn(){En=null,kn={start:0,startOffset:0,end:0,endOffset:0}}var _n,Tn,xn=[];function Dn(t){xn.push({time:c(),event:39,data:{target:la(t)}}),vt(fa.bind(this,39))}function In(){xn=[]}function Cn(t){_n={name:t.type},fa(26),Gr()}function jn(){_n=null}function zn(){Tn={visible:"visibilityState"in document?document.visibilityState:"default"},fa(28)}function Rn(){Tn=null}function An(t){!function(t){var e=ye(t);wr(e?e.contentWindow:t===document?window:t,"scroll",yn,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Fe(t),function(t){wr(t,"cut",$e.bind(this,0),!0),wr(t,"copy",$e.bind(this,1),!0),wr(t,"paste",$e.bind(this,2),!0)}(t),function(t){wr(t,"mousedown",ln.bind(this,13,t),!0),wr(t,"mouseup",ln.bind(this,14,t),!0),wr(t,"mousemove",ln.bind(this,12,t),!0),wr(t,"mousewheel",ln.bind(this,15,t),!0),wr(t,"dblclick",ln.bind(this,16,t),!0),wr(t,"touchstart",dn.bind(this,17,t),!0),wr(t,"touchend",dn.bind(this,18,t),!0),wr(t,"touchmove",dn.bind(this,19,t),!0),wr(t,"touchcancel",dn.bind(this,20,t),!0)}(t),function(t){wr(t,"input",an,!0)}(t),function(t){wr(t,"selectstart",Mn.bind(this,t),!0),wr(t,"selectionchange",Mn.bind(this,t),!0)}(t),function(t){wr(t,"submit",Dn,!0)}(t))}var Ln=Object.freeze({__proto__:null,start:function(){ha=[],va(),Ke(),tn(),pn(),on(),wr(window,"resize",vn),vn(),wr(document,"visibilitychange",zn),zn(),mn=[],yn(),Nn(),In(),wr(window,"pagehide",Cn)},stop:function(){ha=[],va(),Ke(),tn(),x(sn),cn.length>0&&hn(cn[cn.length-1].event),x(en),on(),gn(),Rn(),x(bn),mn=[],Nn(),x(Sn),In(),jn()},observe:An}),Yn=/[^0-9\.]/g;function Hn(t){for(var e=0,n=Object.keys(t);e<n.length;e++){var a=n[e],r=t[a];if("@type"===a&&"string"==typeof r)switch(r=(r=r.toLowerCase()).indexOf("article")>=0||r.indexOf("posting")>=0?"article":r){case"article":case"recipe":Ua(5,t[a]),Ua(8,t.creator),Ua(18,t.headline);break;case"product":Ua(5,t[a]),Ua(10,t.name),Ua(12,t.sku),t.brand&&Ua(6,t.brand.name);break;case"aggregaterating":t.ratingValue&&(_(11,qn(t.ratingValue,100)),_(18,qn(t.bestRating)),_(19,qn(t.worstRating))),_(12,qn(t.ratingCount)),_(17,qn(t.reviewCount));break;case"person":Ua(8,t.name);break;case"offer":Ua(7,t.availability),Ua(14,t.itemCondition),Ua(13,t.priceCurrency),Ua(12,t.sku),_(13,qn(t.price));break;case"brand":Ua(6,t.name)}null!==r&&"object"==typeof r&&Hn(r)}}function qn(t,e){if(void 0===e&&(e=1),null!==t)switch(typeof t){case"number":return Math.round(t*e);case"string":return Math.round(parseFloat(t.replace(Yn,""))*e)}return null}var Xn=["title","alt","onload","onfocus","onerror"],Wn=/[\r\n]+/g;function Pn(t,e){var n=null;if(2===e&&!1===Oe(t))return n;0!==e&&t.nodeType===Node.TEXT_NODE&&t.parentElement&&"STYLE"===t.parentElement.tagName&&(t=t.parentNode);var a=!1===Oe(t)?"add":"update",r=t.parentElement?t.parentElement:null,i=t.ownerDocument!==document;switch(t.nodeType){case Node.DOCUMENT_TYPE_NODE:r=i&&t.parentNode?ye(t.parentNode):r;var o=t,u={tag:(i?"iframe:":"")+"*D",attributes:{name:o.name,publicId:o.publicId,systemId:o.systemId}};xe[a](t,r,u,e);break;case Node.DOCUMENT_NODE:t===document&&ge(document),Un(t);break;case Node.DOCUMENT_FRAGMENT_NODE:var c=t;if(c.host)if(ge(c),"function"===typeof c.constructor&&c.constructor.toString().indexOf("[native code]")>=0){Un(c);for(var s="",l=0,d=("adoptedStyleSheets"in c?c.adoptedStyleSheets:[]);l<d.length;l++){s+=Fn(d[l])}var f={tag:"*S",attributes:{style:s}};xe[a](t,c.host,f,e)}else xe[a](t,c.host,{tag:"*P",attributes:{}},e);break;case Node.TEXT_NODE:if(r=r||t.parentNode,"update"===a||r&&Oe(r)&&"STYLE"!==r.tagName){var h={tag:"*T",value:t.nodeValue};xe[a](t,r,h,e)}break;case Node.ELEMENT_NODE:var p=t,v=p.tagName,g=function(t){var e={},n=t.attributes;if(n&&n.length>0)for(var a=0;a<n.length;a++){var r=n[a].name;Xn.indexOf(r)<0&&(e[r]=n[a].value)}"INPUT"===t.tagName&&!("value"in e)&&t.value&&(e.value=t.value);return e}(p);switch(r=t.parentElement?t.parentElement:t.parentNode?t.parentNode:null,"http://www.w3.org/2000/svg"===p.namespaceURI&&(v="svg:"+v),v){case"HTML":r=i&&r?ye(r):null;var m={tag:(i?"iframe:":"")+v,attributes:g};xe[a](t,r,m,e);break;case"SCRIPT":if("type"in g&&"application/ld+json"===g.type)try{Hn(JSON.parse(p.text.replace(Wn,"")))}catch(t){}break;case"NOSCRIPT":break;case"META":var b="property"in g?"property":"name"in g?"name":null;if(b&&"content"in g){var y=g.content;switch(g[b]){case"og:title":Ua(20,y);break;case"og:type":Ua(19,y);break;case"generator":Ua(21,y)}}break;case"HEAD":var w={tag:v,attributes:g};location&&(w.attributes["*B"]=location.protocol+"//"+location.hostname),xe[a](t,r,w,e);break;case"STYLE":var k={tag:v,attributes:g,value:Bn(p)};xe[a](t,r,k,e);break;case"IFRAME":var E=t,S={tag:v,attributes:g};be(E)&&(!function(t){!1===Oe(t)&&wr(t,"load",sa.bind(this,t,"childList"),!0)}(E),S.attributes["*O"]="true",E.contentDocument&&E.contentWindow&&"loading"!==E.contentDocument.readyState&&(n=E.contentDocument)),xe[a](t,r,S,e);break;default:var M={tag:v,attributes:g};p.shadowRoot&&(n=p.shadowRoot),xe[a](t,r,M,e)}}return n}function Un(t){Oe(t)||(!function(t){try{var e=o("MutationObserver"),n=e in window?new window[e](br(aa)):null;n&&(n.observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),Gn.push(n))}catch(t){Wt(2,0,t?t.name:null)}}(t),An(t))}function Bn(t){var e=t.textContent?t.textContent.trim():"",n=t.dataset?Object.keys(t.dataset).length:0;return(0===e.length||n>0)&&(e=Fn(t.sheet)),e}function Fn(t){var e="",n=null;try{n=t?t.cssRules:[]}catch(t){if(Wt(1,1,t?t.name:null),t&&"SecurityError"!==t.name)throw t}if(null!==n)for(var a=0;a<n.length;a++)e+=n[a].cssText;return e}function Vn(t,e,n){return Z(this,void 0,void 0,(function(){var a,r,i,o,u;return K(this,(function(c){switch(c.label){case 0:a=[t],c.label=1;case 1:if(!(a.length>0))return[3,4];for(r=a.shift(),i=r.firstChild;i;)a.push(i),i=i.nextSibling;return 0!==(o=mt(e))?[3,3]:[4,wt(e)];case 2:o=c.sent(),c.label=3;case 3:return 2===o?[3,4]:((u=Pn(r,n))&&a.push(u),[3,1]);case 4:return[2]}}))}))}var Gn=[],Jn=[],Zn=null,Kn=null,Qn=null,$n=[],ta=null,ea=null,na={};function aa(t){var e=c();L(6,e),Jn.push({time:e,mutations:t}),vt(ra,1).then((function(){br(Nt)(),br(Ye)()}))}function ra(){return Z(this,void 0,void 0,(function(){var t,e,n,a,r,i,o,u,s;return K(this,(function(l){switch(l.label){case 0:bt(t={id:tr(),cost:3}),l.label=1;case 1:if(!(Jn.length>0))return[3,8];e=Jn.shift(),n=0,a=e.mutations,l.label=2;case 2:return n<a.length?(r=a[n],0!==(i=mt(t))?[3,4]:[4,wt(t)]):[3,6];case 3:i=l.sent(),l.label=4;case 4:if(2===i)return[3,6];switch(o=r.target,u=function(t,e){var n=t.target?Me(t.target.parentNode):null;if(n&&"HTML"!==n.data.tag){var a=c()>ea,r=Me(t.target),i=r&&r.selector?r.selector.join():t.target.nodeName,o=[n.selector?n.selector.join():"",i,t.attributeName,ia(t.addedNodes),ia(t.removedNodes)].join();na[o]=o in na?na[o]:[0];var u=na[o];if(!1===a&&u[0]>=10&&oa(u[1],2,e),u[0]=a?u[0]+1:1,10===u[0])return u[1]=t.removedNodes,"suspend";if(u[0]>10)return""}return t.type}(r,t),u&&o&&o.ownerDocument&&ge(o.ownerDocument),u&&o&&o.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&o.host&&ge(o),u){case"attributes":Pn(o,3);break;case"characterData":Pn(o,4);break;case"childList":oa(r.addedNodes,1,t),oa(r.removedNodes,2,t);break;case"suspend":(s=Me(o))&&(s.metadata.suspend=!0)}l.label=5;case 5:return n++,[3,2];case 6:return[4,_t(6,t,e.time)];case 7:return l.sent(),[3,1];case 8:return yt(t),[2]}}))}))}function ia(t){for(var e=[],n=0;t&&n<t.length;n++)e.push(t[n].nodeName);return e.join()}function oa(t,e,n){return Z(this,void 0,void 0,(function(){var a,r,i;return K(this,(function(o){switch(o.label){case 0:a=t?t.length:0,r=0,o.label=1;case 1:return r<a?1!==e?[3,2]:(Vn(t[r],n,e),[3,5]):[3,6];case 2:return 0!==(i=mt(n))?[3,4]:[4,wt(n)];case 3:i=o.sent(),o.label=4;case 4:if(2===i)return[3,6];Pn(t[r],e),o.label=5;case 5:return r++,[3,1];case 6:return[2]}}))}))}function ua(t){return $n.indexOf(t)<0&&$n.push(t),ta&&x(ta),ta=T(ca,33),t}function ca(){for(var t=0,e=$n;t<e.length;t++){var n=e[t];if(n){var a=n.nodeType===Node.DOCUMENT_FRAGMENT_NODE;if(a&&Oe(n))continue;sa(n,a?"childList":"characterData")}}$n=[]}function sa(t,e){br(aa)([{addedNodes:[t],attributeName:null,attributeNamespace:null,nextSibling:null,oldValue:null,previousSibling:null,removedNodes:[],target:t,type:e}])}function la(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return ea=c()+3e3,n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function da(t,e){var n={id:0,hash:null,privacy:2,node:t};if(t){var a=Me(t);null!==a&&(n.id=a.id,n.hash=a.hash,n.privacy=a.metadata.privacy,a.region&&function(t,e){var n=Ee(t),a=t in Ce?Ce[t]:{id:t,visibility:0,interaction:16,name:Ie.get(n)},r=16;switch(e){case 9:r=20;break;case 27:r=30}qe(n,a,r,a.visibility)}(a.region,e))}return n}function fa(t){return Z(this,void 0,void 0,(function(){var e,n,a,r,i,o,u,s,l,d,f,h,p,g,b,y,w,k,E,S,M,O,N,_,T,x,D,I,C;return K(this,(function(j){switch(e=c(),n=[e,t],t){case 13:case 14:case 12:case 15:case 16:case 17:case 18:case 19:case 20:for(a=0,r=cn;a<r.length;a++)I=r[a],(i=da(I.data.target,I.event)).id>0&&((n=[I.time,I.event]).push(i.id),n.push(I.data.x),n.push(I.data.y),Ta(n),v(I.event,I.data.x,I.data.y));pn();break;case 9:for(o=0,u=Be;o<u.length;o++)I=u[o],s=da(I.data.target,I.event),n=[I.time,I.event],l=s.hash.join("."),n.push(s.id),n.push(I.data.x),n.push(I.data.y),n.push(I.data.eX),n.push(I.data.eY),n.push(I.data.button),n.push(I.data.reaction),n.push(I.data.context),n.push(it(I.data.text,"click",s.privacy)),n.push(I.data.link),n.push(l),Ta(n),ga(I.time,I.event,l,I.data.x,I.data.y,I.data.reaction,I.data.context);Ke();break;case 38:for(d=0,f=Qe;d<f.length;d++)I=f[d],n=[I.time,I.event],(T=da(I.data.target,I.event)).id>0&&(n.push(T.id),n.push(I.data.action),Ta(n));tn();break;case 11:h=un,n.push(h.width),n.push(h.height),v(t,h.width,h.height),gn(),Ta(n);break;case 26:p=_n,n.push(p.name),jn(),Ta(n);break;case 27:for(g=0,b=nn;g<b.length;g++)I=b[g],y=da(I.data.target,I.event),(n=[I.time,I.event]).push(y.id),n.push(I.data.value),Ta(n);on();break;case 21:(w=kn)&&(k=da(w.start,t),E=da(w.end,t),n.push(k.id),n.push(w.startOffset),n.push(E.id),n.push(w.endOffset),Nn(),Ta(n));break;case 10:for(S=0,M=mn;S<M.length;S++)I=M[S],(O=da(I.data.target,I.event)).id>0&&((n=[I.time,I.event]).push(O.id),n.push(I.data.x),n.push(I.data.y),Ta(n),v(I.event,I.data.x,I.data.y));mn=[];break;case 39:for(N=0,_=xn;N<_.length;N++)I=_[N],n=[I.time,I.event],(T=da(I.data.target,I.event)).id>0&&(n.push(T.id),Ta(n));In();break;case 22:for(x=0,D=pa;x<D.length;x++)I=D[x],(n=[I.time,I.event]).push(I.data.type),n.push(I.data.hash),n.push(I.data.x),n.push(I.data.y),n.push(I.data.reaction),n.push(I.data.context),Ta(n,!1);va();break;case 28:C=Tn,n.push(C.visible),Ta(n),m(e,C.visible),Rn()}return[2]}))}))}var ha=[],pa=[];function va(){pa=[]}function ga(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),ha.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),v(e,a,r)}var ma,ba,ya,wa,ka,Ea,Sa=0,Ma=0,Oa=null,Na=0;function _a(){wa=!0,Sa=0,Ma=0,Na=0,ma=[],ba=[],ya={},ka=null}function Ta(t,e){if(void 0===e&&(e=!0),wa){var n=c(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:Sa+=r.length;case 37:case 6:Ma+=r.length,ma.push(r);break;default:ba.push(r)}O(25);var o=function(){var t=!1===i.lean&&Sa>0?100:fr.sequence*i.delay;return"string"==typeof i.upload?Math.max(Math.min(t,3e4),100):i.delay}();n-Na>2*o&&(x(Oa),Oa=null),e&&null===Oa&&(25!==a&&j(),Oa=T(Da,o),Na=n,Aa(Ma))}}function xa(){x(Oa),Da(!0),Sa=0,Ma=0,Na=0,ma=[],ba=[],ya={},ka=null,wa=!1}function Da(t){return void 0===t&&(t=!1),Z(this,void 0,void 0,(function(){var e,n,a,r,o,u,c,s;return K(this,(function(l){switch(l.label){case 0:return Oa=null,(e=!1===i.lean&&Ma>0&&(Ma<1048576||fr.sequence>0))&&_(1,1),Ye(),function(){var t=[];pa=[];for(var e=fr.start+fr.duration,n=Math.max(e-2e3,0),a=0,r=ha;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&pa.push(i),t.push(i))}ha=t,fa(22)}(),rt(),n=!0===t,a=JSON.stringify(vr(n)),r="[".concat(ba.join(),"]"),o=e?"[".concat(ma.join(),"]"):"",u=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:a,a:r,p:o}),n?(s=null,[3,3]):[3,1];case 1:return[4,$(u)];case 2:s=l.sent(),l.label=3;case 3:return N(2,(c=s)?c.length:u.length),Ia(u,c,fr.sequence,n),ba=[],e&&(ma=[],Ma=0,Sa=0),[2]}}))}))}function Ia(t,e,n,a){if(void 0===a&&(a=!1),"string"==typeof i.upload){var r=i.upload,o=!1;if(a&&"sendBeacon"in navigator)try{(o=navigator.sendBeacon.bind(navigator)(r,t))&&ja(n)}catch(t){}if(!1===o){n in ya?ya[n].attempts++:ya[n]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",r),null!==n&&(u.onreadystatechange=function(){br(Ca)(u,n)}),u.withCredentials=!0,e?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(e)):u.send(t)}}else if(i.upload){(0,i.upload)(t),ja(n)}}function Ca(t,e){var n=ya[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?La(6):(0===t.status&&(i.upload=i.fallback?i.fallback:i.upload),Ia(n.data,null,e)):(ka={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&za(2),200===t.status&&t.responseText&&function(t){switch(t&&t.length>0?t.split(" ")[0]:""){case"END":La(6);break;case"UPGRADE":W("Auto")}}(t.responseText),0===t.status&&(Ia(n.data,null,e,!0),La(3)),t.status>=200&&t.status<=208&&ja(e),delete ya[e]))}function ja(t){1===t&&ar()}function za(t){var e=[c(),t];switch(t){case 4:var n=d;n&&((e=[n.time,n.event]).push(n.data.visible),e.push(n.data.docWidth),e.push(n.data.docHeight),e.push(n.data.screenWidth),e.push(n.data.screenHeight),e.push(n.data.scrollX),e.push(n.data.scrollY),e.push(n.data.pointerX),e.push(n.data.pointerY),e.push(n.data.activityTime),Ta(e,!1)),p();break;case 25:e.push(E.gap),Ta(e);break;case 35:e.push(Ea.check),Ta(e,!1);break;case 3:e.push(X.key),Ta(e);break;case 2:e.push(ka.sequence),e.push(ka.attempts),e.push(ka.status),Ta(e,!1);break;case 24:e.push(w.key),e.push(w.value),Ta(e);break;case 34:var a=Object.keys(U);if(a.length>0){for(var r=0,i=a;r<i.length;r++){var o=i[r];e.push(o),e.push(U[o])}J(),Ta(e,!1)}break;case 0:var u=Object.keys(M);if(u.length>0){for(var s=0,l=u;s<l.length;s++){var f=l[s],h=parseInt(f,10);e.push(h),e.push(Math.round(M[f]))}M={},Ta(e,!1)}break;case 1:var v=Object.keys(Xa);if(v.length>0){for(var g=0,m=v;g<m.length;g++){var b=m[g];h=parseInt(b,10);e.push(h),e.push(Xa[b])}Fa(),Ta(e,!1)}break;case 36:var y=Object.keys(A);if(y.length>0){for(var k=0,S=y;k<S.length;k++){var O=S[k];h=parseInt(O,10);e.push(h),e.push([].concat.apply([],A[O]))}H(),Ta(e,!1)}}}function Ra(){Ea={check:0}}function Aa(t){if(0===Ea.check){var e=Ea.check;e=fr.sequence>=128?1:e,e=c()>72e5?2:e,(e=t>10485760?2:e)!==Ea.check&&La(e)}}function La(t){Ea.check=t,nr(),Gr()}function Ya(){0!==Ea.check&&za(35)}function Ha(){Ea=null}var qa=null,Xa=null;function Wa(){qa={},Xa={}}function Pa(){qa={},Xa={}}function Ua(t,e){e&&(e="".concat(e),t in qa||(qa[t]=[]),qa[t].indexOf(e)<0&&(qa[t].push(e),t in Xa||(Xa[t]=[]),Xa[t].push(e),qa[t].length>128&&La(5)))}function Ba(){za(1)}function Fa(){Xa={}}var Va=null,Ga=null,Ja=null;function Za(){Ga=null,Ja=null;var t=navigator&&"userAgent"in navigator?navigator.userAgent:"",e=document&&document.title?document.title:"",n=function(){var t={session:or(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=sr("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-ur(n[1])<18e5&&(t.session=n[0],t.count=ur(n[2])+1,t.upgrade=ur(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),a=cr();Va={projectId:i.projectId||l(location.host),userId:a.id,sessionId:n.session,pageNum:n.count},i.lean=i.track&&null!==n.upgrade?0===n.upgrade:i.lean,i.upload=i.track&&"string"==typeof i.upload&&n.upload&&n.upload.length>"https://".length?n.upload:i.upload,Ua(0,t),Ua(3,e),Ua(1,location.href),Ua(2,document.referrer),Ua(15,function(){var t=or();if(i.track&&rr(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),Ua(16,document.documentElement.lang),Ua(17,document.dir),navigator&&(Ua(9,navigator.userLanguage||navigator.language),_(26,navigator.webdriver?1:0),Ka()),_(0,n.ts),_(1,0),screen&&(_(14,Math.round(screen.width)),_(15,Math.round(screen.height)),_(16,Math.round(screen.colorDepth)));for(var r=0,o=i.cookies;r<o.length;r++){var u=o[r],c=sr(u);c&&B(u,c)}ir(a)}function Ka(){navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;Ua(22,t.platform),Ua(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){Ua(24,t.name+"~"+t.version)})),Ua(25,t.model),_(27,t.mobile?1:0)}))}function Qa(){Ga=null,Ja=null,Va=null}function $a(t,e){void 0===e&&(e=!0),Va&&!1===e?t(Va,!i.lean):Ga=t}function tr(){return Va?[Va.userId,Va.sessionId,Va.pageNum].join("."):""}function er(){Cr()&&(i.track=!0,ir(cr(),1))}function nr(){lr("_clsk","",0)}function ar(){var t=Math.round(Date.now()),e=i.lean?0:1,n=i.upload&&"string"==typeof i.upload?i.upload.replace("https://",""):"";e&&Ga&&Ga(Va,!i.lean),lr("_clsk",[Va.sessionId,t,Va.pageNum,e,n].join("|"),1)}function rr(t,e){try{return!!t[e]}catch(t){return!1}}function ir(t,e){void 0===e&&(e=null),e=null===e?t.consent:e;var n=Math.ceil((Date.now()+31536e6)/864e5);(null===t.expiry||Math.abs(n-t.expiry)>=1||t.consent!==e)&&lr("_clck",[Va.userId,1,n.toString(36),e].join("|"),365)}function or(){var t=Math.floor(Math.random()*Math.pow(2,32));return window&&window.crypto&&window.crypto.getRandomValues&&Uint32Array&&(t=window.crypto.getRandomValues(new Uint32Array(1))[0]),t.toString(36)}function ur(t,e){return void 0===e&&(e=10),parseInt(t,e)}function cr(){var t={id:or(),expiry:null,consent:0},e=sr("_clck");if(e&&e.length>0){for(var n=e.split("|"),a=0,r=0,o=document.cookie.split(";");r<o.length;r++){a+="_clck"===o[r].split("=")[0].trim()?1:0}if(1===n.length||a>1){var u="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(u),document.cookie="".concat("_clsk","=").concat(u)}n.length>2&&(t.expiry=ur(n[2],36)),n.length>3&&1===ur(n[3])&&(t.consent=1),i.track=i.track||1===t.consent,t.id=i.track?n[0]:t.id}return t}function sr(t){if(rr(document,"cookie")){var e=document.cookie.split(";");if(e)for(var n=0;n<e.length;n++){var a=e[n].split("=");if(a.length>1&&a[0]&&a[0].trim()===t)return a[1]}}return null}function lr(t,e,n){if(i.track&&(navigator&&navigator.cookieEnabled||rr(document,"cookie"))){var a=new Date;a.setDate(a.getDate()+n);var r=a?"expires="+a.toUTCString():"",o="".concat(t,"=").concat(e).concat(";").concat(r).concat(";path=/");try{if(null===Ja){for(var u=location.hostname?location.hostname.split("."):[],c=u.length-1;c>=0;c--)if(Ja=".".concat(u[c]).concat(Ja||""),c<u.length-1&&(document.cookie="".concat(o).concat(";").concat("domain=").concat(Ja),sr(t)===e))return;Ja=""}}catch(t){Ja=""}document.cookie=Ja?"".concat(o).concat(";").concat("domain=").concat(Ja):o}}var dr,fr=null;function hr(){var t=Va;fr={version:s,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function pr(){fr=null}function vr(t){return fr.start=fr.start+fr.duration,fr.duration=c()-fr.start,fr.sequence++,fr.upload=t&&"sendBeacon"in navigator?1:0,fr.end=t?1:0,[fr.version,fr.sequence,fr.start,fr.duration,fr.projectId,fr.userId,fr.sessionId,fr.pageNum,fr.upload,fr.end]}function gr(){dr=[]}function mr(t){if(dr&&-1===dr.indexOf(t.message)){var e=i.report;if(e&&e.length>0){var n={v:fr.version,p:fr.projectId,u:fr.userId,s:fr.sessionId,n:fr.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e),a.send(JSON.stringify(n)),dr.push(t.message)}}return t}function br(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw mr(t)}var n=performance.now()-e;N(4,n),n>30&&(O(7),_(6,n))}}var yr=[];function wr(t,e,n,a){void 0===a&&(a=!1),n=br(n);try{t[o("addEventListener")](e,n,a),yr.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function kr(){for(var t=0,e=yr;t<e.length;t++){var n=e[t];try{n.target[o("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}yr=[]}var Er=null,Sr=null,Mr=null,Or=0;function Nr(){return!(Or++>20)||(Wt(4,0),!1)}function _r(){Or=0,Mr!==Tr()&&(Gr(),window.setTimeout(Vr,250))}function Tr(){return location.href?location.href.replace(location.hash,""):location.href}var xr=!1;function Dr(){xr=!0,u=performance.now(),pt(),kr(),gr(),Mr=Tr(),Or=0,wr(window,"popstate",_r),null===Er&&(Er=history.pushState),history.pushState=function(){Nr()&&(Er.apply(this,arguments),_r())},null===Sr&&(Sr=history.replaceState),history.replaceState=function(){Nr()&&(Sr.apply(this,arguments),_r())}}function Ir(){null!==Er&&(history.pushState=Er,Er=null),null!==Sr&&(history.replaceState=Sr,Sr=null),Mr=null,Or=0,gr(),kr(),pt(),u=0,xr=!1}function Cr(){return xr}function jr(t){if(null===t||xr)return!1;for(var e in t)e in i&&(i[e]=t[e]);return!0}function zr(){Vr(),k("clarity","restart")}var Rr=Object.freeze({__proto__:null,start:function(){wr(window,"error",Yt),Lt={},Xt={}},stop:function(){Xt={}}});function Ar(){return Z(this,void 0,void 0,(function(){var t,e;return K(this,(function(n){switch(n.label){case 0:return t=c(),bt(e={id:tr(),cost:3}),[4,Vn(document,e,0)];case 1:return n.sent(),[4,_t(5,e,t)];case 2:return n.sent(),yt(e),[2]}}))}))}var Lr=Object.freeze({__proto__:null,start:function(){Ot(),Nt(),We(),Re=null,Ie=new WeakMap,Ce={},je=[],ze=!!window.IntersectionObserver,he(),function(){Gn=[],$n=[],ta=null,ea=0,na={},null===Zn&&(Zn=CSSStyleSheet.prototype.insertRule),null===Kn&&(Kn=CSSStyleSheet.prototype.deleteRule),null===Qn&&(Qn=Element.prototype.attachShadow),CSSStyleSheet.prototype.insertRule=function(){return ua(this.ownerNode),Zn.apply(this,arguments)},CSSStyleSheet.prototype.deleteRule=function(){return ua(this.ownerNode),Kn.apply(this,arguments)};try{Element.prototype.attachShadow=function(){return ua(Qn.apply(this,arguments))}}catch(t){Qn=null}}(),vt(Ar,1).then((function(){br(Nt)(),br(Ye)()})),zt(),Ct=null,It=!!window.ResizeObserver},stop:function(){We(),Ie=null,Ce={},je=[],Re&&(Re.disconnect(),Re=null),ze=!1,pe(),function(){for(var t=0,e=Gn;t<e.length;t++){var n=e[t];n&&n.disconnect()}Gn=[],null!==Zn&&(CSSStyleSheet.prototype.insertRule=Zn,Zn=null),null!==Kn&&(CSSStyleSheet.prototype.deleteRule=Kn,Kn=null),null!=Qn&&(Element.prototype.attachShadow=Qn,Qn=null),na={},Jn=[],$n=[],ea=0,ta=null}(),Rt(),Ot()}});var Yr,Hr=null;function qr(){Hr=null}function Xr(t){Hr={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){Z(this,void 0,void 0,(function(){var e,n;return K(this,(function(a){return e=c(),n=[e,t],29===t&&(n.push(Hr.fetchStart),n.push(Hr.connectStart),n.push(Hr.connectEnd),n.push(Hr.requestStart),n.push(Hr.responseStart),n.push(Hr.responseEnd),n.push(Hr.domInteractive),n.push(Hr.domComplete),n.push(Hr.loadEventStart),n.push(Hr.loadEventEnd),n.push(Hr.redirectCount),n.push(Hr.size),n.push(Hr.type),n.push(Hr.protocol),n.push(Hr.encodedSize),n.push(Hr.decodedSize),qr(),Ta(n,!1)),[2]}))}))}(29)}var Wr=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint"];function Pr(){try{Yr&&Yr.disconnect(),Yr=new PerformanceObserver(br(Ur));for(var t=0,e=Wr;t<e.length;t++){var n=e[t];PerformanceObserver.supportedEntryTypes.indexOf(n)>=0&&("layout-shift"===n&&N(9,0),Yr.observe({type:n,buffered:!0}))}}catch(t){Wt(3,1)}}function Ur(t){!function(t){for(var e=(!("visibilityState"in document)||"visible"===document.visibilityState),n=0;n<t.length;n++){var a=t[n];switch(a.entryType){case"navigation":Xr(a);break;case"resource":Ua(4,Br(a.name));break;case"longtask":O(7);break;case"first-input":e&&_(10,a.processingStart-a.startTime);break;case"layout-shift":e&&!a.hadRecentInput&&N(9,1e3*a.value);break;case"largest-contentful-paint":e&&_(8,a.startTime)}}}(t.getEntries())}function Br(t){var e=document.createElement("a");return e.href=t,e.hostname}var Fr=[Rr,Lr,Ln,Object.freeze({__proto__:null,start:function(){qr(),function(){window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?"complete"!==document.readyState?wr(window,"load",T.bind(this,Pr,0)):Pr():Wt(3,0)}()},stop:function(){Yr&&Yr.disconnect(),Yr=null,qr()}})];function Vr(t){void 0===t&&(t=null),function(){try{return!1===xr&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(jr(t),Dr(),nt(),Fr.forEach((function(t){return br(t.start)()})))}function Gr(){Cr()&&(Fr.slice().reverse().forEach((function(t){return br(t.stop)()})),at(),Ir())}var Jr=Object.freeze({__proto__:null,version:s,start:Vr,pause:function(){Cr()&&(k("clarity","pause"),null===ft&&(ft=new Promise((function(t){ht=t}))))},resume:function(){Cr()&&(ft&&(ht(),ft=null,null===dt&>()),k("clarity","resume"))},stop:Gr,consent:er,event:k,identify:F,set:B,upgrade:W,metadata:$a});!function(){if("undefined"!=typeof window){var t=window,e="clarity";if(t[e]&&t[e].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var n=t[e]&&t[e].q||[];for(t[e]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return Jr[t].apply(Jr,e)},t[e].v=s;n.length>0;)t[e].apply(t,n.shift())}}()}();
|
package/build/clarity.module.js
CHANGED
|
@@ -63,6 +63,13 @@ var config$1 = {
|
|
|
63
63
|
upgrade: null
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
+
function api(method) {
|
|
67
|
+
// Zone.js, a popular package for Angular, overrides native browser APIs which can lead to inconsistent state for single page applications.
|
|
68
|
+
// Example issue: https://github.com/angular/angular/issues/31712
|
|
69
|
+
// As a work around, we ensuring Clarity access APIs outside of Zone (and use native implementation instead)
|
|
70
|
+
return window["Zone" /* Zone */] && "__symbol__" /* Symbol */ in window["Zone" /* Zone */] ? window["Zone" /* Zone */]["__symbol__" /* Symbol */](method) : method;
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
var startTime = 0;
|
|
67
74
|
function start$E() {
|
|
68
75
|
startTime = performance.now();
|
|
@@ -76,7 +83,7 @@ function stop$B() {
|
|
|
76
83
|
startTime = 0;
|
|
77
84
|
}
|
|
78
85
|
|
|
79
|
-
var version$1 = "0.6.
|
|
86
|
+
var version$1 = "0.6.32";
|
|
80
87
|
|
|
81
88
|
// tslint:disable: no-bitwise
|
|
82
89
|
function hash (input) {
|
|
@@ -610,7 +617,7 @@ function mangleText(value) {
|
|
|
610
617
|
var index = value.indexOf(first);
|
|
611
618
|
var prefix = value.substr(0, index);
|
|
612
619
|
var suffix = value.substr(index + trimmed.length);
|
|
613
|
-
return ""
|
|
620
|
+
return "".concat(prefix).concat(trimmed.length.toString(36)).concat(suffix);
|
|
614
621
|
}
|
|
615
622
|
return value;
|
|
616
623
|
}
|
|
@@ -803,7 +810,7 @@ function suspend$1(timer) {
|
|
|
803
810
|
});
|
|
804
811
|
}
|
|
805
812
|
function key(timer) {
|
|
806
|
-
return timer.id
|
|
813
|
+
return "".concat(timer.id, ".").concat(timer.cost);
|
|
807
814
|
}
|
|
808
815
|
function wait() {
|
|
809
816
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1028,7 +1035,7 @@ function encode$4 (type, timer, ts) {
|
|
|
1028
1035
|
}
|
|
1029
1036
|
tokens.push(suspend ? "*M" /* SuspendMutationTag */ : data[key]);
|
|
1030
1037
|
if (size && size.length === 2) {
|
|
1031
|
-
tokens.push(""
|
|
1038
|
+
tokens.push("".concat("#" /* Box */).concat(str$1(size[0]), ".").concat(str$1(size[1])));
|
|
1032
1039
|
}
|
|
1033
1040
|
break;
|
|
1034
1041
|
case "attributes":
|
|
@@ -1068,7 +1075,7 @@ function str$1(input) {
|
|
|
1068
1075
|
return input.toString(36);
|
|
1069
1076
|
}
|
|
1070
1077
|
function attribute(key, value, privacy) {
|
|
1071
|
-
return key
|
|
1078
|
+
return "".concat(key, "=").concat(scrub(value, key, privacy));
|
|
1072
1079
|
}
|
|
1073
1080
|
|
|
1074
1081
|
var data$b = [];
|
|
@@ -1221,13 +1228,12 @@ var history$3 = {};
|
|
|
1221
1228
|
var data$9;
|
|
1222
1229
|
function start$s() {
|
|
1223
1230
|
history$3 = {};
|
|
1224
|
-
bind(document, "securitypolicyviolation", csp);
|
|
1225
1231
|
}
|
|
1226
1232
|
function log$1(code, severity, name, message, stack) {
|
|
1227
1233
|
if (name === void 0) { name = null; }
|
|
1228
1234
|
if (message === void 0) { message = null; }
|
|
1229
1235
|
if (stack === void 0) { stack = null; }
|
|
1230
|
-
var key = name ? name
|
|
1236
|
+
var key = name ? "".concat(name, "|").concat(message) : "";
|
|
1231
1237
|
// While rare, it's possible for code to fail repeatedly during the lifetime of the same page
|
|
1232
1238
|
// In those cases, we only want to log the failure once and not spam logs with redundant information.
|
|
1233
1239
|
if (code in history$3 && history$3[code].indexOf(key) >= 0) {
|
|
@@ -1243,16 +1249,6 @@ function log$1(code, severity, name, message, stack) {
|
|
|
1243
1249
|
}
|
|
1244
1250
|
encode$3(33 /* Log */);
|
|
1245
1251
|
}
|
|
1246
|
-
function csp(e) {
|
|
1247
|
-
var upload = config$1.upload;
|
|
1248
|
-
// Look for first "/" starting after initial "https://" string
|
|
1249
|
-
var parts = upload && typeof upload === "string" /* String */ ? upload.substr(0, upload.indexOf("/", "https://" /* HTTPS */.length)).split("." /* Dot */) : [];
|
|
1250
|
-
var domain = parts.length >= 2 ? parts.splice(-2).join("." /* Dot */) : null;
|
|
1251
|
-
// Capture content security policy violation only if disposition value is not explicitly set to "report"
|
|
1252
|
-
if (domain && e.blockedURI && e.blockedURI.indexOf(domain) >= 0 && e["disposition"] !== "report" /* Report */) {
|
|
1253
|
-
log$1(7 /* ContentSecurityPolicy */, 1 /* Warning */, e.blockedURI);
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
1252
|
function stop$r() {
|
|
1257
1253
|
history$3 = {};
|
|
1258
1254
|
}
|
|
@@ -1291,7 +1287,7 @@ function metrics(root, value) {
|
|
|
1291
1287
|
root.querySelectorAll(match).forEach(function (e) { max(metricId, num$2(e.innerText, scale)); });
|
|
1292
1288
|
break;
|
|
1293
1289
|
case 2 /* Attribute */:
|
|
1294
|
-
root.querySelectorAll("["
|
|
1290
|
+
root.querySelectorAll("[".concat(match, "]")).forEach(function (e) { max(metricId, num$2(e.getAttribute(match), scale, false)); });
|
|
1295
1291
|
break;
|
|
1296
1292
|
case 1 /* Javascript */:
|
|
1297
1293
|
max(metricId, evaluate(match, "number" /* Number */));
|
|
@@ -1313,7 +1309,7 @@ function dimensions(root, value) {
|
|
|
1313
1309
|
root.querySelectorAll(match).forEach(function (e) { log(dimensionId, str(e.innerText)); });
|
|
1314
1310
|
break;
|
|
1315
1311
|
case 2 /* Attribute */:
|
|
1316
|
-
root.querySelectorAll("["
|
|
1312
|
+
root.querySelectorAll("[".concat(match, "]")).forEach(function (e) { log(dimensionId, str(e.getAttribute(match))); });
|
|
1317
1313
|
break;
|
|
1318
1314
|
case 1 /* Javascript */:
|
|
1319
1315
|
log(dimensionId, str(evaluate(match, "string" /* String */)));
|
|
@@ -1380,7 +1376,7 @@ function selector (input, beta) {
|
|
|
1380
1376
|
if (beta === void 0) { beta = false; }
|
|
1381
1377
|
var a = input.attributes;
|
|
1382
1378
|
var prefix = input.prefix ? input.prefix[beta ? 1 /* Beta */ : 0 /* Stable */] : null;
|
|
1383
|
-
var suffix = beta || ((a && !("class" /* Class */ in a)) || TAGS.indexOf(input.tag) >= 0) ? ":nth-of-type("
|
|
1379
|
+
var suffix = beta || ((a && !("class" /* Class */ in a)) || TAGS.indexOf(input.tag) >= 0) ? ":nth-of-type(".concat(input.position, ")") : "" /* Empty */;
|
|
1384
1380
|
switch (input.tag) {
|
|
1385
1381
|
case "STYLE":
|
|
1386
1382
|
case "TITLE":
|
|
@@ -1395,9 +1391,9 @@ function selector (input, beta) {
|
|
|
1395
1391
|
if (prefix === null) {
|
|
1396
1392
|
return "" /* Empty */;
|
|
1397
1393
|
}
|
|
1398
|
-
prefix = prefix
|
|
1394
|
+
prefix = "".concat(prefix, ">");
|
|
1399
1395
|
input.tag = input.tag.indexOf("svg:" /* SvgPrefix */) === 0 ? input.tag.substr("svg:" /* SvgPrefix */.length) : input.tag;
|
|
1400
|
-
var selector = ""
|
|
1396
|
+
var selector = "".concat(prefix).concat(input.tag).concat(suffix);
|
|
1401
1397
|
var classes = "class" /* Class */ in a && a["class" /* Class */].length > 0 ? a["class" /* Class */].trim().split(/\s+/) : null;
|
|
1402
1398
|
if (beta) {
|
|
1403
1399
|
// In beta mode, update selector to use "id" field when available. There are two exceptions:
|
|
@@ -1405,19 +1401,19 @@ function selector (input, beta) {
|
|
|
1405
1401
|
// (2) if "id" appears inside a shadow DOM, in which case we continue to prefix up to shadow DOM to prevent conflicts
|
|
1406
1402
|
var id = "id" /* Id */ in a && a["id" /* Id */].length > 0 ? a["id" /* Id */] : null;
|
|
1407
1403
|
classes = input.tag !== "BODY" /* BodyTag */ && classes ? classes.filter(function (c) { return !hasDigits(c); }) : [];
|
|
1408
|
-
selector = classes.length > 0 ? ""
|
|
1409
|
-
selector = id && hasDigits(id) === false ? getDomPrefix(prefix)
|
|
1404
|
+
selector = classes.length > 0 ? "".concat(prefix).concat(input.tag, ".").concat(classes.join(".")).concat(suffix) : selector;
|
|
1405
|
+
selector = id && hasDigits(id) === false ? "".concat(getDomPrefix(prefix), "#").concat(id) : selector;
|
|
1410
1406
|
}
|
|
1411
1407
|
else {
|
|
1412
1408
|
// Otherwise, fallback to stable mode, where we include class names as part of the selector
|
|
1413
|
-
selector = classes ? ""
|
|
1409
|
+
selector = classes ? "".concat(prefix).concat(input.tag, ".").concat(classes.join(".")).concat(suffix) : selector;
|
|
1414
1410
|
}
|
|
1415
1411
|
return selector;
|
|
1416
1412
|
}
|
|
1417
1413
|
}
|
|
1418
1414
|
function getDomPrefix(prefix) {
|
|
1419
1415
|
var shadowDomStart = prefix.lastIndexOf("*S" /* ShadowDomTag */);
|
|
1420
|
-
var iframeDomStart = prefix.lastIndexOf(""
|
|
1416
|
+
var iframeDomStart = prefix.lastIndexOf("".concat("iframe:" /* IFramePrefix */).concat("HTML" /* HTML */));
|
|
1421
1417
|
var domStart = Math.max(shadowDomStart, iframeDomStart);
|
|
1422
1418
|
if (domStart < 0) {
|
|
1423
1419
|
return "";
|
|
@@ -2860,11 +2856,8 @@ function observe$1(node) {
|
|
|
2860
2856
|
// For this reason, we need to wire up mutations every time we see a new shadow dom.
|
|
2861
2857
|
// Also, wrap it inside a try / catch. In certain browsers (e.g. legacy Edge), observer on shadow dom can throw errors
|
|
2862
2858
|
try {
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
// As a temporary work around, ensuring Clarity can invoke MutationObserver outside of Zone (and use native implementation instead)
|
|
2866
|
-
var api = window["Zone" /* Zone */] && "__symbol__" /* Symbol */ in window["Zone" /* Zone */] ? window["Zone" /* Zone */]["__symbol__" /* Symbol */]("MutationObserver" /* MutationObserver */) : "MutationObserver" /* MutationObserver */;
|
|
2867
|
-
var observer = api in window ? new window[api](measure(handle$1)) : null;
|
|
2859
|
+
var m = api("MutationObserver" /* MutationObserver */);
|
|
2860
|
+
var observer = m in window ? new window[m](measure(handle$1)) : null;
|
|
2868
2861
|
if (observer) {
|
|
2869
2862
|
observer.observe(node, { attributes: true, childList: true, characterData: true, subtree: true });
|
|
2870
2863
|
observers.push(observer);
|
|
@@ -3085,12 +3078,15 @@ function schedule(node) {
|
|
|
3085
3078
|
function trigger$1() {
|
|
3086
3079
|
for (var _i = 0, queue_1 = queue$1; _i < queue_1.length; _i++) {
|
|
3087
3080
|
var node = queue_1[_i];
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3081
|
+
// Generate a mutation for this node only if it still exists
|
|
3082
|
+
if (node) {
|
|
3083
|
+
var shadowRoot = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
3084
|
+
// Skip re-processing shadowRoot if it was already discovered
|
|
3085
|
+
if (shadowRoot && has(node)) {
|
|
3086
|
+
continue;
|
|
3087
|
+
}
|
|
3088
|
+
generate(node, shadowRoot ? "childList" /* ChildList */ : "characterData" /* CharacterData */);
|
|
3092
3089
|
}
|
|
3093
|
-
generate(node, shadowRoot ? "childList" /* ChildList */ : "characterData" /* CharacterData */);
|
|
3094
3090
|
}
|
|
3095
3091
|
queue$1 = [];
|
|
3096
3092
|
}
|
|
@@ -3442,8 +3438,8 @@ function upload(final) {
|
|
|
3442
3438
|
compute$8();
|
|
3443
3439
|
last = final === true;
|
|
3444
3440
|
e = JSON.stringify(envelope(last));
|
|
3445
|
-
a = "["
|
|
3446
|
-
p = sendPlaybackBytes ? "["
|
|
3441
|
+
a = "[".concat(analysis.join(), "]");
|
|
3442
|
+
p = sendPlaybackBytes ? "[".concat(playback.join(), "]") : "" /* Empty */;
|
|
3447
3443
|
encoded = { e: e, a: a, p: p };
|
|
3448
3444
|
payload = stringify(encoded);
|
|
3449
3445
|
if (!last) return [3 /*break*/, 1];
|
|
@@ -3470,7 +3466,7 @@ function upload(final) {
|
|
|
3470
3466
|
});
|
|
3471
3467
|
}
|
|
3472
3468
|
function stringify(encoded) {
|
|
3473
|
-
return encoded.p.length > 0 ? "{\"e\":"
|
|
3469
|
+
return encoded.p.length > 0 ? "{\"e\":".concat(encoded.e, ",\"a\":").concat(encoded.a, ",\"p\":").concat(encoded.p, "}") : "{\"e\":".concat(encoded.e, ",\"a\":").concat(encoded.a, "}");
|
|
3474
3470
|
}
|
|
3475
3471
|
function send(payload, zipped, sequence, beacon) {
|
|
3476
3472
|
if (beacon === void 0) { beacon = false; }
|
|
@@ -3483,10 +3479,14 @@ function send(payload, zipped, sequence, beacon) {
|
|
|
3483
3479
|
// However, we don't want to rely on it for every payload, since we have no ability to retry if the upload failed.
|
|
3484
3480
|
// Also, in case of sendBeacon, we do not have a way to alter HTTP headers and therefore can't send compressed payload
|
|
3485
3481
|
if (beacon && "sendBeacon" in navigator) {
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3482
|
+
try {
|
|
3483
|
+
// Navigator needs to be bound to sendBeacon before it is used to avoid errors in some browsers
|
|
3484
|
+
dispatched = navigator.sendBeacon.bind(navigator)(url, payload);
|
|
3485
|
+
if (dispatched) {
|
|
3486
|
+
done(sequence);
|
|
3487
|
+
}
|
|
3489
3488
|
}
|
|
3489
|
+
catch ( /* do nothing - and we will automatically fallback to XHR below */_a) { /* do nothing - and we will automatically fallback to XHR below */ }
|
|
3490
3490
|
}
|
|
3491
3491
|
// Before initiating XHR upload, we check if the data has already been uploaded using sendBeacon
|
|
3492
3492
|
// There are two cases when dispatched could still be false:
|
|
@@ -3530,7 +3530,7 @@ function check$3(xhr, sequence) {
|
|
|
3530
3530
|
if (xhr && xhr.readyState === 4 /* Done */ && transitData) {
|
|
3531
3531
|
// Attempt send payload again (as configured in settings) if we do not receive a success (2XX) response code back from the server
|
|
3532
3532
|
if ((xhr.status < 200 || xhr.status > 208) && transitData.attempts <= 1 /* RetryLimit */) {
|
|
3533
|
-
// We re-attempt in all cases except when server explicitly rejects our request with 4XX error
|
|
3533
|
+
// We re-attempt in all cases except when server explicitly rejects our request with 4XX error
|
|
3534
3534
|
if (xhr.status >= 400 && xhr.status < 500) {
|
|
3535
3535
|
// In case of a 4XX response from the server, we bail out instead of trying again
|
|
3536
3536
|
trigger(6 /* Server */);
|
|
@@ -3584,7 +3584,7 @@ function done(sequence) {
|
|
|
3584
3584
|
}
|
|
3585
3585
|
function delay() {
|
|
3586
3586
|
// Progressively increase delay as we continue to send more payloads from the client to the server
|
|
3587
|
-
// If we are not uploading data to a server, and instead invoking UploadCallback, in that case keep returning configured value
|
|
3587
|
+
// If we are not uploading data to a server, and instead invoking UploadCallback, in that case keep returning configured value
|
|
3588
3588
|
var gap = config$1.lean === false && discoverBytes > 0 ? 100 /* MinUploadDelay */ : data$1.sequence * config$1.delay;
|
|
3589
3589
|
return typeof config$1.upload === "string" /* String */ ? Math.max(Math.min(gap, 30000 /* MaxUploadDelay */), 100 /* MinUploadDelay */) : config$1.delay;
|
|
3590
3590
|
}
|
|
@@ -3746,7 +3746,7 @@ function log(dimension, value) {
|
|
|
3746
3746
|
// Check valid value before moving ahead
|
|
3747
3747
|
if (value) {
|
|
3748
3748
|
// Ensure received value is casted into a string if it wasn't a string to begin with
|
|
3749
|
-
value = ""
|
|
3749
|
+
value = "".concat(value);
|
|
3750
3750
|
if (!(dimension in data$3)) {
|
|
3751
3751
|
data$3[dimension] = [];
|
|
3752
3752
|
}
|
|
@@ -3927,7 +3927,7 @@ function session() {
|
|
|
3927
3927
|
output.session = parts[0];
|
|
3928
3928
|
output.count = num(parts[2]) + 1;
|
|
3929
3929
|
output.upgrade = num(parts[3]);
|
|
3930
|
-
output.upload = parts.length >= 6 ? ""
|
|
3930
|
+
output.upload = parts.length >= 6 ? "".concat("https://" /* HTTPS */).concat(parts[5], "/").concat(parts[4]) : "".concat("https://" /* HTTPS */).concat(parts[4]);
|
|
3931
3931
|
}
|
|
3932
3932
|
}
|
|
3933
3933
|
return output;
|
|
@@ -3952,11 +3952,11 @@ function user() {
|
|
|
3952
3952
|
// Check if we either got version-less cookie value or saw multiple copies of the user cookie crumbs
|
|
3953
3953
|
// In both these cases, we go ahead and delete the existing cookie set on current domain
|
|
3954
3954
|
if (parts.length === 1 || count > 1) {
|
|
3955
|
-
var deleted = ""
|
|
3955
|
+
var deleted = "".concat(";" /* Semicolon */).concat("expires=" /* Expires */).concat((new Date(0)).toUTCString()).concat(";path=/" /* Path */);
|
|
3956
3956
|
// First, delete current user cookie which might be set on current sub-domain vs. root domain
|
|
3957
|
-
document.cookie = "_clck" /* CookieKey
|
|
3957
|
+
document.cookie = "".concat("_clck" /* CookieKey */, "=").concat(deleted);
|
|
3958
3958
|
// Second, same thing for current session cookie so it can be re-written later with the root domain
|
|
3959
|
-
document.cookie = "_clsk" /* SessionKey
|
|
3959
|
+
document.cookie = "".concat("_clsk" /* SessionKey */, "=").concat(deleted);
|
|
3960
3960
|
}
|
|
3961
3961
|
// End code for backward compatibility
|
|
3962
3962
|
// Read version information and timestamp from cookie, if available
|
|
@@ -3993,19 +3993,19 @@ function setCookie(key, value, time) {
|
|
|
3993
3993
|
var expiry = new Date();
|
|
3994
3994
|
expiry.setDate(expiry.getDate() + time);
|
|
3995
3995
|
var expires = expiry ? "expires=" /* Expires */ + expiry.toUTCString() : "" /* Empty */;
|
|
3996
|
-
var cookie = key
|
|
3996
|
+
var cookie = "".concat(key, "=").concat(value).concat(";" /* Semicolon */).concat(expires).concat(";path=/" /* Path */);
|
|
3997
3997
|
try {
|
|
3998
3998
|
// Attempt to get the root domain only once and fall back to writing cookie on the current domain.
|
|
3999
3999
|
if (rootDomain === null) {
|
|
4000
4000
|
var hostname = location.hostname ? location.hostname.split("." /* Dot */) : [];
|
|
4001
4001
|
// Walk backwards on a domain and attempt to set a cookie, until successful
|
|
4002
4002
|
for (var i = hostname.length - 1; i >= 0; i--) {
|
|
4003
|
-
rootDomain = "."
|
|
4003
|
+
rootDomain = ".".concat(hostname[i]).concat(rootDomain ? rootDomain : "" /* Empty */);
|
|
4004
4004
|
// We do not wish to attempt writing a cookie on the absolute last part of the domain, e.g. .com or .net.
|
|
4005
4005
|
// So we start attempting after second-last part, e.g. .domain.com (PASS) or .co.uk (FAIL)
|
|
4006
4006
|
if (i < hostname.length - 1) {
|
|
4007
4007
|
// Write the cookie on the current computed top level domain
|
|
4008
|
-
document.cookie = ""
|
|
4008
|
+
document.cookie = "".concat(cookie).concat(";" /* Semicolon */).concat("domain=" /* Domain */).concat(rootDomain);
|
|
4009
4009
|
// Once written, check if the cookie exists and its value matches exactly with what we intended to set
|
|
4010
4010
|
// Checking for exact value match helps us eliminate a corner case where the cookie may already be present with a different value
|
|
4011
4011
|
// If the check is successful, no more action is required and we can return from the function since rootDomain cookie is already set
|
|
@@ -4023,7 +4023,7 @@ function setCookie(key, value, time) {
|
|
|
4023
4023
|
catch (_a) {
|
|
4024
4024
|
rootDomain = "" /* Empty */;
|
|
4025
4025
|
}
|
|
4026
|
-
document.cookie = rootDomain ? ""
|
|
4026
|
+
document.cookie = rootDomain ? "".concat(cookie).concat(";" /* Semicolon */).concat("domain=" /* Domain */).concat(rootDomain) : cookie;
|
|
4027
4027
|
}
|
|
4028
4028
|
}
|
|
4029
4029
|
|
|
@@ -4119,7 +4119,7 @@ function bind(target, event, listener, capture) {
|
|
|
4119
4119
|
// Wrapping following lines inside try / catch to cover edge cases where we might try to access an inaccessible element.
|
|
4120
4120
|
// E.g. Iframe may start off as same-origin but later turn into cross-origin, and the following lines will throw an exception.
|
|
4121
4121
|
try {
|
|
4122
|
-
target
|
|
4122
|
+
target[api("addEventListener" /* AddEventListener */)](event, listener, capture);
|
|
4123
4123
|
bindings.push({ event: event, target: target, listener: listener, capture: capture });
|
|
4124
4124
|
}
|
|
4125
4125
|
catch ( /* do nothing */_a) { /* do nothing */ }
|
|
@@ -4130,7 +4130,7 @@ function reset$1() {
|
|
|
4130
4130
|
var binding = bindings_1[_i];
|
|
4131
4131
|
// Wrapping inside try / catch to avoid situations where the element may be destroyed before we get a chance to unbind
|
|
4132
4132
|
try {
|
|
4133
|
-
binding.target
|
|
4133
|
+
binding.target[api("removeEventListener" /* RemoveEventListener */)](binding.event, binding.listener, binding.capture);
|
|
4134
4134
|
}
|
|
4135
4135
|
catch ( /* do nothing */_a) { /* do nothing */ }
|
|
4136
4136
|
}
|
package/package.json
CHANGED
package/src/core/api.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Constant } from "@clarity-types/core";
|
|
2
|
+
|
|
3
|
+
export default function api(method: string): string {
|
|
4
|
+
// Zone.js, a popular package for Angular, overrides native browser APIs which can lead to inconsistent state for single page applications.
|
|
5
|
+
// Example issue: https://github.com/angular/angular/issues/31712
|
|
6
|
+
// As a work around, we ensuring Clarity access APIs outside of Zone (and use native implementation instead)
|
|
7
|
+
return window[Constant.Zone] && Constant.Symbol in window[Constant.Zone] ? window[Constant.Zone][Constant.Symbol](method) : method;
|
|
8
|
+
}
|
package/src/core/event.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BrowserEvent } from "@clarity-types/core";
|
|
1
|
+
import { BrowserEvent, Constant } from "@clarity-types/core";
|
|
2
|
+
import api from "./api";
|
|
2
3
|
import measure from "./measure";
|
|
3
4
|
|
|
4
5
|
let bindings: BrowserEvent[] = [];
|
|
@@ -8,7 +9,7 @@ export function bind(target: EventTarget, event: string, listener: EventListener
|
|
|
8
9
|
// Wrapping following lines inside try / catch to cover edge cases where we might try to access an inaccessible element.
|
|
9
10
|
// E.g. Iframe may start off as same-origin but later turn into cross-origin, and the following lines will throw an exception.
|
|
10
11
|
try {
|
|
11
|
-
target.
|
|
12
|
+
target[api(Constant.AddEventListener)](event, listener, capture);
|
|
12
13
|
bindings.push({ event, target, listener, capture });
|
|
13
14
|
} catch { /* do nothing */ }
|
|
14
15
|
}
|
|
@@ -18,7 +19,7 @@ export function reset(): void {
|
|
|
18
19
|
for (let binding of bindings) {
|
|
19
20
|
// Wrapping inside try / catch to avoid situations where the element may be destroyed before we get a chance to unbind
|
|
20
21
|
try {
|
|
21
|
-
binding.target.
|
|
22
|
+
binding.target[api(Constant.RemoveEventListener)](binding.event, binding.listener, binding.capture);
|
|
22
23
|
} catch { /* do nothing */ }
|
|
23
24
|
}
|
|
24
25
|
bindings = [];
|
package/src/core/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let version = "0.6.
|
|
1
|
+
let version = "0.6.32";
|
|
2
2
|
export default version;
|
package/src/data/upload.ts
CHANGED
|
@@ -42,7 +42,7 @@ export function queue(tokens: Token[], transmit: boolean = true): void {
|
|
|
42
42
|
let now = time();
|
|
43
43
|
let type = tokens.length > 1 ? tokens[1] : null;
|
|
44
44
|
let event = JSON.stringify(tokens);
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
switch (type) {
|
|
47
47
|
case Event.Discover:
|
|
48
48
|
discoverBytes += event.length;
|
|
@@ -118,12 +118,12 @@ async function upload(final: boolean = false): Promise<void> {
|
|
|
118
118
|
|
|
119
119
|
let p = sendPlaybackBytes ? `[${playback.join()}]` : Constant.Empty;
|
|
120
120
|
let encoded: EncodedPayload = {e, a, p};
|
|
121
|
-
|
|
121
|
+
|
|
122
122
|
// Get the payload ready for sending over the wire
|
|
123
123
|
// We also attempt to compress the payload if it is not the last payload and the browser supports it
|
|
124
124
|
// In all other cases, we continue to send back string value
|
|
125
125
|
let payload = stringify(encoded);
|
|
126
|
-
let zipped = last ? null : await compress(payload)
|
|
126
|
+
let zipped = last ? null : await compress(payload)
|
|
127
127
|
metric.sum(Metric.TotalBytes, zipped ? zipped.length : payload.length);
|
|
128
128
|
send(payload, zipped, envelope.data.sequence, last);
|
|
129
129
|
|
|
@@ -151,8 +151,11 @@ function send(payload: string, zipped: Uint8Array, sequence: number, beacon: boo
|
|
|
151
151
|
// However, we don't want to rely on it for every payload, since we have no ability to retry if the upload failed.
|
|
152
152
|
// Also, in case of sendBeacon, we do not have a way to alter HTTP headers and therefore can't send compressed payload
|
|
153
153
|
if (beacon && "sendBeacon" in navigator) {
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
try {
|
|
155
|
+
// Navigator needs to be bound to sendBeacon before it is used to avoid errors in some browsers
|
|
156
|
+
dispatched = navigator.sendBeacon.bind(navigator)(url, payload);
|
|
157
|
+
if (dispatched) { done(sequence); }
|
|
158
|
+
} catch { /* do nothing - and we will automatically fallback to XHR below */ }
|
|
156
159
|
}
|
|
157
160
|
|
|
158
161
|
// Before initiating XHR upload, we check if the data has already been uploaded using sendBeacon
|
|
@@ -189,7 +192,7 @@ function check(xhr: XMLHttpRequest, sequence: number): void {
|
|
|
189
192
|
if (xhr && xhr.readyState === XMLReadyState.Done && transitData) {
|
|
190
193
|
// Attempt send payload again (as configured in settings) if we do not receive a success (2XX) response code back from the server
|
|
191
194
|
if ((xhr.status < 200 || xhr.status > 208) && transitData.attempts <= Setting.RetryLimit) {
|
|
192
|
-
// We re-attempt in all cases except when server explicitly rejects our request with 4XX error
|
|
195
|
+
// We re-attempt in all cases except when server explicitly rejects our request with 4XX error
|
|
193
196
|
if (xhr.status >= 400 && xhr.status < 500) {
|
|
194
197
|
// In case of a 4XX response from the server, we bail out instead of trying again
|
|
195
198
|
limit.trigger(Check.Server);
|
|
@@ -212,7 +215,7 @@ function check(xhr: XMLHttpRequest, sequence: number): void {
|
|
|
212
215
|
// Handle response if it was a 200 response with a valid body
|
|
213
216
|
if (xhr.status === 200 && xhr.responseText) { response(xhr.responseText); }
|
|
214
217
|
// If we exhausted our retries then trigger Clarity's shutdown for this page since the data will be incomplete
|
|
215
|
-
if (xhr.status === 0) {
|
|
218
|
+
if (xhr.status === 0) {
|
|
216
219
|
// And, right before we terminate the session, we will attempt one last time to see if we can use
|
|
217
220
|
// different transport option (sendBeacon vs. XHR) to get this data to the server for analysis purposes
|
|
218
221
|
send(transitData.data, null, sequence, true);
|
|
@@ -233,7 +236,7 @@ function done(sequence: number): void {
|
|
|
233
236
|
|
|
234
237
|
function delay(): number {
|
|
235
238
|
// Progressively increase delay as we continue to send more payloads from the client to the server
|
|
236
|
-
// If we are not uploading data to a server, and instead invoking UploadCallback, in that case keep returning configured value
|
|
239
|
+
// If we are not uploading data to a server, and instead invoking UploadCallback, in that case keep returning configured value
|
|
237
240
|
let gap = config.lean === false && discoverBytes > 0 ? Setting.MinUploadDelay : envelope.data.sequence * config.delay;
|
|
238
241
|
return typeof config.upload === Constant.String ? Math.max(Math.min(gap, Setting.MaxUploadDelay), Setting.MinUploadDelay) : config.delay;
|
|
239
242
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Code,
|
|
1
|
+
import { Code, Event, Severity } from "@clarity-types/data";
|
|
2
2
|
import { LogData } from "@clarity-types/diagnostic";
|
|
3
|
-
import config from "@src/core/config";
|
|
4
|
-
import { bind } from "@src/core/event";
|
|
5
3
|
import encode from "./encode";
|
|
6
4
|
|
|
7
5
|
let history: { [key: number]: string[] } = {};
|
|
@@ -9,7 +7,6 @@ export let data: LogData;
|
|
|
9
7
|
|
|
10
8
|
export function start(): void {
|
|
11
9
|
history = {};
|
|
12
|
-
bind(document, "securitypolicyviolation", csp);
|
|
13
10
|
}
|
|
14
11
|
|
|
15
12
|
export function log(code: Code, severity: Severity, name: string = null, message: string = null, stack: string = null): void {
|
|
@@ -26,17 +23,6 @@ export function log(code: Code, severity: Severity, name: string = null, message
|
|
|
26
23
|
encode(Event.Log);
|
|
27
24
|
}
|
|
28
25
|
|
|
29
|
-
function csp(e: SecurityPolicyViolationEvent): void {
|
|
30
|
-
let upload = config.upload as string;
|
|
31
|
-
// Look for first "/" starting after initial "https://" string
|
|
32
|
-
let parts = upload && typeof upload === Constant.String ? upload.substr(0, upload.indexOf("/", Constant.HTTPS.length)).split(Constant.Dot) : [];
|
|
33
|
-
let domain = parts.length >= 2 ? parts.splice(-2).join(Constant.Dot) : null;
|
|
34
|
-
// Capture content security policy violation only if disposition value is not explicitly set to "report"
|
|
35
|
-
if (domain && e.blockedURI && e.blockedURI.indexOf(domain) >= 0 && e["disposition"] !== Constant.Report) {
|
|
36
|
-
log(Code.ContentSecurityPolicy, Severity.Warning, e.blockedURI);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
26
|
export function stop(): void {
|
|
41
27
|
history = {};
|
|
42
28
|
}
|
package/src/layout/mutation.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Priority, Task, Timer } from "@clarity-types/core";
|
|
2
2
|
import { Code, Event, Metric, Severity } from "@clarity-types/data";
|
|
3
3
|
import { Constant, MutationHistory, MutationQueue, Setting, Source } from "@clarity-types/layout";
|
|
4
|
+
import api from "@src/core/api";
|
|
4
5
|
import { bind } from "@src/core/event";
|
|
5
6
|
import measure from "@src/core/measure";
|
|
6
7
|
import * as task from "@src/core/task";
|
|
@@ -68,11 +69,8 @@ export function observe(node: Node): void {
|
|
|
68
69
|
// For this reason, we need to wire up mutations every time we see a new shadow dom.
|
|
69
70
|
// Also, wrap it inside a try / catch. In certain browsers (e.g. legacy Edge), observer on shadow dom can throw errors
|
|
70
71
|
try {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// As a temporary work around, ensuring Clarity can invoke MutationObserver outside of Zone (and use native implementation instead)
|
|
74
|
-
let api: string = window[Constant.Zone] && Constant.Symbol in window[Constant.Zone] ? window[Constant.Zone][Constant.Symbol](Constant.MutationObserver) : Constant.MutationObserver;
|
|
75
|
-
let observer = api in window ? new window[api](measure(handle) as MutationCallback) : null;
|
|
72
|
+
let m = api(Constant.MutationObserver);
|
|
73
|
+
let observer = m in window ? new window[m](measure(handle) as MutationCallback) : null;
|
|
76
74
|
if (observer) {
|
|
77
75
|
observer.observe(node, { attributes: true, childList: true, characterData: true, subtree: true });
|
|
78
76
|
observers.push(observer);
|
|
@@ -235,10 +233,13 @@ function schedule(node: Node): Node {
|
|
|
235
233
|
|
|
236
234
|
function trigger(): void {
|
|
237
235
|
for (let node of queue) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
236
|
+
// Generate a mutation for this node only if it still exists
|
|
237
|
+
if (node) {
|
|
238
|
+
let shadowRoot = node.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
|
|
239
|
+
// Skip re-processing shadowRoot if it was already discovered
|
|
240
|
+
if (shadowRoot && dom.has(node)) { continue; }
|
|
241
|
+
generate(node, shadowRoot ? Constant.ChildList : Constant.CharacterData);
|
|
242
|
+
}
|
|
242
243
|
}
|
|
243
244
|
queue = [];
|
|
244
245
|
}
|
package/types/core.d.ts
CHANGED
|
@@ -127,3 +127,10 @@ export interface Config {
|
|
|
127
127
|
fallback?: string;
|
|
128
128
|
upgrade?: (key: string) => void;
|
|
129
129
|
}
|
|
130
|
+
|
|
131
|
+
export const enum Constant {
|
|
132
|
+
Zone = "Zone",
|
|
133
|
+
Symbol = "__symbol__",
|
|
134
|
+
AddEventListener = "addEventListener",
|
|
135
|
+
RemoveEventListener = "removeEventListener"
|
|
136
|
+
}
|
package/types/data.d.ts
CHANGED
package/types/layout.d.ts
CHANGED