clarity-js 0.8.20 → 0.8.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/clarity.extended.js +1 -1
- package/build/clarity.insight.js +1 -1
- package/build/clarity.js +273 -123
- package/build/clarity.min.js +1 -1
- package/build/clarity.module.js +273 -123
- package/build/clarity.performance.js +1 -1
- package/package.json +1 -1
- package/src/core/version.ts +1 -1
- package/src/data/metadata.ts +1 -1
- package/src/data/upload.ts +19 -3
- package/src/interaction/click.ts +1 -1
- package/src/interaction/pointer.ts +2 -2
- package/src/interaction/resize.ts +6 -2
- package/src/performance/blank.ts +1 -0
- package/src/performance/observer.ts +1 -1
- package/types/data.d.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return It},get start(){return _t},get stop(){return Et},get track(){return gt}}),n=Object.freeze({__proto__:null,get check(){return Ct},get compute(){return Pt},get data(){return mt},get start(){return zt},get stop(){return qt},get trigger(){return At}}),e=Object.freeze({__proto__:null,get compute(){return Lt},get data(){return Nt},get log(){return Xt},get reset(){return Vt},get start(){return Ht},get stop(){return Ut},get updates(){return Dt}}),r=Object.freeze({__proto__:null,get callback(){return on},get callbacks(){return Yt},get clear(){return an},get consent(){return tn},get consentv2(){return nn},get data(){return Bt},get electron(){return Wt},get id(){return $t},get metadata(){return Qt},get save(){return un},get shortid(){return ln},get start(){return Ft},get stop(){return Kt}}),a=Object.freeze({__proto__:null,get data(){return mn},get envelope(){return bn},get start(){return yn},get stop(){return wn}}),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.20";var d=255,p=!0,f=null,h=null;function v(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,d)),r}function g(t,n,e){return function(){if(p&&null===f)try{f=new RegExp("\\p{N}","gu"),h=new RegExp("\\p{L}","gu"),new RegExp("\\p{Sc}","gu")}catch(t){p=!1}}(),t?t.replace(h,n).replace(f,e):t}var m=[],y=null;function w(){}var b=[];function k(){}function S(){}var _=Object.freeze({__proto__:null,checkDocumentStyles:function(t){},compute:function(){},data:y,hashText:k,keys:b,log:w,observe:function(){},reset:function(){},sheetAdoptionState:[],sheetUpdateState:[],start:function(){},state:m,stop:function(){},trigger:S}),I=null,E=!0;function M(){O(2)}function O(t){Xt(36,t.toString())}var T=null;function x(t,n){Yn()&&t&&"string"==typeof t&&t.length<255&&(T=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},jt(24))}var j,z=null,C=null;function A(t){t in z||(z[t]=0),t in C||(C[t]=0),z[t]++,C[t]++}function P(t,n){null!==n&&(t in z||(z[t]=0),t in C||(C[t]=0),z[t]+=n,C[t]+=n)}function q(t,n){null!==n&&!1===isNaN(n)&&(t in z||(z[t]=0),(n>z[t]||0===z[t])&&(C[t]=n,z[t]=n))}function N(t,n,e){return window.setTimeout(_n(t),n,e)}function D(t){return window.clearTimeout(t)}var R=0,H=0,U=null;function X(){U&&D(U),U=N(L,H),R=s()}function L(){var t=s();j={gap:t-R},jt(25),j.gap<3e5?U=N(L,H):Ln&&(x("clarity","suspend"),ve(),["mousemove","touchstart"].forEach((function(t){return En(document,t,Wn)})),["resize","scroll","pageshow"].forEach((function(t){return En(window,t,Wn)})))}var V=Object.freeze({__proto__:null,get data(){return j},reset:X,start:function(){H=6e4,R=0},stop:function(){D(U),R=0,H=0}}),B=null;function Y(t){Yn()&&o.lean&&(o.lean=!1,B={key:t},on(),un(),o.upgrade&&o.upgrade(t),jt(3),o.lite)}var W=Object.freeze({__proto__:null,get data(){return B},start:function(){!o.lean&&o.upgrade&&o.upgrade("Config"),B=null},stop:function(){B=null},upgrade:Y});function Z(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 J(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 G=null;function F(t,n){Q(t,"string"==typeof n?[n]:n)}function K(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),Z(this,void 0,void 0,(function(){var a,o;return J(this,(function(i){switch(i.label){case 0:return o={},[4,nt(t)];case 1:return o.userId=i.sent(),o.userHint=r||((u=t)&&u.length>=5?"".concat(u.substring(0,2)).concat(g(u.substring(2),"*","*")):g(u,"*","*")),Q("userId",[(a=o).userId]),Q("userHint",[a.userHint]),Q("userType",[et(t)]),n&&(Q("sessionId",[n]),a.sessionId=n),e&&(Q("pageId",[e]),a.pageId=e),[2,a]}var u}))}))}function Q(t,n){if(Yn()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in G?G[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);G[t]=e}}function $(){jt(34)}function tt(){G={}}function nt(t){return Z(this,void 0,void 0,(function(){var n;return J(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 et(t){return t&&t.indexOf("@")>0?"email":"string"}var rt="CompressionStream"in window;function at(t){return Z(this,void 0,void 0,(function(){var n,e;return J(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),rt?(n=new ReadableStream({start:function(n){return Z(this,void 0,void 0,(function(){return J(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,ot(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 ot(t){return Z(this,void 0,void 0,(function(){var n,e,r,a,o;return J(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 it=null;function ut(t){try{if(!it)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){it(t)}))}catch(t){}}var ct=[_,e,Object.freeze({__proto__:null,compute:$,get data(){return G},identify:K,reset:tt,set:F,start:function(){tt()},stop:function(){tt()}}),n,_,r,a,t,V,W,_];function st(){z={},C={},A(5),ct.forEach((function(t){return _n(t.start)()}))}function lt(){ct.slice().reverse().forEach((function(t){return _n(t.stop)()})),z={},C={}}function dt(){$(),Lt(),jt(0),Pt(),E&&(jt(47),E=!1)}var pt,ft,ht,vt,gt,mt,yt=0,wt=0,bt=null,kt=0,St=!1;function _t(){vt=!0,yt=0,wt=0,St=!1,kt=0,pt=[],ft=[],ht={},gt=null}function It(t,n){if(void 0===n&&(n=!0),vt){var e=s(),r=t.length>1?t[1]:null,a=JSON.stringify(t);switch(o.lean?!St&&wt+a.length>10485760&&(St=!0):St=!1,r){case 5:if(St)break;yt+=a.length;case 37:case 6:case 43:case 45:case 46:if(St)break;wt+=a.length,pt.push(a);break;default:ft.push(a)}A(25);var i=function(){var t=!1===o.lean&&yt>0?100:mn.sequence*o.delay;return"string"==typeof o.upload?Math.max(Math.min(t,3e4),100):o.delay}();e-kt>2*i&&(D(bt),bt=null),n&&null===bt&&(25!==r&&X(),bt=N(Mt,i),kt=e,Ct(wt))}}function Et(){D(bt),Mt(!0),yt=0,wt=0,St=!1,kt=0,pt=[],ft=[],ht={},gt=null,vt=!1}function Mt(t){return void 0===t&&(t=!1),Z(this,void 0,void 0,(function(){var n,e,r,a,i,u,c,s;return J(this,(function(l){switch(l.label){case 0:return vt?(bt=null,(n=!1===o.lean&&wt>0&&(wt<1048576||mn.sequence>0))&&q(1,1),dt(),e=!0===t,mn?(r=JSON.stringify(bn(e)),a="[".concat(ft.join(),"]"),i=n?"[".concat(pt.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,at(u)];case 2:s=l.sent(),l.label=3;case 3:return P(2,(c=s)?c.length:u.length),Ot(u,c,mn.sequence,e),ft=[],n&&(pt=[],wt=0,yt=0,St=!1),[2]}}))}))}function Ot(t,n,e,r){if(void 0===r&&(r=!1),"string"==typeof o.upload){var a=o.upload,i=!1;if(r&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(a,t))&&xt(e)}catch(t){}if(!1===i){e in ht?ht[e].attempts++:ht[e]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",a,!0),u.timeout=15e3,u.ontimeout=function(){Sn(new Error("".concat("Timeout"," : ").concat(a)))},null!==e&&(u.onreadystatechange=function(){_n(Tt)(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),xt(e)}}function Tt(t,n){var e=ht[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?At(6):(0===t.status&&(o.upload=o.fallback?o.fallback:o.upload),Ot(e.data,null,n)):(gt={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&jt(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":At(6);break;case"UPGRADE":Y("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&&ut(i[1])}}}(t.responseText),0===t.status&&(Ot(e.data,null,n,!0),At(3)),t.status>=200&&t.status<=208&&xt(n),delete ht[n]))}function xt(t){1===t&&(un(),on())}function jt(t){var n=[s(),t];switch(t){case 4:var e=m;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),It(n,!1));break;case 25:n.push(j.gap),It(n);break;case 35:n.push(mt.check),It(n,!1);break;case 3:n.push(B.key),It(n);break;case 2:n.push(gt.sequence),n.push(gt.attempts),n.push(gt.status),It(n,!1);break;case 24:T.key&&n.push(T.key),n.push(T.value),It(n);break;case 34:var r=Object.keys(G);if(r.length>0){for(var a=0,o=r;a<o.length;a++){var i=o[a];n.push(i),n.push(G[i])}tt(),It(n,!1)}break;case 0:var u=Object.keys(C);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(C[d]))}C={},It(n,!1)}break;case 1:var f=Object.keys(Dt);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(Dt[g])}Vt(),It(n,!1)}break;case 36:var w=Object.keys(y);if(w.length>0){for(var k=0,S=w;k<S.length;k++){var _=S[k];p=parseInt(_,10);n.push(p),n.push([].concat.apply([],y[_]))}It(n,!1)}break;case 40:b.forEach((function(t){n.push(t);var e=[];for(var r in y[t]){var a=parseInt(r,10);e.push(a),e.push(y[t][r])}n.push(e)})),It(n,!1);break;case 47:n.push(I.source),n.push(I.ad_Storage),n.push(I.analytics_Storage),It(n,!1)}}function zt(){mt={check:0}}function Ct(t){if(0===mt.check){var n=mt.check;n=mn.sequence>=128?1:n,n=mn.pageNum>=128?7:n,n=s()>72e5?2:n,(n=t>10485760?2:n)!==mt.check&&At(n)}}function At(t){mt.check=t,5!==t&&(an(),ve())}function Pt(){0!==mt.check&&jt(35)}function qt(){mt=null}var Nt=null,Dt=null,Rt=!1;function Ht(){Nt={},Dt={},Rt=!1}function Ut(){Nt={},Dt={},Rt=!1}function Xt(t,n){if(n&&(n="".concat(n),t in Nt||(Nt[t]=[]),Nt[t].indexOf(n)<0)){if(Nt[t].length>128)return void(Rt||(Rt=!0,At(5)));Nt[t].push(n),t in Dt||(Dt[t]=[]),Dt[t].push(n)}}function Lt(){jt(1)}function Vt(){Dt={},Rt=!1}var Bt=null,Yt=[],Wt=0,Zt=null,Jt=null,Gt={ad_Storage:"denied",analytics_Storage:"denied"};function Ft(){var t,n,e;Zt=null;var r=navigator&&"userAgent"in navigator?navigator.userAgent:"",a=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(),u=window.location.ancestorOrigins?Array.from(window.location.ancestorOrigins).toString():"",c=document&&document.title?document.title:"";Wt=r.indexOf("Electron")>0?1:0;var s=function(){var t={session:ln(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=fn("_clsk",!o.includeSubdomains);if(n){var e=n.includes("^")?n.split("^"):n.split("|");e.length>=5&&t.ts-dn(e[1])<18e5&&(t.session=e[0],t.count=dn(e[2])+1,t.upgrade=dn(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),l=pn(),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);Bt={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,Xt(0,r),Xt(3,c),Xt(1,v(location.href,!!Wt)),Xt(2,document.referrer),Xt(15,function(){var t=ln();if(o.track&&cn(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),Xt(16,document.documentElement.lang),Xt(17,document.dir),Xt(26,"".concat(window.devicePixelRatio)),Xt(28,l.dob.toString()),Xt(29,l.version.toString()),Xt(33,u),Xt(34,a),Xt(35,i),q(0,s.ts),q(1,0),q(35,Wt);var p,f=null===window||void 0===window?void 0:window.Zone;f&&"__symbol__"in f&&q(39,1),navigator&&(Xt(9,navigator.language),q(33,navigator.hardwareConcurrency),q(32,navigator.maxTouchPoints),q(34,Math.round(navigator.deviceMemory)),(p=navigator.userAgentData)&&p.getHighEntropyValues?p.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;Xt(22,t.platform),Xt(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){Xt(24,t.name+"~"+t.version)})),Xt(25,t.model),q(27,t.mobile?1:0)})):Xt(22,navigator.platform)),screen&&(q(14,Math.round(screen.width)),q(15,Math.round(screen.height)),q(16,Math.round(screen.colorDepth)));for(var h=0,g=o.cookies;h<g.length;h++){var m=g[h],y=fn(m);y&&F(m,y)}!function(t){O(t.analytics_Storage?1:0),I=t}(en(Jt={ad_Storage:o.track?"granted":"denied",analytics_Storage:o.track?"granted":"denied"},0)),sn(l)}function Kt(){Zt=null,Bt=null,Jt=null,Yt.forEach((function(t){t.called=!1}))}function Qt(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;Bt&&(a||!1===n)&&(t(Bt,!o.lean,r?Jt:void 0),i=!0),!e&&i||Yt.push({callback:t,wait:n,recall:e,called:i,consentInfo:r})}function $t(){return Bt?[Bt.userId,Bt.sessionId,Bt.pageNum].join("."):""}function tn(t){void 0===t&&(t=!0),t?(nn({ad_Storage:"granted",analytics_Storage:"granted"}),M()):nn()}function nn(t,n){void 0===t&&(t=Gt),void 0===n&&(n=1),Jt={ad_Storage:rn(t.ad_Storage),analytics_Storage:rn(t.analytics_Storage)},on(!0);var e=en(Jt,n);if(!e.analytics_Storage)return o.track=!1,vn("_clsk","",-Number.MAX_VALUE),vn("_clck","",-Number.MAX_VALUE),ve(),void window.setTimeout(he,250);Yn()&&(o.track=!0,sn(pn(),1),un(),function(t){I=t,jt(47)}(e),M())}function en(t,n){return{source:n,ad_Storage:"granted"===t.ad_Storage?1:0,analytics_Storage:"granted"===t.analytics_Storage?1:0}}function rn(t){return"string"==typeof t?t.toLowerCase():"denied"}function an(){vn("_clsk","",0)}function on(t){void 0===t&&(t=!1),function(t,n){void 0===n&&(n=!1);if(Yt.length>0)for(var e=0;e<Yt.length;e++){var r=Yt[e];r.callback&&(!r.called&&!n||r.consentInfo&&n)&&(!r.wait||t)&&(r.callback(Bt,!o.lean,r.consentInfo?Jt:void 0),r.called=!0,r.recall||(Yt.splice(e,1),e--))}}(o.lean?0:1,t)}function un(){if(Bt&&o.track){var t=Math.round(Date.now()),n=o.upload&&"string"==typeof o.upload?o.upload.replace("https://",""):"",e=o.lean?0:1;vn("_clsk",[Bt.sessionId,t,Bt.pageNum,e,n].join("|"),1)}}function cn(t,n){try{return!!t[n]}catch(t){return!1}}function sn(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)&&vn("_clck",[Bt.userId,2,e.toString(36),n,r].join("|"),365)}function ln(){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 dn(t,n){return void 0===n&&(n=10),parseInt(t,n)}function pn(){var t={id:ln(),version:0,expiry:null,consent:0,dob:0},n=fn("_clck",!o.includeSubdomains);if(n&&n.length>0){var e=n.includes("^")?n.split("^"):n.split("|");e.length>1&&(t.version=dn(e[1])),e.length>2&&(t.expiry=dn(e[2],36)),e.length>3&&1===dn(e[3])&&(t.consent=1),e.length>4&&dn(e[1])>1&&(t.dob=dn(e[4])),o.track=o.track||1===t.consent,t.id=o.track?e[0]:t.id}return t}function fn(t,n){var e;if(void 0===n&&(n=!1),cn(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=hn(o[1]),u=i[0],c=i[1];u;)u=(e=hn(c))[0],c=e[1];return n?c.endsWith("".concat("~","1"))?c.substring(0,c.length-2):null:c}}}return null}function hn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function vn(t,n,e){if((o.track||""==n)&&(navigator&&navigator.cookieEnabled||cn(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===Zt){for(var c=location.hostname?location.hostname.split("."):[],s=c.length-1;s>=0;s--)if(Zt=".".concat(c[s]).concat(Zt||""),s<c.length-1&&(document.cookie="".concat(u).concat(";").concat("domain=").concat(Zt),fn(t)===n))return;Zt=""}}catch(t){Zt=""}document.cookie=Zt?"".concat(u).concat(";").concat("domain=").concat(Zt):u}}var gn,mn=null;function yn(){var t=Bt;mn={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 wn(){mn=null}function bn(t){return mn.start=mn.start+mn.duration,mn.duration=s()-mn.start,mn.sequence++,mn.upload=t&&"sendBeacon"in navigator?1:0,mn.end=t?1:0,mn.applicationPlatform=0,mn.url=v(location.href,!1,!0),[mn.version,mn.sequence,mn.start,mn.duration,mn.projectId,mn.userId,mn.sessionId,mn.pageNum,mn.upload,mn.end,mn.applicationPlatform,mn.url]}function kn(){gn=[]}function Sn(t){if(gn&&-1===gn.indexOf(t.message)){var n=o.report;if(n&&n.length>0&&mn){var e={v:mn.version,p:mn.projectId,u:mn.userId,s:mn.sessionId,n:mn.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)),gn.push(t.message)}}return t}function _n(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw Sn(t)}var e=performance.now()-n;P(4,e),e>30&&(A(7),q(6,e),"".concat(t.dn||t.name,"-").concat(e))}}var In=new Map;function En(t,n,e,r,a){void 0===r&&(r=!1),void 0===a&&(a=!0),e=_n(e);try{t[i("addEventListener")](n,e,{capture:r,passive:a}),function(t){return In.has(t)}(t)||In.set(t,[]),In.get(t).push({event:n,listener:e,options:{capture:r,passive:a}})}catch(t){}}function Mn(){In.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){}})),In.delete(n)}(t,n)})),In=new Map}var On=null,Tn=null,xn=null,jn=0;function zn(){return!(jn++>20)}function Cn(){Cn.dn=1,jn=0,xn!==Pn()&&(ve(),window.setTimeout(An,250))}function An(){he(),q(29,1)}function Pn(){return location.href?location.href.replace(location.hash,""):location.href}var qn=[],Nn=null,Dn=null,Rn=null;function Hn(){Dn&&(Rn(),Dn=null,null===Nn&&Xn())}function Un(){qn=[],Nn=null,Dn=null}function Xn(){var t=qn.shift();t&&(Nn=t,t.task().then((function(){t.id===$t()&&(t.resolve(),Nn=null,Xn())})).catch((function(n){t.id===$t()&&(n&&(n.name,n.message,n.stack),Nn=null,Xn())})))}var Ln=!1;function Vn(){Ln=!0,u=c(),Un(),Mn(),kn(),xn=Pn(),jn=0,En(window,"popstate",Cn),null===On&&(On=history.pushState,history.pushState=function(){On.apply(this,arguments),Yn()&&zn()&&Cn()}),null===Tn&&(Tn=history.replaceState,history.replaceState=function(){Tn.apply(this,arguments),Yn()&&zn()&&Cn()})}function Bn(){xn=null,jn=0,kn(),Mn(),Un(),u=0,Ln=!1}function Yn(){return Ln}function Wn(){Wn.dn=2,he(),x("clarity","restart")}var Zn=null;function Jn(){Zn=null}function Gn(t){Zn={fetchStart:Math.round(t.fetchStart),connectStart:Math.round(t.connectStart),connectEnd:Math.round(t.connectEnd),requestStart:Math.round(t.requestStart),responseStart:Math.round(t.responseStart),responseEnd:Math.round(t.responseEnd),domInteractive:Math.round(t.domInteractive),domComplete:Math.round(t.domComplete),loadEventStart:Math.round(t.loadEventStart),loadEventEnd:Math.round(t.loadEventEnd),redirectCount:Math.round(t.redirectCount),size:t.transferSize?t.transferSize:0,type:t.type,protocol:t.nextHopProtocol,encodedSize:t.encodedBodySize?t.encodedBodySize:0,decodedSize:t.decodedBodySize?t.decodedBodySize:0},function(t){Z(this,void 0,void 0,(function(){var n,e;return J(this,(function(r){return n=s(),e=[n,t],29===t&&(e.push(Zn.fetchStart),e.push(Zn.connectStart),e.push(Zn.connectEnd),e.push(Zn.requestStart),e.push(Zn.responseStart),e.push(Zn.responseEnd),e.push(Zn.domInteractive),e.push(Zn.domComplete),e.push(Zn.loadEventStart),e.push(Zn.loadEventEnd),e.push(Zn.redirectCount),e.push(Zn.size),e.push(Zn.type),e.push(Zn.protocol),e.push(Zn.encodedSize),e.push(Zn.decodedSize),Jn(),It(e)),[2]}))}))}(29)}var Fn,Kn=0,Qn=1/0,$n=0,te=0,ne=[],ee=new Map,re=function(){return Kn||0},ae=function(){if(!ne.length)return-1;var t=Math.min(ne.length-1,Math.floor((re()-te)/50));return ne[t].latency},oe=function(){te=re(),ne.length=0,ee.clear()},ie=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?Kn=performance.interactionCount:t.interactionId&&(Qn=Math.min(Qn,t.interactionId),$n=Math.max($n,t.interactionId),Kn=$n?($n-Qn)/7+1:0)}(t);var n=ne[ne.length-1],e=ee.get(t.interactionId);if(e||ne.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};ee.set(r.id,r),ne.push(r)}ne.sort((function(t,n){return n.latency-t.latency})),ne.length>10&&ne.splice(10).forEach((function(t){return ee.delete(t.id)}))}}},ue=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function ce(){ce.dn=26;try{Fn&&Fn.disconnect(),Fn=new PerformanceObserver(_n(se));for(var t=0,n=ue;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&P(9,0),Fn.observe({type:e,buffered:!0}))}}catch(t){}}function se(t){se.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":Gn(r);break;case"resource":var a=r.name;Xt(4,de(a)),a!==o.upload&&a!==o.fallback||q(28,r.duration);break;case"longtask":A(7);break;case"first-input":n&&q(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(ie(r),Xt(37,ae().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&P(9,1e3*r.value);break;case"largest-contentful-paint":n&&q(8,r.startTime)}}}(t.getEntries())}var le=null;function de(t){return le||(le=document.createElement("a")),le.href=t,le.host}var pe=Object.freeze({__proto__:null,start:function t(){t.dn=25,Jn(),function(){navigator&&"connection"in navigator&&Xt(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?En(window,"load",N.bind(this,ce,0)):ce())}()},stop:function(){Fn&&Fn.disconnect(),Fn=null,oe(),le=null,Jn()}}),fe=[_,_,_,pe];function he(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===Ln&&"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||Ln)return!1;for(var n in t)n in o&&(o[n]=t[n])}(t),Vn(),st(),fe.forEach((function(t){return _n(t.start)()})),null===t&&we())}function ve(){Yn()&&(fe.slice().reverse().forEach((function(t){return _n(t.stop)()})),lt(),Bn(),void 0!==me&&(me[ye]=function(){(me[ye].q=me[ye].q||[]).push(arguments),"start"===arguments[0]&&me[ye].q.unshift(me[ye].q.pop())&&we()}))}var ge=Object.freeze({__proto__:null,consent:tn,consentv2:nn,event:x,hashText:k,identify:K,metadata:Qt,pause:function(){Yn()&&(x("clarity","pause"),null===Dn&&(Dn=new Promise((function(t){Rn=t}))))},resume:function(){Yn()&&(Hn(),x("clarity","resume"))},set:F,signal:function(t){it=t},start:he,stop:ve,upgrade:Y,version:l}),me=window,ye="clarity";function we(){if(void 0!==me){if(me[ye]&&me[ye].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=me[ye]&&me[ye].q||[];for(me[ye]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return ge[t].apply(ge,n)},me[ye].v=l;t.length>0;)me[ye].apply(me,t.shift())}}we()}();
|
|
1
|
+
!function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return Ht},get start(){return Rt},get stop(){return Ut},get track(){return jt}}),n=Object.freeze({__proto__:null,get check(){return Zt},get compute(){return Gt},get data(){return Ct},get start(){return Wt},get stop(){return Ft},get trigger(){return Jt}}),e=Object.freeze({__proto__:null,get compute(){return rn},get data(){return Kt},get log(){return en},get reset(){return an},get start(){return tn},get stop(){return nn},get updates(){return Qt}}),r=Object.freeze({__proto__:null,get callback(){return kn},get callbacks(){return un},get clear(){return wn},get consent(){return gn},get consentv2(){return mn},get data(){return on},get electron(){return cn},get id(){return vn},get metadata(){return hn},get save(){return Sn},get shortid(){return In},get start(){return pn},get stop(){return fn}}),a=Object.freeze({__proto__:null,get data(){return Cn},get envelope(){return Pn},get start(){return zn},get stop(){return An}}),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.22";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(){P(2)}function P(t){en(36,t.toString())}var q=null;function D(t,n){ie()&&t&&"string"==typeof t&&t.length<255&&(q=n&&"string"==typeof n&&n.length<255?{key:t,value:n}:{value:t},Yt(24))}var R,H=null,U=null;function L(t){t in H||(H[t]=0),t in U||(U[t]=0),H[t]++,U[t]++}function X(t,n){null!==n&&(t in H||(H[t]=0),t in U||(U[t]=0),H[t]+=n,U[t]+=n)}function V(t,n){null!==n&&!1===isNaN(n)&&(t in H||(H[t]=0),(n>H[t]||0===H[t])&&(U[t]=n,H[t]=n))}function B(t,n,e){return window.setTimeout(Rn(t),n,e)}function Y(t){return window.clearTimeout(t)}var W=0,Z=0,J=null;function G(){J&&Y(J),J=B(F,Z),W=s()}function F(){var t=s();R={gap:t-W},Yt(25),R.gap<3e5?J=B(F,Z):re&&(D("clarity","suspend"),Ne(),["mousemove","touchstart"].forEach((function(t){return Un(document,t,ue)})),["resize","scroll","pageshow"].forEach((function(t){return Un(window,t,ue)})))}var K=Object.freeze({__proto__:null,get data(){return R},reset:G,start:function(){Z=6e4,W=0},stop:function(){Y(J),W=0,Z=0}}),Q=null;function $(t){ie()&&o.lean&&(o.lean=!1,Q={key:t},kn(),Sn(),o.upgrade&&o.upgrade(t),Yt(3),o.lite)}var tt=Object.freeze({__proto__:null,get data(){return Q},start:function(){!o.lean&&o.upgrade&&o.upgrade("Config"),Q=null},stop:function(){Q=null},upgrade:$});function nt(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 et(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 rt=null;function at(t,n){it(t,"string"==typeof n?[n]:n)}function ot(t,n,e,r){return void 0===n&&(n=null),void 0===e&&(e=null),void 0===r&&(r=null),nt(this,void 0,void 0,(function(){var a,o;return et(this,(function(i){switch(i.label){case 0:return o={},[4,st(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,"*","*")),it("userId",[(a=o).userId]),it("userHint",[a.userHint]),it("userType",[lt(t)]),n&&(it("sessionId",[n]),a.sessionId=n),e&&(it("pageId",[e]),a.pageId=e),[2,a]}var u}))}))}function it(t,n){if(ie()&&t&&n&&"string"==typeof t&&t.length<255){for(var e=(t in rt?rt[t]:[]),r=0;r<n.length;r++)"string"==typeof n[r]&&n[r].length<255&&e.push(n[r]);rt[t]=e}}function ut(){Yt(34)}function ct(){rt={}}function st(t){return nt(this,void 0,void 0,(function(){var n;return et(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 lt(t){return t&&t.indexOf("@")>0?"email":"string"}var dt="CompressionStream"in window;function pt(t){return nt(this,void 0,void 0,(function(){var n,e;return et(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),dt?(n=new ReadableStream({start:function(n){return nt(this,void 0,void 0,(function(){return et(this,(function(e){return n.enqueue(t),n.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),e=Uint8Array.bind,[4,ft(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 ft(t){return nt(this,void 0,void 0,(function(){var n,e,r,a,o;return et(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 ht=null;function vt(t){try{if(!ht)return;var n=function(t){try{return JSON.parse(t)}catch(t){return[]}}(t);n.forEach((function(t){ht(t)}))}catch(t){}}var gt=[j,e,Object.freeze({__proto__:null,compute:ut,get data(){return rt},identify:ot,reset:ct,set:at,start:function(){ct()},stop:function(){ct()}}),n,j,r,a,t,K,tt,j];function mt(){H={},U={},L(5),gt.forEach((function(t){return Rn(t.start)()}))}function yt(){gt.slice().reverse().forEach((function(t){return Rn(t.stop)()})),H={},U={}}function bt(){ut(),rn(),Yt(0),Gt(),z&&(Yt(47),z=!1)}function wt(t,n,e){return"".concat(t,"=").concat(m(n,0===t.indexOf("data-")?"data-":t,e))}var kt=[],St=1,_t=null;function Et(){kt=[],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=_t.get(u)?"*T":r;break;case Node.ELEMENT_NODE:var s=o;e=It(s),r=["NOSCRIPT","SCRIPT","STYLE"].indexOf(s.tagName)<0?s.tagName:r}Tt(o,u,{tag:r,attributes:e,value:a})}}(document),function(t){nt(this,void 0,void 0,(function(){var n,e,r,a,o,i,u,c,l,d,p,f,h;return et(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,Ht(e);break;case 43:if((a=kt).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(wt(h,l[f][h],c));break;case"value":e.push(m(l[f],l.tag,c))}Ht(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 It(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 Tt(t,n,e){if(t&&e&&e.tag){var r=function(t){return null===t?null:_t.has(t)?_t.get(t):(_t.set(t,St),St++)}(t),a=n?_t.get(n):null,o=t.previousSibling?_t.get(t.previousSibling):null;kt.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 Ot,Mt,xt,Nt,jt,Ct,zt=0,At=0,Pt=null,qt=0,Dt=!1;function Rt(){Nt=!0,zt=0,At=0,Dt=!1,qt=0,Ot=[],Mt=[],xt={},jt=null}function Ht(t,n){if(void 0===n&&(n=!0),Nt){var e=s(),r=t.length>1?t[1]:null,a=JSON.stringify(t);switch(o.lean?!Dt&&At+a.length>10485760&&(Dt=!0):Dt=!1,r){case 5:if(Dt)break;zt+=a.length;case 37:case 6:case 43:case 45:case 46:if(Dt)break;At+=a.length,Ot.push(a);break;default:Mt.push(a)}L(25);var i=function(){var t=!1===o.lean&&zt>0?100:Cn.sequence*o.delay;return"string"==typeof o.upload?Math.max(Math.min(t,3e4),100):o.delay}();e-qt>2*i&&(Y(Pt),Pt=null),n&&null===Pt&&(25!==r&&G(),Pt=B(Lt,i),qt=e,Zt(At))}}function Ut(){Y(Pt),Lt(!0),zt=0,At=0,Dt=!1,qt=0,Ot=[],Mt=[],xt={},jt=null,Nt=!1}function Lt(t){return void 0===t&&(t=!1),nt(this,void 0,void 0,(function(){var n,e,r,a,i,u,c,s;return et(this,(function(l){switch(l.label){case 0:return Nt?(Pt=null,(n=!1===o.lean&&At>0&&(At<1048576||Cn.sequence>0))&&V(1,1),bt(),e=!0===t,Cn?(r=JSON.stringify(Pn(e)),a="[".concat(Mt.join(),"]"),i=n?"[".concat(Ot.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,pt(u)];case 2:s=l.sent(),l.label=3;case 3:return X(2,(c=s)?c.length:u.length),Xt(u,c,Cn.sequence,e),Mt=[],n&&(Ot=[],At=0,zt=0,Dt=!1),[2]}}))}))}function Xt(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))?Bt(e):Dn(new Error("".concat("BeaconError",": ").concat(t.length)))}catch(n){Dn(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 xt?xt[e].attempts++:xt[e]={data:t,attempts:1};var c=new XMLHttpRequest;c.open("POST",i,!0),c.timeout=15e3,c.ontimeout=function(){Dn(new Error("".concat("Timeout"," : ").concat(i)))},null!==e&&(c.onreadystatechange=function(){Rn(Vt)(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),Bt(e)}}function Vt(t,n){var e=xt[n];t&&4===t.readyState&&e&&((t.status<200||t.status>208)&&e.attempts<=1?t.status>=400&&t.status<500?Jt(6):(0===t.status&&(o.upload=o.fallback?o.fallback:o.upload),jt={sequence:n,attempts:e.attempts,status:t.status},Yt(2),Xt(e.data,null,n)):(jt={sequence:n,attempts:e.attempts,status:t.status},e.attempts>1&&Yt(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":Jt(6);break;case"UPGRADE":$("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&&vt(i[1]);break;case"SNAPSHOT":o.lean=!1,Et()}}}(t.responseText),0===t.status&&(Xt(e.data,null,n,!0),Jt(3)),t.status>=200&&t.status<=208&&Bt(n),delete xt[n]))}function Bt(t){1===t&&(Sn(),kn())}function Yt(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),Ht(n,!1));break;case 25:n.push(R.gap),Ht(n);break;case 35:n.push(Ct.check),Ht(n,!1);break;case 3:n.push(Q.key),Ht(n);break;case 2:n.push(jt.sequence),n.push(jt.attempts),n.push(jt.status),Ht(n,!1);break;case 24:q.key&&n.push(q.key),n.push(q.value),Ht(n);break;case 34:var r=Object.keys(rt);if(r.length>0){for(var a=0,o=r;a<o.length;a++){var i=o[a];n.push(i),n.push(rt[i])}ct(),Ht(n,!1)}break;case 0:var u=Object.keys(U);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(U[d]))}U={},Ht(n,!1)}break;case 1:var f=Object.keys(Qt);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(Qt[g])}an(),Ht(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]))}Ht(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)})),Ht(n,!1);break;case 47:n.push(C.source),n.push(C.ad_Storage),n.push(C.analytics_Storage),Ht(n,!1)}}function Wt(){Ct={check:0}}function Zt(t){if(0===Ct.check){var n=Ct.check;n=Cn.sequence>=128?1:n,n=Cn.pageNum>=128?7:n,n=s()>72e5?2:n,(n=t>10485760?2:n)!==Ct.check&&Jt(n)}}function Jt(t){Ct.check=t,5!==t&&(wn(),Ne())}function Gt(){0!==Ct.check&&Yt(35)}function Ft(){Ct=null}var Kt=null,Qt=null,$t=!1;function tn(){Kt={},Qt={},$t=!1}function nn(){Kt={},Qt={},$t=!1}function en(t,n){if(n&&(n="".concat(n),t in Kt||(Kt[t]=[]),Kt[t].indexOf(n)<0)){if(Kt[t].length>128)return void($t||($t=!0,Jt(5)));Kt[t].push(n),t in Qt||(Qt[t]=[]),Qt[t].push(n)}}function rn(){Yt(1)}function an(){Qt={},$t=!1}var on=null,un=[],cn=0,sn=null,ln=null,dn={ad_Storage:"denied",analytics_Storage:"denied"};function pn(){var t,n,e;sn=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:"";cn=r.indexOf("Electron")>0?1:0;var s=function(){var t={session:In(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},n=Mn("_clsk",!o.includeSubdomains);if(n){var e=n.includes("^")?n.split("^"):n.split("|");e.length>=5&&t.ts-Tn(e[1])<18e5&&(t.session=e[0],t.count=Tn(e[2])+1,t.upgrade=Tn(e[3]),t.upload=e.length>=6?"".concat("https://").concat(e[5],"/").concat(e[4]):"".concat("https://").concat(e[4]))}return t}(),l=On(),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);on={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,en(0,r),en(3,c),en(1,y(location.href,!!cn)),en(2,document.referrer),en(15,function(){var t=In();if(o.track&&_n(window,"sessionStorage")){var n=sessionStorage.getItem("_cltk");t=n||t,sessionStorage.setItem("_cltk",t)}return t}()),en(16,document.documentElement.lang),en(17,document.dir),en(26,"".concat(window.devicePixelRatio)),en(28,l.dob.toString()),en(29,l.version.toString()),en(33,u),en(34,a),en(35,i),V(0,s.ts),V(1,0),V(35,cn);var p,f=null===window||void 0===window?void 0:window.Zone;f&&"__symbol__"in f&&V(39,1),navigator&&(en(9,navigator.language),V(33,navigator.hardwareConcurrency),V(32,navigator.maxTouchPoints),V(34,Math.round(navigator.deviceMemory)),(p=navigator.userAgentData)&&p.getHighEntropyValues?p.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var n;en(22,t.platform),en(23,t.platformVersion),null===(n=t.brands)||void 0===n||n.forEach((function(t){en(24,t.name+"~"+t.version)})),en(25,t.model),V(27,t.mobile?1:0)})):en(22,navigator.platform)),screen&&(V(14,Math.round(screen.width)),V(15,Math.round(screen.height)),V(16,Math.round(screen.colorDepth)));for(var h=0,v=o.cookies;h<v.length;h++){var g=v[h],m=Mn(g);m&&at(g,m)}!function(t){P(t.analytics_Storage?1:0),C=t}(yn(ln={ad_Storage:o.track?"granted":"denied",analytics_Storage:o.track?"granted":"denied"},0)),En(l)}function fn(){sn=null,on=null,ln=null,un.forEach((function(t){t.called=!1}))}function hn(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;on&&(a||!1===n)&&(t(on,!o.lean,r?ln:void 0),i=!0),!e&&i||un.push({callback:t,wait:n,recall:e,called:i,consentInfo:r})}function vn(){return on?[on.userId,on.sessionId,on.pageNum].join("."):""}function gn(t){void 0===t&&(t=!0),t?(mn({ad_Storage:"granted",analytics_Storage:"granted"}),A()):mn()}function mn(t,n){void 0===t&&(t=dn),void 0===n&&(n=1),ln={ad_Storage:bn(t.ad_Storage),analytics_Storage:bn(t.analytics_Storage)},kn(!0);var e=yn(ln,n);if(!e.analytics_Storage)return o.track=!1,Nn("_clsk","",-Number.MAX_VALUE),Nn("_clck","",-Number.MAX_VALUE),Ne(),void window.setTimeout(xe,250);ie()&&(o.track=!0,En(On(),1),Sn(),function(t){C=t,Yt(47)}(e),A())}function yn(t,n){return{source:n,ad_Storage:"granted"===t.ad_Storage?1:0,analytics_Storage:"granted"===t.analytics_Storage?1:0}}function bn(t){return"string"==typeof t?t.toLowerCase():"denied"}function wn(){Nn("_clsk","",0)}function kn(t){void 0===t&&(t=!1),function(t,n){void 0===n&&(n=!1);if(un.length>0)for(var e=0;e<un.length;e++){var r=un[e];r.callback&&(!r.called&&!n||r.consentInfo&&n)&&(!r.wait||t)&&(r.callback(on,!o.lean,r.consentInfo?ln:void 0),r.called=!0,r.recall||(un.splice(e,1),e--))}}(o.lean?0:1,t)}function Sn(){if(on&&o.track){var t=Math.round(Date.now()),n=o.upload&&"string"==typeof o.upload?o.upload.replace("https://",""):"",e=o.lean?0:1;Nn("_clsk",[on.sessionId,t,on.pageNum,e,n].join("|"),1)}}function _n(t,n){try{return!!t[n]}catch(t){return!1}}function En(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)&&Nn("_clck",[on.userId,2,e.toString(36),n,r].join("|"),365)}function In(){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 Tn(t,n){return void 0===n&&(n=10),parseInt(t,n)}function On(){var t={id:In(),version:0,expiry:null,consent:0,dob:0},n=Mn("_clck",!o.includeSubdomains);if(n&&n.length>0){var e=n.includes("^")?n.split("^"):n.split("|");e.length>1&&(t.version=Tn(e[1])),e.length>2&&(t.expiry=Tn(e[2],36)),e.length>3&&1===Tn(e[3])&&(t.consent=1),e.length>4&&Tn(e[1])>1&&(t.dob=Tn(e[4])),o.track=o.track||1===t.consent,t.id=o.track?e[0]:t.id}return t}function Mn(t,n){var e;if(void 0===n&&(n=!1),_n(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=xn(o[1]),u=i[0],c=i[1];u;)u=(e=xn(c))[0],c=e[1];return n?c.endsWith("".concat("~","1"))?c.substring(0,c.length-2):null:c}}}return null}function xn(t){try{var n=decodeURIComponent(t);return[n!=t,n]}catch(t){}return[!1,t]}function Nn(t,n,e){if((o.track||""==n)&&(navigator&&navigator.cookieEnabled||_n(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===sn){for(var c=location.hostname?location.hostname.split("."):[],s=c.length-1;s>=0;s--)if(sn=".".concat(c[s]).concat(sn||""),s<c.length-1&&(document.cookie="".concat(u).concat(";").concat("domain=").concat(sn),Mn(t)===n))return;sn=""}}catch(t){sn=""}document.cookie=sn?"".concat(u).concat(";").concat("domain=").concat(sn):u}}var jn,Cn=null;function zn(){var t=on;Cn={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 An(){Cn=null}function Pn(t){return Cn.start=Cn.start+Cn.duration,Cn.duration=s()-Cn.start,Cn.sequence++,Cn.upload=t&&"sendBeacon"in navigator?1:0,Cn.end=t?1:0,Cn.applicationPlatform=0,Cn.url=y(location.href,!1,!0),[Cn.version,Cn.sequence,Cn.start,Cn.duration,Cn.projectId,Cn.userId,Cn.sessionId,Cn.pageNum,Cn.upload,Cn.end,Cn.applicationPlatform,Cn.url]}function qn(){jn=[]}function Dn(t){if(jn&&-1===jn.indexOf(t.message)){var n=o.report;if(n&&n.length>0&&Cn){var e={v:Cn.version,p:Cn.projectId,u:Cn.userId,s:Cn.sessionId,n:Cn.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)),jn.push(t.message)}}return t}function Rn(t){return function(){var n=performance.now();try{t.apply(this,arguments)}catch(t){throw Dn(t)}var e=performance.now()-n;X(4,e),e>30&&(L(7),V(6,e),"".concat(t.dn||t.name,"-").concat(e))}}var Hn=new Map;function Un(t,n,e,r,a){void 0===r&&(r=!1),void 0===a&&(a=!0),e=Rn(e);try{t[i("addEventListener")](n,e,{capture:r,passive:a}),function(t){return Hn.has(t)}(t)||Hn.set(t,[]),Hn.get(t).push({event:n,listener:e,options:{capture:r,passive:a}})}catch(t){}}function Ln(){Hn.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){}})),Hn.delete(n)}(t,n)})),Hn=new Map}var Xn=null,Vn=null,Bn=null,Yn=0;function Wn(){return!(Yn++>20)}function Zn(){Zn.dn=1,Yn=0,Bn!==Gn()&&(Ne(),window.setTimeout(Jn,250))}function Jn(){xe(),V(29,1)}function Gn(){return location.href?location.href.replace(location.hash,""):location.href}var Fn=[],Kn=null,Qn=null,$n=null;function te(){Qn&&($n(),Qn=null,null===Kn&&ee())}function ne(){Fn=[],Kn=null,Qn=null}function ee(){var t=Fn.shift();t&&(Kn=t,t.task().then((function(){t.id===vn()&&(t.resolve(),Kn=null,ee())})).catch((function(n){t.id===vn()&&(n&&(n.name,n.message,n.stack),Kn=null,ee())})))}var re=!1;function ae(){re=!0,u=c(),ne(),Ln(),qn(),Bn=Gn(),Yn=0,Un(window,"popstate",Zn),null===Xn&&(Xn=history.pushState,history.pushState=function(){Xn.apply(this,arguments),ie()&&Wn()&&Zn()}),null===Vn&&(Vn=history.replaceState,history.replaceState=function(){Vn.apply(this,arguments),ie()&&Wn()&&Zn()})}function oe(){Bn=null,Yn=0,qn(),Ln(),ne(),u=0,re=!1}function ie(){return re}function ue(){ue.dn=2,xe(),D("clarity","restart")}var ce=null;function se(){ce=null}function le(t){ce={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){nt(this,void 0,void 0,(function(){var n,e;return et(this,(function(r){return n=s(),e=[n,t],29===t&&(e.push(ce.fetchStart),e.push(ce.connectStart),e.push(ce.connectEnd),e.push(ce.requestStart),e.push(ce.responseStart),e.push(ce.responseEnd),e.push(ce.domInteractive),e.push(ce.domComplete),e.push(ce.loadEventStart),e.push(ce.loadEventEnd),e.push(ce.redirectCount),e.push(ce.size),e.push(ce.type),e.push(ce.protocol),e.push(ce.encodedSize),e.push(ce.decodedSize),se(),Ht(e)),[2]}))}))}(29)}var de,pe=0,fe=1/0,he=0,ve=0,ge=[],me=new Map,ye=function(){return pe||0},be=function(){if(!ge.length)return-1;var t=Math.min(ge.length-1,Math.floor((ye()-ve)/50));return ge[t].latency},we=function(){ve=ye(),ge.length=0,me.clear()},ke=function(t){if(t.interactionId&&!(t.duration<40)){!function(t){"interactionCount"in performance?pe=performance.interactionCount:t.interactionId&&(fe=Math.min(fe,t.interactionId),he=Math.max(he,t.interactionId),pe=he?(he-fe)/7+1:0)}(t);var n=ge[ge.length-1],e=me.get(t.interactionId);if(e||ge.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};me.set(r.id,r),ge.push(r)}ge.sort((function(t,n){return n.latency-t.latency})),ge.length>10&&ge.splice(10).forEach((function(t){return me.delete(t.id)}))}}},Se=["navigation","resource","longtask","first-input","layout-shift","largest-contentful-paint","event"];function _e(){_e.dn=26;try{de&&de.disconnect(),de=new PerformanceObserver(Rn(Ee));for(var t=0,n=Se;t<n.length;t++){var e=n[t];PerformanceObserver.supportedEntryTypes.indexOf(e)>=0&&("layout-shift"===e&&X(9,0),de.observe({type:e,buffered:!0}))}}catch(t){}}function Ee(t){Ee.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":le(r);break;case"resource":var a=r.name;en(4,Te(a)),a!==o.upload&&a!==o.fallback||V(28,r.duration);break;case"longtask":L(7);break;case"first-input":n&&V(10,r.processingStart-r.startTime);break;case"event":n&&"PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&(ke(r),en(37,be().toString()));break;case"layout-shift":n&&!r.hadRecentInput&&X(9,1e3*r.value);break;case"largest-contentful-paint":n&&V(8,r.startTime)}}}(t.getEntries())}var Ie=null;function Te(t){return Ie||(Ie=document.createElement("a")),Ie.href=t,Ie.host}var Oe=Object.freeze({__proto__:null,start:function t(){t.dn=25,se(),function(){navigator&&navigator.connection&&en(27,navigator.connection.effectiveType),window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&("complete"!==document.readyState?Un(window,"load",B.bind(this,_e,0)):_e())}()},stop:function(){de&&de.disconnect(),de=null,we(),Ie=null,se()}}),Me=[j,j,j,Oe];function xe(t){void 0===t&&(t=null),function(){try{var t=navigator&&"globalPrivacyControl"in navigator&&1==navigator.globalPrivacyControl;return!1===re&&"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||re)return!1;for(var n in t)n in o&&(o[n]=t[n])}(t),ae(),mt(),Me.forEach((function(t){return Rn(t.start)()})),null===t&&Ae())}function Ne(){ie()&&(Me.slice().reverse().forEach((function(t){return Rn(t.stop)()})),yt(),oe(),void 0!==Ce&&(Ce[ze]=function(){(Ce[ze].q=Ce[ze].q||[]).push(arguments),"start"===arguments[0]&&Ce[ze].q.unshift(Ce[ze].q.pop())&&Ae()}))}var je=Object.freeze({__proto__:null,consent:gn,consentv2:mn,event:D,hashText:M,identify:ot,metadata:hn,pause:function(){ie()&&(D("clarity","pause"),null===Qn&&(Qn=new Promise((function(t){$n=t}))))},resume:function(){ie()&&(te(),D("clarity","resume"))},set:at,signal:function(t){ht=t},start:xe,stop:Ne,upgrade:$,version:l}),Ce=window,ze="clarity";function Ae(){if(void 0!==Ce){if(Ce[ze]&&Ce[ze].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=Ce[ze]&&Ce[ze].q||[];for(Ce[ze]=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return je[t].apply(je,n)},Ce[ze].v=l;t.length>0;)Ce[ze].apply(Ce,t.shift())}}Ae()}();
|
package/package.json
CHANGED
package/src/core/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let version = "0.8.
|
|
1
|
+
let version = "0.8.22";
|
|
2
2
|
export default version;
|
package/src/data/metadata.ts
CHANGED
|
@@ -21,7 +21,7 @@ let defaultStatus: ConsentState = {ad_Storage: Constant.Denied, analytics_Storag
|
|
|
21
21
|
export function start(): void {
|
|
22
22
|
rootDomain = null;
|
|
23
23
|
const ua = navigator && "userAgent" in navigator ? navigator.userAgent : Constant.Empty;
|
|
24
|
-
const timezone = Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone ?? '';
|
|
24
|
+
const timezone = (typeof Intl !== 'undefined' && Intl?.DateTimeFormat()?.resolvedOptions()?.timeZone) ?? '';
|
|
25
25
|
const timezoneOffset = new Date().getTimezoneOffset().toString();
|
|
26
26
|
const ancestorOrigins = window.location.ancestorOrigins ? Array.from(window.location.ancestorOrigins).toString() : '';
|
|
27
27
|
const title = document && document.title ? document.title : Constant.Empty;
|
package/src/data/upload.ts
CHANGED
|
@@ -20,6 +20,7 @@ import * as extract from "@src/data/extract";
|
|
|
20
20
|
import * as style from "@src/layout/style";
|
|
21
21
|
import { report } from "@src/core/report";
|
|
22
22
|
import { signalsEvent } from "@src/data/signal";
|
|
23
|
+
import { snapshot } from "@src/insight/snapshot";
|
|
23
24
|
|
|
24
25
|
let discoverBytes: number = 0;
|
|
25
26
|
let playbackBytes: number = 0;
|
|
@@ -182,12 +183,20 @@ function send(payload: string, zipped: Uint8Array, sequence: number, beacon: boo
|
|
|
182
183
|
// The advantage to using sendBeacon is that browser can decide to upload asynchronously, improving chances of success
|
|
183
184
|
// However, we don't want to rely on it for every payload, since we have no ability to retry if the upload failed.
|
|
184
185
|
// Also, in case of sendBeacon, we do not have a way to alter HTTP headers and therefore can't send compressed payload
|
|
185
|
-
if (beacon && "sendBeacon"
|
|
186
|
+
if (beacon && navigator && navigator["sendBeacon"]) {
|
|
186
187
|
try {
|
|
187
188
|
// Navigator needs to be bound to sendBeacon before it is used to avoid errors in some browsers
|
|
188
189
|
dispatched = navigator.sendBeacon.bind(navigator)(url, payload);
|
|
189
|
-
if (dispatched) {
|
|
190
|
-
|
|
190
|
+
if (dispatched) {
|
|
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
|
+
}
|
|
196
|
+
} 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}`));
|
|
199
|
+
}
|
|
191
200
|
}
|
|
192
201
|
|
|
193
202
|
// Before initiating XHR upload, we check if the data has already been uploaded using sendBeacon
|
|
@@ -237,6 +246,9 @@ function check(xhr: XMLHttpRequest, sequence: number): void {
|
|
|
237
246
|
// 2: Safari will terminate pending XHR requests with status code 0 if the user navigates away from the page
|
|
238
247
|
// In any case, we switch the upload URL to fallback configuration (if available) before re-trying one more time
|
|
239
248
|
if (xhr.status === 0) { config.upload = config.fallback ? config.fallback : config.upload; }
|
|
249
|
+
// Capture the status code and number of attempts so we can report it back to the server
|
|
250
|
+
track = { sequence, attempts: transitData.attempts, status: xhr.status };
|
|
251
|
+
encode(Event.Upload);
|
|
240
252
|
// In all other cases, re-attempt sending the same data
|
|
241
253
|
// For retry we always fallback to string payload, even though we may have attempted
|
|
242
254
|
// sending zipped payload earlier
|
|
@@ -302,6 +314,10 @@ function response(payload: string): void {
|
|
|
302
314
|
case Constant.Signal:
|
|
303
315
|
if (parts.length > 1) { signalsEvent(parts[1]); }
|
|
304
316
|
break;
|
|
317
|
+
case Constant.Snapshot:
|
|
318
|
+
config.lean = false; // Disable lean mode to ensure we can send playback information to server.
|
|
319
|
+
snapshot();
|
|
320
|
+
break;
|
|
305
321
|
}
|
|
306
322
|
}
|
|
307
323
|
}
|
package/src/interaction/click.ts
CHANGED
|
@@ -25,7 +25,7 @@ export function observe(root: Node): void {
|
|
|
25
25
|
function handler(event: Event, root: Node, evt: MouseEvent): void {
|
|
26
26
|
handler.dn = FunctionNames.ClickHandler;
|
|
27
27
|
let frame = iframe(root);
|
|
28
|
-
let d = frame ? frame.contentDocument.documentElement : document.documentElement;
|
|
28
|
+
let d = frame && frame.contentDocument ? frame.contentDocument.documentElement : document.documentElement;
|
|
29
29
|
let x = "pageX" in evt ? Math.round(evt.pageX) : ("clientX" in evt ? Math.round(evt["clientX"] + d.scrollLeft) : null);
|
|
30
30
|
let y = "pageY" in evt ? Math.round(evt.pageY) : ("clientY" in evt ? Math.round(evt["clientY"] + d.scrollTop) : null);
|
|
31
31
|
// In case of iframe, we adjust (x,y) to be relative to top parent's origin
|
|
@@ -35,7 +35,7 @@ export function observe(root: Node): void {
|
|
|
35
35
|
function mouse(event: Event, root: Node, evt: MouseEvent): void {
|
|
36
36
|
mouse.dn = FunctionNames.PointerMouse;
|
|
37
37
|
let frame = iframe(root);
|
|
38
|
-
let d = frame ? frame.contentDocument.documentElement : document.documentElement;
|
|
38
|
+
let d = frame && frame.contentDocument ? frame.contentDocument.documentElement : document.documentElement;
|
|
39
39
|
let x = "pageX" in evt ? Math.round(evt.pageX) : ("clientX" in evt ? Math.round(evt["clientX"] + d.scrollLeft) : null);
|
|
40
40
|
let y = "pageY" in evt ? Math.round(evt.pageY) : ("clientY" in evt ? Math.round(evt["clientY"] + d.scrollTop) : null);
|
|
41
41
|
// In case of iframe, we adjust (x,y) to be relative to top parent's origin
|
|
@@ -52,7 +52,7 @@ function mouse(event: Event, root: Node, evt: MouseEvent): void {
|
|
|
52
52
|
function touch(event: Event, root: Node, evt: TouchEvent): void {
|
|
53
53
|
touch.dn = FunctionNames.PointerTouch;
|
|
54
54
|
let frame = iframe(root);
|
|
55
|
-
let d = frame ? frame.contentDocument.documentElement : document.documentElement;
|
|
55
|
+
let d = frame && frame.contentDocument ? frame.contentDocument.documentElement : document.documentElement;
|
|
56
56
|
let touches = evt.changedTouches;
|
|
57
57
|
|
|
58
58
|
let t = time(evt);
|
|
@@ -3,6 +3,7 @@ import { ResizeData, Setting } from "@clarity-types/interaction";
|
|
|
3
3
|
import { FunctionNames } from "@clarity-types/performance";
|
|
4
4
|
import { clearTimeout, setTimeout } from "@src/core/timeout";
|
|
5
5
|
import { bind } from "@src/core/event";
|
|
6
|
+
import throttle from "@src/core/throttle";
|
|
6
7
|
import encode from "./encode";
|
|
7
8
|
import { schedule } from "@src/core/task";
|
|
8
9
|
|
|
@@ -10,9 +11,11 @@ export let data: ResizeData;
|
|
|
10
11
|
let timeout: number = null;
|
|
11
12
|
let initialStateLogged = false;
|
|
12
13
|
|
|
14
|
+
const throttledRecompute = throttle(recompute, Setting.LookAhead);
|
|
15
|
+
|
|
13
16
|
export function start(): void {
|
|
14
17
|
initialStateLogged = false;
|
|
15
|
-
bind(window, "resize",
|
|
18
|
+
bind(window, "resize", throttledRecompute);
|
|
16
19
|
recompute();
|
|
17
20
|
}
|
|
18
21
|
|
|
@@ -41,8 +44,9 @@ function process(event: Event): void {
|
|
|
41
44
|
export function reset(): void {
|
|
42
45
|
data = null;
|
|
43
46
|
clearTimeout(timeout);
|
|
47
|
+
throttledRecompute.cleanup();
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
export function stop(): void {
|
|
47
51
|
reset();
|
|
48
|
-
}
|
|
52
|
+
}
|
package/src/performance/blank.ts
CHANGED
|
@@ -15,7 +15,7 @@ const types: string[] = [Constant.Navigation, Constant.Resource, Constant.LongTa
|
|
|
15
15
|
|
|
16
16
|
export function start(): void {
|
|
17
17
|
// Capture connection properties, if available
|
|
18
|
-
if (navigator && "connection"
|
|
18
|
+
if (navigator && navigator["connection"]) {
|
|
19
19
|
dimension.log(Dimension.ConnectionType, navigator["connection"]["effectiveType"]);
|
|
20
20
|
}
|
|
21
21
|
|
package/types/data.d.ts
CHANGED
|
@@ -319,6 +319,7 @@ export const enum Constant {
|
|
|
319
319
|
Action = "ACTION",
|
|
320
320
|
Signal = "SIGNAL",
|
|
321
321
|
Extract = "EXTRACT",
|
|
322
|
+
Snapshot = "SNAPSHOT",
|
|
322
323
|
UserHint = "userHint",
|
|
323
324
|
UserType = "userType",
|
|
324
325
|
UserId = "userId",
|
|
@@ -352,6 +353,7 @@ export const enum Constant {
|
|
|
352
353
|
Caret = "^",
|
|
353
354
|
Granted = "granted",
|
|
354
355
|
Denied = "denied",
|
|
356
|
+
BeaconError = "BeaconError",
|
|
355
357
|
}
|
|
356
358
|
|
|
357
359
|
export const enum XMLReadyState {
|