clarity-js 0.8.23 → 0.8.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -187,7 +187,7 @@ function stop$G() {
187
187
  startTime = 0;
188
188
  }
189
189
 
190
- var version$1 = "0.8.23";
190
+ var version$1 = "0.8.24";
191
191
 
192
192
  // tslint:disable: no-bitwise
193
193
  function hash (input, precision) {
@@ -1268,7 +1268,6 @@ function observe$c(root) {
1268
1268
  bind(root, "change", recompute$8, true);
1269
1269
  }
1270
1270
  function recompute$8(evt) {
1271
- recompute$8.dn = 5 /* FunctionNames.ChangeRecompute */;
1272
1271
  var element = target(evt);
1273
1272
  if (element) {
1274
1273
  var value = element.value;
@@ -1310,7 +1309,6 @@ function observe$b(root) {
1310
1309
  bind(root, "contextmenu", handler$3.bind(this, 48 /* Event.ContextMenu */, root), true);
1311
1310
  }
1312
1311
  function handler$3(event, root, evt) {
1313
- handler$3.dn = 6 /* FunctionNames.ClickHandler */;
1314
1312
  var frame = iframe(root);
1315
1313
  var d = frame && frame.contentDocument ? frame.contentDocument.documentElement : document.documentElement;
1316
1314
  var x = "pageX" in evt ? Math.round(evt.pageX) : ("clientX" in evt ? Math.round(evt["clientX"] + d.scrollLeft) : null);
@@ -1447,7 +1445,6 @@ function observe$a(root) {
1447
1445
  bind(root, "paste", recompute$7.bind(this, 2 /* Clipboard.Paste */), true);
1448
1446
  }
1449
1447
  function recompute$7(action, evt) {
1450
- recompute$7.dn = 7 /* FunctionNames.ClipboardRecompute */;
1451
1448
  state$8.push({ time: time(evt), event: 38 /* Event.Clipboard */, data: { target: target(evt), action: action } });
1452
1449
  schedule(encode$4.bind(this, 38 /* Event.Clipboard */));
1453
1450
  }
@@ -1467,7 +1464,6 @@ function observe$9(root) {
1467
1464
  bind(root, "input", recompute$6, true);
1468
1465
  }
1469
1466
  function recompute$6(evt) {
1470
- recompute$6.dn = 9 /* FunctionNames.InputRecompute */;
1471
1467
  var input = target(evt);
1472
1468
  var value = get(input);
1473
1469
  if (input && input.type && value) {
@@ -1479,7 +1475,7 @@ function recompute$6(evt) {
1479
1475
  v = input.checked ? "true" : "false";
1480
1476
  break;
1481
1477
  }
1482
- var data = { target: input, value: v, type: t };
1478
+ var data = { target: input, value: v, type: t, trust: evt.isTrusted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */ };
1483
1479
  // If last entry in the queue is for the same target node as the current one, remove it so we can later swap it with current data.
1484
1480
  if (state$7.length > 0 && (state$7[state$7.length - 1].data.target === data.target)) {
1485
1481
  state$7.pop();
@@ -1520,7 +1516,6 @@ function observe$8(root) {
1520
1516
  bind(root, "touchcancel", touch.bind(this, 20 /* Event.TouchCancel */, root), true);
1521
1517
  }
1522
1518
  function mouse(event, root, evt) {
1523
- mouse.dn = 10 /* FunctionNames.PointerMouse */;
1524
1519
  var frame = iframe(root);
1525
1520
  var d = frame && frame.contentDocument ? frame.contentDocument.documentElement : document.documentElement;
1526
1521
  var x = "pageX" in evt ? Math.round(evt.pageX) : ("clientX" in evt ? Math.round(evt["clientX"] + d.scrollLeft) : null);
@@ -1537,7 +1532,6 @@ function mouse(event, root, evt) {
1537
1532
  }
1538
1533
  }
1539
1534
  function touch(event, root, evt) {
1540
- touch.dn = 11 /* FunctionNames.PointerTouch */;
1541
1535
  var frame = iframe(root);
1542
1536
  var d = frame && frame.contentDocument ? frame.contentDocument.documentElement : document.documentElement;
1543
1537
  var touches = evt.changedTouches;
@@ -1681,7 +1675,6 @@ function start$u() {
1681
1675
  recompute$5();
1682
1676
  }
1683
1677
  function recompute$5() {
1684
- recompute$5.dn = 12 /* FunctionNames.ResizeRecompute */;
1685
1678
  var de = document.documentElement;
1686
1679
  // window.innerWidth includes width of the scrollbar and is not a true representation of the viewport width.
1687
1680
  // Therefore, when possible, use documentElement's clientWidth property.
@@ -1725,7 +1718,6 @@ function observe$7(root) {
1725
1718
  }
1726
1719
  function recompute$4(event) {
1727
1720
  if (event === void 0) { event = null; }
1728
- recompute$4.dn = 13 /* FunctionNames.ScrollRecompute */;
1729
1721
  var w = window;
1730
1722
  var de = document.documentElement;
1731
1723
  var element = event ? target(event) : de;
@@ -1802,7 +1794,6 @@ function similar(last, current) {
1802
1794
  }
1803
1795
  function compute$8() {
1804
1796
  var _a, _b;
1805
- compute$8.dn = 14 /* FunctionNames.ScrollCompute */;
1806
1797
  if (initialTop) {
1807
1798
  var top_1 = metadata$2(initialTop, null);
1808
1799
  log(31 /* Dimension.InitialScrollTop */, (_a = top_1 === null || top_1 === void 0 ? void 0 : top_1.hash) === null || _a === void 0 ? void 0 : _a.join("." /* Constant.Dot */));
@@ -1831,7 +1822,6 @@ function observe$6(root) {
1831
1822
  bind(root, "selectionchange", recompute$3.bind(this, root), true);
1832
1823
  }
1833
1824
  function recompute$3(root) {
1834
- recompute$3.dn = 15 /* FunctionNames.SelectionRecompute */;
1835
1825
  var doc = root.nodeType === Node.DOCUMENT_NODE ? root : document;
1836
1826
  var current = doc.getSelection();
1837
1827
  // Bail out if we don't have a valid selection
@@ -1881,7 +1871,6 @@ function observe$5(root) {
1881
1871
  bind(root, "submit", recompute$2, true);
1882
1872
  }
1883
1873
  function recompute$2(evt) {
1884
- recompute$2.dn = 16 /* FunctionNames.SubmitRecompute */;
1885
1874
  state$4.push({ time: time(evt), event: 39 /* Event.Submit */, data: { target: target(evt) } });
1886
1875
  schedule(encode$4.bind(this, 39 /* Event.Submit */));
1887
1876
  }
@@ -1897,7 +1886,6 @@ function start$q() {
1897
1886
  bind(window, "pagehide", recompute$1);
1898
1887
  }
1899
1888
  function recompute$1(evt) {
1900
- recompute$1.dn = 17 /* FunctionNames.UnloadRecompute */;
1901
1889
  data$a = { name: evt.type, persisted: evt.persisted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */ };
1902
1890
  encode$4(26 /* Event.Unload */, time(evt));
1903
1891
  stop();
@@ -1916,7 +1904,6 @@ function start$p() {
1916
1904
  }
1917
1905
  function recompute(evt) {
1918
1906
  if (evt === void 0) { evt = null; }
1919
- recompute.dn = 18 /* FunctionNames.VisibilityRecompute */;
1920
1907
  data$9 = { visible: "visibilityState" in document ? document.visibilityState : "default" };
1921
1908
  encode$4(28 /* Event.Visibility */, time(evt));
1922
1909
  }
@@ -1928,7 +1915,6 @@ function stop$n() {
1928
1915
  }
1929
1916
 
1930
1917
  function start$o() {
1931
- start$o.dn = 8 /* FunctionNames.InteractionStart */;
1932
1918
  start$h();
1933
1919
  start$y();
1934
1920
  start$x();
@@ -2455,7 +2441,6 @@ function start$l() {
2455
2441
  compute$6();
2456
2442
  }
2457
2443
  function compute$6() {
2458
- compute$6.dn = 19 /* FunctionNames.DocumentCompute */;
2459
2444
  var body = document.body;
2460
2445
  var d = document.documentElement;
2461
2446
  var bodyClientWidth = body ? body.clientWidth : null;
@@ -2531,7 +2516,6 @@ var observedNodes = new WeakMap();
2531
2516
  // We ignore mutations if these attributes are updated
2532
2517
  var IGNORED_ATTRIBUTES = ["data-google-query-id", "data-load-complete", "data-google-container-id"];
2533
2518
  function start$k() {
2534
- start$k.dn = 21 /* FunctionNames.MutationStart */;
2535
2519
  observers = new Set();
2536
2520
  queue$2 = [];
2537
2521
  timeout$1 = null;
@@ -2597,7 +2581,6 @@ function disconnect(n) {
2597
2581
  }
2598
2582
  }
2599
2583
  function handle$1(m) {
2600
- handle$1.dn = 22 /* FunctionNames.MutationHandle */;
2601
2584
  // Queue up mutation records for asynchronous processing
2602
2585
  var now = time();
2603
2586
  track$7(6 /* Event.Mutation */, now);
@@ -2851,7 +2834,6 @@ function trigger$1() {
2851
2834
  queue$2 = [];
2852
2835
  }
2853
2836
  function generate(target, type) {
2854
- generate.dn = 23 /* FunctionNames.MutationGenerate */;
2855
2837
  measure(handle$1)([
2856
2838
  {
2857
2839
  addedNodes: [target],
@@ -3828,7 +3810,6 @@ function track$3(id, event) {
3828
3810
  process$1(node, data, interaction, data.visibility);
3829
3811
  }
3830
3812
  function compute$5() {
3831
- compute$5.dn = 24 /* FunctionNames.RegionCompute */;
3832
3813
  // Process any regions where we couldn't resolve an "id" for at the time of last intersection observer event
3833
3814
  // This could happen in cases where elements are not yet processed by Clarity's virtual DOM but browser reports a change, regardless.
3834
3815
  // For those cases we add them to the queue and re-process them below
@@ -4050,6 +4031,7 @@ function encode$4 (type, ts) {
4050
4031
  tokens = [entry.time, entry.event];
4051
4032
  tokens.push(iTarget.id);
4052
4033
  tokens.push(text$1(entry.data.value, "input", iTarget.privacy, false, entry.data.type));
4034
+ tokens.push(entry.data.trust);
4053
4035
  queue(tokens);
4054
4036
  }
4055
4037
  reset$j();
@@ -4480,7 +4462,6 @@ function stringify(encoded) {
4480
4462
  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, "}");
4481
4463
  }
4482
4464
  function send(payload, zipped, sequence, beacon) {
4483
- var _a;
4484
4465
  if (beacon === void 0) { beacon = false; }
4485
4466
  // Upload data if a valid URL is defined in the config
4486
4467
  if (typeof config$2.upload === "string" /* Constant.String */) {
@@ -4497,14 +4478,9 @@ function send(payload, zipped, sequence, beacon) {
4497
4478
  if (dispatched) {
4498
4479
  done(sequence);
4499
4480
  }
4500
- else {
4501
- // If sendBeacon fails, we report the error and continue with XHR upload
4502
- report(new Error("".concat("BeaconError" /* Constant.BeaconError */, ": ").concat(payload.length)));
4503
- }
4504
4481
  }
4505
4482
  catch (error) {
4506
- // If sendBeacon fails, we report the error and continue with XHR upload
4507
- report(new Error("".concat("BeaconError" /* Constant.BeaconError */, ": ").concat((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.substring(0, 50), " : ").concat(payload.length)));
4483
+ // If sendBeacon fails, we do nothing and continue with XHR upload
4508
4484
  }
4509
4485
  }
4510
4486
  // Before initiating XHR upload, we check if the data has already been uploaded using sendBeacon
@@ -4658,7 +4634,6 @@ function start$f() {
4658
4634
  history$3 = {};
4659
4635
  }
4660
4636
  function handler(error) {
4661
- handler.dn = 4 /* FunctionNames.ScriptHandler */;
4662
4637
  var e = error["error"] || error;
4663
4638
  // While rare, it's possible for code to fail repeatedly during the lifetime of the same page
4664
4639
  // In those cases, we only want to log the failure first few times and not spam logs with redundant information.
@@ -5699,7 +5674,6 @@ function measure (method) {
5699
5674
  if (duration > 30 /* Setting.LongTask */) {
5700
5675
  count$1(7 /* Metric.LongTaskCount */);
5701
5676
  max(6 /* Metric.ThreadBlockedTime */, duration);
5702
- log$1(9 /* Code.FunctionExecutionTime */, 0 /* Severity.Info */, "".concat(method.dn || method.name, "-").concat(duration));
5703
5677
  }
5704
5678
  };
5705
5679
  }
@@ -5788,7 +5762,6 @@ function check$1() {
5788
5762
  return true;
5789
5763
  }
5790
5764
  function compute$1() {
5791
- compute$1.dn = 1 /* FunctionNames.HistoryCompute */;
5792
5765
  count = 0; // Reset the counter
5793
5766
  if (url !== getCurrentUrl()) {
5794
5767
  // If the url changed, start tracking it as a new page
@@ -5873,13 +5846,11 @@ function suspend() {
5873
5846
  }
5874
5847
  }
5875
5848
  function restart() {
5876
- restart.dn = 2 /* FunctionNames.Restart */;
5877
5849
  start();
5878
5850
  event("clarity" /* Constant.Clarity */, "restart" /* Constant.Restart */);
5879
5851
  }
5880
5852
 
5881
5853
  function start$4() {
5882
- start$4.dn = 3 /* FunctionNames.DiagnosticStart */;
5883
5854
  start$A();
5884
5855
  start$f();
5885
5856
  start$e();
@@ -5895,7 +5866,6 @@ var diagnostic = /*#__PURE__*/Object.freeze({
5895
5866
  });
5896
5867
 
5897
5868
  function start$3() {
5898
- start$3.dn = 20 /* FunctionNames.LayoutStart */;
5899
5869
  // The order below is important
5900
5870
  // and is determined by interdependencies of modules
5901
5871
  start$l();
@@ -6107,7 +6077,6 @@ function start$2() {
6107
6077
  }
6108
6078
  }
6109
6079
  function observe() {
6110
- observe.dn = 26 /* FunctionNames.ObserverObserve */;
6111
6080
  // Some browsers will throw an error for unsupported entryType, e.g. "layout-shift"
6112
6081
  // In those cases, we log it as a warning and continue with rest of the Clarity processing
6113
6082
  try {
@@ -6136,7 +6105,6 @@ function observe() {
6136
6105
  }
6137
6106
  }
6138
6107
  function handle(entries) {
6139
- handle.dn = 27 /* FunctionNames.ObserverHandle */;
6140
6108
  process(entries.getEntries());
6141
6109
  }
6142
6110
  function process(entries) {
@@ -6202,7 +6170,6 @@ function host(url) {
6202
6170
  }
6203
6171
 
6204
6172
  function start$1() {
6205
- start$1.dn = 25 /* FunctionNames.PerformanceStart */;
6206
6173
  reset();
6207
6174
  start$2();
6208
6175
  }
@@ -1 +1 @@
1
- !function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return Vt},get start(){return Xt},get stop(){return Bt},get track(){return Pt}}),n=Object.freeze({__proto__:null,get check(){return Kt},get compute(){return $t},get data(){return qt},get start(){return Ft},get stop(){return tn},get trigger(){return Qt}}),e=Object.freeze({__proto__:null,get compute(){return cn},get data(){return nn},get log(){return un},get reset(){return sn},get start(){return an},get stop(){return on},get updates(){return en}}),r=Object.freeze({__proto__:null,get callback(){return In},get callbacks(){return dn},get clear(){return En},get consent(){return wn},get consentv2(){return kn},get data(){return ln},get electron(){return pn},get id(){return bn},get metadata(){return yn},get save(){return Tn},get shortid(){return xn},get start(){return gn},get stop(){return mn}}),a=Object.freeze({__proto__:null,get data(){return qn},get envelope(){return Hn},get start(){return Dn},get stop(){return Rn}}),o={projectId:null,delay:1e3,lean:!1,lite:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null,dob:null,delayDom:!1,throttleDom:!0,conversions:!1,includeSubdomains:!0};function i(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var u=0;function c(){return performance.now()+performance.timeOrigin}function s(t){void 0===t&&(t=null);var n=0===u?c():u,e=t&&t.timeStamp>0?t.timeStamp:performance.now(),r=t&&t.view?t.view.performance.timeOrigin:performance.timeOrigin;return Math.max(Math.round(e+r-n),0)}var l="0.8.23";var d=/\S/gi,p=255,f=!0,h=null,v=null,g=null;function m(t,n,e,r,a){if(void 0===r&&(r=!1),t){if("input"==n&&("checkbox"===a||"radio"===a))return t;switch(e){case 0:return t;case 1:switch(n){case"*T":case"value":case"placeholder":case"click":return function(t){var n=-1,e=0,r=!1,a=!1,o=!1,i=null;_();for(var u=0;u<t.length;u++){var c=t.charCodeAt(u);if(r=r||c>=48&&c<=57,a=a||64===c,o=9===c||10===c||13===c||32===c,0===u||u===t.length-1||o){if(r||a){null===i&&(i=t.split(""));var s=t.substring(n+1,o?u:u+1);s=f&&null!==g?s.match(g)?s:k(s,"▪","▫"):w(s),i.splice(n+1-e,s.length,s),e+=s.length-1}o&&(r=!1,a=!1,n=u)}}return i?i.join(""):t}(t);case"input":case"change":return S(t)}return t;case 2:case 3:switch(n){case"*T":case"data-":return r?b(t):w(t);case"src":case"srcset":case"title":case"alt":return 3===e?"src"===n&&(null==t?void 0:t.startsWith("blob:"))?"blob:":"":t;case"value":case"click":case"input":case"change":return S(t);case"placeholder":return w(t)}break;case 4:switch(n){case"*T":case"data-":return r?b(t):w(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}break;case 5:switch(n){case"*T":case"data-":return k(t,"▪","▫");case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":case"src":case"srcset":case"alt":case"title":return""}}}return t}function y(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t;if(n)r="".concat("https://").concat("Electron");else{var a=o.drop;if(a&&a.length>0&&t&&t.indexOf("?")>0){var i=t.split("?"),u=i[0],c=i[1];r=u+"?"+c.split("&").map((function(t){return a.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}}return e&&(r=r.substring(0,p)),r}function b(t){var n=t.trim();if(n.length>0){var e=n[0],r=t.indexOf(e),a=t.substr(0,r),o=t.substr(r+n.length);return"".concat(a).concat(n.length.toString(36)).concat(o)}return t}function w(t){return t.replace(d,"•")}function k(t,n,e){return _(),t?t.replace(v,n).replace(h,e):t}function S(t){for(var n=5*(Math.floor(t.length/5)+1),e="",r=0;r<n;r++)e+=r>0&&r%5==0?" ":"•";return e}function _(){if(f&&null===h)try{h=new RegExp("\\p{N}","gu"),v=new RegExp("\\p{L}","gu"),g=new RegExp("\\p{Sc}","gu")}catch(t){f=!1}}var E=[],I=null;function T(){}var O=[];function M(){}function x(){}function N(){}var j=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:I,hashText:M,keys:O,log:T,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:E,stop:function(){},track:N,trigger:x}),C=null,z=!0;function A(t){q(t.analytics_Storage?1:0),C=t}function P(){q(2)}function q(t){un(36,t.toString())}function D(t){C=t,Gt(47)}function R(){z&&(Gt(47),z=!1)}var H=Object.freeze({__proto__:null,compute:R,config:A,consent:P,consentv2:D,get data(){return C},start:function(){z=!0},stop:function(){z=!0}}),U=null;function L(t,n){le()&&t&&"string"==typeof t&&t.length<255&&(U=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},Gt(24))}var X,V=null,B=null;function Y(t){t in V||(V[t]=0),t in B||(B[t]=0),V[t]++,B[t]++}function W(t,n){null!==n&&(t in V||(V[t]=0),t in B||(B[t]=0),V[t]+=n,B[t]+=n)}function Z(t,n){null!==n&&!1===isNaN(n)&&(t in V||(V[t]=0),(n>V[t]||0===V[t])&&(B[t]=n,V[t]=n))}function J(t,n,e){return window.setTimeout(Xn(t),n,e)}function G(t){return window.clearTimeout(t)}var F=0,K=0,Q=null;function $(){Q&&G(Q),Q=J(tt,K),F=s()}function tt(){var t=s();X={gap:t-F},Gt(25),X.gap<3e5?Q=J(tt,K):ue&&(L("clarity","suspend"),Ae(),["mousemove","touchstart"].forEach((function(t){return Bn(document,t,de)})),["resize","scroll","pageshow"].forEach((function(t){return Bn(window,t,de)})))}var nt=Object.freeze({__proto__:null,get data(){return X},reset:$,start:function(){K=6e4,F=0},stop:function(){G(Q),F=0,K=0}}),et=null;function rt(t){le()&&o.lean&&(o.lean=!1,et={key:t},In(),Tn(),o.upgrade&&o.upgrade(t),Gt(3),o.lite)}var at=Object.freeze({__proto__:null,get data(){return et},start:function(){!o.lean&&o.upgrade&&o.upgrade("Config"),et=null},stop:function(){et=null},upgrade:rt});function ot(t,n,e,r){return new(e||(e=Promise))((function(a,o){function i(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?a(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(i,u)}c((r=r.apply(t,n||[])).next())}))}function it(t,n){var e,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(e=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=n.call(t,i)}catch(t){u=[6,t],r=0}finally{e=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}var ut=null;function ct(t,n){lt(t,"string"==typeof n?[n]:n)}function st(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),ot(this,void 0,void 0,(function(){var a,o;return it(this,(function(i){switch(i.label){case 0:return o={},[4,ft(t)];case 1:return o.userId=i.sent(),o.userHint=r||((u=t)&&u.length>=5?"".concat(u.substring(0,2)).concat(k(u.substring(2),"*","*")):k(u,"*","*")),lt("userId",[(a=o).userId]),lt("userHint",[a.userHint]),lt("userType",[ht(t)]),n&&(lt("sessionId",[n]),a.sessionId=n),e&&(lt("pageId",[e]),a.pageId=e),[2,a]}var u}))}))}function lt(t,n){if(le()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in ut?ut[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);ut[t]=e}}function dt(){Gt(34)}function pt(){ut={}}function ft(t){return ot(this,void 0,void 0,(function(){var n;return it(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),crypto&&t?[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t))]:[3,2];case 1:return n=e.sent(),[2,Array.prototype.map.call(new Uint8Array(n),(function(t){return("00"+t.toString(16)).slice(-2)})).join("")];case 2:return[2,""];case 3:return[3,5];case 4:return e.sent(),[2,""];case 5:return[2]}}))}))}function ht(t){return t&&t.indexOf("@")>0?"email":"string"}var vt="CompressionStream"in window;function gt(t){return ot(this,void 0,void 0,(function(){var n,e;return it(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),vt?(n=new ReadableStream({start:function(n){return ot(this,void 0,void 0,(function(){return it(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,mt(n)]):[3,2];case 1:return[2,new(e.apply(Uint8Array,[void 0,r.sent()]))];case 2:return[3,4];case 3:return r.sent(),[3,4];case 4:return[2,null]}}))}))}function mt(t){return ot(this,void 0,void 0,(function(){var n,e,r,a,o;return it(this,(function(i){switch(i.label){case 0:n=t.getReader(),e=[],r=!1,a=[],i.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=i.sent(),r=o.done,a=o.value,r?[2,e]:(e.push.apply(e,a),[3,1]);case 3:return[2,e]}}))}))}var yt=null;function bt(t){try{if(!yt)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){yt(t)}))}catch(t){}}var wt=[j,e,Object.freeze({__proto__:null,compute:dt,get data(){return ut},identify:st,reset:pt,set:ct,start:function(){pt()},stop:function(){pt()}}),n,j,H,r,a,t,nt,at,j];function kt(){V={},B={},Y(5),wt.forEach((function(t){return Xn(t.start)()}))}function St(){wt.slice().reverse().forEach((function(t){return Xn(t.stop)()})),V={},B={}}function _t(){dt(),cn(),Gt(0),$t(),R()}function Et(t,n,e){return"".concat(t,"=").concat(m(n,0===t.indexOf("data-")?"data-":t,e))}var It=[],Tt=1,Ot=null;function Mt(){It=[],function(t){var n=[t];for(;n.length>0;){for(var e=null,r=null,a=null,o=n.shift(),i=o.firstChild,u=o.parentElement?o.parentElement:o.parentNode?o.parentNode:null;i;)n.push(i),i=i.nextSibling;switch(o.nodeType){case Node.DOCUMENT_TYPE_NODE:var c=o;r="*D",e={name:c.name,publicId:c.publicId,systemId:c.systemId};break;case Node.TEXT_NODE:a=o.nodeValue,r=Ot.get(u)?"*T":r;break;case Node.ELEMENT_NODE:var s=o;e=xt(s),r=["NOSCRIPT","SCRIPT","STYLE"].indexOf(s.tagName)<0?s.tagName:r}Nt(o,u,{tag:r,attributes:e,value:a})}}(document),function(t){ot(this,void 0,void 0,(function(){var n,e,r,a,o,i,u,c,l,d,p,f,h;return it(this,(function(v){switch(n=s(),e=[n,t],t){case 8:r=I,e.push(r.width),e.push(r.height),r.width,r.height,Vt(e);break;case 43:if((a=It).length>0){for(o=0,i=a;o<i.length;o++)for(u=i[o],c=u.metadata.privacy,l=u.data,d=0,p=["tag","attributes","value"];d<p.length;d++)if(l[f=p[d]])switch(f){case"tag":e.push(u.id),u.parent&&e.push(u.parent),u.previous&&e.push(u.previous),e.push(l[f]);break;case"attributes":for(h in l[f])void 0!==l[f][h]&&e.push(Et(h,l[f][h],c));break;case"value":e.push(m(l[f],l.tag,c))}Vt(function(t){for(var n=[],e={},r=0,a=null,o=0;o<t.length;o++)if("string"==typeof t[o]){var i=t[o],u=e[i]||-1;u>=0?a?a.push(u):(a=[u],n.push(a),r++):(a=null,n.push(i),e[i]=r++)}else a=null,n.push(t[o]),r++;return n}(e),!0)}}return[2]}))}))}(43)}function xt(t){var n={},e=t.attributes;if(e&&e.length>0)for(var r=0;r<e.length;r++)n[e[r].name]=e[r].value;return n}function Nt(t,n,e){if(t&&e&&e.tag){var r=function(t){return null===t?null:Ot.has(t)?Ot.get(t):(Ot.set(t,Tt),Tt++)}(t),a=n?Ot.get(n):null,o=t.previousSibling?Ot.get(t.previousSibling):null;It.push({id:r,parent:a,previous:o,children:[],data:e,selector:null,hash:null,region:null,metadata:{active:!0,suspend:!1,privacy:5,position:null,fraud:null,size:null}})}}var jt,Ct,zt,At,Pt,qt,Dt=0,Rt=0,Ht=null,Ut=0,Lt=!1;function Xt(){At=!0,Dt=0,Rt=0,Lt=!1,Ut=0,jt=[],Ct=[],zt={},Pt=null}function Vt(t,n){if(void 0===n&&(n=!0),At){var e=s(),r=t.length>1?t[1]:null,a=JSON.stringify(t);switch(o.lean?!Lt&&Rt+a.length>10485760&&(Lt=!0):Lt=!1,r){case 5:if(Lt)break;Dt+=a.length;case 37:case 6:case 43:case 45:case 46:if(Lt)break;Rt+=a.length,jt.push(a);break;default:Ct.push(a)}Y(25);var i=function(){var t=!1===o.lean&&Dt>0?100:qn.sequence*o.delay;return"string"==typeof o.upload?Math.max(Math.min(t,3e4),100):o.delay}();e-Ut>2*i&&(G(Ht),Ht=null),n&&null===Ht&&(25!==r&&$(),Ht=J(Yt,i),Ut=e,Kt(Rt))}}function Bt(){G(Ht),Yt(!0),Dt=0,Rt=0,Lt=!1,Ut=0,jt=[],Ct=[],zt={},Pt=null,At=!1}function Yt(t){return void 0===t&&(t=!1),ot(this,void 0,void 0,(function(){var n,e,r,a,i,u,c,s;return it(this,(function(l){switch(l.label){case 0:return At?(Ht=null,(n=!1===o.lean&&Rt>0&&(Rt<1048576||qn.sequence>0))&&Z(1,1),_t(),e=!0===t,qn?(r=JSON.stringify(Hn(e)),a="[".concat(Ct.join(),"]"),i=n?"[".concat(jt.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:r,a:a,p:i}),e?(s=null,[3,3]):[3,1]):[2]):[2];case 1:return[4,gt(u)];case 2:s=l.sent(),l.label=3;case 3:return W(2,(c=s)?c.length:u.length),Wt(u,c,qn.sequence,e),Ct=[],n&&(jt=[],Rt=0,Dt=0,Lt=!1),[2]}}))}))}function Wt(t,n,e,r){var a;if(void 0===r&&(r=!1),"string"==typeof o.upload){var i=o.upload,u=!1;if(r&&navigator&&navigator.sendBeacon)try{(u=navigator.sendBeacon.bind(navigator)(i,t))?Jt(e):Ln(new Error("".concat("BeaconError",": ").concat(t.length)))}catch(n){Ln(new Error("".concat("BeaconError",": ").concat(null===(a=null==n?void 0:n.message)||void 0===a?void 0:a.substring(0,50)," : ").concat(t.length)))}if(!1===u){e in zt?zt[e].attempts++:zt[e]={data:t,attempts:1};var c=new XMLHttpRequest;c.open("POST",i,!0),c.timeout=15e3,c.ontimeout=function(){Ln(new Error("".concat("Timeout"," : ").concat(i)))},null!==e&&(c.onreadystatechange=function(){Xn(Zt)(c,e)}),c.withCredentials=!0,n?(c.setRequestHeader("Accept","application/x-clarity-gzip"),c.send(n)):c.send(t)}}else if(o.upload){(0,o.upload)(t),Jt(e)}}function Zt(t,n){var e=zt[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?Qt(6):(0===t.status&&(o.upload=o.fallback?o.fallback:o.upload),Pt={sequence:n,attempts:e.attempts,status:t.status},Gt(2),Wt(e.data,null,n)):(Pt={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&Gt(2),200===t.status&&t.responseText&&function(t){for(var n=t&&t.length>0?t.split("\n"):[],e=0,r=n;e<r.length;e++){var a=r[e],i=a&&a.length>0?a.split(/ (.*)/):[""];switch(i[0]){case"END":Qt(6);break;case"UPGRADE":rt("Auto");break;case"ACTION":o.action&&i.length>1&&o.action(i[1]);break;case"EXTRACT":i.length>1&&i[1];break;case"SIGNAL":i.length>1&&bt(i[1]);break;case"SNAPSHOT":o.lean=!1,Mt()}}}(t.responseText),0===t.status&&(Wt(e.data,null,n,!0),Qt(3)),t.status>=200&&t.status<=208&&Jt(n),delete zt[n]))}function Jt(t){1===t&&(Tn(),In())}function Gt(t){var n=[s(),t];switch(t){case 4:var e=E;e&&e.data&&((n=[e.time,e.event]).push(e.data.visible),n.push(e.data.docWidth),n.push(e.data.docHeight),n.push(e.data.screenWidth),n.push(e.data.screenHeight),n.push(e.data.scrollX),n.push(e.data.scrollY),n.push(e.data.pointerX),n.push(e.data.pointerY),n.push(e.data.activityTime),n.push(e.data.scrollTime),n.push(e.data.pointerTime),n.push(e.data.moveX),n.push(e.data.moveY),n.push(e.data.moveTime),n.push(e.data.downX),n.push(e.data.downY),n.push(e.data.downTime),n.push(e.data.upX),n.push(e.data.upY),n.push(e.data.upTime),n.push(e.data.pointerPrevX),n.push(e.data.pointerPrevY),n.push(e.data.pointerPrevTime),Vt(n,!1));break;case 25:n.push(X.gap),Vt(n);break;case 35:n.push(qt.check),Vt(n,!1);break;case 3:n.push(et.key),Vt(n);break;case 2:n.push(Pt.sequence),n.push(Pt.attempts),n.push(Pt.status),Vt(n,!1);break;case 24:U.key&&n.push(U.key),n.push(U.value),Vt(n);break;case 34:var r=Object.keys(ut);if(r.length>0){for(var a=0,o=r;a<o.length;a++){var i=o[a];n.push(i),n.push(ut[i])}pt(),Vt(n,!1)}break;case 0:var u=Object.keys(B);if(u.length>0){for(var c=0,l=u;c<l.length;c++){var d=l[c],p=parseInt(d,10);n.push(p),n.push(Math.round(B[d]))}B={},Vt(n,!1)}break;case 1:var f=Object.keys(en);if(f.length>0){for(var h=0,v=f;h<v.length;h++){var g=v[h];p=parseInt(g,10);n.push(p),n.push(en[g])}sn(),Vt(n,!1)}break;case 36:var m=Object.keys(I);if(m.length>0){for(var y=0,b=m;y<b.length;y++){var w=b[y];p=parseInt(w,10);n.push(p),n.push([].concat.apply([],I[w]))}Vt(n,!1)}break;case 40:O.forEach((function(t){n.push(t);var e=[];for(var r in I[t]){var a=parseInt(r,10);e.push(a),e.push(I[t][r])}n.push(e)})),Vt(n,!1);break;case 47:n.push(C.source),n.push(C.ad_Storage),n.push(C.analytics_Storage),Vt(n,!1)}}function Ft(){qt={check:0}}function Kt(t){if(0===qt.check){var n=qt.check;n=qn.sequence>=128?1:n,n=qn.pageNum>=128?7:n,n=s()>72e5?2:n,(n=t>10485760?2:n)!==qt.check&&Qt(n)}}function Qt(t){qt.check=t,5!==t&&(En(),Ae())}function $t(){0!==qt.check&&Gt(35)}function tn(){qt=null}var nn=null,en=null,rn=!1;function an(){nn={},en={},rn=!1}function on(){nn={},en={},rn=!1}function un(t,n){if(n&&(n="".concat(n),t in nn||(nn[t]=[]),nn[t].indexOf(n)<0)){if(nn[t].length>128)return void(rn||(rn=!0,Qt(5)));nn[t].push(n),t in en||(en[t]=[]),en[t].push(n)}}function cn(){Gt(1)}function sn(){en={},rn=!1}var ln=null,dn=[],pn=0,fn=null,hn=null,vn={ad_Storage:"denied",analytics_Storage:"denied"};function gn(){var t,n,e;fn=null;var r=navigator&&"userAgent"in navigator?navigator.userAgent:"",a=null!==(e="undefined"!=typeof Intl&&(null===(n=null===(t=null===Intl||void 0===Intl?void 0:Intl.DateTimeFormat())||void 0===t?void 0:t.resolvedOptions())||void 0===n?void 0:n.timeZone))&&void 0!==e?e:"",i=(new Date).getTimezoneOffset().toString(),u=window.location.ancestorOrigins?Array.from(window.location.ancestorOrigins).toString():"",c=document&&document.title?document.title:"";pn=r.indexOf("Electron")>0?1:0;var s=function(){var t={session:xn(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=Cn("_clsk",!o.includeSubdomains);if(n){var e=n.includes("^")?n.split("^"):n.split("|");e.length>=5&&t.ts-Nn(e[1])<18e5&&(t.session=e[0],t.count=Nn(e[2])+1,t.upgrade=Nn(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),l=jn(),d=o.projectId||function(t,n){void 0===n&&(n=null);for(var e,r=5381,a=r,o=0;o<t.length;o+=2)r=(r<<5)+r^t.charCodeAt(o),o+1<t.length&&(a=(a<<5)+a^t.charCodeAt(o+1));return e=Math.abs(r+11579*a),(n?e%Math.pow(2,n):e).toString(36)}(location.host);ln={projectId:d,userId:l.id,sessionId:s.session,pageNum:s.count},o.lean=o.track&&null!==s.upgrade?0===s.upgrade:o.lean,o.upload=o.track&&"string"==typeof o.upload&&s.upload&&s.upload.length>"https://".length?s.upload:o.upload,un(0,r),un(3,c),un(1,y(location.href,!!pn)),un(2,document.referrer),un(15,function(){var t=xn();if(o.track&&On(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),un(16,document.documentElement.lang),un(17,document.dir),un(26,"".concat(window.devicePixelRatio)),un(28,l.dob.toString()),un(29,l.version.toString()),un(33,u),un(34,a),un(35,i),Z(0,s.ts),Z(1,0),Z(35,pn);var p,f=null===window||void 0===window?void 0:window.Zone;f&&"__symbol__"in f&&Z(39,1),navigator&&(un(9,navigator.language),Z(33,navigator.hardwareConcurrency),Z(32,navigator.maxTouchPoints),Z(34,Math.round(navigator.deviceMemory)),(p=navigator.userAgentData)&&p.getHighEntropyValues?p.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;un(22,t.platform),un(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){un(24,t.name+"~"+t.version)})),un(25,t.model),Z(27,t.mobile?1:0)})):un(22,navigator.platform)),screen&&(Z(14,Math.round(screen.width)),Z(15,Math.round(screen.height)),Z(16,Math.round(screen.colorDepth)));for(var h=0,v=o.cookies;h<v.length;h++){var g=v[h],m=Cn(g);m&&ct(g,m)}A(Sn(hn={ad_Storage:o.track?"granted":"denied",analytics_Storage:o.track?"granted":"denied"},0)),Mn(l)}function mn(){fn=null,ln=null,hn=null,dn.forEach((function(t){t.called=!1}))}function yn(t,n,e,r){void 0===n&&(n=!0),void 0===e&&(e=!1),void 0===r&&(r=!1);var a=o.lean?0:1,i=!1;ln&&(a||!1===n)&&(t(ln,!o.lean,r?hn:void 0),i=!0),!e&&i||dn.push({callback:t,wait:n,recall:e,called:i,consentInfo:r})}function bn(){return ln?[ln.userId,ln.sessionId,ln.pageNum].join("."):""}function wn(t){void 0===t&&(t=!0),t?(kn({ad_Storage:"granted",analytics_Storage:"granted"}),P()):kn()}function kn(t,n){void 0===t&&(t=vn),void 0===n&&(n=1),hn={ad_Storage:_n(t.ad_Storage),analytics_Storage:_n(t.analytics_Storage)},In(!0);var e=Sn(hn,n);if(!e.analytics_Storage)return o.track=!1,An("_clsk","",-Number.MAX_VALUE),An("_clck","",-Number.MAX_VALUE),Ae(),void window.setTimeout(ze,250);le()&&(o.track=!0,Mn(jn(),1),Tn(),D(e),P())}function Sn(t,n){return{source:n,ad_Storage:"granted"===t.ad_Storage?1:0,analytics_Storage:"granted"===t.analytics_Storage?1:0}}function _n(t){return"string"==typeof t?t.toLowerCase():"denied"}function En(){An("_clsk","",0)}function In(t){void 0===t&&(t=!1),function(t,n){void 0===n&&(n=!1);if(dn.length>0)for(var e=0;e<dn.length;e++){var r=dn[e];r.callback&&(!r.called&&!n||r.consentInfo&&n)&&(!r.wait||t)&&(r.callback(ln,!o.lean,r.consentInfo?hn:void 0),r.called=!0,r.recall||(dn.splice(e,1),e--))}}(o.lean?0:1,t)}function Tn(){if(ln&&o.track){var t=Math.round(Date.now()),n=o.upload&&"string"==typeof o.upload?o.upload.replace("https://",""):"",e=o.lean?0:1;An("_clsk",[ln.sessionId,t,ln.pageNum,e,n].join("|"),1)}}function On(t,n){try{return!!t[n]}catch(t){return!1}}function Mn(t,n){void 0===n&&(n=null),n=null===n?t.consent:n;var e=Math.ceil((Date.now()+31536e6)/864e5),r=0===t.dob?null===o.dob?0:o.dob:t.dob;(null===t.expiry||Math.abs(e-t.expiry)>=1||t.consent!==n||t.dob!==r)&&An("_clck",[ln.userId,2,e.toString(36),n,r].join("|"),365)}function xn(){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 Nn(t,n){return void 0===n&&(n=10),parseInt(t,n)}function jn(){var t={id:xn(),version:0,expiry:null,consent:0,dob:0},n=Cn("_clck",!o.includeSubdomains);if(n&&n.length>0){var e=n.includes("^")?n.split("^"):n.split("|");e.length>1&&(t.version=Nn(e[1])),e.length>2&&(t.expiry=Nn(e[2],36)),e.length>3&&1===Nn(e[3])&&(t.consent=1),e.length>4&&Nn(e[1])>1&&(t.dob=Nn(e[4])),o.track=o.track||1===t.consent,t.id=o.track?e[0]:t.id}return t}function Cn(t,n){var e;if(void 0===n&&(n=!1),On(document,"cookie")){var r=document.cookie.split(";");if(r)for(var a=0;a<r.length;a++){var o=r[a].split("=");if(o.length>1&&o[0]&&o[0].trim()===t){for(var i=zn(o[1]),u=i[0],c=i[1];u;)u=(e=zn(c))[0],c=e[1];return n?c.endsWith("".concat("~","1"))?c.substring(0,c.length-2):null:c}}}return null}function zn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function An(t,n,e){if((o.track||""==n)&&(navigator&&navigator.cookieEnabled||On(document,"cookie"))){var r=function(t){return encodeURIComponent(t)}(n),a=new Date;a.setDate(a.getDate()+e);var i=a?"expires="+a.toUTCString():"",u="".concat(t,"=").concat(r).concat(";").concat(i).concat(";path=/");try{if(null===fn){for(var c=location.hostname?location.hostname.split("."):[],s=c.length-1;s>=0;s--)if(fn=".".concat(c[s]).concat(fn||""),s<c.length-1&&(document.cookie="".concat(u).concat(";").concat("domain=").concat(fn),Cn(t)===n))return;fn=""}}catch(t){fn=""}document.cookie=fn?"".concat(u).concat(";").concat("domain=").concat(fn):u}}var Pn,qn=null;function Dn(){var t=ln;qn={version:l,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0,applicationPlatform:0,url:""}}function Rn(){qn=null}function Hn(t){return qn.start=qn.start+qn.duration,qn.duration=s()-qn.start,qn.sequence++,qn.upload=t&&"sendBeacon"in navigator?1:0,qn.end=t?1:0,qn.applicationPlatform=0,qn.url=y(location.href,!1,!0),[qn.version,qn.sequence,qn.start,qn.duration,qn.projectId,qn.userId,qn.sessionId,qn.pageNum,qn.upload,qn.end,qn.applicationPlatform,qn.url]}function Un(){Pn=[]}function Ln(t){if(Pn&&-1===Pn.indexOf(t.message)){var n=o.report;if(n&&n.length>0&&qn){var e={v:qn.version,p:qn.projectId,u:qn.userId,s:qn.sessionId,n:qn.pageNum};t.message&&(e.m=t.message),t.stack&&(e.e=t.stack);var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(JSON.stringify(e)),Pn.push(t.message)}}return t}function Xn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw Ln(t)}var e=performance.now()-n;W(4,e),e>30&&(Y(7),Z(6,e),"".concat(t.dn||t.name,"-").concat(e))}}var Vn=new Map;function Bn(t,n,e,r,a){void 0===r&&(r=!1),void 0===a&&(a=!0),e=Xn(e);try{t[i("addEventListener")](n,e,{capture:r,passive:a}),function(t){return Vn.has(t)}(t)||Vn.set(t,[]),Vn.get(t).push({event:n,listener:e,options:{capture:r,passive:a}})}catch(t){}}function Yn(){Vn.forEach((function(t,n){!function(t,n){t.forEach((function(t){try{n[i("removeEventListener")](t.event,t.listener,{capture:t.options.capture,passive:t.options.passive})}catch(t){}})),Vn.delete(n)}(t,n)})),Vn=new Map}var Wn=null,Zn=null,Jn=null,Gn=0;function Fn(){return!(Gn++>20)}function Kn(){Kn.dn=1,Gn=0,Jn!==$n()&&(Ae(),window.setTimeout(Qn,250))}function Qn(){ze(),Z(29,1)}function $n(){return location.href?location.href.replace(location.hash,""):location.href}var te=[],ne=null,ee=null,re=null;function ae(){ee&&(re(),ee=null,null===ne&&ie())}function oe(){te=[],ne=null,ee=null}function ie(){var t=te.shift();t&&(ne=t,t.task().then((function(){t.id===bn()&&(t.resolve(),ne=null,ie())})).catch((function(n){t.id===bn()&&(n&&(n.name,n.message,n.stack),ne=null,ie())})))}var ue=!1;function ce(){ue=!0,u=c(),oe(),Yn(),Un(),Jn=$n(),Gn=0,Bn(window,"popstate",Kn),null===Wn&&(Wn=history.pushState,history.pushState=function(){Wn.apply(this,arguments),le()&&Fn()&&Kn()}),null===Zn&&(Zn=history.replaceState,history.replaceState=function(){Zn.apply(this,arguments),le()&&Fn()&&Kn()})}function se(){Jn=null,Gn=0,Un(),Yn(),oe(),u=0,ue=!1}function le(){return ue}function de(){de.dn=2,ze(),L("clarity","restart")}var pe=null;function fe(){pe=null}function he(t){pe={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){ot(this,void 0,void 0,(function(){var n,e;return it(this,(function(r){return n=s(),e=[n,t],29===t&&(e.push(pe.fetchStart),e.push(pe.connectStart),e.push(pe.connectEnd),e.push(pe.requestStart),e.push(pe.responseStart),e.push(pe.responseEnd),e.push(pe.domInteractive),e.push(pe.domComplete),e.push(pe.loadEventStart),e.push(pe.loadEventEnd),e.push(pe.redirectCount),e.push(pe.size),e.push(pe.type),e.push(pe.protocol),e.push(pe.encodedSize),e.push(pe.decodedSize),fe(),Vt(e)),[2]}))}))}(29)}var ve,ge=0,me=1/0,ye=0,be=0,we=[],ke=new Map,Se=function(){return ge||0},_e=function(){if(!we.length)return-1;var t=Math.min(we.length-1,Math.floor((Se()-be)/50));return we[t].latency},Ee=function(){be=Se(),we.length=0,ke.clear()},Ie=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?ge=performance.interactionCount:t.interactionId&&(me=Math.min(me,t.interactionId),ye=Math.max(ye,t.interactionId),ge=ye?(ye-me)/7+1:0)}(t);var n=we[we.length-1],e=ke.get(t.interactionId);if(e||we.length<10||t.duration>(null==n?void 0:n.latency)){if(e)t.duration>e.latency&&(e.latency=t.duration);else{var r={id:t.interactionId,latency:t.duration};ke.set(r.id,r),we.push(r)}we.sort((function(t,n){return n.latency-t.latency})),we.length>10&&we.splice(10).forEach((function(t){return ke.delete(t.id)}))}}},Te=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Oe(){Oe.dn=26;try{ve&&ve.disconnect(),ve=new PerformanceObserver(Xn(Me));for(var t=0,n=Te;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&W(9,0),ve.observe({type:e,buffered:!0}))}}catch(t){}}function Me(t){Me.dn=27,function(t){for(var n=(!("visibilityState"in document)||"visible"===document.visibilityState),e=0;e<t.length;e++){var r=t[e];switch(r.entryType){case"navigation":he(r);break;case"resource":var a=r.name;un(4,Ne(a)),a!==o.upload&&a!==o.fallback||Z(28,r.duration);break;case"longtask":Y(7);break;case"first-input":n&&Z(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Ie(r),un(37,_e().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&W(9,1e3*r.value);break;case"largest-contentful-paint":n&&Z(8,r.startTime)}}}(t.getEntries())}var xe=null;function Ne(t){return xe||(xe=document.createElement("a")),xe.href=t,xe.host}var je=Object.freeze({__proto__:null,start:function t(){t.dn=25,fe(),function(){navigator&&navigator.connection&&un(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?Bn(window,"load",J.bind(this,Oe,0)):Oe())}()},stop:function(){ve&&ve.disconnect(),ve=null,Ee(),xe=null,fe()}}),Ce=[j,j,j,je];function ze(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===ue&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap&&!t}catch(t){return!1}}()&&(!function(t){if(null===t||ue)return!1;for(var n in t)n in o&&(o[n]=t[n])}(t),ce(),kt(),Ce.forEach((function(t){return Xn(t.start)()})),null===t&&Re())}function Ae(){le()&&(Ce.slice().reverse().forEach((function(t){return Xn(t.stop)()})),St(),se(),void 0!==qe&&(qe[De]=function(){(qe[De].q=qe[De].q||[]).push(arguments),"start"===arguments[0]&&qe[De].q.unshift(qe[De].q.pop())&&Re()}))}var Pe=Object.freeze({__proto__:null,consent:wn,consentv2:kn,event:L,hashText:M,identify:st,metadata:yn,pause:function(){le()&&(L("clarity","pause"),null===ee&&(ee=new Promise((function(t){re=t}))))},resume:function(){le()&&(ae(),L("clarity","resume"))},set:ct,signal:function(t){yt=t},start:ze,stop:Ae,upgrade:rt,version:l}),qe=window,De="clarity";function Re(){if(void 0!==qe){if(qe[De]&&qe[De].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=qe[De]&&qe[De].q||[];for(qe[De]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return Pe[t].apply(Pe,n)},qe[De].v=l;t.length>0;)qe[De].apply(qe,t.shift())}}Re()}();
1
+ !function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return Vt},get start(){return Xt},get stop(){return Yt},get track(){return Pt}}),n=Object.freeze({__proto__:null,get check(){return Kt},get compute(){return $t},get data(){return qt},get start(){return Ft},get stop(){return tn},get trigger(){return Qt}}),e=Object.freeze({__proto__:null,get compute(){return cn},get data(){return nn},get log(){return un},get reset(){return sn},get start(){return an},get stop(){return on},get updates(){return en}}),r=Object.freeze({__proto__:null,get callback(){return In},get callbacks(){return dn},get clear(){return En},get consent(){return wn},get consentv2(){return kn},get data(){return ln},get electron(){return pn},get id(){return bn},get metadata(){return yn},get save(){return Tn},get shortid(){return xn},get start(){return gn},get stop(){return mn}}),a=Object.freeze({__proto__:null,get data(){return qn},get envelope(){return Hn},get start(){return Dn},get stop(){return Rn}}),o={projectId:null,delay:1e3,lean:!1,lite:!1,track:!0,content:!0,drop:[],mask:[],unmask:[],regions:[],cookies:[],fraud:!0,checksum:[],report:null,upload:null,fallback:null,upgrade:null,action:null,dob:null,delayDom:!1,throttleDom:!0,conversions:!1,includeSubdomains:!0};function i(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var u=0;function c(){return performance.now()+performance.timeOrigin}function s(t){void 0===t&&(t=null);var n=0===u?c():u,e=t&&t.timeStamp>0?t.timeStamp:performance.now(),r=t&&t.view?t.view.performance.timeOrigin:performance.timeOrigin;return Math.max(Math.round(e+r-n),0)}var l="0.8.24";var d=/\S/gi,p=255,f=!0,h=null,v=null,g=null;function m(t,n,e,r,a){if(void 0===r&&(r=!1),t){if("input"==n&&("checkbox"===a||"radio"===a))return t;switch(e){case 0:return t;case 1:switch(n){case"*T":case"value":case"placeholder":case"click":return function(t){var n=-1,e=0,r=!1,a=!1,o=!1,i=null;_();for(var u=0;u<t.length;u++){var c=t.charCodeAt(u);if(r=r||c>=48&&c<=57,a=a||64===c,o=9===c||10===c||13===c||32===c,0===u||u===t.length-1||o){if(r||a){null===i&&(i=t.split(""));var s=t.substring(n+1,o?u:u+1);s=f&&null!==g?s.match(g)?s:k(s,"▪","▫"):w(s),i.splice(n+1-e,s.length,s),e+=s.length-1}o&&(r=!1,a=!1,n=u)}}return i?i.join(""):t}(t);case"input":case"change":return S(t)}return t;case 2:case 3:switch(n){case"*T":case"data-":return r?b(t):w(t);case"src":case"srcset":case"title":case"alt":return 3===e?"src"===n&&(null==t?void 0:t.startsWith("blob:"))?"blob:":"":t;case"value":case"click":case"input":case"change":return S(t);case"placeholder":return w(t)}break;case 4:switch(n){case"*T":case"data-":return r?b(t):w(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}break;case 5:switch(n){case"*T":case"data-":return k(t,"▪","▫");case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":case"src":case"srcset":case"alt":case"title":return""}}}return t}function y(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var r=t;if(n)r="".concat("https://").concat("Electron");else{var a=o.drop;if(a&&a.length>0&&t&&t.indexOf("?")>0){var i=t.split("?"),u=i[0],c=i[1];r=u+"?"+c.split("&").map((function(t){return a.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}}return e&&(r=r.substring(0,p)),r}function b(t){var n=t.trim();if(n.length>0){var e=n[0],r=t.indexOf(e),a=t.substr(0,r),o=t.substr(r+n.length);return"".concat(a).concat(n.length.toString(36)).concat(o)}return t}function w(t){return t.replace(d,"•")}function k(t,n,e){return _(),t?t.replace(v,n).replace(h,e):t}function S(t){for(var n=5*(Math.floor(t.length/5)+1),e="",r=0;r<n;r++)e+=r>0&&r%5==0?" ":"•";return e}function _(){if(f&&null===h)try{h=new RegExp("\\p{N}","gu"),v=new RegExp("\\p{L}","gu"),g=new RegExp("\\p{Sc}","gu")}catch(t){f=!1}}var E=[],I=null;function T(){}var O=[];function M(){}function x(){}function N(){}var j=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:I,hashText:M,keys:O,log:T,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:E,stop:function(){},track:N,trigger:x}),C=null,z=!0;function A(t){q(t.analytics_Storage?1:0),C=t}function P(){q(2)}function q(t){un(36,t.toString())}function D(t){C=t,Gt(47)}function R(){z&&(Gt(47),z=!1)}var H=Object.freeze({__proto__:null,compute:R,config:A,consent:P,consentv2:D,get data(){return C},start:function(){z=!0},stop:function(){z=!0}}),U=null;function L(t,n){le()&&t&&"string"==typeof t&&t.length<255&&(U=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},Gt(24))}var X,V=null,Y=null;function B(t){t in V||(V[t]=0),t in Y||(Y[t]=0),V[t]++,Y[t]++}function W(t,n){null!==n&&(t in V||(V[t]=0),t in Y||(Y[t]=0),V[t]+=n,Y[t]+=n)}function Z(t,n){null!==n&&!1===isNaN(n)&&(t in V||(V[t]=0),(n>V[t]||0===V[t])&&(Y[t]=n,V[t]=n))}function J(t,n,e){return window.setTimeout(Xn(t),n,e)}function G(t){return window.clearTimeout(t)}var F=0,K=0,Q=null;function $(){Q&&G(Q),Q=J(tt,K),F=s()}function tt(){var t=s();X={gap:t-F},Gt(25),X.gap<3e5?Q=J(tt,K):ue&&(L("clarity","suspend"),ze(),["mousemove","touchstart"].forEach((function(t){return Yn(document,t,de)})),["resize","scroll","pageshow"].forEach((function(t){return Yn(window,t,de)})))}var nt=Object.freeze({__proto__:null,get data(){return X},reset:$,start:function(){K=6e4,F=0},stop:function(){G(Q),F=0,K=0}}),et=null;function rt(t){le()&&o.lean&&(o.lean=!1,et={key:t},In(),Tn(),o.upgrade&&o.upgrade(t),Gt(3),o.lite)}var at=Object.freeze({__proto__:null,get data(){return et},start:function(){!o.lean&&o.upgrade&&o.upgrade("Config"),et=null},stop:function(){et=null},upgrade:rt});function ot(t,n,e,r){return new(e||(e=Promise))((function(a,o){function i(t){try{c(r.next(t))}catch(t){o(t)}}function u(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?a(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(i,u)}c((r=r.apply(t,n||[])).next())}))}function it(t,n){var e,r,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(e=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=n.call(t,i)}catch(t){u=[6,t],r=0}finally{e=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}var ut=null;function ct(t,n){lt(t,"string"==typeof n?[n]:n)}function st(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),ot(this,void 0,void 0,(function(){var a,o;return it(this,(function(i){switch(i.label){case 0:return o={},[4,ft(t)];case 1:return o.userId=i.sent(),o.userHint=r||((u=t)&&u.length>=5?"".concat(u.substring(0,2)).concat(k(u.substring(2),"*","*")):k(u,"*","*")),lt("userId",[(a=o).userId]),lt("userHint",[a.userHint]),lt("userType",[ht(t)]),n&&(lt("sessionId",[n]),a.sessionId=n),e&&(lt("pageId",[e]),a.pageId=e),[2,a]}var u}))}))}function lt(t,n){if(le()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in ut?ut[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);ut[t]=e}}function dt(){Gt(34)}function pt(){ut={}}function ft(t){return ot(this,void 0,void 0,(function(){var n;return it(this,(function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),crypto&&t?[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t))]:[3,2];case 1:return n=e.sent(),[2,Array.prototype.map.call(new Uint8Array(n),(function(t){return("00"+t.toString(16)).slice(-2)})).join("")];case 2:return[2,""];case 3:return[3,5];case 4:return e.sent(),[2,""];case 5:return[2]}}))}))}function ht(t){return t&&t.indexOf("@")>0?"email":"string"}var vt="CompressionStream"in window;function gt(t){return ot(this,void 0,void 0,(function(){var n,e;return it(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),vt?(n=new ReadableStream({start:function(n){return ot(this,void 0,void 0,(function(){return it(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,mt(n)]):[3,2];case 1:return[2,new(e.apply(Uint8Array,[void 0,r.sent()]))];case 2:return[3,4];case 3:return r.sent(),[3,4];case 4:return[2,null]}}))}))}function mt(t){return ot(this,void 0,void 0,(function(){var n,e,r,a,o;return it(this,(function(i){switch(i.label){case 0:n=t.getReader(),e=[],r=!1,a=[],i.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return o=i.sent(),r=o.done,a=o.value,r?[2,e]:(e.push.apply(e,a),[3,1]);case 3:return[2,e]}}))}))}var yt=null;function bt(t){try{if(!yt)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){yt(t)}))}catch(t){}}var wt=[j,e,Object.freeze({__proto__:null,compute:dt,get data(){return ut},identify:st,reset:pt,set:ct,start:function(){pt()},stop:function(){pt()}}),n,j,H,r,a,t,nt,at,j];function kt(){V={},Y={},B(5),wt.forEach((function(t){return Xn(t.start)()}))}function St(){wt.slice().reverse().forEach((function(t){return Xn(t.stop)()})),V={},Y={}}function _t(){dt(),cn(),Gt(0),$t(),R()}function Et(t,n,e){return"".concat(t,"=").concat(m(n,0===t.indexOf("data-")?"data-":t,e))}var It=[],Tt=1,Ot=null;function Mt(){It=[],function(t){var n=[t];for(;n.length>0;){for(var e=null,r=null,a=null,o=n.shift(),i=o.firstChild,u=o.parentElement?o.parentElement:o.parentNode?o.parentNode:null;i;)n.push(i),i=i.nextSibling;switch(o.nodeType){case Node.DOCUMENT_TYPE_NODE:var c=o;r="*D",e={name:c.name,publicId:c.publicId,systemId:c.systemId};break;case Node.TEXT_NODE:a=o.nodeValue,r=Ot.get(u)?"*T":r;break;case Node.ELEMENT_NODE:var s=o;e=xt(s),r=["NOSCRIPT","SCRIPT","STYLE"].indexOf(s.tagName)<0?s.tagName:r}Nt(o,u,{tag:r,attributes:e,value:a})}}(document),function(t){ot(this,void 0,void 0,(function(){var n,e,r,a,o,i,u,c,l,d,p,f,h;return it(this,(function(v){switch(n=s(),e=[n,t],t){case 8:r=I,e.push(r.width),e.push(r.height),r.width,r.height,Vt(e);break;case 43:if((a=It).length>0){for(o=0,i=a;o<i.length;o++)for(u=i[o],c=u.metadata.privacy,l=u.data,d=0,p=["tag","attributes","value"];d<p.length;d++)if(l[f=p[d]])switch(f){case"tag":e.push(u.id),u.parent&&e.push(u.parent),u.previous&&e.push(u.previous),e.push(l[f]);break;case"attributes":for(h in l[f])void 0!==l[f][h]&&e.push(Et(h,l[f][h],c));break;case"value":e.push(m(l[f],l.tag,c))}Vt(function(t){for(var n=[],e={},r=0,a=null,o=0;o<t.length;o++)if("string"==typeof t[o]){var i=t[o],u=e[i]||-1;u>=0?a?a.push(u):(a=[u],n.push(a),r++):(a=null,n.push(i),e[i]=r++)}else a=null,n.push(t[o]),r++;return n}(e),!0)}}return[2]}))}))}(43)}function xt(t){var n={},e=t.attributes;if(e&&e.length>0)for(var r=0;r<e.length;r++)n[e[r].name]=e[r].value;return n}function Nt(t,n,e){if(t&&e&&e.tag){var r=function(t){return null===t?null:Ot.has(t)?Ot.get(t):(Ot.set(t,Tt),Tt++)}(t),a=n?Ot.get(n):null,o=t.previousSibling?Ot.get(t.previousSibling):null;It.push({id:r,parent:a,previous:o,children:[],data:e,selector:null,hash:null,region:null,metadata:{active:!0,suspend:!1,privacy:5,position:null,fraud:null,size:null}})}}var jt,Ct,zt,At,Pt,qt,Dt=0,Rt=0,Ht=null,Ut=0,Lt=!1;function Xt(){At=!0,Dt=0,Rt=0,Lt=!1,Ut=0,jt=[],Ct=[],zt={},Pt=null}function Vt(t,n){if(void 0===n&&(n=!0),At){var e=s(),r=t.length>1?t[1]:null,a=JSON.stringify(t);switch(o.lean?!Lt&&Rt+a.length>10485760&&(Lt=!0):Lt=!1,r){case 5:if(Lt)break;Dt+=a.length;case 37:case 6:case 43:case 45:case 46:if(Lt)break;Rt+=a.length,jt.push(a);break;default:Ct.push(a)}B(25);var i=function(){var t=!1===o.lean&&Dt>0?100:qn.sequence*o.delay;return"string"==typeof o.upload?Math.max(Math.min(t,3e4),100):o.delay}();e-Ut>2*i&&(G(Ht),Ht=null),n&&null===Ht&&(25!==r&&$(),Ht=J(Bt,i),Ut=e,Kt(Rt))}}function Yt(){G(Ht),Bt(!0),Dt=0,Rt=0,Lt=!1,Ut=0,jt=[],Ct=[],zt={},Pt=null,At=!1}function Bt(t){return void 0===t&&(t=!1),ot(this,void 0,void 0,(function(){var n,e,r,a,i,u,c,s;return it(this,(function(l){switch(l.label){case 0:return At?(Ht=null,(n=!1===o.lean&&Rt>0&&(Rt<1048576||qn.sequence>0))&&Z(1,1),_t(),e=!0===t,qn?(r=JSON.stringify(Hn(e)),a="[".concat(Ct.join(),"]"),i=n?"[".concat(jt.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:r,a:a,p:i}),e?(s=null,[3,3]):[3,1]):[2]):[2];case 1:return[4,gt(u)];case 2:s=l.sent(),l.label=3;case 3:return W(2,(c=s)?c.length:u.length),Wt(u,c,qn.sequence,e),Ct=[],n&&(jt=[],Rt=0,Dt=0,Lt=!1),[2]}}))}))}function Wt(t,n,e,r){if(void 0===r&&(r=!1),"string"==typeof o.upload){var a=o.upload,i=!1;if(r&&navigator&&navigator.sendBeacon)try{(i=navigator.sendBeacon.bind(navigator)(a,t))&&Jt(e)}catch(t){}if(!1===i){e in zt?zt[e].attempts++:zt[e]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",a,!0),u.timeout=15e3,u.ontimeout=function(){Ln(new Error("".concat("Timeout"," : ").concat(a)))},null!==e&&(u.onreadystatechange=function(){Xn(Zt)(u,e)}),u.withCredentials=!0,n?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(n)):u.send(t)}}else if(o.upload){(0,o.upload)(t),Jt(e)}}function Zt(t,n){var e=zt[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?Qt(6):(0===t.status&&(o.upload=o.fallback?o.fallback:o.upload),Pt={sequence:n,attempts:e.attempts,status:t.status},Gt(2),Wt(e.data,null,n)):(Pt={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&Gt(2),200===t.status&&t.responseText&&function(t){for(var n=t&&t.length>0?t.split("\n"):[],e=0,r=n;e<r.length;e++){var a=r[e],i=a&&a.length>0?a.split(/ (.*)/):[""];switch(i[0]){case"END":Qt(6);break;case"UPGRADE":rt("Auto");break;case"ACTION":o.action&&i.length>1&&o.action(i[1]);break;case"EXTRACT":i.length>1&&i[1];break;case"SIGNAL":i.length>1&&bt(i[1]);break;case"SNAPSHOT":o.lean=!1,Mt()}}}(t.responseText),0===t.status&&(Wt(e.data,null,n,!0),Qt(3)),t.status>=200&&t.status<=208&&Jt(n),delete zt[n]))}function Jt(t){1===t&&(Tn(),In())}function Gt(t){var n=[s(),t];switch(t){case 4:var e=E;e&&e.data&&((n=[e.time,e.event]).push(e.data.visible),n.push(e.data.docWidth),n.push(e.data.docHeight),n.push(e.data.screenWidth),n.push(e.data.screenHeight),n.push(e.data.scrollX),n.push(e.data.scrollY),n.push(e.data.pointerX),n.push(e.data.pointerY),n.push(e.data.activityTime),n.push(e.data.scrollTime),n.push(e.data.pointerTime),n.push(e.data.moveX),n.push(e.data.moveY),n.push(e.data.moveTime),n.push(e.data.downX),n.push(e.data.downY),n.push(e.data.downTime),n.push(e.data.upX),n.push(e.data.upY),n.push(e.data.upTime),n.push(e.data.pointerPrevX),n.push(e.data.pointerPrevY),n.push(e.data.pointerPrevTime),Vt(n,!1));break;case 25:n.push(X.gap),Vt(n);break;case 35:n.push(qt.check),Vt(n,!1);break;case 3:n.push(et.key),Vt(n);break;case 2:n.push(Pt.sequence),n.push(Pt.attempts),n.push(Pt.status),Vt(n,!1);break;case 24:U.key&&n.push(U.key),n.push(U.value),Vt(n);break;case 34:var r=Object.keys(ut);if(r.length>0){for(var a=0,o=r;a<o.length;a++){var i=o[a];n.push(i),n.push(ut[i])}pt(),Vt(n,!1)}break;case 0:var u=Object.keys(Y);if(u.length>0){for(var c=0,l=u;c<l.length;c++){var d=l[c],p=parseInt(d,10);n.push(p),n.push(Math.round(Y[d]))}Y={},Vt(n,!1)}break;case 1:var f=Object.keys(en);if(f.length>0){for(var h=0,v=f;h<v.length;h++){var g=v[h];p=parseInt(g,10);n.push(p),n.push(en[g])}sn(),Vt(n,!1)}break;case 36:var m=Object.keys(I);if(m.length>0){for(var y=0,b=m;y<b.length;y++){var w=b[y];p=parseInt(w,10);n.push(p),n.push([].concat.apply([],I[w]))}Vt(n,!1)}break;case 40:O.forEach((function(t){n.push(t);var e=[];for(var r in I[t]){var a=parseInt(r,10);e.push(a),e.push(I[t][r])}n.push(e)})),Vt(n,!1);break;case 47:n.push(C.source),n.push(C.ad_Storage),n.push(C.analytics_Storage),Vt(n,!1)}}function Ft(){qt={check:0}}function Kt(t){if(0===qt.check){var n=qt.check;n=qn.sequence>=128?1:n,n=qn.pageNum>=128?7:n,n=s()>72e5?2:n,(n=t>10485760?2:n)!==qt.check&&Qt(n)}}function Qt(t){qt.check=t,5!==t&&(En(),ze())}function $t(){0!==qt.check&&Gt(35)}function tn(){qt=null}var nn=null,en=null,rn=!1;function an(){nn={},en={},rn=!1}function on(){nn={},en={},rn=!1}function un(t,n){if(n&&(n="".concat(n),t in nn||(nn[t]=[]),nn[t].indexOf(n)<0)){if(nn[t].length>128)return void(rn||(rn=!0,Qt(5)));nn[t].push(n),t in en||(en[t]=[]),en[t].push(n)}}function cn(){Gt(1)}function sn(){en={},rn=!1}var ln=null,dn=[],pn=0,fn=null,hn=null,vn={ad_Storage:"denied",analytics_Storage:"denied"};function gn(){var t,n,e;fn=null;var r=navigator&&"userAgent"in navigator?navigator.userAgent:"",a=null!==(e="undefined"!=typeof Intl&&(null===(n=null===(t=null===Intl||void 0===Intl?void 0:Intl.DateTimeFormat())||void 0===t?void 0:t.resolvedOptions())||void 0===n?void 0:n.timeZone))&&void 0!==e?e:"",i=(new Date).getTimezoneOffset().toString(),u=window.location.ancestorOrigins?Array.from(window.location.ancestorOrigins).toString():"",c=document&&document.title?document.title:"";pn=r.indexOf("Electron")>0?1:0;var s=function(){var t={session:xn(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=Cn("_clsk",!o.includeSubdomains);if(n){var e=n.includes("^")?n.split("^"):n.split("|");e.length>=5&&t.ts-Nn(e[1])<18e5&&(t.session=e[0],t.count=Nn(e[2])+1,t.upgrade=Nn(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),l=jn(),d=o.projectId||function(t,n){void 0===n&&(n=null);for(var e,r=5381,a=r,o=0;o<t.length;o+=2)r=(r<<5)+r^t.charCodeAt(o),o+1<t.length&&(a=(a<<5)+a^t.charCodeAt(o+1));return e=Math.abs(r+11579*a),(n?e%Math.pow(2,n):e).toString(36)}(location.host);ln={projectId:d,userId:l.id,sessionId:s.session,pageNum:s.count},o.lean=o.track&&null!==s.upgrade?0===s.upgrade:o.lean,o.upload=o.track&&"string"==typeof o.upload&&s.upload&&s.upload.length>"https://".length?s.upload:o.upload,un(0,r),un(3,c),un(1,y(location.href,!!pn)),un(2,document.referrer),un(15,function(){var t=xn();if(o.track&&On(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),un(16,document.documentElement.lang),un(17,document.dir),un(26,"".concat(window.devicePixelRatio)),un(28,l.dob.toString()),un(29,l.version.toString()),un(33,u),un(34,a),un(35,i),Z(0,s.ts),Z(1,0),Z(35,pn);var p,f=null===window||void 0===window?void 0:window.Zone;f&&"__symbol__"in f&&Z(39,1),navigator&&(un(9,navigator.language),Z(33,navigator.hardwareConcurrency),Z(32,navigator.maxTouchPoints),Z(34,Math.round(navigator.deviceMemory)),(p=navigator.userAgentData)&&p.getHighEntropyValues?p.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;un(22,t.platform),un(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){un(24,t.name+"~"+t.version)})),un(25,t.model),Z(27,t.mobile?1:0)})):un(22,navigator.platform)),screen&&(Z(14,Math.round(screen.width)),Z(15,Math.round(screen.height)),Z(16,Math.round(screen.colorDepth)));for(var h=0,v=o.cookies;h<v.length;h++){var g=v[h],m=Cn(g);m&&ct(g,m)}A(Sn(hn={ad_Storage:o.track?"granted":"denied",analytics_Storage:o.track?"granted":"denied"},0)),Mn(l)}function mn(){fn=null,ln=null,hn=null,dn.forEach((function(t){t.called=!1}))}function yn(t,n,e,r){void 0===n&&(n=!0),void 0===e&&(e=!1),void 0===r&&(r=!1);var a=o.lean?0:1,i=!1;ln&&(a||!1===n)&&(t(ln,!o.lean,r?hn:void 0),i=!0),!e&&i||dn.push({callback:t,wait:n,recall:e,called:i,consentInfo:r})}function bn(){return ln?[ln.userId,ln.sessionId,ln.pageNum].join("."):""}function wn(t){void 0===t&&(t=!0),t?(kn({ad_Storage:"granted",analytics_Storage:"granted"}),P()):kn()}function kn(t,n){void 0===t&&(t=vn),void 0===n&&(n=1),hn={ad_Storage:_n(t.ad_Storage),analytics_Storage:_n(t.analytics_Storage)},In(!0);var e=Sn(hn,n);if(!e.analytics_Storage)return o.track=!1,An("_clsk","",-Number.MAX_VALUE),An("_clck","",-Number.MAX_VALUE),ze(),void window.setTimeout(Ce,250);le()&&(o.track=!0,Mn(jn(),1),Tn(),D(e),P())}function Sn(t,n){return{source:n,ad_Storage:"granted"===t.ad_Storage?1:0,analytics_Storage:"granted"===t.analytics_Storage?1:0}}function _n(t){return"string"==typeof t?t.toLowerCase():"denied"}function En(){An("_clsk","",0)}function In(t){void 0===t&&(t=!1),function(t,n){void 0===n&&(n=!1);if(dn.length>0)for(var e=0;e<dn.length;e++){var r=dn[e];r.callback&&(!r.called&&!n||r.consentInfo&&n)&&(!r.wait||t)&&(r.callback(ln,!o.lean,r.consentInfo?hn:void 0),r.called=!0,r.recall||(dn.splice(e,1),e--))}}(o.lean?0:1,t)}function Tn(){if(ln&&o.track){var t=Math.round(Date.now()),n=o.upload&&"string"==typeof o.upload?o.upload.replace("https://",""):"",e=o.lean?0:1;An("_clsk",[ln.sessionId,t,ln.pageNum,e,n].join("|"),1)}}function On(t,n){try{return!!t[n]}catch(t){return!1}}function Mn(t,n){void 0===n&&(n=null),n=null===n?t.consent:n;var e=Math.ceil((Date.now()+31536e6)/864e5),r=0===t.dob?null===o.dob?0:o.dob:t.dob;(null===t.expiry||Math.abs(e-t.expiry)>=1||t.consent!==n||t.dob!==r)&&An("_clck",[ln.userId,2,e.toString(36),n,r].join("|"),365)}function xn(){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 Nn(t,n){return void 0===n&&(n=10),parseInt(t,n)}function jn(){var t={id:xn(),version:0,expiry:null,consent:0,dob:0},n=Cn("_clck",!o.includeSubdomains);if(n&&n.length>0){var e=n.includes("^")?n.split("^"):n.split("|");e.length>1&&(t.version=Nn(e[1])),e.length>2&&(t.expiry=Nn(e[2],36)),e.length>3&&1===Nn(e[3])&&(t.consent=1),e.length>4&&Nn(e[1])>1&&(t.dob=Nn(e[4])),o.track=o.track||1===t.consent,t.id=o.track?e[0]:t.id}return t}function Cn(t,n){var e;if(void 0===n&&(n=!1),On(document,"cookie")){var r=document.cookie.split(";");if(r)for(var a=0;a<r.length;a++){var o=r[a].split("=");if(o.length>1&&o[0]&&o[0].trim()===t){for(var i=zn(o[1]),u=i[0],c=i[1];u;)u=(e=zn(c))[0],c=e[1];return n?c.endsWith("".concat("~","1"))?c.substring(0,c.length-2):null:c}}}return null}function zn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function An(t,n,e){if((o.track||""==n)&&(navigator&&navigator.cookieEnabled||On(document,"cookie"))){var r=function(t){return encodeURIComponent(t)}(n),a=new Date;a.setDate(a.getDate()+e);var i=a?"expires="+a.toUTCString():"",u="".concat(t,"=").concat(r).concat(";").concat(i).concat(";path=/");try{if(null===fn){for(var c=location.hostname?location.hostname.split("."):[],s=c.length-1;s>=0;s--)if(fn=".".concat(c[s]).concat(fn||""),s<c.length-1&&(document.cookie="".concat(u).concat(";").concat("domain=").concat(fn),Cn(t)===n))return;fn=""}}catch(t){fn=""}document.cookie=fn?"".concat(u).concat(";").concat("domain=").concat(fn):u}}var Pn,qn=null;function Dn(){var t=ln;qn={version:l,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0,applicationPlatform:0,url:""}}function Rn(){qn=null}function Hn(t){return qn.start=qn.start+qn.duration,qn.duration=s()-qn.start,qn.sequence++,qn.upload=t&&"sendBeacon"in navigator?1:0,qn.end=t?1:0,qn.applicationPlatform=0,qn.url=y(location.href,!1,!0),[qn.version,qn.sequence,qn.start,qn.duration,qn.projectId,qn.userId,qn.sessionId,qn.pageNum,qn.upload,qn.end,qn.applicationPlatform,qn.url]}function Un(){Pn=[]}function Ln(t){if(Pn&&-1===Pn.indexOf(t.message)){var n=o.report;if(n&&n.length>0&&qn){var e={v:qn.version,p:qn.projectId,u:qn.userId,s:qn.sessionId,n:qn.pageNum};t.message&&(e.m=t.message),t.stack&&(e.e=t.stack);var r=new XMLHttpRequest;r.open("POST",n,!0),r.send(JSON.stringify(e)),Pn.push(t.message)}}return t}function Xn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw Ln(t)}var e=performance.now()-n;W(4,e),e>30&&(B(7),Z(6,e))}}var Vn=new Map;function Yn(t,n,e,r,a){void 0===r&&(r=!1),void 0===a&&(a=!0),e=Xn(e);try{t[i("addEventListener")](n,e,{capture:r,passive:a}),function(t){return Vn.has(t)}(t)||Vn.set(t,[]),Vn.get(t).push({event:n,listener:e,options:{capture:r,passive:a}})}catch(t){}}function Bn(){Vn.forEach((function(t,n){!function(t,n){t.forEach((function(t){try{n[i("removeEventListener")](t.event,t.listener,{capture:t.options.capture,passive:t.options.passive})}catch(t){}})),Vn.delete(n)}(t,n)})),Vn=new Map}var Wn=null,Zn=null,Jn=null,Gn=0;function Fn(){return!(Gn++>20)}function Kn(){Gn=0,Jn!==$n()&&(ze(),window.setTimeout(Qn,250))}function Qn(){Ce(),Z(29,1)}function $n(){return location.href?location.href.replace(location.hash,""):location.href}var te=[],ne=null,ee=null,re=null;function ae(){ee&&(re(),ee=null,null===ne&&ie())}function oe(){te=[],ne=null,ee=null}function ie(){var t=te.shift();t&&(ne=t,t.task().then((function(){t.id===bn()&&(t.resolve(),ne=null,ie())})).catch((function(n){t.id===bn()&&(n&&(n.name,n.message,n.stack),ne=null,ie())})))}var ue=!1;function ce(){ue=!0,u=c(),oe(),Bn(),Un(),Jn=$n(),Gn=0,Yn(window,"popstate",Kn),null===Wn&&(Wn=history.pushState,history.pushState=function(){Wn.apply(this,arguments),le()&&Fn()&&Kn()}),null===Zn&&(Zn=history.replaceState,history.replaceState=function(){Zn.apply(this,arguments),le()&&Fn()&&Kn()})}function se(){Jn=null,Gn=0,Un(),Bn(),oe(),u=0,ue=!1}function le(){return ue}function de(){Ce(),L("clarity","restart")}var pe=null;function fe(){pe=null}function he(t){pe={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){ot(this,void 0,void 0,(function(){var n,e;return it(this,(function(r){return n=s(),e=[n,t],29===t&&(e.push(pe.fetchStart),e.push(pe.connectStart),e.push(pe.connectEnd),e.push(pe.requestStart),e.push(pe.responseStart),e.push(pe.responseEnd),e.push(pe.domInteractive),e.push(pe.domComplete),e.push(pe.loadEventStart),e.push(pe.loadEventEnd),e.push(pe.redirectCount),e.push(pe.size),e.push(pe.type),e.push(pe.protocol),e.push(pe.encodedSize),e.push(pe.decodedSize),fe(),Vt(e)),[2]}))}))}(29)}var ve,ge=0,me=1/0,ye=0,be=0,we=[],ke=new Map,Se=function(){return ge||0},_e=function(){if(!we.length)return-1;var t=Math.min(we.length-1,Math.floor((Se()-be)/50));return we[t].latency},Ee=function(){be=Se(),we.length=0,ke.clear()},Ie=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?ge=performance.interactionCount:t.interactionId&&(me=Math.min(me,t.interactionId),ye=Math.max(ye,t.interactionId),ge=ye?(ye-me)/7+1:0)}(t);var n=we[we.length-1],e=ke.get(t.interactionId);if(e||we.length<10||t.duration>(null==n?void 0:n.latency)){if(e)t.duration>e.latency&&(e.latency=t.duration);else{var r={id:t.interactionId,latency:t.duration};ke.set(r.id,r),we.push(r)}we.sort((function(t,n){return n.latency-t.latency})),we.length>10&&we.splice(10).forEach((function(t){return ke.delete(t.id)}))}}},Te=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Oe(){try{ve&&ve.disconnect(),ve=new PerformanceObserver(Xn(Me));for(var t=0,n=Te;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&W(9,0),ve.observe({type:e,buffered:!0}))}}catch(t){}}function Me(t){!function(t){for(var n=(!("visibilityState"in document)||"visible"===document.visibilityState),e=0;e<t.length;e++){var r=t[e];switch(r.entryType){case"navigation":he(r);break;case"resource":var a=r.name;un(4,Ne(a)),a!==o.upload&&a!==o.fallback||Z(28,r.duration);break;case"longtask":B(7);break;case"first-input":n&&Z(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Ie(r),un(37,_e().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&W(9,1e3*r.value);break;case"largest-contentful-paint":n&&Z(8,r.startTime)}}}(t.getEntries())}var xe=null;function Ne(t){return xe||(xe=document.createElement("a")),xe.href=t,xe.host}var je=[j,j,j,Object.freeze({__proto__:null,start:function(){fe(),function(){navigator&&navigator.connection&&un(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?Yn(window,"load",J.bind(this,Oe,0)):Oe())}()},stop:function(){ve&&ve.disconnect(),ve=null,Ee(),xe=null,fe()}})];function Ce(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===ue&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap&&!t}catch(t){return!1}}()&&(!function(t){if(null===t||ue)return!1;for(var n in t)n in o&&(o[n]=t[n])}(t),ce(),kt(),je.forEach((function(t){return Xn(t.start)()})),null===t&&De())}function ze(){le()&&(je.slice().reverse().forEach((function(t){return Xn(t.stop)()})),St(),se(),void 0!==Pe&&(Pe[qe]=function(){(Pe[qe].q=Pe[qe].q||[]).push(arguments),"start"===arguments[0]&&Pe[qe].q.unshift(Pe[qe].q.pop())&&De()}))}var Ae=Object.freeze({__proto__:null,consent:wn,consentv2:kn,event:L,hashText:M,identify:st,metadata:yn,pause:function(){le()&&(L("clarity","pause"),null===ee&&(ee=new Promise((function(t){re=t}))))},resume:function(){le()&&(ae(),L("clarity","resume"))},set:ct,signal:function(t){yt=t},start:Ce,stop:ze,upgrade:rt,version:l}),Pe=window,qe="clarity";function De(){if(void 0!==Pe){if(Pe[qe]&&Pe[qe].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=Pe[qe]&&Pe[qe].q||[];for(Pe[qe]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return Ae[t].apply(Ae,n)},Pe[qe].v=l;t.length>0;)Pe[qe].apply(Pe,t.shift())}}De()}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-js",
3
- "version": "0.8.23",
3
+ "version": "0.8.24",
4
4
  "description": "An analytics library that uses web page interactions to generate aggregated insights",
5
5
  "author": "Microsoft Corp.",
6
6
  "license": "MIT",
@@ -1,5 +1,4 @@
1
1
  import { BooleanFlag, Code, Constant, Metric, Setting, Severity } from "@clarity-types/data";
2
- import { FunctionNames } from "@clarity-types/performance";
3
2
  import * as clarity from "@src/clarity";
4
3
  import * as core from "@src/core"
5
4
  import { bind } from "@src/core/event";
@@ -49,7 +48,6 @@ function check(): boolean {
49
48
  }
50
49
 
51
50
  function compute(): void {
52
- compute.dn = FunctionNames.HistoryCompute;
53
51
  count = 0; // Reset the counter
54
52
  if (url !== getCurrentUrl()) {
55
53
  // If the url changed, start tracking it as a new page
package/src/core/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Config } from "@clarity-types/core";
2
2
  import { Constant } from "@clarity-types/data";
3
- import { FunctionNames } from "@clarity-types/performance";
4
3
  import configuration from "@src/core/config";
5
4
  import * as event from "@src/core/event";
6
5
  import * as history from "@src/core/history";
@@ -77,7 +76,6 @@ export function suspend(): void {
77
76
  }
78
77
 
79
78
  function restart(): void {
80
- restart.dn = FunctionNames.Restart;
81
79
  clarity.start();
82
80
  custom.event(Constant.Clarity, Constant.Restart);
83
81
  }
@@ -1,7 +1,6 @@
1
- import { Code, Metric, Setting, Severity } from "@clarity-types/data";
1
+ import { Metric, Setting } from "@clarity-types/data";
2
2
  import { report } from "@src/core/report";
3
3
  import * as metric from "@src/data/metric";
4
- import * as internal from "@src/diagnostic/internal";
5
4
 
6
5
  // tslint:disable-next-line: ban-types
7
6
  export default function (method: Function): Function {
@@ -13,7 +12,6 @@ export default function (method: Function): Function {
13
12
  if (duration > Setting.LongTask) {
14
13
  metric.count(Metric.LongTaskCount);
15
14
  metric.max(Metric.ThreadBlockedTime, duration);
16
- internal.log(Code.FunctionExecutionTime, Severity.Info, `${method.dn || method.name}-${duration}`);
17
15
  }
18
16
  };
19
17
  }
@@ -1,2 +1,2 @@
1
- let version = "0.8.23";
1
+ let version = "0.8.24";
2
2
  export default version;
@@ -189,13 +189,9 @@ function send(payload: string, zipped: Uint8Array, sequence: number, beacon: boo
189
189
  dispatched = navigator.sendBeacon.bind(navigator)(url, payload);
190
190
  if (dispatched) {
191
191
  done(sequence);
192
- } else {
193
- // If sendBeacon fails, we report the error and continue with XHR upload
194
- report(new Error(`${Constant.BeaconError}: ${payload.length}`));
195
192
  }
196
193
  } catch(error) {
197
- // If sendBeacon fails, we report the error and continue with XHR upload
198
- report(new Error(`${Constant.BeaconError}: ${error?.message?.substring(0, 50)} : ${payload.length}`));
194
+ // If sendBeacon fails, we do nothing and continue with XHR upload
199
195
  }
200
196
  }
201
197
 
@@ -1,10 +1,8 @@
1
- import { FunctionNames } from "@clarity-types/performance";
2
1
  import * as fraud from "@src/diagnostic/fraud";
3
2
  import * as internal from "@src/diagnostic/internal";
4
3
  import * as script from "@src/diagnostic/script";
5
4
 
6
5
  export function start(): void {
7
- start.dn = FunctionNames.DiagnosticStart;
8
6
  fraud.start();
9
7
  script.start();
10
8
  internal.start();
@@ -1,6 +1,5 @@
1
1
  import { Event, Setting } from "@clarity-types/data";
2
2
  import { ScriptErrorData } from "@clarity-types/diagnostic";
3
- import { FunctionNames } from "@clarity-types/performance";
4
3
  import { bind } from "@src/core/event";
5
4
  import encode from "./encode";
6
5
 
@@ -13,7 +12,6 @@ export function start(): void {
13
12
  }
14
13
 
15
14
  function handler(error: ErrorEvent): boolean {
16
- handler.dn = FunctionNames.ScriptHandler;
17
15
  let e = error["error"] || error;
18
16
  // While rare, it's possible for code to fail repeatedly during the lifetime of the same page
19
17
  // In those cases, we only want to log the failure first few times and not spam logs with redundant information.
@@ -1,6 +1,5 @@
1
1
  import { Constant, Event, Setting } from "@clarity-types/data";
2
2
  import { ChangeState } from "@clarity-types/interaction";
3
- import { FunctionNames } from "@clarity-types/performance";
4
3
  import config from "@src/core/config";
5
4
  import { bind } from "@src/core/event";
6
5
  import hash from "@src/core/hash";
@@ -21,7 +20,6 @@ export function observe(root: Node): void {
21
20
  }
22
21
 
23
22
  function recompute(evt: UIEvent): void {
24
- recompute.dn = FunctionNames.ChangeRecompute;
25
23
  let element = target(evt) as HTMLInputElement;
26
24
  if (element) {
27
25
  let value = element.value;
@@ -1,7 +1,6 @@
1
1
  import { BooleanFlag, Constant, Event, Setting } from "@clarity-types/data";
2
2
  import { BrowsingContext, ClickState, TextInfo } from "@clarity-types/interaction";
3
3
  import { Box } from "@clarity-types/layout";
4
- import { FunctionNames } from "@clarity-types/performance";
5
4
  import { bind } from "@src/core/event";
6
5
  import { schedule } from "@src/core/task";
7
6
  import { time } from "@src/core/time";
@@ -23,7 +22,6 @@ export function observe(root: Node): void {
23
22
  }
24
23
 
25
24
  function handler(event: Event, root: Node, evt: MouseEvent): void {
26
- handler.dn = FunctionNames.ClickHandler;
27
25
  let frame = iframe(root);
28
26
  let d = frame && frame.contentDocument ? frame.contentDocument.documentElement : document.documentElement;
29
27
  let x = "pageX" in evt ? Math.round(evt.pageX) : ("clientX" in evt ? Math.round(evt["clientX"] + d.scrollLeft) : null);
@@ -1,6 +1,5 @@
1
1
  import { Event } from "@clarity-types/data";
2
2
  import { Clipboard, ClipboardState } from "@clarity-types/interaction";
3
- import { FunctionNames } from "@clarity-types/performance";
4
3
  import { bind } from "@src/core/event";
5
4
  import { schedule } from "@src/core/task";
6
5
  import { time } from "@src/core/time";
@@ -20,7 +19,6 @@ export function observe(root: Node): void {
20
19
  }
21
20
 
22
21
  function recompute(action: Clipboard, evt: UIEvent): void {
23
- recompute.dn = FunctionNames.ClipboardRecompute;
24
22
  state.push({ time: time(evt), event: Event.Clipboard, data: { target: target(evt), action } });
25
23
  schedule(encode.bind(this, Event.Clipboard));
26
24
  }
@@ -109,6 +109,7 @@ export default async function (type: Event, ts: number = null): Promise<void> {
109
109
  tokens = [entry.time, entry.event];
110
110
  tokens.push(iTarget.id);
111
111
  tokens.push(scrub.text(entry.data.value, "input", iTarget.privacy, false, entry.data.type));
112
+ tokens.push(entry.data.trust);
112
113
  queue(tokens);
113
114
  }
114
115
  input.reset();
@@ -1,4 +1,3 @@
1
- import { FunctionNames } from "@clarity-types/performance";
2
1
  import * as change from "@src/interaction/change";
3
2
  import * as click from "@src/interaction/click";
4
3
  import * as clipboard from "@src/interaction/clipboard";
@@ -13,7 +12,6 @@ import * as unload from "@src/interaction/unload";
13
12
  import * as visibility from "@src/interaction/visibility";
14
13
 
15
14
  export function start(): void {
16
- start.dn = FunctionNames.InteractionStart;
17
15
  timeline.start();
18
16
  click.start();
19
17
  clipboard.start();
@@ -1,6 +1,5 @@
1
- import { Event } from "@clarity-types/data";
1
+ import { BooleanFlag, Event } from "@clarity-types/data";
2
2
  import { InputData, InputState, Setting } from "@clarity-types/interaction";
3
- import { FunctionNames } from "@clarity-types/performance";
4
3
  import { bind } from "@src/core/event";
5
4
  import { schedule } from "@src/core/task";
6
5
  import { time } from "@src/core/time";
@@ -21,7 +20,6 @@ export function observe(root: Node): void {
21
20
  }
22
21
 
23
22
  function recompute(evt: UIEvent): void {
24
- recompute.dn = FunctionNames.InputRecompute;
25
23
  let input = target(evt) as HTMLInputElement;
26
24
  let value = get(input);
27
25
  if (input && input.type && value) {
@@ -34,7 +32,7 @@ function recompute(evt: UIEvent): void {
34
32
  break;
35
33
  }
36
34
 
37
- let data: InputData = { target: input, value: v, type: t };
35
+ let data: InputData = { target: input, value: v, type: t, trust: evt.isTrusted ? BooleanFlag.True : BooleanFlag.False };
38
36
 
39
37
  // If last entry in the queue is for the same target node as the current one, remove it so we can later swap it with current data.
40
38
  if (state.length > 0 && (state[state.length - 1].data.target === data.target)) { state.pop(); }