clarity-js 0.7.7 → 0.7.8

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.
@@ -1 +1 @@
1
- !function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return Ie},get start(){return Ne},get stop(){return Se},get track(){return xe}}),e=Object.freeze({__proto__:null,get clone(){return Fe},get compute(){return Ke},get data(){return Le},get keys(){return Ue},get reset(){return Qe},get start(){return Ze},get stop(){return tn},get trigger(){return Ge},get update(){return $e}}),n=Object.freeze({__proto__:null,get check(){return un},get compute(){return sn},get data(){return Pe},get start(){return on},get stop(){return ln},get trigger(){return cn}}),a=Object.freeze({__proto__:null,get compute(){return vn},get data(){return hn},get log(){return gn},get reset(){return mn},get start(){return dn},get stop(){return pn},get updates(){return fn}}),r=Object.freeze({__proto__:null,get callbacks(){return bn},get clear(){return Mn},get consent(){return En},get data(){return yn},get id(){return On},get metadata(){return xn},get save(){return Tn},get start(){return kn},get stop(){return _n}}),i=Object.freeze({__proto__:null,get data(){return An},get envelope(){return Yn},get start(){return Xn},get stop(){return zn}}),o={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};function u(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function s(t){void 0===t&&(t=null);var e=t&&t.timeStamp>0?t.timeStamp:performance.now();return Math.max(Math.round(e-c),0)}var l="0.7.7";var h=/\S/gi,f=!0,d=null,p=null,g=null;function v(t,e,n,a){if(void 0===a&&(a=!1),t)switch(n){case 0:return t;case 1:switch(e){case"*T":case"value":case"placeholder":case"click":return function(t){var e=-1,n=0,a=!1,r=!1,i=!1,o=null;k();for(var u=0;u<t.length;u++){var c=t.charCodeAt(u);if(a=a||c>=48&&c<=57,r=r||64===c,i=9===c||10===c||13===c||32===c,0===u||u===t.length-1||i){if(a||r){null===o&&(o=t.split(""));var s=t.substring(e+1,i?u:u+1);s=f&&null!==g?s.match(g)?s:s.replace(p,"▪").replace(d,"▫"):b(s),o.splice(e+1-n,s.length,s),n+=s.length-1}i&&(a=!1,r=!1,e=u)}}return o?o.join(""):t}(t);case"input":case"change":return w(t)}return t;case 2:case 3:switch(e){case"*T":case"data-":return a?y(t):b(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":case"change":return w(t);case"placeholder":return b(t)}break;case 4:switch(e){case"*T":case"data-":return a?y(t):b(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}break;case 5:switch(e){case"*T":case"data-":return function(t){return k(),t.replace(p,"▪").replace(d,"▫")}(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 m(t){var e=o.drop;if(e&&e.length>0&&t&&t.indexOf("?")>0){var n=t.split("?"),a=n[0],r=n[1];return a+"?"+r.split("&").map((function(t){return e.some((function(e){return 0===t.indexOf("".concat(e,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}return t}function y(t){var e=t.trim();if(e.length>0){var n=e[0],a=t.indexOf(n),r=t.substr(0,a),i=t.substr(a+e.length);return"".concat(r).concat(e.length.toString(36)).concat(i)}return t}function b(t){return t.replace(h,"•")}function w(t){for(var e=5*(Math.floor(t.length/5)+1),n="",a=0;a<e;a++)n+=a>0&&a%5==0?" ":"•";return n}function k(){if(f&&null===d)try{d=new RegExp("\\p{N}","gu"),p=new RegExp("\\p{L}","gu"),g=new RegExp("\\p{Sc}","gu")}catch(t){f=!1}}var _=null,x=null,O=!1;function E(){O&&(_={time:s(),event:4,data:{visible:x.visible,docWidth:x.docWidth,docHeight:x.docHeight,screenWidth:x.screenWidth,screenHeight:x.screenHeight,scrollX:x.scrollX,scrollY:x.scrollY,pointerX:x.pointerX,pointerY:x.pointerY,activityTime:x.activityTime}}),x=x||{visible:1,docWidth:0,docHeight:0,screenWidth:0,screenHeight:0,scrollX:0,scrollY:0,pointerX:0,pointerY:0,activityTime:0}}function M(t,e,n){switch(t){case 8:x.docWidth=e,x.docHeight=n;break;case 11:x.screenWidth=e,x.screenHeight=n;break;case 10:x.scrollX=e,x.scrollY=n;break;default:x.pointerX=e,x.pointerY=n}O=!0}function T(t){x.activityTime=t}function N(t,e){x.visible="visible"===e?1:0,x.visible||T(t),O=!0}function I(){O&&rn(4)}var S=Object.freeze({__proto__:null,activity:T,compute:I,reset:E,start:function(){O=!1,E()},get state(){return _},stop:function(){E()},track:M,visibility:N}),j=null;function C(t,e){aa()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(j={key:t,value:e},rn(24))}var D,H=null,W=null;function A(t){t in H||(H[t]=0),t in W||(W[t]=0),H[t]++,W[t]++}function X(t,e){null!==e&&(t in H||(H[t]=0),t in W||(W[t]=0),H[t]+=e,W[t]+=e)}function z(t,e){null!==e&&!1===isNaN(e)&&(t in H||(H[t]=0),(e>H[t]||0===H[t])&&(W[t]=e,H[t]=e))}function Y(t,e,n){return window.setTimeout(Pn(t),e,n)}function q(t){return window.clearTimeout(t)}var R=0,P=0,L=null;function U(){L&&q(L),L=Y(V,P),R=s()}function V(){var t=s();D={gap:t-R},rn(25),D.gap<3e5?L=Y(V,P):ta&&(C("clarity","suspend"),ca(),["mousemove","touchstart"].forEach((function(t){return Un(document,t,ia)})),["resize","scroll","pageshow"].forEach((function(t){return Un(window,t,ia)})))}var J=Object.freeze({__proto__:null,get data(){return D},reset:U,start:function(){P=6e4,R=0},stop:function(){q(L),R=0,P=0}}),B=null;function Z(){rn(36)}function G(){B={}}var F=Object.freeze({__proto__:null,compute:Z,get data(){return B},reset:G,start:function(){B={}},stop:function(){B={}},track:function(t,e){if(t in B){var n=B[t],a=n[n.length-1];e-a[0]>100?B[t].push([e,0]):a[1]=e-a[0]}else B[t]=[[e,0]]}}),K=null;function Q(t){aa()&&o.lean&&(o.lean=!1,K={key:t},Tn(),o.upgrade&&o.upgrade(t),rn(3))}var $=Object.freeze({__proto__:null,get data(){return K},start:function(){!o.lean&&o.upgrade&&o.upgrade("Config"),K=null},stop:function(){K=null},upgrade:Q}),tt=null;function et(t,e){at(t,"string"==typeof e?[e]:e)}function nt(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),at("userId",[t]),at("sessionId",[e]),at("pageId",[n])}function at(t,e){if(aa()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in tt?tt[t]:[]),a=0;a<e.length;a++)"string"==typeof e[a]&&e[a].length<255&&n.push(e[a]);tt[t]=n}}function rt(){rn(34)}function it(){tt={}}function ot(t,e,n,a){return new(n||(n=Promise))((function(r,i){function o(t){try{c(a.next(t))}catch(t){i(t)}}function u(t){try{c(a.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((a=a.apply(t,e||[])).next())}))}function ut(t,e){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(n=1,a&&(r=2&u[0]?a.return:u[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,u[1])).done)return r;switch(a=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,a=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){o.label=u[1];break}if(6===u[0]&&o.label<r[1]){o.label=r[1],r=u;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(u);break}r[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(t){u=[6,t],a=0}finally{n=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}var ct="CompressionStream"in window;function st(t){return ot(this,void 0,void 0,(function(){var e,n;return ut(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),ct?(e=new ReadableStream({start:function(e){return ot(this,void 0,void 0,(function(){return ut(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,lt(e)]):[3,2];case 1:return[2,new(n.apply(Uint8Array,[void 0,a.sent()]))];case 2:return[3,4];case 3:return a.sent(),[3,4];case 4:return[2,null]}}))}))}function lt(t){return ot(this,void 0,void 0,(function(){var e,n,a,r,i;return ut(this,(function(o){switch(o.label){case 0:e=t.getReader(),n=[],a=!1,r=[],o.label=1;case 1:return a?[3,3]:[4,e.read()];case 2:return i=o.sent(),a=i.done,r=i.value,a?[2,n]:(n.push.apply(n,r),[3,1]);case 3:return[2,n]}}))}))}var ht,ft=[S,a,Object.freeze({__proto__:null,compute:rt,get data(){return tt},identify:nt,reset:it,set:et,start:function(){it()},stop:function(){it()}}),n,F,r,i,t,J,$,e];function dt(){H={},W={},A(5),ft.forEach((function(t){return Pn(t.start)()}))}function pt(){ft.slice().reverse().forEach((function(t){return Pn(t.stop)()})),H={},W={}}function gt(){rt(),I(),vn(),rn(0),Z(),sn(),Ke()}function vt(t){return ot(this,void 0,void 0,(function(){var e,n,a,r,i,o,u,c,l,h,f,d,p;return ut(this,(function(g){switch(e=s(),n=[e,t],t){case 8:a=ht,n.push(a.width),n.push(a.height),M(t,a.width,a.height),Ie(n);break;case 43:if((r=ne).length>0){for(i=0,o=r;i<o.length;i++)for(u=o[i],c=u.metadata.privacy,l=u.data,h=0,f=["tag","attributes","value"];h<f.length;h++)if(l[d=f[h]])switch(d){case"tag":n.push(u.id),u.parent&&n.push(u.parent),u.previous&&n.push(u.previous),n.push(l[d]);break;case"attributes":for(p in l[d])void 0!==l[d][p]&&n.push(mt(p,l[d][p],c));break;case"value":n.push(v(l[d],l.tag,c))}Ie(function(t){for(var e=[],n={},a=0,r=null,i=0;i<t.length;i++)if("string"==typeof t[i]){var o=t[i],u=n[o]||-1;u>=0?r?r.push(u):(r=[u],e.push(r),a++):(r=null,e.push(o),n[o]=a++)}else r=null,e.push(t[i]),a++;return e}(n),!0)}}return[2]}))}))}function mt(t,e,n){return"".concat(t,"=").concat(v(e,0===t.indexOf("data-")?"data-":t,n))}function yt(){ht=null}function bt(){var t,e,n,a,r,i,o,u,c,s,l,h,f,d,p,g;yt(),t=document.body,e=document.documentElement,n=t?t.clientWidth:null,a=t?t.scrollWidth:null,r=t?t.offsetWidth:null,i=e?e.clientWidth:null,o=e?e.scrollWidth:null,u=e?e.offsetWidth:null,c=Math.max(n,a,r,i,o,u),s=t?t.clientHeight:null,l=t?t.scrollHeight:null,h=t?t.offsetHeight:null,f=e?e.clientHeight:null,d=e?e.scrollHeight:null,p=e?e.offsetHeight:null,g=Math.max(s,l,h,f,d,p),null!==ht&&c===ht.width&&g===ht.height||null===c||null===g||(ht={width:c,height:g},vt(8))}var wt=[],kt=null;var _t=Object.freeze({__proto__:null,compute:function(){},data:kt,log:function(){},observe:function(){},reset:function(){},start:function(){},state:wt,stop:function(){}}),xt=[],Ot=null,Et=null,Mt=null;function Tt(){xt=[],Ot=null,Et=null}function Nt(t,e){return void 0===e&&(e=0),ot(this,void 0,void 0,(function(){var n,a,r;return ut(this,(function(i){for(n=0,a=xt;n<a.length;n++)if(a[n].task===t)return[2];return r=new Promise((function(n){xt[1===e?"unshift":"push"]({task:t,resolve:n,id:On()})})),null===Ot&&null===Et&&It(),[2,r]}))}))}function It(){var t=xt.shift();t&&(Ot=t,t.task().then((function(){t.id===On()&&(t.resolve(),Ot=null,It())})).catch((function(e){t.id===On()&&(e&&Re(0,1,e.name,e.message,e.stack),Ot=null,It())})))}var St,jt=["input","textarea","radio","button","canvas"],Ct=[];function Dt(t){Un(t,"click",Ht.bind(this,9,t),!0)}function Ht(t,e,n){var a=document.documentElement,r="pageX"in n?Math.round(n.pageX):"clientX"in n?Math.round(n.clientX+a.scrollLeft):null,i="pageY"in n?Math.round(n.pageY):"clientY"in n?Math.round(n.clientY+a.scrollTop):null,o=ue(n),u=function(t){for(;t&&t!==document;){if(t.nodeType===Node.ELEMENT_NODE){var e=t;if("A"===e.tagName)return e}t=t.parentNode}return null}(o),c=function(t){var e=null,n=document.documentElement;if("function"==typeof t.getBoundingClientRect){var a=t.getBoundingClientRect();a&&a.width>0&&a.height>0&&(e={x:Math.floor(a.left+("pageXOffset"in window?window.pageXOffset:n.scrollLeft)),y:Math.floor(a.top+("pageYOffset"in window?window.pageYOffset:n.scrollTop)),w:Math.floor(a.width),h:Math.floor(a.height)})}return e}(o);0===n.detail&&c&&(r=Math.round(c.x+c.w/2),i=Math.round(c.y+c.h/2));var l=c?Math.max(Math.floor((r-c.x)/c.w*32767),0):0,h=c?Math.max(Math.floor((i-c.y)/c.h*32767),0):0;null!==r&&null!==i&&(Ct.push({time:s(n),event:t,data:{target:o,x:r,y:i,eX:l,eY:h,button:n.button,reaction:At(o),context:Xt(u),text:Wt(o),link:u?u.href:null,hash:null,trust:n.isTrusted?1:0}}),Nt(pe.bind(this,t)))}function Wt(t){var e=null;if(t){var n=t.textContent||t.value||t.alt;n&&(e=n.trim().replace(/\s+/g," ").substr(0,25))}return e}function At(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(jt.indexOf(e)>=0)return 0}return 1}function Xt(t){if(t&&t.hasAttribute("target"))switch(t.getAttribute("target")){case"_blank":return 1;case"_parent":return 2;case"_top":return 3}return 0}function zt(){Ct=[]}function Yt(){var t=document.documentElement;St={width:t&&"clientWidth"in t?Math.min(t.clientWidth,window.innerWidth):window.innerWidth,height:t&&"clientHeight"in t?Math.min(t.clientHeight,window.innerHeight):window.innerHeight},pe(11)}function qt(){St=null}var Rt=[],Pt=null;function Lt(t){void 0===t&&(t=null);var e=window,n=document.documentElement,a=t?ue(t):n;if(a&&a.nodeType===Node.DOCUMENT_NODE){a=n=a.documentElement}var r=a===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(a.scrollLeft),i=a===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(a.scrollTop),o={time:s(t),event:10,data:{target:a,x:r,y:i}};if((null!==t||0!==r||0!==i)&&null!==r&&null!==i){var u=Rt.length,c=u>1?Rt[u-2]:null;c&&function(t,e){var n=t.data.x-e.data.x,a=t.data.y-e.data.y;return n*n+a*a<400&&e.time-t.time<25}(c,o)&&Rt.pop(),Rt.push(o),q(Pt),Pt=Y(Ut,500,10)}}function Ut(t){Nt(pe.bind(this,t))}var Vt,Jt,Bt=[];function Zt(t){Bt.push({time:s(t),event:39,data:{target:ue(t)}}),Nt(pe.bind(this,39))}function Gt(){Bt=[]}function Ft(t){Vt={name:t.type},pe(26,s(t)),ca()}function Kt(){Vt=null}function Qt(t){void 0===t&&(t=null),Jt={visible:"visibilityState"in document?document.visibilityState:"default"},pe(28,s(t))}function $t(){Jt=null}function te(t){!function(t){Un(t===document?window:t,"scroll",Lt,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Dt(t),function(t){Un(t,"submit",Zt,!0)}(t))}var ee=Object.freeze({__proto__:null,observe:te,start:function(){ge=[],me(),zt(),Un(window,"resize",Yt),Yt(),Un(document,"visibilitychange",Qt),Qt(),Rt=[],Lt(),Gt(),Un(window,"pagehide",Ft)},stop:function(){ge=[],me(),zt(),qt(),$t(),q(Pt),Rt=[],Gt(),Kt()}}),ne=[],ae=1,re=null;function ie(){return!1}function oe(){}function ue(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function ce(t){var e={id:0,hash:null,privacy:5,node:t};return t&&(e.id=re.has(t)?re.get(t):he(t)),e}function se(){re=new WeakMap}function le(t){var e={},n=t.attributes;if(n&&n.length>0)for(var a=0;a<n.length;a++)e[n[a].name]=n[a].value;return e}function he(t){return null===t?null:re.has(t)?re.get(t):(re.set(t,ae),ae++)}function fe(t,e,n){if(t&&n&&n.tag){var a=he(t),r=e?re.get(e):null,i=t.previousSibling?re.get(t.previousSibling):null;ne.push({id:a,parent:r,previous:i,children:[],data:n,selector:null,hash:null,region:null,metadata:{active:!0,suspend:!1,privacy:5,position:null,fraud:null,size:null}})}}var de=Object.freeze({__proto__:null,compute:function(){},hashText:oe,iframe:ie,metadata:ce,offset:function(){return{x:0,y:0}},snapshot:function(){ne=[],function(t){var e=[t];for(;e.length>0;){for(var n=null,a=null,r=null,i=e.shift(),o=i.firstChild,u=i.parentElement?i.parentElement:i.parentNode?i.parentNode:null;o;)e.push(o),o=o.nextSibling;switch(i.nodeType){case Node.DOCUMENT_TYPE_NODE:var c=i;a="*D",n={name:c.name,publicId:c.publicId,systemId:c.systemId};break;case Node.TEXT_NODE:r=i.nodeValue,a=re.get(u)?"*T":a;break;case Node.ELEMENT_NODE:var s=i;n=le(s),a=["NOSCRIPT","SCRIPT","STYLE"].indexOf(s.tagName)<0?s.tagName:a}fe(i,u,{tag:a,attributes:n,value:r})}}(document),vt(43)},start:function(){se(),bt(),he(document.documentElement),te(document)},stop:function(){se(),yt()},target:ue,get values(){return ne}});function pe(t,e){return void 0===e&&(e=null),ot(this,void 0,void 0,(function(){var n,a,r,i,o,u,c,l,h,f,d,p,g,y,b,w,k,_,x,O,E,T,I,S,j,C,D,H,W,A,X;return ut(this,(function(z){switch(n=e||s(),a=[n,t],t){case 13:case 14:case 12:case 15:case 16:case 17:case 18:case 19:case 20:for(r=0,i=wt;r<i.length;r++)A=i[r],(o=ce(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(o.id),a.push(A.data.x),a.push(A.data.y),Ie(a),M(A.event,A.data.x,A.data.y));break;case 9:for(u=0,c=Ct;u<c.length;u++)A=c[u],l=ce(A.data.target,A.event,A.data.text),a=[A.time,A.event],h=l.hash?l.hash.join("."):"",a.push(l.id),a.push(A.data.x),a.push(A.data.y),a.push(A.data.eX),a.push(A.data.eY),a.push(A.data.button),a.push(A.data.reaction),a.push(A.data.context),a.push(v(A.data.text,"click",l.privacy)),a.push(m(A.data.link)),a.push(h),a.push(A.data.trust),Ie(a),ye(A.time,A.event,h,A.data.x,A.data.y,A.data.reaction,A.data.context);zt();break;case 38:for(f=0,d=wt;f<d.length;f++)A=d[f],a=[A.time,A.event],(D=ce(A.data.target,A.event)).id>0&&(a.push(D.id),a.push(A.data.action),Ie(a));break;case 11:p=St,a.push(p.width),a.push(p.height),M(t,p.width,p.height),qt(),Ie(a);break;case 26:g=Vt,a.push(g.name),Kt(),Ie(a);break;case 27:for(y=0,b=wt;y<b.length;y++)A=b[y],w=ce(A.data.target,A.event,A.data.value),(a=[A.time,A.event]).push(w.id),a.push(v(A.data.value,"input",w.privacy)),Ie(a);break;case 21:(k=kt)&&(_=ce(k.start),x=ce(k.end),a.push(_.id),a.push(k.startOffset),a.push(x.id),a.push(k.endOffset),Ie(a));break;case 10:for(O=0,E=Rt;O<E.length;O++)A=E[O],(T=ce(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(T.id),a.push(A.data.x),a.push(A.data.y),Ie(a),M(A.event,A.data.x,A.data.y));Rt=[];break;case 42:for(I=0,S=wt;I<S.length;I++)A=S[I],a=[A.time,A.event],(D=ce(A.data.target,A.event)).id>0&&((a=[A.time,A.event]).push(D.id),a.push(A.data.type),a.push(v(A.data.value,"change",D.privacy)),a.push(v(A.data.checksum,"checksum",D.privacy)),Ie(a));break;case 39:for(j=0,C=Bt;j<C.length;j++)A=C[j],a=[A.time,A.event],(D=ce(A.data.target,A.event)).id>0&&(a.push(D.id),Ie(a));Gt();break;case 22:for(H=0,W=ve;H<W.length;H++)A=W[H],(a=[A.time,A.event]).push(A.data.type),a.push(A.data.hash),a.push(A.data.x),a.push(A.data.y),a.push(A.data.reaction),a.push(A.data.context),Ie(a,!1);me();break;case 28:X=Jt,a.push(X.visible),Ie(a),N(n,X.visible),$t()}return[2]}))}))}var ge=[],ve=[];function me(){ve=[]}function ye(t,e,n,a,r,i,o){void 0===i&&(i=1),void 0===o&&(o=0),ge.push({time:t,event:22,data:{type:e,hash:n,x:a,y:r,reaction:i,context:o}}),M(e,a,r)}var be,we,ke,_e,xe,Oe=0,Ee=0,Me=null,Te=0;function Ne(){_e=!0,Oe=0,Ee=0,Te=0,be=[],we=[],ke={},xe=null}function Ie(t,e){if(void 0===e&&(e=!0),_e){var n=s(),a=t.length>1?t[1]:null,r=JSON.stringify(t);switch(a){case 5:Oe+=r.length;case 37:case 6:case 43:Ee+=r.length,be.push(r);break;default:we.push(r)}A(25);var i=function(){var t=!1===o.lean&&Oe>0?100:An.sequence*o.delay;return"string"==typeof o.upload?Math.max(Math.min(t,3e4),100):o.delay}();n-Te>2*i&&(q(Me),Me=null),e&&null===Me&&(25!==a&&U(),Me=Y(je,i),Te=n,un(Ee))}}function Se(){q(Me),je(!0),Oe=0,Ee=0,Te=0,be=[],we=[],ke={},xe=null,_e=!1}function je(t){return void 0===t&&(t=!1),ot(this,void 0,void 0,(function(){var e,n,a,r,i,u,c,s;return ut(this,(function(l){switch(l.label){case 0:return Me=null,(e=!1===o.lean&&Ee>0&&(Ee<1048576||An.sequence>0))&&z(1,1),function(){var t=[];ve=[];for(var e=An.start+An.duration,n=Math.max(e-2e3,0),a=0,r=ge;a<r.length;a++){var i=r[a];i.time>=n&&(i.time<=e&&ve.push(i),t.push(i))}ge=t,pe(22)}(),gt(),n=!0===t,a=JSON.stringify(Yn(n)),r="[".concat(we.join(),"]"),i=e?"[".concat(be.join(),"]"):"",u=function(t){return t.p.length>0?'{"e":'.concat(t.e,',"a":').concat(t.a,',"p":').concat(t.p,"}"):'{"e":'.concat(t.e,',"a":').concat(t.a,"}")}({e:a,a:r,p:i}),n?(s=null,[3,3]):[3,1];case 1:return[4,st(u)];case 2:s=l.sent(),l.label=3;case 3:return X(2,(c=s)?c.length:u.length),Ce(u,c,An.sequence,n),we=[],e&&(be=[],Ee=0,Oe=0),[2]}}))}))}function Ce(t,e,n,a){if(void 0===a&&(a=!1),"string"==typeof o.upload){var r=o.upload,i=!1;if(a&&"sendBeacon"in navigator)try{(i=navigator.sendBeacon.bind(navigator)(r,t))&&He(n)}catch(t){}if(!1===i){n in ke?ke[n].attempts++:ke[n]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",r,!0),u.timeout=15e3,u.ontimeout=function(){Rn(new Error("".concat("Timeout"," : ").concat(r)))},null!==n&&(u.onreadystatechange=function(){Pn(De)(u,n)}),u.withCredentials=!0,e?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(e)):u.send(t)}}else if(o.upload){(0,o.upload)(t),He(n)}}function De(t,e){var n=ke[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?cn(6):(0===t.status&&(o.upload=o.fallback?o.fallback:o.upload),Ce(n.data,null,e)):(xe={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&rn(2),200===t.status&&t.responseText&&function(t){for(var e=t&&t.length>0?t.split("\n"):[],n=0,a=e;n<a.length;n++){var r=a[n],i=r&&r.length>0?r.split(/ (.*)/):[""];switch(i[0]){case"END":cn(6);break;case"UPGRADE":Q("Auto");break;case"ACTION":o.action&&i.length>1&&o.action(i[1]);break;case"EXTRACT":i.length>1&&Ge(i[1])}}}(t.responseText),0===t.status&&(Ce(n.data,null,e,!0),cn(3)),t.status>=200&&t.status<=208&&He(e),delete ke[e]))}function He(t){1===t&&Tn()}var We,Ae={};function Xe(t){var e=t.error||t;return e.message in Ae||(Ae[e.message]=0),Ae[e.message]++>=5||e&&e.message&&(We={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},ze(31)),!0}function ze(t){return ot(this,void 0,void 0,(function(){var e;return ut(this,(function(n){switch(e=[s(),t],t){case 31:e.push(We.message),e.push(We.line),e.push(We.column),e.push(We.stack),e.push(m(We.source)),Ie(e);break;case 33:Ye&&(e.push(Ye.code),e.push(Ye.name),e.push(Ye.message),e.push(Ye.stack),e.push(Ye.severity),Ie(e,!1))}return[2]}))}))}var Ye,qe={};function Re(t,e,n,a,r){void 0===n&&(n=null),void 0===a&&(a=null),void 0===r&&(r=null);var i=n?"".concat(n,"|").concat(a):"";t in qe&&qe[t].indexOf(i)>=0||(Ye={code:t,name:n,message:a,stack:r,severity:e},t in qe?qe[t].push(i):qe[t]=[i],ze(33))}var Pe,Le={},Ue=new Set,Ve={},Je={},Be={};function Ze(){Qe()}function Ge(t){try{var e=t&&t.length>0?t.split(/ (.*)/):[""],n=parseInt(e[0]),a=e.length>1?JSON.parse(e[1]):{};for(var r in Ve[n]={},Je[n]={},Be[n]={},a){var i=parseInt(r),o=a[r],u=2;switch(o.startsWith("~")?u=0:o.startsWith("!")&&(u=4),u){case 0:var c=o.substring(1,o.length);Ve[n][i]=en(c);break;case 2:Je[n][i]=o;break;case 4:var s=o.substring(1,o.length);Be[n][i]=s}}}catch(t){Re(8,1,t?t.name:null)}}function Fe(t){return JSON.parse(JSON.stringify(t))}function Ke(){try{for(var t in Ve){var e=parseInt(t),n=Ve[e];for(var a in n){var r=parseInt(a),i=(d=nn(Fe(n[r])))?JSON.stringify(d).substring(0,1e4):d;i&&$e(e,r,i)}var o=Je[e];for(var u in o){var c=parseInt(u),s=document.querySelectorAll(o[c]);if(s)$e(e,c,Array.from(s).map((function(t){return t.innerText})).join("<SEP>").substring(0,1e4))}var l=Be[e];for(var h in l){var f=parseInt(h);$e(e,f,(void l[f]).trim().substring(0,1e4))}}Ue.size>0&&rn(40)}catch(t){Re(5,1,t?t.name:null)}var d}function Qe(){Ue.clear()}function $e(t,e,n){var a,r=!1;t in Le||(Le[t]={},r=!0),a=Be[t],0==Object.keys(a).length||e in Le[t]&&Le[t][e]==n||(r=!0),Le[t][e]=n,r&&Ue.add(t)}function tn(){Qe()}function en(t){for(var e=[],n=t.split(".");n.length>0;){var a=n.shift(),r=a.indexOf("["),i=a.indexOf("{"),o=a.indexOf("}");e.push({name:r>0?a.substring(0,r):i>0?a.substring(0,i):a,type:r>0?1:i>0?2:3,condition:i>0?a.substring(i+1,o):null})}return e}function nn(t,e){if(void 0===e&&(e=window),0==t.length)return e;var n,a=t.shift();if(e&&e[a.name]){var r=e[a.name];if(1!==a.type&&an(r,a.condition))n=nn(t,r);else if(Array.isArray(r)){for(var i=[],o=0,u=r;o<u.length;o++){var c=u[o];if(an(c,a.condition)){var s=nn(t,c);s&&i.push(s)}}n=i}return n}return null}function an(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function rn(t){var e=[s(),t];switch(t){case 4:var n=_;n&&((e=[n.time,n.event]).push(n.data.visible),e.push(n.data.docWidth),e.push(n.data.docHeight),e.push(n.data.screenWidth),e.push(n.data.screenHeight),e.push(n.data.scrollX),e.push(n.data.scrollY),e.push(n.data.pointerX),e.push(n.data.pointerY),e.push(n.data.activityTime),Ie(e,!1)),E();break;case 25:e.push(D.gap),Ie(e);break;case 35:e.push(Pe.check),Ie(e,!1);break;case 3:e.push(K.key),Ie(e);break;case 2:e.push(xe.sequence),e.push(xe.attempts),e.push(xe.status),Ie(e,!1);break;case 24:e.push(j.key),e.push(j.value),Ie(e);break;case 34:var a=Object.keys(tt);if(a.length>0){for(var r=0,i=a;r<i.length;r++){var o=i[r];e.push(o),e.push(tt[o])}it(),Ie(e,!1)}break;case 0:var u=Object.keys(W);if(u.length>0){for(var c=0,l=u;c<l.length;c++){var h=l[c],f=parseInt(h,10);e.push(f),e.push(Math.round(W[h]))}W={},Ie(e,!1)}break;case 1:var d=Object.keys(fn);if(d.length>0){for(var p=0,g=d;p<g.length;p++){var v=g[p];f=parseInt(v,10);e.push(f),e.push(fn[v])}mn(),Ie(e,!1)}break;case 36:var m=Object.keys(B);if(m.length>0){for(var y=0,b=m;y<b.length;y++){var w=b[y];f=parseInt(w,10);e.push(f),e.push([].concat.apply([],B[w]))}G(),Ie(e,!1)}break;case 40:Ue.forEach((function(t){e.push(t);var n=[];for(var a in Le[t]){var r=parseInt(a,10);n.push(r),n.push(Le[t][a])}e.push(n)})),Qe(),Ie(e,!1)}}function on(){Pe={check:0}}function un(t){if(0===Pe.check){var e=Pe.check;e=An.sequence>=128?1:e,e=s()>72e5?2:e,(e=t>10485760?2:e)!==Pe.check&&cn(e)}}function cn(t){Pe.check=t,Mn(),ca()}function sn(){0!==Pe.check&&rn(35)}function ln(){Pe=null}var hn=null,fn=null;function dn(){hn={},fn={}}function pn(){hn={},fn={}}function gn(t,e){e&&(e="".concat(e),t in hn||(hn[t]=[]),hn[t].indexOf(e)<0&&(hn[t].push(e),t in fn||(fn[t]=[]),fn[t].push(e),hn[t].length>128&&cn(5)))}function vn(){rn(1)}function mn(){fn={}}var yn=null,bn=[],wn=null;function kn(){wn=null;var t,e=navigator&&"userAgent"in navigator?navigator.userAgent:"",n=document&&document.title?document.title:"",a=function(){var t={session:Sn(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=Dn("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-jn(n[1])<18e5&&(t.session=n[0],t.count=jn(n[2])+1,t.upgrade=jn(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),r=Cn(),i=o.projectId||function(t,e){void 0===e&&(e=null);for(var n,a=5381,r=a,i=0;i<t.length;i+=2)a=(a<<5)+a^t.charCodeAt(i),i+1<t.length&&(r=(r<<5)+r^t.charCodeAt(i+1));return n=Math.abs(a+11579*r),(e?n%Math.pow(2,e):n).toString(36)}(location.host);yn={projectId:i,userId:r.id,sessionId:a.session,pageNum:a.count},o.lean=o.track&&null!==a.upgrade?0===a.upgrade:o.lean,o.upload=o.track&&"string"==typeof o.upload&&a.upload&&a.upload.length>"https://".length?a.upload:o.upload,gn(0,e),gn(3,n),gn(1,m(location.href)),gn(2,document.referrer),gn(15,function(){var t=Sn();if(o.track&&Nn(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),gn(16,document.documentElement.lang),gn(17,document.dir),gn(26,"".concat(window.devicePixelRatio)),z(0,a.ts),z(1,0),navigator&&(gn(9,navigator.language),z(33,navigator.hardwareConcurrency),z(32,navigator.maxTouchPoints),z(34,Math.round(navigator.deviceMemory)),(t=navigator.userAgentData)&&t.getHighEntropyValues?t.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;gn(22,t.platform),gn(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){gn(24,t.name+"~"+t.version)})),gn(25,t.model),z(27,t.mobile?1:0)})):gn(22,navigator.platform)),screen&&(z(14,Math.round(screen.width)),z(15,Math.round(screen.height)),z(16,Math.round(screen.colorDepth)));for(var u=0,c=o.cookies;u<c.length;u++){var s=c[u],l=Dn(s);l&&et(s,l)}In(r)}function _n(){wn=null,yn=null}function xn(t,e){void 0===e&&(e=!0);var n=o.lean?0:1;yn&&(n||!1===e)?t(yn,!o.lean):bn.push({callback:t,wait:e})}function On(){return yn?[yn.userId,yn.sessionId,yn.pageNum].join("."):""}function En(){aa()&&(o.track=!0,In(Cn(),1))}function Mn(){Hn("_clsk","",0)}function Tn(){var t=Math.round(Date.now()),e=o.upload&&"string"==typeof o.upload?o.upload.replace("https://",""):"",n=o.lean?0:1;!function(t){bn.length>0&&bn.forEach((function(e){!e.callback||e.wait&&!t||e.callback(yn,!o.lean)}))}(n),Hn("_clsk",[yn.sessionId,t,yn.pageNum,n,e].join("|"),1)}function Nn(t,e){try{return!!t[e]}catch(t){return!1}}function In(t,e){void 0===e&&(e=null),e=null===e?t.consent:e;var n=Math.ceil((Date.now()+31536e6)/864e5);(null===t.expiry||Math.abs(n-t.expiry)>=1||t.consent!==e)&&Hn("_clck",[yn.userId,1,n.toString(36),e].join("|"),365)}function Sn(){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 jn(t,e){return void 0===e&&(e=10),parseInt(t,e)}function Cn(){var t={id:Sn(),expiry:null,consent:0},e=Dn("_clck");if(e&&e.length>0){for(var n=e.split("|"),a=0,r=0,i=document.cookie.split(";");r<i.length;r++){a+="_clck"===i[r].split("=")[0].trim()?1:0}if(1===n.length||a>1){var u="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(u),document.cookie="".concat("_clsk","=").concat(u)}n.length>2&&(t.expiry=jn(n[2],36)),n.length>3&&1===jn(n[3])&&(t.consent=1),o.track=o.track||1===t.consent,t.id=o.track?n[0]:t.id}return t}function Dn(t){if(Nn(document,"cookie")){var e=document.cookie.split(";");if(e)for(var n=0;n<e.length;n++){var a=e[n].split("=");if(a.length>1&&a[0]&&a[0].trim()===t)return a[1]}}return null}function Hn(t,e,n){if(o.track&&(navigator&&navigator.cookieEnabled||Nn(document,"cookie"))){var a=new Date;a.setDate(a.getDate()+n);var r=a?"expires="+a.toUTCString():"",i="".concat(t,"=").concat(e).concat(";").concat(r).concat(";path=/");try{if(null===wn){for(var u=location.hostname?location.hostname.split("."):[],c=u.length-1;c>=0;c--)if(wn=".".concat(u[c]).concat(wn||""),c<u.length-1&&(document.cookie="".concat(i).concat(";").concat("domain=").concat(wn),Dn(t)===e))return;wn=""}}catch(t){wn=""}document.cookie=wn?"".concat(i).concat(";").concat("domain=").concat(wn):i}}var Wn,An=null;function Xn(){var t=yn;An={version:l,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function zn(){An=null}function Yn(t){return An.start=An.start+An.duration,An.duration=s()-An.start,An.sequence++,An.upload=t&&"sendBeacon"in navigator?1:0,An.end=t?1:0,[An.version,An.sequence,An.start,An.duration,An.projectId,An.userId,An.sessionId,An.pageNum,An.upload,An.end]}function qn(){Wn=[]}function Rn(t){if(Wn&&-1===Wn.indexOf(t.message)){var e=o.report;if(e&&e.length>0){var n={v:An.version,p:An.projectId,u:An.userId,s:An.sessionId,n:An.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var a=new XMLHttpRequest;a.open("POST",e,!0),a.send(JSON.stringify(n)),Wn.push(t.message)}}return t}function Pn(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw Rn(t)}var n=performance.now()-e;X(4,n),n>30&&(A(7),z(6,n))}}var Ln=[];function Un(t,e,n,a){void 0===a&&(a=!1),n=Pn(n);try{t[u("addEventListener")](e,n,a),Ln.push({event:e,target:t,listener:n,capture:a})}catch(t){}}function Vn(){for(var t=0,e=Ln;t<e.length;t++){var n=e[t];try{n.target[u("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}Ln=[]}var Jn=null,Bn=null,Zn=null,Gn=0;function Fn(){return!(Gn++>20)||(Re(4,0),!1)}function Kn(){Gn=0,Zn!==$n()&&(ca(),window.setTimeout(Qn,250))}function Qn(){ua(),z(29,1)}function $n(){return location.href?location.href.replace(location.hash,""):location.href}var ta=!1;function ea(){ta=!0,c=performance.now(),Tt(),Vn(),qn(),Zn=$n(),Gn=0,Un(window,"popstate",Kn),null===Jn&&(Jn=history.pushState,history.pushState=function(){Jn.apply(this,arguments),aa()&&Fn()&&Kn()}),null===Bn&&(Bn=history.replaceState,history.replaceState=function(){Bn.apply(this,arguments),aa()&&Fn()&&Kn()})}function na(){Zn=null,Gn=0,qn(),Vn(),Tt(),c=0,ta=!1}function aa(){return ta}function ra(t){if(null===t||ta)return!1;for(var e in t)e in o&&(o[e]=t[e]);return!0}function ia(){ua(),C("clarity","restart")}var oa=[Object.freeze({__proto__:null,start:function(){!function(){z(26,navigator.webdriver?1:0);try{z(31,window.top==window.self?1:2)}catch(t){z(31,0)}}(),Un(window,"error",Xe),Ae={},qe={}},stop:function(){qe={}}}),de,ee,_t];function ua(t){void 0===t&&(t=null),function(){try{return!1===ta&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(ra(t),ea(),dt(),oa.forEach((function(t){return Pn(t.start)()})),null===t&&fa())}function ca(){aa()&&(oa.slice().reverse().forEach((function(t){return Pn(t.stop)()})),pt(),na(),void 0!==la&&(la[ha]=function(){(la[ha].q=la[ha].q||[]).push(arguments),"start"===arguments[0]&&la[ha].q.unshift(la[ha].q.pop())&&fa()}))}var sa=Object.freeze({__proto__:null,consent:En,event:C,hashText:oe,identify:nt,metadata:xn,pause:function(){aa()&&(C("clarity","pause"),null===Et&&(Et=new Promise((function(t){Mt=t}))))},resume:function(){aa()&&(Et&&(Mt(),Et=null,null===Ot&&It()),C("clarity","resume"))},set:et,start:ua,stop:ca,upgrade:Q,version:l}),la=window,ha="clarity";function fa(){if(void 0!==la){if(la[ha]&&la[ha].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=la[ha]&&la[ha].q||[];for(la[ha]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return sa[t].apply(sa,e)},la[ha].v=l;t.length>0;)la[ha].apply(la,t.shift())}}fa()}();
1
+ !function(){"use strict";var t=Object.freeze({__proto__:null,get queue(){return He},get start(){return je},get stop(){return Ae},get track(){return Me}}),e=Object.freeze({__proto__:null,get clone(){return $e},get compute(){return tn},get data(){return Je},get keys(){return Be},get reset(){return en},get start(){return Ke},get stop(){return rn},get trigger(){return Qe},get update(){return nn}}),n=Object.freeze({__proto__:null,get check(){return ln},get compute(){return hn},get data(){return Ve},get start(){return sn},get stop(){return fn},get trigger(){return dn}}),r=Object.freeze({__proto__:null,get compute(){return yn},get data(){return pn},get log(){return bn},get reset(){return wn},get start(){return vn},get stop(){return mn},get updates(){return gn}}),a=Object.freeze({__proto__:null,get callbacks(){return _n},get clear(){return In},get consent(){return Nn},get data(){return kn},get id(){return Tn},get metadata(){return Mn},get save(){return Sn},get start(){return On},get stop(){return En}}),o=Object.freeze({__proto__:null,get data(){return Yn},get envelope(){return Pn},get start(){return qn},get stop(){return Rn}}),i={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};function u(t){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(t):t}var c=0;function s(t){void 0===t&&(t=null);var e=t&&t.timeStamp>0?t.timeStamp:performance.now();return Math.max(Math.round(e-c),0)}var l="0.7.8";var d=/\S/gi,h=!0,f=null,p=null,g=null;function v(t,e,n,r){if(void 0===r&&(r=!1),t)switch(n){case 0:return t;case 1:switch(e){case"*T":case"value":case"placeholder":case"click":return function(t){var e=-1,n=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(e+1,o?u:u+1);s=h&&null!==g?s.match(g)?s:w(s,"▪","▫"):y(s),i.splice(e+1-n,s.length,s),n+=s.length-1}o&&(r=!1,a=!1,e=u)}}return i?i.join(""):t}(t);case"input":case"change":return k(t)}return t;case 2:case 3:switch(e){case"*T":case"data-":return r?b(t):y(t);case"src":case"srcset":case"title":case"alt":return 3===n?"":t;case"value":case"click":case"input":case"change":return k(t);case"placeholder":return y(t)}break;case 4:switch(e){case"*T":case"data-":return r?b(t):y(t);case"value":case"input":case"click":case"change":return Array(5).join("•");case"checksum":return""}break;case 5:switch(e){case"*T":case"data-":return w(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 m(t,e){if(void 0===e&&(e=!1),e)return"".concat("https://").concat("Electron");var n=i.drop;if(n&&n.length>0&&t&&t.indexOf("?")>0){var r=t.split("?"),a=r[0],o=r[1];return a+"?"+o.split("&").map((function(t){return n.some((function(e){return 0===t.indexOf("".concat(e,"="))}))?"".concat(t.split("=")[0],"=").concat("*na*"):t})).join("&")}return t}function b(t){var e=t.trim();if(e.length>0){var n=e[0],r=t.indexOf(n),a=t.substr(0,r),o=t.substr(r+e.length);return"".concat(a).concat(e.length.toString(36)).concat(o)}return t}function y(t){return t.replace(d,"•")}function w(t,e,n){return _(),t?t.replace(p,e).replace(f,n):t}function k(t){for(var e=5*(Math.floor(t.length/5)+1),n="",r=0;r<e;r++)n+=r>0&&r%5==0?" ":"•";return n}function _(){if(h&&null===f)try{f=new RegExp("\\p{N}","gu"),p=new RegExp("\\p{L}","gu"),g=new RegExp("\\p{Sc}","gu")}catch(t){h=!1}}var x=null,O=null,E=!1;function M(){E&&(x={time:s(),event:4,data:{visible:O.visible,docWidth:O.docWidth,docHeight:O.docHeight,screenWidth:O.screenWidth,screenHeight:O.screenHeight,scrollX:O.scrollX,scrollY:O.scrollY,pointerX:O.pointerX,pointerY:O.pointerY,activityTime:O.activityTime}}),O=O||{visible:1,docWidth:0,docHeight:0,screenWidth:0,screenHeight:0,scrollX:0,scrollY:0,pointerX:0,pointerY:0,activityTime:0}}function T(t,e,n){switch(t){case 8:O.docWidth=e,O.docHeight=n;break;case 11:O.screenWidth=e,O.screenHeight=n;break;case 10:O.scrollX=e,O.scrollY=n;break;default:O.pointerX=e,O.pointerY=n}E=!0}function N(t){O.activityTime=t}function I(t,e){O.visible="visible"===e?1:0,O.visible||N(t),E=!0}function S(){E&&cn(4)}var j=Object.freeze({__proto__:null,activity:N,compute:S,reset:M,start:function(){E=!1,M()},get state(){return x},stop:function(){M()},track:T,visibility:I}),H=null;function A(t,e){ir()&&t&&e&&"string"==typeof t&&"string"==typeof e&&t.length<255&&e.length<255&&(H={key:t,value:e},cn(24))}var C,D=null,W=null;function X(t){t in D||(D[t]=0),t in W||(W[t]=0),D[t]++,W[t]++}function z(t,e){null!==e&&(t in D||(D[t]=0),t in W||(W[t]=0),D[t]+=e,W[t]+=e)}function Y(t,e){null!==e&&!1===isNaN(e)&&(t in D||(D[t]=0),(e>D[t]||0===D[t])&&(W[t]=e,D[t]=e))}function q(t,e,n){return window.setTimeout(Vn(t),e,n)}function R(t){return window.clearTimeout(t)}var P=0,L=0,U=null;function V(){U&&R(U),U=q(J,L),P=s()}function J(){var t=s();C={gap:t-P},cn(25),C.gap<3e5?U=q(J,L):rr&&(A("clarity","suspend"),dr(),["mousemove","touchstart"].forEach((function(t){return Bn(document,t,cr)})),["resize","scroll","pageshow"].forEach((function(t){return Bn(window,t,cr)})))}var B=Object.freeze({__proto__:null,get data(){return C},reset:V,start:function(){L=6e4,P=0},stop:function(){R(U),P=0,L=0}}),Z=null;function G(){cn(36)}function F(){Z={}}var K=Object.freeze({__proto__:null,compute:G,get data(){return Z},reset:F,start:function(){Z={}},stop:function(){Z={}},track:function(t,e){if(t in Z){var n=Z[t],r=n[n.length-1];e-r[0]>100?Z[t].push([e,0]):r[1]=e-r[0]}else Z[t]=[[e,0]]}}),Q=null;function $(t){ir()&&i.lean&&(i.lean=!1,Q={key:t},Sn(),i.upgrade&&i.upgrade(t),cn(3))}var tt=Object.freeze({__proto__:null,get data(){return Q},start:function(){!i.lean&&i.upgrade&&i.upgrade("Config"),Q=null},stop:function(){Q=null},upgrade:$});function et(t,e,n,r){return new(n||(n=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 e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,u)}c((r=r.apply(t,e||[])).next())}))}function nt(t,e){var n,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(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(n=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=e.call(t,i)}catch(t){u=[6,t],r=0}finally{n=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,e){it(t,"string"==typeof e?[e]:e)}function ot(t,e,n,r){return void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),et(this,void 0,void 0,(function(){var a,o;return nt(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(w(u.substring(2),"*","*")):w(u,"*","*")),it("userId",[(a=o).userId]),it("userHint",[a.userHint]),it("userType",[lt(t)]),e&&(it("sessionId",[e]),a.sessionId=e),n&&(it("pageId",[n]),a.pageId=n),[2,a]}var u}))}))}function it(t,e){if(ir()&&t&&e&&"string"==typeof t&&t.length<255){for(var n=(t in rt?rt[t]:[]),r=0;r<e.length;r++)"string"==typeof e[r]&&e[r].length<255&&n.push(e[r]);rt[t]=n}}function ut(){cn(34)}function ct(){rt={}}function st(t){return et(this,void 0,void 0,(function(){var e;return nt(this,(function(n){switch(n.label){case 0:return n.trys.push([0,4,,5]),crypto&&t?[4,crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t))]:[3,2];case 1:return e=n.sent(),[2,Array.prototype.map.call(new Uint8Array(e),(function(t){return("00"+t.toString(16)).slice(-2)})).join("")];case 2:return[2,""];case 3:return[3,5];case 4:return n.sent(),[2,""];case 5:return[2]}}))}))}function lt(t){return t&&t.indexOf("@")>0?"email":"string"}var dt="CompressionStream"in window;function ht(t){return et(this,void 0,void 0,(function(){var e,n;return nt(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),dt?(e=new ReadableStream({start:function(e){return et(this,void 0,void 0,(function(){return nt(this,(function(n){return e.enqueue(t),e.close(),[2]}))}))}}).pipeThrough(new TextEncoderStream).pipeThrough(new window.CompressionStream("gzip")),n=Uint8Array.bind,[4,ft(e)]):[3,2];case 1:return[2,new(n.apply(Uint8Array,[void 0,r.sent()]))];case 2:return[3,4];case 3:return r.sent(),[3,4];case 4:return[2,null]}}))}))}function ft(t){return et(this,void 0,void 0,(function(){var e,n,r,a,o;return nt(this,(function(i){switch(i.label){case 0:e=t.getReader(),n=[],r=!1,a=[],i.label=1;case 1:return r?[3,3]:[4,e.read()];case 2:return o=i.sent(),r=o.done,a=o.value,r?[2,n]:(n.push.apply(n,a),[3,1]);case 3:return[2,n]}}))}))}var pt,gt=[j,r,Object.freeze({__proto__:null,compute:ut,get data(){return rt},identify:ot,reset:ct,set:at,start:function(){ct()},stop:function(){ct()}}),n,K,a,o,t,B,tt,e];function vt(){D={},W={},X(5),gt.forEach((function(t){return Vn(t.start)()}))}function mt(){gt.slice().reverse().forEach((function(t){return Vn(t.stop)()})),D={},W={}}function bt(){ut(),S(),yn(),cn(0),G(),hn(),tn()}function yt(t){return et(this,void 0,void 0,(function(){var e,n,r,a,o,i,u,c,l,d,h,f,p;return nt(this,(function(g){switch(e=s(),n=[e,t],t){case 8:r=pt,n.push(r.width),n.push(r.height),T(t,r.width,r.height),He(n);break;case 43:if((a=oe).length>0){for(o=0,i=a;o<i.length;o++)for(u=i[o],c=u.metadata.privacy,l=u.data,d=0,h=["tag","attributes","value"];d<h.length;d++)if(l[f=h[d]])switch(f){case"tag":n.push(u.id),u.parent&&n.push(u.parent),u.previous&&n.push(u.previous),n.push(l[f]);break;case"attributes":for(p in l[f])void 0!==l[f][p]&&n.push(wt(p,l[f][p],c));break;case"value":n.push(v(l[f],l.tag,c))}He(function(t){for(var e=[],n={},r=0,a=null,o=0;o<t.length;o++)if("string"==typeof t[o]){var i=t[o],u=n[i]||-1;u>=0?a?a.push(u):(a=[u],e.push(a),r++):(a=null,e.push(i),n[i]=r++)}else a=null,e.push(t[o]),r++;return e}(n),!0)}}return[2]}))}))}function wt(t,e,n){return"".concat(t,"=").concat(v(e,0===t.indexOf("data-")?"data-":t,n))}function kt(){pt=null}function _t(){var t,e,n,r,a,o,i,u,c,s,l,d,h,f,p,g;kt(),t=document.body,e=document.documentElement,n=t?t.clientWidth:null,r=t?t.scrollWidth:null,a=t?t.offsetWidth:null,o=e?e.clientWidth:null,i=e?e.scrollWidth:null,u=e?e.offsetWidth:null,c=Math.max(n,r,a,o,i,u),s=t?t.clientHeight:null,l=t?t.scrollHeight:null,d=t?t.offsetHeight:null,h=e?e.clientHeight:null,f=e?e.scrollHeight:null,p=e?e.offsetHeight:null,g=Math.max(s,l,d,h,f,p),null!==pt&&c===pt.width&&g===pt.height||null===c||null===g||(pt={width:c,height:g},yt(8))}var xt=[],Ot=null;var Et=Object.freeze({__proto__:null,compute:function(){},data:Ot,log:function(){},observe:function(){},reset:function(){},start:function(){},state:xt,stop:function(){}}),Mt=[],Tt=null,Nt=null,It=null;function St(){Mt=[],Tt=null,Nt=null}function jt(t,e){return void 0===e&&(e=0),et(this,void 0,void 0,(function(){var n,r,a;return nt(this,(function(o){for(n=0,r=Mt;n<r.length;n++)if(r[n].task===t)return[2];return a=new Promise((function(n){Mt[1===e?"unshift":"push"]({task:t,resolve:n,id:Tn()})})),null===Tt&&null===Nt&&Ht(),[2,a]}))}))}function Ht(){var t=Mt.shift();t&&(Tt=t,t.task().then((function(){t.id===Tn()&&(t.resolve(),Tt=null,Ht())})).catch((function(e){t.id===Tn()&&(e&&Ue(0,1,e.name,e.message,e.stack),Tt=null,Ht())})))}var At,Ct=["input","textarea","radio","button","canvas"],Dt=[];function Wt(t){Bn(t,"click",Xt.bind(this,9,t),!0)}function Xt(t,e,n){var r=document.documentElement,a="pageX"in n?Math.round(n.pageX):"clientX"in n?Math.round(n.clientX+r.scrollLeft):null,o="pageY"in n?Math.round(n.pageY):"clientY"in n?Math.round(n.clientY+r.scrollTop):null,i=le(n),u=function(t){for(;t&&t!==document;){if(t.nodeType===Node.ELEMENT_NODE){var e=t;if("A"===e.tagName)return e}t=t.parentNode}return null}(i),c=function(t){var e=null,n=document.documentElement;if("function"==typeof t.getBoundingClientRect){var r=t.getBoundingClientRect();r&&r.width>0&&r.height>0&&(e={x:Math.floor(r.left+("pageXOffset"in window?window.pageXOffset:n.scrollLeft)),y:Math.floor(r.top+("pageYOffset"in window?window.pageYOffset:n.scrollTop)),w:Math.floor(r.width),h:Math.floor(r.height)})}return e}(i);0===n.detail&&c&&(a=Math.round(c.x+c.w/2),o=Math.round(c.y+c.h/2));var l=c?Math.max(Math.floor((a-c.x)/c.w*32767),0):0,d=c?Math.max(Math.floor((o-c.y)/c.h*32767),0):0;null!==a&&null!==o&&(Dt.push({time:s(n),event:t,data:{target:i,x:a,y:o,eX:l,eY:d,button:n.button,reaction:Yt(i),context:qt(u),text:zt(i),link:u?u.href:null,hash:null,trust:n.isTrusted?1:0}}),jt(me.bind(this,t)))}function zt(t){var e=null;if(t){var n=t.textContent||t.value||t.alt;n&&(e=n.replace(/\s+/g," ").trim().substr(0,25))}return e}function Yt(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.tagName.toLowerCase();if(Ct.indexOf(e)>=0)return 0}return 1}function qt(t){if(t&&t.hasAttribute("target"))switch(t.getAttribute("target")){case"_blank":return 1;case"_parent":return 2;case"_top":return 3}return 0}function Rt(){Dt=[]}function Pt(){var t=document.documentElement;At={width:t&&"clientWidth"in t?Math.min(t.clientWidth,window.innerWidth):window.innerWidth,height:t&&"clientHeight"in t?Math.min(t.clientHeight,window.innerHeight):window.innerHeight},me(11)}function Lt(){At=null}var Ut=[],Vt=null;function Jt(t){void 0===t&&(t=null);var e=window,n=document.documentElement,r=t?le(t):n;if(r&&r.nodeType===Node.DOCUMENT_NODE){r=n=r.documentElement}var a=r===n&&"pageXOffset"in e?Math.round(e.pageXOffset):Math.round(r.scrollLeft),o=r===n&&"pageYOffset"in e?Math.round(e.pageYOffset):Math.round(r.scrollTop),i={time:s(t),event:10,data:{target:r,x:a,y:o}};if((null!==t||0!==a||0!==o)&&null!==a&&null!==o){var u=Ut.length,c=u>1?Ut[u-2]:null;c&&function(t,e){var n=t.data.x-e.data.x,r=t.data.y-e.data.y;return n*n+r*r<400&&e.time-t.time<25}(c,i)&&Ut.pop(),Ut.push(i),R(Vt),Vt=q(Bt,500,10)}}function Bt(t){jt(me.bind(this,t))}var Zt,Gt,Ft=[];function Kt(t){Ft.push({time:s(t),event:39,data:{target:le(t)}}),jt(me.bind(this,39))}function Qt(){Ft=[]}function $t(t){Zt={name:t.type},me(26,s(t)),dr()}function te(){Zt=null}function ee(t){void 0===t&&(t=null),Gt={visible:"visibilityState"in document?document.visibilityState:"default"},me(28,s(t))}function ne(){Gt=null}function re(t){!function(t){Bn(t===document?window:t,"scroll",Jt,!0)}(t),t.nodeType===Node.DOCUMENT_NODE&&(Wt(t),function(t){Bn(t,"submit",Kt,!0)}(t))}var ae=Object.freeze({__proto__:null,observe:re,start:function(){be=[],we(),Rt(),Bn(window,"resize",Pt),Pt(),Bn(document,"visibilitychange",ee),ee(),Ut=[],Jt(),Qt(),Bn(window,"pagehide",$t)},stop:function(){be=[],we(),Rt(),Lt(),ne(),R(Vt),Ut=[],Qt(),te()}}),oe=[],ie=1,ue=null;function ce(){return!1}function se(){}function le(t){var e=t.composed&&t.composedPath?t.composedPath():null,n=e&&e.length>0?e[0]:t.target;return n.nodeType===Node.DOCUMENT_NODE?n.documentElement:n}function de(t){var e={id:0,hash:null,privacy:5,node:t};return t&&(e.id=ue.has(t)?ue.get(t):pe(t)),e}function he(){ue=new WeakMap}function fe(t){var e={},n=t.attributes;if(n&&n.length>0)for(var r=0;r<n.length;r++)e[n[r].name]=n[r].value;return e}function pe(t){return null===t?null:ue.has(t)?ue.get(t):(ue.set(t,ie),ie++)}function ge(t,e,n){if(t&&n&&n.tag){var r=pe(t),a=e?ue.get(e):null,o=t.previousSibling?ue.get(t.previousSibling):null;oe.push({id:r,parent:a,previous:o,children:[],data:n,selector:null,hash:null,region:null,metadata:{active:!0,suspend:!1,privacy:5,position:null,fraud:null,size:null}})}}var ve=Object.freeze({__proto__:null,compute:function(){},hashText:se,iframe:ce,metadata:de,offset:function(){return{x:0,y:0}},snapshot:function(){oe=[],function(t){var e=[t];for(;e.length>0;){for(var n=null,r=null,a=null,o=e.shift(),i=o.firstChild,u=o.parentElement?o.parentElement:o.parentNode?o.parentNode:null;i;)e.push(i),i=i.nextSibling;switch(o.nodeType){case Node.DOCUMENT_TYPE_NODE:var c=o;r="*D",n={name:c.name,publicId:c.publicId,systemId:c.systemId};break;case Node.TEXT_NODE:a=o.nodeValue,r=ue.get(u)?"*T":r;break;case Node.ELEMENT_NODE:var s=o;n=fe(s),r=["NOSCRIPT","SCRIPT","STYLE"].indexOf(s.tagName)<0?s.tagName:r}ge(o,u,{tag:r,attributes:n,value:a})}}(document),yt(43)},start:function(){he(),_t(),pe(document.documentElement),re(document)},stop:function(){he(),kt()},target:le,get values(){return oe}});function me(t,e){return void 0===e&&(e=null),et(this,void 0,void 0,(function(){var n,r,a,o,i,u,c,l,d,h,f,p,g,b,y,w,k,_,x,O,E,M,N,S,j,H,A,C,D,W,X;return nt(this,(function(z){switch(n=e||s(),r=[n,t],t){case 13:case 14:case 12:case 15:case 16:case 17:case 18:case 19:case 20:for(a=0,o=xt;a<o.length;a++)W=o[a],(i=de(W.data.target,W.event)).id>0&&((r=[W.time,W.event]).push(i.id),r.push(W.data.x),r.push(W.data.y),He(r),T(W.event,W.data.x,W.data.y));break;case 9:for(u=0,c=Dt;u<c.length;u++)W=c[u],l=de(W.data.target,W.event,W.data.text),r=[W.time,W.event],d=l.hash?l.hash.join("."):"",r.push(l.id),r.push(W.data.x),r.push(W.data.y),r.push(W.data.eX),r.push(W.data.eY),r.push(W.data.button),r.push(W.data.reaction),r.push(W.data.context),r.push(v(W.data.text,"click",l.privacy)),r.push(m(W.data.link)),r.push(d),r.push(W.data.trust),He(r),ke(W.time,W.event,d,W.data.x,W.data.y,W.data.reaction,W.data.context);Rt();break;case 38:for(h=0,f=xt;h<f.length;h++)W=f[h],r=[W.time,W.event],(A=de(W.data.target,W.event)).id>0&&(r.push(A.id),r.push(W.data.action),He(r));break;case 11:p=At,r.push(p.width),r.push(p.height),T(t,p.width,p.height),Lt(),He(r);break;case 26:g=Zt,r.push(g.name),te(),He(r);break;case 27:for(b=0,y=xt;b<y.length;b++)W=y[b],w=de(W.data.target,W.event,W.data.value),(r=[W.time,W.event]).push(w.id),r.push(v(W.data.value,"input",w.privacy)),He(r);break;case 21:(k=Ot)&&(_=de(k.start),x=de(k.end),r.push(_.id),r.push(k.startOffset),r.push(x.id),r.push(k.endOffset),He(r));break;case 10:for(O=0,E=Ut;O<E.length;O++)W=E[O],(M=de(W.data.target,W.event)).id>0&&((r=[W.time,W.event]).push(M.id),r.push(W.data.x),r.push(W.data.y),He(r),T(W.event,W.data.x,W.data.y));Ut=[];break;case 42:for(N=0,S=xt;N<S.length;N++)W=S[N],r=[W.time,W.event],(A=de(W.data.target,W.event)).id>0&&((r=[W.time,W.event]).push(A.id),r.push(W.data.type),r.push(v(W.data.value,"change",A.privacy)),r.push(v(W.data.checksum,"checksum",A.privacy)),He(r));break;case 39:for(j=0,H=Ft;j<H.length;j++)W=H[j],r=[W.time,W.event],(A=de(W.data.target,W.event)).id>0&&(r.push(A.id),He(r));Qt();break;case 22:for(C=0,D=ye;C<D.length;C++)W=D[C],(r=[W.time,W.event]).push(W.data.type),r.push(W.data.hash),r.push(W.data.x),r.push(W.data.y),r.push(W.data.reaction),r.push(W.data.context),He(r,!1);we();break;case 28:X=Gt,r.push(X.visible),He(r),I(n,X.visible),ne()}return[2]}))}))}var be=[],ye=[];function we(){ye=[]}function ke(t,e,n,r,a,o,i){void 0===o&&(o=1),void 0===i&&(i=0),be.push({time:t,event:22,data:{type:e,hash:n,x:r,y:a,reaction:o,context:i}}),T(e,r,a)}var _e,xe,Oe,Ee,Me,Te=0,Ne=0,Ie=null,Se=0;function je(){Ee=!0,Te=0,Ne=0,Se=0,_e=[],xe=[],Oe={},Me=null}function He(t,e){if(void 0===e&&(e=!0),Ee){var n=s(),r=t.length>1?t[1]:null,a=JSON.stringify(t);switch(r){case 5:Te+=a.length;case 37:case 6:case 43:Ne+=a.length,_e.push(a);break;default:xe.push(a)}X(25);var o=function(){var t=!1===i.lean&&Te>0?100:Yn.sequence*i.delay;return"string"==typeof i.upload?Math.max(Math.min(t,3e4),100):i.delay}();n-Se>2*o&&(R(Ie),Ie=null),e&&null===Ie&&(25!==r&&V(),Ie=q(Ce,o),Se=n,ln(Ne))}}function Ae(){R(Ie),Ce(!0),Te=0,Ne=0,Se=0,_e=[],xe=[],Oe={},Me=null,Ee=!1}function Ce(t){return void 0===t&&(t=!1),et(this,void 0,void 0,(function(){var e,n,r,a,o,u,c,s;return nt(this,(function(l){switch(l.label){case 0:return Ie=null,(e=!1===i.lean&&Ne>0&&(Ne<1048576||Yn.sequence>0))&&Y(1,1),function(){var t=[];ye=[];for(var e=Yn.start+Yn.duration,n=Math.max(e-2e3,0),r=0,a=be;r<a.length;r++){var o=a[r];o.time>=n&&(o.time<=e&&ye.push(o),t.push(o))}be=t,me(22)}(),bt(),n=!0===t,r=JSON.stringify(Pn(n)),a="[".concat(xe.join(),"]"),o=e?"[".concat(_e.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:o}),n?(s=null,[3,3]):[3,1];case 1:return[4,ht(u)];case 2:s=l.sent(),l.label=3;case 3:return z(2,(c=s)?c.length:u.length),De(u,c,Yn.sequence,n),xe=[],e&&(_e=[],Ne=0,Te=0),[2]}}))}))}function De(t,e,n,r){if(void 0===r&&(r=!1),"string"==typeof i.upload){var a=i.upload,o=!1;if(r&&"sendBeacon"in navigator)try{(o=navigator.sendBeacon.bind(navigator)(a,t))&&Xe(n)}catch(t){}if(!1===o){n in Oe?Oe[n].attempts++:Oe[n]={data:t,attempts:1};var u=new XMLHttpRequest;u.open("POST",a,!0),u.timeout=15e3,u.ontimeout=function(){Un(new Error("".concat("Timeout"," : ").concat(a)))},null!==n&&(u.onreadystatechange=function(){Vn(We)(u,n)}),u.withCredentials=!0,e?(u.setRequestHeader("Accept","application/x-clarity-gzip"),u.send(e)):u.send(t)}}else if(i.upload){(0,i.upload)(t),Xe(n)}}function We(t,e){var n=Oe[e];t&&4===t.readyState&&n&&((t.status<200||t.status>208)&&n.attempts<=1?t.status>=400&&t.status<500?dn(6):(0===t.status&&(i.upload=i.fallback?i.fallback:i.upload),De(n.data,null,e)):(Me={sequence:e,attempts:n.attempts,status:t.status},n.attempts>1&&cn(2),200===t.status&&t.responseText&&function(t){for(var e=t&&t.length>0?t.split("\n"):[],n=0,r=e;n<r.length;n++){var a=r[n],o=a&&a.length>0?a.split(/ (.*)/):[""];switch(o[0]){case"END":dn(6);break;case"UPGRADE":$("Auto");break;case"ACTION":i.action&&o.length>1&&i.action(o[1]);break;case"EXTRACT":o.length>1&&Qe(o[1])}}}(t.responseText),0===t.status&&(De(n.data,null,e,!0),dn(3)),t.status>=200&&t.status<=208&&Xe(e),delete Oe[e]))}function Xe(t){1===t&&Sn()}var ze,Ye={};function qe(t){var e=t.error||t;return e.message in Ye||(Ye[e.message]=0),Ye[e.message]++>=5||e&&e.message&&(ze={message:e.message,line:t.lineno,column:t.colno,stack:e.stack,source:t.filename},Re(31)),!0}function Re(t){return et(this,void 0,void 0,(function(){var e;return nt(this,(function(n){switch(e=[s(),t],t){case 31:e.push(ze.message),e.push(ze.line),e.push(ze.column),e.push(ze.stack),e.push(m(ze.source)),He(e);break;case 33:Pe&&(e.push(Pe.code),e.push(Pe.name),e.push(Pe.message),e.push(Pe.stack),e.push(Pe.severity),He(e,!1))}return[2]}))}))}var Pe,Le={};function Ue(t,e,n,r,a){void 0===n&&(n=null),void 0===r&&(r=null),void 0===a&&(a=null);var o=n?"".concat(n,"|").concat(r):"";t in Le&&Le[t].indexOf(o)>=0||(Pe={code:t,name:n,message:r,stack:a,severity:e},t in Le?Le[t].push(o):Le[t]=[o],Re(33))}var Ve,Je={},Be=new Set,Ze={},Ge={},Fe={};function Ke(){en()}function Qe(t){try{var e=t&&t.length>0?t.split(/ (.*)/):[""],n=parseInt(e[0]),r=e.length>1?JSON.parse(e[1]):{};for(var a in Ze[n]={},Ge[n]={},Fe[n]={},r){var o=parseInt(a),i=r[a],u=2;switch(i.startsWith("~")?u=0:i.startsWith("!")&&(u=4),u){case 0:var c=i.substring(1,i.length);Ze[n][o]=an(c);break;case 2:Ge[n][o]=i;break;case 4:var s=i.substring(1,i.length);Fe[n][o]=s}}}catch(t){Ue(8,1,t?t.name:null)}}function $e(t){return JSON.parse(JSON.stringify(t))}function tn(){try{for(var t in Ze){var e=parseInt(t),n=Ze[e];for(var r in n){var a=parseInt(r),o=(f=on($e(n[a])))?JSON.stringify(f).substring(0,1e4):f;o&&nn(e,a,o)}var i=Ge[e];for(var u in i){var c=parseInt(u),s=document.querySelectorAll(i[c]);if(s)nn(e,c,Array.from(s).map((function(t){return t.textContent})).join("<SEP>").substring(0,1e4))}var l=Fe[e];for(var d in l){var h=parseInt(d);nn(e,h,(void l[h]).trim().substring(0,1e4))}}Be.size>0&&cn(40)}catch(t){Ue(5,1,t?t.name:null)}var f}function en(){Be.clear()}function nn(t,e,n){var r,a=!1;t in Je||(Je[t]={},a=!0),r=Fe[t],0==Object.keys(r).length||e in Je[t]&&Je[t][e]==n||(a=!0),Je[t][e]=n,a&&Be.add(t)}function rn(){en()}function an(t){for(var e=[],n=t.split(".");n.length>0;){var r=n.shift(),a=r.indexOf("["),o=r.indexOf("{"),i=r.indexOf("}");e.push({name:a>0?r.substring(0,a):o>0?r.substring(0,o):r,type:a>0?1:o>0?2:3,condition:o>0?r.substring(o+1,i):null})}return e}function on(t,e){if(void 0===e&&(e=window),0==t.length)return e;var n,r=t.shift();if(e&&e[r.name]){var a=e[r.name];if(1!==r.type&&un(a,r.condition))n=on(t,a);else if(Array.isArray(a)){for(var o=[],i=0,u=a;i<u.length;i++){var c=u[i];if(un(c,r.condition)){var s=on(t,c);s&&o.push(s)}}n=o}return n}return null}function un(t,e){if(e){var n=e.split(":");return n.length>1?t[n[0]]==n[1]:t[n[0]]}return!0}function cn(t){var e=[s(),t];switch(t){case 4:var n=x;n&&((e=[n.time,n.event]).push(n.data.visible),e.push(n.data.docWidth),e.push(n.data.docHeight),e.push(n.data.screenWidth),e.push(n.data.screenHeight),e.push(n.data.scrollX),e.push(n.data.scrollY),e.push(n.data.pointerX),e.push(n.data.pointerY),e.push(n.data.activityTime),He(e,!1)),M();break;case 25:e.push(C.gap),He(e);break;case 35:e.push(Ve.check),He(e,!1);break;case 3:e.push(Q.key),He(e);break;case 2:e.push(Me.sequence),e.push(Me.attempts),e.push(Me.status),He(e,!1);break;case 24:e.push(H.key),e.push(H.value),He(e);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];e.push(i),e.push(rt[i])}ct(),He(e,!1)}break;case 0:var u=Object.keys(W);if(u.length>0){for(var c=0,l=u;c<l.length;c++){var d=l[c],h=parseInt(d,10);e.push(h),e.push(Math.round(W[d]))}W={},He(e,!1)}break;case 1:var f=Object.keys(gn);if(f.length>0){for(var p=0,g=f;p<g.length;p++){var v=g[p];h=parseInt(v,10);e.push(h),e.push(gn[v])}wn(),He(e,!1)}break;case 36:var m=Object.keys(Z);if(m.length>0){for(var b=0,y=m;b<y.length;b++){var w=y[b];h=parseInt(w,10);e.push(h),e.push([].concat.apply([],Z[w]))}F(),He(e,!1)}break;case 40:Be.forEach((function(t){e.push(t);var n=[];for(var r in Je[t]){var a=parseInt(r,10);n.push(a),n.push(Je[t][r])}e.push(n)})),en(),He(e,!1)}}function sn(){Ve={check:0}}function ln(t){if(0===Ve.check){var e=Ve.check;e=Yn.sequence>=128?1:e,e=Yn.pageNum>=128?7:e,e=s()>72e5?2:e,(e=t>10485760?2:e)!==Ve.check&&dn(e)}}function dn(t){Ve.check=t,In(),dr()}function hn(){0!==Ve.check&&cn(35)}function fn(){Ve=null}var pn=null,gn=null;function vn(){pn={},gn={}}function mn(){pn={},gn={}}function bn(t,e){e&&(e="".concat(e),t in pn||(pn[t]=[]),pn[t].indexOf(e)<0&&(pn[t].push(e),t in gn||(gn[t]=[]),gn[t].push(e),pn[t].length>128&&dn(5)))}function yn(){cn(1)}function wn(){gn={}}var kn=null,_n=[],xn=null;function On(){xn=null;var t,e=navigator&&"userAgent"in navigator?navigator.userAgent:"",n=document&&document.title?document.title:"",r=e.indexOf("Electron")>0?1:0,a=function(){var t={session:An(),ts:Math.round(Date.now()),count:1,upgrade:null,upload:""},e=Wn("_clsk");if(e){var n=e.split("|");n.length>=5&&t.ts-Cn(n[1])<18e5&&(t.session=n[0],t.count=Cn(n[2])+1,t.upgrade=Cn(n[3]),t.upload=n.length>=6?"".concat("https://").concat(n[5],"/").concat(n[4]):"".concat("https://").concat(n[4]))}return t}(),o=Dn(),u=i.projectId||function(t,e){void 0===e&&(e=null);for(var n,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 n=Math.abs(r+11579*a),(e?n%Math.pow(2,e):n).toString(36)}(location.host);kn={projectId:u,userId:o.id,sessionId:a.session,pageNum:a.count},i.lean=i.track&&null!==a.upgrade?0===a.upgrade:i.lean,i.upload=i.track&&"string"==typeof i.upload&&a.upload&&a.upload.length>"https://".length?a.upload:i.upload,bn(0,e),bn(3,n),bn(1,m(location.href,!!r)),bn(2,document.referrer),bn(15,function(){var t=An();if(i.track&&jn(window,"sessionStorage")){var e=sessionStorage.getItem("_cltk");t=e||t,sessionStorage.setItem("_cltk",t)}return t}()),bn(16,document.documentElement.lang),bn(17,document.dir),bn(26,"".concat(window.devicePixelRatio)),bn(28,o.dob.toString()),bn(29,o.version.toString()),Y(0,a.ts),Y(1,0),Y(35,r),navigator&&(bn(9,navigator.language),Y(33,navigator.hardwareConcurrency),Y(32,navigator.maxTouchPoints),Y(34,Math.round(navigator.deviceMemory)),(t=navigator.userAgentData)&&t.getHighEntropyValues?t.getHighEntropyValues(["model","platform","platformVersion","uaFullVersion"]).then((function(t){var e;bn(22,t.platform),bn(23,t.platformVersion),null===(e=t.brands)||void 0===e||e.forEach((function(t){bn(24,t.name+"~"+t.version)})),bn(25,t.model),Y(27,t.mobile?1:0)})):bn(22,navigator.platform)),screen&&(Y(14,Math.round(screen.width)),Y(15,Math.round(screen.height)),Y(16,Math.round(screen.colorDepth)));for(var c=0,s=i.cookies;c<s.length;c++){var l=s[c],d=Wn(l);d&&at(l,d)}Hn(o)}function En(){xn=null,kn=null}function Mn(t,e){void 0===e&&(e=!0);var n=i.lean?0:1;kn&&(n||!1===e)?t(kn,!i.lean):_n.push({callback:t,wait:e})}function Tn(){return kn?[kn.userId,kn.sessionId,kn.pageNum].join("."):""}function Nn(){ir()&&(i.track=!0,Hn(Dn(),1))}function In(){Xn("_clsk","",0)}function Sn(){var t=Math.round(Date.now()),e=i.upload&&"string"==typeof i.upload?i.upload.replace("https://",""):"",n=i.lean?0:1;!function(t){_n.length>0&&_n.forEach((function(e){!e.callback||e.wait&&!t||e.callback(kn,!i.lean)}))}(n),Xn("_clsk",[kn.sessionId,t,kn.pageNum,n,e].join("|"),1)}function jn(t,e){try{return!!t[e]}catch(t){return!1}}function Hn(t,e){void 0===e&&(e=null),e=null===e?t.consent:e;var n=Math.ceil((Date.now()+31536e6)/864e5),r=0===t.dob?null===i.dob?0:i.dob:t.dob;(null===t.expiry||Math.abs(n-t.expiry)>=1||t.consent!==e||t.dob!==r)&&Xn("_clck",[kn.userId,2,n.toString(36),e,r].join("|"),365)}function An(){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 Cn(t,e){return void 0===e&&(e=10),parseInt(t,e)}function Dn(){var t={id:An(),version:0,expiry:null,consent:0,dob:0},e=Wn("_clck");if(e&&e.length>0){for(var n=e.split("|"),r=0,a=0,o=document.cookie.split(";");a<o.length;a++){r+="_clck"===o[a].split("=")[0].trim()?1:0}if(1===n.length||r>1){var u="".concat(";").concat("expires=").concat(new Date(0).toUTCString()).concat(";path=/");document.cookie="".concat("_clck","=").concat(u),document.cookie="".concat("_clsk","=").concat(u)}n.length>1&&(t.version=Cn(n[1])),n.length>2&&(t.expiry=Cn(n[2],36)),n.length>3&&1===Cn(n[3])&&(t.consent=1),n.length>4&&Cn(n[1])>1&&(t.dob=Cn(n[4])),i.track=i.track||1===t.consent,t.id=i.track?n[0]:t.id}return t}function Wn(t){if(jn(document,"cookie")){var e=document.cookie.split(";");if(e)for(var n=0;n<e.length;n++){var r=e[n].split("=");if(r.length>1&&r[0]&&r[0].trim()===t)return r[1]}}return null}function Xn(t,e,n){if(i.track&&(navigator&&navigator.cookieEnabled||jn(document,"cookie"))){var r=new Date;r.setDate(r.getDate()+n);var a=r?"expires="+r.toUTCString():"",o="".concat(t,"=").concat(e).concat(";").concat(a).concat(";path=/");try{if(null===xn){for(var u=location.hostname?location.hostname.split("."):[],c=u.length-1;c>=0;c--)if(xn=".".concat(u[c]).concat(xn||""),c<u.length-1&&(document.cookie="".concat(o).concat(";").concat("domain=").concat(xn),Wn(t)===e))return;xn=""}}catch(t){xn=""}document.cookie=xn?"".concat(o).concat(";").concat("domain=").concat(xn):o}}var zn,Yn=null;function qn(){var t=kn;Yn={version:l,sequence:0,start:0,duration:0,projectId:t.projectId,userId:t.userId,sessionId:t.sessionId,pageNum:t.pageNum,upload:0,end:0}}function Rn(){Yn=null}function Pn(t){return Yn.start=Yn.start+Yn.duration,Yn.duration=s()-Yn.start,Yn.sequence++,Yn.upload=t&&"sendBeacon"in navigator?1:0,Yn.end=t?1:0,[Yn.version,Yn.sequence,Yn.start,Yn.duration,Yn.projectId,Yn.userId,Yn.sessionId,Yn.pageNum,Yn.upload,Yn.end]}function Ln(){zn=[]}function Un(t){if(zn&&-1===zn.indexOf(t.message)){var e=i.report;if(e&&e.length>0){var n={v:Yn.version,p:Yn.projectId,u:Yn.userId,s:Yn.sessionId,n:Yn.pageNum};t.message&&(n.m=t.message),t.stack&&(n.e=t.stack);var r=new XMLHttpRequest;r.open("POST",e,!0),r.send(JSON.stringify(n)),zn.push(t.message)}}return t}function Vn(t){return function(){var e=performance.now();try{t.apply(this,arguments)}catch(t){throw Un(t)}var n=performance.now()-e;z(4,n),n>30&&(X(7),Y(6,n))}}var Jn=[];function Bn(t,e,n,r){void 0===r&&(r=!1),n=Vn(n);try{t[u("addEventListener")](e,n,r),Jn.push({event:e,target:t,listener:n,capture:r})}catch(t){}}function Zn(){for(var t=0,e=Jn;t<e.length;t++){var n=e[t];try{n.target[u("removeEventListener")](n.event,n.listener,n.capture)}catch(t){}}Jn=[]}var Gn=null,Fn=null,Kn=null,Qn=0;function $n(){return!(Qn++>20)||(Ue(4,0),!1)}function tr(){Qn=0,Kn!==nr()&&(dr(),window.setTimeout(er,250))}function er(){lr(),Y(29,1)}function nr(){return location.href?location.href.replace(location.hash,""):location.href}var rr=!1;function ar(){rr=!0,c=performance.now(),St(),Zn(),Ln(),Kn=nr(),Qn=0,Bn(window,"popstate",tr),null===Gn&&(Gn=history.pushState,history.pushState=function(){Gn.apply(this,arguments),ir()&&$n()&&tr()}),null===Fn&&(Fn=history.replaceState,history.replaceState=function(){Fn.apply(this,arguments),ir()&&$n()&&tr()})}function or(){Kn=null,Qn=0,Ln(),Zn(),St(),c=0,rr=!1}function ir(){return rr}function ur(t){if(null===t||rr)return!1;for(var e in t)e in i&&(i[e]=t[e]);return!0}function cr(){lr(),A("clarity","restart")}var sr=[Object.freeze({__proto__:null,start:function(){!function(){Y(26,navigator.webdriver?1:0);try{Y(31,window.top==window.self?1:2)}catch(t){Y(31,0)}}(),Bn(window,"error",qe),Ye={},Le={}},stop:function(){Le={}}}),ve,ae,Et];function lr(t){void 0===t&&(t=null),function(){try{return!1===rr&&"undefined"!=typeof Promise&&window.MutationObserver&&document.createTreeWalker&&"now"in Date&&"now"in performance&&"undefined"!=typeof WeakMap}catch(t){return!1}}()&&(ur(t),ar(),vt(),sr.forEach((function(t){return Vn(t.start)()})),null===t&&gr())}function dr(){ir()&&(sr.slice().reverse().forEach((function(t){return Vn(t.stop)()})),mt(),or(),void 0!==fr&&(fr[pr]=function(){(fr[pr].q=fr[pr].q||[]).push(arguments),"start"===arguments[0]&&fr[pr].q.unshift(fr[pr].q.pop())&&gr()}))}var hr=Object.freeze({__proto__:null,consent:Nn,event:A,hashText:se,identify:ot,metadata:Mn,pause:function(){ir()&&(A("clarity","pause"),null===Nt&&(Nt=new Promise((function(t){It=t}))))},resume:function(){ir()&&(Nt&&(It(),Nt=null,null===Tt&&Ht()),A("clarity","resume"))},set:at,start:lr,stop:dr,upgrade:$,version:l}),fr=window,pr="clarity";function gr(){if(void 0!==fr){if(fr[pr]&&fr[pr].v)return console.warn("Error CL001: Multiple Clarity tags detected.");var t=fr[pr]&&fr[pr].q||[];for(fr[pr]=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return hr[t].apply(hr,e)},fr[pr].v=l;t.length>0;)fr[pr].apply(fr,t.shift())}}gr()}();
package/build/clarity.js CHANGED
@@ -128,7 +128,8 @@ var config$1 = {
128
128
  upload: null,
129
129
  fallback: null,
130
130
  upgrade: null,
131
- action: null
131
+ action: null,
132
+ dob: null
132
133
  };
