@rudderstack/analytics-js 3.11.3 → 3.11.5
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/CHANGELOG.md +14 -0
- package/dist/npm/legacy/bundled/cjs/index.cjs +12 -10
- package/dist/npm/legacy/bundled/esm/index.mjs +12 -10
- package/dist/npm/legacy/bundled/umd/index.js +12 -10
- package/dist/npm/legacy/cjs/index.cjs +12 -10
- package/dist/npm/legacy/content-script/cjs/index.cjs +12 -10
- package/dist/npm/legacy/content-script/esm/index.mjs +12 -10
- package/dist/npm/legacy/content-script/umd/index.js +12 -10
- package/dist/npm/legacy/esm/index.mjs +12 -10
- package/dist/npm/legacy/umd/index.js +12 -10
- package/dist/npm/modern/bundled/cjs/index.cjs +12 -10
- package/dist/npm/modern/bundled/esm/index.mjs +12 -10
- package/dist/npm/modern/bundled/umd/index.js +12 -10
- package/dist/npm/modern/cjs/index.cjs +12 -10
- package/dist/npm/modern/content-script/cjs/index.cjs +12 -10
- package/dist/npm/modern/content-script/esm/index.mjs +12 -10
- package/dist/npm/modern/content-script/umd/index.js +12 -10
- package/dist/npm/modern/esm/index.mjs +12 -10
- package/dist/npm/modern/umd/index.js +12 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,20 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [3.11.5](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.4...@rudderstack/analytics-js@3.11.5) (2024-11-21)
|
6
|
+
|
7
|
+
### Dependency Updates
|
8
|
+
|
9
|
+
* `@rudderstack/analytics-js-cookies` updated to version `0.4.7`
|
10
|
+
* `@rudderstack/analytics-js-common` updated to version `3.14.4`
|
11
|
+
* `@rudderstack/analytics-js-plugins` updated to version `3.6.8`
|
12
|
+
## [3.11.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.3...@rudderstack/analytics-js@3.11.4) (2024-11-21)
|
13
|
+
|
14
|
+
### Dependency Updates
|
15
|
+
|
16
|
+
* `@rudderstack/analytics-js-cookies` updated to version `0.4.6`
|
17
|
+
* `@rudderstack/analytics-js-common` updated to version `3.14.3`
|
18
|
+
* `@rudderstack/analytics-js-plugins` updated to version `3.6.7`
|
5
19
|
## [3.11.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.2...@rudderstack/analytics-js@3.11.3) (2024-11-21)
|
6
20
|
|
7
21
|
### Dependency Updates
|
@@ -919,21 +919,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
919
919
|
* @param {boolean} excludeNull if it should exclude nul or not
|
920
920
|
* @param {function} logger optional logger methods for warning
|
921
921
|
* @returns string
|
922
|
-
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){
|
923
|
-
function
|
924
|
-
|
925
|
-
|
926
|
-
// eslint-disable-next-line
|
927
|
-
|
928
|
-
|
929
|
-
|
922
|
+
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){var ancestors=[];// Array to track ancestor objects
|
923
|
+
// Using a regular function to use `this` for the parent context
|
924
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
925
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
926
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
927
|
+
// @ts-ignore-next-line
|
928
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
929
|
+
}// Check for circular references (if the value is already in the ancestors)
|
930
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
931
|
+
ancestors.push(value);return value;};};/**
|
930
932
|
* Recursively traverses an object similar to JSON.stringify,
|
931
933
|
* sanitizing BigInts and circular references
|
932
934
|
* @param value Input object
|
933
935
|
* @param logger Logger instance
|
934
936
|
* @returns Sanitized value
|
935
937
|
*/var getSanitizedValue=function getSanitizedValue(value,logger){var replacer=getReplacer();// This is needed for registering the first ancestor
|
936
|
-
var newValue=replacer.call(value,'',value);
|
938
|
+
var newValue=replacer.call(value,'',value);return newValue;};
|
937
939
|
|
938
940
|
// if yes make them null instead of omitting in overloaded cases
|
939
941
|
/*
|
@@ -1020,7 +1022,7 @@ var MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
1020
1022
|
* @returns Instance of Error with message prepended with issue
|
1021
1023
|
*/var getMutatedError=function getMutatedError(err,issue){var finalError=err;if(!isTypeOfError(err)){finalError=new Error("".concat(issue,": ").concat(stringifyWithoutCircular(err)));}else {finalError.message="".concat(issue,": ").concat(err.message);}return finalError;};var dispatchErrorEvent=function dispatchErrorEvent(error){if(isTypeOfError(error)){var _error$stack;error.stack="".concat((_error$stack=error.stack)!==null&&_error$stack!==void 0?_error$stack:'',"\n").concat(MANUAL_ERROR_IDENTIFIER);}globalThis.dispatchEvent(new ErrorEvent('error',{error:error}));};
|
1022
1024
|
|
1023
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.
|
1025
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.5';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
1024
1026
|
|
1025
1027
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1026
1028
|
|
@@ -917,21 +917,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
917
917
|
* @param {boolean} excludeNull if it should exclude nul or not
|
918
918
|
* @param {function} logger optional logger methods for warning
|
919
919
|
* @returns string
|
920
|
-
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){
|
921
|
-
function
|
922
|
-
|
923
|
-
|
924
|
-
// eslint-disable-next-line
|
925
|
-
|
926
|
-
|
927
|
-
|
920
|
+
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){var ancestors=[];// Array to track ancestor objects
|
921
|
+
// Using a regular function to use `this` for the parent context
|
922
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
923
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
924
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
925
|
+
// @ts-ignore-next-line
|
926
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
927
|
+
}// Check for circular references (if the value is already in the ancestors)
|
928
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
929
|
+
ancestors.push(value);return value;};};/**
|
928
930
|
* Recursively traverses an object similar to JSON.stringify,
|
929
931
|
* sanitizing BigInts and circular references
|
930
932
|
* @param value Input object
|
931
933
|
* @param logger Logger instance
|
932
934
|
* @returns Sanitized value
|
933
935
|
*/var getSanitizedValue=function getSanitizedValue(value,logger){var replacer=getReplacer();// This is needed for registering the first ancestor
|
934
|
-
var newValue=replacer.call(value,'',value);
|
936
|
+
var newValue=replacer.call(value,'',value);return newValue;};
|
935
937
|
|
936
938
|
// if yes make them null instead of omitting in overloaded cases
|
937
939
|
/*
|
@@ -1018,7 +1020,7 @@ var MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
1018
1020
|
* @returns Instance of Error with message prepended with issue
|
1019
1021
|
*/var getMutatedError=function getMutatedError(err,issue){var finalError=err;if(!isTypeOfError(err)){finalError=new Error("".concat(issue,": ").concat(stringifyWithoutCircular(err)));}else {finalError.message="".concat(issue,": ").concat(err.message);}return finalError;};var dispatchErrorEvent=function dispatchErrorEvent(error){if(isTypeOfError(error)){var _error$stack;error.stack="".concat((_error$stack=error.stack)!==null&&_error$stack!==void 0?_error$stack:'',"\n").concat(MANUAL_ERROR_IDENTIFIER);}globalThis.dispatchEvent(new ErrorEvent('error',{error:error}));};
|
1020
1022
|
|
1021
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.
|
1023
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.5';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
1022
1024
|
|
1023
1025
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1024
1026
|
|
@@ -923,21 +923,23 @@
|
|
923
923
|
* @param {boolean} excludeNull if it should exclude nul or not
|
924
924
|
* @param {function} logger optional logger methods for warning
|
925
925
|
* @returns string
|
926
|
-
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){
|
927
|
-
function
|
928
|
-
|
929
|
-
|
930
|
-
// eslint-disable-next-line
|
931
|
-
|
932
|
-
|
933
|
-
|
926
|
+
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){var ancestors=[];// Array to track ancestor objects
|
927
|
+
// Using a regular function to use `this` for the parent context
|
928
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
929
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
930
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
931
|
+
// @ts-ignore-next-line
|
932
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
933
|
+
}// Check for circular references (if the value is already in the ancestors)
|
934
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
935
|
+
ancestors.push(value);return value;};};/**
|
934
936
|
* Recursively traverses an object similar to JSON.stringify,
|
935
937
|
* sanitizing BigInts and circular references
|
936
938
|
* @param value Input object
|
937
939
|
* @param logger Logger instance
|
938
940
|
* @returns Sanitized value
|
939
941
|
*/var getSanitizedValue=function getSanitizedValue(value,logger){var replacer=getReplacer();// This is needed for registering the first ancestor
|
940
|
-
var newValue=replacer.call(value,'',value);
|
942
|
+
var newValue=replacer.call(value,'',value);return newValue;};
|
941
943
|
|
942
944
|
// if yes make them null instead of omitting in overloaded cases
|
943
945
|
/*
|
@@ -1024,7 +1026,7 @@
|
|
1024
1026
|
* @returns Instance of Error with message prepended with issue
|
1025
1027
|
*/var getMutatedError=function getMutatedError(err,issue){var finalError=err;if(!isTypeOfError(err)){finalError=new Error("".concat(issue,": ").concat(stringifyWithoutCircular(err)));}else {finalError.message="".concat(issue,": ").concat(err.message);}return finalError;};var dispatchErrorEvent=function dispatchErrorEvent(error){if(isTypeOfError(error)){var _error$stack;error.stack="".concat((_error$stack=error.stack)!==null&&_error$stack!==void 0?_error$stack:'',"\n").concat(MANUAL_ERROR_IDENTIFIER);}globalThis.dispatchEvent(new ErrorEvent('error',{error:error}));};
|
1026
1028
|
|
1027
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.
|
1029
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.5';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
1028
1030
|
|
1029
1031
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1030
1032
|
|
@@ -919,21 +919,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
919
919
|
* @param {boolean} excludeNull if it should exclude nul or not
|
920
920
|
* @param {function} logger optional logger methods for warning
|
921
921
|
* @returns string
|
922
|
-
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){
|
923
|
-
function
|
924
|
-
|
925
|
-
|
926
|
-
// eslint-disable-next-line
|
927
|
-
|
928
|
-
|
929
|
-
|
922
|
+
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){var ancestors=[];// Array to track ancestor objects
|
923
|
+
// Using a regular function to use `this` for the parent context
|
924
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
925
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
926
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
927
|
+
// @ts-ignore-next-line
|
928
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
929
|
+
}// Check for circular references (if the value is already in the ancestors)
|
930
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
931
|
+
ancestors.push(value);return value;};};/**
|
930
932
|
* Recursively traverses an object similar to JSON.stringify,
|
931
933
|
* sanitizing BigInts and circular references
|
932
934
|
* @param value Input object
|
933
935
|
* @param logger Logger instance
|
934
936
|
* @returns Sanitized value
|
935
937
|
*/var getSanitizedValue=function getSanitizedValue(value,logger){var replacer=getReplacer();// This is needed for registering the first ancestor
|
936
|
-
var newValue=replacer.call(value,'',value);
|
938
|
+
var newValue=replacer.call(value,'',value);return newValue;};
|
937
939
|
|
938
940
|
// if yes make them null instead of omitting in overloaded cases
|
939
941
|
/*
|
@@ -1020,7 +1022,7 @@ var MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
1020
1022
|
* @returns Instance of Error with message prepended with issue
|
1021
1023
|
*/var getMutatedError=function getMutatedError(err,issue){var finalError=err;if(!isTypeOfError(err)){finalError=new Error("".concat(issue,": ").concat(stringifyWithoutCircular(err)));}else {finalError.message="".concat(issue,": ").concat(err.message);}return finalError;};var dispatchErrorEvent=function dispatchErrorEvent(error){if(isTypeOfError(error)){var _error$stack;error.stack="".concat((_error$stack=error.stack)!==null&&_error$stack!==void 0?_error$stack:'',"\n").concat(MANUAL_ERROR_IDENTIFIER);}globalThis.dispatchEvent(new ErrorEvent('error',{error:error}));};
|
1022
1024
|
|
1023
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.
|
1025
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.5';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
1024
1026
|
|
1025
1027
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1026
1028
|
|
@@ -919,21 +919,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
919
919
|
* @param {boolean} excludeNull if it should exclude nul or not
|
920
920
|
* @param {function} logger optional logger methods for warning
|
921
921
|
* @returns string
|
922
|
-
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){
|
923
|
-
function
|
924
|
-
|
925
|
-
|
926
|
-
// eslint-disable-next-line
|
927
|
-
|
928
|
-
|
929
|
-
|
922
|
+
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){var ancestors=[];// Array to track ancestor objects
|
923
|
+
// Using a regular function to use `this` for the parent context
|
924
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
925
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
926
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
927
|
+
// @ts-ignore-next-line
|
928
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
929
|
+
}// Check for circular references (if the value is already in the ancestors)
|
930
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
931
|
+
ancestors.push(value);return value;};};/**
|
930
932
|
* Recursively traverses an object similar to JSON.stringify,
|
931
933
|
* sanitizing BigInts and circular references
|
932
934
|
* @param value Input object
|
933
935
|
* @param logger Logger instance
|
934
936
|
* @returns Sanitized value
|
935
937
|
*/var getSanitizedValue=function getSanitizedValue(value,logger){var replacer=getReplacer();// This is needed for registering the first ancestor
|
936
|
-
var newValue=replacer.call(value,'',value);
|
938
|
+
var newValue=replacer.call(value,'',value);return newValue;};
|
937
939
|
|
938
940
|
// if yes make them null instead of omitting in overloaded cases
|
939
941
|
/*
|
@@ -1020,7 +1022,7 @@ var MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
1020
1022
|
* @returns Instance of Error with message prepended with issue
|
1021
1023
|
*/var getMutatedError=function getMutatedError(err,issue){var finalError=err;if(!isTypeOfError(err)){finalError=new Error("".concat(issue,": ").concat(stringifyWithoutCircular(err)));}else {finalError.message="".concat(issue,": ").concat(err.message);}return finalError;};var dispatchErrorEvent=function dispatchErrorEvent(error){if(isTypeOfError(error)){var _error$stack;error.stack="".concat((_error$stack=error.stack)!==null&&_error$stack!==void 0?_error$stack:'',"\n").concat(MANUAL_ERROR_IDENTIFIER);}globalThis.dispatchEvent(new ErrorEvent('error',{error:error}));};
|
1022
1024
|
|
1023
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.
|
1025
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.5';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
1024
1026
|
|
1025
1027
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1026
1028
|
|
@@ -917,21 +917,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
917
917
|
* @param {boolean} excludeNull if it should exclude nul or not
|
918
918
|
* @param {function} logger optional logger methods for warning
|
919
919
|
* @returns string
|
920
|
-
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){
|
921
|
-
function
|
922
|
-
|
923
|
-
|
924
|
-
// eslint-disable-next-line
|
925
|
-
|
926
|
-
|
927
|
-
|
920
|
+
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){var ancestors=[];// Array to track ancestor objects
|
921
|
+
// Using a regular function to use `this` for the parent context
|
922
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
923
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
924
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
925
|
+
// @ts-ignore-next-line
|
926
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
927
|
+
}// Check for circular references (if the value is already in the ancestors)
|
928
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
929
|
+
ancestors.push(value);return value;};};/**
|
928
930
|
* Recursively traverses an object similar to JSON.stringify,
|
929
931
|
* sanitizing BigInts and circular references
|
930
932
|
* @param value Input object
|
931
933
|
* @param logger Logger instance
|
932
934
|
* @returns Sanitized value
|
933
935
|
*/var getSanitizedValue=function getSanitizedValue(value,logger){var replacer=getReplacer();// This is needed for registering the first ancestor
|
934
|
-
var newValue=replacer.call(value,'',value);
|
936
|
+
var newValue=replacer.call(value,'',value);return newValue;};
|
935
937
|
|
936
938
|
// if yes make them null instead of omitting in overloaded cases
|
937
939
|
/*
|
@@ -1018,7 +1020,7 @@ var MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
1018
1020
|
* @returns Instance of Error with message prepended with issue
|
1019
1021
|
*/var getMutatedError=function getMutatedError(err,issue){var finalError=err;if(!isTypeOfError(err)){finalError=new Error("".concat(issue,": ").concat(stringifyWithoutCircular(err)));}else {finalError.message="".concat(issue,": ").concat(err.message);}return finalError;};var dispatchErrorEvent=function dispatchErrorEvent(error){if(isTypeOfError(error)){var _error$stack;error.stack="".concat((_error$stack=error.stack)!==null&&_error$stack!==void 0?_error$stack:'',"\n").concat(MANUAL_ERROR_IDENTIFIER);}globalThis.dispatchEvent(new ErrorEvent('error',{error:error}));};
|
1020
1022
|
|
1021
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.
|
1023
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.5';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
1022
1024
|
|
1023
1025
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1024
1026
|
|
@@ -923,21 +923,23 @@
|
|
923
923
|
* @param {boolean} excludeNull if it should exclude nul or not
|
924
924
|
* @param {function} logger optional logger methods for warning
|
925
925
|
* @returns string
|
926
|
-
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){
|
927
|
-
function
|
928
|
-
|
929
|
-
|
930
|
-
// eslint-disable-next-line
|
931
|
-
|
932
|
-
|
933
|
-
|
926
|
+
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){var ancestors=[];// Array to track ancestor objects
|
927
|
+
// Using a regular function to use `this` for the parent context
|
928
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
929
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
930
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
931
|
+
// @ts-ignore-next-line
|
932
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
933
|
+
}// Check for circular references (if the value is already in the ancestors)
|
934
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
935
|
+
ancestors.push(value);return value;};};/**
|
934
936
|
* Recursively traverses an object similar to JSON.stringify,
|
935
937
|
* sanitizing BigInts and circular references
|
936
938
|
* @param value Input object
|
937
939
|
* @param logger Logger instance
|
938
940
|
* @returns Sanitized value
|
939
941
|
*/var getSanitizedValue=function getSanitizedValue(value,logger){var replacer=getReplacer();// This is needed for registering the first ancestor
|
940
|
-
var newValue=replacer.call(value,'',value);
|
942
|
+
var newValue=replacer.call(value,'',value);return newValue;};
|
941
943
|
|
942
944
|
// if yes make them null instead of omitting in overloaded cases
|
943
945
|
/*
|
@@ -1024,7 +1026,7 @@
|
|
1024
1026
|
* @returns Instance of Error with message prepended with issue
|
1025
1027
|
*/var getMutatedError=function getMutatedError(err,issue){var finalError=err;if(!isTypeOfError(err)){finalError=new Error("".concat(issue,": ").concat(stringifyWithoutCircular(err)));}else {finalError.message="".concat(issue,": ").concat(err.message);}return finalError;};var dispatchErrorEvent=function dispatchErrorEvent(error){if(isTypeOfError(error)){var _error$stack;error.stack="".concat((_error$stack=error.stack)!==null&&_error$stack!==void 0?_error$stack:'',"\n").concat(MANUAL_ERROR_IDENTIFIER);}globalThis.dispatchEvent(new ErrorEvent('error',{error:error}));};
|
1026
1028
|
|
1027
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.
|
1029
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.5';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
1028
1030
|
|
1029
1031
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1030
1032
|
|
@@ -917,21 +917,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
917
917
|
* @param {boolean} excludeNull if it should exclude nul or not
|
918
918
|
* @param {function} logger optional logger methods for warning
|
919
919
|
* @returns string
|
920
|
-
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){
|
921
|
-
function
|
922
|
-
|
923
|
-
|
924
|
-
// eslint-disable-next-line
|
925
|
-
|
926
|
-
|
927
|
-
|
920
|
+
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){var ancestors=[];// Array to track ancestor objects
|
921
|
+
// Using a regular function to use `this` for the parent context
|
922
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
923
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
924
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
925
|
+
// @ts-ignore-next-line
|
926
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
927
|
+
}// Check for circular references (if the value is already in the ancestors)
|
928
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
929
|
+
ancestors.push(value);return value;};};/**
|
928
930
|
* Recursively traverses an object similar to JSON.stringify,
|
929
931
|
* sanitizing BigInts and circular references
|
930
932
|
* @param value Input object
|
931
933
|
* @param logger Logger instance
|
932
934
|
* @returns Sanitized value
|
933
935
|
*/var getSanitizedValue=function getSanitizedValue(value,logger){var replacer=getReplacer();// This is needed for registering the first ancestor
|
934
|
-
var newValue=replacer.call(value,'',value);
|
936
|
+
var newValue=replacer.call(value,'',value);return newValue;};
|
935
937
|
|
936
938
|
// if yes make them null instead of omitting in overloaded cases
|
937
939
|
/*
|
@@ -1018,7 +1020,7 @@ var MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
1018
1020
|
* @returns Instance of Error with message prepended with issue
|
1019
1021
|
*/var getMutatedError=function getMutatedError(err,issue){var finalError=err;if(!isTypeOfError(err)){finalError=new Error("".concat(issue,": ").concat(stringifyWithoutCircular(err)));}else {finalError.message="".concat(issue,": ").concat(err.message);}return finalError;};var dispatchErrorEvent=function dispatchErrorEvent(error){if(isTypeOfError(error)){var _error$stack;error.stack="".concat((_error$stack=error.stack)!==null&&_error$stack!==void 0?_error$stack:'',"\n").concat(MANUAL_ERROR_IDENTIFIER);}globalThis.dispatchEvent(new ErrorEvent('error',{error:error}));};
|
1020
1022
|
|
1021
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.
|
1023
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.5';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
1022
1024
|
|
1023
1025
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1024
1026
|
|
@@ -923,21 +923,23 @@
|
|
923
923
|
* @param {boolean} excludeNull if it should exclude nul or not
|
924
924
|
* @param {function} logger optional logger methods for warning
|
925
925
|
* @returns string
|
926
|
-
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){
|
927
|
-
function
|
928
|
-
|
929
|
-
|
930
|
-
// eslint-disable-next-line
|
931
|
-
|
932
|
-
|
933
|
-
|
926
|
+
*/var stringifyWithoutCircular=function stringifyWithoutCircular(value,excludeNull,excludeKeys,logger){try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger===null||logger===void 0||logger.warn(JSON_STRINGIFY_WARNING,err);return null;}};var getReplacer=function getReplacer(logger){var ancestors=[];// Array to track ancestor objects
|
927
|
+
// Using a regular function to use `this` for the parent context
|
928
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
929
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
930
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
931
|
+
// @ts-ignore-next-line
|
932
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
933
|
+
}// Check for circular references (if the value is already in the ancestors)
|
934
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
935
|
+
ancestors.push(value);return value;};};/**
|
934
936
|
* Recursively traverses an object similar to JSON.stringify,
|
935
937
|
* sanitizing BigInts and circular references
|
936
938
|
* @param value Input object
|
937
939
|
* @param logger Logger instance
|
938
940
|
* @returns Sanitized value
|
939
941
|
*/var getSanitizedValue=function getSanitizedValue(value,logger){var replacer=getReplacer();// This is needed for registering the first ancestor
|
940
|
-
var newValue=replacer.call(value,'',value);
|
942
|
+
var newValue=replacer.call(value,'',value);return newValue;};
|
941
943
|
|
942
944
|
// if yes make them null instead of omitting in overloaded cases
|
943
945
|
/*
|
@@ -1024,7 +1026,7 @@
|
|
1024
1026
|
* @returns Instance of Error with message prepended with issue
|
1025
1027
|
*/var getMutatedError=function getMutatedError(err,issue){var finalError=err;if(!isTypeOfError(err)){finalError=new Error("".concat(issue,": ").concat(stringifyWithoutCircular(err)));}else {finalError.message="".concat(issue,": ").concat(err.message);}return finalError;};var dispatchErrorEvent=function dispatchErrorEvent(error){if(isTypeOfError(error)){var _error$stack;error.stack="".concat((_error$stack=error.stack)!==null&&_error$stack!==void 0?_error$stack:'',"\n").concat(MANUAL_ERROR_IDENTIFIER);}globalThis.dispatchEvent(new ErrorEvent('error',{error:error}));};
|
1026
1028
|
|
1027
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.
|
1029
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.11.5';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
1028
1030
|
|
1029
1031
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1030
1032
|
|
@@ -355,21 +355,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
355
355
|
* @param {boolean} excludeNull if it should exclude nul or not
|
356
356
|
* @param {function} logger optional logger methods for warning
|
357
357
|
* @returns string
|
358
|
-
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger
|
359
|
-
function
|
360
|
-
|
361
|
-
|
362
|
-
// eslint-disable-next-line
|
363
|
-
|
364
|
-
|
365
|
-
|
358
|
+
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger=>{const ancestors=[];// Array to track ancestor objects
|
359
|
+
// Using a regular function to use `this` for the parent context
|
360
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
361
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
362
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
363
|
+
// @ts-ignore-next-line
|
364
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
365
|
+
}// Check for circular references (if the value is already in the ancestors)
|
366
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
367
|
+
ancestors.push(value);return value;};};/**
|
366
368
|
* Recursively traverses an object similar to JSON.stringify,
|
367
369
|
* sanitizing BigInts and circular references
|
368
370
|
* @param value Input object
|
369
371
|
* @param logger Logger instance
|
370
372
|
* @returns Sanitized value
|
371
373
|
*/const getSanitizedValue=(value,logger)=>{const replacer=getReplacer();// This is needed for registering the first ancestor
|
372
|
-
const newValue=replacer.call(value,'',value);
|
374
|
+
const newValue=replacer.call(value,'',value);return newValue;};
|
373
375
|
|
374
376
|
// if yes make them null instead of omitting in overloaded cases
|
375
377
|
/*
|
@@ -456,7 +458,7 @@ const MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
456
458
|
* @returns Instance of Error with message prepended with issue
|
457
459
|
*/const getMutatedError=(err,issue)=>{let finalError=err;if(!isTypeOfError(err)){finalError=new Error(`${issue}: ${stringifyWithoutCircular(err)}`);}else {finalError.message=`${issue}: ${err.message}`;}return finalError;};const dispatchErrorEvent=error=>{if(isTypeOfError(error)){error.stack=`${error.stack??''}\n${MANUAL_ERROR_IDENTIFIER}`;}globalThis.dispatchEvent(new ErrorEvent('error',{error}));};
|
458
460
|
|
459
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.
|
461
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.5';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
460
462
|
|
461
463
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
462
464
|
|
@@ -351,21 +351,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
351
351
|
* @param {boolean} excludeNull if it should exclude nul or not
|
352
352
|
* @param {function} logger optional logger methods for warning
|
353
353
|
* @returns string
|
354
|
-
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger
|
355
|
-
function
|
356
|
-
|
357
|
-
|
358
|
-
// eslint-disable-next-line
|
359
|
-
|
360
|
-
|
361
|
-
|
354
|
+
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger=>{const ancestors=[];// Array to track ancestor objects
|
355
|
+
// Using a regular function to use `this` for the parent context
|
356
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
357
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
358
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
359
|
+
// @ts-ignore-next-line
|
360
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
361
|
+
}// Check for circular references (if the value is already in the ancestors)
|
362
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
363
|
+
ancestors.push(value);return value;};};/**
|
362
364
|
* Recursively traverses an object similar to JSON.stringify,
|
363
365
|
* sanitizing BigInts and circular references
|
364
366
|
* @param value Input object
|
365
367
|
* @param logger Logger instance
|
366
368
|
* @returns Sanitized value
|
367
369
|
*/const getSanitizedValue=(value,logger)=>{const replacer=getReplacer();// This is needed for registering the first ancestor
|
368
|
-
const newValue=replacer.call(value,'',value);
|
370
|
+
const newValue=replacer.call(value,'',value);return newValue;};
|
369
371
|
|
370
372
|
// if yes make them null instead of omitting in overloaded cases
|
371
373
|
/*
|
@@ -452,7 +454,7 @@ const MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
452
454
|
* @returns Instance of Error with message prepended with issue
|
453
455
|
*/const getMutatedError=(err,issue)=>{let finalError=err;if(!isTypeOfError(err)){finalError=new Error(`${issue}: ${stringifyWithoutCircular(err)}`);}else {finalError.message=`${issue}: ${err.message}`;}return finalError;};const dispatchErrorEvent=error=>{if(isTypeOfError(error)){error.stack=`${error.stack??''}\n${MANUAL_ERROR_IDENTIFIER}`;}globalThis.dispatchEvent(new ErrorEvent('error',{error}));};
|
454
456
|
|
455
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.
|
457
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.5';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
456
458
|
|
457
459
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
458
460
|
|
@@ -357,21 +357,23 @@
|
|
357
357
|
* @param {boolean} excludeNull if it should exclude nul or not
|
358
358
|
* @param {function} logger optional logger methods for warning
|
359
359
|
* @returns string
|
360
|
-
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger
|
361
|
-
function
|
362
|
-
|
363
|
-
|
364
|
-
// eslint-disable-next-line
|
365
|
-
|
366
|
-
|
367
|
-
|
360
|
+
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger=>{const ancestors=[];// Array to track ancestor objects
|
361
|
+
// Using a regular function to use `this` for the parent context
|
362
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
363
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
364
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
365
|
+
// @ts-ignore-next-line
|
366
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
367
|
+
}// Check for circular references (if the value is already in the ancestors)
|
368
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
369
|
+
ancestors.push(value);return value;};};/**
|
368
370
|
* Recursively traverses an object similar to JSON.stringify,
|
369
371
|
* sanitizing BigInts and circular references
|
370
372
|
* @param value Input object
|
371
373
|
* @param logger Logger instance
|
372
374
|
* @returns Sanitized value
|
373
375
|
*/const getSanitizedValue=(value,logger)=>{const replacer=getReplacer();// This is needed for registering the first ancestor
|
374
|
-
const newValue=replacer.call(value,'',value);
|
376
|
+
const newValue=replacer.call(value,'',value);return newValue;};
|
375
377
|
|
376
378
|
// if yes make them null instead of omitting in overloaded cases
|
377
379
|
/*
|
@@ -458,7 +460,7 @@
|
|
458
460
|
* @returns Instance of Error with message prepended with issue
|
459
461
|
*/const getMutatedError=(err,issue)=>{let finalError=err;if(!isTypeOfError(err)){finalError=new Error(`${issue}: ${stringifyWithoutCircular(err)}`);}else {finalError.message=`${issue}: ${err.message}`;}return finalError;};const dispatchErrorEvent=error=>{if(isTypeOfError(error)){error.stack=`${error.stack??''}\n${MANUAL_ERROR_IDENTIFIER}`;}globalThis.dispatchEvent(new ErrorEvent('error',{error}));};
|
460
462
|
|
461
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.
|
463
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.5';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
462
464
|
|
463
465
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
464
466
|
|
@@ -346,21 +346,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
346
346
|
* @param {boolean} excludeNull if it should exclude nul or not
|
347
347
|
* @param {function} logger optional logger methods for warning
|
348
348
|
* @returns string
|
349
|
-
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger
|
350
|
-
function
|
351
|
-
|
352
|
-
|
353
|
-
// eslint-disable-next-line
|
354
|
-
|
355
|
-
|
356
|
-
|
349
|
+
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger=>{const ancestors=[];// Array to track ancestor objects
|
350
|
+
// Using a regular function to use `this` for the parent context
|
351
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
352
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
353
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
354
|
+
// @ts-ignore-next-line
|
355
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
356
|
+
}// Check for circular references (if the value is already in the ancestors)
|
357
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
358
|
+
ancestors.push(value);return value;};};/**
|
357
359
|
* Recursively traverses an object similar to JSON.stringify,
|
358
360
|
* sanitizing BigInts and circular references
|
359
361
|
* @param value Input object
|
360
362
|
* @param logger Logger instance
|
361
363
|
* @returns Sanitized value
|
362
364
|
*/const getSanitizedValue=(value,logger)=>{const replacer=getReplacer();// This is needed for registering the first ancestor
|
363
|
-
const newValue=replacer.call(value,'',value);
|
365
|
+
const newValue=replacer.call(value,'',value);return newValue;};
|
364
366
|
|
365
367
|
// if yes make them null instead of omitting in overloaded cases
|
366
368
|
/*
|
@@ -447,7 +449,7 @@ const MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
447
449
|
* @returns Instance of Error with message prepended with issue
|
448
450
|
*/const getMutatedError=(err,issue)=>{let finalError=err;if(!isTypeOfError(err)){finalError=new Error(`${issue}: ${stringifyWithoutCircular(err)}`);}else {finalError.message=`${issue}: ${err.message}`;}return finalError;};const dispatchErrorEvent=error=>{if(isTypeOfError(error)){error.stack=`${error.stack??''}\n${MANUAL_ERROR_IDENTIFIER}`;}globalThis.dispatchEvent(new ErrorEvent('error',{error}));};
|
449
451
|
|
450
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.
|
452
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.5';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
451
453
|
|
452
454
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
453
455
|
|
@@ -355,21 +355,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
355
355
|
* @param {boolean} excludeNull if it should exclude nul or not
|
356
356
|
* @param {function} logger optional logger methods for warning
|
357
357
|
* @returns string
|
358
|
-
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger
|
359
|
-
function
|
360
|
-
|
361
|
-
|
362
|
-
// eslint-disable-next-line
|
363
|
-
|
364
|
-
|
365
|
-
|
358
|
+
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger=>{const ancestors=[];// Array to track ancestor objects
|
359
|
+
// Using a regular function to use `this` for the parent context
|
360
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
361
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
362
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
363
|
+
// @ts-ignore-next-line
|
364
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
365
|
+
}// Check for circular references (if the value is already in the ancestors)
|
366
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
367
|
+
ancestors.push(value);return value;};};/**
|
366
368
|
* Recursively traverses an object similar to JSON.stringify,
|
367
369
|
* sanitizing BigInts and circular references
|
368
370
|
* @param value Input object
|
369
371
|
* @param logger Logger instance
|
370
372
|
* @returns Sanitized value
|
371
373
|
*/const getSanitizedValue=(value,logger)=>{const replacer=getReplacer();// This is needed for registering the first ancestor
|
372
|
-
const newValue=replacer.call(value,'',value);
|
374
|
+
const newValue=replacer.call(value,'',value);return newValue;};
|
373
375
|
|
374
376
|
// if yes make them null instead of omitting in overloaded cases
|
375
377
|
/*
|
@@ -456,7 +458,7 @@ const MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
456
458
|
* @returns Instance of Error with message prepended with issue
|
457
459
|
*/const getMutatedError=(err,issue)=>{let finalError=err;if(!isTypeOfError(err)){finalError=new Error(`${issue}: ${stringifyWithoutCircular(err)}`);}else {finalError.message=`${issue}: ${err.message}`;}return finalError;};const dispatchErrorEvent=error=>{if(isTypeOfError(error)){error.stack=`${error.stack??''}\n${MANUAL_ERROR_IDENTIFIER}`;}globalThis.dispatchEvent(new ErrorEvent('error',{error}));};
|
458
460
|
|
459
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.
|
461
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.5';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
460
462
|
|
461
463
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
462
464
|
|
@@ -351,21 +351,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
351
351
|
* @param {boolean} excludeNull if it should exclude nul or not
|
352
352
|
* @param {function} logger optional logger methods for warning
|
353
353
|
* @returns string
|
354
|
-
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger
|
355
|
-
function
|
356
|
-
|
357
|
-
|
358
|
-
// eslint-disable-next-line
|
359
|
-
|
360
|
-
|
361
|
-
|
354
|
+
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger=>{const ancestors=[];// Array to track ancestor objects
|
355
|
+
// Using a regular function to use `this` for the parent context
|
356
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
357
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
358
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
359
|
+
// @ts-ignore-next-line
|
360
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
361
|
+
}// Check for circular references (if the value is already in the ancestors)
|
362
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
363
|
+
ancestors.push(value);return value;};};/**
|
362
364
|
* Recursively traverses an object similar to JSON.stringify,
|
363
365
|
* sanitizing BigInts and circular references
|
364
366
|
* @param value Input object
|
365
367
|
* @param logger Logger instance
|
366
368
|
* @returns Sanitized value
|
367
369
|
*/const getSanitizedValue=(value,logger)=>{const replacer=getReplacer();// This is needed for registering the first ancestor
|
368
|
-
const newValue=replacer.call(value,'',value);
|
370
|
+
const newValue=replacer.call(value,'',value);return newValue;};
|
369
371
|
|
370
372
|
// if yes make them null instead of omitting in overloaded cases
|
371
373
|
/*
|
@@ -452,7 +454,7 @@ const MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
452
454
|
* @returns Instance of Error with message prepended with issue
|
453
455
|
*/const getMutatedError=(err,issue)=>{let finalError=err;if(!isTypeOfError(err)){finalError=new Error(`${issue}: ${stringifyWithoutCircular(err)}`);}else {finalError.message=`${issue}: ${err.message}`;}return finalError;};const dispatchErrorEvent=error=>{if(isTypeOfError(error)){error.stack=`${error.stack??''}\n${MANUAL_ERROR_IDENTIFIER}`;}globalThis.dispatchEvent(new ErrorEvent('error',{error}));};
|
454
456
|
|
455
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.
|
457
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.5';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
456
458
|
|
457
459
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
458
460
|
|
@@ -357,21 +357,23 @@
|
|
357
357
|
* @param {boolean} excludeNull if it should exclude nul or not
|
358
358
|
* @param {function} logger optional logger methods for warning
|
359
359
|
* @returns string
|
360
|
-
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger
|
361
|
-
function
|
362
|
-
|
363
|
-
|
364
|
-
// eslint-disable-next-line
|
365
|
-
|
366
|
-
|
367
|
-
|
360
|
+
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger=>{const ancestors=[];// Array to track ancestor objects
|
361
|
+
// Using a regular function to use `this` for the parent context
|
362
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
363
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
364
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
365
|
+
// @ts-ignore-next-line
|
366
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
367
|
+
}// Check for circular references (if the value is already in the ancestors)
|
368
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
369
|
+
ancestors.push(value);return value;};};/**
|
368
370
|
* Recursively traverses an object similar to JSON.stringify,
|
369
371
|
* sanitizing BigInts and circular references
|
370
372
|
* @param value Input object
|
371
373
|
* @param logger Logger instance
|
372
374
|
* @returns Sanitized value
|
373
375
|
*/const getSanitizedValue=(value,logger)=>{const replacer=getReplacer();// This is needed for registering the first ancestor
|
374
|
-
const newValue=replacer.call(value,'',value);
|
376
|
+
const newValue=replacer.call(value,'',value);return newValue;};
|
375
377
|
|
376
378
|
// if yes make them null instead of omitting in overloaded cases
|
377
379
|
/*
|
@@ -458,7 +460,7 @@
|
|
458
460
|
* @returns Instance of Error with message prepended with issue
|
459
461
|
*/const getMutatedError=(err,issue)=>{let finalError=err;if(!isTypeOfError(err)){finalError=new Error(`${issue}: ${stringifyWithoutCircular(err)}`);}else {finalError.message=`${issue}: ${err.message}`;}return finalError;};const dispatchErrorEvent=error=>{if(isTypeOfError(error)){error.stack=`${error.stack??''}\n${MANUAL_ERROR_IDENTIFIER}`;}globalThis.dispatchEvent(new ErrorEvent('error',{error}));};
|
460
462
|
|
461
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.
|
463
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.5';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
462
464
|
|
463
465
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
464
466
|
|
@@ -342,21 +342,23 @@ while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();
|
|
342
342
|
* @param {boolean} excludeNull if it should exclude nul or not
|
343
343
|
* @param {function} logger optional logger methods for warning
|
344
344
|
* @returns string
|
345
|
-
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger
|
346
|
-
function
|
347
|
-
|
348
|
-
|
349
|
-
// eslint-disable-next-line
|
350
|
-
|
351
|
-
|
352
|
-
|
345
|
+
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger=>{const ancestors=[];// Array to track ancestor objects
|
346
|
+
// Using a regular function to use `this` for the parent context
|
347
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
348
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
349
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
350
|
+
// @ts-ignore-next-line
|
351
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
352
|
+
}// Check for circular references (if the value is already in the ancestors)
|
353
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
354
|
+
ancestors.push(value);return value;};};/**
|
353
355
|
* Recursively traverses an object similar to JSON.stringify,
|
354
356
|
* sanitizing BigInts and circular references
|
355
357
|
* @param value Input object
|
356
358
|
* @param logger Logger instance
|
357
359
|
* @returns Sanitized value
|
358
360
|
*/const getSanitizedValue=(value,logger)=>{const replacer=getReplacer();// This is needed for registering the first ancestor
|
359
|
-
const newValue=replacer.call(value,'',value);
|
361
|
+
const newValue=replacer.call(value,'',value);return newValue;};
|
360
362
|
|
361
363
|
// if yes make them null instead of omitting in overloaded cases
|
362
364
|
/*
|
@@ -443,7 +445,7 @@ const MANUAL_ERROR_IDENTIFIER='[MANUAL ERROR]';/**
|
|
443
445
|
* @returns Instance of Error with message prepended with issue
|
444
446
|
*/const getMutatedError=(err,issue)=>{let finalError=err;if(!isTypeOfError(err)){finalError=new Error(`${issue}: ${stringifyWithoutCircular(err)}`);}else {finalError.message=`${issue}: ${err.message}`;}return finalError;};const dispatchErrorEvent=error=>{if(isTypeOfError(error)){error.stack=`${error.stack??''}\n${MANUAL_ERROR_IDENTIFIER}`;}globalThis.dispatchEvent(new ErrorEvent('error',{error}));};
|
445
447
|
|
446
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.
|
448
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.5';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
447
449
|
|
448
450
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
449
451
|
|
@@ -348,21 +348,23 @@
|
|
348
348
|
* @param {boolean} excludeNull if it should exclude nul or not
|
349
349
|
* @param {function} logger optional logger methods for warning
|
350
350
|
* @returns string
|
351
|
-
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger
|
352
|
-
function
|
353
|
-
|
354
|
-
|
355
|
-
// eslint-disable-next-line
|
356
|
-
|
357
|
-
|
358
|
-
|
351
|
+
*/const stringifyWithoutCircular=(value,excludeNull,excludeKeys,logger)=>{try{return JSON.stringify(value,getCircularReplacer(excludeNull,excludeKeys,logger));}catch(err){logger?.warn(JSON_STRINGIFY_WARNING,err);return null;}};const getReplacer=logger=>{const ancestors=[];// Array to track ancestor objects
|
352
|
+
// Using a regular function to use `this` for the parent context
|
353
|
+
return function replacer(key,value){if(isBigInt(value)){return '[BigInt]';// Replace BigInt values
|
354
|
+
}// `this` is the object that value is contained in, i.e., its direct parent.
|
355
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
356
|
+
// @ts-ignore-next-line
|
357
|
+
while(ancestors.length>0&&ancestors[ancestors.length-1]!==this){ancestors.pop();// Remove ancestors that are no longer part of the chain
|
358
|
+
}// Check for circular references (if the value is already in the ancestors)
|
359
|
+
if(ancestors.includes(value)){return '[Circular Reference]';}// Add current value to ancestors
|
360
|
+
ancestors.push(value);return value;};};/**
|
359
361
|
* Recursively traverses an object similar to JSON.stringify,
|
360
362
|
* sanitizing BigInts and circular references
|
361
363
|
* @param value Input object
|
362
364
|
* @param logger Logger instance
|
363
365
|
* @returns Sanitized value
|
364
366
|
*/const getSanitizedValue=(value,logger)=>{const replacer=getReplacer();// This is needed for registering the first ancestor
|
365
|
-
const newValue=replacer.call(value,'',value);
|
367
|
+
const newValue=replacer.call(value,'',value);return newValue;};
|
366
368
|
|
367
369
|
// if yes make them null instead of omitting in overloaded cases
|
368
370
|
/*
|
@@ -449,7 +451,7 @@
|
|
449
451
|
* @returns Instance of Error with message prepended with issue
|
450
452
|
*/const getMutatedError=(err,issue)=>{let finalError=err;if(!isTypeOfError(err)){finalError=new Error(`${issue}: ${stringifyWithoutCircular(err)}`);}else {finalError.message=`${issue}: ${err.message}`;}return finalError;};const dispatchErrorEvent=error=>{if(isTypeOfError(error)){error.stack=`${error.stack??''}\n${MANUAL_ERROR_IDENTIFIER}`;}globalThis.dispatchEvent(new ErrorEvent('error',{error}));};
|
451
453
|
|
452
|
-
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.
|
454
|
+
const APP_NAME='RudderLabs JavaScript SDK';const APP_VERSION='3.11.5';const APP_NAMESPACE='com.rudderlabs.javascript';const MODULE_TYPE='npm';const ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';const ADBLOCK_PAGE_NAME='ad-block page request';const ADBLOCK_PAGE_PATH='/ad-blocked';const GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';const CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
453
455
|
|
454
456
|
const QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';const QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';const QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';const QUERY_PARAM_USER_ID_KEY='ajs_uid';const QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
455
457
|
|