@snowplow/browser-plugin-debugger
Advanced tools
Comparing version 3.0.0-beta.5 to 3.0.0
/*! | ||
* Debugger for Snowplow v3.0.0-beta.5 (http://bit.ly/sp-js) | ||
* Debugger for Snowplow v3.0.0 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -4,0 +4,0 @@ * Licensed under BSD-3-Clause |
/*! | ||
* Debugger for Snowplow v3.0.0-beta.5 (http://bit.ly/sp-js) | ||
* Debugger for Snowplow v3.0.0 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -42,3 +42,3 @@ * Licensed under BSD-3-Clause | ||
/*! | ||
* Core functionality for Snowplow JavaScript trackers v3.0.0-beta.5 (http://bit.ly/sp-js) | ||
* Core functionality for Snowplow JavaScript trackers v3.0.0 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -48,2 +48,4 @@ * Licensed under BSD-3-Clause | ||
var version$1 = "3.0.0"; | ||
/* | ||
@@ -74,3 +76,3 @@ * Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) | ||
* @remark See: {@link http://tools.ietf.org/html/rfc4648#page-7} | ||
* @param data String to encode | ||
* @param data - String to encode | ||
* @returns The url safe Base 64 string | ||
@@ -90,3 +92,3 @@ */ | ||
* | ||
* @param data string to encode | ||
* @param data - string to encode | ||
* @returns base64-encoded string | ||
@@ -267,3 +269,3 @@ */ | ||
* Slices a schema into its composite parts. Useful for ruleset filtering. | ||
* @param input A schema string | ||
* @param input - A schema string | ||
* @returns The vendor, schema name, major, minor and patch information of a schema string | ||
@@ -279,3 +281,32 @@ */ | ||
var version = "3.0.0-beta.5"; | ||
/* | ||
* Copyright (c) 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions are met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright notice, this | ||
* list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright notice, | ||
* this list of conditions and the following disclaimer in the documentation | ||
* and/or other materials provided with the distribution. | ||
* | ||
* 3. Neither the name of the copyright holder nor the names of its | ||
* contributors may be used to endorse or promote products derived from | ||
* this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
var version = version$1; | ||
@@ -282,0 +313,0 @@ var randomColor = createCommonjsModule(function (module, exports) { |
/*! | ||
* Debugger for Snowplow v3.0.0-beta.5 (http://bit.ly/sp-js) | ||
* Debugger for Snowplow v3.0.0 (http://bit.ly/sp-js) | ||
* Copyright 2021 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -7,3 +7,3 @@ * Licensed under BSD-3-Clause | ||
"use strict";!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowDebugger={})}(this,(function(e){function r(e,r){for(var n=0,t=r.length,o=e.length;n<t;n++,o++)e[o]=r[n];return e}function n(e){if(!e)return e;var r=0,n=0,t=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(r++),a=e.charCodeAt(r++),i=e.charCodeAt(r++),s=o<<16|a<<8|i;o=s>>18&63,a=s>>12&63,i=s>>6&63,s&=63,t[n++]=u.charAt(o)+u.charAt(a)+u.charAt(i)+u.charAt(s)}while(r<e.length);r=t.join(""),e=((e=e.length%3)?r.slice(0,e-3):r)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function t(e){switch((e=e.getPayload()).e){case"pv":return"Page View";case"pp":return"Page Ping";case"tr":return"Ecommerce Transaction";case"ti":return"Ecommerce Transaction Item";case"se":return"Structured Event";case"ue":return"Self Describing";default:return"string"==typeof e.e?e.e:"Invalid"}}var o,a,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(a=o||(o={}))[a.none=0]="none",a[a.error=1]="error",a[a.warn=2]="warn",a[a.debug=3]="debug",a[a.info=4]="info",function(e){void 0===e&&(e=o.warn)}();var s,c=(function(e,r){var n,t;n=i,t=function(){function e(e,r){switch(r.format){case"hsvArray":return e;case"hslArray":return s(e);case"hsl":return"hsl("+(r=s(e))[0]+", "+r[1]+"%, "+r[2]+"%)";case"hsla":return e=s(e),r=r.alpha||Math.random(),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+r+")";case"rgbArray":return i(e);case"rgb":return"rgb("+i(e).join(", ")+")";case"rgba":return e=i(e),r=r.alpha||Math.random(),"rgba("+e.join(", ")+", "+r+")";default:return o(e)}}function r(e){if("number"==typeof parseInt(e)){var r=parseInt(e);if(360>r&&0<r)return[r,r]}if("string"==typeof e)if(d[e]){if((e=d[e]).hueRange)return e.hueRange}else if(e.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i))return[e=u(e)[0],e];return[0,360]}function n(e){for(var r in 334<=e&&360>=e&&(e-=360),d){var n=d[r];if(n.hueRange&&e>=n.hueRange[0]&&e<=n.hueRange[1])return d[r]}return"Color not found"}function t(e){if(null===l){var r=Math.random();return Math.floor(e[0]+(r+.618033988749895)%1*(e[1]+1-e[0]))}return r=e[1]||1,e=e[0]||0,l=(9301*l+49297)%233280,Math.floor(e+l/233280*(r-e))}function o(e){function r(e){return 1==(e=e.toString(16)).length?"0"+e:e}return"#"+r((e=i(e))[0])+r(e[1])+r(e[2])}function a(e,r,n){d[e]={hueRange:r,lowerBounds:n,saturationRange:[n[0][0],n[n.length-1][0]],brightnessRange:[n[n.length-1][1],n[0][1]]}}function i(e){var r=e[0];0===r&&(r=1),360===r&&(r=359),r/=360;var n=e[1]/100;e=e[2]/100;var t=Math.floor(6*r),o=6*r-t;r=e*(1-n);var a=e*(1-o*n);n=e*(1-(1-o)*n);var i=o=256,u=256;switch(t){case 0:o=e,i=n,u=r;break;case 1:o=a,i=e,u=r;break;case 2:o=r,i=e,u=n;break;case 3:o=r,i=a,u=e;break;case 4:o=n,i=r,u=e;break;case 5:o=e,i=r,u=a}return[Math.floor(255*o),Math.floor(255*i),Math.floor(255*u)]}function u(e){e=3===(e=e.replace(/^#/,"")).length?e.replace(/(.)/g,"$1$1"):e;var r=parseInt(e.substr(0,2),16)/255,n=parseInt(e.substr(2,2),16)/255;e=parseInt(e.substr(4,2),16)/255;var t=Math.max(r,n,e),o=t-Math.min(r,n,e),a=t?o/t:0;switch(t){case r:return[(n-e)/o%6*60||0,a,t];case n:return[60*((e-r)/o+2)||0,a,t];case e:return[60*((r-n)/o+4)||0,a,t]}}function s(e){var r=e[1]/100,n=e[2]/100,t=(2-r)*n;return[e[0],Math.round(r*n/(1>t?t:2-t)*1e4)/100,t/2*100]}function c(e){if(isNaN(e)){if("string"==typeof e)if(d[e]){if((e=d[e]).hueRange)return e.hueRange}else if(e.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i))return n(e=u(e)[0]).hueRange}else{var r=parseInt(e);if(360>r&&0<r)return n(e).hueRange}return[0,360]}var l=null,d={};a("monochrome",null,[[0,0],[100,0]]),a("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),a("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),a("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),a("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),a("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),a("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),a("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]);var f=[],h=function(o){if(void 0!==(o=o||{}).seed&&null!==o.seed&&o.seed===parseInt(o.seed,10))l=o.seed;else if("string"==typeof o.seed){for(var a=o.seed,i=0,u=0;u!==a.length&&!(i>=Number.MAX_SAFE_INTEGER);u++)i+=a.charCodeAt(u);l=i}else{if(void 0!==o.seed&&null!==o.seed)throw new TypeError("The seed value must be an integer or string");l=null}if(null!==o.count&&void 0!==o.count){for(a=o.count,i=[],u=0;u<o.count;u++)f.push(!1);for(o.count=null;a>i.length;)u=h(o),null!==l&&(o.seed=l),i.push(u);return o.count=a,i}if(a=o,0<f.length?(u=t(a=c(a.hue)),i=(a[1]-a[0])/f.length,u=parseInt((u-a[0])/i),!0===f[u]?u=(u+2)%f.length:f[u]=!0,a=[(a[0]+u*i)%359,(a[0]+(u+1)*i)%359]):a=r(a.hue),0>(u=t(a))&&(u=360+u),a=u,"monochrome"===(i=o).hue)i=0;else if("random"===i.luminosity)i=t([0,100]);else{var s=n(a).saturationRange;switch(u=s[0],s=s[1],i.luminosity){case"bright":u=55;break;case"dark":u=s-10;break;case"light":s=55}i=t([u,s])}u=o;e:{s=i;for(var d=n(a).lowerBounds,g=0;g<d.length-1;g++){var p=d[g][0],b=d[g][1],v=d[g+1][0],w=d[g+1][1];if(s>=p&&s<=v){s=(d=(w-b)/(v-p))*s+(b-d*p);break e}}s=0}switch(p=100,u.luminosity){case"dark":p=s+20;break;case"light":s=(p+s)/2;break;case"random":s=0,p=100}return e([a,i,u=t([s,p])],o)};return h},n=t(),e&&e.exports&&(r=e.exports=n),r.randomColor=n}(s={exports:{}},s.exports),s.exports);e.DebuggerPlugin=function(e){function a(e){var r=function(e,r){var n=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(r.schema);n=null!==n?n.slice(1,6):void 0;var t=l.event(),o=l.json;e:switch(e.keyIfEncoded){case"cx":e="Context";break e;case"ue_px":e="Self Describing";break e;default:e=e.keyIfEncoded+", "+e.keyIfNotEncoded}d(t,"Event",["%c%s%c%s%c%s\n%o",o,e+": "+(n?n[1]:"Unknown Schema"),l.schemaVersion,n?"Version: "+n[2]+"-"+n[3]+"-"+n[4]:"Unknown Schema Version",l.schema,n?"Vendor: "+n[0]:"Unknown Vendor",r.data])};return function(t,o){if(o.length)for(var a=function(e){var n=e.json.data;Array.isArray(n)?n.forEach((function(n){r(e,n)})):r(e,n)},i=0;i<o.length;i++)a(o[i]);return function(e){return function(r,t){for(var o=0;o<t.length;o++){var a=t[o],i=JSON.stringify(a.json);e?r.add(a.keyIfEncoded,n(i)):r.add(a.keyIfNotEncoded,i)}t.length=0}}(e)(t,o)}}void 0===e&&(e=o.debug);var i,u,s,l={event:function(){return"color: White; background: "+s+"; font-weight: bold; padding: 1px 4px; border-radius: 2px;"},snowplowPurple:"color: White; background: #6638B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",activated:"color: White; background: #9E62DD; font-weight: bold; padding: 1px 4px; border-radius: 2px;",payload:"color: White; background: #3748B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",json:"color: White; background: #388AB8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",schema:"color: White; background: #268047; font-weight: bold; padding: 1px 4px; border-radius: 2px;",schemaVersion:"color: White; background: #80265F; font-weight: bold; padding: 1px 4px; border-radius: 2px;"},d=function(e,n,t){var o=null!=t?t:[""];t=o[0],o=o.slice(1),i.debug.apply(i,r(["v3.0.0-beta.5 %c"+u.namespace+"%c %c%s"+t,l.snowplowPurple,"",e,n],o))};return{logger:function(r){i=r,r.setLogLevel(e)},activateBrowserPlugin:function(e){u=e,d(l.activated,"Tracker Activated")},beforeTrack:function(e){s=c({luminosity:"dark"}),e.withJsonProcessor(a(u.core.getBase64Encoding())),d(l.event(),"Event",["%c%s",l.snowplowPurple,t(e)]),e.build()},afterTrack:function(e){d(l.event(),"Event",["%c%s\n%o",l.payload,"Payload",e])}}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
"use strict";!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowDebugger={})}(this,(function(e){function r(e,r){for(var n=0,t=r.length,o=e.length;n<t;n++,o++)e[o]=r[n];return e}function n(e){if(!e)return e;var r=0,n=0,t=[];if(e){e=unescape(encodeURIComponent(e));do{var o=e.charCodeAt(r++),a=e.charCodeAt(r++),i=e.charCodeAt(r++),s=o<<16|a<<8|i;o=s>>18&63,a=s>>12&63,i=s>>6&63,s&=63,t[n++]=u.charAt(o)+u.charAt(a)+u.charAt(i)+u.charAt(s)}while(r<e.length);r=t.join(""),e=((e=e.length%3)?r.slice(0,e-3):r)+"===".slice(e||3)}return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function t(e){switch((e=e.getPayload()).e){case"pv":return"Page View";case"pp":return"Page Ping";case"tr":return"Ecommerce Transaction";case"ti":return"Ecommerce Transaction Item";case"se":return"Structured Event";case"ue":return"Self Describing";default:return"string"==typeof e.e?e.e:"Invalid"}}var o,a,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(a=o||(o={}))[a.none=0]="none",a[a.error=1]="error",a[a.warn=2]="warn",a[a.debug=3]="debug",a[a.info=4]="info",function(e){void 0===e&&(e=o.warn)}();var s,c=(function(e,r){var n,t;n=i,t=function(){function e(e,r){switch(r.format){case"hsvArray":return e;case"hslArray":return s(e);case"hsl":return"hsl("+(r=s(e))[0]+", "+r[1]+"%, "+r[2]+"%)";case"hsla":return e=s(e),r=r.alpha||Math.random(),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+r+")";case"rgbArray":return i(e);case"rgb":return"rgb("+i(e).join(", ")+")";case"rgba":return e=i(e),r=r.alpha||Math.random(),"rgba("+e.join(", ")+", "+r+")";default:return o(e)}}function r(e){if("number"==typeof parseInt(e)){var r=parseInt(e);if(360>r&&0<r)return[r,r]}if("string"==typeof e)if(d[e]){if((e=d[e]).hueRange)return e.hueRange}else if(e.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i))return[e=u(e)[0],e];return[0,360]}function n(e){for(var r in 334<=e&&360>=e&&(e-=360),d){var n=d[r];if(n.hueRange&&e>=n.hueRange[0]&&e<=n.hueRange[1])return d[r]}return"Color not found"}function t(e){if(null===l){var r=Math.random();return Math.floor(e[0]+(r+.618033988749895)%1*(e[1]+1-e[0]))}return r=e[1]||1,e=e[0]||0,l=(9301*l+49297)%233280,Math.floor(e+l/233280*(r-e))}function o(e){function r(e){return 1==(e=e.toString(16)).length?"0"+e:e}return"#"+r((e=i(e))[0])+r(e[1])+r(e[2])}function a(e,r,n){d[e]={hueRange:r,lowerBounds:n,saturationRange:[n[0][0],n[n.length-1][0]],brightnessRange:[n[n.length-1][1],n[0][1]]}}function i(e){var r=e[0];0===r&&(r=1),360===r&&(r=359),r/=360;var n=e[1]/100;e=e[2]/100;var t=Math.floor(6*r),o=6*r-t;r=e*(1-n);var a=e*(1-o*n);n=e*(1-(1-o)*n);var i=o=256,u=256;switch(t){case 0:o=e,i=n,u=r;break;case 1:o=a,i=e,u=r;break;case 2:o=r,i=e,u=n;break;case 3:o=r,i=a,u=e;break;case 4:o=n,i=r,u=e;break;case 5:o=e,i=r,u=a}return[Math.floor(255*o),Math.floor(255*i),Math.floor(255*u)]}function u(e){e=3===(e=e.replace(/^#/,"")).length?e.replace(/(.)/g,"$1$1"):e;var r=parseInt(e.substr(0,2),16)/255,n=parseInt(e.substr(2,2),16)/255;e=parseInt(e.substr(4,2),16)/255;var t=Math.max(r,n,e),o=t-Math.min(r,n,e),a=t?o/t:0;switch(t){case r:return[(n-e)/o%6*60||0,a,t];case n:return[60*((e-r)/o+2)||0,a,t];case e:return[60*((r-n)/o+4)||0,a,t]}}function s(e){var r=e[1]/100,n=e[2]/100,t=(2-r)*n;return[e[0],Math.round(r*n/(1>t?t:2-t)*1e4)/100,t/2*100]}function c(e){if(isNaN(e)){if("string"==typeof e)if(d[e]){if((e=d[e]).hueRange)return e.hueRange}else if(e.match(/^#?([0-9A-F]{3}|[0-9A-F]{6})$/i))return n(e=u(e)[0]).hueRange}else{var r=parseInt(e);if(360>r&&0<r)return n(e).hueRange}return[0,360]}var l=null,d={};a("monochrome",null,[[0,0],[100,0]]),a("red",[-26,18],[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]),a("orange",[18,46],[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]),a("yellow",[46,62],[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]),a("green",[62,178],[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]),a("blue",[178,257],[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]),a("purple",[257,282],[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]),a("pink",[282,334],[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]);var f=[],h=function(o){if(void 0!==(o=o||{}).seed&&null!==o.seed&&o.seed===parseInt(o.seed,10))l=o.seed;else if("string"==typeof o.seed){for(var a=o.seed,i=0,u=0;u!==a.length&&!(i>=Number.MAX_SAFE_INTEGER);u++)i+=a.charCodeAt(u);l=i}else{if(void 0!==o.seed&&null!==o.seed)throw new TypeError("The seed value must be an integer or string");l=null}if(null!==o.count&&void 0!==o.count){for(a=o.count,i=[],u=0;u<o.count;u++)f.push(!1);for(o.count=null;a>i.length;)u=h(o),null!==l&&(o.seed=l),i.push(u);return o.count=a,i}if(a=o,0<f.length?(u=t(a=c(a.hue)),i=(a[1]-a[0])/f.length,u=parseInt((u-a[0])/i),!0===f[u]?u=(u+2)%f.length:f[u]=!0,a=[(a[0]+u*i)%359,(a[0]+(u+1)*i)%359]):a=r(a.hue),0>(u=t(a))&&(u=360+u),a=u,"monochrome"===(i=o).hue)i=0;else if("random"===i.luminosity)i=t([0,100]);else{var s=n(a).saturationRange;switch(u=s[0],s=s[1],i.luminosity){case"bright":u=55;break;case"dark":u=s-10;break;case"light":s=55}i=t([u,s])}u=o;e:{s=i;for(var d=n(a).lowerBounds,g=0;g<d.length-1;g++){var p=d[g][0],b=d[g][1],v=d[g+1][0],w=d[g+1][1];if(s>=p&&s<=v){s=(d=(w-b)/(v-p))*s+(b-d*p);break e}}s=0}switch(p=100,u.luminosity){case"dark":p=s+20;break;case"light":s=(p+s)/2;break;case"random":s=0,p=100}return e([a,i,u=t([s,p])],o)};return h},n=t(),e&&e.exports&&(r=e.exports=n),r.randomColor=n}(s={exports:{}},s.exports),s.exports);e.DebuggerPlugin=function(e){function a(e){var r=function(e,r){var n=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(r.schema);n=null!==n?n.slice(1,6):void 0;var t=l.event(),o=l.json;e:switch(e.keyIfEncoded){case"cx":e="Context";break e;case"ue_px":e="Self Describing";break e;default:e=e.keyIfEncoded+", "+e.keyIfNotEncoded}d(t,"Event",["%c%s%c%s%c%s\n%o",o,e+": "+(n?n[1]:"Unknown Schema"),l.schemaVersion,n?"Version: "+n[2]+"-"+n[3]+"-"+n[4]:"Unknown Schema Version",l.schema,n?"Vendor: "+n[0]:"Unknown Vendor",r.data])};return function(t,o){if(o.length)for(var a=function(e){var n=e.json.data;Array.isArray(n)?n.forEach((function(n){r(e,n)})):r(e,n)},i=0;i<o.length;i++)a(o[i]);return function(e){return function(r,t){for(var o=0;o<t.length;o++){var a=t[o],i=JSON.stringify(a.json);e?r.add(a.keyIfEncoded,n(i)):r.add(a.keyIfNotEncoded,i)}t.length=0}}(e)(t,o)}}void 0===e&&(e=o.debug);var i,u,s,l={event:function(){return"color: White; background: "+s+"; font-weight: bold; padding: 1px 4px; border-radius: 2px;"},snowplowPurple:"color: White; background: #6638B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",activated:"color: White; background: #9E62DD; font-weight: bold; padding: 1px 4px; border-radius: 2px;",payload:"color: White; background: #3748B8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",json:"color: White; background: #388AB8; font-weight: bold; padding: 1px 4px; border-radius: 2px;",schema:"color: White; background: #268047; font-weight: bold; padding: 1px 4px; border-radius: 2px;",schemaVersion:"color: White; background: #80265F; font-weight: bold; padding: 1px 4px; border-radius: 2px;"},d=function(e,n,t){var o=null!=t?t:[""];t=o[0],o=o.slice(1),i.debug.apply(i,r(["v3.0.0 %c"+u.namespace+"%c %c%s"+t,l.snowplowPurple,"",e,n],o))};return{logger:function(r){i=r,r.setLogLevel(e)},activateBrowserPlugin:function(e){u=e,d(l.activated,"Tracker Activated")},beforeTrack:function(e){s=c({luminosity:"dark"}),e.withJsonProcessor(a(u.core.getBase64Encoding())),d(l.event(),"Event",["%c%s",l.snowplowPurple,t(e)]),e.build()},afterTrack:function(e){d(l.event(),"Event",["%c%s\n%o",l.payload,"Payload",e])}}},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "@snowplow/browser-plugin-debugger", | ||
"version": "3.0.0-beta.5", | ||
"version": "3.0.0", | ||
"description": "Debugger for Snowplow", | ||
@@ -24,4 +24,4 @@ "homepage": "http://bit.ly/sp-js", | ||
"dependencies": { | ||
"@snowplow/browser-tracker-core": "3.0.0-beta.5", | ||
"@snowplow/tracker-core": "3.0.0-beta.5", | ||
"@snowplow/browser-tracker-core": "3.0.0", | ||
"@snowplow/tracker-core": "3.0.0", | ||
"tslib": "^2.1.0", | ||
@@ -28,0 +28,0 @@ "randomcolor": "^0.6.2" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
290076
14
1038
1
+ Added@snowplow/browser-tracker-core@3.0.0(transitive)
+ Added@snowplow/tracker-core@3.0.0(transitive)
- Removed@snowplow/browser-tracker-core@3.0.0-beta.5(transitive)
- Removed@snowplow/tracker-core@3.0.0-beta.5(transitive)
Updated@snowplow/tracker-core@3.0.0