133
134
 
134
135
  function api(method) {
@@ -151,7 +152,7 @@ function stop$D() {
151
152
  startTime = 0;
152
153
  }
153
154
 
154
- var version$1 = "0.7.7";
155
+ var version$1 = "0.7.8";
155
156
 
156
157
  // tslint:disable: no-bitwise
157
158
  function hash (input, precision) {
@@ -191,7 +192,7 @@ function text$1(value, hint, privacy, mangle) {
191
192
  case "value":
192
193
  case "placeholder":
193
194
  case "click":
194
- return redact(value);
195
+ return redact$1(value);
195
196
  case "input":
196
197
  case "change":
197
198
  return mangleToken(value);
@@ -235,7 +236,7 @@ function text$1(value, hint, privacy, mangle) {
235
236
  switch (hint) {
236
237
  case "*T" /* Layout.Constant.TextTag */:
237
238
  case "data-" /* Layout.Constant.DataAttribute */:
238
- return scrub(value);
239
+ return scrub(value, "\u25AA" /* Data.Constant.Letter */, "\u25AB" /* Data.Constant.Digit */);
239
240
  case "value":
240
241
  case "input":
241
242
  case "click":
@@ -253,7 +254,12 @@ function text$1(value, hint, privacy, mangle) {
253
254
  }
254
255
  return value;
255
256
  }
256
- function url$1(input) {
257
+ function url$1(input, electron) {
258
+ if (electron === void 0) { electron = false; }
259
+ // Replace the URL for Electron apps so we don't send back file:/// URL
260
+ if (electron) {
261
+ return "".concat("https://" /* Data.Constant.HTTPS */).concat("Electron" /* Data.Constant.Electron */);
262
+ }
257
263
  var drop = config$1.drop;
258
264
  if (drop && drop.length > 0 && input && input.indexOf("?") > 0) {
259
265
  var _a = input.split("?"), path = _a[0], query = _a[1];
@@ -276,9 +282,9 @@ function mangleText(value) {
276
282
  function mask(value) {
277
283
  return value.replace(catchallRegex, "\u2022" /* Data.Constant.Mask */);
278
284
  }
279
- function scrub(value) {
285
+ function scrub(value, letter, digit) {
280
286
  regex(); // Initialize regular expressions
281
- return value.replace(letterRegex, "\u25AA" /* Data.Constant.Letter */).replace(digitRegex, "\u25AB" /* Data.Constant.Digit */);
287
+ return value ? value.replace(letterRegex, letter).replace(digitRegex, digit) : value;
282
288
  }
283
289
  function mangleToken(value) {
284
290
  var length = ((Math.floor(value.length / 5 /* Data.Setting.WordLength */) + 1) * 5 /* Data.Setting.WordLength */);
@@ -302,7 +308,7 @@ function regex() {
302
308
  }
303
309
  }
304
310
  }
305
- function redact(value) {
311
+ function redact$1(value) {
306
312
  var spaceIndex = -1;
307
313
  var gap = 0;
308
314
  var hasDigit = false;
@@ -327,7 +333,7 @@ function redact(value) {
327
333
  // Check if unicode regex is supported, otherwise fallback to calling mask function on this token
328
334
  if (unicodeRegex && currencyRegex !== null) {
329
335
  // Do not redact information if the token contains a currency symbol
330
- token = token.match(currencyRegex) ? token : token.replace(letterRegex, "\u25AA" /* Data.Constant.Letter */).replace(digitRegex, "\u25AB" /* Data.Constant.Digit */);
336
+ token = token.match(currencyRegex) ? token : scrub(token, "\u25AA" /* Data.Constant.Letter */, "\u25AB" /* Data.Constant.Digit */);
331
337
  }
332
338
  else {
333
339
  token = mask(token);
@@ -628,57 +634,6 @@ var upgrade$1 = /*#__PURE__*/Object.freeze({
628
634
  upgrade: upgrade
629
635
  });
630
636
 
631
- var data$e = null;
632
- function start$A() {
633
- reset$m();
634
- }
635
- function set(variable, value) {
636
- var values = typeof value === "string" /* Constant.String */ ? [value] : value;
637
- log$2(variable, values);
638
- }
639
- function identify(userId, sessionId, pageId) {
640
- if (sessionId === void 0) { sessionId = null; }
641
- if (pageId === void 0) { pageId = null; }
642
- log$2("userId" /* Constant.UserId */, [userId]);
643
- log$2("sessionId" /* Constant.SessionId */, [sessionId]);
644
- log$2("pageId" /* Constant.PageId */, [pageId]);
645
- }
646
- function log$2(variable, value) {
647
- if (active() &&
648
- variable &&
649
- value &&
650
- typeof variable === "string" /* Constant.String */ &&
651
- variable.length < 255) {
652
- var validValues = variable in data$e ? data$e[variable] : [];
653
- for (var i = 0; i < value.length; i++) {
654
- if (typeof value[i] === "string" /* Constant.String */ && value[i].length < 255) {
655
- validValues.push(value[i]);
656
- }
657
- }
658
- data$e[variable] = validValues;
659
- }
660
- }
661
- function compute$9() {
662
- encode$1(34 /* Event.Variable */);
663
- }
664
- function reset$m() {
665
- data$e = {};
666
- }
667
- function stop$x() {
668
- reset$m();
669
- }
670
-
671
- var variable = /*#__PURE__*/Object.freeze({
672
- __proto__: null,
673
- compute: compute$9,
674
- get data () { return data$e; },
675
- identify: identify,
676
- reset: reset$m,
677
- set: set,
678
- start: start$A,
679
- stop: stop$x
680
- });
681
-
682
637
  /******************************************************************************
683
638
  Copyright (c) Microsoft Corporation.
684
639
 
@@ -732,6 +687,113 @@ function __generator(thisArg, body) {
732
687
  }
733
688
  }
734
689
 
690
+ var data$e = null;
691
+ function start$A() {
692
+ reset$m();
693
+ }
694
+ function set(variable, value) {
695
+ var values = typeof value === "string" /* Constant.String */ ? [value] : value;
696
+ log$2(variable, values);
697
+ }
698
+ function identify(userId, sessionId, pageId, userHint) {
699
+ if (sessionId === void 0) { sessionId = null; }
700
+ if (pageId === void 0) { pageId = null; }
701
+ if (userHint === void 0) { userHint = null; }
702
+ return __awaiter(this, void 0, void 0, function () {
703
+ var output;
704
+ var _a;
705
+ return __generator(this, function (_b) {
706
+ switch (_b.label) {
707
+ case 0:
708
+ _a = {};
709
+ return [4 /*yield*/, sha256(userId)];
710
+ case 1:
711
+ output = (_a.userId = _b.sent(), _a.userHint = userHint || redact(userId), _a);
712
+ // By default, hash custom userId using SHA256 algorithm on the client to preserve privacy
713
+ log$2("userId" /* Constant.UserId */, [output.userId]);
714
+ // Optional non-identifying name for the user
715
+ // If name is not explicitly provided, we automatically generate a redacted version of the userId
716
+ log$2("userHint" /* Constant.UserHint */, [output.userHint]);
717
+ log$2("userType" /* Constant.UserType */, [detect(userId)]);
718
+ // Log sessionId and pageId if provided
719
+ if (sessionId) {
720
+ log$2("sessionId" /* Constant.SessionId */, [sessionId]);
721
+ output.sessionId = sessionId;
722
+ }
723
+ if (pageId) {
724
+ log$2("pageId" /* Constant.PageId */, [pageId]);
725
+ output.pageId = pageId;
726
+ }
727
+ return [2 /*return*/, output];
728
+ }
729
+ });
730
+ });
731
+ }
732
+ function log$2(variable, value) {
733
+ if (active() &&
734
+ variable &&
735
+ value &&
736
+ typeof variable === "string" /* Constant.String */ &&
737
+ variable.length < 255) {
738
+ var validValues = variable in data$e ? data$e[variable] : [];
739
+ for (var i = 0; i < value.length; i++) {
740
+ if (typeof value[i] === "string" /* Constant.String */ && value[i].length < 255) {
741
+ validValues.push(value[i]);
742
+ }
743
+ }
744
+ data$e[variable] = validValues;
745
+ }
746
+ }
747
+ function compute$9() {
748
+ encode$1(34 /* Event.Variable */);
749
+ }
750
+ function reset$m() {
751
+ data$e = {};
752
+ }
753
+ function stop$x() {
754
+ reset$m();
755
+ }
756
+ function redact(input) {
757
+ return input && input.length >= 5 /* Setting.WordLength */ ?
758
+ "".concat(input.substring(0, 2)).concat(scrub(input.substring(2), "*" /* Constant.Asterix */, "*" /* Constant.Asterix */)) : scrub(input, "*" /* Constant.Asterix */, "*" /* Constant.Asterix */);
759
+ }
760
+ function sha256(input) {
761
+ return __awaiter(this, void 0, void 0, function () {
762
+ var buffer;
763
+ return __generator(this, function (_b) {
764
+ switch (_b.label) {
765
+ case 0:
766
+ _b.trys.push([0, 4, , 5]);
767
+ if (!(crypto && input)) return [3 /*break*/, 2];
768
+ return [4 /*yield*/, crypto.subtle.digest("SHA-256" /* Constant.SHA256 */, new TextEncoder().encode(input))];
769
+ case 1:
770
+ buffer = _b.sent();
771
+ return [2 /*return*/, Array.prototype.map.call(new Uint8Array(buffer), function (x) { return (('00' + x.toString(16)).slice(-2)); }).join('')];
772
+ case 2: return [2 /*return*/, "" /* Constant.Empty */];
773
+ case 3: return [3 /*break*/, 5];
774
+ case 4:
775
+ _b.sent();
776
+ return [2 /*return*/, "" /* Constant.Empty */];
777
+ case 5: return [2 /*return*/];
778
+ }
779
+ });
780
+ });
781
+ }
782
+ function detect(input) {
783
+ return input && input.indexOf("@" /* Constant.At */) > 0 ? "email" /* Constant.Email */ : "string" /* Constant.String */;
784
+ }
785
+
786
+ var variable = /*#__PURE__*/Object.freeze({
787
+ __proto__: null,
788
+ compute: compute$9,
789
+ get data () { return data$e; },
790
+ identify: identify,
791
+ reset: reset$m,
792
+ set: set,
793
+ start: start$A,
794
+ stop: stop$x
795
+ });
796
+
735
797
  var supported$1 = "CompressionStream" /* Constant.CompressionStream */ in window;
736
798
  function compress (input) {
737
799
  return __awaiter(this, void 0, void 0, function () {
@@ -1972,10 +2034,10 @@ function text(element) {
1972
2034
  // Grab text using "textContent" for most HTMLElements, however, use "value" for HTMLInputElements and "alt" for HTMLImageElement.
1973
2035
  var t = element.textContent || element.value || element.alt;
1974
2036
  if (t) {
1975
- // Trim any spaces at the beginning or at the end of string
1976
- // Also, replace multiple occurrence of space characters with a single white space
2037
+ // Replace multiple occurrence of space characters with a single white space
2038
+ // Also, trim any spaces at the beginning or at the end of string
1977
2039
  // Finally, send only first few characters as specified by the Setting
1978
- output = t.trim().replace(/\s+/g, " " /* Constant.Space */).substr(0, 25 /* Setting.ClickText */);
2040
+ output = t.replace(/\s+/g, " " /* Constant.Space */).trim().substr(0, 25 /* Setting.ClickText */);
1979
2041
  }
1980
2042
  }
1981
2043
  return output;
@@ -3732,7 +3794,7 @@ function compute$4() {
3732
3794
  var selectorKey = parseInt(s);
3733
3795
  var nodes = document.querySelectorAll(selectorData[selectorKey]);
3734
3796
  if (nodes) {
3735
- var text = Array.from(nodes).map(function (e) { return e.innerText; });
3797
+ var text = Array.from(nodes).map(function (e) { return e.textContent; });
3736
3798
  update(key, selectorKey, text.join("<SEP>" /* Constant.Seperator */).substring(0, 10000 /* Setting.ExtractLimit */));
3737
3799
  }
3738
3800
  }
@@ -3959,6 +4021,7 @@ function check$2(bytes) {
3959
4021
  if (data$4.check === 0 /* Check.None */) {
3960
4022
  var reason = data$4.check;
3961
4023
  reason = data$1.sequence >= 128 /* Setting.PayloadLimit */ ? 1 /* Check.Payload */ : reason;
4024
+ reason = data$1.pageNum >= 128 /* Setting.PageLimit */ ? 7 /* Check.Page */ : reason;
3962
4025
  reason = time() > 7200000 /* Setting.ShutdownLimit */ ? 2 /* Check.Shutdown */ : reason;
3963
4026
  reason = bytes > 10485760 /* Setting.PlaybackBytesLimit */ ? 2 /* Check.Shutdown */ : reason;
3964
4027
  if (reason !== data$4.check) {
@@ -4027,6 +4090,7 @@ function start$9() {
4027
4090
  rootDomain = null;
4028
4091
  var ua = navigator && "userAgent" in navigator ? navigator.userAgent : "" /* Constant.Empty */;
4029
4092
  var title = document && document.title ? document.title : "" /* Constant.Empty */;
4093
+ var electron = ua.indexOf("Electron" /* Constant.Electron */) > 0 ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */;
4030
4094
  // Populate ids for this page
4031
4095
  var s = session();
4032
4096
  var u = user();
@@ -4038,15 +4102,18 @@ function start$9() {
4038
4102
  // Log page metadata as dimensions
4039
4103
  log(0 /* Dimension.UserAgent */, ua);
4040
4104
  log(3 /* Dimension.PageTitle */, title);
4041
- log(1 /* Dimension.Url */, url$1(location.href));
4105
+ log(1 /* Dimension.Url */, url$1(location.href, !!electron));
4042
4106
  log(2 /* Dimension.Referrer */, document.referrer);
4043
4107
  log(15 /* Dimension.TabId */, tab());
4044
4108
  log(16 /* Dimension.PageLanguage */, document.documentElement.lang);
4045
4109
  log(17 /* Dimension.DocumentDirection */, document.dir);
4046
4110
  log(26 /* Dimension.DevicePixelRatio */, "".concat(window.devicePixelRatio));
4111
+ log(28 /* Dimension.Dob */, u.dob.toString());
4112
+ log(29 /* Dimension.CookieVersion */, u.version.toString());
4047
4113
  // Capture additional metadata as metrics
4048
4114
  max(0 /* Metric.ClientTimestamp */, s.ts);
4049
4115
  max(1 /* Metric.Playback */, 0 /* BooleanFlag.False */);
4116
+ max(35 /* Metric.Electron */, electron);
4050
4117
  // Capture navigator specific dimensions
4051
4118
  if (navigator) {
4052
4119
  log(9 /* Dimension.Language */, navigator.language);
@@ -4158,9 +4225,12 @@ function track(u, consent) {
4158
4225
  // Convert time precision into days to reduce number of bytes we have to write in a cookie
4159
4226
  // E.g. Math.ceil(1628735962643 / (24*60*60*1000)) => 18852 (days) => ejo in base36 (13 bytes => 3 bytes)
4160
4227
  var end = Math.ceil((Date.now() + (365 /* Setting.Expire */ * 86400000 /* Time.Day */)) / 86400000 /* Time.Day */);
4228
+ // If DOB is not set in the user object, use the date set in the config as a DOB
4229
+ var dob = u.dob === 0 ? (config$1.dob === null ? 0 : config$1.dob) : u.dob;
4161
4230
  // To avoid cookie churn, write user id cookie only once every day
4162
- if (u.expiry === null || Math.abs(end - u.expiry) >= 1 /* Setting.CookieInterval */ || u.consent !== consent) {
4163
- setCookie("_clck" /* Constant.CookieKey */, [data$2.userId, 1 /* Setting.CookieVersion */, end.toString(36), consent].join("|" /* Constant.Pipe */), 365 /* Setting.Expire */);
4231
+ if (u.expiry === null || Math.abs(end - u.expiry) >= 1 /* Setting.CookieInterval */ || u.consent !== consent || u.dob !== dob) {
4232
+ var cookieParts = [data$2.userId, 2 /* Setting.CookieVersion */, end.toString(36), consent, dob];
4233
+ setCookie("_clck" /* Constant.CookieKey */, cookieParts.join("|" /* Constant.Pipe */), 365 /* Setting.Expire */);
4164
4234
  }
4165
4235
  }
4166
4236
  function shortid() {
@@ -4191,7 +4261,7 @@ function num(string, base) {
4191
4261
  return parseInt(string, base);
4192
4262
  }
4193
4263
  function user() {
4194
- var output = { id: shortid(), expiry: null, consent: 0 /* BooleanFlag.False */ };
4264
+ var output = { id: shortid(), version: 0, expiry: null, consent: 0 /* BooleanFlag.False */, dob: 0 };
4195
4265
  var cookie = getCookie("_clck" /* Constant.CookieKey */);
4196
4266
  if (cookie && cookie.length > 0) {
4197
4267
  // Splitting and looking up first part for forward compatibility, in case we wish to store additional information in a cookie
@@ -4214,6 +4284,9 @@ function user() {
4214
4284
  }
4215
4285
  // End code for backward compatibility
4216
4286
  // Read version information and timestamp from cookie, if available
4287
+ if (parts.length > 1) {
4288
+ output.version = num(parts[1]);
4289
+ }
4217
4290
  if (parts.length > 2) {
4218
4291
  output.expiry = num(parts[2], 36);
4219
4292
  }
@@ -4221,6 +4294,9 @@ function user() {
4221
4294
  if (parts.length > 3 && num(parts[3]) === 1) {
4222
4295
  output.consent = 1 /* BooleanFlag.True */;
4223
4296
  }
4297
+ if (parts.length > 4 && num(parts[1]) > 1) {
4298
+ output.dob = num(parts[4]);
4299
+ }
4224
4300
  // Set track configuration to true for this user if we have explicit consent, regardless of project setting
4225
4301
  config$1.track = config$1.track || output.consent === 1 /* BooleanFlag.True */;
4226
4302
  // Get user id from cookie only if we tracking is enabled, otherwise fallback to a random id