@zaplier/sdk 1.1.1 → 1.1.2
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/dist/index.cjs +27 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +27 -24
- package/dist/index.esm.js.map +1 -1
- package/dist/sdk.js +27 -24
- package/dist/sdk.js.map +1 -1
- package/dist/sdk.min.js +1 -1
- package/dist/src/modules/fingerprint.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5133,46 +5133,47 @@ async function collectFingerprint(options = {}) {
|
|
|
5133
5133
|
const parallelTasks = [];
|
|
5134
5134
|
// Group 1: Independent rendering components (can run in parallel)
|
|
5135
5135
|
if (shouldIncludeComponent("canvas", opts) && isCanvasAvailable$1()) {
|
|
5136
|
-
parallelTasks.push(collectComponent("canvas", getCanvasFingerprint, opts).then(result => ({
|
|
5136
|
+
parallelTasks.push(collectComponent("canvas", getCanvasFingerprint, opts).then((result) => ({
|
|
5137
5137
|
component: "canvas",
|
|
5138
|
-
result
|
|
5138
|
+
result,
|
|
5139
5139
|
})));
|
|
5140
5140
|
}
|
|
5141
5141
|
if (shouldIncludeComponent("webgl", opts) && isWebGLAvailable()) {
|
|
5142
|
-
parallelTasks.push(collectComponent("webgl", getWebGLFingerprint, opts).then(result => ({
|
|
5142
|
+
parallelTasks.push(collectComponent("webgl", getWebGLFingerprint, opts).then((result) => ({
|
|
5143
5143
|
component: "webgl",
|
|
5144
|
-
result
|
|
5144
|
+
result,
|
|
5145
5145
|
})));
|
|
5146
5146
|
}
|
|
5147
5147
|
if (shouldIncludeComponent("audio", opts) && isAudioAvailable()) {
|
|
5148
|
-
parallelTasks.push(collectComponent("audio", getAudioFingerprint, opts).then(result => ({
|
|
5148
|
+
parallelTasks.push(collectComponent("audio", getAudioFingerprint, opts).then((result) => ({
|
|
5149
5149
|
component: "audio",
|
|
5150
|
-
result
|
|
5150
|
+
result,
|
|
5151
5151
|
})));
|
|
5152
5152
|
}
|
|
5153
5153
|
// Group 2: Fast synchronous components (can run in parallel)
|
|
5154
5154
|
if (shouldIncludeComponent("fonts", opts) && isFontDetectionAvailable()) {
|
|
5155
|
-
parallelTasks.push(collectComponent("fonts", () => getFontFingerprint(!opts.gdprMode), opts).then(result => ({
|
|
5155
|
+
parallelTasks.push(collectComponent("fonts", () => getFontFingerprint(!opts.gdprMode), opts).then((result) => ({
|
|
5156
5156
|
component: "fonts",
|
|
5157
|
-
result
|
|
5157
|
+
result,
|
|
5158
5158
|
})));
|
|
5159
5159
|
}
|
|
5160
5160
|
if (shouldIncludeComponent("screen", opts) && isScreenAvailable()) {
|
|
5161
|
-
parallelTasks.push(collectComponent("screen", getScreenFingerprint, opts).then(result => ({
|
|
5161
|
+
parallelTasks.push(collectComponent("screen", getScreenFingerprint, opts).then((result) => ({
|
|
5162
5162
|
component: "screen",
|
|
5163
|
-
result
|
|
5163
|
+
result,
|
|
5164
5164
|
})));
|
|
5165
5165
|
}
|
|
5166
|
-
if (shouldIncludeComponent("browser", opts) &&
|
|
5167
|
-
|
|
5166
|
+
if (shouldIncludeComponent("browser", opts) &&
|
|
5167
|
+
isBrowserFingerprintingAvailable()) {
|
|
5168
|
+
parallelTasks.push(collectComponent("browser", getBrowserFingerprint, opts).then((result) => ({
|
|
5168
5169
|
component: "browser",
|
|
5169
|
-
result
|
|
5170
|
+
result,
|
|
5170
5171
|
})));
|
|
5171
5172
|
}
|
|
5172
5173
|
// Execute all parallel tasks and handle results
|
|
5173
5174
|
const parallelResults = await Promise.allSettled(parallelTasks);
|
|
5174
5175
|
parallelResults.forEach((promiseResult, index) => {
|
|
5175
|
-
if (promiseResult.status ===
|
|
5176
|
+
if (promiseResult.status === "fulfilled" && promiseResult.value.result) {
|
|
5176
5177
|
const { component, result } = promiseResult.value;
|
|
5177
5178
|
fingerprintData[component] = result;
|
|
5178
5179
|
collectedComponents.push(component);
|
|
@@ -5180,10 +5181,10 @@ async function collectFingerprint(options = {}) {
|
|
|
5180
5181
|
else {
|
|
5181
5182
|
// Extract component name from the corresponding task
|
|
5182
5183
|
const taskComponent = parallelTasks[index];
|
|
5183
|
-
const componentName = taskComponent?.toString().match(/component: "(\w+)"/)?.[1] ||
|
|
5184
|
+
const componentName = taskComponent?.toString().match(/component: "(\w+)"/)?.[1] || "unknown";
|
|
5184
5185
|
failedComponents.push({
|
|
5185
5186
|
component: componentName,
|
|
5186
|
-
error: promiseResult.status ===
|
|
5187
|
+
error: promiseResult.status === "rejected"
|
|
5187
5188
|
? promiseResult.reason?.message || "Promise rejected"
|
|
5188
5189
|
: "Collection failed or timeout",
|
|
5189
5190
|
});
|
|
@@ -5231,7 +5232,7 @@ async function collectFingerprint(options = {}) {
|
|
|
5231
5232
|
const fallbackHardware = {
|
|
5232
5233
|
hardwareConcurrency: navigator.hardwareConcurrency || 0,
|
|
5233
5234
|
deviceMemory: navigator.deviceMemory || 0,
|
|
5234
|
-
platform: navigator.platform ||
|
|
5235
|
+
platform: navigator.platform || "unknown",
|
|
5235
5236
|
};
|
|
5236
5237
|
fingerprintData.hardware = {
|
|
5237
5238
|
value: fallbackHardware,
|
|
@@ -5698,10 +5699,11 @@ async function collectFingerprint(options = {}) {
|
|
|
5698
5699
|
platform: (browser?.platform || "unknown").toLowerCase(),
|
|
5699
5700
|
// PRIORITY 5: Device type (critical for differentiation, ultra-stable)
|
|
5700
5701
|
deviceType,
|
|
5701
|
-
// PRIORITY 6: Enhanced screen resolution
|
|
5702
|
-
//
|
|
5703
|
-
// For desktop,
|
|
5704
|
-
screen
|
|
5702
|
+
// PRIORITY 6: Enhanced screen resolution - ONLY for mobile/tablet
|
|
5703
|
+
// CRITICAL: Desktop screen detection is UNSTABLE with DevTools (viewport changes)
|
|
5704
|
+
// For desktop, we rely on hardware + display + platform for differentiation
|
|
5705
|
+
// For mobile/tablet, screen is STABLE (no DevTools viewport issues)
|
|
5706
|
+
screen: screen && (deviceType === "mobile" || deviceType === "tablet")
|
|
5705
5707
|
? (() => {
|
|
5706
5708
|
// Use enhanced screen buckets for modern display landscape
|
|
5707
5709
|
const dims = [screen.width, screen.height].sort((a, b) => b - a);
|
|
@@ -6059,14 +6061,15 @@ async function collectFingerprint(options = {}) {
|
|
|
6059
6061
|
// - Vendor flavors (can change)
|
|
6060
6062
|
// - Exact hardware values (use buckets)
|
|
6061
6063
|
// DEBUG: Log coreVector components to identify DevTools instability
|
|
6062
|
-
if (opts.debug ||
|
|
6063
|
-
|
|
6064
|
+
if (opts.debug ||
|
|
6065
|
+
(typeof window !== "undefined" && window._rabbitTrackerDebug)) {
|
|
6066
|
+
console.log("[RabbitTracker DEBUG] coreVector components:", {
|
|
6064
6067
|
ua: coreVector.ua,
|
|
6065
6068
|
platform: coreVector.platform,
|
|
6066
6069
|
deviceType: coreVector.deviceType,
|
|
6067
6070
|
screenBucket: coreVector.screen?.bucket,
|
|
6068
6071
|
timezone: coreVector.timezone,
|
|
6069
|
-
_entropy: coreVector._entropy
|
|
6072
|
+
_entropy: coreVector._entropy,
|
|
6070
6073
|
});
|
|
6071
6074
|
}
|
|
6072
6075
|
// Generate ultra-stable hash with additional collision resistance
|