clarity-decode 0.6.28 → 0.6.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/clarity.decode.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version$1 = "0.6.
|
|
5
|
+
var version$1 = "0.6.32";
|
|
6
6
|
var version = version$1;
|
|
7
7
|
|
|
8
8
|
function decode$5(tokens) {
|
|
@@ -414,7 +414,7 @@ function decode(input) {
|
|
|
414
414
|
var codeVersion = parseVersion(version);
|
|
415
415
|
if (jsonVersion.major !== codeVersion.major ||
|
|
416
416
|
Math.abs(jsonVersion.minor - codeVersion.minor) > 1) {
|
|
417
|
-
throw new Error("Invalid version. Actual: "
|
|
417
|
+
throw new Error("Invalid version. Actual: ".concat(payload.envelope.version, " | Expected: ").concat(version, " (+/- 1) | ").concat(input.substr(0, 250)));
|
|
418
418
|
}
|
|
419
419
|
for (var _i = 0, encoded_1 = encoded; _i < encoded_1.length; _i++) {
|
|
420
420
|
var entry = encoded_1[_i];
|
|
@@ -609,7 +609,7 @@ function decode(input) {
|
|
|
609
609
|
/* Deprecated - Intentionally, no-op. For backward compatibility. */
|
|
610
610
|
break;
|
|
611
611
|
default:
|
|
612
|
-
console.error("No handler for Event: "
|
|
612
|
+
console.error("No handler for Event: ".concat(JSON.stringify(entry)));
|
|
613
613
|
break;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";var e="0.6.
|
|
1
|
+
!function(){"use strict";var e="0.6.32";function t(e){var t=e[0],a=e[1];switch(a){case 25:return{time:t,event:a,data:{gap:e[2]}};case 35:return{time:t,event:a,data:{check:e[2]}};case 24:return{time:t,event:a,data:{key:e[2],value:e[3]}};case 3:return{time:t,event:a,data:{key:e[2]}};case 2:return{time:t,event:a,data:{sequence:e[2],attempts:e[3],status:e[4]}};case 0:for(var r=2,n={};r<e.length;)n[e[r++]]=e[r++];return{time:t,event:a,data:n};case 1:for(var i=2,s={};i<e.length;)s[e[i++]]=e[i++];return{time:t,event:a,data:s};case 36:for(var o=2,c={};o<e.length;){var u=e[o++],l=e[o++];c[u]=[];for(var d=0;d<l.length-1;d+=2)c[u].push([l[d],l[d+1]])}return{time:t,event:a,data:c};case 4:return{time:t,event:a,data:{visible:e[2],docWidth:e[3],docHeight:e[4],screenWidth:e[5],screenHeight:e[6],scrollX:e[7],scrollY:e[8],pointerX:e[9],pointerY:e[10],activityTime:e[11]}};case 34:for(var v=2,p={};v<e.length;)p[e[v++]]="string"==typeof e[v+1]?[e[v++]]:e[v++];return{time:t,event:a,data:p}}return null}function a(e){var t=e[0],a=e[1];switch(a){case 31:return{time:t,event:a,data:{message:e[2],line:e[3],column:e[4],stack:e[5],source:e[6]}};case 33:return{time:t,event:a,data:{code:e[2],name:e[3],message:e[4],stack:e[5],severity:e[6]}}}return null}function r(e){var t=e[0],a=e[1];switch(a){case 13:case 14:case 12:case 15:case 16:case 17:case 20:case 18:case 19:return{time:t,event:a,data:{target:e[2],x:e[3],y:e[4]}};case 9:var r=e[12].split(".");return{time:t,event:a,data:{target:e[2],x:e[3],y:e[4],eX:e[5],eY:e[6],button:e[7],reaction:e[8],context:e[9],text:e[10],link:e[11],hash:r[0],hashBeta:r.length>0?r[1]:null}};case 38:return{time:t,event:a,data:{target:e[2],action:e[3]}};case 11:return{time:t,event:a,data:{width:e[2],height:e[3]}};case 27:return{time:t,event:a,data:{target:e[2],value:e[3]}};case 21:return{time:t,event:a,data:{start:e[2],startOffset:e[3],end:e[4],endOffset:e[5]}};case 39:return{time:t,event:a,data:{target:e[2]}};case 10:return{time:t,event:a,data:{target:e[2],x:e[3],y:e[4]}};case 22:var n=e[3].split(".");return{time:t,event:a,data:{type:e[2],hash:n[0],x:e[4],y:e[5],reaction:e[6],context:e[7],hashBeta:n.length>0?n[1]:null}};case 28:return{time:t,event:a,data:{visible:e[2]}};case 26:return{time:t,event:a,data:{name:e[2]}}}return null}function n(e){var t=e[0],a=e[1];switch(a){case 8:return{time:t,event:a,data:{width:e[2],height:e[3]}};case 7:for(var r=[],n=void 0,s=2;s<e.length;s+=n){var o=void 0;if("number"==typeof e[s+2])o={id:e[s],interaction:e[s+1],visibility:e[s+2],name:e[s+3]},n=4;else{var c=e[s+1];o={id:e[s],interaction:c>=16?c:16,visibility:c<=13?c:0,name:e[s+2]},n=3}r.push(o)}return{time:t,event:a,data:r};case 37:var u=[];for(s=2;s<e.length;s+=3){var l={id:e[s],width:e[s+1]/100,height:e[s+2]/100};u.push(l)}return{time:t,event:a,data:u};case 5:case 6:var d=null,v=[],p=0,h=[];for(s=2;s<e.length;s++){var m=e[s],b=typeof m;switch(b){case"number":b!==d&&null!==d&&(h.push(i(v,p)),v=[],p=0),v.push(m),p++;break;case"string":v.push(m);break;case"object":if("number"===typeof m[0])for(var g=0,f=m;g<f.length;g++){var k=f[g];v.push(e.length>k?e[k]:null)}}d=b}return h.push(i(v,p)),{time:t,event:a,data:h}}return null}function i(e,t){for(var a=e[t]?e[t].split("~")[0]:e[t],r={id:Math.abs(e[0]),parent:t>1?e[1]:null,previous:t>2?e[2]:null,tag:a},n=e[0]<0,i=!1,c={},u=null,l=t+1;l<e.length;l++){var d=e[l].toString(),v=d.indexOf("="),p=d[0],h=d[d.length-1];if(l===e.length-1&&"STYLE"===r.tag)u=d;else if("*T"!==r.tag&&">"===h&&-1===v);else if("*T"!==r.tag&&"#"===p&&-1===v){var m=d.substr(1).split(".");2===m.length&&(r.width=s(m[0])/100,r.height=s(m[1])/100)}else if("*T"!==r.tag&&v>0){i=!0;var b=d.substr(0,v),g=d.substr(v+1);c[b]=g}else"*T"===r.tag&&(u=n?o(d):d)}return i&&(r.attributes=c),u&&(r.value=u),r}function s(e){return e?parseInt(e,36):null}function o(e){var t=e.trim();if(t.length>0&&-1===t.indexOf(" ")){var a=s(t);if(a>0){for(var r=Math.floor(a/6),n=a%6,i=Array(n+1).join("•"),o=0;o<r;o++)i+=(0===o&&0===n?"•":" ")+Array(6).join("•");return i}}return e}function c(e){var t=e[0],a=e[1];return 29===a?{time:t,event:a,data:{fetchStart:e[2],connectStart:e[3],connectEnd:e[4],requestStart:e[5],responseStart:e[6],responseEnd:e[7],domInteractive:e[8],domComplete:e[9],loadEventStart:e[10],loadEventEnd:e[11],redirectCount:e[12],size:e[13],type:e[14],protocol:e[15],encodedSize:e[16],decodedSize:e[17]}}:null}function u(e){var t={major:0,minor:0,patch:0,beta:0},a=e.split(".");if(3===a.length){var r=a[2].split("-b");t.major=parseInt(a[0],10),t.minor=parseInt(a[1],10),2===r.length?(t.patch=parseInt(r[0],10),t.beta=parseInt(r[1],10)):t.patch=parseInt(a[2],10)}return t}var l=Object.freeze({__proto__:null,decode:function(i){var s,o=JSON.parse(i),l={version:(s=o.e)[0],sequence:s[1],start:s[2],duration:s[3],projectId:s[4],userId:s[5],sessionId:s[6],pageNum:s[7],upload:s[8],end:s[9]},d={timestamp:Date.now(),envelope:l},v=o.p?o.a.concat(o.p):o.a;v=v.sort((function(e,t){return e[0]-t[0]}));var p=u(d.envelope.version),h=u(e);if(p.major!==h.major||Math.abs(p.minor-h.minor)>1)throw new Error("Invalid version. Actual: ".concat(d.envelope.version," | Expected: ").concat(e," (+/- 1) | ").concat(i.substr(0,250)));for(var m=0,b=v;m<b.length;m++){var g=b[m];switch(g[1]){case 4:void 0===d.baseline&&(d.baseline=[]),d.baseline.push(t(g));break;case 25:void 0===d.ping&&(d.ping=[]),d.ping.push(t(g));break;case 35:void 0===d.limit&&(d.limit=[]),d.limit.push(t(g));break;case 3:void 0===d.upgrade&&(d.upgrade=[]),d.upgrade.push(t(g));break;case 0:void 0===d.metric&&(d.metric=[]);var f=t(g);f.data[2]=i.length,d.metric.push(f);break;case 1:void 0===d.dimension&&(d.dimension=[]),d.dimension.push(t(g));break;case 36:void 0===d.summary&&(d.summary=[]),d.summary.push(t(g));break;case 24:void 0===d.custom&&(d.custom=[]),d.custom.push(t(g));break;case 34:void 0===d.variable&&(d.variable=[]),d.variable.push(t(g));break;case 2:void 0===d.upload&&(d.upload=[]),d.upload.push(t(g));break;case 13:case 14:case 12:case 15:case 16:case 17:case 20:case 18:case 19:void 0===d.pointer&&(d.pointer=[]),d.pointer.push(r(g));break;case 9:void 0===d.click&&(d.click=[]);var k=r(g);d.click.push(k);break;case 38:void 0===d.clipboard&&(d.clipboard=[]);var y=r(g);d.clipboard.push(y);break;case 10:void 0===d.scroll&&(d.scroll=[]),d.scroll.push(r(g));break;case 11:void 0===d.resize&&(d.resize=[]),d.resize.push(r(g));break;case 21:void 0===d.selection&&(d.selection=[]),d.selection.push(r(g));break;case 39:void 0===d.submit&&(d.submit=[]);var w=r(g);d.submit.push(w);break;case 22:void 0===d.timeline&&(d.timeline=[]),d.timeline.push(r(g));break;case 27:void 0===d.input&&(d.input=[]),d.input.push(r(g));break;case 26:void 0===d.unload&&(d.unload=[]),d.unload.push(r(g));break;case 28:void 0===d.visibility&&(d.visibility=[]),d.visibility.push(r(g));break;case 37:void 0===d.box&&(d.box=[]),d.box.push(n(g));break;case 7:void 0===d.region&&(d.region=[]),d.region.push(n(g));break;case 5:case 6:void 0===d.dom&&(d.dom=[]),d.dom.push(n(g));break;case 8:void 0===d.doc&&(d.doc=[]),d.doc.push(n(g));break;case 31:void 0===d.script&&(d.script=[]),d.script.push(a(g));break;case 33:void 0===d.log&&(d.log=[]),d.log.push(a(g));break;case 29:void 0===d.navigation&&(d.navigation=[]),d.navigation.push(c(g));break;case 30:case 32:break;default:console.error("No handler for Event: ".concat(JSON.stringify(g)))}}return d}});"undefined"!=typeof window&&(void 0!==window.clarity&&null!==window.clarity||(window.clarity={}),window.clarity.decode=l)}();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var version$1 = "0.6.
|
|
1
|
+
var version$1 = "0.6.32";
|
|
2
2
|
var version = version$1;
|
|
3
3
|
|
|
4
4
|
function decode$5(tokens) {
|
|
@@ -410,7 +410,7 @@ function decode(input) {
|
|
|
410
410
|
var codeVersion = parseVersion(version);
|
|
411
411
|
if (jsonVersion.major !== codeVersion.major ||
|
|
412
412
|
Math.abs(jsonVersion.minor - codeVersion.minor) > 1) {
|
|
413
|
-
throw new Error("Invalid version. Actual: "
|
|
413
|
+
throw new Error("Invalid version. Actual: ".concat(payload.envelope.version, " | Expected: ").concat(version, " (+/- 1) | ").concat(input.substr(0, 250)));
|
|
414
414
|
}
|
|
415
415
|
for (var _i = 0, encoded_1 = encoded; _i < encoded_1.length; _i++) {
|
|
416
416
|
var entry = encoded_1[_i];
|
|
@@ -605,7 +605,7 @@ function decode(input) {
|
|
|
605
605
|
/* Deprecated - Intentionally, no-op. For backward compatibility. */
|
|
606
606
|
break;
|
|
607
607
|
default:
|
|
608
|
-
console.error("No handler for Event: "
|
|
608
|
+
console.error("No handler for Event: ".concat(JSON.stringify(entry)));
|
|
609
609
|
break;
|
|
610
610
|
}
|
|
611
611
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clarity-decode",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.32",
|
|
4
4
|
"description": "An analytics library that uses web page interactions to generate aggregated insights",
|
|
5
5
|
"author": "Microsoft Corp.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"url": "https://github.com/Microsoft/clarity/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"clarity-js": "^0.6.
|
|
29
|
+
"clarity-js": "^0.6.32"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@rollup/plugin-commonjs": "^19.0.1",
|