clarity-js 0.7.56 → 0.7.57

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.
@@ -136,6 +136,7 @@ var config$2 = {
136
136
  throttleDom: true,
137
137
  conversions: false,
138
138
  longTask: 30,
139
+ includeSubdomains: true,
139
140
  };
140
141
 
141
142
  function api(method) {
@@ -163,7 +164,7 @@ function stop$F() {
163
164
  startTime = 0;
164
165
  }
165
166
 
166
- var version$1 = "0.7.56";
167
+ var version$1 = "0.7.57";
167
168
 
168
169
  // tslint:disable: no-bitwise
169
170
  function hash (input, precision) {
@@ -2370,6 +2371,7 @@ function traverse (root, timer, source, timestamp) {
2370
2371
 
2371
2372
  var observers = [];
2372
2373
  var mutations = [];
2374
+ var throttledMutations = {};
2373
2375
  var insertRule = null;
2374
2376
  var deleteRule = null;
2375
2377
  var attachShadow = null;
@@ -2377,6 +2379,7 @@ var mediaInsertRule = null;
2377
2379
  var mediaDeleteRule = null;
2378
2380
  var queue$2 = [];
2379
2381
  var timeout$1 = null;
2382
+ var throttleDelay = null;
2380
2383
  var activePeriod = null;
2381
2384
  var history$4 = {};
2382
2385
  function start$k() {
@@ -2480,6 +2483,7 @@ function stop$i() {
2480
2483
  observers = [];
2481
2484
  history$4 = {};
2482
2485
  mutations = [];
2486
+ throttledMutations = [];
2483
2487
  queue$2 = [];
2484
2488
  activePeriod = 0;
2485
2489
  timeout$1 = null;
@@ -2497,36 +2501,24 @@ function handle$1(m) {
2497
2501
  measure(compute$6)();
2498
2502
  });
2499
2503
  }
2500
- function process$2() {
2504
+ function processMutation(timer, mutation, instance, timestamp) {
2501
2505
  return __awaiter(this, void 0, void 0, function () {
2502
- var timer, record, instance, _i, _a, mutation, state, target, type, value;
2503
- return __generator(this, function (_b) {
2504
- switch (_b.label) {
2506
+ var state, target, type;
2507
+ return __generator(this, function (_a) {
2508
+ switch (_a.label) {
2505
2509
  case 0:
2506
- timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
2507
- start$y(timer);
2508
- _b.label = 1;
2509
- case 1:
2510
- if (!(mutations.length > 0)) return [3 /*break*/, 8];
2511
- record = mutations.shift();
2512
- instance = time();
2513
- _i = 0, _a = record.mutations;
2514
- _b.label = 2;
2515
- case 2:
2516
- if (!(_i < _a.length)) return [3 /*break*/, 6];
2517
- mutation = _a[_i];
2518
2510
  state = state$a(timer);
2519
- if (!(state === 0 /* Task.Wait */)) return [3 /*break*/, 4];
2511
+ if (!(state === 0 /* Task.Wait */)) return [3 /*break*/, 2];
2520
2512
  return [4 /*yield*/, suspend$1(timer)];
2521
- case 3:
2522
- state = _b.sent();
2523
- _b.label = 4;
2524
- case 4:
2513
+ case 1:
2514
+ state = _a.sent();
2515
+ _a.label = 2;
2516
+ case 2:
2525
2517
  if (state === 2 /* Task.Stop */) {
2526
- return [3 /*break*/, 6];
2518
+ return [2 /*return*/];
2527
2519
  }
2528
2520
  target = mutation.target;
2529
- type = config$2.throttleDom ? track$5(mutation, timer, instance, record.time) : mutation.type;
2521
+ type = config$2.throttleDom ? track$5(mutation, timer, instance, timestamp) : mutation.type;
2530
2522
  if (type && target && target.ownerDocument) {
2531
2523
  parse$1(target.ownerDocument);
2532
2524
  }
@@ -2535,31 +2527,60 @@ function process$2() {
2535
2527
  }
2536
2528
  switch (type) {
2537
2529
  case "attributes" /* Constant.Attributes */:
2538
- processNode(target, 3 /* Source.Attributes */, record.time);
2530
+ processNode(target, 3 /* Source.Attributes */, timestamp);
2539
2531
  break;
2540
2532
  case "characterData" /* Constant.CharacterData */:
2541
- processNode(target, 4 /* Source.CharacterData */, record.time);
2533
+ processNode(target, 4 /* Source.CharacterData */, timestamp);
2542
2534
  break;
2543
2535
  case "childList" /* Constant.ChildList */:
2544
- processNodeList(mutation.addedNodes, 1 /* Source.ChildListAdd */, timer, record.time);
2545
- processNodeList(mutation.removedNodes, 2 /* Source.ChildListRemove */, timer, record.time);
2546
- break;
2547
- case "suspend" /* Constant.Suspend */:
2548
- value = get(target);
2549
- if (value) {
2550
- value.metadata.suspend = true;
2551
- }
2536
+ processNodeList(mutation.addedNodes, 1 /* Source.ChildListAdd */, timer, timestamp);
2537
+ processNodeList(mutation.removedNodes, 2 /* Source.ChildListRemove */, timer, timestamp);
2552
2538
  break;
2553
2539
  }
2554
- _b.label = 5;
2555
- case 5:
2556
- _i++;
2557
- return [3 /*break*/, 2];
2558
- case 6: return [4 /*yield*/, encode$4(6 /* Event.Mutation */, timer, record.time)];
2559
- case 7:
2560
- _b.sent();
2540
+ return [2 /*return*/];
2541
+ }
2542
+ });
2543
+ });
2544
+ }
2545
+ function process$2() {
2546
+ return __awaiter(this, void 0, void 0, function () {
2547
+ var timer, record, instance, _i, _a, mutation, processedMutations, _b, _c, key, throttledMutationToProcess;
2548
+ return __generator(this, function (_d) {
2549
+ switch (_d.label) {
2550
+ case 0:
2551
+ timer = { id: id(), cost: 3 /* Metric.LayoutCost */ };
2552
+ start$y(timer);
2553
+ _d.label = 1;
2554
+ case 1:
2555
+ if (!(mutations.length > 0)) return [3 /*break*/, 3];
2556
+ record = mutations.shift();
2557
+ instance = time();
2558
+ for (_i = 0, _a = record.mutations; _i < _a.length; _i++) {
2559
+ mutation = _a[_i];
2560
+ processMutation(timer, mutation, instance, record.time);
2561
+ }
2562
+ return [4 /*yield*/, encode$4(6 /* Event.Mutation */, timer, record.time)];
2563
+ case 2:
2564
+ _d.sent();
2561
2565
  return [3 /*break*/, 1];
2562
- case 8:
2566
+ case 3:
2567
+ processedMutations = false;
2568
+ for (_b = 0, _c = Object.keys(throttledMutations); _b < _c.length; _b++) {
2569
+ key = _c[_b];
2570
+ throttledMutationToProcess = throttledMutations[key];
2571
+ delete throttledMutations[key];
2572
+ processMutation(timer, throttledMutationToProcess.mutation, time(), throttledMutationToProcess.timestamp);
2573
+ processedMutations = true;
2574
+ }
2575
+ if (Object.keys(throttledMutations).length > 0) {
2576
+ processThrottledMutations();
2577
+ }
2578
+ if (!(Object.keys(throttledMutations).length === 0 && processedMutations)) return [3 /*break*/, 5];
2579
+ return [4 /*yield*/, encode$4(6 /* Event.Mutation */, timer, time())];
2580
+ case 4:
2581
+ _d.sent();
2582
+ _d.label = 5;
2583
+ case 5:
2563
2584
  stop$w(timer);
2564
2585
  return [2 /*return*/];
2565
2586
  }
@@ -2590,14 +2611,16 @@ function track$5(m, timer, instance, timestamp) {
2590
2611
  h[0] = inactive ? (h[1] === instance ? h[0] : h[0] + 1) : 1;
2591
2612
  h[1] = instance;
2592
2613
  // Return updated mutation type based on if we have already hit the threshold or not
2593
- if (h[0] === 10 /* Setting.MutationSuspendThreshold */) {
2614
+ if (h[0] >= 10 /* Setting.MutationSuspendThreshold */) {
2594
2615
  // Store a reference to removedNodes so we can process them later
2595
2616
  // when we resume mutations again on user interactions
2596
2617
  h[2] = m.removedNodes;
2597
- return "suspend" /* Constant.Suspend */;
2598
- }
2599
- else if (h[0] > 10 /* Setting.MutationSuspendThreshold */) {
2600
- return "" /* Constant.Empty */;
2618
+ if (instance > timestamp + 3000 /* Setting.MutationActivePeriod */) {
2619
+ return m.type;
2620
+ }
2621
+ // we only store the most recent mutation for a given key if it is being throttled
2622
+ throttledMutations[key] = { mutation: m, timestamp: timestamp };
2623
+ return "throttle" /* Constant.Throttle */;
2601
2624
  }
2602
2625
  }
2603
2626
  return m.type;
@@ -2644,6 +2667,12 @@ function processNodeList(list, source, timer, timestamp) {
2644
2667
  });
2645
2668
  });
2646
2669
  }
2670
+ function processThrottledMutations() {
2671
+ if (throttleDelay) {
2672
+ clearTimeout(throttleDelay);
2673
+ }
2674
+ throttleDelay = setTimeout(function () { schedule$1(process$2, 1 /* Priority.High */); }, 33 /* Setting.LookAhead */);
2675
+ }
2647
2676
  function schedule(node) {
2648
2677
  // Only schedule manual trigger for this node if it's not already in the queue
2649
2678
  if (queue$2.indexOf(node) < 0) {
@@ -3136,6 +3165,7 @@ var state$2 = [];
3136
3165
  var elementAnimate = null;
3137
3166
  var animationPlay = null;
3138
3167
  var animationPause = null;
3168
+ var animationCommitStyles = null;
3139
3169
  var animationCancel = null;
3140
3170
  var animationFinish = null;
3141
3171
  var animationId = 'clarityAnimationId';
@@ -3143,12 +3173,15 @@ var operationCount = 'clarityOperationCount';
3143
3173
  var maxOperations = 20;
3144
3174
  function start$i() {
3145
3175
  if (window["Animation"] &&
3176
+ window["Animation"].prototype &&
3146
3177
  window["KeyframeEffect"] &&
3178
+ window["KeyframeEffect"].prototype &&
3147
3179
  window["KeyframeEffect"].prototype.getKeyframes &&
3148
3180
  window["KeyframeEffect"].prototype.getTiming) {
3149
3181
  reset$7();
3150
3182
  overrideAnimationHelper(animationPlay, "play");
3151
3183
  overrideAnimationHelper(animationPause, "pause");
3184
+ overrideAnimationHelper(animationCommitStyles, "commitStyles");
3152
3185
  overrideAnimationHelper(animationCancel, "cancel");
3153
3186
  overrideAnimationHelper(animationFinish, "finish");
3154
3187
  if (elementAnimate === null) {
@@ -3232,6 +3265,9 @@ function trackAnimationOperation(animation, name) {
3232
3265
  case "finish":
3233
3266
  operation = 4 /* AnimationOperation.Finish */;
3234
3267
  break;
3268
+ case "commitStyles":
3269
+ operation = 5 /* AnimationOperation.CommitStyles */;
3270
+ break;
3235
3271
  }
3236
3272
  if (operation) {
3237
3273
  track$4(time(), animation[animationId], operation);
@@ -4785,7 +4821,7 @@ function shortid() {
4785
4821
  }
4786
4822
  function session() {
4787
4823
  var output = { session: shortid(), ts: Math.round(Date.now()), count: 1, upgrade: null, upload: "" /* Constant.Empty */ };
4788
- var value = getCookie("_clsk" /* Constant.SessionKey */);
4824
+ var value = getCookie("_clsk" /* Constant.SessionKey */, !config$2.includeSubdomains);
4789
4825
  if (value) {
4790
4826
  var parts = value.split("|" /* Constant.Pipe */);
4791
4827
  // Making it backward & forward compatible by using greater than comparison (v0.6.21)
@@ -4805,7 +4841,7 @@ function num(string, base) {
4805
4841
  }
4806
4842
  function user() {
4807
4843
  var output = { id: shortid(), version: 0, expiry: null, consent: 0 /* BooleanFlag.False */, dob: 0 };
4808
- var cookie = getCookie("_clck" /* Constant.CookieKey */);
4844
+ var cookie = getCookie("_clck" /* Constant.CookieKey */, !config$2.includeSubdomains);
4809
4845
  if (cookie && cookie.length > 0) {
4810
4846
  // Splitting and looking up first part for forward compatibility, in case we wish to store additional information in a cookie
4811
4847
  var parts = cookie.split("|" /* Constant.Pipe */);
@@ -4847,8 +4883,9 @@ function user() {
4847
4883
  }
4848
4884
  return output;
4849
4885
  }
4850
- function getCookie(key) {
4886
+ function getCookie(key, limit) {
4851
4887
  var _a;
4888
+ if (limit === void 0) { limit = false; }
4852
4889
  if (supported(document, "cookie" /* Constant.Cookie */)) {
4853
4890
  var cookies = document.cookie.split(";" /* Constant.Semicolon */);
4854
4891
  if (cookies) {
@@ -4865,6 +4902,12 @@ function getCookie(key) {
4865
4902
  while (isEncoded) {
4866
4903
  _a = decodeCookieValue(decodedValue), isEncoded = _a[0], decodedValue = _a[1];
4867
4904
  }
4905
+ // If we are limiting cookies, check if the cookie value is limited
4906
+ if (limit) {
4907
+ return decodedValue.endsWith("".concat("~" /* Constant.Tilde */, "1"))
4908
+ ? decodedValue.substring(0, decodedValue.length - 2)
4909
+ : null;
4910
+ }
4868
4911
  return decodedValue;
4869
4912
  }
4870
4913
  }
@@ -1 +1 @@
1
- !function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return gt},get start(){return vt},get stop(){return mt},get track(){return st}}),n=Object.freeze({__proto__:null,get check(){return Et},get compute(){return Mt},get data(){return lt},get start(){return _t},get stop(){return Ot},get trigger(){return It}}),e=Object.freeze({__proto__:null,get compute(){return qt},get data(){return Tt},get log(){return At},get reset(){return Nt},get start(){return zt},get stop(){return Ct},get updates(){return xt}}),r=Object.freeze({__proto__:null,get callback(){return Zt},get callbacks(){return Rt},get clear(){return Wt},get consent(){return Jt},get data(){return Pt},get electron(){return Ut},get id(){return Xt},get metadata(){return Bt},get save(){return Gt},get shortid(){return Kt},get start(){return Lt},get stop(){return Vt}}),o=Object.freeze({__proto__:null,get data(){return on},get envelope(){return un},get start(){return an},get stop(){return cn}}),a={projectId:null,delay:1e3,lean:!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,longTask:30};function i(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function u(t){void 0===t&&(t=null);var n=t&&t.timeStamp>0?t.timeStamp:performance.now(),e=t&&t.view?t.view.performance.timeOrigin:performance.timeOrigin;return Math.max(Math.round(n+e-c),0)}var s="0.7.56";var l=!0,d=null,f=null;function p(t,n,e){return function(){if(l&&null===d)try{d=new RegExp("\\p{N}","gu"),f=new RegExp("\\p{L}","gu"),new RegExp("\\p{Sc}","gu")}catch(t){l=!1}}(),t?t.replace(f,n).replace(d,e):t}var h=[],v=null;function g(){}var m=[];function y(){}function w(){}var b=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:v,hashText:y,keys:m,log:g,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:h,stop:function(){},trigger:w}),k=null;function S(t,n){An()&&t&&"string"==typeof t&&t.length<255&&(k=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},St(24))}var _,E=null,I=null;function M(t){t in E||(E[t]=0),t in I||(I[t]=0),E[t]++,I[t]++}function O(t,n){null!==n&&(t in E||(E[t]=0),t in I||(I[t]=0),E[t]+=n,I[t]+=n)}function T(t,n){null!==n&&!1===isNaN(n)&&(t in E||(E[t]=0),(n>E[t]||0===E[t])&&(I[t]=n,E[t]=n))}function x(t,n,e){return window.setTimeout(dn(t),n,e)}function j(t){return window.clearTimeout(t)}var z=0,C=0,A=null;function q(){A&&j(A),A=x(N,C),z=u()}function N(){var t=u();_={gap:t-z},St(25),_.gap<3e5?A=x(N,C):jn&&(S("clarity","suspend"),ne(),["mousemove","touchstart"].forEach((function(t){return pn(document,t,qn)})),["resize","scroll","pageshow"].forEach((function(t){return pn(window,t,qn)})))}var D=Object.freeze({__proto__:null,get data(){return _},reset:q,start:function(){C=6e4,z=0},stop:function(){j(A),z=0,C=0}}),P=null;function R(t){An()&&a.lean&&(a.lean=!1,P={key:t},Zt(),Gt(),a.upgrade&&a.upgrade(t),St(3))}var U=Object.freeze({__proto__:null,get data(){return P},start:function(){!a.lean&&a.upgrade&&a.upgrade("Config"),P=null},stop:function(){P=null},upgrade:R});function H(t,n,e,r){return new(e||(e=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(i,c)}u((r=r.apply(t,n||[])).next())}))}function L(t,n){var e,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(t,i)}catch(t){c=[6,t],r=0}finally{e=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var V=null;function B(t,n){J(t,"string"==typeof n?[n]:n)}function X(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),H(this,void 0,void 0,(function(){var o,a;return L(this,(function(i){switch(i.label){case 0:return a={},[4,G(t)];case 1:return a.userId=i.sent(),a.userHint=r||((c=t)&&c.length>=5?"".concat(c.substring(0,2)).concat(p(c.substring(2),"*","*")):p(c,"*","*")),J("userId",[(o=a).userId]),J("userHint",[o.userHint]),J("userType",[F(t)]),n&&(J("sessionId",[n]),o.sessionId=n),e&&(J("pageId",[e]),o.pageId=e),[2,o]}var c}))}))}function J(t,n){if(An()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in V?V[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);V[t]=e}}function W(){St(34)}function Z(){V={}}function G(t){return H(this,void 0,void 0,(function(){var n;return L(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 F(t){return t&&t.indexOf("@")>0?"email":"string"}var Y="CompressionStream"in window;function K(t){return H(this,void 0,void 0,(function(){var n,e;return L(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),Y?(n=new ReadableStream({start:function(n){return H(this,void 0,void 0,(function(){return L(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,Q(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 Q(t){return H(this,void 0,void 0,(function(){var n,e,r,o,a;return L(this,(function(i){switch(i.label){case 0:n=t.getReader(),e=[],r=!1,o=[],i.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return a=i.sent(),r=a.done,o=a.value,r?[2,e]:(e.push.apply(e,o),[3,1]);case 3:return[2,e]}}))}))}var $=null;function tt(t){try{if(!$)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){$(t)}))}catch(t){}}var nt=[b,e,Object.freeze({__proto__:null,compute:W,get data(){return V},identify:X,reset:Z,set:B,start:function(){Z()},stop:function(){Z()}}),n,b,r,o,t,D,U,b];function et(){E={},I={},M(5),nt.forEach((function(t){return dn(t.start)()}))}function rt(){nt.slice().reverse().forEach((function(t){return dn(t.stop)()})),E={},I={}}function ot(){W(),qt(),St(0),Mt()}var at,it,ct,ut,st,lt,dt=0,ft=0,pt=null,ht=0;function vt(){ut=!0,dt=0,ft=0,ht=0,at=[],it=[],ct={},st=null}function gt(t,n){if(void 0===n&&(n=!0),ut){var e=u(),r=t.length>1?t[1]:null,o=JSON.stringify(t);switch(r){case 5:dt+=o.length;case 37:case 6:case 43:case 45:case 46:ft+=o.length,at.push(o);break;default:it.push(o)}M(25);var i=function(){var t=!1===a.lean&&dt>0?100:on.sequence*a.delay;return"string"==typeof a.upload?Math.max(Math.min(t,3e4),100):a.delay}();e-ht>2*i&&(j(pt),pt=null),n&&null===pt&&(25!==r&&q(),pt=x(yt,i),ht=e,Et(ft))}}function mt(){j(pt),yt(!0),dt=0,ft=0,ht=0,at=[],it=[],ct={},st=null,ut=!1}function yt(t){return void 0===t&&(t=!1),H(this,void 0,void 0,(function(){var n,e,r,o,i,c,u,s;return L(this,(function(l){switch(l.label){case 0:return pt=null,(n=!1===a.lean&&ft>0&&(ft<1048576||on.sequence>0))&&T(1,1),ot(),e=!0===t,r=JSON.stringify(un(e)),o="[".concat(it.join(),"]"),i=n?"[".concat(at.join(),"]"):"",c=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:o,p:i}),e?(s=null,[3,3]):[3,1];case 1:return[4,K(c)];case 2:s=l.sent(),l.label=3;case 3:return O(2,(u=s)?u.length:c.length),wt(c,u,on.sequence,e),it=[],n&&(at=[],ft=0,dt=0),[2]}}))}))}function wt(t,n,e,r){if(void 0===r&&(r=!1),"string"==typeof a.upload){var o=a.upload,i=!1;if(r&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(o,t))&&kt(e)}catch(t){}if(!1===i){e in ct?ct[e].attempts++:ct[e]={data:t,attempts:1};var c=new XMLHttpRequest;c.open("POST",o,!0),c.timeout=15e3,c.ontimeout=function(){ln(new Error("".concat("Timeout"," : ").concat(o)))},null!==e&&(c.onreadystatechange=function(){dn(bt)(c,e)}),c.withCredentials=!0,n?(c.setRequestHeader("Accept","application/x-clarity-gzip"),c.send(n)):c.send(t)}}else if(a.upload){(0,a.upload)(t),kt(e)}}function bt(t,n){var e=ct[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?It(6):(0===t.status&&(a.upload=a.fallback?a.fallback:a.upload),wt(e.data,null,n)):(st={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&St(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 o=r[e],i=o&&o.length>0?o.split(/ (.*)/):[""];switch(i[0]){case"END":It(6);break;case"UPGRADE":R("Auto");break;case"ACTION":a.action&&i.length>1&&a.action(i[1]);break;case"EXTRACT":i.length>1&&i[1];break;case"SIGNAL":i.length>1&&tt(i[1])}}}(t.responseText),0===t.status&&(wt(e.data,null,n,!0),It(3)),t.status>=200&&t.status<=208&&kt(n),delete ct[n]))}function kt(t){1===t&&(Gt(),Zt())}function St(t){var n=[u(),t];switch(t){case 4:var e=h;e&&((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),gt(n,!1));break;case 25:n.push(_.gap),gt(n);break;case 35:n.push(lt.check),gt(n,!1);break;case 3:n.push(P.key),gt(n);break;case 2:n.push(st.sequence),n.push(st.attempts),n.push(st.status),gt(n,!1);break;case 24:k.key&&n.push(k.key),n.push(k.value),gt(n);break;case 34:var r=Object.keys(V);if(r.length>0){for(var o=0,a=r;o<a.length;o++){var i=a[o];n.push(i),n.push(V[i])}Z(),gt(n,!1)}break;case 0:var c=Object.keys(I);if(c.length>0){for(var s=0,l=c;s<l.length;s++){var d=l[s],f=parseInt(d,10);n.push(f),n.push(Math.round(I[d]))}I={},gt(n,!1)}break;case 1:var p=Object.keys(xt);if(p.length>0){for(var g=0,y=p;g<y.length;g++){var w=y[g];f=parseInt(w,10);n.push(f),n.push(xt[w])}Nt(),gt(n,!1)}break;case 36:var b=Object.keys(v);if(b.length>0){for(var S=0,E=b;S<E.length;S++){var M=E[S];f=parseInt(M,10);n.push(f),n.push([].concat.apply([],v[M]))}gt(n,!1)}break;case 40:m.forEach((function(t){n.push(t);var e=[];for(var r in v[t]){var o=parseInt(r,10);e.push(o),e.push(v[t][r])}n.push(e)})),gt(n,!1)}}function _t(){lt={check:0}}function Et(t){if(0===lt.check){var n=lt.check;n=on.sequence>=128?1:n,n=on.pageNum>=128?7:n,n=u()>72e5?2:n,(n=t>10485760?2:n)!==lt.check&&It(n)}}function It(t){lt.check=t,5!==t&&(Wt(),ne())}function Mt(){0!==lt.check&&St(35)}function Ot(){lt=null}var Tt=null,xt=null,jt=!1;function zt(){Tt={},xt={},jt=!1}function Ct(){Tt={},xt={},jt=!1}function At(t,n){if(n&&(n="".concat(n),t in Tt||(Tt[t]=[]),Tt[t].indexOf(n)<0)){if(Tt[t].length>128)return void(jt||(jt=!0,It(5)));Tt[t].push(n),t in xt||(xt[t]=[]),xt[t].push(n)}}function qt(){St(1)}function Nt(){xt={},jt=!1}function Dt(t){At(36,t.toString())}var Pt=null,Rt=[],Ut=0,Ht=null;function Lt(){var t,n,e;Ht=null;var r=navigator&&"userAgent"in navigator?navigator.userAgent:"",o=null!==(e=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(),c=window.location.ancestorOrigins?Array.from(window.location.ancestorOrigins).toString():"",u=document&&document.title?document.title:"";Ut=r.indexOf("Electron")>0?1:0;var s,l=function(){var t={session:Kt(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=tn("_clsk");if(n){var e=n.split("|");e.length>=5&&t.ts-Qt(e[1])<18e5&&(t.session=e[0],t.count=Qt(e[2])+1,t.upgrade=Qt(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),d=$t(),f=a.projectId||function(t,n){void 0===n&&(n=null);for(var e,r=5381,o=r,a=0;a<t.length;a+=2)r=(r<<5)+r^t.charCodeAt(a),a+1<t.length&&(o=(o<<5)+o^t.charCodeAt(a+1));return e=Math.abs(r+11579*o),(n?e%Math.pow(2,n):e).toString(36)}(location.host);Pt={projectId:f,userId:d.id,sessionId:l.session,pageNum:l.count},a.lean=a.track&&null!==l.upgrade?0===l.upgrade:a.lean,a.upload=a.track&&"string"==typeof a.upload&&l.upload&&l.upload.length>"https://".length?l.upload:a.upload,At(0,r),At(3,u),At(1,function(t,n){if(void 0===n&&(n=!1),n)return"".concat("https://").concat("Electron");var e=a.drop;if(e&&e.length>0&&t&&t.indexOf("?")>0){var r=t.split("?");return r[0]+"?"+r[1].split("&").map((function(t){return e.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}return t}(location.href,!!Ut)),At(2,document.referrer),At(15,function(){var t=Kt();if(a.track&&Ft(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),At(16,document.documentElement.lang),At(17,document.dir),At(26,"".concat(window.devicePixelRatio)),At(28,d.dob.toString()),At(29,d.version.toString()),At(33,c),At(34,o),At(35,i),T(0,l.ts),T(1,0),T(35,Ut),navigator&&(At(9,navigator.language),T(33,navigator.hardwareConcurrency),T(32,navigator.maxTouchPoints),T(34,Math.round(navigator.deviceMemory)),(s=navigator.userAgentData)&&s.getHighEntropyValues?s.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;At(22,t.platform),At(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){At(24,t.name+"~"+t.version)})),At(25,t.model),T(27,t.mobile?1:0)})):At(22,navigator.platform)),screen&&(T(14,Math.round(screen.width)),T(15,Math.round(screen.height)),T(16,Math.round(screen.colorDepth)));for(var p=0,h=a.cookies;p<h.length;p++){var v=h[p],g=tn(v);g&&B(v,g)}!function(t){Dt(t?1:0)}(a.track),Yt(d)}function Vt(){Ht=null,Pt=null,Rt.forEach((function(t){t.called=!1}))}function Bt(t,n,e){void 0===n&&(n=!0),void 0===e&&(e=!1);var r=a.lean?0:1,o=!1;Pt&&(r||!1===n)&&(t(Pt,!a.lean),o=!0),!e&&o||Rt.push({callback:t,wait:n,recall:e,called:o})}function Xt(){return Pt?[Pt.userId,Pt.sessionId,Pt.pageNum].join("."):""}function Jt(t){if(void 0===t&&(t=!0),!t)return a.track=!1,en("_clsk","",-Number.MAX_VALUE),en("_clck","",-Number.MAX_VALUE),ne(),void window.setTimeout(te,250);An()&&(a.track=!0,Yt($t(),1),Gt(),Dt(2))}function Wt(){en("_clsk","",0)}function Zt(){!function(t){if(Rt.length>0)for(var n=0;n<Rt.length;n++){var e=Rt[n];!e.callback||e.called||e.wait&&!t||(e.callback(Pt,!a.lean),e.called=!0,e.recall||(Rt.splice(n,1),n--))}}(a.lean?0:1)}function Gt(){if(Pt){var t=Math.round(Date.now()),n=a.upload&&"string"==typeof a.upload?a.upload.replace("https://",""):"",e=a.lean?0:1;en("_clsk",[Pt.sessionId,t,Pt.pageNum,e,n].join("|"),1)}}function Ft(t,n){try{return!!t[n]}catch(t){return!1}}function Yt(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===a.dob?0:a.dob:t.dob;(null===t.expiry||Math.abs(e-t.expiry)>=1||t.consent!==n||t.dob!==r)&&en("_clck",[Pt.userId,2,e.toString(36),n,r].join("|"),365)}function Kt(){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 Qt(t,n){return void 0===n&&(n=10),parseInt(t,n)}function $t(){var t={id:Kt(),version:0,expiry:null,consent:0,dob:0},n=tn("_clck");if(n&&n.length>0){for(var e=n.split("|"),r=0,o=0,i=document.cookie.split(";");o<i.length;o++){r+="_clck"===i[o].split("=")[0].trim()?1:0}if(1===e.length||r>1){var c="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(c),document.cookie="".concat("_clsk","=").concat(c)}e.length>1&&(t.version=Qt(e[1])),e.length>2&&(t.expiry=Qt(e[2],36)),e.length>3&&1===Qt(e[3])&&(t.consent=1),e.length>4&&Qt(e[1])>1&&(t.dob=Qt(e[4])),a.track=a.track||1===t.consent,t.id=a.track?e[0]:t.id}return t}function tn(t){var n;if(Ft(document,"cookie")){var e=document.cookie.split(";");if(e)for(var r=0;r<e.length;r++){var o=e[r].split("=");if(o.length>1&&o[0]&&o[0].trim()===t){for(var a=nn(o[1]),i=a[0],c=a[1];i;)i=(n=nn(c))[0],c=n[1];return c}}}return null}function nn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function en(t,n,e){if((a.track||""==n)&&(navigator&&navigator.cookieEnabled||Ft(document,"cookie"))){var r=function(t){return encodeURIComponent(t)}(n),o=new Date;o.setDate(o.getDate()+e);var i=o?"expires="+o.toUTCString():"",c="".concat(t,"=").concat(r).concat(";").concat(i).concat(";path=/");try{if(null===Ht){for(var u=location.hostname?location.hostname.split("."):[],s=u.length-1;s>=0;s--)if(Ht=".".concat(u[s]).concat(Ht||""),s<u.length-1&&(document.cookie="".concat(c).concat(";").concat("domain=").concat(Ht),tn(t)===n))return;Ht=""}}catch(t){Ht=""}document.cookie=Ht?"".concat(c).concat(";").concat("domain=").concat(Ht):c}}var rn,on=null;function an(){var t=Pt;on={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 cn(){on=null}function un(t){return on.start=on.start+on.duration,on.duration=u()-on.start,on.sequence++,on.upload=t&&"sendBeacon"in navigator?1:0,on.end=t?1:0,[on.version,on.sequence,on.start,on.duration,on.projectId,on.userId,on.sessionId,on.pageNum,on.upload,on.end]}function sn(){rn=[]}function ln(t){if(rn&&-1===rn.indexOf(t.message)){var n=a.report;if(n&&n.length>0){var e={v:on.version,p:on.projectId,u:on.userId,s:on.sessionId,n:on.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)),rn.push(t.message)}}return t}function dn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw ln(t)}var e=performance.now()-n;O(4,e),e>a.longTask&&(M(7),T(6,e))}}var fn=[];function pn(t,n,e,r){void 0===r&&(r=!1),e=dn(e);try{t[i("addEventListener")](n,e,r),fn.push({event:n,target:t,listener:e,capture:r})}catch(t){}}function hn(){for(var t=0,n=fn;t<n.length;t++){var e=n[t];try{e.target[i("removeEventListener")](e.event,e.listener,e.capture)}catch(t){}}fn=[]}var vn=null,gn=null,mn=null,yn=0;function wn(){return!(yn++>20)}function bn(){yn=0,mn!==Sn()&&(ne(),window.setTimeout(kn,250))}function kn(){te(),T(29,1)}function Sn(){return location.href?location.href.replace(location.hash,""):location.href}var _n=[],En=null,In=null,Mn=null;function On(){In&&(Mn(),In=null,null===En&&xn())}function Tn(){_n=[],En=null,In=null}function xn(){var t=_n.shift();t&&(En=t,t.task().then((function(){t.id===Xt()&&(t.resolve(),En=null,xn())})).catch((function(n){t.id===Xt()&&(n&&(n.name,n.message,n.stack),En=null,xn())})))}var jn=!1;function zn(){jn=!0,c=performance.now()+performance.timeOrigin,Tn(),hn(),sn(),mn=Sn(),yn=0,pn(window,"popstate",bn),null===vn&&(vn=history.pushState,history.pushState=function(){vn.apply(this,arguments),An()&&wn()&&bn()}),null===gn&&(gn=history.replaceState,history.replaceState=function(){gn.apply(this,arguments),An()&&wn()&&bn()})}function Cn(){mn=null,yn=0,sn(),hn(),Tn(),c=0,jn=!1}function An(){return jn}function qn(){te(),S("clarity","restart")}var Nn=null;function Dn(){Nn=null}function Pn(t){Nn={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){H(this,void 0,void 0,(function(){var n,e;return L(this,(function(r){return n=u(),e=[n,t],29===t&&(e.push(Nn.fetchStart),e.push(Nn.connectStart),e.push(Nn.connectEnd),e.push(Nn.requestStart),e.push(Nn.responseStart),e.push(Nn.responseEnd),e.push(Nn.domInteractive),e.push(Nn.domComplete),e.push(Nn.loadEventStart),e.push(Nn.loadEventEnd),e.push(Nn.redirectCount),e.push(Nn.size),e.push(Nn.type),e.push(Nn.protocol),e.push(Nn.encodedSize),e.push(Nn.decodedSize),Dn(),gt(e)),[2]}))}))}(29)}var Rn,Un=0,Hn=1/0,Ln=0,Vn=0,Bn=[],Xn=new Map,Jn=function(){return Un||0},Wn=function(){if(!Bn.length)return-1;var t=Math.min(Bn.length-1,Math.floor((Jn()-Vn)/50));return Bn[t].latency},Zn=function(){Vn=Jn(),Bn.length=0,Xn.clear()},Gn=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Un=performance.interactionCount:t.interactionId&&(Hn=Math.min(Hn,t.interactionId),Ln=Math.max(Ln,t.interactionId),Un=Ln?(Ln-Hn)/7+1:0)}(t);var n=Bn[Bn.length-1],e=Xn.get(t.interactionId);if(e||Bn.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};Xn.set(r.id,r),Bn.push(r)}Bn.sort((function(t,n){return n.latency-t.latency})),Bn.length>10&&Bn.splice(10).forEach((function(t){return Xn.delete(t.id)}))}}},Fn=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Yn(){try{Rn&&Rn.disconnect(),Rn=new PerformanceObserver(dn(Kn));for(var t=0,n=Fn;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&O(9,0),Rn.observe({type:e,buffered:!0}))}}catch(t){}}function Kn(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":Pn(r);break;case"resource":var o=r.name;At(4,Qn(o)),o!==a.upload&&o!==a.fallback||T(28,r.duration);break;case"longtask":M(7);break;case"first-input":n&&T(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Gn(r),At(37,Wn().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&O(9,1e3*r.value);break;case"largest-contentful-paint":n&&T(8,r.startTime)}}}(t.getEntries())}function Qn(t){var n=document.createElement("a");return n.href=t,n.host}var $n=[b,b,b,Object.freeze({__proto__:null,start:function(){Dn(),function(){navigator&&"connection"in navigator&&At(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?pn(window,"load",x.bind(this,Yn,0)):Yn())}()},stop:function(){Rn&&Rn.disconnect(),Rn=null,Zn(),Dn()}})];function te(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===jn&&"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||jn)return!1;for(var n in t)n in a&&(a[n]=t[n])}(t),zn(),et(),$n.forEach((function(t){return dn(t.start)()})),null===t&&ae())}function ne(){An()&&($n.slice().reverse().forEach((function(t){return dn(t.stop)()})),rt(),Cn(),void 0!==re&&(re[oe]=function(){(re[oe].q=re[oe].q||[]).push(arguments),"start"===arguments[0]&&re[oe].q.unshift(re[oe].q.pop())&&ae()}))}var ee=Object.freeze({__proto__:null,consent:Jt,event:S,hashText:y,identify:X,metadata:Bt,pause:function(){An()&&(S("clarity","pause"),null===In&&(In=new Promise((function(t){Mn=t}))))},resume:function(){An()&&(On(),S("clarity","resume"))},set:B,signal:function(t){$=t},start:te,stop:ne,upgrade:R,version:s}),re=window,oe="clarity";function ae(){if(void 0!==re){if(re[oe]&&re[oe].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=re[oe]&&re[oe].q||[];for(re[oe]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ee[t].apply(ee,n)},re[oe].v=s;t.length>0;)re[oe].apply(re,t.shift())}}ae()}();
1
+ !function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return gt},get start(){return vt},get stop(){return mt},get track(){return st}}),n=Object.freeze({__proto__:null,get check(){return Et},get compute(){return Mt},get data(){return lt},get start(){return _t},get stop(){return Ot},get trigger(){return It}}),e=Object.freeze({__proto__:null,get compute(){return qt},get data(){return Tt},get log(){return At},get reset(){return Nt},get start(){return zt},get stop(){return Ct},get updates(){return xt}}),r=Object.freeze({__proto__:null,get callback(){return Zt},get callbacks(){return Rt},get clear(){return Jt},get consent(){return Wt},get data(){return Pt},get electron(){return Ut},get id(){return Xt},get metadata(){return Bt},get save(){return Gt},get shortid(){return Kt},get start(){return Lt},get stop(){return Vt}}),o=Object.freeze({__proto__:null,get data(){return on},get envelope(){return un},get start(){return an},get stop(){return cn}}),a={projectId:null,delay:1e3,lean:!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,longTask:30,includeSubdomains:!0};function i(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function u(t){void 0===t&&(t=null);var n=t&&t.timeStamp>0?t.timeStamp:performance.now(),e=t&&t.view?t.view.performance.timeOrigin:performance.timeOrigin;return Math.max(Math.round(n+e-c),0)}var s="0.7.57";var l=!0,d=null,f=null;function p(t,n,e){return function(){if(l&&null===d)try{d=new RegExp("\\p{N}","gu"),f=new RegExp("\\p{L}","gu"),new RegExp("\\p{Sc}","gu")}catch(t){l=!1}}(),t?t.replace(f,n).replace(d,e):t}var h=[],v=null;function g(){}var m=[];function y(){}function b(){}var w=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:v,hashText:y,keys:m,log:g,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:h,stop:function(){},trigger:b}),k=null;function S(t,n){An()&&t&&"string"==typeof t&&t.length<255&&(k=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},St(24))}var _,E=null,I=null;function M(t){t in E||(E[t]=0),t in I||(I[t]=0),E[t]++,I[t]++}function O(t,n){null!==n&&(t in E||(E[t]=0),t in I||(I[t]=0),E[t]+=n,I[t]+=n)}function T(t,n){null!==n&&!1===isNaN(n)&&(t in E||(E[t]=0),(n>E[t]||0===E[t])&&(I[t]=n,E[t]=n))}function x(t,n,e){return window.setTimeout(dn(t),n,e)}function j(t){return window.clearTimeout(t)}var z=0,C=0,A=null;function q(){A&&j(A),A=x(N,C),z=u()}function N(){var t=u();_={gap:t-z},St(25),_.gap<3e5?A=x(N,C):jn&&(S("clarity","suspend"),ne(),["mousemove","touchstart"].forEach((function(t){return pn(document,t,qn)})),["resize","scroll","pageshow"].forEach((function(t){return pn(window,t,qn)})))}var D=Object.freeze({__proto__:null,get data(){return _},reset:q,start:function(){C=6e4,z=0},stop:function(){j(A),z=0,C=0}}),P=null;function R(t){An()&&a.lean&&(a.lean=!1,P={key:t},Zt(),Gt(),a.upgrade&&a.upgrade(t),St(3))}var U=Object.freeze({__proto__:null,get data(){return P},start:function(){!a.lean&&a.upgrade&&a.upgrade("Config"),P=null},stop:function(){P=null},upgrade:R});function H(t,n,e,r){return new(e||(e=Promise))((function(o,a){function i(t){try{u(r.next(t))}catch(t){a(t)}}function c(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(i,c)}u((r=r.apply(t,n||[])).next())}))}function L(t,n){var e,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(e)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(e=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(t,i)}catch(t){c=[6,t],r=0}finally{e=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var V=null;function B(t,n){W(t,"string"==typeof n?[n]:n)}function X(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),H(this,void 0,void 0,(function(){var o,a;return L(this,(function(i){switch(i.label){case 0:return a={},[4,G(t)];case 1:return a.userId=i.sent(),a.userHint=r||((c=t)&&c.length>=5?"".concat(c.substring(0,2)).concat(p(c.substring(2),"*","*")):p(c,"*","*")),W("userId",[(o=a).userId]),W("userHint",[o.userHint]),W("userType",[F(t)]),n&&(W("sessionId",[n]),o.sessionId=n),e&&(W("pageId",[e]),o.pageId=e),[2,o]}var c}))}))}function W(t,n){if(An()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in V?V[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);V[t]=e}}function J(){St(34)}function Z(){V={}}function G(t){return H(this,void 0,void 0,(function(){var n;return L(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 F(t){return t&&t.indexOf("@")>0?"email":"string"}var Y="CompressionStream"in window;function K(t){return H(this,void 0,void 0,(function(){var n,e;return L(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),Y?(n=new ReadableStream({start:function(n){return H(this,void 0,void 0,(function(){return L(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,Q(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 Q(t){return H(this,void 0,void 0,(function(){var n,e,r,o,a;return L(this,(function(i){switch(i.label){case 0:n=t.getReader(),e=[],r=!1,o=[],i.label=1;case 1:return r?[3,3]:[4,n.read()];case 2:return a=i.sent(),r=a.done,o=a.value,r?[2,e]:(e.push.apply(e,o),[3,1]);case 3:return[2,e]}}))}))}var $=null;function tt(t){try{if(!$)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){$(t)}))}catch(t){}}var nt=[w,e,Object.freeze({__proto__:null,compute:J,get data(){return V},identify:X,reset:Z,set:B,start:function(){Z()},stop:function(){Z()}}),n,w,r,o,t,D,U,w];function et(){E={},I={},M(5),nt.forEach((function(t){return dn(t.start)()}))}function rt(){nt.slice().reverse().forEach((function(t){return dn(t.stop)()})),E={},I={}}function ot(){J(),qt(),St(0),Mt()}var at,it,ct,ut,st,lt,dt=0,ft=0,pt=null,ht=0;function vt(){ut=!0,dt=0,ft=0,ht=0,at=[],it=[],ct={},st=null}function gt(t,n){if(void 0===n&&(n=!0),ut){var e=u(),r=t.length>1?t[1]:null,o=JSON.stringify(t);switch(r){case 5:dt+=o.length;case 37:case 6:case 43:case 45:case 46:ft+=o.length,at.push(o);break;default:it.push(o)}M(25);var i=function(){var t=!1===a.lean&&dt>0?100:on.sequence*a.delay;return"string"==typeof a.upload?Math.max(Math.min(t,3e4),100):a.delay}();e-ht>2*i&&(j(pt),pt=null),n&&null===pt&&(25!==r&&q(),pt=x(yt,i),ht=e,Et(ft))}}function mt(){j(pt),yt(!0),dt=0,ft=0,ht=0,at=[],it=[],ct={},st=null,ut=!1}function yt(t){return void 0===t&&(t=!1),H(this,void 0,void 0,(function(){var n,e,r,o,i,c,u,s;return L(this,(function(l){switch(l.label){case 0:return pt=null,(n=!1===a.lean&&ft>0&&(ft<1048576||on.sequence>0))&&T(1,1),ot(),e=!0===t,r=JSON.stringify(un(e)),o="[".concat(it.join(),"]"),i=n?"[".concat(at.join(),"]"):"",c=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:o,p:i}),e?(s=null,[3,3]):[3,1];case 1:return[4,K(c)];case 2:s=l.sent(),l.label=3;case 3:return O(2,(u=s)?u.length:c.length),bt(c,u,on.sequence,e),it=[],n&&(at=[],ft=0,dt=0),[2]}}))}))}function bt(t,n,e,r){if(void 0===r&&(r=!1),"string"==typeof a.upload){var o=a.upload,i=!1;if(r&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(o,t))&&kt(e)}catch(t){}if(!1===i){e in ct?ct[e].attempts++:ct[e]={data:t,attempts:1};var c=new XMLHttpRequest;c.open("POST",o,!0),c.timeout=15e3,c.ontimeout=function(){ln(new Error("".concat("Timeout"," : ").concat(o)))},null!==e&&(c.onreadystatechange=function(){dn(wt)(c,e)}),c.withCredentials=!0,n?(c.setRequestHeader("Accept","application/x-clarity-gzip"),c.send(n)):c.send(t)}}else if(a.upload){(0,a.upload)(t),kt(e)}}function wt(t,n){var e=ct[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?It(6):(0===t.status&&(a.upload=a.fallback?a.fallback:a.upload),bt(e.data,null,n)):(st={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&St(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 o=r[e],i=o&&o.length>0?o.split(/ (.*)/):[""];switch(i[0]){case"END":It(6);break;case"UPGRADE":R("Auto");break;case"ACTION":a.action&&i.length>1&&a.action(i[1]);break;case"EXTRACT":i.length>1&&i[1];break;case"SIGNAL":i.length>1&&tt(i[1])}}}(t.responseText),0===t.status&&(bt(e.data,null,n,!0),It(3)),t.status>=200&&t.status<=208&&kt(n),delete ct[n]))}function kt(t){1===t&&(Gt(),Zt())}function St(t){var n=[u(),t];switch(t){case 4:var e=h;e&&((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),gt(n,!1));break;case 25:n.push(_.gap),gt(n);break;case 35:n.push(lt.check),gt(n,!1);break;case 3:n.push(P.key),gt(n);break;case 2:n.push(st.sequence),n.push(st.attempts),n.push(st.status),gt(n,!1);break;case 24:k.key&&n.push(k.key),n.push(k.value),gt(n);break;case 34:var r=Object.keys(V);if(r.length>0){for(var o=0,a=r;o<a.length;o++){var i=a[o];n.push(i),n.push(V[i])}Z(),gt(n,!1)}break;case 0:var c=Object.keys(I);if(c.length>0){for(var s=0,l=c;s<l.length;s++){var d=l[s],f=parseInt(d,10);n.push(f),n.push(Math.round(I[d]))}I={},gt(n,!1)}break;case 1:var p=Object.keys(xt);if(p.length>0){for(var g=0,y=p;g<y.length;g++){var b=y[g];f=parseInt(b,10);n.push(f),n.push(xt[b])}Nt(),gt(n,!1)}break;case 36:var w=Object.keys(v);if(w.length>0){for(var S=0,E=w;S<E.length;S++){var M=E[S];f=parseInt(M,10);n.push(f),n.push([].concat.apply([],v[M]))}gt(n,!1)}break;case 40:m.forEach((function(t){n.push(t);var e=[];for(var r in v[t]){var o=parseInt(r,10);e.push(o),e.push(v[t][r])}n.push(e)})),gt(n,!1)}}function _t(){lt={check:0}}function Et(t){if(0===lt.check){var n=lt.check;n=on.sequence>=128?1:n,n=on.pageNum>=128?7:n,n=u()>72e5?2:n,(n=t>10485760?2:n)!==lt.check&&It(n)}}function It(t){lt.check=t,5!==t&&(Jt(),ne())}function Mt(){0!==lt.check&&St(35)}function Ot(){lt=null}var Tt=null,xt=null,jt=!1;function zt(){Tt={},xt={},jt=!1}function Ct(){Tt={},xt={},jt=!1}function At(t,n){if(n&&(n="".concat(n),t in Tt||(Tt[t]=[]),Tt[t].indexOf(n)<0)){if(Tt[t].length>128)return void(jt||(jt=!0,It(5)));Tt[t].push(n),t in xt||(xt[t]=[]),xt[t].push(n)}}function qt(){St(1)}function Nt(){xt={},jt=!1}function Dt(t){At(36,t.toString())}var Pt=null,Rt=[],Ut=0,Ht=null;function Lt(){var t,n,e;Ht=null;var r=navigator&&"userAgent"in navigator?navigator.userAgent:"",o=null!==(e=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(),c=window.location.ancestorOrigins?Array.from(window.location.ancestorOrigins).toString():"",u=document&&document.title?document.title:"";Ut=r.indexOf("Electron")>0?1:0;var s,l=function(){var t={session:Kt(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=tn("_clsk",!a.includeSubdomains);if(n){var e=n.split("|");e.length>=5&&t.ts-Qt(e[1])<18e5&&(t.session=e[0],t.count=Qt(e[2])+1,t.upgrade=Qt(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),d=$t(),f=a.projectId||function(t,n){void 0===n&&(n=null);for(var e,r=5381,o=r,a=0;a<t.length;a+=2)r=(r<<5)+r^t.charCodeAt(a),a+1<t.length&&(o=(o<<5)+o^t.charCodeAt(a+1));return e=Math.abs(r+11579*o),(n?e%Math.pow(2,n):e).toString(36)}(location.host);Pt={projectId:f,userId:d.id,sessionId:l.session,pageNum:l.count},a.lean=a.track&&null!==l.upgrade?0===l.upgrade:a.lean,a.upload=a.track&&"string"==typeof a.upload&&l.upload&&l.upload.length>"https://".length?l.upload:a.upload,At(0,r),At(3,u),At(1,function(t,n){if(void 0===n&&(n=!1),n)return"".concat("https://").concat("Electron");var e=a.drop;if(e&&e.length>0&&t&&t.indexOf("?")>0){var r=t.split("?");return r[0]+"?"+r[1].split("&").map((function(t){return e.some((function(n){return 0===t.indexOf("".concat(n,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}return t}(location.href,!!Ut)),At(2,document.referrer),At(15,function(){var t=Kt();if(a.track&&Ft(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),At(16,document.documentElement.lang),At(17,document.dir),At(26,"".concat(window.devicePixelRatio)),At(28,d.dob.toString()),At(29,d.version.toString()),At(33,c),At(34,o),At(35,i),T(0,l.ts),T(1,0),T(35,Ut),navigator&&(At(9,navigator.language),T(33,navigator.hardwareConcurrency),T(32,navigator.maxTouchPoints),T(34,Math.round(navigator.deviceMemory)),(s=navigator.userAgentData)&&s.getHighEntropyValues?s.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;At(22,t.platform),At(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){At(24,t.name+"~"+t.version)})),At(25,t.model),T(27,t.mobile?1:0)})):At(22,navigator.platform)),screen&&(T(14,Math.round(screen.width)),T(15,Math.round(screen.height)),T(16,Math.round(screen.colorDepth)));for(var p=0,h=a.cookies;p<h.length;p++){var v=h[p],g=tn(v);g&&B(v,g)}!function(t){Dt(t?1:0)}(a.track),Yt(d)}function Vt(){Ht=null,Pt=null,Rt.forEach((function(t){t.called=!1}))}function Bt(t,n,e){void 0===n&&(n=!0),void 0===e&&(e=!1);var r=a.lean?0:1,o=!1;Pt&&(r||!1===n)&&(t(Pt,!a.lean),o=!0),!e&&o||Rt.push({callback:t,wait:n,recall:e,called:o})}function Xt(){return Pt?[Pt.userId,Pt.sessionId,Pt.pageNum].join("."):""}function Wt(t){if(void 0===t&&(t=!0),!t)return a.track=!1,en("_clsk","",-Number.MAX_VALUE),en("_clck","",-Number.MAX_VALUE),ne(),void window.setTimeout(te,250);An()&&(a.track=!0,Yt($t(),1),Gt(),Dt(2))}function Jt(){en("_clsk","",0)}function Zt(){!function(t){if(Rt.length>0)for(var n=0;n<Rt.length;n++){var e=Rt[n];!e.callback||e.called||e.wait&&!t||(e.callback(Pt,!a.lean),e.called=!0,e.recall||(Rt.splice(n,1),n--))}}(a.lean?0:1)}function Gt(){if(Pt){var t=Math.round(Date.now()),n=a.upload&&"string"==typeof a.upload?a.upload.replace("https://",""):"",e=a.lean?0:1;en("_clsk",[Pt.sessionId,t,Pt.pageNum,e,n].join("|"),1)}}function Ft(t,n){try{return!!t[n]}catch(t){return!1}}function Yt(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===a.dob?0:a.dob:t.dob;(null===t.expiry||Math.abs(e-t.expiry)>=1||t.consent!==n||t.dob!==r)&&en("_clck",[Pt.userId,2,e.toString(36),n,r].join("|"),365)}function Kt(){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 Qt(t,n){return void 0===n&&(n=10),parseInt(t,n)}function $t(){var t={id:Kt(),version:0,expiry:null,consent:0,dob:0},n=tn("_clck",!a.includeSubdomains);if(n&&n.length>0){for(var e=n.split("|"),r=0,o=0,i=document.cookie.split(";");o<i.length;o++){r+="_clck"===i[o].split("=")[0].trim()?1:0}if(1===e.length||r>1){var c="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(c),document.cookie="".concat("_clsk","=").concat(c)}e.length>1&&(t.version=Qt(e[1])),e.length>2&&(t.expiry=Qt(e[2],36)),e.length>3&&1===Qt(e[3])&&(t.consent=1),e.length>4&&Qt(e[1])>1&&(t.dob=Qt(e[4])),a.track=a.track||1===t.consent,t.id=a.track?e[0]:t.id}return t}function tn(t,n){var e;if(void 0===n&&(n=!1),Ft(document,"cookie")){var r=document.cookie.split(";");if(r)for(var o=0;o<r.length;o++){var a=r[o].split("=");if(a.length>1&&a[0]&&a[0].trim()===t){for(var i=nn(a[1]),c=i[0],u=i[1];c;)c=(e=nn(u))[0],u=e[1];return n?u.endsWith("".concat("~","1"))?u.substring(0,u.length-2):null:u}}}return null}function nn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function en(t,n,e){if((a.track||""==n)&&(navigator&&navigator.cookieEnabled||Ft(document,"cookie"))){var r=function(t){return encodeURIComponent(t)}(n),o=new Date;o.setDate(o.getDate()+e);var i=o?"expires="+o.toUTCString():"",c="".concat(t,"=").concat(r).concat(";").concat(i).concat(";path=/");try{if(null===Ht){for(var u=location.hostname?location.hostname.split("."):[],s=u.length-1;s>=0;s--)if(Ht=".".concat(u[s]).concat(Ht||""),s<u.length-1&&(document.cookie="".concat(c).concat(";").concat("domain=").concat(Ht),tn(t)===n))return;Ht=""}}catch(t){Ht=""}document.cookie=Ht?"".concat(c).concat(";").concat("domain=").concat(Ht):c}}var rn,on=null;function an(){var t=Pt;on={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 cn(){on=null}function un(t){return on.start=on.start+on.duration,on.duration=u()-on.start,on.sequence++,on.upload=t&&"sendBeacon"in navigator?1:0,on.end=t?1:0,[on.version,on.sequence,on.start,on.duration,on.projectId,on.userId,on.sessionId,on.pageNum,on.upload,on.end]}function sn(){rn=[]}function ln(t){if(rn&&-1===rn.indexOf(t.message)){var n=a.report;if(n&&n.length>0){var e={v:on.version,p:on.projectId,u:on.userId,s:on.sessionId,n:on.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)),rn.push(t.message)}}return t}function dn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw ln(t)}var e=performance.now()-n;O(4,e),e>a.longTask&&(M(7),T(6,e))}}var fn=[];function pn(t,n,e,r){void 0===r&&(r=!1),e=dn(e);try{t[i("addEventListener")](n,e,r),fn.push({event:n,target:t,listener:e,capture:r})}catch(t){}}function hn(){for(var t=0,n=fn;t<n.length;t++){var e=n[t];try{e.target[i("removeEventListener")](e.event,e.listener,e.capture)}catch(t){}}fn=[]}var vn=null,gn=null,mn=null,yn=0;function bn(){return!(yn++>20)}function wn(){yn=0,mn!==Sn()&&(ne(),window.setTimeout(kn,250))}function kn(){te(),T(29,1)}function Sn(){return location.href?location.href.replace(location.hash,""):location.href}var _n=[],En=null,In=null,Mn=null;function On(){In&&(Mn(),In=null,null===En&&xn())}function Tn(){_n=[],En=null,In=null}function xn(){var t=_n.shift();t&&(En=t,t.task().then((function(){t.id===Xt()&&(t.resolve(),En=null,xn())})).catch((function(n){t.id===Xt()&&(n&&(n.name,n.message,n.stack),En=null,xn())})))}var jn=!1;function zn(){jn=!0,c=performance.now()+performance.timeOrigin,Tn(),hn(),sn(),mn=Sn(),yn=0,pn(window,"popstate",wn),null===vn&&(vn=history.pushState,history.pushState=function(){vn.apply(this,arguments),An()&&bn()&&wn()}),null===gn&&(gn=history.replaceState,history.replaceState=function(){gn.apply(this,arguments),An()&&bn()&&wn()})}function Cn(){mn=null,yn=0,sn(),hn(),Tn(),c=0,jn=!1}function An(){return jn}function qn(){te(),S("clarity","restart")}var Nn=null;function Dn(){Nn=null}function Pn(t){Nn={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){H(this,void 0,void 0,(function(){var n,e;return L(this,(function(r){return n=u(),e=[n,t],29===t&&(e.push(Nn.fetchStart),e.push(Nn.connectStart),e.push(Nn.connectEnd),e.push(Nn.requestStart),e.push(Nn.responseStart),e.push(Nn.responseEnd),e.push(Nn.domInteractive),e.push(Nn.domComplete),e.push(Nn.loadEventStart),e.push(Nn.loadEventEnd),e.push(Nn.redirectCount),e.push(Nn.size),e.push(Nn.type),e.push(Nn.protocol),e.push(Nn.encodedSize),e.push(Nn.decodedSize),Dn(),gt(e)),[2]}))}))}(29)}var Rn,Un=0,Hn=1/0,Ln=0,Vn=0,Bn=[],Xn=new Map,Wn=function(){return Un||0},Jn=function(){if(!Bn.length)return-1;var t=Math.min(Bn.length-1,Math.floor((Wn()-Vn)/50));return Bn[t].latency},Zn=function(){Vn=Wn(),Bn.length=0,Xn.clear()},Gn=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Un=performance.interactionCount:t.interactionId&&(Hn=Math.min(Hn,t.interactionId),Ln=Math.max(Ln,t.interactionId),Un=Ln?(Ln-Hn)/7+1:0)}(t);var n=Bn[Bn.length-1],e=Xn.get(t.interactionId);if(e||Bn.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};Xn.set(r.id,r),Bn.push(r)}Bn.sort((function(t,n){return n.latency-t.latency})),Bn.length>10&&Bn.splice(10).forEach((function(t){return Xn.delete(t.id)}))}}},Fn=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function Yn(){try{Rn&&Rn.disconnect(),Rn=new PerformanceObserver(dn(Kn));for(var t=0,n=Fn;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&O(9,0),Rn.observe({type:e,buffered:!0}))}}catch(t){}}function Kn(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":Pn(r);break;case"resource":var o=r.name;At(4,Qn(o)),o!==a.upload&&o!==a.fallback||T(28,r.duration);break;case"longtask":M(7);break;case"first-input":n&&T(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(Gn(r),At(37,Jn().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&O(9,1e3*r.value);break;case"largest-contentful-paint":n&&T(8,r.startTime)}}}(t.getEntries())}function Qn(t){var n=document.createElement("a");return n.href=t,n.host}var $n=[w,w,w,Object.freeze({__proto__:null,start:function(){Dn(),function(){navigator&&"connection"in navigator&&At(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?pn(window,"load",x.bind(this,Yn,0)):Yn())}()},stop:function(){Rn&&Rn.disconnect(),Rn=null,Zn(),Dn()}})];function te(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===jn&&"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||jn)return!1;for(var n in t)n in a&&(a[n]=t[n])}(t),zn(),et(),$n.forEach((function(t){return dn(t.start)()})),null===t&&ae())}function ne(){An()&&($n.slice().reverse().forEach((function(t){return dn(t.stop)()})),rt(),Cn(),void 0!==re&&(re[oe]=function(){(re[oe].q=re[oe].q||[]).push(arguments),"start"===arguments[0]&&re[oe].q.unshift(re[oe].q.pop())&&ae()}))}var ee=Object.freeze({__proto__:null,consent:Wt,event:S,hashText:y,identify:X,metadata:Bt,pause:function(){An()&&(S("clarity","pause"),null===In&&(In=new Promise((function(t){Mn=t}))))},resume:function(){An()&&(On(),S("clarity","resume"))},set:B,signal:function(t){$=t},start:te,stop:ne,upgrade:R,version:s}),re=window,oe="clarity";function ae(){if(void 0!==re){if(re[oe]&&re[oe].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=re[oe]&&re[oe].q||[];for(re[oe]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ee[t].apply(ee,n)},re[oe].v=s;t.length>0;)re[oe].apply(re,t.shift())}}ae()}();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarity-js",
3
- "version": "0.7.56",
3
+ "version": "0.7.57",
4
4
  "description": "An analytics library that uses web page interactions to generate aggregated insights",
5
5
  "author": "Microsoft Corp.",
6
6
  "license": "MIT",
@@ -23,6 +23,7 @@ let config: Config = {
23
23
  throttleDom: true,
24
24
  conversions: false,
25
25
  longTask: 30,
26
+ includeSubdomains: true,
26
27
  };
27
28
 
28
29
  export default config;
@@ -1,2 +1,2 @@
1
- let version = "0.7.56";
1
+ let version = "0.7.57";
2
2
  export default version;
@@ -213,7 +213,7 @@ export function shortid(): string {
213
213
 
214
214
  function session(): Session {
215
215
  let output: Session = { session: shortid(), ts: Math.round(Date.now()), count: 1, upgrade: null, upload: Constant.Empty };
216
- let value = getCookie(Constant.SessionKey);
216
+ let value = getCookie(Constant.SessionKey, !config.includeSubdomains);
217
217
  if (value) {
218
218
  let parts = value.split(Constant.Pipe);
219
219
  // Making it backward & forward compatible by using greater than comparison (v0.6.21)
@@ -234,7 +234,7 @@ function num(string: string, base: number = 10): number {
234
234
 
235
235
  function user(): User {
236
236
  let output: User = { id: shortid(), version: 0, expiry: null, consent: BooleanFlag.False, dob: 0 };
237
- let cookie = getCookie(Constant.CookieKey);
237
+ let cookie = getCookie(Constant.CookieKey, !config.includeSubdomains);
238
238
  if (cookie && cookie.length > 0) {
239
239
  // Splitting and looking up first part for forward compatibility, in case we wish to store additional information in a cookie
240
240
  let parts = cookie.split(Constant.Pipe);
@@ -266,7 +266,7 @@ function user(): User {
266
266
  return output;
267
267
  }
268
268
 
269
- function getCookie(key: string): string {
269
+ function getCookie(key: string, limit = false): string {
270
270
  if (supported(document, Constant.Cookie)) {
271
271
  let cookies: string[] = document.cookie.split(Constant.Semicolon);
272
272
  if (cookies) {
@@ -285,6 +285,13 @@ function getCookie(key: string): string {
285
285
  [isEncoded, decodedValue] = decodeCookieValue(decodedValue);
286
286
  }
287
287
 
288
+ // If we are limiting cookies, check if the cookie value is limited
289
+ if (limit) {
290
+ return decodedValue.endsWith(`${Constant.Tilde}1`)
291
+ ? decodedValue.substring(0, decodedValue.length - 2)
292
+ : null;
293
+ }
294
+
288
295
  return decodedValue;
289
296
  }
290
297
  }
@@ -10,6 +10,7 @@ export let state: AnimationState[] = [];
10
10
  let elementAnimate: (keyframes: Keyframe[] | PropertyIndexedKeyframes, options?: number | KeyframeAnimationOptions) => Animation = null;
11
11
  let animationPlay: () => void = null;
12
12
  let animationPause: () => void = null;
13
+ let animationCommitStyles: () => void = null;
13
14
  let animationCancel: () => void = null;
14
15
  let animationFinish: () => void = null;
15
16
  const animationId = 'clarityAnimationId';
@@ -19,13 +20,16 @@ const maxOperations = 20;
19
20
  export function start(): void {
20
21
  if (
21
22
  window["Animation"] &&
23
+ window["Animation"].prototype &&
22
24
  window["KeyframeEffect"] &&
25
+ window["KeyframeEffect"].prototype &&
23
26
  window["KeyframeEffect"].prototype.getKeyframes &&
24
27
  window["KeyframeEffect"].prototype.getTiming
25
28
  ) {
26
29
  reset();
27
30
  overrideAnimationHelper(animationPlay, "play");
28
31
  overrideAnimationHelper(animationPause, "pause");
32
+ overrideAnimationHelper(animationCommitStyles, "commitStyles");
29
33
  overrideAnimationHelper(animationCancel, "cancel");
30
34
  overrideAnimationHelper(animationFinish, "finish");
31
35
  if (elementAnimate === null) {
@@ -116,6 +120,9 @@ function trackAnimationOperation(animation: Animation, name: string) {
116
120
  case "finish":
117
121
  operation = AnimationOperation.Finish;
118
122
  break;
123
+ case "commitStyles":
124
+ operation = AnimationOperation.CommitStyles;
125
+ break;
119
126
  }
120
127
  if (operation) {
121
128
  track(time(), animation[animationId], operation);
@@ -123,4 +130,4 @@ function trackAnimationOperation(animation: Animation, name: string) {
123
130
  }
124
131
  }
125
132
  }
126
- }
133
+ }