@zaplier/sdk 1.1.4 → 1.1.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/dist/index.cjs +14 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +14 -17
- package/dist/index.esm.js.map +1 -1
- package/dist/sdk.js +14 -17
- package/dist/sdk.js.map +1 -1
- package/dist/sdk.min.js +1 -1
- package/dist/src/sdk.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sdk.js
CHANGED
|
@@ -7600,15 +7600,15 @@
|
|
|
7600
7600
|
*/
|
|
7601
7601
|
getBrowserFingerprint() {
|
|
7602
7602
|
const components = [
|
|
7603
|
-
navigator.userAgent ||
|
|
7604
|
-
navigator.platform ||
|
|
7603
|
+
navigator.userAgent || "",
|
|
7604
|
+
navigator.platform || "",
|
|
7605
7605
|
screen.width || 0,
|
|
7606
7606
|
screen.height || 0,
|
|
7607
7607
|
new Date(2024, 0, 1).getTimezoneOffset(),
|
|
7608
|
-
navigator.language ||
|
|
7609
|
-
navigator.hardwareConcurrency || 0
|
|
7608
|
+
navigator.language || "",
|
|
7609
|
+
navigator.hardwareConcurrency || 0,
|
|
7610
7610
|
];
|
|
7611
|
-
const combined = components.join(
|
|
7611
|
+
const combined = components.join("|");
|
|
7612
7612
|
let hash = 0;
|
|
7613
7613
|
for (let i = 0; i < combined.length; i++) {
|
|
7614
7614
|
const char = combined.charCodeAt(i);
|
|
@@ -7698,8 +7698,8 @@
|
|
|
7698
7698
|
// Use page load time (stable during session) instead of current time
|
|
7699
7699
|
performance.timeOrigin || 0,
|
|
7700
7700
|
// Deterministic entropy from browser characteristics
|
|
7701
|
-
|
|
7702
|
-
|
|
7701
|
+
navigator.plugins ? navigator.plugins.length : 0,
|
|
7702
|
+
navigator.mimeTypes ? navigator.mimeTypes.length : 0,
|
|
7703
7703
|
// Memory usage pattern (if available, use rounded values for stability)
|
|
7704
7704
|
Math.floor((performance.memory?.usedJSHeapSize || 0) / 1000000),
|
|
7705
7705
|
Math.floor((performance.memory?.totalJSHeapSize || 0) / 1000000),
|
|
@@ -7711,14 +7711,18 @@
|
|
|
7711
7711
|
window.outerWidth || 0,
|
|
7712
7712
|
Math.floor((window.devicePixelRatio || 1) * 100) / 100, // Round to 2 decimals
|
|
7713
7713
|
// Canvas support (deterministic)
|
|
7714
|
-
typeof document.createElement(
|
|
7714
|
+
typeof document.createElement("canvas").getContext === "function"
|
|
7715
|
+
? 1
|
|
7716
|
+
: 0,
|
|
7715
7717
|
];
|
|
7716
7718
|
// Create deterministic entropy string
|
|
7717
7719
|
const entropyString = entropyComponents.join("|");
|
|
7718
7720
|
// Add deterministic checksum instead of random values
|
|
7719
7721
|
let checksum = 0;
|
|
7720
7722
|
for (let i = 0; i < entropyString.length; i++) {
|
|
7721
|
-
checksum =
|
|
7723
|
+
checksum =
|
|
7724
|
+
((checksum << 5) - checksum + entropyString.charCodeAt(i)) &
|
|
7725
|
+
0xffffffff;
|
|
7722
7726
|
}
|
|
7723
7727
|
const deterministic = Math.abs(checksum).toString(36);
|
|
7724
7728
|
// Advanced hash function with better distribution
|
|
@@ -7860,14 +7864,7 @@
|
|
|
7860
7864
|
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
7861
7865
|
}
|
|
7862
7866
|
const jsonResponse = await response.json();
|
|
7863
|
-
//
|
|
7864
|
-
// (but don't wait for it or use its response)
|
|
7865
|
-
if (this.antiAdblockManager && method === "POST") {
|
|
7866
|
-
// Send in parallel without blocking
|
|
7867
|
-
this.antiAdblockManager.send(data, endpoint).catch(() => {
|
|
7868
|
-
// Silently fail - we already got the response from standard fetch
|
|
7869
|
-
});
|
|
7870
|
-
}
|
|
7867
|
+
// Return immediately - anti-adblock is only used as fallback when fetch fails
|
|
7871
7868
|
return jsonResponse;
|
|
7872
7869
|
}
|
|
7873
7870
|
catch (error) {
|